@harperfast/harper 5.2.6 → 5.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/resources/PrimaryRocksDatabase.js +2 -3
- package/dist/resources/PrimaryRocksDatabase.js.map +1 -1
- package/dist/resources/RecordEncoder.d.ts +16 -0
- package/dist/resources/RecordEncoder.js +93 -3
- package/dist/resources/RecordEncoder.js.map +1 -1
- package/dist/resources/Table.js +53 -0
- package/dist/resources/Table.js.map +1 -1
- package/dist/resources/graphql.js +1 -1
- package/dist/resources/graphql.js.map +1 -1
- package/dist/resources/tracked.js +5 -0
- package/dist/resources/tracked.js.map +1 -1
- package/npm-shrinkwrap.json +6 -6
- package/package.json +2 -2
- package/resources/DESIGN.md +5 -0
- package/resources/PrimaryRocksDatabase.ts +3 -3
- package/resources/RecordEncoder.ts +85 -3
- package/resources/Table.ts +60 -1
- package/resources/graphql.ts +1 -1
- package/resources/tracked.ts +4 -0
- package/studio/web/assets/{Chat-BNHY84-Z.js → Chat-etJeJv4a.js} +71 -95
- package/studio/web/assets/FloatingChat-BvmHsuVo.js +23 -0
- package/studio/web/assets/abnfDiagram-VCTEODGH-C0_BAZyO.js +1 -0
- package/studio/web/assets/{alertDialog-BaBrZQ4M.js → alertDialog-DIHt7Z0r.js} +1 -1
- package/studio/web/assets/apiToken-Bl5LC8EH.js +1 -0
- package/studio/web/assets/applications-Dta6Y0Rg.js +296 -0
- package/studio/web/assets/arc-CVRByUzA.js +1 -0
- package/studio/web/assets/architecture-7GRP2DOG-DNdx5tEU.js +1 -0
- package/studio/web/assets/architectureDiagram-5GKGNRK7-BWzrASgm.js +36 -0
- package/studio/web/assets/authStore-qKmCZcaf.js +3 -0
- package/studio/web/assets/blockDiagram-NRAW4CY4-BdJX9Khj.js +129 -0
- package/studio/web/assets/{button-DfBmT4rc.js → button-DhiX-njv.js} +1 -1
- package/studio/web/assets/c4Diagram-UCG6FXSJ-CI6MzGmQ.js +38 -0
- package/studio/web/assets/channel-DtCV8PTL.js +1 -0
- package/studio/web/assets/chevron-up-Df2c8uoU.js +1 -0
- package/studio/web/assets/chunk-75Z2AOVW-BT8tVmks.js +2 -0
- package/studio/web/assets/chunk-DU6HZSFF-9kAOOmI6.js +127 -0
- package/studio/web/assets/{chunk-2GRJ4B5K-DtwG__pv.js → chunk-F27PBJKO-BW7ao8AY.js} +1 -1
- package/studio/web/assets/{chunk-KEIR6QF5-BICK3FdT.js → chunk-FOHPRMQF-DHwB1DNv.js} +2 -2
- package/studio/web/assets/{chunk-5RXB4S5H-D3c7okHC.js → chunk-G27WJ6UU-COyLMcgK.js} +2 -2
- package/studio/web/assets/chunk-GMAD6QVW-BNyXpoQO.js +72 -0
- package/studio/web/assets/chunk-JQ64N6SF-Cyz1IeLf.js +1 -0
- package/studio/web/assets/{chunk-GF5L2VYU-DreJ7Snz.js → chunk-LCL6LL3I-HOzK_ppE.js} +3 -3
- package/studio/web/assets/chunk-OBVCFTLP-D4wWOqDQ.js +1 -0
- package/studio/web/assets/chunk-P2QGCYS3-DmIFY4d7.js +1 -0
- package/studio/web/assets/{chunk-KBJHAD2P-CLDPbAA-.js → chunk-POPQ4Y6H-BPrvMyKz.js} +1 -1
- package/studio/web/assets/{chunk-4I5QYGJK-D1FhvtQq.js → chunk-PWAF6VOD-2zB6IW9i.js} +1 -1
- package/studio/web/assets/chunk-R7TYR2AO-Irip67yr.js +10 -0
- package/studio/web/assets/chunk-RHFEMEQ7-2FgyI8YU.js +168 -0
- package/studio/web/assets/{chunk-6Q2QTUOP-QviMM6bR.js → chunk-SVP7TREG-FwtbH2QC.js} +1 -1
- package/studio/web/assets/chunk-TEH6E4GO-P87k5mNi.js +62 -0
- package/studio/web/assets/{chunk-XXDRQBXY-CaP_jixK.js → chunk-XXDRQBXY-BoGZu3HH.js} +1 -1
- package/studio/web/assets/classDiagram-DTDB5LWJ-DbO_dCNE.js +1 -0
- package/studio/web/assets/classDiagram-v2-JRS7N3AN-DbO_dCNE.js +1 -0
- package/studio/web/assets/{cose-bilkent-JH36ORCC-BVTNhTKD.js → cose-bilkent-JH36ORCC-Cuuf67Bh.js} +1 -1
- package/studio/web/assets/{createLucideIcon-BMkDbMrz.js → createLucideIcon-BKGPfjm2.js} +1 -1
- package/studio/web/assets/cssMode-IAbO_2KK.js +1 -0
- package/studio/web/assets/cynefin-OW5HDTMX-BRkpLFQV.js +1 -0
- package/studio/web/assets/cynefinDiagram-5FMLGOSQ-CHT1DaX6.js +62 -0
- package/studio/web/assets/cytoscape.esm-C2x7inlt.js +321 -0
- package/studio/web/assets/dagre-3AP2YEHR-DpUXBh63.js +4 -0
- package/studio/web/assets/dagre-PrKaheQc.js +1 -0
- package/studio/web/assets/diagram-S7CK7UJ4-BuymVFZT.js +30 -0
- package/studio/web/assets/diagram-UQ7AKVKN-CyP148RM.js +41 -0
- package/studio/web/assets/diagram-VSXAHHWV-CoCAg3M9.js +3 -0
- package/studio/web/assets/diagram-VX7I27RA-BpOqCFca.js +24 -0
- package/studio/web/assets/diagram-Z3DM3KII-Bfpw7Vbj.js +24 -0
- package/studio/web/assets/dialog-CBf0Mr1d.js +1 -0
- package/studio/web/assets/{dist-CeoU7cfW.js → dist-kYfyPZP9.js} +1 -1
- package/studio/web/assets/{dist-cY0BPcz0.js → dist-lkA3O3eM.js} +1 -1
- package/studio/web/assets/download-BtTOBem-.js +1 -0
- package/studio/web/assets/ebnfDiagram-PWID7BFC-DS_6aWqL.js +1 -0
- package/studio/web/assets/editor-CeRXEhRl.js +1 -0
- package/studio/web/assets/erDiagram-SSCWMZ5O-DJNk6Fgw.js +99 -0
- package/studio/web/assets/eventmodeling-NTZA5JFV-5jbe4A5P.js +1 -0
- package/studio/web/assets/flowDiagram-A5DVABFB-Dp9Ezlow.js +1 -0
- package/studio/web/assets/{ganttDiagram-PKOTCBZU-Cit41Zp3.js → ganttDiagram-EL5Y4UJY-2pOExxMY.js} +2 -2
- package/studio/web/assets/{getAnalytics-rTxZLIM5.js → getAnalytics-D4LKGeVy.js} +1 -1
- package/studio/web/assets/gitGraph-4MIJSDKK-CH5ZxwzF.js +1 -0
- package/studio/web/assets/gitGraphDiagram-WWUBYQGX-DVIsIhbO.js +106 -0
- package/studio/web/assets/html-DOV4s_YT.js +1 -0
- package/studio/web/assets/htmlMode-CdqjnAh4.js +1 -0
- package/studio/web/assets/index-CTqasm6g.js +824 -0
- package/studio/web/assets/index-Cxj2_wsl.css +1 -0
- package/studio/web/assets/index.lazy-VmcKgiEy.js +2 -0
- package/studio/web/assets/info-A6RAGUB7-CPQfTnaG.js +1 -0
- package/studio/web/assets/infoDiagram-RXCK75RN-DlwLYlwm.js +2 -0
- package/studio/web/assets/{ishikawaDiagram-WSZJBQD7-BJYRB-hU.js → ishikawaDiagram-5VMMS53U-BRXRp29U.js} +2 -2
- package/studio/web/assets/{javascript-CGzSV8Sd.js → javascript-Dj7yXfx5.js} +1 -1
- package/studio/web/assets/{journeyDiagram-NVQOT4AX-B8K4wuMz.js → journeyDiagram-EYS64GPL-B0ou8k0n.js} +1 -1
- package/studio/web/assets/jsonMode-khk65qzx.js +1 -0
- package/studio/web/assets/{kanban-definition-27J2QSJJ-DKFV1ovM.js → kanban-definition-3QL26DDD-uYg7iYzp.js} +11 -11
- package/studio/web/assets/languageServices-D_06p7dw.js +1 -0
- package/studio/web/assets/linear-Cnt8506Q.js +1 -0
- package/studio/web/assets/lspLanguageFeatures-DTA6wyQw.js +4 -0
- package/studio/web/assets/mermaid-parser.core-Ck-fC8b7.js +7 -0
- package/studio/web/assets/mermaid.core-CP8aNNYm.js +44 -0
- package/studio/web/assets/{mindmap-definition-FAOFIHXS-CKL4PdAv.js → mindmap-definition-FBJOCRG2-CgTZ-rit.js} +25 -25
- package/studio/web/assets/notifications-Bah46LXX.js +1 -0
- package/studio/web/assets/notifications-CBZXgxVc.js +1 -0
- package/studio/web/assets/packet-AYTQ26CC-DEyoPtPb.js +1 -0
- package/studio/web/assets/pegDiagram-XKGWAZYB-DrD-7sD9.js +1 -0
- package/studio/web/assets/pie-WAS4IAKB-wjj-EI1d.js +1 -0
- package/studio/web/assets/pieDiagram-E7YTZNPT-GntqDCzv.js +39 -0
- package/studio/web/assets/profile-QspOun_j.js +1 -0
- package/studio/web/assets/{quadrantDiagram-CIZ2JOQS-CSbsuWtH.js → quadrantDiagram-AXDQQJYC-0UeqXQGd.js} +1 -1
- package/studio/web/assets/radar-RG4KPBEZ-DFSA5h7k.js +1 -0
- package/studio/web/assets/railroad-74A4TZTK-CaOUG9wR.js +1 -0
- package/studio/web/assets/railroad-abnf-HS5TGJTU-Bc0Qi0WH.js +1 -0
- package/studio/web/assets/railroad-ebnf-LZEXJU2U-G8rVVZ2C.js +1 -0
- package/studio/web/assets/railroad-peg-WCYAUIDC-CrehKBhC.js +1 -0
- package/studio/web/assets/railroadDiagram-O6MQD6OU-yHUELZaV.js +1 -0
- package/studio/web/assets/regions-QdUi7bQ9.js +1 -0
- package/studio/web/assets/{editor.api-eUd8PqEu.js → register-Buvoxmb8.js} +139 -138
- package/studio/web/assets/{requirementDiagram-LRYGKXZP-ZIF0Wlho.js → requirementDiagram-EFPCY7ZU-DNEGFjuW.js} +2 -2
- package/studio/web/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/studio/web/assets/safeParse-DeaoCCWH.js +1 -0
- package/studio/web/assets/{sankeyDiagram-W5VNT64P-BcRESt9x.js → sankeyDiagram-P5KCCOFB-DpyAmSVR.js} +1 -1
- package/studio/web/assets/{sequenceDiagram-SI44F4Z6-OpgTeJNU.js → sequenceDiagram-WJ2MYXX4-TyaT7xNk.js} +1 -1
- package/studio/web/assets/setComponentFile-BI4E_iDe.js +1 -0
- package/studio/web/assets/setLocalStorage-D_kflv4U.js +1 -0
- package/studio/web/assets/setSessionStorage-B0bf71m4.js +1 -0
- package/studio/web/assets/setup-Cop6LBQN.js +2 -0
- package/studio/web/assets/src-CMc7m_Ut.js +1 -0
- package/studio/web/assets/stateDiagram-HBIQ2CUA-CeEdTArZ.js +1 -0
- package/studio/web/assets/stateDiagram-v2-4QOOHH4V-D4tuw9Su.js +1 -0
- package/studio/web/assets/status-DRu3zRgl.js +61 -0
- package/studio/web/assets/step-vX8bovaY.js +1 -0
- package/studio/web/assets/swimlanes-XN3QIQJK-B54FmF46.js +1 -0
- package/studio/web/assets/swimlanesDiagram-VK2B7HYN-XOhmNEvq.js +8 -0
- package/studio/web/assets/tabs-B_G5zscN.js +1 -0
- package/studio/web/assets/{time-D55sDum-.js → time-Cclkb7kQ.js} +1 -1
- package/studio/web/assets/{timeline-definition-Z64GVDOM-Dy5A_tK2.js → timeline-definition-24CTP7MA-D-a9ujbo.js} +5 -5
- package/studio/web/assets/toggleHighContrast-C0dJLmZ0.js +49 -0
- package/studio/web/assets/treeView-Q6P3EWNA-CrW_6JnS.js +1 -0
- package/studio/web/assets/treemap-WGGIJYW6-BxyYLdP_.js +1 -0
- package/studio/web/assets/tsMode-dbDiapTA.js +11 -0
- package/studio/web/assets/typescript-CT1826cL.js +1 -0
- package/studio/web/assets/useEntityRestURL-D1u1X_gE.js +1 -0
- package/studio/web/assets/useLocalStorage-Dtj1QS8_.js +1 -0
- package/studio/web/assets/{vendor-core-CddkYGh5.js → vendor-core-RCcadM3e.js} +1 -1
- package/studio/web/assets/vendor-datadog-BRv-mOv1.js +6 -0
- package/studio/web/assets/{vendor-react-BhazFIp8.js → vendor-react-Dyj4O3HE.js} +1 -1
- package/studio/web/assets/vendor-tanstack-BiFWSB3W.js +1 -0
- package/studio/web/assets/{vendor-ui-BLIveqaL.js → vendor-ui-vhu-UHhF.js} +11 -11
- package/studio/web/assets/{vennDiagram-T6HMQDX7-DRvMIiSo.js → vennDiagram-4TSXK5OY-Cy7s7Mpy.js} +3 -3
- package/studio/web/assets/wardley-WFR3VGLG-BeBL35g2.js +1 -0
- package/studio/web/assets/{wardleyDiagram-T6FBY63Y-B04FSA0i.js → wardleyDiagram-VM6X3IG4-BylmIGSg.js} +3 -3
- package/studio/web/assets/workers-FpR9_D2K.js +3 -0
- package/studio/web/assets/x-B9o9hsep.js +1 -0
- package/studio/web/assets/xml-ZjKUMjth.js +1 -0
- package/studio/web/assets/{xychartDiagram-ELKLHX3M-BE0X7RA7.js → xychartDiagram-S5SC5T6Z-CoKALMXr.js} +3 -3
- package/studio/web/assets/yaml-B6gXbZU6.js +1 -0
- package/studio/web/assets/{yaml.worker-Iyy2Pf1T.js → yaml.worker-BDL8_iuk.js} +153 -153
- package/studio/web/harper-studio_black.png +0 -0
- package/studio/web/index.html +18 -24
- package/studio/web/assets/FloatingChat-BbztUci0.js +0 -23
- package/studio/web/assets/abnfDiagram-N423BO3Z-BRuH0ywn.js +0 -1
- package/studio/web/assets/apiToken-D0x_S8Wq.js +0 -1
- package/studio/web/assets/applications-BU83fSEG.js +0 -296
- package/studio/web/assets/arc-3Xw6uabx.js +0 -1
- package/studio/web/assets/architecture-TIHT7OUA-CsHfPErM.js +0 -1
- package/studio/web/assets/architectureDiagram-T3A2C74G-DrwbS7Gp.js +0 -36
- package/studio/web/assets/array-BifhSqXX.js +0 -1
- package/studio/web/assets/authStore-B3IhXrn6.js +0 -3
- package/studio/web/assets/blockDiagram-VBNYF7ZC-DKN1mht5.js +0 -132
- package/studio/web/assets/c4Diagram-5PPSVZJV-CT9bmjm_.js +0 -10
- package/studio/web/assets/card-ByrPS_wa.js +0 -1
- package/studio/web/assets/channel-mnKBfsP-.js +0 -1
- package/studio/web/assets/chevron-right-CY-tr2sG.js +0 -1
- package/studio/web/assets/chunk-3NCLNEKW-BVj72ixc.js +0 -1
- package/studio/web/assets/chunk-5FCAYU7R-Dh5nylU8.js +0 -1
- package/studio/web/assets/chunk-5HE753X5-Bw-yg4kO.js +0 -1
- package/studio/web/assets/chunk-5JV3BV7I-Cy5pj3QY.js +0 -1
- package/studio/web/assets/chunk-5TONJI2A-DQOY3q1H.js +0 -2
- package/studio/web/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
- package/studio/web/assets/chunk-7Z6QIM7H-BJhESwQK.js +0 -10
- package/studio/web/assets/chunk-BIQX33UG-DZEsGuSn.js +0 -1
- package/studio/web/assets/chunk-CQNSW5MT-B8S09OIh.js +0 -1
- package/studio/web/assets/chunk-CYSBUYHQ-C1Rf4art.js +0 -1
- package/studio/web/assets/chunk-EMLP6XTP-RLD4nXpI.js +0 -1
- package/studio/web/assets/chunk-I66GZJ75-DHPYnKNr.js +0 -125
- package/studio/web/assets/chunk-J7OUQ5F2-DcY_kb6i.js +0 -2
- package/studio/web/assets/chunk-JG7HCLWE-BYfiSaVt.js +0 -2
- package/studio/web/assets/chunk-JQJVKLGR-DtEmbHZj.js +0 -156
- package/studio/web/assets/chunk-MOZMSUNE-XVucA-n6.js +0 -1
- package/studio/web/assets/chunk-NSK5VX7P-DDFNzCU_.js +0 -2
- package/studio/web/assets/chunk-OSBZ3O6U-CrKZOUOr.js +0 -1
- package/studio/web/assets/chunk-QBLGF6JB-CxAyS2mW.js +0 -1
- package/studio/web/assets/chunk-QR6OTTB3-Df7OCENk.js +0 -62
- package/studio/web/assets/chunk-R7FJI6CG-Cnn3gE-Y.js +0 -1
- package/studio/web/assets/chunk-RYQCIY6F-N0MDKk5G.js +0 -1
- package/studio/web/assets/chunk-U6XO7XAA-BFxjP5U3.js +0 -2
- package/studio/web/assets/chunk-UBXNYLIW-rn0yw1mp.js +0 -1
- package/studio/web/assets/chunk-W5SLKNZC-DKMlAWZk.js +0 -1
- package/studio/web/assets/chunk-WRU74C26-Dg10j8Pf.js +0 -70
- package/studio/web/assets/chunk-YOTPTUD7-D0vRKqYp.js +0 -1
- package/studio/web/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
- package/studio/web/assets/classDiagram-JCYQIIEL-BrXNP4fl.js +0 -1
- package/studio/web/assets/classDiagram-v2-OCEON4UE-BrXNP4fl.js +0 -1
- package/studio/web/assets/cssMode-DipmMR_-.js +0 -1
- package/studio/web/assets/cynefin-VYW2F7L2-Ds2Fw2Y0.js +0 -1
- package/studio/web/assets/cynefinDiagram-MW4NZA55-DcTzrsC5.js +0 -62
- package/studio/web/assets/cytoscape.esm-B-NFISlW.js +0 -321
- package/studio/web/assets/dagre-Buvkdvvj.js +0 -1
- package/studio/web/assets/dagre-VZM6K2ZE-CMyJ9QPU.js +0 -4
- package/studio/web/assets/diagram-7IWD3JNH-jEGuzdp3.js +0 -30
- package/studio/web/assets/diagram-B4RE2ZJO-Ba7wC7iw.js +0 -3
- package/studio/web/assets/diagram-LBJQPF4R-Bm7Wj_dF.js +0 -24
- package/studio/web/assets/diagram-Q27KOJAE-C-gdktLC.js +0 -24
- package/studio/web/assets/diagram-UB23O5K3-COBVIEEk.js +0 -41
- package/studio/web/assets/ebnfDiagram-BXEA7PRR-G-t56mVV.js +0 -1
- package/studio/web/assets/editor-BDfNodZS.js +0 -1
- package/studio/web/assets/erDiagram-JOGREHBK-DpHzpqx1.js +0 -85
- package/studio/web/assets/eventmodeling-45OFAUF4-CLEiVx5s.js +0 -1
- package/studio/web/assets/flowDiagram-UKHOOZJN-CIxxUUxn.js +0 -1
- package/studio/web/assets/getRegistrationInfo--NLLrics.js +0 -1
- package/studio/web/assets/gitGraph-TEB2WS4Q-CZFBqwW-.js +0 -1
- package/studio/web/assets/gitGraphDiagram-DS77QQ5N-DuGnRv2R.js +0 -106
- package/studio/web/assets/html-DmSSmgE8.js +0 -1
- package/studio/web/assets/htmlMode-B2LqJw1z.js +0 -1
- package/studio/web/assets/index-BO3NaEw8.css +0 -1
- package/studio/web/assets/index-BQB9R8Ug.js +0 -810
- package/studio/web/assets/index-BnYZFLIB.css +0 -1
- package/studio/web/assets/index.lazy-CtErm5q7.js +0 -13
- package/studio/web/assets/info-DKCQHKI2--1InqQeT.js +0 -1
- package/studio/web/assets/infoDiagram-6WML65LV-DliK38kp.js +0 -2
- package/studio/web/assets/isArrayLikeObject-BHDnhloL.js +0 -1
- package/studio/web/assets/jsonMode-BVS6P5Xk.js +0 -1
- package/studio/web/assets/languageServices-Bl-BvoAb.js +0 -1
- package/studio/web/assets/line-Bom3IjHi.js +0 -1
- package/studio/web/assets/linear-DwB_ruUT.js +0 -1
- package/studio/web/assets/lspLanguageFeatures-C7XtZA_w.js +0 -4
- package/studio/web/assets/map-BaFkSB1l.js +0 -1
- package/studio/web/assets/math-Bi_r_ZWc.js +0 -1
- package/studio/web/assets/mermaid-parser.core-Dd4RYr9Q.js +0 -4
- package/studio/web/assets/mermaid.core-Bbo24DGo.js +0 -11
- package/studio/web/assets/notifications-B8rDagJM.js +0 -1
- package/studio/web/assets/notifications-CPwYKDDH.js +0 -1
- package/studio/web/assets/packet-7NZHBO7P-BGMXB0XL.js +0 -1
- package/studio/web/assets/path-fybaL0A-.js +0 -1
- package/studio/web/assets/pegDiagram-VL7TDLO6-CWEktcBB.js +0 -1
- package/studio/web/assets/pie-RZYD4A2V-DgYg3tCt.js +0 -1
- package/studio/web/assets/pieDiagram-7S7Q4E2Y-DEAmZOqY.js +0 -39
- package/studio/web/assets/pollUnlessForbidden-DIDXGBc5.js +0 -1
- package/studio/web/assets/profile-D0hB1xdm.js +0 -1
- package/studio/web/assets/purify.es-DrVcFY1Q.js +0 -3
- package/studio/web/assets/queryClient-BLhQvmWC.js +0 -1
- package/studio/web/assets/radar-I7S5WNFK-Ag-zp_Rq.js +0 -1
- package/studio/web/assets/railroad-3IZDKUUU-aibJDIDV.js +0 -1
- package/studio/web/assets/railroad-abnf-AHOZXSZD-BBMEuvIl.js +0 -1
- package/studio/web/assets/railroad-ebnf-EBAXGLYW-Be1nseej.js +0 -1
- package/studio/web/assets/railroad-peg-LSFZ7HO6-DIvD-Eyb.js +0 -1
- package/studio/web/assets/railroadDiagram-AXF67PYL-BJWrgR10.js +0 -1
- package/studio/web/assets/react-VeAY02s6.js +0 -1
- package/studio/web/assets/react-redux-Ds7wf7Ax.js +0 -5
- package/studio/web/assets/regions-y_jxsBpN.js +0 -1
- package/studio/web/assets/register-3F1Tje_F.js +0 -2
- package/studio/web/assets/register-S_PdXsoi.js +0 -2
- package/studio/web/assets/rolldown-runtime-B0Z9INg1.js +0 -1
- package/studio/web/assets/select-CKgJgpkn.js +0 -1
- package/studio/web/assets/setComponentFile-DSHbURTI.js +0 -1
- package/studio/web/assets/setLocalStorage-CD_L8p_D.js +0 -1
- package/studio/web/assets/setup-J5SrM1Kp.js +0 -2
- package/studio/web/assets/src-DUvBCJIr.js +0 -1
- package/studio/web/assets/stateDiagram-OKZ733FA-D9oPLTjO.js +0 -1
- package/studio/web/assets/stateDiagram-v2-UEYNNEHI-CSD1wbuZ.js +0 -1
- package/studio/web/assets/status-IoJkDzlx.js +0 -61
- package/studio/web/assets/string-f6JzSHaO.js +0 -1
- package/studio/web/assets/swagger-ui-react-BlgSS25O.js +0 -240
- package/studio/web/assets/swimlanes-SLNWSIFB-BpeoNE9k.js +0 -2
- package/studio/web/assets/swimlanesDiagram-ULZ7WXOC-DHxwzxpp.js +0 -8
- package/studio/web/assets/table-BvFflPWi.js +0 -1
- package/studio/web/assets/tabs-Dd_ElZ36.js +0 -1
- package/studio/web/assets/textarea-a3RnTY31.js +0 -9
- package/studio/web/assets/toggleHighContrast-CyNC3SCQ.js +0 -49
- package/studio/web/assets/tokenization-CWuvR2gh.js +0 -7
- package/studio/web/assets/treeView-QDETBFTQ-uHZ-3Fz8.js +0 -1
- package/studio/web/assets/treemap-6X3UGDF4-BnUKyy3l.js +0 -1
- package/studio/web/assets/tsMode-CslzhcVk.js +0 -11
- package/studio/web/assets/typescript-Dtnury3t.js +0 -1
- package/studio/web/assets/useAuth-DiJUZS1C.js +0 -1
- package/studio/web/assets/useEntityRestURL-qfahJnvr.js +0 -1
- package/studio/web/assets/useLocalStorage-DetQlhBe.js +0 -1
- package/studio/web/assets/vendor-datadog-XDrpA25D.js +0 -6
- package/studio/web/assets/vendor-tanstack-FsM5XZNE.js +0 -1
- package/studio/web/assets/wardley-OPB4EBWU-Da7TLC2F.js +0 -1
- package/studio/web/assets/workers-BtibQGyk.js +0 -3
- package/studio/web/assets/x-D39AGKMb.js +0 -1
- package/studio/web/assets/xml-D41zWqPl.js +0 -1
- package/studio/web/assets/yaml-BFQ3mF1U.js +0 -1
- /package/studio/web/assets/{editor-jjEx9u7D.css → register-jjEx9u7D.css} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ee(){}ee.prototype=v.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=y.prototype=new ee;te.constructor=y,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function b(){}var x={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function ie(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ae(e,t){return ie(e.type,t,e.props)}function S(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function oe(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var se=/\/+/g;function C(e,t){return typeof e==`object`&&e&&e.key!=null?oe(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(b,b):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+C(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(se,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(S(o)&&(o=ae(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(se,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+C(a,u),c+=le(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+C(a,u++),c+=le(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return le(ce(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ue(e,t,n){if(e==null)return e;var r=[],i=0;return le(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function de(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var w=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},T={map:ue,forEach:function(e,t,n){ue(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ue(e,function(){t++}),t},toArray:function(e){return ue(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=T,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!re.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ie(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)re.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ie(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=S,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:de}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=x.T,n={};x.T=n;try{var r=e(),i=x.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(b,w)}catch(e){w(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),x.T=t}},e.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},e.use=function(e){return x.H.use(e)},e.useActionState=function(e,t,n){return x.H.useActionState(e,t,n)},e.useCallback=function(e,t){return x.H.useCallback(e,t)},e.useContext=function(e){return x.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return x.H.useEffect(e,t)},e.useEffectEvent=function(e){return x.H.useEffectEvent(e)},e.useId=function(){return x.H.useId()},e.useImperativeHandle=function(e,t,n){return x.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return x.H.useMemo(e,t)},e.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return x.H.useReducer(e,t,n)},e.useRef=function(e){return x.H.useRef(e)},e.useState=function(e){return x.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return x.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return x.H.useTransition()},e.version=`19.2.8`})),i=n(((e,t)=>{t.exports=r()}));function a(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function o(e){return a(e)===`object`}function s(e){return typeof e==`number`&&e>=0&&e<=100}function c(e){return typeof e==`string`||e instanceof RegExp||typeof e==`function`}function l(e,t){return u(e,t,p())}function u(e,t,n){if(t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=u(r[e],t[e],n);return r}let r=a(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==`__proto__`&&(r[e]=u(r[e],t[e],n));return r}function d(e){return l(void 0,e)}function f(...e){let t;for(let n of e)n!=null&&(t=l(t,n));return t}function p(){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}var m=`https://docs.datadoghq.com`,h=`More details:`,g={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},_=console,v={log:_.log,debug:_.debug,info:_.info,warn:_.warn,error:_.error};function ee(e){return{debug:v.debug.bind(_,e),log:v.log.bind(_,e),info:v.info.bind(_,e),warn:v.warn.bind(_,e),error:v.error.bind(_,e)}}var y=!1;function te(e){y=e}function ne(){return y}var b=globalThis,x=`WorkerGlobalScope`in b;function re(e){return S(e,b.location?.href).href}function ie(e){try{return!!S(e)}catch{return!1}}function ae(e){let t=S(e).pathname;return t[0]===`/`?t:`/${t}`}function S(e,t){let{URL:n}=se();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var oe;function se(){if(!oe){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??b}catch{t=b}oe={URL:t.URL},e?.remove()}return oe}var C=ee(`Datadog Browser SDK:`),ce=`${m}/real_user_monitoring/browser/troubleshooting`;function le(e,t){function n(e,t,n){n.value=r(n.value)}function r(e){return function(...t){return i(e,this,t)}}function i(e,t,n){try{return e.apply(t,n)}catch(e){a(e)}}function a(n){let r=t=>{ne()&&e.error(`[MONITOR]`,t)};r(n);try{t(n)}catch(e){r(e)}}return{monitored:n,monitor:r,callMonitored:i,monitorError:a}}var ue,{monitored:de,monitor:w,callMonitored:T,monitorError:E}=le(C,e=>ue?.(e));function fe(e){ue=e}function pe(e){let t=b.queueMicrotask;typeof t==`function`?t(w(e)):Promise.resolve().then(w(e))}var D=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function me(...e){return new D(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var he=class extends D{constructor(e,t){super(),this.maxBufferSize=e,this.onDrop=t,this.buffer=[],this.droppedCount=0}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(e)}subscribe(e){let t=!1;return pe(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){pe(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}},ge={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function _e(e){let t=new D;function n(){return e===ge.GRANTED}return{tryToInit(t){e||=t},onGrantedOnce(e){if(n())e();else{let r=t.subscribe(()=>{n()&&(e(),r.unsubscribe())})}},update(n){e=n,t.notify()},isGranted:n,observable:t}}var ve=`datad0g.com`,ye=`datadoghq.com`,be=`datadoghq.eu`,xe=`ddog-gov.com`,Se=`us2.ddog-gov.com`,Ce=[`ddsource`,`dd-api-key`,`dd-request-id`];function we(e){return Ce.every(t=>e.includes(t))}var O=1e3,k=60*O,Te=60*k,Ee=31536e6;function De(){return new Date().getTime()}function A(){return De()}function j(e,t){return t-e}function M(e){return typeof e==`number`?Math.round(e*1e6):e}function Oe(e,t){return e+t}function ke(){return performance.now()}function N(){return{relative:ke(),timeStamp:A()}}function Ae(){return{relative:0,timeStamp:Re()}}function je(e){return{relative:e,timeStamp:ze(e)}}function Me(e){return{relative:Ne(e),timeStamp:e}}function Ne(e){return e-Re()}function Pe(e){return Math.round(Oe(Re(),e))}function Fe(e){return e<Ee}function Ie(){return Math.round(De()-Oe(Re(),performance.now()))}var Le;function Re(){return Le===void 0&&(Le=performance.timing?.navigationStart??performance.timeOrigin),Le}function ze(e){let t=De()-performance.now();return t>Re()?Math.round(Oe(t,e)):Pe(e)}function Be(e,t,n){return{build(r,i){return He({proxy:e.proxy,site:e.site,path:`/api/v2/${t}`,parameters:Ue(e,t,r,i,n)})},trackType:t}}function Ve({replica:e,proxy:t,source:n},r){if(e)return Be({clientToken:e.clientToken,proxy:t,source:n,site:ye},r,r===`rum`?[`application.id=${e.applicationId}`]:void 0)}function He({proxy:e,site:t=ye,path:n,parameters:r=``,subdomain:i}){let a=n;if(r&&(a+=`?${r}`),typeof e==`string`){let t=`${re(e)}?ddforward=${encodeURIComponent(a)}`;return i&&(t+=`&ddforwardSubdomain=${i}`),t}if(typeof e==`function`)return e({path:n,parameters:r,subdomain:i});let o=t.split(`.`),s=o.pop(),c=`browser-intake-${o.join(`-`)}.${s}`;return i&&(c=`${i}.${c}`),`https://${c}${a}`}function Ue({clientToken:e,source:t=`browser`},n,r,{retry:i,encoding:a},o=[]){let s=[`ddsource=${t}`,`dd-api-key=${e}`,`dd-evp-origin-version=7.9.0`,`dd-evp-origin=browser`,`dd-request-id=${We()}`].concat(o);return a&&s.push(`dd-evp-encoding=${a}`),n===`rum`&&(s.push(`batch_time=${A()}`,`_dd.api=${r}`),i&&s.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),s.join(`&`)}function We(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,We)}var Ge={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},Ke={ALL:`all`,SAMPLED:`sampled`},qe={clientToken:{type:`string`,required:!0},service:{type:`string`},env:{type:`string`},version:{type:`string`},site:{type:`site`,default:ye},proxy:{type:`union`,variants:[{type:`string`},{type:`function`,signature:void 0}]},sessionSampleRate:{type:`percentage`,default:100},telemetrySampleRate:{type:`percentage`,default:20},telemetryConfigurationSampleRate:{type:`percentage`,default:5},telemetryUsageSampleRate:{type:`percentage`,default:5},silentMultipleInit:{type:`boolean`,default:!1,strict:!1},storeContextsAcrossPages:{type:`boolean`,default:!1,strict:!1},trackAnonymousUser:{type:`boolean`,default:!0,strict:!1},useSecureSessionCookie:{type:`boolean`,default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:`boolean`,default:!1,strict:!1},trackSessionAcrossSubdomains:{type:`boolean`,default:!1,strict:!1},allowedTrackingOrigins:{type:`match-option`,multiple:!0,strict:!1},trackingConsent:{type:`enum`,values:ge,default:ge.GRANTED},beforeSend:{type:`function`,signature:void 0},source:{type:`enum`,values:[`browser`,`flutter`,`unity`],default:`browser`,strict:!1},sessionPersistence:{type:`enum`,values:[`cookie`,`local-storage`,`memory`],multiple:!0,strict:!1},replica:{type:`schema`,schema:{clientToken:{type:`string`,required:!0},applicationId:{type:`string`}}},datacenter:{type:`string`},sdkVersion:{type:`string`},variant:{type:`string`}};function Je(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function P(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,P)}var Ye=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function Xe(e,t){for(Ye.lastIndex=0;;){let n=Ye.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function Ze(e){let t=new Map;for(Ye.lastIndex=0;;){let n=Ye.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function Qe(e){let t=new Map;for(Ye.lastIndex=0;;){let n=Ye.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function $e(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function et(e,t){return t?`${e}-v${t.split(`.`)[0]}`:e}function tt(...e){let t=e.filter(e=>!!e);return t.length>0?t:void 0}function nt(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r?.crossSite?`none`:`strict`,s=r?.domain?`;domain=${r.domain}`:``,c=r?.secure?`;secure`:``,l=r?.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function rt(e){let t=Xe(document.cookie,e);if(t!==``)return t}function it(e){return Ze(document.cookie).get(e)||[]}var at;function ot(e){return at||=Qe(document.cookie),at.get(e)}function st(e,t){nt(e,``,0,t)}var ct;function lt(e=b.location?.hostname??``,t=typeof document<`u`?document.referrer:``){if(!(typeof document>`u`)){if(ct===void 0){let n=ut(e,t);if(n){let e=`dd_site_test_${P()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!rt(e);)r=`${t.pop()}.${r}`,nt(e,`test`,O,{domain:r});st(e,{domain:r}),ct=r}}return ct}}function ut(e,t){try{return e||S(t).hostname}catch{}}function dt(e){let t={};if(t.secure=e.useSecureSessionCookie||e.usePartitionedCrossSiteSessionCookie,t.crossSite=e.usePartitionedCrossSiteSessionCookie,t.partitioned=e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=lt();if(!e)return;t.domain=e}return t}function ft(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){C.error(e)}return!1})}function F(e){return e}var pt=[`chrome-extension://`,`moz-extension://`];function mt(e){return pt.some(t=>e.includes(t))}function ht(e,t=``){return!mt(e)&&mt(t.split(`
|
|
2
|
+
`).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var gt="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",_t=`SDK initialized on a non-allowed domain.`;function vt(e,t){let n=F(b.location),r=n?n.origin:``,i=e.allowedTrackingOrigins;if(!i)return!ht(r,t)||(C.error(gt),!1);let a=ft(i,r);return a||C.error(_t),a}var yt=(e,t)=>e===`__proto__`?void 0:t;function bt(e){try{return JSON.parse(e,yt)}catch{}}function xt(e){return{...e}}function St(e,t){return Object.keys(e).some(n=>e[n]===t)}function Ct(e){return Object.keys(e).length===0}function wt(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}var Tt=function(e){return e.SESSION_REPLAY_RECORD_CANVAS=`session_replay_record_canvas`,e.TRACK_INTAKE_REQUESTS=`track_intake_requests`,e.TRACK_WEBSOCKETS=`track_websockets`,e}({}),Et=new Set;function Dt(e){Array.isArray(e)&&Ot(e.filter(e=>St(Tt,e)))}function Ot(e){e.forEach(e=>{Et.add(e)})}function kt(e){return Et.has(e)}function At(){return Et}function jt(e,t){let n=b,r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}function I(e,t){return jt(b,`setTimeout`)(w(e),t)}function L(e){jt(b,`clearTimeout`)(e)}function Mt(e,t){return jt(b,`setInterval`)(w(e),t)}function Nt(e){jt(b,`clearInterval`)(e)}function Pt(e,t,n){let r=n?.leading===void 0||n.leading,i=n?.trailing===void 0||n.trailing,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=I(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{L(s),a=!1,o=void 0}}}function R(){}var Ft=`?`;function It(e){let t=[],n=Yt(e,`stack`),r=String(e);if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
3
|
+
`).forEach(e=>{let n=Vt(e)||Ut(e)||Gt(e)||Jt(e);n&&(!n.func&&n.line&&(n.func=Ft),t.push(n))}),t.length>0&&tn()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&$t(r);){let e=r.constructor?.name||Ft;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:Yt(e,`message`),name:Yt(e,`name`),stack:t}}var Lt=`((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)`,Rt=`(?::(\\d+))`,zt=RegExp(`^\\s*at (.*?) ?\\(${Lt}${Rt}?${Rt}?\\)?\\s*$`,`i`),Bt=RegExp(`\\((\\S*)${Rt}${Rt}\\)`);function Vt(e){let t=zt.exec(e);if(!t)return;let n=t[2]?.indexOf(`native`)===0,r=t[2]?.indexOf(`eval`)===0,i=Bt.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Ft,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var Ht=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${Lt}${Rt}?${Rt}??\\s*$`,`i`);function Ut(e){let t=Ht.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ft,line:t[3]?+t[3]:void 0,url:t[2]}}var Wt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Gt(e){let t=Wt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Ft,line:+t[3],url:t[2]}}var Kt=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,qt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Jt(e){let t=Kt.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=qt.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||Ft,line:t[4]?+t[4]:void 0,url:t[3]}}function Yt(e,t){return o(e)&&typeof e[t]==`string`?e[t]:void 0}function Xt(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=Qt(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var Zt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function Qt(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=Zt.exec(e)),{name:t,message:n}}function $t(e){return String(e.constructor).startsWith(`class `)}var en;function tn(){if(en!==void 0)return en;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return en=$t(Object.getPrototypeOf(t))&&n.stack!==t.stack,en}function nn(e){let t=Error(e);t.name=`HandlingStack`;let n;return T(()=>{let e=It(t);e.stack=e.stack.slice(2),n=rn(e)}),n}function rn(e){let t=an(e);return e.stack.forEach(e=>{let n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`\n at ${n}${r} @ ${e.url}${i}${a}`}),t}function an(e){return`${e.name||`Error`}: ${e.message}`}function z(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`){if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=R;else return{stop:R}}let a=!1,{stop:o}=sn(e,t,i,function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments);return cn(n,{target:this,parameters:e,handlingStack:r?nn(`instrumented method`):void 0},()=>i.apply(this,e))});return{stop:()=>{a=!0,o()}}}function on(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)return{stop:R};let a=!1,o=function(){if(!new.target)return Reflect.apply(i,this,Array.from(arguments));let e=new.target===o?i:new.target;if(a)return Reflect.construct(i,arguments,e);let t=Array.from(arguments);return cn(n,{parameters:t,handlingStack:r?nn(`instrumented constructor`):void 0},()=>Reflect.construct(i,t,e))},s=ln(o,i),{stop:c}=sn(e,t,i,o);return{stop:()=>{a=!0,s(),c()}}}function sn(e,t,n,r){return e[t]=r,{stop:()=>{e[t]===r&&(e[t]=n)}}}function cn(e,t,n){let r;T(e,null,[{...t,onPostCall:e=>{r=e}}]);let i=n();return r&&T(r,null,[i]),i}function ln(e,t){for(let n of[].concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t))){let r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r)}let{stop:n}=sn(t.prototype,`constructor`,t.prototype.constructor,e);return n}function un(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r?.set||!r.configurable)return{stop:R};let i=R,a=(e,t)=>{I(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var B=function(e){return e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`,e.UNHANDLED_REJECTION=`unhandledrejection`,e}({});function V(e,t,n,r){return dn(e,[t],n,r)}function dn(e,t,n,{once:r,capture:i,passive:a}={}){let o=w(e=>{!e.isTrusted&&!e.__ddIsTrusted&&pn===!1||(r&&u(),n(e))}),s=a?{capture:i,passive:a}:i,c=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=jt(c,`addEventListener`);t.forEach(t=>l.call(e,t,o,s));function u(){let n=jt(c,`removeEventListener`);t.forEach(t=>n.call(e,t,o,s))}return{stop:u}}function fn(e,t){if(!e)return!1;try{return V(e,t,R).stop(),!0}catch{return!1}}var pn;function mn(e){pn!==!0&&(pn=e??!1)}var hn=1024,gn=1024*hn,_n=/[^\u0000-\u007F]/;function vn(e){return _n.test(e)?new TextEncoder().encode(e).length:e.length}function yn(e){if(e.length===1)return e[0];let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function bn(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=xn(Object.prototype),i=xn(Array.prototype),a=xn(Object.getPrototypeOf(e)),o=xn(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function xn(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):R}var Sn=220*hn,Cn=`$`,wn=3;function H(e,t=Sn){let n=xn(Object.prototype),r=xn(Array.prototype);try{let n=[],r=new WeakMap,i=Tn(e,Cn,void 0,n,r),a=JSON.stringify(i),o=a?a.length:0;if(o>t){An(t,`discarded`,e);return}for(;n.length>0&&o<t;){let i=n.shift(),a=0;if(Array.isArray(i.source))for(let s=0;s<i.source.length;s++){let c=Tn(i.source[s],i.path,s,n,r);if(o+=c===void 0?4:JSON.stringify(c).length,o+=a,a=1,o>t){An(t,`truncated`,e);break}i.target[s]=c}else for(let s in i.source)if(Object.prototype.hasOwnProperty.call(i.source,s)){let c=Tn(i.source[s],i.path,s,n,r);if(c!==void 0&&(o+=JSON.stringify(c).length+a+s.length+wn,a=1),o>t){An(t,`truncated`,e);break}i.target[s]=c}}return i}finally{n(),r()}}function Tn(e,t,n,r,i){let a=kn(e);if(!a||typeof a!=`object`)return En(a);let o=Dn(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function En(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function Dn(e){try{if(e instanceof Event)return On(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t?.[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function On(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?Dn(e.currentTarget):null,target:e.target?Dn(e.target):null}}function kn(e){if((typeof e!=`object`||!e)&&typeof e!=`function`)return e;let t=e;if(typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function An(e,t,n){C.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var jn=`No stack, consider using an instance of Error`;function Mn(e){try{return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}catch{return!1}}function Nn(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[Pn(`sdk_version`,a??`7.9.0`)];return t&&s.push(Pn(`env`,t)),n&&s.push(Pn(`service`,n)),r&&s.push(Pn(`version`,r)),i&&s.push(Pn(`datacenter`,i)),o&&s.push(Pn(`variant`,o)),s}function Pn(e,t){let n=t?`${e}:${t}`:e;return(n.length>200||In(n))&&C.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${h} ${m}/getting_started/tagging/#defining-tags`),Fn(n)}function Fn(e){return e.replace(/,/g,`_`)}function In(e){return RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e)}function Ln(e,t){let n=b.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var Rn={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`},zn=function(e){return e.UNCAUGHT=`Uncaught`,e.PROVIDED=`Provided`,e}({}),Bn=function(e){return e.HANDLED=`handled`,e.UNHANDLED=`unhandled`,e}({});function Vn(){let{navigator:e}=b;return{status:e?.onLine?`connected`:`not_connected`,interfaces:e?.connection?.type?[e.connection.type]:void 0,effective_type:e?.connection?.effectiveType}}function Hn(e,t){return jt(b,`fetch`)(e,t)}function Un(e){return e>=500}function Wn(e){try{return e.clone()}catch{return}}var Gn=80*hn,Kn=20*gn,qn=k,Jn=O;function Yn(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?Zn(e,t,n,a,{onSuccess:()=>Qn(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),Xn(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function Xn(e,t,n,r,i){e.transportStatus===2&&I(()=>{Zn(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=Jn,Qn(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(qn,e.currentBackoffTime*2),Xn(e,t,n,r,i)}})},e.currentBackoffTime)}function Zn(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),$n(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function Qn(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i(`Reached max ${r} events size queued for upload: ${Kn/gn}MiB`),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=tr();o.size()>0;)Yn(o.dequeue(),t,n,r,i,a)}function $n(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Un(e.status))}function er(){return{transportStatus:0,currentBackoffTime:Jn,bandwidthMonitor:nr(),queuedPayloads:tr(),queueFullReported:!1}}function tr(){let e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=Kn}}}function nr(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Gn&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var rr=16*hn;function ir(e,t,n=rr){let r=new D,i=er();return{observable:r,send:n=>{for(let a of e)Yn(n,i,(e,t)=>{cr(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)ar(r,n,t)}}}function ar(e,t,n){if(n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){sr(e)}cr(e,n)}var or=!1;function sr(e){or||(or=!0,E(e))}function cr(e,t,n){Hn(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(w(e=>n?.({status:e.status,type:e.type}))).catch(w(()=>n?.({status:0})))}var lr=function(e){return e.RECORDS=`records`,e.PROFILES=`profiles`,e}({});function ur(){let e=mr();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.()||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(e.getIsTraceSampled?.()||`null`)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function dr(e){let t=ur();return!!t&&t.getCapabilities().includes(e)}function fr(e=b.location?.hostname){return ur()?.getAllowedWebViewHosts().some(t=>pr(e,t))??!1}function pr(e,t){if(!t.includes(`*`))return e===t||e.endsWith(`.${t}`);let n=t.split(`*`);if(n.length!==2)return C.error(`Invalid WebView host pattern "${t}": only one wildcard (*) is supported.`),!1;let[r,i]=n;return e.length>r.length+i.length&&e.startsWith(r)&&e.endsWith(i)}function mr(){return b.DatadogEventBridge}function hr(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}function gr(e){return Object.values(e)}function _r(e){return Object.entries(e)}var vr={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function yr(){return new D(e=>{let t=b.window;if(!t)return;let{stop:n}=dn(t,[`visibilitychange`,`freeze`],t=>{t.type===`visibilitychange`&&document.visibilityState===`hidden`?e.notify({reason:vr.HIDDEN}):t.type===`freeze`&&e.notify({reason:vr.FROZEN})},{capture:!0}),r=V(t,`beforeunload`,()=>{e.notify({reason:vr.UNLOADING})}).stop;return()=>{n(),r()}})}function br(e){return gr(vr).includes(e)}function xr(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=vn(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var Sr=30*O,Cr=x?1:50;function wr({pageMayExitObservable:e}){let t,n=new D,r=e.subscribe(e=>{t=e.reason;try{n.notify(e.reason)}finally{t=void 0}s(e.reason)}),i=new D(()=>()=>{r.unsubscribe()}),a=0,o=0;function s(e){if(o===0)return;let t=o,n=a;o=0,a=0,u(),i.notify({reason:e,messagesCount:t,bytesCount:n})}let c;function l(){c===void 0&&(c=I(()=>{s(`duration_limit`)},Sr))}function u(){L(c),c=void 0}return{flushObservable:i,prepareUrgentFlushObservable:n,forceFlush:s,get messagesCount(){return o},notifyBeforeAddMessage(e){a+e>=rr&&s(t??`bytes_limit`),o+=1,a+=e,l()},notifyAfterAddMessage(e=0){a+=e,o>=Cr?s(t??`messages_limit`):a>=rr&&s(t??`bytes_limit`)}}}var Tr=256*hn;function Er({encoder:e=xr(),endpoints:t,reportError:n}){let r=F(ir)(t,n),i=F(yr)(),a=F(wr)({pageMayExitObservable:i}),o={},s=a.flushObservable.subscribe(e=>u(e));function c(t,n,r){if(r!==void 0){let i;o[r]===void 0?(a.notifyBeforeAddMessage(n),i=0):i=n-e.estimateEncodedBytesCount(o[r]),o[r]=t,a.notifyAfterAddMessage(i)}else a.notifyBeforeAddMessage(n),e.write(e.isEmpty?t:`\n${t}`,e=>{a.notifyAfterAddMessage(e-n)})}function l(t,n){let r=bn(t),i=e.estimateEncodedBytesCount(r);if(i>=Tr){C.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Tr/hn}KiB. ${h} ${ce}/#technical-limitations`);return}c(r,i,n)}function u(t){let n=gr(o).join(`
|
|
4
|
+
`);o={};let i=br(t.reason),a=i?r.sendOnExit:r.send;if(i&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&a(Dr(t));let r=[t.pendingData,n].filter(Boolean).join(`
|
|
5
|
+
`);r&&a({data:r,bytesCount:vn(r)})}else n&&e.write(e.isEmpty?n:`\n${n}`),e.finish(e=>{a(Dr(e))})}return{get isEmpty(){return a.messagesCount===0},add:l,upsert:l,prepareUrgentFlushObservable:a.prepareUrgentFlushObservable,forceFlush:a.forceFlush,flushObservable:a.flushObservable,stop:s.unsubscribe}}function Dr(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var Or={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`};function kr(){let e=[];return{register(t){return e.push(t),{unregister(){e=e.filter(e=>e!==t)}}},trigger(t){let n=[];for(let r of e){let e=r(t);if(e===`DISCARDED`)return Ar;e!==`SKIPPED`&&n.push(e)}return f(...n)}}}var Ar=`DISCARDED`,U=`SKIPPED`;function jr(e){return e!==0&&Math.random()*100<=e}var Mr=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],Nr=function(e){return e.LOGS=`browser-logs-sdk`,e.RUM=`browser-rum-sdk`,e}({}),Pr=function(e){return e.CUSTOMER_DATA_METRIC_NAME=`Customer data measures`,e.REMOTE_CONFIGURATION_METRIC_NAME=`remote configuration metrics`,e.RECORDER_INIT_METRICS_TELEMETRY_NAME=`Recorder init metrics`,e.SEGMENT_METRICS_TELEMETRY_NAME=`Segment network request metrics`,e.SESSION_MANAGER_INIT_METRICS_TELEMETRY_NAME=`Session manager init metrics`,e}({}),Fr=1,Ir=[xe,Se],Lr=15,Rr;function zr(){return Rr||=new he(100),Rr}function Br(e,t,n,r){let i=new D,{enabled:a,metricsEnabled:o}=Vr(e,t,n,i,r),{stop:s}=Hr(t,i);return{stop:s,enabled:a,metricsEnabled:o}}function Vr(e,t,n,r,i,a=Fr,o=Lr){let s={},c=!Ir.includes(t.site)&&jr(t.telemetrySampleRate),l={[Or.LOG]:c,[Or.CONFIGURATION]:c&&jr(t.telemetryConfigurationSampleRate),[Or.USAGE]:c&&jr(t.telemetryUsageSampleRate),metric:c&&jr(a)},u=Ur(),d=zr();return d.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!l.metric||!l[t.type])return;let a=i||t.status||t.type,c=s[a];if(c||=s[a]=new Set,c.size>=o)return;let d=bn(t);if(c.has(d))return;let f=n.trigger({startTime:N().relative});if(f===`DISCARDED`)return;let m=p(f,e,t,u);r.notify(m),Ln(`telemetry`,m),c.add(d)}),d.unbuffer(),fe(Kr),{enabled:c,metricsEnabled:l.metric};function p(e,n,r,a){return f({type:`telemetry`,date:N().timeStamp,service:n,version:`7.9.0`,source:`browser`,_dd:{format_version:2},telemetry:f(r,{runtime_env:a,connectivity:Vn(),sdk_setup:`npm`,sdk_name:i}),ddtags:Nn(t).join(`,`),experimental_features:Array.from(At())},e)}}function Hr(e,t){let n=[];if(fr()){let e=ur(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[Be(e,`rum`)],i=Ve(e,`rum`);i&&Wr(e)&&r.push(i);let a=Er({endpoints:r,reportError:R});n.push(a.stop);let o=t.subscribe(a.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function Ur(){return{is_local_file:b.location?.protocol===`file:`,is_worker:x}}function Wr(e){return e.site===ve}function Gr(e,t){ne()&&C.debug(`[Telemetry]`,e,t),zr().notify({rawEvent:{type:Or.LOG,message:e,status:`debug`,...t}})}function Kr(e,t){zr().notify({rawEvent:{type:Or.LOG,status:`error`,...Yr(e),...t}})}function qr(e){zr().notify({rawEvent:{type:Or.CONFIGURATION,configuration:e}})}function Jr(e,t){zr().notify({rawEvent:{type:Or.LOG,message:e,status:`debug`,...t},metricName:e})}function W(e){zr().notify({rawEvent:{type:Or.USAGE,usage:e}})}function Yr(e){if(Mn(e)){let t=It(e);return{error:{kind:t.name,stack:rn(Xr(t))},message:t.message}}return{error:{stack:jn},message:`Uncaught ${bn(e)}`}}function Xr(e){return e.stack=e.stack.filter(e=>!e.url||Mr.some(t=>e.url.startsWith(t))),e}var Zr=new Map,Qr=new Set,$r=!1;function ei(){let e=b.window?.DD_SOURCE_CODE_CONTEXT;if(!e)return;let t=!1,n=!1,r=!1;for(let[i,a]of Object.entries(e)){if(t||=a.ddDebugId!==void 0,n||=a.service!==void 0,r||=a.version!==void 0,Qr.has(i))continue;Qr.add(i);let e=It({stack:i}).stack[0]?.url;e&&!Zr.has(e)&&Zr.set(e,a)}$r||($r=!0,W({feature:`source-code-context`,use_debug_id:t,use_service:n,use_version:r}))}function ti(e){ei();let t=new Set,n=[];for(let r of e){if(t.has(r))continue;t.add(r);let e=Zr.get(r)?.ddDebugId;e!==void 0&&n.push({url:r,id:e})}return n.length?n:void 0}function ni(e){return ei(),Zr.get(e)}function ri({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=Mn(e);return{source:n,type:t?t.name:void 0,message:ci(t,a,i,e),stack:t?rn(t):r?jn:void 0}}function ii(e){return e?.stack.map(e=>e.url).filter(e=>!!e)??[]}function ai(e,t){let n=t.flatMap(({stackTrace:e})=>ii(e));return ti(ii(e).concat(n))}function oi(e){let t=[],n=e.cause;for(;n!=null&&t.length<10;){let e=Mn(n),r=e?It(n):void 0;t.push({originalError:n,stackTrace:r}),n=e?n.cause:void 0}return t}function si({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){let l=e??(Mn(t)?It(t):void 0),u=Mn(t)?oi(t):[],d=ri({originalError:t,stackTrace:l,source:s,useFallbackStack:o,nonErrorPrefix:a}),f=u.map(({originalError:e,stackTrace:t})=>ri({originalError:e,stackTrace:t,source:s,useFallbackStack:!1}));return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...d,debugIds:ai(l,u),causes:f.length?f:void 0,fingerprint:li(t),context:ui(t)}}function ci(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${bn(H(r))}`:bn(H(r))}function li(e){return Mn(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function ui(e){if(o(e))return e.dd_context}function di(){return new D(e=>{let t=(t,n)=>{let r=si({stackTrace:n,originalError:t,startClocks:N(),nonErrorPrefix:`Uncaught`,source:Rn.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=fi(t),{stop:r}=pi(t);return()=>{n(),r()}})}function fi(e){return z(b,`onerror`,({parameters:[t,n,r,i,a]})=>{let o;Mn(a)||(o=Xt(t,n,r,i)),e(a??t,o)})}function pi(e){return fn(b.window,`unhandledrejection`)?z(b,`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)}):{stop:R}}function mi(e,t){return(...n)=>{try{return e(...n)}catch(e){C.error(t,e)}}}function hi(e){let t={version:`7.9.0`,onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get(){return te},enumerable:!1}),t}function gi(e,t,n){let r=e[t];r&&!r.q&&r.version&&C.warn(`SDK is loaded more than once. This is unsupported and might have unexpected behavior.`),e[t]=n,r?.q&&r.q.forEach(e=>mi(e,`onReady callback threw an error:`)())}function _i(e,t){t.silentMultipleInit||C.error(`${e} is already initialized.`)}var vi={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function yi(e){let t=[];e.includes(vi.cspViolation)&&t.push(xi());let n=e.filter(e=>e!==vi.cspViolation);return n.length&&t.push(bi(n)),me(...t)}function bi(e){return new D(t=>{if(!window.ReportingObserver)return;let n=w((e,n)=>e.forEach(e=>t.notify(Si(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function xi(){return new D(e=>{if(!fn(document,`securitypolicyviolation`))return;let{stop:t}=V(document,`securitypolicyviolation`,t=>{e.notify(Ci(t))});return t})}function Si(e){let{type:t,body:n}=e;return wi({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:Ti(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function Ci(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return wi({type:e.effectiveDirective,message:`${vi.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:Ti(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${$e(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber)})}function wi(e){return{startClocks:N(),source:Rn.REPORT,handling:`unhandled`,...e}}function Ti(e,t,n,r,i){return n?rn({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function Ei(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function Di(e){return Array.isArray(e)&&e.length>0}var Oi=1/0,ki=k,Ai,ji=new Set;function Mi(){ji.forEach(e=>e())}function Ni({expireDelay:e,maxEntries:t}){let n=[],r=()=>{if(!e)return;let t=ke()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};e&&(Ai||=Mt(()=>Mi(),ki),ji.add(r));function i(e,r){let i={value:e,startTime:r,endTime:Oi,remove:()=>{Ei(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=Oi,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t?.endTime===Oi&&t.close(e)}function s(e=Oi,t=0){let r=Oe(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e=Oi,t=0){let r=Oe(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime)}function l(e){return n.filter(t=>t.startTime===e)}function u(){n=[]}function d(){ji.delete(r),ji.size===0&&Ai&&(Nt(Ai),Ai=void 0)}return{add:i,find:a,closeActive:o,findAll:s,findAllEntries:c,getEntries:l,reset:u,stop:d}}function Pi(e,t){return e*t/100}var Fi=new Map;function Ii(e,t){if(t===100)return!0;if(t===0)return!1;let n=Fi.get(t);if(e===n?.sessionId)return n.decision;let r=Li(BigInt(`0x${e.split(`-`)[4]}`),t);return Fi.set(t,{sessionId:e,decision:r}),r}function Li(e,t){let n=1n<<64n,r=e*1111111111111111111n%n;return Number(r)<=t/100*Number(n)}var Ri=4*Te,zi=15*k,Bi=Ee,Vi={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`},Hi=`dd_cookie_test_`;async function Ui(e,t){let n=`${Hi}${P()}`,r=`test`,i=e(n,t);try{return await i.getAllAndSet(()=>({value:r,expireDelay:k})),(await i.getAll()).includes(r)}catch(e){return C.error(e),!1}finally{try{await i.delete()}catch{}}}function Wi(e,t){let n=F(b.cookieStore),r=new D(()=>V(n,`change`,t=>{(t.changed.some(t=>t.name===e)||t.deleted.some(t=>t.name===e))&&r.notify()}).stop);return{async getAll(){return(await n.getAll(e)).map(e=>e.value)},delete(){return n.delete({name:e,domain:t.domain,path:`/`,partitioned:t.partitioned})},async getAllAndSet(r){let i=await n.getAll(e),{value:a,expireDelay:o}=r(i.map(e=>e.value));try{await n.set({name:e,value:a,expires:De()+o,path:`/`,sameSite:t.crossSite?`none`:`strict`,domain:t.domain,secure:t.secure,partitioned:t.partitioned})}catch(n){if(!e.startsWith(`dd_cookie_test_`)){let r=it(e);Gr(`Failed to set cookie using Cookie Store API`,{"error.message":n.message,newValue:a,cookieOptions:{...t},cookies:i.map(e=>({...e})),cookieCount:i.length,documentCookies:r})}}},observable:r}}var Gi=O;function Ki(e,t){let n=it(e),r=new D(()=>{let t=Mt(()=>{i(it(e))},Gi);return()=>{Nt(t)}});function i(e){String(e)!==String(n)&&(n=e,r.notify())}return{getAll(){return Promise.resolve(it(e))},async getAllAndSet(n){let{value:r,expireDelay:a}=n(it(e));nt(e,r,a,t),await Promise.resolve(),i([r])},async delete(){st(e,t),await Promise.resolve(),i([])},observable:r}}function qi(){let e=F(b.cookieStore);return!!(e&&fn(e,`change`))}var Ji=`_dd_s_v2`,Yi=`_dd_s`,Xi=`_DD_SESSION`;function Zi(){return{type:Vi.MEMORY}}function Qi(){let e=b;e._DD_SESSION||(e[Xi]={});let t=e[Xi],n=new D,r=t.onChange;return t.onChange=e=>{r?.(e),n.notify(e)},{async setSessionState(e,n){let r=xt(e(t.state??{}));t.state=r,await Promise.resolve(),t.onChange?.(r)},sessionObservable:n}}var $i=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function ea(e){return!!e&&(e.indexOf(`&`)!==-1||$i.test(e))}function ta(e){return e.created?Number(e.created):void 0}function na(e){let t=e.expire&&Number(e.expire),n=ta(e);if(t&&n)return Math.min(t,n+Ri)}function ra(e,t){let n={isExpired:`1`};return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function ia(e){return Ct(e)}function aa(e){return e.isExpired!==void 0||!oa(e)}function oa(e){let t=na(e);return t?De()<t:!1}function sa(e){e.expire=String(De()+zi)}function ca(e){return _r(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function la(e){let t={};return ea(e)&&e.split(`&`).forEach(e=>{let n=$i.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}function ua(e,t){return ia(e)?(t.trackAnonymousUser&&(e.anonymousId=P()),ra(e,t)):e}function da(e,t){if(ia(e))return e;let n=e;return aa(e)&&(n=ra(e,t)),n.id||(n.id=P(),n.created=String(De())),t.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=P()),delete n.isExpired,sa(n),n}function fa(e){return aa(e)||ia(e)||!e.id||sa(e),e}async function pa(e){let t=dt(e);if(t){if(qi()&&await Ui(Wi,t))return{type:Vi.COOKIE,cookieOptions:t,cookieApi:1};if(await Ui(Ki,t))return{type:Vi.COOKIE,cookieOptions:t,cookieApi:0}}}var ma;function ha(e,t){let{cookieOptions:n,cookieApi:r}=e,i=new D,a=!!t.trackAnonymousUser,o=ba(n),s=F(_a)(r,n),c=!0;s.observable.subscribe(()=>{s.getAll().then(e=>{i.notify(va(e,o))}).catch(e=>E(Error(`Error while reading session cookies on change: ${e}`)))});function l(e){return s.getAllAndSet(t=>{let r=va(t,o);return c&&Ct(r)&&(r=va(it(Yi),o)),c=!1,{value:ya(e(r),n),expireDelay:a?Bi:Ri}})}return{async setSessionState(e,t){typeof navigator<`u`&&navigator.locks?await navigator.locks.request(Ji,()=>l(e)).catch(e=>{if(!ga(e))throw e}):(ma=(ma??Promise.resolve()).then(()=>l(e)),await ma)},sessionObservable:i}}function ga(e){return e instanceof Error?e.name===`AbortError`||e.message.includes(`no longer runnable`):!1}function _a(e,t){return e===1?Wi(Ji,t):Ki(Ji,t)}function va(e,t){let n;for(let r of e.slice().reverse())if(n=la(r),n.c===t)break;return delete n?.c,n??{}}function ya(e,t){return ca(Ct(e)?e:{...e,c:ba(t)})}function ba(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=0,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}var xa=`_dd_test_`;function Sa(){try{let e=P(),t=`${xa}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Vi.LOCAL_STORAGE}:void 0}catch{return}}function Ca(){let e=new D(e=>V(window,`storage`,t=>{t.key===`_dd_s_v2`&&t.storageArea===localStorage&&e.notify(la(t.newValue))}).stop),t=!0;return{async setSessionState(n,r){let i=la(localStorage.getItem(Ji));t&&ia(i)&&(i=la(localStorage.getItem(Yi))),t=!1;let a=n(i);localStorage.setItem(Ji,ca(a)),await Promise.resolve(),e.notify(a)},sessionObservable:e}}async function wa(e){let t=Ta(e.sessionPersistence);for(let n of t){let t=await Ea(n,e);if(t!==void 0)return t}}function Ta(e){return e===void 0?x?[Vi.MEMORY]:[Vi.COOKIE]:e}function Ea(e,t){switch(e){case Vi.COOKIE:return pa(t);case Vi.LOCAL_STORAGE:return Sa();case Vi.MEMORY:return Zi();default:C.error(`Invalid session persistence '${String(e)}'`);return}}function Da(e,t){switch(e.type){case Vi.COOKIE:return ha(e,t);case Vi.LOCAL_STORAGE:return Ca();case Vi.MEMORY:return Qi()}}var Oa=k,ka=1e3,Aa=Te*12,ja=[];async function Ma(e,t){let n=ke(),r=new D,i=new D,a=await F(wa)(e);if(!a){C.warn(`No storage available for session. We will not send any data.`);return}let o=F(Da)(a,e),s=Ni({maxEntries:ka});ja.push(()=>s.stop());let c=!1,{throttled:l,cancel:u}=Pt(()=>{c=!1,o.setSessionState(t=>da(t,e),`expandOrRenewOnActivity`).catch(E)},O);ja.push(u);let d;ja.push(()=>L(d));let f=!1;ja.push(()=>{f=!0});let p=await m().catch(e=>E(Error(`Error while resolving initial session state: ${e}`)));if(!p||f)return;for(;!t.isGranted();)if(y(),await new Promise(e=>t.onGrantedOnce(e)),f||(p=await m().catch(E),!p||f))return;return s.add(te(p),Ae().relative),g(p),h(),_(),Jr(`Session manager init metrics`,{metrics:{duration:j(n,ke())}}),v();async function m(){let t={};return await o.setSessionState(n=>(t=da(ua(n,e),e),t),`initialize`),t}function h(){let e=o.sessionObservable.subscribe(e=>{g(e),ee(e)});ja.push(()=>e.unsubscribe())}function g(n){L(d);let r=na(n);r&&(d=I(()=>{o.setSessionState(n=>aa(n)?(t.isGranted()||delete n.anonymousId,ra(n,e)):n,`expireOnTimeout`).catch(E)},r-De()))}function _(){t.observable.subscribe(()=>{t.isGranted()?(c=!1,o.setSessionState(t=>da(t,e),`expandOrRenewOnConsent`).catch(E)):y()}),x||(Pa(()=>{t.isGranted()&&l()}),Fa(()=>{c||o.setSessionState(e=>fa(e),`expandOnVisibility`).catch(E)}),Ia(()=>{o.setSessionState(t=>ua(t,e),`initializeOnResume`).catch(E)}))}function v(){return{findSession:(e,t)=>s.find(e,t),findTrackedSession:(t,{returnInactive:n=!1,maxAge:r=Aa}={})=>{let i=s.find(t,{returnInactive:n});if(!(!i||i.id===`invalid`||!Ii(i.id,e.sessionSampleRate))&&!(De()-i.createdAt>r))return i},renewObservable:r,expireObservable:i,expire:y,updateSessionState:e=>{o.setSessionState(t=>({...t,...e}),`updateState`).catch(E)}}}function ee(e){let t=s.find(),n=t?.id!==void 0,a=e.id!==void 0,o=n&&a&&t.id!==e.id;if(n&&(!a||o)&&(c=!0,i.notify(),s.closeActive(ke())),a&&(!n||o)){if(c)return;s.add(te(e),ke()),r.notify()}else n&&a&&!o&&(t.isReplayForced=!!e.forcedReplay)}function y(){u();let n=ra(s.find(),e);t.isGranted()||delete n.anonymousId,ee(n),o.setSessionState(n=>(t.isGranted()||delete n.anonymousId,ra(n,e)),`expire`).catch(E)}function te(e){let t=ta(e)??A();return e.id?{id:e.id,isReplayForced:!!e.forcedReplay,anonymousId:e.anonymousId,createdAt:t}:{id:`invalid`,isReplayForced:!1,anonymousId:void 0,createdAt:t}}}function Na(){let e={id:P(),isReplayForced:!1,anonymousId:void 0,createdAt:A()};return Promise.resolve({findSession:()=>e,findTrackedSession:()=>e,renewObservable:new D,expireObservable:new D,expire:R,updateSessionState:t=>{e={...e,...t}}})}function Pa(e){let{stop:t}=dn(window,[`click`,`touchstart`,`keydown`,`scroll`],e,{capture:!0,passive:!0});ja.push(t)}function Fa(e){let t=()=>{document.visibilityState===`visible`&&e()},{stop:n}=V(document,`visibilitychange`,t);ja.push(n);let r=Mt(t,Oa);ja.push(()=>{Nt(r)})}function Ia(e){let{stop:t}=V(window,`resume`,e,{capture:!0});ja.push(t)}var La=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},Ra=3e3;function za(e,t,n=Ra){let r=0,i=!1;return{isLimitReached(){if(r===0&&I(()=>{r=0},k),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t(`Reached max number of ${e}s by minute: ${n}`)}finally{i=!1}}return!0}}}function Ba(){return Ha()===1}var Va;function Ha(){return Va??=Ua()}function Ua(e=window){let t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?0:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?1:2}function Wa(e,t){return document.readyState===e||document.readyState===`complete`?(t(),{stop:R}):V(window,e===`complete`?`load`:`DOMContentLoaded`,t,{once:!0})}function Ga(e){return new Promise(t=>{Wa(e,t)})}var Ka,qa=new WeakMap;function Ja(){return Ka||=Ya(),Ka}function Ya(){return`XMLHttpRequest`in b?new D(e=>{let{stop:t}=z(XMLHttpRequest.prototype,`open`,Xa),{stop:n}=z(XMLHttpRequest.prototype,`send`,t=>{Za(t,e)},{computeHandlingStack:!0}),{stop:r}=z(XMLHttpRequest.prototype,`abort`,Qa);return()=>{t(),n(),r()}}):new D}function Xa({target:e,parameters:[t,n]}){qa.set(e,{state:`open`,method:String(t).toUpperCase(),url:re(String(n))})}function Za({target:e,parameters:[t],handlingStack:n},r){let i=qa.get(e);if(!i)return;let a=i;a.state=`start`,a.startClocks=N(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let o=!1,{stop:s}=z(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),s(),o)return;o=!0;let t=i;t.duration=j(a.startClocks.timeStamp,A()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),r.notify({...t,state:`complete`})},{stop:l}=V(e,`loadend`,c);r.notify(a)}function Qa({target:e}){let t=qa.get(e);t&&(t.isAborted=!0)}async function $a(e){let t=e.getReader(),n=[];for(;;){let e=await t.read();if(e.done)break;n.push(e.value)}return t.cancel().catch(R),yn(n)}var eo=function(e){return e[e.IGNORE=0]=`IGNORE`,e[e.COLLECT=1]=`COLLECT`,e}({}),to,no=[];function ro({responseBodyAction:e}={}){return e&&no.push(e),to||=io(),to}function io(){return new D(e=>{if(!b.fetch)return;let{stop:t}=z(b,`fetch`,t=>ao(t,e),{computeHandlingStack:!0});return t})}function ao({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a?.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:re(String(i)),l={state:`start`,init:a,input:i,method:s,startClocks:N(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{oo(r,e,l).catch(E)})}async function oo(e,t,n){let r=n,i;try{i=await t}catch(t){e.notify({...r,state:`resolve`,status:0,isAborted:r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t});return}if(r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1,no.reduce((e,t)=>Math.max(e,t(r)),0)===1){let e=Wn(i);if(e?.body)try{let t=await $a(e.body);r.responseBody=new TextDecoder().decode(t)}catch{}}e.notify({...r,state:`resolve`})}function so(e){return typeof e.WebSocket==`function`}var co;function lo(){return co||=uo(),co}function uo(){return new D(e=>{if(!so(b))return;let{stop:t}=on(b,`WebSocket`,({parameters:t,onPostCall:n})=>{let r=Array.isArray(t[1])?[].concat(t[1]):t[1],i=N();n(t=>{e.notify({state:`connecting`,instance:t,url:t.url,protocols:r,startClocks:i}),fo(t,e)})}),{stop:n}=z(b.WebSocket.prototype,`send`,({target:t,parameters:[n],onPostCall:r})=>{let i=po(n),a=t.bufferedAmount;r(()=>{e.notify({state:`message-out`,instance:t,size:i,bufferedAmountPreSend:a,at:N()})})});return()=>{t(),n()}})}function fo(e,t){let{stop:n}=V(e,`open`,()=>{t.notify({state:`open`,instance:e,openClocks:N(),protocol:e.protocol||``}),n()}),{stop:r}=V(e,`message`,n=>{t.notify({state:`message-in`,instance:e,size:po(n.data),at:N()})}),{stop:i}=V(e,`close`,n=>{t.notify({state:`closed`,instance:e,code:n.code,reason:n.reason,wasClean:n.wasClean,at:N()}),r(),i()})}function po(e){return typeof e==`string`?vn(e):e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof Blob<`u`&&e instanceof Blob?e.size:0}function mo(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(w(e),t);return()=>window.cancelIdleCallback(n)}return ho(e)}function ho(e){let t=De(),n=I(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(De()-t))})},0);return()=>L(n)}var go=O;function _o(){let e=[];function t(t){let r;if(!t||t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){mo(t,{timeout:go})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}var vo={};function yo(e){return me(...e.map(e=>(vo[e]||(vo[e]=bo(e)),vo[e])))}function bo(e){return new D(t=>{let n=_[e];return _[e]=(...r)=>{n.apply(console,r);let i=nn(`console error`);T(()=>{t.notify(xo(r,e,i))})},()=>{_[e]=n}})}function xo(e,t,n){let r=e.map(e=>So(e)).join(` `);if(t===g.error){let i=si({originalError:e.find(Mn),handlingStack:n,startClocks:N(),source:Rn.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return i.message=r,{api:t,message:r,handlingStack:n,error:i}}return{api:t,message:r,error:void 0,handlingStack:n}}function So(e){return typeof e==`string`?H(e):Mn(e)?an(It(e)):bn(H(e),void 0,2)}function Co(e){let t=a(e)===`object`;return t||C.error(`Unsupported context:`,e),t}function wo(e,t,n){let r={...e};for(let[e,{required:i,type:a}]of Object.entries(t))a===`string`&&!To(r[e])&&(r[e]=String(r[e])),i&&To(r[e])&&C.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function To(e){return e==null||e===``}function Eo(e=``,{propertiesConfig:t={}}={}){let n={},r=new D,i={getContext:()=>d(n),setContext:a=>{Co(a)?n=H(wo(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=H(wo({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],wo(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function G(e,t,n,r){return w((...i)=>(r&&W({feature:r}),e()[t][n](...i)))}function Do(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.notify(e=>e[t].setContext(r))})}var Oo=`_dd_c`,ko=[];function Ao(e,t,n){if(typeof window>`u`||typeof localStorage>`u`)return;let r=jo(t,n);ko.push(V(window,`storage`,({key:e})=>{r===e&&a()})),e.changeObservable.subscribe(o);let i=f(s(),e.getContext());Ct(i)||e.setContext(i);function a(){e.setContext(s())}function o(){localStorage.setItem(r,JSON.stringify(e.getContext()))}function s(){let e=localStorage.getItem(r);return e?bt(e)??{}:{}}}function jo(e,t){return`${Oo}_${e}_${t}`}var K={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},q={getContext:`getContext`,setContext:`setContext`,setContextProperty:`setContextProperty`,removeContextProperty:`removeContextProperty`,clearContext:`clearContext`};function Mo(e,t,n){let r=No();return t.storeContextsAcrossPages&&Ao(r,n,4),e.register(()=>{let e=r.getContext();return Ct(e)||!e.id?U:{account:e}}),r}function No(){return Eo(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}var Po=`_dd_tab_id`,Fo;function Io(e){let t=Lo();e.register(()=>({tab:{id:t}}))}function Lo(){return Fo||=Ro()??P(),Fo}function Ro(){try{let e=sessionStorage.getItem(Po);if(e)return e;let t=P();return sessionStorage.setItem(Po,t),t}catch{return}}function zo(e,t,n,r){let i=Bo();return t.storeContextsAcrossPages&&Ao(i,n,2),e.register(()=>{let e=i.getContext();return r?{context:e}:e}),i}function Bo(){return Eo(`global context`)}function Vo(e,t,n,r){let i=Ho();return t.storeContextsAcrossPages&&Ao(i,r,1),e.register(({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o?.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),Ct(a)?U:{type:e,usr:a}}),i}function Ho(){return Eo(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var Uo=`datadog-synthetics-`,Wo=`${Uo}public-id`,Go=`${Uo}result-id`,Ko=`${Uo}injects-rum`,qo=`${Uo}rum-context`;function Jo(){return!x&&!!(b._DATADOG_SYNTHETICS_INJECTS_RUM||ot(Ko))}function Yo(){let e=Zo();return Qo(e)?e:void 0}function Xo(){return!!Yo()}function Zo(){let e=b._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=ot(qo);return t?bt(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||ot(Wo),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||ot(Go)}}function Qo(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var J={DOCUMENT:`document`,XHR:`xhr`,BEACON:`beacon`,FETCH:`fetch`,CSS:`css`,JS:`js`,IMAGE:`image`,FONT:`font`,MEDIA:`media`,WEBSOCKET:`websocket`,OTHER:`other`},$o={FETCH:J.FETCH,XHR:J.XHR},es=500,ts=function(e){return e[e.RUNTIME_ERROR=0]=`RUNTIME_ERROR`,e[e.FETCH=1]=`FETCH`,e[e.XHR=2]=`XHR`,e[e.CONSOLE=3]=`CONSOLE`,e}({});function ns(){let e=new he(es,e=>{Gr(`Early data collection dropped data on unbuffer`,{count:e})}),t=[];function n(n,r){t.push(r.subscribe(t=>{e.notify({type:n,data:t})}))}return n(0,F(di)()),n(1,ro()),n(2,Ja()),n(3,yo(Object.values(g))),{observable:e,stop:()=>t.forEach(e=>e.unsubscribe())}}function rs(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function is(e,t){return+e.toFixed(t)}function as(e){return typeof e==`number`}var os=function(e){return e[e.REPLAY=1]=`REPLAY`,e[e.RUM=2]=`RUM`,e[e.TELEMETRY=4]=`TELEMETRY`,e[e.PROFILING=6]=`PROFILING`,e}({});function ss(e,t,n){e.register(({startTime:e})=>{let r=t.findTrackedSession(e);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:U})}function cs(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=V(e,`message`,({data:e})=>{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:yn(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}function ls({configuredUrl:e,error:t,source:n,scriptType:r}){if(C.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&us(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,C.error(`${t} See documentation at ${m}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&Kr(t)}function us(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var ds=30*O;function fs(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.9.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}var Y={status:0};function ps(e,t,n){switch(Y.status===0&&hs(e,t),Y.status){case 1:return Y.initializationFailureCallbacks.push(n),Y.worker;case 3:return Y.worker}}function ms(){return Y.status}function hs(e,t){try{let n=F(fs)(e),{stop:r}=V(n,`error`,n=>{vs(e,t,n)}),{stop:i}=V(n,`message`,({data:n})=>{n.type===`errored`?vs(e,t,n.error,n.streamId):n.type===`initialized`&&_s(n.version)});n.postMessage({action:`init`}),I(()=>gs(t),ds),Y={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){vs(e,t,n)}}function gs(e){Y.status===1&&(C.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Y.initializationFailureCallbacks.forEach(e=>e()),Y={status:2})}function _s(e){Y.status===1&&(Y={status:3,worker:Y.worker,stop:Y.stop,version:e})}function vs(e,t,n,r){Y.status===1||Y.status===0?(ls({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),Y.status===1&&Y.initializationFailureCallbacks.forEach(e=>e()),Y={status:2}):Kr(n,{worker_version:Y.status===3&&Y.version,stream_id:r})}var ys;function bs(e){return Ts(e).segments_count}function xs(e){Ts(e).segments_count+=1}function Ss(e){Ts(e).records_count+=1}function Cs(e,t){Ts(e).segments_total_raw_size+=t}function ws(e){return ys?.get(e)}function Ts(e){ys||=new Map;let t;return ys.has(e)?t=ys.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},ys.set(e,t),ys.size>1e3&&Es()),t}function Es(){if(!ys)return;let e=ys.keys().next().value;e&&ys.delete(e)}var X={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,VIEW_UPDATE:`view_update`,RESOURCE:`resource`,VITAL:`vital`},Ds={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Os={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,SESSION_RENEWAL:`session_renewal`,BF_CACHE:`bf_cache`},ks={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},As={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`},js={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Ms(e,t){t.lastIndex=0;let n=t.exec(e);if(!n)return;let[r,i]=n;return i||r}function Ns(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=Bs[n].find(e=>zs[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!Us(i.escapeSequence))return[];a+=Gs(i.escapeSequence),i.escapeSequence=void 0}Vs.includes(r)?a+=o:Hs.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return Bs[n].includes(1)?(a!==``&&t.push(a),t):[]}var Ps=/[a-zA-Z_$]/,Fs=/[a-zA-Z0-9_$]/,Is=/[0-9]/,Ls=/[a-fA-F0-9]/,Rs=`'"`,zs={0:()=>!1,1:()=>!1,2:e=>Ps.test(e),3:e=>Fs.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>Is.test(e),8:e=>Rs.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e===`\\`,12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith(`u`)&&t.escapeSequence.length<5?Ls.test(e):!1},Bs={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Vs=[2,3,7,10],Hs=[4,5,6];function Us(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var Ws={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
|
|
6
|
+
`,r:`\r`,t:` `};function Gs(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):Ws[e]}var Ks=`dd_rc_`,qs={hit:`success`,miss:`missing`,error:`failure`};function Js(e){return`${Ks}${e}`}function Ys(e){if(typeof e!=`object`||!e)return!1;let t=`version`in e&&e.version===2,n=`config`in e&&typeof e.config==`object`&&e.config!==null;return t&&n}function Xs({remoteConfigurationId:e}){let t=Js(e);return{read(){let e;try{e=localStorage.getItem(t)}catch{return{status:`error`}}if(e===null)return{status:`miss`};let n=bt(e);return n===void 0||!Ys(n)?(this.remove(),{status:`error`}):{status:`hit`,config:n.config}},remove(){try{localStorage.removeItem(t)}catch{}},write(e){let n={version:2,config:e,fetchedAt:A()};try{localStorage.setItem(t,JSON.stringify(n))}catch{}}}}var Zs=`v1`,Qs=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`telemetrySampleRate`,`trackAnonymousUser`,`trackUserInteractions`,`trackResources`,`trackLongTasks`,`traceContextInjection`,`actionNameAttribute`,`defaultPrivacyLevel`,`enablePrivacyForActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function $s(e,t){let n,r=tc(),i=await ac(e);return i.ok?(r.increment(`fetch`,`success`),n=ec(e,i.value,t,r)):(r.increment(`fetch`,`failure`),C.error(i.error)),Jr(Pr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:r.get()}),n}function ec(e,t,n,r){let i={...e};if(t.rum){let e=t.rum;Qs.forEach(t=>{t in e&&(i[t]=a(e[t]))}),Object.keys(n).forEach(t=>{e[t]!==void 0&&s(n[t],e[t])})}return t.profiling?.sampleRate!==void 0&&(i.profilingSampleRate=t.profiling.sampleRate),i;function a(e){if(Array.isArray(e))return e.map(a);if(o(e)){if(nc(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return rc(e.value);case`dynamic`:return c(e);default:C.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return wt(e,a)}return e}function s(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,a(n))})}function c(e){let t=e.strategy,n;switch(t){case`cookie`:n=l(e);break;case`dom`:n=d(e);break;case`js`:n=p(e);break;case`localStorage`:n=u(e);break;default:C.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?ic(r,n):n}function l({name:e}){let t=rt(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function u({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function d({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{C.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(f(n,t)){C.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let i=t===void 0?n.textContent:n.getAttribute(t);if(i===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),i}function f(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function p({path:e}){let t=window,n=Ns(e);if(n.length===0){C.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let i of n){if(!(i in t)){r.increment(`js`,`missing`);return}try{t=t[i]}catch(t){C.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function tc(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function nc(e){return`rcSerializedType`in e}function rc(e){try{return new RegExp(e)}catch{C.error(`Invalid regex in the remote configuration: '${e}'`)}}function ic(e,t){let n=rc(e.value);if(n!==void 0)return Ms(t,n)}async function ac(e){let t;try{t=await Hn(sc(e))}catch{t=void 0}if(!t?.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum||n.profiling?{ok:!0,value:n}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function oc(e){return e.remoteConfiguration?.id??e.remoteConfigurationId}function sc(e){if(e.remoteConfigurationProxy)return e.remoteConfigurationProxy;let t=oc(e);return He({site:e.site,path:`/${Zs}/${encodeURIComponent(t)}.json`,subdomain:`sdk-configuration`})}function cc(e,t,n){ac(e).then(e=>{e.ok?(n.increment(`fetch`,`success`),t.write(e.value)):(n.increment(`fetch`,`failure`),C.error(e.error))}).catch(E).finally(()=>{Jr(Pr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:n.get()})})}function lc(e,t){let n=Xs({remoteConfigurationId:oc(e)}),r=tc(),i=n.read();if(r.increment(`cache`,qs[i.status]),cc(e,n,r),i.status===`hit`)return ec(e,i.config,t,r);if(!e.remoteConfiguration?.required)return e}function uc(e,t){switch(t.type){case`string`:return`"${e}" must be a non-empty string`;case`number`:return t.min!==void 0&&t.max!==void 0?`"${e}" must be a number between ${t.min} and ${t.max}`:t.min===void 0?t.max===void 0?`"${e}" must be a finite number`:`"${e}" must be a number less than or equal to ${t.max}`:`"${e}" must be a number greater than or equal to ${t.min}`;case`percentage`:return`"${e}" must be a number between 0 and 100`;case`boolean`:return`"${e}" must be a boolean`;case`site`:return`"${e}" must be a valid Datadog site. ${h} ${m}/getting_started/site/.`;case`match-option`:return`"${e}" must be a string, RegExp, or function`;case`enum`:return`"${e}" must be one of: "${gc(t.values).join(`", "`)}"`;case`union`:return`"${e}" does not match any expected type`;case`schema`:return`"${e}" is not a valid object`;case`function`:return`"${e}" must be a function`}}function dc(e,t,n){if(!e||typeof e!=`object`){n.error(`Configuration must be an object`);return}return fc(t,e,n)}function fc(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=t[i],o=a.multiple?pc(a,e,n):hc(a,e,n);if(o===void 0){if(e!=null&&e!==``){if(n.error(uc(i,a)),a.required||a.strict!==!1)return}else if(a.required){n.error(`"${i}" is required`);return}r[i]=`default`in a?d(a.default):void 0}else r[i]=o}return r}function pc(e,t,n){if(t==null)return;if(e.type===`enum`&&e.allowAll&&t===`all`)return gc(e.values).slice();let r=Array.isArray(t)?t:[t],i=[];for(let t of r){let r=hc(e,t,n);if(r===void 0){if(e.strict!==!1)return}else i.push(r)}if(!(e.strict===!1&&i.length===0&&r.length>0))return i}var mc=/(datadog|ddog|datad0g|dd0g)/;function hc(e,t,n){if(e.type===`schema`)return typeof t!=`object`||!t?void 0:fc(e.schema,t,n);if(e.type===`union`){if(t==null)return;for(let r of e.variants){let e=hc(r,t,n);if(e!==void 0)return e}return}if(t!=null)switch(e.type){case`function`:return typeof t==`function`?t:void 0;case`string`:return typeof t==`string`&&t.length>0?t:void 0;case`number`:return typeof t==`number`&&Number.isFinite(t)&&(e.min===void 0||t>=e.min)&&(e.max===void 0||t<=e.max)?t:void 0;case`percentage`:return s(t)?t:void 0;case`boolean`:return typeof t==`boolean`?t:e.strict===!1?!!t:void 0;case`site`:return typeof t!=`string`||!mc.test(t)?void 0:t;case`match-option`:return c(t)?t:void 0;case`enum`:return typeof t==`string`&&gc(e.values).includes(t)?t:void 0}}function gc(e){return _c(e)?e:Object.values(e)}function _c(e){return Array.isArray(e)}var vc=[`tracecontext`,`datadog`],yc=[`cache-control`,`etag`,`age`,`expires`,`content-type`,`content-encoding`,`vary`,`content-length`,`server-timing`,`x-cache`,`cf-cache-status`,`x-vercel-cache`],bc={...qe,applicationId:{type:`string`,required:!0},actionNameAttribute:{type:`string`},workerUrl:{type:`string`},subdomain:{type:`string`},sessionReplaySampleRate:{type:`percentage`,default:0},traceSampleRate:{type:`percentage`,default:100},profilingSampleRate:{type:`percentage`,default:0},compressIntakeRequests:{type:`boolean`,default:!1},trackUserInteractions:{type:`boolean`,default:!0,strict:!1},trackResources:{type:`boolean`,default:!0,strict:!1},trackLongTasks:{type:`boolean`,default:!0,strict:!1},trackViewsManually:{type:`boolean`,default:!1,strict:!1},betaEnableViewUpdates:{type:`boolean`,default:!1},betaTrackWebSockets:{type:`boolean`,default:!1,strict:!1},enablePrivacyForActionName:{type:`boolean`,default:!0},propagateTraceBaggage:{type:`boolean`,default:!0},startSessionReplayRecordingManually:{type:`boolean`,default:!1,strict:!1},sessionReplayCanvasRecording:{type:`schema`,schema:{enable:{type:`boolean`,required:!0},maxFramesPerSecond:{type:`number`,min:0,max:5,default:1}}},defaultPrivacyLevel:{type:`enum`,values:Ge,default:Ge.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:`enum`,values:Ke,default:Ke.SAMPLED,strict:!1},excludedActivityUrls:{type:`match-option`,multiple:!0,default:[]},allowedTracingUrls:{type:`union`,multiple:!0,strict:!1,default:[],variants:[{type:`match-option`},{type:`schema`,schema:{match:{type:`match-option`,required:!0},propagatorTypes:{type:`enum`,values:[`datadog`,`b3`,`b3multi`,`tracecontext`],multiple:!0,strict:!1,default:vc}}}]},plugins:{type:`schema`,multiple:!0,strict:!1,default:[],schema:{name:{type:`string`,required:!0},getConfigurationTelemetry:{type:`function`,strict:!1,signature:void 0},onInit:{type:`function`,strict:!1,signature:void 0},onRumStart:{type:`function`,strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:`enum`,values:[`vital`,`action`,`long_task`,`resource`],multiple:!0,strict:!1,default:[]}};function xc(e){let t=dc(e,bc,C);if(!t)return;let n=t.allowedTracingUrls.map(Cc).filter(Boolean);if(n.length>0&&!t.service){C.error(`Service needs to be configured when tracing is enabled`);return}let r=kt(Tt.SESSION_REPLAY_RECORD_CANVAS)?t.sessionReplayCanvasRecording:void 0;return{...t,sessionReplayCanvasRecording:r,allowedTracingUrls:n,beforeSend:t.beforeSend?mi(t.beforeSend,`beforeSend threw an error:`):void 0,rulePsr:as(e.traceSampleRate)?e.traceSampleRate/100:void 0,trackResourceHeaders:Ec(e),allowedGraphQlUrls:wc(e),remoteConfigurationId:oc(e)}}function Sc(e){let t=new Set;return Di(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{Cc(e)?.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function Cc(e){if(c(e))return{match:e,propagatorTypes:vc};if(o(e)&&c(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||vc}}function wc(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return C.warn(`allowedGraphQlUrls should be an array`),[];let t=[];return e.allowedGraphQlUrls.forEach(e=>{c(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):o(e)&&c(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}var Tc=[`request`,`response`,`any`];function Ec(e){let t=e.trackResourceHeaders;if(t===void 0||t===!1)return[];if(t===!0)return yc.map(e=>({name:e}));if(!Array.isArray(t))return C.warn(`trackResourceHeaders should be true or an array of MatchHeader`),[];if(t.length===0)return C.warn(`trackResourceHeaders is an empty array, no headers will be captured`),[];let n=[];return t.forEach((e,t)=>{if(!o(e)){C.warn(`trackResourceHeaders[${t}] should be a MatchHeader object`);return}if(e.name!==void 0&&!c(e.name)){C.warn(`trackResourceHeaders[${t}].name should be a MatchOption`);return}if(e.url!==void 0&&!c(e.url)){C.warn(`trackResourceHeaders[${t}].url should be a MatchOption`);return}if(e.extractor!==void 0&&!(e.extractor instanceof RegExp)){C.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`);return}if(e.location!==void 0&&(typeof e.location!=`string`||!Tc.includes(e.location))){C.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`);return}let{name:r,...i}=e;n.push({...i,...r===void 0?{}:{name:typeof r==`string`?r.toLowerCase():r}})}),n}function Dc(e){return Di(e)&&e.some(e=>o(e)&&e.trackPayload)}function Oc(e){return Di(e)&&e.some(e=>o(e)&&e.trackResponseErrors)}function kc(e){if(e===!0)return`default_headers`;if(Array.isArray(e))return`custom`}function Ac(e){let t=Je(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Di(e.allowedTracingUrls),use_allowed_graph_ql_urls:Di(e.allowedGraphQlUrls),use_track_graph_ql_payload:Dc(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:Oc(e.allowedGraphQlUrls),selected_tracing_propagators:Sc(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Di(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:e.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.()})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:oc(e),profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:kc(e.trackResourceHeaders),beta_enable_view_updates:e.betaEnableViewUpdates,beta_track_web_sockets:e.betaTrackWebSockets,...t}}function jc(){return{assemble:kr(),assembleTelemetry:kr()}}function Mc(){let e=Nc();return new D(t=>{let n=new e(w(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Nc(){let e,t=window;return t.Zone&&(e=jt(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver&&(e=jt(new t.MutationObserver(R),`originalInstance`)?.constructor)),e||=t.MutationObserver,e}var Z=function(e){return e[e.AUTO_ACTION_COMPLETED=0]=`AUTO_ACTION_COMPLETED`,e[e.BEFORE_VIEW_CREATED=1]=`BEFORE_VIEW_CREATED`,e[e.VIEW_CREATED=2]=`VIEW_CREATED`,e[e.BEFORE_VIEW_UPDATED=3]=`BEFORE_VIEW_UPDATED`,e[e.VIEW_UPDATED=4]=`VIEW_UPDATED`,e[e.VIEW_ENDED=5]=`VIEW_ENDED`,e[e.AFTER_VIEW_ENDED=6]=`AFTER_VIEW_ENDED`,e[e.REQUEST_STARTED=7]=`REQUEST_STARTED`,e[e.REQUEST_COMPLETED=8]=`REQUEST_COMPLETED`,e[e.WEBSOCKET_COMPLETED=9]=`WEBSOCKET_COMPLETED`,e[e.SESSION_EXPIRED=10]=`SESSION_EXPIRED`,e[e.SESSION_RENEWED=11]=`SESSION_RENEWED`,e[e.PREPARE_URGENT_FLUSH=12]=`PREPARE_URGENT_FLUSH`,e[e.RAW_RUM_EVENT_COLLECTED=13]=`RAW_RUM_EVENT_COLLECTED`,e[e.RUM_EVENT_COLLECTED=14]=`RUM_EVENT_COLLECTED`,e[e.RAW_ERROR_COLLECTED=15]=`RAW_ERROR_COLLECTED`,e[e.ACTION_STARTED=16]=`ACTION_STARTED`,e[e.DURATION_VITAL_STARTED=17]=`DURATION_VITAL_STARTED`,e}({}),Pc=La,Fc=Ri;function Ic(e){let t=Ni({expireDelay:Fc});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(11,()=>{t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:(e,n)=>t.find(e,n),stop:()=>{t.stop()}}}var Lc=[[J.DOCUMENT,e=>e===`navigation`],[J.XHR,e=>e===`xmlhttprequest`],[J.FETCH,e=>e===`fetch`],[J.BEACON,e=>e===`beacon`],[J.CSS,(e,t)=>/\.css$/i.test(t)],[J.JS,(e,t)=>/\.js$/i.test(t)],[J.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[J.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[J.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Rc(e){let t=e.name;if(!ie(t))return J.OTHER;let n=ae(t);for(let[t,r]of Lc)if(r(e.initiatorType,n))return t;return J.OTHER}function zc(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Bc(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function Vc(e){let{duration:t,startTime:n,responseEnd:r}=e;return e.initiatorType===`navigation`||t===0&&n<r?j(n,r):t}function Hc(e){if(!Wc(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:Kc(t,f,p),first_byte:Kc(t,d,f)};return 0<r&&r<n&&(m.worker=Kc(t,r,n)),n<u&&(m.connect=Kc(t,c,u),c<=l&&l<=u&&(m.ssl=Kc(t,l,u))),n<s&&(m.dns=Kc(t,o,s)),t<a&&(m.redirect=Kc(t,i,a)),m}function Uc(e){return e.duration>=0}function Wc(e){let t=zc(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!Gc(e)||zc(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return t&&n}function Gc(e){return e.redirectEnd>e.startTime}function Kc(e,t,n){if(e<=t&&t<=n)return{duration:M(j(t,n)),start:M(j(e,t))}}function qc(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function Jc(e){return e.deliveryType===``?`other`:e.deliveryType}function Yc(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Xc(e){return e&&(!we(e)||kt(Tt.TRACK_INTAKE_REQUESTS))}var Zc=/data:(.+)?(;base64)?,/g,Qc=24e3;function $c(e,t=Qc){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(Zc);return n?`${n[0]}[...]`:e}function el(e){return e.nodeType===Node.TEXT_NODE}function tl(e){return e.nodeType===Node.COMMENT_NODE}function nl(e){return e.nodeType===Node.ELEMENT_NODE}function rl(e){return nl(e)&&!!e.shadowRoot}function il(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&nl(t.host)}function al(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;rl(e)&&t(e.shadowRoot)}function ol(e){return il(e)?e.host:e.parentNode}function sl(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&il(t)?t.host:null}var cl=function(e){return e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.LONG_ANIMATION_FRAME=`long-animation-frame`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`,e.VISIBILITY_STATE=`visibility-state`,e}({});function ll(e){return new D(t=>{let n=e=>{let n=ml(e);n.length>0&&t.notify(n)},r,i=!0,a=new PerformanceObserver(w(e=>{i?r=I(()=>n(e.getEntries())):n(e.getEntries())}));return a.observe(e),i=!1,dl(),()=>{a.disconnect(),L(r)}})}var ul;function dl(){!ul&&fl()&&`addEventListener`in performance&&(ul=V(performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()}))}function fl(){return window.performance!==void 0&&`getEntries`in performance}function pl(e){return PerformanceObserver.supportedEntryTypes.includes(e)}function ml(e){return e.filter(e=>!hl(e))}function hl(e){return e.entryType===`resource`&&(!Xc(e.name)||!Uc(e))}var gl=`data-dd-action-name`,_l=`Masked Element`,vl=`::shadow `,yl=[gl,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],bl=[kl,El],xl=[kl,Dl,Ol];function Sl(e,t){if(!e.isConnected)return;let n=Cl(e),r=[];for(let{rootNode:e,target:i}of n){let n=wl(i,e,t);if(!n)return;r.push(n)}return r.join(vl)}function Cl(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),il(e))n=e.host;else break}return t.reverse()}function wl(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=Nl(i,t,bl,Pl,n,r);if(e)return Il(e,r);r=Il(Nl(i,t,xl,Fl,n,r)||jl(i),r),i=i.parentElement}return r}function Tl(e){return/[0-9]/.test(e)}function El(e){if(e.id&&!Tl(e.id))return`#${CSS.escape(e.id)}`}function Dl(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!Tl(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Ol(e){return CSS.escape(e.tagName)}function kl(e,t){if(t){let e=n(t);if(e)return e}for(let e of yl){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${Al(t,e.getAttribute(t))}`}}function Al(e,t){return`[${e}="${CSS.escape(t)}"]`}function jl(e){let t=Ml(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function Ml(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function Nl(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function Pl(e,t,n,r){return t.querySelectorAll(Il(n,r)).length===1}function Fl(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=Il(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function Il(e,t){return t?`${e}>${t}`:e}var Q={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:Ge.ALLOW,MASK:Ge.MASK,MASK_USER_INPUT:Ge.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Ge.MASK_UNLESS_ALLOWLISTED},Ll=`data-dd-privacy`,Rl=`hidden`,zl=`dd-privacy-`,Bl=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,Vl={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Hl(e){return`[${Ll}="${e}"], .${zl}${e}`}function Ul(e,t,n){if(n?.has(e))return n.get(e);let r=ol(e),i=r?Ul(r,t,n):t,a=Wl(Gl(e),i);return n&&n.set(e,a),a}function Wl(e,t){switch(t){case Q.HIDDEN:case Q.IGNORE:return t}switch(e){case Q.ALLOW:case Q.MASK:case Q.MASK_USER_INPUT:case Q.MASK_UNLESS_ALLOWLISTED:case Q.HIDDEN:case Q.IGNORE:return e;default:return t}}function Gl(e){if(nl(e)){if(e.tagName===`BASE`)return Q.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return Q.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return Q.MASK}if(e.matches(Hl(Q.HIDDEN)))return Q.HIDDEN;if(e.matches(Hl(Q.MASK)))return Q.MASK;if(e.matches(Hl(Q.MASK_UNLESS_ALLOWLISTED)))return Q.MASK_UNLESS_ALLOWLISTED;if(e.matches(Hl(Q.MASK_USER_INPUT)))return Q.MASK_USER_INPUT;if(e.matches(Hl(Q.ALLOW)))return Q.ALLOW;if(Zl(e))return Q.IGNORE}}function Kl(e,t){switch(t){case Q.MASK:case Q.HIDDEN:case Q.IGNORE:return!0;case Q.MASK_UNLESS_ALLOWLISTED:return el(e)?Jl(e.parentNode)?!0:!Ql(e.textContent||``):Jl(e);case Q.MASK_USER_INPUT:return el(e)?Jl(e.parentNode):Jl(e);default:return!1}}function ql(e,t,n,r,i){if(r!==Q.MASK&&r!==Q.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||yl.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case`title`:case`alt`:case`placeholder`:case`aria-label`:case`name`:return!0}return!!(e===`A`&&t===`href`||e===`IFRAME`&&t===`srcdoc`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function Jl(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!Vl[t.tagName]}function Yl(e){return e.replace(/\S/g,`x`)}function Xl(e,t){let n=e.parentElement?.tagName,r=e.textContent||``,i=t;return n===`SCRIPT`||i===Q.HIDDEN?r=`***`:Kl(e,i)&&(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`||(r=n===`OPTION`?`***`:Yl(r))),n===`HEAD`&&!r.trim()?``:r}function Zl(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||r===`icon`||r===`apple-touch-icon`||r===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(i)||/^product:/.test(i)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function Ql(e){return!e?.trim()||window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1}function $l(e,t){return Ql(e)?e:t||Yl(e)}function eu(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function tu(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var nu;function ru(){return nu||=iu(),nu}function iu(){return new D(e=>{let{throttled:t}=Pt(()=>{e.notify(au())},200);return V(window,B.RESIZE,t,{capture:!0,passive:!0}).stop})}function au(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var ou=function(e){return e[e.OFF=0]=`OFF`,e[e.SAMPLED=1]=`SAMPLED`,e[e.FORCED=2]=`FORCED`,e}({});function su(e,t){return fr()?+!!dr(lr.RECORDS):Ii(e.id,Pi(t.sessionSampleRate,t.sessionReplaySampleRate))?1:e.isReplayForced?2:0}function cu(){let e=new D,{stop:t}=z(window,`open`,()=>e.notify());return{observable:e,stop:t}}function lu(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}function uu(){return fu(64)}function du(){return fu(63)}function fu(e){let t=crypto.getRandomValues(new Uint32Array(2)),n=BigInt(t[0])+(BigInt(t[1])<<32n);return e===63&&(n&=9223372036854775807n),n}function pu(e){return e.toString(16).padStart(16,`0`)}function mu(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function hu(e,t,n,r){return{clearTracingIfNeeded:mu,traceFetch:i=>gu(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=xt(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat(_r(e))}}),traceXhr:(i,a)=>gu(e,i,t,n,r,e=>{try{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})}catch{}})}}function gu(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>ft([e.match],t.url,!0));if(!s)return;let c=Ii(o.id,Pi(e.sessionSampleRate,e.traceSampleRate)),l=fr()?ur()?.getIsTraceSampled()??c:c;(l||e.traceContextInjection===Ke.ALL)&&(t.traceSampled=l,t.traceId=uu(),t.spanId=du(),a(_u(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function _u(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${pu(e)}-${pu(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${pu(e)}-${pu(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":pu(e),"X-B3-SpanId":pu(t),"X-B3-Sampled":n?`1`:`0`})}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var vu=32*hn;function yu(e,t){let n=Su(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=bu(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function bu(e){let t=bt(e);if(!t||typeof t!=`object`)return;let n=t;if(Di(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function xu(e,t){return t.allowedGraphQlUrls.find(t=>ft([t.match],e))}function Su(e,t=!1){let n;if(e.method===`POST`?n=Cu(e.requestBody):e.method===`GET`&&(n=wu(e.url)),n)return Tu(n,t)}function Cu(e){if(!e||typeof e!=`string`)return;let t=bt(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0,operationType:t.operationType}}function wu(e){let t=S(e).searchParams,n=t.get(`variables`),r=n&&bt(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r,operationType:t.get(`operationType`)||void 0}}function Tu(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=Eu(i),t&&(r=$e(i,vu,`...`))}if(!n){let t=e.operationType;(t===`query`||t===`mutation`||t===`subscription`)&&(n=t)}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function Eu(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var Du=1;function Ou(e,t,n,r,i,a){let o=hu(t,n,r,i);ku(e,o,a),Au(e,t,o,a)}function ku(e,t,n){let r=[];return r.push(Ja().subscribe(e=>{e.state===`start`&&Xc(e.url)&&(t.traceXhr(e,e.xhr),ju(e))})),r.push(n.subscribe(({data:n,type:r})=>{if(r!==ts.XHR)return;let i=n;if(Xc(i.url))switch(i.state){case`start`:ju(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:t.clearTracingIfNeeded(i),e.notify(8,{...i,type:$o.XHR,isAbortedOnStart:!1})}})),{stop:()=>r.forEach(e=>e.unsubscribe())}}function Au(e,t,n,r){let i=[];return i.push(ro({responseBodyAction:e=>xu(e.url,t)?.trackResponseErrors?eo.COLLECT:eo.IGNORE}).subscribe(e=>{e.state===`start`&&Xc(e.url)&&(n.traceFetch(e),ju(e))})),i.push(r.subscribe(({data:t,type:r})=>{if(r!==ts.FETCH)return;let i=t;if(Xc(i.url))switch(i.state){case`start`:ju(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:n.clearTracingIfNeeded(i),e.notify(8,{...i,duration:j(i.startClocks.timeStamp,A()),type:$o.FETCH,requestBody:i.init?.body})}})),{stop:()=>i.forEach(e=>e.unsubscribe())}}function ju(e){e.requestIndex||=Du++}var Mu=`websocket-connecting`,Nu=`websocket-closed`;function Pu(e,t,n){let r=Fu(e,lo(),t,n),i=e.subscribe(10,({endClocks:e})=>{r.flushOpenConnections(`session_end`,e)});return{stop:()=>{i.unsubscribe(),r.flushOpenConnections(`session_end`),r.stop()}}}function Fu(e,t,n,r){let i=new Map;function a(t,i,a){let o=Ru(t,i,a,n);e.notify(9,o),r({id:P(),name:Nu,type:js.DURATION,startClocks:o.endClocks,duration:0,context:H({url:o.url,connection_id:o.connectionId})})}let o=t.subscribe(e=>{switch(e.state){case`connecting`:{let t=P(),a=n.findView(e.startClocks.relative)?.id,o=Iu(e.url),s={webSocket:e.instance,connectionId:t,url:o,startClocks:e.startClocks,startViewId:a,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};i.set(e.instance,s),r({id:P(),name:Mu,type:js.DURATION,startClocks:e.startClocks,duration:0,context:H({url:o,connection_id:t})});return}case`open`:{let t=i.get(e.instance);if(!t)return;t.openClocks=e.openClocks,t.protocol=e.protocol,t.setupDuration=j(t.startClocks.timeStamp,e.openClocks.timeStamp);return}case`message-in`:{let t=i.get(e.instance);if(!t)return;t.messagesIn.count+=1,t.messagesIn.size+=e.size,Lu(t,e.at,`in`);return}case`message-out`:{let t=i.get(e.instance);if(!t)return;e.bufferedAmountPreSend>t.bufferedAmountMax&&(t.bufferedAmountMax=e.bufferedAmountPreSend),t.messagesOut.count+=1,t.messagesOut.size+=e.size,Lu(t,e.at,`out`);return}case`closed`:{let t=i.get(e.instance);if(!t)return;i.delete(e.instance),a(t,e,`close_event`);return}}});return{flushOpenConnections:(e,t=N())=>{i.forEach(n=>{a(n,{at:t},e)}),i.clear()},stop:()=>{o.unsubscribe(),i.clear()}}}function Iu(e){let t=S(e);return t.search=``,t.href}function Lu(e,t,n){if(e.openClocks===void 0)return;let r=j(e.openClocks.timeStamp,t.timeStamp);if(n===`in`&&e.firstMessageInOffset===void 0?e.firstMessageInOffset=r:n===`out`&&e.firstMessageOutOffset===void 0&&(e.firstMessageOutOffset=r),n===`in`){if(e.lastMessageInAt!==void 0){let n=j(e.lastMessageInAt,t.timeStamp);n>e.longestInboundSilence&&(e.longestInboundSilence=n)}e.lastMessageInAt=t.timeStamp}}function Ru(e,t,n,r){let i=t.at,a=n===`session_end`?r.findView(i.relative,{returnInactive:!0})?.id:r.findView(i.relative)?.id,o=e.lastMessageInAt===void 0?void 0:j(e.lastMessageInAt,i.timeStamp),{openClocks:s,...c}=e;return{...c,endClocks:i,endViewId:a,inboundIdleDurationBeforeClose:o,trackingEndReason:n,handshakeSucceeded:s!==void 0,setupDuration:e.setupDuration??j(e.startClocks.timeStamp,i.timeStamp),closeCode:t.code,closeReason:t.reason,wasClean:t.wasClean}}function zu(e){return as(e)&&e<0?void 0:e}function Bu(e,t,n,r,i,a){let o=F(Vu)(e,t,n,r),s,c=!1,l=I(w(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:I(w(()=>p({hadActivity:!0,end:A()})),a),d=o.subscribe(({isBusy:e})=>{L(l),L(s);let t=A();e||(s=I(w(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,L(l),L(s),L(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function Vu(e,t,n,r){return new D(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(Uu)||c()}),n.subscribe(c),ll({type:`resource`}).subscribe(e=>{e.some(e=>!Hu(r,e.name))&&c()}),e.subscribe(7,e=>{Hu(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{Hu(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function Hu(e,t){return ft(e.excludedActivityUrls,t)}function Uu(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&nl(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}function Wu({lifeCycle:e,isChildEvent:t,onChange:n=R}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(14,e=>{if(!(e.type===`view`||e.type===`vital`||!t(e)))switch(e.type){case X.ERROR:r.errorCount+=1,n();break;case X.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case X.LONG_TASK:r.longTaskCount+=1,n();break;case X.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n())}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var Gu=5*k;function Ku(e){let t=Ni({expireDelay:Gu}),n=new Map;function r(e){n.delete(e.key),e.eventCounts?.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(11,i);function o(i,a,o,s){let c=P(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?Wu({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?f(a.data,i):a.data;a.historyEntry.close(t.relative);let s=j(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function d(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:d}}var qu=[`HTML`,`BODY`],Ju=2*hn,Yu=yl.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function Xu(e,t){let n=e.filter(e=>e instanceof Element&&!qu.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat(Yu):Yu,i=``;for(let e of n){let t=Zu(e,r);if(i+=t,i.length>=Ju)return $e(i,Ju)}return i}function Zu(e,t){let n=Ol(e),r=El(e),i=Qu(e),a=ed(e,t),o=$u(e);return`${n}${r||``}${a}${i}${o};`}function Qu(e){return Array.from(e.classList).filter(e=>!Tl(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function $u(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=Ml(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function ed(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(Al(e.name,e.value));return n.sort().join(``)}var td=O;function nd(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),L(i),i=I(s,td)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){L(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!rd(n[n.length-1].event,e.event)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function rd(e,t){return e.target===t.target&&id(e,t)<=100&&e.timeStamp-t.timeStamp<=td}function id(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function ad(e,t,n=Q.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=od(e,`data-dd-action-name`)||i&&od(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===Q.MASK?{name:_l,nameSource:`mask_placeholder`}:dd(e,cd,t,r)||dd(e,ld,t,r)||{name:``,nameSource:`blank`}}function od(e,t){let n=sd(e,`[${t}]`);if(n)return pd(fd(n.getAttribute(t).trim()))}function sd(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=sl(n)}return null}var cd=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return gd(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return gd(e,t,n)},(e,t,n)=>hd(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>md(e,t)).filter(e=>!!e).map(e=>_d(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>hd(e,`alt`,t,n),(e,t,n)=>hd(e,`name`,t,n),(e,t,n)=>hd(e,`title`,t,n),(e,t,n)=>hd(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return gd(e.options[0],t,n)}],ld=[(e,t,n)=>gd(e,t,n)],ud=10;function dd(e,t,n,r){let i=e,a=0;for(;a<=ud&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e?.trim();if(r)return{name:pd(fd(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=sl(i),a+=1}}function fd(e){return e.replace(/\s+/g,` `)}function pd(e){return e.length>100?`${$e(e,100)} [...]`:e}function md(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function hd(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=Ul(e,a,r);ql(e.tagName,t,o,i,n)&&(o=$l(o,_l))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function gd(e,t,n){return{name:_d(e,t,n)||``,nameSource:`text_content`}}function _d(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c),s=``;for(;o.nextNode();){let e=o.currentNode;if(nl(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(s+=` `);continue}s+=e.textContent||``}return s.replace(/\s+/g,` `).trim();function c(e){let t=Ul(e,a,n);if(r&&t&&Kl(e,t))return NodeFilter.FILTER_REJECT;if(nl(e)){if(e.hasAttribute(`data-dd-action-name`)||i&&e.hasAttribute(i))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.contentVisibility&&t.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function vd({onPointerDown:e,onPointerUp:t}){let n,r={selection:!1,input:!1,scroll:!1},i,a=[V(window,B.POINTER_DOWN,t=>{bd(t)&&(n=yd(),r={selection:!1,input:!1,scroll:!1},i=e(t))},{capture:!0}),V(window,B.SELECTION_CHANGE,()=>{(!n||!yd())&&(r.selection=!0)},{capture:!0}),V(window,B.SCROLL,()=>{r.scroll=!0},{capture:!0,passive:!0}),V(window,B.POINTER_UP,e=>{if(bd(e)&&i){let n=r;t(i,e,()=>n),i=void 0}},{capture:!0}),V(window,B.INPUT,()=>{r.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}function yd(){let e=window.getSelection();return!e||e.isCollapsed}function bd(e){return e.target instanceof Element&&e.isPrimary!==!1}var xd=3;function Sd(e,t){if(Cd(e))return t.addFrustration(As.RAGE_CLICK),e.some(Td)&&t.addFrustration(As.DEAD_CLICK),t.hasError&&t.addFrustration(As.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(As.ERROR_CLICK),Td(e)&&!n&&e.addFrustration(As.DEAD_CLICK)}),{isRage:!1}}function Cd(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+xd-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var wd=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function Td(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName===`LABEL`&&t.hasAttribute(`for`)&&(t=document.getElementById(t.getAttribute(`for`))),!t?.matches(wd)}var Ed=10*O,Dd=new Map;function Od(e){let t=Dd.get(e);return Dd.delete(e),t}function kd(e,t){Dd.set(e,t),Dd.forEach((e,t)=>{j(t,ke())>Ed&&Dd.delete(t)})}function Ad(e){return t=>t.action?.id?.includes(e)??!1}function jd(e,t,n,r){let i=Ku(e),a=new D,o;e.subscribe(5,l),e.subscribe(12,l);let{stop:s}=vd({onPointerDown:i=>Md(r,e,t,i,n),onPointerUp:({clickActionBase:o,hadActivityOnPointerDown:s},l,u)=>{Nd(r,e,t,n,i,a,c,o,l,u,s)}});return{stop:()=>{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o?.tryAppend(e)){let t=e.clone();o=nd(e,e=>{Ld(e,t),o=void 0})}}function l(){o&&o.stop()}}function Md(e,t,n,r,i){let a;if(a=e.enablePrivacyForActionName?Ul(Fd(r),e.defaultPrivacyLevel):Q.ALLOW,a===Q.HIDDEN)return;let o=Pd(r,a,e),s=!1;return Bu(t,n,i,e,e=>{s=e.hadActivity},100),{clickActionBase:o,hadActivityOnPointerDown:()=>s}}function Nd(e,t,n,r,i,a,o,s,c,l,u){let d=Id(t,i,l,s,c);o(d);let f=s?.target?.selector;f&&kd(c.timeStamp,f);let{stop:p}=Bu(t,n,r,e,e=>{e.hadActivity&&e.end<d.startClocks.timeStamp?d.discard():e.hadActivity?d.stop(e.end):u()?d.stop(d.startClocks.timeStamp):d.stop()},Ed),m=t.subscribe(5,({endClocks:e})=>{d.stop(e.timeStamp)}),h=t.subscribe(12,()=>{d.stop(A())}),g=a.subscribe(()=>{d.stop()});d.stopObservable.subscribe(()=>{h.unsubscribe(),m.unsubscribe(),p(),g.unsubscribe()})}function Pd(e,t,n){let r=Fd(e),i=r.getBoundingClientRect(),a=Sl(r,n.actionNameAttribute),o=Xu(e.composedPath(),n.actionNameAttribute);a&&kd(e.timeStamp,a);let{name:s,nameSource:c}=ad(r,n,t);return{type:ks.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function Fd(e){if(e.composed&&rl(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function Id(e,t,n,r,i){let a=P(),o=je(i.timeStamp),s=t.start(a,o,r,{isChildEvent:Ad});e.notify(16,s);let c=0,l,u=[],d=new D;function f(e){c===0&&(c=1,l=e?t.stop(a,Me(e)):t.discard(a),d.notify())}return{event:i,stop:f,stopObservable:d,get hasError(){let e=l?.counts??t.getCounts(a);return e?e.errorCount>0:!1},get hasPageActivity(){return l&&`duration`in l},getUserActivity:n,addFrustration:e=>{u.push(e)},get startClocks(){return o},isStopped:()=>c===1||c===2,clone:()=>Id(e,t,n,r,i),validate:t=>{if(f(),c!==1||!l)return;let n={frustrationTypes:u,events:t??[i],event:i,...l,counts:l.counts};e.notify(0,n),c=2},discard:()=>{f(),c=2}}}function Ld(e,t){let{isRage:n}=Sd(e,t);n?(e.forEach(e=>e.discard()),t.stop(A()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function Rd(e,t){let n=Ku(e);function r(t,r={},i=N()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:Ad});e.notify(16,o)}function i(e,r={},i=N()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(As.ERROR_CLICK),t({...o,type:o.type||ks.CUSTOM,frustrationTypes:s})}function a(e){t({id:P(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function zd(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(13,Bd(t))}),o=R,s;i.trackUserInteractions&&(s=jd(e,n,r,i));let c=Rd(e,t=>{e.notify(13,Bd(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.assemble.register(({startTime:e,eventType:t})=>{if(t!==X.ERROR&&t!==X.RESOURCE&&t!==X.LONG_TASK)return U;let n=t===X.LONG_TASK?Oe(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:U}),t.assembleTelemetry.register(({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function Bd(e){let t=Vd(e),n=zu(M(e.duration));return{rawRumEvent:{type:X.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function Vd(e){return`events`in e}function Hd(e){let t=yi([vi.cspViolation,vi.intervention]).subscribe(t=>e.notify(t));return{stop:()=>{t.unsubscribe()}}}function Ud(e,t){let n=new D;return t.subscribe(({data:e,type:t})=>{t===ts.RUNTIME_ERROR?n.notify(e):t===ts.CONSOLE&&e.api===g.error&&n.notify(e.error)}),Hd(n),n.subscribe(t=>e.notify(15,{error:t})),Wd(e)}function Wd(e){return e.subscribe(15,({error:t})=>{e.notify(13,Gd(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=si({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:zn.PROVIDED,source:Rn.CUSTOM,handling:Bn.HANDLED});o.context=f(o.context,a),e.notify(15,{error:o})}}}function Gd(e){let t={date:e.startClocks.timeStamp,error:{id:P(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},_dd:{debug_ids:e.debugIds},type:X.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}function Kd(e){return!(e.loadEventEnd>0&&e.domComplete<=0)}function qd(){if(pl(`navigation`)){let e=performance.getEntriesByType(`navigation`)[0];if(e&&Kd(e))return e}let e=Jd(),t={entryType:`navigation`,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function Jd(){let e={},t=performance.timing;for(let n in t)if(as(t[n])){let r=n,i=t[r];e[r]=i===0?0:Ne(i)}return e}function Yd(e){return e.responseStart>=0&&e.responseStart<=ke()?e.responseStart:void 0}function Xd(){if(pl(`resource`))return performance.getEntriesByType(`resource`)}function Zd(e,t){let n=Xd();if(n)return hr(n,n=>n.name===e&&n.startTime<=t)}var Qd=2*k;function $d(e){let t=ef(e)||tf(e);if(!(!t||t.traceTime<=Re()-Qd))return t.traceId}function ef(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return nf(t?.content,n?.content)}function tf(e){let t=rf(e);if(t)return nf(Xe(t,`trace-id`),Xe(t,`trace-time`))}function nf(e,t){let n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function rf(e){for(let t=0;t<e.childNodes.length;t+=1){let n=af(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=af(n);if(r)return r;if(!el(n))break}}function af(e){if(e&&tl(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function of(e){let t=new Set,n=e.subscribe(8,e=>{t.add(e),t.size>1e3&&t.delete(t.values().next().value)});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}function sf(e,t){function n(e,n={},r=N()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=N()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=j(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:X.RESOURCE,resource:{id:o.id,type:o.type||J.OTHER,url:$c(o.url),duration:M(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(13,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function cf(e,t){let n=F(_o)(),r=of(e);e.subscribe(9,n=>{let r=lf(n,t);r&&e.notify(13,r)});let i=ll({type:`resource`,buffered:!0}).subscribe(n=>{for(let i of n)Bc(i)?I(()=>{let n=uf(i,r.getMatchingRequest(i),t);n&&e.notify(13,n)},50):o(()=>uf(i,void 0,t))}),{stop:a}=Wa(`interactive`,()=>{o(()=>uf(qd(),void 0,t))});function o(t){n.push(()=>{let n=t();n&&e.notify(13,n)})}let s=Ku(e),c=sf(e,s);return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{a(),n.stop(),i.unsubscribe(),s.stopAll()}}}function lf(e,t){let n=j(e.startClocks.timeStamp,e.endClocks.timeStamp),r={date:e.startClocks.timeStamp,type:X.RESOURCE,resource:{id:P(),type:J.WEBSOCKET,url:e.url,duration:M(n),websocket:{connection_id:e.connectionId,handshake_succeeded:e.handshakeSucceeded,start_time:e.startClocks.timeStamp,end_time:e.endClocks.timeStamp,start_view_id:e.startViewId,end_view_id:e.endViewId,tracking_end_reason:e.trackingEndReason,close_code:e.closeCode,close_reason:e.closeReason,was_clean:e.wasClean,messages_in:e.messagesIn,messages_out:e.messagesOut,time_to_first_message_in:M(e.firstMessageInOffset),time_to_first_message_out:M(e.firstMessageOutOffset),last_message_in_at:e.lastMessageInAt,longest_inbound_silence:M(e.longestInboundSilence),inbound_idle_duration_before_close:M(e.inboundIdleDurationBeforeClose),buffered_amount_max:e.bufferedAmountMax,protocol:e.protocol,setup_duration:M(e.setupDuration)}},_dd:{discarded:!t.trackResources}};return{startClocks:e.startClocks,duration:n,rawRumEvent:r,domainContext:{isWebSocket:!0,isManual:!1,webSocket:e.webSocket}}}function uf(e,t,n){let r=t?mf(t,n):hf(e,n);if(!n.trackResources&&!r)return;let i=je(e.startTime),a=Vc(e),o=_f(t,n);return{startClocks:i,duration:a,rawRumEvent:f({date:i.timeStamp,resource:{id:P(),duration:M(a),type:Rc(e),method:t?.method,status_code:t?t.status:gf(e.responseStatus),url:t?$c(t.url):e.name,protocol:qc(e),delivery_type:Jc(e),graphql:t&&df(t,n),render_blocking_status:e.renderBlockingStatus,...Yc(e),...Hc(e)},type:X.RESOURCE,_dd:{discarded:!n.trackResources}},r,ff(e),o),domainContext:pf(e,t)}}function df(e,t){let n=xu(e.url,t);if(n)return yu(e,n)}function ff(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}function pf(e,t){return{performanceEntry:e,isManual:!1,isAborted:t?t.isAborted:!1,isWebSocket:!1,handlingStack:t?.handlingStack,requestInit:t?.init,requestInput:t?.input,response:t?.response,error:t?.error,xhr:t?.xhr}}function mf(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function hf(e,t){if(e.initiatorType!==`navigation`)return;let n=F($d)(document);if(n)return{_dd:{trace_id:n,span_id:du().toString(),rule_psr:t.rulePsr}}}function gf(e){return e===0?void 0:e}function _f(e,t){let n=t.trackResourceHeaders;if(n.length===0||!e)return;let r=n.filter(t=>t.url===void 0||ft([t.url],e.url,!0));if(r.length===0)return;let i=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`response`),a=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`request`),o=i.length>0?vf(e,i):void 0,s=a.length>0?yf(e,a):void 0;if(!(!o&&!s))return{resource:{request:s?{headers:s}:void 0,response:o?{headers:o}:void 0}}}function vf(e,t){if(e.type===$o.FETCH&&e.response)return wf(e.response.headers,t);if(e.type===$o.XHR&&e.xhr){let n=e.xhr.getAllResponseHeaders();if(n)try{return wf(new Headers(Tf(n)),t)}catch{}}}function yf(e,t){if(e.type!==$o.FETCH)return;let n;return e.init?.headers?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?wf(n,t):void 0}var bf=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,xf=100,Sf=128,Cf=e=>yc.includes(e);function wf(e,t){let n={},r=0,i=!1;return e.forEach((e,a)=>{if(r>=xf){i||=(C.warn(`Maximum number of headers (${xf}) has been reached. Further headers are dropped.`),!0);return}let o=a.toLowerCase();if(bf.test(o))return;let s=t.find(e=>ft([e.name??Cf],o));if(!s)return;let{extractor:c}=s,l=c?Ms(e,c):e;l!==void 0&&(l.length>Sf&&C.warn(`Header "${o}" value was truncated from ${l.length} to ${Sf} characters.`),n[o]=$e(l,Sf),r++)}),r>0?n:void 0}function Tf(e){let t=[],n=e.trim().split(/\r\n/);for(let e of n){let n=e.indexOf(`:`);n>0&&t.push([e.substring(0,n).trim(),e.substring(n+1).trim()])}return t}function Ef(e,t,n){let{stop:r,eventCounts:i}=Wu({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var Df=10*k;function Of(e,t){return{stop:ll({type:`paint`,buffered:!0}).subscribe(n=>{let r=n.find(t=>t.name===`first-contentful-paint`&&t.startTime<e.timeStamp&&t.startTime<Df);r&&t(r.startTime)}).unsubscribe}}function kf(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(j(e,ke()))})})}function Af(e){return Nf(()=>{let t=F(qd)();Mf(t)||e(jf(t))})}function jf(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:Yd(e)}}function Mf(e){return e.loadEventEnd<=0}function Nf(e){let t,{stop:n}=Wa(`complete`,()=>{t=I(()=>e())});return{stop:()=>{n(),L(t)}}}var Pf=10*k;function Ff(e,t,n,r){let i=1/0,{stop:a}=dn(n,[B.POINTER_DOWN,B.KEY_DOWN],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=ll({type:`largest-contentful-paint`,buffered:!0}).subscribe(n=>{let a=hr(n,e=>e.entryType===`largest-contentful-paint`&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<Pf&&e.size>o);if(a){let t;a.element&&(t=Sl(a.element,e.actionNameAttribute));let n=If(a),i=a.startTime,s=Lf(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function If(e){return e.url===``?void 0:e.url}function Lf(e,t){let n=Yd(qd());if(n===void 0)return;let r=e?Zd(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function Rf(e,t=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:R};if(pl(`visibility-state`)){let t=performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:R}}let n=1/0,{stop:r}=dn(t,[B.PAGE_HIDE,B.VISIBILITY_CHANGE],e=>{(e.type===B.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function zf(e,t,n,r){let i={},{stop:a}=Af(e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=Rf(t),{stop:s}=Of(o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=Ff(e,o,window,e=>{i.largestContentfulPaint=e,r()});function l(){a(),s(),c(),o.stop()}return{stop:l,initialViewMetrics:i}}var Bf=(e,t)=>e*t,Vf=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:Bf(i-n,a-r)},Hf=e=>{let t=Bf(e.previousRect.width,e.previousRect.height),n=Bf(e.currentRect.width,e.currentRect.height),r=Vf(e.previousRect,e.currentRect);return t+n-r};function Uf(e,t,n){if(!Yf())return{stop:R};let r=0,i;n({value:0});let a=Jf(),o=ll({type:`layout-shift`,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=Wf(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:j(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=i?.target?.deref();n({value:is(r,4),targetSelector:t&&Sl(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?Gf(i.previousRect):void 0,currentRect:i?.currentRect?Gf(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Wf(e){let t;for(let n of e)if(n.node&&nl(n.node)){let e=Hf(n);(!t||Hf(t)<e)&&(t=n)}return t}function Gf({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var Kf=5*O,qf=O;function Jf(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=qf||i.startTime-t>=Kf,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function Yf(){return pl(`layout-shift`)&&`WeakRef`in window}var Xf,Zf=0,Qf=1/0,$f=0;function ep(){`interactionCount`in performance||Xf||(Xf=new window.PerformanceObserver(w(e=>{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(Qf=Math.min(Qf,t.interactionId),$f=Math.max($f,t.interactionId),Zf=($f-Qf)/7+1)})})),Xf.observe({type:`event`,buffered:!0,durationThreshold:0}))}var tp=()=>Xf?Zf:window.performance.interactionCount||0,np=10,rp=1*k,ip=8;function ap(e,t,n){if(!lp())return{getInteractionToNextPaint:()=>void 0,setViewEnd:R,stop:R};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=sp(n),s=op(a),c=cp(s),l=ll({type:`first-input`,buffered:!0}).subscribe(d),u=ll({type:`event`,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c.process(n));c.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=j(t,n.startTime);if(n.duration!==i?.duration||r!==i.startTime){let t=Od(n.startTime);!t&&n.target&&nl(n.target)&&(t=Sl(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}i.subParts=c.computeSubParts(n,up(i.duration))}return{getInteractionToNextPaint:()=>{if(i)return{value:up(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}},setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c.stop()}}}function op(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(np)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<np||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){let n=Math.min(t.length-1,Math.floor(e()/50));return t[n]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function sp(e){ep();let t=e===Os.INITIAL_LOAD?0:tp(),n={stopped:!1};function r(){return tp()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function cp(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=ip){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:j(r.startTime,r.processingStart),processingDuration:j(r.processingStart,a),presentationDelay:j(a,i)}},stop(){t.clear()}}}function lp(){return pl(`event`)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function up(e){return Math.min(e,rp)}function dp(e,t,n,r,i,a,o){let s=i===Os.INITIAL_LOAD,c=!0,l=[],u=Rf(a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Bu(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(j(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}var fp=O;function pp(e,t,n=hp()){let r=0,i=0,a=0,o=n.subscribe(({scrollDepth:n,scrollTop:o,scrollHeight:s})=>{let c=!1;if(n>r&&(r=n,c=!0),s>i){i=s;let t=ke();a=j(e.relative,t),c=!0}c&&t({maxDepth:Math.min(r,i),maxDepthScrollTop:o,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>o.unsubscribe()}}function mp(){let e=tu(),{height:t}=au();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function hp(e=fp){return new D(t=>{function n(){t.notify(mp())}let r=Pt(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(w(r.throttled));i&&a.observe(i);let o=V(window,B.SCROLL,r.throttled,{passive:!0});return()=>{r.cancel(),a.disconnect(),o.stop()}})}function gp(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=dp(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=pp(o,e=>{s.scroll=e}),{stop:p}=Uf(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=ap(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=j(o.timeStamp,e??A());c||u(),c=!0,s.loadingTime=t,i()}}}function _p(e){let{stop:t}=V(window,B.PAGE_SHOW,t=>{t.persisted&&e(t)},{capture:!0});return t}function vp(e,t,n){kf(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var yp=3e3,bp=5*k,xp=5*k;function Sp(e,t,n,r,i,a,o){let s=new Set,c=d(Os.INITIAL_LOAD,Ae(),o),l;f();let u;a&&(u=p(i),l=_p(e=>{c.end();let t=je(e.timeStamp);c=d(Os.BF_CACHE,t,void 0)}));function d(i,a,o){let c=Cp(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(11,()=>{c=d(Os.SESSION_RENEWAL,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(10,({endClocks:e})=>{c.end({sessionIsActive:!1,endClocks:e})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{Tp(e,t)&&(c.end(),c=d(Os.ROUTE_CHANGE))})}return{addTiming:(e,t=A())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Os.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function Cp(e,t,n,r,i,a=N(),o){let s=P(),c=new D,l={},u=0,d,f=xt(F(window.location)),p=Eo(),m=!0,h=o?.name,g=o?.service||r.service,_=o?.version||r.version,v=o?.context,ee=o?.handlingStack;v&&p.setContext(v);let y={id:s,name:h,startClocks:a,service:g,version:_,context:v,url:o?.url};e.notify(1,y),e.notify(2,y);let{throttled:te,cancel:ne}=Pt(T,yp,{leading:!1}),{setLoadEvent:b,setViewEnd:x,stop:re,stopINPTracking:ie,getCommonViewMetrics:ae,setLoadingTime:S}=gp(e,t,n,r,w,i,a),{stop:oe,initialViewMetrics:se}=i===Os.INITIAL_LOAD?zf(r,a,b,w):{stop:R,initialViewMetrics:{}};i===Os.BF_CACHE&&vp(a,se,w);let{stop:C,eventCounts:ce}=Ef(e,s,w),le=Mt(T,bp),ue=e.subscribe(12,e=>{e===vr.UNLOADING&&T()});T(),p.changeObservable.subscribe(w);function de(){e.notify(3,{id:s,name:h,context:p.getContext(),startClocks:a,sessionIsActive:m})}function w(){de(),te()}function T(){ne(),de(),u+=1;let t=d===void 0?A():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,handlingStack:ee,startClocks:a,commonViewMetrics:ae(),initialViewMetrics:se,duration:j(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:ce})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??N(),m=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),Nt(le),x(d.relative),re(),ue.unsubscribe(),T(),I(()=>{this.stop()},xp))},stop(){oe(),C(),ie(),c.notify()},addTiming(e,t){if(d)return;let n=Fe(t)?t:j(a.timeStamp,t);l[wp(e)]=n,w()},setLoadingTime:S,setViewName(e){h=e,T()}}}function wp(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&C.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Tp(e,t){return e.pathname!==t.pathname||!Ep(t.hash)&&Dp(t.hash)!==Dp(e.hash)}function Ep(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function Dp(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function Op(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>e.notify(13,kp(t,n,o))),t.assemble.register(({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Ar}),t.assembleTelemetry.register(({startTime:e})=>({view:{id:s.findView(e)?.id}})),Sp(e,r,i,n,a,!n.trackViewsManually,c)}function kp(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually,remote_configuration_id:t.remoteConfigurationId}},date:e.startClocks.timeStamp,type:X.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:M(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:M(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:M(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:M(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:M(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:M(e.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:M(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:M(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:M(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:M(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:zu(M(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Ap(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:M(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:M(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:rs()}};return Ct(e.customTimings)||(a.view.custom_timings=wt(e.customTimings,M)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function Ap({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,largestContentfulPaint:r}){return{cls:e&&{score:e.value,timestamp:M(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:M(n)},inp:t&&{duration:M(t.value),timestamp:M(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:M(t.subParts.inputDelay),processing_duration:M(t.subParts.processingDuration),presentation_delay:M(t.subParts.presentationDelay)}:void 0},lcp:r&&{timestamp:M(r.value),target_selector:r.targetSelector,resource_url:r.resourceUrl,sub_parts:r.subParts?{load_delay:M(r.subParts.loadDelay),load_time:M(r.subParts.loadTime),render_delay:M(r.subParts.renderDelay)}:void 0}}}function jp(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return e===t;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>jp(e,t[n]));if(Array.isArray(e)||Array.isArray(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length&&i.every(e=>a.includes(e)&&jp(n[e],r[e]))}function Mp(e,t,n){let r={},i=n?.replaceKeys??new Set,a=n?.appendKeys??new Set,s=n?.ignoreKeys??new Set;for(let n of Object.keys(e)){if(s.has(n))continue;let c=e[n],l=t[n];if(!i.has(n)&&o(c)&&o(l)){let e=Mp(c,l,{replaceKeys:Np(i,n),appendKeys:Np(a,n),ignoreKeys:Np(s,n)});e&&(r[n]=e)}else a.has(n)&&Array.isArray(c)&&Array.isArray(l)?c.length>l.length&&(r[n]=c.slice(l.length)):jp(c,l)||(r[n]=c)}for(let n of Object.keys(t))n in e||(r[n]=null);return Object.keys(r).length>0?r:void 0}function Np(e,t){let n=new Set;for(let r of e)r.startsWith(`${t}.`)&&n.add(r.slice(t.length+1));return n}function Pp(e,t){let n=Mp(e,t,{replaceKeys:new Set([`view.custom_timings`,`context`,`connectivity`,`usr`,`device`,`privacy`]),appendKeys:new Set([`_dd.page_states`]),ignoreKeys:new Set([`date`,`type`,`application`,`session`,`view.id`,`view.url`,`_dd.document_version`,`_dd.format_version`])});if(n)return f(n,{type:X.VIEW_UPDATE,date:e.date,application:e.application,session:e.session,view:{id:e.view.id,url:e.view.url},_dd:{document_version:e._dd.document_version,format_version:e._dd.format_version}})}function Fp(e,t){let n,r,i=!1,a=0,{unsubscribe:o}=e.flushObservable.subscribe(()=>{i=!1,r=n});return{dispatch:o=>{if(o.type!==X.VIEW){e.add(o);return}if(!t){e.upsert(o,o.view.id);return}let s=o.view.id;if(!o.view.is_active){s===n?.view.id&&(n=void 0,r=void 0,i=!1,a=0),e.upsert(o,s);return}if(s!==n?.view.id){a=0,e.upsert(o,s),n=o,i=!e.isEmpty;return}if(n=o,i){e.upsert(o,s);return}if(a+=1,a>=100){a=0,e.upsert(o,s),i=!e.isEmpty;return}if(r){let t=Pp(o,r);t&&(Ln(`rum`,t),e.upsert(t,s))}},stop:o}}function Ip(e,t,n,r,i){let a=[Be(e,`rum`)],o=Ve(e,`rum`);o&&a.push(o);let s=Er({encoder:i(os.RUM),endpoints:a,reportError:n});r.subscribe(()=>s.forceFlush(`session_expire`));let{dispatch:c,stop:l}=Fp(s,e.betaEnableViewUpdates);t.subscribe(14,c);let u=s.stop.bind(s);return s.stop=()=>{l(),u()},s}function Lp(e){let t=ur();e.subscribe(14,e=>{t.send(`rum`,e)})}var Rp=Ri;function zp(e,t,n){let r=Ni({expireDelay:Rp}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=F(b.location).href,a=t===void 0?n:S(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=ke();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:Ar}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function Bp(){let e=xt(Vp());return new D(t=>{let{stop:n}=Hp(i),{stop:r}=Up(i);function i(){if(e.href===Vp().href)return;let n=xt(Vp());t.notify({newLocation:n,oldLocation:e}),e=n}return()=>{n(),r()}})}function Vp(){return F(b.location)}function Hp(e){let{stop:t}=z(Wp(`pushState`),`pushState`,({onPostCall:t})=>{t(e)}),{stop:n}=z(Wp(`replaceState`),`replaceState`,({onPostCall:t})=>{t(e)}),{stop:r}=V(window,B.POP_STATE,e);return{stop:()=>{t(),n(),r()}}}function Up(e){return V(window,B.HASH_CHANGE,e)}function Wp(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var Gp=Ri;function Kp(e,t,n){let r=Ni({expireDelay:Gp});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([X.VIEW,X.ERROR]).includes(t))return U;let i=r.find(e);return!i||Ct(i)?U:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var qp=10*O,Jp,Yp;function Xp(e,t,n){e.metricsEnabled&&(em(),Yp=!1,t.subscribe(14,()=>{Yp=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{Yp&&(Yp=!1,Jp.batchCount+=1,$p(Jp.batchBytesCount,e),$p(Jp.batchMessagesCount,t))}),Mt(Zp,qp))}function Zp(){Jp.batchCount!==0&&(Jr(Pr.CUSTOMER_DATA_METRIC_NAME,Jp),em())}function Qp(){return{min:1/0,max:0,sum:0}}function $p(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function em(){Jp={batchCount:0,batchBytesCount:Qp(),batchMessagesCount:Qp()}}var tm=4e3,nm=Ri;function rm(e,t=500){let n=Ni({expireDelay:nm,maxEntries:tm}),r;pl(`visibility-state`)&&performance.getEntriesByType(`visibility-state`).forEach(e=>{a(e.name===`hidden`?`hidden`:`active`,e.startTime)}),a(om(),ke());let{stop:i}=dn(window,[B.PAGE_SHOW,B.FOCUS,B.BLUR,B.VISIBILITY_CHANGE,B.RESUME,B.FREEZE,B.PAGE_HIDE],e=>{a(am(e),e.timeStamp)},{capture:!0});function a(e,t=ke()){e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}function o(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(({startTime:e,duration:r=0,eventType:i})=>i===X.VIEW?{type:i,_dd:{page_states:im(n.findAll(e,r),e,t)}}:i===X.ACTION||i===X.ERROR?{type:i,view:{in_foreground:o(`active`,e,0)}}:U),{wasInPageStateDuringPeriod:o,addPageState:a,stop:()=>{i(),n.stop()}}}function im(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:M(j(t,n))}))}function am(e){return e.type===B.FREEZE?`frozen`:e.type===B.PAGE_HIDE?e.persisted?`frozen`:`terminated`:om()}function om(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function sm(e){let t,n=requestAnimationFrame(w(()=>{t=au()})),r=ru().subscribe(e=>{t=e}).unsubscribe;return e.register(({eventType:e})=>({type:e,display:t?{viewport:t}:void 0})),{stop:()=>{r(),n&&cancelAnimationFrame(n)}}}function cm(e,t){let n=Ku(e);function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(13,lm(t))}function a(t,n,r,i){let{operationKey:a,context:o,description:s,handlingStack:c}=r||{},l={name:t,type:js.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:N(),context:H(o),description:s,handlingStack:c};e.notify(13,lm(l))}function o(t,r={},i=N()){let{id:a}=n.start(r.vitalKey??t,i,{name:t,...r});e.notify(17,{id:a,name:t,startClocks:i,...r})}function s(e,t={},r=N()){let a=n.stop(t.vitalKey??e,r,t);a&&i({type:js.DURATION,...a})}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:o,stopDurationVital:s}}function lm(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===js.DURATION?e.id:void 0)??P(),type:n,name:r,description:i,...n===js.DURATION?{duration:M(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:X.VITAL,context:a},startClocks:t,duration:n===js.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function um(e,t,n,r,i){e.register(({eventType:e,startTime:a})=>{let o=n.findTrackedSession(a),s=i.findView(a);if(!o||!s)return Ar;let c,l,u;return e===X.VIEW?(c=r.getReplayStats(s.id)?!0:void 0,l=su(o,t)===1,u=s.sessionIsActive?void 0:!1):c=r.isRecording()?!0:void 0,{type:e,session:{id:o.id,type:`user`,has_replay:c,sampled_for_replay:l,is_active:u}}})}function dm(e){let t=qi()?fm():mm;return new D(n=>t(e,e=>n.notify(e)))}function fm(){return(e,t)=>V(b.cookieStore,B.CHANGE,n=>{let r=n.changed.find(t=>t.name===e)||n.deleted.find(t=>t.name===e);r&&t(r.value)}).stop}var pm=O;function mm(e,t){let n=rt(e),r=Mt(()=>{let r=rt(e);r!==n&&(n=r,t(r))},pm);return()=>{Nt(r)}}var hm=`datadog-ci-visibility-test-execution-id`;function gm(e,t=dm(hm)){let n=ot(`datadog-ci-visibility-test-execution-id`)||_m(),r=t.subscribe(e=>{n=e});return e.register(({eventType:e})=>typeof n==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:n}}:U),{stop:()=>{r.unsubscribe()}}}function _m(){let e=window.Cypress;if(e)try{return e.env(`traceId`)}catch{C.warn(`Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.`);return}}function vm(e,t){let n=ll({type:pl(`long-animation-frame`)?`long-animation-frame`:`longtask`,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=je(r.startTime),i=ym(r,n);e.notify(13,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function ym(e,t){let n=P(),r=M(e.duration),i={date:t.timeStamp,type:X.LONG_TASK,_dd:{discarded:!1}};if(e.entryType===`longtask`)return{...i,long_task:{id:n,entry_type:Ds.LONG_TASK,duration:r}};let a=ti(e.scripts.map(e=>e.sourceURL).filter(e=>!!e));return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:Ds.LONG_ANIMATION_FRAME,duration:r,blocking_duration:M(e.blockingDuration),first_ui_event_timestamp:M(e.firstUIEventTimestamp),render_start:M(e.renderStart),style_and_layout_start:M(e.styleAndLayoutStart),start_time:M(e.startTime),scripts:e.scripts.map(e=>({duration:M(e.duration),pause_duration:M(e.pauseDuration),forced_style_and_layout_duration:M(e.forcedStyleAndLayoutDuration),start_time:M(e.startTime),execution_start:M(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}function bm(e){e.register(({eventType:e})=>Xo()?{type:e,session:{type:`synthetics`},synthetics:{...Yo(),injected:Jo()}}:U)}function xm(e,t,n){let r=d(e),i=n(r);return _r(t).forEach(([t,n])=>Sm(e,r,t.split(/\.|(?=\[\])/),n)),i}function Sm(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>Sm(e,t[n],a,r));return}if(!(!wm(e)||!wm(t))){if(a.length>0)return Sm(e[i],t[i],a,r);Cm(e,i,t[i],r)}}function Cm(e,t,n,r){if(e[t]===n)return;let i=a(n);i===r?e[t]=H(n):r===`object`&&(i===`undefined`||i===`null`)?e[t]={}:r===`array`&&(i===`undefined`||i===`null`)&&(e[t]=[])}function wm(e){return a(e)===`object`}var Tm={"view.name":`string`,"view.url":`string`,"view.referrer":`string`,context:`object`,service:`string`,version:`string`},Em={[X.VIEW]:{...Tm,"view.performance.lcp.resource_url":`string`},[X.ERROR]:{...Tm,"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`,"_dd.debug_ids":`array`},[X.RESOURCE]:{...Tm,"resource.url":`string`,"resource.graphql.variables":`string`,"resource.request.headers":`object`,"resource.response.headers":`object`,"resource.websocket.close_reason":`string`,"resource.websocket.protocol":`string`},[X.ACTION]:{...Tm,"action.target.name":`string`},[X.LONG_TASK]:{...Tm,"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`,"_dd.debug_ids":`array`},[X.VITAL]:Tm};function Dm(e,t,n,r,i){let a={[X.ERROR]:za(X.ERROR,r,i),[X.ACTION]:za(X.ACTION,r,i),[X.VITAL]:za(X.VITAL,r,i)};t.subscribe(13,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c=n.trigger({eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i});if(c===`DISCARDED`)return;let l=f(c,o,{ddtags:Nn(e).join(`,`)});Om(l,e.beforeSend,s,a)&&(Ct(l.context)&&delete l.context,t.notify(14,l))})}function Om(e,t,n,r){if(t){let r=xm(e,Em[e.type],e=>t(e,n));if(r===!1&&e.type!==X.VIEW)return!1;r===!1&&C.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function km(e){e.register(({eventType:e})=>({type:e,connectivity:Vn()}))}function Am(e,t,n){e.register(({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:Ie(),configuration:{session_sample_rate:is(t.sessionSampleRate,3),session_replay_sample_rate:is(t.sessionReplaySampleRate,3),profiling_sample_rate:is(t.profilingSampleRate,3),trace_sample_rate:is(t.traceSampleRate,3)},browser_sdk_version:fr()?`7.9.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:A(),source:r}})}var jm=[X.ACTION,X.ERROR,X.LONG_TASK,X.RESOURCE,X.VITAL];function Mm(e){return{addEvent:(t,n,r,i)=>{jm.includes(n.type)&&e.notify(13,{startClocks:je(t),rawRumEvent:n,domainContext:r,duration:i})}}}function Nm(e){e.register(({domainContext:e,rawRumEvent:t})=>{let n=Pm(e,t);if(!n)return U;let r=ni(n);return r?{type:t.type,service:r.service,version:r.version}:U})}function Pm(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),It({stack:n}).stack[0]?.url}function Fm(e,t,n,r,i,a,o,s,c,l){let u=[],d=new Pc;d.subscribe(14,e=>Ln(`rum`,e)),t.expireObservable.subscribe(()=>d.notify(10,{endClocks:N()})),t.renewObservable.subscribe(()=>d.notify(11));let f=e=>{d.notify(15,{error:{message:e,source:Rn.AGENT,startClocks:N()}}),Gr(`Error reported to customer`,{"error.message":e})};if(fr()){Lp(d);let e=yr().subscribe(e=>{d.notify(12,e.reason)});u.push(()=>e.unsubscribe())}else{let n=Ip(e,d,f,t.expireObservable,a),r=n.prepareUrgentFlushObservable.subscribe(e=>{d.notify(12,e)});u.push(()=>r.unsubscribe()),u.push(()=>n.stop()),Xp(s,d,n.flushObservable)}let{stop:p,...m}=Im(d,c,e,t,n,i,o,l,f);return u.push(p),o.unbuffer(),u.push(()=>r.stop()),{...m,lifeCycle:d,sessionManager:t,stopSession:()=>t.expire(),telemetry:s,stop:()=>{u.forEach(e=>e())},hooks:c}}function Im(e,t,n,r,i,a,o,s,c){let l=[],u=Mc(),d=Bp(),{observable:f,stop:p}=cu();l.push(p);let{assemble:m}=t;Am(m,n,s);let h=rm(m);l.push(()=>h.stop());let g=Ic(e);l.push(()=>g.stop());let _=zp(e,m,d);l.push(()=>_.stop());let v=Kp(e,m,n);um(m,n,r,i,g),km(m),Io(m);let ee=zo(m,n,`rum`,!0),y=Vo(m,n,r,`rum`),te=Mo(m,n,`rum`),ne=zd(e,t,u,f,n);l.push(ne.stop);let b=Mm(e),x=sm(m);l.push(x.stop);let re=gm(m);l.push(re.stop),bm(m),Dm(n,e,m,c);let{addTiming:ie,setLoadingTime:ae,startView:S,setViewName:oe,setViewContext:se,setViewContextProperty:C,getViewContext:ce,stop:le}=Op(e,t,n,u,f,d,i,g,a);Nm(m),l.push(le);let ue=cf(e,n);l.push(ue.stop);let{stop:de}=vm(e,n);l.push(de);let{addError:w}=Ud(e,o);Ou(e,n,r,y,te,o);let T=cm(e,h);if(n.trackResources&&(n.betaTrackWebSockets||kt(Tt.TRACK_WEBSOCKETS))){let t=Pu(e,g,T.addDurationVital);l.push(t.stop)}let E=lu(n.applicationId,r,g,ne.actionContexts,_);return{addAction:ne.addAction,startAction:ne.startAction,stopAction:ne.stopAction,startResource:ue.startResource,stopResource:ue.stopResource,addEvent:b.addEvent,addError:w,addTiming:ie,setLoadingTime:ae,addFeatureFlagEvaluation:v.addFeatureFlagEvaluation,startView:S,setViewContext:se,setViewContextProperty:C,getViewContext:ce,setViewName:oe,viewHistory:g,sessionManager:r,stopSession:()=>r.expire(),getInternalContext:E.get,startDurationVital:T.startDurationVital,stopDurationVital:T.stopDurationVital,addDurationVital:T.addDurationVital,addOperationStepVital:T.addOperationStepVital,globalContext:ee,userContext:y,accountContext:te,stop:()=>l.forEach(e=>e())}}function Lm(e,t,n){if(e)for(let r of e){let e=r[t];e&&e(n)}}function Rm(e,t){e.register(()=>t.isGranted()?U:Ar)}function zm({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t,sdkName:n},r,i){let a=new he(500,e=>{Gr(`preStartRum buffer data lost`,{count:e})}),o=Bo();Do(o,K.globalContext,a);let s=Ho();Do(s,K.userContext,a);let c=No();Do(c,K.accountContext,a);let l,u,d,f,p,m,h=jc(),g=r.observable.subscribe(ee),_={},v=!1;function ee(){if(v||!d||!f||!p||!m)return;g.unsubscribe();let e;if(f.trackViewsManually){if(!l)return;e=l.options}let t=f.trackViewsManually?l?.callback:void 0,n=i(f,p,u,e,m,h);v=!0,a.subscribe(e=>{e!==t&&e(n)}),a.unbuffer()}function y(e,i){let a=fr();if(a&&(e=Bm(e)),d=e,f){_i(`DD_RUM`,e);return}let o=xc(e);!o||!vt(o,i??``)||o.compressIntakeRequests&&!a&&t&&(u=t(o,`Datadog RUM`,R),!u)||(f=o,r.tryToInit(o.trackingConsent),r.onGrantedOnce(()=>{let{assembleTelemetry:t}=h;if(Rm(t,r),m=F(Br)(Nr.RUM,o,t,n),x){C.warn(`The RUM SDK is not supported in a web or service worker environment.`);return}(fr()?Na():F(Ma)(o,r)).then(n=>{n&&(p=n,ss(t,p,{application:{id:o.applicationId}}),qr(Ac(e)),ee())}).catch(E)}))}return{init(t,n,r){if(!t){C.error(`Missing configuration`);return}if(Dt(t.enableExperimentalFeatures),mn(t.allowUntrustedEvents),d=t,!(e&&Jo())){if(Lm(t.plugins,`onInit`,{initConfiguration:t,publicApi:n}),oc(t)){let e={user:s,context:o};if(t.remoteConfigurationId||t.remoteConfiguration?.sync)$s(t,e).then(e=>{e&&y(e,r)}).catch(E);else{let n=lc(t,e);n&&y(n,r)}}else y(t,r)}},get initConfiguration(){return d},getInternalContext:R,stopSession:R,addTiming(e,t=A()){a.notify(n=>n.addTiming(e,t))},setLoadingTime:(e=>{a.notify(t=>t.setLoadingTime(e))}),startView(e,t=N()){let n=n=>{n.startView(e,t)};a.notify(n),l||(l={options:e,callback:n},ee())},setViewName(e){a.notify(t=>t.setViewName(e))},setViewContext(e){a.notify(t=>t.setViewContext(e))},setViewContextProperty(e,t){a.notify(n=>n.setViewContextProperty(e,t))},getViewContext:()=>_,globalContext:o,userContext:s,accountContext:c,addAction(e){a.notify(t=>t.addAction(e))},startAction(e,t){let n=N();a.notify(r=>r.startAction(e,t,n))},stopAction(e,t){let n=N();a.notify(r=>r.stopAction(e,t,n))},startResource(e,t){let n=N();a.notify(r=>r.startResource(e,t,n))},stopResource(e,t){let n=N();a.notify(r=>r.stopResource(e,t,n))},addError(e){a.notify(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){a.notify(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){let n=N();a.notify(r=>r.startDurationVital(e,t,n))},stopDurationVital(e,t){let n=N();a.notify(r=>r.stopDurationVital(e,t,n))},addDurationVital(e){a.notify(t=>t.addDurationVital(e))},addOperationStepVital:(e,t,n,r)=>{a.notify(i=>i.addOperationStepVital(H(e),t,H(n),H(r)))}}}function Bm(e){return{...e,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??ur()?.getPrivacyLevel()}}function Vm(e,t,n={}){let r=_e(),i=ns(),a=zm(n,r,(r,o,s,c,l,u)=>{let d=s&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,e):xr,f=F(Fm)(r,o,e,t,c,d,i.observable,l,u,n.sdkName);return e.onRumStart(f.lifeCycle,r,o,f.viewHistory,s,f.telemetry),t.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),a=Hm(a,f),Lm(r.plugins,`onRumStart`,{addEvent:f.addEvent,addError:f.addError}),f}),o=()=>a,s=e=>{let t=nn(`view`);T(()=>{let n=typeof e==`object`?e:{name:e};a.startView({...n,handlingStack:t}),W({feature:`start-view`})})},c=(e,t)=>{let n=nn(`vital`);T(()=>{W({feature:`add-operation-step-vital`,action_type:`start`}),a.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},l=w((e,t)=>{W({feature:`add-operation-step-vital`,action_type:`succeed`}),a.addOperationStepVital(e,`end`,t)}),u=w((e,t,n)=>{W({feature:`add-operation-step-vital`,action_type:`fail`}),a.addOperationStepVital(e,`end`,n,t)}),f=hi({init:e=>{let t=Error().stack;T(()=>a.init(e,f,t))},setTrackingConsent:w(e=>{r.update(e),W({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:w(e=>{a.setViewName(e),W({feature:`set-view-name`})}),setViewContext:w(e=>{a.setViewContext(e),W({feature:`set-view-context`})}),setViewContextProperty:w((e,t)=>{a.setViewContextProperty(e,t),W({feature:`set-view-context-property`})}),getViewContext:w(()=>(W({feature:`set-view-context-property`}),a.getViewContext())),getInternalContext:w(e=>a.getInternalContext(e)),getInitConfiguration:w(()=>d(a.initConfiguration)),addAction:(e,t)=>{let n=nn(`action`);T(()=>{a.addAction({name:H(e),context:H(t),startClocks:N(),type:ks.CUSTOM,handlingStack:n}),W({feature:`add-action`})})},startAction:w((e,t)=>{W({feature:`start-action`}),a.startAction(H(e),{type:H(t?.type),context:H(t?.context),actionKey:t?.actionKey})}),stopAction:w((e,t)=>{W({feature:`stop-action`}),a.stopAction(H(e),{type:H(t?.type),context:H(t?.context),actionKey:t?.actionKey})}),startResource:w((e,t)=>{W({feature:`start-resource`}),a.startResource(H(e),{type:H(t?.type),method:H(t?.method),context:H(t?.context),resourceKey:t?.resourceKey})}),stopResource:w((e,t)=>{W({feature:`stop-resource`}),a.stopResource(H(e),{type:H(t?.type),statusCode:t?.statusCode,size:t?.size,context:H(t?.context),resourceKey:t?.resourceKey})}),addError:(e,t)=>{let n=nn(`error`);T(()=>{a.addError({error:e,handlingStack:n,context:H(t),startClocks:N()}),W({feature:`add-error`})})},addTiming:w((e,t)=>{a.addTiming(H(e),t)}),setViewLoadingTime:w(()=>{let e=A();a.setLoadingTime(e),W({feature:`addViewLoadingTime`})}),setGlobalContext:G(o,K.globalContext,q.setContext,`set-global-context`),getGlobalContext:G(o,K.globalContext,q.getContext,`get-global-context`),setGlobalContextProperty:G(o,K.globalContext,q.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:G(o,K.globalContext,q.removeContextProperty,`remove-global-context-property`),clearGlobalContext:G(o,K.globalContext,q.clearContext,`clear-global-context`),setUser:G(o,K.userContext,q.setContext,`set-user`),getUser:G(o,K.userContext,q.getContext,`get-user`),setUserProperty:G(o,K.userContext,q.setContextProperty,`set-user-property`),removeUserProperty:G(o,K.userContext,q.removeContextProperty,`remove-user-property`),clearUser:G(o,K.userContext,q.clearContext,`clear-user`),setAccount:G(o,K.accountContext,q.setContext,`set-account`),getAccount:G(o,K.accountContext,q.getContext,`get-account`),setAccountProperty:G(o,K.accountContext,q.setContextProperty,`set-account-property`),removeAccountProperty:G(o,K.accountContext,q.removeContextProperty,`remove-account-property`),clearAccount:G(o,K.accountContext,q.clearContext,`clear-account`),startView:s,stopSession:w(()=>{a.stopSession(),W({feature:`stop-session`})}),addFeatureFlagEvaluation:w((e,t)=>{a.addFeatureFlagEvaluation(H(e),H(t)),W({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:w(()=>e.getSessionReplayLink()),startSessionReplayRecording:w(t=>{e.start(t),W({feature:`start-session-replay-recording`,force:t?.force})}),stopSessionReplayRecording:w(()=>e.stop()),addDurationVital:(e,t)=>{let n=nn(`vital`);T(()=>{W({feature:`add-duration-vital`}),a.addDurationVital({id:P(),name:H(e),type:js.DURATION,startClocks:Me(t.startTime),duration:t.duration,context:H(t?.context),description:H(t?.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=nn(`vital`);T(()=>{W({feature:`start-duration-vital`}),a.startDurationVital(H(e),{vitalKey:t?.vitalKey,context:H(t?.context),description:H(t?.description),handlingStack:n})})},stopDurationVital:w((e,t)=>{W({feature:`stop-duration-vital`}),a.stopDurationVital(H(e),{vitalKey:t?.vitalKey,context:H(t?.context),description:H(t?.description)})}),startOperation:c,succeedOperation:l,failOperation:u,startFeatureOperation:c,succeedFeatureOperation:l,failFeatureOperation:u,DEFAULT_TRACKED_RESOURCE_HEADERS:yc});return f}function Hm(e,t){return{...e,init:e=>{_i(`DD_RUM`,e)},getInternalContext:t.getInternalContext,stopSession:t.stopSession,getViewContext:t.getViewContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}function Um(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${Wm(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function Wm(e){let t=e.site,n=e.subdomain||Gm(e);return`https://${n?`${n}.`:``}${t}`}function Gm(e){switch(e.site){case ye:case be:return`app`;case ve:return`dd`;default:return}}function Km(e,t,n,r){let i=ir([Be(e,`profile`)],e=>{t.notify(15,{error:{message:e,source:Rn.AGENT,startClocks:N()}}),Gr(`Error reported to customer`,{"error.message":e})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=bn(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of _r(t)){let t=bn(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await qm(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function qm(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}function Jm(e,t,n,r){let i=t.findTrackedSession(),a=Ym(e,i,r);return Um(e,{viewContext:n.findView(),errorType:a,session:i})}function Ym(e,t,n){if(!t)return`rum-not-tracked`;if(su(t,e)===ou.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}function Xm(e,t){if(!e.metricsEnabled)return{stop:R};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:A()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=j(n.timestamp,A()));break;case`recorder-settled`:n&&(i=j(n.timestamp,A()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&Jr(Pr.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:Zm(n.forced,i,j(n.timestamp,A()),e.type,r)})}});return{stop:a}}function Zm(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}var Qm=`modulepreload`,$m=function(e){return`/`+e},eh={},th=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=$m(t,n),t=s(t),t in eh)return;eh[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Qm,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function nh(){try{return await F(rh)()}catch(e){ls({error:e,source:`Recorder`,scriptType:`module`})}}async function rh(){return(await th(async()=>{let{startRecording:e}=await Promise.resolve().then(()=>x_);return{startRecording:e}},void 0)).startRecording}function ih(e,t,n,r,i,a){let o=0,s;t.subscribe(Z.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Z.SESSION_RENEWED,()=>{o===1&&u()});let c=new D;Xm(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([ch(c,{type:`recorder-settled`},nh()),ch(c,{type:`document-ready`},Ga(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?su(r,e):void 0;if(!ah(i,t)){o=1;return}if(oh(o))return;o=2;let a=sh(i,t)||!1;l(a).catch(E),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return Jm(e,n,r,o!==0)},isRecording:()=>o===3}}function ah(e,t){return e!==void 0&&(e!==ou.OFF||t?.force)}function oh(e){return e===2||e===3}function sh(e,t){return t&&t.force&&e===ou.OFF}async function ch(e,t,n){try{return await n}finally{e.notify(t)}}function lh(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:R},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function uh(){if(fr()&&!dr(lr.RECORDS))return{start:R,stop:R,getReplayStats:()=>void 0,onRumStart:R,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=lh();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>ms()===3&&e.isRecording(),getReplayStats:e=>ms()===3?ws(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=ps(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=cs(o,os.REPLAY))),c}e=ih(r,n,i,a,l,s),t(r)&&e.start()}}function dh(){return b.Profiler!==void 0}function fh(e){let t={status:`starting`};return e.assemble.register(({eventType:e})=>e!==X.VIEW&&e!==X.LONG_TASK&&e!==X.ACTION&&e!==X.VITAL?U:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}async function ph(){try{return await F(mh)()}catch(e){ls({error:e,source:`Profiler`,scriptType:`module`})}}async function mh(){return(await th(async()=>{let{createRumProfiler:e}=await Promise.resolve().then(()=>U_);return{createRumProfiler:e}},void 0)).createRumProfiler}function hh(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!gh(r,s))return;let c=fh(n);if(!F(dh)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}F(ph)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(E)}return{onRumStart:t,stop:()=>{e?.stop()}}}function gh(e,t){return fr()?dr(lr.PROFILES):Ii(t.id,Pi(e.sessionSampleRate,e.profilingSampleRate))}var _h=Vm(uh(),hh(),{startDeflateWorker:ps,createDeflateEncoder:cs,sdkName:`rum`});gi(b,`DD_RUM`,_h);var vh=t(i(),1),yh,bh,xh,Sh,Ch=[],wh=[];function Th(e={}){return{name:`react`,onInit({publicApi:t,initConfiguration:n}){yh=t,bh=e;for(let e of Ch)e(bh,yh);e.router&&(n.trackViewsManually=!0)},onRumStart({addError:e}){xh=e;for(let t of wh)e&&t(e)},getConfigurationTelemetry(){let t=et(`react`,vh.version);return{router:!!e.router,integrations:tt(t,e.router&&Sh)}}}}function Eh(e){xh?e(xh):wh.push(e)}function Dh(e,t){let n=nn(`react error`),r=N();Eh(i=>{T(()=>{i({error:e,handlingStack:n,componentStack:t.componentStack??void 0,startClocks:r,context:{...typeof e==`object`&&e?e.dd_context:void 0,framework:`react`}})})})}var Oh={didCatch:!1,error:null};function kh(e,t=`ErrorBoundary`){let n=class extends vh.Component{constructor(e){super(e),this.resetError=()=>{this.setState(Oh)},this.state=Oh}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}componentDidCatch(t,n){e(t,n)}render(){return this.state.didCatch?vh.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}};return n.displayName=t,n}kh(Dh);var Ah={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},$={AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10},jh={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Mh={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Nh={Play:0,Pause:1},Ph={V1:0,Change:1};function Fh(e){return Lh(void 0,void 0,e)}function Ih(e,t,n){return Lh(e,t,n)}function Lh(e,t,n){let r={container:void 0,parentId:e,previousSiblingId:void 0,nextSiblingId:t},i=e=>r.previousSiblingId===e-1?0:r.nextSiblingId===void 0?r.parentId===void 0?null:e-r.parentId:r.nextSiblingId-e;return{advance(e){let t=n.getOrInsert(e),a=i(t);return r.previousSiblingId=t,{nodeId:t,insertionPoint:a}},ascend(){r.container&&(r=r.container)},descend(){r.previousSiblingId!==void 0&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function Rh(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function zh(e,t,n){e[t].count+=1,e[t].max=Math.max(e[t].max,n),e[t].sum+=n}function Bh(e,t){for(let n of[`cssText`,`serializationDuration`])e[n].count+=t[n].count,e[n].max=Math.max(e[n].max,t[n].max),e[n].sum+=t[n].sum}function Vh(e){let t={},n=t=>{for(let i=0,a=t.length;i<a;i++){let a=t[i];if(typeof a==`string`){let n=e.size;n<1e6?(t[i]=e.getOrInsert(a),e.size>n&&r($.AddString,a)):t[i]=e.get(a)??a}else Array.isArray(a)&&n(a)}},r=(e,r)=>{e in t||(t[e]=[e]),e!==$.AddString&&Array.isArray(r)&&n(r),t[e].push(r)};return{add:r,flush:()=>{let e=[];return[$.AddString,$.AddNode,$.RemoveNode,$.Attribute,$.Text,$.Size,$.ScrollPosition,$.AddStyleSheet,$.AttachedStyleSheets,$.MediaPlaybackState,$.VisualViewport].forEach(n=>{let r=t[n];r&&e.push(r)}),t={},e}}}function Hh(e,t,n,r,i,a){let o=Vh(r.stringIds),s=Rh(),c={addMetric(e,t){zh(s,e,t)},addNode(...e){o.add($.AddNode,e)},addStyleSheet(e,t,n){n?o.add($.AddStyleSheet,[e,t||[],n]):t?o.add($.AddStyleSheet,[e,t]):o.add($.AddStyleSheet,[e])},attachStyleSheets(e,t){let n=[e];for(let e of t)n.push(e);o.add($.AttachedStyleSheets,n)},removeNode(e){o.add($.RemoveNode,e)},setAttributes(e){o.add($.Attribute,e)},setMediaPlaybackState(e,t){o.add($.MediaPlaybackState,[e,t])},setScrollPosition(e,t,n){o.add($.ScrollPosition,[e,t,n])},setSize(e,t,n){o.add($.Size,[e,t,n])},setText(e,t){o.add($.Text,[e,t])},kind:e,scope:r},l=A();a(c),zh(s,`serializationDuration`,j(l,A()));let u=o.flush();u.length>0&&t(e===0||e===1?{data:u,format:Ph.Change,type:Ah.FullSnapshot,timestamp:i}:{data:u,type:Ah.Change,timestamp:i}),n(s)}function Uh(e,t){let n=e.tagName,r=e.value;if(Kl(e,t)){let t=e.type;return n===`INPUT`&&(t===`button`||t===`submit`||t===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(n===`INPUT`||n===`TEXTAREA`)return r}var Wh=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Gh=/^[A-Za-z]+:|^\/\//,Kh=/^["']?data:.*,/i;function qh(e,t){return e.replace(Wh,(e,n,r,i,a,o)=>{let s=r||a||o;if(!t||!s||Gh.test(s)||Kh.test(s))return e;let c=n||i||``;return`url(${c}${Jh(s,t)}${c})`})}function Jh(e,t){try{return S(e,t).href}catch{return e}}function Yh(e){return e.tagName.toLowerCase()}function Xh(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}var Zh=1e6;function Qh(e,t,n,r){if(t===Q.HIDDEN)return null;let i=e.getAttribute(n),a=e.tagName;if(ql(a,n,i,t,r)){if(a===`IMG`){let t=e;if(t.naturalWidth>0)return Xh(t.naturalWidth,t.naturalHeight);let{width:n,height:r}=e.getBoundingClientRect();return n>0||r>0?Xh(n,r):Bl}return a===`SOURCE`?Bl:`***`}return i&&$c(i,Zh)}function $h(e,t,n){if(t===Q.HIDDEN)return{};let r={},i=Yh(e);for(let i=0;i<e.attributes.length;i+=1){let a=e.attributes.item(i).name,o=Qh(e,t,a,n.scope.configuration);o!==null&&(r[a]=o)}if(e.value&&(i===`textarea`||i===`select`||i===`option`||i===`input`)){let n=Uh(e,t);n!==void 0&&(r.value=n)}if(i===`option`){let n=e;n.selected&&!Kl(n,t)?r.selected=``:delete r.selected}let a=e;return i===`input`&&(a.type===`radio`||a.type===`checkbox`)&&(a.checked&&!Kl(a,t)?r.checked=``:delete r.checked),r}function eg(e,t,n){if(t===Q.HIDDEN)return{};let r={},i=e.ownerDocument,a=Yh(e);if(a===`link`){let t=Array.from(i.styleSheets).find(t=>t.href===e.href),a=tg(t);a&&t&&(n.addMetric(`cssText`,a.length),r._cssText=a)}if(a===`style`&&e.sheet){let t=tg(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}(a===`audio`||a===`video`)&&(r.rr_mediaState=e.paused?`paused`:`played`);let o,s;switch(n.kind){case 0:o=Math.round(e.scrollTop),s=Math.round(e.scrollLeft),(o||s)&&n.scope.elementsScrollPositions.set(e,{scrollTop:o,scrollLeft:s});break;case 1:n.scope.elementsScrollPositions.has(e)&&({scrollTop:o,scrollLeft:s}=n.scope.elementsScrollPositions.get(e))}return s&&(r.rr_scrollLeft=s),o&&(r.rr_scrollTop=o),r}function tg(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}return t?qh(Array.from(t,Ba()?ng:rg).join(``),e.href):null}function ng(e){return ag(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):rg(e)}function rg(e){return ig(e)&&tg(e.styleSheet)||e.cssText}function ig(e){return`styleSheet`in e}function ag(e){return`selectorText`in e}function og(e,t,n,r){if(t.parentNode?.nodeName===`STYLE`||n===Q.HIDDEN||n===Q.IGNORE)return;let i,a=Gl(t);if(i=a?Wl(a,n):n,i===Q.HIDDEN){pg(e,t,r);return}if(i!==Q.IGNORE){switch(t.nodeType){case t.CDATA_SECTION_NODE:fg(e,t,r);break;case t.DOCUMENT_NODE:sg(e,t,r);break;case t.DOCUMENT_FRAGMENT_NODE:cg(e,t,r);break;case t.DOCUMENT_TYPE_NODE:lg(e,t,r);break;case t.ELEMENT_NODE:ug(e,t,i,r);break;case t.TEXT_NODE:dg(e,t,i,r);break;default:return}switch(t.nodeType){case t.CDATA_SECTION_NODE:case t.DOCUMENT_TYPE_NODE:case t.TEXT_NODE:return}e.descend(),al(t,t=>{og(e,t,i,r)}),e.ascend()}}function sg(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,`#document`),n.setScrollPosition(r,eu(),tu()),mg(t.adoptedStyleSheets,r,n)}function cg(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);if(!il(t)){n.addNode(i,`#document-fragment`);return}n.addNode(i,`#shadow-root`),n.scope.shadowRootsController.addShadowRoot(t,n.scope),mg(t.adoptedStyleSheets,r,n)}function lg(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,`#doctype`,t.name,t.publicId,t.systemId)}function ug(e,t,n,r){let{nodeId:i,insertionPoint:a}=e.advance(t),o=Object.entries($h(t,n,r));r.addNode(a,gg(t),...o);let{_cssText:s,rr_mediaState:c,rr_scrollLeft:l,rr_scrollTop:u}=eg(t,n,r),d=t;if(s!==void 0&&d.sheet){let e=r.scope.styleSheetIds.getOrInsert(d.sheet);r.addStyleSheet(s),r.attachStyleSheets(i,[e])}c===`played`?r.setMediaPlaybackState(i,Nh.Play):c===`paused`&&r.setMediaPlaybackState(i,Nh.Pause),(l!==void 0||u!==void 0)&&r.setScrollPosition(i,l||0,u||0)}function dg(e,t,n,r){let{insertionPoint:i}=e.advance(t),a=Xl(t,n);r.addNode(i,`#text`,a)}function fg(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,`#cdata-section`)}function pg(e,t,n){if(!nl(t))return;let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,gg(t),[Ll,Rl]);let{width:a,height:o}=t.getBoundingClientRect();n.setSize(r,a,o)}function mg(e,t,n){!e||e.length===0||n.attachStyleSheets(t,e.map(e=>hg(e,n)))}function hg(e,t){let n=Array.from(e.cssRules||e.rules,e=>e.cssText),r=e.media.length>0?Array.from(e.media):void 0;return t.addMetric(`cssText`,n.reduce((e,t)=>e+t.length,0)),t.addStyleSheet(n,r,e.disabled),t.scope.styleSheetIds.getOrInsert(e)}function gg(e){let t=e.nodeName;return _g(e)?`svg>${t}`:t}function _g(e){return e.namespaceURI===`http://www.w3.org/2000/svg`}function vg(e,t,n,r,i,a){a.resetIds(),Hh(t,r,i,a,e,e=>{og(Fh(a.nodeIds),n,a.configuration.defaultPrivacyLevel,e)})}function yg(e,t,n,r,i){Hh(2,n,r,i,e,e=>bg(t,e))}function bg(e,t){let n=new Set,r=new Map,i=new Map,a=new Set;for(let t of e)switch(t.type){case`attributes`:{let e=t.target,n=r.get(e);n||(n=new Map,r.set(e,n));let i=t.attributeName;n.has(i)||n.set(i,t.oldValue);break}case`characterData`:i.has(t.target)||i.set(t.target,t.oldValue);break;case`childList`:for(let e=0;e<t.addedNodes.length;e++)n.add(t.addedNodes[e]);for(let e=0;e<t.removedNodes.length;e++)a.add(t.removedNodes[e])}let o=t.scope.nodeIds.nextId,s=new Map;xg(a,t),Sg(n,s,t),Cg(i,o,s,t),wg(r,o,s,t)}function xg(e,t){let n=t.scope.nodeIds;for(let r of e){let e=n.get(r);e!==void 0&&(Eg(r,e=>{rl(e)&&t.scope.shadowRootsController.removeShadowRoot(e.shadowRoot),n.delete(e)}),t.removeNode(e))}}function Sg(e,t,n){let r=n.scope.nodeIds;for(let i of e){if(!i.isConnected||r.get(i)!==void 0)continue;let e=ol(i);if(!e)continue;let a=r.get(e);if(a===void 0)continue;let o=Ul(e,n.scope.configuration.defaultPrivacyLevel,t);og(Ih(a,Tg(i,r),r),i,o,n)}}function Cg(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(a.textContent===o||!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=ol(a);if(!s)continue;let c=Ul(s,r.scope.configuration.defaultPrivacyLevel,n);if(c===Q.HIDDEN||c===Q.IGNORE)continue;let l=Xl(a,c);r.setText(e,l)}}function wg(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=Ul(a,r.scope.configuration.defaultPrivacyLevel,n);if(s===Q.HIDDEN||s===Q.IGNORE)continue;let c=[e];for(let[e,t]of o){if(a.getAttribute(e)===t)continue;if(e===`value`){let t=Uh(a,s);t!==void 0&&c.push([e,t]);continue}let n=Qh(a,s,e,r.scope.configuration);n===null?c.push([e]):c.push([e,n])}c.length>1&&r.setAttributes(c)}}function Tg(e,t){let n=e.nextSibling;for(;n;){let e=t.get(n);if(e!==void 0)return e;n=n.nextSibling}}function Eg(e,t){t(e),al(e,e=>Eg(e,t))}var Dg=25;function Og(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>Dg||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>Dg}var kg=(e,t)=>{let n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)Og(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},Ag=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function jg(e,t,n,r,i){Mg(A(),0,t,n,i);let{unsubscribe:a}=e.subscribe(Z.VIEW_CREATED,e=>{r(),Mg(e.startClocks.timeStamp,1,t,n,i)});return{stop:a}}function Mg(e,t,n,r,i){let{width:a,height:o}=au();n({data:{height:o,href:window.location.href,width:a},type:Ah.Meta,timestamp:e}),n({data:{has_focus:document.hasFocus()},type:Ah.Focus,timestamp:e}),vg(e,t,document,n,r,i),window.visualViewport&&n({data:Ag(window.visualViewport),type:Ah.VisualViewport,timestamp:e})}function Ng(){return Rg(1)}function Pg(){return Rg(0)}function Fg(){return Lg(0)}function Ig(){return Rg(0)}function Lg(e){return zg(()=>new Map,e)}function Rg(e){return zg(()=>new WeakMap,e)}function zg(e,t){let n=e(),r=t,i=e=>n.get(e);return{clear(){r!==t&&(n=e(),r=t)},delete(e){n.delete(e)},get:i,getOrInsert(e){let t=i(e);return t===void 0&&(t=r++,n.set(e,t)),t},get nextId(){return r},get size(){return r-t}}}function Bg(e,t,n){let r={resetIds(){r.eventIds.clear(),r.nodeIds.clear(),r.stringIds.clear(),r.styleSheetIds.clear()},configuration:e,elementsScrollPositions:t,eventIds:Ng(),nodeIds:Pg(),shadowRootsController:n,stringIds:Fg(),styleSheetIds:Ig()};return r}function Vg(){let e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}function Hg(e){return!!e.changedTouches}function Ug(e){return e.composed===!0&&rl(e.target)?e.composedPath()[0]:e.target}function Wg(e,t,n=A()){return{data:{source:e,...t},type:Ah.IncrementalSnapshot,timestamp:n}}var Gg=50;function Kg(e,t){let{throttled:n,cancel:r}=Pt(n=>{let r=Ug(n),i=t.nodeIds.get(r);if(i===void 0)return;let a=qg(n);if(!a)return;let o={id:i,timeOffset:0,x:a.x,y:a.y};e(Wg(Hg(n)?jh.TouchMove:jh.MouseMove,{positions:[o]}))},Gg,{trailing:!1}),{stop:i}=dn(document,[B.MOUSE_MOVE,B.TOUCH_MOVE],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function qg(e){let{clientX:t,clientY:n}=Hg(e)?e.changedTouches[0]:e;if(window.visualViewport){let{visualViewportX:e,visualViewportY:r}=kg(t,n);t=e,n=r}if(!(!Number.isFinite(t)||!Number.isFinite(n)))return{x:t,y:n}}var Jg={[B.POINTER_UP]:Mh.MouseUp,[B.MOUSE_DOWN]:Mh.MouseDown,[B.CLICK]:Mh.Click,[B.CONTEXT_MENU]:Mh.ContextMenu,[B.DBL_CLICK]:Mh.DblClick,[B.FOCUS]:Mh.Focus,[B.BLUR]:Mh.Blur,[B.TOUCH_START]:Mh.TouchStart,[B.TOUCH_END]:Mh.TouchEnd};function Yg(e,t){return dn(document,Object.keys(Jg),n=>{let r=Ug(n),i=t.nodeIds.get(r);if(i===void 0||Ul(r,t.configuration.defaultPrivacyLevel)===Q.HIDDEN)return;let a=Jg[n.type],o;if(a!==Mh.Blur&&a!==Mh.Focus){let e=qg(n);if(!e)return;o={id:i,type:a,x:e.x,y:e.y}}else o={id:i,type:a};e({id:t.eventIds.getOrInsert(n),...Wg(jh.MouseInteraction,o)})},{capture:!0,passive:!0})}var Xg=100;function Zg(e,t,n){let{throttled:r,cancel:i}=Pt(e=>{let r=Ug(e);if(!r)return;let i=n.nodeIds.get(r);if(i===void 0||Ul(r,n.configuration.defaultPrivacyLevel)===Q.HIDDEN)return;let a=r===document?{scrollTop:tu(),scrollLeft:eu()}:{scrollTop:Math.round(r.scrollTop),scrollLeft:Math.round(r.scrollLeft)};n.elementsScrollPositions.set(r,a),t(Wg(jh.Scroll,{id:i,x:a.scrollLeft,y:a.scrollTop}))},Xg),{stop:a}=V(e,B.SCROLL,r,{capture:!0,passive:!0});return{stop:()=>{a(),i()}}}var Qg=200;function $g(e){let t=ru().subscribe(t=>{e(Wg(jh.ViewportResize,t))});return{stop:()=>{t.unsubscribe()}}}function e_(e){let t=window.visualViewport;if(!t)return{stop:R};let{throttled:n,cancel:r}=Pt(()=>{e({data:Ag(t),type:Ah.VisualViewport,timestamp:A()})},Qg,{trailing:!1}),{stop:i}=dn(t,[B.RESIZE,B.SCROLL],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function t_(e,t){return dn(document,[B.PLAY,B.PAUSE],n=>{let r=Ug(n);if(!r)return;let i=t.nodeIds.get(r);i!==void 0&&Ul(r,t.configuration.defaultPrivacyLevel)!==Q.HIDDEN&&e(Wg(jh.MediaInteraction,{id:i,type:n.type===B.PLAY?Nh.Play:Nh.Pause}))},{capture:!0,passive:!0})}function n_(e,t){function n(e,n){if(!e?.ownerNode)return;let r=t.nodeIds.get(e.ownerNode);r!==void 0&&n(r)}let r=[z(CSSStyleSheet.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t,t=>e(Wg(jh.StyleSheetRule,{id:t,adds:[{rule:r,index:i}]})))}),z(CSSStyleSheet.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t,t=>e(Wg(jh.StyleSheetRule,{id:t,removes:[{index:r}]})))})];typeof CSSGroupingRule<`u`?i(CSSGroupingRule):(i(CSSMediaRule),i(CSSSupportsRule));function i(t){r.push(z(t.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t.parentStyleSheet,n=>{let a=r_(t);a&&(a.push(i||0),e(Wg(jh.StyleSheetRule,{id:n,adds:[{rule:r,index:a}]})))})}),z(t.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t.parentStyleSheet,n=>{let i=r_(t);i&&(i.push(r),e(Wg(jh.StyleSheetRule,{id:n,removes:[{index:i}]})))})}))}return{stop:()=>{r.forEach(e=>e.stop())}}}function r_(e){let t=[],n=e;for(;n.parentRule;){let e=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(e),n=n.parentRule}if(!n.parentStyleSheet)return;let r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(r),t}function i_(e){return dn(window,[B.FOCUS,B.BLUR],()=>{e({data:{has_focus:document.hasFocus()},type:Ah.Focus,timestamp:A()})})}function a_(e,t,n){let r=e.subscribe(Z.VIEW_ENDED,()=>{n(),t({timestamp:A(),type:Ah.ViewEnd})});return{stop:()=>{r.unsubscribe()}}}function o_(e,t,n){let r=n.configuration.defaultPrivacyLevel,i=new WeakMap,a=e!==document,{stop:o}=dn(e,a?[B.CHANGE]:[B.INPUT,B.CHANGE],e=>{let t=Ug(e);(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&c(t)},{capture:!0,passive:!0}),s;if(a)s=R;else{let e=[un(HTMLInputElement.prototype,`value`,c),un(HTMLInputElement.prototype,`checked`,c),un(HTMLSelectElement.prototype,`value`,c),un(HTMLTextAreaElement.prototype,`value`,c),un(HTMLSelectElement.prototype,`selectedIndex`,c)];s=()=>{e.forEach(e=>e.stop())}}return{stop:()=>{s(),o()}};function c(e){let t=Ul(e,r);if(t===Q.HIDDEN)return;let n=e.type,i;if(n===`radio`||n===`checkbox`){if(Kl(e,t))return;i={isChecked:e.checked}}else{let n=Uh(e,t);if(n===void 0)return;i={text:n}}l(e,i);let a=e.name;n===`radio`&&a&&e.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(a)}"]`).forEach(t=>{t!==e&&l(t,{isChecked:!1})})}function l(e,r){let a=n.nodeIds.get(e);if(a===void 0)return;let o=i.get(e);(!o||o.text!==r.text||o.isChecked!==r.isChecked)&&(i.set(e,r),t(Wg(jh.Input,{id:a,...r})))}}var s_=100;function c_(e){let t=R,n=[];function r(){t(),e(n),n=[]}let{throttled:i,cancel:a}=Pt(r,16,{leading:!1});return{addMutations:e=>{n.length===0&&(t=mo(i,{timeout:s_}));for(let t of e)n.push(t)},flush:r,stop:()=>{t(),a()}}}function l_(e,t,n,r){let i=Nc();if(!i)return{stop:R,flush:R};let a=c_(e=>{yg(A(),e.concat(o.takeRecords()),t,n,r)}),o=new i(w(a.addMutations));return o.observe(e,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),a.stop()},flush:()=>{a.flush()}}}var u_=(e,t)=>{let n=new Map;return{addShadowRoot:(r,i)=>{if(n.has(r))return;let a=l_(r,e,t,i),o=o_(r,e,i),s=Zg(r,e,i);n.set(r,{flush:()=>a.flush(),stop:()=>{a.stop(),o.stop(),s.stop()}})},removeShadowRoot:e=>{let t=n.get(e);t&&(t.stop(),n.delete(e))},stop:()=>{n.forEach(({stop:e})=>e())},flush:()=>{n.forEach(({flush:e})=>e())}}};function d_(e){let{emitRecord:t,emitStats:n,configuration:r,lifeCycle:i}=e;if(!t||!n)throw Error(`emit functions are required`);let a=n=>{t(n),Ln(`record`,{record:n}),Ss(e.viewHistory.findView().id)},o=u_(a,n),s=Bg(r,Vg(),o),{stop:c}=jg(i,a,n,l,s);function l(){o.flush(),u.flush()}let u=l_(document,a,n,s),d=[u,Kg(a,s),Yg(a,s),Zg(document,a,s),$g(a),o_(document,a,s),t_(a,s),n_(a,s),i_(a),e_(a),a_(i,a,l)];return{stop:()=>{o.stop(),d.forEach(e=>e.stop()),c()},flushMutations:l,shadowRootsController:o}}function f_(e,t,n,r){let i=new FormData;i.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);let a={raw_segment_size:r,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(a);return i.append(`event`,new Blob([o],{type:`application/json`})),{data:i,bytesCount:e.byteLength,cssText:n.cssText,isFullSnapshot:t.index_in_view===0,rawSize:r,recordCount:t.records_count,serializationDuration:n.serializationDuration}}function p_({context:e,creationReason:t,encoder:n}){let r=0,i=e.view.id,a={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:bs(i),source:`browser`,...e},o=Rh();xs(i);function s(e,t){a.start=Math.min(a.start,e.timestamp),a.end=Math.max(a.end,e.timestamp),a.records_count+=1,a.has_full_snapshot||=e.type===Ah.FullSnapshot||e.type===Ah.Change&&a.index_in_view===0;let i=n.isEmpty?`{"records":[`:`,`;n.write(i+JSON.stringify(e),e=>{r+=e,t(r)})}function c(e){Bh(o,e)}function l(e){if(n.isEmpty)throw Error(`Empty segment flushed`);n.write(`],${JSON.stringify(a).slice(1)}\n`),n.finish(t=>{Cs(a.view.id,t.rawBytesCount),e(a,o,t)})}return{addRecord:s,addStats:c,flush:l}}var m_=5*O;function h_(e,t,n,r,i,a){return g_(e,()=>__(t.applicationId,n,r),i,a)}function g_(e,t,n,r){let i={status:0,nextSegmentCreationReason:`init`},{unsubscribe:a}=e.subscribe(Z.VIEW_CREATED,()=>{s(`view_change`)}),{unsubscribe:o}=e.subscribe(Z.PREPARE_URGENT_FLUSH,e=>{s(e)});function s(e){i.status===1&&(i.segment.flush((t,r,i)=>{let a=f_(i.output,t,r,i.rawBytesCount);br(e)?n.sendOnExit(a):n.send(a)}),L(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:e=>{if(i.status!==2){if(i.status===0){let e=t();if(!e)return;i={status:1,segment:p_({encoder:r,context:e,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:I(()=>{s(`segment_duration_limit`)},m_)}}i.segment.addRecord(e,e=>{e>6e4&&s(`segment_bytes_limit`)})}},addStats:e=>{i.status===1&&i.segment.addStats(e)},stop:()=>{s(`stop`),a(),o()}}}function __(e,t,n){let r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function v_(e,t){if(!e.metricsEnabled)return{stop:R};let{unsubscribe:n}=t.subscribe(e=>{if(e.type===`failure`||e.type===`queue-full`||e.type===`success`&&e.payload.isFullSnapshot){let t=y_(e.type,e.bandwidth,e.payload);Jr(Pr.SEGMENT_METRICS_TELEMETRY_NAME,{metrics:t})}});return{stop:n}}function y_(e,t,n){return{cssText:{count:n.cssText.count,max:n.cssText.max,sum:n.cssText.sum},encoding:{fullSnapshot:`change`,incrementalSnapshot:`change`},isFullSnapshot:n.isFullSnapshot,ongoingRequests:{count:t.ongoingRequestCount,totalSize:t.ongoingByteCount},recordCount:n.recordCount,result:e,serializationDuration:{count:n.serializationDuration.count,max:n.serializationDuration.max,sum:n.serializationDuration.sum},size:{compressed:n.bytesCount,raw:n.rawSize}}}function b_(e){let t=ur();return{addRecord:n=>{let r=e.findView();t.send(`record`,n,r.id)}}}var x_=e({startRecording:()=>S_});function S_(e,t,n,r,i,a,o){let s=[],c=o||ir([Be(t,`replay`)],t=>{e.notify(Z.RAW_ERROR_COLLECTED,{error:{message:t,source:Rn.AGENT,startClocks:N()}}),Gr(`Error reported to customer`,{"error.message":t})},6e4),l,u;if(fr())({addRecord:l}=b_(r)),u=R;else{let o=h_(e,t,n,r,c,i);l=o.addRecord,u=o.addStats,s.push(o.stop);let d=v_(a,c.observable);s.push(d.stop)}let{stop:d}=d_({emitRecord:l,emitStats:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(d),{stop:()=>{s.forEach(e=>e())}}}function C_(){let e=ur();return t=>{e.send(`profile`,t)}}function w_(e,t,n){let r=Km(e,t,n,os.PROFILING);return({profile:e,trace:t})=>{let n={event:e,"wall-time.json":t};r.send(n)}}var T_=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;function E_(e){return e?e.replace(T_,`/?`):`/`}var D_=(e,t)=>e||E_(t);function O_(e,t,n){let r=Nn(t),i=k_(e,t.applicationId,n),a=M_(r);return{...i,attachments:[`wall-time.json`],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:`chrome`,runtime:`chrome`,format:`json`,version:4,tags_profiler:a.join(`,`),_dd:{clock_drift:Ie()}}}function k_(e,t,n){let{ids:r,names:i}=A_(e.views),a=e.longTasks.map(e=>e.id).filter(e=>e!==void 0),o=e.actions?.map(e=>e.id).filter(e=>e!==void 0)??[],{ids:s,labels:c}=j_(e.vitals),l={application:{id:t}};return n&&(l.session={id:n}),r.length&&(l.view={id:r,name:i}),a.length&&(l.long_task={id:a}),o.length&&(l.action={id:o,label:[]}),s.length&&(l.vital={id:s,label:c}),l}function A_(e){let t={ids:[],names:[]};for(let n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}function j_(e){let t={ids:[],labels:[]};if(!e)return t;for(let n of e)t.ids.push(n.id),t.labels.push(n.label);return t.labels=Array.from(new Set(t.labels)),t}function M_(e){return e.concat([`language:javascript`,`runtime:chrome`,`family:chrome`,`host:browser`])}var N_=Ri;function P_(e){let t=Ni({expireDelay:N_});return e.subscribe(Z.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{e.type===`long_task`&&t.add({id:e.long_task.id,startClocks:n,duration:r,entryType:e.long_task.entry_type===Ds.LONG_TASK?cl.LONG_TASK:cl.LONG_ANIMATION_FRAME},n.relative).close(Oe(n.relative,r))}),t}var F_=Ri;function I_(e){let t=Ni({expireDelay:F_});return e.subscribe(Z.ACTION_STARTED,e=>{t.add({id:e.id,label:``,startClocks:e.startClocks,duration:void 0},e.startClocks.relative)}),e.subscribe(Z.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type===`action`){let i=t.getEntries(n.relative).find(t=>t.value.id===e.action.id),a=r??0;i?(i.value.duration=a,i.close(Oe(n.relative,a))):t.add({id:e.action.id,label:``,startClocks:n,duration:r},n.relative).close(Oe(n.relative,a))}}),t}var L_=Ri;function R_(e){let t=Ni({expireDelay:L_});return e.subscribe(Z.DURATION_VITAL_STARTED,e=>{t.add({id:e.id,type:js.DURATION,startClocks:e.startClocks,duration:void 0,label:e.name},e.startClocks.relative)}),e.subscribe(Z.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type!==`vital`)return;if(e.vital.type===js.OPERATION_STEP){if(e.vital.step_type===`start`)t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,label:e.vital.name},n.relative);else if(e.vital.step_type===`end`){let r=t.findAllEntries().find(t=>t.value.type===js.OPERATION_STEP&&t.value.label===e.vital.name&&t.value.operationKey===e.vital.operation_key);if(!r)return;r.value.duration=j(r.value.startClocks.relative,n.relative),r.close(n.relative)}return}let i=t.getEntries(n.relative).find(t=>t.value.id===e.vital.id);if(i){i.value.duration=r,i.close(Oe(n.relative,r));return}t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,duration:r,label:e.vital.name},n.relative).close(Oe(n.relative,r))}),t}function z_(e,t){let n=e?.data?.attributes;if(!n||typeof n.admitted!=`boolean`||typeof n.reason!=`string`)return t;let r=n.reason===`backend_client_not_initialized`?`backend_unavailable`:n.reason;return{decision:n.admitted?`quota_ok`:`quota_ko`,reason:r}}function B_(e,t){return He({proxy:e.proxy,site:e.site,path:`/api/v2/profiling/quota`,parameters:`session_id=${t}`,subdomain:`quota`})}function V_(e,t,n=5e3){let r=B_(e,t),i=new AbortController,a,o=Hn(r,{credentials:`omit`,signal:i.signal,headers:new Headers({"DD-CLIENT-TOKEN":e.clientToken})}).then(e=>{let t=e.status===429?{decision:`quota_ko`,reason:`quota_exceeded`}:{decision:`quota_ok`,reason:`api-error`};return e.json().then(e=>(L(a),z_(e,t)),()=>(L(a),t))}).catch(()=>(L(a),{decision:`quota_ok`,reason:`api-error`})),s=new Promise(e=>{a=I(()=>{i.abort(),e({decision:`quota_ok`,reason:`timeout`})},n)});return Promise.race([o,s])}function H_(e){let t=new Map(ti(e)?.map(e=>[e.url,e.id])),n=[];return e.forEach((e,r)=>{let i=t.get(e);i!==void 0&&n.push({resourceId:r,debugId:i})}),n.length?n:void 0}var U_=e({DEFAULT_RUM_PROFILER_CONFIGURATION:()=>W_,createRumProfiler:()=>G_}),W_={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3};function G_(e,t,n,r,i,a,o=W_){let s=fr()?F(C_)():F(w_)(e,t,i),c,l=[],u=F(P_)(t),d=F(I_)(t),f=F(R_)(t),p={state:`stopped`,stateReason:`initializing`},m=0;t.subscribe(Z.SESSION_EXPIRED,()=>{v(`session-expired`)}),t.subscribe(Z.SESSION_RENEWED,()=>{if(p.state===`stopped`&&(p.stateReason===`session-expired`||p.stateReason===`quota_ko`)){let t=n.findTrackedSession();if(!t||!Ii(t.id,Pi(e.sessionSampleRate,e.profilingSampleRate)))return;h()}});function h(){if(p.state===`running`)return;let e=a.findView();c=e?{startClocks:e.startClocks,viewId:e.id,viewName:D_(e.name,document.location.pathname)}:void 0,l.push(V(window,B.VISIBILITY_CHANGE,S).stop,V(window,B.BEFORE_UNLOAD,oe).stop),y(),g()}function g(){if(fr())return;let t=++m,r=n.findTrackedSession()?.id;r&&F(V_)(e,r).then(e=>{t===m&&(p.state===`running`||p.state===`paused`)&&e.decision===`quota_ko`&&v(`quota_ko`,e.reason)}).catch(E)}function _(){v(`stopped-by-user`)}function v(e,t){ne(e),l.forEach(e=>e()),l.length=0,r.set({status:`stopped`,error_reason:void 0,quota_reason:t})}function ee(e){if(e.state===`running`)return{cleanupTasks:e.cleanupTasks};let n=[],r=t.subscribe(Z.VIEW_CREATED,e=>{let t={viewId:e.id,viewName:D_(e.name,document.location.pathname),startClocks:e.startClocks};re(t),c=t});return n.push(r.unsubscribe),{cleanupTasks:n}}function y(){let e=b.Profiler;if(!e)throw r.set({status:`error`,error_reason:`not-supported-by-browser`}),Error(`RUM Profiler is not supported in this browser.`);p.state===`running`&&te(p);let{cleanupTasks:t}=ee(p),i;try{i=new e({sampleInterval:o.sampleIntervalMs,maxBufferSize:Math.round(o.collectIntervalMs*1.5/o.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes(`disabled by Document Policy`)?(C.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),r.set({status:`error`,error_reason:`missing-document-policy-header`})):r.set({status:`error`,error_reason:`unexpected-exception`});return}r.set({status:`running`,error_reason:void 0}),p={state:`running`,startClocks:N(),profiler:i,timeoutId:I(y,o.collectIntervalMs),views:[],cleanupTasks:t,longTasks:[],sessionId:n.findTrackedSession()?.id},re(c),i.addEventListener(`samplebufferfull`,ae)}function te(e){L(e.timeoutId),e.profiler.removeEventListener(`samplebufferfull`,ae);let{startClocks:t,views:n,sessionId:r}=e;e.profiler.stop().then(e=>{let i=N(),a=j(t.relative,i.relative),s=u.findAll(t.relative,a),c=d.findAll(t.relative,a),l=f.findAll(t.relative,a).map(e=>({id:e.id,label:e.label,startClocks:e.startClocks,duration:e.duration})),p=a<o.minProfileDurationMs;s.length===0&&p||ie(Object.assign({},e,{startClocks:t,endClocks:i,clocksOrigin:Ae(),longTasks:s,actions:c,vitals:l,views:n,sampleInterval:o.sampleIntervalMs,debugIds:H_(e.resources)}),r)}).catch(E)}function ne(e){if(p.state!==`running`){(p.state===`paused`||p.state===`stopped`&&e===`stopped-by-user`)&&(p={state:`stopped`,stateReason:e});return}let t=p;p={state:`stopped`,stateReason:e},t.cleanupTasks.forEach(e=>e()),e===`quota_ko`?(L(t.timeoutId),t.profiler.removeEventListener(`samplebufferfull`,ae),t.profiler.stop().catch(E)):te(t)}function x(){if(p.state!==`running`)return;let e=p;p={state:`paused`},e.cleanupTasks.forEach(e=>e()),te(e)}function re(e){p.state!==`running`||!e||p.views.push(e)}function ie(t,n){let r={profile:O_(t,e,n),trace:t};s(r)}function ae(){y()}function S(){document.visibilityState===`hidden`&&p.state===`running`?x():document.visibilityState===`visible`&&p.state===`paused`&&y()}function oe(){y()}function se(){return p.state===`stopped`}function ce(){return p.state===`running`}function le(){return p.state===`paused`}return{start:h,stop:_,isStopped:se,isRunning:ce,isPaused:le}}export{i as a,th as i,Th as n,_h as r,Dh as t};
|