@volter/game-editor 0.5.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUNDLED_NOTICES +11228 -0
- package/LICENSE +686 -0
- package/LICENSE-BLENDER +1409 -0
- package/LICENSE-MCP +21 -0
- package/NOTICE +21 -0
- package/catalog/entries/audio.json +14 -0
- package/catalog/entries/bake.json +36 -0
- package/catalog/entries/blender.json +17 -0
- package/catalog/entries/react-root.json +24 -0
- package/catalog/entries/reflections.json +29 -0
- package/catalog/entries/static-batch.json +25 -0
- package/catalog/project-source/LICENSE +37 -0
- package/catalog/project-source/src/contributions/bake.kind.ts +40 -0
- package/catalog/project-source/src/contributions/builder-document.tsx +65 -0
- package/catalog/project-source/src/contributions/builder-state.ts +27 -0
- package/catalog/project-source/src/contributions/builder-ui.tsx +61 -0
- package/catalog/project-source/src/contributions/module-source.ts +502 -0
- package/catalog/project-source/src/contributions/pages.finder.ts +61 -0
- package/catalog/project-source/src/lib/audio/sfx.ts +255 -0
- package/catalog/project-source/src/lib/bake/asset-seed.ts +128 -0
- package/catalog/project-source/src/lib/bake/bake-schema.ts +65 -0
- package/catalog/project-source/src/lib/bake/clip-layering.ts +203 -0
- package/catalog/project-source/src/lib/bake/gltf-bake.ts +657 -0
- package/catalog/project-source/src/lib/bake/mesh-slice.ts +157 -0
- package/catalog/project-source/src/lib/bake/node-image.ts +463 -0
- package/catalog/project-source/src/lib/bake/object3d-bake.ts +121 -0
- package/catalog/project-source/src/lib/bake/object3d-lifecycle.ts +15 -0
- package/catalog/project-source/src/lib/bake/object3d-source.ts +8 -0
- package/catalog/project-source/src/lib/bake/params.ts +75 -0
- package/catalog/project-source/src/lib/bake/rest-relative-animation.ts +217 -0
- package/catalog/project-source/src/lib/bake/use-model.ts +95 -0
- package/catalog/project-source/src/lib/react-root/index.ts +20 -0
- package/catalog/project-source/src/lib/react-root/react-root-adapter.tsx +57 -0
- package/catalog/project-source/src/lib/reflections/ReflectionProbe.tsx +201 -0
- package/catalog/project-source/src/lib/reflections/index.ts +19 -0
- package/catalog/project-source/src/lib/reflections/probe-controller.ts +75 -0
- package/catalog/project-source/src/lib/reflections/reflection-probe-registry.ts +402 -0
- package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +416 -0
- package/catalog/project-source/src/lib/static-batch/Frozen.tsx +91 -0
- package/catalog/project-source/src/lib/static-batch/freeze.ts +579 -0
- package/catalog/project-source/src/lib/static-batch/index.ts +44 -0
- package/catalog/project-source/src/lib/static-batch/mutation-watch.ts +149 -0
- package/catalog/project-source/src/lib/static-batch/shadow-cache.ts +171 -0
- package/catalog/project-source/src/tools/bake-module.tool.ts +139 -0
- package/catalog/project-source/src/tools/bake-preview.tool.ts +475 -0
- package/dist/.vite/manifest.json +8304 -0
- package/dist/assets/AssetBudgetPanel-J9--TZPU.js +23 -0
- package/dist/assets/AudioViewer-CR7333fe.js +1 -0
- package/dist/assets/BVHLoader-6bQIXhMX.js +1 -0
- package/dist/assets/BufferGeometryUtils-Nz37EVXf.js +1 -0
- package/dist/assets/CCDIKSolver-CD7vLpsK.js +1 -0
- package/dist/assets/CSS3DRenderer-CL7ABLVK.js +1 -0
- package/dist/assets/CanvasSceneViewport-Bpi6gVTC.js +1 -0
- package/dist/assets/ColladaLoader-aVOPIsCh.js +3 -0
- package/dist/assets/ColorInput-DQBNrW-K.js +1 -0
- package/dist/assets/ConvexGeometry-CAzXlPVG.js +1 -0
- package/dist/assets/ConvexHull-BINCESFp.js +1 -0
- package/dist/assets/CopyShader-BzTUYzf6.js +24 -0
- package/dist/assets/DecalGeometry-160KRdfg.js +1 -0
- package/dist/assets/EXRLoader-Cdans_oJ.js +1 -0
- package/dist/assets/EffectComposer-DQxfsXBZ.js +1 -0
- package/dist/assets/EntityModelDocument-Ccvw66N9.js +1 -0
- package/dist/assets/EnvironmentAssetDocument-Dg-Qq6O6.js +1 -0
- package/dist/assets/FBXLoader-B4MoUtAn.js +1 -0
- package/dist/assets/Fbo-Dz-Soul3.js +1 -0
- package/dist/assets/FontLoader-CvGoVI5a.js +2 -0
- package/dist/assets/GLTFExporter-HgrCle4L.js +1 -0
- package/dist/assets/GameplaySessionTimeline-B52W3FVZ.js +1 -0
- package/dist/assets/Gltf-UHVWKz65.js +2 -0
- package/dist/assets/HDRLoader-THU88oVD.js +5 -0
- package/dist/assets/ImageViewer-Tn7s_MnW.js +1 -0
- package/dist/assets/InspectorCanvasPreview-CEr_Kxna.js +1 -0
- package/dist/assets/InspectorObjectPreview-CVejvLRg.js +1 -0
- package/dist/assets/JsonAssetDocument-C7VGcLhu.js +3 -0
- package/dist/assets/LineSegments2-CsOpKSiM.js +370 -0
- package/dist/assets/MTLLoader-_Xzd4_0p.js +2 -0
- package/dist/assets/MarchingCubes-Bsp4wrzd.js +1 -0
- package/dist/assets/MeshBVH-BiDHDcu-.js +1 -0
- package/dist/assets/ModelAssetDocument-F5GACirk.js +1 -0
- package/dist/assets/NonThreeAuthoringBootstrap-C3woOMxX.js +1 -0
- package/dist/assets/OBJLoader-BhIC6Hwo.js +5 -0
- package/dist/assets/Object3DDocumentViewport-DB7T0NTl.js +2 -0
- package/dist/assets/Object3DPreview-DL8oi7Xs.js +2 -0
- package/dist/assets/OnlineAssetDetail-C6z9RvYK.js +2 -0
- package/dist/assets/OrbitControls-CM3bPray.js +1 -0
- package/dist/assets/OrbitControls-DLpayAaK.js +1 -0
- package/dist/assets/OrthographicCamera-bQozawrh.js +1 -0
- package/dist/assets/PLYLoader-DYQqs5Ik.js +2 -0
- package/dist/assets/PerspectiveCamera-CQ2lh01o.js +1 -0
- package/dist/assets/PlayBar-BR-Vg3Jb.js +2 -0
- package/dist/assets/RGBELoader-BgBcQv8j.js +1 -0
- package/dist/assets/RectAreaLightUniformsLib-CMMoWfll.js +1 -0
- package/dist/assets/RenderPass-DPrn-Uky.js +1 -0
- package/dist/assets/ResolutionPicker-C67vs1F3.js +1 -0
- package/dist/assets/RootSelectionOverlay-BZPlxmXU.js +1 -0
- package/dist/assets/RoundedBox-BDGBg6QZ.js +1 -0
- package/dist/assets/RoundedBoxGeometry-CyUuYPfW.js +1 -0
- package/dist/assets/STLLoader-Dyv3lsxY.js +1 -0
- package/dist/assets/SelectionBox-D_75KrNW.js +1 -0
- package/dist/assets/ShaderPass-QYRpPuFJ.js +1 -0
- package/dist/assets/ShadowEditor-DkImwu1Y.js +1 -0
- package/dist/assets/SimplifyModifier-C8ayvRzd.js +1 -0
- package/dist/assets/SkeletonUtils-Cps8GOC6.js +1 -0
- package/dist/assets/Sky-CQKCgYDs.js +154 -0
- package/dist/assets/SourceAssetViewer-2SWQoUut.js +12 -0
- package/dist/assets/StageHost-BN-IoTef.js +2 -0
- package/dist/assets/StoryPreviewMount-DjyxRCXu.js +1 -0
- package/dist/assets/TDSLoader-D_T8XJ81.js +1 -0
- package/dist/assets/TextGeometry-DOWAEUV0.js +1 -0
- package/dist/assets/ThreeBoardDocument-CVncZyIq.js +2 -0
- package/dist/assets/ThreeIsolationSceneContent-C8C8whSF.js +1 -0
- package/dist/assets/ToolObject3DPreview-BRoDWe4Q.js +1 -0
- package/dist/assets/TrackballControls-DfznuQTh.js +1 -0
- package/dist/assets/TransientHint-BB1fwrvK.js +1 -0
- package/dist/assets/UnrealBloomPass-CR-cS_K5.js +83 -0
- package/dist/assets/VideoViewer-C6kocgIU.js +1 -0
- package/dist/assets/_commonjsHelpers-D6-XlEtG.js +1 -0
- package/dist/assets/active-ingest-CT6jSGhr.js +3 -0
- package/dist/assets/adapter-surface-Y37Nzcyw.js +1 -0
- package/dist/assets/after-paint-CB4bz1-e.js +1 -0
- package/dist/assets/agx-base-srgb-BjWZJgrZ.lut +0 -0
- package/dist/assets/agx-look-medium-high-contrast-D5F_ob1L.lut +0 -0
- package/dist/assets/agx-look-punchy-dxsnycNs.lut +0 -0
- package/dist/assets/animation-clock-CnjZqfJp.js +1 -0
- package/dist/assets/asset-budget-asset.menu-Di3KiQCd.js +1 -0
- package/dist/assets/asset-budget.action-DCzzcuTh.js +1 -0
- package/dist/assets/asset-budget.document-BWU8wnVW.js +1 -0
- package/dist/assets/asset-budget.menu-BGZpT_31.js +1 -0
- package/dist/assets/asset-editor-persistence-BBaONOJt.js +1 -0
- package/dist/assets/asset-loaders-BOy5Ss8k.js +2 -0
- package/dist/assets/asset-parse-error-BHMwBRU3.js +3 -0
- package/dist/assets/assets-BuSoGjBX.js +1 -0
- package/dist/assets/audio-meter-CyiToeUW.js +1 -0
- package/dist/assets/audio-unlock.service-CfUgUQVy.js +1 -0
- package/dist/assets/audio.utility-C6K6jem8.js +1 -0
- package/dist/assets/authoring-CgcOFhGS.js +1 -0
- package/dist/assets/autoplay.service-BZBGNSvt.js +1 -0
- package/dist/assets/axe-LkjAB6Lv.js +30 -0
- package/dist/assets/babylon-authoring-adapter-CL02gWDn.js +1 -0
- package/dist/assets/binding-Bmxqznjk.js +1 -0
- package/dist/assets/binding-identity-DcTpbvyg.js +1 -0
- package/dist/assets/binding-resolver-Dsh-6Vor.js +2 -0
- package/dist/assets/blender-emscripten-engine-9ZIRYNhe.js +2 -0
- package/dist/assets/blender-node-editor.document-iIDkB9sI.js +1 -0
- package/dist/assets/blender-properties-tab-C5CyPydi.js +3 -0
- package/dist/assets/blender-runtime-host-BpBwGv7r.js +4 -0
- package/dist/assets/blender-runtime-skin-DyQ9B6CR.js +7140 -0
- package/dist/assets/blender-runtime.document-lIYhhPtv.js +8 -0
- package/dist/assets/blender-timeline.document-77fx96N7.js +1 -0
- package/dist/assets/blender-uv-editor.document-fsT7B4gV.js +1 -0
- package/dist/assets/blender-version.status-o6dBm3n6.js +1 -0
- package/dist/assets/blender-wali-engine-wTOcrOMC.js +2 -0
- package/dist/assets/blender.command-BtJeWk-A.js +1 -0
- package/dist/assets/blender.keymap-GAQgeklK.js +1 -0
- package/dist/assets/blender.status-ujwGU6dU.js +1 -0
- package/dist/assets/blender.style-Dcem5f_T.js +1 -0
- package/dist/assets/board-guides-DziKSTss.js +1 -0
- package/dist/assets/body-marks-h_xDxiDE.js +1 -0
- package/dist/assets/bridge.command-o5gDNEwa.js +3 -0
- package/dist/assets/browserAll-DeWblVez.js +1 -0
- package/dist/assets/build-profiles.document-kW8iw8Xj.js +2 -0
- package/dist/assets/build-progress.status-BNRLytg2.js +1 -0
- package/dist/assets/build-session-C_sg3CEn.js +9 -0
- package/dist/assets/build.action-lYjTLb7K.js +1 -0
- package/dist/assets/build.command-DIGgUPU_.js +1 -0
- package/dist/assets/build.header-CKajx5U3.js +1 -0
- package/dist/assets/build.menu-BdU0QXny.js +1 -0
- package/dist/assets/build.service-CbBAyeu3.js +1 -0
- package/dist/assets/bus-mixer-CGfWDP3C.js +1 -0
- package/dist/assets/camera-KEsKvOL7.js +1 -0
- package/dist/assets/camera-runtime.inspector-B7unX4g1.js +1 -0
- package/dist/assets/canvas-entry-runtime-SfBxaR9M.js +2 -0
- package/dist/assets/capability-coverage-Czas4C18.js +7 -0
- package/dist/assets/chrome-trace-YZHMz60-.js +1 -0
- package/dist/assets/client-DNXj_opT.js +25 -0
- package/dist/assets/clip-planes-CnAI6DZn.js +1 -0
- package/dist/assets/collaboration-presence-DLoZ7EA3.js +1 -0
- package/dist/assets/collider-Bw0mXlsW.js +1 -0
- package/dist/assets/collider-dimensions-9xoFADXN.js +1 -0
- package/dist/assets/collision-system-DpNUJRJ3.js +1 -0
- package/dist/assets/command-results-CUQD49AB.js +1 -0
- package/dist/assets/component-board-registry-DrIa2csL.js +1 -0
- package/dist/assets/component-board.service-DCwcUssB.js +2 -0
- package/dist/assets/component-board.service-DidCyM4O.js +2 -0
- package/dist/assets/component-verbs.command-7xzfjGMZ.js +1 -0
- package/dist/assets/component-verbs.service-Bv9jId3q.js +1 -0
- package/dist/assets/config-CEZk921y.js +6 -0
- package/dist/assets/configurations-DTBMdaTL.js +1 -0
- package/dist/assets/connection.status-BifnQdOs.js +1 -0
- package/dist/assets/console-bridge-CHcb-xk5.js +1 -0
- package/dist/assets/constraint-De8f1Uiq.js +1 -0
- package/dist/assets/constraints.inspector-B9U9Yj-u.js +1 -0
- package/dist/assets/countdown-timer-CUm74dom.js +1 -0
- package/dist/assets/coverage.service-VTX5Mcsx.js +3 -0
- package/dist/assets/crash-null-boundary-v3a0uEgw.js +1 -0
- package/dist/assets/create-runtime-CVCc1BDx.js +1 -0
- package/dist/assets/curve-7Q79VgU4.js +1 -0
- package/dist/assets/data-asset-4hjS642k.js +5 -0
- package/dist/assets/data-check-core-CQEjuFyt.js +1 -0
- package/dist/assets/data-ref-CQI28C0D.js +1 -0
- package/dist/assets/debug-bridge-CCohG-d-.js +1 -0
- package/dist/assets/debug-registry-Dgvitx8M.js +1 -0
- package/dist/assets/defaults-DKiBJCPN.js +1 -0
- package/dist/assets/deferred-commands-CEMmvL47.js +1 -0
- package/dist/assets/deferred-ingest-play-DCJi_Pgu.js +2 -0
- package/dist/assets/design-time-layers-wYgOTgni.js +1 -0
- package/dist/assets/design-time-mount-registry-DUpXCg1U.js +1 -0
- package/dist/assets/design-time-mount.service-BzY21e1F.js +2 -0
- package/dist/assets/design-time-react-mount-DM9WLrF2.js +1 -0
- package/dist/assets/dev-build-gDYrq68M.js +1 -0
- package/dist/assets/directional-shadow-fit-BVkOKAv2.js +1 -0
- package/dist/assets/document-preview-three-Kbg2GCLm.js +1 -0
- package/dist/assets/dom-authoring-adapter-CY8C7f4T.js +1 -0
- package/dist/assets/draco3d-BBUTcNkz.js +1 -0
- package/dist/assets/draco_decoder-DsQ12WqX.wasm +0 -0
- package/dist/assets/draco_encoder-2Tcju8Ns.wasm +0 -0
- package/dist/assets/edit-mode-audio.service-Bzetwd5B.js +1 -0
- package/dist/assets/edit-mode-authoring-B47TfLqu.js +1 -0
- package/dist/assets/edit-mode-networking.service-YCX6RRb_.js +1 -0
- package/dist/assets/editor-api-BoJIcyZG.js +1 -0
- package/dist/assets/editor-port-C_FeBdeV.js +1 -0
- package/dist/assets/editor-presentation-activity-C7SNSmTd.js +1 -0
- package/dist/assets/entry-adjudication-Cq8Yeb74.js +1 -0
- package/dist/assets/environment-capture-7himRh2L.js +1 -0
- package/dist/assets/esbuild-BHljloGq.wasm +0 -0
- package/dist/assets/events-156d8d12.esm-ErOhDXXB.js +36 -0
- package/dist/assets/extend-B-eOccUm.js +36 -0
- package/dist/assets/extends-CF3RwP-h.js +1 -0
- package/dist/assets/eyedropper-session-bjPXnfeX.js +1 -0
- package/dist/assets/fflate.module-DPuTF8aG.js +6 -0
- package/dist/assets/filmic-srgb-Ct35FIH6.lut +0 -0
- package/dist/assets/first-party-audio-system-DxnGJOER.js +1 -0
- package/dist/assets/first-party-navigation-system-CL5Bquub.js +1 -0
- package/dist/assets/fork-menu-BoVyw2Wu.js +1 -0
- package/dist/assets/frame-debugger-store-D1Mf_5up.js +1 -0
- package/dist/assets/frame-delta-D2nsw_Ht.js +1 -0
- package/dist/assets/frame-pacing-D5acoOzO.js +1 -0
- package/dist/assets/frame-selector-cache-cCeUbcjG.js +1 -0
- package/dist/assets/game-DHOZVb-7.js +1 -0
- package/dist/assets/game-contract-seams-a5YXejOu.js +1 -0
- package/dist/assets/game-css-scope-transform-Eng4wS8E.js +33 -0
- package/dist/assets/game-document.service-DbRfx2V0.js +1 -0
- package/dist/assets/game-eval.command-D-7Dxbj_.js +2 -0
- package/dist/assets/game-input-seams-CIQdetRw.js +1 -0
- package/dist/assets/game-loop-CZvXlY00.js +1 -0
- package/dist/assets/game-module-access-B2mFxv-i.js +1 -0
- package/dist/assets/game.layout-CBASrvQu.js +1 -0
- package/dist/assets/gameplay-export-BoKXm51x.js +1 -0
- package/dist/assets/gameplay-replay-e5umMlXv.js +1 -0
- package/dist/assets/gameplay-rng-trap-CTNhm-UW.js +3 -0
- package/dist/assets/gameplay.command-DxcVYX6F.js +1 -0
- package/dist/assets/generation-DhwCUHPf.css +1 -0
- package/dist/assets/generation-jobs-BQrXbGp_.js +1 -0
- package/dist/assets/generation.service-CDIgObuw.js +1 -0
- package/dist/assets/generations-DzUogZsM.js +1 -0
- package/dist/assets/generations.status-CgOUBCum.js +1 -0
- package/dist/assets/hierarchy-marks-BLPfSIym.js +1 -0
- package/dist/assets/host-pointer-DbGSCjE9.js +1 -0
- package/dist/assets/hosted-asset-materialization-CiIvWkGU.js +2 -0
- package/dist/assets/ibl-override-material-BlmCxFKq.js +6 -0
- package/dist/assets/index-96FBF1Oj.js +1 -0
- package/dist/assets/index-BAWkB0dv.js +1 -0
- package/dist/assets/index-BDnS2b6S.js +1 -0
- package/dist/assets/index-BHp07vN0.js +2 -0
- package/dist/assets/index-BMxv2MNV.js +1 -0
- package/dist/assets/index-BP6wv2A0.js +5 -0
- package/dist/assets/index-BcCBqgM_.js +952 -0
- package/dist/assets/index-Bge9JUr6.js +1 -0
- package/dist/assets/index-BjTCPEQ7.js +134 -0
- package/dist/assets/index-BncK9THk.js +1 -0
- package/dist/assets/index-CJbYy-CF.js +3 -0
- package/dist/assets/index-CVCb_ImQ.js +1 -0
- package/dist/assets/index-CZd9o7Lu.js +1 -0
- package/dist/assets/index-CanA16PU.js +2 -0
- package/dist/assets/index-CinJrH5C.js +9 -0
- package/dist/assets/index-CtzuWnCS.js +1 -0
- package/dist/assets/index-D2fNXpHa.css +1 -0
- package/dist/assets/index-DUpHH6JR.js +3120 -0
- package/dist/assets/index-DUqP1RMl.js +1 -0
- package/dist/assets/index-D_NuPfjr.js +9 -0
- package/dist/assets/index-Da9JhEvW.js +25 -0
- package/dist/assets/index-DgapqSPi.js +7 -0
- package/dist/assets/index-FUuS4qwW.js +562 -0
- package/dist/assets/index-GIL7oGEO.js +4894 -0
- package/dist/assets/index-IEjydI9d.js +1 -0
- package/dist/assets/index-OrYXPk3Z.js +487 -0
- package/dist/assets/index-V1R-e5Bd.js +1 -0
- package/dist/assets/index-bQE2NA0D.js +1 -0
- package/dist/assets/index-gHZae-lw.js +13 -0
- package/dist/assets/index-mjWQmGhM.js +1 -0
- package/dist/assets/index-nmcBqr7Y.js +1 -0
- package/dist/assets/inference-diagnostics-Dhmtfbq_.js +1 -0
- package/dist/assets/ingest-BbYMC2vQ.js +1 -0
- package/dist/assets/ingest-boot-viewport-D5rI_Kk_.js +1 -0
- package/dist/assets/ingest-siblings-Bop2kqVl.js +1 -0
- package/dist/assets/ingest-source-persistence-C_6Hiyra.js +1 -0
- package/dist/assets/ingest.service-BTDnQfM1.js +1 -0
- package/dist/assets/input-manager-DH_hGW6d.js +1 -0
- package/dist/assets/input-router-BNQvtIqw.js +1 -0
- package/dist/assets/inspect-BZfi3mmo.js +1 -0
- package/dist/assets/inspection-CObLhnrs.js +1 -0
- package/dist/assets/instance-fork-actions-D3sRzS3K.js +1 -0
- package/dist/assets/instances.command-D6UkZNO8.js +1 -0
- package/dist/assets/instruments-CKR02Y8I.js +1 -0
- package/dist/assets/json-history-resource-BbxllWfV.js +1 -0
- package/dist/assets/jsx-runtime-DPjLkJKQ.js +9 -0
- package/dist/assets/light-D-_wsKTq.js +1 -0
- package/dist/assets/light-camera-factory-CWbbe9gI.js +1 -0
- package/dist/assets/lil-gui.module.min-BF55BEwA.js +10 -0
- package/dist/assets/live-behaviors-Bxq49Maz.js +1 -0
- package/dist/assets/live-gesture-lock-DJbrjOqf.js +1 -0
- package/dist/assets/loader-CaF_I7Yt.js +1 -0
- package/dist/assets/logger-Dqis-7W1.js +1 -0
- package/dist/assets/loop-gate-report-N52EWFGD.js +1 -0
- package/dist/assets/matcap-texture-CVfalpWT.js +1 -0
- package/dist/assets/material-CpAdjDxn.js +1 -0
- package/dist/assets/material-factory-Bz6h__6g.js +1 -0
- package/dist/assets/mesh-B3WPtNKO.js +1 -0
- package/dist/assets/mesh-shadow-CZnXrw_l.js +1 -0
- package/dist/assets/mikktspace.module-DO88SLib.js +1 -0
- package/dist/assets/model-asset-sections-CFvvihfx.css +1 -0
- package/dist/assets/model-asset-sections.service-CHhFS3ZX.js +1 -0
- package/dist/assets/model.layout-BJUEQYUI.js +1 -0
- package/dist/assets/models.finder-G2jQgIRu.js +1 -0
- package/dist/assets/module-mode-DVBLT9d-.js +2 -0
- package/dist/assets/mount-canvas-ingest-root-DDuAWf_C.js +2 -0
- package/dist/assets/mount-dom-ingest-root-D_EiBgpn.js +2 -0
- package/dist/assets/mount-game-6t9cKNo4.js +1 -0
- package/dist/assets/mount-ingest-root-glv2SSWf.js +2 -0
- package/dist/assets/mount-manifest-CGVxhmAw.js +1 -0
- package/dist/assets/mount-readiness-Ds0HvvLH.js +4 -0
- package/dist/assets/mount-three-ingest-root-hrUt9VVU.js +1 -0
- package/dist/assets/mounted-authoring-Dmg5xmhP.js +1 -0
- package/dist/assets/mounted-story-viewport-source-DjP6RA9U.js +1 -0
- package/dist/assets/native-debug-module-CWicoSGD.js +1 -0
- package/dist/assets/native-entry-surface-BE8LJNdu.js +1 -0
- package/dist/assets/navigation-CIiCx-SM.js +1 -0
- package/dist/assets/navmesh-workflow-store-Cmnm57TB.js +1 -0
- package/dist/assets/navmesh.menu-CAKiH8PW.js +1 -0
- package/dist/assets/navmesh.service-jgDWlgj1.js +1 -0
- package/dist/assets/network.utility-CEu5nHf7.js +1 -0
- package/dist/assets/object-marks-DwvIEBOK.js +1 -0
- package/dist/assets/object3d-authoring-subject-CH5sI2oP.js +1 -0
- package/dist/assets/output-DK8waum9.js +195 -0
- package/dist/assets/particles-Y626p22p.js +1 -0
- package/dist/assets/particles-factory-DnLOHXT8.js +1 -0
- package/dist/assets/pasteboard-materialize-BqSS4QzV.js +20 -0
- package/dist/assets/pasteboard.action-DU3UHtJG.js +2 -0
- package/dist/assets/performance-profiler-D_Jey87L.js +1 -0
- package/dist/assets/physics-registry-B2Jkp8e6.js +1 -0
- package/dist/assets/physics-registry-CUB9cT9p.js +1 -0
- package/dist/assets/pixi-authoring-adapter-CjibysC3.js +1 -0
- package/dist/assets/pixi-live-write-target-DuWydlWb.js +1 -0
- package/dist/assets/pixi-primitive-DlWbUPN9.js +1 -0
- package/dist/assets/pixi-react-root-factory-DYsznYRQ.js +1 -0
- package/dist/assets/pixi-story-model-DNkfnWUV.js +1 -0
- package/dist/assets/pixi-transform-channels-VjdohT11.js +1 -0
- package/dist/assets/play-mode-BFU2PCkG.js +22 -0
- package/dist/assets/play.command-BpqqLqkq.js +2 -0
- package/dist/assets/playtest-BXIL1JEF.js +1 -0
- package/dist/assets/pose-guard-6Osb2cFu.js +1 -0
- package/dist/assets/presentation-BPP5pXeQ.js +1 -0
- package/dist/assets/product-DFhyARJj.js +1 -0
- package/dist/assets/profiler.action-CaXJDp3t.js +1 -0
- package/dist/assets/profiler.menu-BIMF6Bi4.js +1 -0
- package/dist/assets/profiler.utility-BExw9wBO.js +1 -0
- package/dist/assets/project-authoring-session-Bnt6icLr.js +2 -0
- package/dist/assets/project-provenance-BoP3nrle.js +1 -0
- package/dist/assets/prompt-labels-DSMdM2_B.js +1 -0
- package/dist/assets/properties-bone-constraints.inspector-ByT6p7S-.js +1 -0
- package/dist/assets/properties-bone.inspector-z4qJwKO5.js +1 -0
- package/dist/assets/properties-collection.inspector-D0_3ijWU.js +1 -0
- package/dist/assets/properties-constraints.inspector-CESzjuls.js +1 -0
- package/dist/assets/properties-data.inspector-hG8Wgyzb.js +1 -0
- package/dist/assets/properties-material.inspector-CzY0JCQ6.js +1 -0
- package/dist/assets/properties-modifiers.inspector-3dDhwf7g.js +1 -0
- package/dist/assets/properties-object.inspector-CiarfxkT.js +1 -0
- package/dist/assets/properties-output.inspector-DKJxmKSD.js +1 -0
- package/dist/assets/properties-particles.inspector-CCEdYWGm.js +1 -0
- package/dist/assets/properties-physics.inspector-B2c0KUyA.js +1 -0
- package/dist/assets/properties-render.inspector-Bcm0HLRW.js +1 -0
- package/dist/assets/properties-scene.inspector-PIM_eTb_.js +1 -0
- package/dist/assets/properties-texture.inspector-CgFlnyr8.js +1 -0
- package/dist/assets/properties-view-layer.inspector-DGjF_Aqo.js +1 -0
- package/dist/assets/properties-world.inspector-CrMvaRvB.js +1 -0
- package/dist/assets/r3f-design-session-D-4yyDO9.js +2 -0
- package/dist/assets/r3f-physics-binding-BBo8oma9.js +1 -0
- package/dist/assets/r3f-root-factory-z9llD1OU.js +1 -0
- package/dist/assets/r3f-source-authoring-adapter-w6Bc60K-.js +13 -0
- package/dist/assets/rapier-physics-adapter-CaZqWLu0.js +1 -0
- package/dist/assets/rapier-physics-bridge-CMoeVo3Y.js +1 -0
- package/dist/assets/react-18-By2b4xR9.js +1 -0
- package/dist/assets/react-inspector.service-B_neRnSK.js +1 -0
- package/dist/assets/react-root-CEz5NTck.js +1 -0
- package/dist/assets/react-story-board-BDDwiE2H.js +1 -0
- package/dist/assets/react-three-fiber.esm-CycrbDlA.js +1 -0
- package/dist/assets/react-three-rapier.esm-CEfKpvxT.js +1 -0
- package/dist/assets/react-world-authoring-adapter-DmrwM3py.js +1 -0
- package/dist/assets/realm-services-CobQsq_X.js +1 -0
- package/dist/assets/rebind-controller-Dtq19Vb3.js +1 -0
- package/dist/assets/recast-navigation.wasm-compat-Dsoa_MD-.js +1 -0
- package/dist/assets/reflection-probe-Don-M3Fj.js +1 -0
- package/dist/assets/reflection-probe-capture.inspector-CmFUoJCx.js +1 -0
- package/dist/assets/register-render-vitals-BiZk29b2.js +1 -0
- package/dist/assets/registry-02YZjMNp.js +1 -0
- package/dist/assets/relative-path-guard-GiM7Lsz8.js +1 -0
- package/dist/assets/render-audio-control-vMRlePWb.js +1 -0
- package/dist/assets/render-batch-system-0vq7p0VC.js +1 -0
- package/dist/assets/render-census-BrQX_CXv.js +1 -0
- package/dist/assets/render-control-Df3yTiyr.js +1 -0
- package/dist/assets/render-env-D2IV2x5k.js +1 -0
- package/dist/assets/render-features-CPQ_e568.js +1 -0
- package/dist/assets/render-seed-DF4JHy7P.js +1 -0
- package/dist/assets/render-settings-Bw4W9SYF.js +1 -0
- package/dist/assets/render-vitals-BZ5HtvMi.js +1 -0
- package/dist/assets/renderer-config-BqG4O8i9.js +1 -0
- package/dist/assets/resolve-three-SZE_WWUM.js +702 -0
- package/dist/assets/root-seam-contract-Z0VWX3Bk.js +1 -0
- package/dist/assets/rrweb-Cd2ifIRP.js +142 -0
- package/dist/assets/run-ticks-settled-C4ksViyA.js +1 -0
- package/dist/assets/runtime-inspection-l2iFQSsg.js +1 -0
- package/dist/assets/scene-capture-BQKzU0NT.js +1 -0
- package/dist/assets/scene-capture-CGYF-Viw.js +1 -0
- package/dist/assets/scene-document.service-qkDjUrlP.js +2 -0
- package/dist/assets/scene-framing-Cat0GtyJ.js +1 -0
- package/dist/assets/scene-index-B6BZOHMk.js +1 -0
- package/dist/assets/scene-query-C7_N-TpI.js +1 -0
- package/dist/assets/schema-kl9-2B_J.js +1 -0
- package/dist/assets/sculpt.layout-zJF55yCR.js +1 -0
- package/dist/assets/seeded-random-i3mtgBKZ.js +1 -0
- package/dist/assets/session-CZ5JPg-z.js +4877 -0
- package/dist/assets/setup-audio-S8GQF91f.js +1 -0
- package/dist/assets/setup-particles-GCXlnkj_.js +1 -0
- package/dist/assets/setup-physics-BeZ7-LKD.js +1 -0
- package/dist/assets/setup-renderer-DVXaSGin.js +1587 -0
- package/dist/assets/shading.layout-DULYZV6M.js +1 -0
- package/dist/assets/sim-clock-CLflx7kg.js +1 -0
- package/dist/assets/sky-precompute-worker-ChN7J87v.js +1 -0
- package/dist/assets/soft-particle-depth-DGvfQDi1.js +1 -0
- package/dist/assets/source-object3d-authoring-adapter-B-L6Ha6f.js +1 -0
- package/dist/assets/source-persistence-backend-C-aR-B_Y.js +1 -0
- package/dist/assets/spark-renderer-lifecycle-ynWESJcv.js +1 -0
- package/dist/assets/spark.module-4pXQoz5d.js +12120 -0
- package/dist/assets/stage-invalidation-DBg3C3Ta.js +1 -0
- package/dist/assets/stage-keyboard-n-5kKH-m.js +1 -0
- package/dist/assets/stage-overlay-set-B9zp2sLB.js +1 -0
- package/dist/assets/stage-presence-markers-DiGI6A45.js +1 -0
- package/dist/assets/standard-viewport-dressing-CzjAe_0A.js +7 -0
- package/dist/assets/state-bridge-DLP1jLRW.js +1 -0
- package/dist/assets/state-watch.action-BOvQR2qt.js +1 -0
- package/dist/assets/state-watch.menu-CNLvDeeY.js +1 -0
- package/dist/assets/state-watch.utility-Bg1tTTQU.js +1 -0
- package/dist/assets/static-batch-advisor-B13QEH7d.js +1 -0
- package/dist/assets/stats.module-BL02l9NC.js +1 -0
- package/dist/assets/story-arg-descriptors-Ek86ExX7.js +1 -0
- package/dist/assets/story-capture-_gC8dXV-.js +1 -0
- package/dist/assets/story-documents--TDLaPeL.js +3 -0
- package/dist/assets/story-documents.service-BiS_YbNQ.js +1 -0
- package/dist/assets/story-documents.service-CxOPYJ2j.js +1 -0
- package/dist/assets/story-media-presence-BHzk2IV5.js +1 -0
- package/dist/assets/story-mount-turn-DFRTj5hi.js +1 -0
- package/dist/assets/story-pixi-preview-BUrOJZXS.js +1 -0
- package/dist/assets/story-presentation-j2AVN-mK.js +1 -0
- package/dist/assets/story-three-preview-BHEDZzcl.js +2 -0
- package/dist/assets/structural-ids-Dc-7rEwi.js +1 -0
- package/dist/assets/structural-signature-0w-i_ats.js +1 -0
- package/dist/assets/surface-content-Dg9Kkazf.js +1 -0
- package/dist/assets/surface-state-DaxyruCj.js +3 -0
- package/dist/assets/system-adapters-rIC8FSGP.js +1 -0
- package/dist/assets/system-runner-DkOjxEBt.js +1 -0
- package/dist/assets/system-slot-E2mEdiih.js +1 -0
- package/dist/assets/team-playtest.service-DqOinFVA.js +1 -0
- package/dist/assets/texture.layout-DASpHVht.js +1 -0
- package/dist/assets/three-CDSueJyJ.js +1 -0
- package/dist/assets/three-authoring-adapter-CmSQ3Vui.js +1 -0
- package/dist/assets/three-authoring.service-iuHLwtf1.js +2 -0
- package/dist/assets/three-ingest-runtime-QzDYk6tU.js +1 -0
- package/dist/assets/three-projection-core-BmKMZ-nf.js +1 -0
- package/dist/assets/three-viewport-presentation-QBQpSdMh.js +1 -0
- package/dist/assets/three.module-D396a9Mn.js +3840 -0
- package/dist/assets/three.quarks.esm-B1C61jGo.js +1039 -0
- package/dist/assets/tools-B_NJsk05.js +1 -0
- package/dist/assets/transform-writer-BhBBTx33.js +1 -0
- package/dist/assets/transport.header-B-6HQlU2.js +1 -0
- package/dist/assets/trigger-volume-BNK2XzPL.js +1 -0
- package/dist/assets/tuples-CIQ4Bn1U.js +1 -0
- package/dist/assets/tween.module-DciWpAG6.js +1 -0
- package/dist/assets/ui-board-document-Bwtt--xp.js +2 -0
- package/dist/assets/unexported-game-trap-Dm1JYKHy.js +2 -0
- package/dist/assets/unmanaged-root-detector-B8CpbkSN.js +2 -0
- package/dist/assets/upstream-pin-BdgRH6ID.js +1 -0
- package/dist/assets/use-data-Dzq-MytE.js +1 -0
- package/dist/assets/use-live-actor-state-DErbWQWF.js +1 -0
- package/dist/assets/use-selection-DbR73-xd.js +1 -0
- package/dist/assets/user-data-BB2Of6Ht.js +1 -0
- package/dist/assets/utility-view-state-BHypxA33.js +1 -0
- package/dist/assets/uv-editing.layout-BEKHxmHw.js +1 -0
- package/dist/assets/vgai-shared-fontawesome-CU65D4Ij.js +1 -0
- package/dist/assets/vgai-shared-jsx-dev-runtime-DFDKL7fx.js +1 -0
- package/dist/assets/vgai-shared-jsx-runtime-DIqBpTut.js +1 -0
- package/dist/assets/vgai-shared-react-BT7rMc2H.js +1 -0
- package/dist/assets/vgai-shared-react-dom-DFajMqMT.js +1 -0
- package/dist/assets/vgai-shared-react-dom-client-S0ozfl6_.js +1 -0
- package/dist/assets/vgai-shared-three-Bc5PvpLM.js +1 -0
- package/dist/assets/viewport-pick-context-DkawXbEi.js +1 -0
- package/dist/assets/viewport-root-presentation-CWsE56K6.js +1 -0
- package/dist/assets/viewport-shading-BuA88e_A.js +1 -0
- package/dist/assets/viewport-shading-boundary-B_-_gABg.js +82 -0
- package/dist/assets/viewport-surface-status-B3om4Kcf.js +1 -0
- package/dist/assets/vision_bundle-DX0dWqEa.js +15 -0
- package/dist/assets/voxel-surface-DtcsSWRL.js +1 -0
- package/dist/assets/wav-encode-D31zWF6O.js +1 -0
- package/dist/assets/webgl-frame-capture-FlF9zQmW.js +1 -0
- package/dist/assets/webgl-gpu-timer-D3YX7RaD.js +1 -0
- package/dist/assets/webworkerAll-CM2o_dnz.js +1 -0
- package/dist/assets/worker-UrMcrc5_.js +2 -0
- package/dist/assets/world-documents-147tiFZe.js +1 -0
- package/dist/assets/world-root-stage-binding-vwTrtBz6.js +1 -0
- package/dist/assets/world-state-BWG-IcOd.js +1 -0
- package/dist/assets/writer-B-KovzkA.js +5 -0
- package/dist/assets/xstate-animation-binding-Brd0NST6.js +1 -0
- package/dist/assets/xstate-animation-meta-Q3u9zh_m.js +1 -0
- package/dist/assets/xstate-behavior.action-B8UluFBK.js +1 -0
- package/dist/assets/xstate-behavior.document-CKAsE45I.js +1 -0
- package/dist/assets/xstate-behavior.inspector-vJJyuifc.js +1 -0
- package/dist/assets/xstate-behavior.menu-BXbPICIh.js +1 -0
- package/dist/assets/xstate-inspection-BsZv8LS9.js +1 -0
- package/dist/vgai-shared-react.json +10 -0
- package/dist/vgai-shared-three.json +3 -0
- package/dist-node/cli.js +9320 -0
- package/dist-node/create.js +3239 -0
- package/package.json +91 -0
- package/presets.mjs +2 -0
- package/src/contributions.d.ts +4 -0
- package/src/index.ts +38 -0
- package/starter/cube.blend +0 -0
- package/starter/cube.py +81 -0
- package/template/.agents/references/project-manual.md +341 -0
- package/template/.agents/skills/editor/SKILL.md +53 -0
- package/template/.agents/skills/editor/agents/openai.yaml +4 -0
- package/template/.agents/skills/editor/references/editor-control.md +363 -0
- package/template/.agents/skills/vgai-3d-models/SKILL.md +64 -0
- package/template/.agents/skills/vgai-ingest-existing-game/SKILL.md +112 -0
- package/template/.agents/skills/vgai-threejs-authoring/SKILL.md +347 -0
- package/template/.agents/skills/vgai-threejs-authoring/agents/openai.yaml +4 -0
- package/template/.agents/skills/vgai-threejs-authoring/references/helper-catalog.md +65 -0
- package/template/.claude/skills/editor/SKILL.md +53 -0
- package/template/.claude/skills/editor/agents/openai.yaml +4 -0
- package/template/.claude/skills/editor/references/editor-control.md +363 -0
- package/template/.claude/skills/vgai-3d-models/SKILL.md +64 -0
- package/template/.claude/skills/vgai-ingest-existing-game/SKILL.md +112 -0
- package/template/.claude/skills/vgai-threejs-authoring/SKILL.md +347 -0
- package/template/.claude/skills/vgai-threejs-authoring/agents/openai.yaml +4 -0
- package/template/.claude/skills/vgai-threejs-authoring/references/helper-catalog.md +65 -0
- package/template/.github/copilot-instructions.md +6 -0
- package/template/.github/skills/editor/SKILL.md +53 -0
- package/template/.github/skills/editor/agents/openai.yaml +4 -0
- package/template/.github/skills/editor/references/editor-control.md +363 -0
- package/template/.github/skills/vgai-3d-models/SKILL.md +64 -0
- package/template/.github/skills/vgai-ingest-existing-game/SKILL.md +112 -0
- package/template/.github/skills/vgai-threejs-authoring/SKILL.md +347 -0
- package/template/.github/skills/vgai-threejs-authoring/agents/openai.yaml +4 -0
- package/template/.github/skills/vgai-threejs-authoring/references/helper-catalog.md +65 -0
- package/template/.mcp.json +12 -0
- package/template/.vgai/assets.json +1 -0
- package/template/.vgai/provenance.json +4 -0
- package/template/.volter/tracker/validation/.preset.base.mts +178 -0
- package/template/.volter/tracker/validation/preset.mts +186 -0
- package/template/.volter/tracker/visualizer/.extension.base.tsx +14 -0
- package/template/.volter/tracker/visualizer/extension.tsx +14 -0
- package/template/.volter/tracker-config.json +17 -0
- package/template/AGENTS.md +176 -0
- package/template/CLAUDE.md +1 -0
- package/template/DEVLOG.md +20 -0
- package/template/IDIOMS.md +118 -0
- package/template/LICENSE +30 -0
- package/template/README.md +83 -0
- package/template/ROADMAP.md +20 -0
- package/template/asset-manifest.json +3 -0
- package/template/check-idioms.ts +1533 -0
- package/template/index.html +18 -0
- package/template/manifest-entry-modules-plugin.ts +53 -0
- package/template/package.json +62 -0
- package/template/public/jsm/libs/basis/basis_transcoder.js +19 -0
- package/template/public/jsm/libs/basis/basis_transcoder.wasm +0 -0
- package/template/public/jsm/libs/draco/gltf/draco_decoder.js +33 -0
- package/template/public/jsm/libs/draco/gltf/draco_decoder.wasm +0 -0
- package/template/public/jsm/libs/draco/gltf/draco_encoder.js +33 -0
- package/template/public/jsm/libs/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/template/public/shaders/daylight-sky.frag.glsl +15 -0
- package/template/public/shaders/daylight-sky.vert.glsl +7 -0
- package/template/scripts/patch-drei-stats-gl.mjs +35 -0
- package/template/server/colyseus-setup.ts +111 -0
- package/template/server/loopback.ts +76 -0
- package/template/server/main.ts +78 -0
- package/template/server/rooms/arena-room.ts +488 -0
- package/template/server/rooms/game-room.ts +274 -0
- package/template/server/rooms.ts +15 -0
- package/template/server/tsconfig.json +19 -0
- package/template/src/bot/QaTester.tsx +35 -0
- package/template/src/bot/behaviors.ts +203 -0
- package/template/src/bot/bot-station.ts +192 -0
- package/template/src/bot/tester-run.ts +238 -0
- package/template/src/bot/tester-station.ts +193 -0
- package/template/src/components/environment/DaylightSky.tsx +54 -0
- package/template/src/components/environment/Ground.tsx +129 -0
- package/template/src/components/environment/SceneAtmosphere.tsx +14 -0
- package/template/src/components/environment/SoftGroundShadow.tsx +62 -0
- package/template/src/components/environment/SunShadowFit.tsx +141 -0
- package/template/src/contributions/README.md +98 -0
- package/template/src/contributions/analytics.analytics.tsx +26 -0
- package/template/src/contributions/data.document.tsx +35 -0
- package/template/src/contributions/pages.finder.ts +61 -0
- package/template/src/contributions/tester.inspector.tsx +64 -0
- package/template/src/contributions/use-game-modules.ts +80 -0
- package/template/src/data/README.md +17 -0
- package/template/src/input.ts +97 -0
- package/template/src/lib/audio/capability.json +4 -0
- package/template/src/lib/audio/sfx.ts +255 -0
- package/template/src/lib/react-root/capability.json +4 -0
- package/template/src/lib/react-root/index.ts +20 -0
- package/template/src/lib/react-root/react-root-adapter.tsx +57 -0
- package/template/src/lib/reflections/ReflectionProbe.tsx +201 -0
- package/template/src/lib/reflections/capability.json +4 -0
- package/template/src/lib/reflections/index.ts +19 -0
- package/template/src/lib/reflections/probe-controller.ts +75 -0
- package/template/src/lib/reflections/reflection-probe-registry.ts +402 -0
- package/template/src/lib/reflections/volume-reflection-material.ts +416 -0
- package/template/src/lib/static-batch/Frozen.tsx +91 -0
- package/template/src/lib/static-batch/capability.json +4 -0
- package/template/src/lib/static-batch/freeze.ts +579 -0
- package/template/src/lib/static-batch/index.ts +44 -0
- package/template/src/lib/static-batch/mutation-watch.ts +149 -0
- package/template/src/lib/static-batch/shadow-cache.ts +171 -0
- package/template/src/main.ts +63 -0
- package/template/src/manifest-entry-modules.d.ts +3 -0
- package/template/src/prefabs/HeroBox.stories.tsx +23 -0
- package/template/src/prefabs/HeroBox.tsx +35 -0
- package/template/src/scenes/MainScene.tsx +77 -0
- package/template/src/world.tsx +87 -0
- package/template/tsconfig.json +35 -0
- package/template/tsconfig.node.json +32 -0
- package/template/tsconfig.tools.json +22 -0
- package/template/validate-asset-content.ts +27 -0
- package/template/validate-assets.ts +60 -0
- package/template/validate-manifest.ts +55 -0
- package/template/vgai.adapter.ts +76 -0
- package/template/vgai.project.json +24 -0
- package/template/vite.config.ts +247 -0
- package/template-dotfiles/gitignore +63 -0
- package/workbench/src/media/game-cover.css +83 -0
- package/workbench/src/product.contribution.ts +188 -0
- package/workbench/src/vgaiGameSkew.ts +276 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
var yt={},po=Object.defineProperty,mo=(e,t,r)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t,r)=>mo(e,typeof t!="symbol"?t+"":t,r),Es,go=Object.defineProperty,yo=(e,t,r)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rs=(e,t,r)=>yo(e,typeof t!="symbol"?t+"":t,r),F=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(F||{});const xs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ms={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},it={},an={},wo=()=>!!globalThis.Zone;function es(e){if(it[e])return it[e];const t=globalThis[e],r=t.prototype,i=e in xs?xs[e]:void 0,s=!!(i&&i.every(u=>{var l,h;return!!((h=(l=Object.getOwnPropertyDescriptor(r,u))==null?void 0:l.get)!=null&&h.toString().includes("[native code]"))})),a=e in Ms?Ms[e]:void 0,n=!!(a&&a.every(u=>{var l;return typeof r[u]=="function"&&((l=r[u])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!wo())return it[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);const l=u.contentWindow;if(!l)return t.prototype;const h=l[e].prototype;if(!h)return u.remove(),r;const o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),an[e]=()=>u.remove()):u.remove(),it[e]=h}catch{return r}}const qt={};function ce(e,t,r){var i,s;const a=(i=qt[e])==null?void 0:i[r];if(a)return a.call(t);const n=es(e),u=(s=Object.getOwnPropertyDescriptor(n,r))==null?void 0:s.get;return u?((qt[e]||(qt[e]={}))[r]=u,u.call(t)):t[r]}const jt={};function ln(e,t,r){const i=`${e}.${String(r)}`;if(jt[i])return jt[i].bind(t);const a=es(e)[r];return typeof a!="function"?t[r]:(jt[i]=a,a.bind(t))}function bo(e){return ce("Node",e,"ownerDocument")}function vo(e){return ce("Node",e,"childNodes")}function So(e){return ce("Node",e,"parentNode")}function Co(e){return ce("Node",e,"parentElement")}function Eo(e){return ce("Node",e,"textContent")}function Ro(e){return ce("Node",e,"firstChild")}function xo(e){return ce("Node",e,"lastChild")}function Mo(e){return ce("Node",e,"nextSibling")}function No(e){return ce("Node",e,"previousSibling")}function Oo(e,t){return ln("Node",e,"contains")(t)}function Io(e){return ln("Node",e,"getRootNode")()}function Do(e){return!e||!("host"in e)?null:ce("ShadowRoot",e,"host")}function Ao(e){return e.styleSheets}function To(e){return!e||!("shadowRoot"in e)?null:ce("Element",e,"shadowRoot")}function _o(e,t){return ce("Element",e,"querySelector")(t)}function ko(e,t){return ce("Element",e,"querySelectorAll")(t)}function Lo(){return[es("MutationObserver").constructor,an.MutationObserver??(()=>{})]}let un=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>new Date().getTime());function Po(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],s=r(i);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=s,()=>{e[t]=i}}catch{return()=>{}}}const re={ownerDocument:bo,childNodes:vo,parentNode:So,parentElement:Co,textContent:Eo,firstChild:Ro,lastChild:xo,nextSibling:Mo,previousSibling:No,contains:Oo,getRootNode:Io,host:Do,styleSheets:Ao,shadowRoot:To,querySelector:_o,querySelectorAll:ko,nowTimestamp:un,mutationObserverCtor:Lo,patch:Po};function ts(e){return e.nodeType===e.ELEMENT_NODE}function Ye(e){const t=e&&"host"in e&&"mode"in e&&re.host(e)||null;return!!(t&&"shadowRoot"in t&&re.shadowRoot(t)===e)}function Xe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Fo(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Uo(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Xr(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const i=Array.from(t,s=>cn(s,r)).join("");return Fo(i)}catch{return null}}function cn(e,t){if($o(e)){let r;try{r=Xr(e.styleSheet)||Uo(e)}catch{r=e.cssText}return e.styleSheet.href?vt(r,e.styleSheet.href):r}else{let r=e.cssText;return Wo(e)&&e.selectorText.includes(":")&&(r=Bo(r)),t?vt(r,t):r}}function Bo(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function $o(e){return"styleSheet"in e}function Wo(e){return"selectorText"in e}class rs{constructor(){Rs(this,"idNodeMap",new Map),Rs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const s=this.nodeMetaMap.get(i);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function hn(){return new rs}function wt({element:e,maskInputOptions:t,tagName:r,type:i,value:s,maskInputFn:a}){let n=s||"";const u=i&&Ce(i);return(t[r.toLowerCase()]||u&&t[u])&&(a?n=a(n,e):n="*".repeat(n.length)),n}function Ce(e){return e.toLowerCase()}const Ns="__rrweb_original__";function zo(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let i=0;i<e.width;i+=r)for(let s=0;s<e.height;s+=r){const a=t.getImageData,n=Ns in a?a[Ns]:a;if(new Uint32Array(n.call(t,i,s,Math.min(r,e.width-i),Math.min(r,e.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function qo(e,t){return!e||!t||e.type!==t.type?!1:e.type===F.Document?e.compatMode===t.compatMode:e.type===F.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===F.Comment||e.type===F.Text||e.type===F.CDATA?e.textContent===t.textContent:e.type===F.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function bt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ce(t):null}function ss(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}const i=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(i);return s?.[1]??null}function jo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Vo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Go=/^(?:[a-z+]+:)?\/\//i,Ho=/^www\..*/i,Yo=/^(data:)([^,]*),(.*)/i;function vt(e,t){return(e||"").replace(Vo,(r,i,s,a,n,u)=>{const l=s||n||u,h=i||a||"";if(!l)return r;if(Go.test(l)||Ho.test(l))return`url(${h}${l}${h})`;if(Yo.test(l))return`url(${h}${l}${h})`;if(l[0]==="/")return`url(${h}${jo(t)+l}${h})`;const o=l.split("#")[0],d=l.substring(o.length),c=t.split("#")[0].split("/"),f=o.split("/");c.pop();for(const m of f)m!=="."&&(m===".."?c.pop():c.push(m));return`url(${h}${c.join("/")}${d}${h})`})}function nt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Xo(e,t,r=!1){const i=Array.from(t.childNodes),s=[];let a=0;if(i.length>1&&e&&typeof e=="string"){let n=nt(e,r);const u=n.length/e.length;for(let l=1;l<i.length;l++)if(i[l].textContent&&typeof i[l].textContent=="string"){const h=nt(i[l].textContent,r),o=100;let d=3;for(;d<h.length&&(h[d].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,d),1)!==-1);d++);for(;d<h.length;d++){let c=h.substring(0,d),f=n.split(c),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&i[l-1].textContent!=="")m=n.indexOf(c,1);else if(f.length===1){if(c=c.substring(0,c.length-1),f=n.split(c),f.length<=1)return s.push(e),s;d=o+1}else d===h.length-1&&(m=n.indexOf(c));if(f.length>=2&&d>o){const p=i[l-1].textContent;if(p&&typeof p=="string"){const g=nt(p).length;m=n.indexOf(c,g)}m===-1&&(m=f[0].length)}if(m!==-1){let p=Math.floor(m/u);for(;p>0&&p<e.length;){if(a+=1,a>50*i.length)return s.push(e),s;const g=nt(e.substring(0,p),r);if(g.length===m){s.push(e.substring(0,p)),e=e.substring(p),n=n.substring(m);break}else g.length<m?p+=Math.max(1,Math.floor((m-g.length)/u)):p-=Math.max(1,Math.floor((g.length-m)*u))}break}}}}return s.push(e),s}function Jo(e,t){return Xo(e,t).join("/* rr_split */")}let Qo=1;const Zo=new RegExp("[^a-z0-9-_:]"),St=-2;function fn(){return Qo++}function Ko(e){if(e instanceof HTMLFormElement)return"form";const t=Ce(e.tagName);return Zo.test(t)?"div":t}let Pe,Os;const ea=/^[^ \t\n\r\u000c]+/,ta=/^[, \t\n\r\u000c]+/;function ra(e,t){if(t.trim()==="")return t;let r=0;function i(a){let n;const u=a.exec(t.substring(r));return u?(n=u[0],r+=n.length,n):""}const s=[];for(;i(ta),!(r>=t.length);){let a=i(ea);if(a.slice(-1)===",")a=$e(e,a.substring(0,a.length-1)),s.push(a);else{let n="";a=$e(e,a);let u=!1;for(;;){const l=t.charAt(r);if(l===""){s.push((a+n).trim());break}else if(u)l===")"&&(u=!1);else if(l===","){r+=1,s.push((a+n).trim());break}else l==="("&&(u=!0);n+=l,r+=1}}}return s.join(", ")}const Is=new WeakMap;function $e(e,t){return!t||t.trim()===""?t:is(e,t)}function sa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function is(e,t){let r=Is.get(e);if(r||(r=e.createElement("a"),Is.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function dn(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?$e(e,i):r==="srcset"?ra(e,i):r==="style"?vt(i,is(e)):t==="object"&&r==="data"?$e(e,i):i)}function pn(e,t,r){return["video","audio"].includes(e)&&Ce(t)==="autoplay"}function ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const s=e.classList[i];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}function Ct(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ct(re.parentNode(e),t,r):!1;for(let i=e.classList.length;i--;){const s=e.classList[i];if(t.test(s))return!0}return r?Ct(re.parentNode(e),t,r):!1}function mn(e,t,r,i){let s;if(ts(e)){if(s=e,!re.childNodes(s).length)return!1}else{if(re.parentElement(e)===null)return!1;s=re.parentElement(e)}try{if(typeof t=="string"){if(i){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(Ct(s,t,i))return!0;if(r){if(i){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function na(e,t,r){const i=e.contentWindow;if(!i)return;let s=!1,a;try{a=i.document.readyState}catch{return}if(a!=="complete"){const u=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),s=!0,t()});return}const n="about:blank";if(i.location.href!==n||e.src===n||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function oa(e,t,r){let i=!1,s;try{s=e.sheet}catch{return}if(s)return;const a=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),i=!0,t()})}function aa(e,t){const{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:n,inlineStylesheet:u,maskInputOptions:l={},maskTextFn:h,maskInputFn:o,dataURLOptions:d={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:g=!1}=t,S=la(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:e.compatMode}:{type:F.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return ca(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:u,maskInputOptions:l,maskInputFn:o,dataURLOptions:d,inlineImages:c,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:S});case e.TEXT_NODE:return ua(e,{doc:r,needsMask:n,maskTextFn:h,rootId:S,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:F.Comment,textContent:re.textContent(e)||"",rootId:S};default:return!1}}function la(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function ua(e,t){const{needsMask:r,maskTextFn:i,rootId:s,cssCaptured:a}=t,n=re.parentNode(e),u=n&&n.tagName;let l="";const h=u==="STYLE"?!0:void 0,o=u==="SCRIPT"?!0:void 0;return o?l="SCRIPT_PLACEHOLDER":a||(l=re.textContent(e),h&&l&&(l=vt(l,is(t.doc)))),!h&&!o&&l&&r&&(l=i?i(l,re.parentElement(e)):l.replace(/[\S]/g,"*")),{type:F.Text,textContent:l||"",rootId:s}}function ca(e,t){const{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:n={},maskInputFn:u,dataURLOptions:l={},inlineImages:h,recordCanvas:o,keepIframeSrcFn:d,newlyAddedElement:c=!1,rootId:f}=t,m=ia(e,i,s),p=Ko(e);let g={};const S=e.attributes.length;for(let y=0;y<S;y++){const w=e.attributes[y];pn(p,w.name,w.value)||(g[w.name]=dn(r,p,Ce(w.name),w.value))}if(p==="link"&&a){const y=Array.from(r.styleSheets).find(v=>v.href===e.href);let w=null;y&&(w=Xr(y)),w&&(delete g.rel,delete g.href,g._cssText=w)}if(p==="style"&&e.sheet){let y=Xr(e.sheet);y&&(e.childNodes.length>1&&(y=Jo(y,e)),g._cssText=y)}if(["input","textarea","select"].includes(p)){const y=e.value,w=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&y?g.value=wt({element:e,type:bt(e),tagName:p,value:y,maskInputOptions:n,maskInputFn:u}):w&&(g.checked=w)}if(p==="option"&&(e.selected&&!n.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&o){if(e.__context==="2d")zo(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const y=e.toDataURL(l.type,l.quality),w=r.createElement("canvas");w.width=e.width,w.height=e.height;const v=w.toDataURL(l.type,l.quality);y!==v&&(g.rr_dataURL=y)}}if(p==="img"&&h){Pe||(Pe=r.createElement("canvas"),Os=Pe.getContext("2d"));const y=e,w=y.currentSrc||y.getAttribute("src")||"<unknown-src>",v=y.crossOrigin,C=()=>{y.removeEventListener("load",C);try{Pe.width=y.naturalWidth,Pe.height=y.naturalHeight,Os.drawImage(y,0,0),g.rr_dataURL=Pe.toDataURL(l.type,l.quality)}catch(R){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?C():y.addEventListener("load",C);return}else console.warn(`Cannot inline img src=${w}! Error: ${R}`)}y.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?C():y.addEventListener("load",C)}if(["audio","video"].includes(p)){const y=g;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(c||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:y,height:w}=e.getBoundingClientRect();g={class:g.class,rr_width:`${y}px`,rr_height:`${w}px`}}p==="iframe"&&!d(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(p)&&(b=!0)}catch{}return{type:F.Element,tagName:p,attributes:g,childNodes:[],isSVG:sa(e)||void 0,needBlock:m,rootId:f,isCustom:b}}function H(e){return e==null?"":e.toLowerCase()}function gn(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function ha(e,t){if(t.comment&&e.type===F.Comment)return!0;if(e.type===F.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ss(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function We(e,t){const{doc:r,mirror:i,blockClass:s,blockSelector:a,maskTextClass:n,maskTextSelector:u,skipChild:l=!1,inlineStylesheet:h=!0,maskInputOptions:o={},maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:R=!1,cssCaptured:O=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:M=!0}=t;I||(I=mn(e,n,u,I===void 0));const q=aa(e,{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:I,inlineStylesheet:h,maskInputOptions:o,maskTextFn:d,maskInputFn:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:R,cssCaptured:O});if(!q)return console.warn(e,"not serialized"),null;let _;i.hasNode(e)?_=i.getId(e):ha(q,f)||!M&&q.type===F.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?_=St:_=fn();const E=Object.assign(q,{id:_});if(i.add(e,E),_===St)return null;S&&S(e);let ae=!l;if(E.type===F.Element){ae=ae&&!E.needBlock,delete E.needBlock;const $=re.shadowRoot(e);$&&Xe($)&&(E.isShadowHost=!0)}if((E.type===F.Document||E.type===F.Element)&&ae){f.headWhitespace&&E.type===F.Element&&E.tagName==="head"&&(M=!1);const $={doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:I,maskTextClass:n,maskTextSelector:u,skipChild:l,inlineStylesheet:h,maskInputOptions:o,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:C,cssCaptured:!1};if(!(E.type===F.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===F.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&($.cssCaptured=!0);for(const Y of Array.from(re.childNodes(e))){const ee=We(Y,$);ee&&E.childNodes.push(ee)}}let k=null;if(ts(e)&&(k=re.shadowRoot(e)))for(const Y of Array.from(re.childNodes(k))){const ee=We(Y,$);ee&&(Xe(k)&&(ee.isShadow=!0),E.childNodes.push(ee))}}const se=re.parentNode(e);return se&&Ye(se)&&Xe(se)&&(E.isShadow=!0),E.type===F.Element&&E.tagName==="iframe"&&na(e,()=>{const $=e.contentDocument;if($&&b){const k=We($,{doc:$,mirror:i,blockClass:s,blockSelector:a,needsMask:I,maskTextClass:n,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:o,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:C});k&&b(e,k)}},y),E.type===F.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&ss(E.attributes.href)==="css")&&oa(e,()=>{if(w){const $=We(e,{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:I,maskTextClass:n,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:o,maskTextFn:d,maskInputFn:c,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:C});$&&w(e,$)}},v),E}function fa(e,t){const{mirror:r=new rs,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:a="rr-mask",maskTextSelector:n=null,inlineStylesheet:u=!0,inlineImages:l=!1,recordCanvas:h=!1,maskAllInputs:o=!1,maskTextFn:d,maskInputFn:c,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:v=()=>!1}=t,C=o===!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}:o===!1?{password:!0}:o,R=gn(f);return We(e,{doc:e,mirror:r,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:n,skipChild:!1,inlineStylesheet:u,maskInputOptions:C,maskTextFn:d,maskInputFn:c,slimDOMOptions:R,dataURLOptions:m,inlineImages:l,recordCanvas:h,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:w,keepIframeSrcFn:v,newlyAddedElement:!1})}const da=/(max|min)-device-(width|height)/,Ds=new RegExp(da.source,"g"),pa={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Ds)&&(e.params=e.params.replace(Ds,"$1-$2"))}}}},ma={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
2
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ya(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),r}var ot={exports:{}},As;function wa(){if(As)return ot.exports;As=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ot.exports=t(),ot.exports.createColors=t,ot.exports}const ba={},va=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),me=ya(va);var Vt,Ts;function ns(){if(Ts)return Vt;Ts=1;let e=wa(),t=me;class r extends Error{constructor(s,a,n,u,l,h){super(s),this.name="CssSyntaxError",this.reason=s,l&&(this.file=l),u&&(this.source=u),h&&(this.plugin=h),typeof a<"u"&&typeof n<"u"&&(typeof a=="number"?(this.line=a,this.column=n):(this.line=a.line,this.column=a.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let a=this.source;s==null&&(s=e.isColorSupported),t&&s&&(a=t(a));let n=a.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,n.length),h=String(l).length,o,d;if(s){let{bold:c,gray:f,red:m}=e.createColors(!0);o=p=>c(m(p)),d=p=>f(p)}else o=d=c=>c;return n.slice(u,l).map((c,f)=>{let m=u+1+f,p=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=d(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+d(p)+c+`
|
|
3
|
+
`+g+o("^")}return" "+d(p)+c}).join(`
|
|
4
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
5
|
+
|
|
6
|
+
`+s+`
|
|
7
|
+
`),this.name+": "+this.message+s}}return Vt=r,r.default=r,Vt}var at={},_s;function os(){return _s||(_s=1,at.isClean=Symbol("isClean"),at.my=Symbol("my")),at}var Gt,ks;function yn(){if(ks)return Gt;ks=1;const e={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(s){this.builder=s}atrule(s,a){let n="@"+s.name,u=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?n+=s.raws.afterName:u&&(n+=" "),s.nodes)this.block(s,n+u);else{let l=(s.raws.between||"")+(a?";":"");this.builder(n+u+l,s)}}beforeAfter(s,a){let n;s.type==="decl"?n=this.raw(s,null,"beforeDecl"):s.type==="comment"?n=this.raw(s,null,"beforeComment"):a==="before"?n=this.raw(s,null,"beforeRule"):n=this.raw(s,null,"beforeClose");let u=s.parent,l=0;for(;u&&u.type!=="root";)l+=1,u=u.parent;if(n.includes(`
|
|
13
|
+
`)){let h=this.raw(s,null,"indent");if(h.length)for(let o=0;o<l;o++)n+=h}return n}block(s,a){let n=this.raw(s,"between","beforeOpen");this.builder(a+n+"{",s,"start");let u;s.nodes&&s.nodes.length?(this.body(s),u=this.raw(s,"after")):u=this.raw(s,"after","emptyBody"),u&&this.builder(u),this.builder("}",s,"end")}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let n=this.raw(s,"semicolon");for(let u=0;u<s.nodes.length;u++){let l=s.nodes[u],h=this.raw(l,"before");h&&this.builder(h),this.stringify(l,a!==u||n)}}comment(s){let a=this.raw(s,"left","commentLeft"),n=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+n+"*/",s)}decl(s,a){let n=this.raw(s,"between","colon"),u=s.prop+n+this.rawValue(s,"value");s.important&&(u+=s.raws.important||" !important"),a&&(u+=";"),this.builder(u,s)}document(s){this.body(s)}raw(s,a,n){let u;if(n||(n=a),a&&(u=s.raws[a],typeof u<"u"))return u;let l=s.parent;if(n==="before"&&(!l||l.type==="root"&&l.first===s||l&&l.type==="document"))return"";if(!l)return e[n];let h=s.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[n]<"u")return h.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(s,n);{let o="raw"+t(n);this[o]?u=this[o](h,s):h.walk(d=>{if(u=d.raws[a],typeof u<"u")return!1})}return typeof u>"u"&&(u=e[n]),h.rawCache[n]=u,u}rawBeforeClose(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return a=n.raws.after,a.includes(`
|
|
14
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let n;return s.walkComments(u=>{if(typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
|
|
15
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(a,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(s,a){let n;return s.walkDecls(u=>{if(typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(a,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(s){let a;return s.walk(n=>{if(n.type!=="decl"&&(a=n.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(s){let a;return s.walk(n=>{if(n.nodes&&(n.parent!==s||s.first!==n)&&typeof n.raws.before<"u")return a=n.raws.before,a.includes(`
|
|
17
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(n=>{if(typeof n.raws.between<"u")return a=n.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length===0&&(a=n.raws.after,typeof a<"u"))return!1}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(n=>{let u=n.parent;if(u&&u!==s&&u.parent&&u.parent===s&&typeof n.raws.before<"u"){let l=n.raws.before.split(`
|
|
18
|
+
`);return a=l[l.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(a=n.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(s,a){let n=s[a],u=s.raws[a];return u&&u.value===n?u.raw:n}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a)}}return Gt=r,r.default=r,Gt}var Ht,Ls;function Ot(){if(Ls)return Ht;Ls=1;let e=yn();function t(r,i){new e(i).stringify(r)}return Ht=t,t.default=t,Ht}var Yt,Ps;function It(){if(Ps)return Yt;Ps=1;let{isClean:e,my:t}=os(),r=ns(),i=yn(),s=Ot();function a(u,l){let h=new u.constructor;for(let o in u){if(!Object.prototype.hasOwnProperty.call(u,o)||o==="proxyCache")continue;let d=u[o],c=typeof d;o==="parent"&&c==="object"?l&&(h[o]=l):o==="source"?h[o]=d:Array.isArray(d)?h[o]=d.map(f=>a(f,h)):(c==="object"&&d!==null&&(d=a(d)),h[o]=d)}return h}class n{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let h in l)if(h==="nodes"){this.nodes=[];for(let o of l[h])typeof o.clone=="function"?this.append(o.clone()):this.append(o)}else this[h]=l[h]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let h=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let h in l)this[h]=l[h];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let h=a(this);for(let o in l)h[o]=l[o];return h}cloneAfter(l={}){let h=this.clone(l);return this.parent.insertAfter(this,h),h}cloneBefore(l={}){let h=this.clone(l);return this.parent.insertBefore(this,h),h}error(l,h={}){if(this.source){let{end:o,start:d}=this.rangeBy(h);return this.source.input.error(l,{column:d.column,line:d.line},{column:o.column,line:o.line},h)}return new r(l)}getProxyProcessor(){return{get(l,h){return h==="proxyOf"?l:h==="root"?()=>l.root().toProxy():l[h]},set(l,h,o){return l[h]===o||(l[h]=o,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,h){let o=this.source.start;if(l.index)o=this.positionInside(l.index,h);else if(l.word){h=this.toString();let d=h.indexOf(l.word);d!==-1&&(o=this.positionInside(d,h))}return o}positionInside(l,h){let o=h||this.toString(),d=this.source.start.column,c=this.source.start.line;for(let f=0;f<l;f++)o[f]===`
|
|
19
|
+
`?(d=1,c+=1):d+=1;return{column:d,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let h={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(l.word){let d=this.toString(),c=d.indexOf(l.word);c!==-1&&(h=this.positionInside(c,d),o=this.positionInside(c+l.word.length,d))}else l.start?h={column:l.start.column,line:l.start.line}:l.index&&(h=this.positionInside(l.index)),l.end?o={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?o=this.positionInside(l.endIndex):l.index&&(o=this.positionInside(l.index+1));return(o.line<h.line||o.line===h.line&&o.column<=h.column)&&(o={column:h.column+1,line:h.line}),{end:o,start:h}}raw(l,h){return new i().raw(this,l,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let h=this,o=!1;for(let d of l)d===this?o=!0:o?(this.parent.insertAfter(h,d),h=d):this.parent.insertBefore(h,d);o||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,h){let o={},d=h==null;h=h||new Map;let c=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))o[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,h):p);else if(typeof m=="object"&&m.toJSON)o[f]=m.toJSON(null,h);else if(f==="source"){let p=h.get(m.input);p==null&&(p=c,h.set(m.input,c),c++),o[f]={end:m.end,inputId:p,start:m.start}}else o[f]=m}return d&&(o.inputs=[...h.keys()].map(f=>f.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=s){l.stringify&&(l=l.stringify);let h="";return l(this,o=>{h+=o}),h}warn(l,h,o){let d={node:this};for(let c in o)d[c]=o[c];return l.warn(h,d)}get proxyOf(){return this}}return Yt=n,n.default=n,Yt}var Xt,Fs;function Dt(){if(Fs)return Xt;Fs=1;let e=It();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Xt=t,t.default=t,Xt}var Jt,Us;function Sa(){if(Us)return Jt;Us=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Jt={nanoid:(i=21)=>{let s="",a=i;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(i,s=21)=>(a=s)=>{let n="",u=a;for(;u--;)n+=i[Math.random()*i.length|0];return n}},Jt}var Qt,Bs;function wn(){if(Bs)return Qt;Bs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{existsSync:r,readFileSync:i}=me,{dirname:s,join:a}=me;function n(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class u{constructor(h,o){if(o.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let d=o.map?o.map.prev:void 0,c=this.loadMap(o.from,d);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=s(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(h){let o=/^data:application\/json;charset=utf-?8;base64,/,d=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(c.test(h)||f.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(o.test(h)||d.test(h))return n(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let o=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let d=h.lastIndexOf(o.pop()),c=h.indexOf("*/",d);d>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(d,c)))}loadFile(h){if(this.root=s(h),r(h))return this.mapFile=h,i(h,"utf-8").toString().trim()}loadMap(h,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let d=o(h);if(d){let c=this.loadFile(d);if(!c)throw new Error("Unable to load previous source map: "+d.toString());return c}}else{if(o instanceof e)return t.fromSourceMap(o).toString();if(o instanceof t)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let d=this.annotation;return h&&(d=a(s(h),d)),this.loadFile(d)}}}startWith(h,o){return h?h.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Qt=u,u.default=u,Qt}var Zt,$s;function At(){if($s)return Zt;$s=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{fileURLToPath:r,pathToFileURL:i}=me,{isAbsolute:s,resolve:a}=me,{nanoid:n}=Sa(),u=me,l=ns(),h=wn(),o=Symbol("fromOffsetCache"),d=!!(e&&t),c=!!(a&&s);class f{constructor(p,g={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!c||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=a(g.from)),c&&d){let S=new h(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+n(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,S,b={}){let y,w,v;if(g&&typeof g=="object"){let R=g,O=S;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);g=I.line,S=I.col}else g=R.line,S=R.column;if(typeof O.offset=="number"){let I=this.fromOffset(O.offset);w=I.line,v=I.col}else w=O.line,v=O.column}else if(!S){let R=this.fromOffset(g);g=R.line,S=R.col}let C=this.origin(g,S,w,v);return C?y=new l(p,C.endLine===void 0?C.line:{column:C.column,line:C.line},C.endLine===void 0?C.column:{column:C.endColumn,line:C.endLine},C.source,C.file,b.plugin):y=new l(p,w===void 0?g:{column:S,line:g},w===void 0?S:{column:v,line:w},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:w,line:g,source:this.css},this.file&&(i&&(y.input.url=i(this.file).toString()),y.input.file=this.file),y}fromOffset(p){let g,S;if(this[o])S=this[o];else{let y=this.css.split(`
|
|
20
|
+
`);S=new Array(y.length);let w=0;for(let v=0,C=y.length;v<C;v++)S[v]=w,w+=y[v].length+1;this[o]=S}g=S[S.length-1];let b=0;if(p>=g)b=S.length-1;else{let y=S.length-2,w;for(;b<y;)if(w=b+(y-b>>1),p<S[w])y=w-1;else if(p>=S[w+1])b=w+1;else{b=w;break}}return{col:p-S[b]+1,line:b+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:a(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,S,b){if(!this.map)return!1;let y=this.map.consumer(),w=y.originalPositionFor({column:g,line:p});if(!w.source)return!1;let v;typeof S=="number"&&(v=y.originalPositionFor({column:b,line:S}));let C;s(w.source)?C=i(w.source):C=new URL(w.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let R={column:w.column,endColumn:v&&v.column,endLine:v&&v.line,line:w.line,url:C.toString()};if(C.protocol==="file:")if(r)R.file=r(C);else throw new Error("file: protocol is not available in this PostCSS build");let O=y.sourceContentFor(w.source);return O&&(R.source=O),R}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Zt=f,f.default=f,u&&u.registerInput&&u.registerInput(f),Zt}var Kt,Ws;function bn(){if(Ws)return Kt;Ws=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=me,{dirname:r,relative:i,resolve:s,sep:a}=me,{pathToFileURL:n}=me,u=At(),l=!!(e&&t),h=!!(r&&s&&i&&a);class o{constructor(c,f,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let f=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(f=`\r
|
|
23
|
+
`),this.css+=f+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let f=this.toUrl(this.path(c.file)),m=c.root||r(c.file),p;this.mapOpts.sourcesContent===!1?(p=new e(c.text),p.sourcesContent&&(p.sourcesContent=null)):p=c.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let f=this.root.nodes.length-1;f>=0;f--)c=this.root.nodes[f],c.type==="comment"&&c.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&l&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,f=>{c+=f}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=t.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,y,w)=>{if(this.css+=b,y&&w!=="end"&&(p.generated.line=c,p.generated.column=f-1,y.source&&y.source.start?(p.source=this.sourcePath(y),p.original.line=y.source.start.line,p.original.column=y.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=b.match(/\n/g),g?(c+=g.length,S=b.lastIndexOf(`
|
|
24
|
+
`),f=b.length-S):f+=b.length,y&&w!=="start"){let v=y.parent||{raws:{}};(!(y.type==="decl"||y.type==="atrule"&&!y.nodes)||y!==v.last||v.raws.semicolon)&&(y.source&&y.source.end?(p.source=this.sourcePath(y),p.original.line=y.source.end.line,p.original.column=y.source.end.column-1,p.generated.line=c,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c<"u"&&c!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let f=this.memoizedPaths.get(c);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let p=i(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let f=c.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let c=new u(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let f=this.memoizedFileURLs.get(c);if(f)return f;if(n){let m=n(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let f=this.memoizedURLs.get(c);if(f)return f;a==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return Kt=o,Kt}var er,zs;function Tt(){if(zs)return er;zs=1;let e=It();class t extends e{constructor(i){super(i),this.type="comment"}}return er=t,t.default=t,er}var tr,qs;function Te(){if(qs)return tr;qs=1;let{isClean:e,my:t}=os(),r=Dt(),i=Tt(),s=It(),a,n,u,l;function h(c){return c.map(f=>(f.nodes&&(f.nodes=h(f.nodes)),delete f.source,f))}function o(c){if(c[e]=!1,c.proxyOf.nodes)for(let f of c.proxyOf.nodes)o(f)}class d extends s{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?p=>f[m]((g,...S)=>p(g.toProxy(),...S)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let b of g)this.proxyOf.nodes.splice(p+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],p<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let y of S)this.proxyOf.nodes.splice(p,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<=b&&(this.indexes[y]=b+S.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=h(a(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new n(f)];else if(f.name)f=[new u(f)];else if(f.text)f=[new i(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||d.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&o(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=c=>{a=c},d.registerRule=c=>{n=c},d.registerAtRule=c=>{u=c},d.registerRoot=c=>{l=c},tr=d,d.default=d,d.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,u.prototype):c.type==="rule"?Object.setPrototypeOf(c,n.prototype):c.type==="decl"?Object.setPrototypeOf(c,r.prototype):c.type==="comment"?Object.setPrototypeOf(c,i.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[t]=!0,c.nodes&&c.nodes.forEach(f=>{d.rebuild(f)})},tr}var rr,js;function as(){if(js)return rr;js=1;let e=Te(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s},i.registerProcessor=s=>{r=s},rr=i,i.default=i,rr}var sr,Vs;function vn(){if(Vs)return sr;Vs=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let s=i.node.rangeBy(i);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return sr=e,e.default=e,sr}var ir,Gs;function ls(){if(Gs)return ir;Gs=1;let e=vn();class t{constructor(i,s,a){this.processor=i,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(i,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,s);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return ir=t,t.default=t,ir}var nr,Hs;function Ca(){if(Hs)return nr;Hs=1;const e=39,t=34,r=92,i=47,s=10,a=32,n=12,u=9,l=13,h=91,o=93,d=40,c=41,f=123,m=125,p=59,g=42,S=58,b=64,y=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return nr=function(O,I={}){let M=O.css.valueOf(),q=I.ignoreErrors,_,E,ae,se,$,k,Y,ee,Q,j,Re=M.length,N=0,we=[],fe=[];function Ve(){return N}function ie(L){throw O.error("Unclosed "+L,N)}function de(){return fe.length===0&&N>=Re}function Ie(L){if(fe.length)return fe.pop();if(N>=Re)return;let te=L?L.ignoreUnclosed:!1;switch(_=M.charCodeAt(N),_){case s:case a:case u:case l:case n:{E=N;do E+=1,_=M.charCodeAt(E);while(_===a||_===s||_===u||_===l||_===n);j=["space",M.slice(N,E)],N=E-1;break}case h:case o:case f:case m:case S:case p:case c:{let V=String.fromCharCode(_);j=[V,V,N];break}case d:{if(ee=we.length?we.pop()[1]:"",Q=M.charCodeAt(N+1),ee==="url"&&Q!==e&&Q!==t&&Q!==a&&Q!==s&&Q!==u&&Q!==n&&Q!==l){E=N;do{if(k=!1,E=M.indexOf(")",E+1),E===-1)if(q||te){E=N;break}else ie("bracket");for(Y=E;M.charCodeAt(Y-1)===r;)Y-=1,k=!k}while(k);j=["brackets",M.slice(N,E+1),N,E],N=E}else E=M.indexOf(")",N+1),se=M.slice(N,E+1),E===-1||v.test(se)?j=["(","(",N]:(j=["brackets",se,N,E],N=E);break}case e:case t:{ae=_===e?"'":'"',E=N;do{if(k=!1,E=M.indexOf(ae,E+1),E===-1)if(q||te){E=N+1;break}else ie("string");for(Y=E;M.charCodeAt(Y-1)===r;)Y-=1,k=!k}while(k);j=["string",M.slice(N,E+1),N,E],N=E;break}case b:{y.lastIndex=N+1,y.test(M),y.lastIndex===0?E=M.length-1:E=y.lastIndex-2,j=["at-word",M.slice(N,E+1),N,E],N=E;break}case r:{for(E=N,$=!0;M.charCodeAt(E+1)===r;)E+=1,$=!$;if(_=M.charCodeAt(E+1),$&&_!==i&&_!==a&&_!==s&&_!==u&&_!==l&&_!==n&&(E+=1,C.test(M.charAt(E)))){for(;C.test(M.charAt(E+1));)E+=1;M.charCodeAt(E+1)===a&&(E+=1)}j=["word",M.slice(N,E+1),N,E],N=E;break}default:{_===i&&M.charCodeAt(N+1)===g?(E=M.indexOf("*/",N+2)+1,E===0&&(q||te?E=M.length:ie("comment")),j=["comment",M.slice(N,E+1),N,E],N=E):(w.lastIndex=N+1,w.test(M),w.lastIndex===0?E=M.length-1:E=w.lastIndex-2,j=["word",M.slice(N,E+1),N,E],we.push(j),N=E);break}}return N++,j}function xe(L){fe.push(L)}return{back:xe,endOfFile:de,nextToken:Ie,position:Ve}},nr}var or,Ys;function us(){if(Ys)return or;Ys=1;let e=Te();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return or=t,t.default=t,e.registerAtRule(t),or}var ar,Xs;function tt(){if(Xs)return ar;Xs=1;let e=Te(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,n,u){let l=super.normalize(a);if(n){if(u==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let h of l)h.raws.before=n.raws.before}return l}removeChild(a,n){let u=this.index(a);return!n&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s},i.registerProcessor=s=>{r=s},ar=i,i.default=i,e.registerRoot(i),ar}var lr,Js;function Sn(){if(Js)return lr;Js=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
25
|
+
`," "];return e.split(t,r)},split(t,r,i){let s=[],a="",n=!1,u=0,l=!1,h="",o=!1;for(let d of t)o?o=!1:d==="\\"?o=!0:l?d===h&&(l=!1):d==='"'||d==="'"?(l=!0,h=d):d==="("?u+=1:d===")"?u>0&&(u-=1):u===0&&r.includes(d)&&(n=!0),n?(a!==""&&s.push(a.trim()),a="",n=!1):a+=d;return(i||a!=="")&&s.push(a.trim()),s}};return lr=e,e.default=e,lr}var ur,Qs;function cs(){if(Qs)return ur;Qs=1;let e=Te(),t=Sn();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,n=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(n)}}return ur=r,r.default=r,e.registerRule(r),ur}var cr,Zs;function Ea(){if(Zs)return cr;Zs=1;let e=Dt(),t=Ca(),r=Tt(),i=us(),s=tt(),a=cs();const n={empty:!0,space:!0};function u(h){for(let o=h.length-1;o>=0;o--){let d=h[o],c=d[3]||d[2];if(c)return c}}class l{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let d=new i;d.name=o[1].slice(1),d.name===""&&this.unnamedAtrule(d,o),this.init(d,o[2]);let c,f,m,p=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),c=o[0],c==="("||c==="["?b.push(c==="("?")":"]"):c==="{"&&b.length>0?b.push("}"):c===b[b.length-1]&&b.pop(),b.length===0)if(c===";"){d.source.end=this.getPosition(o[2]),d.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(S.length>0){for(m=S.length-1,f=S[m];f&&f[0]==="space";)f=S[--m];f&&(d.source.end=this.getPosition(f[3]||f[2]),d.source.end.offset++)}this.end(o);break}else S.push(o);else S.push(o);if(this.tokenizer.endOfFile()){p=!0;break}}d.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(d.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(d,"params",S),p&&(o=S[S.length-1],d.source.end=this.getPosition(o[3]||o[2]),d.source.end.offset++,this.spaces=d.raws.between,d.raws.between="")):(d.raws.afterName="",d.params=""),g&&(d.nodes=[],this.current=d)}checkMissedSemicolon(o){let d=this.colon(o);if(d===!1)return;let c=0,f;for(let m=d-1;m>=0&&(f=o[m],!(f[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(o){let d=0,c,f,m;for(let[p,g]of o.entries()){if(c=g,f=c[0],f==="("&&(d+=1),f===")"&&(d-=1),d===0&&f===":")if(!m)this.doubleColon(c);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=c}return!1}comment(o){let d=new r;this.init(d,o[2]),d.source.end=this.getPosition(o[3]||o[2]),d.source.end.offset++;let c=o[1].slice(2,-2);if(/^\s*$/.test(c))d.text="",d.raws.left=c,d.raws.right="";else{let f=c.match(/^(\s*)([^]*\S)(\s*)$/);d.text=f[2],d.raws.left=f[1],d.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(o,d){let c=new e;this.init(c,o[0][2]);let f=o[o.length-1];for(f[0]===";"&&(this.semicolon=!0,o.pop()),c.source.end=this.getPosition(f[3]||f[2]||u(o)),c.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),c.raws.before+=o.shift()[1];for(c.source.start=this.getPosition(o[0][2]),c.prop="";o.length;){let b=o[0][0];if(b===":"||b==="space"||b==="comment")break;c.prop+=o.shift()[1]}c.raws.between="";let m;for(;o.length;)if(m=o.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;o.length&&(g=o[0][0],!(g!=="space"&&g!=="comment"));)p.push(o.shift());this.precheckMissedSemicolon(o);for(let b=o.length-1;b>=0;b--){if(m=o[b],m[1].toLowerCase()==="!important"){c.important=!0;let y=this.stringFrom(o,b);y=this.spacesFromEnd(o)+y,y!==" !important"&&(c.raws.important=y);break}else if(m[1].toLowerCase()==="important"){let y=o.slice(0),w="";for(let v=b;v>0;v--){let C=y[v][0];if(w.trim().indexOf("!")===0&&C!=="space")break;w=y.pop()[1]+w}w.trim().indexOf("!")===0&&(c.important=!0,c.raws.important=w,o=y)}if(m[0]!=="space"&&m[0]!=="comment")break}o.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(c.raws.between+=p.map(b=>b[1]).join(""),p=[]),this.raw(c,"value",p.concat(o),d),c.value.includes(":")&&!d&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let d=new a;this.init(d,o[2]),d.selector="",d.raws.between="",this.current=d}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let d=this.current.nodes[this.current.nodes.length-1];d&&d.type==="rule"&&!d.raws.ownSemicolon&&(d.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(o){let d=this.input.fromOffset(o);return{column:d.col,line:d.line,offset:o}}init(o,d){this.current.push(o),o.source={input:this.input,start:this.getPosition(d)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let d=!1,c=null,f=!1,m=null,p=[],g=o[1].startsWith("--"),S=[],b=o;for(;b;){if(c=b[0],S.push(b),c==="("||c==="[")m||(m=b),p.push(c==="("?")":"]");else if(g&&f&&c==="{")m||(m=b),p.push("}");else if(p.length===0)if(c===";")if(f){this.decl(S,g);return}else break;else if(c==="{"){this.rule(S);return}else if(c==="}"){this.tokenizer.back(S.pop()),d=!0;break}else c===":"&&(f=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(d=!0),p.length>0&&this.unclosedBracket(m),d&&f){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,d,c,f){let m,p,g=c.length,S="",b=!0,y,w;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!f?b=!1:p==="comment"?(w=c[v-1]?c[v-1][0]:"empty",y=c[v+1]?c[v+1][0]:"empty",!n[w]&&!n[y]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let v=c.reduce((C,R)=>C+R[1],"");o.raws[d]={raw:v,value:S}}o[d]=S}rule(o){o.pop();let d=new a;this.init(d,o[0][2]),d.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(d,"selector",o),this.current=d}spacesAndCommentsFromEnd(o){let d,c="";for(;o.length&&(d=o[o.length-1][0],!(d!=="space"&&d!=="comment"));)c=o.pop()[1]+c;return c}spacesAndCommentsFromStart(o){let d,c="";for(;o.length&&(d=o[0][0],!(d!=="space"&&d!=="comment"));)c+=o.shift()[1];return c}spacesFromEnd(o){let d,c="";for(;o.length&&(d=o[o.length-1][0],d==="space");)c=o.pop()[1]+c;return c}stringFrom(o,d){let c="";for(let f=d;f<o.length;f++)c+=o[f][1];return o.splice(d,o.length-d),c}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word",{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,d){throw this.input.error("At-rule without name",{offset:d[2]},{offset:d[2]+d[1].length})}}return cr=l,cr}var hr,Ks;function hs(){if(Ks)return hr;Ks=1;let e=Te(),t=Ea(),r=At();function i(s,a){let n=new r(s,a),u=new t(n);try{u.parse()}catch(l){throw l}return u.root}return hr=i,i.default=i,e.registerParse(i),hr}var fr,ei;function Cn(){if(ei)return fr;ei=1;let{isClean:e,my:t}=os(),r=bn(),i=Ot(),s=Te(),a=as(),n=ls(),u=hs(),l=tt();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},d={Once:!0,postcssPlugin:!0,prepare:!0},c=0;function f(y){return typeof y=="object"&&typeof y.then=="function"}function m(y){let w=!1,v=h[y.type];return y.type==="decl"?w=y.prop.toLowerCase():y.type==="atrule"&&(w=y.name.toLowerCase()),w&&y.append?[v,v+"-"+w,c,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:y.append?[v,c,v+"Exit"]:[v,v+"Exit"]}function p(y){let w;return y.type==="document"?w=["Document",c,"DocumentExit"]:y.type==="root"?w=["Root",c,"RootExit"]:w=m(y),{eventIndex:0,events:w,iterator:0,node:y,visitorIndex:0,visitors:[]}}function g(y){return y[e]=!1,y.nodes&&y.nodes.forEach(w=>g(w)),y}let S={};class b{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=g(v);else if(v instanceof b||v instanceof n)R=g(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let O=u;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(v,C)}catch(I){this.processed=!0,this.error=I}R&&!R[t]&&s.rebuild(R)}this.result=new n(w,R,C),this.helpers={...S,postcss:S,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...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(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(f(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=!0;let v=[p(w)];for(;v.length>0;){let C=this.visitTick(v);if(f(C))try{await C}catch(R){let O=v[v.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return f(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=i;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 w of this.plugins){let v=this.runOnRoot(w);if(f(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let O;try{O=R(v,this.helpers)}catch(I){throw this.handleError(I,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(f(O))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[I,M]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=I;try{return M(C.toProxy(),this.helpers)}catch(q){throw this.handleError(q,C)}}if(v.iterator!==0){let I=v.iterator,M;for(;M=C.nodes[C.indexes[I]];)if(C.indexes[I]+=1,!M[e]){M[e]=!0,w.push(p(M));return}v.iterator=0,delete C.indexes[I]}let O=v.events;for(;v.eventIndex<O.length;){let I=O[v.eventIndex];if(v.eventIndex+=1,I===c){C.nodes&&C.nodes.length&&(C[e]=!0,v.iterator=C.getIterator());return}else if(this.listeners[I]){v.visitors=this.listeners[I];return}}w.pop()}walkSync(w){w[e]=!0;let v=m(w);for(let C of v)if(C===c)w.nodes&&w.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=y=>{S=y},fr=b,b.default=b,l.registerLazyResult(b),a.registerLazyResult(b),fr}var dr,ti;function Ra(){if(ti)return dr;ti=1;let e=bn(),t=Ot(),r=hs();const i=ls();class s{constructor(n,u,l){u=u.toString(),this.stringified=!1,this._processor=n,this._css=u,this._opts=l,this._map=void 0;let h,o=t;this.result=new i(this._processor,h,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let c=new e(o,h,this._opts,u);if(c.isMap()){let[f,m]=c.generate();f&&(this.result.css=f),m&&(this.result.map=m)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(n){return this.async().catch(n)}finally(n){return this.async().then(n,n)}sync(){if(this.error)throw this.error;return this.result}then(n,u){return this.async().then(n,u)}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 n,u=r;try{n=u(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=n,n}get[Symbol.toStringTag](){return"NoWorkResult"}}return dr=s,s.default=s,dr}var pr,ri;function xa(){if(ri)return pr;ri=1;let e=Ra(),t=Cn(),r=as(),i=tt();class s{constructor(n=[]){this.version="8.4.38",this.plugins=this.normalize(n)}normalize(n){let u=[];for(let l of n)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))u=u.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)u.push(l);else if(typeof l=="function")u.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return u}process(n,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new e(this,n,u):new t(this,n,u)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}}return pr=s,s.default=s,i.registerProcessor(s),r.registerProcessor(s),pr}var mr,si;function Ma(){if(si)return mr;si=1;let e=Dt(),t=wn(),r=Tt(),i=us(),s=At(),a=tt(),n=cs();function u(l,h){if(Array.isArray(l))return l.map(c=>u(c));let{inputs:o,...d}=l;if(o){h=[];for(let c of o){let f={...c,__proto__:s.prototype};f.map&&(f.map={...f.map,__proto__:t.prototype}),h.push(f)}}if(d.nodes&&(d.nodes=l.nodes.map(c=>u(c,h))),d.source){let{inputId:c,...f}=d.source;d.source=f,c!=null&&(d.source.input=h[c])}if(d.type==="root")return new a(d);if(d.type==="decl")return new e(d);if(d.type==="rule")return new n(d);if(d.type==="comment")return new r(d);if(d.type==="atrule")return new i(d);throw new Error("Unknown node type: "+l.type)}return mr=u,u.default=u,mr}var gr,ii;function Na(){if(ii)return gr;ii=1;let e=ns(),t=Dt(),r=Cn(),i=Te(),s=xa(),a=Ot(),n=Ma(),u=as(),l=vn(),h=Tt(),o=us(),d=ls(),c=At(),f=hs(),m=Sn(),p=cs(),g=tt(),S=It();function b(...y){return y.length===1&&Array.isArray(y[0])&&(y=y[0]),new s(y)}return b.plugin=function(w,v){let C=!1;function R(...I){console&&console.warn&&!C&&(C=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),yt.LANG&&yt.LANG.startsWith("cn")&&console.warn(w+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
27
|
+
https://www.w3ctech.com/topic/2226`));let M=v(...I);return M.postcssPlugin=w,M.postcssVersion=new s().version,M}let O;return Object.defineProperty(R,"postcss",{get(){return O||(O=R()),O}}),R.process=function(I,M,q){return b([R(q)]).process(I,M)},R},b.stringify=a,b.parse=f,b.fromJSON=n,b.list=m,b.comment=y=>new h(y),b.atRule=y=>new o(y),b.decl=y=>new t(y),b.rule=y=>new p(y),b.root=y=>new g(y),b.document=y=>new u(y),b.CssSyntaxError=e,b.Declaration=t,b.Container=i,b.Processor=s,b.Document=u,b.Comment=h,b.Warning=l,b.AtRule=o,b.Result=d,b.Input=c,b.Rule=p,b.Root=g,b.Node=S,r.registerPostcss(b),gr=b,b.default=b,gr}var Oa=Na();const X=ga(Oa);X.stringify;X.fromJSON;X.plugin;X.parse;X.list;X.document;X.comment;X.atRule;X.rule;X.decl;X.root;X.CssSyntaxError;X.Declaration;X.Container;X.Processor;X.Document;X.Comment;X.Warning;X.AtRule;X.Result;X.Input;X.Rule;X.Root;X.Node;const ni={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 Ia(e){let t=ni[e.tagName]?ni[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function _t(e,t){const r=t?.stylesWithHoverClass.get(e);if(r)return r;let i=e;try{i=X([pa,ma]).process(e).css}catch(s){console.warn("Failed to adapt css for replay",s)}return t?.stylesWithHoverClass.set(e,i),i}function oi(){return{stylesWithHoverClass:new Map}}const Da="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",ai="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",En=new WeakSet;function Aa(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;const t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function Ta(e){if(e.UNSAFE_allowUnprotectedRebuild)return;const t=e.doc.defaultView;if(t&&!(En.has(e.doc)&&Aa(t.frameElement)))throw new Error(Da)}function _a(e,t,r,i){const s=[];for(const l of e.childNodes)l.type===F.Text&&s.push(l);const a=t.split("/* rr_split */");for(;a.length>1&&a.length>s.length;)a.splice(-2,2,a.slice(-2).join(""));let n="";r&&(n=_t(a.join(""),i));let u=0;for(let l=0;l<s.length&&l!==a.length;l++){const h=s[l];if(!r)h.textContent=a[l];else if(l<a.length-1){let o=u,d=a[l+1].length;d=Math.min(d,30);let c=!1;for(;d>2;d--){const f=a[l+1].substring(0,d),m=n.substring(u).indexOf(f);if(c=m!==-1,c){o+=m;break}}c||(o+=a[l].length),h.textContent=n.substring(u,o),u=o}else h.textContent=n.substring(u)}}function ka(e,t,r,i){const{doc:s,hackCss:a,cache:n}=i;e.childNodes.length?_a(e,r,a,n):(a&&(r=_t(r,n)),t.appendChild(s.createTextNode(r)))}function La(e,t){var r;const{doc:i,hackCss:s,cache:a}=t;switch(e.type){case F.Document:return i.implementation.createDocument(null,"",null);case F.DocumentType:return i.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case F.Element:{const n=Ia(e);let u;e.isSVG?u=i.createElementNS("http://www.w3.org/2000/svg",n):(e.isCustom&&((r=i.defaultView)!=null&&r.customElements)&&!i.defaultView.customElements.get(e.tagName)&&i.defaultView.customElements.define(e.tagName,class extends i.defaultView.HTMLElement{}),u=i.createElement(n));const l={};for(const h in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,h))continue;let o=e.attributes[h];if(!(n==="option"&&h==="selected"&&o===!1)&&o!==null){if(o===!0&&(o=""),h.startsWith("rr_")){l[h]=o;continue}if(typeof o=="string"){if(n==="style"&&h==="_cssText"){ka(e,u,o,t);continue}else if(n==="textarea"&&h==="value"){u.appendChild(i.createTextNode(o)),e.childNodes=[];continue}}try{if(e.isSVG&&h==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",h,o.toString());else if(h==="onload"||h==="onclick"||h.substring(0,7)==="onmouse")u.setAttribute("_"+h,o.toString());else if(n==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&h==="content"){u.setAttribute("csp-content",o.toString());continue}else n==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||n==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ss(e.attributes.href)==="js"||(n==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(h,o.toString()))}catch{}}}for(const h in l){const o=l[h];if(n==="canvas"&&h==="rr_dataURL"){const d=i.createElement("img");d.onload=()=>{const c=u.getContext("2d");c&&c.drawImage(d,0,0,d.width,d.height)},d.src=o.toString(),u.RRNodeType&&(u.rr_dataURL=o.toString())}else if(n==="img"&&h==="rr_dataURL"){const d=u;d.currentSrc.startsWith("data:")||(d.setAttribute("rrweb-original-src",e.attributes.src),d.src=o.toString())}if(h==="rr_width")u.style.setProperty("width",o.toString());else if(h==="rr_height")u.style.setProperty("height",o.toString());else if(h==="rr_mediaCurrentTime"&&typeof o=="number")u.currentTime=o;else if(h==="rr_mediaState")switch(o){case"played":u.play().catch(d=>console.warn("media playback error",d));break;case"paused":u.pause();break}else h==="rr_mediaPlaybackRate"&&typeof o=="number"?u.playbackRate=o:h==="rr_mediaMuted"&&typeof o=="boolean"?u.muted=o:h==="rr_mediaLoop"&&typeof o=="boolean"?u.loop=o:h==="rr_mediaVolume"&&typeof o=="number"?u.volume=o:h==="rr_open_mode"&&u.setAttribute("rr_open_mode",o)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return(n==="input"||n==="textarea")&&u.setAttribute("autocomplete","off"),u}case F.Text:return e.isStyle&&s?i.createTextNode(_t(e.textContent,a)):i.createTextNode(e.textContent);case F.CDATA:return i.createCDATASection(e.textContent);case F.Comment:return i.createComment(e.textContent);default:return null}}function Je(e,t){const{doc:r,mirror:i,skipChild:s=!1,hackCss:a=!0,afterAppend:n,cache:u}=t;if(i.has(e.id)){const h=i.getNode(e.id),o=i.getMeta(h);if(qo(o,e))return i.getNode(e.id)}let l=La(e,{doc:r,hackCss:a,cache:u});if(!l)return null;if(e.rootId&&i.getNode(e.rootId)!==r&&i.replace(e.rootId,r),e.type===F.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==F.DocumentType&&(e.childNodes[0].type===F.Element&&"xmlns"in e.childNodes[0].attributes&&e.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" "">')),l=r),i.add(l,e),(e.type===F.Document||e.type===F.Element)&&!s)for(const h of e.childNodes){const o=Je(h,{doc:r,mirror:i,skipChild:!1,hackCss:a,afterAppend:n,cache:u});if(!o){console.warn("Failed to rebuild",h);continue}if(h.isShadow&&ts(l)&&l.shadowRoot)l.shadowRoot.appendChild(o);else if(e.type===F.Document&&h.type==F.Element){const d=o;let c=null;d.childNodes.forEach(f=>{f.nodeName==="BODY"&&(c=f)}),c?(d.removeChild(c),l.appendChild(o),d.appendChild(c)):l.appendChild(o)}else l.appendChild(o);n&&n(o,h.id)}return l}function Pa(e,t){function r(i){t(i)}for(const i of e.getIds())e.has(i)&&r(e.getNode(i))}function Fa(e,t){const r=t.getMeta(e);if(r?.type!==F.Element)return;const i=e;for(const s in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,s)&&s.startsWith("rr_")))continue;const a=r.attributes[s];s==="rr_scrollLeft"&&(i.scrollLeft=a),s==="rr_scrollTop"&&(i.scrollTop=a)}}function Ua(e,t){Ta(t);const{doc:r,onVisit:i,hackCss:s=!0,afterAppend:a,cache:n,mirror:u=new rs}=t,l=Je(e,{doc:r,mirror:u,skipChild:!1,hackCss:s,afterAppend:a,cache:n});return Pa(u,h=>{i&&i(h),Fa(h,u)}),l}function Ba(e){var t;if(!e.root.isConnected)throw new Error(ai);const r=e.root.ownerDocument.createElement("iframe");for(const[s,a]of Object.entries(e.iframeAttributes||{}))s!=="sandbox"&&r.setAttribute(s,a);r.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(r);const i=r.contentDocument;if(!i||!r.contentWindow)throw(t=r.parentNode)==null||t.removeChild(r),new Error(ai);return En.add(i),r}var $a=Object.defineProperty,Wa=(e,t,r)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D=(e,t,r)=>Wa(e,typeof t!="symbol"?t+"":t,r),za=Object.defineProperty,qa=(e,t,r)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,li=(e,t,r)=>qa(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();let ja=class{constructor(){li(this,"idNodeMap",new Map),li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const s=this.nodeMetaMap.get(i);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Va(){return new ja}function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ha(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),r}var lt={exports:{}},ui;function Ya(){if(ui)return lt.exports;ui=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return lt.exports=t(),lt.exports.createColors=t,lt.exports}const Xa={},Ja=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),ge=Ha(Ja);var yr,ci;function fs(){if(ci)return yr;ci=1;let e=Ya(),t=ge;class r extends Error{constructor(s,a,n,u,l,h){super(s),this.name="CssSyntaxError",this.reason=s,l&&(this.file=l),u&&(this.source=u),h&&(this.plugin=h),typeof a<"u"&&typeof n<"u"&&(typeof a=="number"?(this.line=a,this.column=n):(this.line=a.line,this.column=a.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let a=this.source;s==null&&(s=e.isColorSupported),t&&s&&(a=t(a));let n=a.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,n.length),h=String(l).length,o,d;if(s){let{bold:c,gray:f,red:m}=e.createColors(!0);o=p=>c(m(p)),d=p=>f(p)}else o=d=c=>c;return n.slice(u,l).map((c,f)=>{let m=u+1+f,p=" "+(" "+m).slice(-h)+" | ";if(m===this.line){let g=d(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+d(p)+c+`
|
|
28
|
+
`+g+o("^")}return" "+d(p)+c}).join(`
|
|
29
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
30
|
+
|
|
31
|
+
`+s+`
|
|
32
|
+
`),this.name+": "+this.message+s}}return yr=r,r.default=r,yr}var ut={},hi;function ds(){return hi||(hi=1,ut.isClean=Symbol("isClean"),ut.my=Symbol("my")),ut}var wr,fi;function Rn(){if(fi)return wr;fi=1;const e={after:`
|
|
33
|
+
`,beforeClose:`
|
|
34
|
+
`,beforeComment:`
|
|
35
|
+
`,beforeDecl:`
|
|
36
|
+
`,beforeOpen:" ",beforeRule:`
|
|
37
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(s){this.builder=s}atrule(s,a){let n="@"+s.name,u=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?n+=s.raws.afterName:u&&(n+=" "),s.nodes)this.block(s,n+u);else{let l=(s.raws.between||"")+(a?";":"");this.builder(n+u+l,s)}}beforeAfter(s,a){let n;s.type==="decl"?n=this.raw(s,null,"beforeDecl"):s.type==="comment"?n=this.raw(s,null,"beforeComment"):a==="before"?n=this.raw(s,null,"beforeRule"):n=this.raw(s,null,"beforeClose");let u=s.parent,l=0;for(;u&&u.type!=="root";)l+=1,u=u.parent;if(n.includes(`
|
|
38
|
+
`)){let h=this.raw(s,null,"indent");if(h.length)for(let o=0;o<l;o++)n+=h}return n}block(s,a){let n=this.raw(s,"between","beforeOpen");this.builder(a+n+"{",s,"start");let u;s.nodes&&s.nodes.length?(this.body(s),u=this.raw(s,"after")):u=this.raw(s,"after","emptyBody"),u&&this.builder(u),this.builder("}",s,"end")}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let n=this.raw(s,"semicolon");for(let u=0;u<s.nodes.length;u++){let l=s.nodes[u],h=this.raw(l,"before");h&&this.builder(h),this.stringify(l,a!==u||n)}}comment(s){let a=this.raw(s,"left","commentLeft"),n=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+n+"*/",s)}decl(s,a){let n=this.raw(s,"between","colon"),u=s.prop+n+this.rawValue(s,"value");s.important&&(u+=s.raws.important||" !important"),a&&(u+=";"),this.builder(u,s)}document(s){this.body(s)}raw(s,a,n){let u;if(n||(n=a),a&&(u=s.raws[a],typeof u<"u"))return u;let l=s.parent;if(n==="before"&&(!l||l.type==="root"&&l.first===s||l&&l.type==="document"))return"";if(!l)return e[n];let h=s.root();if(h.rawCache||(h.rawCache={}),typeof h.rawCache[n]<"u")return h.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(s,n);{let o="raw"+t(n);this[o]?u=this[o](h,s):h.walk(d=>{if(u=d.raws[a],typeof u<"u")return!1})}return typeof u>"u"&&(u=e[n]),h.rawCache[n]=u,u}rawBeforeClose(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return a=n.raws.after,a.includes(`
|
|
39
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let n;return s.walkComments(u=>{if(typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
|
|
40
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(a,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(s,a){let n;return s.walkDecls(u=>{if(typeof u.raws.before<"u")return n=u.raws.before,n.includes(`
|
|
41
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(a,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(s){let a;return s.walk(n=>{if(n.type!=="decl"&&(a=n.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(s){let a;return s.walk(n=>{if(n.nodes&&(n.parent!==s||s.first!==n)&&typeof n.raws.before<"u")return a=n.raws.before,a.includes(`
|
|
42
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(n=>{if(typeof n.raws.between<"u")return a=n.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length===0&&(a=n.raws.after,typeof a<"u"))return!1}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(n=>{let u=n.parent;if(u&&u!==s&&u.parent&&u.parent===s&&typeof n.raws.before<"u"){let l=n.raws.before.split(`
|
|
43
|
+
`);return a=l[l.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(s){let a;return s.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(a=n.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(s,a){let n=s[a],u=s.raws[a];return u&&u.value===n?u.raw:n}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a)}}return wr=r,r.default=r,wr}var br,di;function kt(){if(di)return br;di=1;let e=Rn();function t(r,i){new e(i).stringify(r)}return br=t,t.default=t,br}var vr,pi;function Lt(){if(pi)return vr;pi=1;let{isClean:e,my:t}=ds(),r=fs(),i=Rn(),s=kt();function a(u,l){let h=new u.constructor;for(let o in u){if(!Object.prototype.hasOwnProperty.call(u,o)||o==="proxyCache")continue;let d=u[o],c=typeof d;o==="parent"&&c==="object"?l&&(h[o]=l):o==="source"?h[o]=d:Array.isArray(d)?h[o]=d.map(f=>a(f,h)):(c==="object"&&d!==null&&(d=a(d)),h[o]=d)}return h}class n{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let h in l)if(h==="nodes"){this.nodes=[];for(let o of l[h])typeof o.clone=="function"?this.append(o.clone()):this.append(o)}else this[h]=l[h]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let h=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let h in l)this[h]=l[h];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let h=a(this);for(let o in l)h[o]=l[o];return h}cloneAfter(l={}){let h=this.clone(l);return this.parent.insertAfter(this,h),h}cloneBefore(l={}){let h=this.clone(l);return this.parent.insertBefore(this,h),h}error(l,h={}){if(this.source){let{end:o,start:d}=this.rangeBy(h);return this.source.input.error(l,{column:d.column,line:d.line},{column:o.column,line:o.line},h)}return new r(l)}getProxyProcessor(){return{get(l,h){return h==="proxyOf"?l:h==="root"?()=>l.root().toProxy():l[h]},set(l,h,o){return l[h]===o||(l[h]=o,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,h){let o=this.source.start;if(l.index)o=this.positionInside(l.index,h);else if(l.word){h=this.toString();let d=h.indexOf(l.word);d!==-1&&(o=this.positionInside(d,h))}return o}positionInside(l,h){let o=h||this.toString(),d=this.source.start.column,c=this.source.start.line;for(let f=0;f<l;f++)o[f]===`
|
|
44
|
+
`?(d=1,c+=1):d+=1;return{column:d,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let h={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:h.column+1,line:h.line};if(l.word){let d=this.toString(),c=d.indexOf(l.word);c!==-1&&(h=this.positionInside(c,d),o=this.positionInside(c+l.word.length,d))}else l.start?h={column:l.start.column,line:l.start.line}:l.index&&(h=this.positionInside(l.index)),l.end?o={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?o=this.positionInside(l.endIndex):l.index&&(o=this.positionInside(l.index+1));return(o.line<h.line||o.line===h.line&&o.column<=h.column)&&(o={column:h.column+1,line:h.line}),{end:o,start:h}}raw(l,h){return new i().raw(this,l,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let h=this,o=!1;for(let d of l)d===this?o=!0:o?(this.parent.insertAfter(h,d),h=d):this.parent.insertBefore(h,d);o||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,h){let o={},d=h==null;h=h||new Map;let c=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))o[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,h):p);else if(typeof m=="object"&&m.toJSON)o[f]=m.toJSON(null,h);else if(f==="source"){let p=h.get(m.input);p==null&&(p=c,h.set(m.input,c),c++),o[f]={end:m.end,inputId:p,start:m.start}}else o[f]=m}return d&&(o.inputs=[...h.keys()].map(f=>f.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=s){l.stringify&&(l=l.stringify);let h="";return l(this,o=>{h+=o}),h}warn(l,h,o){let d={node:this};for(let c in o)d[c]=o[c];return l.warn(h,d)}get proxyOf(){return this}}return vr=n,n.default=n,vr}var Sr,mi;function Pt(){if(mi)return Sr;mi=1;let e=Lt();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Sr=t,t.default=t,Sr}var Cr,gi;function Qa(){if(gi)return Cr;gi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Cr={nanoid:(i=21)=>{let s="",a=i;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(i,s=21)=>(a=s)=>{let n="",u=a;for(;u--;)n+=i[Math.random()*i.length|0];return n}},Cr}var Er,yi;function xn(){if(yi)return Er;yi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{existsSync:r,readFileSync:i}=ge,{dirname:s,join:a}=ge;function n(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class u{constructor(h,o){if(o.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let d=o.map?o.map.prev:void 0,c=this.loadMap(o.from,d);!this.mapFile&&o.from&&(this.mapFile=o.from),this.mapFile&&(this.root=s(this.mapFile)),c&&(this.text=c)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(h){let o=/^data:application\/json;charset=utf-?8;base64,/,d=/^data:application\/json;base64,/,c=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(c.test(h)||f.test(h))return decodeURIComponent(h.substr(RegExp.lastMatch.length));if(o.test(h)||d.test(h))return n(h.substr(RegExp.lastMatch.length));let m=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let o=h.match(/\/\*\s*# sourceMappingURL=/gm);if(!o)return;let d=h.lastIndexOf(o.pop()),c=h.indexOf("*/",d);d>-1&&c>-1&&(this.annotation=this.getAnnotationURL(h.substring(d,c)))}loadFile(h){if(this.root=s(h),r(h))return this.mapFile=h,i(h,"utf-8").toString().trim()}loadMap(h,o){if(o===!1)return!1;if(o){if(typeof o=="string")return o;if(typeof o=="function"){let d=o(h);if(d){let c=this.loadFile(d);if(!c)throw new Error("Unable to load previous source map: "+d.toString());return c}}else{if(o instanceof e)return t.fromSourceMap(o).toString();if(o instanceof t)return o.toString();if(this.isMap(o))return JSON.stringify(o);throw new Error("Unsupported previous source map format: "+o.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let d=this.annotation;return h&&(d=a(s(h),d)),this.loadFile(d)}}}startWith(h,o){return h?h.substr(0,o.length)===o:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Er=u,u.default=u,Er}var Rr,wi;function Ft(){if(wi)return Rr;wi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{fileURLToPath:r,pathToFileURL:i}=ge,{isAbsolute:s,resolve:a}=ge,{nanoid:n}=Qa(),u=ge,l=fs(),h=xn(),o=Symbol("fromOffsetCache"),d=!!(e&&t),c=!!(a&&s);class f{constructor(p,g={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!c||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=a(g.from)),c&&d){let S=new h(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+n(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,S,b={}){let y,w,v;if(g&&typeof g=="object"){let R=g,O=S;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);g=I.line,S=I.col}else g=R.line,S=R.column;if(typeof O.offset=="number"){let I=this.fromOffset(O.offset);w=I.line,v=I.col}else w=O.line,v=O.column}else if(!S){let R=this.fromOffset(g);g=R.line,S=R.col}let C=this.origin(g,S,w,v);return C?y=new l(p,C.endLine===void 0?C.line:{column:C.column,line:C.line},C.endLine===void 0?C.column:{column:C.endColumn,line:C.endLine},C.source,C.file,b.plugin):y=new l(p,w===void 0?g:{column:S,line:g},w===void 0?S:{column:v,line:w},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:w,line:g,source:this.css},this.file&&(i&&(y.input.url=i(this.file).toString()),y.input.file=this.file),y}fromOffset(p){let g,S;if(this[o])S=this[o];else{let y=this.css.split(`
|
|
45
|
+
`);S=new Array(y.length);let w=0;for(let v=0,C=y.length;v<C;v++)S[v]=w,w+=y[v].length+1;this[o]=S}g=S[S.length-1];let b=0;if(p>=g)b=S.length-1;else{let y=S.length-2,w;for(;b<y;)if(w=b+(y-b>>1),p<S[w])y=w-1;else if(p>=S[w+1])b=w+1;else{b=w;break}}return{col:p-S[b]+1,line:b+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:a(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,S,b){if(!this.map)return!1;let y=this.map.consumer(),w=y.originalPositionFor({column:g,line:p});if(!w.source)return!1;let v;typeof S=="number"&&(v=y.originalPositionFor({column:b,line:S}));let C;s(w.source)?C=i(w.source):C=new URL(w.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let R={column:w.column,endColumn:v&&v.column,endLine:v&&v.line,line:w.line,url:C.toString()};if(C.protocol==="file:")if(r)R.file=r(C);else throw new Error("file: protocol is not available in this PostCSS build");let O=y.sourceContentFor(w.source);return O&&(R.source=O),R}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Rr=f,f.default=f,u&&u.registerInput&&u.registerInput(f),Rr}var xr,bi;function Mn(){if(bi)return xr;bi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ge,{dirname:r,relative:i,resolve:s,sep:a}=ge,{pathToFileURL:n}=ge,u=Ft(),l=!!(e&&t),h=!!(r&&s&&i&&a);class o{constructor(c,f,m,p){this.stringify=c,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let c;this.isInline()?c="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?c=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?c=this.mapOpts.annotation(this.opts.to,this.root):c=this.outputFile()+".map";let f=`
|
|
46
|
+
`;this.css.includes(`\r
|
|
47
|
+
`)&&(f=`\r
|
|
48
|
+
`),this.css+=f+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let f=this.toUrl(this.path(c.file)),m=c.root||r(c.file),p;this.mapOpts.sourcesContent===!1?(p=new e(c.text),p.sourcesContent&&(p.sourcesContent=null)):p=c.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let f=this.root.nodes.length-1;f>=0;f--)c=this.root.nodes[f],c.type==="comment"&&c.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),h&&l&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,f=>{c+=f}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=t.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,y,w)=>{if(this.css+=b,y&&w!=="end"&&(p.generated.line=c,p.generated.column=f-1,y.source&&y.source.start?(p.source=this.sourcePath(y),p.original.line=y.source.start.line,p.original.column=y.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=b.match(/\n/g),g?(c+=g.length,S=b.lastIndexOf(`
|
|
49
|
+
`),f=b.length-S):f+=b.length,y&&w!=="start"){let v=y.parent||{raws:{}};(!(y.type==="decl"||y.type==="atrule"&&!y.nodes)||y!==v.last||v.raws.semicolon)&&(y.source&&y.source.end?(p.source=this.sourcePath(y),p.original.line=y.source.end.line,p.original.column=y.source.end.column-1,p.generated.line=c,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c<"u"&&c!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let f=this.memoizedPaths.get(c);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let p=i(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let f=c.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let c=new u(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let f=this.memoizedFileURLs.get(c);if(f)return f;if(n){let m=n(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let f=this.memoizedURLs.get(c);if(f)return f;a==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return xr=o,xr}var Mr,vi;function Ut(){if(vi)return Mr;vi=1;let e=Lt();class t extends e{constructor(i){super(i),this.type="comment"}}return Mr=t,t.default=t,Mr}var Nr,Si;function _e(){if(Si)return Nr;Si=1;let{isClean:e,my:t}=ds(),r=Pt(),i=Ut(),s=Lt(),a,n,u,l;function h(c){return c.map(f=>(f.nodes&&(f.nodes=h(f.nodes)),delete f.source,f))}function o(c){if(c[e]=!1,c.proxyOf.nodes)for(let f of c.proxyOf.nodes)o(f)}class d extends s{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?p=>f[m]((g,...S)=>p(g.toProxy(),...S)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let b of g)this.proxyOf.nodes.splice(p+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],p<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let y of S)this.proxyOf.nodes.splice(p,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<=b&&(this.indexes[y]=b+S.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=h(a(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new n(f)];else if(f.name)f=[new u(f)];else if(f.text)f=[new i(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||d.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&o(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=c=>{a=c},d.registerRule=c=>{n=c},d.registerAtRule=c=>{u=c},d.registerRoot=c=>{l=c},Nr=d,d.default=d,d.rebuild=c=>{c.type==="atrule"?Object.setPrototypeOf(c,u.prototype):c.type==="rule"?Object.setPrototypeOf(c,n.prototype):c.type==="decl"?Object.setPrototypeOf(c,r.prototype):c.type==="comment"?Object.setPrototypeOf(c,i.prototype):c.type==="root"&&Object.setPrototypeOf(c,l.prototype),c[t]=!0,c.nodes&&c.nodes.forEach(f=>{d.rebuild(f)})},Nr}var Or,Ci;function ps(){if(Ci)return Or;Ci=1;let e=_e(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s},i.registerProcessor=s=>{r=s},Or=i,i.default=i,Or}var Ir,Ei;function Nn(){if(Ei)return Ir;Ei=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let s=i.node.rangeBy(i);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in i)this[s]=i[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ir=e,e.default=e,Ir}var Dr,Ri;function ms(){if(Ri)return Dr;Ri=1;let e=Nn();class t{constructor(i,s,a){this.processor=i,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(i,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,s);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return Dr=t,t.default=t,Dr}var Ar,xi;function Za(){if(xi)return Ar;xi=1;const e=39,t=34,r=92,i=47,s=10,a=32,n=12,u=9,l=13,h=91,o=93,d=40,c=41,f=123,m=125,p=59,g=42,S=58,b=64,y=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return Ar=function(O,I={}){let M=O.css.valueOf(),q=I.ignoreErrors,_,E,ae,se,$,k,Y,ee,Q,j,Re=M.length,N=0,we=[],fe=[];function Ve(){return N}function ie(L){throw O.error("Unclosed "+L,N)}function de(){return fe.length===0&&N>=Re}function Ie(L){if(fe.length)return fe.pop();if(N>=Re)return;let te=L?L.ignoreUnclosed:!1;switch(_=M.charCodeAt(N),_){case s:case a:case u:case l:case n:{E=N;do E+=1,_=M.charCodeAt(E);while(_===a||_===s||_===u||_===l||_===n);j=["space",M.slice(N,E)],N=E-1;break}case h:case o:case f:case m:case S:case p:case c:{let V=String.fromCharCode(_);j=[V,V,N];break}case d:{if(ee=we.length?we.pop()[1]:"",Q=M.charCodeAt(N+1),ee==="url"&&Q!==e&&Q!==t&&Q!==a&&Q!==s&&Q!==u&&Q!==n&&Q!==l){E=N;do{if(k=!1,E=M.indexOf(")",E+1),E===-1)if(q||te){E=N;break}else ie("bracket");for(Y=E;M.charCodeAt(Y-1)===r;)Y-=1,k=!k}while(k);j=["brackets",M.slice(N,E+1),N,E],N=E}else E=M.indexOf(")",N+1),se=M.slice(N,E+1),E===-1||v.test(se)?j=["(","(",N]:(j=["brackets",se,N,E],N=E);break}case e:case t:{ae=_===e?"'":'"',E=N;do{if(k=!1,E=M.indexOf(ae,E+1),E===-1)if(q||te){E=N+1;break}else ie("string");for(Y=E;M.charCodeAt(Y-1)===r;)Y-=1,k=!k}while(k);j=["string",M.slice(N,E+1),N,E],N=E;break}case b:{y.lastIndex=N+1,y.test(M),y.lastIndex===0?E=M.length-1:E=y.lastIndex-2,j=["at-word",M.slice(N,E+1),N,E],N=E;break}case r:{for(E=N,$=!0;M.charCodeAt(E+1)===r;)E+=1,$=!$;if(_=M.charCodeAt(E+1),$&&_!==i&&_!==a&&_!==s&&_!==u&&_!==l&&_!==n&&(E+=1,C.test(M.charAt(E)))){for(;C.test(M.charAt(E+1));)E+=1;M.charCodeAt(E+1)===a&&(E+=1)}j=["word",M.slice(N,E+1),N,E],N=E;break}default:{_===i&&M.charCodeAt(N+1)===g?(E=M.indexOf("*/",N+2)+1,E===0&&(q||te?E=M.length:ie("comment")),j=["comment",M.slice(N,E+1),N,E],N=E):(w.lastIndex=N+1,w.test(M),w.lastIndex===0?E=M.length-1:E=w.lastIndex-2,j=["word",M.slice(N,E+1),N,E],we.push(j),N=E);break}}return N++,j}function xe(L){fe.push(L)}return{back:xe,endOfFile:de,nextToken:Ie,position:Ve}},Ar}var Tr,Mi;function gs(){if(Mi)return Tr;Mi=1;let e=_e();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Tr=t,t.default=t,e.registerAtRule(t),Tr}var _r,Ni;function rt(){if(Ni)return _r;Ni=1;let e=_e(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,n,u){let l=super.normalize(a);if(n){if(u==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let h of l)h.raws.before=n.raws.before}return l}removeChild(a,n){let u=this.index(a);return!n&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s},i.registerProcessor=s=>{r=s},_r=i,i.default=i,e.registerRoot(i),_r}var kr,Oi;function On(){if(Oi)return kr;Oi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
50
|
+
`," "];return e.split(t,r)},split(t,r,i){let s=[],a="",n=!1,u=0,l=!1,h="",o=!1;for(let d of t)o?o=!1:d==="\\"?o=!0:l?d===h&&(l=!1):d==='"'||d==="'"?(l=!0,h=d):d==="("?u+=1:d===")"?u>0&&(u-=1):u===0&&r.includes(d)&&(n=!0),n?(a!==""&&s.push(a.trim()),a="",n=!1):a+=d;return(i||a!=="")&&s.push(a.trim()),s}};return kr=e,e.default=e,kr}var Lr,Ii;function ys(){if(Ii)return Lr;Ii=1;let e=_e(),t=On();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,n=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(n)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Pr,Di;function Ka(){if(Di)return Pr;Di=1;let e=Pt(),t=Za(),r=Ut(),i=gs(),s=rt(),a=ys();const n={empty:!0,space:!0};function u(h){for(let o=h.length-1;o>=0;o--){let d=h[o],c=d[3]||d[2];if(c)return c}}class l{constructor(o){this.input=o,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let d=new i;d.name=o[1].slice(1),d.name===""&&this.unnamedAtrule(d,o),this.init(d,o[2]);let c,f,m,p=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),c=o[0],c==="("||c==="["?b.push(c==="("?")":"]"):c==="{"&&b.length>0?b.push("}"):c===b[b.length-1]&&b.pop(),b.length===0)if(c===";"){d.source.end=this.getPosition(o[2]),d.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(S.length>0){for(m=S.length-1,f=S[m];f&&f[0]==="space";)f=S[--m];f&&(d.source.end=this.getPosition(f[3]||f[2]),d.source.end.offset++)}this.end(o);break}else S.push(o);else S.push(o);if(this.tokenizer.endOfFile()){p=!0;break}}d.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(d.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(d,"params",S),p&&(o=S[S.length-1],d.source.end=this.getPosition(o[3]||o[2]),d.source.end.offset++,this.spaces=d.raws.between,d.raws.between="")):(d.raws.afterName="",d.params=""),g&&(d.nodes=[],this.current=d)}checkMissedSemicolon(o){let d=this.colon(o);if(d===!1)return;let c=0,f;for(let m=d-1;m>=0&&(f=o[m],!(f[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(o){let d=0,c,f,m;for(let[p,g]of o.entries()){if(c=g,f=c[0],f==="("&&(d+=1),f===")"&&(d-=1),d===0&&f===":")if(!m)this.doubleColon(c);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=c}return!1}comment(o){let d=new r;this.init(d,o[2]),d.source.end=this.getPosition(o[3]||o[2]),d.source.end.offset++;let c=o[1].slice(2,-2);if(/^\s*$/.test(c))d.text="",d.raws.left=c,d.raws.right="";else{let f=c.match(/^(\s*)([^]*\S)(\s*)$/);d.text=f[2],d.raws.left=f[1],d.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(o,d){let c=new e;this.init(c,o[0][2]);let f=o[o.length-1];for(f[0]===";"&&(this.semicolon=!0,o.pop()),c.source.end=this.getPosition(f[3]||f[2]||u(o)),c.source.end.offset++;o[0][0]!=="word";)o.length===1&&this.unknownWord(o),c.raws.before+=o.shift()[1];for(c.source.start=this.getPosition(o[0][2]),c.prop="";o.length;){let b=o[0][0];if(b===":"||b==="space"||b==="comment")break;c.prop+=o.shift()[1]}c.raws.between="";let m;for(;o.length;)if(m=o.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;o.length&&(g=o[0][0],!(g!=="space"&&g!=="comment"));)p.push(o.shift());this.precheckMissedSemicolon(o);for(let b=o.length-1;b>=0;b--){if(m=o[b],m[1].toLowerCase()==="!important"){c.important=!0;let y=this.stringFrom(o,b);y=this.spacesFromEnd(o)+y,y!==" !important"&&(c.raws.important=y);break}else if(m[1].toLowerCase()==="important"){let y=o.slice(0),w="";for(let v=b;v>0;v--){let C=y[v][0];if(w.trim().indexOf("!")===0&&C!=="space")break;w=y.pop()[1]+w}w.trim().indexOf("!")===0&&(c.important=!0,c.raws.important=w,o=y)}if(m[0]!=="space"&&m[0]!=="comment")break}o.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(c.raws.between+=p.map(b=>b[1]).join(""),p=[]),this.raw(c,"value",p.concat(o),d),c.value.includes(":")&&!d&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let d=new a;this.init(d,o[2]),d.selector="",d.raws.between="",this.current=d}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let d=this.current.nodes[this.current.nodes.length-1];d&&d.type==="rule"&&!d.raws.ownSemicolon&&(d.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(o){let d=this.input.fromOffset(o);return{column:d.col,line:d.line,offset:o}}init(o,d){this.current.push(o),o.source={input:this.input,start:this.getPosition(d)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let d=!1,c=null,f=!1,m=null,p=[],g=o[1].startsWith("--"),S=[],b=o;for(;b;){if(c=b[0],S.push(b),c==="("||c==="[")m||(m=b),p.push(c==="("?")":"]");else if(g&&f&&c==="{")m||(m=b),p.push("}");else if(p.length===0)if(c===";")if(f){this.decl(S,g);return}else break;else if(c==="{"){this.rule(S);return}else if(c==="}"){this.tokenizer.back(S.pop()),d=!0;break}else c===":"&&(f=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(d=!0),p.length>0&&this.unclosedBracket(m),d&&f){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,d,c,f){let m,p,g=c.length,S="",b=!0,y,w;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!f?b=!1:p==="comment"?(w=c[v-1]?c[v-1][0]:"empty",y=c[v+1]?c[v+1][0]:"empty",!n[w]&&!n[y]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let v=c.reduce((C,R)=>C+R[1],"");o.raws[d]={raw:v,value:S}}o[d]=S}rule(o){o.pop();let d=new a;this.init(d,o[0][2]),d.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(d,"selector",o),this.current=d}spacesAndCommentsFromEnd(o){let d,c="";for(;o.length&&(d=o[o.length-1][0],!(d!=="space"&&d!=="comment"));)c=o.pop()[1]+c;return c}spacesAndCommentsFromStart(o){let d,c="";for(;o.length&&(d=o[0][0],!(d!=="space"&&d!=="comment"));)c+=o.shift()[1];return c}spacesFromEnd(o){let d,c="";for(;o.length&&(d=o[o.length-1][0],d==="space");)c=o.pop()[1]+c;return c}stringFrom(o,d){let c="";for(let f=d;f<o.length;f++)c+=o[f][1];return o.splice(d,o.length-d),c}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word",{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,d){throw this.input.error("At-rule without name",{offset:d[2]},{offset:d[2]+d[1].length})}}return Pr=l,Pr}var Fr,Ai;function ws(){if(Ai)return Fr;Ai=1;let e=_e(),t=Ka(),r=Ft();function i(s,a){let n=new r(s,a),u=new t(n);try{u.parse()}catch(l){throw l}return u.root}return Fr=i,i.default=i,e.registerParse(i),Fr}var Ur,Ti;function In(){if(Ti)return Ur;Ti=1;let{isClean:e,my:t}=ds(),r=Mn(),i=kt(),s=_e(),a=ps(),n=ms(),u=ws(),l=rt();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},d={Once:!0,postcssPlugin:!0,prepare:!0},c=0;function f(y){return typeof y=="object"&&typeof y.then=="function"}function m(y){let w=!1,v=h[y.type];return y.type==="decl"?w=y.prop.toLowerCase():y.type==="atrule"&&(w=y.name.toLowerCase()),w&&y.append?[v,v+"-"+w,c,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:y.append?[v,c,v+"Exit"]:[v,v+"Exit"]}function p(y){let w;return y.type==="document"?w=["Document",c,"DocumentExit"]:y.type==="root"?w=["Root",c,"RootExit"]:w=m(y),{eventIndex:0,events:w,iterator:0,node:y,visitorIndex:0,visitors:[]}}function g(y){return y[e]=!1,y.nodes&&y.nodes.forEach(w=>g(w)),y}let S={};class b{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=g(v);else if(v instanceof b||v instanceof n)R=g(v.root),v.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let O=u;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(v,C)}catch(I){this.processed=!0,this.error=I}R&&!R[t]&&s.rebuild(R)}this.result=new n(w,R,C),this.helpers={...S,postcss:S,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...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(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!o[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(f(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=!0;let v=[p(w)];for(;v.length>0;){let C=this.visitTick(v);if(f(C))try{await C}catch(R){let O=v[v.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return f(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=i;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 w of this.plugins){let v=this.runOnRoot(w);if(f(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let O;try{O=R(v,this.helpers)}catch(I){throw this.handleError(I,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(f(O))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[I,M]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=I;try{return M(C.toProxy(),this.helpers)}catch(q){throw this.handleError(q,C)}}if(v.iterator!==0){let I=v.iterator,M;for(;M=C.nodes[C.indexes[I]];)if(C.indexes[I]+=1,!M[e]){M[e]=!0,w.push(p(M));return}v.iterator=0,delete C.indexes[I]}let O=v.events;for(;v.eventIndex<O.length;){let I=O[v.eventIndex];if(v.eventIndex+=1,I===c){C.nodes&&C.nodes.length&&(C[e]=!0,v.iterator=C.getIterator());return}else if(this.listeners[I]){v.visitors=this.listeners[I];return}}w.pop()}walkSync(w){w[e]=!0;let v=m(w);for(let C of v)if(C===c)w.nodes&&w.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=y=>{S=y},Ur=b,b.default=b,l.registerLazyResult(b),a.registerLazyResult(b),Ur}var Br,_i;function el(){if(_i)return Br;_i=1;let e=Mn(),t=kt(),r=ws();const i=ms();class s{constructor(n,u,l){u=u.toString(),this.stringified=!1,this._processor=n,this._css=u,this._opts=l,this._map=void 0;let h,o=t;this.result=new i(this._processor,h,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let c=new e(o,h,this._opts,u);if(c.isMap()){let[f,m]=c.generate();f&&(this.result.css=f),m&&(this.result.map=m)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(n){return this.async().catch(n)}finally(n){return this.async().then(n,n)}sync(){if(this.error)throw this.error;return this.result}then(n,u){return this.async().then(n,u)}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 n,u=r;try{n=u(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=n,n}get[Symbol.toStringTag](){return"NoWorkResult"}}return Br=s,s.default=s,Br}var $r,ki;function tl(){if(ki)return $r;ki=1;let e=el(),t=In(),r=ps(),i=rt();class s{constructor(n=[]){this.version="8.4.38",this.plugins=this.normalize(n)}normalize(n){let u=[];for(let l of n)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))u=u.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)u.push(l);else if(typeof l=="function")u.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return u}process(n,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new e(this,n,u):new t(this,n,u)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}}return $r=s,s.default=s,i.registerProcessor(s),r.registerProcessor(s),$r}var Wr,Li;function rl(){if(Li)return Wr;Li=1;let e=Pt(),t=xn(),r=Ut(),i=gs(),s=Ft(),a=rt(),n=ys();function u(l,h){if(Array.isArray(l))return l.map(c=>u(c));let{inputs:o,...d}=l;if(o){h=[];for(let c of o){let f={...c,__proto__:s.prototype};f.map&&(f.map={...f.map,__proto__:t.prototype}),h.push(f)}}if(d.nodes&&(d.nodes=l.nodes.map(c=>u(c,h))),d.source){let{inputId:c,...f}=d.source;d.source=f,c!=null&&(d.source.input=h[c])}if(d.type==="root")return new a(d);if(d.type==="decl")return new e(d);if(d.type==="rule")return new n(d);if(d.type==="comment")return new r(d);if(d.type==="atrule")return new i(d);throw new Error("Unknown node type: "+l.type)}return Wr=u,u.default=u,Wr}var zr,Pi;function sl(){if(Pi)return zr;Pi=1;let e=fs(),t=Pt(),r=In(),i=_e(),s=tl(),a=kt(),n=rl(),u=ps(),l=Nn(),h=Ut(),o=gs(),d=ms(),c=Ft(),f=ws(),m=On(),p=ys(),g=rt(),S=Lt();function b(...y){return y.length===1&&Array.isArray(y[0])&&(y=y[0]),new s(y)}return b.plugin=function(w,v){let C=!1;function R(...I){console&&console.warn&&!C&&(C=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide:
|
|
51
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),yt.LANG&&yt.LANG.startsWith("cn")&&console.warn(w+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
52
|
+
https://www.w3ctech.com/topic/2226`));let M=v(...I);return M.postcssPlugin=w,M.postcssVersion=new s().version,M}let O;return Object.defineProperty(R,"postcss",{get(){return O||(O=R()),O}}),R.process=function(I,M,q){return b([R(q)]).process(I,M)},R},b.stringify=a,b.parse=f,b.fromJSON=n,b.list=m,b.comment=y=>new h(y),b.atRule=y=>new o(y),b.decl=y=>new t(y),b.rule=y=>new p(y),b.root=y=>new g(y),b.document=y=>new u(y),b.CssSyntaxError=e,b.Declaration=t,b.Container=i,b.Processor=s,b.Document=u,b.Comment=h,b.Warning=l,b.AtRule=o,b.Result=d,b.Input=c,b.Rule=p,b.Root=g,b.Node=S,r.registerPostcss(b),zr=b,b.default=b,zr}var il=sl();const J=Ga(il);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;var U=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(U||{});function nl(e){const t={},r=/;(?![^(]*\))/g,i=/:(.+)/,s=/\/\*.*?\*\//g;return e.replace(s,"").split(r).forEach(function(a){if(a){const n=a.split(i);n.length>1&&(t[Jr(n[0].trim())]=n[1].trim())}}),t}function Fi(e){const t=[];for(const r in e){const i=e[r];if(typeof i!="string")continue;const s=ul(r);t.push(`${s}: ${i};`)}return t.join(" ")}const ol=/-([a-z])/g,al=/^--[a-zA-Z0-9-]+$/,Jr=e=>al.test(e)?e:e.replace(ol,(t,r)=>r?r.toUpperCase():""),ll=/\B([A-Z])/g,ul=e=>e.replace(ll,"-$1").toLowerCase();class ye{constructor(...t){D(this,"parentElement",null),D(this,"parentNode",null),D(this,"ownerDocument"),D(this,"firstChild",null),D(this,"lastChild",null),D(this,"previousSibling",null),D(this,"nextSibling",null),D(this,"ELEMENT_NODE",1),D(this,"TEXT_NODE",3),D(this,"nodeType"),D(this,"nodeName"),D(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ye){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class bs extends ye{constructor(...t){super(t),D(this,"nodeType",9),D(this,"nodeName","#document"),D(this,"compatMode","CSS1Compat"),D(this,"RRNodeType",U.Document),D(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===U.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===U.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===U.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===U.Element||r===U.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=vs(this,t);return i.parentElement=null,i}insertBefore(t,r){const i=t.RRNodeType;if((i===U.Element||i===U.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===U.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=kn(this,t,r);return s.parentElement=null,s}removeChild(t){return Ln(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const i=this.createDocumentType("html",r,"");this.open(),this.appendChild(i)}}createDocument(t,r,i){return new bs}createDocumentType(t,r,i){const s=new Dn(t,r,i);return s.ownerDocument=this,s}createElement(t){const r=new Bt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new An(t);return r.ownerDocument=this,r}createComment(t){const r=new Tn(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new _n(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class Dn extends ye{constructor(t,r,i){super(),D(this,"nodeType",10),D(this,"RRNodeType",U.DocumentType),D(this,"name"),D(this,"publicId"),D(this,"systemId"),D(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}}class Bt extends ye{constructor(t){super(),D(this,"nodeType",1),D(this,"RRNodeType",U.Element),D(this,"tagName"),D(this,"attributes",{}),D(this,"shadowRoot",null),D(this,"scrollLeft"),D(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new fl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?nl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(i,s,a)=>{if(r.test(i))return;const n=Jr(i);s?t[n]=s:delete t[n],a==="important"&&(t[n]+=" !important"),this.attributes.style=Fi(t)},t.removeProperty=i=>{if(r.test(i))return"";const s=Jr(i),a=t[s]||"";return delete t[s],this.attributes.style=Fi(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,i){this.setAttribute(r,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return vs(this,t)}insertBefore(t,r){return kn(this,t,r)}removeChild(t){return Ln(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class cl extends Bt{constructor(){super(...arguments),D(this,"currentTime"),D(this,"volume"),D(this,"paused"),D(this,"muted"),D(this,"playbackRate"),D(this,"loop")}attachShadow(t){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 hl extends Bt{constructor(){super(...arguments),D(this,"tagName","DIALOG"),D(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 An extends ye{constructor(t){super(),D(this,"nodeType",3),D(this,"nodeName","#text"),D(this,"RRNodeType",U.Text),D(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Tn extends ye{constructor(t){super(),D(this,"nodeType",8),D(this,"nodeName","#comment"),D(this,"RRNodeType",U.Comment),D(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class _n extends ye{constructor(t){super(),D(this,"nodeName","#cdata-section"),D(this,"nodeType",4),D(this,"RRNodeType",U.CDATA),D(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class fl{constructor(t,r){if(D(this,"onChange"),D(this,"classes",[]),D(this,"add",(...i)=>{for(const s of i){const a=String(s);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),D(this,"remove",(...i)=>{this.classes=this.classes.filter(s=>i.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=r}}function vs(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function kn(e,t,r){if(!r)return vs(e,t);if(r.parentNode!==e)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 t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Ln(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const Qr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},dl={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 be=null;function Et(e,t,r,i=t.mirror||t.ownerDocument.mirror){e=pl(e,t,r,i),Pn(e,t,r,i),ml(e,t,r)}function pl(e,t,r,i){var s;if(r.afterAppend&&!be&&(be=new WeakSet,setTimeout(()=>{be=null},0)),!Ss(e,t)){const a=Rt(t,r.mirror,i);(s=e.parentNode)==null||s.replaceChild(a,e),e=a}switch(t.RRNodeType){case U.Document:{if(!Fe(e,t,r.mirror,i)){const a=i.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),be?.add(e))}break}case U.Element:{const a=e,n=t;switch(n.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;Et(u,t.contentDocument,r,i);break}}n.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Pn(a.shadowRoot,n.shadowRoot,r,i)),gl(a,n,i);break}}return e}function ml(e,t,r){var i;switch(t.RRNodeType){case U.Document:{const s=t.scrollData;s&&r.applyScroll(s,!0);break}case U.Element:{const s=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const n=e,u=a;u.paused!==void 0&&(u.paused?n.pause():n.play()),u.muted!==void 0&&(n.muted=u.muted),u.volume!==void 0&&(n.volume=u.volume),u.currentTime!==void 0&&(n.currentTime=u.currentTime),u.playbackRate!==void 0&&(n.playbackRate=u.playbackRate),u.loop!==void 0&&(n.loop=u.loop);break}case"CANVAS":{const n=t;if(n.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const l=s.getContext("2d");l&&l.drawImage(u,0,0,u.width,u.height)},u.src=n.rr_dataURL}n.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const n=s.sheet;n&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,n));break}case"DIALOG":{const n=s,u=a,l=n.open,h=n.matches("dialog:modal"),o=u.open,d=u.isModal,c=h!==d,f=l!==o;if((c||l&&f)&&n.close(),o&&(f||c))try{d?n.showModal():n.show()}catch(m){console.warn(m)}break}}break}case U.Text:case U.Comment:case U.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}be?.has(e)&&(be.delete(e),(i=r.afterAppend)==null||i.call(r,e,r.mirror.getId(e)))}function gl(e,t,r){const i=e.attributes,s=t.attributes;for(const a in s){const n=s[a],u=r.getMeta(t);if(u?.isSVG&&Qr[a])e.setAttributeNS(Qr[a],a,n);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const h=e.getContext("2d");h&&h.drawImage(l,0,0,l.width,l.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,n)}catch(l){console.warn(l)}}}for(const{name:a}of Array.from(i))a in s||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Pn(e,t,r,i){const s=Array.from(e.childNodes),a=t.childNodes;if(s.length===0&&a.length===0)return;let n=0,u=s.length-1,l=0,h=a.length-1,o=s[n],d=s[u],c=a[l],f=a[h],m,p;for(;n<=u&&l<=h;)if(o===void 0)o=s[++n];else if(d===void 0)d=s[--u];else if(Fe(o,c,r.mirror,i))o=s[++n],c=a[++l];else if(Fe(d,f,r.mirror,i))d=s[--u],f=a[--h];else if(Fe(o,f,r.mirror,i)){try{e.insertBefore(o,d.nextSibling)}catch(b){console.warn(b)}o=s[++n],f=a[--h]}else if(Fe(d,c,r.mirror,i)){try{e.insertBefore(d,o)}catch(b){console.warn(b)}d=s[--u],c=a[++l]}else{if(!m){m={};for(let y=n;y<=u;y++){const w=s[y];w&&r.mirror.hasNode(w)&&(m[r.mirror.getId(w)]=y)}}p=m[i.getId(c)];const b=s[p];if(p!==void 0&&b&&Fe(b,c,r.mirror,i)){try{e.insertBefore(b,o)}catch(y){console.warn(y)}s[p]=void 0}else{const y=Rt(c,r.mirror,i);e.nodeName==="#document"&&o&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&o.nodeType===o.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&o.nodeType===o.ELEMENT_NODE)&&(e.removeChild(o),r.mirror.removeNodeFromMap(o),o=s[++n]);try{e.insertBefore(y,o||null)}catch(w){console.warn(w)}}c=a[++l]}if(n>u){const b=a[h+1];let y=null;for(b&&(y=r.mirror.getNode(i.getId(b)));l<=h;++l){const w=Rt(a[l],r.mirror,i);try{e.insertBefore(w,y)}catch(v){console.warn(v)}}}else if(l>h)for(;n<=u;n++){const b=s[n];if(!(!b||b.parentNode!==e))try{e.removeChild(b),r.mirror.removeNodeFromMap(b)}catch(y){console.warn(y)}}let g=e.firstChild,S=t.firstChild;for(;g!==null&&S!==null;)Et(g,S,r,i),g=g.nextSibling,S=S.nextSibling}function Rt(e,t,r){const i=r.getId(e),s=r.getMeta(e);let a=null;if(i>-1&&(a=t.getNode(i)),a!==null&&Ss(a,e))return a;switch(e.RRNodeType){case U.Document:a=new Document;break;case U.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case U.Element:{let n=e.tagName.toLowerCase();n=dl[n]||n,s&&"isSVG"in s&&s?.isSVG?a=document.createElementNS(Qr.svg,n):a=document.createElement(e.tagName);break}case U.Text:a=document.createTextNode(e.data);break;case U.Comment:a=document.createComment(e.data);break;case U.CDATA:a=document.createCDATASection(e.data);break}s&&t.add(a,{...s});try{be?.add(a)}catch{}return a}function Ss(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Fe(e,t,r,i){const s=r.getId(e),a=i.getId(t);return s===-1||s!==a?!1:Ss(e,t)}class je extends bs{constructor(t){super(),D(this,"UNSERIALIZED_STARTING_ID",-2),D(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),D(this,"mirror",Ol()),D(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,i){return new je}createDocumentType(t,r,i){const s=new yl(t,r,i);return s.ownerDocument=this,s}createElement(t){const r=t.toUpperCase();let i;switch(r){case"AUDIO":case"VIDEO":i=new wl(r);break;case"IFRAME":i=new Cl(r,this.mirror);break;case"CANVAS":i=new vl(r);break;case"STYLE":i=new Sl(r);break;case"DIALOG":i=new bl(r);break;default:i=new $t(r);break}return i.ownerDocument=this,i}createComment(t){const r=new Rl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new xl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new El(t);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 yl=Dn;class $t extends Bt{constructor(){super(...arguments),D(this,"inputData",null),D(this,"scrollData",null)}}class wl extends cl{}class bl extends hl{}class vl extends $t{constructor(){super(...arguments),D(this,"rr_dataURL",null),D(this,"canvasMutations",[])}getContext(){return null}}class Sl extends $t{constructor(){super(...arguments),D(this,"rules",[])}}class Cl extends $t{constructor(t,r){super(t),D(this,"contentDocument",new je),this.contentDocument.mirror=r}}const El=An,Rl=Tn,xl=_n;function Ml(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Fn(e,t,r,i){let s;switch(e.nodeType){case ue.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?s=i.contentDocument:(s=t,s.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const n=e;s=t.createDocumentType(n.name,n.publicId,n.systemId);break}case ue.ELEMENT_NODE:{const n=e,u=Ml(n);s=t.createElement(u);const l=s;for(const{name:h,value:o}of Array.from(n.attributes))l.attributes[h]=o;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case ue.TEXT_NODE:s=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:s=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:s=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:s=i.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof je&&(a||(a=Un(s,t.unserializedId),r.add(e,a)),t.mirror.add(s,{...a})),s}function Nl(e,t=Va(),r=new je){function i(s,a){const n=Fn(s,r,t,a);if(n!==null)if(a?.nodeName!=="IFRAME"&&s.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a?.appendChild(n),n.parentNode=a,n.parentElement=a),s.nodeName==="IFRAME"){const u=s.contentDocument;u&&i(u,n)}else(s.nodeType===ue.DOCUMENT_NODE||s.nodeType===ue.ELEMENT_NODE||s.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(s.nodeType===ue.ELEMENT_NODE&&s.shadowRoot&&i(s.shadowRoot,n),s.childNodes.forEach(u=>i(u,n)))}return i(e,null),r}function Ol(){return new Il}class Il{constructor(){D(this,"idNodeMap",new Map),D(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){const i=this.getNode(t);if(i){const s=this.nodeMetaMap.get(i);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Un(e,t){switch(e.RRNodeType){case U.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case U.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case U.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case U.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case U.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case U.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const Ui={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ct={},Bn={},Dl=()=>!!globalThis.Zone;function Cs(e){if(ct[e])return ct[e];const t=globalThis[e],r=t.prototype,i=e in Ui?Ui[e]:void 0,s=!!(i&&i.every(u=>{var l,h;return!!((h=(l=Object.getOwnPropertyDescriptor(r,u))==null?void 0:l.get)!=null&&h.toString().includes("[native code]"))})),a=e in Bi?Bi[e]:void 0,n=!!(a&&a.every(u=>{var l;return typeof r[u]=="function"&&((l=r[u])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!Dl())return ct[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);const l=u.contentWindow;if(!l)return t.prototype;const h=l[e].prototype;if(!h)return u.remove(),r;const o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),Bn[e]=()=>u.remove()):u.remove(),ct[e]=h}catch{return r}}const qr={};function he(e,t,r){var i,s;const a=(i=qr[e])==null?void 0:i[r];if(a)return a.call(t);const n=Cs(e),u=(s=Object.getOwnPropertyDescriptor(n,r))==null?void 0:s.get;return u?((qr[e]||(qr[e]={}))[r]=u,u.call(t)):t[r]}const jr={};function $n(e,t,r){const i=`${e}.${String(r)}`;if(jr[i])return jr[i].bind(t);const a=Cs(e)[r];return typeof a!="function"?t[r]:(jr[i]=a,a.bind(t))}function Al(e){return he("Node",e,"ownerDocument")}function Tl(e){return he("Node",e,"childNodes")}function _l(e){return he("Node",e,"parentNode")}function kl(e){return he("Node",e,"parentElement")}function Ll(e){return he("Node",e,"textContent")}function Pl(e){return he("Node",e,"firstChild")}function Fl(e){return he("Node",e,"lastChild")}function Ul(e){return he("Node",e,"nextSibling")}function Bl(e){return he("Node",e,"previousSibling")}function $l(e,t){return $n("Node",e,"contains")(t)}function Wl(e){return $n("Node",e,"getRootNode")()}function zl(e){return!e||!("host"in e)?null:he("ShadowRoot",e,"host")}function ql(e){return e.styleSheets}function jl(e){return!e||!("shadowRoot"in e)?null:he("Element",e,"shadowRoot")}function Vl(e,t){return he("Element",e,"querySelector")(t)}function Gl(e,t){return he("Element",e,"querySelectorAll")(t)}function Wn(){return[Cs("MutationObserver").constructor,Bn.MutationObserver??(()=>{})]}let Ke=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ke=()=>new Date().getTime());function ke(e,t,r){try{if(!(t in e))return()=>{};const i=e[t],s=r(i);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=s,()=>{e[t]=i}}catch{return()=>{}}}const P={ownerDocument:Al,childNodes:Tl,parentNode:_l,parentElement:kl,textContent:Ll,firstChild:Pl,lastChild:Fl,nextSibling:Ul,previousSibling:Bl,contains:$l,getRootNode:Wl,host:zl,styleSheets:ql,shadowRoot:jl,querySelector:Vl,querySelectorAll:Gl,nowTimestamp:Ke,mutationObserverCtor:Wn,patch:ke};function ne(e,t,r=document){const i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}const Ue=`Please stop import mirror directly. Instead of that,\r
|
|
53
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
54
|
+
or you can use record.mirror to access the mirror instance during recording.`;let $i={map:{},getId(){return console.error(Ue),-1},getNode(){return console.error(Ue),null},removeNodeFromMap(){console.error(Ue)},has(){return console.error(Ue),!1},reset(){console.error(Ue)}};typeof window<"u"&&window.Proxy&&window.Reflect&&($i=new Proxy($i,{get(e,t,r){return t==="map"&&console.error(Ue),Reflect.get(e,t,r)}}));function et(e,t,r={}){let i=null,s=0;return function(...a){const n=Date.now();!s&&r.leading===!1&&(s=n);const u=t-(n-s),l=this;u<=0||u>t?(i&&(clearTimeout(i),i=null),s=n,e.apply(l,a)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{s=r.leading===!1?0:Date.now(),i=null,e.apply(l,a)},u))}}function Wt(e,t,r,i,s=window){const a=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,i?r:{set(n){setTimeout(()=>{r.set.call(this,n)},0),a&&a.set&&a.set.call(this,n)}}),()=>Wt(e,t,a||{},!0)}function zn(e){var t,r,i,s;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=P.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((i=P.parentElement(a.body))==null?void 0:i.scrollTop)||((s=a?.body)==null?void 0:s.scrollTop)||0}}function qn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function jn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vn(e){return e?e.nodeType===e.ELEMENT_NODE?e:P.parentElement(e):null}function oe(e,t,r,i){if(!e)return!1;const s=Vn(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||i&&s.closest("."+t)!==null)return!0}else if(Ct(s,t,i))return!0}catch{}return!!(r&&(s.matches(r)||i&&s.closest(r)!==null))}function Hl(e,t){return t.getId(e)!==-1}function Vr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===St}function Gn(e,t){if(Ye(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const i=P.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Gn(i,t):!0}function Zr(e){return!!e.changedTouches}function Hn(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Yl(e){const t={},r=(s,a)=>{const n={value:s,parent:a,children:[]};return t[s.node.id]=n,n},i=[];for(const s of e){const{nextId:a,parentId:n}=s;if(a&&a in t){const u=t[a];if(u.parent){const l=u.parent.children.indexOf(u);u.parent.children.splice(l,0,r(s,u.parent))}else{const l=i.indexOf(u);i.splice(l,0,r(s,null))}continue}if(n in t){const u=t[n];u.children.push(r(s,u));continue}i.push(r(s,null))}return i}function Yn(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Yn(e.children[r],t)}function Qe(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Xn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Jn(e,t){var r,i;const s=(i=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:i.frameElement;if(!s||s===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=s.getBoundingClientRect(),n=Jn(s,t),u=a.height/s.clientHeight;return{x:a.x*n.relativeScale+n.x,y:a.y*n.relativeScale+n.y,relativeScale:u,absoluteScale:n.absoluteScale*u}}function De(e){return e?e instanceof ye&&"shadowRoot"in e?!!e.shadowRoot:!!P.shadowRoot(e):!1}function Ge(e,t){const r=e?.[t[0]];return r?t.length===1?r:Ge(r.cssRules,t.slice(1)):null}function Wi(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Xl(e){const t=new Set,r=[];for(let i=e.length;i--;){const s=e[i];t.has(s.id)||(r.push(s),t.add(s.id))}return r}class Qn{constructor(){x(this,"id",1),x(this,"styleIDMap",new WeakMap),x(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Zn(e){var t;let r=null;return"getRootNode"in e&&((t=P.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&P.host(P.getRootNode(e))&&(r=P.host(P.getRootNode(e))),r}function Jl(e){let t=e,r;for(;r=Zn(t);)t=r;return t}function Ql(e){const t=P.ownerDocument(e);if(!t)return!1;const r=Jl(e);return P.contains(t,r)}function Kn(e){const t=P.ownerDocument(e);return t?P.contains(t,e)||Ql(e):!1}var T=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(T||{}),A=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(A||{}),z=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(z||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ee=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ee||{}),Ne=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ne||{}),W=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(W||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});const zi=(e,t)=>`${e}@${t}`;class Zl{constructor(){x(this,"frozen",!1),x(this,"locked",!1),x(this,"texts",[]),x(this,"attributes",[]),x(this,"attributeMap",new WeakMap),x(this,"removes",[]),x(this,"mapRemoves",[]),x(this,"movedMap",{}),x(this,"addedSet",new Set),x(this,"movedSet",new Set),x(this,"droppedSet",new Set),x(this,"removesSubTreeCache",new Set),x(this,"mutationCb"),x(this,"blockClass"),x(this,"blockSelector"),x(this,"maskTextClass"),x(this,"maskTextSelector"),x(this,"inlineStylesheet"),x(this,"maskInputOptions"),x(this,"maskTextFn"),x(this,"maskInputFn"),x(this,"keepIframeSrcFn"),x(this,"recordCanvas"),x(this,"inlineImages"),x(this,"slimDOMOptions"),x(this,"dataURLOptions"),x(this,"doc"),x(this,"mirror"),x(this,"iframeManager"),x(this,"stylesheetManager"),x(this,"shadowDomManager"),x(this,"canvasManager"),x(this,"processedNodeManager"),x(this,"unattachedDoc"),x(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),x(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet){const f=P.parentNode(c);this.removesSubTreeCache.has(f)&&!this.movedSet.has(f)||this.addedSet.add(c)}let i=null,s=null,a=-1,n=null,u=!1;const l=new Set,h=this.addedSet.values();let o=h.next();for(;this.addedSet.size;){if(i!==null&&this.addedSet.has(P.previousSibling(i)))n=i,i=P.previousSibling(i);else{for(this.addedSet.has(o.value)||(o=h.next()),i=o.value;;){if(s=P.parentNode(i),this.addedSet.has(s)){i=s;continue}break}if(l.has(s))s=null;else if(s){if(Kn(s)?(u=qi(this.droppedSet,s)||this.removesSubTreeCache.has(s),u&&qi(this.movedSet,i)&&(u=!1)):u=!0,this.addedSet.has(P.lastChild(s)))i=P.lastChild(s),n=null;else for(;;){if(n=P.nextSibling(i),this.addedSet.has(n)){i=n;continue}break}if(a=Ye(s)?this.mirror.getId(Zn(i)):this.mirror.getId(s),a===-1&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=P.host(s);a=this.mirror.getId(p)}}}if(this.addedSet.delete(i),!s||a===-1){l.add(i);continue}else if(u){this.droppedSet.add(i);continue}let c=!1;if(i.nodeType===Node.TEXT_NODE){const p=s.tagName;if(p==="TEXTAREA")continue;p==="STYLE"&&r.has(a)&&(c=!0)}let f=n?this.mirror.getId(n):null;for(;f===St;)n=n&&P.nextSibling(n),f=n&&this.mirror.getId(n);if(f===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",n),i=null;continue}const m=We(i,{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=>{Qe(p,this.mirror)&&this.iframeManager.addIframe(p),Xn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),De(i)&&this.shadowDomManager.addShadowRoot(P.shadowRoot(i),this.doc)},onIframeLoad:(p,g)=>{this.iframeManager.attachIframe(p,g),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,g)=>{this.stylesheetManager.attachLinkElement(p,g)},cssCaptured:c});m&&(t.push({parentId:a,nextId:f,node:m}),r.add(m.id))}const d={texts:this.texts.map(c=>{const f=c.node,m=P.parentNode(f);return m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const m=JSON.stringify(c.styleDiff),p=JSON.stringify(c._unchangedStyles);m.length<f.style.length&&(m+p).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.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(d))}),x(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));const i=Array.from(P.childNodes(t),s=>P.textContent(s)||"").join("");r.attributes.value=wt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:bt(t),value:i,maskInputFn:this.maskInputFn})}),x(this,"processMutation",t=>{if(!Vr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=P.textContent(t.target);!oe(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:mn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Vn(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target,i=Ce(r.tagName);let s=t.attributeName,a=t.target.getAttribute(s);if(s==="value"){const u=bt(r);a=wt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:u,value:a,maskInputFn:this.maskInputFn})}if(oe(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let n=this.attributeMap.get(t.target);if(i==="iframe"&&s==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)s="rr_src";else return;if(n||(n={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(t.target,n)),s==="type"&&i==="input"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!pn(i,s))if(n.attributes[s]=dn(this.doc,i,Ce(s),a),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const u=this.unattachedDoc.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const h=r.style.getPropertyValue(l),o=r.style.getPropertyPriority(l);h!==u.style.getPropertyValue(l)||o!==u.style.getPropertyPriority(l)?o===""?n.styleDiff[l]=h:n.styleDiff[l]=[h,o]:n._unchangedStyles[l]=[h,o]}for(const l of Array.from(u.style))r.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(oe(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const i=this.mirror.getId(r),s=Ye(t.target)?this.mirror.getId(P.host(t.target)):this.mirror.getId(t.target);oe(t.target,this.blockClass,this.blockSelector,!1)||Vr(r,this.mirror,this.slimDOMOptions)||!Hl(r,this.mirror)||(this.addedSet.has(r)?(Kr(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||Gn(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[zi(i,s)]?Kr(this.movedSet,r):(this.removes.push({parentId:s,id:i,isShadow:Ye(t.target)&&Xe(t.target)?!0:void 0}),Kl(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),x(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Vr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[zi(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);oe(t,this.blockClass,this.blockSelector,!1)||(P.childNodes(t).forEach(i=>this.genAdds(i)),De(t)&&P.childNodes(P.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t)}))}})}init(t){["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]=t[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 Kr(e,t){e.delete(t),P.childNodes(t).forEach(r=>Kr(e,r))}function Kl(e,t){const r=[e];for(;r.length;){const i=r.pop();t.has(i)||(t.add(i),P.childNodes(i).forEach(s=>r.push(s)))}}function qi(e,t){return e.size===0?!1:eo(e,t)}function eo(e,t){if(e.has(t))return!0;const r=P.parentNode(t);return r?eo(e,r):!1}let Ze;function eu(e){Ze=e}function tu(){Ze=void 0}const B=e=>Ze?(...r)=>{try{return e(...r)}catch(i){if(Ze&&Ze(i)===!0)return;throw i}}:e,Ae=[];function st(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function to(e,t){const r=new Zl;Ae.push(r),r.init(e);const[i,s]=Wn(),a=new i(B(r.processMutations.bind(r)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[a,s]}function ru({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let n=[],u;const l=et(B(d=>{const c=Date.now()-u;e(n.map(f=>(f.timeOffset-=c,f)),d),n=[],u=null}),a),h=B(et(B(d=>{const c=st(d),{clientX:f,clientY:m}=Zr(d)?d.changedTouches[0]:d;u||(u=Ke()),n.push({x:f,y:m,id:i.getId(c),timeOffset:Ke()-u}),l(typeof DragEvent<"u"&&d instanceof DragEvent?A.Drag:d instanceof MouseEvent?A.MouseMove:A.TouchMove)}),s,{trailing:!1})),o=[ne("mousemove",h,r),ne("touchmove",h,r),ne("drag",h,r)];return B(()=>{o.forEach(d=>d())})}function su({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const n=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,u=[];let l=null;const h=o=>d=>{const c=st(d);if(oe(c,i,s,!0))return;let f=null,m=o;if("pointerType"in d){switch(d.pointerType){case"mouse":f=ve.Mouse;break;case"touch":f=ve.Touch;break;case"pen":f=ve.Pen;break}f===ve.Touch?z[o]===z.MouseDown?m="TouchStart":z[o]===z.MouseUp&&(m="TouchEnd"):ve.Pen}else Zr(d)&&(f=ve.Touch);f!==null?(l=f,(m.startsWith("Touch")&&f===ve.Touch||m.startsWith("Mouse")&&f===ve.Mouse)&&(f=null)):z[o]===z.Click&&(f=l,l=null);const p=Zr(d)?d.changedTouches[0]:d;if(!p)return;const g=r.getId(c),{clientX:S,clientY:b}=p;B(e)({type:z[m],id:g,x:S,y:b,...f!==null&&{pointerType:f}})};return Object.keys(z).filter(o=>Number.isNaN(Number(o))&&!o.endsWith("_Departed")&&n[o]!==!1).forEach(o=>{let d=Ce(o);const c=h(o);if(window.PointerEvent)switch(z[o]){case z.MouseDown:case z.MouseUp:d=d.replace("mouse","pointer");break;case z.TouchStart:case z.TouchEnd:return}u.push(ne(d,c,t))}),B(()=>{u.forEach(o=>o())})}function ro({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,sampling:a}){const n=B(et(B(u=>{const l=st(u);if(!l||oe(l,i,s,!0))return;const h=r.getId(l);if(l===t&&t.defaultView){const o=zn(t.defaultView);e({id:h,x:o.left,y:o.top})}else e({id:h,x:l.scrollLeft,y:l.scrollTop})}),a.scroll||100));return ne("scroll",n,t)}function iu({viewportResizeCb:e},{win:t}){let r=-1,i=-1;const s=B(et(B(()=>{const a=qn(),n=jn();(r!==a||i!==n)&&(e({width:Number(n),height:Number(a)}),r=a,i=n)}),200));return ne("resize",s,t)}const nu=["INPUT","TEXTAREA","SELECT"],ji=new WeakMap;function ou({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,ignoreClass:a,ignoreSelector:n,maskInputOptions:u,maskInputFn:l,sampling:h,userTriggeredOnInput:o}){function d(b){let y=st(b);const w=b.isTrusted,v=y&&y.tagName;if(y&&v==="OPTION"&&(y=P.parentElement(y)),!y||!v||nu.indexOf(v)<0||oe(y,i,s,!0)||y.classList.contains(a)||n&&y.matches(n))return;let C=y.value,R=!1;const O=bt(y)||"";O==="radio"||O==="checkbox"?R=y.checked:(u[v.toLowerCase()]||u[O])&&(C=wt({element:y,maskInputOptions:u,tagName:v,type:O,value:C,maskInputFn:l})),c(y,o?{text:C,isChecked:R,userTriggered:w}:{text:C,isChecked:R});const I=y.name;O==="radio"&&I&&R&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==y){const q=M.value;c(M,o?{text:q,isChecked:!R,userTriggered:!1}:{text:q,isChecked:!R})}})}function c(b,y){const w=ji.get(b);if(!w||w.text!==y.text||w.isChecked!==y.isChecked){ji.set(b,y);const v=r.getId(b);B(e)({...y,id:v})}}const m=(h.input==="last"?["change"]:["input","change"]).map(b=>ne(b,B(d),t)),p=t.defaultView;if(!p)return()=>{m.forEach(b=>b())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(b=>Wt(b[0],b[1],{set(){B(d)({target:this,isTrusted:!1})}},!1,p))),B(()=>{m.forEach(b=>b())})}function xt(e){const t=[];function r(i,s){if(ht("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||ht("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||ht("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||ht("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const n=Array.from(i.parentRule.cssRules).indexOf(i);return s.unshift(n),r(i.parentRule,s)}else if(i.parentStyleSheet){const n=Array.from(i.parentStyleSheet.cssRules).indexOf(i);s.unshift(n)}return s}return r(e,t)}function Me(e,t,r){let i,s;return e?(e.ownerNode?i=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:i}):{}}function au({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:B((o,d,c)=>{const[f,m]=c,{id:p,styleId:g}=Me(d,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:f,index:m}]}),o.apply(d,c)})}),i.CSSStyleSheet.prototype.addRule=function(o,d,c=this.cssRules.length){const f=`${o} { ${d} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[f,c])};const a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:B((o,d,c)=>{const[f]=c,{id:m,styleId:p}=Me(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:f}]}),o.apply(d,c)})}),i.CSSStyleSheet.prototype.removeRule=function(o){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[o])};let n;i.CSSStyleSheet.prototype.replace&&(n=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:B((o,d,c)=>{const[f]=c,{id:m,styleId:p}=Me(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:f}),o.apply(d,c)})}));let u;i.CSSStyleSheet.prototype.replaceSync&&(u=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:B((o,d,c)=>{const[f]=c,{id:m,styleId:p}=Me(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:f}),o.apply(d,c)})}));const l={};ft("CSSGroupingRule")?l.CSSGroupingRule=i.CSSGroupingRule:(ft("CSSMediaRule")&&(l.CSSMediaRule=i.CSSMediaRule),ft("CSSConditionRule")&&(l.CSSConditionRule=i.CSSConditionRule),ft("CSSSupportsRule")&&(l.CSSSupportsRule=i.CSSSupportsRule));const h={};return Object.entries(l).forEach(([o,d])=>{h[o]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(h[o].insertRule,{apply:B((c,f,m)=>{const[p,g]=m,{id:S,styleId:b}=Me(f.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:p,index:[...xt(f),g||0]}]}),c.apply(f,m)})}),d.prototype.deleteRule=new Proxy(h[o].deleteRule,{apply:B((c,f,m)=>{const[p]=m,{id:g,styleId:S}=Me(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...xt(f),p]}]}),c.apply(f,m)})})}),B(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,n&&(i.CSSStyleSheet.prototype.replace=n),u&&(i.CSSStyleSheet.prototype.replaceSync=u),Object.entries(l).forEach(([o,d])=>{d.prototype.insertRule=h[o].insertRule,d.prototype.deleteRule=h[o].deleteRule})})}function so({mirror:e,stylesheetManager:t},r){var i,s,a;let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(P.host(r));const u=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(a=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:a.ShadowRoot,l=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!u||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var h;return(h=l.get)==null?void 0:h.call(this)},set(h){var o;const d=(o=l.set)==null?void 0:o.call(this,h);if(n!==null&&n!==-1)try{t.adoptStyleSheets(h,n)}catch{}return d}}),B(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function lu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:s}){const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:B((u,l,h)=>{var o;const[d,c,f]=h;if(r.has(d))return a.apply(l,[d,c,f]);const{id:m,styleId:p}=Me((o=l.parentRule)==null?void 0:o.parentStyleSheet,t,i.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:d,value:c,priority:f},index:xt(l.parentRule)}),u.apply(l,h)})});const n=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:B((u,l,h)=>{var o;const[d]=h;if(r.has(d))return n.apply(l,[d]);const{id:c,styleId:f}=Me((o=l.parentRule)==null?void 0:o.parentStyleSheet,t,i.styleMirror);return(c&&c!==-1||f&&f!==-1)&&e({id:c,styleId:f,remove:{property:d},index:xt(l.parentRule)}),u.apply(l,h)})}),B(()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=n})}function uu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:s,doc:a}){const n=B(l=>et(B(h=>{const o=st(h);if(!o||oe(o,t,r,!0))return;const{currentTime:d,volume:c,muted:f,playbackRate:m,loop:p}=o;e({type:l,id:i.getId(o),currentTime:d,volume:c,muted:f,playbackRate:m,loop:p})}),s.media||500)),u=[ne("play",n(Ne.Play),a),ne("pause",n(Ne.Pause),a),ne("seeked",n(Ne.Seeked),a),ne("volumechange",n(Ne.VolumeChange),a),ne("ratechange",n(Ne.RateChange),a)];return B(()=>{u.forEach(l=>l())})}function cu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const i=[],s=new WeakMap,a=r.FontFace;r.FontFace=function(l,h,o){const d=new a(l,h,o);return s.set(d,{family:l,buffer:typeof h!="string",descriptors:o,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),d};const n=ke(t.fonts,"add",function(u){return function(l){return setTimeout(B(()=>{const h=s.get(l);h&&(e(h),s.delete(l))}),0),u.apply(this,[l])}});return i.push(()=>{r.FontFace=a}),i.push(n),B(()=>{i.forEach(u=>u())})}function hu(e){const{doc:t,mirror:r,blockClass:i,blockSelector:s,selectionCb:a}=e;let n=!0;const u=B(()=>{const l=t.getSelection();if(!l||n&&l?.isCollapsed)return;n=l.isCollapsed||!1;const h=[],o=l.rangeCount||0;for(let d=0;d<o;d++){const c=l.getRangeAt(d),{startContainer:f,startOffset:m,endContainer:p,endOffset:g}=c;oe(f,i,s,!0)||oe(p,i,s,!0)||h.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:h})});return u(),ne("selectionchange",u)}function fu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:ke(r.customElements,"define",function(s){return function(a,n,u){try{t({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return s.apply(this,[a,n,u])}})}function du(e,t){const{mutationCb:r,mousemoveCb:i,mouseInteractionCb:s,scrollCb:a,viewportResizeCb:n,inputCb:u,mediaInteractionCb:l,styleSheetRuleCb:h,styleDeclarationCb:o,canvasMutationCb:d,fontCb:c,selectionCb:f,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),i(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),s(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),n(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),l(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),h(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),o(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),c(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),f(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function pu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};du(e,t);let i,s=()=>{};e.recordDOM&&([i,s]=to(e,e.doc));const a=ru(e),n=su(e),u=ro(e),l=iu(e,{win:r}),h=ou(e),o=uu(e);let d=()=>{},c=()=>{},f=()=>{},m=()=>{};e.recordDOM&&(d=au(e,{win:r}),c=so(e,e.doc),f=lu(e,{win:r}),e.collectFonts&&(m=cu(e)));const p=hu(e),g=fu(e),S=[];for(const b of e.plugins)S.push(b.observer(b.callback,r,b.options));return B(()=>{Ae.forEach(b=>b.reset()),i?.disconnect(),s(),a(),n(),u(),l(),h(),o(),d(),c(),f(),m(),p(),g(),S.forEach(b=>b())})}function ht(e){return typeof window[e]<"u"}function ft(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Vi{constructor(t){x(this,"iframeIdToRemoteIdMap",new WeakMap),x(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,i,s){const a=i||this.getIdToRemoteIdMap(t),n=s||this.getRemoteIdToIdMap(t);let u=a.get(r);return u||(u=this.generateIdFn(),a.set(r,u),n.set(u,r)),u}getIds(t,r){const i=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,i,s))}getRemoteId(t,r,i){const s=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=s.get(r);return a||-1}getRemoteIds(t,r){const i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class mu{constructor(t){x(this,"iframes",new WeakMap),x(this,"crossOriginIframeMap",new WeakMap),x(this,"crossOriginIframeMirror",new Vi(fn)),x(this,"crossOriginIframeStyleMirror"),x(this,"crossOriginIframeRootIdMap",new WeakMap),x(this,"mirror"),x(this,"mutationCb"),x(this,"wrappedEmit"),x(this,"loadListener"),x(this,"stylesheetManager"),x(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var i,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const a=this.transformCrossOriginEvent(s,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var i;switch(r.type){case T.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:T.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(t),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,t,["id","parentId","previousId","nextId"]),r;case T.IncrementalSnapshot:switch(r.data.source){case A.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(s.node,a)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case A.Drag:case A.TouchMove:case A.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(r.data,t,["id"]),r;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case A.Font:return r;case A.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case A.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)==null||i.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,i,s){for(const a of s)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(i,r[a]):r[a]=t.getId(i,r[a]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r)})}}class gu{constructor(t){x(this,"shadowDoms",new WeakSet),x(this,"mutationCb"),x(this,"scrollCb"),x(this,"bypassOptions"),x(this,"mirror"),x(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Xe(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[i]=to({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(ro({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(P.host(t))),this.restoreHandlers.push(so({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const i=this;this.restoreHandlers.push(ke(t.prototype,"attachShadow",function(s){return function(a){const n=s.call(this,a),u=P.shadowRoot(this);return u&&Kn(this)&&i.addShadowRoot(u,r),n}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",He=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var dt=0;dt<ze.length;dt++)He[ze.charCodeAt(dt)]=dt;var yu=function(e){var t=new Uint8Array(e),r,i=t.length,s="";for(r=0;r<i;r+=3)s+=ze[t[r]>>2],s+=ze[(t[r]&3)<<4|t[r+1]>>4],s+=ze[(t[r+1]&15)<<2|t[r+2]>>6],s+=ze[t[r+2]&63];return i%3===2?s=s.substring(0,s.length-1)+"=":i%3===1&&(s=s.substring(0,s.length-2)+"=="),s},wu=function(e){var t=e.length*.75,r=e.length,i,s=0,a,n,u,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var h=new ArrayBuffer(t),o=new Uint8Array(h);for(i=0;i<r;i+=4)a=He[e.charCodeAt(i)],n=He[e.charCodeAt(i+1)],u=He[e.charCodeAt(i+2)],l=He[e.charCodeAt(i+3)],o[s++]=a<<2|n>>4,o[s++]=(n&15)<<4|u>>2,o[s++]=(u&3)<<6|l&63;return h};const Gi=new Map;function bu(e,t){let r=Gi.get(e);return r||(r=new Map,Gi.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const io=(e,t,r)=>{if(!e||!(oo(e,t)||typeof e=="object"))return;const i=e.constructor.name,s=bu(r,i);let a=s.indexOf(e);return a===-1&&(a=s.length,s.push(e)),a};function mt(e,t,r){if(e instanceof Array)return e.map(i=>mt(i,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,s=yu(e);return{rr_type:i,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[mt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:s}=e;return{rr_type:i,src:s}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",s=e.toDataURL();return{rr_type:i,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[mt(e.data,t,r),e.width,e.height]};if(oo(e,t)||typeof e=="object"){const i=e.constructor.name,s=io(e,t,r);return{rr_type:i,index:s}}}}return e}const no=(e,t,r)=>e.map(i=>mt(i,t,r)),oo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function vu(e,t,r,i){const s=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const n of a)try{if(typeof t.CanvasRenderingContext2D.prototype[n]!="function")continue;const u=ke(t.CanvasRenderingContext2D.prototype,n,function(l){return function(...h){return oe(this.canvas,r,i,!0)||setTimeout(()=>{const o=no(h,t,this);e(this.canvas,{type:Ee["2D"],property:n,args:o})},0),l.apply(this,h)}});s.push(u)}catch{const u=Wt(t.CanvasRenderingContext2D.prototype,n,{set(l){e(this.canvas,{type:Ee["2D"],property:n,args:[l],setter:!0})}});s.push(u)}return()=>{s.forEach(n=>n())}}function Su(e){return e==="experimental-webgl"?"webgl":e}function Hi(e,t,r,i){const s=[];try{const a=ke(e.HTMLCanvasElement.prototype,"getContext",function(n){return function(u,...l){if(!oe(this,t,r,!0)){const h=Su(u);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(l[0]&&typeof l[0]=="object"){const o=l[0];o.preserveDrawingBuffer||(o.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[u,...l])}});s.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(a=>a())}}function Yi(e,t,r,i,s,a){const n=[],u=Object.getOwnPropertyNames(e);for(const l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const h=ke(e,l,function(o){return function(...d){const c=o.apply(this,d);if(io(c,a,this),"tagName"in this.canvas&&!oe(this.canvas,i,s,!0)){const f=no(d,a,this),m={type:t,property:l,args:f};r(this.canvas,m)}return c}});n.push(h)}catch{const h=Wt(e,l,{set(o){r(this.canvas,{type:t,property:l,args:[o],setter:!0})}});n.push(h)}return n}function Cu(e,t,r,i){const s=[];return typeof t.WebGLRenderingContext<"u"&&s.push(...Yi(t.WebGLRenderingContext.prototype,Ee.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...Yi(t.WebGL2RenderingContext.prototype,Ee.WebGL2,e,r,i,t)),()=>{s.forEach(a=>a())}}const ao=`(function() {
|
|
55
|
+
"use strict";
|
|
56
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
57
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
58
|
+
for (var i = 0; i < chars.length; i++) {
|
|
59
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
60
|
+
}
|
|
61
|
+
var encode = function(arraybuffer) {
|
|
62
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
63
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
64
|
+
base64 += chars[bytes[i2] >> 2];
|
|
65
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
66
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
67
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
68
|
+
}
|
|
69
|
+
if (len % 3 === 2) {
|
|
70
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
71
|
+
} else if (len % 3 === 1) {
|
|
72
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
73
|
+
}
|
|
74
|
+
return base64;
|
|
75
|
+
};
|
|
76
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
77
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
78
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
79
|
+
const id = \`\${width}-\${height}\`;
|
|
80
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
81
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
82
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
83
|
+
offscreen.getContext("2d");
|
|
84
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
85
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
86
|
+
const base64 = encode(arrayBuffer);
|
|
87
|
+
transparentBlobMap.set(id, base64);
|
|
88
|
+
return base64;
|
|
89
|
+
} else {
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const worker = self;
|
|
94
|
+
worker.onmessage = async function(e) {
|
|
95
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
96
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
97
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
98
|
+
width,
|
|
99
|
+
height,
|
|
100
|
+
dataURLOptions
|
|
101
|
+
);
|
|
102
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
103
|
+
const ctx = offscreen.getContext("2d");
|
|
104
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
105
|
+
bitmap.close();
|
|
106
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
107
|
+
const type = blob.type;
|
|
108
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
109
|
+
const base64 = encode(arrayBuffer);
|
|
110
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
111
|
+
lastBlobMap.set(id, base64);
|
|
112
|
+
return worker.postMessage({ id });
|
|
113
|
+
}
|
|
114
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
115
|
+
worker.postMessage({
|
|
116
|
+
id,
|
|
117
|
+
type,
|
|
118
|
+
base64,
|
|
119
|
+
width,
|
|
120
|
+
height
|
|
121
|
+
});
|
|
122
|
+
lastBlobMap.set(id, base64);
|
|
123
|
+
} else {
|
|
124
|
+
return worker.postMessage({ id: e.data.id });
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
})();
|
|
128
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
129
|
+
`,Xi=typeof self<"u"&&self.Blob&&new Blob([ao],{type:"text/javascript;charset=utf-8"});function Eu(e){let t;try{if(t=Xi&&(self.URL||self.webkitURL).createObjectURL(Xi),!t)throw"";const r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ao),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ru{constructor(t){x(this,"pendingCanvasMutations",new Map),x(this,"rafStamps",{latestId:0,invokeId:null}),x(this,"mirror"),x(this,"mutationCb"),x(this,"resetObservers"),x(this,"frozen",!1),x(this,"locked",!1),x(this,"processMutation",(l,h)=>{(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(h)});const{sampling:r="all",win:i,blockClass:s,blockSelector:a,recordCanvas:n,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,n&&r==="all"&&this.initCanvasMutationObserver(i,s,a),n&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,s,a,{dataURLOptions:u})}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(t,r,i,s,a){const n=Hi(r,i,s,!0),u=new Map,l=new Eu;l.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:S,width:b,height:y}=m.data;this.mutationCb({id:p,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};const h=1e3/t;let o=0,d;const c=()=>{const m=[];return r.document.querySelectorAll("canvas").forEach(p=>{oe(p,i,s,!0)||m.push(p)}),m},f=m=>{if(o&&m-o<h){d=requestAnimationFrame(f);return}o=m,c().forEach(async p=>{var g;const S=this.mirror.getId(p);if(u.get(S)||p.width===0||p.height===0)return;if(u.set(S,!0),["webgl","webgl2"].includes(p.__context)){const y=p.getContext(p.__context);((g=y?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(p);l.postMessage({id:S,bitmap:b,width:p.width,height:p.height,dataURLOptions:a.dataURLOptions},[b])}),d=requestAnimationFrame(f)};d=requestAnimationFrame(f),this.resetObservers=()=>{n(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Hi(t,r,i,!1),a=vu(this.processMutation.bind(this),t,r,i),n=Cu(this.processMutation.bind(this),t,r,i);this.resetObservers=()=>{s(),a(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;const s=i.map(n=>{const{type:u,...l}=n;return l}),{type:a}=i[0];this.mutationCb({id:r,type:a,commands:s}),this.pendingCanvasMutations.delete(t)}}class xu{constructor(t){x(this,"trackedLinkElements",new WeakSet),x(this,"mutationCb"),x(this,"adoptedStyleSheetCb"),x(this,"styleMirror",new Qn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const i={id:r,styleIds:[]},s=[];for(const a of t){let n;this.styleMirror.has(a)?n=this.styleMirror.getId(a):(n=this.styleMirror.add(a),s.push({styleId:n,rules:Array.from(a.rules||CSSRule,(u,l)=>({rule:cn(u,a.href),index:l}))})),i.styleIds.push(n)}s.length>0&&(i.styles=s),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Mu{constructor(){x(this,"nodeMap",new WeakMap),x(this,"active",!1)}inOtherBuffer(t,r){const i=this.nodeMap.get(t);return i&&Array.from(i).some(s=>s!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,gt,Gr,Mt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Es=e.contentWindow)==null?void 0:Es.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const pe=hn();function Le(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:a=null,ignoreClass:n="rr-ignore",ignoreSelector:u=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:o=!0,maskAllInputs:d,maskInputOptions:c,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:g,packFn:S,sampling:b={},dataURLOptions:y={},mousemoveWait:w,recordDOM:v=!0,recordCanvas:C=!1,recordCrossOriginIframes:R=!1,recordAfter:O=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:q=!1,plugins:_,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ae=new Set([]),errorHandler:se}=e;eu(se);const $=R?window.parent===window:!0;let k=!1;if(!$)try{window.parent.document&&(k=!1)}catch{k=!0}if($&&!t)throw new Error("emit function is required");if(!$&&!k)return()=>{};w!==void 0&&b.mousemove===void 0&&(b.mousemove=w),pe.reset();const Y=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}:c!==void 0?c:{password:!0},ee=gn(f);Hn();let Q,j=0;const Re=L=>{for(const te of _||[])te.eventProcessor&&(L=te.eventProcessor(L));return S&&!k&&(L=S(L)),L};K=(L,te)=>{var V;const Z=L;if(Z.timestamp=Ke(),(V=Ae[0])!=null&&V.isFrozen()&&Z.type!==T.FullSnapshot&&!(Z.type===T.IncrementalSnapshot&&Z.data.source===A.Mutation)&&Ae.forEach(le=>le.unfreeze()),$)t?.(Re(Z),te);else if(k){const le={type:"rrweb",event:Re(Z),origin:window.location.origin,isCheckout:te};window.parent.postMessage(le,"*")}if(Z.type===T.FullSnapshot)Q=Z,j=0;else if(Z.type===T.IncrementalSnapshot){if(Z.data.source===A.Mutation&&Z.data.isAttachIframe)return;j++;const le=i&&j>=i,G=r&&Z.timestamp-Q.timestamp>r;(le||G)&>(!0)}};const N=L=>{K({type:T.IncrementalSnapshot,data:{source:A.Mutation,...L}})},we=L=>K({type:T.IncrementalSnapshot,data:{source:A.Scroll,...L}}),fe=L=>K({type:T.IncrementalSnapshot,data:{source:A.CanvasMutation,...L}}),Ve=L=>K({type:T.IncrementalSnapshot,data:{source:A.AdoptedStyleSheet,...L}}),ie=new xu({mutationCb:N,adoptedStyleSheetCb:Ve}),de=new mu({mirror:pe,mutationCb:N,stylesheetManager:ie,recordCrossOriginIframes:R,wrappedEmit:K});for(const L of _||[])L.getMirror&&L.getMirror({nodeMirror:pe,crossOriginIframeMirror:de.crossOriginIframeMirror,crossOriginIframeStyleMirror:de.crossOriginIframeStyleMirror});const Ie=new Mu;Gr=new Ru({recordCanvas:C,mutationCb:fe,win:window,blockClass:s,blockSelector:a,mirror:pe,sampling:b.canvas,dataURLOptions:y});const xe=new gu({mutationCb:N,scrollCb:we,bypassOptions:{blockClass:s,blockSelector:a,maskTextClass:l,maskTextSelector:h,inlineStylesheet:o,maskInputOptions:Y,dataURLOptions:y,maskTextFn:p,maskInputFn:m,recordCanvas:C,inlineImages:q,sampling:b,slimDOMOptions:ee,iframeManager:de,stylesheetManager:ie,canvasManager:Gr,keepIframeSrcFn:E,processedNodeManager:Ie},mirror:pe});gt=(L=!1)=>{if(!v)return;K({type:T.Meta,data:{href:window.location.href,width:jn(),height:qn()}},L),ie.reset(),xe.init(),Ae.forEach(V=>V.lock());const te=fa(document,{mirror:pe,blockClass:s,blockSelector:a,maskTextClass:l,maskTextSelector:h,inlineStylesheet:o,maskAllInputs:Y,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:y,recordCanvas:C,inlineImages:q,onSerialize:V=>{Qe(V,pe)&&de.addIframe(V),Xn(V,pe)&&ie.trackLinkElement(V),De(V)&&xe.addShadowRoot(P.shadowRoot(V),document)},onIframeLoad:(V,Z)=>{de.attachIframe(V,Z),xe.observeAttachShadow(V)},onStylesheetLoad:(V,Z)=>{ie.attachLinkElement(V,Z)},keepIframeSrcFn:E});if(!te)return console.warn("Failed to snapshot the document");K({type:T.FullSnapshot,data:{node:te,initialOffset:zn(window)}},L),Ae.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,pe.getId(document))};try{const L=[],te=Z=>{var le;return B(pu)({mutationCb:N,mousemoveCb:(G,zt)=>K({type:T.IncrementalSnapshot,data:{source:zt,positions:G}}),mouseInteractionCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.MouseInteraction,...G}}),scrollCb:we,viewportResizeCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.ViewportResize,...G}}),inputCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.Input,...G}}),mediaInteractionCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.MediaInteraction,...G}}),styleSheetRuleCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.StyleSheetRule,...G}}),styleDeclarationCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.StyleDeclaration,...G}}),canvasMutationCb:fe,fontCb:G=>K({type:T.IncrementalSnapshot,data:{source:A.Font,...G}}),selectionCb:G=>{K({type:T.IncrementalSnapshot,data:{source:A.Selection,...G}})},customElementCb:G=>{K({type:T.IncrementalSnapshot,data:{source:A.CustomElement,...G}})},blockClass:s,ignoreClass:n,ignoreSelector:u,maskTextClass:l,maskTextSelector:h,maskInputOptions:Y,inlineStylesheet:o,sampling:b,recordDOM:v,recordCanvas:C,inlineImages:q,userTriggeredOnInput:I,collectFonts:M,doc:Z,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:E,blockSelector:a,slimDOMOptions:ee,dataURLOptions:y,mirror:pe,iframeManager:de,stylesheetManager:ie,shadowDomManager:xe,processedNodeManager:Ie,canvasManager:Gr,ignoreCSSAttributes:ae,plugins:((le=_?.filter(G=>G.observer))==null?void 0:le.map(G=>({observer:G.observer,options:G.options,callback:zt=>K({type:T.Plugin,data:{plugin:G.name,payload:zt}})})))||[]},g)};de.addLoadListener(Z=>{try{L.push(te(Z.contentDocument))}catch(le){console.warn(le)}});const V=()=>{gt(),L.push(te(document)),Mt=!0};return["interactive","complete"].includes(document.readyState)?V():(L.push(ne("DOMContentLoaded",()=>{K({type:T.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&V()})),L.push(ne("load",()=>{K({type:T.Load,data:{}}),O==="load"&&V()},window))),()=>{L.forEach(Z=>{try{Z()}catch(le){String(le).toLowerCase().includes("cross-origin")||console.warn(le)}}),Ie.destroy(),Mt=!1,tu()}}catch(L){console.warn(L)}}Le.addCustomEvent=(e,t)=>{if(!Mt)throw new Error("please add custom event after start recording");K({type:T.Custom,data:{tag:e,payload:t}})};Le.freezePage=()=>{Ae.forEach(e=>e.freeze())};Le.takeFullSnapshot=e=>{if(!Mt)throw new Error("please take full snapshot after start recording");gt(e)};Le.mirror=pe;function Nu(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map(function(s){s(r)}),(i=e.get("*"))&&i.slice().map(function(s){s(t,r)})}}}function Ou(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,i=468,s={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||l,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function n(S){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(S)}const u=n(e.navigator.userAgent)?1:0;function l(S,b){this.scrollLeft=S,this.scrollTop=b}function h(S){return .5*(1-Math.cos(Math.PI*S))}function o(S){if(S===null||typeof S!="object"||S.behavior===void 0||S.behavior==="auto"||S.behavior==="instant")return!0;if(typeof S=="object"&&S.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+S.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(S,b){if(b==="Y")return S.clientHeight+u<S.scrollHeight;if(b==="X")return S.clientWidth+u<S.scrollWidth}function c(S,b){const y=e.getComputedStyle(S,null)["overflow"+b];return y==="auto"||y==="scroll"}function f(S){const b=d(S,"Y")&&c(S,"Y"),y=d(S,"X")&&c(S,"X");return b||y}function m(S){for(;S!==t.body&&f(S)===!1;)S=S.parentNode||S.host;return S}function p(S){const b=a();let y,w,v,C=(b-S.startTime)/i;C=C>1?1:C,y=h(C),w=S.startX+(S.x-S.startX)*y,v=S.startY+(S.y-S.startY)*y,S.method.call(S.scrollable,w,v),(w!==S.x||v!==S.y)&&e.requestAnimationFrame(p.bind(e,S))}function g(S,b,y){let w,v,C,R;const O=a();S===t.body?(w=e,v=e.scrollX||e.pageXOffset,C=e.scrollY||e.pageYOffset,R=s.scroll):(w=S,v=S.scrollLeft,C=S.scrollTop,R=l),p({scrollable:w,method:R,startTime:O,startX:v,startY:C,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(o(arguments[0])===!0){s.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(o(arguments[0])){s.scrollBy.call(e,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}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(o(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");s.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 S=arguments[0].left,b=arguments[0].top;g.call(this,this,typeof S>"u"?this.scrollLeft:~~S,typeof b>"u"?this.scrollTop:~~b)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(o(arguments[0])===!0){s.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(o(arguments[0])===!0){s.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const S=m(this),b=S.getBoundingClientRect(),y=this.getBoundingClientRect();S!==t.body?(g.call(this,S,S.scrollLeft+y.left-b.left,S.scrollTop+y.top-b.top),e.getComputedStyle(S).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}class Iu{constructor(t=[],r){x(this,"timeOffset",0),x(this,"speed"),x(this,"actions"),x(this,"raf",null),x(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const i=this.findActionIndex(t);this.actions.splice(i,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;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(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,i=this.actions.length-1;for(;r<=i;){const s=Math.floor((r+i)/2);if(this.actions[s].delay<t.delay)r=s+1;else if(this.actions[s].delay>t.delay)i=s-1;else return s+1}return r}}function Ji(e,t){if(e.type===T.IncrementalSnapshot&&e.data.source===A.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,i=e.timestamp+r;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
130
|
+
Copyright (c) Microsoft Corporation.
|
|
131
|
+
|
|
132
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
133
|
+
purpose with or without fee is hereby granted.
|
|
134
|
+
|
|
135
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
136
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
137
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
138
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
139
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
140
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
141
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
142
|
+
***************************************************************************** */function Qi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i,s,a=r.call(e),n=[];try{for(;(t===void 0||t-- >0)&&!(i=a.next()).done;)n.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return n}var qe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qe||(qe={}));var lo={type:"xstate.init"};function Hr(e){return e===void 0?[]:[].concat(e)}function Be(e){return{type:"xstate.assign",assignment:e}}function Zi(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Nt(e){return function(t){return e===t}}function uo(e){return typeof e=="string"?{type:e}:e}function Ki(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Nt(e)}}function en(e,t,r){var i=t,s=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){s=!0;var n=Object.assign({},i);return typeof a.assignment=="function"?n=a.assignment(i,r):Object.keys(a.assignment).forEach(function(u){n[u]=typeof a.assignment[u]=="function"?a.assignment[u](i,r):a.assignment[u]}),i=n,!1}return!0}),i,s]}function co(e,t){t===void 0&&(t={});var r=Qi(en(Hr(e.states[e.initial].entry).map(function(n){return Zi(n,t.actions)}),e.context,lo),2),i=r[0],s=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:i,context:s,matches:Nt(e.initial)},transition:function(n,u){var l,h,o=typeof n=="string"?{value:n,context:e.context}:n,d=o.value,c=o.context,f=uo(u),m=e.states[d];if(m.on){var p=Hr(m.on[f.type]);try{for(var g=(function(k){var Y=typeof Symbol=="function"&&Symbol.iterator,ee=Y&&k[Y],Q=0;if(ee)return ee.call(k);if(k&&typeof k.length=="number")return{next:function(){return k&&Q>=k.length&&(k=void 0),{value:k&&k[Q++],done:!k}}};throw new TypeError(Y?"Object is not iterable.":"Symbol.iterator is not defined.")})(p),S=g.next();!S.done;S=g.next()){var b=S.value;if(b===void 0)return Ki(d,c);var y=typeof b=="string"?{target:b}:b,w=y.target,v=y.actions,C=v===void 0?[]:v,R=y.cond,O=R===void 0?function(){return!0}:R,I=w===void 0,M=w??d,q=e.states[M];if(O(c,f)){var _=Qi(en((I?Hr(C):[].concat(m.exit,C,q.entry).filter(function(k){return k})).map(function(k){return Zi(k,a._options.actions)}),c,f),3),E=_[0],ae=_[1],se=_[2],$=w??d;return{value:$,context:ae,actions:E,changed:w!==d||E.length>0||se,matches:Nt($)}}}}catch(k){l={error:k}}finally{try{S&&!S.done&&(h=g.return)&&h.call(g)}finally{if(l)throw l.error}}}return Ki(d,c)}};return a}var tn=function(e,t){return e.actions.forEach(function(r){var i=r.exec;return i&&i(e.context,t)})};function ho(e){var t=e.initialState,r=qe.NotStarted,i=new Set,s={_machine:e,send:function(a){r===qe.Running&&(t=e.transition(t,a),tn(t,uo(a)),i.forEach(function(n){return n(t)}))},subscribe:function(a){return i.add(a),a(t),{unsubscribe:function(){return i.delete(a)}}},start:function(a){if(a){var n=typeof a=="object"?a:{context:e.config.context,value:a};t={value:n.value,actions:[],context:n.context,matches:Nt(n.value)}}return r=qe.Running,tn(t,lo),s},stop:function(){return r=qe.Stopped,i.clear(),s},get state(){return t},get status(){return r}};return s}function Du(e,t){for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.type===T.Meta&&i.timestamp<=t)return e.slice(r)}return e}function Au(e,{getCastFn:t,applyEventsSynchronously:r,emitter:i}){const s=co({id:"player",context:e,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:Be({lastPlayedEvent:(a,n)=>n.type==="CAST_EVENT"?n.payload.event:a.lastPlayedEvent}),recordTimeOffset:Be((a,n)=>{let u=a.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(u=n.payload.timeOffset),{...a,timeOffset:u,baselineTime:a.events[0].timestamp+u}}),play(a){var n;const{timer:u,events:l,baselineTime:h,lastPlayedEvent:o}=a;u.clear();for(const m of l)Ji(m,h);const d=Du(l,h);let c=o?.timestamp;o?.type===T.IncrementalSnapshot&&o.data.source===A.MouseMove&&(c=o.timestamp+((n=o.data.positions[0])==null?void 0:n.timeOffset)),h<(c||0)&&i.emit(W.PlayBack);const f=new Array;for(const m of d)if(!(c&&c<h&&(m.timestamp<=c||m===o)))if(m.timestamp<h)f.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(f),i.emit(W.Flush),u.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Be(a=>({...a,lastPlayedEvent:null})),startLive:Be({baselineTime:(a,n)=>(a.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Be((a,n)=>{const{baselineTime:u,timer:l,events:h}=a;if(n.type==="ADD_EVENT"){const{event:o}=n.payload;Ji(o,u);let d=h.length-1;if(!h[d]||h[d].timestamp<=o.timestamp)h.push(o);else{let m=-1,p=0;for(;p<=d;){const g=Math.floor((p+d)/2);h[g].timestamp<=o.timestamp?p=g+1:d=g-1}m===-1&&(m=p),h.splice(m,0,o)}const c=o.timestamp<u,f=t(o,c);c?f():l.isActive()&&l.addAction({doAction:()=>{f()},delay:o.delay})}return{...a,events:h}})}});return ho(s)}function Tu(e){const t=co({id:"speed",context:e,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,i)=>{"payload"in i&&r.timer.setSpeed(i.payload.speed)},recordSpeed:Be({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return ho(t)}const _u=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],rn=new Map;function fo(e,t){let r=rn.get(e);return r||(r=new Map,rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Oe(e,t,r){return async i=>{if(i&&typeof i=="object"&&"rr_type"in i)if(r&&(r.isUnchanged=!1),i.rr_type==="ImageBitmap"&&"args"in i){const s=await Oe(e,t,r)(i.args);return await createImageBitmap.apply(null,s)}else if("index"in i){if(r||t===null)return i;const{rr_type:s,index:a}=i;return fo(t,s)[a]}else if("args"in i){const{rr_type:s,args:a}=i,n=window[s];return new n(...await Promise.all(a.map(Oe(e,t,r))))}else{if("base64"in i)return wu(i.base64);if("src"in i){const s=e.get(i.src);if(s)return s;{const a=new Image;return a.src=i.src,e.set(i.src,a),a}}else if("data"in i&&i.rr_type==="Blob"){const s=await Promise.all(i.data.map(Oe(e,t,r)));return new Blob(s,{type:i.type})}}else if(Array.isArray(i))return await Promise.all(i.map(Oe(e,t,r)));return i}}function ku(e,t){try{return t===Ee.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}const Lu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Pu(e,t){if(!t?.constructor)return;const{name:r}=t.constructor;if(!Lu.includes(r))return;const i=fo(e,r);i.includes(t)||i.push(t)}async function Fu({mutation:e,target:t,type:r,imageMap:i,errorHandler:s}){try{const a=ku(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const n=a[e.property],u=await Promise.all(e.args.map(Oe(i,a))),l=n.apply(a,u);Pu(a,l);const h=!1}catch(a){s(e,a)}}async function Uu({event:e,mutations:t,target:r,imageMap:i,errorHandler:s}){const a=r.getContext("2d");if(!a){s(t[0],new Error("Canvas context is null"));return}const n=t.map(async l=>Promise.all(l.args.map(Oe(i,a))));(await Promise.all(n)).forEach((l,h)=>{const o=t[h];try{if(o.setter){a[o.property]=o.args[0];return}const d=a[o.property];o.property==="drawImage"&&typeof o.args[0]=="string"?(i.get(e),d.apply(a,o.args)):d.apply(a,l)}catch(d){s(o,d)}})}async function sn({event:e,mutation:t,target:r,imageMap:i,canvasEventMap:s,errorHandler:a}){try{const n=s.get(e)||t,u="commands"in n?n.commands:[n];if([Ee.WebGL,Ee.WebGL2].includes(t.type)){for(let l=0;l<u.length;l++){const h=u[l];await Fu({mutation:h,type:t.type,target:r,imageMap:i,errorHandler:a})}return}await Uu({event:e,mutations:u,target:r,imageMap:i,errorHandler:a})}catch(n){a(t,n)}}class Bu{constructor(t){x(this,"mediaMap",new Map),x(this,"warn"),x(this,"service"),x(this,"speedService"),x(this,"emitter"),x(this,"getCurrentTime"),x(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(W.Start,this.start.bind(this)),this.emitter.on(W.SkipStart,this.start.bind(this)),this.emitter.on(W.Pause,this.pause.bind(this)),this.emitter.on(W.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,i)=>{this.syncTargetWithState(i),t.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:i}){if(i.isPlaying){const a=(t-i.lastInteractionTimeOffset)/1e3*i.playbackRate,n="duration"in r&&r.duration;if(Number.isNaN(n)){this.waitForMetadata(r);return}let u=i.currentTimeAtLastInteraction+a;r.loop&&n!==!1&&(u=u%n),r.currentTime=u}else r.pause(),r.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const i=this.mediaMap.get(t);i&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:i})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:i}){const s=this.mediaMap.get(t),{type:a,playbackRate:n,currentTime:u,muted:l,volume:h,loop:o}=i;return{isPlaying:a===Ne.Play||a!==Ne.Pause&&(s?.isPlaying||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:u??s?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:r,playbackRate:n??s?.playbackRate??1,volume:h??s?.volume??1,muted:l??s?.muted??t.getAttribute("muted")===null,loop:o??s?.loop??t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:i,loop:s,volume:a,isPlaying:n}=r,u=this.service.state.matches("paused"),l=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=i,t.loop=s,t.playbackRate!==l&&(t.playbackRate=l),n&&!u?t.play():t.pause()}catch(h){this.warn(`Failed to replay media interactions: ${h.message||h}`)}}addMediaElements(t,r,i){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const s=t,a=i.getMeta(s);if(!a||!("attributes"in a))return;const n=this.service.state.matches("paused"),u=a.attributes;let l=!1;u.rr_mediaState?l=u.rr_mediaState==="played":l=s.getAttribute("autoplay")!==null,l&&n&&s.pause();let h=1;typeof u.rr_mediaPlaybackRate=="number"&&(h=u.rr_mediaPlaybackRate);let o=!1;typeof u.rr_mediaMuted=="boolean"?o=u.rr_mediaMuted:o=s.getAttribute("muted")!==null;let d=!1;typeof u.rr_mediaLoop=="boolean"?d=u.rr_mediaLoop:d=s.getAttribute("loop")!==null;let c=1;typeof u.rr_mediaVolume=="number"&&(c=u.rr_mediaVolume);let f=0;typeof u.rr_mediaCurrentTime=="number"&&(f=u.rr_mediaCurrentTime),this.mediaMap.set(s,{isPlaying:l,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:h,volume:c,muted:o,loop:d}),this.syncTargetWithState(s)}mediaMutation({target:t,timeOffset:r,mutation:i}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:i})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function pt(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e,i=r.open,s=i&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),n=typeof t?.attributes.open=="string"||typeof r.getAttribute("open")=="string",u=a==="modal";if(!(i&&!(s&&a==="non-modal"||!s&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}i&&r.close(),n&&(u?r.showModal():r.show())}}function $u(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Wu=5*1e3,zu=Nu,nn="[replayer]",Yr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function on(e){return e.type==T.IncrementalSnapshot&&(e.data.source==A.TouchMove||e.data.source==A.MouseInteraction&&e.data.type==z.TouchStart)}class ju{constructor(t,r){if(x(this,"wrapper"),x(this,"iframe"),x(this,"UNSAFE_replayCanvas",!1),x(this,"service"),x(this,"speedService"),x(this,"config"),x(this,"usingVirtualDom",!1),x(this,"virtualDom",new je),x(this,"mouse"),x(this,"mouseTail",null),x(this,"tailPositions",[]),x(this,"emitter",zu()),x(this,"nextUserInteractionEvent"),x(this,"legacy_missingNodeRetryMap",{}),x(this,"cache",oi()),x(this,"imageMap",new Map),x(this,"canvasEventMap",new Map),x(this,"mirror",hn()),x(this,"styleMirror",new Qn),x(this,"mediaManager"),x(this,"firstFullSnapshot",null),x(this,"newDocumentQueue",[]),x(this,"mousePos",null),x(this,"touchActive",null),x(this,"lastMouseDownEvent",null),x(this,"lastHoveredRootNode"),x(this,"lastSelectionData",null),x(this,"constructedStyleMutations",[]),x(this,"adoptedStyleSheets",[]),x(this,"handleResize",u=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(u.width)),l.setAttribute("height",String(u.height)))}),x(this,"applyEventsSynchronously",u=>{for(const l of u){switch(l.type){case T.DomContentLoaded:case T.Load:continue;case T.FullSnapshot:case T.Meta:case T.Plugin:case T.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),x(this,"getCastFn",(u,l=!1)=>{let h;switch(u.type){case T.DomContentLoaded:case T.Load:break;case T.Custom:h=()=>{this.emitter.emit(W.CustomEvent,u)};break;case T.Meta:h=()=>this.emitter.emit(W.Resize,{width:u.data.width,height:u.data.height});break;case T.FullSnapshot:h=()=>{var d;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,l),(d=this.iframe.contentWindow)==null||d.scrollTo(u.data.initialOffset)};break;case T.IncrementalSnapshot:h=()=>{if(this.applyIncremental(u,l),!l&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const d of this.service.state.context.events)if(!(d.timestamp<=u.timestamp)&&this.isUserInteraction(d)){d.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=d);break}if(this.nextUserInteractionEvent){const d=this.nextUserInteractionEvent.delay-u.delay,c={speed:Math.min(Math.round(d/Wu),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(W.SkipStart,c)}}};break}return()=>{h&&h();for(const c of this.config.plugins||[])c.handler&&c.handler(u,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});const d=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[d]){const c=()=>{d<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(W.Finish))};let f=50;u.type===T.IncrementalSnapshot&&u.data.source===A.MouseMove&&u.data.positions.length&&(f+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(c,f)}this.emitter.emit(W.EventCast,u)}}),!r?.liveMode&&t.length<2)throw new Error("Replayer need at least 2 events.");const i={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:Yr,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(W.Resize,this.handleResize),this.setupDom();for(const u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(W.Flush,()=>{if(this.usingVirtualDom){const u={mirror:this.mirror,applyCanvas:(l,h,o)=>{sn({event:l,mutation:h,target:o,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,h)=>{l.source===A.StyleSheetRule?this.applyStyleSheetRule(l,h):l.source===A.StyleDeclaration&&this.applyStyleDeclaration(l,h)},afterAppend:(l,h)=>{for(const o of this.config.plugins||[])o.onBuild&&o.onBuild(l,{id:h,replayer:this})}};if(this.iframe.contentDocument)try{Et(this.iframe.contentDocument,this.virtualDom,u,this.virtualDom.mirror)}catch(l){this.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const h=this.legacy_missingNodeRetryMap[l],o=Rt(h.node,this.mirror,this.virtualDom.mirror);Et(o,h.node,u,this.virtualDom.mirror),h.node=o}catch(h){this.warn(h)}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[u,l]=this.lastMouseDownEvent;u.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(W.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const s=new Iu([],{speed:this.config.speed});this.service=Au({events:t.map(u=>r&&r.unpackFn?r.unpackFn(u):u).sort((u,l)=>u.timestamp-l.timestamp),timer:s,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(W.StateChange,{player:u})}),this.speedService=Tu({normalSpeed:-1,timer:s}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(W.StateChange,{speed:u})}),this.mediaManager=new Bu({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(u=>u.type===T.Meta),n=this.service.state.context.events.find(u=>u.type===T.FullSnapshot);if(a){const{width:u,height:l}=a.data;setTimeout(()=>{this.emitter.emit(W.Resize,{width:u,height:l})},0)}n&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(u=this.iframe.contentWindow)==null||u.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(on)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.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 t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,i;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(i=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||i.classList.remove("rrweb-paused"),this.emitter.emit(W.Start)}pause(t){var r,i;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(i=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||i.classList.add("rrweb-paused"),this.emitter.emit(W.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(W.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(W.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;on(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=oi()}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.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Ba({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ou(this.iframe.contentWindow,this.iframe.contentDocument),Hn(this.iframe.contentWindow))}rebuildFullSnapshot(t,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 i=[],s=new Set,a=(l,h)=>{if(l.nodeName==="DIALOG"&&s.add(l),this.collectIframeAndAttachDocument(i,l),this.mediaManager.isSupportedMediaElement(l)){const{events:o}=this.service.state.context;this.mediaManager.addMediaElements(l,t.timestamp-o[0].timestamp,this.mirror)}for(const o of this.config.plugins||[])o.onBuild&&o.onBuild(l,{id:h,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Ua(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:l,builtNode:h}of i)this.attachDocumentToIframe(l,h),this.newDocumentQueue=this.newDocumentQueue.filter(o=>o!==l);const{documentElement:n,head:u}=this.iframe.contentDocument;this.insertStyleRules(n,u),s.forEach(l=>pt(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(W.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var i;const s=_u(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&s.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!s.length)if(this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,Un(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:A.StyleSheetRule,adds:s.map((n,u)=>({rule:n,index:u}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let n=0;n<s.length;n++)(i=a.sheet)==null||i.insertRule(s[n],n)}}attachDocumentToIframe(t,r){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,s=[],a=new Set,n=(u,l)=>{u.nodeName==="DIALOG"&&a.add(u),this.collectIframeAndAttachDocument(s,u);const h=i.getMeta(u);if(h?.type===Se.Element&&h?.tagName.toUpperCase()==="HTML"){const{documentElement:o,head:d}=r.contentDocument;this.insertStyleRules(o,d)}if(!this.usingVirtualDom)for(const o of this.config.plugins||[])o.onBuild&&o.onBuild(u,{id:l,replayer:this})};Je(t.node,{doc:r.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:l}of s)this.attachDocumentToIframe(u,l),this.newDocumentQueue=this.newDocumentQueue.filter(h=>h!==u);a.forEach(u=>pt(u))}collectIframeAndAttachDocument(t,r){if(Qe(r,this.mirror)){const i=this.newDocumentQueue.find(s=>s.parentId===this.mirror.getId(r));i&&t.push({mutationInQueue:i,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const i=new Set;let s,a=this.service.state;const n=()=>{a=this.service.state};this.emitter.on(W.Start,n),this.emitter.on(W.Pause,n);const u=()=>{this.emitter.off(W.Start,n),this.emitter.off(W.Pause,n)};r.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(i.add(l),l.addEventListener("load",()=>{i.delete(l),i.size===0&&s!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(W.LoadStylesheetEnd),s&&clearTimeout(s),u())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(W.LoadStylesheetStart),s=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),s=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===T.IncrementalSnapshot&&r.data.source===A.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(s=>{this.preloadImages(s,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const i=document.createElement("canvas"),s=i.getContext("2d"),a=s?.createImageData(i.width,i.height);s?.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const i={isUnchanged:!0};if("commands"in t){const s=await Promise.all(t.commands.map(async a=>{const n=await Promise.all(a.args.map(Oe(this.imageMap,null,i)));return{...a,args:n}}));i.isUnchanged===!1&&this.canvasEventMap.set(r,{...t,commands:s})}else{const s=await Promise.all(t.args.map(Oe(this.imageMap,null,i)));i.isUnchanged===!1&&this.canvasEventMap.set(r,{...t,args:s})}}}applyIncremental(t,r){var i,s,a;const{data:n}=t;switch(n.source){case A.Mutation:{try{this.applyMutation(n,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,n)}break}case A.Drag:case A.TouchMove:case A.MouseMove:if(r){const u=n.positions[n.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:n}}else n.positions.forEach(u=>{const l={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,n)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:t.delay-((i=n.positions[0])==null?void 0:i.timeOffset)});break;case A.MouseInteraction:{if(n.id===-1)break;const u=new Event(Ce(z[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(W.MouseInteraction,{type:n.type,target:l});const{triggerFocus:h}=this.config;switch(n.type){case z.Blur:"blur"in l&&l.blur();break;case z.Focus:h&&l.focus&&l.focus({preventScroll:!0});break;case z.Click:case z.TouchStart:case z.TouchEnd:case z.MouseDown:case z.MouseUp:r?(n.type===z.TouchStart?this.touchActive=!0:n.type===z.TouchEnd&&(this.touchActive=!1),n.type===z.MouseDown?this.lastMouseDownEvent=[l,u]:n.type===z.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===z.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,r,n),n.type===z.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===z.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===z.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(u));break;case z.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(u)}break}case A.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(n.id);if(!u)return this.debugNodeNotFound(n,n.id);u.scrollData=n;break}this.applyScroll(n,r);break}case A.ViewportResize:this.emitter.emit(W.Resize,{width:n.width,height:n.height});break;case A.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(n.id);if(!u)return this.debugNodeNotFound(n,n.id);u.inputData=n;break}this.applyInput(n);break}case A.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!u)return this.debugNodeNotFound(n,n.id);const l=u,{events:h}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:t.timestamp-h[0].timestamp,mutation:n});break}case A.StyleSheetRule:case A.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((s=this.virtualDom.mirror.getNode(n.id))==null||s.rules.push(n)):this.applyStyleSheetMutation(n);break}case A.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(n.id);if(!u)return this.debugNodeNotFound(n,n.id);u.canvasMutations.push({event:t,mutation:n})}else{const u=this.mirror.getNode(n.id);if(!u)return this.debugNodeNotFound(n,n.id);sn({event:t,mutation:n,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case A.Font:{try{const u=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(u)}catch(u){this.warn(u)}break}case A.Selection:{if(r){this.lastSelectionData=n;break}this.applySelection(n);break}case A.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Nl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const h in this.legacy_missingNodeRetryMap)try{const o=this.legacy_missingNodeRetryMap[h],d=Fn(o.node,this.virtualDom,this.mirror);d&&(o.node=d)}catch(o){this.warn(o)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(h=>i.getNode(h.id)?!0:(this.warnNodeNotFound(t,h.id),!1)),t.removes.forEach(h=>{var o;const d=i.getNode(h.id);if(!d)return;let c=i.getNode(h.parentId);if(!c)return this.warnNodeNotFound(t,h.parentId);if(h.isShadow&&De(c)&&(c=c.shadowRoot),i.removeNodeFromMap(d),c)try{c.removeChild(d),this.usingVirtualDom&&d.nodeName==="#text"&&c.nodeName==="STYLE"&&((o=c.rules)==null?void 0:o.length)>0&&(c.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",c,d,t);else throw f}});const s={...this.legacy_missingNodeRetryMap},a=[],n=h=>{let o=null;return h.nextId&&(o=i.getNode(h.nextId)),h.nextId!==null&&h.nextId!==void 0&&h.nextId!==-1&&!o},u=h=>{var o,d;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=i.getNode(h.parentId);if(!c)return h.node.type===Se.Document?this.newDocumentQueue.push(h):a.push(h);h.node.isShadow&&(De(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let f=null,m=null;if(h.previousId&&(f=i.getNode(h.previousId)),h.nextId&&(m=i.getNode(h.nextId)),n(h))return a.push(h);if(h.node.rootId&&!i.getNode(h.node.rootId))return;const p=h.node.rootId?i.getNode(h.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Qe(c,i)){this.attachDocumentToIframe(h,c);return}const g=(y,w)=>{if(!this.usingVirtualDom){pt(y);for(const v of this.config.plugins||[])v.onBuild&&v.onBuild(y,{id:w,replayer:this})}},S=Je(h.node,{doc:p,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(h.previousId===-1||h.nextId===-1){s[h.node.id]={node:S,mutation:h};return}const b=i.getMeta(c);if(b&&b.type===Se.Element&&h.node.type===Se.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(b.tagName==="textarea")for(const w of y)w.nodeType===c.TEXT_NODE&&c.removeChild(w);else if(b.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===c.TEXT_NODE&&!i.hasNode(w)&&(S.textContent=w.textContent,c.removeChild(w))}else if(b?.type===Se.Document){const y=c;h.node.type===Se.DocumentType&&((o=y.childNodes[0])==null?void 0:o.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),S.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?c.insertBefore(S,f.nextSibling):m&&m.parentNode?c.contains(m)?c.insertBefore(S,m):c.insertBefore(S,null):c.appendChild(S),g(S,h.node.id),this.usingVirtualDom&&S.nodeName==="#text"&&c.nodeName==="STYLE"&&((d=c.rules)==null?void 0:d.length)>0&&(c.rules=[]),Qe(S,this.mirror)){const y=this.mirror.getId(S),w=this.newDocumentQueue.find(v=>v.parentId===y);w&&(this.attachDocumentToIframe(w,S),this.newDocumentQueue=this.newDocumentQueue.filter(v=>v!==w))}(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(s,c,S,h)};t.adds.forEach(h=>{u(h)});const l=Date.now();for(;a.length;){const h=Yl(a);if(a.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",h);break}for(const o of h)i.getNode(o.value.parentId)?Yn(o,c=>{u(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",o)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),Xl(t.texts).forEach(h=>{var o;const d=i.getNode(h.id);if(!d)return t.removes.find(f=>f.id===h.id)?void 0:this.warnNodeNotFound(t,h.id);const c=d.parentElement;if(h.value&&c&&c.tagName==="STYLE"?d.textContent=_t(h.value,this.cache):d.textContent=h.value,this.usingVirtualDom){const f=d.parentNode;((o=f?.rules)==null?void 0:o.length)>0&&(f.rules=[])}}),t.attributes.forEach(h=>{var o;const d=i.getNode(h.id);if(!d)return t.removes.find(c=>c.id===h.id)?void 0:this.warnNodeNotFound(t,h.id);for(const c in h.attributes)if(typeof c=="string"){const f=h.attributes[c];if(f===null)d.removeAttribute(c),c==="open"&&$u(d,h);else if(typeof f=="string")try{if(c==="_cssText"&&(d.nodeName==="LINK"||d.nodeName==="STYLE"))try{const m=i.getMeta(d),p=Je({...m,attributes:{...m.attributes,...h.attributes}},{doc:d.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,h.attributes);const g=d.nextSibling,S=d.parentNode;if(p&&S){S.removeChild(d),S.insertBefore(p,g),i.replace(h.id,p);break}}catch{}if(c==="value"&&d.nodeName==="TEXTAREA"){const m=d;m.childNodes.forEach(g=>m.removeChild(g));const p=(o=d.ownerDocument)==null?void 0:o.createTextNode(f);p&&m.appendChild(p)}else d.setAttribute(c,f);c==="rr_open_mode"&&d.nodeName==="DIALOG"&&pt(d,h)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(c==="style"){const m=f,p=d;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const S=m[g];p.style.setProperty(g,S[0],S[1])}else{const S=m[g];p.style.setProperty(g,S)}}}})}applyScroll(t,r){var i,s;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const n=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(i=this.iframe.contentWindow)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if(n?.type===Se.Document)(s=a.defaultView)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch{}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch{}}applySelection(t){try{const r=new Set,i=t.ranges.map(({start:s,startOffset:a,end:n,endOffset:u})=>{const l=this.mirror.getNode(s),h=this.mirror.getNode(n);if(!l||!h)return;const o=new Range;o.setStart(l,a),o.setEnd(h,u);const d=l.ownerDocument,c=d?.getSelection();return c&&r.add(c),{range:o,selection:c}});r.forEach(s=>s.removeAllRanges()),i.forEach(s=>{var a;return s&&((a=s.selection)==null?void 0:a.addRange(s.range))})}catch{}}applyStyleSheetMutation(t){var r;let i=null;t.styleId?i=this.styleMirror.getStyle(t.styleId):t.id&&(i=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),i&&(t.source===A.StyleSheetRule?this.applyStyleSheetRule(t,i):t.source===A.StyleDeclaration&&this.applyStyleDeclaration(t,i))}applyStyleSheetRule(t,r){var i,s,a,n;if((i=t.adds)==null||i.forEach(({rule:u,index:l})=>{try{if(Array.isArray(l)){const{positions:h,index:o}=Wi(l),d=Ge(r.cssRules,h);d?.insertRule(u,o)}else{const h=l===void 0?void 0:Math.min(l,r.cssRules.length);r?.insertRule(u,h)}}catch{}}),(s=t.removes)==null||s.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:l,index:h}=Wi(u),o=Ge(r.cssRules,l);o?.deleteRule(h||0)}else r?.deleteRule(u)}catch{}}),typeof t.replace=="string")try{(a=r.replace)==null||a.call(r,t.replace)}catch{}if(typeof t.replaceSync=="string")try{(n=r.replaceSync)==null||n.call(r,t.replaceSync)}catch{}}applyStyleDeclaration(t,r){if(t.set){const i=Ge(r.rules,t.index);i?.style&&i.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const i=Ge(r.rules,t.index);i?.style&&i.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const i=this.mirror.getNode(t.id);if(!i)return;(r=t.styles)==null||r.forEach(u=>{var l;let h=null,o=null;if(De(i)?o=((l=i.ownerDocument)==null?void 0:l.defaultView)||null:i.nodeName==="#document"&&(o=i.defaultView),!!o)try{h=new o.CSSStyleSheet,this.styleMirror.add(h,u.styleId),this.applyStyleSheetRule({source:A.StyleSheetRule,adds:u.rules},h)}catch{}});const s=10;let a=0;const n=(u,l)=>{const h=l.map(o=>this.styleMirror.getStyle(o)).filter(o=>o!==null);De(u)?u.shadowRoot.adoptedStyleSheets=h:u.nodeName==="#document"&&(u.adoptedStyleSheets=h),h.length!==l.length&&a<s&&(setTimeout(()=>n(u,l),0+100*a),a++)};n(i,t.styleIds)}legacy_resolveMissingNode(t,r,i,s){const{previousId:a,nextId:n}=s,u=a&&t[a],l=n&&t[n];if(u){const{node:h,mutation:o}=u;r.insertBefore(h,i),delete t[o.node.id],delete this.legacy_missingNodeRetryMap[o.node.id],(o.previousId||o.nextId)&&this.legacy_resolveMissingNode(t,r,h,o)}if(l){const{node:h,mutation:o}=l;r.insertBefore(h,i.nextSibling),delete t[o.node.id],delete this.legacy_missingNodeRetryMap[o.node.id],(o.previousId||o.nextId)&&this.legacy_resolveMissingNode(t,r,h,o)}}moveAndHover(t,r,i,s,a){const n=this.mirror.getNode(i);if(!n)return this.debugNodeNotFound(a,i);const u=Jn(n,this.iframe),l=t*u.absoluteScale+u.x,h=r*u.absoluteScale+u.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${h}px`,s||this.drawMouseTail({x:l,y:h}),this.hoverElements(n)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:i,strokeStyle:s,duration:a}=this.config.mouseTail===!0?Yr:Object.assign({},Yr,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=i,u.lineCap=r,u.strokeStyle=s,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>u.lineTo(l.x,l.y)),u.stroke())};this.tailPositions.push(t),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),n()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let i=t;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type!==T.IncrementalSnapshot?!1:t.data.source>A.Mutation&&t.data.source<=A.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(W.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(nn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(nn,...t)}}const{addCustomEvent:Vu}=Le,{freezePage:Gu}=Le,{takeFullSnapshot:Hu}=Le;export{T as E,ju as R,Le as r};
|