@dcl/explore-site 0.0.1-24139497769.commit-1069c81 → 0.0.1-24246071323.commit-ae89de5

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.
Files changed (120) hide show
  1. package/assets/HomePage-BRjviy6i.js +5 -0
  2. package/assets/{QueryClientProvider-wu2IqrXs.js → QueryClientProvider-DVdvK9va.js} +1 -1
  3. package/assets/SensorsRounded-DtEz-w61.js +15 -0
  4. package/assets/{__federation_expose_App-MOR1BmrN.js → __federation_expose_App-UIDwSy0G.js} +1 -1
  5. package/assets/{__federation_fn_import-DHP1HS9A.js → __federation_fn_import-DOIN05Fe.js} +1 -1
  6. package/assets/__federation_shared_@dcl/{hooks-B6YLUjAN.js → hooks-CEZvoXY7.js} +45 -45
  7. package/assets/__federation_shared_@emotion/react-D39P6GYA.js +1 -0
  8. package/assets/__federation_shared_@emotion/{styled-DJxepagK.js → styled-wDwr2-E1.js} +1 -1
  9. package/assets/__federation_shared_decentraland-ui2-CjnT6vsj.js +357 -0
  10. package/assets/{__federation_shared_react-redux-wunxthN_.js → __federation_shared_react-redux-BtWPSCMa.js} +1 -1
  11. package/assets/{__federation_shared_react-router-dom-W4djHvIn.js → __federation_shared_react-router-dom-B3WlSHDv.js} +1 -1
  12. package/assets/{__federation_shared_viem-DarmY_kb.js → __federation_shared_viem-DsuBmHyA.js} +1 -1
  13. package/assets/{__federation_shared_wagmi-DWvj6H_x.js → __federation_shared_wagmi-31TKA6Na.js} +1 -1
  14. package/assets/{add-BCakEKbt.js → add-B17vE1dj.js} +1 -1
  15. package/assets/{all-wallets-CXkjwEqF.js → all-wallets-br0SQ6f1.js} +1 -1
  16. package/assets/{app-store-BFVxlsNN.js → app-store-TXFDlG4m.js} +1 -1
  17. package/assets/{apple-DXjZC7E3.js → apple-CdssIs8b.js} +1 -1
  18. package/assets/{arrow-bottom-pJS57nib.js → arrow-bottom-UP46D1RV.js} +1 -1
  19. package/assets/{arrow-bottom-circle-DFJJmWcQ.js → arrow-bottom-circle-CfRtxqAu.js} +1 -1
  20. package/assets/{arrow-left-Cynzu9ZW.js → arrow-left-D3MhBN-e.js} +1 -1
  21. package/assets/{arrow-right-CGX20nmV.js → arrow-right-Ch9lwGLD.js} +1 -1
  22. package/assets/{arrow-top-jzt266yO.js → arrow-top-DDIdbITB.js} +1 -1
  23. package/assets/{auto-track-O_BrBwhe.js → auto-track-BD4cc-fa.js} +1 -1
  24. package/assets/{bank-BMGgPrPK.js → bank-BGNOYVBO.js} +1 -1
  25. package/assets/{basic-CM6UVWAr.js → basic-0N_dp7rb.js} +1 -1
  26. package/assets/{browser-DnoUbi8M.js → browser-KaQl6Cnr.js} +1 -1
  27. package/assets/{card-CPfzdBrQ.js → card-DOmOrMqu.js} +1 -1
  28. package/assets/{ccip-BIrr4QNJ.js → ccip-BFQdmFBy.js} +1 -1
  29. package/assets/{checkmark-8BBVS9mV.js → checkmark-DZg8Fw7N.js} +1 -1
  30. package/assets/{checkmark-bold-B-hOv8nD.js → checkmark-bold-CM6ftVnM.js} +1 -1
  31. package/assets/{chevron-bottom-B_y3oaup.js → chevron-bottom-Brvj1wpB.js} +1 -1
  32. package/assets/{chevron-left-CjhHB4PY.js → chevron-left-C-_stSPs.js} +1 -1
  33. package/assets/{chevron-right-DSPiRdQp.js → chevron-right-CJ-DS39V.js} +1 -1
  34. package/assets/{chevron-top-DzuxMZzU.js → chevron-top-Bupj8RBl.js} +1 -1
  35. package/assets/{chrome-store-BxqIkfMp.js → chrome-store-Dn25y4kY.js} +1 -1
  36. package/assets/{clock-DANY2jZR.js → clock-CKLihpL2.js} +1 -1
  37. package/assets/{close-CQGRZC4E.js → close-Z9iONWFp.js} +1 -1
  38. package/assets/{coinPlaceholder-Bj_cgZAp.js → coinPlaceholder-DQ41ohQH.js} +1 -1
  39. package/assets/{compass-C6LtdRSt.js → compass-ChugCtf_.js} +1 -1
  40. package/assets/{copy-DcH6gZ_z.js → copy-9OztSM3R.js} +1 -1
  41. package/assets/{core-CzvI5AHq.js → core-CqbgCIgs.js} +15 -15
  42. package/assets/{createClient-CCWiffBP.js → createClient-BAE0sv6q.js} +1 -1
  43. package/assets/{cursor-UwkCsJ2a.js → cursor-CKigdoE3.js} +1 -1
  44. package/assets/{cursor-transparent-BwBcOE8i.js → cursor-transparent-Us7WNmyD.js} +1 -1
  45. package/assets/{desktop-D-Y36QoS.js → desktop-BaiVA8Uc.js} +1 -1
  46. package/assets/{disconnect-Rv8z66NN.js → disconnect-7OJd5EWY.js} +1 -1
  47. package/assets/{discord-CCWSVMiz.js → discord-DSkCh_0K.js} +1 -1
  48. package/assets/{emotion-react.browser.esm-CVN2FXZ4.js → emotion-react.browser.esm-Cjt1nLQy.js} +1 -1
  49. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-CmaUBdeL.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-DTFFQVT5.js} +1 -1
  50. package/assets/{etherscan-DbjOsyUL.js → etherscan-B9ggfOFo.js} +1 -1
  51. package/assets/{exclamation-triangle-CpUr7g91.js → exclamation-triangle-B5uAEtJv.js} +1 -1
  52. package/assets/{extension-BfEjbpkB.js → extension-CZwaQr8E.js} +1 -1
  53. package/assets/{external-link-DkrVV6h_.js → external-link-9d8aMJCO.js} +1 -1
  54. package/assets/{facebook-C_vFokNe.js → facebook-_59BVxWu.js} +1 -1
  55. package/assets/{farcaster-N_SOvjsu.js → farcaster-DQS8nu4z.js} +1 -1
  56. package/assets/{filters-CriWZ1X8.js → filters-C90VADFP.js} +1 -1
  57. package/assets/{github-Pf6KfVkt.js → github-CDqiFRRV.js} +1 -1
  58. package/assets/{google-CX5egUeg.js → google-D3ZLD7V0.js} +1 -1
  59. package/assets/{help-circle-Bg9wySiB.js → help-circle-DwFhBh3W.js} +1 -1
  60. package/assets/{id-CT3sHstQ.js → id-Wf1WiJ_c.js} +1 -1
  61. package/assets/{image-BeRTCwCL.js → image-BSuDouoM.js} +1 -1
  62. package/assets/{index-CEXIX8YP.js → index-BBhYzq_I.js} +1 -1
  63. package/assets/{index-BwGE7VFa.js → index-BfCL0Ynt.js} +1 -1
  64. package/assets/{index-NxahoDGS.js → index-CA-WFTlT.js} +2 -2
  65. package/assets/{index-DSdP4T4T.js → index-COyB700R.js} +1 -1
  66. package/assets/{index-DOSLaa4d.js → index-CfPI-P1k.js} +1 -1
  67. package/assets/{index-C5uwZBLu.js → index-DVPxpamO.js} +1 -1
  68. package/assets/index-Dy0yjznp.js +1 -1
  69. package/assets/{index-kumR_dwu.js → index-H1eeUSnc.js} +3 -3
  70. package/assets/{index-BJlYfD1T.js → index-MfeO5oeE.js} +1 -1
  71. package/assets/index-VfkM29PH.js +1 -1
  72. package/assets/{index.es-3vuqm7DP.js → index.es-GqjJpWVv.js} +3 -3
  73. package/assets/{info-CqJ_nQxF.js → info-KVJmNAM1.js} +1 -1
  74. package/assets/{info-circle-IwWDU6qu.js → info-circle-BAkis4An.js} +1 -1
  75. package/assets/jsx-runtime-B1l0k91v.js +1 -1
  76. package/assets/{lightbulb-DTyI7zwy.js → lightbulb-DvypwuTo.js} +1 -1
  77. package/assets/{localBatchGatewayRequest-CVa1PSOH.js → localBatchGatewayRequest--h_QH696.js} +1 -1
  78. package/assets/{mail-CoON8_yY.js → mail-C0ZQ2OFw.js} +1 -1
  79. package/assets/{mobile-hiVL2smK.js → mobile-D95B-d86.js} +1 -1
  80. package/assets/{more-CEWjr51n.js → more-Ckc8xbMi.js} +1 -1
  81. package/assets/{network-placeholder-B93dK-Wv.js → network-placeholder-Du_5diSz.js} +1 -1
  82. package/assets/{nftPlaceholder-Cv1W78Cm.js → nftPlaceholder-DJ5bJFkN.js} +1 -1
  83. package/assets/{off-CfBcNJQq.js → off-BRBvgMl0.js} +1 -1
  84. package/assets/{play-store-baeJ6QUq.js → play-store-DoDvVRZ-.js} +1 -1
  85. package/assets/{plus-Cm_DeSMx.js → plus-fWw3iSKX.js} +1 -1
  86. package/assets/preload-helper-uzL1GC84.js +1 -0
  87. package/assets/{qr-code-BgEAZWNl.js → qr-code-CLoQGf0c.js} +1 -1
  88. package/assets/{recycle-horizontal-JBLMwMyk.js → recycle-horizontal-Dnrx80ul.js} +1 -1
  89. package/assets/{refresh-D8wfv--n.js → refresh-NegnxbG_.js} +1 -1
  90. package/assets/remoteEntry.js +1 -1
  91. package/assets/{reown-logo-DMTh3d1z.js → reown-logo-D8rUMmlK.js} +1 -1
  92. package/assets/{search-BTDiU-Z-.js → search--YrVMMy1.js} +1 -1
  93. package/assets/{secp256k1-D3oIaUVU.js → secp256k1-CjHSxuE9.js} +1 -1
  94. package/assets/{send-CnQaiEuX.js → send-IF-V9M84.js} +1 -1
  95. package/assets/{swapHorizontal-Dv0Bg9L0.js → swapHorizontal-Avk996iq.js} +1 -1
  96. package/assets/{swapHorizontalBold-CQPcpjgH.js → swapHorizontalBold-QY0w0x1L.js} +1 -1
  97. package/assets/{swapHorizontalMedium-DV4uRJLw.js → swapHorizontalMedium-4E68r9Ea.js} +1 -1
  98. package/assets/{swapHorizontalRoundedBold-Dx468EVm.js → swapHorizontalRoundedBold-Ckq0UDlH.js} +1 -1
  99. package/assets/{swapVertical-LooYJDwN.js → swapVertical-Biv0XLn6.js} +1 -1
  100. package/assets/{telegram-JgoU7_hj.js → telegram-kbe52HxZ.js} +1 -1
  101. package/assets/{three-dots-BRI9-Dly.js → three-dots-Cvmn1T3B.js} +1 -1
  102. package/assets/{twitch-D4ap364K.js → twitch-xiYihv4n.js} +1 -1
  103. package/assets/{twitterIcon-Cf2xFTkU.js → twitterIcon-CKQV0KZg.js} +1 -1
  104. package/assets/{uid-CuZf7FK0.js → uid-ieBVluxa.js} +3 -3
  105. package/assets/{verify-qGEcCbo_.js → verify-PSPXS3lv.js} +1 -1
  106. package/assets/{verify-filled-BT2Xhbin.js → verify-filled-YbPDTO-E.js} +1 -1
  107. package/assets/{w3m-modal-73pLXDms.js → w3m-modal-QecYxg5f.js} +1 -1
  108. package/assets/{wallet-CpcVYmnb.js → wallet-BNSIqWlE.js} +1 -1
  109. package/assets/{wallet-placeholder-CEkTf9LX.js → wallet-placeholder-Bv2KpoHQ.js} +1 -1
  110. package/assets/{walletconnect-BSErawNo.js → walletconnect-C6CNMujO.js} +1 -1
  111. package/assets/{warning-circle-BOABXvvE.js → warning-circle-B9qiI-5-.js} +1 -1
  112. package/assets/{webSocket-BvPqYrD7.js → webSocket-CM2e8Bnr.js} +1 -1
  113. package/assets/{x-BRQsrMF4.js → x-BM7XqFnO.js} +1 -1
  114. package/index.html +14 -14
  115. package/package.json +3 -3
  116. package/assets/HomePage-CP3D4i9c.js +0 -3
  117. package/assets/SensorsRounded-WVFgO4_x.js +0 -15
  118. package/assets/__federation_shared_@emotion/react-BJqnrTYH.js +0 -1
  119. package/assets/__federation_shared_decentraland-ui2-ZuMMDuwr.js +0 -357
  120. package/assets/preload-helper-CIxxV7Wp.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__fileDeps=["assets/index-NxahoDGS.js","assets/preload-helper-CIxxV7Wp.js","assets/tslib.es6-DbvBTznf.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/inherits_browser-BlmhoU4v.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{c as le}from"../_commonjsHelpers-C4iS2aBk.js";import{a as aw,d as cw,b as uw}from"../index-pEp_vRda.js";import{r as lw}from"../___vite-browser-external_commonjs-proxy-BqV5D26a.js";import{_ as dw}from"../preload-helper-CIxxV7Wp.js";import{importShared as kn}from"../__federation_fn_import-DHP1HS9A.js";import{j as Zy}from"../jsx-runtime-B1l0k91v.js";import{b as Be,d as dr,e as fw,c as Br}from"../tslib.es6-DbvBTznf.js";var Qy={},$f={};Object.defineProperty($f,"__esModule",{value:!0});var e_={},Du={},Bu={},t_={},Hd={exports:{}};/*! eth-connect {
1
+ const __vite__fileDeps=["assets/index-CA-WFTlT.js","assets/preload-helper-uzL1GC84.js","assets/tslib.es6-DbvBTznf.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/inherits_browser-BlmhoU4v.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{c as le}from"../_commonjsHelpers-C4iS2aBk.js";import{a as uw,d as lw,b as dw}from"../index-pEp_vRda.js";import{r as fw}from"../___vite-browser-external_commonjs-proxy-BqV5D26a.js";import{_ as hw}from"../preload-helper-uzL1GC84.js";import{importShared as kn}from"../__federation_fn_import-DOIN05Fe.js";import{j as e_}from"../jsx-runtime-B1l0k91v.js";import{b as Be,d as dr,e as pw,c as Br}from"../tslib.es6-DbvBTznf.js";var t_={},zf={};Object.defineProperty(zf,"__esModule",{value:!0});var n_={},Du={},Bu={},r_={},jd={exports:{}};/*! eth-connect {
3
3
  "date": "2024-01-01T15:10:57.542Z",
4
4
  "commit": "b2fa64415d297ccce86d2a5d59d8705388f77db9",
5
5
  "ref": "refs/tags/6.2.4"
@@ -10,28 +10,28 @@ import{c as le}from"../_commonjsHelpers-C4iS2aBk.js";import{a as aw,d as cw,b as
10
10
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
11
11
  * @copyright Chen, Yi-Cyuan 2015-2018
12
12
  * @license MIT
13
- */(function(l){(function(){var p="input is invalid type",y=typeof window=="object",w=y?window:{};w.JS_SHA3_NO_WINDOW&&(y=!1);var O=!y&&typeof self=="object";!w.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?w=le:O&&(w=self);var k=!w.JS_SHA3_NO_COMMON_JS&&l.exports,Z=!w.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ye="0123456789abcdef".split(""),ke=[4,1024,262144,67108864],xe=[0,8,16,24],yn=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ut=[224,256,384,512],ve=[128,256],sn=["hex","buffer","arrayBuffer","array","digest"],Ot={128:168,256:136};!w.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),!Z||!w.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var Ct=function(f,b,I){return function(S){return new yt(f,b,f).update(S)[I]()}},dn=function(f,b,I){return function(S,C){return new yt(f,b,C).update(S)[I]()}},kr=function(f,b,I){return function(S,C,M,N){return an["cshake"+f].update(S,C,M,N)[I]()}},mr=function(f,b,I){return function(S,C,M,N){return an["kmac"+f].update(S,C,M,N)[I]()}},fn=function(f,b,I,S){for(var C=0;C<sn.length;++C){var M=sn[C];f[M]=b(I,S,M)}return f},gr=function(f,b){var I=Ct(f,b,"hex");return I.create=function(){return new yt(f,b,f)},I.update=function(S){return I.create().update(S)},fn(I,Ct,f,b)},ii=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ut,createMethod:gr},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ut,createMethod:gr},{name:"shake",padding:[31,7936,2031616,520093696],bits:ve,createMethod:function(f,b){var I=dn(f,b,"hex");return I.create=function(S){return new yt(f,b,S)},I.update=function(S,C){return I.create(C).update(S)},fn(I,dn,f,b)}},{name:"cshake",padding:ke,bits:ve,createMethod:function(f,b){var I=Ot[f],S=kr(f,0,"hex");return S.create=function(C,M,N){return M||N?new yt(f,b,C).bytepad([M,N],I):an["shake"+f].create(C)},S.update=function(C,M,N,B){return S.create(M,N,B).update(C)},fn(S,kr,f,b)}},{name:"kmac",padding:ke,bits:ve,createMethod:function(f,b){var I=Ot[f],S=mr(f,0,"hex");return S.create=function(C,M,N){return new xn(f,b,M).bytepad(["KMAC",N],I).bytepad([C],I)},S.update=function(C,M,N,B){return S.create(C,N,B).update(M)},fn(S,mr,f,b)}}],an={},Pr=[],hn=0;hn<ii.length;++hn)for(var yr=ii[hn],de=yr.bits,xr=0;xr<de.length;++xr){var ho=yr.name+"_"+de[xr];if(Pr.push(ho),an[ho]=yr.createMethod(de[xr],yr.padding),yr.name!=="sha3"){var po=yr.name+de[xr];Pr.push(po),an[po]=an[ho]}}function yt(f,b,I){this.blocks=[],this.s=[],this.padding=b,this.outputBits=I,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(f<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=I>>5,this.extraBytes=(31&I)>>3;for(var S=0;S<50;++S)this.s[S]=0}function xn(f,b,I){yt.call(this,f,b,I)}yt.prototype.update=function(f){if(this.finalized)throw new Error("finalize already called");var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}for(var S,C,M=this.blocks,N=this.byteCount,B=f.length,j=this.blockCount,U=0,pe=this.s;U<B;){if(this.reset)for(this.reset=!1,M[0]=this.block,S=1;S<j+1;++S)M[S]=0;if(b)for(S=this.start;U<B&&S<N;++U)M[S>>2]|=f[U]<<xe[3&S++];else for(S=this.start;U<B&&S<N;++U)(C=f.charCodeAt(U))<128?M[S>>2]|=C<<xe[3&S++]:C<2048?(M[S>>2]|=(192|C>>6)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]):C<55296||C>=57344?(M[S>>2]|=(224|C>>12)<<xe[3&S++],M[S>>2]|=(128|C>>6&63)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]):(C=65536+((1023&C)<<10|1023&f.charCodeAt(++U)),M[S>>2]|=(240|C>>18)<<xe[3&S++],M[S>>2]|=(128|C>>12&63)<<xe[3&S++],M[S>>2]|=(128|C>>6&63)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]);if(this.lastByteIndex=S,S>=N){for(this.start=S-N,this.block=M[j],S=0;S<j;++S)pe[S]^=M[S];v(pe),this.reset=!0}else this.start=S}return this},yt.prototype.encode=function(f,b){var I=255&f,S=1,C=[I];for(I=255&(f>>=8);I>0;)C.unshift(I),I=255&(f>>=8),++S;return b?C.push(S):C.unshift(S),this.update(C),C.length},yt.prototype.encodeString=function(f){var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}var S=0,C=f.length;if(b)S=C;else for(var M=0;M<f.length;++M){var N=f.charCodeAt(M);N<128?S+=1:N<2048?S+=2:N<55296||N>=57344?S+=3:(N=65536+((1023&N)<<10|1023&f.charCodeAt(++M)),S+=4)}return S+=this.encode(8*S),this.update(f),S},yt.prototype.bytepad=function(f,b){for(var I=this.encode(b),S=0;S<f.length;++S)I+=this.encodeString(f[S]);var C=b-I%b,M=[];return M.length=C,this.update(M),this},yt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var f=this.blocks,b=this.lastByteIndex,I=this.blockCount,S=this.s;if(f[b>>2]|=this.padding[3&b],this.lastByteIndex===this.byteCount)for(f[0]=f[I],b=1;b<I+1;++b)f[b]=0;for(f[I-1]|=2147483648,b=0;b<I;++b)S[b]^=f[b];v(S)}},yt.prototype.toString=yt.prototype.hex=function(){this.finalize();for(var f,b=this.blockCount,I=this.s,S=this.outputBlocks,C=this.extraBytes,M=0,N=0,B="";N<S;){for(M=0;M<b&&N<S;++M,++N)f=I[M],B+=ye[f>>4&15]+ye[15&f]+ye[f>>12&15]+ye[f>>8&15]+ye[f>>20&15]+ye[f>>16&15]+ye[f>>28&15]+ye[f>>24&15];N%b==0&&(v(I),M=0)}return C&&(f=I[M],B+=ye[f>>4&15]+ye[15&f],C>1&&(B+=ye[f>>12&15]+ye[f>>8&15]),C>2&&(B+=ye[f>>20&15]+ye[f>>16&15])),B},yt.prototype.arrayBuffer=function(){this.finalize();var f,b=this.blockCount,I=this.s,S=this.outputBlocks,C=this.extraBytes,M=0,N=0,B=this.outputBits>>3;f=C?new ArrayBuffer(S+1<<2):new ArrayBuffer(B);for(var j=new Uint32Array(f);N<S;){for(M=0;M<b&&N<S;++M,++N)j[N]=I[M];N%b==0&&v(I)}return C&&(j[M]=I[M],f=f.slice(0,B)),f},yt.prototype.buffer=yt.prototype.arrayBuffer,yt.prototype.digest=yt.prototype.array=function(){this.finalize();for(var f,b,I=this.blockCount,S=this.s,C=this.outputBlocks,M=this.extraBytes,N=0,B=0,j=[];B<C;){for(N=0;N<I&&B<C;++N,++B)f=B<<2,b=S[N],j[f]=255&b,j[f+1]=b>>8&255,j[f+2]=b>>16&255,j[f+3]=b>>24&255;B%I==0&&v(S)}return M&&(f=B<<2,b=S[N],j[f]=255&b,M>1&&(j[f+1]=b>>8&255),M>2&&(j[f+2]=b>>16&255)),j},xn.prototype=new yt,xn.prototype.finalize=function(){return this.encode(this.outputBits,!0),yt.prototype.finalize.call(this)};var v=function(f){var b,I,S,C,M,N,B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct,_t,Vt,Lr,oi,si,_n,_r,cn,Xt,wt,Ia,Aa,Oa,Ca,Ra,Ma,Na,ka,Pa,xa,La,Da,Ba,Fa,Ha,Ua,ja,$a,Wa,za,Ga,Va,qa,Ya,Xa,Ka,Ja,Za,Qa,ec,tc,nc,rc,ic,oc,sc,ac;for(S=0;S<48;S+=2)C=f[0]^f[10]^f[20]^f[30]^f[40],M=f[1]^f[11]^f[21]^f[31]^f[41],N=f[2]^f[12]^f[22]^f[32]^f[42],B=f[3]^f[13]^f[23]^f[33]^f[43],j=f[4]^f[14]^f[24]^f[34]^f[44],U=f[5]^f[15]^f[25]^f[35]^f[45],pe=f[6]^f[16]^f[26]^f[36]^f[46],Pe=f[7]^f[17]^f[27]^f[37]^f[47],b=(Ue=f[8]^f[18]^f[28]^f[38]^f[48])^(N<<1|B>>>31),I=(dt=f[9]^f[19]^f[29]^f[39]^f[49])^(B<<1|N>>>31),f[0]^=b,f[1]^=I,f[10]^=b,f[11]^=I,f[20]^=b,f[21]^=I,f[30]^=b,f[31]^=I,f[40]^=b,f[41]^=I,b=C^(j<<1|U>>>31),I=M^(U<<1|j>>>31),f[2]^=b,f[3]^=I,f[12]^=b,f[13]^=I,f[22]^=b,f[23]^=I,f[32]^=b,f[33]^=I,f[42]^=b,f[43]^=I,b=N^(pe<<1|Pe>>>31),I=B^(Pe<<1|pe>>>31),f[4]^=b,f[5]^=I,f[14]^=b,f[15]^=I,f[24]^=b,f[25]^=I,f[34]^=b,f[35]^=I,f[44]^=b,f[45]^=I,b=j^(Ue<<1|dt>>>31),I=U^(dt<<1|Ue>>>31),f[6]^=b,f[7]^=I,f[16]^=b,f[17]^=I,f[26]^=b,f[27]^=I,f[36]^=b,f[37]^=I,f[46]^=b,f[47]^=I,b=pe^(C<<1|M>>>31),I=Pe^(M<<1|C>>>31),f[8]^=b,f[9]^=I,f[18]^=b,f[19]^=I,f[28]^=b,f[29]^=I,f[38]^=b,f[39]^=I,f[48]^=b,f[49]^=I,Rt=f[0],Dt=f[1],za=f[11]<<4|f[10]>>>28,Ga=f[10]<<4|f[11]>>>28,Aa=f[20]<<3|f[21]>>>29,Oa=f[21]<<3|f[20]>>>29,ic=f[31]<<9|f[30]>>>23,oc=f[30]<<9|f[31]>>>23,Ua=f[40]<<18|f[41]>>>14,ja=f[41]<<18|f[40]>>>14,ka=f[2]<<1|f[3]>>>31,Pa=f[3]<<1|f[2]>>>31,ct=f[13]<<12|f[12]>>>20,_t=f[12]<<12|f[13]>>>20,Va=f[22]<<10|f[23]>>>22,qa=f[23]<<10|f[22]>>>22,Ca=f[33]<<13|f[32]>>>19,Ra=f[32]<<13|f[33]>>>19,sc=f[42]<<2|f[43]>>>30,ac=f[43]<<2|f[42]>>>30,Za=f[5]<<30|f[4]>>>2,Qa=f[4]<<30|f[5]>>>2,xa=f[14]<<6|f[15]>>>26,La=f[15]<<6|f[14]>>>26,Vt=f[25]<<11|f[24]>>>21,Lr=f[24]<<11|f[25]>>>21,Ya=f[34]<<15|f[35]>>>17,Xa=f[35]<<15|f[34]>>>17,Ma=f[45]<<29|f[44]>>>3,Na=f[44]<<29|f[45]>>>3,cn=f[6]<<28|f[7]>>>4,Xt=f[7]<<28|f[6]>>>4,ec=f[17]<<23|f[16]>>>9,tc=f[16]<<23|f[17]>>>9,Da=f[26]<<25|f[27]>>>7,Ba=f[27]<<25|f[26]>>>7,oi=f[36]<<21|f[37]>>>11,si=f[37]<<21|f[36]>>>11,Ka=f[47]<<24|f[46]>>>8,Ja=f[46]<<24|f[47]>>>8,$a=f[8]<<27|f[9]>>>5,Wa=f[9]<<27|f[8]>>>5,wt=f[18]<<20|f[19]>>>12,Ia=f[19]<<20|f[18]>>>12,nc=f[29]<<7|f[28]>>>25,rc=f[28]<<7|f[29]>>>25,Fa=f[38]<<8|f[39]>>>24,Ha=f[39]<<8|f[38]>>>24,_n=f[48]<<14|f[49]>>>18,_r=f[49]<<14|f[48]>>>18,f[0]=Rt^~ct&Vt,f[1]=Dt^~_t&Lr,f[10]=cn^~wt&Aa,f[11]=Xt^~Ia&Oa,f[20]=ka^~xa&Da,f[21]=Pa^~La&Ba,f[30]=$a^~za&Va,f[31]=Wa^~Ga&qa,f[40]=Za^~ec&nc,f[41]=Qa^~tc&rc,f[2]=ct^~Vt&oi,f[3]=_t^~Lr&si,f[12]=wt^~Aa&Ca,f[13]=Ia^~Oa&Ra,f[22]=xa^~Da&Fa,f[23]=La^~Ba&Ha,f[32]=za^~Va&Ya,f[33]=Ga^~qa&Xa,f[42]=ec^~nc&ic,f[43]=tc^~rc&oc,f[4]=Vt^~oi&_n,f[5]=Lr^~si&_r,f[14]=Aa^~Ca&Ma,f[15]=Oa^~Ra&Na,f[24]=Da^~Fa&Ua,f[25]=Ba^~Ha&ja,f[34]=Va^~Ya&Ka,f[35]=qa^~Xa&Ja,f[44]=nc^~ic&sc,f[45]=rc^~oc&ac,f[6]=oi^~_n&Rt,f[7]=si^~_r&Dt,f[16]=Ca^~Ma&cn,f[17]=Ra^~Na&Xt,f[26]=Fa^~Ua&ka,f[27]=Ha^~ja&Pa,f[36]=Ya^~Ka&$a,f[37]=Xa^~Ja&Wa,f[46]=ic^~sc&Za,f[47]=oc^~ac&Qa,f[8]=_n^~Rt&ct,f[9]=_r^~Dt&_t,f[18]=Ma^~cn&wt,f[19]=Na^~Xt&Ia,f[28]=Ua^~ka&xa,f[29]=ja^~Pa&La,f[38]=Ka^~$a&za,f[39]=Ja^~Wa&Ga,f[48]=sc^~Za&ec,f[49]=ac^~Qa&tc,f[0]^=yn[S],f[1]^=yn[S+1]};if(k)l.exports=an;else for(hn=0;hn<Pr.length;++hn)w[Pr[hn]]=an[Pr[hn]]})()})(a);var c=a.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,h=Math.ceil,d=Math.floor,m="[BigNumber Error] ",g=m+"Number primitive has more than 15 significant digits: ",E=1e14,T=14,L=9007199254740991,H=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],K=1e7,V=1e9;function F(l){var p=0|l;return l>0||l===p?p:p-1}function J(l){for(var p,y,w=1,O=l.length,k=l[0]+"";w<O;){for(p=l[w++]+"",y=T-p.length;y--;p="0"+p);k+=p}for(O=k.length;k.charCodeAt(--O)===48;);return k.slice(0,O+1||1)}function D(l,p){var y,w,O=l.c,k=p.c,Z=l.s,ye=p.s,ke=l.e,xe=p.e;if(!Z||!ye)return null;if(y=O&&!O[0],w=k&&!k[0],y||w)return y?w?0:-ye:Z;if(Z!=ye)return Z;if(y=Z<0,w=ke==xe,!O||!k)return w?0:!O^y?1:-1;if(!w)return ke>xe^y?1:-1;for(ye=(ke=O.length)<(xe=k.length)?ke:xe,Z=0;Z<ye;Z++)if(O[Z]!=k[Z])return O[Z]>k[Z]^y?1:-1;return ke==xe?0:ke>xe^y?1:-1}function W(l,p,y,w){if(l<p||l>y||l!==d(l))throw Error(m+(w||"Argument")+(typeof l=="number"?l<p||l>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(l))}function ue(l){var p=l.c.length-1;return F(l.e/T)==p&&l.c[p]%2!=0}function P(l,p){return(l.length>1?l.charAt(0)+"."+l.slice(1):l)+(p<0?"e":"e+")+p}function $(l,p,y){var w,O;if(p<0){for(O=y+".";++p;O+=y);l=O+l}else if(++p>(w=l.length)){for(O=y,p-=w;--p;O+=y);l+=O}else p<w&&(l=l.slice(0,p)+"."+l.slice(p));return l}var G=function l(p){var y,w,O,k,Z,ye,ke,xe,yn,Ut,ve=de.prototype={constructor:de,toString:null,valueOf:null},sn=new de(1),Ot=20,Ct=4,dn=-7,kr=21,mr=-1e7,fn=1e7,gr=!1,ii=1,an=0,Pr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},hn="0123456789abcdefghijklmnopqrstuvwxyz",yr=!0;function de(v,f){var b,I,S,C,M,N,B,j,U=this;if(!(U instanceof de))return new de(v,f);if(f==null){if(v&&v._isBigNumber===!0)return U.s=v.s,void(!v.c||v.e>fn?U.c=U.e=null:v.e<mr?U.c=[U.e=0]:(U.e=v.e,U.c=v.c.slice()));if((N=typeof v=="number")&&0*v==0){if(U.s=1/v<0?(v=-v,-1):1,v===~~v){for(C=0,M=v;M>=10;M/=10,C++);return void(C>fn?U.c=U.e=null:(U.e=C,U.c=[v]))}j=String(v)}else{if(!u.test(j=String(v)))return O(U,j,N);U.s=j.charCodeAt(0)==45?(j=j.slice(1),-1):1}(C=j.indexOf("."))>-1&&(j=j.replace(".","")),(M=j.search(/e/i))>0?(C<0&&(C=M),C+=+j.slice(M+1),j=j.substring(0,M)):C<0&&(C=j.length)}else{if(W(f,2,hn.length,"Base"),f==10&&yr)return yt(U=new de(v),Ot+U.e+1,Ct);if(j=String(v),N=typeof v=="number"){if(0*v!=0)return O(U,j,N,f);if(U.s=1/v<0?(j=j.slice(1),-1):1,de.DEBUG&&j.replace(/^0\.0*|\./,"").length>15)throw Error(g+v)}else U.s=j.charCodeAt(0)===45?(j=j.slice(1),-1):1;for(b=hn.slice(0,f),C=M=0,B=j.length;M<B;M++)if(b.indexOf(I=j.charAt(M))<0){if(I=="."){if(M>C){C=B;continue}}else if(!S&&(j==j.toUpperCase()&&(j=j.toLowerCase())||j==j.toLowerCase()&&(j=j.toUpperCase()))){S=!0,M=-1,C=0;continue}return O(U,String(v),N,f)}N=!1,(C=(j=w(j,f,10,U.s)).indexOf("."))>-1?j=j.replace(".",""):C=j.length}for(M=0;j.charCodeAt(M)===48;M++);for(B=j.length;j.charCodeAt(--B)===48;);if(j=j.slice(M,++B)){if(B-=M,N&&de.DEBUG&&B>15&&(v>L||v!==d(v)))throw Error(g+U.s*v);if((C=C-M-1)>fn)U.c=U.e=null;else if(C<mr)U.c=[U.e=0];else{if(U.e=C,U.c=[],M=(C+1)%T,C<0&&(M+=T),M<B){for(M&&U.c.push(+j.slice(0,M)),B-=T;M<B;)U.c.push(+j.slice(M,M+=T));M=T-(j=j.slice(M)).length}else M-=B;for(;M--;j+="0");U.c.push(+j)}}else U.c=[U.e=0]}function xr(v,f,b,I){var S,C,M,N,B;if(b==null?b=Ct:W(b,0,8),!v.c)return v.toString();if(S=v.c[0],M=v.e,f==null)B=J(v.c),B=I==1||I==2&&(M<=dn||M>=kr)?P(B,M):$(B,M,"0");else if(C=(v=yt(new de(v),f,b)).e,N=(B=J(v.c)).length,I==1||I==2&&(f<=C||C<=dn)){for(;N<f;B+="0",N++);B=P(B,C)}else if(f-=M,B=$(B,C,"0"),C+1>N){if(--f>0)for(B+=".";f--;B+="0");}else if((f+=C-N)>0)for(C+1==N&&(B+=".");f--;B+="0");return v.s<0&&S?"-"+B:B}function ho(v,f){for(var b,I=1,S=new de(v[0]);I<v.length;I++){if(!(b=new de(v[I])).s){S=b;break}f.call(S,b)&&(S=b)}return S}function po(v,f,b){for(var I=1,S=f.length;!f[--S];f.pop());for(S=f[0];S>=10;S/=10,I++);return(b=I+b*T-1)>fn?v.c=v.e=null:b<mr?v.c=[v.e=0]:(v.e=b,v.c=f),v}function yt(v,f,b,I){var S,C,M,N,B,j,U,pe=v.c,Pe=H;if(pe){e:{for(S=1,N=pe[0];N>=10;N/=10,S++);if((C=f-S)<0)C+=T,M=f,U=(B=pe[j=0])/Pe[S-M-1]%10|0;else if((j=h((C+1)/T))>=pe.length){if(!I)break e;for(;pe.length<=j;pe.push(0));B=U=0,S=1,M=(C%=T)-T+1}else{for(B=N=pe[j],S=1;N>=10;N/=10,S++);U=(M=(C%=T)-T+S)<0?0:B/Pe[S-M-1]%10|0}if(I=I||f<0||pe[j+1]!=null||(M<0?B:B%Pe[S-M-1]),I=b<4?(U||I)&&(b==0||b==(v.s<0?3:2)):U>5||U==5&&(b==4||I||b==6&&(C>0?M>0?B/Pe[S-M]:0:pe[j-1])%10&1||b==(v.s<0?8:7)),f<1||!pe[0])return pe.length=0,I?(f-=v.e+1,pe[0]=Pe[(T-f%T)%T],v.e=-f||0):pe[0]=v.e=0,v;if(C==0?(pe.length=j,N=1,j--):(pe.length=j+1,N=Pe[T-C],pe[j]=M>0?d(B/Pe[S-M]%Pe[M])*N:0),I)for(;;){if(j==0){for(C=1,M=pe[0];M>=10;M/=10,C++);for(M=pe[0]+=N,N=1;M>=10;M/=10,N++);C!=N&&(v.e++,pe[0]==E&&(pe[0]=1));break}if(pe[j]+=N,pe[j]!=E)break;pe[j--]=0,N=1}for(C=pe.length;pe[--C]===0;pe.pop());}v.e>fn?v.c=v.e=null:v.e<mr&&(v.c=[v.e=0])}return v}function xn(v){var f,b=v.e;return b===null?v.toString():(f=J(v.c),f=b<=dn||b>=kr?P(f,b):$(f,b,"0"),v.s<0?"-"+f:f)}return de.clone=l,de.ROUND_UP=0,de.ROUND_DOWN=1,de.ROUND_CEIL=2,de.ROUND_FLOOR=3,de.ROUND_HALF_UP=4,de.ROUND_HALF_DOWN=5,de.ROUND_HALF_EVEN=6,de.ROUND_HALF_CEIL=7,de.ROUND_HALF_FLOOR=8,de.EUCLID=9,de.config=de.set=function(v){var f,b;if(v!=null){if(typeof v!="object")throw Error(m+"Object expected: "+v);if(v.hasOwnProperty(f="DECIMAL_PLACES")&&(W(b=v[f],0,V,f),Ot=b),v.hasOwnProperty(f="ROUNDING_MODE")&&(W(b=v[f],0,8,f),Ct=b),v.hasOwnProperty(f="EXPONENTIAL_AT")&&((b=v[f])&&b.pop?(W(b[0],-V,0,f),W(b[1],0,V,f),dn=b[0],kr=b[1]):(W(b,-V,V,f),dn=-(kr=b<0?-b:b))),v.hasOwnProperty(f="RANGE"))if((b=v[f])&&b.pop)W(b[0],-V,-1,f),W(b[1],1,V,f),mr=b[0],fn=b[1];else{if(W(b,-V,V,f),!b)throw Error(m+f+" cannot be zero: "+b);mr=-(fn=b<0?-b:b)}if(v.hasOwnProperty(f="CRYPTO")){if((b=v[f])!==!!b)throw Error(m+f+" not true or false: "+b);if(b){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw gr=!b,Error(m+"crypto unavailable");gr=b}else gr=b}if(v.hasOwnProperty(f="MODULO_MODE")&&(W(b=v[f],0,9,f),ii=b),v.hasOwnProperty(f="POW_PRECISION")&&(W(b=v[f],0,V,f),an=b),v.hasOwnProperty(f="FORMAT")){if(typeof(b=v[f])!="object")throw Error(m+f+" not an object: "+b);Pr=b}if(v.hasOwnProperty(f="ALPHABET")){if(typeof(b=v[f])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(b))throw Error(m+f+" invalid: "+b);yr=b.slice(0,10)=="0123456789",hn=b}}return{DECIMAL_PLACES:Ot,ROUNDING_MODE:Ct,EXPONENTIAL_AT:[dn,kr],RANGE:[mr,fn],CRYPTO:gr,MODULO_MODE:ii,POW_PRECISION:an,FORMAT:Pr,ALPHABET:hn}},de.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!de.DEBUG)return!0;var f,b,I=v.c,S=v.e,C=v.s;e:if({}.toString.call(I)=="[object Array]"){if((C===1||C===-1)&&S>=-V&&S<=V&&S===d(S)){if(I[0]===0){if(S===0&&I.length===1)return!0;break e}if((f=(S+1)%T)<1&&(f+=T),String(I[0]).length==f){for(f=0;f<I.length;f++)if((b=I[f])<0||b>=E||b!==d(b))break e;if(b!==0)return!0}}}else if(I===null&&S===null&&(C===null||C===1||C===-1))return!0;throw Error(m+"Invalid BigNumber: "+v)},de.maximum=de.max=function(){return ho(arguments,ve.lt)},de.minimum=de.min=function(){return ho(arguments,ve.gt)},de.random=(k=9007199254740992,Z=Math.random()*k&2097151?function(){return d(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var f,b,I,S,C,M=0,N=[],B=new de(sn);if(v==null?v=Ot:W(v,0,V),S=h(v/T),gr)if(crypto.getRandomValues){for(f=crypto.getRandomValues(new Uint32Array(S*=2));M<S;)(C=131072*f[M]+(f[M+1]>>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),f[M]=b[0],f[M+1]=b[1]):(N.push(C%1e14),M+=2);M=S/2}else{if(!crypto.randomBytes)throw gr=!1,Error(m+"crypto unavailable");for(f=crypto.randomBytes(S*=7);M<S;)(C=281474976710656*(31&f[M])+1099511627776*f[M+1]+4294967296*f[M+2]+16777216*f[M+3]+(f[M+4]<<16)+(f[M+5]<<8)+f[M+6])>=9e15?crypto.randomBytes(7).copy(f,M):(N.push(C%1e14),M+=7);M=S/7}if(!gr)for(;M<S;)(C=Z())<9e15&&(N[M++]=C%1e14);for(S=N[--M],v%=T,S&&v&&(C=H[T-v],N[M]=d(S/C)*C);N[M]===0;N.pop(),M--);if(M<0)N=[I=0];else{for(I=-1;N[0]===0;N.splice(0,1),I-=T);for(M=1,C=N[0];C>=10;C/=10,M++);M<T&&(I-=T-M)}return B.e=I,B.c=N,B}),de.sum=function(){for(var v=1,f=arguments,b=new de(f[0]);v<f.length;)b=b.plus(f[v++]);return b},w=function(){var v="0123456789";function f(b,I,S,C){for(var M,N,B=[0],j=0,U=b.length;j<U;){for(N=B.length;N--;B[N]*=I);for(B[0]+=C.indexOf(b.charAt(j++)),M=0;M<B.length;M++)B[M]>S-1&&(B[M+1]==null&&(B[M+1]=0),B[M+1]+=B[M]/S|0,B[M]%=S)}return B.reverse()}return function(b,I,S,C,M){var N,B,j,U,pe,Pe,Ue,dt,Rt=b.indexOf("."),Dt=Ot,ct=Ct;for(Rt>=0&&(U=an,an=0,b=b.replace(".",""),Pe=(dt=new de(I)).pow(b.length-Rt),an=U,dt.c=f($(J(Pe.c),Pe.e,"0"),10,S,v),dt.e=dt.c.length),j=U=(Ue=f(b,I,S,M?(N=hn,v):(N=v,hn))).length;Ue[--U]==0;Ue.pop());if(!Ue[0])return N.charAt(0);if(Rt<0?--j:(Pe.c=Ue,Pe.e=j,Pe.s=C,Ue=(Pe=y(Pe,dt,Dt,ct,S)).c,pe=Pe.r,j=Pe.e),Rt=Ue[B=j+Dt+1],U=S/2,pe=pe||B<0||Ue[B+1]!=null,pe=ct<4?(Rt!=null||pe)&&(ct==0||ct==(Pe.s<0?3:2)):Rt>U||Rt==U&&(ct==4||pe||ct==6&&1&Ue[B-1]||ct==(Pe.s<0?8:7)),B<1||!Ue[0])b=pe?$(N.charAt(1),-Dt,N.charAt(0)):N.charAt(0);else{if(Ue.length=B,pe)for(--S;++Ue[--B]>S;)Ue[B]=0,B||(++j,Ue=[1].concat(Ue));for(U=Ue.length;!Ue[--U];);for(Rt=0,b="";Rt<=U;b+=N.charAt(Ue[Rt++]));b=$(b,j,N.charAt(0))}return b}}(),y=function(){function v(I,S,C){var M,N,B,j,U=0,pe=I.length,Pe=S%K,Ue=S/K|0;for(I=I.slice();pe--;)U=((N=Pe*(B=I[pe]%K)+(M=Ue*B+(j=I[pe]/K|0)*Pe)%K*K+U)/C|0)+(M/K|0)+Ue*j,I[pe]=N%C;return U&&(I=[U].concat(I)),I}function f(I,S,C,M){var N,B;if(C!=M)B=C>M?1:-1;else for(N=B=0;N<C;N++)if(I[N]!=S[N]){B=I[N]>S[N]?1:-1;break}return B}function b(I,S,C,M){for(var N=0;C--;)I[C]-=N,N=I[C]<S[C]?1:0,I[C]=N*M+I[C]-S[C];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,S,C,M,N){var B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct,_t,Vt,Lr,oi,si,_n,_r,cn=I.s==S.s?1:-1,Xt=I.c,wt=S.c;if(!(Xt&&Xt[0]&&wt&&wt[0]))return new de(I.s&&S.s&&(Xt?!wt||Xt[0]!=wt[0]:wt)?Xt&&Xt[0]==0||!wt?0*cn:cn/0:NaN);for(Dt=(Rt=new de(cn)).c=[],cn=C+(j=I.e-S.e)+1,N||(N=E,j=F(I.e/T)-F(S.e/T),cn=cn/T|0),U=0;wt[U]==(Xt[U]||0);U++);if(wt[U]>(Xt[U]||0)&&j--,cn<0)Dt.push(1),pe=!0;else{for(oi=Xt.length,_n=wt.length,U=0,cn+=2,(Pe=d(N/(wt[0]+1)))>1&&(wt=v(wt,Pe,N),Xt=v(Xt,Pe,N),_n=wt.length,oi=Xt.length),Lr=_n,_t=(ct=Xt.slice(0,_n)).length;_t<_n;ct[_t++]=0);_r=wt.slice(),_r=[0].concat(_r),si=wt[0],wt[1]>=N/2&&si++;do{if(Pe=0,(B=f(wt,ct,_n,_t))<0){if(Vt=ct[0],_n!=_t&&(Vt=Vt*N+(ct[1]||0)),(Pe=d(Vt/si))>1)for(Pe>=N&&(Pe=N-1),dt=(Ue=v(wt,Pe,N)).length,_t=ct.length;f(Ue,ct,dt,_t)==1;)Pe--,b(Ue,_n<dt?_r:wt,dt,N),dt=Ue.length,B=1;else Pe==0&&(B=Pe=1),dt=(Ue=wt.slice()).length;if(dt<_t&&(Ue=[0].concat(Ue)),b(ct,Ue,_t,N),_t=ct.length,B==-1)for(;f(wt,ct,_n,_t)<1;)Pe++,b(ct,_n<_t?_r:wt,_t,N),_t=ct.length}else B===0&&(Pe++,ct=[0]);Dt[U++]=Pe,ct[0]?ct[_t++]=Xt[Lr]||0:(ct=[Xt[Lr]],_t=1)}while((Lr++<oi||ct[0]!=null)&&cn--);pe=ct[0]!=null,Dt[0]||Dt.splice(0,1)}if(N==E){for(U=1,cn=Dt[0];cn>=10;cn/=10,U++);yt(Rt,C+(Rt.e=U+j*T-1)+1,M,pe)}else Rt.e=j,Rt.r=+pe;return Rt}}(),ye=/^(-?)0([xbo])(?=\w[\w.]*$)/i,ke=/^([^.]+)\.$/,xe=/^\.([^.]+)$/,yn=/^-?(Infinity|NaN)$/,Ut=/^\s*\+(?=[\w.])|^\s+|\s+$/g,O=function(v,f,b,I){var S,C=b?f:f.replace(Ut,"");if(yn.test(C))v.s=isNaN(C)?null:C<0?-1:1;else{if(!b&&(C=C.replace(ye,function(M,N,B){return S=(B=B.toLowerCase())=="x"?16:B=="b"?2:8,I&&I!=S?M:N}),I&&(S=I,C=C.replace(ke,"$1").replace(xe,"0.$1")),f!=C))return new de(C,S);if(de.DEBUG)throw Error(m+"Not a"+(I?" base "+I:"")+" number: "+f);v.s=null}v.c=v.e=null},ve.absoluteValue=ve.abs=function(){var v=new de(this);return v.s<0&&(v.s=1),v},ve.comparedTo=function(v,f){return D(this,new de(v,f))},ve.decimalPlaces=ve.dp=function(v,f){var b,I,S,C=this;if(v!=null)return W(v,0,V),f==null?f=Ct:W(f,0,8),yt(new de(C),v+C.e+1,f);if(!(b=C.c))return null;if(I=((S=b.length-1)-F(this.e/T))*T,S=b[S])for(;S%10==0;S/=10,I--);return I<0&&(I=0),I},ve.dividedBy=ve.div=function(v,f){return y(this,new de(v,f),Ot,Ct)},ve.dividedToIntegerBy=ve.idiv=function(v,f){return y(this,new de(v,f),0,1)},ve.exponentiatedBy=ve.pow=function(v,f){var b,I,S,C,M,N,B,j,U=this;if((v=new de(v)).c&&!v.isInteger())throw Error(m+"Exponent not an integer: "+xn(v));if(f!=null&&(f=new de(f)),M=v.e>14,!U.c||!U.c[0]||U.c[0]==1&&!U.e&&U.c.length==1||!v.c||!v.c[0])return j=new de(Math.pow(+xn(U),M?v.s*(2-ue(v)):+xn(v))),f?j.mod(f):j;if(N=v.s<0,f){if(f.c?!f.c[0]:!f.s)return new de(NaN);(I=!N&&U.isInteger()&&f.isInteger())&&(U=U.mod(f))}else{if(v.e>9&&(U.e>0||U.e<-1||(U.e==0?U.c[0]>1||M&&U.c[1]>=24e7:U.c[0]<8e13||M&&U.c[0]<=9999975e7)))return C=U.s<0&&ue(v)?-0:0,U.e>-1&&(C=1/C),new de(N?1/C:C);an&&(C=h(an/T+2))}for(M?(b=new de(.5),N&&(v.s=1),B=ue(v)):B=(S=Math.abs(+xn(v)))%2,j=new de(sn);;){if(B){if(!(j=j.times(U)).c)break;C?j.c.length>C&&(j.c.length=C):I&&(j=j.mod(f))}if(S){if((S=d(S/2))===0)break;B=S%2}else if(yt(v=v.times(b),v.e+1,1),v.e>14)B=ue(v);else{if((S=+xn(v))==0)break;B=S%2}U=U.times(U),C?U.c&&U.c.length>C&&(U.c.length=C):I&&(U=U.mod(f))}return I?j:(N&&(j=sn.div(j)),f?j.mod(f):C?yt(j,an,Ct,void 0):j)},ve.integerValue=function(v){var f=new de(this);return v==null?v=Ct:W(v,0,8),yt(f,f.e+1,v)},ve.isEqualTo=ve.eq=function(v,f){return D(this,new de(v,f))===0},ve.isFinite=function(){return!!this.c},ve.isGreaterThan=ve.gt=function(v,f){return D(this,new de(v,f))>0},ve.isGreaterThanOrEqualTo=ve.gte=function(v,f){return(f=D(this,new de(v,f)))===1||f===0},ve.isInteger=function(){return!!this.c&&F(this.e/T)>this.c.length-2},ve.isLessThan=ve.lt=function(v,f){return D(this,new de(v,f))<0},ve.isLessThanOrEqualTo=ve.lte=function(v,f){return(f=D(this,new de(v,f)))===-1||f===0},ve.isNaN=function(){return!this.s},ve.isNegative=function(){return this.s<0},ve.isPositive=function(){return this.s>0},ve.isZero=function(){return!!this.c&&this.c[0]==0},ve.minus=function(v,f){var b,I,S,C,M=this,N=M.s;if(f=(v=new de(v,f)).s,!N||!f)return new de(NaN);if(N!=f)return v.s=-f,M.plus(v);var B=M.e/T,j=v.e/T,U=M.c,pe=v.c;if(!B||!j){if(!U||!pe)return U?(v.s=-f,v):new de(pe?M:NaN);if(!U[0]||!pe[0])return pe[0]?(v.s=-f,v):new de(U[0]?M:Ct==3?-0:0)}if(B=F(B),j=F(j),U=U.slice(),N=B-j){for((C=N<0)?(N=-N,S=U):(j=B,S=pe),S.reverse(),f=N;f--;S.push(0));S.reverse()}else for(I=(C=(N=U.length)<(f=pe.length))?N:f,N=f=0;f<I;f++)if(U[f]!=pe[f]){C=U[f]<pe[f];break}if(C&&(S=U,U=pe,pe=S,v.s=-v.s),(f=(I=pe.length)-(b=U.length))>0)for(;f--;U[b++]=0);for(f=E-1;I>N;){if(U[--I]<pe[I]){for(b=I;b&&!U[--b];U[b]=f);--U[b],U[I]+=E}U[I]-=pe[I]}for(;U[0]==0;U.splice(0,1),--j);return U[0]?po(v,U,j):(v.s=Ct==3?-1:1,v.c=[v.e=0],v)},ve.modulo=ve.mod=function(v,f){var b,I,S=this;return v=new de(v,f),!S.c||!v.s||v.c&&!v.c[0]?new de(NaN):!v.c||S.c&&!S.c[0]?new de(S):(ii==9?(I=v.s,v.s=1,b=y(S,v,0,3),v.s=I,b.s*=I):b=y(S,v,0,ii),(v=S.minus(b.times(v))).c[0]||ii!=1||(v.s=S.s),v)},ve.multipliedBy=ve.times=function(v,f){var b,I,S,C,M,N,B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct=this,_t=ct.c,Vt=(v=new de(v,f)).c;if(!(_t&&Vt&&_t[0]&&Vt[0]))return!ct.s||!v.s||_t&&!_t[0]&&!Vt||Vt&&!Vt[0]&&!_t?v.c=v.e=v.s=null:(v.s*=ct.s,_t&&Vt?(v.c=[0],v.e=0):v.c=v.e=null),v;for(I=F(ct.e/T)+F(v.e/T),v.s*=ct.s,(B=_t.length)<(pe=Vt.length)&&(dt=_t,_t=Vt,Vt=dt,S=B,B=pe,pe=S),S=B+pe,dt=[];S--;dt.push(0));for(Rt=E,Dt=K,S=pe;--S>=0;){for(b=0,Pe=Vt[S]%Dt,Ue=Vt[S]/Dt|0,C=S+(M=B);C>S;)b=((j=Pe*(j=_t[--M]%Dt)+(N=Ue*j+(U=_t[M]/Dt|0)*Pe)%Dt*Dt+dt[C]+b)/Rt|0)+(N/Dt|0)+Ue*U,dt[C--]=j%Rt;dt[C]=b}return b?++I:dt.splice(0,1),po(v,dt,I)},ve.negated=function(){var v=new de(this);return v.s=-v.s||null,v},ve.plus=function(v,f){var b,I=this,S=I.s;if(f=(v=new de(v,f)).s,!S||!f)return new de(NaN);if(S!=f)return v.s=-f,I.minus(v);var C=I.e/T,M=v.e/T,N=I.c,B=v.c;if(!C||!M){if(!N||!B)return new de(S/0);if(!N[0]||!B[0])return B[0]?v:new de(N[0]?I:0*S)}if(C=F(C),M=F(M),N=N.slice(),S=C-M){for(S>0?(M=C,b=B):(S=-S,b=N),b.reverse();S--;b.push(0));b.reverse()}for((S=N.length)-(f=B.length)<0&&(b=B,B=N,N=b,f=S),S=0;f;)S=(N[--f]=N[f]+B[f]+S)/E|0,N[f]=E===N[f]?0:N[f]%E;return S&&(N=[S].concat(N),++M),po(v,N,M)},ve.precision=ve.sd=function(v,f){var b,I,S,C=this;if(v!=null&&v!==!!v)return W(v,1,V),f==null?f=Ct:W(f,0,8),yt(new de(C),v,f);if(!(b=C.c))return null;if(I=(S=b.length-1)*T+1,S=b[S]){for(;S%10==0;S/=10,I--);for(S=b[0];S>=10;S/=10,I++);}return v&&C.e+1>I&&(I=C.e+1),I},ve.shiftedBy=function(v){return W(v,-9007199254740991,L),this.times("1e"+v)},ve.squareRoot=ve.sqrt=function(){var v,f,b,I,S,C=this,M=C.c,N=C.s,B=C.e,j=Ot+4,U=new de("0.5");if(N!==1||!M||!M[0])return new de(!N||N<0&&(!M||M[0])?NaN:M?C:1/0);if((N=Math.sqrt(+xn(C)))==0||N==1/0?(((f=J(M)).length+B)%2==0&&(f+="0"),N=Math.sqrt(+f),B=F((B+1)/2)-(B<0||B%2),b=new de(f=N==1/0?"5e"+B:(f=N.toExponential()).slice(0,f.indexOf("e")+1)+B)):b=new de(N+""),b.c[0]){for((N=(B=b.e)+j)<3&&(N=0);;)if(S=b,b=U.times(S.plus(y(C,S,j,1))),J(S.c).slice(0,N)===(f=J(b.c)).slice(0,N)){if(b.e<B&&--N,(f=f.slice(N-3,N+1))!="9999"&&(I||f!="4999")){+f&&(+f.slice(1)||f.charAt(0)!="5")||(yt(b,b.e+Ot+2,1),v=!b.times(b).eq(C));break}if(!I&&(yt(S,S.e+Ot+2,0),S.times(S).eq(C))){b=S;break}j+=4,N+=4,I=1}}return yt(b,b.e+Ot+1,Ct,v)},ve.toExponential=function(v,f){return v!=null&&(W(v,0,V),v++),xr(this,v,f,1)},ve.toFixed=function(v,f){return v!=null&&(W(v,0,V),v=v+this.e+1),xr(this,v,f)},ve.toFormat=function(v,f,b){var I,S=this;if(b==null)v!=null&&f&&typeof f=="object"?(b=f,f=null):v&&typeof v=="object"?(b=v,v=f=null):b=Pr;else if(typeof b!="object")throw Error(m+"Argument not an object: "+b);if(I=S.toFixed(v,f),S.c){var C,M=I.split("."),N=+b.groupSize,B=+b.secondaryGroupSize,j=b.groupSeparator||"",U=M[0],pe=M[1],Pe=S.s<0,Ue=Pe?U.slice(1):U,dt=Ue.length;if(B&&(C=N,N=B,B=C,dt-=C),N>0&&dt>0){for(C=dt%N||N,U=Ue.substr(0,C);C<dt;C+=N)U+=j+Ue.substr(C,N);B>0&&(U+=j+Ue.slice(C)),Pe&&(U="-"+U)}I=pe?U+(b.decimalSeparator||"")+((B=+b.fractionGroupSize)?pe.replace(new RegExp("\\d{"+B+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):pe):U}return(b.prefix||"")+I+(b.suffix||"")},ve.toFraction=function(v){var f,b,I,S,C,M,N,B,j,U,pe,Pe,Ue=this,dt=Ue.c;if(v!=null&&(!(N=new de(v)).isInteger()&&(N.c||N.s!==1)||N.lt(sn)))throw Error(m+"Argument "+(N.isInteger()?"out of range: ":"not an integer: ")+xn(N));if(!dt)return new de(Ue);for(f=new de(sn),j=b=new de(sn),I=B=new de(sn),Pe=J(dt),C=f.e=Pe.length-Ue.e-1,f.c[0]=H[(M=C%T)<0?T+M:M],v=!v||N.comparedTo(f)>0?C>0?f:j:N,M=fn,fn=1/0,N=new de(Pe),B.c[0]=0;U=y(N,f,0,1),(S=b.plus(U.times(I))).comparedTo(v)!=1;)b=I,I=S,j=B.plus(U.times(S=j)),B=S,f=N.minus(U.times(S=f)),N=S;return S=y(v.minus(b),I,0,1),B=B.plus(S.times(j)),b=b.plus(S.times(I)),B.s=j.s=Ue.s,pe=y(j,I,C*=2,Ct).minus(Ue).abs().comparedTo(y(B,b,C,Ct).minus(Ue).abs())<1?[j,I]:[B,b],fn=M,pe},ve.toNumber=function(){return+xn(this)},ve.toPrecision=function(v,f){return v!=null&&W(v,1,V),xr(this,v,f,2)},ve.toString=function(v){var f,b=this,I=b.s,S=b.e;return S===null?I?(f="Infinity",I<0&&(f="-"+f)):f="NaN":(v==null?f=S<=dn||S>=kr?P(J(b.c),S):$(J(b.c),S,"0"):v===10&&yr?f=$(J((b=yt(new de(b),Ot+S+1,Ct)).c),b.e,"0"):(W(v,2,hn.length,"Base"),f=w($(J(b.c),S,"0"),10,v,I,!0)),I<0&&b.c[0]&&(f="-"+f)),f},ve.valueOf=ve.toJSON=function(){return xn(this)},ve._isBigNumber=!0,ve[Symbol.toStringTag]="BigNumber",ve[Symbol.for("nodejs.util.inspect.custom")]=ve.valueOf,p!=null&&de.set(p),de}();const q={ROUNDING_MODE:G.ROUND_DOWN};function ie(l){return new TextEncoder().encode(l)}function fe(l){return typeof l=="string"?fe(_e(l)):new TextDecoder().decode(l)}G.config(q);const ce="UNKNOWN_ERROR",re="INVALID_ARGUMENT";function X(l,p=ce,y={}){const w=[];Object.keys(y).forEach(Z=>{try{w.push(Z+"="+JSON.stringify(y[Z]))}catch{w.push(Z+"="+JSON.stringify(y[Z].toString()))}});const O=l;w.length&&(l+=" ("+w.join(", ")+")");const k=new Error(l);return k.reason=O,k.code=p,Object.keys(y).forEach(function(Z){k[Z]=y[Z]}),k}function _e(l){if(typeof l!="string")throw new Error("hexToBytes only accept strings, got: "+typeof l);if(l.substr(0,2)==="0x")return _e(l.substr(2));const p=new Uint8Array(Math.ceil(l.length/2));let y=0;for(let w=0;w<l.length;w+=2){const O=parseInt(l.substr(w,2),16);if(isNaN(O))throw new Error("Cannot read hex string:"+JSON.stringify(l));p[y]=O,y++}return p}function ge(l){return Array.from(l).map(p=>p.toString(16).padStart(2,"0")).join("")}function he(l,p){if(typeof l=="string"){if(p&&p.encoding==="hex"&&typeof l=="string"){let y=l;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const w=_e(y);return c.keccak256(w)}return c.keccak256(ie(l))}return c.keccak256(l)}const Se={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Xe(l,p,y){return new Array(p-l.length+1).join(y||"0")+l}function se(l){let p="",y=0;const w=l.length;for(l.substring(0,2)==="0x"&&(y=2);y<w;y+=2){const O=parseInt(l.substr(y,2),16);p+=String.fromCharCode(O)}return p}function He(l){return Wn(l)&&l.name&&l.name.indexOf("(")!==-1?l.name:l.name+"("+Et(!1,l.inputs||[]).join(",")+")"}function vt(...l){const p=l.reduce((O,k)=>O+k.length,0),y=new Uint8Array(p);let w=0;for(const O of l)y.set(O,w),w+=O.length;return y}function Et(l,p){const y=[];return p.forEach(function(w){if(typeof w.components=="object"){if(w.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let O="";const k=w.type.indexOf("[");k>=0&&(O=w.type.substring(k));const Z=Et(l,w.components);zn(Z)&&l?y.push("tuple("+Z.join(",")+")"+O):y.push("("+Z.join(",")+")"+O)}else y.push(w.type)}),y}function tn(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(0,p):l}function nn(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(p+1,y-p-1).replace(" ",""):""}function $n(l){return l==null?l:xt(l).toNumber()}function Me(l){return xt(l).toNumber()}function ht(l){return Cr(l)?l.toString(10):""+l}function gt(l){return typeof l=="string"&&!l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?"0x"+l:Ke(l)}function Gt(l){if(typeof l=="string")return l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?Ke(l):"0x"+ge(ie(l));if(l instanceof Uint8Array)return"0x"+ge(l);throw new Error(`toStringData: Error trying to convert ${l} (${typeof l}) to a hex string.`)}function nt(l){return typeof l=="boolean"?l:xt(l).toNumber()!==0}function rt(l){const p=xt(l),y=p.toString(16);return p.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Ke(l){if(Rr(l))return rt(+l);if(Cr(l))return rt(l);if(co(l)){const p=l;if(p.indexOf("-0x")===0)return rt(p);if(p.indexOf("0x")===0)return p;if(!isFinite(p))return ge(ie(p))}if(l instanceof Uint8Array)return"0x"+ge(l);if(zn(l)||Wn(l))throw new Error("toHex can only be called with scalar values, not objects or arrays");return rt(l)}function gn(l){const p=l?l.toLowerCase():"ether",y=Se[p];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(Se,null,2));return new G(y,10)}function xt(l){let p=l||0;return Cr(p)?p:(typeof p=="string"&&(p=p.trim()),typeof p!="string"||p.indexOf("0x")!==0&&p.indexOf("-0x")!==0?p instanceof Uint8Array?new G(ge(p),16):new G(p,10):new G(p.replace("0x","").toLowerCase(),16))}function ei(l){return new G(new Array(l).fill("1").join(""),2)}function Ze(l,p=256){const y=xt(l).integerValue();return y.isLessThan(0)?ei(p).plus(y).plus(1):y}function rn(l,p){return Xe(l.toString(2),p,"0")[0]==="1"}function et(l){if(typeof l!="string")throw X("invalid address",re,{arg:"address",value:l});if(l.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return l.trim().substring(0,2)!=="0x"&&(l="0x"+l),hs(l);throw X("invalid address",re,{arg:"address",value:l})}function Lt(l,p=256){if(rn(l,p)){const y=ei(p);return l.minus(y).minus(1)}return l}function at(l){return/^0x[0-9a-f]{40}$/i.test(l)}function Pn(l){return!!/^(0x)?[0-9a-f]{40}$/i.test(l)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(l)&&!/^(0x)?[0-9A-F]{40}$/.test(l))||fs(l))}function fs(l){const p=l.replace("0x",""),y=he(p.toLowerCase());for(let w=0;w<40;w++)if(parseInt(y[w],16)>7&&p[w].toUpperCase()!==p[w]||parseInt(y[w],16)<=7&&p[w].toLowerCase()!==p[w])return!1;return!0}function hs(l){if(l===void 0)return"";const p=l.toLowerCase().replace("0x",""),y=he(p);let w="0x";for(let O=0;O<p.length;O++)parseInt(y[O],16)>7?w+=p[O].toUpperCase():w+=p[O];return w}function In(l){if(!Array.isArray(l))throw new Error(`Value was not an array: ${JSON.stringify(l)}`);return l}function Mi(l){return at(l)?l:/^[0-9a-f]{40}$/.test(l)?"0x"+l:"0x"+Xe(Ke(l).substr(2),40)}function Cr(l){return l instanceof G}function co(l){return typeof l=="string"||l&&l.constructor&&l.constructor.name==="String"}function Wn(l){return l!==null&&!Array.isArray(l)&&typeof l=="object"}function Rr(l){return typeof l=="boolean"}function zn(l){return Array.isArray(l)}var uo,ti;function ps(l,p){if(!l)throw new Error("jsonrpc method should be specified!");if(typeof l!="string")throw new Error(`jsonrpc must be a string, got ${typeof l}!`);return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:l,params:p||[]}}function ms(l){return Array.isArray(l)?l.every(p):p(l);function p(y){return!!y&&(y.error===void 0||y.error===null)&&y.jsonrpc==="2.0"&&y.id!==null&&"result"in y&&y.result!==void 0}}n.TransactionStatus=void 0,(uo=n.TransactionStatus||(n.TransactionStatus={})).pending="pending",uo.confirmed="confirmed",uo.failed="failed",n.TransactionType=void 0,(ti=n.TransactionType||(n.TransactionType={})).queued="queued",ti.dropped="dropped",ti.replaced="replaced",ti.pending="pending",ti.reverted="reverted",ti.confirmed="confirmed",n.messageId=0;function lo(l){return xt(l)}function gs(l){return l==="latest"||l==="pending"||l==="earliest"}function pr(l){return l===void 0?"latest":bt(l)}function bt(l){return l==null?null:gs(l)?l:Ke(l)}function Gn(l){return l.from&&(l.from=ee(l.from)),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=rt(l.gasPrice)),l.gas!==void 0&&(l.gas=rt(l.gas)),l.value!==void 0&&(l.value=rt(l.value)),l.nonce!==void 0&&(l.nonce=rt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function Qn(l){if(typeof l!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(l));if(l.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(l));if(l.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(l));return l}function R(l){if(typeof l!="object")throw new Error("Did not provide transaction options");if(!l.from)throw new Error('Missing "from" in transaction options');return l.from=ee(l.from),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=rt(l.gasPrice)),l.gas!==void 0&&(l.gas=rt(l.gas)),l.value!==void 0&&(l.value=rt(l.value)),l.nonce!==void 0&&(l.nonce=rt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function _(l){return l?(l.blockNumber!==null&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=Me(l.transactionIndex)),l.nonce=Me(l.nonce),l.gas=Me(l.gas),l.gasPrice=xt(l.gasPrice),l.value=xt(l.value),l):null}function A(l){return l?(l.blockNumber!==null&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=Me(l.transactionIndex)),l.cumulativeGasUsed=Me(l.cumulativeGasUsed),l.gasUsed=Me(l.gasUsed),l.logs&&zn(l.logs)&&(l.logs=l.logs.map(function(p){return z(p)})),l.status=Me(l.status||""),l):null}function x(l){return l?(l.gasLimit=Me(l.gasLimit),l.gasUsed=Me(l.gasUsed),l.size=Me(l.size),l.timestamp=Me(l.timestamp),l.number!==null&&(l.number=Me(l.number)),l.difficulty=xt(l.difficulty),l.totalDifficulty=xt(l.totalDifficulty),zn(l.transactions)&&l.transactions.forEach(function(p,y){co(p)||(l.transactions[y]=_(p)||l.transactions[y])}),l):null}function z(l){return l&&(l.blockNumber&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex&&(l.transactionIndex=Me(l.transactionIndex)),l.logIndex&&(l.logIndex=Me(l.logIndex)),l)}function ee(l){if(at(l))return l;if(Pn(l))return"0x"+l;throw new Error(`Invalid address: ${JSON.stringify(l)}`)}function me(l){return l}function be(l){return l&&(l.startingBlock=Me(l.startingBlock),l.currentBlock=Me(l.currentBlock),l.highestBlock=Me(l.highestBlock),l.knownStates&&(l.knownStates=Me(l.knownStates),l.pulledStates=Me(l.pulledStates)),l)}function Le(l){if(l===null)throw X("cannot convert null value to array",re,{arg:"value",value:l});if(l instanceof Uint8Array)return new Uint8Array(l);if(typeof l=="string"){const p=l.match(/^(0x)?[0-9a-fA-F]*$/);if(!p)throw X("invalid hexidecimal string",re,{arg:"value",value:l});if(p[1]!=="0x")throw X("hex string must have 0x prefix",re,{arg:"value",value:l});(l=l.substring(2)).length%2&&(l="0"+l);const y=[];for(let w=0;w<l.length;w+=2)y.push(parseInt(l.substr(w,2),16));return new Uint8Array(y)}if(function(p){if(!p||parseInt(String(p.length))!==p.length||typeof p=="string")return!1;for(let y=0;y<p.length;y++){const w=p[y];if(w<0||w>=256||parseInt(String(w))!==w)return!1}return!0}(l))return new Uint8Array(l);throw X("invalid arrayify value",void 0,{arg:"value",value:l,type:typeof l})}function Ne(l,p,y){Object.defineProperty(l,p,{enumerable:!0,value:y,writable:!1})}const Ve=new G(-1),ut=new G(0),lt=new G(1),$t=new G("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ht(l){return function(p,y){function w(Z){return new Error('unexpected character "'+p[Z]+'" at position '+Z+' in "'+p+'"')}const O={type:"",name:"",state:{allowType:!0}};let k=O;for(let Z=0;Z<p.length;Z++){const ye=p[Z];switch(ye){case"(":if(!k.state.allowParams)throw w(Z);k.state.allowType=!1,k.type=on(k.type),k.components=[{type:"",name:"",parent:k,state:{allowType:!0}}],k=k.components[0];break;case")":delete k.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),k.type=on(k.type);const ke=k;if(k=k.parent,!k)throw w(Z);delete ke.parent,k.state.allowParams=!1,k.state.allowName=!0,k.state.allowArray=!0;break;case",":delete k.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),k.type=on(k.type);const xe={type:"",name:"",parent:k.parent,state:{allowType:!0}};k.parent.components.push(xe),delete k.parent,k=xe;break;case" ":k.state.allowType&&k.type!==""&&(k.type=on(k.type),delete k.state.allowType,k.state.allowName=!0,k.state.allowParams=!0),k.state.allowName&&k.name!==""&&(k.name==="indexed"?(k.indexed=!0,k.name=""):k.state.allowName=!1);break;case"[":if(!k.state.allowArray)throw w(Z);k.type+=ye,k.state.allowArray=!1,k.state.allowName=!1,k.state.readArray=!0;break;case"]":if(!k.state.readArray)throw w(Z);k.type+=ye,k.state.readArray=!1,k.state.allowArray=!0,k.state.allowName=!0;break;default:if(k.state.allowType)k.type+=ye,k.state.allowParams=!0,k.state.allowArray=!0;else if(k.state.allowName)k.name+=ye,delete k.state.allowArray;else{if(!k.state.readArray)throw w(Z);k.type+=ye}}}if(k.parent)throw new Error("unexpected eof");return delete O.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),O.type=on(O.type),O}(l)}function on(l){return l.match(/^uint($|[^1-9])/)?l="uint256"+l.substring(4):l.match(/^int($|[^1-9])/)&&(l="int256"+l.substring(3)),l}const ni=new RegExp(/^bytes([0-9]*)$/),Mr=new RegExp(/^(u?int)([0-9]*)$/),ri=new RegExp(/^(.*)\[([0-9]*)\]$/),fo=function(l,p){const y=l.match(Mr);return y&&parseInt(y[2])<=48?p.toNumber():p};class An{constructor(p,y,w,O="",k){this.coerceFunc=p,this.name=y,this.type=w,this.localName=O,this.dynamic=k}}class Ni extends An{constructor(p){super(p.coerceFunc,p.name,p.type,void 0,p.dynamic),Ne(this,"coder",p)}encode(p){return this.coder.encode(p)}decode(p,y){return this.coder.decode(p,y)}}class Ep extends An{constructor(p,y){super(p,"null","",y,!1)}encode(p){return Le([])}decode(p,y){if(y>p.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Sa(l,p){return new G(l.toString(2).substr(-p),2)}class Sp extends An{constructor(p,y,w,O){const k=(w?"int":"uint")+8*y;super(p,k,k,O,!1),this.size=y,this.signed=w}encode(p){try{let y=xt(p);if(this.signed){let O=Sa($t,8*this.size-1);if(y.gt(O))throw new Error("out-of-bounds");if(O=O.plus(lt).multipliedBy(Ve),y.lt(O))throw new Error("out-of-bounds")}else if(y.lt(ut)||y.gt(Sa($t,8*this.size)))throw new Error("out-of-bounds");y=Sa(Ze(y,8*this.size),8*this.size),this.signed&&(y=Ze(Lt(y,8*this.size),256));const w=Xe(Ze(y).toString(16),64);if(w.indexOf("NaN")!==-1)throw X("invalid number value, NaN",re,{arg:this.localName,coderType:this.name,value:p,v:y,twosComplement:Ze(y),twosComplement16:Ze(y).toString(16),pad:Xe(Ze(y).toString(16),64),size:this.size});return _e(w)}catch(y){throw X("invalid number value",re,{arg:this.localName,coderType:this.name,value:p,message:y.toString()})}}decode(p,y){if(p.length<y+32)throw X("insufficient data for "+this.name+" type",re,{arg:this.localName,coderType:this.name,value:Ke(p.slice(y,y+32))});const w=32-this.size;let O=new G(ge(p.slice(y+w,y+32)),16);return O=this.signed?Lt(O,8*this.size):Sa(O,8*this.size),{consumed:32,value:this.coerceFunc(this.name,O)}}}const Nr=new Sp(function(l,p){return p},32,!1,"none");class wp extends An{constructor(p,y,w){const O="bytes"+y;super(p,O,O,w,!1),this.length=y}encode(p){const y=new Uint8Array(32);try{if(typeof p=="string"&&p.length%2!=0)throw new Error("hex string cannot be odd-length");const w=Le(p);if(w.length>this.length)throw new Error("incorrect data length");y.set(w)}catch(w){throw X("invalid "+this.name+" value. Use hex strings or Uint8Array",re,{arg:this.localName,coderType:this.name,value:w.value||p,details:w.message})}return y}decode(p,y){if(p.length<y+32)throw X("insufficient data for "+this.name+" type",re,{arg:this.localName,coderType:this.name,value:Ke(p.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,p.slice(y,y+this.length))}}}function Tp(l){const p=32*Math.ceil(l.length/32),y=new Uint8Array(p-l.length);return vt(Nr.encode(l.length),l,y)}function Ip(l,p,y){if(l.length<p+32)throw X("insufficient data for dynamicBytes length",re,{arg:y,coderType:"dynamicBytes",value:Ke(l.slice(p,p+32))});let w=Nr.decode(l,p).value;try{w=w.toNumber()}catch(O){throw O("dynamic bytes count too large",re,{arg:y,coderType:"dynamicBytes",value:w.toString()})}if(l.length<p+32+w)throw X("insufficient data for dynamicBytes type",re,{arg:y,coderType:"dynamicBytes",value:Ke(l.slice(p,p+32+w))});return{consumed:32+32*Math.ceil(w/32),value:l.slice(p+32,p+32+w)}}function wa(l){return 32*Math.ceil(l/32)}function Ap(l,p){if(!Array.isArray(p)){if(!p||typeof p!="object")throw X("invalid tuple value",re,{coderType:"tuple",value:p});{const ke=[];l.forEach(function(xe){ke.push(p[xe.localName])}),p=ke}}if(l.length!==p.length)throw X("types/value length mismatch",re,{coderType:"tuple",value:p});const y=[];l.forEach(function(ke,xe){y.push({dynamic:ke.dynamic,value:ke.encode(p[xe])})});let w=0,O=0;y.forEach(function(ke){ke.dynamic?(w+=32,O+=wa(ke.value.length)):w+=wa(ke.value.length)});let k=0,Z=w;const ye=new Uint8Array(w+O);return y.forEach(function(ke){ke.dynamic?(ye.set(Nr.encode(Z),k),k+=32,ye.set(ke.value,Z),Z+=wa(ke.value.length)):(ye.set(ke.value,k),k+=wa(ke.value.length))}),ye}class rw extends Array{}class iw extends An{constructor(p,y,w,O){super(p,"array",y.type+"["+(w>=0?w:"")+"]",O,w===-1||y.dynamic),this.coder=y,this.length=w}encode(p){if(!Array.isArray(p))throw X("expected array value",re,{arg:this.localName,coderType:"array",value:p});let y=this.length,w=new Uint8Array(0);y===-1&&(y=p.length,w=Nr.encode(y)),function(k,Z,ye){if(ye||(ye=""),k<Z)throw X("missing argument"+ye,"MISSING_ARGUMENT",{count:k,expectedCount:Z});if(k>Z)throw X("too many arguments"+ye,"UNEXPECTED_ARGUMENT",{count:k,expectedCount:Z})}(y,p.length,"in coder array"+(this.localName?" "+this.localName:""));const O=[];for(let k=0;k<p.length;k++)O.push(this.coder);return vt(w,Ap(O,p))}decode(p,y){let w=0,O=this.length;if(O===-1){let ye;try{ye=Nr.decode(p,y)}catch(ke){throw X("insufficient data for dynamic array length",re,{arg:this.localName,coderType:"array",value:ke.value})}try{O=ye.value.toNumber()}catch{throw X("array count too large",re,{arg:this.localName,coderType:"array",value:ye.value.toString()})}w+=ye.consumed,y+=ye.consumed}const k=[];for(let ye=0;ye<O;ye++)k.push(new Ni(this.coder));const Z=function(ye,ke,xe){const yn=xe;let Ut=0;const ve=[];return ye.forEach(function(sn){let Ot;if(sn.dynamic){const Ct=Nr.decode(ke,xe);Ot=sn.decode(ke,yn+Ct.value.toNumber()),Ot.consumed=Ct.consumed}else Ot=sn.decode(ke,xe);Ot.value!==void 0&&ve.push(Ot.value),xe+=Ot.consumed,Ut+=Ot.consumed}),{value:ve,consumed:Ut}}(k,p,y);return Z.consumed+=w,Z.value=this.coerceFunc(this.type,Z.value),Z}}class Al extends An{constructor(p,y,w){let O=!1;const k=[];y.forEach(function(Z){Z.dynamic&&(O=!0),k.push(Z.type)}),super(p,"tuple","tuple("+k.join(",")+")",w,O),this.coders=y}encode(p){return Ap(this.coders,p)}decode(p,y){const w=function(O,k,Z){const ye=Z;let ke=0;const xe=new rw;return O.forEach(function(yn){let Ut;if(yn.dynamic){const ve=Nr.decode(k,Z);Ut=yn.decode(k,ye+ve.value.toNumber()),Ut.consumed=ve.consumed}else Ut=yn.decode(k,Z);Ut.value!==void 0&&xe.push(Ut.value),Z+=Ut.consumed,ke+=Ut.consumed}),O.forEach(function(yn,Ut){let ve=yn.localName;ve&&(ve==="length"&&(ve="_length"),xe[ve]!==null&&xe[ve]!==void 0||(xe[ve]=xe[Ut]))}),{value:xe,consumed:ke}}(this.coders,p,y);return w.value=this.coerceFunc(this.type,w.value),w}}const ow={address:class extends An{constructor(l,p){super(l,"address","address",p,!1)}encode(l){const p=new Uint8Array(32),y=l.trim();if(!Pn(y))throw X("invalid address format",re,{arg:this.localName,coderType:"address",value:l});try{p.set(_e(ee(y)),12)}catch(w){throw X(`invalid address (${w.message})`,re,{arg:this.localName,coderType:"address",value:l})}return p}decode(l,p){if(l.length<p+32)throw X("insufficuent data for address type",re,{arg:this.localName,coderType:"address",value:Ke(l.slice(p,p+32)),missingBytes:p+32-l.length});return{consumed:32,value:this.coerceFunc("address",et(Ke(l.slice(p+12,p+32))))}}},bool:class extends An{constructor(l,p){super(l,"bool","bool",p,!1)}encode(l){return Nr.encode(l?1:0)}decode(l,p){try{const y=Nr.decode(l,p);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?X("insufficient data for boolean type",re,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends An{constructor(l,p){super(l,"string","string",p,!0)}encode(l){if(typeof l!="string")throw X("invalid string value",re,{arg:this.localName,coderType:"string",value:l});return Tp(ie(l))}decode(l,p){const y=Ip(l,p,this.localName);return y.value=this.coerceFunc("string",fe(y.value)),y}},bytes:class extends An{constructor(l,p){super(l,"bytes","bytes",p,!0)}encode(l){try{return Tp(Le(l))}catch(p){throw p("invalid bytes value",re,{arg:this.localName,coderType:"bytes",value:p.value})}}decode(l,p){const y=Ip(l,p,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends wp{constructor(l,p){super(l,24,p)}}};function Ta(l,p){const y=ow[p.type];if(y)return new y(l,p.name);let w=p.type.match(Mr);if(w){const O=parseInt(w[2]||"256");if(O===0||O>256||O%8!=0)throw X("invalid "+w[1]+" bit length",re,{arg:"param",value:p});return new Sp(l,O/8,w[1]==="int",p.name)}if(w=p.type.match(ni),w){const O=parseInt(w[1]);if(O===0||O>32)throw X("invalid bytes length",re,{arg:"param",value:p});return new wp(l,O,p.name)}if(w=p.type.match(ri),w){const O=Object.assign({},p),k=parseInt(w[2]||"-1");return O.type=w[1],new iw(l,Ta(l,O),k,p.name)}if(p.type.substring(0,5)==="tuple")return function(O,k,Z){k||(k=[]);const ye=k.map(ke=>Ta(O,ke));return new Al(O,ye,Z)}(l,p.components,p.name);if(p.type==="")return new Ep(l,p.name);throw X("invalid type",re,{arg:"type",value:p.type,fullType:p})}class Ol{constructor(p){(function(y,w){if(!(y instanceof w))throw X("missing new","MISSING_NEW",{name:w.name})})(this,Ol),p||(p=fo),Ne(this,"coerceFunc",p)}encode(p,y){if(p.length!==y.length)throw X("types/values length mismatch",re,{count:{types:p.length,values:y.length},value:{types:p,values:y}});const w=p.map(O=>typeof O=="string"?Ht(O):O).map(O=>Ta(this.coerceFunc,O));return new Al(this.coerceFunc,w,"_").encode(y)}decode(p,y){const w=p.map(O=>typeof O=="string"?Ht(O):O).map(O=>Ta(this.coerceFunc,O));return new Al(this.coerceFunc,w,"_").decode(y,0).value}}const Op=new Ol;var Cp,Ie;function Ae(l,p,y,w){var O,k=arguments.length,Z=k<3?p:w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(l,p,y,w);else for(var ye=l.length-1;ye>=0;ye--)(O=l[ye])&&(Z=(k<3?O(Z):k>3?O(p,y,Z):O(p,y))||Z);return k>3&&Z&&Object.defineProperty(p,y,Z),Z}function Oe(l,p){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(l,p)}n.coder=void 0,(Cp=n.coder||(n.coder={})).encodeParams=function(l,p){return ge(Op.encode(l,p))},Cp.decodeParams=function(l,p){if(l.length>0&&(!p||p==="0x"||p==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Op.decode(l,_e("0x"+p.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class De{constructor(p){this.callName=p.callName,this.params=p.params||0,this.inputFormatter=p.inputFormatter||null,this.outputFormatter=p.outputFormatter}validateArgs(p){if(p.length!==this.params)throw y=this.callName,w=p.length,O=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${w}, expected: ${O}`);var y,w,O}formatInput(p){return this.inputFormatter?this.inputFormatter.map(function(y,w){return y?y(p[w]):p[w]}):p}formatOutput(p){return p!==null?this.outputFormatter(p):null}toPayload(p){const y=this.formatInput(p);return this.validateArgs(y),{method:this.callName,params:y}}async execute(p,...y){const w=this.toPayload(y);if(!p)throw new Error("Missing RequestManager in method#exec");const O=await p.sendAsync(w);return this.formatOutput(O)}}class On{constructor(p){this.getter=p.getter,this.outputFormatter=p.outputFormatter}formatOutput(p){return this.outputFormatter(p)}async execute(p,...y){const w=await p.sendAsync({method:this.getter,params:[]});return this.formatOutput(w)}}function Rp(l){return new Promise(p=>setTimeout(p,l))}n.eth=void 0,(Ie=n.eth||(n.eth={})).eth_getBalance=new De({callName:"eth_getBalance",params:2,inputFormatter:[ee,pr],outputFormatter:lo}),Ie.eth_getStorageAt=new De({callName:"eth_getStorageAt",params:3,inputFormatter:[ee,Ke,pr],outputFormatter:gt}),Ie.eth_getCode=new De({callName:"eth_getCode",params:2,inputFormatter:[ee,pr],outputFormatter:gt}),Ie.eth_getBlockByHash=new De({callName:"eth_getBlockByHash",params:2,inputFormatter:[bt,function(l){return!!l}],outputFormatter:x}),Ie.eth_getBlockByNumber=new De({callName:"eth_getBlockByNumber",params:2,inputFormatter:[bt,function(l){return!!l}],outputFormatter:x}),Ie.eth_getUncleByBlockHashAndIndex=new De({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:x}),Ie.eth_getUncleByBlockNumberAndIndex=new De({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:x}),Ie.eth_getBlockTransactionCountByHash=new De({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getBlockTransactionCountByNumber=new De({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getUncleCountByBlockHash=new De({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getUncleCountByBlockNumber=new De({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getTransactionByHash=new De({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Qn],outputFormatter:_}),Ie.eth_getTransactionByBlockHashAndIndex=new De({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:_}),Ie.eth_getTransactionByBlockNumberAndIndex=new De({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:_}),Ie.eth_getTransactionReceipt=new De({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Qn],outputFormatter:A}),Ie.eth_getTransactionCount=new De({callName:"eth_getTransactionCount",params:2,inputFormatter:[ee,pr],outputFormatter:Me}),Ie.eth_sendRawTransaction=new De({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.web3_sha3=new De({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.eth_sendTransaction=new De({callName:"eth_sendTransaction",params:1,inputFormatter:[R],outputFormatter:gt}),Ie.eth_sign=new De({callName:"eth_sign",params:2,inputFormatter:[ee,null],outputFormatter:gt}),Ie.eth_call=new De({callName:"eth_call",params:2,inputFormatter:[Gn,pr],outputFormatter:gt}),Ie.eth_estimateGas=new De({callName:"eth_estimateGas",params:1,inputFormatter:[Gn],outputFormatter:Me}),Ie.eth_submitWork=new De({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:nt}),Ie.eth_getWork=new De({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:In}),Ie.eth_coinbase=new On({getter:"eth_coinbase",outputFormatter:Mi}),Ie.eth_mining=new On({getter:"eth_mining",outputFormatter:nt}),Ie.eth_hashrate=new On({getter:"eth_hashrate",outputFormatter:Me}),Ie.eth_syncing=new On({getter:"eth_syncing",outputFormatter:be}),Ie.eth_gasPrice=new On({getter:"eth_gasPrice",outputFormatter:lo}),Ie.eth_accounts=new On({getter:"eth_accounts",outputFormatter:In}),Ie.eth_blockNumber=new On({getter:"eth_blockNumber",outputFormatter:Me}),Ie.eth_protocolVersion=new On({getter:"eth_protocolVersion",outputFormatter:Me}),Ie.web3_clientVersion=new On({getter:"web3_clientVersion",outputFormatter:ht}),Ie.net_version=new On({getter:"net_version",outputFormatter:ht}),Ie.shh_version=new De({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Me}),Ie.shh_post=new De({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.personal_newAccount=new De({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Mi}),Ie.personal_importRawKey=new De({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Mi}),Ie.personal_sign=new De({callName:"personal_sign",params:3,inputFormatter:[Gt,ee,null],outputFormatter:gt}),Ie.personal_ecRecover=new De({callName:"personal_ecRecover",params:2,inputFormatter:[Gt,null],outputFormatter:Mi}),Ie.personal_unlockAccount=new De({callName:"personal_unlockAccount",params:3,inputFormatter:[ee,null,$n],outputFormatter:nt}),Ie.personal_sendTransaction=new De({callName:"personal_sendTransaction",params:2,inputFormatter:[R,null],outputFormatter:gt}),Ie.personal_lockAccount=new De({callName:"personal_lockAccount",params:1,inputFormatter:[ee],outputFormatter:nt}),Ie.personal_listAccounts=new On({getter:"personal_listAccounts",outputFormatter:In}),Ie.net_listening=new On({getter:"net_listening",outputFormatter:nt}),Ie.net_peerCount=new On({getter:"net_peerCount",outputFormatter:Me}),Ie.eth_newFilter=new De({callName:"eth_newFilter",params:1,inputFormatter:[me],outputFormatter:Ke}),Ie.eth_getLogs=new De({callName:"eth_getLogs",params:1,inputFormatter:[In],outputFormatter:In}),Ie.eth_newBlockFilter=new De({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ke}),Ie.eth_newPendingTransactionFilter=new De({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ke}),Ie.eth_uninstallFilter=new De({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ke],outputFormatter:nt}),Ie.eth_getFilterLogs=new De({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ke],outputFormatter:In}),Ie.eth_getFilterChanges=new De({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ke],outputFormatter:In}),Ie.eth_submitHashrate=new De({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:nt}),Ie.shh_newIdentity=new De({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_hasIdentity=new De({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newGroup=new De({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_addToGroup=new De({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newFilter=new De({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ke}),Ie.shh_uninstallFilter=new De({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_getLogs=new De({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getFilterMessages=new De({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getFilterChanges=new De({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getMessages=new De({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:In});function Ce(l,p){const y=n.eth[p];if(!y)throw new Error(`Could not find the method/property named ${p.toString()}`);Object.defineProperty(l,p,{value:function(...w){return y.execute(this,...w)}})}class Te{constructor(p){this.provider=p,this.requests=new Map}async sendAsync(p){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const w=ps(p.method,p.params),O=s();return this.requests.set(w.id,O),y.sendAsync(w,(k,Z)=>{this.requests.delete(w.id),k?O.reject(k):ms(Z)?O.resolve(Z.result):O.reject(function(ye){const ke=ye&&ye.error&&ye.error.message?ye.error.message:"Invalid JSON RPC response: "+JSON.stringify(ye);return new Error(ke)}(Z))}),O}setProvider(p){this.provider=p}async getConfirmedTransaction(p){const y=await this.waitForCompletion(p);if(this.isFailure(y))throw new Error(`Transaction "${p}" failed`);return y}async waitForCompletion(p,y){const w=Qn(p);if(await this.isTxDropped(w,y)){const O=await this.getTransactionAndReceipt(w);return Object.assign(Object.assign({},O),{status:n.TransactionStatus.failed})}for(;;){const O=await this.getTransactionAndReceipt(w);if(!this.isPending(O)&&O.receipt)return Object.assign(Object.assign({},O),{status:this.isFailure(O)?n.TransactionStatus.failed:n.TransactionStatus.confirmed});await Rp(2e3)}}async getTransaction(p){let y,w=null;const O=Qn(p);try{const Z=(await this.eth_accounts())[0];Z&&(w=await this.eth_getTransactionCount(Z,"latest"))}catch{w=null}try{if(y=await this.eth_getTransactionByHash(O),y===null)return null}catch{return null}if(y.blockNumber===null){if(w!==null){if(y.nonce<w)return{hash:O,type:n.TransactionType.replaced,nonce:y.nonce};if(y.nonce>w)return{hash:O,type:n.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:n.TransactionType.pending},y)}let k;try{if(k=await this.eth_getTransactionReceipt(O),k===null||k.status===0)return Object.assign({type:n.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:n.TransactionType.confirmed},y),{receipt:k})}async isTxDropped(p,y=15){let w=y;for(;w>0;){if(await this.getTransactionAndReceipt(p)!==null)return!1;w-=1,await Rp(2e3)}return!0}async getTransactionAndReceipt(p){p=Qn(p);const[y,w]=await Promise.all([this.eth_getTransactionByHash(p),this.eth_getTransactionReceipt(p)]);return Object.assign(Object.assign({},y),{receipt:w})}isPending(p){return p&&p.blockNumber===null}isFailure(p){return p&&(!p.receipt||p.receipt.status===0)}}Ae([Ce,Oe("design:type",Function)],Te.prototype,"web3_clientVersion",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"web3_sha3",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_version",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_peerCount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_listening",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_protocolVersion",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_syncing",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_coinbase",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_mining",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_hashrate",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_gasPrice",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_accounts",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_blockNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBalance",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getStorageAt",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionCount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getCode",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sign",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sendTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sendRawTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_call",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_estimateGas",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockByNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionReceipt",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newBlockFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newPendingTransactionFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_uninstallFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getFilterChanges",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getFilterLogs",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getLogs",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getWork",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_submitWork",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_submitHashrate",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_post",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_version",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newIdentity",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_hasIdentity",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newGroup",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_addToGroup",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_uninstallFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_getFilterChanges",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_getMessages",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_unlockAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_newAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_listAccounts",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_lockAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_importRawKey",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_sendTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_sign",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_ecRecover",void 0);class Mp{constructor(p){this.json=p,this._inputTypes=p.inputs||[],this._outputTypes=p.outputs||[],this._constant=!!p.constant,this._payable=!!p.payable||p.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in p&&!p.constant||p.stateMutability==="nonpayable",this._name=He(p)}extractDefaultBlock(p){return p.length>this._inputTypes.length&&!Wn(p[p.length-1])&&pr(p.pop())||"latest"}validateArgs(p){if(p.some(k=>k===void 0))throw new Error("Invalid call, some arguments are undefined");const y=p.filter(function(k){return!(Wn(k)===!0&&zn(k)===!1&&Cr(k)===!1&&!(k instanceof Uint8Array))});if(y.length!==this._inputTypes.length)throw w=y.length,O=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${w}, expected: ${O}`);var w,O}toPayload(p){let y={to:void 0,data:void 0,value:void 0,from:void 0};p.length>this._inputTypes.length&&Wn(p[p.length-1])&&(y=p.pop()),this.validateArgs(p);const w=this.signature();let O=n.coder.encodeParams(this._inputTypes,p);return O.indexOf("0x")===0&&(O=O.substr(2)),y.data="0x"+w+O,y}signature(){return he(this._name).slice(0,8)}unpackOutput(p){if(!p)return;const y=p.length>=2?p.slice(2):p,w=n.coder.decodeParams(this._outputTypes,y);return w.length===1?w[0]:w}async execute(p,y,...w){if(!p)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const O=this.toPayload(w);if(O.to=y,O.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!O.from)throw new Error('Missing "from" in transaction options');return await p.eth_sendTransaction(O)}{const O=this.extractDefaultBlock(w),k=this.toPayload(w);k.to=y;const Z=await p.eth_call(k,O);return this.unpackOutput(Z)}}estimateGas(p,y,...w){if(!(p instanceof Te))throw new Error("estimateGas needs to receive a RequestManager as first argument");const O=this.toPayload(w);return O.to=y,p.eth_estimateGas(O)}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}attachToContract(p){const y=this.displayName(),w=Object.assign((...O)=>this.execute(p.requestManager,p.address,...O),{estimateGas:this.estimateGas.bind(this,p.requestManager,p.address),toPayload:(...O)=>this.toPayload(O),toRPCMessage:(...O)=>{const k=this.extractDefaultBlock(O),Z=this.toPayload(O);return Z.to=p.address,{method:"eth_call",params:[Z,k]}},unpackOutput:O=>this.unpackOutput(O)});p[y]||(p[y]=w),p[y][this.typeName()]=w}}function Np(l){if(l==null)return null;const p=String(l).toString();return p.indexOf("0x")===0?p:ge(ie(p))}class Cl{constructor(p){this.requestManager=p,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(p){if(this.isDisposed)throw new Error("The filter was disposed");p&&(this.callbacks.push(p),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const p=await this.getNewFilter();if(!p)throw new Error("Could not create a filter, response: "+JSON.stringify(p));this.filterId.resolve(p)}catch(p){throw p}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const p=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${p}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach(w=>{this.formatter?y.forEach(O=>{w(this.formatter(O))}):y.forEach(O=>w(O))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((p=()=>this.poll(),function(){p().catch(y=>console.error(y))}),500))}else this.stopSemaphore.resolve(1);var p}}class ys extends Cl{constructor(p,y,w=O=>O){super(p),this.requestManager=p,this.options=y,this.formatter=w,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(O){return Np(O)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?bt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?bt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const p=await this.filterId;return this.requestManager.eth_getFilterLogs(p)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const p=await this.filterId;return this.requestManager.eth_getFilterChanges(p)}async uninstall(){const p=await this.filterId;return this.requestManager.eth_uninstallFilter(p)}}class Rl{constructor(p,y,w){this.requestManager=p,this.address=w,this._anonymous=!1,this._params=y.inputs||[],this._name=He(y),this._anonymous=y.anonymous||!1}types(p){return this._params.filter(function(y){return y.indexed===p})}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}signature(){return he(this._name)}encode(p={},y={}){const w={topics:[],address:this.address};y.fromBlock!==void 0&&(w.fromBlock=bt(y.fromBlock)||void 0),y.toBlock!==void 0&&(w.toBlock=bt(y.toBlock)||void 0),w.topics=w.topics||[],this._anonymous||w.topics.push("0x"+this.signature());const O=this._params.filter(function(k){return k.indexed===!0}).map(function(k){const Z=p[k.name];return Z==null?null:zn(Z)?Z.map(function(ye){return"0x"+n.coder.encodeParams([k],[ye])}):"0x"+n.coder.encodeParams([k],[Z])});return w.topics=w.topics.concat(O),w}decode(p){p.data=p.data||"",p.topics=p.topics||[];const y=(this._anonymous?p.topics:p.topics.slice(1)).map(function(ye){return ye.slice(2)}).join(""),w=n.coder.decodeParams(this.types(!0),y),O=p.data.slice(2),k=n.coder.decodeParams(this.types(!1),O),Z=this._params.reduce(function(ye,ke){return ye[ke.name]=ke.indexed?w.shift():k.shift(),ye},{});return Object.assign(Object.assign({},z(p)),{event:this.displayName(),address:p.address,args:Z})}async execute(p,y){const w=this.encode(p,y),O=this.decode.bind(this);return new ys(this.requestManager,w,O)}attachToContract(p){const y=this.execute.bind(this),w=this.displayName();p.events[w]||(p.events[w]=y),p.events[w][this.typeName()]=this.execute.bind(this,p)}}class sw{constructor(p,y,w){this._requestManager=p,this._json=y,this._address=w}encode(p={}){const y={address:this._address};return p.fromBlock!==void 0&&(y.fromBlock=bt(p.fromBlock)||void 0),p.toBlock!==void 0&&(y.toBlock=bt(p.toBlock)||void 0),y}decode(p){p.data=p.data||"";const y=zn(p.topics)&&co(p.topics[0])?p.topics[0].slice(2):"",w=this._json.filter(function(O){return y===he(He(O))})[0];return w?new Rl(this._requestManager,w,this._address).decode(p):z(p)}async execute(p){const y=this.encode(p),w=this.decode.bind(this);return new ys(this._requestManager,y,w)}getAllEventsFunction(){return this.execute.bind(this)}}class kp{constructor(p,y,w){var O;this.requestManager=p,this.abi=y,this.address=w,this.events={},this.transactionHash=null,this.address=w,this.abi=y,(O=this).abi.filter(function(k){return k.type==="function"}).map(function(k){return new Mp(k)}).forEach(function(k){k.attachToContract(O)}),this.allEvents=function(k){const Z=k.abi.filter(function(ke){return ke.type==="event"}),ye=new sw(k.requestManager,Z,k.address);return Z.map(function(ke){return new Rl(k.requestManager,ke,k.address)}).forEach(function(ke){ke.attachToContract(k)}),ye.getAllEventsFunction()}(this)}}n.AbstractFilter=Cl,n.BigNumber=G,n.Contract=kp,n.ContractFactory=class{constructor(l,p){this.requestManager=l,this.abi=p}async deploy(...l){let p;const y=l[l.length-1];if(Wn(y)&&!zn(y)&&(p=l.pop()),!p)throw new Error("Missing options object");if(!p.data||typeof p.data!="string")throw new Error("Invalid options.data");if(Me(p.value)>0&&!(this.abi.filter(function(xe){return xe.type==="constructor"&&xe.inputs.length===l.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const w=(O=this.abi,k=l,O.filter(function(xe){return xe.type==="constructor"&&xe.inputs&&xe.inputs.length===k.length}).map(function(xe){return xe.inputs||[]}).map(function(xe){return n.coder.encodeParams(xe,k)})[0]||"");var O,k;p.data+=w,p.gas||(p.gas=await this.requestManager.eth_estimateGas(p));const Z=await this.requestManager.eth_sendTransaction(p);if(!Z)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ye=await async function(xe,yn){const Ut=s();let ve=0;const sn=()=>{ve++,ve>50?Ut.reject(new Error("Contract transaction couldn't be found after 50 blocks")):xe.eth_getTransactionReceipt(yn).then(dn=>{dn&&dn.blockHash?Ut.resolve(dn):setTimeout(sn,1e3)},dn=>Ut.reject(dn))};sn();const Ot=await Ut,Ct=await xe.eth_getCode(Ot.contractAddress,"latest");if(Ct&&Ct.length>3)return Ot.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ct,receipt:Ot})}(this.requestManager,Z),ke=await this.at(ye);return ke.transactionHash=Z,ke}async at(l){if(!Pn(l))throw new TypeError(`Invalid address ${JSON.stringify(l)}`);return new kp(this.requestManager,this.abi,l)}},n.EthBlockFilter=class extends ys{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},n.EthFilter=ys,n.EthPendingTransactionFilter=class extends ys{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},n.HTTPProvider=class{constructor(l,p={}){this.host=l,this.options=p,this.debug=!1,this.host=l||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){try{let y=null;y=l instanceof Array?l.map(k=>r(k)):r(l);const w=this.options.fetch||globalThis.fetch;if(w===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const O={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+O.body),w(this.host,O).then(async k=>{if(k.ok){const Z=await k.json();this.debug&&console.log("RECV << "+JSON.stringify(Z)),Z.error?p(Object.assign(new Error(Z.error.json||Z.error),Z.error)):p(null,Z)}else this.debug&&console.log("ERR << "+JSON.stringify(k)),p(new Error("External error. response code: "+k.status))},k=>{this.debug&&console.log("ERR << "+JSON.stringify(k)),p(k)})}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),p(y)}}},n.Method=De,n.Property=On,n.RequestManager=Te,n.SHHFilter=class extends Cl{constructor(l,p){super(l),this.requestManager=l,this.options=p,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(y){return Np(y)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const l=await this.filterId;return this.requestManager.shh_getMessages(l)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const l=await this.filterId;return this.requestManager.shh_getFilterChanges(l)}async uninstall(){const l=await this.filterId;return this.requestManager.shh_uninstallFilter(l)}},n.SolidityEvent=Rl,n.SolidityFunction=Mp,n.WebSocketProvider=class{constructor(l,p={}){this.url=l,this.options=p,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const l=this.connection;this.timeout(new Error("Provider disposed.")),l.then(p=>p.close()).catch(p=>{this.debug&&console.error(p)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){const y=[];let w;if(l instanceof Array)w=Promise.all(l.map(O=>{const k=s();try{const Z=r(O);y.push(Z),this.responseCallbacks.set(Z.id,k)}catch(Z){k.reject(Z)}return k}));else{const O=s();try{const k=r(l);y.push(k),this.responseCallbacks.set(k.id,O)}catch(k){O.reject(k)}w=O}w.then(O=>p(null,O),O=>p(O)),this.connection.then(O=>{y.forEach(k=>{const Z=JSON.stringify(k);this.debug&&console.log("SEND >> "+Z),O.send(Z)})},O=>{p(O)})}parseResponse(l){const p=[];return l.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(y=>{let w=y;this.lastChunk&&(w=this.lastChunk+w);let O=null;try{O=JSON.parse(w)}catch{return this.lastChunk=w,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",O&&p.push(O)}),p}processMessage(l){if("id"in l){const p=l.id,y=this.responseCallbacks.get(p);if(!y)return void console.error("Error: Received a response for an unknown request",l);this.responseCallbacks.delete(p),l.error!==void 0&&l.error!==null?y.reject(Object.assign(new Error(l.error.message||l.error),l.error)):"result"in l&&y.resolve(l)}else this.notificationCallbacks.forEach(p=>p(null,l))}timeout(l){this.connection&&this.connection.isPending||(this.connection=s());const p=l||new Error("Connection timeout");this.responseCallbacks.forEach(y=>y.reject(p)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(y=>y.close()).catch(y=>{this.debug&&console.error(y)}),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const l=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!l)throw new Error("Please provide a WebSocketConstructor");const p=new l(this.url,this.options.protocol);p.onopen=()=>{this.connection.resolve(p)},p.onerror=y=>{const w=new Error("Error in web socket");w.data=y,this.timeout(w)},p.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},p.onmessage=y=>{const w=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(w).forEach(O=>{O instanceof Array?O.forEach(k=>this.processMessage(k)):this.processMessage(O)})}}},n.bytesToHex=ge,n.bytesToUtf8String=fe,n.concatBytes=vt,n.default=Te,n.extractDisplayName=tn,n.extractTypeName=nn,n.fromAscii=function(l,p=0){let y="";for(let w=0;w<l.length;w++){const O=l.charCodeAt(w).toString(16);y+=O.length<2?"0"+O:O}return"0x"+y.padEnd(p,"0")},n.fromDecimal=rt,n.fromTwosComplement=Lt,n.fromWei=function(l,p){const y=xt(l).dividedBy(gn(p));return Cr(l)?y:y.toString(10)},n.getAddress=et,n.getValueOfUnit=gn,n.hexToBytes=_e,n.inputAddressFormatter=ee,n.inputBlockNumberFormatter=bt,n.inputCallFormatter=Gn,n.inputDefaultBlockNumberFormatter=pr,n.inputFilterOptions=me,n.inputPostFormatter=function(l){return l?(l.ttl=rt(l.ttl),l.workToProve=rt(l.workToProve),l.priority=rt(l.priority),zn(l.topics)||(l.topics=l.topics?[l.topics]:[]),l.topics=l.topics.map(function(p){return p.indexOf("0x")===0?p:"0x"+ge(ie(p))}),l):null},n.inputTransactionFormatter=R,n.inputTransactionId=Qn,n.isAddress=Pn,n.isArray=zn,n.isBigNumber=Cr,n.isBloom=function(l){return!!/^(0x)?[0-9a-f]{512}$/i.test(l)&&!!/^(0x)?[0-9a-f]{512}$/i.test(l)},n.isBoolean=Rr,n.isChecksumAddress=fs,n.isFunction=function(l){return typeof l=="function"},n.isHex=function(l){return typeof l=="string"&&/^0x[0-9a-fA-F]+$/.test(l)},n.isJson=function(l){try{return!!JSON.parse(l)}catch{return!1}},n.isObject=Wn,n.isPredefinedBlockNumber=gs,n.isStrictAddress=at,n.isString=co,n.isTopic=function(l){return!!/^(0x)?[0-9a-f]{64}$/i.test(l)&&!!/^(0x)?[0-9a-f]{64}$/i.test(l)},n.isValidResponse=ms,n.outputBigNumberFormatter=lo,n.outputBlockFormatter=x,n.outputLogFormatter=z,n.outputPostFormatter=function(l){return l?(l.expiry=Me(l.expiry),l.sent=Me(l.sent),l.ttl=Me(l.ttl),l.workProved=Me(l.workProved),l.topics||(l.topics=[]),l.topics=l.topics.map(function(p){return se(p)}),l):null},n.outputSyncingFormatter=be,n.outputTransactionFormatter=_,n.outputTransactionReceiptFormatter=A,n.padLeft=Xe,n.padRight=function(l,p,y){return l+new Array(p-l.length+1).join(y||"0")},n.sha3=he,n.signedIsNegative=rn,n.stringToUtf8Bytes=ie,n.toAddress=Mi,n.toArray=In,n.toAscii=se,n.toBatchPayload=function(l){return l.map(function(p){return ps(p.method,p.params)})},n.toBigNumber=xt,n.toBoolean=nt,n.toChecksumAddress=hs,n.toData=gt,n.toDecimal=Me,n.toHex=Ke,n.toJsonRpcRequest=ps,n.toNullDecimal=$n,n.toString=ht,n.toStringData=Gt,n.toTwosComplement=Ze,n.toWei=function(l,p){const y=xt(l).times(gn(p));return Cr(l)?y:y.toString(10)},n.transformToFullName=He,Object.defineProperty(n,"__esModule",{value:!0})})})(Hd,Hd.exports);var Fu=Hd.exports,Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.SignatureValidator=void 0;const hw=Fu;async function pw(e,t){const n=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new hw.ContractFactory(e,n).at(t)}Hu.SignatureValidator=pw;var n_={},r_={},i_={},o_={},s_={},Ee={},Wf=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.validateType=Ee.generateLazyValidator=Ee.Ajv=void 0;const a_=Wf(aw);Ee.Ajv=a_.default;const mw=Wf(cw),gw=Wf(uw);function yw(e,t){let n=null;const r=(i,o)=>{if(!n){const s=new a_.default({$data:!0,allErrors:!0});(0,mw.default)(s),(0,gw.default)(s,{singleError:!0}),t?.forEach(a=>s.addKeyword(a)),n=s.compile(e),Object.defineProperty(r,"errors",{get(){return n?.errors}})}return n(i,o)};return r}Ee.generateLazyValidator=yw;function _w(e,t){return e.validate(t)}Ee.validateType=_w;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Ee;e.SCENE_UPDATE="SCENE_UPDATE",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SceneUpdate||(e.SceneUpdate={}))})(s_);var c_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Ee;e.UPDATE="update",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Update||(e.Update={}))})(c_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(s_,e),n(c_,e)})(o_);var u_={},l_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Ee;(function(n){n.SCENE="scene",n.SMART_ITEM="smart-item",n.PORTABLE_EXPERIENCE="portable-experience",n.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProjectType||(e.ProjectType={}))})(l_);var d_={},Xs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Ee;(function(n){n.UNIQUE="unique",n.MYTHIC="mythic",n.LEGENDARY="legendary",n.EPIC="epic",n.RARE="rare",n.UNCOMMON="uncommon",n.COMMON="common"})(e.Rarity||(e.Rarity={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema);const r={[n.UNIQUE]:1,[n.MYTHIC]:10,[n.LEGENDARY]:100,[n.EPIC]:1e3,[n.RARE]:5e3,[n.UNCOMMON]:1e4,[n.COMMON]:1e5},i={[n.UNIQUE]:"#FFE617",[n.MYTHIC]:"#FB7DE3",[n.LEGENDARY]:"#A657ED",[n.EPIC]:"#6397F2",[n.RARE]:"#3AD682",[n.UNCOMMON]:"#FF8563",[n.COMMON]:"#D4E0E0"},o={[n.UNIQUE]:"#FFB626",[n.MYTHIC]:"#FF63E1",[n.LEGENDARY]:"#842DDA",[n.EPIC]:"#3D85E6",[n.RARE]:"#36CF75",[n.UNCOMMON]:"#ED6D4F",[n.COMMON]:"#ABC1C1"};function s(u){return r[u]}n.getMaxSupply=s;function a(u){return o[u]}n.getColor=a;function c(u){return[i[u],o[u]]}n.getGradient=c}(e.Rarity||(e.Rarity={}))})(Xs);var wi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Ee;(function(n){n.EYEBROWS="eyebrows",n.EYES="eyes",n.FACIAL_HAIR="facial_hair",n.HAIR="hair",n.BODY_SHAPE="body_shape",n.MOUTH="mouth",n.UPPER_BODY="upper_body",n.LOWER_BODY="lower_body",n.FEET="feet",n.EARRING="earring",n.EYEWEAR="eyewear",n.HAT="hat",n.HELMET="helmet",n.MASK="mask",n.TIARA="tiara",n.TOP_HEAD="top_head",n.SKIN="skin",n.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableCategory||(e.WearableCategory={}))})(wi);var Uu={},ju={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Ee;(function(n){n.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",n.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyShape||(e.BodyShape={}))})(ju);var $u={},zf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Ee;(function(n){n.HEAD="head",n.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyPartCategory||(e.BodyPartCategory={}))})(zf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=wi,n=Ee,r=zf;(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},r.BodyPartCategory.schema)]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})($u);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ee,n=ju,r=$u;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:r.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:r.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Uu);var Wu={},f_={},Gf={},Zi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Ee;(function(n){n.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const r=(0,t.generateLazyValidator)(n.schema);n.validate=i=>r(i)})(e.Color3||(e.Color3={})),function(n){n.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.EthAddress||(e.EthAddress={})),function(n){n.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv2||(e.IPFSv2={})),function(n){n.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv1||(e.IPFSv1={}))})(Zi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=wi,n=Zi,r=Ee;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:n.IPFSv2.schema,body:n.IPFSv2.schema}},c.validate=(0,r.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var o;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)})(o=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const u=new RegExp(c.schema.pattern,"i");c.validate=h=>u.test(h)})(s=e.LinkUrl||(e.LinkUrl={}));var a;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(a=e.Link||(e.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:a.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:n.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:o.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)}(e.Avatar||(e.Avatar={}))})(Gf);var h_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ee,n=Gf;(function(r){r.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:n.Avatar.schema}},additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Profile||(e.Profile={}))})(h_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Gf,e),n(h_,e)})(f_);var p_={},Vf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Ee;e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],function(n){n.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.FeatureToggles||(e.FeatureToggles={}))})(Vf);var qf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(qf);var Yf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Ee;(function(n){n.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},n.schemaValidator=(0,t.generateLazyValidator)(n.schema),n.validate=r=>n.schemaValidator(r)&&r.parcels.includes(r.base)})(e.SceneParcels||(e.SceneParcels={}))})(Yf);var m_={},ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.displayableProperties=void 0;ns.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var Xf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Source||(e.Source={}))})(Xf);var Kf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Kf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ee,n=ns,r=Vf,i=Yf,o=Xf,s=Kf,a=qf;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=e.RequiredPermission||(e.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},n.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},o.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},r.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},a.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,t.generateLazyValidator)(u.schema)}(e.Scene||(e.Scene={}))})(m_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=Vf;Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var n=qf;Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return n.WorldConfiguration}});var r=Yf;Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return r.SceneParcels}});var i=m_;Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var o=Xf;Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return o.Source}});var s=Kf;Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(p_);var Ml={},Jf={},Zf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Ee;(function(n){n.EN="en",n.ES="es"})(e.Locale||(e.Locale={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Locale||(e.Locale={}))})(Zf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ee,n=Zf;(function(r){r.schema={type:"object",properties:{code:n.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.I18N||(e.I18N={}))})(Jf);var Qf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Metrics||(e.Metrics={}))})(Qf);var zu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Xs,n=Ee;e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const r={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,n.generateLazyValidator)(r);function o(s){return i(s)}e.isStandard=o})(zu);var Gu={},eh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MerkleProof||(e.MerkleProof={}))})(eh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const t=Ee,n=eh;e.thirdPartyProps={merkleProof:n.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const r={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(a,c)=>{var u;const h=c;return!((u=h?.merkleProof)===null||u===void 0)&&u.hashingKeys?h.merkleProof.hashingKeys.every(d=>h.hasOwnProperty(d)):!1},errors:!1},o=(0,t.generateLazyValidator)(r,[i]);function s(a){return o(a)}e.isThirdParty=s})(Gu);var g_={},y_={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.isBaseAvatar=Ur.requiredBaseItemProps=Ur.baseItemProperties=void 0;const bw=Jf,vw=Qf,Ew=ns;Ur.baseItemProperties=Object.assign(Object.assign({},Ew.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:bw.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},vw.Metrics.schema),{nullable:!0})});Ur.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function Sw(e){if(!e||!e.id)return!1;const t=e.id.split(":"),n=t[1]==="decentraland",r=t[3]==="base-avatars";return t.length===5&&n&&r}Ur.isBaseAvatar=Sw;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ee,n=wi,r=Uu,i=Ur,o=zu,s=Gu,a=$u;(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),o.standardProperties),s.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:a.HideableWearableCategory.schema},hides:{type:"array",items:a.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const u={keyword:"_isThirdParty",validate:(d,m)=>!d||(0,s.isThirdParty)(m),errors:!1},h={keyword:"_isBaseAvatar",validate:(d,m)=>!d||(0,i.isBaseAvatar)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[u,h])})(e.Wearable||(e.Wearable={}))})(y_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Uu;Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var n=y_;Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return n.Wearable}});var r=wi;Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return r.WearableCategory}});var i=zf;Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var o=$u;Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return o.HideableWearableCategory}})})(g_);var Nl={},kl={},th={},nh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Ee;(function(n){n.DANCE="dance",n.STUNT="stunt",n.GREETINGS="greetings",n.FUN="fun",n.POSES="poses",n.REACTIONS="reactions",n.HORROR="horror",n.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteCategory||(e.EmoteCategory={}))})(nh);var rh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ee,n=ju;(function(r){r.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(rh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=nh,n=Ee,r=rh;(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(th);var Pp;function ww(){return Pp||(Pp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=b_(),n=Ee,r=Ur,i=zu,o=Gu,s=th;(function(a){a.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},r.baseItemProperties),i.standardProperties),o.thirdPartyProps),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...r.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(u,h)=>!u||(0,t.isThirdParty)(h),errors:!1};a.validate=(0,n.generateLazyValidator)(a.schema,[c])})(e.Emote||(e.Emote={}))}(kl)),kl}var __={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Ee;(function(n){n.SIMPLE="simple",n.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmotePlayMode||(e.EmotePlayMode={}))})(__);var xp;function Tw(){return xp||(xp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=ww();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var n=rh;Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return n.EmoteRepresentationADR74}});var r=th;Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return r.EmoteDataADR74}});var i=nh;Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var o=__;Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return o.EmotePlayMode}})}(Nl)),Nl}var Lp;function b_(){return Lp||(Lp=1,function(e){var t=le&&le.__createBinding||(Object.create?function(u,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(u,m,g)}:function(u,h,d,m){m===void 0&&(m=d),u[m]=h[d]}),n=le&&le.__exportStar||function(u,h){for(var d in u)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&t(h,u,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var r=Jf;Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return r.I18N}});var i=Zf;Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var o=Qf;Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return o.Metrics}});var s=ju;Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var a=zu;Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return a.isStandard}});var c=Gu;Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),n(g_,e),n(Tw(),e)}(Ml)),Ml}var v_={};(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(eh,e)})(v_);var E_={},Vu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Ee;var n;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(n=e.AuthLinkType||(e.AuthLinkType={}));var r;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:n.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.AuthLink||(e.AuthLink={})),function(i){i.schema={type:"array",items:r.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.AuthChain||(e.AuthChain={}))})(Vu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Zi,n=Vu,r=Ee;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(E_);var S_={},ih={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Zi,n=Ee;(function(r){r.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.ContentMapping||(e.ContentMapping={}))})(ih);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Zi,n=ih,r=Ee;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:n.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.Entity||(e.Entity={}))})(S_);var w_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Vu,n=Ee;(function(r){r.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(w_);var T_={},I_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=wi,n=Zi,r=Ee;var i;(function(o){o.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},o.validate=(0,r.generateLazyValidator)(o.schema)})(i=e.Outfit||(e.Outfit={})),function(o){o.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},o.validate=(0,r.generateLazyValidator)(o.schema)}(e.Outfits||(e.Outfits={}))})(I_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(I_,e)})(T_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(f_,e),n(p_,e),n(b_(),e),n(ns,e),n(v_,e),n(E_,e),n(S_,e),n(w_,e),n(T_,e)})(Wu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Xs,n=wi,r=Uu,i=Ee,o=Wu;(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:n.WearableCategory.schema},hides:{type:"array",items:n.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(d_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(l_,e),n(d_,e)})(u_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(o_,e),n(u_,e)})(i_);var A_={},Pl={},xl={},Dp;function O_(){return Dp||(Dp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ee,n=fr();var r;(function(o){o.ETHEREUM_MAINNET="Ethereum Mainnet",o.ETHEREUM_ROPSTEN="Ropsten",o.ETHEREUM_RINKEBY="Rinkeby",o.ETHEREUM_GOERLI="Goerli",o.ETHEREUM_KOVAN="Kovan",o.ETHEREUM_SEPOLIA="Sepolia",o.MATIC_MAINNET="Polygon",o.MATIC_MUMBAI="Mumbai",o.AVALANCHE_MAINNET="Avalanche Mainnet",o.BINANCE_MAINNET="Binance Smart Chain Mainnet",o.ARBITRUM_MAINNET="Arbitrum One",o.OPTIMISM_MAINNET="Optimism Mainnet",o.FANTOM_MAINNET="Fantom Mainnet"})(r=e.ChainName||(e.ChainName={}));function i(o){switch(o){case r.ETHEREUM_MAINNET:return n.ChainId.ETHEREUM_MAINNET;case r.ETHEREUM_ROPSTEN:return n.ChainId.ETHEREUM_ROPSTEN;case r.ETHEREUM_RINKEBY:return n.ChainId.ETHEREUM_RINKEBY;case r.ETHEREUM_GOERLI:return n.ChainId.ETHEREUM_GOERLI;case r.ETHEREUM_KOVAN:return n.ChainId.ETHEREUM_KOVAN;case r.ETHEREUM_SEPOLIA:return n.ChainId.ETHEREUM_SEPOLIA;case r.MATIC_MAINNET:return n.ChainId.MATIC_MAINNET;case r.MATIC_MUMBAI:return n.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=i,function(o){o.schema={type:"string",enum:Object.values(o)},o.validate=(0,t.generateLazyValidator)(o.schema)}(r=e.ChainName||(e.ChainName={}))}(xl)),xl}var Kn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Ee;(function(n){n.ETHEREUM="ETHEREUM",n.MATIC="MATIC"})(e.Network||(e.Network={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Network||(e.Network={}))})(Kn);var Bp;function fr(){return Bp||(Bp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Ee,n=O_(),r=Kn;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=e.ChainId||(e.ChainId={}));function o(u){switch(u){case i.ETHEREUM_MAINNET:return n.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return n.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return n.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return n.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return n.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return n.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return n.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return n.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=o;function s(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=s;function a(u){switch(u){case i.ETHEREUM_MAINNET:return{[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[r.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[r.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[r.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[r.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[r.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[r.Network.ETHEREUM]:i.MATIC_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[r.Network.ETHEREUM]:i.MATIC_MUMBAI,[r.Network.MATIC]:i.MATIC_MUMBAI};default:return{[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=a;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return r.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return r.Network.MATIC}}e.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,t.generateLazyValidator)(u.schema)}(i=e.ChainId||(e.ChainId={}))}(Pl)),Pl}var qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Ee;(function(n){n.OPEN="open",n.SOLD="sold",n.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ListingStatus||(e.ListingStatus={}))})(qu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ee,n=fr(),r=qu,i=Kn;(function(o){o.RECENTLY_OFFERED="recently_offered",o.RECENTLY_UPDATED="recently_updated",o.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:r.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Bid||(e.Bid={}))})(A_);var C_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Ee;(function(n){n.MOST_SALES="most_sales",n.MOST_PURCHASES="most_purchases",n.MOST_SPENT="most_spent",n.MOST_EARNED="most_earned",n.MOST_ROYALTIES="most_royalties",n.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),function(n){n.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Account||(e.Account={}))})(C_);var R_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ee,n=fr(),r=Kn;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Collection||(e.Collection={}))})(R_);var M_={},Ks={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Ee;(function(n){n.PARCEL="parcel",n.ESTATE="estate",n.WEARABLE="wearable",n.ENS="ens",n.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.NFTCategory||(e.NFTCategory={}))})(Ks);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ee,n=fr(),r=Kn,i=Ks;(function(o){o.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),function(o){o.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:r.Network.schema,chainId:n.ChainId.schema},required:["name","address","category","network","chainId"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Contract||(e.Contract={}))})(M_);var N_={},oh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ee,n=fr(),r=Wu,i=Kn,o=Ks,s=Xs,a=wi;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:a.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:r.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:o.NFTCategory.schema,network:i.Network.schema,chainId:n.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,t.generateLazyValidator)(c.schema)}(e.NFT||(e.NFT={}))})(oh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ee,n=fr(),r=Kn,i=oh,o=Ks;(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:o.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:r.Network.schema,chainId:n.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)}(e.Item||(e.Item={}))})(N_);var k_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(k_);var P_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ee,n=fr(),r=Kn;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Mint||(e.Mint={}))})(P_);var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"}(e.CatalogSortBy||(e.CatalogSortBy={})),function(t){t.ASC="asc",t.DESC="desc"}(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(x_);var L_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ee,n=fr(),r=qu,i=Kn;(function(o){o.RECENTLY_LISTED="recently_listed",o.RECENTLY_UPDATED="recently_updated",o.CHEAPEST="cheapest",o.ISSUED_ID_ASC="issued_id_asc",o.ISSUED_ID_DESC="issued_id_desc",o.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:r.ListingStatus.schema,network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Order||(e.Order={}))})(L_);var D_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Ee;(function(n){n.INJECTED="injected",n.MAGIC="magic",n.FORTMATIC="formatic",n.NETWORK="network",n.WALLET_CONNECT="wallet_connect",n.WALLET_CONNECT_V2="wallet_connect_v2",n.WALLET_LINK="wallet_link",n.METAMASK_MOBILE="metamask_mobile",n.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProviderType||(e.ProviderType={}))})(D_);var sh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Ee;(function(n){n.ORDER="order",n.BID="bid",n.MINT="mint"})(e.SaleType||(e.SaleType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SaleType||(e.SaleType={}))})(sh);var B_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ee,n=fr(),r=sh,i=Kn;(function(o){o.RECENTLY_SOLD="recently_sold",o.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},type:r.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:n.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Sale||(e.Sale={}))})(B_);var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Ee,n=fr(),r=Kn;(function(o){o.OPEN="open",o.CANCELLED="cancelled",o.EXECUTED="executed",o.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),function(o){o.ASC="asc",o.DESC="desc"}(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),function(o){o.PARCEL="parcel",o.ESTATE="estate"}(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),function(o){o.LAND_CREATION_DATE="land_creation_date",o.RENTAL_LISTING_DATE="rental_listing_date",o.RENTAL_DATE="rented_date",o.NAME="name",o.MAX_RENTAL_PRICE="max_rental_price",o.MIN_RENTAL_PRICE="min_rental_price"}(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(o){o.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},o.validate=(0,t.generateLazyValidator)(o.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),function(o){o.schema={type:"object",properties:{network:r.Network.schema,chainId:n.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.RentalListingCreation||(e.RentalListingCreation={}))})(F_);var H_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,function(t){t.DATE="date",t.MOST_SALES="most_sales"}(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(H_);var U_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Store||(e.Store={}))})(U_);var j_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Ee;(function(n){n.MALE="male",n.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),function(n){n.MALE="male",n.FEMALE="female",n.UNISEX="unisex"}(e.GenderFilterOption||(e.GenderFilterOption={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableGender||(e.WearableGender={}))})(j_);var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Ee;function n(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=n;function r(i,o){const s=n().validWorldRanges;for(const a of s)if(i>=a.xMin&&i<=a.xMax&&o>=a.yMin&&o<=a.yMax)return!0;return!1}e.isInsideWorldLimits=r,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.World||(e.World={}))})($_);var W_={},z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Ee;(function(n){n.STATIC="static",n.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewCamera||(e.PreviewCamera={}))})(z_);var G_={};Object.defineProperty(G_,"__esModule",{value:!0});var V_={};Object.defineProperty(V_,"__esModule",{value:!0});var q_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Ee;(function(n){n.ANIMATION_PLAY="animation_play",n.ANIMATION_PAUSE="animation_pause",n.ANIMATION_LOOP="animation_loop",n.ANIMATION_END="animation_end",n.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(q_);var Y_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Ee;(function(n){n.IDLE="idle",n.WALK="walk",n.RUN="run",n.JUMP="jump",n.CLAP="clap",n.DAB="dab",n.DANCE="dance",n.FASHION="fashion",n.FASHION_2="fashion-2",n.FASHION_3="fashion-3",n.FASHION_4="fashion-4",n.LOVE="love",n.MONEY="money",n.FIST_PUMP="fist-pump",n.HEAD_EXPLODE="head-explode",n.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmote||(e.PreviewEmote={}))})(Y_);var X_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const t=Ee;(function(r){r.READY="ready",r.LOAD="load",r.ERROR="error",r.UPDATE="update",r.CONTROLLER_REQUEST="controller_request",r.CONTROLLER_RESPONSE="controller_response",r.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PreviewMessageType||(e.PreviewMessageType={}));const n=(r,i,o,s="*")=>{const a={type:i,payload:o};r.postMessage(a,s)};e.sendMessage=n})(X_);var K_={};Object.defineProperty(K_,"__esModule",{value:!0});var J_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Ee;(function(n){n.ORTHOGRAPHIC="orthographic",n.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewProjection||(e.PreviewProjection={}))})(J_);var Z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Ee;(function(n){n.TEXTURE="texture",n.WEARABLE="wearable",n.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewType||(e.PreviewType={}))})(Z_);var Q_={};Object.defineProperty(Q_,"__esModule",{value:!0});var eb={};Object.defineProperty(eb,"__esModule",{value:!0});var tb={};Object.defineProperty(tb,"__esModule",{value:!0});var nb={};Object.defineProperty(nb,"__esModule",{value:!0});var rb={};Object.defineProperty(rb,"__esModule",{value:!0});var ib={};Object.defineProperty(ib,"__esModule",{value:!0});var ob={};Object.defineProperty(ob,"__esModule",{value:!0});var sb={};Object.defineProperty(sb,"__esModule",{value:!0});(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(z_,e),n(G_,e),n(V_,e),n(q_,e),n(Y_,e),n(X_,e),n(K_,e),n(J_,e),n(Z_,e),n(Q_,e),n(eb,e),n(tb,e),n(nb,e),n(rb,e),n(ib,e),n(ob,e),n(sb,e)})(W_);var ab={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(ab);(function(e){var t=le&&le.__createBinding||(Object.create?function(fe,ce,re,X){X===void 0&&(X=re);var _e=Object.getOwnPropertyDescriptor(ce,re);(!_e||("get"in _e?!ce.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return ce[re]}}),Object.defineProperty(fe,X,_e)}:function(fe,ce,re,X){X===void 0&&(X=re),fe[X]=ce[re]}),n=le&&le.__setModuleDefault||(Object.create?function(fe,ce){Object.defineProperty(fe,"default",{enumerable:!0,value:ce})}:function(fe,ce){fe.default=ce}),r=le&&le.__importStar||function(fe){if(fe&&fe.__esModule)return fe;var ce={};if(fe!=null)for(var re in fe)re!=="default"&&Object.prototype.hasOwnProperty.call(fe,re)&&t(ce,fe,re);return n(ce,fe),ce},i=le&&le.__exportStar||function(fe,ce){for(var re in fe)re!=="default"&&!Object.prototype.hasOwnProperty.call(ce,re)&&t(ce,fe,re)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const o=r(i_);e.sdk=o,i(Ee,e);var s=A_;Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return s.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return s.BidSortBy}});var a=C_;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return a.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return a.AccountSortBy}});var c=fr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return c.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return c.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return c.getURNProtocol}});var u=O_();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var h=R_;Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return h.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return h.CollectionSortBy}});var d=M_;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return d.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return d.ContractSortBy}});var m=N_;Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return m.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return m.ItemSortBy}});var g=qu;Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return g.ListingStatus}});var E=k_;Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return E.MetaTransaction}});var T=P_;Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return T.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return T.MintSortBy}});var L=Kn;Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return L.Network}});var H=Ks;Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return H.NFTCategory}});var K=oh;Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return K.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return K.NFTSortBy}});var V=x_;Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return V.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return V.CatalogSortDirection}});var F=L_;Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return F.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return F.OrderSortBy}});var J=D_;Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return J.ProviderType}});var D=Xs;Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return D.Rarity}});var W=sh;Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return W.SaleType}});var ue=B_;Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return ue.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return ue.SaleSortBy}});var P=F_;Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return P.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return P.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return P.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return P.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return P.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return P.PeriodCreation}});var $=H_;Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return $.AnalyticsDayDataSortBy}});var G=U_;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return G.Store}});var q=j_;Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return q.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return q.GenderFilterOption}});var ie=$_;Object.defineProperty(e,"World",{enumerable:!0,get:function(){return ie.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return ie.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return ie.isInsideWorldLimits}}),i(W_,e),i(Wu,e),i(Zi,e),i(ab,e),i(Vu,e),i(ih,e)})(r_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=r_;Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}})})(n_);var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.moveMinutes=void 0;function Iw(e){const t=new Date;return t.setMinutes(t.getMinutes()+e),t}Yu.moveMinutes=Iw;var ah={};Object.defineProperty(ah,"__esModule",{value:!0});const _s=Fu;class Aw{constructor(t,n=!0){this.requestManager=t,this.checkedBlocks={},this.saveBlocks=n,n&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const t=await this.getBlockWrapper("latest"),n=await this.getBlockWrapper(1);this.blockTime=(t.timestamp-n.timestamp)/Number(t.number)-1,this.firstTimestamp=n.timestamp}async getDate(t,n=!0){const r=t/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),r<this.firstTimestamp)return{block:1,timestamp:r};if(r>=i||r>this.savedBlocks.latest.timestamp)return{block:(0,_s.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];const o=await this.getBlockWrapper(Math.ceil((r-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(r,o,n),timestamp:r}}async findBetter(t,n,r,i=this.blockTime){if(await this.isBetterBlock(t,n,r))return n.number;const o=t-n.timestamp;let s=Math.ceil(o/i);s===0&&(s=o<0?-1:1);const a=await this.getBlockWrapper(this.getNextBlock(t,n.number,s));return i=Math.abs((n.timestamp-a.timestamp)/(n.number-a.number)),this.findBetter(t,a,r,i)}async isBetterBlock(t,n,r){const i=n.timestamp;if(r){if(i<t)return!1;const o=await this.getBlockWrapper(n.number-1);if(i>=t&&o.timestamp<t)return!0}else{if(i>=t)return!1;const o=await this.getBlockWrapper(n.number+1);if(i<t&&o.timestamp>=t)return!0}return!1}getNextBlock(t,n,r){const i=n+r;return this.checkedBlocks[t].includes(i)?this.getNextBlock(t,n,r<0?++r:--r):(this.checkedBlocks[t].push(i),i)}async getBlockWrapper(t){if(!this.saveBlocks){const r=await this.requestManager.eth_getBlockByNumber(t,!1);return{number:(0,_s.toBigNumber)(r.number).toNumber(),timestamp:(0,_s.toBigNumber)(r.timestamp).toNumber()}}if(this.savedBlocks[t.toString()])return this.savedBlocks[t];if(typeof t=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=t)return this.savedBlocks.latest;const{timestamp:n}=await this.requestManager.eth_getBlockByNumber(t,!1);return this.savedBlocks[t.toString()]={number:(0,_s.toBigNumber)(t==="latest"?await this.requestManager.eth_blockNumber():t).toNumber(),timestamp:(0,_s.toBigNumber)(n).toNumber()},this.requests++,this.savedBlocks[t.toString()]}}ah.default=Aw;var pn={},ch={},cb={},ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.output=ln.exists=ln.hash=ln.bytes=ln.bool=ln.number=void 0;function ru(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ln.number=ru;function ub(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ln.bool=ub;function uh(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}ln.bytes=uh;function lb(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ru(e.outputLen),ru(e.blockLen)}ln.hash=lb;function db(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ln.exists=db;function fb(e,t){uh(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}ln.output=fb;const Ow={number:ru,bool:ub,bytes:uh,hash:lb,exists:db,output:fb};ln.default=Ow;var Po={},Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});Xu.crypto=void 0;Xu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const t=Xu,n=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);e.u8=n;const r=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));e.u32=r;const i=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);e.createView=i;const o=(F,J)=>F<<32-J|F>>>J;if(e.rotr=o,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},(F,J)=>J.toString(16).padStart(2,"0"));function a(F){if(!(F instanceof Uint8Array))throw new Error("Uint8Array expected");let J="";for(let D=0;D<F.length;D++)J+=s[F[D]];return J}e.bytesToHex=a;function c(F){if(typeof F!="string")throw new TypeError("hexToBytes: expected string, got "+typeof F);if(F.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const J=new Uint8Array(F.length/2);for(let D=0;D<J.length;D++){const W=D*2,ue=F.slice(W,W+2),P=Number.parseInt(ue,16);if(Number.isNaN(P)||P<0)throw new Error("Invalid byte sequence");J[D]=P}return J}e.hexToBytes=c;const u=async()=>{};e.nextTick=u;async function h(F,J,D){let W=Date.now();for(let ue=0;ue<F;ue++){D(ue);const P=Date.now()-W;P>=0&&P<J||(await(0,e.nextTick)(),W+=P)}}e.asyncLoop=h;function d(F){if(typeof F!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof F}`);return new TextEncoder().encode(F)}e.utf8ToBytes=d;function m(F){if(typeof F=="string"&&(F=d(F)),!(F instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof F})`);return F}e.toBytes=m;function g(...F){if(!F.every(W=>W instanceof Uint8Array))throw new Error("Uint8Array list expected");if(F.length===1)return F[0];const J=F.reduce((W,ue)=>W+ue.length,0),D=new Uint8Array(J);for(let W=0,ue=0;W<F.length;W++){const P=F[W];D.set(P,ue),ue+=P.length}return D}e.concatBytes=g;class E{clone(){return this._cloneInto()}}e.Hash=E;const T=F=>Object.prototype.toString.call(F)==="[object Object]"&&F.constructor===Object;function L(F,J){if(J!==void 0&&(typeof J!="object"||!T(J)))throw new TypeError("Options should be object or undefined");return Object.assign(F,J)}e.checkOpts=L;function H(F){const J=W=>F().update(m(W)).digest(),D=F();return J.outputLen=D.outputLen,J.blockLen=D.blockLen,J.create=()=>F(),J}e.wrapConstructor=H;function K(F){const J=(W,ue)=>F(ue).update(m(W)).digest(),D=F({});return J.outputLen=D.outputLen,J.blockLen=D.blockLen,J.create=W=>F(W),J}e.wrapConstructorWithOpts=K;function V(F=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(F));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(F).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=V})(Po);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=ln,n=Po;class r extends n.Hash{constructor(s,a){super(),this.finished=!1,this.destroyed=!1,t.default.hash(s);const c=(0,n.toBytes)(a);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,h=new Uint8Array(u);h.set(c.length>u?s.create().update(c).digest():c);for(let d=0;d<h.length;d++)h[d]^=54;this.iHash.update(h),this.oHash=s.create();for(let d=0;d<h.length;d++)h[d]^=106;this.oHash.update(h),h.fill(0)}update(s){return t.default.exists(this),this.iHash.update(s),this}digestInto(s){t.default.exists(this),t.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:a,iHash:c,finished:u,destroyed:h,blockLen:d,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=h,s.blockLen=d,s.outputLen=m,s.oHash=a._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(o,s,a)=>new r(o,s).update(a).digest();e.hmac=i,e.hmac.create=(o,s)=>new r(o,s)})(cb);var Gi={},Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.SHA2=void 0;const Ll=ln,bs=Po;function Cw(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class Rw extends bs.Hash{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,bs.createView)(this.buffer)}update(t){Ll.default.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=(0,bs.toBytes)(t);const o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const c=(0,bs.createView)(t);for(;i<=o-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ll.default.exists(this),Ll.default.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:o}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let d=s;d<i;d++)n[d]=0;Cw(r,i-8,BigInt(this.length*8),o),this.process(r,0);const a=(0,bs.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,h[d],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%n&&t.buffer.set(r),t}}Ku.SHA2=Rw;Object.defineProperty(Gi,"__esModule",{value:!0});Gi.sha224=Gi.sha256=void 0;const Mw=Ku,Vn=Po,Nw=(e,t,n)=>e&t^~e&n,kw=(e,t,n)=>e&t^e&n^t&n,Pw=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ai=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ci=new Uint32Array(64);class hb extends Mw.SHA2{constructor(){super(64,32,8,!1),this.A=ai[0]|0,this.B=ai[1]|0,this.C=ai[2]|0,this.D=ai[3]|0,this.E=ai[4]|0,this.F=ai[5]|0,this.G=ai[6]|0,this.H=ai[7]|0}get(){const{A:t,B:n,C:r,D:i,E:o,F:s,G:a,H:c}=this;return[t,n,r,i,o,s,a,c]}set(t,n,r,i,o,s,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)ci[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const m=ci[d-15],g=ci[d-2],E=(0,Vn.rotr)(m,7)^(0,Vn.rotr)(m,18)^m>>>3,T=(0,Vn.rotr)(g,17)^(0,Vn.rotr)(g,19)^g>>>10;ci[d]=T+ci[d-7]+E+ci[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:h}=this;for(let d=0;d<64;d++){const m=(0,Vn.rotr)(a,6)^(0,Vn.rotr)(a,11)^(0,Vn.rotr)(a,25),g=h+m+Nw(a,c,u)+Pw[d]+ci[d]|0,T=((0,Vn.rotr)(r,2)^(0,Vn.rotr)(r,13)^(0,Vn.rotr)(r,22))+kw(r,i,o)|0;h=u,u=c,c=a,a=s+g|0,s=o,o=i,i=r,r=g+T|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,i,o,s,a,c,u,h)}roundClean(){ci.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class xw extends hb{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Gi.sha256=(0,Vn.wrapConstructor)(()=>new hb);Gi.sha224=(0,Vn.wrapConstructor)(()=>new xw);var Ud={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=lw,n=BigInt(0),r=BigInt(1),i=BigInt(2),o=BigInt(3),s=BigInt(8),a=Object.freeze({a:n,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=a;const c=(R,_)=>(R+_/i)/_,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(R){const{n:_}=a,A=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),x=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),z=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ee=A,me=BigInt("0x100000000000000000000000000000000"),be=c(ee*R,_),Le=c(-x*R,_);let Ne=se(R-be*A-Le*z,_),Ve=se(-be*x-Le*ee,_);const ut=Ne>me,lt=Ve>me;if(ut&&(Ne=_-Ne),lt&&(Ve=_-Ve),Ne>me||Ve>me)throw new Error("splitScalarEndo: Endomorphism failed, k="+R);return{k1neg:ut,k1:Ne,k2neg:lt,k2:Ve}}},h=32,d=32,m=32,g=h+1,E=2*h+1;function T(R){const{a:_,b:A}=a,x=se(R*R),z=se(x*R);return se(z+_*R+A)}const L=a.a===n;class H extends Error{constructor(_){super(_)}}function K(R){if(!(R instanceof V))throw new TypeError("JacobianPoint expected")}class V{constructor(_,A,x){this.x=_,this.y=A,this.z=x}static fromAffine(_){if(!(_ instanceof D))throw new TypeError("JacobianPoint#fromAffine: expected Point");return _.equals(D.ZERO)?V.ZERO:new V(_.x,_.y,r)}static toAffineBatch(_){const A=tn(_.map(x=>x.z));return _.map((x,z)=>x.toAffine(A[z]))}static normalizeZ(_){return V.toAffineBatch(_).map(V.fromAffine)}equals(_){K(_);const{x:A,y:x,z}=this,{x:ee,y:me,z:be}=_,Le=se(z*z),Ne=se(be*be),Ve=se(A*Ne),ut=se(ee*Le),lt=se(se(x*be)*Ne),$t=se(se(me*z)*Le);return Ve===ut&&lt===$t}negate(){return new V(this.x,se(-this.y),this.z)}double(){const{x:_,y:A,z:x}=this,z=se(_*_),ee=se(A*A),me=se(ee*ee),be=_+ee,Le=se(i*(se(be*be)-z-me)),Ne=se(o*z),Ve=se(Ne*Ne),ut=se(Ve-i*Le),lt=se(Ne*(Le-ut)-s*me),$t=se(i*A*x);return new V(ut,lt,$t)}add(_){K(_);const{x:A,y:x,z}=this,{x:ee,y:me,z:be}=_;if(ee===n||me===n)return this;if(A===n||x===n)return _;const Le=se(z*z),Ne=se(be*be),Ve=se(A*Ne),ut=se(ee*Le),lt=se(se(x*be)*Ne),$t=se(se(me*z)*Le),Ht=se(ut-Ve),on=se($t-lt);if(Ht===n)return on===n?this.double():V.ZERO;const ni=se(Ht*Ht),Mr=se(Ht*ni),ri=se(Ve*ni),fo=se(on*on-Mr-i*ri),An=se(on*(ri-fo)-lt*Mr),Ni=se(z*be*Ht);return new V(fo,An,Ni)}subtract(_){return this.add(_.negate())}multiplyUnsafe(_){const A=V.ZERO;if(typeof _=="bigint"&&_===n)return A;let x=Xe(_);if(x===r)return this;if(!L){let ut=A,lt=this;for(;x>n;)x&r&&(ut=ut.add(lt)),lt=lt.double(),x>>=r;return ut}let{k1neg:z,k1:ee,k2neg:me,k2:be}=u.splitScalar(x),Le=A,Ne=A,Ve=this;for(;ee>n||be>n;)ee&r&&(Le=Le.add(Ve)),be&r&&(Ne=Ne.add(Ve)),Ve=Ve.double(),ee>>=r,be>>=r;return z&&(Le=Le.negate()),me&&(Ne=Ne.negate()),Ne=new V(se(Ne.x*u.beta),Ne.y,Ne.z),Le.add(Ne)}precomputeWindow(_){const A=L?128/_+1:256/_+1,x=[];let z=this,ee=z;for(let me=0;me<A;me++){ee=z,x.push(ee);for(let be=1;be<2**(_-1);be++)ee=ee.add(z),x.push(ee);z=ee.double()}return x}wNAF(_,A){!A&&this.equals(V.BASE)&&(A=D.BASE);const x=A&&A._WINDOW_SIZE||1;if(256%x)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let z=A&&J.get(A);z||(z=this.precomputeWindow(x),A&&x!==1&&(z=V.normalizeZ(z),J.set(A,z)));let ee=V.ZERO,me=V.BASE;const be=1+(L?128/x:256/x),Le=2**(x-1),Ne=BigInt(2**x-1),Ve=2**x,ut=BigInt(x);for(let lt=0;lt<be;lt++){const $t=lt*Le;let Ht=Number(_&Ne);_>>=ut,Ht>Le&&(Ht-=Ve,_+=r);const on=$t,ni=$t+Math.abs(Ht)-1,Mr=lt%2!==0,ri=Ht<0;Ht===0?me=me.add(F(Mr,z[on])):ee=ee.add(F(ri,z[ni]))}return{p:ee,f:me}}multiply(_,A){let x=Xe(_),z,ee;if(L){const{k1neg:me,k1:be,k2neg:Le,k2:Ne}=u.splitScalar(x);let{p:Ve,f:ut}=this.wNAF(be,A),{p:lt,f:$t}=this.wNAF(Ne,A);Ve=F(me,Ve),lt=F(Le,lt),lt=new V(se(lt.x*u.beta),lt.y,lt.z),z=Ve.add(lt),ee=ut.add($t)}else{const{p:me,f:be}=this.wNAF(x,A);z=me,ee=be}return V.normalizeZ([z,ee])[0]}toAffine(_){const{x:A,y:x,z}=this,ee=this.equals(V.ZERO);_==null&&(_=ee?s:Et(z));const me=_,be=se(me*me),Le=se(be*me),Ne=se(A*be),Ve=se(x*Le),ut=se(z*me);if(ee)return D.ZERO;if(ut!==r)throw new Error("invZ was invalid");return new D(Ne,Ve)}}V.BASE=new V(a.Gx,a.Gy,r),V.ZERO=new V(n,r,n);function F(R,_){const A=_.negate();return R?A:_}const J=new WeakMap;class D{constructor(_,A){this.x=_,this.y=A}_setWindowSize(_){this._WINDOW_SIZE=_,J.delete(this)}hasEvenY(){return this.y%i===n}static fromCompressedHex(_){const A=_.length===32,x=he(A?_:_.subarray(1));if(!nt(x))throw new Error("Point is not on curve");const z=T(x);let ee=vt(z);const me=(ee&r)===r;A?me&&(ee=se(-ee)):(_[0]&1)===1!==me&&(ee=se(-ee));const be=new D(x,ee);return be.assertValidity(),be}static fromUncompressedHex(_){const A=he(_.subarray(1,h+1)),x=he(_.subarray(h+1,h*2+1)),z=new D(A,x);return z.assertValidity(),z}static fromHex(_){const A=Se(_),x=A.length,z=A[0];if(x===h)return this.fromCompressedHex(A);if(x===g&&(z===2||z===3))return this.fromCompressedHex(A);if(x===E&&z===4)return this.fromUncompressedHex(A);throw new Error(`Point.fromHex: received invalid point. Expected 32-${g} compressed bytes or ${E} uncompressed bytes, not ${x}`)}static fromPrivateKey(_){return D.BASE.multiply(Ke(_))}static fromSignature(_,A,x){const{r:z,s:ee}=xt(A);if(![0,1,2,3].includes(x))throw new Error("Cannot recover: invalid recovery bit");const me=$n(Se(_)),{n:be}=a,Le=x===2||x===3?z+be:z,Ne=Et(Le,be),Ve=se(-me*Ne,be),ut=se(ee*Ne,be),lt=x&1?"03":"02",$t=D.fromHex(lt+ce(Le)),Ht=D.BASE.multiplyAndAddUnsafe($t,Ve,ut);if(!Ht)throw new Error("Cannot recover signature: point at infinify");return Ht.assertValidity(),Ht}toRawBytes(_=!1){return ge(this.toHex(_))}toHex(_=!1){const A=ce(this.x);return _?`${this.hasEvenY()?"02":"03"}${A}`:`04${A}${ce(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const _="Point is not on elliptic curve",{x:A,y:x}=this;if(!nt(A)||!nt(x))throw new Error(_);const z=se(x*x),ee=T(A);if(se(z-ee)!==n)throw new Error(_)}equals(_){return this.x===_.x&&this.y===_.y}negate(){return new D(this.x,se(-this.y))}double(){return V.fromAffine(this).double().toAffine()}add(_){return V.fromAffine(this).add(V.fromAffine(_)).toAffine()}subtract(_){return this.add(_.negate())}multiply(_){return V.fromAffine(this).multiply(_,this).toAffine()}multiplyAndAddUnsafe(_,A,x){const z=V.fromAffine(this),ee=A===n||A===r||this!==D.BASE?z.multiplyUnsafe(A):z.multiply(A),me=V.fromAffine(_).multiplyUnsafe(x),be=ee.add(me);return be.equals(V.ZERO)?void 0:be.toAffine()}}e.Point=D,D.BASE=new D(a.Gx,a.Gy),D.ZERO=new D(n,n);function W(R){return Number.parseInt(R[0],16)>=8?"00"+R:R}function ue(R){if(R.length<2||R[0]!==2)throw new Error(`Invalid signature integer tag: ${ie(R)}`);const _=R[1],A=R.subarray(2,_+2);if(!_||A.length!==_)throw new Error("Invalid signature integer: wrong length");if(A[0]===0&&A[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:he(A),left:R.subarray(_+2)}}function P(R){if(R.length<2||R[0]!=48)throw new Error(`Invalid signature tag: ${ie(R)}`);if(R[1]!==R.length-2)throw new Error("Invalid signature: incorrect length");const{data:_,left:A}=ue(R.subarray(2)),{data:x,left:z}=ue(A);if(z.length)throw new Error(`Invalid signature: left bytes after parsing: ${ie(z)}`);return{r:_,s:x}}class ${constructor(_,A){this.r=_,this.s=A,this.assertValidity()}static fromCompact(_){const A=_ instanceof Uint8Array,x="Signature.fromCompact";if(typeof _!="string"&&!A)throw new TypeError(`${x}: Expected string or Uint8Array`);const z=A?ie(_):_;if(z.length!==128)throw new Error(`${x}: Expected 64-byte hex`);return new $(_e(z.slice(0,64)),_e(z.slice(64,128)))}static fromDER(_){const A=_ instanceof Uint8Array;if(typeof _!="string"&&!A)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:x,s:z}=P(A?_:ge(_));return new $(x,z)}static fromHex(_){return this.fromDER(_)}assertValidity(){const{r:_,s:A}=this;if(!Gt(_))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Gt(A))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const _=a.n>>r;return this.s>_}normalizeS(){return this.hasHighS()?new $(this.r,se(-this.s,a.n)):this}toDERRawBytes(){return ge(this.toDERHex())}toDERHex(){const _=W(X(this.s)),A=W(X(this.r)),x=_.length/2,z=A.length/2,ee=X(x),me=X(z);return`30${X(z+x+4)}02${me}${A}02${ee}${_}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ge(this.toCompactHex())}toCompactHex(){return ce(this.r)+ce(this.s)}}e.Signature=$;function G(...R){if(!R.every(x=>x instanceof Uint8Array))throw new Error("Uint8Array list expected");if(R.length===1)return R[0];const _=R.reduce((x,z)=>x+z.length,0),A=new Uint8Array(_);for(let x=0,z=0;x<R.length;x++){const ee=R[x];A.set(ee,z),z+=ee.length}return A}const q=Array.from({length:256},(R,_)=>_.toString(16).padStart(2,"0"));function ie(R){if(!(R instanceof Uint8Array))throw new Error("Expected Uint8Array");let _="";for(let A=0;A<R.length;A++)_+=q[R[A]];return _}const fe=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function ce(R){if(typeof R!="bigint")throw new Error("Expected bigint");if(!(n<=R&&R<fe))throw new Error("Expected number 0 <= n < 2^256");return R.toString(16).padStart(64,"0")}function re(R){const _=ge(ce(R));if(_.length!==32)throw new Error("Error: expected 32 bytes");return _}function X(R){const _=R.toString(16);return _.length&1?`0${_}`:_}function _e(R){if(typeof R!="string")throw new TypeError("hexToNumber: expected string, got "+typeof R);return BigInt(`0x${R}`)}function ge(R){if(typeof R!="string")throw new TypeError("hexToBytes: expected string, got "+typeof R);if(R.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+R.length);const _=new Uint8Array(R.length/2);for(let A=0;A<_.length;A++){const x=A*2,z=R.slice(x,x+2),ee=Number.parseInt(z,16);if(Number.isNaN(ee)||ee<0)throw new Error("Invalid byte sequence");_[A]=ee}return _}function he(R){return _e(ie(R))}function Se(R){return R instanceof Uint8Array?Uint8Array.from(R):ge(R)}function Xe(R){if(typeof R=="number"&&Number.isSafeInteger(R)&&R>0)return BigInt(R);if(typeof R=="bigint"&&Gt(R))return R;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function se(R,_=a.P){const A=R%_;return A>=n?A:_+A}function He(R,_){const{P:A}=a;let x=R;for(;_-- >n;)x*=x,x%=A;return x}function vt(R){const{P:_}=a,A=BigInt(6),x=BigInt(11),z=BigInt(22),ee=BigInt(23),me=BigInt(44),be=BigInt(88),Le=R*R*R%_,Ne=Le*Le*R%_,Ve=He(Ne,o)*Ne%_,ut=He(Ve,o)*Ne%_,lt=He(ut,i)*Le%_,$t=He(lt,x)*lt%_,Ht=He($t,z)*$t%_,on=He(Ht,me)*Ht%_,ni=He(on,be)*on%_,Mr=He(ni,me)*Ht%_,ri=He(Mr,o)*Ne%_,fo=He(ri,ee)*$t%_,An=He(fo,A)*Le%_,Ni=He(An,i);if(Ni*Ni%_!==R)throw new Error("Cannot find square root");return Ni}function Et(R,_=a.P){if(R===n||_<=n)throw new Error(`invert: expected positive integers, got n=${R} mod=${_}`);let A=se(R,_),x=_,z=n,ee=r;for(;A!==n;){const be=x/A,Le=x%A,Ne=z-ee*be;x=A,A=Le,z=ee,ee=Ne}if(x!==r)throw new Error("invert: does not exist");return se(z,_)}function tn(R,_=a.P){const A=new Array(R.length),x=R.reduce((ee,me,be)=>me===n?ee:(A[be]=ee,se(ee*me,_)),r),z=Et(x,_);return R.reduceRight((ee,me,be)=>me===n?ee:(A[be]=se(ee*A[be],_),se(ee*me,_)),z),A}function nn(R){const _=R.length*8-d*8,A=he(R);return _>0?A>>BigInt(_):A}function $n(R,_=!1){const A=nn(R);if(_)return A;const{n:x}=a;return A>=x?A-x:A}let Me,ht;class gt{constructor(_,A){if(this.hashLen=_,this.qByteLen=A,typeof _!="number"||_<2)throw new Error("hashLen must be a number");if(typeof A!="number"||A<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(_).fill(1),this.k=new Uint8Array(_).fill(0),this.counter=0}hmac(..._){return e.utils.hmacSha256(this.k,..._)}hmacSync(..._){return ht(this.k,..._)}checkSync(){if(typeof ht!="function")throw new H("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(_=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),_),this.v=await this.hmac(this.v),_.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),_),this.v=await this.hmac(this.v))}reseedSync(_=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),_),this.v=this.hmacSync(this.v),_.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),_),this.v=this.hmacSync(this.v))}async generate(){this.incr();let _=0;const A=[];for(;_<this.qByteLen;){this.v=await this.hmac(this.v);const x=this.v.slice();A.push(x),_+=this.v.length}return G(...A)}generateSync(){this.checkSync(),this.incr();let _=0;const A=[];for(;_<this.qByteLen;){this.v=this.hmacSync(this.v);const x=this.v.slice();A.push(x),_+=this.v.length}return G(...A)}}function Gt(R){return n<R&&R<a.n}function nt(R){return n<R&&R<a.P}function rt(R,_,A,x=!0){const{n:z}=a,ee=$n(R,!0);if(!Gt(ee))return;const me=Et(ee,z),be=D.BASE.multiply(ee),Le=se(be.x,z);if(Le===n)return;const Ne=se(me*se(_+A*Le,z),z);if(Ne===n)return;let Ve=new $(Le,Ne),ut=(be.x===Ve.r?0:2)|Number(be.y&r);return x&&Ve.hasHighS()&&(Ve=Ve.normalizeS(),ut^=1),{sig:Ve,recovery:ut}}function Ke(R){let _;if(typeof R=="bigint")_=R;else if(typeof R=="number"&&Number.isSafeInteger(R)&&R>0)_=BigInt(R);else if(typeof R=="string"){if(R.length!==2*d)throw new Error("Expected 32 bytes of private key");_=_e(R)}else if(R instanceof Uint8Array){if(R.length!==d)throw new Error("Expected 32 bytes of private key");_=he(R)}else throw new TypeError("Expected valid private key");if(!Gt(_))throw new Error("Expected private key: 0 < key < n");return _}function gn(R){return R instanceof D?(R.assertValidity(),R):D.fromHex(R)}function xt(R){if(R instanceof $)return R.assertValidity(),R;try{return $.fromDER(R)}catch{return $.fromCompact(R)}}function ei(R,_=!1){return D.fromPrivateKey(R).toRawBytes(_)}e.getPublicKey=ei;function Ze(R,_,A,x=!1){return D.fromSignature(R,_,A).toRawBytes(x)}e.recoverPublicKey=Ze;function rn(R){const _=R instanceof Uint8Array,A=typeof R=="string",x=(_||A)&&R.length;return _?x===g||x===E:A?x===g*2||x===E*2:R instanceof D}function et(R,_,A=!1){if(rn(R))throw new TypeError("getSharedSecret: first arg must be private key");if(!rn(_))throw new TypeError("getSharedSecret: second arg must be public key");const x=gn(_);return x.assertValidity(),x.multiply(Ke(R)).toRawBytes(A)}e.getSharedSecret=et;function Lt(R){const _=R.length>h?R.slice(0,h):R;return he(_)}function at(R){const _=Lt(R),A=se(_,a.n);return Pn(A<n?_:A)}function Pn(R){return re(R)}function fs(R,_,A){if(R==null)throw new Error(`sign: expected valid message hash, not "${R}"`);const x=Se(R),z=Ke(_),ee=[Pn(z),at(x)];if(A!=null){A===!0&&(A=e.utils.randomBytes(h));const Le=Se(A);if(Le.length!==h)throw new Error(`sign: Expected ${h} bytes of extra data`);ee.push(Le)}const me=G(...ee),be=Lt(x);return{seed:me,m:be,d:z}}function hs(R,_){const{sig:A,recovery:x}=R,{der:z,recovered:ee}=Object.assign({canonical:!0,der:!0},_),me=z?A.toDERRawBytes():A.toCompactRawBytes();return ee?[me,x]:me}async function In(R,_,A={}){const{seed:x,m:z,d:ee}=fs(R,_,A.extraEntropy),me=new gt(m,d);await me.reseed(x);let be;for(;!(be=rt(await me.generate(),z,ee,A.canonical));)await me.reseed();return hs(be,A)}e.sign=In;function Mi(R,_,A={}){const{seed:x,m:z,d:ee}=fs(R,_,A.extraEntropy),me=new gt(m,d);me.reseedSync(x);let be;for(;!(be=rt(me.generateSync(),z,ee,A.canonical));)me.reseedSync();return hs(be,A)}e.signSync=Mi;const Cr={strict:!0};function co(R,_,A,x=Cr){let z;try{z=xt(R),_=Se(_)}catch{return!1}const{r:ee,s:me}=z;if(x.strict&&z.hasHighS())return!1;const be=$n(_);let Le;try{Le=gn(A)}catch{return!1}const{n:Ne}=a,Ve=Et(me,Ne),ut=se(be*Ve,Ne),lt=se(ee*Ve,Ne),$t=D.BASE.multiplyAndAddUnsafe(Le,ut,lt);return $t?se($t.x,Ne)===ee:!1}e.verify=co;function Wn(R){return se(he(R),a.n)}class Rr{constructor(_,A){this.r=_,this.s=A,this.assertValidity()}static fromHex(_){const A=Se(_);if(A.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${A.length}`);const x=he(A.subarray(0,32)),z=he(A.subarray(32,64));return new Rr(x,z)}assertValidity(){const{r:_,s:A}=this;if(!nt(_)||!Gt(A))throw new Error("Invalid signature")}toHex(){return ce(this.r)+ce(this.s)}toRawBytes(){return ge(this.toHex())}}function zn(R){return D.fromPrivateKey(R).toRawX()}class uo{constructor(_,A,x=e.utils.randomBytes()){if(_==null)throw new TypeError(`sign: Expected valid message, not "${_}"`);this.m=Se(_);const{x:z,scalar:ee}=this.getScalar(Ke(A));if(this.px=z,this.d=ee,this.rand=Se(x),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(_){const A=D.fromPrivateKey(_),x=A.hasEvenY()?_:a.n-_;return{point:A,scalar:x,x:A.toRawX()}}initNonce(_,A){return re(_^he(A))}finalizeNonce(_){const A=se(he(_),a.n);if(A===n)throw new Error("sign: Creation of signature failed. k is zero");const{point:x,x:z,scalar:ee}=this.getScalar(A);return{R:x,rx:z,k:ee}}finalizeSig(_,A,x,z){return new Rr(_.x,se(A+x*z,a.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:_,d:A,px:x,rand:z}=this,ee=e.utils.taggedHash,me=this.initNonce(A,await ee(Gn.aux,z)),{R:be,rx:Le,k:Ne}=this.finalizeNonce(await ee(Gn.nonce,me,x,_)),Ve=Wn(await ee(Gn.challenge,Le,x,_)),ut=this.finalizeSig(be,Ne,Ve,A);return await gs(ut,_,x)||this.error(),ut}calcSync(){const{m:_,d:A,px:x,rand:z}=this,ee=e.utils.taggedHashSync,me=this.initNonce(A,ee(Gn.aux,z)),{R:be,rx:Le,k:Ne}=this.finalizeNonce(ee(Gn.nonce,me,x,_)),Ve=Wn(ee(Gn.challenge,Le,x,_)),ut=this.finalizeSig(be,Ne,Ve,A);return pr(ut,_,x)||this.error(),ut}}async function ti(R,_,A){return new uo(R,_,A).calc()}function ps(R,_,A){return new uo(R,_,A).calcSync()}function ms(R,_,A){const x=R instanceof Rr,z=x?R:Rr.fromHex(R);return x&&z.assertValidity(),{...z,m:Se(_),P:gn(A)}}function lo(R,_,A,x){const z=D.BASE.multiplyAndAddUnsafe(_,Ke(A),se(-x,a.n));return!(!z||!z.hasEvenY()||z.x!==R)}async function gs(R,_,A){try{const{r:x,s:z,m:ee,P:me}=ms(R,_,A),be=Wn(await e.utils.taggedHash(Gn.challenge,re(x),me.toRawX(),ee));return lo(x,me,z,be)}catch{return!1}}function pr(R,_,A){try{const{r:x,s:z,m:ee,P:me}=ms(R,_,A),be=Wn(e.utils.taggedHashSync(Gn.challenge,re(x),me.toRawX(),ee));return lo(x,me,z,be)}catch(x){if(x instanceof H)throw x;return!1}}e.schnorr={Signature:Rr,getPublicKey:zn,sign:ti,verify:gs,signSync:ps,verifySync:pr},D.BASE._setWindowSize(8);const bt={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Gn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Qn={};e.utils={bytesToHex:ie,hexToBytes:ge,concatBytes:G,mod:se,invert:Et,isValidPrivateKey(R){try{return Ke(R),!0}catch{return!1}},_bigintTo32Bytes:re,_normalizePrivateKey:Ke,hashToPrivateKey:R=>{R=Se(R);const _=d+8;if(R.length<_||R.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const A=se(he(R),a.n-r)+r;return re(A)},randomBytes:(R=32)=>{if(bt.web)return bt.web.getRandomValues(new Uint8Array(R));if(bt.node){const{randomBytes:_}=bt.node;return Uint8Array.from(_(R))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(d+8)),precompute(R=8,_=D.BASE){const A=_===D.BASE?_:new D(_.x,_.y);return A._setWindowSize(R),A.multiply(o),A},sha256:async(...R)=>{if(bt.web){const _=await bt.web.subtle.digest("SHA-256",G(...R));return new Uint8Array(_)}else if(bt.node){const{createHash:_}=bt.node,A=_("sha256");return R.forEach(x=>A.update(x)),Uint8Array.from(A.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(R,..._)=>{if(bt.web){const A=await bt.web.subtle.importKey("raw",R,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),x=G(..._),z=await bt.web.subtle.sign("HMAC",A,x);return new Uint8Array(z)}else if(bt.node){const{createHmac:A}=bt.node,x=A("sha256",R);return _.forEach(z=>x.update(z)),Uint8Array.from(x.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(R,..._)=>{let A=Qn[R];if(A===void 0){const x=await e.utils.sha256(Uint8Array.from(R,z=>z.charCodeAt(0)));A=G(x,x),Qn[R]=A}return e.utils.sha256(A,..._)},taggedHashSync:(R,..._)=>{if(typeof Me!="function")throw new H("sha256Sync is undefined, you need to set it");let A=Qn[R];if(A===void 0){const x=Me(Uint8Array.from(R,z=>z.charCodeAt(0)));A=G(x,x),Qn[R]=A}return Me(A,..._)},_JacobianPoint:V},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Me},set(R){Me||(Me=R)}},hmacSha256Sync:{configurable:!1,get(){return ht},set(R){ht||(ht=R)}}})})(Ud);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const t=cb,n=Gi,r=Ud;var i=Ud;Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),r.utils.hmacSha256Sync=(o,...s)=>{const a=t.hmac.create(n.sha256,o);return s.forEach(c=>a.update(c)),a.digest()}})(ch);var Ye={};function Fp(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var iu={exports:{}};iu.exports;(function(e,t){var n=le&&le.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const r=n(ln),i=Po,o=r.default.bool;t.assertBool=o;const s=r.default.bytes;t.assertBytes=s;var a=Po;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return a.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return a.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return a.utf8ToBytes}});function c(m){if(!(m instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof m}`);return new TextDecoder().decode(m)}t.bytesToUtf8=c;function u(m){const g=m.startsWith("0x")?m.substring(2):m;return(0,i.hexToBytes)(g)}t.hexToBytes=u;function h(m,g){if(m.length!==g.length)return!1;for(let E=0;E<m.length;E++)if(m[E]!==g[E])return!1;return!0}t.equalsBytes=h;function d(m){return g=>(r.default.bytes(g),m(g))}t.wrapHash=d,t.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,g=typeof Fp=="function"&&Fp.bind(e);return{node:g&&!m?g("crypto"):void 0,web:m}})()})(iu,iu.exports);var Lw=iu.exports,Dw=le&&le.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Bw=le&&le.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Fw=le&&le.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Dw(t,e,n);return Bw(t,e),t};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.contextRandomize=Ye.ecdh=Ye.signatureNormalize=Ye.signatureImport=Ye.signatureExport=Ye.privateKeyTweakMul=Ye.publicKeyTweakMul=Ye.publicKeyTweakAdd=Ye.publicKeyCombine=Ye.publicKeyNegate=Ye.privateKeyNegate=Ye.privateKeyTweakAdd=Ye.ecdsaVerify=Ye.ecdsaRecover=Ye.ecdsaSign=Ye.publicKeyConvert=Ye.publicKeyVerify=Ye.publicKeyCreate=Ye.privateKeyVerify=Ye.createPrivateKey=Ye.createPrivateKeySync=void 0;const Hw=Gi,Bt=Fw(ch),Ge=Lw;function Uw(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const _i=e=>Uw((0,Ge.toHex)(e)),Ju=e=>e.toString(16).padStart(64,"0"),jd=e=>(0,Ge.hexToBytes)(Ju(e)),{mod:pb}=Bt.utils,or=Bt.CURVE.n;function Yn(e=r=>new Uint8Array(r),t,n){return typeof e=="function"&&(e=e(t)),(0,Ge.assertBytes)(e,t),n&&e.set(n),e}function Hs(e){return(0,Ge.assertBytes)(e,64),Bt.Signature.fromCompact(e)}function mb(){return Bt.utils.randomPrivateKey()}Ye.createPrivateKeySync=mb;async function jw(){return mb()}Ye.createPrivateKey=jw;function $w(e){return(0,Ge.assertBytes)(e,32),Bt.utils.isValidPrivateKey(e)}Ye.privateKeyVerify=$w;function Ww(e,t=!0,n){(0,Ge.assertBytes)(e,32),(0,Ge.assertBool)(t);const r=Bt.getPublicKey(e,t);return Yn(n,t?33:65,r)}Ye.publicKeyCreate=Ww;function zw(e){(0,Ge.assertBytes)(e,33,65);try{return Bt.Point.fromHex(e),!0}catch{return!1}}Ye.publicKeyVerify=zw;function Gw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Bt.Point.fromHex(e).toRawBytes(t);return Yn(n,t?33:65,r)}Ye.publicKeyConvert=Gw;function Vw(e,t,n={noncefn:void 0,data:void 0},r){if((0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(n&&(n.noncefn!==void 0||n.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,o]=Bt.signSync(e,t,{recovered:!0,der:!1});return{signature:Yn(r,64,i),recid:o}}Ye.ecdsaSign=Vw;function qw(e,t,n,r=!0,i){(0,Ge.assertBytes)(n,32),(0,Ge.assertBool)(r);const o=Hs(e).toHex(),s=Bt.Point.fromSignature(n,o,t);return Yn(i,r?33:65,s.toRawBytes(r))}Ye.ecdsaRecover=qw;function Yw(e,t,n){(0,Ge.assertBytes)(e,64),(0,Ge.assertBytes)(t,32),(0,Ge.assertBytes)(n,33,65),(0,Ge.assertBytes)(e,64);const r=_i(e.slice(0,32)),i=_i(e.slice(32,64));if(r>=or||i>=or)throw new Error("Cannot parse signature");const o=Bt.Point.fromHex(n);let s;try{s=Hs(e)}catch{return!1}return Bt.verify(s,t,o)}Ye.ecdsaVerify=Yw;function Xw(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);let n=_i(t);if(n===0n)throw new Error("Tweak must not be zero");if(n>=or)throw new Error("Tweak bigger than curve order");if(n+=_i(e),n>=or&&(n-=or),n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Ju(n))),e}Ye.privateKeyTweakAdd=Xw;function Kw(e){(0,Ge.assertBytes)(e,32);const t=pb(-_i(e),or);return e.set((0,Ge.hexToBytes)(Ju(t))),e}Ye.privateKeyNegate=Kw;function Jw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Bt.Point.fromHex(e).negate();return Yn(n,t?33:65,r.toRawBytes(t))}Ye.publicKeyNegate=Jw;function Zw(e,t=!0,n){if(!Array.isArray(e)||!e.length)throw new TypeError(`Expected array with one or more items, not ${e}`);for(const i of e)(0,Ge.assertBytes)(i,33,65);(0,Ge.assertBool)(t);const r=e.map(i=>Bt.Point.fromHex(i)).reduce((i,o)=>i.add(o),Bt.Point.ZERO);if(r.equals(Bt.Point.ZERO))throw new Error("Combined result must not be zero");return Yn(n,t?33:65,r.toRawBytes(t))}Ye.publicKeyCombine=Zw;function Qw(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=Bt.Point.fromHex(e),o=Bt.Point.fromPrivateKey(t),s=i.add(o);if(o.equals(Bt.Point.ZERO)||s.equals(Bt.Point.ZERO))throw new Error("Tweak must not be zero");return Yn(r,n?33:65,s.toRawBytes(n))}Ye.publicKeyTweakAdd=Qw;function e1(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=_i(t);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=or)throw new Error("Tweak is zero or bigger than curve order");const o=Bt.Point.fromHex(e).multiply(i);return Yn(r,n?33:65,o.toRawBytes(n))}Ye.publicKeyTweakMul=e1;function t1(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);const n=_i(t);if(n<=1||n>=or)throw new Error("Tweak is zero or bigger than curve order");const r=pb(n*_i(e),or);if(r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Ju(r))),e}Ye.privateKeyTweakMul=t1;function n1(e,t){const n=Hs(e).toRawBytes();return Yn(t,72,Hs(e).toRawBytes()).slice(0,n.length)}Ye.signatureExport=n1;function r1(e,t){(0,Ge.assertBytes)(e);const n=Bt.Signature.fromDER(e);return Yn(t,64,(0,Ge.hexToBytes)(n.toCompactHex()))}Ye.signatureImport=r1;function i1(e){const t=Hs(e);return t.s>or/2n&&e.set(jd(or-t.s),32),e}Ye.signatureNormalize=i1;function o1(e,t,n={},r){if((0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdh: options should be object");n.data!==void 0&&(0,Ge.assertBytes)(n.data);const i=Bt.Point.fromHex(Bt.getSharedSecret(t,e));if(n.hashfn===void 0)return Yn(r,32,(0,Hw.sha256)(i.toRawBytes(!0)));if(typeof n.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");n.xbuf!==void 0&&(0,Ge.assertBytes)(n.xbuf,32),n.ybuf!==void 0&&(0,Ge.assertBytes)(n.ybuf,32),(0,Ge.assertBytes)(r,32);const o=n.xbuf||new Uint8Array(32);o.set(jd(i.x));const s=n.ybuf||new Uint8Array(32);s.set(jd(i.y));const a=n.hashfn(o,s,n.data);if(!(a instanceof Uint8Array)||a.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return Yn(r,32,a)}Ye.ecdh=o1;function s1(e){e!==null&&(0,Ge.assertBytes)(e,32)}Ye.contextRandomize=s1;Object.defineProperty(pn,"__esModule",{value:!0});pn.createUnsafeIdentity=pn.computeAddress=pn.ethSign=pn.createEthereumMessageHash=pn.sign=pn.recoverAddressFromEthSignature=pn.recoverPublicKey=void 0;const Bn=Fu,Hp=ch,gb=Ye;function yb(e,t){if(e.length!==65)throw new Error("Invalid signature length"+e.length);const n=e.slice(0,e.length-1),r=e[64]===28?1:0;return(0,gb.ecdsaRecover)(n,r,t,!1).slice(1)}pn.recoverPublicKey=yb;function a1(e){if(e.length!==65)throw new Error("Invalid ethereum signature");const t=e[64];if(t===0||t===1){const n=new Uint8Array(e);return n[64]=t+27,n}return e}function _b(e,t){if(typeof e=="string"){if((0,Bn.isHex)(e))return _b((0,Bn.hexToBytes)(e),t);throw new Error("String signatures must be encoded in hex")}return dh(yb(a1(e),lh(t)))}pn.recoverAddressFromEthSignature=_b;function bb(e,t){const n=(0,gb.ecdsaSign)(t,e),r=n.recid===1?"1c":"1b";return(0,Bn.toHex)(n.signature)+r}pn.sign=bb;function lh(e){const t=typeof e=="string"?(0,Bn.stringToUtf8Bytes)(e):e,n=(0,Bn.concatBytes)((0,Bn.stringToUtf8Bytes)(`Ethereum Signed Message:
14
- `),(0,Bn.stringToUtf8Bytes)(String(t.length)),t);return(0,Bn.hexToBytes)((0,Bn.sha3)(n))}pn.createEthereumMessageHash=lh;function c1(e,t){return bb(e,lh(t))}pn.ethSign=c1;function dh(e){const t=e.length===65&&e[0]===4?e.slice(1):e;return(0,Bn.getAddress)((0,Bn.sha3)(t).substring(24))}pn.computeAddress=dh;function u1(){const e=Hp.utils.randomPrivateKey(),t=(0,Hp.getPublicKey)(e).slice(1),n=dh(t);return{privateKey:(0,Bn.bytesToHex)(e),publicKey:(0,Bn.bytesToHex)(t),address:n}}pn.createUnsafeIdentity=u1;(function(e){var t=le&&le.__createBinding||(Object.create?function(P,$,G,q){q===void 0&&(q=G);var ie=Object.getOwnPropertyDescriptor($,G);(!ie||("get"in ie?!$.__esModule:ie.writable||ie.configurable))&&(ie={enumerable:!0,get:function(){return $[G]}}),Object.defineProperty(P,q,ie)}:function(P,$,G,q){q===void 0&&(q=G),P[q]=$[G]}),n=le&&le.__setModuleDefault||(Object.create?function(P,$){Object.defineProperty(P,"default",{enumerable:!0,value:$})}:function(P,$){P.default=$}),r=le&&le.__importStar||function(P){if(P&&P.__esModule)return P;var $={};if(P!=null)for(var G in P)G!=="default"&&Object.prototype.hasOwnProperty.call(P,G)&&t($,P,G);return n($,P),$},i=le&&le.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const o=r(Fu),s=Hu,a=n_,c=Yu,u=i(ah),h=pn;e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;var m;(function(P){async function $(he,Se,Xe,se=Date.now()){let He="";if(!P.isValidAuthChain(Se))return{ok:!1,message:"ERROR: Malformed authChain"};for(const Et of Se){const tn=ue(Et.type);try{const{nextAuthority:nn}=await tn(He,Et,{provider:Xe,dateToValidateExpirationInMillis:se});He=nn||""}catch(nn){return{ok:!1,message:`ERROR. Link type: ${Et.type}. ${nn.message}.`}}}const vt=He===he;return{ok:vt,message:vt?void 0:`ERROR: Invalid final authority. Expected: ${he}. Current ${He}.`}}P.validateSignature=$;function G(he){for(const[Se,Xe]of he.entries())if(Se===0&&Xe.type!==a.AuthLinkType.SIGNER||Xe.type===a.AuthLinkType.SIGNER&&Se!==0)return!1;return!0}P.isValidAuthChain=G;function q(he){return(0,o.hexToBytes)((0,o.sha3)((0,o.stringToUtf8Bytes)(he)))}P.createEIP1271MessageHash=q;function ie(he,Se,Xe){return[{type:a.AuthLinkType.SIGNER,payload:Se,signature:""},{type:F(Xe),payload:he,signature:Xe}]}P.createSimpleAuthChain=ie;function fe(he,Se,Xe,se){const He=(0,c.moveMinutes)(Xe),vt=P.getEphemeralMessage(Se.address,He),Et=P.createSignature(he,vt),tn=P.createSignature(Se,se);return[{type:a.AuthLinkType.SIGNER,payload:he.address,signature:""},{type:a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:vt,signature:Et},{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:se,signature:tn}]}P.createAuthChain=fe;async function ce(he,Se,Xe,se){const He=new Date;He.setMinutes(He.getMinutes()+Xe);const vt=P.getEphemeralMessage(Se.address,He),Et=await se(vt),tn=[{type:a.AuthLinkType.SIGNER,payload:he,signature:""},{type:V(Et),payload:vt,signature:Et}];return{ephemeralIdentity:Se,expiration:He,authChain:tn}}P.initializeAuthChain=ce;function re(he,Se){const Xe=P.createSignature(he.ephemeralIdentity,Se);return[...he.authChain,{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:Se,signature:Xe}]}P.signPayload=re,P.createEthereumMessageHash=h.createEthereumMessageHash;function X(he,Se){return(0,h.ethSign)((0,o.hexToBytes)(he.privateKey),Se)}P.createSignature=X;function _e(he){return he.length>0&&he[0].type===a.AuthLinkType.SIGNER?he[0].payload:"Invalid-Owner-Address"}P.ownerAddress=_e;function ge(he,Se){return`Decentraland Login
13
+ */(function(l){(function(){var p="input is invalid type",y=typeof window=="object",w=y?window:{};w.JS_SHA3_NO_WINDOW&&(y=!1);var O=!y&&typeof self=="object";!w.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?w=le:O&&(w=self);var k=!w.JS_SHA3_NO_COMMON_JS&&l.exports,Z=!w.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ye="0123456789abcdef".split(""),ke=[4,1024,262144,67108864],xe=[0,8,16,24],yn=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Ut=[224,256,384,512],ve=[128,256],sn=["hex","buffer","arrayBuffer","array","digest"],Ot={128:168,256:136};!w.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),!Z||!w.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});for(var Ct=function(f,b,I){return function(S){return new yt(f,b,f).update(S)[I]()}},dn=function(f,b,I){return function(S,C){return new yt(f,b,C).update(S)[I]()}},kr=function(f,b,I){return function(S,C,M,N){return an["cshake"+f].update(S,C,M,N)[I]()}},mr=function(f,b,I){return function(S,C,M,N){return an["kmac"+f].update(S,C,M,N)[I]()}},fn=function(f,b,I,S){for(var C=0;C<sn.length;++C){var M=sn[C];f[M]=b(I,S,M)}return f},gr=function(f,b){var I=Ct(f,b,"hex");return I.create=function(){return new yt(f,b,f)},I.update=function(S){return I.create().update(S)},fn(I,Ct,f,b)},ii=[{name:"keccak",padding:[1,256,65536,16777216],bits:Ut,createMethod:gr},{name:"sha3",padding:[6,1536,393216,100663296],bits:Ut,createMethod:gr},{name:"shake",padding:[31,7936,2031616,520093696],bits:ve,createMethod:function(f,b){var I=dn(f,b,"hex");return I.create=function(S){return new yt(f,b,S)},I.update=function(S,C){return I.create(C).update(S)},fn(I,dn,f,b)}},{name:"cshake",padding:ke,bits:ve,createMethod:function(f,b){var I=Ot[f],S=kr(f,0,"hex");return S.create=function(C,M,N){return M||N?new yt(f,b,C).bytepad([M,N],I):an["shake"+f].create(C)},S.update=function(C,M,N,B){return S.create(M,N,B).update(C)},fn(S,kr,f,b)}},{name:"kmac",padding:ke,bits:ve,createMethod:function(f,b){var I=Ot[f],S=mr(f,0,"hex");return S.create=function(C,M,N){return new xn(f,b,M).bytepad(["KMAC",N],I).bytepad([C],I)},S.update=function(C,M,N,B){return S.create(C,N,B).update(M)},fn(S,mr,f,b)}}],an={},Pr=[],hn=0;hn<ii.length;++hn)for(var yr=ii[hn],de=yr.bits,xr=0;xr<de.length;++xr){var ho=yr.name+"_"+de[xr];if(Pr.push(ho),an[ho]=yr.createMethod(de[xr],yr.padding),yr.name!=="sha3"){var po=yr.name+de[xr];Pr.push(po),an[po]=an[ho]}}function yt(f,b,I){this.blocks=[],this.s=[],this.padding=b,this.outputBits=I,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(f<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=I>>5,this.extraBytes=(31&I)>>3;for(var S=0;S<50;++S)this.s[S]=0}function xn(f,b,I){yt.call(this,f,b,I)}yt.prototype.update=function(f){if(this.finalized)throw new Error("finalize already called");var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}for(var S,C,M=this.blocks,N=this.byteCount,B=f.length,j=this.blockCount,U=0,pe=this.s;U<B;){if(this.reset)for(this.reset=!1,M[0]=this.block,S=1;S<j+1;++S)M[S]=0;if(b)for(S=this.start;U<B&&S<N;++U)M[S>>2]|=f[U]<<xe[3&S++];else for(S=this.start;U<B&&S<N;++U)(C=f.charCodeAt(U))<128?M[S>>2]|=C<<xe[3&S++]:C<2048?(M[S>>2]|=(192|C>>6)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]):C<55296||C>=57344?(M[S>>2]|=(224|C>>12)<<xe[3&S++],M[S>>2]|=(128|C>>6&63)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]):(C=65536+((1023&C)<<10|1023&f.charCodeAt(++U)),M[S>>2]|=(240|C>>18)<<xe[3&S++],M[S>>2]|=(128|C>>12&63)<<xe[3&S++],M[S>>2]|=(128|C>>6&63)<<xe[3&S++],M[S>>2]|=(128|63&C)<<xe[3&S++]);if(this.lastByteIndex=S,S>=N){for(this.start=S-N,this.block=M[j],S=0;S<j;++S)pe[S]^=M[S];v(pe),this.reset=!0}else this.start=S}return this},yt.prototype.encode=function(f,b){var I=255&f,S=1,C=[I];for(I=255&(f>>=8);I>0;)C.unshift(I),I=255&(f>>=8),++S;return b?C.push(S):C.unshift(S),this.update(C),C.length},yt.prototype.encodeString=function(f){var b,I=typeof f;if(I!=="string"){if(I!=="object")throw new Error(p);if(f===null)throw new Error(p);if(Z&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!(Array.isArray(f)||Z&&ArrayBuffer.isView(f)))throw new Error(p);b=!0}var S=0,C=f.length;if(b)S=C;else for(var M=0;M<f.length;++M){var N=f.charCodeAt(M);N<128?S+=1:N<2048?S+=2:N<55296||N>=57344?S+=3:(N=65536+((1023&N)<<10|1023&f.charCodeAt(++M)),S+=4)}return S+=this.encode(8*S),this.update(f),S},yt.prototype.bytepad=function(f,b){for(var I=this.encode(b),S=0;S<f.length;++S)I+=this.encodeString(f[S]);var C=b-I%b,M=[];return M.length=C,this.update(M),this},yt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var f=this.blocks,b=this.lastByteIndex,I=this.blockCount,S=this.s;if(f[b>>2]|=this.padding[3&b],this.lastByteIndex===this.byteCount)for(f[0]=f[I],b=1;b<I+1;++b)f[b]=0;for(f[I-1]|=2147483648,b=0;b<I;++b)S[b]^=f[b];v(S)}},yt.prototype.toString=yt.prototype.hex=function(){this.finalize();for(var f,b=this.blockCount,I=this.s,S=this.outputBlocks,C=this.extraBytes,M=0,N=0,B="";N<S;){for(M=0;M<b&&N<S;++M,++N)f=I[M],B+=ye[f>>4&15]+ye[15&f]+ye[f>>12&15]+ye[f>>8&15]+ye[f>>20&15]+ye[f>>16&15]+ye[f>>28&15]+ye[f>>24&15];N%b==0&&(v(I),M=0)}return C&&(f=I[M],B+=ye[f>>4&15]+ye[15&f],C>1&&(B+=ye[f>>12&15]+ye[f>>8&15]),C>2&&(B+=ye[f>>20&15]+ye[f>>16&15])),B},yt.prototype.arrayBuffer=function(){this.finalize();var f,b=this.blockCount,I=this.s,S=this.outputBlocks,C=this.extraBytes,M=0,N=0,B=this.outputBits>>3;f=C?new ArrayBuffer(S+1<<2):new ArrayBuffer(B);for(var j=new Uint32Array(f);N<S;){for(M=0;M<b&&N<S;++M,++N)j[N]=I[M];N%b==0&&v(I)}return C&&(j[M]=I[M],f=f.slice(0,B)),f},yt.prototype.buffer=yt.prototype.arrayBuffer,yt.prototype.digest=yt.prototype.array=function(){this.finalize();for(var f,b,I=this.blockCount,S=this.s,C=this.outputBlocks,M=this.extraBytes,N=0,B=0,j=[];B<C;){for(N=0;N<I&&B<C;++N,++B)f=B<<2,b=S[N],j[f]=255&b,j[f+1]=b>>8&255,j[f+2]=b>>16&255,j[f+3]=b>>24&255;B%I==0&&v(S)}return M&&(f=B<<2,b=S[N],j[f]=255&b,M>1&&(j[f+1]=b>>8&255),M>2&&(j[f+2]=b>>16&255)),j},xn.prototype=new yt,xn.prototype.finalize=function(){return this.encode(this.outputBits,!0),yt.prototype.finalize.call(this)};var v=function(f){var b,I,S,C,M,N,B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct,_t,Vt,Lr,oi,si,_n,_r,cn,Xt,wt,Ia,Aa,Oa,Ca,Ra,Ma,Na,ka,Pa,xa,La,Da,Ba,Fa,Ha,Ua,ja,$a,Wa,za,Ga,Va,qa,Ya,Xa,Ka,Ja,Za,Qa,ec,tc,nc,rc,ic,oc,sc,ac;for(S=0;S<48;S+=2)C=f[0]^f[10]^f[20]^f[30]^f[40],M=f[1]^f[11]^f[21]^f[31]^f[41],N=f[2]^f[12]^f[22]^f[32]^f[42],B=f[3]^f[13]^f[23]^f[33]^f[43],j=f[4]^f[14]^f[24]^f[34]^f[44],U=f[5]^f[15]^f[25]^f[35]^f[45],pe=f[6]^f[16]^f[26]^f[36]^f[46],Pe=f[7]^f[17]^f[27]^f[37]^f[47],b=(Ue=f[8]^f[18]^f[28]^f[38]^f[48])^(N<<1|B>>>31),I=(dt=f[9]^f[19]^f[29]^f[39]^f[49])^(B<<1|N>>>31),f[0]^=b,f[1]^=I,f[10]^=b,f[11]^=I,f[20]^=b,f[21]^=I,f[30]^=b,f[31]^=I,f[40]^=b,f[41]^=I,b=C^(j<<1|U>>>31),I=M^(U<<1|j>>>31),f[2]^=b,f[3]^=I,f[12]^=b,f[13]^=I,f[22]^=b,f[23]^=I,f[32]^=b,f[33]^=I,f[42]^=b,f[43]^=I,b=N^(pe<<1|Pe>>>31),I=B^(Pe<<1|pe>>>31),f[4]^=b,f[5]^=I,f[14]^=b,f[15]^=I,f[24]^=b,f[25]^=I,f[34]^=b,f[35]^=I,f[44]^=b,f[45]^=I,b=j^(Ue<<1|dt>>>31),I=U^(dt<<1|Ue>>>31),f[6]^=b,f[7]^=I,f[16]^=b,f[17]^=I,f[26]^=b,f[27]^=I,f[36]^=b,f[37]^=I,f[46]^=b,f[47]^=I,b=pe^(C<<1|M>>>31),I=Pe^(M<<1|C>>>31),f[8]^=b,f[9]^=I,f[18]^=b,f[19]^=I,f[28]^=b,f[29]^=I,f[38]^=b,f[39]^=I,f[48]^=b,f[49]^=I,Rt=f[0],Dt=f[1],za=f[11]<<4|f[10]>>>28,Ga=f[10]<<4|f[11]>>>28,Aa=f[20]<<3|f[21]>>>29,Oa=f[21]<<3|f[20]>>>29,ic=f[31]<<9|f[30]>>>23,oc=f[30]<<9|f[31]>>>23,Ua=f[40]<<18|f[41]>>>14,ja=f[41]<<18|f[40]>>>14,ka=f[2]<<1|f[3]>>>31,Pa=f[3]<<1|f[2]>>>31,ct=f[13]<<12|f[12]>>>20,_t=f[12]<<12|f[13]>>>20,Va=f[22]<<10|f[23]>>>22,qa=f[23]<<10|f[22]>>>22,Ca=f[33]<<13|f[32]>>>19,Ra=f[32]<<13|f[33]>>>19,sc=f[42]<<2|f[43]>>>30,ac=f[43]<<2|f[42]>>>30,Za=f[5]<<30|f[4]>>>2,Qa=f[4]<<30|f[5]>>>2,xa=f[14]<<6|f[15]>>>26,La=f[15]<<6|f[14]>>>26,Vt=f[25]<<11|f[24]>>>21,Lr=f[24]<<11|f[25]>>>21,Ya=f[34]<<15|f[35]>>>17,Xa=f[35]<<15|f[34]>>>17,Ma=f[45]<<29|f[44]>>>3,Na=f[44]<<29|f[45]>>>3,cn=f[6]<<28|f[7]>>>4,Xt=f[7]<<28|f[6]>>>4,ec=f[17]<<23|f[16]>>>9,tc=f[16]<<23|f[17]>>>9,Da=f[26]<<25|f[27]>>>7,Ba=f[27]<<25|f[26]>>>7,oi=f[36]<<21|f[37]>>>11,si=f[37]<<21|f[36]>>>11,Ka=f[47]<<24|f[46]>>>8,Ja=f[46]<<24|f[47]>>>8,$a=f[8]<<27|f[9]>>>5,Wa=f[9]<<27|f[8]>>>5,wt=f[18]<<20|f[19]>>>12,Ia=f[19]<<20|f[18]>>>12,nc=f[29]<<7|f[28]>>>25,rc=f[28]<<7|f[29]>>>25,Fa=f[38]<<8|f[39]>>>24,Ha=f[39]<<8|f[38]>>>24,_n=f[48]<<14|f[49]>>>18,_r=f[49]<<14|f[48]>>>18,f[0]=Rt^~ct&Vt,f[1]=Dt^~_t&Lr,f[10]=cn^~wt&Aa,f[11]=Xt^~Ia&Oa,f[20]=ka^~xa&Da,f[21]=Pa^~La&Ba,f[30]=$a^~za&Va,f[31]=Wa^~Ga&qa,f[40]=Za^~ec&nc,f[41]=Qa^~tc&rc,f[2]=ct^~Vt&oi,f[3]=_t^~Lr&si,f[12]=wt^~Aa&Ca,f[13]=Ia^~Oa&Ra,f[22]=xa^~Da&Fa,f[23]=La^~Ba&Ha,f[32]=za^~Va&Ya,f[33]=Ga^~qa&Xa,f[42]=ec^~nc&ic,f[43]=tc^~rc&oc,f[4]=Vt^~oi&_n,f[5]=Lr^~si&_r,f[14]=Aa^~Ca&Ma,f[15]=Oa^~Ra&Na,f[24]=Da^~Fa&Ua,f[25]=Ba^~Ha&ja,f[34]=Va^~Ya&Ka,f[35]=qa^~Xa&Ja,f[44]=nc^~ic&sc,f[45]=rc^~oc&ac,f[6]=oi^~_n&Rt,f[7]=si^~_r&Dt,f[16]=Ca^~Ma&cn,f[17]=Ra^~Na&Xt,f[26]=Fa^~Ua&ka,f[27]=Ha^~ja&Pa,f[36]=Ya^~Ka&$a,f[37]=Xa^~Ja&Wa,f[46]=ic^~sc&Za,f[47]=oc^~ac&Qa,f[8]=_n^~Rt&ct,f[9]=_r^~Dt&_t,f[18]=Ma^~cn&wt,f[19]=Na^~Xt&Ia,f[28]=Ua^~ka&xa,f[29]=ja^~Pa&La,f[38]=Ka^~$a&za,f[39]=Ja^~Wa&Ga,f[48]=sc^~Za&ec,f[49]=ac^~Qa&tc,f[0]^=yn[S],f[1]^=yn[S+1]};if(k)l.exports=an;else for(hn=0;hn<Pr.length;++hn)w[Pr[hn]]=an[Pr[hn]]})()})(a);var c=a.exports,u=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,h=Math.ceil,d=Math.floor,m="[BigNumber Error] ",g=m+"Number primitive has more than 15 significant digits: ",E=1e14,T=14,L=9007199254740991,H=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],K=1e7,V=1e9;function F(l){var p=0|l;return l>0||l===p?p:p-1}function J(l){for(var p,y,w=1,O=l.length,k=l[0]+"";w<O;){for(p=l[w++]+"",y=T-p.length;y--;p="0"+p);k+=p}for(O=k.length;k.charCodeAt(--O)===48;);return k.slice(0,O+1||1)}function D(l,p){var y,w,O=l.c,k=p.c,Z=l.s,ye=p.s,ke=l.e,xe=p.e;if(!Z||!ye)return null;if(y=O&&!O[0],w=k&&!k[0],y||w)return y?w?0:-ye:Z;if(Z!=ye)return Z;if(y=Z<0,w=ke==xe,!O||!k)return w?0:!O^y?1:-1;if(!w)return ke>xe^y?1:-1;for(ye=(ke=O.length)<(xe=k.length)?ke:xe,Z=0;Z<ye;Z++)if(O[Z]!=k[Z])return O[Z]>k[Z]^y?1:-1;return ke==xe?0:ke>xe^y?1:-1}function W(l,p,y,w){if(l<p||l>y||l!==d(l))throw Error(m+(w||"Argument")+(typeof l=="number"?l<p||l>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(l))}function ue(l){var p=l.c.length-1;return F(l.e/T)==p&&l.c[p]%2!=0}function P(l,p){return(l.length>1?l.charAt(0)+"."+l.slice(1):l)+(p<0?"e":"e+")+p}function $(l,p,y){var w,O;if(p<0){for(O=y+".";++p;O+=y);l=O+l}else if(++p>(w=l.length)){for(O=y,p-=w;--p;O+=y);l+=O}else p<w&&(l=l.slice(0,p)+"."+l.slice(p));return l}var G=function l(p){var y,w,O,k,Z,ye,ke,xe,yn,Ut,ve=de.prototype={constructor:de,toString:null,valueOf:null},sn=new de(1),Ot=20,Ct=4,dn=-7,kr=21,mr=-1e7,fn=1e7,gr=!1,ii=1,an=0,Pr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},hn="0123456789abcdefghijklmnopqrstuvwxyz",yr=!0;function de(v,f){var b,I,S,C,M,N,B,j,U=this;if(!(U instanceof de))return new de(v,f);if(f==null){if(v&&v._isBigNumber===!0)return U.s=v.s,void(!v.c||v.e>fn?U.c=U.e=null:v.e<mr?U.c=[U.e=0]:(U.e=v.e,U.c=v.c.slice()));if((N=typeof v=="number")&&0*v==0){if(U.s=1/v<0?(v=-v,-1):1,v===~~v){for(C=0,M=v;M>=10;M/=10,C++);return void(C>fn?U.c=U.e=null:(U.e=C,U.c=[v]))}j=String(v)}else{if(!u.test(j=String(v)))return O(U,j,N);U.s=j.charCodeAt(0)==45?(j=j.slice(1),-1):1}(C=j.indexOf("."))>-1&&(j=j.replace(".","")),(M=j.search(/e/i))>0?(C<0&&(C=M),C+=+j.slice(M+1),j=j.substring(0,M)):C<0&&(C=j.length)}else{if(W(f,2,hn.length,"Base"),f==10&&yr)return yt(U=new de(v),Ot+U.e+1,Ct);if(j=String(v),N=typeof v=="number"){if(0*v!=0)return O(U,j,N,f);if(U.s=1/v<0?(j=j.slice(1),-1):1,de.DEBUG&&j.replace(/^0\.0*|\./,"").length>15)throw Error(g+v)}else U.s=j.charCodeAt(0)===45?(j=j.slice(1),-1):1;for(b=hn.slice(0,f),C=M=0,B=j.length;M<B;M++)if(b.indexOf(I=j.charAt(M))<0){if(I=="."){if(M>C){C=B;continue}}else if(!S&&(j==j.toUpperCase()&&(j=j.toLowerCase())||j==j.toLowerCase()&&(j=j.toUpperCase()))){S=!0,M=-1,C=0;continue}return O(U,String(v),N,f)}N=!1,(C=(j=w(j,f,10,U.s)).indexOf("."))>-1?j=j.replace(".",""):C=j.length}for(M=0;j.charCodeAt(M)===48;M++);for(B=j.length;j.charCodeAt(--B)===48;);if(j=j.slice(M,++B)){if(B-=M,N&&de.DEBUG&&B>15&&(v>L||v!==d(v)))throw Error(g+U.s*v);if((C=C-M-1)>fn)U.c=U.e=null;else if(C<mr)U.c=[U.e=0];else{if(U.e=C,U.c=[],M=(C+1)%T,C<0&&(M+=T),M<B){for(M&&U.c.push(+j.slice(0,M)),B-=T;M<B;)U.c.push(+j.slice(M,M+=T));M=T-(j=j.slice(M)).length}else M-=B;for(;M--;j+="0");U.c.push(+j)}}else U.c=[U.e=0]}function xr(v,f,b,I){var S,C,M,N,B;if(b==null?b=Ct:W(b,0,8),!v.c)return v.toString();if(S=v.c[0],M=v.e,f==null)B=J(v.c),B=I==1||I==2&&(M<=dn||M>=kr)?P(B,M):$(B,M,"0");else if(C=(v=yt(new de(v),f,b)).e,N=(B=J(v.c)).length,I==1||I==2&&(f<=C||C<=dn)){for(;N<f;B+="0",N++);B=P(B,C)}else if(f-=M,B=$(B,C,"0"),C+1>N){if(--f>0)for(B+=".";f--;B+="0");}else if((f+=C-N)>0)for(C+1==N&&(B+=".");f--;B+="0");return v.s<0&&S?"-"+B:B}function ho(v,f){for(var b,I=1,S=new de(v[0]);I<v.length;I++){if(!(b=new de(v[I])).s){S=b;break}f.call(S,b)&&(S=b)}return S}function po(v,f,b){for(var I=1,S=f.length;!f[--S];f.pop());for(S=f[0];S>=10;S/=10,I++);return(b=I+b*T-1)>fn?v.c=v.e=null:b<mr?v.c=[v.e=0]:(v.e=b,v.c=f),v}function yt(v,f,b,I){var S,C,M,N,B,j,U,pe=v.c,Pe=H;if(pe){e:{for(S=1,N=pe[0];N>=10;N/=10,S++);if((C=f-S)<0)C+=T,M=f,U=(B=pe[j=0])/Pe[S-M-1]%10|0;else if((j=h((C+1)/T))>=pe.length){if(!I)break e;for(;pe.length<=j;pe.push(0));B=U=0,S=1,M=(C%=T)-T+1}else{for(B=N=pe[j],S=1;N>=10;N/=10,S++);U=(M=(C%=T)-T+S)<0?0:B/Pe[S-M-1]%10|0}if(I=I||f<0||pe[j+1]!=null||(M<0?B:B%Pe[S-M-1]),I=b<4?(U||I)&&(b==0||b==(v.s<0?3:2)):U>5||U==5&&(b==4||I||b==6&&(C>0?M>0?B/Pe[S-M]:0:pe[j-1])%10&1||b==(v.s<0?8:7)),f<1||!pe[0])return pe.length=0,I?(f-=v.e+1,pe[0]=Pe[(T-f%T)%T],v.e=-f||0):pe[0]=v.e=0,v;if(C==0?(pe.length=j,N=1,j--):(pe.length=j+1,N=Pe[T-C],pe[j]=M>0?d(B/Pe[S-M]%Pe[M])*N:0),I)for(;;){if(j==0){for(C=1,M=pe[0];M>=10;M/=10,C++);for(M=pe[0]+=N,N=1;M>=10;M/=10,N++);C!=N&&(v.e++,pe[0]==E&&(pe[0]=1));break}if(pe[j]+=N,pe[j]!=E)break;pe[j--]=0,N=1}for(C=pe.length;pe[--C]===0;pe.pop());}v.e>fn?v.c=v.e=null:v.e<mr&&(v.c=[v.e=0])}return v}function xn(v){var f,b=v.e;return b===null?v.toString():(f=J(v.c),f=b<=dn||b>=kr?P(f,b):$(f,b,"0"),v.s<0?"-"+f:f)}return de.clone=l,de.ROUND_UP=0,de.ROUND_DOWN=1,de.ROUND_CEIL=2,de.ROUND_FLOOR=3,de.ROUND_HALF_UP=4,de.ROUND_HALF_DOWN=5,de.ROUND_HALF_EVEN=6,de.ROUND_HALF_CEIL=7,de.ROUND_HALF_FLOOR=8,de.EUCLID=9,de.config=de.set=function(v){var f,b;if(v!=null){if(typeof v!="object")throw Error(m+"Object expected: "+v);if(v.hasOwnProperty(f="DECIMAL_PLACES")&&(W(b=v[f],0,V,f),Ot=b),v.hasOwnProperty(f="ROUNDING_MODE")&&(W(b=v[f],0,8,f),Ct=b),v.hasOwnProperty(f="EXPONENTIAL_AT")&&((b=v[f])&&b.pop?(W(b[0],-V,0,f),W(b[1],0,V,f),dn=b[0],kr=b[1]):(W(b,-V,V,f),dn=-(kr=b<0?-b:b))),v.hasOwnProperty(f="RANGE"))if((b=v[f])&&b.pop)W(b[0],-V,-1,f),W(b[1],1,V,f),mr=b[0],fn=b[1];else{if(W(b,-V,V,f),!b)throw Error(m+f+" cannot be zero: "+b);mr=-(fn=b<0?-b:b)}if(v.hasOwnProperty(f="CRYPTO")){if((b=v[f])!==!!b)throw Error(m+f+" not true or false: "+b);if(b){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw gr=!b,Error(m+"crypto unavailable");gr=b}else gr=b}if(v.hasOwnProperty(f="MODULO_MODE")&&(W(b=v[f],0,9,f),ii=b),v.hasOwnProperty(f="POW_PRECISION")&&(W(b=v[f],0,V,f),an=b),v.hasOwnProperty(f="FORMAT")){if(typeof(b=v[f])!="object")throw Error(m+f+" not an object: "+b);Pr=b}if(v.hasOwnProperty(f="ALPHABET")){if(typeof(b=v[f])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(b))throw Error(m+f+" invalid: "+b);yr=b.slice(0,10)=="0123456789",hn=b}}return{DECIMAL_PLACES:Ot,ROUNDING_MODE:Ct,EXPONENTIAL_AT:[dn,kr],RANGE:[mr,fn],CRYPTO:gr,MODULO_MODE:ii,POW_PRECISION:an,FORMAT:Pr,ALPHABET:hn}},de.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!de.DEBUG)return!0;var f,b,I=v.c,S=v.e,C=v.s;e:if({}.toString.call(I)=="[object Array]"){if((C===1||C===-1)&&S>=-V&&S<=V&&S===d(S)){if(I[0]===0){if(S===0&&I.length===1)return!0;break e}if((f=(S+1)%T)<1&&(f+=T),String(I[0]).length==f){for(f=0;f<I.length;f++)if((b=I[f])<0||b>=E||b!==d(b))break e;if(b!==0)return!0}}}else if(I===null&&S===null&&(C===null||C===1||C===-1))return!0;throw Error(m+"Invalid BigNumber: "+v)},de.maximum=de.max=function(){return ho(arguments,ve.lt)},de.minimum=de.min=function(){return ho(arguments,ve.gt)},de.random=(k=9007199254740992,Z=Math.random()*k&2097151?function(){return d(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var f,b,I,S,C,M=0,N=[],B=new de(sn);if(v==null?v=Ot:W(v,0,V),S=h(v/T),gr)if(crypto.getRandomValues){for(f=crypto.getRandomValues(new Uint32Array(S*=2));M<S;)(C=131072*f[M]+(f[M+1]>>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),f[M]=b[0],f[M+1]=b[1]):(N.push(C%1e14),M+=2);M=S/2}else{if(!crypto.randomBytes)throw gr=!1,Error(m+"crypto unavailable");for(f=crypto.randomBytes(S*=7);M<S;)(C=281474976710656*(31&f[M])+1099511627776*f[M+1]+4294967296*f[M+2]+16777216*f[M+3]+(f[M+4]<<16)+(f[M+5]<<8)+f[M+6])>=9e15?crypto.randomBytes(7).copy(f,M):(N.push(C%1e14),M+=7);M=S/7}if(!gr)for(;M<S;)(C=Z())<9e15&&(N[M++]=C%1e14);for(S=N[--M],v%=T,S&&v&&(C=H[T-v],N[M]=d(S/C)*C);N[M]===0;N.pop(),M--);if(M<0)N=[I=0];else{for(I=-1;N[0]===0;N.splice(0,1),I-=T);for(M=1,C=N[0];C>=10;C/=10,M++);M<T&&(I-=T-M)}return B.e=I,B.c=N,B}),de.sum=function(){for(var v=1,f=arguments,b=new de(f[0]);v<f.length;)b=b.plus(f[v++]);return b},w=function(){var v="0123456789";function f(b,I,S,C){for(var M,N,B=[0],j=0,U=b.length;j<U;){for(N=B.length;N--;B[N]*=I);for(B[0]+=C.indexOf(b.charAt(j++)),M=0;M<B.length;M++)B[M]>S-1&&(B[M+1]==null&&(B[M+1]=0),B[M+1]+=B[M]/S|0,B[M]%=S)}return B.reverse()}return function(b,I,S,C,M){var N,B,j,U,pe,Pe,Ue,dt,Rt=b.indexOf("."),Dt=Ot,ct=Ct;for(Rt>=0&&(U=an,an=0,b=b.replace(".",""),Pe=(dt=new de(I)).pow(b.length-Rt),an=U,dt.c=f($(J(Pe.c),Pe.e,"0"),10,S,v),dt.e=dt.c.length),j=U=(Ue=f(b,I,S,M?(N=hn,v):(N=v,hn))).length;Ue[--U]==0;Ue.pop());if(!Ue[0])return N.charAt(0);if(Rt<0?--j:(Pe.c=Ue,Pe.e=j,Pe.s=C,Ue=(Pe=y(Pe,dt,Dt,ct,S)).c,pe=Pe.r,j=Pe.e),Rt=Ue[B=j+Dt+1],U=S/2,pe=pe||B<0||Ue[B+1]!=null,pe=ct<4?(Rt!=null||pe)&&(ct==0||ct==(Pe.s<0?3:2)):Rt>U||Rt==U&&(ct==4||pe||ct==6&&1&Ue[B-1]||ct==(Pe.s<0?8:7)),B<1||!Ue[0])b=pe?$(N.charAt(1),-Dt,N.charAt(0)):N.charAt(0);else{if(Ue.length=B,pe)for(--S;++Ue[--B]>S;)Ue[B]=0,B||(++j,Ue=[1].concat(Ue));for(U=Ue.length;!Ue[--U];);for(Rt=0,b="";Rt<=U;b+=N.charAt(Ue[Rt++]));b=$(b,j,N.charAt(0))}return b}}(),y=function(){function v(I,S,C){var M,N,B,j,U=0,pe=I.length,Pe=S%K,Ue=S/K|0;for(I=I.slice();pe--;)U=((N=Pe*(B=I[pe]%K)+(M=Ue*B+(j=I[pe]/K|0)*Pe)%K*K+U)/C|0)+(M/K|0)+Ue*j,I[pe]=N%C;return U&&(I=[U].concat(I)),I}function f(I,S,C,M){var N,B;if(C!=M)B=C>M?1:-1;else for(N=B=0;N<C;N++)if(I[N]!=S[N]){B=I[N]>S[N]?1:-1;break}return B}function b(I,S,C,M){for(var N=0;C--;)I[C]-=N,N=I[C]<S[C]?1:0,I[C]=N*M+I[C]-S[C];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,S,C,M,N){var B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct,_t,Vt,Lr,oi,si,_n,_r,cn=I.s==S.s?1:-1,Xt=I.c,wt=S.c;if(!(Xt&&Xt[0]&&wt&&wt[0]))return new de(I.s&&S.s&&(Xt?!wt||Xt[0]!=wt[0]:wt)?Xt&&Xt[0]==0||!wt?0*cn:cn/0:NaN);for(Dt=(Rt=new de(cn)).c=[],cn=C+(j=I.e-S.e)+1,N||(N=E,j=F(I.e/T)-F(S.e/T),cn=cn/T|0),U=0;wt[U]==(Xt[U]||0);U++);if(wt[U]>(Xt[U]||0)&&j--,cn<0)Dt.push(1),pe=!0;else{for(oi=Xt.length,_n=wt.length,U=0,cn+=2,(Pe=d(N/(wt[0]+1)))>1&&(wt=v(wt,Pe,N),Xt=v(Xt,Pe,N),_n=wt.length,oi=Xt.length),Lr=_n,_t=(ct=Xt.slice(0,_n)).length;_t<_n;ct[_t++]=0);_r=wt.slice(),_r=[0].concat(_r),si=wt[0],wt[1]>=N/2&&si++;do{if(Pe=0,(B=f(wt,ct,_n,_t))<0){if(Vt=ct[0],_n!=_t&&(Vt=Vt*N+(ct[1]||0)),(Pe=d(Vt/si))>1)for(Pe>=N&&(Pe=N-1),dt=(Ue=v(wt,Pe,N)).length,_t=ct.length;f(Ue,ct,dt,_t)==1;)Pe--,b(Ue,_n<dt?_r:wt,dt,N),dt=Ue.length,B=1;else Pe==0&&(B=Pe=1),dt=(Ue=wt.slice()).length;if(dt<_t&&(Ue=[0].concat(Ue)),b(ct,Ue,_t,N),_t=ct.length,B==-1)for(;f(wt,ct,_n,_t)<1;)Pe++,b(ct,_n<_t?_r:wt,_t,N),_t=ct.length}else B===0&&(Pe++,ct=[0]);Dt[U++]=Pe,ct[0]?ct[_t++]=Xt[Lr]||0:(ct=[Xt[Lr]],_t=1)}while((Lr++<oi||ct[0]!=null)&&cn--);pe=ct[0]!=null,Dt[0]||Dt.splice(0,1)}if(N==E){for(U=1,cn=Dt[0];cn>=10;cn/=10,U++);yt(Rt,C+(Rt.e=U+j*T-1)+1,M,pe)}else Rt.e=j,Rt.r=+pe;return Rt}}(),ye=/^(-?)0([xbo])(?=\w[\w.]*$)/i,ke=/^([^.]+)\.$/,xe=/^\.([^.]+)$/,yn=/^-?(Infinity|NaN)$/,Ut=/^\s*\+(?=[\w.])|^\s+|\s+$/g,O=function(v,f,b,I){var S,C=b?f:f.replace(Ut,"");if(yn.test(C))v.s=isNaN(C)?null:C<0?-1:1;else{if(!b&&(C=C.replace(ye,function(M,N,B){return S=(B=B.toLowerCase())=="x"?16:B=="b"?2:8,I&&I!=S?M:N}),I&&(S=I,C=C.replace(ke,"$1").replace(xe,"0.$1")),f!=C))return new de(C,S);if(de.DEBUG)throw Error(m+"Not a"+(I?" base "+I:"")+" number: "+f);v.s=null}v.c=v.e=null},ve.absoluteValue=ve.abs=function(){var v=new de(this);return v.s<0&&(v.s=1),v},ve.comparedTo=function(v,f){return D(this,new de(v,f))},ve.decimalPlaces=ve.dp=function(v,f){var b,I,S,C=this;if(v!=null)return W(v,0,V),f==null?f=Ct:W(f,0,8),yt(new de(C),v+C.e+1,f);if(!(b=C.c))return null;if(I=((S=b.length-1)-F(this.e/T))*T,S=b[S])for(;S%10==0;S/=10,I--);return I<0&&(I=0),I},ve.dividedBy=ve.div=function(v,f){return y(this,new de(v,f),Ot,Ct)},ve.dividedToIntegerBy=ve.idiv=function(v,f){return y(this,new de(v,f),0,1)},ve.exponentiatedBy=ve.pow=function(v,f){var b,I,S,C,M,N,B,j,U=this;if((v=new de(v)).c&&!v.isInteger())throw Error(m+"Exponent not an integer: "+xn(v));if(f!=null&&(f=new de(f)),M=v.e>14,!U.c||!U.c[0]||U.c[0]==1&&!U.e&&U.c.length==1||!v.c||!v.c[0])return j=new de(Math.pow(+xn(U),M?v.s*(2-ue(v)):+xn(v))),f?j.mod(f):j;if(N=v.s<0,f){if(f.c?!f.c[0]:!f.s)return new de(NaN);(I=!N&&U.isInteger()&&f.isInteger())&&(U=U.mod(f))}else{if(v.e>9&&(U.e>0||U.e<-1||(U.e==0?U.c[0]>1||M&&U.c[1]>=24e7:U.c[0]<8e13||M&&U.c[0]<=9999975e7)))return C=U.s<0&&ue(v)?-0:0,U.e>-1&&(C=1/C),new de(N?1/C:C);an&&(C=h(an/T+2))}for(M?(b=new de(.5),N&&(v.s=1),B=ue(v)):B=(S=Math.abs(+xn(v)))%2,j=new de(sn);;){if(B){if(!(j=j.times(U)).c)break;C?j.c.length>C&&(j.c.length=C):I&&(j=j.mod(f))}if(S){if((S=d(S/2))===0)break;B=S%2}else if(yt(v=v.times(b),v.e+1,1),v.e>14)B=ue(v);else{if((S=+xn(v))==0)break;B=S%2}U=U.times(U),C?U.c&&U.c.length>C&&(U.c.length=C):I&&(U=U.mod(f))}return I?j:(N&&(j=sn.div(j)),f?j.mod(f):C?yt(j,an,Ct,void 0):j)},ve.integerValue=function(v){var f=new de(this);return v==null?v=Ct:W(v,0,8),yt(f,f.e+1,v)},ve.isEqualTo=ve.eq=function(v,f){return D(this,new de(v,f))===0},ve.isFinite=function(){return!!this.c},ve.isGreaterThan=ve.gt=function(v,f){return D(this,new de(v,f))>0},ve.isGreaterThanOrEqualTo=ve.gte=function(v,f){return(f=D(this,new de(v,f)))===1||f===0},ve.isInteger=function(){return!!this.c&&F(this.e/T)>this.c.length-2},ve.isLessThan=ve.lt=function(v,f){return D(this,new de(v,f))<0},ve.isLessThanOrEqualTo=ve.lte=function(v,f){return(f=D(this,new de(v,f)))===-1||f===0},ve.isNaN=function(){return!this.s},ve.isNegative=function(){return this.s<0},ve.isPositive=function(){return this.s>0},ve.isZero=function(){return!!this.c&&this.c[0]==0},ve.minus=function(v,f){var b,I,S,C,M=this,N=M.s;if(f=(v=new de(v,f)).s,!N||!f)return new de(NaN);if(N!=f)return v.s=-f,M.plus(v);var B=M.e/T,j=v.e/T,U=M.c,pe=v.c;if(!B||!j){if(!U||!pe)return U?(v.s=-f,v):new de(pe?M:NaN);if(!U[0]||!pe[0])return pe[0]?(v.s=-f,v):new de(U[0]?M:Ct==3?-0:0)}if(B=F(B),j=F(j),U=U.slice(),N=B-j){for((C=N<0)?(N=-N,S=U):(j=B,S=pe),S.reverse(),f=N;f--;S.push(0));S.reverse()}else for(I=(C=(N=U.length)<(f=pe.length))?N:f,N=f=0;f<I;f++)if(U[f]!=pe[f]){C=U[f]<pe[f];break}if(C&&(S=U,U=pe,pe=S,v.s=-v.s),(f=(I=pe.length)-(b=U.length))>0)for(;f--;U[b++]=0);for(f=E-1;I>N;){if(U[--I]<pe[I]){for(b=I;b&&!U[--b];U[b]=f);--U[b],U[I]+=E}U[I]-=pe[I]}for(;U[0]==0;U.splice(0,1),--j);return U[0]?po(v,U,j):(v.s=Ct==3?-1:1,v.c=[v.e=0],v)},ve.modulo=ve.mod=function(v,f){var b,I,S=this;return v=new de(v,f),!S.c||!v.s||v.c&&!v.c[0]?new de(NaN):!v.c||S.c&&!S.c[0]?new de(S):(ii==9?(I=v.s,v.s=1,b=y(S,v,0,3),v.s=I,b.s*=I):b=y(S,v,0,ii),(v=S.minus(b.times(v))).c[0]||ii!=1||(v.s=S.s),v)},ve.multipliedBy=ve.times=function(v,f){var b,I,S,C,M,N,B,j,U,pe,Pe,Ue,dt,Rt,Dt,ct=this,_t=ct.c,Vt=(v=new de(v,f)).c;if(!(_t&&Vt&&_t[0]&&Vt[0]))return!ct.s||!v.s||_t&&!_t[0]&&!Vt||Vt&&!Vt[0]&&!_t?v.c=v.e=v.s=null:(v.s*=ct.s,_t&&Vt?(v.c=[0],v.e=0):v.c=v.e=null),v;for(I=F(ct.e/T)+F(v.e/T),v.s*=ct.s,(B=_t.length)<(pe=Vt.length)&&(dt=_t,_t=Vt,Vt=dt,S=B,B=pe,pe=S),S=B+pe,dt=[];S--;dt.push(0));for(Rt=E,Dt=K,S=pe;--S>=0;){for(b=0,Pe=Vt[S]%Dt,Ue=Vt[S]/Dt|0,C=S+(M=B);C>S;)b=((j=Pe*(j=_t[--M]%Dt)+(N=Ue*j+(U=_t[M]/Dt|0)*Pe)%Dt*Dt+dt[C]+b)/Rt|0)+(N/Dt|0)+Ue*U,dt[C--]=j%Rt;dt[C]=b}return b?++I:dt.splice(0,1),po(v,dt,I)},ve.negated=function(){var v=new de(this);return v.s=-v.s||null,v},ve.plus=function(v,f){var b,I=this,S=I.s;if(f=(v=new de(v,f)).s,!S||!f)return new de(NaN);if(S!=f)return v.s=-f,I.minus(v);var C=I.e/T,M=v.e/T,N=I.c,B=v.c;if(!C||!M){if(!N||!B)return new de(S/0);if(!N[0]||!B[0])return B[0]?v:new de(N[0]?I:0*S)}if(C=F(C),M=F(M),N=N.slice(),S=C-M){for(S>0?(M=C,b=B):(S=-S,b=N),b.reverse();S--;b.push(0));b.reverse()}for((S=N.length)-(f=B.length)<0&&(b=B,B=N,N=b,f=S),S=0;f;)S=(N[--f]=N[f]+B[f]+S)/E|0,N[f]=E===N[f]?0:N[f]%E;return S&&(N=[S].concat(N),++M),po(v,N,M)},ve.precision=ve.sd=function(v,f){var b,I,S,C=this;if(v!=null&&v!==!!v)return W(v,1,V),f==null?f=Ct:W(f,0,8),yt(new de(C),v,f);if(!(b=C.c))return null;if(I=(S=b.length-1)*T+1,S=b[S]){for(;S%10==0;S/=10,I--);for(S=b[0];S>=10;S/=10,I++);}return v&&C.e+1>I&&(I=C.e+1),I},ve.shiftedBy=function(v){return W(v,-9007199254740991,L),this.times("1e"+v)},ve.squareRoot=ve.sqrt=function(){var v,f,b,I,S,C=this,M=C.c,N=C.s,B=C.e,j=Ot+4,U=new de("0.5");if(N!==1||!M||!M[0])return new de(!N||N<0&&(!M||M[0])?NaN:M?C:1/0);if((N=Math.sqrt(+xn(C)))==0||N==1/0?(((f=J(M)).length+B)%2==0&&(f+="0"),N=Math.sqrt(+f),B=F((B+1)/2)-(B<0||B%2),b=new de(f=N==1/0?"5e"+B:(f=N.toExponential()).slice(0,f.indexOf("e")+1)+B)):b=new de(N+""),b.c[0]){for((N=(B=b.e)+j)<3&&(N=0);;)if(S=b,b=U.times(S.plus(y(C,S,j,1))),J(S.c).slice(0,N)===(f=J(b.c)).slice(0,N)){if(b.e<B&&--N,(f=f.slice(N-3,N+1))!="9999"&&(I||f!="4999")){+f&&(+f.slice(1)||f.charAt(0)!="5")||(yt(b,b.e+Ot+2,1),v=!b.times(b).eq(C));break}if(!I&&(yt(S,S.e+Ot+2,0),S.times(S).eq(C))){b=S;break}j+=4,N+=4,I=1}}return yt(b,b.e+Ot+1,Ct,v)},ve.toExponential=function(v,f){return v!=null&&(W(v,0,V),v++),xr(this,v,f,1)},ve.toFixed=function(v,f){return v!=null&&(W(v,0,V),v=v+this.e+1),xr(this,v,f)},ve.toFormat=function(v,f,b){var I,S=this;if(b==null)v!=null&&f&&typeof f=="object"?(b=f,f=null):v&&typeof v=="object"?(b=v,v=f=null):b=Pr;else if(typeof b!="object")throw Error(m+"Argument not an object: "+b);if(I=S.toFixed(v,f),S.c){var C,M=I.split("."),N=+b.groupSize,B=+b.secondaryGroupSize,j=b.groupSeparator||"",U=M[0],pe=M[1],Pe=S.s<0,Ue=Pe?U.slice(1):U,dt=Ue.length;if(B&&(C=N,N=B,B=C,dt-=C),N>0&&dt>0){for(C=dt%N||N,U=Ue.substr(0,C);C<dt;C+=N)U+=j+Ue.substr(C,N);B>0&&(U+=j+Ue.slice(C)),Pe&&(U="-"+U)}I=pe?U+(b.decimalSeparator||"")+((B=+b.fractionGroupSize)?pe.replace(new RegExp("\\d{"+B+"}\\B","g"),"$&"+(b.fractionGroupSeparator||"")):pe):U}return(b.prefix||"")+I+(b.suffix||"")},ve.toFraction=function(v){var f,b,I,S,C,M,N,B,j,U,pe,Pe,Ue=this,dt=Ue.c;if(v!=null&&(!(N=new de(v)).isInteger()&&(N.c||N.s!==1)||N.lt(sn)))throw Error(m+"Argument "+(N.isInteger()?"out of range: ":"not an integer: ")+xn(N));if(!dt)return new de(Ue);for(f=new de(sn),j=b=new de(sn),I=B=new de(sn),Pe=J(dt),C=f.e=Pe.length-Ue.e-1,f.c[0]=H[(M=C%T)<0?T+M:M],v=!v||N.comparedTo(f)>0?C>0?f:j:N,M=fn,fn=1/0,N=new de(Pe),B.c[0]=0;U=y(N,f,0,1),(S=b.plus(U.times(I))).comparedTo(v)!=1;)b=I,I=S,j=B.plus(U.times(S=j)),B=S,f=N.minus(U.times(S=f)),N=S;return S=y(v.minus(b),I,0,1),B=B.plus(S.times(j)),b=b.plus(S.times(I)),B.s=j.s=Ue.s,pe=y(j,I,C*=2,Ct).minus(Ue).abs().comparedTo(y(B,b,C,Ct).minus(Ue).abs())<1?[j,I]:[B,b],fn=M,pe},ve.toNumber=function(){return+xn(this)},ve.toPrecision=function(v,f){return v!=null&&W(v,1,V),xr(this,v,f,2)},ve.toString=function(v){var f,b=this,I=b.s,S=b.e;return S===null?I?(f="Infinity",I<0&&(f="-"+f)):f="NaN":(v==null?f=S<=dn||S>=kr?P(J(b.c),S):$(J(b.c),S,"0"):v===10&&yr?f=$(J((b=yt(new de(b),Ot+S+1,Ct)).c),b.e,"0"):(W(v,2,hn.length,"Base"),f=w($(J(b.c),S,"0"),10,v,I,!0)),I<0&&b.c[0]&&(f="-"+f)),f},ve.valueOf=ve.toJSON=function(){return xn(this)},ve._isBigNumber=!0,ve[Symbol.toStringTag]="BigNumber",ve[Symbol.for("nodejs.util.inspect.custom")]=ve.valueOf,p!=null&&de.set(p),de}();const q={ROUNDING_MODE:G.ROUND_DOWN};function ie(l){return new TextEncoder().encode(l)}function fe(l){return typeof l=="string"?fe(_e(l)):new TextDecoder().decode(l)}G.config(q);const ce="UNKNOWN_ERROR",re="INVALID_ARGUMENT";function X(l,p=ce,y={}){const w=[];Object.keys(y).forEach(Z=>{try{w.push(Z+"="+JSON.stringify(y[Z]))}catch{w.push(Z+"="+JSON.stringify(y[Z].toString()))}});const O=l;w.length&&(l+=" ("+w.join(", ")+")");const k=new Error(l);return k.reason=O,k.code=p,Object.keys(y).forEach(function(Z){k[Z]=y[Z]}),k}function _e(l){if(typeof l!="string")throw new Error("hexToBytes only accept strings, got: "+typeof l);if(l.substr(0,2)==="0x")return _e(l.substr(2));const p=new Uint8Array(Math.ceil(l.length/2));let y=0;for(let w=0;w<l.length;w+=2){const O=parseInt(l.substr(w,2),16);if(isNaN(O))throw new Error("Cannot read hex string:"+JSON.stringify(l));p[y]=O,y++}return p}function ge(l){return Array.from(l).map(p=>p.toString(16).padStart(2,"0")).join("")}function he(l,p){if(typeof l=="string"){if(p&&p.encoding==="hex"&&typeof l=="string"){let y=l;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const w=_e(y);return c.keccak256(w)}return c.keccak256(ie(l))}return c.keccak256(l)}const Se={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Xe(l,p,y){return new Array(p-l.length+1).join(y||"0")+l}function se(l){let p="",y=0;const w=l.length;for(l.substring(0,2)==="0x"&&(y=2);y<w;y+=2){const O=parseInt(l.substr(y,2),16);p+=String.fromCharCode(O)}return p}function He(l){return Wn(l)&&l.name&&l.name.indexOf("(")!==-1?l.name:l.name+"("+Et(!1,l.inputs||[]).join(",")+")"}function vt(...l){const p=l.reduce((O,k)=>O+k.length,0),y=new Uint8Array(p);let w=0;for(const O of l)y.set(O,w),w+=O.length;return y}function Et(l,p){const y=[];return p.forEach(function(w){if(typeof w.components=="object"){if(w.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let O="";const k=w.type.indexOf("[");k>=0&&(O=w.type.substring(k));const Z=Et(l,w.components);zn(Z)&&l?y.push("tuple("+Z.join(",")+")"+O):y.push("("+Z.join(",")+")"+O)}else y.push(w.type)}),y}function tn(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(0,p):l}function nn(l){const p=l.indexOf("("),y=l.indexOf(")");return p!==-1&&y!==-1?l.substr(p+1,y-p-1).replace(" ",""):""}function $n(l){return l==null?l:xt(l).toNumber()}function Me(l){return xt(l).toNumber()}function ht(l){return Cr(l)?l.toString(10):""+l}function gt(l){return typeof l=="string"&&!l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?"0x"+l:Ke(l)}function Gt(l){if(typeof l=="string")return l.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l)?Ke(l):"0x"+ge(ie(l));if(l instanceof Uint8Array)return"0x"+ge(l);throw new Error(`toStringData: Error trying to convert ${l} (${typeof l}) to a hex string.`)}function nt(l){return typeof l=="boolean"?l:xt(l).toNumber()!==0}function rt(l){const p=xt(l),y=p.toString(16);return p.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Ke(l){if(Rr(l))return rt(+l);if(Cr(l))return rt(l);if(co(l)){const p=l;if(p.indexOf("-0x")===0)return rt(p);if(p.indexOf("0x")===0)return p;if(!isFinite(p))return ge(ie(p))}if(l instanceof Uint8Array)return"0x"+ge(l);if(zn(l)||Wn(l))throw new Error("toHex can only be called with scalar values, not objects or arrays");return rt(l)}function gn(l){const p=l?l.toLowerCase():"ether",y=Se[p];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(Se,null,2));return new G(y,10)}function xt(l){let p=l||0;return Cr(p)?p:(typeof p=="string"&&(p=p.trim()),typeof p!="string"||p.indexOf("0x")!==0&&p.indexOf("-0x")!==0?p instanceof Uint8Array?new G(ge(p),16):new G(p,10):new G(p.replace("0x","").toLowerCase(),16))}function ei(l){return new G(new Array(l).fill("1").join(""),2)}function Ze(l,p=256){const y=xt(l).integerValue();return y.isLessThan(0)?ei(p).plus(y).plus(1):y}function rn(l,p){return Xe(l.toString(2),p,"0")[0]==="1"}function et(l){if(typeof l!="string")throw X("invalid address",re,{arg:"address",value:l});if(l.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return l.trim().substring(0,2)!=="0x"&&(l="0x"+l),hs(l);throw X("invalid address",re,{arg:"address",value:l})}function Lt(l,p=256){if(rn(l,p)){const y=ei(p);return l.minus(y).minus(1)}return l}function at(l){return/^0x[0-9a-f]{40}$/i.test(l)}function Pn(l){return!!/^(0x)?[0-9a-f]{40}$/i.test(l)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(l)&&!/^(0x)?[0-9A-F]{40}$/.test(l))||fs(l))}function fs(l){const p=l.replace("0x",""),y=he(p.toLowerCase());for(let w=0;w<40;w++)if(parseInt(y[w],16)>7&&p[w].toUpperCase()!==p[w]||parseInt(y[w],16)<=7&&p[w].toLowerCase()!==p[w])return!1;return!0}function hs(l){if(l===void 0)return"";const p=l.toLowerCase().replace("0x",""),y=he(p);let w="0x";for(let O=0;O<p.length;O++)parseInt(y[O],16)>7?w+=p[O].toUpperCase():w+=p[O];return w}function In(l){if(!Array.isArray(l))throw new Error(`Value was not an array: ${JSON.stringify(l)}`);return l}function Mi(l){return at(l)?l:/^[0-9a-f]{40}$/.test(l)?"0x"+l:"0x"+Xe(Ke(l).substr(2),40)}function Cr(l){return l instanceof G}function co(l){return typeof l=="string"||l&&l.constructor&&l.constructor.name==="String"}function Wn(l){return l!==null&&!Array.isArray(l)&&typeof l=="object"}function Rr(l){return typeof l=="boolean"}function zn(l){return Array.isArray(l)}var uo,ti;function ps(l,p){if(!l)throw new Error("jsonrpc method should be specified!");if(typeof l!="string")throw new Error(`jsonrpc must be a string, got ${typeof l}!`);return n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:l,params:p||[]}}function ms(l){return Array.isArray(l)?l.every(p):p(l);function p(y){return!!y&&(y.error===void 0||y.error===null)&&y.jsonrpc==="2.0"&&y.id!==null&&"result"in y&&y.result!==void 0}}n.TransactionStatus=void 0,(uo=n.TransactionStatus||(n.TransactionStatus={})).pending="pending",uo.confirmed="confirmed",uo.failed="failed",n.TransactionType=void 0,(ti=n.TransactionType||(n.TransactionType={})).queued="queued",ti.dropped="dropped",ti.replaced="replaced",ti.pending="pending",ti.reverted="reverted",ti.confirmed="confirmed",n.messageId=0;function lo(l){return xt(l)}function gs(l){return l==="latest"||l==="pending"||l==="earliest"}function pr(l){return l===void 0?"latest":bt(l)}function bt(l){return l==null?null:gs(l)?l:Ke(l)}function Gn(l){return l.from&&(l.from=ee(l.from)),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=rt(l.gasPrice)),l.gas!==void 0&&(l.gas=rt(l.gas)),l.value!==void 0&&(l.value=rt(l.value)),l.nonce!==void 0&&(l.nonce=rt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function Qn(l){if(typeof l!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(l));if(l.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(l));if(l.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(l));return l}function R(l){if(typeof l!="object")throw new Error("Did not provide transaction options");if(!l.from)throw new Error('Missing "from" in transaction options');return l.from=ee(l.from),l.to&&(l.to=ee(l.to)),l.gasPrice!==void 0&&(l.gasPrice=rt(l.gasPrice)),l.gas!==void 0&&(l.gas=rt(l.gas)),l.value!==void 0&&(l.value=rt(l.value)),l.nonce!==void 0&&(l.nonce=rt(l.nonce)),l.data&&!l.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(l.data)&&(l.data="0x"+l.data),l}function _(l){return l?(l.blockNumber!==null&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=Me(l.transactionIndex)),l.nonce=Me(l.nonce),l.gas=Me(l.gas),l.gasPrice=xt(l.gasPrice),l.value=xt(l.value),l):null}function A(l){return l?(l.blockNumber!==null&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex!==null&&(l.transactionIndex=Me(l.transactionIndex)),l.cumulativeGasUsed=Me(l.cumulativeGasUsed),l.gasUsed=Me(l.gasUsed),l.logs&&zn(l.logs)&&(l.logs=l.logs.map(function(p){return z(p)})),l.status=Me(l.status||""),l):null}function x(l){return l?(l.gasLimit=Me(l.gasLimit),l.gasUsed=Me(l.gasUsed),l.size=Me(l.size),l.timestamp=Me(l.timestamp),l.number!==null&&(l.number=Me(l.number)),l.difficulty=xt(l.difficulty),l.totalDifficulty=xt(l.totalDifficulty),zn(l.transactions)&&l.transactions.forEach(function(p,y){co(p)||(l.transactions[y]=_(p)||l.transactions[y])}),l):null}function z(l){return l&&(l.blockNumber&&(l.blockNumber=Me(l.blockNumber)),l.transactionIndex&&(l.transactionIndex=Me(l.transactionIndex)),l.logIndex&&(l.logIndex=Me(l.logIndex)),l)}function ee(l){if(at(l))return l;if(Pn(l))return"0x"+l;throw new Error(`Invalid address: ${JSON.stringify(l)}`)}function me(l){return l}function be(l){return l&&(l.startingBlock=Me(l.startingBlock),l.currentBlock=Me(l.currentBlock),l.highestBlock=Me(l.highestBlock),l.knownStates&&(l.knownStates=Me(l.knownStates),l.pulledStates=Me(l.pulledStates)),l)}function Le(l){if(l===null)throw X("cannot convert null value to array",re,{arg:"value",value:l});if(l instanceof Uint8Array)return new Uint8Array(l);if(typeof l=="string"){const p=l.match(/^(0x)?[0-9a-fA-F]*$/);if(!p)throw X("invalid hexidecimal string",re,{arg:"value",value:l});if(p[1]!=="0x")throw X("hex string must have 0x prefix",re,{arg:"value",value:l});(l=l.substring(2)).length%2&&(l="0"+l);const y=[];for(let w=0;w<l.length;w+=2)y.push(parseInt(l.substr(w,2),16));return new Uint8Array(y)}if(function(p){if(!p||parseInt(String(p.length))!==p.length||typeof p=="string")return!1;for(let y=0;y<p.length;y++){const w=p[y];if(w<0||w>=256||parseInt(String(w))!==w)return!1}return!0}(l))return new Uint8Array(l);throw X("invalid arrayify value",void 0,{arg:"value",value:l,type:typeof l})}function Ne(l,p,y){Object.defineProperty(l,p,{enumerable:!0,value:y,writable:!1})}const Ve=new G(-1),ut=new G(0),lt=new G(1),$t=new G("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ht(l){return function(p,y){function w(Z){return new Error('unexpected character "'+p[Z]+'" at position '+Z+' in "'+p+'"')}const O={type:"",name:"",state:{allowType:!0}};let k=O;for(let Z=0;Z<p.length;Z++){const ye=p[Z];switch(ye){case"(":if(!k.state.allowParams)throw w(Z);k.state.allowType=!1,k.type=on(k.type),k.components=[{type:"",name:"",parent:k,state:{allowType:!0}}],k=k.components[0];break;case")":delete k.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),k.type=on(k.type);const ke=k;if(k=k.parent,!k)throw w(Z);delete ke.parent,k.state.allowParams=!1,k.state.allowName=!0,k.state.allowArray=!0;break;case",":delete k.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),k.type=on(k.type);const xe={type:"",name:"",parent:k.parent,state:{allowType:!0}};k.parent.components.push(xe),delete k.parent,k=xe;break;case" ":k.state.allowType&&k.type!==""&&(k.type=on(k.type),delete k.state.allowType,k.state.allowName=!0,k.state.allowParams=!0),k.state.allowName&&k.name!==""&&(k.name==="indexed"?(k.indexed=!0,k.name=""):k.state.allowName=!1);break;case"[":if(!k.state.allowArray)throw w(Z);k.type+=ye,k.state.allowArray=!1,k.state.allowName=!1,k.state.readArray=!0;break;case"]":if(!k.state.readArray)throw w(Z);k.type+=ye,k.state.readArray=!1,k.state.allowArray=!0,k.state.allowName=!0;break;default:if(k.state.allowType)k.type+=ye,k.state.allowParams=!0,k.state.allowArray=!0;else if(k.state.allowName)k.name+=ye,delete k.state.allowArray;else{if(!k.state.readArray)throw w(Z);k.type+=ye}}}if(k.parent)throw new Error("unexpected eof");return delete O.state,k.name==="indexed"&&(k.indexed=!0,k.name=""),O.type=on(O.type),O}(l)}function on(l){return l.match(/^uint($|[^1-9])/)?l="uint256"+l.substring(4):l.match(/^int($|[^1-9])/)&&(l="int256"+l.substring(3)),l}const ni=new RegExp(/^bytes([0-9]*)$/),Mr=new RegExp(/^(u?int)([0-9]*)$/),ri=new RegExp(/^(.*)\[([0-9]*)\]$/),fo=function(l,p){const y=l.match(Mr);return y&&parseInt(y[2])<=48?p.toNumber():p};class An{constructor(p,y,w,O="",k){this.coerceFunc=p,this.name=y,this.type=w,this.localName=O,this.dynamic=k}}class Ni extends An{constructor(p){super(p.coerceFunc,p.name,p.type,void 0,p.dynamic),Ne(this,"coder",p)}encode(p){return this.coder.encode(p)}decode(p,y){return this.coder.decode(p,y)}}class wp extends An{constructor(p,y){super(p,"null","",y,!1)}encode(p){return Le([])}decode(p,y){if(y>p.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Sa(l,p){return new G(l.toString(2).substr(-p),2)}class Tp extends An{constructor(p,y,w,O){const k=(w?"int":"uint")+8*y;super(p,k,k,O,!1),this.size=y,this.signed=w}encode(p){try{let y=xt(p);if(this.signed){let O=Sa($t,8*this.size-1);if(y.gt(O))throw new Error("out-of-bounds");if(O=O.plus(lt).multipliedBy(Ve),y.lt(O))throw new Error("out-of-bounds")}else if(y.lt(ut)||y.gt(Sa($t,8*this.size)))throw new Error("out-of-bounds");y=Sa(Ze(y,8*this.size),8*this.size),this.signed&&(y=Ze(Lt(y,8*this.size),256));const w=Xe(Ze(y).toString(16),64);if(w.indexOf("NaN")!==-1)throw X("invalid number value, NaN",re,{arg:this.localName,coderType:this.name,value:p,v:y,twosComplement:Ze(y),twosComplement16:Ze(y).toString(16),pad:Xe(Ze(y).toString(16),64),size:this.size});return _e(w)}catch(y){throw X("invalid number value",re,{arg:this.localName,coderType:this.name,value:p,message:y.toString()})}}decode(p,y){if(p.length<y+32)throw X("insufficient data for "+this.name+" type",re,{arg:this.localName,coderType:this.name,value:Ke(p.slice(y,y+32))});const w=32-this.size;let O=new G(ge(p.slice(y+w,y+32)),16);return O=this.signed?Lt(O,8*this.size):Sa(O,8*this.size),{consumed:32,value:this.coerceFunc(this.name,O)}}}const Nr=new Tp(function(l,p){return p},32,!1,"none");class Ip extends An{constructor(p,y,w){const O="bytes"+y;super(p,O,O,w,!1),this.length=y}encode(p){const y=new Uint8Array(32);try{if(typeof p=="string"&&p.length%2!=0)throw new Error("hex string cannot be odd-length");const w=Le(p);if(w.length>this.length)throw new Error("incorrect data length");y.set(w)}catch(w){throw X("invalid "+this.name+" value. Use hex strings or Uint8Array",re,{arg:this.localName,coderType:this.name,value:w.value||p,details:w.message})}return y}decode(p,y){if(p.length<y+32)throw X("insufficient data for "+this.name+" type",re,{arg:this.localName,coderType:this.name,value:Ke(p.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,p.slice(y,y+this.length))}}}function Ap(l){const p=32*Math.ceil(l.length/32),y=new Uint8Array(p-l.length);return vt(Nr.encode(l.length),l,y)}function Op(l,p,y){if(l.length<p+32)throw X("insufficient data for dynamicBytes length",re,{arg:y,coderType:"dynamicBytes",value:Ke(l.slice(p,p+32))});let w=Nr.decode(l,p).value;try{w=w.toNumber()}catch(O){throw O("dynamic bytes count too large",re,{arg:y,coderType:"dynamicBytes",value:w.toString()})}if(l.length<p+32+w)throw X("insufficient data for dynamicBytes type",re,{arg:y,coderType:"dynamicBytes",value:Ke(l.slice(p,p+32+w))});return{consumed:32+32*Math.ceil(w/32),value:l.slice(p+32,p+32+w)}}function wa(l){return 32*Math.ceil(l/32)}function Cp(l,p){if(!Array.isArray(p)){if(!p||typeof p!="object")throw X("invalid tuple value",re,{coderType:"tuple",value:p});{const ke=[];l.forEach(function(xe){ke.push(p[xe.localName])}),p=ke}}if(l.length!==p.length)throw X("types/value length mismatch",re,{coderType:"tuple",value:p});const y=[];l.forEach(function(ke,xe){y.push({dynamic:ke.dynamic,value:ke.encode(p[xe])})});let w=0,O=0;y.forEach(function(ke){ke.dynamic?(w+=32,O+=wa(ke.value.length)):w+=wa(ke.value.length)});let k=0,Z=w;const ye=new Uint8Array(w+O);return y.forEach(function(ke){ke.dynamic?(ye.set(Nr.encode(Z),k),k+=32,ye.set(ke.value,Z),Z+=wa(ke.value.length)):(ye.set(ke.value,k),k+=wa(ke.value.length))}),ye}class ow extends Array{}class sw extends An{constructor(p,y,w,O){super(p,"array",y.type+"["+(w>=0?w:"")+"]",O,w===-1||y.dynamic),this.coder=y,this.length=w}encode(p){if(!Array.isArray(p))throw X("expected array value",re,{arg:this.localName,coderType:"array",value:p});let y=this.length,w=new Uint8Array(0);y===-1&&(y=p.length,w=Nr.encode(y)),function(k,Z,ye){if(ye||(ye=""),k<Z)throw X("missing argument"+ye,"MISSING_ARGUMENT",{count:k,expectedCount:Z});if(k>Z)throw X("too many arguments"+ye,"UNEXPECTED_ARGUMENT",{count:k,expectedCount:Z})}(y,p.length,"in coder array"+(this.localName?" "+this.localName:""));const O=[];for(let k=0;k<p.length;k++)O.push(this.coder);return vt(w,Cp(O,p))}decode(p,y){let w=0,O=this.length;if(O===-1){let ye;try{ye=Nr.decode(p,y)}catch(ke){throw X("insufficient data for dynamic array length",re,{arg:this.localName,coderType:"array",value:ke.value})}try{O=ye.value.toNumber()}catch{throw X("array count too large",re,{arg:this.localName,coderType:"array",value:ye.value.toString()})}w+=ye.consumed,y+=ye.consumed}const k=[];for(let ye=0;ye<O;ye++)k.push(new Ni(this.coder));const Z=function(ye,ke,xe){const yn=xe;let Ut=0;const ve=[];return ye.forEach(function(sn){let Ot;if(sn.dynamic){const Ct=Nr.decode(ke,xe);Ot=sn.decode(ke,yn+Ct.value.toNumber()),Ot.consumed=Ct.consumed}else Ot=sn.decode(ke,xe);Ot.value!==void 0&&ve.push(Ot.value),xe+=Ot.consumed,Ut+=Ot.consumed}),{value:ve,consumed:Ut}}(k,p,y);return Z.consumed+=w,Z.value=this.coerceFunc(this.type,Z.value),Z}}class Al extends An{constructor(p,y,w){let O=!1;const k=[];y.forEach(function(Z){Z.dynamic&&(O=!0),k.push(Z.type)}),super(p,"tuple","tuple("+k.join(",")+")",w,O),this.coders=y}encode(p){return Cp(this.coders,p)}decode(p,y){const w=function(O,k,Z){const ye=Z;let ke=0;const xe=new ow;return O.forEach(function(yn){let Ut;if(yn.dynamic){const ve=Nr.decode(k,Z);Ut=yn.decode(k,ye+ve.value.toNumber()),Ut.consumed=ve.consumed}else Ut=yn.decode(k,Z);Ut.value!==void 0&&xe.push(Ut.value),Z+=Ut.consumed,ke+=Ut.consumed}),O.forEach(function(yn,Ut){let ve=yn.localName;ve&&(ve==="length"&&(ve="_length"),xe[ve]!==null&&xe[ve]!==void 0||(xe[ve]=xe[Ut]))}),{value:xe,consumed:ke}}(this.coders,p,y);return w.value=this.coerceFunc(this.type,w.value),w}}const aw={address:class extends An{constructor(l,p){super(l,"address","address",p,!1)}encode(l){const p=new Uint8Array(32),y=l.trim();if(!Pn(y))throw X("invalid address format",re,{arg:this.localName,coderType:"address",value:l});try{p.set(_e(ee(y)),12)}catch(w){throw X(`invalid address (${w.message})`,re,{arg:this.localName,coderType:"address",value:l})}return p}decode(l,p){if(l.length<p+32)throw X("insufficuent data for address type",re,{arg:this.localName,coderType:"address",value:Ke(l.slice(p,p+32)),missingBytes:p+32-l.length});return{consumed:32,value:this.coerceFunc("address",et(Ke(l.slice(p+12,p+32))))}}},bool:class extends An{constructor(l,p){super(l,"bool","bool",p,!1)}encode(l){return Nr.encode(l?1:0)}decode(l,p){try{const y=Nr.decode(l,p);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?X("insufficient data for boolean type",re,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends An{constructor(l,p){super(l,"string","string",p,!0)}encode(l){if(typeof l!="string")throw X("invalid string value",re,{arg:this.localName,coderType:"string",value:l});return Ap(ie(l))}decode(l,p){const y=Op(l,p,this.localName);return y.value=this.coerceFunc("string",fe(y.value)),y}},bytes:class extends An{constructor(l,p){super(l,"bytes","bytes",p,!0)}encode(l){try{return Ap(Le(l))}catch(p){throw p("invalid bytes value",re,{arg:this.localName,coderType:"bytes",value:p.value})}}decode(l,p){const y=Op(l,p,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends Ip{constructor(l,p){super(l,24,p)}}};function Ta(l,p){const y=aw[p.type];if(y)return new y(l,p.name);let w=p.type.match(Mr);if(w){const O=parseInt(w[2]||"256");if(O===0||O>256||O%8!=0)throw X("invalid "+w[1]+" bit length",re,{arg:"param",value:p});return new Tp(l,O/8,w[1]==="int",p.name)}if(w=p.type.match(ni),w){const O=parseInt(w[1]);if(O===0||O>32)throw X("invalid bytes length",re,{arg:"param",value:p});return new Ip(l,O,p.name)}if(w=p.type.match(ri),w){const O=Object.assign({},p),k=parseInt(w[2]||"-1");return O.type=w[1],new sw(l,Ta(l,O),k,p.name)}if(p.type.substring(0,5)==="tuple")return function(O,k,Z){k||(k=[]);const ye=k.map(ke=>Ta(O,ke));return new Al(O,ye,Z)}(l,p.components,p.name);if(p.type==="")return new wp(l,p.name);throw X("invalid type",re,{arg:"type",value:p.type,fullType:p})}class Ol{constructor(p){(function(y,w){if(!(y instanceof w))throw X("missing new","MISSING_NEW",{name:w.name})})(this,Ol),p||(p=fo),Ne(this,"coerceFunc",p)}encode(p,y){if(p.length!==y.length)throw X("types/values length mismatch",re,{count:{types:p.length,values:y.length},value:{types:p,values:y}});const w=p.map(O=>typeof O=="string"?Ht(O):O).map(O=>Ta(this.coerceFunc,O));return new Al(this.coerceFunc,w,"_").encode(y)}decode(p,y){const w=p.map(O=>typeof O=="string"?Ht(O):O).map(O=>Ta(this.coerceFunc,O));return new Al(this.coerceFunc,w,"_").decode(y,0).value}}const Rp=new Ol;var Mp,Ie;function Ae(l,p,y,w){var O,k=arguments.length,Z=k<3?p:w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(l,p,y,w);else for(var ye=l.length-1;ye>=0;ye--)(O=l[ye])&&(Z=(k<3?O(Z):k>3?O(p,y,Z):O(p,y))||Z);return k>3&&Z&&Object.defineProperty(p,y,Z),Z}function Oe(l,p){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(l,p)}n.coder=void 0,(Mp=n.coder||(n.coder={})).encodeParams=function(l,p){return ge(Rp.encode(l,p))},Mp.decodeParams=function(l,p){if(l.length>0&&(!p||p==="0x"||p==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Rp.decode(l,_e("0x"+p.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class De{constructor(p){this.callName=p.callName,this.params=p.params||0,this.inputFormatter=p.inputFormatter||null,this.outputFormatter=p.outputFormatter}validateArgs(p){if(p.length!==this.params)throw y=this.callName,w=p.length,O=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${w}, expected: ${O}`);var y,w,O}formatInput(p){return this.inputFormatter?this.inputFormatter.map(function(y,w){return y?y(p[w]):p[w]}):p}formatOutput(p){return p!==null?this.outputFormatter(p):null}toPayload(p){const y=this.formatInput(p);return this.validateArgs(y),{method:this.callName,params:y}}async execute(p,...y){const w=this.toPayload(y);if(!p)throw new Error("Missing RequestManager in method#exec");const O=await p.sendAsync(w);return this.formatOutput(O)}}class On{constructor(p){this.getter=p.getter,this.outputFormatter=p.outputFormatter}formatOutput(p){return this.outputFormatter(p)}async execute(p,...y){const w=await p.sendAsync({method:this.getter,params:[]});return this.formatOutput(w)}}function Np(l){return new Promise(p=>setTimeout(p,l))}n.eth=void 0,(Ie=n.eth||(n.eth={})).eth_getBalance=new De({callName:"eth_getBalance",params:2,inputFormatter:[ee,pr],outputFormatter:lo}),Ie.eth_getStorageAt=new De({callName:"eth_getStorageAt",params:3,inputFormatter:[ee,Ke,pr],outputFormatter:gt}),Ie.eth_getCode=new De({callName:"eth_getCode",params:2,inputFormatter:[ee,pr],outputFormatter:gt}),Ie.eth_getBlockByHash=new De({callName:"eth_getBlockByHash",params:2,inputFormatter:[bt,function(l){return!!l}],outputFormatter:x}),Ie.eth_getBlockByNumber=new De({callName:"eth_getBlockByNumber",params:2,inputFormatter:[bt,function(l){return!!l}],outputFormatter:x}),Ie.eth_getUncleByBlockHashAndIndex=new De({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:x}),Ie.eth_getUncleByBlockNumberAndIndex=new De({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:x}),Ie.eth_getBlockTransactionCountByHash=new De({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getBlockTransactionCountByNumber=new De({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getUncleCountByBlockHash=new De({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getUncleCountByBlockNumber=new De({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[bt],outputFormatter:Me}),Ie.eth_getTransactionByHash=new De({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Qn],outputFormatter:_}),Ie.eth_getTransactionByBlockHashAndIndex=new De({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:_}),Ie.eth_getTransactionByBlockNumberAndIndex=new De({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[bt,Ke],outputFormatter:_}),Ie.eth_getTransactionReceipt=new De({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Qn],outputFormatter:A}),Ie.eth_getTransactionCount=new De({callName:"eth_getTransactionCount",params:2,inputFormatter:[ee,pr],outputFormatter:Me}),Ie.eth_sendRawTransaction=new De({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.web3_sha3=new De({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:gt}),Ie.eth_sendTransaction=new De({callName:"eth_sendTransaction",params:1,inputFormatter:[R],outputFormatter:gt}),Ie.eth_sign=new De({callName:"eth_sign",params:2,inputFormatter:[ee,null],outputFormatter:gt}),Ie.eth_call=new De({callName:"eth_call",params:2,inputFormatter:[Gn,pr],outputFormatter:gt}),Ie.eth_estimateGas=new De({callName:"eth_estimateGas",params:1,inputFormatter:[Gn],outputFormatter:Me}),Ie.eth_submitWork=new De({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:nt}),Ie.eth_getWork=new De({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:In}),Ie.eth_coinbase=new On({getter:"eth_coinbase",outputFormatter:Mi}),Ie.eth_mining=new On({getter:"eth_mining",outputFormatter:nt}),Ie.eth_hashrate=new On({getter:"eth_hashrate",outputFormatter:Me}),Ie.eth_syncing=new On({getter:"eth_syncing",outputFormatter:be}),Ie.eth_gasPrice=new On({getter:"eth_gasPrice",outputFormatter:lo}),Ie.eth_accounts=new On({getter:"eth_accounts",outputFormatter:In}),Ie.eth_blockNumber=new On({getter:"eth_blockNumber",outputFormatter:Me}),Ie.eth_protocolVersion=new On({getter:"eth_protocolVersion",outputFormatter:Me}),Ie.web3_clientVersion=new On({getter:"web3_clientVersion",outputFormatter:ht}),Ie.net_version=new On({getter:"net_version",outputFormatter:ht}),Ie.shh_version=new De({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Me}),Ie.shh_post=new De({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.personal_newAccount=new De({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:Mi}),Ie.personal_importRawKey=new De({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:Mi}),Ie.personal_sign=new De({callName:"personal_sign",params:3,inputFormatter:[Gt,ee,null],outputFormatter:gt}),Ie.personal_ecRecover=new De({callName:"personal_ecRecover",params:2,inputFormatter:[Gt,null],outputFormatter:Mi}),Ie.personal_unlockAccount=new De({callName:"personal_unlockAccount",params:3,inputFormatter:[ee,null,$n],outputFormatter:nt}),Ie.personal_sendTransaction=new De({callName:"personal_sendTransaction",params:2,inputFormatter:[R,null],outputFormatter:gt}),Ie.personal_lockAccount=new De({callName:"personal_lockAccount",params:1,inputFormatter:[ee],outputFormatter:nt}),Ie.personal_listAccounts=new On({getter:"personal_listAccounts",outputFormatter:In}),Ie.net_listening=new On({getter:"net_listening",outputFormatter:nt}),Ie.net_peerCount=new On({getter:"net_peerCount",outputFormatter:Me}),Ie.eth_newFilter=new De({callName:"eth_newFilter",params:1,inputFormatter:[me],outputFormatter:Ke}),Ie.eth_getLogs=new De({callName:"eth_getLogs",params:1,inputFormatter:[In],outputFormatter:In}),Ie.eth_newBlockFilter=new De({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ke}),Ie.eth_newPendingTransactionFilter=new De({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ke}),Ie.eth_uninstallFilter=new De({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ke],outputFormatter:nt}),Ie.eth_getFilterLogs=new De({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ke],outputFormatter:In}),Ie.eth_getFilterChanges=new De({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ke],outputFormatter:In}),Ie.eth_submitHashrate=new De({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:nt}),Ie.shh_newIdentity=new De({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_hasIdentity=new De({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newGroup=new De({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:gt}),Ie.shh_addToGroup=new De({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_newFilter=new De({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ke}),Ie.shh_uninstallFilter=new De({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:nt}),Ie.shh_getLogs=new De({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getFilterMessages=new De({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getFilterChanges=new De({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:In}),Ie.shh_getMessages=new De({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:In});function Ce(l,p){const y=n.eth[p];if(!y)throw new Error(`Could not find the method/property named ${p.toString()}`);Object.defineProperty(l,p,{value:function(...w){return y.execute(this,...w)}})}class Te{constructor(p){this.provider=p,this.requests=new Map}async sendAsync(p){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const w=ps(p.method,p.params),O=s();return this.requests.set(w.id,O),y.sendAsync(w,(k,Z)=>{this.requests.delete(w.id),k?O.reject(k):ms(Z)?O.resolve(Z.result):O.reject(function(ye){const ke=ye&&ye.error&&ye.error.message?ye.error.message:"Invalid JSON RPC response: "+JSON.stringify(ye);return new Error(ke)}(Z))}),O}setProvider(p){this.provider=p}async getConfirmedTransaction(p){const y=await this.waitForCompletion(p);if(this.isFailure(y))throw new Error(`Transaction "${p}" failed`);return y}async waitForCompletion(p,y){const w=Qn(p);if(await this.isTxDropped(w,y)){const O=await this.getTransactionAndReceipt(w);return Object.assign(Object.assign({},O),{status:n.TransactionStatus.failed})}for(;;){const O=await this.getTransactionAndReceipt(w);if(!this.isPending(O)&&O.receipt)return Object.assign(Object.assign({},O),{status:this.isFailure(O)?n.TransactionStatus.failed:n.TransactionStatus.confirmed});await Np(2e3)}}async getTransaction(p){let y,w=null;const O=Qn(p);try{const Z=(await this.eth_accounts())[0];Z&&(w=await this.eth_getTransactionCount(Z,"latest"))}catch{w=null}try{if(y=await this.eth_getTransactionByHash(O),y===null)return null}catch{return null}if(y.blockNumber===null){if(w!==null){if(y.nonce<w)return{hash:O,type:n.TransactionType.replaced,nonce:y.nonce};if(y.nonce>w)return{hash:O,type:n.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:n.TransactionType.pending},y)}let k;try{if(k=await this.eth_getTransactionReceipt(O),k===null||k.status===0)return Object.assign({type:n.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:n.TransactionType.confirmed},y),{receipt:k})}async isTxDropped(p,y=15){let w=y;for(;w>0;){if(await this.getTransactionAndReceipt(p)!==null)return!1;w-=1,await Np(2e3)}return!0}async getTransactionAndReceipt(p){p=Qn(p);const[y,w]=await Promise.all([this.eth_getTransactionByHash(p),this.eth_getTransactionReceipt(p)]);return Object.assign(Object.assign({},y),{receipt:w})}isPending(p){return p&&p.blockNumber===null}isFailure(p){return p&&(!p.receipt||p.receipt.status===0)}}Ae([Ce,Oe("design:type",Function)],Te.prototype,"web3_clientVersion",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"web3_sha3",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_version",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_peerCount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"net_listening",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_protocolVersion",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_syncing",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_coinbase",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_mining",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_hashrate",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_gasPrice",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_accounts",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_blockNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBalance",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getStorageAt",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionCount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockTransactionCountByNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleCountByBlockNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getCode",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sign",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sendTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_sendRawTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_call",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_estimateGas",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getBlockByNumber",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByHash",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getTransactionReceipt",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockHashAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newBlockFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_newPendingTransactionFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_uninstallFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getFilterChanges",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getFilterLogs",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getLogs",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_getWork",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_submitWork",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"eth_submitHashrate",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_post",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_version",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newIdentity",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_hasIdentity",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newGroup",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_addToGroup",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_newFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_uninstallFilter",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_getFilterChanges",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"shh_getMessages",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_unlockAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_newAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_listAccounts",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_lockAccount",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_importRawKey",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_sendTransaction",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_sign",void 0),Ae([Ce,Oe("design:type",Function)],Te.prototype,"personal_ecRecover",void 0);class kp{constructor(p){this.json=p,this._inputTypes=p.inputs||[],this._outputTypes=p.outputs||[],this._constant=!!p.constant,this._payable=!!p.payable||p.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in p&&!p.constant||p.stateMutability==="nonpayable",this._name=He(p)}extractDefaultBlock(p){return p.length>this._inputTypes.length&&!Wn(p[p.length-1])&&pr(p.pop())||"latest"}validateArgs(p){if(p.some(k=>k===void 0))throw new Error("Invalid call, some arguments are undefined");const y=p.filter(function(k){return!(Wn(k)===!0&&zn(k)===!1&&Cr(k)===!1&&!(k instanceof Uint8Array))});if(y.length!==this._inputTypes.length)throw w=y.length,O=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${w}, expected: ${O}`);var w,O}toPayload(p){let y={to:void 0,data:void 0,value:void 0,from:void 0};p.length>this._inputTypes.length&&Wn(p[p.length-1])&&(y=p.pop()),this.validateArgs(p);const w=this.signature();let O=n.coder.encodeParams(this._inputTypes,p);return O.indexOf("0x")===0&&(O=O.substr(2)),y.data="0x"+w+O,y}signature(){return he(this._name).slice(0,8)}unpackOutput(p){if(!p)return;const y=p.length>=2?p.slice(2):p,w=n.coder.decodeParams(this._outputTypes,y);return w.length===1?w[0]:w}async execute(p,y,...w){if(!p)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const O=this.toPayload(w);if(O.to=y,O.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!O.from)throw new Error('Missing "from" in transaction options');return await p.eth_sendTransaction(O)}{const O=this.extractDefaultBlock(w),k=this.toPayload(w);k.to=y;const Z=await p.eth_call(k,O);return this.unpackOutput(Z)}}estimateGas(p,y,...w){if(!(p instanceof Te))throw new Error("estimateGas needs to receive a RequestManager as first argument");const O=this.toPayload(w);return O.to=y,p.eth_estimateGas(O)}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}attachToContract(p){const y=this.displayName(),w=Object.assign((...O)=>this.execute(p.requestManager,p.address,...O),{estimateGas:this.estimateGas.bind(this,p.requestManager,p.address),toPayload:(...O)=>this.toPayload(O),toRPCMessage:(...O)=>{const k=this.extractDefaultBlock(O),Z=this.toPayload(O);return Z.to=p.address,{method:"eth_call",params:[Z,k]}},unpackOutput:O=>this.unpackOutput(O)});p[y]||(p[y]=w),p[y][this.typeName()]=w}}function Pp(l){if(l==null)return null;const p=String(l).toString();return p.indexOf("0x")===0?p:ge(ie(p))}class Cl{constructor(p){this.requestManager=p,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=s(),this.callbacks=[],this.stopSemaphore=s()}async watch(p){if(this.isDisposed)throw new Error("The filter was disposed");p&&(this.callbacks.push(p),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const p=await this.getNewFilter();if(!p)throw new Error("Could not create a filter, response: "+JSON.stringify(p));this.filterId.resolve(p)}catch(p){throw p}this.stopSemaphore=s(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const p=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${p}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach(w=>{this.formatter?y.forEach(O=>{w(this.formatter(O))}):y.forEach(O=>w(O))})}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=s(),setTimeout((p=()=>this.poll(),function(){p().catch(y=>console.error(y))}),500))}else this.stopSemaphore.resolve(1);var p}}class ys extends Cl{constructor(p,y,w=O=>O){super(p),this.requestManager=p,this.options=y,this.formatter=w,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(O){return Pp(O)}),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?bt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?bt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const p=await this.filterId;return this.requestManager.eth_getFilterLogs(p)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const p=await this.filterId;return this.requestManager.eth_getFilterChanges(p)}async uninstall(){const p=await this.filterId;return this.requestManager.eth_uninstallFilter(p)}}class Rl{constructor(p,y,w){this.requestManager=p,this.address=w,this._anonymous=!1,this._params=y.inputs||[],this._name=He(y),this._anonymous=y.anonymous||!1}types(p){return this._params.filter(function(y){return y.indexed===p})}displayName(){return tn(this._name)}typeName(){return nn(this._name)||"void"}signature(){return he(this._name)}encode(p={},y={}){const w={topics:[],address:this.address};y.fromBlock!==void 0&&(w.fromBlock=bt(y.fromBlock)||void 0),y.toBlock!==void 0&&(w.toBlock=bt(y.toBlock)||void 0),w.topics=w.topics||[],this._anonymous||w.topics.push("0x"+this.signature());const O=this._params.filter(function(k){return k.indexed===!0}).map(function(k){const Z=p[k.name];return Z==null?null:zn(Z)?Z.map(function(ye){return"0x"+n.coder.encodeParams([k],[ye])}):"0x"+n.coder.encodeParams([k],[Z])});return w.topics=w.topics.concat(O),w}decode(p){p.data=p.data||"",p.topics=p.topics||[];const y=(this._anonymous?p.topics:p.topics.slice(1)).map(function(ye){return ye.slice(2)}).join(""),w=n.coder.decodeParams(this.types(!0),y),O=p.data.slice(2),k=n.coder.decodeParams(this.types(!1),O),Z=this._params.reduce(function(ye,ke){return ye[ke.name]=ke.indexed?w.shift():k.shift(),ye},{});return Object.assign(Object.assign({},z(p)),{event:this.displayName(),address:p.address,args:Z})}async execute(p,y){const w=this.encode(p,y),O=this.decode.bind(this);return new ys(this.requestManager,w,O)}attachToContract(p){const y=this.execute.bind(this),w=this.displayName();p.events[w]||(p.events[w]=y),p.events[w][this.typeName()]=this.execute.bind(this,p)}}class cw{constructor(p,y,w){this._requestManager=p,this._json=y,this._address=w}encode(p={}){const y={address:this._address};return p.fromBlock!==void 0&&(y.fromBlock=bt(p.fromBlock)||void 0),p.toBlock!==void 0&&(y.toBlock=bt(p.toBlock)||void 0),y}decode(p){p.data=p.data||"";const y=zn(p.topics)&&co(p.topics[0])?p.topics[0].slice(2):"",w=this._json.filter(function(O){return y===he(He(O))})[0];return w?new Rl(this._requestManager,w,this._address).decode(p):z(p)}async execute(p){const y=this.encode(p),w=this.decode.bind(this);return new ys(this._requestManager,y,w)}getAllEventsFunction(){return this.execute.bind(this)}}class xp{constructor(p,y,w){var O;this.requestManager=p,this.abi=y,this.address=w,this.events={},this.transactionHash=null,this.address=w,this.abi=y,(O=this).abi.filter(function(k){return k.type==="function"}).map(function(k){return new kp(k)}).forEach(function(k){k.attachToContract(O)}),this.allEvents=function(k){const Z=k.abi.filter(function(ke){return ke.type==="event"}),ye=new cw(k.requestManager,Z,k.address);return Z.map(function(ke){return new Rl(k.requestManager,ke,k.address)}).forEach(function(ke){ke.attachToContract(k)}),ye.getAllEventsFunction()}(this)}}n.AbstractFilter=Cl,n.BigNumber=G,n.Contract=xp,n.ContractFactory=class{constructor(l,p){this.requestManager=l,this.abi=p}async deploy(...l){let p;const y=l[l.length-1];if(Wn(y)&&!zn(y)&&(p=l.pop()),!p)throw new Error("Missing options object");if(!p.data||typeof p.data!="string")throw new Error("Invalid options.data");if(Me(p.value)>0&&!(this.abi.filter(function(xe){return xe.type==="constructor"&&xe.inputs.length===l.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const w=(O=this.abi,k=l,O.filter(function(xe){return xe.type==="constructor"&&xe.inputs&&xe.inputs.length===k.length}).map(function(xe){return xe.inputs||[]}).map(function(xe){return n.coder.encodeParams(xe,k)})[0]||"");var O,k;p.data+=w,p.gas||(p.gas=await this.requestManager.eth_estimateGas(p));const Z=await this.requestManager.eth_sendTransaction(p);if(!Z)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ye=await async function(xe,yn){const Ut=s();let ve=0;const sn=()=>{ve++,ve>50?Ut.reject(new Error("Contract transaction couldn't be found after 50 blocks")):xe.eth_getTransactionReceipt(yn).then(dn=>{dn&&dn.blockHash?Ut.resolve(dn):setTimeout(sn,1e3)},dn=>Ut.reject(dn))};sn();const Ot=await Ut,Ct=await xe.eth_getCode(Ot.contractAddress,"latest");if(Ct&&Ct.length>3)return Ot.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ct,receipt:Ot})}(this.requestManager,Z),ke=await this.at(ye);return ke.transactionHash=Z,ke}async at(l){if(!Pn(l))throw new TypeError(`Invalid address ${JSON.stringify(l)}`);return new xp(this.requestManager,this.abi,l)}},n.EthBlockFilter=class extends ys{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},n.EthFilter=ys,n.EthPendingTransactionFilter=class extends ys{constructor(l){super(l,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},n.HTTPProvider=class{constructor(l,p={}){this.host=l,this.options=p,this.debug=!1,this.host=l||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){try{let y=null;y=l instanceof Array?l.map(k=>r(k)):r(l);const w=this.options.fetch||globalThis.fetch;if(w===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const O={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+O.body),w(this.host,O).then(async k=>{if(k.ok){const Z=await k.json();this.debug&&console.log("RECV << "+JSON.stringify(Z)),Z.error?p(Object.assign(new Error(Z.error.json||Z.error),Z.error)):p(null,Z)}else this.debug&&console.log("ERR << "+JSON.stringify(k)),p(new Error("External error. response code: "+k.status))},k=>{this.debug&&console.log("ERR << "+JSON.stringify(k)),p(k)})}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),p(y)}}},n.Method=De,n.Property=On,n.RequestManager=Te,n.SHHFilter=class extends Cl{constructor(l,p){super(l),this.requestManager=l,this.options=p,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map(function(y){return Pp(y)}),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const l=await this.filterId;return this.requestManager.shh_getMessages(l)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const l=await this.filterId;return this.requestManager.shh_getFilterChanges(l)}async uninstall(){const l=await this.filterId;return this.requestManager.shh_uninstallFilter(l)}},n.SolidityEvent=Rl,n.SolidityFunction=kp,n.WebSocketProvider=class{constructor(l,p={}){this.url=l,this.options=p,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const l=this.connection;this.timeout(new Error("Provider disposed.")),l.then(p=>p.close()).catch(p=>{this.debug&&console.error(p)})}send(){throw new Error("Sync requests are deprecated")}sendAsync(l,p){const y=[];let w;if(l instanceof Array)w=Promise.all(l.map(O=>{const k=s();try{const Z=r(O);y.push(Z),this.responseCallbacks.set(Z.id,k)}catch(Z){k.reject(Z)}return k}));else{const O=s();try{const k=r(l);y.push(k),this.responseCallbacks.set(k.id,O)}catch(k){O.reject(k)}w=O}w.then(O=>p(null,O),O=>p(O)),this.connection.then(O=>{y.forEach(k=>{const Z=JSON.stringify(k);this.debug&&console.log("SEND >> "+Z),O.send(Z)})},O=>{p(O)})}parseResponse(l){const p=[];return l.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(y=>{let w=y;this.lastChunk&&(w=this.lastChunk+w);let O=null;try{O=JSON.parse(w)}catch{return this.lastChunk=w,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout(()=>{this.timeout()},15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",O&&p.push(O)}),p}processMessage(l){if("id"in l){const p=l.id,y=this.responseCallbacks.get(p);if(!y)return void console.error("Error: Received a response for an unknown request",l);this.responseCallbacks.delete(p),l.error!==void 0&&l.error!==null?y.reject(Object.assign(new Error(l.error.message||l.error),l.error)):"result"in l&&y.resolve(l)}else this.notificationCallbacks.forEach(p=>p(null,l))}timeout(l){this.connection&&this.connection.isPending||(this.connection=s());const p=l||new Error("Connection timeout");this.responseCallbacks.forEach(y=>y.reject(p)),this.responseCallbacks.clear(),this.isDisposed||setTimeout(()=>this.connect(),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then(y=>y.close()).catch(y=>{this.debug&&console.error(y)}),this.connection&&this.connection.isPending||(this.connection=s()),this.lastChunk="";const l=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!l)throw new Error("Please provide a WebSocketConstructor");const p=new l(this.url,this.options.protocol);p.onopen=()=>{this.connection.resolve(p)},p.onerror=y=>{const w=new Error("Error in web socket");w.data=y,this.timeout(w)},p.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},p.onmessage=y=>{const w=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(w).forEach(O=>{O instanceof Array?O.forEach(k=>this.processMessage(k)):this.processMessage(O)})}}},n.bytesToHex=ge,n.bytesToUtf8String=fe,n.concatBytes=vt,n.default=Te,n.extractDisplayName=tn,n.extractTypeName=nn,n.fromAscii=function(l,p=0){let y="";for(let w=0;w<l.length;w++){const O=l.charCodeAt(w).toString(16);y+=O.length<2?"0"+O:O}return"0x"+y.padEnd(p,"0")},n.fromDecimal=rt,n.fromTwosComplement=Lt,n.fromWei=function(l,p){const y=xt(l).dividedBy(gn(p));return Cr(l)?y:y.toString(10)},n.getAddress=et,n.getValueOfUnit=gn,n.hexToBytes=_e,n.inputAddressFormatter=ee,n.inputBlockNumberFormatter=bt,n.inputCallFormatter=Gn,n.inputDefaultBlockNumberFormatter=pr,n.inputFilterOptions=me,n.inputPostFormatter=function(l){return l?(l.ttl=rt(l.ttl),l.workToProve=rt(l.workToProve),l.priority=rt(l.priority),zn(l.topics)||(l.topics=l.topics?[l.topics]:[]),l.topics=l.topics.map(function(p){return p.indexOf("0x")===0?p:"0x"+ge(ie(p))}),l):null},n.inputTransactionFormatter=R,n.inputTransactionId=Qn,n.isAddress=Pn,n.isArray=zn,n.isBigNumber=Cr,n.isBloom=function(l){return!!/^(0x)?[0-9a-f]{512}$/i.test(l)&&!!/^(0x)?[0-9a-f]{512}$/i.test(l)},n.isBoolean=Rr,n.isChecksumAddress=fs,n.isFunction=function(l){return typeof l=="function"},n.isHex=function(l){return typeof l=="string"&&/^0x[0-9a-fA-F]+$/.test(l)},n.isJson=function(l){try{return!!JSON.parse(l)}catch{return!1}},n.isObject=Wn,n.isPredefinedBlockNumber=gs,n.isStrictAddress=at,n.isString=co,n.isTopic=function(l){return!!/^(0x)?[0-9a-f]{64}$/i.test(l)&&!!/^(0x)?[0-9a-f]{64}$/i.test(l)},n.isValidResponse=ms,n.outputBigNumberFormatter=lo,n.outputBlockFormatter=x,n.outputLogFormatter=z,n.outputPostFormatter=function(l){return l?(l.expiry=Me(l.expiry),l.sent=Me(l.sent),l.ttl=Me(l.ttl),l.workProved=Me(l.workProved),l.topics||(l.topics=[]),l.topics=l.topics.map(function(p){return se(p)}),l):null},n.outputSyncingFormatter=be,n.outputTransactionFormatter=_,n.outputTransactionReceiptFormatter=A,n.padLeft=Xe,n.padRight=function(l,p,y){return l+new Array(p-l.length+1).join(y||"0")},n.sha3=he,n.signedIsNegative=rn,n.stringToUtf8Bytes=ie,n.toAddress=Mi,n.toArray=In,n.toAscii=se,n.toBatchPayload=function(l){return l.map(function(p){return ps(p.method,p.params)})},n.toBigNumber=xt,n.toBoolean=nt,n.toChecksumAddress=hs,n.toData=gt,n.toDecimal=Me,n.toHex=Ke,n.toJsonRpcRequest=ps,n.toNullDecimal=$n,n.toString=ht,n.toStringData=Gt,n.toTwosComplement=Ze,n.toWei=function(l,p){const y=xt(l).times(gn(p));return Cr(l)?y:y.toString(10)},n.transformToFullName=He,Object.defineProperty(n,"__esModule",{value:!0})})})(jd,jd.exports);var Fu=jd.exports,Hu={};Object.defineProperty(Hu,"__esModule",{value:!0});Hu.SignatureValidator=void 0;const mw=Fu;async function gw(e,t){const n=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new mw.ContractFactory(e,n).at(t)}Hu.SignatureValidator=gw;var i_={},o_={},s_={},a_={},c_={},Ee={},Gf=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.validateType=Ee.generateLazyValidator=Ee.Ajv=void 0;const u_=Gf(uw);Ee.Ajv=u_.default;const yw=Gf(lw),_w=Gf(dw);function bw(e,t){let n=null;const r=(i,o)=>{if(!n){const s=new u_.default({$data:!0,allErrors:!0});(0,yw.default)(s),(0,_w.default)(s,{singleError:!0}),t?.forEach(a=>s.addKeyword(a)),n=s.compile(e),Object.defineProperty(r,"errors",{get(){return n?.errors}})}return n(i,o)};return r}Ee.generateLazyValidator=bw;function vw(e,t){return e.validate(t)}Ee.validateType=vw;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const t=Ee;e.SCENE_UPDATE="SCENE_UPDATE",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SceneUpdate||(e.SceneUpdate={}))})(c_);var l_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const t=Ee;e.UPDATE="update",function(n){n.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Update||(e.Update={}))})(l_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(c_,e),n(l_,e)})(a_);var d_={},f_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const t=Ee;(function(n){n.SCENE="scene",n.SMART_ITEM="smart-item",n.PORTABLE_EXPERIENCE="portable-experience",n.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProjectType||(e.ProjectType={}))})(f_);var h_={},Xs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const t=Ee;(function(n){n.UNIQUE="unique",n.MYTHIC="mythic",n.LEGENDARY="legendary",n.EPIC="epic",n.RARE="rare",n.UNCOMMON="uncommon",n.COMMON="common"})(e.Rarity||(e.Rarity={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema);const r={[n.UNIQUE]:1,[n.MYTHIC]:10,[n.LEGENDARY]:100,[n.EPIC]:1e3,[n.RARE]:5e3,[n.UNCOMMON]:1e4,[n.COMMON]:1e5},i={[n.UNIQUE]:"#FFE617",[n.MYTHIC]:"#FB7DE3",[n.LEGENDARY]:"#A657ED",[n.EPIC]:"#6397F2",[n.RARE]:"#3AD682",[n.UNCOMMON]:"#FF8563",[n.COMMON]:"#D4E0E0"},o={[n.UNIQUE]:"#FFB626",[n.MYTHIC]:"#FF63E1",[n.LEGENDARY]:"#842DDA",[n.EPIC]:"#3D85E6",[n.RARE]:"#36CF75",[n.UNCOMMON]:"#ED6D4F",[n.COMMON]:"#ABC1C1"};function s(u){return r[u]}n.getMaxSupply=s;function a(u){return o[u]}n.getColor=a;function c(u){return[i[u],o[u]]}n.getGradient=c}(e.Rarity||(e.Rarity={}))})(Xs);var wi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const t=Ee;(function(n){n.EYEBROWS="eyebrows",n.EYES="eyes",n.FACIAL_HAIR="facial_hair",n.HAIR="hair",n.BODY_SHAPE="body_shape",n.MOUTH="mouth",n.UPPER_BODY="upper_body",n.LOWER_BODY="lower_body",n.FEET="feet",n.EARRING="earring",n.EYEWEAR="eyewear",n.HAT="hat",n.HELMET="helmet",n.MASK="mask",n.TIARA="tiara",n.TOP_HEAD="top_head",n.SKIN="skin",n.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableCategory||(e.WearableCategory={}))})(wi);var Uu={},ju={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const t=Ee;(function(n){n.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",n.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyShape||(e.BodyShape={}))})(ju);var $u={},Vf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const t=Ee;(function(n){n.HEAD="head",n.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.BodyPartCategory||(e.BodyPartCategory={}))})(Vf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const t=wi,n=Ee,r=Vf;(function(i){i.schema={oneOf:[Object.assign({},t.WearableCategory.schema),Object.assign({},r.BodyPartCategory.schema)]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})($u);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const t=Ee,n=ju,r=$u;(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:r.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:r.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Uu);var Wu={},p_={},qf={},Zi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const t=Ee;(function(n){n.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const r=(0,t.generateLazyValidator)(n.schema);n.validate=i=>r(i)})(e.Color3||(e.Color3={})),function(n){n.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.EthAddress||(e.EthAddress={})),function(n){n.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv2||(e.IPFSv2={})),function(n){n.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const r=new RegExp(n.schema.pattern);n.validate=i=>r.test(i)}(e.IPFSv1||(e.IPFSv1={}))})(Zi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const t=wi,n=Zi,r=Ee;var i;(function(c){c.schema={type:"object",required:["face256","body"],properties:{face256:n.IPFSv2.schema,body:n.IPFSv2.schema}},c.validate=(0,r.generateLazyValidator)(c.schema)})(i=e.Snapshots||(e.Snapshots={}));var o;(function(c){c.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)})(o=e.AvatarInfo||(e.AvatarInfo={}));var s;(function(c){c.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const u=new RegExp(c.schema.pattern,"i");c.validate=h=>u.test(h)})(s=e.LinkUrl||(e.LinkUrl={}));var a;(function(c){c.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:s.schema}}})(a=e.Link||(e.Link={})),function(c){c.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:a.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:n.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:o.schema},additionalProperties:!0},c.validate=(0,r.generateLazyValidator)(c.schema)}(e.Avatar||(e.Avatar={}))})(qf);var m_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const t=Ee,n=qf;(function(r){r.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:n.Avatar.schema}},additionalProperties:!0},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.Profile||(e.Profile={}))})(m_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(qf,e),n(m_,e)})(p_);var g_={},Yf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const t=Ee;e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],function(n){n.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.FeatureToggles||(e.FeatureToggles={}))})(Yf);var Xf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Xf);var Kf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const t=Ee;(function(n){n.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},n.schemaValidator=(0,t.generateLazyValidator)(n.schema),n.validate=r=>n.schemaValidator(r)&&r.parcels.includes(r.base)})(e.SceneParcels||(e.SceneParcels={}))})(Kf);var y_={},ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.displayableProperties=void 0;ns.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}};var Jf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Source||(e.Source={}))})(Jf);var Zf={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Zf);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const t=Ee,n=ns,r=Yf,i=Kf,o=Jf,s=Zf,a=Xf;var c;(function(u){u.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",u.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",u.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",u.USE_WEB3_API="USE_WEB3_API",u.USE_FETCH="USE_FETCH",u.USE_WEBSOCKET="USE_WEBSOCKET",u.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(c=e.RequiredPermission||(e.RequiredPermission={})),function(u){u.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},n.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},o.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:s.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(c)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},r.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},a.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:c.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},u.validate=(0,t.generateLazyValidator)(u.schema)}(e.Scene||(e.Scene={}))})(y_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var t=Yf;Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return t.FeatureToggles}});var n=Xf;Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return n.WorldConfiguration}});var r=Kf;Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return r.SceneParcels}});var i=y_;Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var o=Jf;Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return o.Source}});var s=Zf;Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return s.SpawnPoint}})})(g_);var Ml={},Qf={},eh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const t=Ee;(function(n){n.EN="en",n.ES="es"})(e.Locale||(e.Locale={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Locale||(e.Locale={}))})(eh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const t=Ee,n=eh;(function(r){r.schema={type:"object",properties:{code:n.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.I18N||(e.I18N={}))})(Qf);var th={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Metrics||(e.Metrics={}))})(th);var zu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const t=Xs,n=Ee;e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:t.Rarity.schema};const r={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,n.generateLazyValidator)(r);function o(s){return i(s)}e.isStandard=o})(zu);var Gu={},nh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MerkleProof||(e.MerkleProof={}))})(nh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const t=Ee,n=nh;e.thirdPartyProps={merkleProof:n.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const r={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(a,c)=>{var u;const h=c;return!((u=h?.merkleProof)===null||u===void 0)&&u.hashingKeys?h.merkleProof.hashingKeys.every(d=>h.hasOwnProperty(d)):!1},errors:!1},o=(0,t.generateLazyValidator)(r,[i]);function s(a){return o(a)}e.isThirdParty=s})(Gu);var __={},b_={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.isBaseAvatar=Ur.requiredBaseItemProps=Ur.baseItemProperties=void 0;const Ew=Qf,Sw=th,ww=ns;Ur.baseItemProperties=Object.assign(Object.assign({},ww.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:Ew.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},Sw.Metrics.schema),{nullable:!0})});Ur.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function Tw(e){if(!e||!e.id)return!1;const t=e.id.split(":"),n=t[1]==="decentraland",r=t[3]==="base-avatars";return t.length===5&&n&&r}Ur.isBaseAvatar=Tw;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const t=Ee,n=wi,r=Uu,i=Ur,o=zu,s=Gu,a=$u;(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),o.standardProperties),s.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:a.HideableWearableCategory.schema},hides:{type:"array",items:a.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:a.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const u={keyword:"_isThirdParty",validate:(d,m)=>!d||(0,s.isThirdParty)(m),errors:!1},h={keyword:"_isBaseAvatar",validate:(d,m)=>!d||(0,i.isBaseAvatar)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[u,h])})(e.Wearable||(e.Wearable={}))})(b_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var t=Uu;Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return t.WearableRepresentation}});var n=b_;Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return n.Wearable}});var r=wi;Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return r.WearableCategory}});var i=Vf;Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var o=$u;Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return o.HideableWearableCategory}})})(__);var Nl={},kl={},rh={},ih={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const t=Ee;(function(n){n.DANCE="dance",n.STUNT="stunt",n.GREETINGS="greetings",n.FUN="fun",n.POSES="poses",n.REACTIONS="reactions",n.HORROR="horror",n.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmoteCategory||(e.EmoteCategory={}))})(ih);var oh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const t=Ee,n=ju;(function(r){r.schema={type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},r.validate=(0,t.generateLazyValidator)(r.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(oh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const t=ih,n=Ee,r=oh;(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.EmoteRepresentationADR74.schema,minItems:1},category:t.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(rh);var Lp;function Iw(){return Lp||(Lp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const t=E_(),n=Ee,r=Ur,i=zu,o=Gu,s=rh;(function(a){a.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},r.baseItemProperties),i.standardProperties),o.thirdPartyProps),{emoteDataADR74:s.EmoteDataADR74.schema}),additionalProperties:!0,required:[...r.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const c={keyword:"_isThirdParty",validate:(u,h)=>!u||(0,t.isThirdParty)(h),errors:!1};a.validate=(0,n.generateLazyValidator)(a.schema,[c])})(e.Emote||(e.Emote={}))}(kl)),kl}var v_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const t=Ee;(function(n){n.SIMPLE="simple",n.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.EmotePlayMode||(e.EmotePlayMode={}))})(v_);var Dp;function Aw(){return Dp||(Dp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var t=Iw();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return t.Emote}});var n=oh;Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return n.EmoteRepresentationADR74}});var r=rh;Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return r.EmoteDataADR74}});var i=ih;Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var o=v_;Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return o.EmotePlayMode}})}(Nl)),Nl}var Bp;function E_(){return Bp||(Bp=1,function(e){var t=le&&le.__createBinding||(Object.create?function(u,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(u,m,g)}:function(u,h,d,m){m===void 0&&(m=d),u[m]=h[d]}),n=le&&le.__exportStar||function(u,h){for(var d in u)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&t(h,u,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var r=Qf;Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return r.I18N}});var i=eh;Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var o=th;Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return o.Metrics}});var s=ju;Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return s.BodyShape}});var a=zu;Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return a.isStandard}});var c=Gu;Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return c.isThirdParty}}),n(__,e),n(Aw(),e)}(Ml)),Ml}var S_={};(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(nh,e)})(S_);var w_={},Vu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const t=Ee;var n;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(n=e.AuthLinkType||(e.AuthLinkType={}));var r;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(n)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:n.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,t.generateLazyValidator)(i.schema)})(r=e.AuthLink||(e.AuthLink={})),function(i){i.schema={type:"array",items:r.schema,minItems:1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.AuthChain||(e.AuthChain={}))})(Vu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const t=Zi,n=Vu,r=Ee;(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:n.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:t.IPFSv1.schema}},{properties:{entityId:t.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(w_);var T_={},sh={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const t=Zi,n=Ee;(function(r){r.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]}},required:["file","hash"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.ContentMapping||(e.ContentMapping={}))})(sh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const t=Zi,n=sh,r=Ee;(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[t.IPFSv1.schema,t.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:n.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,r.generateLazyValidator)(i.schema)}(e.Entity||(e.Entity={}))})(T_);var I_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const t=Vu,n=Ee;(function(r){r.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:t.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},r.validate=(0,n.generateLazyValidator)(r.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(I_);var A_={},O_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const t=wi,n=Zi,r=Ee;var i;(function(o){o.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:n.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:n.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:n.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:t.WearableCategory.schema}},additionalProperties:!0},o.validate=(0,r.generateLazyValidator)(o.schema)})(i=e.Outfit||(e.Outfit={})),function(o){o.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},o.validate=(0,r.generateLazyValidator)(o.schema)}(e.Outfits||(e.Outfits={}))})(O_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(O_,e)})(A_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(p_,e),n(g_,e),n(E_(),e),n(ns,e),n(S_,e),n(w_,e),n(T_,e),n(I_,e),n(A_,e)})(Wu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const t=Xs,n=wi,r=Uu,i=Ee,o=Wu;(function(s){s.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},t.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:n.WearableCategory.schema},hides:{type:"array",items:n.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:r.WearableRepresentation.schema,minItems:1},category:n.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:o.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.WearableJson||(e.WearableJson={}))})(h_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(f_,e),n(h_,e)})(d_);(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(a_,e),n(d_,e)})(s_);var C_={},Pl={},xl={},Fp;function R_(){return Fp||(Fp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const t=Ee,n=fr();var r;(function(o){o.ETHEREUM_MAINNET="Ethereum Mainnet",o.ETHEREUM_ROPSTEN="Ropsten",o.ETHEREUM_RINKEBY="Rinkeby",o.ETHEREUM_GOERLI="Goerli",o.ETHEREUM_KOVAN="Kovan",o.ETHEREUM_SEPOLIA="Sepolia",o.MATIC_MAINNET="Polygon",o.MATIC_MUMBAI="Mumbai",o.AVALANCHE_MAINNET="Avalanche Mainnet",o.BINANCE_MAINNET="Binance Smart Chain Mainnet",o.ARBITRUM_MAINNET="Arbitrum One",o.OPTIMISM_MAINNET="Optimism Mainnet",o.FANTOM_MAINNET="Fantom Mainnet"})(r=e.ChainName||(e.ChainName={}));function i(o){switch(o){case r.ETHEREUM_MAINNET:return n.ChainId.ETHEREUM_MAINNET;case r.ETHEREUM_ROPSTEN:return n.ChainId.ETHEREUM_ROPSTEN;case r.ETHEREUM_RINKEBY:return n.ChainId.ETHEREUM_RINKEBY;case r.ETHEREUM_GOERLI:return n.ChainId.ETHEREUM_GOERLI;case r.ETHEREUM_KOVAN:return n.ChainId.ETHEREUM_KOVAN;case r.ETHEREUM_SEPOLIA:return n.ChainId.ETHEREUM_SEPOLIA;case r.MATIC_MAINNET:return n.ChainId.MATIC_MAINNET;case r.MATIC_MUMBAI:return n.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=i,function(o){o.schema={type:"string",enum:Object.values(o)},o.validate=(0,t.generateLazyValidator)(o.schema)}(r=e.ChainName||(e.ChainName={}))}(xl)),xl}var Kn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const t=Ee;(function(n){n.ETHEREUM="ETHEREUM",n.MATIC="MATIC"})(e.Network||(e.Network={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Network||(e.Network={}))})(Kn);var Hp;function fr(){return Hp||(Hp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const t=Ee,n=R_(),r=Kn;var i;(function(u){u[u.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",u[u.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",u[u.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",u[u.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",u[u.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",u[u.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",u[u.MATIC_MAINNET=137]="MATIC_MAINNET",u[u.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=e.ChainId||(e.ChainId={}));function o(u){switch(u){case i.ETHEREUM_MAINNET:return n.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return n.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return n.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return n.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return n.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return n.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return n.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return n.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=o;function s(u){switch(u){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=s;function a(u){switch(u){case i.ETHEREUM_MAINNET:return{[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[r.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[r.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[r.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[r.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[r.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[r.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[r.Network.ETHEREUM]:i.MATIC_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[r.Network.ETHEREUM]:i.MATIC_MUMBAI,[r.Network.MATIC]:i.MATIC_MUMBAI};default:return{[r.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[r.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=a;function c(u){switch(u){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return r.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return r.Network.MATIC}}e.getNetwork=c,function(u){u.schema={type:"number",enum:Object.values(u)},u.validate=(0,t.generateLazyValidator)(u.schema)}(i=e.ChainId||(e.ChainId={}))}(Pl)),Pl}var qu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const t=Ee;(function(n){n.OPEN="open",n.SOLD="sold",n.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ListingStatus||(e.ListingStatus={}))})(qu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const t=Ee,n=fr(),r=qu,i=Kn;(function(o){o.RECENTLY_OFFERED="recently_offered",o.RECENTLY_UPDATED="recently_updated",o.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:r.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Bid||(e.Bid={}))})(C_);var M_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const t=Ee;(function(n){n.MOST_SALES="most_sales",n.MOST_PURCHASES="most_purchases",n.MOST_SPENT="most_spent",n.MOST_EARNED="most_earned",n.MOST_ROYALTIES="most_royalties",n.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),function(n){n.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.Account||(e.Account={}))})(M_);var N_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const t=Ee,n=fr(),r=Kn;(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Collection||(e.Collection={}))})(N_);var k_={},Ks={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const t=Ee;(function(n){n.PARCEL="parcel",n.ESTATE="estate",n.WEARABLE="wearable",n.ENS="ens",n.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.NFTCategory||(e.NFTCategory={}))})(Ks);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const t=Ee,n=fr(),r=Kn,i=Ks;(function(o){o.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),function(o){o.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:r.Network.schema,chainId:n.ChainId.schema},required:["name","address","category","network","chainId"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Contract||(e.Contract={}))})(k_);var P_={},ah={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const t=Ee,n=fr(),r=Wu,i=Kn,o=Ks,s=Xs,a=wi;(function(c){c.NAME="name",c.NEWEST="newest",c.RECENTLY_LISTED="recently_listed",c.RECENTLY_SOLD="recently_sold",c.CHEAPEST="cheapest",c.RENTAL_LISTING_DATE="rental_listing_date",c.RENTAL_DATE="rented_date",c.MAX_RENTAL_PRICE="max_rental_price",c.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),function(c){c.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:a.WearableCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:r.BodyShape.schema},category:r.EmoteCategory.schema,description:{type:"string"},rarity:s.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:o.NFTCategory.schema,network:i.Network.schema,chainId:n.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},c.validate=(0,t.generateLazyValidator)(c.schema)}(e.NFT||(e.NFT={}))})(ah);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const t=Ee,n=fr(),r=Kn,i=ah,o=Ks;(function(s){s.NAME="name",s.NEWEST="newest",s.RECENTLY_REVIEWED="recently_reviewed",s.RECENTLY_SOLD="recently_sold",s.RECENTLY_LISTED="recently_listed",s.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),function(s){s.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:o.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:r.Network.schema,chainId:n.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},s.validate=(0,t.generateLazyValidator)(s.schema)}(e.Item||(e.Item={}))})(P_);var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(x_);var L_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const t=Ee,n=fr(),r=Kn;(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:r.Network.schema,chainId:n.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.Mint||(e.Mint={}))})(L_);var D_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,function(t){t.NEWEST="newest",t.RECENTLY_SOLD="recently_sold",t.CHEAPEST="cheapest",t.MOST_EXPENSIVE="most_expensive",t.RECENTLY_LISTED="recently_listed"}(e.CatalogSortBy||(e.CatalogSortBy={})),function(t){t.ASC="asc",t.DESC="desc"}(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(D_);var B_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const t=Ee,n=fr(),r=qu,i=Kn;(function(o){o.RECENTLY_LISTED="recently_listed",o.RECENTLY_UPDATED="recently_updated",o.CHEAPEST="cheapest",o.ISSUED_ID_ASC="issued_id_asc",o.ISSUED_ID_DESC="issued_id_desc",o.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:r.ListingStatus.schema,network:i.Network.schema,chainId:n.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Order||(e.Order={}))})(B_);var F_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const t=Ee;(function(n){n.INJECTED="injected",n.MAGIC="magic",n.FORTMATIC="formatic",n.NETWORK="network",n.WALLET_CONNECT="wallet_connect",n.WALLET_CONNECT_V2="wallet_connect_v2",n.WALLET_LINK="wallet_link",n.METAMASK_MOBILE="metamask_mobile",n.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.ProviderType||(e.ProviderType={}))})(F_);var ch={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const t=Ee;(function(n){n.ORDER="order",n.BID="bid",n.MINT="mint"})(e.SaleType||(e.SaleType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.SaleType||(e.SaleType={}))})(ch);var H_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const t=Ee,n=fr(),r=ch,i=Kn;(function(o){o.RECENTLY_SOLD="recently_sold",o.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),function(o){o.schema={type:"object",properties:{id:{type:"string"},type:r.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:n.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.Sale||(e.Sale={}))})(H_);var U_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const t=Ee,n=fr(),r=Kn;(function(o){o.OPEN="open",o.CANCELLED="cancelled",o.EXECUTED="executed",o.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),function(o){o.ASC="asc",o.DESC="desc"}(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),function(o){o.PARCEL="parcel",o.ESTATE="estate"}(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),function(o){o.LAND_CREATION_DATE="land_creation_date",o.RENTAL_LISTING_DATE="rental_listing_date",o.RENTAL_DATE="rented_date",o.NAME="name",o.MAX_RENTAL_PRICE="max_rental_price",o.MIN_RENTAL_PRICE="min_rental_price"}(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(o){o.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},o.validate=(0,t.generateLazyValidator)(o.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),function(o){o.schema={type:"object",properties:{network:r.Network.schema,chainId:n.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},o.validate=(0,t.generateLazyValidator)(o.schema)}(e.RentalListingCreation||(e.RentalListingCreation={}))})(U_);var j_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,function(t){t.DATE="date",t.MOST_SALES="most_sales"}(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(j_);var $_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.Store||(e.Store={}))})($_);var W_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const t=Ee;(function(n){n.MALE="male",n.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),function(n){n.MALE="male",n.FEMALE="female",n.UNISEX="unisex"}(e.GenderFilterOption||(e.GenderFilterOption={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.WearableGender||(e.WearableGender={}))})(W_);var z_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const t=Ee;function n(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=n;function r(i,o){const s=n().validWorldRanges;for(const a of s)if(i>=a.xMin&&i<=a.xMax&&o>=a.yMin&&o<=a.yMax)return!0;return!1}e.isInsideWorldLimits=r,function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)}(e.World||(e.World={}))})(z_);var G_={},V_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const t=Ee;(function(n){n.STATIC="static",n.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewCamera||(e.PreviewCamera={}))})(V_);var q_={};Object.defineProperty(q_,"__esModule",{value:!0});var Y_={};Object.defineProperty(Y_,"__esModule",{value:!0});var X_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const t=Ee;(function(n){n.ANIMATION_PLAY="animation_play",n.ANIMATION_PAUSE="animation_pause",n.ANIMATION_LOOP="animation_loop",n.ANIMATION_END="animation_end",n.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(X_);var K_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const t=Ee;(function(n){n.IDLE="idle",n.WALK="walk",n.RUN="run",n.JUMP="jump",n.CLAP="clap",n.DAB="dab",n.DANCE="dance",n.FASHION="fashion",n.FASHION_2="fashion-2",n.FASHION_3="fashion-3",n.FASHION_4="fashion-4",n.LOVE="love",n.MONEY="money",n.FIST_PUMP="fist-pump",n.HEAD_EXPLODE="head-explode",n.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewEmote||(e.PreviewEmote={}))})(K_);var J_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const t=Ee;(function(r){r.READY="ready",r.LOAD="load",r.ERROR="error",r.UPDATE="update",r.CONTROLLER_REQUEST="controller_request",r.CONTROLLER_RESPONSE="controller_response",r.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),function(r){r.schema={type:"string",enum:Object.values(r)},r.validate=(0,t.generateLazyValidator)(r.schema)}(e.PreviewMessageType||(e.PreviewMessageType={}));const n=(r,i,o,s="*")=>{const a={type:i,payload:o};r.postMessage(a,s)};e.sendMessage=n})(J_);var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});var Q_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const t=Ee;(function(n){n.ORTHOGRAPHIC="orthographic",n.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewProjection||(e.PreviewProjection={}))})(Q_);var eb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const t=Ee;(function(n){n.TEXTURE="texture",n.WEARABLE="wearable",n.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,t.generateLazyValidator)(n.schema)}(e.PreviewType||(e.PreviewType={}))})(eb);var tb={};Object.defineProperty(tb,"__esModule",{value:!0});var nb={};Object.defineProperty(nb,"__esModule",{value:!0});var rb={};Object.defineProperty(rb,"__esModule",{value:!0});var ib={};Object.defineProperty(ib,"__esModule",{value:!0});var ob={};Object.defineProperty(ob,"__esModule",{value:!0});var sb={};Object.defineProperty(sb,"__esModule",{value:!0});var ab={};Object.defineProperty(ab,"__esModule",{value:!0});var cb={};Object.defineProperty(cb,"__esModule",{value:!0});(function(e){var t=le&&le.__createBinding||(Object.create?function(r,i,o,s){s===void 0&&(s=o);var a=Object.getOwnPropertyDescriptor(i,o);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(r,s,a)}:function(r,i,o,s){s===void 0&&(s=o),r[s]=i[o]}),n=le&&le.__exportStar||function(r,i){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(V_,e),n(q_,e),n(Y_,e),n(X_,e),n(K_,e),n(J_,e),n(Z_,e),n(Q_,e),n(eb,e),n(tb,e),n(nb,e),n(rb,e),n(ib,e),n(ob,e),n(sb,e),n(ab,e),n(cb,e)})(G_);var ub={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const t=Ee;(function(n){n.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(ub);(function(e){var t=le&&le.__createBinding||(Object.create?function(fe,ce,re,X){X===void 0&&(X=re);var _e=Object.getOwnPropertyDescriptor(ce,re);(!_e||("get"in _e?!ce.__esModule:_e.writable||_e.configurable))&&(_e={enumerable:!0,get:function(){return ce[re]}}),Object.defineProperty(fe,X,_e)}:function(fe,ce,re,X){X===void 0&&(X=re),fe[X]=ce[re]}),n=le&&le.__setModuleDefault||(Object.create?function(fe,ce){Object.defineProperty(fe,"default",{enumerable:!0,value:ce})}:function(fe,ce){fe.default=ce}),r=le&&le.__importStar||function(fe){if(fe&&fe.__esModule)return fe;var ce={};if(fe!=null)for(var re in fe)re!=="default"&&Object.prototype.hasOwnProperty.call(fe,re)&&t(ce,fe,re);return n(ce,fe),ce},i=le&&le.__exportStar||function(fe,ce){for(var re in fe)re!=="default"&&!Object.prototype.hasOwnProperty.call(ce,re)&&t(ce,fe,re)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const o=r(s_);e.sdk=o,i(Ee,e);var s=C_;Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return s.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return s.BidSortBy}});var a=M_;Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return a.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return a.AccountSortBy}});var c=fr();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return c.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return c.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return c.getURNProtocol}});var u=R_();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return u.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return u.getChainId}});var h=N_;Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return h.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return h.CollectionSortBy}});var d=k_;Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return d.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return d.ContractSortBy}});var m=P_;Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return m.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return m.ItemSortBy}});var g=qu;Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return g.ListingStatus}});var E=x_;Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return E.MetaTransaction}});var T=L_;Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return T.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return T.MintSortBy}});var L=Kn;Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return L.Network}});var H=Ks;Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return H.NFTCategory}});var K=ah;Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return K.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return K.NFTSortBy}});var V=D_;Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return V.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return V.CatalogSortDirection}});var F=B_;Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return F.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return F.OrderSortBy}});var J=F_;Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return J.ProviderType}});var D=Xs;Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return D.Rarity}});var W=ch;Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return W.SaleType}});var ue=H_;Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return ue.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return ue.SaleSortBy}});var P=U_;Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return P.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return P.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return P.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return P.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return P.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return P.PeriodCreation}});var $=j_;Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return $.AnalyticsDayDataSortBy}});var G=$_;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return G.Store}});var q=W_;Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return q.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return q.GenderFilterOption}});var ie=z_;Object.defineProperty(e,"World",{enumerable:!0,get:function(){return ie.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return ie.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return ie.isInsideWorldLimits}}),i(G_,e),i(Wu,e),i(Zi,e),i(ub,e),i(Vu,e),i(sh,e)})(o_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=o_;Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}})})(i_);var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.moveMinutes=void 0;function Ow(e){const t=new Date;return t.setMinutes(t.getMinutes()+e),t}Yu.moveMinutes=Ow;var uh={};Object.defineProperty(uh,"__esModule",{value:!0});const _s=Fu;class Cw{constructor(t,n=!0){this.requestManager=t,this.checkedBlocks={},this.saveBlocks=n,n&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const t=await this.getBlockWrapper("latest"),n=await this.getBlockWrapper(1);this.blockTime=(t.timestamp-n.timestamp)/Number(t.number)-1,this.firstTimestamp=n.timestamp}async getDate(t,n=!0){const r=t/1e3,i=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),r<this.firstTimestamp)return{block:1,timestamp:r};if(r>=i||r>this.savedBlocks.latest.timestamp)return{block:(0,_s.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:r};this.checkedBlocks[r]=[];const o=await this.getBlockWrapper(Math.ceil((r-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(r,o,n),timestamp:r}}async findBetter(t,n,r,i=this.blockTime){if(await this.isBetterBlock(t,n,r))return n.number;const o=t-n.timestamp;let s=Math.ceil(o/i);s===0&&(s=o<0?-1:1);const a=await this.getBlockWrapper(this.getNextBlock(t,n.number,s));return i=Math.abs((n.timestamp-a.timestamp)/(n.number-a.number)),this.findBetter(t,a,r,i)}async isBetterBlock(t,n,r){const i=n.timestamp;if(r){if(i<t)return!1;const o=await this.getBlockWrapper(n.number-1);if(i>=t&&o.timestamp<t)return!0}else{if(i>=t)return!1;const o=await this.getBlockWrapper(n.number+1);if(i<t&&o.timestamp>=t)return!0}return!1}getNextBlock(t,n,r){const i=n+r;return this.checkedBlocks[t].includes(i)?this.getNextBlock(t,n,r<0?++r:--r):(this.checkedBlocks[t].push(i),i)}async getBlockWrapper(t){if(!this.saveBlocks){const r=await this.requestManager.eth_getBlockByNumber(t,!1);return{number:(0,_s.toBigNumber)(r.number).toNumber(),timestamp:(0,_s.toBigNumber)(r.timestamp).toNumber()}}if(this.savedBlocks[t.toString()])return this.savedBlocks[t];if(typeof t=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=t)return this.savedBlocks.latest;const{timestamp:n}=await this.requestManager.eth_getBlockByNumber(t,!1);return this.savedBlocks[t.toString()]={number:(0,_s.toBigNumber)(t==="latest"?await this.requestManager.eth_blockNumber():t).toNumber(),timestamp:(0,_s.toBigNumber)(n).toNumber()},this.requests++,this.savedBlocks[t.toString()]}}uh.default=Cw;var pn={},lh={},lb={},ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.output=ln.exists=ln.hash=ln.bytes=ln.bool=ln.number=void 0;function ru(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}ln.number=ru;function db(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}ln.bool=db;function dh(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}ln.bytes=dh;function fb(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ru(e.outputLen),ru(e.blockLen)}ln.hash=fb;function hb(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}ln.exists=hb;function pb(e,t){dh(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}ln.output=pb;const Rw={number:ru,bool:db,bytes:dh,hash:fb,exists:hb,output:pb};ln.default=Rw;var Po={},Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});Xu.crypto=void 0;Xu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0};(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const t=Xu,n=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);e.u8=n;const r=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));e.u32=r;const i=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);e.createView=i;const o=(F,J)=>F<<32-J|F>>>J;if(e.rotr=o,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},(F,J)=>J.toString(16).padStart(2,"0"));function a(F){if(!(F instanceof Uint8Array))throw new Error("Uint8Array expected");let J="";for(let D=0;D<F.length;D++)J+=s[F[D]];return J}e.bytesToHex=a;function c(F){if(typeof F!="string")throw new TypeError("hexToBytes: expected string, got "+typeof F);if(F.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const J=new Uint8Array(F.length/2);for(let D=0;D<J.length;D++){const W=D*2,ue=F.slice(W,W+2),P=Number.parseInt(ue,16);if(Number.isNaN(P)||P<0)throw new Error("Invalid byte sequence");J[D]=P}return J}e.hexToBytes=c;const u=async()=>{};e.nextTick=u;async function h(F,J,D){let W=Date.now();for(let ue=0;ue<F;ue++){D(ue);const P=Date.now()-W;P>=0&&P<J||(await(0,e.nextTick)(),W+=P)}}e.asyncLoop=h;function d(F){if(typeof F!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof F}`);return new TextEncoder().encode(F)}e.utf8ToBytes=d;function m(F){if(typeof F=="string"&&(F=d(F)),!(F instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof F})`);return F}e.toBytes=m;function g(...F){if(!F.every(W=>W instanceof Uint8Array))throw new Error("Uint8Array list expected");if(F.length===1)return F[0];const J=F.reduce((W,ue)=>W+ue.length,0),D=new Uint8Array(J);for(let W=0,ue=0;W<F.length;W++){const P=F[W];D.set(P,ue),ue+=P.length}return D}e.concatBytes=g;class E{clone(){return this._cloneInto()}}e.Hash=E;const T=F=>Object.prototype.toString.call(F)==="[object Object]"&&F.constructor===Object;function L(F,J){if(J!==void 0&&(typeof J!="object"||!T(J)))throw new TypeError("Options should be object or undefined");return Object.assign(F,J)}e.checkOpts=L;function H(F){const J=W=>F().update(m(W)).digest(),D=F();return J.outputLen=D.outputLen,J.blockLen=D.blockLen,J.create=()=>F(),J}e.wrapConstructor=H;function K(F){const J=(W,ue)=>F(ue).update(m(W)).digest(),D=F({});return J.outputLen=D.outputLen,J.blockLen=D.blockLen,J.create=W=>F(W),J}e.wrapConstructorWithOpts=K;function V(F=32){if(t.crypto.web)return t.crypto.web.getRandomValues(new Uint8Array(F));if(t.crypto.node)return new Uint8Array(t.crypto.node.randomBytes(F).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=V})(Po);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const t=ln,n=Po;class r extends n.Hash{constructor(s,a){super(),this.finished=!1,this.destroyed=!1,t.default.hash(s);const c=(0,n.toBytes)(a);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const u=this.blockLen,h=new Uint8Array(u);h.set(c.length>u?s.create().update(c).digest():c);for(let d=0;d<h.length;d++)h[d]^=54;this.iHash.update(h),this.oHash=s.create();for(let d=0;d<h.length;d++)h[d]^=106;this.oHash.update(h),h.fill(0)}update(s){return t.default.exists(this),this.iHash.update(s),this}digestInto(s){t.default.exists(this),t.default.bytes(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:a,iHash:c,finished:u,destroyed:h,blockLen:d,outputLen:m}=this;return s=s,s.finished=u,s.destroyed=h,s.blockLen=d,s.outputLen=m,s.oHash=a._cloneInto(s.oHash),s.iHash=c._cloneInto(s.iHash),s}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(o,s,a)=>new r(o,s).update(a).digest();e.hmac=i,e.hmac.create=(o,s)=>new r(o,s)})(lb);var Gi={},Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.SHA2=void 0;const Ll=ln,bs=Po;function Mw(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,a,r)}class Nw extends bs.Hash{constructor(t,n,r,i){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,bs.createView)(this.buffer)}update(t){Ll.default.exists(this);const{view:n,buffer:r,blockLen:i}=this;t=(0,bs.toBytes)(t);const o=t.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const c=(0,bs.createView)(t);for(;i<=o-s;s+=i)this.process(c,s);continue}r.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ll.default.exists(this),Ll.default.output(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:o}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>i-s&&(this.process(r,0),s=0);for(let d=s;d<i;d++)n[d]=0;Mw(r,i-8,BigInt(this.length*8),o),this.process(r,0);const a=(0,bs.createView)(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,h[d],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:o,destroyed:s,pos:a}=this;return t.length=i,t.pos=a,t.finished=o,t.destroyed=s,i%n&&t.buffer.set(r),t}}Ku.SHA2=Nw;Object.defineProperty(Gi,"__esModule",{value:!0});Gi.sha224=Gi.sha256=void 0;const kw=Ku,Vn=Po,Pw=(e,t,n)=>e&t^~e&n,xw=(e,t,n)=>e&t^e&n^t&n,Lw=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ai=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ci=new Uint32Array(64);class mb extends kw.SHA2{constructor(){super(64,32,8,!1),this.A=ai[0]|0,this.B=ai[1]|0,this.C=ai[2]|0,this.D=ai[3]|0,this.E=ai[4]|0,this.F=ai[5]|0,this.G=ai[6]|0,this.H=ai[7]|0}get(){const{A:t,B:n,C:r,D:i,E:o,F:s,G:a,H:c}=this;return[t,n,r,i,o,s,a,c]}set(t,n,r,i,o,s,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=a|0,this.H=c|0}process(t,n){for(let d=0;d<16;d++,n+=4)ci[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const m=ci[d-15],g=ci[d-2],E=(0,Vn.rotr)(m,7)^(0,Vn.rotr)(m,18)^m>>>3,T=(0,Vn.rotr)(g,17)^(0,Vn.rotr)(g,19)^g>>>10;ci[d]=T+ci[d-7]+E+ci[d-16]|0}let{A:r,B:i,C:o,D:s,E:a,F:c,G:u,H:h}=this;for(let d=0;d<64;d++){const m=(0,Vn.rotr)(a,6)^(0,Vn.rotr)(a,11)^(0,Vn.rotr)(a,25),g=h+m+Pw(a,c,u)+Lw[d]+ci[d]|0,T=((0,Vn.rotr)(r,2)^(0,Vn.rotr)(r,13)^(0,Vn.rotr)(r,22))+xw(r,i,o)|0;h=u,u=c,c=a,a=s+g|0,s=o,o=i,i=r,r=g+T|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,h=h+this.H|0,this.set(r,i,o,s,a,c,u,h)}roundClean(){ci.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class Dw extends mb{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Gi.sha256=(0,Vn.wrapConstructor)(()=>new mb);Gi.sha224=(0,Vn.wrapConstructor)(()=>new Dw);var $d={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=fw,n=BigInt(0),r=BigInt(1),i=BigInt(2),o=BigInt(3),s=BigInt(8),a=Object.freeze({a:n,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:r,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=a;const c=(R,_)=>(R+_/i)/_,u={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(R){const{n:_}=a,A=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),x=-r*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),z=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ee=A,me=BigInt("0x100000000000000000000000000000000"),be=c(ee*R,_),Le=c(-x*R,_);let Ne=se(R-be*A-Le*z,_),Ve=se(-be*x-Le*ee,_);const ut=Ne>me,lt=Ve>me;if(ut&&(Ne=_-Ne),lt&&(Ve=_-Ve),Ne>me||Ve>me)throw new Error("splitScalarEndo: Endomorphism failed, k="+R);return{k1neg:ut,k1:Ne,k2neg:lt,k2:Ve}}},h=32,d=32,m=32,g=h+1,E=2*h+1;function T(R){const{a:_,b:A}=a,x=se(R*R),z=se(x*R);return se(z+_*R+A)}const L=a.a===n;class H extends Error{constructor(_){super(_)}}function K(R){if(!(R instanceof V))throw new TypeError("JacobianPoint expected")}class V{constructor(_,A,x){this.x=_,this.y=A,this.z=x}static fromAffine(_){if(!(_ instanceof D))throw new TypeError("JacobianPoint#fromAffine: expected Point");return _.equals(D.ZERO)?V.ZERO:new V(_.x,_.y,r)}static toAffineBatch(_){const A=tn(_.map(x=>x.z));return _.map((x,z)=>x.toAffine(A[z]))}static normalizeZ(_){return V.toAffineBatch(_).map(V.fromAffine)}equals(_){K(_);const{x:A,y:x,z}=this,{x:ee,y:me,z:be}=_,Le=se(z*z),Ne=se(be*be),Ve=se(A*Ne),ut=se(ee*Le),lt=se(se(x*be)*Ne),$t=se(se(me*z)*Le);return Ve===ut&&lt===$t}negate(){return new V(this.x,se(-this.y),this.z)}double(){const{x:_,y:A,z:x}=this,z=se(_*_),ee=se(A*A),me=se(ee*ee),be=_+ee,Le=se(i*(se(be*be)-z-me)),Ne=se(o*z),Ve=se(Ne*Ne),ut=se(Ve-i*Le),lt=se(Ne*(Le-ut)-s*me),$t=se(i*A*x);return new V(ut,lt,$t)}add(_){K(_);const{x:A,y:x,z}=this,{x:ee,y:me,z:be}=_;if(ee===n||me===n)return this;if(A===n||x===n)return _;const Le=se(z*z),Ne=se(be*be),Ve=se(A*Ne),ut=se(ee*Le),lt=se(se(x*be)*Ne),$t=se(se(me*z)*Le),Ht=se(ut-Ve),on=se($t-lt);if(Ht===n)return on===n?this.double():V.ZERO;const ni=se(Ht*Ht),Mr=se(Ht*ni),ri=se(Ve*ni),fo=se(on*on-Mr-i*ri),An=se(on*(ri-fo)-lt*Mr),Ni=se(z*be*Ht);return new V(fo,An,Ni)}subtract(_){return this.add(_.negate())}multiplyUnsafe(_){const A=V.ZERO;if(typeof _=="bigint"&&_===n)return A;let x=Xe(_);if(x===r)return this;if(!L){let ut=A,lt=this;for(;x>n;)x&r&&(ut=ut.add(lt)),lt=lt.double(),x>>=r;return ut}let{k1neg:z,k1:ee,k2neg:me,k2:be}=u.splitScalar(x),Le=A,Ne=A,Ve=this;for(;ee>n||be>n;)ee&r&&(Le=Le.add(Ve)),be&r&&(Ne=Ne.add(Ve)),Ve=Ve.double(),ee>>=r,be>>=r;return z&&(Le=Le.negate()),me&&(Ne=Ne.negate()),Ne=new V(se(Ne.x*u.beta),Ne.y,Ne.z),Le.add(Ne)}precomputeWindow(_){const A=L?128/_+1:256/_+1,x=[];let z=this,ee=z;for(let me=0;me<A;me++){ee=z,x.push(ee);for(let be=1;be<2**(_-1);be++)ee=ee.add(z),x.push(ee);z=ee.double()}return x}wNAF(_,A){!A&&this.equals(V.BASE)&&(A=D.BASE);const x=A&&A._WINDOW_SIZE||1;if(256%x)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let z=A&&J.get(A);z||(z=this.precomputeWindow(x),A&&x!==1&&(z=V.normalizeZ(z),J.set(A,z)));let ee=V.ZERO,me=V.BASE;const be=1+(L?128/x:256/x),Le=2**(x-1),Ne=BigInt(2**x-1),Ve=2**x,ut=BigInt(x);for(let lt=0;lt<be;lt++){const $t=lt*Le;let Ht=Number(_&Ne);_>>=ut,Ht>Le&&(Ht-=Ve,_+=r);const on=$t,ni=$t+Math.abs(Ht)-1,Mr=lt%2!==0,ri=Ht<0;Ht===0?me=me.add(F(Mr,z[on])):ee=ee.add(F(ri,z[ni]))}return{p:ee,f:me}}multiply(_,A){let x=Xe(_),z,ee;if(L){const{k1neg:me,k1:be,k2neg:Le,k2:Ne}=u.splitScalar(x);let{p:Ve,f:ut}=this.wNAF(be,A),{p:lt,f:$t}=this.wNAF(Ne,A);Ve=F(me,Ve),lt=F(Le,lt),lt=new V(se(lt.x*u.beta),lt.y,lt.z),z=Ve.add(lt),ee=ut.add($t)}else{const{p:me,f:be}=this.wNAF(x,A);z=me,ee=be}return V.normalizeZ([z,ee])[0]}toAffine(_){const{x:A,y:x,z}=this,ee=this.equals(V.ZERO);_==null&&(_=ee?s:Et(z));const me=_,be=se(me*me),Le=se(be*me),Ne=se(A*be),Ve=se(x*Le),ut=se(z*me);if(ee)return D.ZERO;if(ut!==r)throw new Error("invZ was invalid");return new D(Ne,Ve)}}V.BASE=new V(a.Gx,a.Gy,r),V.ZERO=new V(n,r,n);function F(R,_){const A=_.negate();return R?A:_}const J=new WeakMap;class D{constructor(_,A){this.x=_,this.y=A}_setWindowSize(_){this._WINDOW_SIZE=_,J.delete(this)}hasEvenY(){return this.y%i===n}static fromCompressedHex(_){const A=_.length===32,x=he(A?_:_.subarray(1));if(!nt(x))throw new Error("Point is not on curve");const z=T(x);let ee=vt(z);const me=(ee&r)===r;A?me&&(ee=se(-ee)):(_[0]&1)===1!==me&&(ee=se(-ee));const be=new D(x,ee);return be.assertValidity(),be}static fromUncompressedHex(_){const A=he(_.subarray(1,h+1)),x=he(_.subarray(h+1,h*2+1)),z=new D(A,x);return z.assertValidity(),z}static fromHex(_){const A=Se(_),x=A.length,z=A[0];if(x===h)return this.fromCompressedHex(A);if(x===g&&(z===2||z===3))return this.fromCompressedHex(A);if(x===E&&z===4)return this.fromUncompressedHex(A);throw new Error(`Point.fromHex: received invalid point. Expected 32-${g} compressed bytes or ${E} uncompressed bytes, not ${x}`)}static fromPrivateKey(_){return D.BASE.multiply(Ke(_))}static fromSignature(_,A,x){const{r:z,s:ee}=xt(A);if(![0,1,2,3].includes(x))throw new Error("Cannot recover: invalid recovery bit");const me=$n(Se(_)),{n:be}=a,Le=x===2||x===3?z+be:z,Ne=Et(Le,be),Ve=se(-me*Ne,be),ut=se(ee*Ne,be),lt=x&1?"03":"02",$t=D.fromHex(lt+ce(Le)),Ht=D.BASE.multiplyAndAddUnsafe($t,Ve,ut);if(!Ht)throw new Error("Cannot recover signature: point at infinify");return Ht.assertValidity(),Ht}toRawBytes(_=!1){return ge(this.toHex(_))}toHex(_=!1){const A=ce(this.x);return _?`${this.hasEvenY()?"02":"03"}${A}`:`04${A}${ce(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const _="Point is not on elliptic curve",{x:A,y:x}=this;if(!nt(A)||!nt(x))throw new Error(_);const z=se(x*x),ee=T(A);if(se(z-ee)!==n)throw new Error(_)}equals(_){return this.x===_.x&&this.y===_.y}negate(){return new D(this.x,se(-this.y))}double(){return V.fromAffine(this).double().toAffine()}add(_){return V.fromAffine(this).add(V.fromAffine(_)).toAffine()}subtract(_){return this.add(_.negate())}multiply(_){return V.fromAffine(this).multiply(_,this).toAffine()}multiplyAndAddUnsafe(_,A,x){const z=V.fromAffine(this),ee=A===n||A===r||this!==D.BASE?z.multiplyUnsafe(A):z.multiply(A),me=V.fromAffine(_).multiplyUnsafe(x),be=ee.add(me);return be.equals(V.ZERO)?void 0:be.toAffine()}}e.Point=D,D.BASE=new D(a.Gx,a.Gy),D.ZERO=new D(n,n);function W(R){return Number.parseInt(R[0],16)>=8?"00"+R:R}function ue(R){if(R.length<2||R[0]!==2)throw new Error(`Invalid signature integer tag: ${ie(R)}`);const _=R[1],A=R.subarray(2,_+2);if(!_||A.length!==_)throw new Error("Invalid signature integer: wrong length");if(A[0]===0&&A[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:he(A),left:R.subarray(_+2)}}function P(R){if(R.length<2||R[0]!=48)throw new Error(`Invalid signature tag: ${ie(R)}`);if(R[1]!==R.length-2)throw new Error("Invalid signature: incorrect length");const{data:_,left:A}=ue(R.subarray(2)),{data:x,left:z}=ue(A);if(z.length)throw new Error(`Invalid signature: left bytes after parsing: ${ie(z)}`);return{r:_,s:x}}class ${constructor(_,A){this.r=_,this.s=A,this.assertValidity()}static fromCompact(_){const A=_ instanceof Uint8Array,x="Signature.fromCompact";if(typeof _!="string"&&!A)throw new TypeError(`${x}: Expected string or Uint8Array`);const z=A?ie(_):_;if(z.length!==128)throw new Error(`${x}: Expected 64-byte hex`);return new $(_e(z.slice(0,64)),_e(z.slice(64,128)))}static fromDER(_){const A=_ instanceof Uint8Array;if(typeof _!="string"&&!A)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:x,s:z}=P(A?_:ge(_));return new $(x,z)}static fromHex(_){return this.fromDER(_)}assertValidity(){const{r:_,s:A}=this;if(!Gt(_))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Gt(A))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const _=a.n>>r;return this.s>_}normalizeS(){return this.hasHighS()?new $(this.r,se(-this.s,a.n)):this}toDERRawBytes(){return ge(this.toDERHex())}toDERHex(){const _=W(X(this.s)),A=W(X(this.r)),x=_.length/2,z=A.length/2,ee=X(x),me=X(z);return`30${X(z+x+4)}02${me}${A}02${ee}${_}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ge(this.toCompactHex())}toCompactHex(){return ce(this.r)+ce(this.s)}}e.Signature=$;function G(...R){if(!R.every(x=>x instanceof Uint8Array))throw new Error("Uint8Array list expected");if(R.length===1)return R[0];const _=R.reduce((x,z)=>x+z.length,0),A=new Uint8Array(_);for(let x=0,z=0;x<R.length;x++){const ee=R[x];A.set(ee,z),z+=ee.length}return A}const q=Array.from({length:256},(R,_)=>_.toString(16).padStart(2,"0"));function ie(R){if(!(R instanceof Uint8Array))throw new Error("Expected Uint8Array");let _="";for(let A=0;A<R.length;A++)_+=q[R[A]];return _}const fe=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function ce(R){if(typeof R!="bigint")throw new Error("Expected bigint");if(!(n<=R&&R<fe))throw new Error("Expected number 0 <= n < 2^256");return R.toString(16).padStart(64,"0")}function re(R){const _=ge(ce(R));if(_.length!==32)throw new Error("Error: expected 32 bytes");return _}function X(R){const _=R.toString(16);return _.length&1?`0${_}`:_}function _e(R){if(typeof R!="string")throw new TypeError("hexToNumber: expected string, got "+typeof R);return BigInt(`0x${R}`)}function ge(R){if(typeof R!="string")throw new TypeError("hexToBytes: expected string, got "+typeof R);if(R.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+R.length);const _=new Uint8Array(R.length/2);for(let A=0;A<_.length;A++){const x=A*2,z=R.slice(x,x+2),ee=Number.parseInt(z,16);if(Number.isNaN(ee)||ee<0)throw new Error("Invalid byte sequence");_[A]=ee}return _}function he(R){return _e(ie(R))}function Se(R){return R instanceof Uint8Array?Uint8Array.from(R):ge(R)}function Xe(R){if(typeof R=="number"&&Number.isSafeInteger(R)&&R>0)return BigInt(R);if(typeof R=="bigint"&&Gt(R))return R;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function se(R,_=a.P){const A=R%_;return A>=n?A:_+A}function He(R,_){const{P:A}=a;let x=R;for(;_-- >n;)x*=x,x%=A;return x}function vt(R){const{P:_}=a,A=BigInt(6),x=BigInt(11),z=BigInt(22),ee=BigInt(23),me=BigInt(44),be=BigInt(88),Le=R*R*R%_,Ne=Le*Le*R%_,Ve=He(Ne,o)*Ne%_,ut=He(Ve,o)*Ne%_,lt=He(ut,i)*Le%_,$t=He(lt,x)*lt%_,Ht=He($t,z)*$t%_,on=He(Ht,me)*Ht%_,ni=He(on,be)*on%_,Mr=He(ni,me)*Ht%_,ri=He(Mr,o)*Ne%_,fo=He(ri,ee)*$t%_,An=He(fo,A)*Le%_,Ni=He(An,i);if(Ni*Ni%_!==R)throw new Error("Cannot find square root");return Ni}function Et(R,_=a.P){if(R===n||_<=n)throw new Error(`invert: expected positive integers, got n=${R} mod=${_}`);let A=se(R,_),x=_,z=n,ee=r;for(;A!==n;){const be=x/A,Le=x%A,Ne=z-ee*be;x=A,A=Le,z=ee,ee=Ne}if(x!==r)throw new Error("invert: does not exist");return se(z,_)}function tn(R,_=a.P){const A=new Array(R.length),x=R.reduce((ee,me,be)=>me===n?ee:(A[be]=ee,se(ee*me,_)),r),z=Et(x,_);return R.reduceRight((ee,me,be)=>me===n?ee:(A[be]=se(ee*A[be],_),se(ee*me,_)),z),A}function nn(R){const _=R.length*8-d*8,A=he(R);return _>0?A>>BigInt(_):A}function $n(R,_=!1){const A=nn(R);if(_)return A;const{n:x}=a;return A>=x?A-x:A}let Me,ht;class gt{constructor(_,A){if(this.hashLen=_,this.qByteLen=A,typeof _!="number"||_<2)throw new Error("hashLen must be a number");if(typeof A!="number"||A<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(_).fill(1),this.k=new Uint8Array(_).fill(0),this.counter=0}hmac(..._){return e.utils.hmacSha256(this.k,..._)}hmacSync(..._){return ht(this.k,..._)}checkSync(){if(typeof ht!="function")throw new H("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(_=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),_),this.v=await this.hmac(this.v),_.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),_),this.v=await this.hmac(this.v))}reseedSync(_=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),_),this.v=this.hmacSync(this.v),_.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),_),this.v=this.hmacSync(this.v))}async generate(){this.incr();let _=0;const A=[];for(;_<this.qByteLen;){this.v=await this.hmac(this.v);const x=this.v.slice();A.push(x),_+=this.v.length}return G(...A)}generateSync(){this.checkSync(),this.incr();let _=0;const A=[];for(;_<this.qByteLen;){this.v=this.hmacSync(this.v);const x=this.v.slice();A.push(x),_+=this.v.length}return G(...A)}}function Gt(R){return n<R&&R<a.n}function nt(R){return n<R&&R<a.P}function rt(R,_,A,x=!0){const{n:z}=a,ee=$n(R,!0);if(!Gt(ee))return;const me=Et(ee,z),be=D.BASE.multiply(ee),Le=se(be.x,z);if(Le===n)return;const Ne=se(me*se(_+A*Le,z),z);if(Ne===n)return;let Ve=new $(Le,Ne),ut=(be.x===Ve.r?0:2)|Number(be.y&r);return x&&Ve.hasHighS()&&(Ve=Ve.normalizeS(),ut^=1),{sig:Ve,recovery:ut}}function Ke(R){let _;if(typeof R=="bigint")_=R;else if(typeof R=="number"&&Number.isSafeInteger(R)&&R>0)_=BigInt(R);else if(typeof R=="string"){if(R.length!==2*d)throw new Error("Expected 32 bytes of private key");_=_e(R)}else if(R instanceof Uint8Array){if(R.length!==d)throw new Error("Expected 32 bytes of private key");_=he(R)}else throw new TypeError("Expected valid private key");if(!Gt(_))throw new Error("Expected private key: 0 < key < n");return _}function gn(R){return R instanceof D?(R.assertValidity(),R):D.fromHex(R)}function xt(R){if(R instanceof $)return R.assertValidity(),R;try{return $.fromDER(R)}catch{return $.fromCompact(R)}}function ei(R,_=!1){return D.fromPrivateKey(R).toRawBytes(_)}e.getPublicKey=ei;function Ze(R,_,A,x=!1){return D.fromSignature(R,_,A).toRawBytes(x)}e.recoverPublicKey=Ze;function rn(R){const _=R instanceof Uint8Array,A=typeof R=="string",x=(_||A)&&R.length;return _?x===g||x===E:A?x===g*2||x===E*2:R instanceof D}function et(R,_,A=!1){if(rn(R))throw new TypeError("getSharedSecret: first arg must be private key");if(!rn(_))throw new TypeError("getSharedSecret: second arg must be public key");const x=gn(_);return x.assertValidity(),x.multiply(Ke(R)).toRawBytes(A)}e.getSharedSecret=et;function Lt(R){const _=R.length>h?R.slice(0,h):R;return he(_)}function at(R){const _=Lt(R),A=se(_,a.n);return Pn(A<n?_:A)}function Pn(R){return re(R)}function fs(R,_,A){if(R==null)throw new Error(`sign: expected valid message hash, not "${R}"`);const x=Se(R),z=Ke(_),ee=[Pn(z),at(x)];if(A!=null){A===!0&&(A=e.utils.randomBytes(h));const Le=Se(A);if(Le.length!==h)throw new Error(`sign: Expected ${h} bytes of extra data`);ee.push(Le)}const me=G(...ee),be=Lt(x);return{seed:me,m:be,d:z}}function hs(R,_){const{sig:A,recovery:x}=R,{der:z,recovered:ee}=Object.assign({canonical:!0,der:!0},_),me=z?A.toDERRawBytes():A.toCompactRawBytes();return ee?[me,x]:me}async function In(R,_,A={}){const{seed:x,m:z,d:ee}=fs(R,_,A.extraEntropy),me=new gt(m,d);await me.reseed(x);let be;for(;!(be=rt(await me.generate(),z,ee,A.canonical));)await me.reseed();return hs(be,A)}e.sign=In;function Mi(R,_,A={}){const{seed:x,m:z,d:ee}=fs(R,_,A.extraEntropy),me=new gt(m,d);me.reseedSync(x);let be;for(;!(be=rt(me.generateSync(),z,ee,A.canonical));)me.reseedSync();return hs(be,A)}e.signSync=Mi;const Cr={strict:!0};function co(R,_,A,x=Cr){let z;try{z=xt(R),_=Se(_)}catch{return!1}const{r:ee,s:me}=z;if(x.strict&&z.hasHighS())return!1;const be=$n(_);let Le;try{Le=gn(A)}catch{return!1}const{n:Ne}=a,Ve=Et(me,Ne),ut=se(be*Ve,Ne),lt=se(ee*Ve,Ne),$t=D.BASE.multiplyAndAddUnsafe(Le,ut,lt);return $t?se($t.x,Ne)===ee:!1}e.verify=co;function Wn(R){return se(he(R),a.n)}class Rr{constructor(_,A){this.r=_,this.s=A,this.assertValidity()}static fromHex(_){const A=Se(_);if(A.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${A.length}`);const x=he(A.subarray(0,32)),z=he(A.subarray(32,64));return new Rr(x,z)}assertValidity(){const{r:_,s:A}=this;if(!nt(_)||!Gt(A))throw new Error("Invalid signature")}toHex(){return ce(this.r)+ce(this.s)}toRawBytes(){return ge(this.toHex())}}function zn(R){return D.fromPrivateKey(R).toRawX()}class uo{constructor(_,A,x=e.utils.randomBytes()){if(_==null)throw new TypeError(`sign: Expected valid message, not "${_}"`);this.m=Se(_);const{x:z,scalar:ee}=this.getScalar(Ke(A));if(this.px=z,this.d=ee,this.rand=Se(x),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(_){const A=D.fromPrivateKey(_),x=A.hasEvenY()?_:a.n-_;return{point:A,scalar:x,x:A.toRawX()}}initNonce(_,A){return re(_^he(A))}finalizeNonce(_){const A=se(he(_),a.n);if(A===n)throw new Error("sign: Creation of signature failed. k is zero");const{point:x,x:z,scalar:ee}=this.getScalar(A);return{R:x,rx:z,k:ee}}finalizeSig(_,A,x,z){return new Rr(_.x,se(A+x*z,a.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:_,d:A,px:x,rand:z}=this,ee=e.utils.taggedHash,me=this.initNonce(A,await ee(Gn.aux,z)),{R:be,rx:Le,k:Ne}=this.finalizeNonce(await ee(Gn.nonce,me,x,_)),Ve=Wn(await ee(Gn.challenge,Le,x,_)),ut=this.finalizeSig(be,Ne,Ve,A);return await gs(ut,_,x)||this.error(),ut}calcSync(){const{m:_,d:A,px:x,rand:z}=this,ee=e.utils.taggedHashSync,me=this.initNonce(A,ee(Gn.aux,z)),{R:be,rx:Le,k:Ne}=this.finalizeNonce(ee(Gn.nonce,me,x,_)),Ve=Wn(ee(Gn.challenge,Le,x,_)),ut=this.finalizeSig(be,Ne,Ve,A);return pr(ut,_,x)||this.error(),ut}}async function ti(R,_,A){return new uo(R,_,A).calc()}function ps(R,_,A){return new uo(R,_,A).calcSync()}function ms(R,_,A){const x=R instanceof Rr,z=x?R:Rr.fromHex(R);return x&&z.assertValidity(),{...z,m:Se(_),P:gn(A)}}function lo(R,_,A,x){const z=D.BASE.multiplyAndAddUnsafe(_,Ke(A),se(-x,a.n));return!(!z||!z.hasEvenY()||z.x!==R)}async function gs(R,_,A){try{const{r:x,s:z,m:ee,P:me}=ms(R,_,A),be=Wn(await e.utils.taggedHash(Gn.challenge,re(x),me.toRawX(),ee));return lo(x,me,z,be)}catch{return!1}}function pr(R,_,A){try{const{r:x,s:z,m:ee,P:me}=ms(R,_,A),be=Wn(e.utils.taggedHashSync(Gn.challenge,re(x),me.toRawX(),ee));return lo(x,me,z,be)}catch(x){if(x instanceof H)throw x;return!1}}e.schnorr={Signature:Rr,getPublicKey:zn,sign:ti,verify:gs,signSync:ps,verifySync:pr},D.BASE._setWindowSize(8);const bt={node:t,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Gn={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},Qn={};e.utils={bytesToHex:ie,hexToBytes:ge,concatBytes:G,mod:se,invert:Et,isValidPrivateKey(R){try{return Ke(R),!0}catch{return!1}},_bigintTo32Bytes:re,_normalizePrivateKey:Ke,hashToPrivateKey:R=>{R=Se(R);const _=d+8;if(R.length<_||R.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const A=se(he(R),a.n-r)+r;return re(A)},randomBytes:(R=32)=>{if(bt.web)return bt.web.getRandomValues(new Uint8Array(R));if(bt.node){const{randomBytes:_}=bt.node;return Uint8Array.from(_(R))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(d+8)),precompute(R=8,_=D.BASE){const A=_===D.BASE?_:new D(_.x,_.y);return A._setWindowSize(R),A.multiply(o),A},sha256:async(...R)=>{if(bt.web){const _=await bt.web.subtle.digest("SHA-256",G(...R));return new Uint8Array(_)}else if(bt.node){const{createHash:_}=bt.node,A=_("sha256");return R.forEach(x=>A.update(x)),Uint8Array.from(A.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(R,..._)=>{if(bt.web){const A=await bt.web.subtle.importKey("raw",R,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),x=G(..._),z=await bt.web.subtle.sign("HMAC",A,x);return new Uint8Array(z)}else if(bt.node){const{createHmac:A}=bt.node,x=A("sha256",R);return _.forEach(z=>x.update(z)),Uint8Array.from(x.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(R,..._)=>{let A=Qn[R];if(A===void 0){const x=await e.utils.sha256(Uint8Array.from(R,z=>z.charCodeAt(0)));A=G(x,x),Qn[R]=A}return e.utils.sha256(A,..._)},taggedHashSync:(R,..._)=>{if(typeof Me!="function")throw new H("sha256Sync is undefined, you need to set it");let A=Qn[R];if(A===void 0){const x=Me(Uint8Array.from(R,z=>z.charCodeAt(0)));A=G(x,x),Qn[R]=A}return Me(A,..._)},_JacobianPoint:V},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Me},set(R){Me||(Me=R)}},hmacSha256Sync:{configurable:!1,get(){return ht},set(R){ht||(ht=R)}}})})($d);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const t=lb,n=Gi,r=$d;var i=$d;Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),r.utils.hmacSha256Sync=(o,...s)=>{const a=t.hmac.create(n.sha256,o);return s.forEach(c=>a.update(c)),a.digest()}})(lh);var Ye={};function Up(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var iu={exports:{}};iu.exports;(function(e,t){var n=le&&le.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const r=n(ln),i=Po,o=r.default.bool;t.assertBool=o;const s=r.default.bytes;t.assertBytes=s;var a=Po;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return a.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return a.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return a.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return a.utf8ToBytes}});function c(m){if(!(m instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof m}`);return new TextDecoder().decode(m)}t.bytesToUtf8=c;function u(m){const g=m.startsWith("0x")?m.substring(2):m;return(0,i.hexToBytes)(g)}t.hexToBytes=u;function h(m,g){if(m.length!==g.length)return!1;for(let E=0;E<m.length;E++)if(m[E]!==g[E])return!1;return!0}t.equalsBytes=h;function d(m){return g=>(r.default.bytes(g),m(g))}t.wrapHash=d,t.crypto=(()=>{const m=typeof self=="object"&&"crypto"in self?self.crypto:void 0,g=typeof Up=="function"&&Up.bind(e);return{node:g&&!m?g("crypto"):void 0,web:m}})()})(iu,iu.exports);var Bw=iu.exports,Fw=le&&le.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Hw=le&&le.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Uw=le&&le.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Fw(t,e,n);return Hw(t,e),t};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.contextRandomize=Ye.ecdh=Ye.signatureNormalize=Ye.signatureImport=Ye.signatureExport=Ye.privateKeyTweakMul=Ye.publicKeyTweakMul=Ye.publicKeyTweakAdd=Ye.publicKeyCombine=Ye.publicKeyNegate=Ye.privateKeyNegate=Ye.privateKeyTweakAdd=Ye.ecdsaVerify=Ye.ecdsaRecover=Ye.ecdsaSign=Ye.publicKeyConvert=Ye.publicKeyVerify=Ye.publicKeyCreate=Ye.privateKeyVerify=Ye.createPrivateKey=Ye.createPrivateKeySync=void 0;const jw=Gi,Bt=Uw(lh),Ge=Bw;function $w(e){if(typeof e!="string")throw new TypeError("hexToNumber: expected string, got "+typeof e);return BigInt(`0x${e}`)}const _i=e=>$w((0,Ge.toHex)(e)),Ju=e=>e.toString(16).padStart(64,"0"),Wd=e=>(0,Ge.hexToBytes)(Ju(e)),{mod:gb}=Bt.utils,or=Bt.CURVE.n;function Yn(e=r=>new Uint8Array(r),t,n){return typeof e=="function"&&(e=e(t)),(0,Ge.assertBytes)(e,t),n&&e.set(n),e}function Hs(e){return(0,Ge.assertBytes)(e,64),Bt.Signature.fromCompact(e)}function yb(){return Bt.utils.randomPrivateKey()}Ye.createPrivateKeySync=yb;async function Ww(){return yb()}Ye.createPrivateKey=Ww;function zw(e){return(0,Ge.assertBytes)(e,32),Bt.utils.isValidPrivateKey(e)}Ye.privateKeyVerify=zw;function Gw(e,t=!0,n){(0,Ge.assertBytes)(e,32),(0,Ge.assertBool)(t);const r=Bt.getPublicKey(e,t);return Yn(n,t?33:65,r)}Ye.publicKeyCreate=Gw;function Vw(e){(0,Ge.assertBytes)(e,33,65);try{return Bt.Point.fromHex(e),!0}catch{return!1}}Ye.publicKeyVerify=Vw;function qw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Bt.Point.fromHex(e).toRawBytes(t);return Yn(n,t?33:65,r)}Ye.publicKeyConvert=qw;function Yw(e,t,n={noncefn:void 0,data:void 0},r){if((0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(n&&(n.noncefn!==void 0||n.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[i,o]=Bt.signSync(e,t,{recovered:!0,der:!1});return{signature:Yn(r,64,i),recid:o}}Ye.ecdsaSign=Yw;function Xw(e,t,n,r=!0,i){(0,Ge.assertBytes)(n,32),(0,Ge.assertBool)(r);const o=Hs(e).toHex(),s=Bt.Point.fromSignature(n,o,t);return Yn(i,r?33:65,s.toRawBytes(r))}Ye.ecdsaRecover=Xw;function Kw(e,t,n){(0,Ge.assertBytes)(e,64),(0,Ge.assertBytes)(t,32),(0,Ge.assertBytes)(n,33,65),(0,Ge.assertBytes)(e,64);const r=_i(e.slice(0,32)),i=_i(e.slice(32,64));if(r>=or||i>=or)throw new Error("Cannot parse signature");const o=Bt.Point.fromHex(n);let s;try{s=Hs(e)}catch{return!1}return Bt.verify(s,t,o)}Ye.ecdsaVerify=Kw;function Jw(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);let n=_i(t);if(n===0n)throw new Error("Tweak must not be zero");if(n>=or)throw new Error("Tweak bigger than curve order");if(n+=_i(e),n>=or&&(n-=or),n===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Ju(n))),e}Ye.privateKeyTweakAdd=Jw;function Zw(e){(0,Ge.assertBytes)(e,32);const t=gb(-_i(e),or);return e.set((0,Ge.hexToBytes)(Ju(t))),e}Ye.privateKeyNegate=Zw;function Qw(e,t=!0,n){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBool)(t);const r=Bt.Point.fromHex(e).negate();return Yn(n,t?33:65,r.toRawBytes(t))}Ye.publicKeyNegate=Qw;function e1(e,t=!0,n){if(!Array.isArray(e)||!e.length)throw new TypeError(`Expected array with one or more items, not ${e}`);for(const i of e)(0,Ge.assertBytes)(i,33,65);(0,Ge.assertBool)(t);const r=e.map(i=>Bt.Point.fromHex(i)).reduce((i,o)=>i.add(o),Bt.Point.ZERO);if(r.equals(Bt.Point.ZERO))throw new Error("Combined result must not be zero");return Yn(n,t?33:65,r.toRawBytes(t))}Ye.publicKeyCombine=e1;function t1(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=Bt.Point.fromHex(e),o=Bt.Point.fromPrivateKey(t),s=i.add(o);if(o.equals(Bt.Point.ZERO)||s.equals(Bt.Point.ZERO))throw new Error("Tweak must not be zero");return Yn(r,n?33:65,s.toRawBytes(n))}Ye.publicKeyTweakAdd=t1;function n1(e,t,n=!0,r){(0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),(0,Ge.assertBool)(n);const i=_i(t);if(i===0n)throw new Error("Tweak must not be zero");if(i<=1||i>=or)throw new Error("Tweak is zero or bigger than curve order");const o=Bt.Point.fromHex(e).multiply(i);return Yn(r,n?33:65,o.toRawBytes(n))}Ye.publicKeyTweakMul=n1;function r1(e,t){(0,Ge.assertBytes)(e,32),(0,Ge.assertBytes)(t,32);const n=_i(t);if(n<=1||n>=or)throw new Error("Tweak is zero or bigger than curve order");const r=gb(n*_i(e),or);if(r===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return e.set((0,Ge.hexToBytes)(Ju(r))),e}Ye.privateKeyTweakMul=r1;function i1(e,t){const n=Hs(e).toRawBytes();return Yn(t,72,Hs(e).toRawBytes()).slice(0,n.length)}Ye.signatureExport=i1;function o1(e,t){(0,Ge.assertBytes)(e);const n=Bt.Signature.fromDER(e);return Yn(t,64,(0,Ge.hexToBytes)(n.toCompactHex()))}Ye.signatureImport=o1;function s1(e){const t=Hs(e);return t.s>or/2n&&e.set(Wd(or-t.s),32),e}Ye.signatureNormalize=s1;function a1(e,t,n={},r){if((0,Ge.assertBytes)(e,33,65),(0,Ge.assertBytes)(t,32),typeof n!="object"||n===null)throw new TypeError("secp256k1.ecdh: options should be object");n.data!==void 0&&(0,Ge.assertBytes)(n.data);const i=Bt.Point.fromHex(Bt.getSharedSecret(t,e));if(n.hashfn===void 0)return Yn(r,32,(0,jw.sha256)(i.toRawBytes(!0)));if(typeof n.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");n.xbuf!==void 0&&(0,Ge.assertBytes)(n.xbuf,32),n.ybuf!==void 0&&(0,Ge.assertBytes)(n.ybuf,32),(0,Ge.assertBytes)(r,32);const o=n.xbuf||new Uint8Array(32);o.set(Wd(i.x));const s=n.ybuf||new Uint8Array(32);s.set(Wd(i.y));const a=n.hashfn(o,s,n.data);if(!(a instanceof Uint8Array)||a.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return Yn(r,32,a)}Ye.ecdh=a1;function c1(e){e!==null&&(0,Ge.assertBytes)(e,32)}Ye.contextRandomize=c1;Object.defineProperty(pn,"__esModule",{value:!0});pn.createUnsafeIdentity=pn.computeAddress=pn.ethSign=pn.createEthereumMessageHash=pn.sign=pn.recoverAddressFromEthSignature=pn.recoverPublicKey=void 0;const Bn=Fu,jp=lh,_b=Ye;function bb(e,t){if(e.length!==65)throw new Error("Invalid signature length"+e.length);const n=e.slice(0,e.length-1),r=e[64]===28?1:0;return(0,_b.ecdsaRecover)(n,r,t,!1).slice(1)}pn.recoverPublicKey=bb;function u1(e){if(e.length!==65)throw new Error("Invalid ethereum signature");const t=e[64];if(t===0||t===1){const n=new Uint8Array(e);return n[64]=t+27,n}return e}function vb(e,t){if(typeof e=="string"){if((0,Bn.isHex)(e))return vb((0,Bn.hexToBytes)(e),t);throw new Error("String signatures must be encoded in hex")}return hh(bb(u1(e),fh(t)))}pn.recoverAddressFromEthSignature=vb;function Eb(e,t){const n=(0,_b.ecdsaSign)(t,e),r=n.recid===1?"1c":"1b";return(0,Bn.toHex)(n.signature)+r}pn.sign=Eb;function fh(e){const t=typeof e=="string"?(0,Bn.stringToUtf8Bytes)(e):e,n=(0,Bn.concatBytes)((0,Bn.stringToUtf8Bytes)(`Ethereum Signed Message:
14
+ `),(0,Bn.stringToUtf8Bytes)(String(t.length)),t);return(0,Bn.hexToBytes)((0,Bn.sha3)(n))}pn.createEthereumMessageHash=fh;function l1(e,t){return Eb(e,fh(t))}pn.ethSign=l1;function hh(e){const t=e.length===65&&e[0]===4?e.slice(1):e;return(0,Bn.getAddress)((0,Bn.sha3)(t).substring(24))}pn.computeAddress=hh;function d1(){const e=jp.utils.randomPrivateKey(),t=(0,jp.getPublicKey)(e).slice(1),n=hh(t);return{privateKey:(0,Bn.bytesToHex)(e),publicKey:(0,Bn.bytesToHex)(t),address:n}}pn.createUnsafeIdentity=d1;(function(e){var t=le&&le.__createBinding||(Object.create?function(P,$,G,q){q===void 0&&(q=G);var ie=Object.getOwnPropertyDescriptor($,G);(!ie||("get"in ie?!$.__esModule:ie.writable||ie.configurable))&&(ie={enumerable:!0,get:function(){return $[G]}}),Object.defineProperty(P,q,ie)}:function(P,$,G,q){q===void 0&&(q=G),P[q]=$[G]}),n=le&&le.__setModuleDefault||(Object.create?function(P,$){Object.defineProperty(P,"default",{enumerable:!0,value:$})}:function(P,$){P.default=$}),r=le&&le.__importStar||function(P){if(P&&P.__esModule)return P;var $={};if(P!=null)for(var G in P)G!=="default"&&Object.prototype.hasOwnProperty.call(P,G)&&t($,P,G);return n($,P),$},i=le&&le.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const o=r(Fu),s=Hu,a=i_,c=Yu,u=i(uh),h=pn;e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const d=132;var m;(function(P){async function $(he,Se,Xe,se=Date.now()){let He="";if(!P.isValidAuthChain(Se))return{ok:!1,message:"ERROR: Malformed authChain"};for(const Et of Se){const tn=ue(Et.type);try{const{nextAuthority:nn}=await tn(He,Et,{provider:Xe,dateToValidateExpirationInMillis:se});He=nn||""}catch(nn){return{ok:!1,message:`ERROR. Link type: ${Et.type}. ${nn.message}.`}}}const vt=He===he;return{ok:vt,message:vt?void 0:`ERROR: Invalid final authority. Expected: ${he}. Current ${He}.`}}P.validateSignature=$;function G(he){for(const[Se,Xe]of he.entries())if(Se===0&&Xe.type!==a.AuthLinkType.SIGNER||Xe.type===a.AuthLinkType.SIGNER&&Se!==0)return!1;return!0}P.isValidAuthChain=G;function q(he){return(0,o.hexToBytes)((0,o.sha3)((0,o.stringToUtf8Bytes)(he)))}P.createEIP1271MessageHash=q;function ie(he,Se,Xe){return[{type:a.AuthLinkType.SIGNER,payload:Se,signature:""},{type:F(Xe),payload:he,signature:Xe}]}P.createSimpleAuthChain=ie;function fe(he,Se,Xe,se){const He=(0,c.moveMinutes)(Xe),vt=P.getEphemeralMessage(Se.address,He),Et=P.createSignature(he,vt),tn=P.createSignature(Se,se);return[{type:a.AuthLinkType.SIGNER,payload:he.address,signature:""},{type:a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:vt,signature:Et},{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:se,signature:tn}]}P.createAuthChain=fe;async function ce(he,Se,Xe,se){const He=new Date;He.setMinutes(He.getMinutes()+Xe);const vt=P.getEphemeralMessage(Se.address,He),Et=await se(vt),tn=[{type:a.AuthLinkType.SIGNER,payload:he,signature:""},{type:V(Et),payload:vt,signature:Et}];return{ephemeralIdentity:Se,expiration:He,authChain:tn}}P.initializeAuthChain=ce;function re(he,Se){const Xe=P.createSignature(he.ephemeralIdentity,Se);return[...he.authChain,{type:a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:Se,signature:Xe}]}P.signPayload=re,P.createEthereumMessageHash=h.createEthereumMessageHash;function X(he,Se){return(0,h.ethSign)((0,o.hexToBytes)(he.privateKey),Se)}P.createSignature=X;function _e(he){return he.length>0&&he[0].type===a.AuthLinkType.SIGNER?he[0].payload:"Invalid-Owner-Address"}P.ownerAddress=_e;function ge(he,Se){return`Decentraland Login
15
15
  Ephemeral address: ${he}
16
16
  Expiration: ${Se.toISOString()}`}P.getEphemeralMessage=ge})(m=e.Authenticator||(e.Authenticator={}));const g=async(P,$)=>({nextAuthority:$.payload});e.SIGNER_VALIDATOR=g;const E=async(P,$)=>{if(!$.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const G=(0,h.recoverAddressFromEthSignature)($.signature,$.payload),q=P.toLocaleLowerCase(),ie=G.toLocaleLowerCase();if(q===ie)return{nextAuthority:$.payload};throw new Error(`Invalid signer address. Expected: ${q}. Actual: ${ie}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=E;const T=async(P,$,G)=>{if(!$.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:q,ephemeralAddress:ie,expiration:fe}=J($.payload),ce=G.dateToValidateExpirationInMillis?G.dateToValidateExpirationInMillis:Date.now();if(fe>ce){const re=(0,h.recoverAddressFromEthSignature)($.signature,q),X=P.toLocaleLowerCase(),_e=re.toLocaleLowerCase();if(X===_e)return{nextAuthority:ie};throw new Error(`Invalid signer address. Expected: ${X}. Actual: ${_e}`)}throw new Error(`Ephemeral key expired. Expiration: ${fe}. Test: ${ce}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=T;const L=async(P,$,G)=>{if(!$.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:q,ephemeralAddress:ie,expiration:fe}=J($.payload),ce=G?.dateToValidateExpirationInMillis?G?.dateToValidateExpirationInMillis:Date.now();if(fe>ce&&await W(G.provider,P,q,$.signature,ce))return{nextAuthority:ie};throw new Error(`Ephemeral key expired. Expiration: ${fe}. Test: ${ce}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=L;const H=async(P,$,G)=>{if(!$.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await W(G.provider,P,$.payload,$.signature,G.dateToValidateExpirationInMillis))return{nextAuthority:$.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=H;const K=async(P,$)=>({error:"Error Validator."});function V(P){return P.length===d?a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:a.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=V;function F(P){return P.length===d?a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:a.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=F;function J(P){const $=P.replace(/\r/g,""),G=$.split(`
17
- `),q=G[1].substring(19),ie=G[2].substring(12),fe=Date.parse(ie);return{message:$,ephemeralAddress:q,expiration:fe}}e.parseEmphemeralPayload=J;async function D(P,$,G,q){const ie=m.createEIP1271MessageHash($),fe=(0,o.hexToBytes)(G);let ce;try{ce=(0,o.bytesToHex)(await P.isValidSignature(ie,fe,q))}catch{}if(ce===e.ERC1654_MAGIC_VALUE)return!0;const re=(0,h.createEthereumMessageHash)($);try{ce=(0,o.bytesToHex)(await P.isValidSignature(re,fe,q))}catch{}return ce===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=D;async function W(P,$,G,q,ie){if(!P)throw new Error("Missing provider");const fe=new o.default(P),ce=await(0,s.SignatureValidator)(fe,$);let re=await D(ce,G,q);if(re)return!0;const X=new u.default(fe);try{const{block:_e}=await X.getDate(ie,!1);if(re=await D(ce,G,q,_e),re)return!0}catch(_e){throw new Error(`Invalid validation. Error: ${_e.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${re}`)}function ue(P){switch(P){case a.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return K}}})(t_);var Js={},vs=function(e){return e&&e.Math===Math&&e},hr=vs(typeof globalThis=="object"&&globalThis)||vs(typeof window=="object"&&window)||vs(typeof self=="object"&&self)||vs(typeof le=="object"&&le)||vs(typeof le=="object"&&le)||function(){return this}()||Function("return this")(),Qi=function(e){try{return!!e()}catch{return!0}},l1=Qi,Zu=!l1(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),d1=Zu,vb=Function.prototype,Up=vb.apply,jp=vb.call,f1=typeof Reflect=="object"&&Reflect.apply||(d1?jp.bind(Up):function(){return jp.apply(Up,arguments)}),Eb=Zu,Sb=Function.prototype,$d=Sb.call,h1=Eb&&Sb.bind.bind($d,$d),rs=Eb?h1:function(e){return function(){return $d.apply(e,arguments)}},wb=rs,p1=wb({}.toString),m1=wb("".slice),Tb=function(e){return m1(p1(e),8,-1)},g1=Tb,y1=rs,Ib=function(e){if(g1(e)==="Function")return y1(e)},Dl=typeof document=="object"&&document.all,eo=typeof Dl>"u"&&Dl!==void 0?function(e){return typeof e=="function"||e===Dl}:function(e){return typeof e=="function"},Ab={},_1=Qi,Zs=!_1(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),b1=Zu,cc=Function.prototype.call,fh=b1?cc.bind(cc):function(){return cc.apply(cc,arguments)},Ob={},Cb={}.propertyIsEnumerable,Rb=Object.getOwnPropertyDescriptor,v1=Rb&&!Cb.call({1:2},1);Ob.f=v1?function(t){var n=Rb(this,t);return!!n&&n.enumerable}:Cb;var Mb=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},E1=rs,S1=Qi,w1=Tb,Bl=Object,T1=E1("".split),I1=S1(function(){return!Bl("z").propertyIsEnumerable(0)})?function(e){return w1(e)==="String"?T1(e,""):Bl(e)}:Bl,Nb=function(e){return e==null},A1=Nb,O1=TypeError,kb=function(e){if(A1(e))throw new O1("Can't call method on "+e);return e},C1=I1,R1=kb,M1=function(e){return C1(R1(e))},N1=eo,Qu=function(e){return typeof e=="object"?e!==null:N1(e)},Pb={},Fl=Pb,Hl=hr,k1=eo,$p=function(e){return k1(e)?e:void 0},P1=function(e,t){return arguments.length<2?$p(Fl[e])||$p(Hl[e]):Fl[e]&&Fl[e][t]||Hl[e]&&Hl[e][t]},x1=rs,L1=x1({}.isPrototypeOf),D1=hr,Wp=D1.navigator,zp=Wp&&Wp.userAgent,B1=zp?String(zp):"",xb=hr,Ul=B1,Gp=xb.process,Vp=xb.Deno,qp=Gp&&Gp.versions||Vp&&Vp.version,Yp=qp&&qp.v8,nr,ou;Yp&&(nr=Yp.split("."),ou=nr[0]>0&&nr[0]<4?1:+(nr[0]+nr[1]));!ou&&Ul&&(nr=Ul.match(/Edge\/(\d+)/),(!nr||nr[1]>=74)&&(nr=Ul.match(/Chrome\/(\d+)/),nr&&(ou=+nr[1])));var F1=ou,Xp=F1,H1=Qi,U1=hr,j1=U1.String,Lb=!!Object.getOwnPropertySymbols&&!H1(function(){var e=Symbol("symbol detection");return!j1(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Xp&&Xp<41}),$1=Lb,Db=$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",W1=P1,z1=eo,G1=L1,V1=Db,q1=Object,Bb=V1?function(e){return typeof e=="symbol"}:function(e){var t=W1("Symbol");return z1(t)&&G1(t.prototype,q1(e))},Y1=String,X1=function(e){try{return Y1(e)}catch{return"Object"}},K1=eo,J1=X1,Z1=TypeError,Fb=function(e){if(K1(e))return e;throw new Z1(J1(e)+" is not a function")},Q1=Fb,eT=Nb,tT=function(e,t){var n=e[t];return eT(n)?void 0:Q1(n)},jl=fh,$l=eo,Wl=Qu,nT=TypeError,rT=function(e,t){var n,r;if(t==="string"&&$l(n=e.toString)&&!Wl(r=jl(n,e))||$l(n=e.valueOf)&&!Wl(r=jl(n,e))||t!=="string"&&$l(n=e.toString)&&!Wl(r=jl(n,e)))return r;throw new nT("Can't convert object to primitive value")},Hb={exports:{}},Kp=hr,iT=Object.defineProperty,oT=function(e,t){try{iT(Kp,e,{value:t,configurable:!0,writable:!0})}catch{Kp[e]=t}return t},sT=hr,aT=oT,Jp="__core-js_shared__",Zp=Hb.exports=sT[Jp]||aT(Jp,{});(Zp.versions||(Zp.versions=[])).push({version:"3.49.0",mode:"pure",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var cT=Hb.exports,Qp=cT,uT=function(e,t){return Qp[e]||(Qp[e]=t||{})},lT=kb,dT=Object,fT=function(e){return dT(lT(e))},hT=rs,pT=fT,mT=hT({}.hasOwnProperty),hh=Object.hasOwn||function(t,n){return mT(pT(t),n)},gT=rs,yT=0,_T=Math.random(),bT=gT(1.1.toString),vT=function(e){return"Symbol("+(e===void 0?"":e)+")_"+bT(++yT+_T,36)},ET=hr,ST=uT,em=hh,wT=vT,TT=Lb,IT=Db,Ao=ET.Symbol,zl=ST("wks"),AT=IT?Ao.for||Ao:Ao&&Ao.withoutSetter||wT,OT=function(e){return em(zl,e)||(zl[e]=TT&&em(Ao,e)?Ao[e]:AT("Symbol."+e)),zl[e]},CT=fh,tm=Qu,nm=Bb,RT=tT,MT=rT,NT=OT,kT=TypeError,PT=NT("toPrimitive"),xT=function(e,t){if(!tm(e)||nm(e))return e;var n=RT(e,PT),r;if(n){if(t===void 0&&(t="default"),r=CT(n,e,t),!tm(r)||nm(r))return r;throw new kT("Can't convert object to primitive value")}return t===void 0&&(t="number"),MT(e,t)},LT=xT,DT=Bb,Ub=function(e){var t=LT(e,"string");return DT(t)?t:t+""},BT=hr,rm=Qu,Wd=BT.document,FT=rm(Wd)&&rm(Wd.createElement),HT=function(e){return FT?Wd.createElement(e):{}},UT=Zs,jT=Qi,$T=HT,jb=!UT&&!jT(function(){return Object.defineProperty($T("div"),"a",{get:function(){return 7}}).a!==7}),WT=Zs,zT=fh,GT=Ob,VT=Mb,qT=M1,YT=Ub,XT=hh,KT=jb,im=Object.getOwnPropertyDescriptor;Ab.f=WT?im:function(t,n){if(t=qT(t),n=YT(n),KT)try{return im(t,n)}catch{}if(XT(t,n))return VT(!zT(GT.f,t,n),t[n])};var JT=Qi,ZT=eo,QT=/#|\.prototype\./,Qs=function(e,t){var n=tI[eI(e)];return n===rI?!0:n===nI?!1:ZT(t)?JT(t):!!t},eI=Qs.normalize=function(e){return String(e).replace(QT,".").toLowerCase()},tI=Qs.data={},nI=Qs.NATIVE="N",rI=Qs.POLYFILL="P",iI=Qs,om=Ib,oI=Fb,sI=Zu,aI=om(om.bind),cI=function(e,t){return oI(e),t===void 0?e:sI?aI(e,t):function(){return e.apply(t,arguments)}},$b={},uI=Zs,lI=Qi,dI=uI&&lI(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),fI=Qu,hI=String,pI=TypeError,mI=function(e){if(fI(e))return e;throw new pI(hI(e)+" is not an object")},gI=Zs,yI=jb,_I=dI,uc=mI,sm=Ub,bI=TypeError,Gl=Object.defineProperty,vI=Object.getOwnPropertyDescriptor,Vl="enumerable",ql="configurable",Yl="writable";$b.f=gI?_I?function(t,n,r){if(uc(t),n=sm(n),uc(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Yl in r&&!r[Yl]){var i=vI(t,n);i&&i[Yl]&&(t[n]=r.value,r={configurable:ql in r?r[ql]:i[ql],enumerable:Vl in r?r[Vl]:i[Vl],writable:!1})}return Gl(t,n,r)}:Gl:function(t,n,r){if(uc(t),n=sm(n),uc(r),yI)try{return Gl(t,n,r)}catch{}if("get"in r||"set"in r)throw new bI("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var EI=Zs,SI=$b,wI=Mb,TI=EI?function(e,t,n){return SI.f(e,t,wI(1,n))}:function(e,t,n){return e[t]=n,e},Es=hr,II=f1,AI=Ib,OI=eo,CI=Ab.f,RI=iI,mo=Pb,MI=cI,go=TI,am=hh,NI=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return II(e,this,arguments)};return t.prototype=e.prototype,t},kI=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,s=r?Es:i?Es[n]:Es[n]&&Es[n].prototype,a=r?mo:mo[n]||go(mo,n,{})[n],c=a.prototype,u,h,d,m,g,E,T,L,H;for(m in t)u=RI(r?m:n+(i?".":"#")+m,e.forced),h=!u&&s&&am(s,m),E=a[m],h&&(e.dontCallGetSet?(H=CI(s,m),T=H&&H.value):T=s[m]),g=h&&T?T:t[m],!(!u&&!o&&typeof E==typeof g)&&(e.bind&&h?L=MI(g,Es):e.wrap&&h?L=NI(g):o&&OI(g)?L=AI(g):L=g,(e.sham||g&&g.sham||E&&E.sham)&&go(L,"sham",!0),go(a,m,L),o&&(d=n+"Prototype",am(mo,d)||go(mo,d,{}),go(mo[d],m,g),e.real&&c&&(u||!c[m])&&go(c,m,g)))},PI=kI,Xl=hr;PI({global:!0,forced:Xl.globalThis!==Xl},{globalThis:Xl});var xI=hr,LI=xI,DI=LI,BI=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Js,"__esModule",{value:!0});Js.getImplementation=void 0;var FI=BI(DI);function HI(e,t){var n,r=(n=e[t])!==null&&n!==void 0?n:FI.default[t];if(!r)throw new ReferenceError('"'+t+'" is not defined');return r}Js.getImplementation=HI;var UI=le&&le.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Bu,"__esModule",{value:!0});var jI=t_,$I=Js,WI="x-identity-auth-chain-",zI="x-identity-timestamp",GI="x-identity-metadata";function VI(e){e===void 0&&(e={});var t=(0,$I.getImplementation)(e,"Headers");return function(r,i,o,s,a){var c,u,h=new t(a),d=String(Date.now()),m=JSON.stringify(s),g=[i,o,d,m].join(":").toLowerCase(),E=0,T=jI.Authenticator.signPayload(r,g);try{for(var L=UI(T),H=L.next();!H.done;H=L.next()){var K=H.value;h.set(WI+E,JSON.stringify(K)),E++}}catch(V){c={error:V}}finally{try{H&&!H.done&&(u=L.return)&&u.call(L)}finally{if(c)throw c.error}}return h.set(zI,d),h.set(GI,m),h}}Bu.default=VI;var su=le&&le.__assign||function(){return su=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},su.apply(this,arguments)},qI=le&&le.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},YI=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0});var XI=YI(Bu),Kl=Js;function KI(e){e===void 0&&(e={});var t=(0,XI.default)(e),n=(0,Kl.getImplementation)(e,"URL"),r=(0,Kl.getImplementation)(e,"Request"),i=(0,Kl.getImplementation)(e,"fetch");return function(s,a){if(a&&a.identity){var c=a.identity,u=a.metadata,h=qI(a,["identity","metadata"]);if(typeof s=="string"||s instanceof n||globalThis.URL&&s instanceof globalThis.URL){var d=typeof s=="string"?new n(s):s,m=new r(d.toString(),su(su({},h),{headers:t(c,a.method||"GET",d.pathname,u||{},h?.headers)}));return i(m)}var g=new n(s.url),E=new r(s),T=t(c,s.method||"GET",g.pathname,u||{});return T.forEach(function(L,H){E.headers.set(H,L)}),i(E)}return i(s,a)}}Du.default=KI;(function(e){var t=le&&le.__createBinding||(Object.create?function(s,a,c,u){u===void 0&&(u=c),Object.defineProperty(s,u,{enumerable:!0,get:function(){return a[c]}})}:function(s,a,c,u){u===void 0&&(u=c),s[u]=a[c]}),n=le&&le.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&t(a,s,c)},r=le&&le.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,n($f,e);var i=Du;Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return r(i).default}});var o=Bu;Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return r(o).default}})})(e_);(function(e){var t=le&&le.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a),Object.defineProperty(o,c,{enumerable:!0,get:function(){return s[a]}})}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),n=le&&le.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,o,a)},r=le&&le.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),n($f,e),n(e_,e);var i=r(Du);e.default=(0,i.default)()})(Qy);const JI=50,ZI=e=>({...e,timestamp:Number(e.timestamp)}),QI=(e,t)=>{const n=e,{url:r,limit:i=JI}=t,o=Qy.signedFetchFactory();return{getNotifications:async()=>{const c=new URLSearchParams;c.append("limit",String(i));const u=`${r}/notifications?${c.toString()}`,h=await o(u,{identity:n,headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to fetch notifications: ${h.status}`);return((await h.json()).notifications??[]).map(ZI)},markNotificationsAsRead:async c=>{const u=`${r}/notifications/read`,h=await o(u,{method:"PUT",identity:n,body:JSON.stringify({notificationIds:c}),headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to mark notifications as read: ${h.status}`)}}};var eA=" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\bperl\\b|\\btime/|\\||^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\W|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|agent\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",tA=/bot|crawl|http|lighthouse|scan|search|spider/i,Ss;function nA(){if(Ss instanceof RegExp)return Ss;try{Ss=new RegExp(eA,"i")}catch{Ss=tA}return Ss}function rA(e){return!!e&&nA().test(e)}const we=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,We=globalThis,jr="9.47.1";function Zr(){return ea(We),We}function ea(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||jr,t[jr]=t[jr]||{}}function ta(e,t,n=We){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[jr]=r[jr]||{};return i[e]||(i[e]=t())}const ph=["debug","info","warn","error","log","assert","trace"],iA="Sentry Logger ",au={};function Ti(e){if(!("console"in We))return e();const t=We.console,n={},r=Object.keys(au);r.forEach(i=>{const o=au[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function oA(){gh().enabled=!0}function sA(){gh().enabled=!1}function Wb(){return gh().enabled}function aA(...e){mh("log",...e)}function cA(...e){mh("warn",...e)}function uA(...e){mh("error",...e)}function mh(e,...t){we&&Wb()&&Ti(()=>{We.console[e](`${iA}[${e}]:`,...t)})}function gh(){return we?ta("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Y={enable:oA,disable:sA,isEnabled:Wb,log:aA,warn:cA,error:uA},zb=50,Ir="?",cm=/\(error: (.*)\)/,um=/captureMessage|captureException/;function Gb(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
18
- `);for(let a=r;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const u=cm.test(c)?c.replace(cm,"$1"):c;if(!u.match(/\S*Error: /)){for(const h of t){const d=h(u);if(d){o.push(d);break}}if(o.length>=zb+i)break}}return dA(o.slice(i))}}function lA(e){return Array.isArray(e)?Gb(...e):e}function dA(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(lc(t).function||"")&&t.pop(),t.reverse(),um.test(lc(t).function||"")&&(t.pop(),um.test(lc(t).function||"")&&t.pop()),t.slice(0,zb).map(n=>({...n,filename:n.filename||lc(t).filename,function:n.function||Ir}))}function lc(e){return e[e.length-1]||{}}const Jl="<anonymous>";function zr(e){try{return!e||typeof e!="function"?Jl:e.name||Jl}catch{return Jl}}function zd(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Fc={},lm={};function Ii(e,t){Fc[e]=Fc[e]||[],Fc[e].push(t)}function Ai(e,t){if(!lm[e]){lm[e]=!0;try{t()}catch(n){we&&Y.error(`Error while instrumenting ${e}`,n)}}}function qn(e,t){const n=e&&Fc[e];if(n)for(const r of n)try{r(t)}catch(i){we&&Y.error(`Error while triggering instrumentation handler.
17
+ `),q=G[1].substring(19),ie=G[2].substring(12),fe=Date.parse(ie);return{message:$,ephemeralAddress:q,expiration:fe}}e.parseEmphemeralPayload=J;async function D(P,$,G,q){const ie=m.createEIP1271MessageHash($),fe=(0,o.hexToBytes)(G);let ce;try{ce=(0,o.bytesToHex)(await P.isValidSignature(ie,fe,q))}catch{}if(ce===e.ERC1654_MAGIC_VALUE)return!0;const re=(0,h.createEthereumMessageHash)($);try{ce=(0,o.bytesToHex)(await P.isValidSignature(re,fe,q))}catch{}return ce===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=D;async function W(P,$,G,q,ie){if(!P)throw new Error("Missing provider");const fe=new o.default(P),ce=await(0,s.SignatureValidator)(fe,$);let re=await D(ce,G,q);if(re)return!0;const X=new u.default(fe);try{const{block:_e}=await X.getDate(ie,!1);if(re=await D(ce,G,q,_e),re)return!0}catch(_e){throw new Error(`Invalid validation. Error: ${_e.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${re}`)}function ue(P){switch(P){case a.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case a.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return K}}})(r_);var Js={},vs=function(e){return e&&e.Math===Math&&e},hr=vs(typeof globalThis=="object"&&globalThis)||vs(typeof window=="object"&&window)||vs(typeof self=="object"&&self)||vs(typeof le=="object"&&le)||vs(typeof le=="object"&&le)||function(){return this}()||Function("return this")(),Qi=function(e){try{return!!e()}catch{return!0}},f1=Qi,Zu=!f1(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),h1=Zu,Sb=Function.prototype,$p=Sb.apply,Wp=Sb.call,p1=typeof Reflect=="object"&&Reflect.apply||(h1?Wp.bind($p):function(){return Wp.apply($p,arguments)}),wb=Zu,Tb=Function.prototype,zd=Tb.call,m1=wb&&Tb.bind.bind(zd,zd),rs=wb?m1:function(e){return function(){return zd.apply(e,arguments)}},Ib=rs,g1=Ib({}.toString),y1=Ib("".slice),Ab=function(e){return y1(g1(e),8,-1)},_1=Ab,b1=rs,Ob=function(e){if(_1(e)==="Function")return b1(e)},Dl=typeof document=="object"&&document.all,eo=typeof Dl>"u"&&Dl!==void 0?function(e){return typeof e=="function"||e===Dl}:function(e){return typeof e=="function"},Cb={},v1=Qi,Zs=!v1(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),E1=Zu,cc=Function.prototype.call,ph=E1?cc.bind(cc):function(){return cc.apply(cc,arguments)},Rb={},Mb={}.propertyIsEnumerable,Nb=Object.getOwnPropertyDescriptor,S1=Nb&&!Mb.call({1:2},1);Rb.f=S1?function(t){var n=Nb(this,t);return!!n&&n.enumerable}:Mb;var kb=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},w1=rs,T1=Qi,I1=Ab,Bl=Object,A1=w1("".split),O1=T1(function(){return!Bl("z").propertyIsEnumerable(0)})?function(e){return I1(e)==="String"?A1(e,""):Bl(e)}:Bl,Pb=function(e){return e==null},C1=Pb,R1=TypeError,xb=function(e){if(C1(e))throw new R1("Can't call method on "+e);return e},M1=O1,N1=xb,k1=function(e){return M1(N1(e))},P1=eo,Qu=function(e){return typeof e=="object"?e!==null:P1(e)},Lb={},Fl=Lb,Hl=hr,x1=eo,zp=function(e){return x1(e)?e:void 0},L1=function(e,t){return arguments.length<2?zp(Fl[e])||zp(Hl[e]):Fl[e]&&Fl[e][t]||Hl[e]&&Hl[e][t]},D1=rs,B1=D1({}.isPrototypeOf),F1=hr,Gp=F1.navigator,Vp=Gp&&Gp.userAgent,H1=Vp?String(Vp):"",Db=hr,Ul=H1,qp=Db.process,Yp=Db.Deno,Xp=qp&&qp.versions||Yp&&Yp.version,Kp=Xp&&Xp.v8,nr,ou;Kp&&(nr=Kp.split("."),ou=nr[0]>0&&nr[0]<4?1:+(nr[0]+nr[1]));!ou&&Ul&&(nr=Ul.match(/Edge\/(\d+)/),(!nr||nr[1]>=74)&&(nr=Ul.match(/Chrome\/(\d+)/),nr&&(ou=+nr[1])));var U1=ou,Jp=U1,j1=Qi,$1=hr,W1=$1.String,Bb=!!Object.getOwnPropertySymbols&&!j1(function(){var e=Symbol("symbol detection");return!W1(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Jp&&Jp<41}),z1=Bb,Fb=z1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",G1=L1,V1=eo,q1=B1,Y1=Fb,X1=Object,Hb=Y1?function(e){return typeof e=="symbol"}:function(e){var t=G1("Symbol");return V1(t)&&q1(t.prototype,X1(e))},K1=String,J1=function(e){try{return K1(e)}catch{return"Object"}},Z1=eo,Q1=J1,eT=TypeError,Ub=function(e){if(Z1(e))return e;throw new eT(Q1(e)+" is not a function")},tT=Ub,nT=Pb,rT=function(e,t){var n=e[t];return nT(n)?void 0:tT(n)},jl=ph,$l=eo,Wl=Qu,iT=TypeError,oT=function(e,t){var n,r;if(t==="string"&&$l(n=e.toString)&&!Wl(r=jl(n,e))||$l(n=e.valueOf)&&!Wl(r=jl(n,e))||t!=="string"&&$l(n=e.toString)&&!Wl(r=jl(n,e)))return r;throw new iT("Can't convert object to primitive value")},jb={exports:{}},Zp=hr,sT=Object.defineProperty,aT=function(e,t){try{sT(Zp,e,{value:t,configurable:!0,writable:!0})}catch{Zp[e]=t}return t},cT=hr,uT=aT,Qp="__core-js_shared__",em=jb.exports=cT[Qp]||uT(Qp,{});(em.versions||(em.versions=[])).push({version:"3.49.0",mode:"pure",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"});var lT=jb.exports,tm=lT,dT=function(e,t){return tm[e]||(tm[e]=t||{})},fT=xb,hT=Object,pT=function(e){return hT(fT(e))},mT=rs,gT=pT,yT=mT({}.hasOwnProperty),mh=Object.hasOwn||function(t,n){return yT(gT(t),n)},_T=rs,bT=0,vT=Math.random(),ET=_T(1.1.toString),ST=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ET(++bT+vT,36)},wT=hr,TT=dT,nm=mh,IT=ST,AT=Bb,OT=Fb,Ao=wT.Symbol,zl=TT("wks"),CT=OT?Ao.for||Ao:Ao&&Ao.withoutSetter||IT,RT=function(e){return nm(zl,e)||(zl[e]=AT&&nm(Ao,e)?Ao[e]:CT("Symbol."+e)),zl[e]},MT=ph,rm=Qu,im=Hb,NT=rT,kT=oT,PT=RT,xT=TypeError,LT=PT("toPrimitive"),DT=function(e,t){if(!rm(e)||im(e))return e;var n=NT(e,LT),r;if(n){if(t===void 0&&(t="default"),r=MT(n,e,t),!rm(r)||im(r))return r;throw new xT("Can't convert object to primitive value")}return t===void 0&&(t="number"),kT(e,t)},BT=DT,FT=Hb,$b=function(e){var t=BT(e,"string");return FT(t)?t:t+""},HT=hr,om=Qu,Gd=HT.document,UT=om(Gd)&&om(Gd.createElement),jT=function(e){return UT?Gd.createElement(e):{}},$T=Zs,WT=Qi,zT=jT,Wb=!$T&&!WT(function(){return Object.defineProperty(zT("div"),"a",{get:function(){return 7}}).a!==7}),GT=Zs,VT=ph,qT=Rb,YT=kb,XT=k1,KT=$b,JT=mh,ZT=Wb,sm=Object.getOwnPropertyDescriptor;Cb.f=GT?sm:function(t,n){if(t=XT(t),n=KT(n),ZT)try{return sm(t,n)}catch{}if(JT(t,n))return YT(!VT(qT.f,t,n),t[n])};var QT=Qi,eI=eo,tI=/#|\.prototype\./,Qs=function(e,t){var n=rI[nI(e)];return n===oI?!0:n===iI?!1:eI(t)?QT(t):!!t},nI=Qs.normalize=function(e){return String(e).replace(tI,".").toLowerCase()},rI=Qs.data={},iI=Qs.NATIVE="N",oI=Qs.POLYFILL="P",sI=Qs,am=Ob,aI=Ub,cI=Zu,uI=am(am.bind),lI=function(e,t){return aI(e),t===void 0?e:cI?uI(e,t):function(){return e.apply(t,arguments)}},zb={},dI=Zs,fI=Qi,hI=dI&&fI(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),pI=Qu,mI=String,gI=TypeError,yI=function(e){if(pI(e))return e;throw new gI(mI(e)+" is not an object")},_I=Zs,bI=Wb,vI=hI,uc=yI,cm=$b,EI=TypeError,Gl=Object.defineProperty,SI=Object.getOwnPropertyDescriptor,Vl="enumerable",ql="configurable",Yl="writable";zb.f=_I?vI?function(t,n,r){if(uc(t),n=cm(n),uc(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Yl in r&&!r[Yl]){var i=SI(t,n);i&&i[Yl]&&(t[n]=r.value,r={configurable:ql in r?r[ql]:i[ql],enumerable:Vl in r?r[Vl]:i[Vl],writable:!1})}return Gl(t,n,r)}:Gl:function(t,n,r){if(uc(t),n=cm(n),uc(r),bI)try{return Gl(t,n,r)}catch{}if("get"in r||"set"in r)throw new EI("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var wI=Zs,TI=zb,II=kb,AI=wI?function(e,t,n){return TI.f(e,t,II(1,n))}:function(e,t,n){return e[t]=n,e},Es=hr,OI=p1,CI=Ob,RI=eo,MI=Cb.f,NI=sI,mo=Lb,kI=lI,go=AI,um=mh,PI=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return OI(e,this,arguments)};return t.prototype=e.prototype,t},xI=function(e,t){var n=e.target,r=e.global,i=e.stat,o=e.proto,s=r?Es:i?Es[n]:Es[n]&&Es[n].prototype,a=r?mo:mo[n]||go(mo,n,{})[n],c=a.prototype,u,h,d,m,g,E,T,L,H;for(m in t)u=NI(r?m:n+(i?".":"#")+m,e.forced),h=!u&&s&&um(s,m),E=a[m],h&&(e.dontCallGetSet?(H=MI(s,m),T=H&&H.value):T=s[m]),g=h&&T?T:t[m],!(!u&&!o&&typeof E==typeof g)&&(e.bind&&h?L=kI(g,Es):e.wrap&&h?L=PI(g):o&&RI(g)?L=CI(g):L=g,(e.sham||g&&g.sham||E&&E.sham)&&go(L,"sham",!0),go(a,m,L),o&&(d=n+"Prototype",um(mo,d)||go(mo,d,{}),go(mo[d],m,g),e.real&&c&&(u||!c[m])&&go(c,m,g)))},LI=xI,Xl=hr;LI({global:!0,forced:Xl.globalThis!==Xl},{globalThis:Xl});var DI=hr,BI=DI,FI=BI,HI=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Js,"__esModule",{value:!0});Js.getImplementation=void 0;var UI=HI(FI);function jI(e,t){var n,r=(n=e[t])!==null&&n!==void 0?n:UI.default[t];if(!r)throw new ReferenceError('"'+t+'" is not defined');return r}Js.getImplementation=jI;var $I=le&&le.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Bu,"__esModule",{value:!0});var WI=r_,zI=Js,GI="x-identity-auth-chain-",VI="x-identity-timestamp",qI="x-identity-metadata";function YI(e){e===void 0&&(e={});var t=(0,zI.getImplementation)(e,"Headers");return function(r,i,o,s,a){var c,u,h=new t(a),d=String(Date.now()),m=JSON.stringify(s),g=[i,o,d,m].join(":").toLowerCase(),E=0,T=WI.Authenticator.signPayload(r,g);try{for(var L=$I(T),H=L.next();!H.done;H=L.next()){var K=H.value;h.set(GI+E,JSON.stringify(K)),E++}}catch(V){c={error:V}}finally{try{H&&!H.done&&(u=L.return)&&u.call(L)}finally{if(c)throw c.error}}return h.set(VI,d),h.set(qI,m),h}}Bu.default=YI;var su=le&&le.__assign||function(){return su=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},su.apply(this,arguments)},XI=le&&le.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},KI=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0});var JI=KI(Bu),Kl=Js;function ZI(e){e===void 0&&(e={});var t=(0,JI.default)(e),n=(0,Kl.getImplementation)(e,"URL"),r=(0,Kl.getImplementation)(e,"Request"),i=(0,Kl.getImplementation)(e,"fetch");return function(s,a){if(a&&a.identity){var c=a.identity,u=a.metadata,h=XI(a,["identity","metadata"]);if(typeof s=="string"||s instanceof n||globalThis.URL&&s instanceof globalThis.URL){var d=typeof s=="string"?new n(s):s,m=new r(d.toString(),su(su({},h),{headers:t(c,a.method||"GET",d.pathname,u||{},h?.headers)}));return i(m)}var g=new n(s.url),E=new r(s),T=t(c,s.method||"GET",g.pathname,u||{});return T.forEach(function(L,H){E.headers.set(H,L)}),i(E)}return i(s,a)}}Du.default=ZI;(function(e){var t=le&&le.__createBinding||(Object.create?function(s,a,c,u){u===void 0&&(u=c),Object.defineProperty(s,u,{enumerable:!0,get:function(){return a[c]}})}:function(s,a,c,u){u===void 0&&(u=c),s[u]=a[c]}),n=le&&le.__exportStar||function(s,a){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(a,c)&&t(a,s,c)},r=le&&le.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,n(zf,e);var i=Du;Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return r(i).default}});var o=Bu;Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return r(o).default}})})(n_);(function(e){var t=le&&le.__createBinding||(Object.create?function(o,s,a,c){c===void 0&&(c=a),Object.defineProperty(o,c,{enumerable:!0,get:function(){return s[a]}})}:function(o,s,a,c){c===void 0&&(c=a),o[c]=s[a]}),n=le&&le.__exportStar||function(o,s){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,o,a)},r=le&&le.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),n(zf,e),n(n_,e);var i=r(Du);e.default=(0,i.default)()})(t_);const QI=50,eA=e=>({...e,timestamp:Number(e.timestamp)}),tA=(e,t)=>{const n=e,{url:r,limit:i=QI}=t,o=t_.signedFetchFactory();return{getNotifications:async()=>{const c=new URLSearchParams;c.append("limit",String(i));const u=`${r}/notifications?${c.toString()}`,h=await o(u,{identity:n,headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to fetch notifications: ${h.status}`);return((await h.json()).notifications??[]).map(eA)},markNotificationsAsRead:async c=>{const u=`${r}/notifications/read`,h=await o(u,{method:"PUT",identity:n,body:JSON.stringify({notificationIds:c}),headers:{"Content-Type":"application/json"}});if(!h.ok)throw new Error(`Failed to mark notifications as read: ${h.status}`)}}};var nA=" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\bperl\\b|\\btime/|\\||^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\W|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|agent\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",rA=/bot|crawl|http|lighthouse|scan|search|spider/i,Ss;function iA(){if(Ss instanceof RegExp)return Ss;try{Ss=new RegExp(nA,"i")}catch{Ss=rA}return Ss}function oA(e){return!!e&&iA().test(e)}const we=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,We=globalThis,jr="9.47.1";function Zr(){return ea(We),We}function ea(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||jr,t[jr]=t[jr]||{}}function ta(e,t,n=We){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[jr]=r[jr]||{};return i[e]||(i[e]=t())}const gh=["debug","info","warn","error","log","assert","trace"],sA="Sentry Logger ",au={};function Ti(e){if(!("console"in We))return e();const t=We.console,n={},r=Object.keys(au);r.forEach(i=>{const o=au[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function aA(){_h().enabled=!0}function cA(){_h().enabled=!1}function Gb(){return _h().enabled}function uA(...e){yh("log",...e)}function lA(...e){yh("warn",...e)}function dA(...e){yh("error",...e)}function yh(e,...t){we&&Gb()&&Ti(()=>{We.console[e](`${sA}[${e}]:`,...t)})}function _h(){return we?ta("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Y={enable:aA,disable:cA,isEnabled:Gb,log:uA,warn:lA,error:dA},Vb=50,Ir="?",lm=/\(error: (.*)\)/,dm=/captureMessage|captureException/;function qb(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const o=[],s=n.split(`
18
+ `);for(let a=r;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const u=lm.test(c)?c.replace(lm,"$1"):c;if(!u.match(/\S*Error: /)){for(const h of t){const d=h(u);if(d){o.push(d);break}}if(o.length>=Vb+i)break}}return hA(o.slice(i))}}function fA(e){return Array.isArray(e)?qb(...e):e}function hA(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(lc(t).function||"")&&t.pop(),t.reverse(),dm.test(lc(t).function||"")&&(t.pop(),dm.test(lc(t).function||"")&&t.pop()),t.slice(0,Vb).map(n=>({...n,filename:n.filename||lc(t).filename,function:n.function||Ir}))}function lc(e){return e[e.length-1]||{}}const Jl="<anonymous>";function zr(e){try{return!e||typeof e!="function"?Jl:e.name||Jl}catch{return Jl}}function Vd(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Fc={},fm={};function Ii(e,t){Fc[e]=Fc[e]||[],Fc[e].push(t)}function Ai(e,t){if(!fm[e]){fm[e]=!0;try{t()}catch(n){we&&Y.error(`Error while instrumenting ${e}`,n)}}}function qn(e,t){const n=e&&Fc[e];if(n)for(const r of n)try{r(t)}catch(i){we&&Y.error(`Error while triggering instrumentation handler.
19
19
  Type: ${e}
20
20
  Name: ${zr(r)}
21
- Error:`,i)}}let Zl=null;function Vb(e){const t="error";Ii(t,e),Ai(t,fA)}function fA(){Zl=We.onerror,We.onerror=function(e,t,n,r,i){return qn("error",{column:r,error:i,line:n,msg:e,url:t}),Zl?Zl.apply(this,arguments):!1},We.onerror.__SENTRY_INSTRUMENTED__=!0}let Ql=null;function qb(e){const t="unhandledrejection";Ii(t,e),Ai(t,hA)}function hA(){Ql=We.onunhandledrejection,We.onunhandledrejection=function(e){return qn("unhandledrejection",e),Ql?Ql.apply(this,arguments):!0},We.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Yb=Object.prototype.toString;function gi(e){switch(Yb.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Vr(e,Error)}}function is(e,t){return Yb.call(e)===`[object ${t}]`}function Xb(e){return is(e,"ErrorEvent")}function dm(e){return is(e,"DOMError")}function pA(e){return is(e,"DOMException")}function sr(e){return is(e,"String")}function el(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function xo(e){return e===null||el(e)||typeof e!="object"&&typeof e!="function"}function Gr(e){return is(e,"Object")}function tl(e){return typeof Event<"u"&&Vr(e,Event)}function mA(e){return typeof Element<"u"&&Vr(e,Element)}function gA(e){return is(e,"RegExp")}function na(e){return!!(e?.then&&typeof e.then=="function")}function yA(e){return Gr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Vr(e,t){try{return e instanceof t}catch{return!1}}function Kb(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Jb(e){return typeof Request<"u"&&Vr(e,Request)}const yh=We,_A=80;function Xn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=a.length;let u;const h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||_A;for(;n&&o++<r&&(u=bA(n,h),!(u==="html"||o>1&&s+i.length*c+u.length>=d));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function bA(e,t){const n=e,r=[];if(!n?.tagName)return"";if(yh.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const s=n.className;if(s&&sr(s)){const a=s.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function to(){try{return yh.document.location.href}catch{return""}}function Zb(e){if(!yh.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Lo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ed(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function cu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{Kb(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function vA(e,t,n=!1){return sr(e)?gA(t)?t.test(e):sr(t)?n?e===t:e.includes(t):!1:!1}function ar(e,t=[],n=!1){return t.some(r=>vA(e,r,n))}function wn(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&Qb(i,r);try{e[t]=i}catch{we&&Y.log(`Failed to replace method "${t}" in object`,e)}}function Nn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{we&&Y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Qb(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Nn(e,"__sentry_original__",t)}catch{}}function _h(e){return e.__sentry_original__}function e0(e){if(gi(e))return{message:e.message,name:e.name,stack:e.stack,...hm(e)};if(tl(e)){const t={type:e.type,target:fm(e.target),currentTarget:fm(e.currentTarget),...hm(e)};return typeof CustomEvent<"u"&&Vr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function fm(e){try{return mA(e)?Xn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function hm(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function EA(e,t=40){const n=Object.keys(e0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Lo(r,t);for(let i=n.length;i>0;i--){const o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:Lo(o,t)}return""}function SA(){const e=We;return e.crypto||e.msCrypto}function Tn(e=SA()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function t0(e){return e.exception?.values?.[0]}function Li(e){const{message:t,event_id:n}=e;if(t)return t;const r=t0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Gd(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function bi(e,t){const n=t0(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function wA(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>ed(s,0));const o=Math.min(r-1,i);t.context_line=ed(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>ed(s,0))}function pm(e){if(TA(e))return!0;try{Nn(e,"__sentry_captured__",!0)}catch{}return!1}function TA(e){try{return e.__sentry_captured__}catch{}}const n0=1e3;function no(){return Date.now()/n0}function IA(){const{performance:e}=We;if(!e?.now||!e.timeOrigin)return no;const t=e.timeOrigin;return()=>(t+e.now())/n0}let mm;function Yt(){return(mm??(mm=IA()))()}let td;function AA(){const{performance:e}=We;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing?.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return o||u?i<=c?[e.timeOrigin,"timeOrigin"]:[s,"navigationStart"]:[r,"dateNow"]}function mn(){return td||(td=AA()),td[0]}function OA(e){const t=Yt(),n={sid:Tn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>RA(n)};return e&&Do(n,e),n}function Do(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Yt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Tn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function CA(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Do(e,n)}function RA(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function ra(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=ra(r[i],t[i],n-1));return r}function qr(){return Tn()}function ia(){return Tn().substring(16)}const Vd="_sentrySpan";function Vi(e,t){t?Nn(e,Vd,t):delete e[Vd]}function Us(e){return e[Vd]}const MA=100;class cr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qr(),sampleRand:Math.random()}}clone(){const t=new cr;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Vi(t,Us(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Do(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof cr?n.getScopeData():Gr(n)?t:void 0,{tags:i,extra:o,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:h}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),h&&(this._propagationContext=h),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Vi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:MA;if(r<=0)return this;const i={timestamp:no(),...t,message:t.message?Lo(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Us(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=ra(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Tn();if(!this._client)return we&&Y.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||Tn();if(!this._client)return we&&Y.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n?.event_id||Tn();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(we&&Y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function NA(){return ta("defaultCurrentScope",()=>new cr)}function kA(){return ta("defaultIsolationScope",()=>new cr)}class PA{constructor(t,n){let r;t?r=t:r=new cr;let i;n?i=n:i=new cr,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return na(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Bo(){const e=Zr(),t=ea(e);return t.stack=t.stack||new PA(NA(),kA())}function xA(e){return Bo().withScope(e)}function LA(e,t){const n=Bo();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function gm(e){return Bo().withScope(()=>e(Bo().getIsolationScope()))}function DA(){return{withIsolationScope:gm,withScope:xA,withSetScope:LA,withSetIsolationScope:(e,t)=>gm(t),getCurrentScope:()=>Bo().getScope(),getIsolationScope:()=>Bo().getIsolationScope()}}function Oi(e){const t=ea(e);return t.acs?t.acs:DA()}function tt(){const e=Zr();return Oi(e).getCurrentScope()}function Qt(){const e=Zr();return Oi(e).getIsolationScope()}function nl(){return ta("globalScope",()=>new cr)}function Jn(...e){const t=Zr(),n=Oi(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function BA(...e){const t=Zr(),n=Oi(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function Re(){return tt().getClient()}function r0(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||ia()};return r&&(o.parent_span_id=r),o}const Hn="sentry.source",rl="sentry.sample_rate",i0="sentry.previous_trace_sample_rate",jn="sentry.op",Ft="sentry.origin",uu="sentry.idle_span_finish_reason",oa="sentry.measurement_unit",sa="sentry.measurement_value",qd="sentry.custom_span_name",bh="sentry.profile_id",os="sentry.exclusive_time",FA="http.request.method",HA="url.full",UA="sentry.link.type",jA=0,vh=1,zt=2;function o0(e){if(e<400&&e>=100)return{code:vh};if(e>=400&&e<500)switch(e){case 401:return{code:zt,message:"unauthenticated"};case 403:return{code:zt,message:"permission_denied"};case 404:return{code:zt,message:"not_found"};case 409:return{code:zt,message:"already_exists"};case 413:return{code:zt,message:"failed_precondition"};case 429:return{code:zt,message:"resource_exhausted"};case 499:return{code:zt,message:"cancelled"};default:return{code:zt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:zt,message:"unimplemented"};case 503:return{code:zt,message:"unavailable"};case 504:return{code:zt,message:"deadline_exceeded"};default:return{code:zt,message:"internal_error"}}return{code:zt,message:"unknown_error"}}function js(e,t){e.setAttribute("http.response.status_code",t);const n=o0(t);n.message!=="unknown_error"&&e.setStatus(n)}const s0="_sentryScope",a0="_sentryIsolationScope";function $A(e,t,n){e&&(Nn(e,a0,n),Nn(e,s0,t))}function lu(e){return{scope:e[s0],isolationScope:e[a0]}}const Eh="sentry-",WA=/^sentry-/,zA=8192;function c0(e){const t=GA(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(WA)){const s=i.slice(Eh.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function u0(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Eh}${r}`]=i),n),{});return VA(t)}function GA(e){if(!(!e||!sr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=ym(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):ym(e)}function ym(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function VA(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>zA?(we&&Y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}function qi(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const l0=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function qA(e){if(!e)return;const t=e.match(l0);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function d0(e,t){const n=qA(e),r=c0(t);if(!n?.traceId)return{traceId:qr(),sampleRand:Math.random()};const i=YA(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function f0(e=qr(),t=ia(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function YA(e,t){const n=qi(t?.sample_rand);if(n!==void 0)return n;const r=qi(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const h0=0,Sh=1;let _m=!1;function XA(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:c}=Qe(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:c}}function p0(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Qe(e).parent_span_id,o=lu(e).scope,s=r?o?.getPropagationContext().propagationSpanId||ia():t;return{parent_span_id:i,span_id:s,trace_id:n}}function m0(e){const{traceId:t,spanId:n}=e.spanContext(),r=ro(e);return f0(t,n,r)}function g0(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Sh,attributes:o,...i}))}function $i(e){return typeof e=="number"?bm(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?bm(e.getTime()):Yt()}function bm(e){return e>9999999999?e/1e3:e}function Qe(e){if(JA(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(KA(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:u,start_timestamp:$i(i),timestamp:$i(s)||void 0,status:y0(a),op:r[jn],origin:r[Ft],links:g0(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function KA(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function JA(e){return typeof e.getSpanJSON=="function"}function ro(e){const{traceFlags:t}=e.spanContext();return t===Sh}function y0(e){if(!(!e||e.code===jA))return e.code===vh?"ok":e.message||"unknown_error"}const Wi="_sentryChildSpans",Yd="_sentryRootSpan";function _0(e,t){const n=e[Yd]||e;Nn(t,Yd,n),e[Wi]?e[Wi].add(t):Nn(e,Wi,new Set([t]))}function ZA(e,t){e[Wi]&&e[Wi].delete(t)}function Ps(e){const t=new Set;function n(r){if(!t.has(r)&&ro(r)){t.add(r);const i=r[Wi]?Array.from(r[Wi]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}function Zt(e){return e[Yd]||e}function en(){const e=Zr(),t=Oi(e);return t.getActiveSpan?t.getActiveSpan():Us(tt())}function Xd(){_m||(Ti(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),_m=!0)}function QA(e,t){e.updateName(t),e.setAttributes({[Hn]:"custom",[qd]:t})}let vm=!1;function b0(){if(vm)return;function e(){const t=en(),n=t&&Zt(t);if(n){const r="internal_error";we&&Y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:zt,message:r})}}e.tag="sentry_tracingErrorCallback",vm=!0,Vb(e),qb(e)}function vi(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Re()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const il="production",eO=/^o(\d+)\./,tO=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function nO(e){return e==="http"||e==="https"}function io(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function v0(e){const t=tO.exec(e);if(!t){Ti(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let c="",u=a;const h=u.split("/");if(h.length>1&&(c=h.slice(0,-1).join("/"),u=h.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return E0({host:o,pass:i,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function E0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function rO(e){if(!we)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Y.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?nO(r)?t&&isNaN(parseInt(t,10))?(Y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function iO(e){return e.match(eO)?.[1]}function S0(e){const t=typeof e=="string"?v0(e):E0(e);if(!(!t||!rO(t)))return t}const w0="_frozenDsc";function Hc(e,t){Nn(e,w0,t)}function T0(e,t){const n=t.getOptions(),{publicKey:r,host:i}=t.getDsn()||{};let o;n.orgId?o=String(n.orgId):i&&(o=iO(i));const s={environment:n.environment||il,release:n.release,public_key:r,trace_id:e,org_id:o};return t.emit("createDsc",s),s}function wh(e,t){const n=t.getPropagationContext();return n.dsc||T0(n.traceId,e)}function ur(e){const t=Re();if(!t)return{};const n=Zt(e),r=Qe(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[rl]??i[i0];function a(E){return(typeof s=="number"||typeof s=="string")&&(E.sample_rate=`${s}`),E}const c=n[w0];if(c)return a(c);const u=o?.get("sentry.dsc"),h=u&&c0(u);if(h)return a(h);const d=T0(e.spanContext().traceId,t),m=i[Hn],g=r.description;return m!=="url"&&g&&(d.transaction=g),vi()&&(d.sampled=String(ro(n)),d.sample_rand=o?.get("sentry.sample_rand")??lu(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function oO(e){const t=ur(e);return u0(t)}class Yr{constructor(t={}){this._traceId=t.traceId||qr(),this._spanId=t.spanId||ia()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:h0}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Ln(e,t=100,n=1/0){try{return Kd("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function I0(e,t=3,n=100*1024){const r=Ln(e,t);return uO(r)>n?I0(e,t-1,n):r}function Kd(e,t,n=1/0,r=1/0,i=lO()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=sO(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return Kd("",g,c-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const m=e0(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(d>=r){h[g]="[MaxProperties ~]";break}const E=m[g];h[g]=Kd(g,E,c-1,r,i),d++}return s(t),h}function sO(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Kb(t))return"[VueViewModel]";if(yA(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${zr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=aO(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function aO(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function cO(e){return~-encodeURI(e).split(/%..|./).length}function uO(e){return cO(JSON.stringify(e))}function lO(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Qr(e,t=[]){return[e,t]}function dO(e,t){const[n,r]=e;return[n,[...r,t]]}function Yi(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function Em(e,t){return Yi(e,(n,r)=>t.includes(r))}function du(e){const t=ea(We);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function fO(e){const t=ea(We);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function fu(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[du(r),o]:r.push(typeof o=="string"?du(o):o)}for(const o of n){const[s,a]=o;if(i(`
21
+ Error:`,i)}}let Zl=null;function Yb(e){const t="error";Ii(t,e),Ai(t,pA)}function pA(){Zl=We.onerror,We.onerror=function(e,t,n,r,i){return qn("error",{column:r,error:i,line:n,msg:e,url:t}),Zl?Zl.apply(this,arguments):!1},We.onerror.__SENTRY_INSTRUMENTED__=!0}let Ql=null;function Xb(e){const t="unhandledrejection";Ii(t,e),Ai(t,mA)}function mA(){Ql=We.onunhandledrejection,We.onunhandledrejection=function(e){return qn("unhandledrejection",e),Ql?Ql.apply(this,arguments):!0},We.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Kb=Object.prototype.toString;function gi(e){switch(Kb.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Vr(e,Error)}}function is(e,t){return Kb.call(e)===`[object ${t}]`}function Jb(e){return is(e,"ErrorEvent")}function hm(e){return is(e,"DOMError")}function gA(e){return is(e,"DOMException")}function sr(e){return is(e,"String")}function el(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function xo(e){return e===null||el(e)||typeof e!="object"&&typeof e!="function"}function Gr(e){return is(e,"Object")}function tl(e){return typeof Event<"u"&&Vr(e,Event)}function yA(e){return typeof Element<"u"&&Vr(e,Element)}function _A(e){return is(e,"RegExp")}function na(e){return!!(e?.then&&typeof e.then=="function")}function bA(e){return Gr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Vr(e,t){try{return e instanceof t}catch{return!1}}function Zb(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Qb(e){return typeof Request<"u"&&Vr(e,Request)}const bh=We,vA=80;function Xn(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=a.length;let u;const h=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||vA;for(;n&&o++<r&&(u=EA(n,h),!(u==="html"||o>1&&s+i.length*c+u.length>=d));)i.push(u),s+=u.length,n=n.parentNode;return i.reverse().join(a)}catch{return"<unknown>"}}function EA(e,t){const n=e,r=[];if(!n?.tagName)return"";if(bh.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(i?.length)i.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const s=n.className;if(s&&sr(s)){const a=s.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const s of o){const a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function to(){try{return bh.document.location.href}catch{return""}}function e0(e){if(!bh.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Lo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ed(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function cu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{Zb(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function SA(e,t,n=!1){return sr(e)?_A(t)?t.test(e):sr(t)?n?e===t:e.includes(t):!1:!1}function ar(e,t=[],n=!1){return t.some(r=>SA(e,r,n))}function wn(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&t0(i,r);try{e[t]=i}catch{we&&Y.log(`Failed to replace method "${t}" in object`,e)}}function Nn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{we&&Y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function t0(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Nn(e,"__sentry_original__",t)}catch{}}function vh(e){return e.__sentry_original__}function n0(e){if(gi(e))return{message:e.message,name:e.name,stack:e.stack,...mm(e)};if(tl(e)){const t={type:e.type,target:pm(e.target),currentTarget:pm(e.currentTarget),...mm(e)};return typeof CustomEvent<"u"&&Vr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function pm(e){try{return yA(e)?Xn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function mm(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function wA(e,t=40){const n=Object.keys(n0(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Lo(r,t);for(let i=n.length;i>0;i--){const o=n.slice(0,i).join(", ");if(!(o.length>t))return i===n.length?o:Lo(o,t)}return""}function TA(){const e=We;return e.crypto||e.msCrypto}function Tn(e=TA()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function r0(e){return e.exception?.values?.[0]}function Li(e){const{message:t,event_id:n}=e;if(t)return t;const r=r0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function qd(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function bi(e,t){const n=r0(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const o={...i?.data,...t.data};n.mechanism.data=o}}function IA(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>ed(s,0));const o=Math.min(r-1,i);t.context_line=ed(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>ed(s,0))}function gm(e){if(AA(e))return!0;try{Nn(e,"__sentry_captured__",!0)}catch{}return!1}function AA(e){try{return e.__sentry_captured__}catch{}}const i0=1e3;function no(){return Date.now()/i0}function OA(){const{performance:e}=We;if(!e?.now||!e.timeOrigin)return no;const t=e.timeOrigin;return()=>(t+e.now())/i0}let ym;function Yt(){return(ym??(ym=OA()))()}let td;function CA(){const{performance:e}=We;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing?.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return o||u?i<=c?[e.timeOrigin,"timeOrigin"]:[s,"navigationStart"]:[r,"dateNow"]}function mn(){return td||(td=CA()),td[0]}function RA(e){const t=Yt(),n={sid:Tn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>NA(n)};return e&&Do(n,e),n}function Do(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Yt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Tn()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function MA(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Do(e,n)}function NA(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function ra(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=ra(r[i],t[i],n-1));return r}function qr(){return Tn()}function ia(){return Tn().substring(16)}const Yd="_sentrySpan";function Vi(e,t){t?Nn(e,Yd,t):delete e[Yd]}function Us(e){return e[Yd]}const kA=100;class cr{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qr(),sampleRand:Math.random()}}clone(){const t=new cr;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Vi(t,Us(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Do(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof cr?n.getScopeData():Gr(n)?t:void 0,{tags:i,extra:o,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:h}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),h&&(this._propagationContext=h),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Vi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:kA;if(r<=0)return this;const i={timestamp:no(),...t,message:t.message?Lo(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Us(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=ra(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Tn();if(!this._client)return we&&Y.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||Tn();if(!this._client)return we&&Y.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n?.event_id||Tn();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(we&&Y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function PA(){return ta("defaultCurrentScope",()=>new cr)}function xA(){return ta("defaultIsolationScope",()=>new cr)}class LA{constructor(t,n){let r;t?r=t:r=new cr;let i;n?i=n:i=new cr,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return na(r)?r.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Bo(){const e=Zr(),t=ea(e);return t.stack=t.stack||new LA(PA(),xA())}function DA(e){return Bo().withScope(e)}function BA(e,t){const n=Bo();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function _m(e){return Bo().withScope(()=>e(Bo().getIsolationScope()))}function FA(){return{withIsolationScope:_m,withScope:DA,withSetScope:BA,withSetIsolationScope:(e,t)=>_m(t),getCurrentScope:()=>Bo().getScope(),getIsolationScope:()=>Bo().getIsolationScope()}}function Oi(e){const t=ea(e);return t.acs?t.acs:FA()}function tt(){const e=Zr();return Oi(e).getCurrentScope()}function Qt(){const e=Zr();return Oi(e).getIsolationScope()}function nl(){return ta("globalScope",()=>new cr)}function Jn(...e){const t=Zr(),n=Oi(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function HA(...e){const t=Zr(),n=Oi(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function Re(){return tt().getClient()}function o0(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:i}=t,o={trace_id:n,span_id:i||ia()};return r&&(o.parent_span_id=r),o}const Hn="sentry.source",rl="sentry.sample_rate",s0="sentry.previous_trace_sample_rate",jn="sentry.op",Ft="sentry.origin",uu="sentry.idle_span_finish_reason",oa="sentry.measurement_unit",sa="sentry.measurement_value",Xd="sentry.custom_span_name",Eh="sentry.profile_id",os="sentry.exclusive_time",UA="http.request.method",jA="url.full",$A="sentry.link.type",WA=0,Sh=1,zt=2;function a0(e){if(e<400&&e>=100)return{code:Sh};if(e>=400&&e<500)switch(e){case 401:return{code:zt,message:"unauthenticated"};case 403:return{code:zt,message:"permission_denied"};case 404:return{code:zt,message:"not_found"};case 409:return{code:zt,message:"already_exists"};case 413:return{code:zt,message:"failed_precondition"};case 429:return{code:zt,message:"resource_exhausted"};case 499:return{code:zt,message:"cancelled"};default:return{code:zt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:zt,message:"unimplemented"};case 503:return{code:zt,message:"unavailable"};case 504:return{code:zt,message:"deadline_exceeded"};default:return{code:zt,message:"internal_error"}}return{code:zt,message:"unknown_error"}}function js(e,t){e.setAttribute("http.response.status_code",t);const n=a0(t);n.message!=="unknown_error"&&e.setStatus(n)}const c0="_sentryScope",u0="_sentryIsolationScope";function zA(e,t,n){e&&(Nn(e,u0,n),Nn(e,c0,t))}function lu(e){return{scope:e[c0],isolationScope:e[u0]}}const wh="sentry-",GA=/^sentry-/,VA=8192;function l0(e){const t=qA(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,o])=>{if(i.match(GA)){const s=i.slice(wh.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function d0(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${wh}${r}`]=i),n),{});return YA(t)}function qA(e){if(!(!e||!sr(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=bm(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):bm(e)}function bm(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function YA(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>VA?(we&&Y.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}function qi(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const f0=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function XA(e){if(!e)return;const t=e.match(f0);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function h0(e,t){const n=XA(e),r=l0(t);if(!n?.traceId)return{traceId:qr(),sampleRand:Math.random()};const i=KA(n,r);r&&(r.sample_rand=i.toString());const{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function p0(e=qr(),t=ia(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function KA(e,t){const n=qi(t?.sample_rand);if(n!==void 0)return n;const r=qi(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const m0=0,Th=1;let vm=!1;function JA(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:c}=Qe(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:c}}function g0(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Qe(e).parent_span_id,o=lu(e).scope,s=r?o?.getPropagationContext().propagationSpanId||ia():t;return{parent_span_id:i,span_id:s,trace_id:n}}function y0(e){const{traceId:t,spanId:n}=e.spanContext(),r=ro(e);return p0(t,n,r)}function _0(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Th,attributes:o,...i}))}function $i(e){return typeof e=="number"?Em(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Em(e.getTime()):Yt()}function Em(e){return e>9999999999?e/1e3:e}function Qe(e){if(QA(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(ZA(e)){const{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:u,start_timestamp:$i(i),timestamp:$i(s)||void 0,status:b0(a),op:r[jn],origin:r[Ft],links:_0(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function ZA(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function QA(e){return typeof e.getSpanJSON=="function"}function ro(e){const{traceFlags:t}=e.spanContext();return t===Th}function b0(e){if(!(!e||e.code===WA))return e.code===Sh?"ok":e.message||"unknown_error"}const Wi="_sentryChildSpans",Kd="_sentryRootSpan";function v0(e,t){const n=e[Kd]||e;Nn(t,Kd,n),e[Wi]?e[Wi].add(t):Nn(e,Wi,new Set([t]))}function eO(e,t){e[Wi]&&e[Wi].delete(t)}function Ps(e){const t=new Set;function n(r){if(!t.has(r)&&ro(r)){t.add(r);const i=r[Wi]?Array.from(r[Wi]):[];for(const o of i)n(o)}}return n(e),Array.from(t)}function Zt(e){return e[Kd]||e}function en(){const e=Zr(),t=Oi(e);return t.getActiveSpan?t.getActiveSpan():Us(tt())}function Jd(){vm||(Ti(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),vm=!0)}function tO(e,t){e.updateName(t),e.setAttributes({[Hn]:"custom",[Xd]:t})}let Sm=!1;function E0(){if(Sm)return;function e(){const t=en(),n=t&&Zt(t);if(n){const r="internal_error";we&&Y.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:zt,message:r})}}e.tag="sentry_tracingErrorCallback",Sm=!0,Yb(e),Xb(e)}function vi(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||Re()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const il="production",nO=/^o(\d+)\./,rO=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function iO(e){return e==="http"||e==="https"}function io(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function S0(e){const t=rO.exec(e);if(!t){Ti(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,i="",o="",s="",a=""]=t.slice(1);let c="",u=a;const h=u.split("/");if(h.length>1&&(c=h.slice(0,-1).join("/"),u=h.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return w0({host:o,pass:i,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function w0(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function oO(e){if(!we)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Y.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?iO(r)?t&&isNaN(parseInt(t,10))?(Y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Y.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function sO(e){return e.match(nO)?.[1]}function T0(e){const t=typeof e=="string"?S0(e):w0(e);if(!(!t||!oO(t)))return t}const I0="_frozenDsc";function Hc(e,t){Nn(e,I0,t)}function A0(e,t){const n=t.getOptions(),{publicKey:r,host:i}=t.getDsn()||{};let o;n.orgId?o=String(n.orgId):i&&(o=sO(i));const s={environment:n.environment||il,release:n.release,public_key:r,trace_id:e,org_id:o};return t.emit("createDsc",s),s}function Ih(e,t){const n=t.getPropagationContext();return n.dsc||A0(n.traceId,e)}function ur(e){const t=Re();if(!t)return{};const n=Zt(e),r=Qe(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[rl]??i[s0];function a(E){return(typeof s=="number"||typeof s=="string")&&(E.sample_rate=`${s}`),E}const c=n[I0];if(c)return a(c);const u=o?.get("sentry.dsc"),h=u&&l0(u);if(h)return a(h);const d=A0(e.spanContext().traceId,t),m=i[Hn],g=r.description;return m!=="url"&&g&&(d.transaction=g),vi()&&(d.sampled=String(ro(n)),d.sample_rand=o?.get("sentry.sample_rand")??lu(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function aO(e){const t=ur(e);return d0(t)}class Yr{constructor(t={}){this._traceId=t.traceId||qr(),this._spanId=t.spanId||ia()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:m0}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Ln(e,t=100,n=1/0){try{return Zd("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function O0(e,t=3,n=100*1024){const r=Ln(e,t);return dO(r)>n?O0(e,t-1,n):r}function Zd(e,t,n=1/0,r=1/0,i=fO()){const[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=cO(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const g=u.toJSON();return Zd("",g,c-1,r,i)}catch{}const h=Array.isArray(t)?[]:{};let d=0;const m=n0(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(d>=r){h[g]="[MaxProperties ~]";break}const E=m[g];h[g]=Zd(g,E,c-1,r,i),d++}return s(t),h}function cO(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Zb(t))return"[VueViewModel]";if(bA(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${zr(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=uO(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function uO(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function lO(e){return~-encodeURI(e).split(/%..|./).length}function dO(e){return lO(JSON.stringify(e))}function fO(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Qr(e,t=[]){return[e,t]}function hO(e,t){const[n,r]=e;return[n,[...r,t]]}function Yi(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}function wm(e,t){return Yi(e,(n,r)=>t.includes(r))}function du(e){const t=ea(We);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function pO(e){const t=ea(We);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function fu(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[du(r),o]:r.push(typeof o=="string"?du(o):o)}for(const o of n){const[s,a]=o;if(i(`
22
22
  ${JSON.stringify(s)}
23
- `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ln(a))}i(c)}}return typeof r=="string"?r:hO(r)}function hO(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function pO(e){let t=typeof e=="string"?du(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(fO(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function mO(e){return[{type:"span"},e]}function gO(e){const t=typeof e.data=="string"?du(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const yO={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Sm(e){return yO[e]}function Th(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function A0(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:io(r)},...i&&{trace:i}}}function _O(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function bO(e,t,n,r){const i=Th(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:io(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Qr(o,[s])}function vO(e,t,n,r){const i=Th(n),o=e.type&&e.type!=="replay_event"?e.type:"event";_O(e,n?.sdk);const s=A0(e,i,r,t);return delete e.sdkProcessingMetadata,Qr(s,[[{type:o},e]])}function EO(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=ur(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:io(i)}},a=t?.getOptions().beforeSendSpan,c=a?h=>{const d=Qe(h),m=a(d);return m||(Xd(),d)}:Qe,u=[];for(const h of e){const d=c(h);d&&u.push(mO(d))}return Qr(s,u)}function SO(e){if(!we)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Qe(e),{spanId:i}=e.spanContext(),o=ro(e),s=Zt(e),a=s===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:h,description:d}=Qe(s);u.push(`root ID: ${s.spanContext().spanId}`),h&&u.push(`root op: ${h}`),d&&u.push(`root description: ${d}`)}Y.log(`${c}
23
+ `),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ln(a))}i(c)}}return typeof r=="string"?r:mO(r)}function mO(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function gO(e){let t=typeof e=="string"?du(e):e;function n(s){const a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(pO(n(s)))}const i=r(),o=[];for(;t.length;){const s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function yO(e){return[{type:"span"},e]}function _O(e){const t=typeof e.data=="string"?du(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const bO={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Tm(e){return bO[e]}function Ah(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function C0(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:io(r)},...i&&{trace:i}}}function vO(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function EO(e,t,n,r){const i=Ah(n),o={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:io(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Qr(o,[s])}function SO(e,t,n,r){const i=Ah(n),o=e.type&&e.type!=="replay_event"?e.type:"event";vO(e,n?.sdk);const s=C0(e,i,r,t);return delete e.sdkProcessingMetadata,Qr(s,[[{type:o},e]])}function wO(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=ur(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:io(i)}},a=t?.getOptions().beforeSendSpan,c=a?h=>{const d=Qe(h),m=a(d);return m||(Jd(),d)}:Qe,u=[];for(const h of e){const d=c(h);d&&u.push(yO(d))}return Qr(s,u)}function TO(e){if(!we)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Qe(e),{spanId:i}=e.spanContext(),o=ro(e),s=Zt(e),a=s===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:h,description:d}=Qe(s);u.push(`root ID: ${s.spanContext().spanId}`),h&&u.push(`root op: ${h}`),d&&u.push(`root description: ${d}`)}Y.log(`${c}
24
24
  ${u.join(`
25
- `)}`)}function wO(e){if(!we)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Qe(e),{spanId:r}=e.spanContext(),o=Zt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;Y.log(s)}function O0(e,t,n,r=en()){const i=r&&Zt(r);i&&(we&&Y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[sa]:t,[oa]:n}))}function wm(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[oa],o=r[sa];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}const Tm=1e3;class ol{constructor(t={}){this._traceId=t.traceId||qr(),this._spanId=t.spanId||ia(),this._startTime=t.startTimestamp||Yt(),this._links=t.links,this._attributes={},this.setAttributes({[Ft]:"manual",[jn]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Sh:h0}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=$i(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Hn,"custom"),this}end(t){this._endTime||(this._endTime=$i(t),wO(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[jn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:y0(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ft],profile_id:this._attributes[bh],exclusive_time:this._attributes[os],measurements:wm(this._events),is_segment:this._isStandaloneSpan&&Zt(this)===this||void 0,segment_id:this._isStandaloneSpan?Zt(this).spanContext().spanId:void 0,links:g0(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){we&&Y.log("[Tracing] Adding an event to span:",t);const i=Im(n)?n:r||Yt(),o=Im(n)?{}:n||{},s={name:t,time:$i(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Re();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Zt(this)))return;if(this._isStandaloneSpan){this._sampled?IO(EO([this],t)):(we&&Y.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(lu(this).scope||tt()).captureEvent(r)}_convertSpanToTransaction(){if(!Am(Qe(this)))return;this._name||(we&&Y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=lu(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=Ps(this).filter(h=>h!==this&&!TO(h)).map(h=>Qe(h)).filter(Am),s=this._attributes[Hn];delete this._attributes[qd],o.forEach(h=>{delete h.data[qd]});const a={contexts:{trace:XA(this)},spans:o.length>Tm?o.sort((h,d)=>h.start_timestamp-d.start_timestamp).slice(0,Tm):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ur(this)},request:r,...s&&{transaction_info:{source:s}}},c=wm(this._events);return c&&Object.keys(c).length&&(we&&Y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Im(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Am(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function TO(e){return e instanceof ol&&e.isStandaloneSpan()}function IO(e){const t=Re();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function C0(e,t,n=()=>{}){let r;try{r=e()}catch(i){throw t(i),n(),i}return AO(r,t,n)}function AO(e,t,n){return na(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function OO(e,t,n){if(!vi(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=qi(i);if(o===void 0)return we&&Y.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return we&&Y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const s=n<o;return s||we&&Y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const hu="__SENTRY_SUPPRESS_TRACING__";function sl(e,t){const n=ca();if(n.startSpan)return n.startSpan(e,t);const r=Ah(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Jn(a,()=>R0(o)(()=>{const u=tt(),h=Oh(u,o),m=e.onlyIfParent&&!h?new Yr:Ih({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return Vi(u,m),C0(()=>t(m),()=>{const{status:g}=Qe(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:zt,message:"internal_error"})},()=>{m.end()})}))}function CO(e,t){const n=ca();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Ah(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Jn(a,()=>R0(o)(()=>{const u=tt(),h=Oh(u,o),m=e.onlyIfParent&&!h?new Yr:Ih({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return Vi(u,m),C0(()=>t(m,()=>m.end()),()=>{const{status:g}=Qe(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:zt,message:"internal_error"})})}))}function oo(e){const t=ca();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ah(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>Jn(e.scope,s):i!==void 0?s=>aa(i,s):s=>s())(()=>{const s=tt(),a=Oh(s,i);return e.onlyIfParent&&!a?new Yr:Ih({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}const RO=(e,t)=>{const n=Zr(),r=Oi(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e;return Jn(s=>{const a=d0(i,o);return s.setPropagationContext(a),t()})};function aa(e,t){const n=ca();return n.withActiveSpan?n.withActiveSpan(e,t):Jn(r=>(Vi(r,e||void 0),t(r)))}function MO(e){const t=ca();return t.suppressTracing?t.suppressTracing(e):Jn(n=>{n.setSDKProcessingMetadata({[hu]:!0});const r=e();return n.setSDKProcessingMetadata({[hu]:void 0}),r})}function NO(e){return Jn(t=>(t.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),we&&Y.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),aa(null,e)))}function Ih({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!vi()){const s=new Yr;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ur(s)};Hc(s,a)}return s}const i=Qt();let o;if(e&&!n)o=kO(e,r,t),_0(e,o);else if(e){const s=ur(e),{traceId:a,spanId:c}=e.spanContext(),u=ro(e);o=Om({traceId:a,parentSpanId:c,...t},r,u),Hc(o,s)}else{const{traceId:s,dsc:a,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...r.getPropagationContext()};o=Om({traceId:s,parentSpanId:c,...t},r,u),a&&Hc(o,a)}return SO(o),$A(o,r,i),o}function Ah(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=$i(e.startTime),delete r.startTime,r}return n}function ca(){const e=Zr();return Oi(e)}function Om(e,t,n){const r=Re(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[h,d,m]=t.getScopeData().sdkProcessingMetadata[hu]?[!1]:OO(i,{name:o,parentSampled:a,attributes:c,parentSampleRate:qi(u.dsc?.sample_rate)},u.sampleRand),g=new ol({...e,attributes:{[Hn]:"custom",[rl]:d!==void 0&&m?d:void 0,...c},sampled:h});return!h&&r&&(we&&Y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",g),g}function kO(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[hu]?!1:ro(e),s=o?new ol({...n,parentSpanId:r,traceId:i,sampled:o}):new Yr({traceId:i});_0(e,s);const a=Re();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function Oh(e,t){if(t)return t;if(t===null)return;const n=Us(e);if(!n)return;const r=Re();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Zt(n):n}function R0(e){return e!==void 0?t=>aa(e,t):t=>t()}const Uc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},PO="heartbeatFailed",xO="idleTimeout",LO="finalTimeout",DO="externalFinish";function M0(e,t={}){const n=new Map;let r=!1,i,o=DO,s=!t.disableAutoFinish;const a=[],{idleTimeout:c=Uc.idleTimeout,finalTimeout:u=Uc.finalTimeout,childSpanTimeout:h=Uc.childSpanTimeout,beforeSpanEnd:d}=t,m=Re();if(!m||!vi()){const D=new Yr,W={sample_rate:"0",sampled:"false",...ur(D)};return Hc(D,W),D}const g=tt(),E=en(),T=BO(e);T.end=new Proxy(T.end,{apply(D,W,ue){if(d&&d(T),W instanceof Yr)return;const[P,...$]=ue,G=P||Yt(),q=$i(G),ie=Ps(T).filter(_e=>_e!==T);if(!ie.length)return J(q),Reflect.apply(D,W,[q,...$]);const fe=ie.map(_e=>Qe(_e).timestamp).filter(_e=>!!_e),ce=fe.length?Math.max(...fe):void 0,re=Qe(T).start_timestamp,X=Math.min(re?re+u/1e3:1/0,Math.max(re||-1/0,Math.min(q,ce||1/0)));return J(X),Reflect.apply(D,W,[X,...$])}});function L(){i&&(clearTimeout(i),i=void 0)}function H(D){L(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=xO,T.end(D))},c)}function K(D){i=setTimeout(()=>{!r&&s&&(o=PO,T.end(D))},h)}function V(D){L(),n.set(D,!0);const W=Yt();K(W+h/1e3)}function F(D){if(n.has(D)&&n.delete(D),n.size===0){const W=Yt();H(W+c/1e3)}}function J(D){r=!0,n.clear(),a.forEach(q=>q()),Vi(g,E);const W=Qe(T),{start_timestamp:ue}=W;if(!ue)return;W.data[uu]||T.setAttribute(uu,o),Y.log(`[Tracing] Idle span "${W.op}" finished`);const $=Ps(T).filter(q=>q!==T);let G=0;$.forEach(q=>{q.isRecording()&&(q.setStatus({code:zt,message:"cancelled"}),q.end(D),we&&Y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(q,void 0,2)));const ie=Qe(q),{timestamp:fe=0,start_timestamp:ce=0}=ie,re=ce<=D,X=(u+c)/1e3,_e=fe-ce<=X;if(we){const ge=JSON.stringify(q,void 0,2);re?_e||Y.log("[Tracing] Discarding span since it finished after idle span final timeout",ge):Y.log("[Tracing] Discarding span since it happened after idle span was finished",ge)}(!_e||!re)&&(ZA(T,q),G++)}),G>0&&T.setAttribute("sentry.idle_span_discarded_spans",G)}return a.push(m.on("spanStart",D=>{if(r||D===T||Qe(D).timestamp||D instanceof ol&&D.isStandaloneSpan())return;Ps(T).includes(D)&&V(D.spanContext().spanId)})),a.push(m.on("spanEnd",D=>{r||F(D.spanContext().spanId)})),a.push(m.on("idleSpanEnableAutoFinish",D=>{D===T&&(s=!0,H(),n.size&&K())})),t.disableAutoFinish||H(),setTimeout(()=>{r||(T.setStatus({code:zt,message:"deadline_exceeded"}),o=LO,T.end())},u),T}function BO(e){const t=oo(e);return Vi(tt(),t),we&&Y.log("[Tracing] Started span is an idle span"),t}const nd=0,Cm=1,Rm=2;function Xr(e){return new Ei(t=>{t(e)})}function pu(e){return new Ei((t,n)=>{n(e)})}class Ei{constructor(t){this._state=nd,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ei((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ei((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===nd)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Cm&&n[1](this._value),this._state===Rm&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===nd){if(na(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Cm,o)},i=o=>{n(Rm,o)};try{t(r,i)}catch(o){i(o)}}}function Jd(e,t,n,r=0){return new Ei((i,o)=>{const s=e[r];if(t===null||typeof s!="function")i(t);else{const a=s({...t},n);we&&s.id&&a===null&&Y.log(`Event processor "${s.id}" dropped event`),na(a)?a.then(c=>Jd(e,c,n,r+1).then(i)).then(null,o):Jd(e,a,n,r+1).then(i).then(null,o)}})}function FO(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;HO(e,t),r&&$O(e,r),WO(e,n),UO(e,i),jO(e,o)}function mu(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:h,attachments:d,propagationContext:m,transactionName:g,span:E}=t;dc(e,"extra",n),dc(e,"tags",r),dc(e,"user",i),dc(e,"contexts",o),e.sdkProcessingMetadata=ra(e.sdkProcessingMetadata,a,2),s&&(e.level=s),g&&(e.transactionName=g),E&&(e.span=E),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function dc(e,t,n){e[t]=ra(e[t],n,1)}function HO(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function UO(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function jO(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function $O(e,t){e.contexts={trace:p0(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ur(t),...e.sdkProcessingMetadata};const n=Zt(t),r=Qe(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function WO(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let fc,Mm,hc;function N0(e){const t=We._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return hc&&n.length===Mm||(Mm=n.length,hc=n.reduce((r,i)=>{fc||(fc={});const o=fc[i];if(o)r[o[0]]=o[1];else{const s=e(i);for(let a=s.length-1;a>=0;a--){const u=s[a]?.filename,h=t[i];if(u&&h){r[u]=h,fc[i]=[u,h];break}}}return r},{})),hc}function zO(e,t){const n=N0(e);if(!n)return[];const r=[];for(const i of t)i&&n[i]&&r.push({type:"sourcemap",code_file:i,debug_id:n[i]});return r}function k0(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Tn(),timestamp:t.timestamp||no()},u=n.integrations||e.integrations.map(L=>L.name);GO(c,e),YO(c,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&VO(c,e.stackParser);const h=KO(r,n.captureContext);n.mechanism&&bi(c,n.mechanism);const d=i?i.getEventProcessors():[],m=nl().getScopeData();if(o){const L=o.getScopeData();mu(m,L)}if(h){const L=h.getScopeData();mu(m,L)}const g=[...n.attachments||[],...m.attachments];g.length&&(n.attachments=g),FO(c,m);const E=[...d,...m.eventProcessors];return Jd(E,c,n).then(L=>(L&&qO(L),typeof s=="number"&&s>0?XO(L,s,a):L))}function GO(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||il,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&(s.url=Lo(s.url,o))}function VO(e,t){const n=N0(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function qO(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function YO(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function XO(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ln(i.data,t,n)}}))},...e.user&&{user:Ln(e.user,t,n)},...e.contexts&&{contexts:Ln(e.contexts,t,n)},...e.extra&&{extra:Ln(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ln(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ln(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ln(e.contexts.flags,3,n)),r}function KO(e,t){if(!t)return e;const n=e?e.clone():new cr;return n.update(t),n}function JO(e){if(e)return ZO(e)?{captureContext:e}:eC(e)?{captureContext:e}:e}function ZO(e){return e instanceof cr||typeof e=="function"}const QO=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function eC(e){return Object.keys(e).some(t=>QO.includes(t))}function Xi(e,t){return tt().captureException(e,JO(t))}function gu(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return tt().captureMessage(e,n,r)}function ua(e,t){return tt().captureEvent(e,t)}function P0(e,t){Qt().setContext(e,t)}function tC(e){Qt().setExtras(e)}function nC(e,t){Qt().setExtra(e,t)}function rC(e){Qt().setTags(e)}function iC(e,t){Qt().setTag(e,t)}function oC(e){Qt().setUser(e)}function x0(){return Qt().lastEventId()}async function sC(e){const t=Re();return t?t.flush(e):(we&&Y.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function aC(e){const t=Re();return t?t.close(e):(we&&Y.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function cC(){return!!Re()}function L0(){const e=Re();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function D0(e){Qt().addEventProcessor(e)}function Zd(e){const t=Qt(),n=tt(),{userAgent:r}=We.navigator||{},i=OA({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Do(o,{status:"exited"}),Ch(),t.setSession(i),i}function Ch(){const e=Qt(),n=tt().getSession()||e.getSession();n&&CA(n),B0(),e.setSession()}function B0(){const e=Qt(),t=Re(),n=e.getSession();n&&t&&t.captureSession(n)}function Qd(e=!1){if(e){Ch();return}B0()}const uC="7";function F0(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function lC(e){return`${F0(e)}${e.projectId}/envelope/`}function dC(e,t){const n={sentry_version:uC};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function H0(e,t,n){return t||`${lC(e)}?${dC(e,n)}`}function fC(e,t){const n=S0(e);if(!n)return"";const r=`${F0(n)}embed/error-page/`;let i=`dsn=${io(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}const Nm=[];function hC(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function pC(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return hC(r)}function mC(e,t){const n={};return t.forEach(r=>{r&&U0(e,r,n)}),n}function km(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function U0(e,t,n){if(n[t.name]){we&&Y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Nm.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Nm.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}we&&Y.log(`Integration installed: ${t.name}`)}function ef(e){const t=Re();if(!t){we&&Y.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function gC(e,t,n){const r=[{type:"client_report"},{timestamp:no(),discarded_events:e}];return Qr(t?{dsn:t}:{},[r])}function j0(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function yC(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[bh],exclusive_time:s?.[os],measurements:e.measurements,is_segment:!0}}function _C(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[bh]:e.profile_id},...e.exclusive_time&&{[os]:e.exclusive_time}}}},measurements:e.measurements}}const Pm="Not capturing exception because it's already been captured.",xm="Discarded session because of missing or non-string release",$0=Symbol.for("SentryInternalError"),W0=Symbol.for("SentryDoNotSendEventError");function jc(e){return{message:e,[$0]:!0}}function rd(e){return{message:e,[W0]:!0}}function Lm(e){return!!e&&typeof e=="object"&&$0 in e}function Dm(e){return!!e&&typeof e=="object"&&W0 in e}class bC{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=S0(t.dsn):we&&Y.warn("No DSN provided, client will not send events."),this._dsn){const n=H0(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const i=Tn();if(pm(t))return we&&Y.log(Pm),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(t,n,r,i){const o={event_id:Tn(),...r},s=el(t)?t:String(t),a=xo(t)?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(t,n,r){const i=Tn();if(n?.originalException&&pm(n.originalException))return we&&Y.log(Pm),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),Do(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):Xr(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];U0(this,t,this._integrations),n||km(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=vO(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=dO(r,gO(o));const i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const{release:n,environment:r=il}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){we&&Y.warn(xm);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){we&&Y.warn(xm);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=bO(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;we&&Y.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(we&&Y.error("Error while sending envelope:",n),n)):(we&&Y.error("Transport disabled"),Xr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=mC(this,t),km(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception?.values;if(o){i=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Do(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ei(n=>{let r=0;const i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,t&&r>=t&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),k0(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:r0(r),...a.contexts};const c=wh(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=tt(),i=Qt()){return we&&tf(t)&&Y.log(`Captured error event \`${j0(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{we&&(Dm(o)?Y.log(o.message):Lm(o)?Y.warn(o.message):Y.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=z0(t),c=tf(t),u=t.type||"error",h=`before send for type \`${u}\``,d=typeof s>"u"?void 0:qi(s);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),pu(rd(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const m=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,i).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",m),rd("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return g;const T=EC(this,o,g,n);return vC(T,h)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",m),a){const H=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",H)}throw rd(`${h} returned \`null\`, will not send event.`)}const E=r.getSession()||i.getSession();if(c&&E&&this._updateSessionFromEvent(E,g),a){const L=g.sdkProcessingMetadata?.spanCountBeforeProcessing||0,H=g.spans?g.spans.length:0,K=L-H;K>0&&this.recordDroppedEvent("before_send","span",K)}const T=g.transaction_info;if(a&&T&&g.transaction!==t.transaction){const L="custom";g.transaction_info={...T,source:L}}return this.sendEvent(g,n),g}).then(null,g=>{throw Dm(g)||Lm(g)?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),jc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
26
- Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){we&&Y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){we&&Y.log("No outcomes to send");return}if(!this._dsn){we&&Y.log("No dsn provided, will not send outcomes");return}we&&Y.log("Sending outcomes:",t);const n=gC(t,this._options.tunnel&&io(this._dsn));this.sendEnvelope(n)}}function vC(e,t){const n=`${t} must return \`null\` or a valid event.`;if(na(e))return e.then(r=>{if(!Gr(r)&&r!==null)throw jc(n);return r},r=>{throw jc(`${t} rejected with ${r}`)});if(!Gr(e)&&e!==null)throw jc(n);return e}function EC(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;let a=n;if(tf(a)&&i)return i(a,r);if(z0(a)){if(s){const c=s(yC(a));if(c?a=ra(n,_C(c)):Xd(),a.spans){const u=[];for(const h of a.spans){const d=s(h);d?u.push(d):(Xd(),u.push(h))}a.spans=u}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function tf(e){return e.type===void 0}function z0(e){return e.type==="transaction"}function SC(e,t){return t?Jn(t,()=>{const n=en(),r=n?p0(n):r0(t);return[n?ur(n):wh(e,t),r]}):[void 0,void 0]}const wC={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function TC(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function IC(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=io(r)),Qr(i,[TC(e)])}const AC=100;function OC(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function ui(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function CC(e,t){const n=Rh(),r=G0(e);r===void 0?n.set(e,[t]):r.length>=AC?($c(e,r),n.set(e,[t])):n.set(e,[...r,t])}function nf(e,t=Re(),n=tt(),r=CC){if(!t){we&&Y.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s,beforeSendLog:a,_experiments:c}=t.getOptions();if(!(s??c?.enableLogs)){we&&Y.warn("logging option not enabled, log will not be captured.");return}const h=a??c?.beforeSendLog,[,d]=SC(t,n),m={...e.attributes},{user:{id:g,email:E,username:T}}=RC(n);ui(m,"user.id",g,!1),ui(m,"user.email",E,!1),ui(m,"user.name",T,!1),ui(m,"sentry.release",i),ui(m,"sentry.environment",o);const{name:L,version:H}=t.getSdkMetadata()?.sdk??{};ui(m,"sentry.sdk.name",L),ui(m,"sentry.sdk.version",H);const K=e.message;if(el(K)){const{__sentry_template_string__:G,__sentry_template_values__:q=[]}=K;m["sentry.message.template"]=G,q.forEach((ie,fe)=>{m[`sentry.message.parameter.${fe}`]=ie})}const V=Us(n);ui(m,"sentry.trace.parent_span_id",V?.spanContext().spanId);const F={...e,attributes:m};t.emit("beforeCaptureLog",F);const J=h?Ti(()=>h(F)):F;if(!J){t.recordDroppedEvent("before_send","log_item",1),we&&Y.warn("beforeSendLog returned null, log will not be captured.");return}const{level:D,message:W,attributes:ue={},severityNumber:P}=J,$={timestamp:Yt(),level:D,body:W,trace_id:d?.trace_id,severity_number:P??wC[D],attributes:Object.keys(ue).reduce((G,q)=>(G[q]=OC(ue[q]),G),{})};r(t,$),t.emit("afterCaptureLog",J)}function $c(e,t){const n=t??G0(e)??[];if(n.length===0)return;const r=e.getOptions(),i=IC(n,r._metadata,r.tunnel,e.getDsn());Rh().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function G0(e){return Rh().get(e)}function RC(e){const t=nl().getScopeData();return mu(t,Qt().getScopeData()),mu(t,e.getScopeData()),t}function Rh(){return ta("clientToLogBufferMap",()=>new WeakMap)}function MC(e,t){t.debug===!0&&(we?Y.enable():Ti(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),tt().update(t.initialScope);const r=new e(t);return V0(r),r.init(),r}function V0(e){tt().setClient(e)}const q0=Symbol.for("SentryBufferFullError");function NC(e){const t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return pu(q0);const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Ei((a,c)=>{let u=t.length;if(!u)return a(!0);const h=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{Xr(d).then(()=>{--u||(clearTimeout(h),a(!0))},c)})})}return{$:t,add:i,drain:o}}const kC=60*1e3;function Y0(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?kC:r-t}function PC(e,t){return e[t]||e.all||0}function X0(e,t,n=Date.now()){return PC(e,t)>n}function K0(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,h]=a.split(":",5),d=parseInt(c,10),m=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+m;else for(const g of u.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+m):i[g]=r+m}else s?i.all=r+Y0(s,r):t===429&&(i.all=r+60*1e3);return i}const xC=64;function J0(e,t,n=NC(e.bufferSize||xC)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(Yi(s,(d,m)=>{const g=Sm(m);X0(r,g)?e.recordDroppedEvent("ratelimit_backoff",g):a.push(d)}),a.length===0)return Xr({});const c=Qr(s[0],a),u=d=>{Yi(c,(m,g)=>{e.recordDroppedEvent(d,Sm(g))})},h=()=>t({body:fu(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&we&&Y.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=K0(r,d),d),d=>{throw u("network_error"),we&&Y.error("Encountered error running transport request:",d),d});return n.add(h).then(d=>d,d=>{if(d===q0)return we&&Y.error("Skipped sending event because buffer is full."),u("queue_overflow"),Xr({});throw d})}return{send:o,flush:i}}const id=100,od=5e3,LC=36e5;function DC(e){function t(...n){we&&Y.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=od,s;function a(d,m,g){return Em(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,m,g):!0}function c(d){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const m=await i.shift();m&&(t("Attempting to send previously queued event"),m[0].sent_at=new Date().toISOString(),h(m,!0).catch(g=>{t("Failed to retry sending",g)}))},d),typeof s!="number"&&s.unref&&s.unref()}function u(){s||(c(o),o=Math.min(o*2,LC))}async function h(d,m=!1){if(!m&&Em(d,["replay_event","replay_recording"]))return await i.push(d),c(id),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const g=await r.send(d);let E=id;if(g){if(g.headers?.["retry-after"])E=Y0(g.headers["retry-after"]);else if(g.headers?.["x-sentry-rate-limits"])E=6e4;else if((g.statusCode||0)>=400)return g}return c(E),o=od,g}catch(g){if(await a(d,g,o))return m?await i.unshift(d):await i.push(d),u(),t("Error sending. Event queued.",g),{};throw g}}return n.flushAtStartup&&u(),{send:h,flush:d=>(d===void 0&&(o=od,c(id)),r.flush(d))}}}function Z0(e,t){let n;return Yi(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function BC(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=Z0(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function FC(e,t){return Qr(t?{...e[0],dsn:t}:e[0],e[1])}function HC(e,t){return n=>{const r=e(n),i=new Map;function o(c,u){const h=u?`${c}:${u}`:c;let d=i.get(h);if(!d){const m=v0(c);if(!m)return;const g=H0(m,n.tunnel);d=u?BC(e,u)({...n,url:g}):e({...n,url:g}),i.set(h,d)}return[c,d]}async function s(c){function u(g){const E=g?.length?g:["event"];return Z0(c,E)}const h=t({envelope:c,getEvent:u}).map(g=>typeof g=="string"?o(g,void 0):o(g.dsn,g.release)).filter(g=>!!g),d=h.length?h:[["",r]];return(await Promise.all(d.map(([g,E])=>E.send(FC(c,g)))))[0]}async function a(c){const u=[...i.values(),r];return(await Promise.all(u.map(d=>d.flush(c)))).every(d=>d)}return{send:s,flush:a}}}function Q0(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return jC(e,n)||UC(e,r)}function UC(e,t){return t?Bm(e)===Bm(t):!1}function jC(e,t){return t?e.includes(t.host):!1}function Bm(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ev(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const $C=ev;function WC(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function zC(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function GC(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:jr})),version:jr}),e._metadata=i}function Mh(e={}){const t=e.client||Re();if(!L0()||!t)return{};const n=Zr(),r=Oi(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||tt(),o=e.span||en(),s=o?m0(o):VC(i),a=o?ur(o):wh(t,i),c=u0(a);return l0.test(s)?{"sentry-trace":s,baggage:c}:(Y.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function VC(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return f0(t,r,n)}function qC(e,t,n){let r,i,o;const s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function h(){return i!==void 0||o!==void 0?c():r}function d(){return i&&clearTimeout(i),i=a(c,t),s&&o===void 0&&(o=a(c,s)),r}return d.cancel=u,d.flush=h,d}const YC=100;function Ar(e,t){const n=Re(),r=Qt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=YC}=n.getOptions();if(o<=0)return;const a={timestamp:no(),...e},c=i?Ti(()=>i(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Fm;const XC="FunctionToString",Hm=new WeakMap,KC=()=>({name:XC,setupOnce(){Fm=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=_h(this),n=Hm.has(Re())&&t!==void 0?t:this;return Fm.apply(n,e)}}catch{}},setup(e){Hm.set(e,!0)}}),tv=KC,JC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],ZC="EventFilters",nv=(e={})=>{let t;return{name:ZC,setup(n){const r=n.getOptions();t=Um(e,r)},processEvent(n,r,i){if(!t){const o=i.getOptions();t=Um(e,o)}return QC(n,t)?null:n}}},rv=(e={})=>({...nv(e),name:"InboundFilters"});function Um(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:JC],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function QC(e,t){if(e.type){if(e.type==="transaction"&&tR(e,t.ignoreTransactions))return we&&Y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
27
- Event: ${Li(e)}`),!0}else{if(eR(e,t.ignoreErrors))return we&&Y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
28
- Event: ${Li(e)}`),!0;if(oR(e))return we&&Y.warn(`Event dropped due to not having an error message, error type or stacktrace.
29
- Event: ${Li(e)}`),!0;if(nR(e,t.denyUrls))return we&&Y.warn(`Event dropped due to being matched by \`denyUrls\` option.
25
+ `)}`)}function IO(e){if(!we)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Qe(e),{spanId:r}=e.spanContext(),o=Zt(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;Y.log(s)}function R0(e,t,n,r=en()){const i=r&&Zt(r);i&&(we&&Y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[sa]:t,[oa]:n}))}function Im(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[oa],o=r[sa];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}const Am=1e3;class ol{constructor(t={}){this._traceId=t.traceId||qr(),this._spanId=t.spanId||ia(),this._startTime=t.startTimestamp||Yt(),this._links=t.links,this._attributes={},this.setAttributes({[Ft]:"manual",[jn]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Th:m0}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=$i(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Hn,"custom"),this}end(t){this._endTime||(this._endTime=$i(t),IO(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[jn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:b0(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ft],profile_id:this._attributes[Eh],exclusive_time:this._attributes[os],measurements:Im(this._events),is_segment:this._isStandaloneSpan&&Zt(this)===this||void 0,segment_id:this._isStandaloneSpan?Zt(this).spanContext().spanId:void 0,links:_0(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){we&&Y.log("[Tracing] Adding an event to span:",t);const i=Om(n)?n:r||Yt(),o=Om(n)?{}:n||{},s={name:t,time:$i(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Re();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Zt(this)))return;if(this._isStandaloneSpan){this._sampled?OO(wO([this],t)):(we&&Y.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(lu(this).scope||tt()).captureEvent(r)}_convertSpanToTransaction(){if(!Cm(Qe(this)))return;this._name||(we&&Y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=lu(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=Ps(this).filter(h=>h!==this&&!AO(h)).map(h=>Qe(h)).filter(Cm),s=this._attributes[Hn];delete this._attributes[Xd],o.forEach(h=>{delete h.data[Xd]});const a={contexts:{trace:JA(this)},spans:o.length>Am?o.sort((h,d)=>h.start_timestamp-d.start_timestamp).slice(0,Am):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ur(this)},request:r,...s&&{transaction_info:{source:s}}},c=Im(this._events);return c&&Object.keys(c).length&&(we&&Y.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Om(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Cm(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function AO(e){return e instanceof ol&&e.isStandaloneSpan()}function OO(e){const t=Re();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function M0(e,t,n=()=>{}){let r;try{r=e()}catch(i){throw t(i),n(),i}return CO(r,t,n)}function CO(e,t,n){return na(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function RO(e,t,n){if(!vi(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const o=qi(i);if(o===void 0)return we&&Y.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return we&&Y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const s=n<o;return s||we&&Y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}const hu="__SENTRY_SUPPRESS_TRACING__";function sl(e,t){const n=ca();if(n.startSpan)return n.startSpan(e,t);const r=Ch(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Jn(a,()=>N0(o)(()=>{const u=tt(),h=Rh(u,o),m=e.onlyIfParent&&!h?new Yr:Oh({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return Vi(u,m),M0(()=>t(m),()=>{const{status:g}=Qe(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:zt,message:"internal_error"})},()=>{m.end()})}))}function MO(e,t){const n=ca();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Ch(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Jn(a,()=>N0(o)(()=>{const u=tt(),h=Rh(u,o),m=e.onlyIfParent&&!h?new Yr:Oh({parentSpan:h,spanArguments:r,forceTransaction:i,scope:u});return Vi(u,m),M0(()=>t(m,()=>m.end()),()=>{const{status:g}=Qe(m);m.isRecording()&&(!g||g==="ok")&&m.setStatus({code:zt,message:"internal_error"})})}))}function oo(e){const t=ca();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ch(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?s=>Jn(e.scope,s):i!==void 0?s=>aa(i,s):s=>s())(()=>{const s=tt(),a=Rh(s,i);return e.onlyIfParent&&!a?new Yr:Oh({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}const NO=(e,t)=>{const n=Zr(),r=Oi(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:o}=e;return Jn(s=>{const a=h0(i,o);return s.setPropagationContext(a),t()})};function aa(e,t){const n=ca();return n.withActiveSpan?n.withActiveSpan(e,t):Jn(r=>(Vi(r,e||void 0),t(r)))}function kO(e){const t=ca();return t.suppressTracing?t.suppressTracing(e):Jn(n=>{n.setSDKProcessingMetadata({[hu]:!0});const r=e();return n.setSDKProcessingMetadata({[hu]:void 0}),r})}function PO(e){return Jn(t=>(t.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),we&&Y.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),aa(null,e)))}function Oh({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!vi()){const s=new Yr;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ur(s)};Hc(s,a)}return s}const i=Qt();let o;if(e&&!n)o=xO(e,r,t),v0(e,o);else if(e){const s=ur(e),{traceId:a,spanId:c}=e.spanContext(),u=ro(e);o=Rm({traceId:a,parentSpanId:c,...t},r,u),Hc(o,s)}else{const{traceId:s,dsc:a,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...r.getPropagationContext()};o=Rm({traceId:s,parentSpanId:c,...t},r,u),a&&Hc(o,a)}return TO(o),zA(o,r,i),o}function Ch(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=$i(e.startTime),delete r.startTime,r}return n}function ca(){const e=Zr();return Oi(e)}function Rm(e,t,n){const r=Re(),i=r?.getOptions()||{},{name:o=""}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});const a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[h,d,m]=t.getScopeData().sdkProcessingMetadata[hu]?[!1]:RO(i,{name:o,parentSampled:a,attributes:c,parentSampleRate:qi(u.dsc?.sample_rate)},u.sampleRand),g=new ol({...e,attributes:{[Hn]:"custom",[rl]:d!==void 0&&m?d:void 0,...c},sampled:h});return!h&&r&&(we&&Y.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",g),g}function xO(e,t,n){const{spanId:r,traceId:i}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[hu]?!1:ro(e),s=o?new ol({...n,parentSpanId:r,traceId:i,sampled:o}):new Yr({traceId:i});v0(e,s);const a=Re();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function Rh(e,t){if(t)return t;if(t===null)return;const n=Us(e);if(!n)return;const r=Re();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Zt(n):n}function N0(e){return e!==void 0?t=>aa(e,t):t=>t()}const Uc={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},LO="heartbeatFailed",DO="idleTimeout",BO="finalTimeout",FO="externalFinish";function k0(e,t={}){const n=new Map;let r=!1,i,o=FO,s=!t.disableAutoFinish;const a=[],{idleTimeout:c=Uc.idleTimeout,finalTimeout:u=Uc.finalTimeout,childSpanTimeout:h=Uc.childSpanTimeout,beforeSpanEnd:d}=t,m=Re();if(!m||!vi()){const D=new Yr,W={sample_rate:"0",sampled:"false",...ur(D)};return Hc(D,W),D}const g=tt(),E=en(),T=HO(e);T.end=new Proxy(T.end,{apply(D,W,ue){if(d&&d(T),W instanceof Yr)return;const[P,...$]=ue,G=P||Yt(),q=$i(G),ie=Ps(T).filter(_e=>_e!==T);if(!ie.length)return J(q),Reflect.apply(D,W,[q,...$]);const fe=ie.map(_e=>Qe(_e).timestamp).filter(_e=>!!_e),ce=fe.length?Math.max(...fe):void 0,re=Qe(T).start_timestamp,X=Math.min(re?re+u/1e3:1/0,Math.max(re||-1/0,Math.min(q,ce||1/0)));return J(X),Reflect.apply(D,W,[X,...$])}});function L(){i&&(clearTimeout(i),i=void 0)}function H(D){L(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=DO,T.end(D))},c)}function K(D){i=setTimeout(()=>{!r&&s&&(o=LO,T.end(D))},h)}function V(D){L(),n.set(D,!0);const W=Yt();K(W+h/1e3)}function F(D){if(n.has(D)&&n.delete(D),n.size===0){const W=Yt();H(W+c/1e3)}}function J(D){r=!0,n.clear(),a.forEach(q=>q()),Vi(g,E);const W=Qe(T),{start_timestamp:ue}=W;if(!ue)return;W.data[uu]||T.setAttribute(uu,o),Y.log(`[Tracing] Idle span "${W.op}" finished`);const $=Ps(T).filter(q=>q!==T);let G=0;$.forEach(q=>{q.isRecording()&&(q.setStatus({code:zt,message:"cancelled"}),q.end(D),we&&Y.log("[Tracing] Cancelling span since span ended early",JSON.stringify(q,void 0,2)));const ie=Qe(q),{timestamp:fe=0,start_timestamp:ce=0}=ie,re=ce<=D,X=(u+c)/1e3,_e=fe-ce<=X;if(we){const ge=JSON.stringify(q,void 0,2);re?_e||Y.log("[Tracing] Discarding span since it finished after idle span final timeout",ge):Y.log("[Tracing] Discarding span since it happened after idle span was finished",ge)}(!_e||!re)&&(eO(T,q),G++)}),G>0&&T.setAttribute("sentry.idle_span_discarded_spans",G)}return a.push(m.on("spanStart",D=>{if(r||D===T||Qe(D).timestamp||D instanceof ol&&D.isStandaloneSpan())return;Ps(T).includes(D)&&V(D.spanContext().spanId)})),a.push(m.on("spanEnd",D=>{r||F(D.spanContext().spanId)})),a.push(m.on("idleSpanEnableAutoFinish",D=>{D===T&&(s=!0,H(),n.size&&K())})),t.disableAutoFinish||H(),setTimeout(()=>{r||(T.setStatus({code:zt,message:"deadline_exceeded"}),o=BO,T.end())},u),T}function HO(e){const t=oo(e);return Vi(tt(),t),we&&Y.log("[Tracing] Started span is an idle span"),t}const nd=0,Mm=1,Nm=2;function Xr(e){return new Ei(t=>{t(e)})}function pu(e){return new Ei((t,n)=>{n(e)})}class Ei{constructor(t){this._state=nd,this._handlers=[],this._runExecutor(t)}then(t,n){return new Ei((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ei((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===nd)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Mm&&n[1](this._value),this._state===Nm&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,s)=>{if(this._state===nd){if(na(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(Mm,o)},i=o=>{n(Nm,o)};try{t(r,i)}catch(o){i(o)}}}function Qd(e,t,n,r=0){return new Ei((i,o)=>{const s=e[r];if(t===null||typeof s!="function")i(t);else{const a=s({...t},n);we&&s.id&&a===null&&Y.log(`Event processor "${s.id}" dropped event`),na(a)?a.then(c=>Qd(e,c,n,r+1).then(i)).then(null,o):Qd(e,a,n,r+1).then(i).then(null,o)}})}function UO(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;jO(e,t),r&&zO(e,r),GO(e,n),$O(e,i),WO(e,o)}function mu(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:h,attachments:d,propagationContext:m,transactionName:g,span:E}=t;dc(e,"extra",n),dc(e,"tags",r),dc(e,"user",i),dc(e,"contexts",o),e.sdkProcessingMetadata=ra(e.sdkProcessingMetadata,a,2),s&&(e.level=s),g&&(e.transactionName=g),E&&(e.span=E),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function dc(e,t,n){e[t]=ra(e[t],n,1)}function jO(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function $O(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function WO(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function zO(e,t){e.contexts={trace:g0(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ur(t),...e.sdkProcessingMetadata};const n=Zt(t),r=Qe(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function GO(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let fc,km,hc;function P0(e){const t=We._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return hc&&n.length===km||(km=n.length,hc=n.reduce((r,i)=>{fc||(fc={});const o=fc[i];if(o)r[o[0]]=o[1];else{const s=e(i);for(let a=s.length-1;a>=0;a--){const u=s[a]?.filename,h=t[i];if(u&&h){r[u]=h,fc[i]=[u,h];break}}}return r},{})),hc}function VO(e,t){const n=P0(e);if(!n)return[];const r=[];for(const i of t)i&&n[i]&&r.push({type:"sourcemap",code_file:i,debug_id:n[i]});return r}function x0(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Tn(),timestamp:t.timestamp||no()},u=n.integrations||e.integrations.map(L=>L.name);qO(c,e),KO(c,u),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&YO(c,e.stackParser);const h=ZO(r,n.captureContext);n.mechanism&&bi(c,n.mechanism);const d=i?i.getEventProcessors():[],m=nl().getScopeData();if(o){const L=o.getScopeData();mu(m,L)}if(h){const L=h.getScopeData();mu(m,L)}const g=[...n.attachments||[],...m.attachments];g.length&&(n.attachments=g),UO(c,m);const E=[...d,...m.eventProcessors];return Qd(E,c,n).then(L=>(L&&XO(L),typeof s=="number"&&s>0?JO(L,s,a):L))}function qO(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||il,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const s=e.request;s?.url&&(s.url=Lo(s.url,o))}function YO(e,t){const n=P0(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function XO(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function KO(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function JO(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ln(i.data,t,n)}}))},...e.user&&{user:Ln(e.user,t,n)},...e.contexts&&{contexts:Ln(e.contexts,t,n)},...e.extra&&{extra:Ln(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ln(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ln(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ln(e.contexts.flags,3,n)),r}function ZO(e,t){if(!t)return e;const n=e?e.clone():new cr;return n.update(t),n}function QO(e){if(e)return eC(e)?{captureContext:e}:nC(e)?{captureContext:e}:e}function eC(e){return e instanceof cr||typeof e=="function"}const tC=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function nC(e){return Object.keys(e).some(t=>tC.includes(t))}function Xi(e,t){return tt().captureException(e,QO(t))}function gu(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return tt().captureMessage(e,n,r)}function ua(e,t){return tt().captureEvent(e,t)}function L0(e,t){Qt().setContext(e,t)}function rC(e){Qt().setExtras(e)}function iC(e,t){Qt().setExtra(e,t)}function oC(e){Qt().setTags(e)}function sC(e,t){Qt().setTag(e,t)}function aC(e){Qt().setUser(e)}function D0(){return Qt().lastEventId()}async function cC(e){const t=Re();return t?t.flush(e):(we&&Y.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function uC(e){const t=Re();return t?t.close(e):(we&&Y.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function lC(){return!!Re()}function B0(){const e=Re();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function F0(e){Qt().addEventProcessor(e)}function ef(e){const t=Qt(),n=tt(),{userAgent:r}=We.navigator||{},i=RA({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Do(o,{status:"exited"}),Mh(),t.setSession(i),i}function Mh(){const e=Qt(),n=tt().getSession()||e.getSession();n&&MA(n),H0(),e.setSession()}function H0(){const e=Qt(),t=Re(),n=e.getSession();n&&t&&t.captureSession(n)}function tf(e=!1){if(e){Mh();return}H0()}const dC="7";function U0(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function fC(e){return`${U0(e)}${e.projectId}/envelope/`}function hC(e,t){const n={sentry_version:dC};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function j0(e,t,n){return t||`${fC(e)}?${hC(e,n)}`}function pC(e,t){const n=T0(e);if(!n)return"";const r=`${U0(n)}embed/error-page/`;let i=`dsn=${io(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}const Pm=[];function mC(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function gC(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return mC(r)}function yC(e,t){const n={};return t.forEach(r=>{r&&$0(e,r,n)}),n}function xm(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function $0(e,t,n){if(n[t.name]){we&&Y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Pm.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Pm.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}we&&Y.log(`Integration installed: ${t.name}`)}function nf(e){const t=Re();if(!t){we&&Y.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function _C(e,t,n){const r=[{type:"client_report"},{timestamp:no(),discarded_events:e}];return Qr(t?{dsn:t}:{},[r])}function W0(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function bC(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[Eh],exclusive_time:s?.[os],measurements:e.measurements,is_segment:!0}}function vC(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Eh]:e.profile_id},...e.exclusive_time&&{[os]:e.exclusive_time}}}},measurements:e.measurements}}const Lm="Not capturing exception because it's already been captured.",Dm="Discarded session because of missing or non-string release",z0=Symbol.for("SentryInternalError"),G0=Symbol.for("SentryDoNotSendEventError");function jc(e){return{message:e,[z0]:!0}}function rd(e){return{message:e,[G0]:!0}}function Bm(e){return!!e&&typeof e=="object"&&z0 in e}function Fm(e){return!!e&&typeof e=="object"&&G0 in e}class EC{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=T0(t.dsn):we&&Y.warn("No DSN provided, client will not send events."),this._dsn){const n=j0(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const i=Tn();if(gm(t))return we&&Y.log(Lm),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r))),o.event_id}captureMessage(t,n,r,i){const o={event_id:Tn(),...r},s=el(t)?t:String(t),a=xo(t)?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,i))),o.event_id}captureEvent(t,n,r){const i=Tn();if(n?.originalException&&gm(n.originalException))return we&&Y.log(Lm),i;const o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),Do(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(i=>r&&i))):Xr(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];$0(this,t,this._integrations),n||xm(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=SO(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=hO(r,_O(o));const i=this.sendEnvelope(r);i&&i.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const{release:n,environment:r=il}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){we&&Y.warn(Dm);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){we&&Y.warn(Dm);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const i=EO(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const i=`${t}:${n}`;we&&Y.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(we&&Y.error("Error while sending envelope:",n),n)):(we&&Y.error("Transport disabled"),Xr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=yC(this,t),xm(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception?.values;if(o){i=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(Do(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ei(n=>{let r=0;const i=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=i,t&&r>=t&&(clearInterval(o),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,i){const o=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),x0(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:o0(r),...a.contexts};const c=Ih(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=tt(),i=Qt()){return we&&rf(t)&&Y.log(`Captured error event \`${W0(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{we&&(Fm(o)?Y.log(o.message):Bm(o)?Y.warn(o.message):Y.warn(o))})}_processEvent(t,n,r,i){const o=this.getOptions(),{sampleRate:s}=o,a=V0(t),c=rf(t),u=t.type||"error",h=`before send for type \`${u}\``,d=typeof s>"u"?void 0:qi(s);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),pu(rd(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const m=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,i).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",m),rd("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return g;const T=wC(this,o,g,n);return SC(T,h)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",m),a){const H=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",H)}throw rd(`${h} returned \`null\`, will not send event.`)}const E=r.getSession()||i.getSession();if(c&&E&&this._updateSessionFromEvent(E,g),a){const L=g.sdkProcessingMetadata?.spanCountBeforeProcessing||0,H=g.spans?g.spans.length:0,K=L-H;K>0&&this.recordDroppedEvent("before_send","span",K)}const T=g.transaction_info;if(a&&T&&g.transaction!==t.transaction){const L="custom";g.transaction_info={...T,source:L}}return this.sendEvent(g,n),g}).then(null,g=>{throw Fm(g)||Bm(g)?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),jc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
26
+ Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){we&&Y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){we&&Y.log("No outcomes to send");return}if(!this._dsn){we&&Y.log("No dsn provided, will not send outcomes");return}we&&Y.log("Sending outcomes:",t);const n=_C(t,this._options.tunnel&&io(this._dsn));this.sendEnvelope(n)}}function SC(e,t){const n=`${t} must return \`null\` or a valid event.`;if(na(e))return e.then(r=>{if(!Gr(r)&&r!==null)throw jc(n);return r},r=>{throw jc(`${t} rejected with ${r}`)});if(!Gr(e)&&e!==null)throw jc(n);return e}function wC(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;let a=n;if(rf(a)&&i)return i(a,r);if(V0(a)){if(s){const c=s(bC(a));if(c?a=ra(n,vC(c)):Jd(),a.spans){const u=[];for(const h of a.spans){const d=s(h);d?u.push(d):(Jd(),u.push(h))}a.spans=u}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function rf(e){return e.type===void 0}function V0(e){return e.type==="transaction"}function TC(e,t){return t?Jn(t,()=>{const n=en(),r=n?g0(n):o0(t);return[n?ur(n):Ih(e,t),r]}):[void 0,void 0]}const IC={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function AC(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function OC(e,t,n,r){const i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=io(r)),Qr(i,[AC(e)])}const CC=100;function RC(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function ui(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function MC(e,t){const n=Nh(),r=q0(e);r===void 0?n.set(e,[t]):r.length>=CC?($c(e,r),n.set(e,[t])):n.set(e,[...r,t])}function of(e,t=Re(),n=tt(),r=MC){if(!t){we&&Y.warn("No client available to capture log.");return}const{release:i,environment:o,enableLogs:s,beforeSendLog:a,_experiments:c}=t.getOptions();if(!(s??c?.enableLogs)){we&&Y.warn("logging option not enabled, log will not be captured.");return}const h=a??c?.beforeSendLog,[,d]=TC(t,n),m={...e.attributes},{user:{id:g,email:E,username:T}}=NC(n);ui(m,"user.id",g,!1),ui(m,"user.email",E,!1),ui(m,"user.name",T,!1),ui(m,"sentry.release",i),ui(m,"sentry.environment",o);const{name:L,version:H}=t.getSdkMetadata()?.sdk??{};ui(m,"sentry.sdk.name",L),ui(m,"sentry.sdk.version",H);const K=e.message;if(el(K)){const{__sentry_template_string__:G,__sentry_template_values__:q=[]}=K;m["sentry.message.template"]=G,q.forEach((ie,fe)=>{m[`sentry.message.parameter.${fe}`]=ie})}const V=Us(n);ui(m,"sentry.trace.parent_span_id",V?.spanContext().spanId);const F={...e,attributes:m};t.emit("beforeCaptureLog",F);const J=h?Ti(()=>h(F)):F;if(!J){t.recordDroppedEvent("before_send","log_item",1),we&&Y.warn("beforeSendLog returned null, log will not be captured.");return}const{level:D,message:W,attributes:ue={},severityNumber:P}=J,$={timestamp:Yt(),level:D,body:W,trace_id:d?.trace_id,severity_number:P??IC[D],attributes:Object.keys(ue).reduce((G,q)=>(G[q]=RC(ue[q]),G),{})};r(t,$),t.emit("afterCaptureLog",J)}function $c(e,t){const n=t??q0(e)??[];if(n.length===0)return;const r=e.getOptions(),i=OC(n,r._metadata,r.tunnel,e.getDsn());Nh().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function q0(e){return Nh().get(e)}function NC(e){const t=nl().getScopeData();return mu(t,Qt().getScopeData()),mu(t,e.getScopeData()),t}function Nh(){return ta("clientToLogBufferMap",()=>new WeakMap)}function kC(e,t){t.debug===!0&&(we?Y.enable():Ti(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),tt().update(t.initialScope);const r=new e(t);return Y0(r),r.init(),r}function Y0(e){tt().setClient(e)}const X0=Symbol.for("SentryBufferFullError");function PC(e){const t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function i(s){if(!n())return pu(X0);const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(s){return new Ei((a,c)=>{let u=t.length;if(!u)return a(!0);const h=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{Xr(d).then(()=>{--u||(clearTimeout(h),a(!0))},c)})})}return{$:t,add:i,drain:o}}const xC=60*1e3;function K0(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?xC:r-t}function LC(e,t){return e[t]||e.all||0}function J0(e,t,n=Date.now()){return LC(e,t)>n}function Z0(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,h]=a.split(":",5),d=parseInt(c,10),m=(isNaN(d)?60:d)*1e3;if(!u)i.all=r+m;else for(const g of u.split(";"))g==="metric_bucket"?(!h||h.split(";").includes("custom"))&&(i[g]=r+m):i[g]=r+m}else s?i.all=r+K0(s,r):t===429&&(i.all=r+60*1e3);return i}const DC=64;function Q0(e,t,n=PC(e.bufferSize||DC)){let r={};const i=s=>n.drain(s);function o(s){const a=[];if(Yi(s,(d,m)=>{const g=Tm(m);J0(r,g)?e.recordDroppedEvent("ratelimit_backoff",g):a.push(d)}),a.length===0)return Xr({});const c=Qr(s[0],a),u=d=>{Yi(c,(m,g)=>{e.recordDroppedEvent(d,Tm(g))})},h=()=>t({body:fu(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&we&&Y.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Z0(r,d),d),d=>{throw u("network_error"),we&&Y.error("Encountered error running transport request:",d),d});return n.add(h).then(d=>d,d=>{if(d===X0)return we&&Y.error("Skipped sending event because buffer is full."),u("queue_overflow"),Xr({});throw d})}return{send:o,flush:i}}const id=100,od=5e3,BC=36e5;function FC(e){function t(...n){we&&Y.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let o=od,s;function a(d,m,g){return wm(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,m,g):!0}function c(d){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;const m=await i.shift();m&&(t("Attempting to send previously queued event"),m[0].sent_at=new Date().toISOString(),h(m,!0).catch(g=>{t("Failed to retry sending",g)}))},d),typeof s!="number"&&s.unref&&s.unref()}function u(){s||(c(o),o=Math.min(o*2,BC))}async function h(d,m=!1){if(!m&&wm(d,["replay_event","replay_recording"]))return await i.push(d),c(id),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const g=await r.send(d);let E=id;if(g){if(g.headers?.["retry-after"])E=K0(g.headers["retry-after"]);else if(g.headers?.["x-sentry-rate-limits"])E=6e4;else if((g.statusCode||0)>=400)return g}return c(E),o=od,g}catch(g){if(await a(d,g,o))return m?await i.unshift(d):await i.push(d),u(),t("Error sending. Event queued.",g),{};throw g}}return n.flushAtStartup&&u(),{send:h,flush:d=>(d===void 0&&(o=od,c(id)),r.flush(d))}}}function ev(e,t){let n;return Yi(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function HC(e,t){return n=>{const r=e(n);return{...r,send:async i=>{const o=ev(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function UC(e,t){return Qr(t?{...e[0],dsn:t}:e[0],e[1])}function jC(e,t){return n=>{const r=e(n),i=new Map;function o(c,u){const h=u?`${c}:${u}`:c;let d=i.get(h);if(!d){const m=S0(c);if(!m)return;const g=j0(m,n.tunnel);d=u?HC(e,u)({...n,url:g}):e({...n,url:g}),i.set(h,d)}return[c,d]}async function s(c){function u(g){const E=g?.length?g:["event"];return ev(c,E)}const h=t({envelope:c,getEvent:u}).map(g=>typeof g=="string"?o(g,void 0):o(g.dsn,g.release)).filter(g=>!!g),d=h.length?h:[["",r]];return(await Promise.all(d.map(([g,E])=>E.send(UC(c,g)))))[0]}async function a(c){const u=[...i.values(),r];return(await Promise.all(u.map(d=>d.flush(c)))).every(d=>d)}return{send:s,flush:a}}}function tv(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return WC(e,n)||$C(e,r)}function $C(e,t){return t?Hm(e)===Hm(t):!1}function WC(e,t){return t?e.includes(t.host):!1}function Hm(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function nv(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const zC=nv;function GC(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function VC(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function qC(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:jr})),version:jr}),e._metadata=i}function kh(e={}){const t=e.client||Re();if(!B0()||!t)return{};const n=Zr(),r=Oi(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||tt(),o=e.span||en(),s=o?y0(o):YC(i),a=o?ur(o):Ih(t,i),c=d0(a);return f0.test(s)?{"sentry-trace":s,baggage:c}:(Y.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function YC(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return p0(t,r,n)}function XC(e,t,n){let r,i,o;const s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function h(){return i!==void 0||o!==void 0?c():r}function d(){return i&&clearTimeout(i),i=a(c,t),s&&o===void 0&&(o=a(c,s)),r}return d.cancel=u,d.flush=h,d}const KC=100;function Ar(e,t){const n=Re(),r=Qt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=KC}=n.getOptions();if(o<=0)return;const a={timestamp:no(),...e},c=i?Ti(()=>i(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Um;const JC="FunctionToString",jm=new WeakMap,ZC=()=>({name:JC,setupOnce(){Um=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=vh(this),n=jm.has(Re())&&t!==void 0?t:this;return Um.apply(n,e)}}catch{}},setup(e){jm.set(e,!0)}}),rv=ZC,QC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],eR="EventFilters",iv=(e={})=>{let t;return{name:eR,setup(n){const r=n.getOptions();t=$m(e,r)},processEvent(n,r,i){if(!t){const o=i.getOptions();t=$m(e,o)}return tR(n,t)?null:n}}},ov=(e={})=>({...iv(e),name:"InboundFilters"});function $m(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:QC],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function tR(e,t){if(e.type){if(e.type==="transaction"&&rR(e,t.ignoreTransactions))return we&&Y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
27
+ Event: ${Li(e)}`),!0}else{if(nR(e,t.ignoreErrors))return we&&Y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
28
+ Event: ${Li(e)}`),!0;if(aR(e))return we&&Y.warn(`Event dropped due to not having an error message, error type or stacktrace.
29
+ Event: ${Li(e)}`),!0;if(iR(e,t.denyUrls))return we&&Y.warn(`Event dropped due to being matched by \`denyUrls\` option.
30
30
  Event: ${Li(e)}.
31
- Url: ${yu(e)}`),!0;if(!rR(e,t.allowUrls))return we&&Y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
31
+ Url: ${yu(e)}`),!0;if(!oR(e,t.allowUrls))return we&&Y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
32
32
  Event: ${Li(e)}.
33
- Url: ${yu(e)}`),!0}return!1}function eR(e,t){return t?.length?j0(e).some(n=>ar(n,t)):!1}function tR(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ar(n,t):!1}function nR(e,t){if(!t?.length)return!1;const n=yu(e);return n?ar(n,t):!1}function rR(e,t){if(!t?.length)return!0;const n=yu(e);return n?ar(n,t):!0}function iR(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function yu(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?iR(n):null}catch{return we&&Y.error(`Cannot extract url for event ${Li(e)}`),null}}function oR(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function sR(e,t,n,r,i,o){if(!i.exception?.values||!o||!Vr(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=rf(e,t,r,o.originalException,n,i.exception.values,s,0))}function rf(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(Vr(r[i],Error)){jm(s,a);const u=e(t,r[i]),h=c.length;$m(u,i,h,a),c=rf(e,t,n,r[i],i,[u,...c],u,h)}return Array.isArray(r.errors)&&r.errors.forEach((u,h)=>{if(Vr(u,Error)){jm(s,a);const d=e(t,u),m=c.length;$m(d,`errors[${h}]`,m,a),c=rf(e,t,n,u,i,[d,...c],d,m)}}),c}function jm(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function $m(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const iv=new Map,Wm=new Set;function aR(e){if(We._sentryModuleMetadata)for(const t of Object.keys(We._sentryModuleMetadata)){const n=We._sentryModuleMetadata[t];if(Wm.has(t))continue;Wm.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){iv.set(i.filename,n);break}}}function cR(e,t){return aR(e),iv.get(t)}function ov(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;const i=cR(e,r.filename);i&&(r.module_metadata=i)}})}catch{}}function sv(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const uR=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Yi(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(sv(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;ov(n,t)})}});function Nh(e){const t="console";Ii(t,e),Ai(t,lR)}function lR(){"console"in We&&ph.forEach(function(e){e in We.console&&wn(We.console,e,function(t){return au[e]=t,function(...n){qn("console",{args:n,level:e}),au[e]?.apply(We.console,n)}})})}function kh(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const dR="CaptureConsole",fR=(e={})=>{const t=e.levels||ph,n=e.handled??!0;return{name:dR,setup(r){"console"in We&&Nh(({args:i,level:o})=>{Re()!==r||!t.includes(o)||pR(i,o,n)})}}},hR=fR;function pR(e,t,n){const r={level:kh(t),extra:{arguments:e}};Jn(i=>{if(i.addEventProcessor(a=>(a.logger="console",bi(a,{handled:n,type:"console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${cu(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),gu(a,r)}return}const o=e.find(a=>a instanceof Error);if(o){Xi(o,r);return}const s=cu(e," ");gu(s,r)})}const mR="Dedupe",gR=()=>{let e;return{name:mR,processEvent(t){if(t.type)return t;try{if(yR(t,e))return we&&Y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},av=gR;function yR(e,t){return t?!!(_R(e,t)||bR(e,t)):!1}function _R(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!uv(e,t)||!cv(e,t))}function bR(e,t){const n=zm(t),r=zm(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!uv(e,t)||!cv(e,t))}function cv(e,t){let n=zd(e),r=zd(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function uv(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function zm(e){return e.exception?.values?.[0]}const vR="ExtraErrorData",ER=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:vR,processEvent(r,i,o){const{maxValueLength:s=250}=o.getOptions();return wR(r,i,t,n,s)}}},SR=ER;function wR(e,t={},n,r,i){if(!t.originalException||!gi(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,s=TR(t.originalException,r,i);if(s){const a={...e.contexts},c=Ln(s,n);return Gr(c)&&(Nn(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function TR(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const s=e[o];i[o]=gi(s)||typeof s=="string"?Lo(`${s}`,n):s}if(t&&e.cause!==void 0&&(i.cause=gi(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const o=e.toJSON();for(const s of Object.keys(o)){const a=o[s];i[s]=gi(a)?a.toString():a}}return i}catch(r){we&&Y.error("Unable to extract extra data from the Error object:",r)}return null}function IR(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const AR=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function OR(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=AR.exec(t);return n?n.slice(1):[]}function Gm(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=IR(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Vm(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function CR(e,t){e=Gm(e).slice(1),t=Gm(t).slice(1);const n=Vm(e.split("/")),r=Vm(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function RR(e,t){return OR(e)[2]||""}const MR="RewriteFrames",NR=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in We&&!!We.window,i=e.iteratee||kR({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>i(c))}}return{name:MR,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function kR({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){const s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?CR(t,s):RR(s);r.filename=`${n}${a}`}return r}}const PR=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],xR=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],LR={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},lv=["select","insert","upsert","update","delete"];function al(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function cl(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function DR(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function BR(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&LR[n]||"filter",`${i}(${e}, ${r.join(".")})`}function qm(e,t=!1){return new Proxy(e,{apply(n,r,i){return sl({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Ft]:"auto.db.supabase",[jn]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(o.setStatus({code:zt}),Xi(s.error,{mechanism:{handled:!1}})):o.setStatus({code:vh}),o.end(),s)).catch(s=>{throw o.setStatus({code:zt}),o.end(),Xi(s,{mechanism:{handled:!1}}),s}).then(...i))}})}function FR(e){const t=e.auth;if(!(!t||cl(e.auth))){for(const n of PR){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=qm(r))}for(const n of xR){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=qm(r,!0))}al(e.auth)}}function HR(e){cl(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const i=Reflect.apply(t,n,r),o=i.constructor;return jR(o),i}}),al(e.prototype.from))}function UR(e){cl(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const i=lv,o=n,s=DR(o.method,o.headers);if(!i.includes(s)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[g,E]of o.url.searchParams.entries())u.push(BR(g,E));const h=Object.create(null);if(Gr(o.body))for(const[g,E]of Object.entries(o.body))h[g]=E;const d=`${s==="select"?"":`${s}${h?"(...) ":""}`}${u.join(" ")} from(${c})`,m={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[Ft]:"auto.db.supabase",[jn]:"db"};return u.length&&(m["db.query"]=u),Object.keys(h).length&&(m["db.body"]=h),sl({name:d,attributes:m},g=>Reflect.apply(t,n,[]).then(E=>{if(g&&(E&&typeof E=="object"&&"status"in E&&js(g,E.status||500),g.end()),E.error){const H=new Error(E.error.message);E.error.code&&(H.code=E.error.code),E.error.details&&(H.details=E.error.details);const K={};u.length&&(K.query=u),Object.keys(h).length&&(K.body=h),Xi(H,{contexts:{supabase:K}})}const T={type:"supabase",category:`db.${s}`,message:d},L={};return u.length&&(L.query=u),Object.keys(h).length&&(L.body=h),Object.keys(L).length&&(T.data=L),Ar(T),E},E=>{throw g&&(js(g,500),g.end()),E}).then(...r))}}),al(e.prototype.then))}function jR(e){for(const t of lv)cl(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,i){const o=Reflect.apply(n,r,i),s=o.constructor;return we&&Y.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),UR(s),o}}),al(e.prototype[t]))}const dv=e=>{if(!e){we&&Y.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;HR(t),FR(e)},$R="Supabase",WR=e=>({setupOnce(){dv(e)},name:$R}),zR=e=>WR(e.supabaseClient),GR=10,VR="ZodErrors";function qR(e){return gi(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function YR(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function XR(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function KR(e){const t=new Set;for(const r of e.issues){const i=XR(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Lo(n.join(", "),100)}`}function JR(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!qR(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(YR);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:KR(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
34
- ${i.stack}`:"unknown"}}}}}const ZR=(e={})=>{const t=e.limit??GR;return{name:VR,processEvent(n,r){return JR(t,e.saveZodIssuesAsAttachment,n,r)}}},QR=ZR,eM=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Yi(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(sv(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;ov(r,n)})},processEvent(t){const n=tM(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function tM(e){const t=zd(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Ym)).map(r=>r.slice(Ym.length)):[])}const Ym="_sentryBundlerPluginAppKey:",nM=100,rM=10,pc="flag.evaluation.";function la(e){const n=tt().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Fo(e,t,n=nM){const r=tt().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;iM(i,e,t,n)}function iM(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){we&&Y.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Ho(e,t,n=rM){if(typeof t!="boolean")return;const r=en();if(!r)return;const i=Qe(r).data;if(`${pc}${e}`in i){r.setAttribute(`${pc}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(pc)).length<n&&r.setAttribute(`${pc}${e}`,t)}const oM=()=>({name:"FeatureFlags",processEvent(e,t,n){return la(e)},addFeatureFlag(e,t){Fo(e,t),Ho(e,t)}}),sM="thismessage:/";function fv(e){return"isRelative"in e}function hv(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?sM:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function aM(e){if(fv(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function zi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function pv(e){return e.split(/[?#]/,1)[0]}function cM(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=vi()&&t(s);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const m=r[d];m&&(lM(m,e),delete r[d]);return}const c=!!en(),u=a&&c?oo(fM(s,o,i)):new Yr;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],m=e.args[1]||{},g=uM(d,m,vi()&&c?u:void 0);g&&(e.args[1]=m,m.headers=g)}const h=Re();if(h){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};h.emit("beforeOutgoingRequestSpan",u,d)}return u}function uM(e,t,n){const r=Mh({span:n}),i=r["sentry-trace"],o=r.baggage;if(!i)return;const s=t.headers||(Jb(e)?e.headers:void 0);if(s)if(dM(s)){const a=new Headers(s);if(a.get("sentry-trace")||a.set("sentry-trace",i),o){const c=a.get("baggage");c?mc(c)||a.set("baggage",`${c},${o}`):a.set("baggage",o)}return a}else if(Array.isArray(s)){const a=[...s];s.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",i]);const c=s.find(u=>u[0]==="baggage"&&mc(u[1]));return o&&!c&&a.push(["baggage",o]),a}else{const a="sentry-trace"in s?s["sentry-trace"]:void 0,c="baggage"in s?s.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],h=c&&(Array.isArray(c)?c.find(d=>mc(d)):mc(c));return o&&!h&&u.push(o),{...s,"sentry-trace":a??i,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function lM(e,t){if(t.response){js(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:zt,message:"internal_error"});e.end()}function mc(e){return e.split(",").some(t=>t.trim().startsWith(Eh))}function dM(e){return typeof Headers<"u"&&Vr(e,Headers)}function fM(e,t,n){const r=hv(e);return{name:r?`${t} ${aM(r)}`:t,attributes:hM(e,r,t,n)}}function hM(e,t,n,r){const i={url:e,type:"fetch","http.method":n,[Ft]:r,[jn]:"http.client"};return t&&(fv(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function mv(e,t={},n=tt()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:c,tags:u}=e,h={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||Re();return d&&d.emit("beforeSendFeedback",h,t),n.captureEvent(h,t)}const pM="ConsoleLogs",Xm={[Ft]:"auto.console.logging"},mM=(e={})=>{const t=e.levels||ph;return{name:pM,setup(n){const{enableLogs:r,_experiments:i,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!(r??i?.enableLogs)){we&&Y.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Nh(({args:c,level:u})=>{if(Re()!==n||!t.includes(u))return;if(u==="assert"){if(!c[0]){const d=c.slice(1),m=d.length>0?`Assertion failed: ${Km(d,o,s)}`:"Assertion failed";nf({level:"error",message:m,attributes:Xm})}return}const h=u==="log";nf({level:h?"info":u,message:Km(c,o,s),severityNumber:h?10:void 0,attributes:Xm})})}}},gM=mM;function Km(e,t,n){return"util"in We&&typeof We.util.format=="function"?We.util.format(...e):yM(e,t,n)}function yM(e,t,n){return e.map(r=>xo(r)?String(r):JSON.stringify(Ln(r,t,n))).join(" ")}function gv(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Uo=We;function _M(){return"history"in Uo&&!!Uo.history}function bM(){if(!("fetch"in Uo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function of(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function yv(){if(typeof EdgeRuntime=="string")return!0;if(!bM())return!1;if(of(Uo.fetch))return!0;let e=!1;const t=Uo.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=of(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){we&&Y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function vM(){return"ReportingObserver"in Uo}function Ph(e,t){const n="fetch";Ii(n,e),Ai(n,()=>_v(void 0,t))}function EM(e){const t="fetch-body-resolved";Ii(t,e),Ai(t,()=>_v(wM))}function _v(e,t=!1){t&&!yv()||wn(We,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=TM(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:Yt()*1e3,virtualError:i,headers:IM(r)};return e||qn("fetch",{...a}),n.apply(We,r).then(async c=>(e?e(c):qn("fetch",{...a,endTimestamp:Yt()*1e3,response:c}),c),c=>{if(qn("fetch",{...a,endTimestamp:Yt()*1e3,error:c}),gi(c)&&c.stack===void 0&&(c.stack=i.stack,Nn(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function SM(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function wM(e){let t;try{t=e.clone()}catch{return}SM(t,()=>{qn("fetch-body-resolved",{endTimestamp:Yt()*1e3,response:e})})}function sf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Jm(e){return typeof e=="string"?e:e?sf(e,"url")?e.url:e.toString?e.toString():"":""}function TM(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Jm(n),method:sf(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Jm(t),method:sf(t,"method")?String(t.method).toUpperCase():"GET"}}function IM(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Jb(t))return new Headers(t.headers)}catch{}}function AM(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function OM(){return"npm"}function CM(){return!AM()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function af(){return typeof window<"u"&&(!CM()||RM())}function RM(){return We.process?.type==="renderer"}const rr=We,Tt=rr.document,Ns=rr.navigator,bv="Report a Bug",MM="Cancel",NM="Send Bug Report",kM="Confirm",PM="Report a Bug",xM="your.email@example.org",LM="Email",DM="What's the bug? What did you expect?",BM="Description",FM="Your Name",HM="Name",UM="Thank you for your report!",jM="(required)",$M="Add a screenshot",WM="Remove screenshot",zM="widget",GM="api",VM=5e3,vv=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Re();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&tt().setTags(e.tags);const r=mv({source:GM,url:to(),...e},t);return new Promise((i,o)=>{const s=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?i(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?o("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?o("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},Wc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function qM(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ns.userAgent)||/Macintosh/i.test(Ns.userAgent)&&Ns.maxTouchPoints&&Ns.maxTouchPoints>1||!isSecureContext)}function gc(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function YM(e){const t=Tt.createElement("style");return t.textContent=`
33
+ Url: ${yu(e)}`),!0}return!1}function nR(e,t){return t?.length?W0(e).some(n=>ar(n,t)):!1}function rR(e,t){if(!t?.length)return!1;const n=e.transaction;return n?ar(n,t):!1}function iR(e,t){if(!t?.length)return!1;const n=yu(e);return n?ar(n,t):!1}function oR(e,t){if(!t?.length)return!0;const n=yu(e);return n?ar(n,t):!0}function sR(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function yu(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?sR(n):null}catch{return we&&Y.error(`Cannot extract url for event ${Li(e)}`),null}}function aR(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function cR(e,t,n,r,i,o){if(!i.exception?.values||!o||!Vr(o.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=sf(e,t,r,o.originalException,n,i.exception.values,s,0))}function sf(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(Vr(r[i],Error)){Wm(s,a);const u=e(t,r[i]),h=c.length;zm(u,i,h,a),c=sf(e,t,n,r[i],i,[u,...c],u,h)}return Array.isArray(r.errors)&&r.errors.forEach((u,h)=>{if(Vr(u,Error)){Wm(s,a);const d=e(t,u),m=c.length;zm(d,`errors[${h}]`,m,a),c=sf(e,t,n,u,i,[d,...c],d,m)}}),c}function Wm(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function zm(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const sv=new Map,Gm=new Set;function uR(e){if(We._sentryModuleMetadata)for(const t of Object.keys(We._sentryModuleMetadata)){const n=We._sentryModuleMetadata[t];if(Gm.has(t))continue;Gm.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){sv.set(i.filename,n);break}}}function lR(e,t){return uR(e),sv.get(t)}function av(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;const i=lR(e,r.filename);i&&(r.module_metadata=i)}})}catch{}}function cv(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}const dR=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Yi(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(cv(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;av(n,t)})}});function Ph(e){const t="console";Ii(t,e),Ai(t,fR)}function fR(){"console"in We&&gh.forEach(function(e){e in We.console&&wn(We.console,e,function(t){return au[e]=t,function(...n){qn("console",{args:n,level:e}),au[e]?.apply(We.console,n)}})})}function xh(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const hR="CaptureConsole",pR=(e={})=>{const t=e.levels||gh,n=e.handled??!0;return{name:hR,setup(r){"console"in We&&Ph(({args:i,level:o})=>{Re()!==r||!t.includes(o)||gR(i,o,n)})}}},mR=pR;function gR(e,t,n){const r={level:xh(t),extra:{arguments:e}};Jn(i=>{if(i.addEventProcessor(a=>(a.logger="console",bi(a,{handled:n,type:"console"}),a)),t==="assert"){if(!e[0]){const a=`Assertion failed: ${cu(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),gu(a,r)}return}const o=e.find(a=>a instanceof Error);if(o){Xi(o,r);return}const s=cu(e," ");gu(s,r)})}const yR="Dedupe",_R=()=>{let e;return{name:yR,processEvent(t){if(t.type)return t;try{if(bR(t,e))return we&&Y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},uv=_R;function bR(e,t){return t?!!(vR(e,t)||ER(e,t)):!1}function vR(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!dv(e,t)||!lv(e,t))}function ER(e,t){const n=Vm(t),r=Vm(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!dv(e,t)||!lv(e,t))}function lv(e,t){let n=Vd(e),r=Vd(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function dv(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Vm(e){return e.exception?.values?.[0]}const SR="ExtraErrorData",wR=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:SR,processEvent(r,i,o){const{maxValueLength:s=250}=o.getOptions();return IR(r,i,t,n,s)}}},TR=wR;function IR(e,t={},n,r,i){if(!t.originalException||!gi(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,s=AR(t.originalException,r,i);if(s){const a={...e.contexts},c=Ln(s,n);return Gr(c)&&(Nn(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function AR(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const s=e[o];i[o]=gi(s)||typeof s=="string"?Lo(`${s}`,n):s}if(t&&e.cause!==void 0&&(i.cause=gi(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const o=e.toJSON();for(const s of Object.keys(o)){const a=o[s];i[s]=gi(a)?a.toString():a}}return i}catch(r){we&&Y.error("Unable to extract extra data from the Error object:",r)}return null}function OR(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const CR=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function RR(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=CR.exec(t);return n?n.slice(1):[]}function qm(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=OR(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Ym(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function MR(e,t){e=qm(e).slice(1),t=qm(t).slice(1);const n=Ym(e.split("/")),r=Ym(t.split("/")),i=Math.min(n.length,r.length);let o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function NR(e,t){return RR(e)[2]||""}const kR="RewriteFrames",PR=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in We&&!!We.window,i=e.iteratee||xR({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>i(c))}}return{name:kR,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function xR({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){const s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){const s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?MR(t,s):NR(s);r.filename=`${n}${a}`}return r}}const LR=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],DR=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],BR={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},fv=["select","insert","upsert","update","delete"];function al(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function cl(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function FR(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function HR(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&BR[n]||"filter",`${i}(${e}, ${r.join(".")})`}function Xm(e,t=!1){return new Proxy(e,{apply(n,r,i){return sl({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Ft]:"auto.db.supabase",[jn]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(o.setStatus({code:zt}),Xi(s.error,{mechanism:{handled:!1}})):o.setStatus({code:Sh}),o.end(),s)).catch(s=>{throw o.setStatus({code:zt}),o.end(),Xi(s,{mechanism:{handled:!1}}),s}).then(...i))}})}function UR(e){const t=e.auth;if(!(!t||cl(e.auth))){for(const n of LR){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Xm(r))}for(const n of DR){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Xm(r,!0))}al(e.auth)}}function jR(e){cl(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){const i=Reflect.apply(t,n,r),o=i.constructor;return WR(o),i}}),al(e.prototype.from))}function $R(e){cl(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){const i=fv,o=n,s=FR(o.method,o.headers);if(!i.includes(s)||!o?.url?.pathname||typeof o.url.pathname!="string")return Reflect.apply(t,n,r);const a=o.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(const[g,E]of o.url.searchParams.entries())u.push(HR(g,E));const h=Object.create(null);if(Gr(o.body))for(const[g,E]of Object.entries(o.body))h[g]=E;const d=`${s==="select"?"":`${s}${h?"(...) ":""}`}${u.join(" ")} from(${c})`,m={"db.table":c,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":o.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[Ft]:"auto.db.supabase",[jn]:"db"};return u.length&&(m["db.query"]=u),Object.keys(h).length&&(m["db.body"]=h),sl({name:d,attributes:m},g=>Reflect.apply(t,n,[]).then(E=>{if(g&&(E&&typeof E=="object"&&"status"in E&&js(g,E.status||500),g.end()),E.error){const H=new Error(E.error.message);E.error.code&&(H.code=E.error.code),E.error.details&&(H.details=E.error.details);const K={};u.length&&(K.query=u),Object.keys(h).length&&(K.body=h),Xi(H,{contexts:{supabase:K}})}const T={type:"supabase",category:`db.${s}`,message:d},L={};return u.length&&(L.query=u),Object.keys(h).length&&(L.body=h),Object.keys(L).length&&(T.data=L),Ar(T),E},E=>{throw g&&(js(g,500),g.end()),E}).then(...r))}}),al(e.prototype.then))}function WR(e){for(const t of fv)cl(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,i){const o=Reflect.apply(n,r,i),s=o.constructor;return we&&Y.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),$R(s),o}}),al(e.prototype[t]))}const hv=e=>{if(!e){we&&Y.warn("Supabase integration was not installed because no Supabase client was provided.");return}const t=e.constructor===Function?e:e.constructor;jR(t),UR(e)},zR="Supabase",GR=e=>({setupOnce(){hv(e)},name:zR}),VR=e=>GR(e.supabaseClient),qR=10,YR="ZodErrors";function XR(e){return gi(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function KR(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function JR(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function ZR(e){const t=new Set;for(const r of e.issues){const i=JR(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Lo(n.join(", "),100)}`}function QR(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!XR(r.originalException)||r.originalException.issues.length===0)return n;try{const o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(KR);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:ZR(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
34
+ ${i.stack}`:"unknown"}}}}}const eM=(e={})=>{const t=e.limit??qR;return{name:YR,processEvent(n,r){return QR(t,e.saveZodIssuesAsAttachment,n,r)}}},tM=eM,nM=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Yi(n,(r,i)=>{if(i==="event"){const o=Array.isArray(r)?r[1]:void 0;o&&(cv(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;av(r,n)})},processEvent(t){const n=rM(t);if(n){const r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](o=>!o.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function rM(e){const t=Vd(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Km)).map(r=>r.slice(Km.length)):[])}const Km="_sentryBundlerPluginAppKey:",iM=100,oM=10,pc="flag.evaluation.";function la(e){const n=tt().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Fo(e,t,n=iM){const r=tt().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;sM(i,e,t,n)}function sM(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){we&&Y.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Ho(e,t,n=oM){if(typeof t!="boolean")return;const r=en();if(!r)return;const i=Qe(r).data;if(`${pc}${e}`in i){r.setAttribute(`${pc}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(pc)).length<n&&r.setAttribute(`${pc}${e}`,t)}const aM=()=>({name:"FeatureFlags",processEvent(e,t,n){return la(e)},addFeatureFlag(e,t){Fo(e,t),Ho(e,t)}}),cM="thismessage:/";function pv(e){return"isRelative"in e}function mv(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?cM:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function uM(e){if(pv(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function zi(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function gv(e){return e.split(/[?#]/,1)[0]}function lM(e,t,n,r,i="auto.http.browser"){if(!e.fetchData)return;const{method:o,url:s}=e.fetchData,a=vi()&&t(s);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const m=r[d];m&&(fM(m,e),delete r[d]);return}const c=!!en(),u=a&&c?oo(pM(s,o,i)):new Yr;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],m=e.args[1]||{},g=dM(d,m,vi()&&c?u:void 0);g&&(e.args[1]=m,m.headers=g)}const h=Re();if(h){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};h.emit("beforeOutgoingRequestSpan",u,d)}return u}function dM(e,t,n){const r=kh({span:n}),i=r["sentry-trace"],o=r.baggage;if(!i)return;const s=t.headers||(Qb(e)?e.headers:void 0);if(s)if(hM(s)){const a=new Headers(s);if(a.get("sentry-trace")||a.set("sentry-trace",i),o){const c=a.get("baggage");c?mc(c)||a.set("baggage",`${c},${o}`):a.set("baggage",o)}return a}else if(Array.isArray(s)){const a=[...s];s.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",i]);const c=s.find(u=>u[0]==="baggage"&&mc(u[1]));return o&&!c&&a.push(["baggage",o]),a}else{const a="sentry-trace"in s?s["sentry-trace"]:void 0,c="baggage"in s?s.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],h=c&&(Array.isArray(c)?c.find(d=>mc(d)):mc(c));return o&&!h&&u.push(o),{...s,"sentry-trace":a??i,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function fM(e,t){if(t.response){js(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:zt,message:"internal_error"});e.end()}function mc(e){return e.split(",").some(t=>t.trim().startsWith(wh))}function hM(e){return typeof Headers<"u"&&Vr(e,Headers)}function pM(e,t,n){const r=mv(e);return{name:r?`${t} ${uM(r)}`:t,attributes:mM(e,r,t,n)}}function mM(e,t,n,r){const i={url:e,type:"fetch","http.method":n,[Ft]:r,[jn]:"http.client"};return t&&(pv(t)||(i["http.url"]=t.href,i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function yv(e,t={},n=tt()){const{message:r,name:i,email:o,url:s,source:a,associatedEventId:c,tags:u}=e,h={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||Re();return d&&d.emit("beforeSendFeedback",h,t),n.captureEvent(h,t)}const gM="ConsoleLogs",Jm={[Ft]:"auto.console.logging"},yM=(e={})=>{const t=e.levels||gh;return{name:gM,setup(n){const{enableLogs:r,_experiments:i,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!(r??i?.enableLogs)){we&&Y.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Ph(({args:c,level:u})=>{if(Re()!==n||!t.includes(u))return;if(u==="assert"){if(!c[0]){const d=c.slice(1),m=d.length>0?`Assertion failed: ${Zm(d,o,s)}`:"Assertion failed";of({level:"error",message:m,attributes:Jm})}return}const h=u==="log";of({level:h?"info":u,message:Zm(c,o,s),severityNumber:h?10:void 0,attributes:Jm})})}}},_M=yM;function Zm(e,t,n){return"util"in We&&typeof We.util.format=="function"?We.util.format(...e):bM(e,t,n)}function bM(e,t,n){return e.map(r=>xo(r)?String(r):JSON.stringify(Ln(r,t,n))).join(" ")}function _v(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Uo=We;function vM(){return"history"in Uo&&!!Uo.history}function EM(){if(!("fetch"in Uo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function af(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function bv(){if(typeof EdgeRuntime=="string")return!0;if(!EM())return!1;if(af(Uo.fetch))return!0;let e=!1;const t=Uo.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=af(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){we&&Y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function SM(){return"ReportingObserver"in Uo}function Lh(e,t){const n="fetch";Ii(n,e),Ai(n,()=>vv(void 0,t))}function wM(e){const t="fetch-body-resolved";Ii(t,e),Ai(t,()=>vv(IM))}function vv(e,t=!1){t&&!bv()||wn(We,"fetch",function(n){return function(...r){const i=new Error,{method:o,url:s}=AM(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:Yt()*1e3,virtualError:i,headers:OM(r)};return e||qn("fetch",{...a}),n.apply(We,r).then(async c=>(e?e(c):qn("fetch",{...a,endTimestamp:Yt()*1e3,response:c}),c),c=>{if(qn("fetch",{...a,endTimestamp:Yt()*1e3,error:c}),gi(c)&&c.stack===void 0&&(c.stack=i.stack,Nn(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function TM(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function IM(e){let t;try{t=e.clone()}catch{return}TM(t,()=>{qn("fetch-body-resolved",{endTimestamp:Yt()*1e3,response:e})})}function cf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Qm(e){return typeof e=="string"?e:e?cf(e,"url")?e.url:e.toString?e.toString():"":""}function AM(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Qm(n),method:cf(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Qm(t),method:cf(t,"method")?String(t.method).toUpperCase():"GET"}}function OM(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Qb(t))return new Headers(t.headers)}catch{}}function CM(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function RM(){return"npm"}function MM(){return!CM()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function uf(){return typeof window<"u"&&(!MM()||NM())}function NM(){return We.process?.type==="renderer"}const rr=We,Tt=rr.document,Ns=rr.navigator,Ev="Report a Bug",kM="Cancel",PM="Send Bug Report",xM="Confirm",LM="Report a Bug",DM="your.email@example.org",BM="Email",FM="What's the bug? What did you expect?",HM="Description",UM="Your Name",jM="Name",$M="Thank you for your report!",WM="(required)",zM="Add a screenshot",GM="Remove screenshot",VM="widget",qM="api",YM=5e3,Sv=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Re();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&tt().setTags(e.tags);const r=yv({source:qM,url:to(),...e},t);return new Promise((i,o)=>{const s=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?i(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?o("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?o("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},Wc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function XM(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ns.userAgent)||/Macintosh/i.test(Ns.userAgent)&&Ns.maxTouchPoints&&Ns.maxTouchPoints>1||!isSecureContext)}function gc(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function KM(e){const t=Tt.createElement("style");return t.textContent=`
35
35
  .widget__actor {
36
36
  position: fixed;
37
37
  z-index: var(--z-index);
@@ -82,7 +82,7 @@ ${i.stack}`:"unknown"}}}}}const ZR=(e={})=>{const t=e.limit??GR;return{name:VR,p
82
82
  display: none;
83
83
  }
84
84
  }
85
- `,e&&t.setAttribute("nonce",e),t}function Fn(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const yo=20,XM="http://www.w3.org/2000/svg";function KM(){const e=a=>rr.document.createElementNS(XM,a),t=Fn(e("svg"),{width:`${yo}`,height:`${yo}`,viewBox:`0 0 ${yo} ${yo}`,fill:"var(--actor-color, var(--foreground))"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const i=e("defs"),o=Fn(e("clipPath"),{id:"clip0_57_80"}),s=Fn(e("rect"),{width:`${yo}`,height:`${yo}`,fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}function JM({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const i=Tt.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||bv,i.appendChild(KM()),e){const s=Tt.createElement("span");s.appendChild(Tt.createTextNode(e)),i.appendChild(s)}const o=YM(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const Ev="rgba(88, 74, 192, 1)",ZM={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Ev,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},Zm={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Ev,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function Qm(e){return`
85
+ `,e&&t.setAttribute("nonce",e),t}function Fn(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const yo=20,JM="http://www.w3.org/2000/svg";function ZM(){const e=a=>rr.document.createElementNS(JM,a),t=Fn(e("svg"),{width:`${yo}`,height:`${yo}`,viewBox:`0 0 ${yo} ${yo}`,fill:"var(--actor-color, var(--foreground))"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const i=e("defs"),o=Fn(e("clipPath"),{id:"clip0_57_80"}),s=Fn(e("rect"),{width:`${yo}`,height:`${yo}`,fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}function QM({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const i=Tt.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||Ev,i.appendChild(ZM()),e){const s=Tt.createElement("span");s.appendChild(Tt.createTextNode(e)),i.appendChild(s)}const o=KM(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const wv="rgba(88, 74, 192, 1)",eN={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:wv,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},eg={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:wv,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function tg(e){return`
86
86
  --foreground: ${e.foreground};
87
87
  --background: ${e.background};
88
88
  --accent-foreground: ${e.accentForeground};
@@ -93,7 +93,7 @@ ${i.stack}`:"unknown"}}}}}const ZR=(e={})=>{const t=e.limit??GR;return{name:VR,p
93
93
  --box-shadow: ${e.boxShadow};
94
94
  --outline: ${e.outline};
95
95
  --interactive-filter: ${e.interactiveFilter};
96
- `}function QM({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const i=Tt.createElement("style");return i.textContent=`
96
+ `}function tN({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const i=Tt.createElement("style");return i.textContent=`
97
97
  :host {
98
98
  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
99
99
  --font-size: 14px;
@@ -108,17 +108,17 @@ ${i.stack}`:"unknown"}}}}}const ZR=(e={})=>{const t=e.limit??GR;return{name:VR,p
108
108
 
109
109
  ${e!=="system"?"color-scheme: only light;":""}
110
110
 
111
- ${Qm(e==="dark"?{...Zm,...t}:{...ZM,...n})}
111
+ ${tg(e==="dark"?{...eg,...t}:{...eN,...n})}
112
112
  }
113
113
 
114
114
  ${e==="system"?`
115
115
  @media (prefers-color-scheme: dark) {
116
116
  :host {
117
- ${Qm({...Zm,...t})}
117
+ ${tg({...eg,...t})}
118
118
  }
119
119
  }`:""}
120
120
  }
121
- `,r&&i.setAttribute("nonce",r),i}const Sv=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:i="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:h=!0,enableScreenshot:d=!0,useSentryUser:m={email:"email",name:"username"},tags:g,styleNonce:E,scriptNonce:T,colorScheme:L="system",themeLight:H={},themeDark:K={},addScreenshotButtonLabel:V=$M,cancelButtonLabel:F=MM,confirmButtonLabel:J=kM,emailLabel:D=LM,emailPlaceholder:W=xM,formTitle:ue=PM,isRequiredLabel:P=jM,messageLabel:$=BM,messagePlaceholder:G=DM,nameLabel:q=HM,namePlaceholder:ie=FM,removeScreenshotButtonLabel:fe=WM,submitButtonLabel:ce=NM,successMessageText:re=UM,triggerLabel:X=bv,triggerAriaLabel:_e="",onFormOpen:ge,onFormClose:he,onSubmitSuccess:Se,onSubmitError:Xe,onFormSubmitted:se}={})=>{const He={id:i,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:h,enableScreenshot:d,useSentryUser:m,tags:g,styleNonce:E,scriptNonce:T,colorScheme:L,themeDark:K,themeLight:H,triggerLabel:X,triggerAriaLabel:_e,cancelButtonLabel:F,submitButtonLabel:ce,confirmButtonLabel:J,formTitle:ue,emailLabel:D,emailPlaceholder:W,messageLabel:$,messagePlaceholder:G,nameLabel:q,namePlaceholder:ie,successMessageText:re,isRequiredLabel:P,addScreenshotButtonLabel:V,removeScreenshotButtonLabel:fe,onFormClose:he,onFormOpen:ge,onSubmitError:Xe,onSubmitSuccess:Se,onFormSubmitted:se};let vt=null,Et=[];const tn=ht=>{if(!vt){const gt=Tt.createElement("div");gt.id=String(ht.id),Tt.body.appendChild(gt),vt=gt.attachShadow({mode:"open"}),vt.appendChild(QM(ht))}return vt},nn=async ht=>{const gt=ht.enableScreenshot&&qM();let Gt,nt;try{Gt=(t?t():await e("feedbackModalIntegration",T))(),ef(Gt)}catch{throw Wc&&Y.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Ke=gt?n?n():await e("feedbackScreenshotIntegration",T):void 0;Ke&&(nt=Ke(),ef(nt))}catch{Wc&&Y.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const rt=Gt.createDialog({options:{...ht,onFormClose:()=>{rt?.close(),ht.onFormClose?.()},onFormSubmitted:()=>{rt?.close(),ht.onFormSubmitted?.()}},screenshotIntegration:nt,sendFeedback:vv,shadow:tn(ht)});return rt},$n=(ht,gt={})=>{const Gt=gc(He,gt),nt=typeof ht=="string"?Tt.querySelector(ht):typeof ht.addEventListener=="function"?ht:null;if(!nt)throw Wc&&Y.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let rt=null;const Ke=async()=>{rt||(rt=await nn({...Gt,onFormSubmitted:()=>{rt?.removeFromDom(),Gt.onFormSubmitted?.()}})),rt.appendToDom(),rt.open()};nt.addEventListener("click",Ke);const gn=()=>{Et=Et.filter(xt=>xt!==gn),rt?.removeFromDom(),rt=null,nt.removeEventListener("click",Ke)};return Et.push(gn),gn},Me=(ht={})=>{const gt=gc(He,ht),Gt=tn(gt),nt=JM({triggerLabel:gt.triggerLabel,triggerAriaLabel:gt.triggerAriaLabel,shadow:Gt,styleNonce:E});return $n(nt.el,{...gt,onFormOpen(){nt.hide()},onFormClose(){nt.show()},onFormSubmitted(){nt.show()}}),nt};return{name:"Feedback",setupOnce(){!af()||!He.autoInject||(Tt.readyState==="loading"?Tt.addEventListener("DOMContentLoaded",()=>Me().appendToDom()):Me().appendToDom())},attachTo:$n,createWidget(ht={}){const gt=Me(gc(He,ht));return gt.appendToDom(),gt},async createForm(ht={}){return nn(gc(He,ht))},remove(){vt&&(vt.parentElement?.remove(),vt=null),Et.forEach(ht=>ht()),Et=[]}}};function eN(){return Re()?.getIntegrationByName("Feedback")}var ul,At,wv,Di,eg,Tv,cf,$s={},xh=[],tN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lh=Array.isArray;function pi(e,t){for(var n in t)e[n]=t[n];return e}function Iv(e){var t=e.parentNode;t&&t.removeChild(e)}function ot(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ul.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return zc(e,s,r,i,null)}function zc(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++wv,__i:-1,__u:0};return i==null&&At.vnode!=null&&At.vnode(o),o}function da(e){return e.children}function Gc(e,t){this.props=e,this.context=t}function jo(e,t){if(t==null)return e.__?jo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?jo(e):null}function nN(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=pi({},i)).__v=i.__v+1,At.vnode&&At.vnode(r),Dh(s,r,i,e.__n,s.ownerSVGElement!==void 0,32&i.__u?[o]:null,t,o??jo(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&Av(r),r}function Av(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Av(e)}}function tg(e){(!e.__d&&(e.__d=!0)&&Di.push(e)&&!_u.__r++||eg!==At.debounceRendering)&&((eg=At.debounceRendering)||Tv)(_u)}function _u(){var e,t,n,r=[],i=[];for(Di.sort(cf);e=Di.shift();)e.__d&&(n=Di.length,t=nN(e,r,i)||t,n===0||Di.length>n?(uf(r,t,i),i.length=r.length=0,t=void 0,Di.sort(cf)):t&&At.__c&&At.__c(t,xh));t&&uf(r,t,i),_u.__r=0}function Ov(e,t,n,r,i,o,s,a,c,u,h){var d,m,g,E,T,L=r&&r.__k||xh,H=t.length;for(n.__d=c,rN(n,t,L),c=n.__d,d=0;d<H;d++)(g=n.__k[d])!=null&&typeof g!="boolean"&&typeof g!="function"&&(m=g.__i===-1?$s:L[g.__i]||$s,g.__i=d,Dh(e,g,m,i,o,s,a,c,u,h),E=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Bh(m.ref,null,g),h.push(g.ref,g.__c||E,g)),T==null&&E!=null&&(T=E),65536&g.__u||m.__k===g.__k?c=Cv(g,c,e):typeof g.type=="function"&&g.__d!==void 0?c=g.__d:E&&(c=E.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=c,n.__e=T}function rN(e,t,n){var r,i,o,s,a,c=t.length,u=n.length,h=u,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?zc(null,i,null,null,i):Lh(i)?zc(da,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?zc(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,a=iN(i,n,s=r+d,h),i.__i=a,o=null,a!==-1&&(h--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?h>c-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=jo(o)),lf(o,o,!1),n[r]=null,h--);if(h)for(r=0;r<u;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=jo(o)),lf(o,o))}function Cv(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Cv(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function iN(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&i==c.key&&o===c.type)return a;a++}}return-1}function ng(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||tN.test(t)?n:n+"px"}function yc(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ng(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ng(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?ig:rg,o)):e.removeEventListener(t,o?ig:rg,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function rg(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(At.event?At.event(e):e)}}function ig(e){if(this.l)return this.l[e.type+!0](At.event?At.event(e):e)}function Dh(e,t,n,r,i,o,s,a,c,u){var h,d,m,g,E,T,L,H,K,V,F,J,D,W,ue,P=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(h=At.__b)&&h(t);e:if(typeof P=="function")try{if(H=t.props,K=(h=P.contextType)&&r[h.__c],V=h?K?K.props.value:h.__:r,n.__c?L=(d=t.__c=n.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(H,V):(t.__c=d=new Gc(H,V),d.constructor=P,d.render=sN),K&&K.sub(d),d.props=H,d.state||(d.state={}),d.context=V,d.__n=r,m=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=pi({},d.__s)),pi(d.__s,P.getDerivedStateFromProps(H,d.__s))),g=d.props,E=d.state,d.__v=t,m)P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(P.getDerivedStateFromProps==null&&H!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(H,V),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(H,d.__s,V)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=H,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function($){$&&($.__=t)}),F=0;F<d._sb.length;F++)d.__h.push(d._sb[F]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(H,d.__s,V),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,E,T)})}if(d.context=V,d.props=H,d.__P=e,d.__e=!1,J=At.__r,D=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,J&&J(t),h=d.render(d.props,d.state,d.context),W=0;W<d._sb.length;W++)d.__h.push(d._sb[W]);d._sb=[]}else do d.__d=!1,J&&J(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++D<25);d.state=d.__s,d.getChildContext!=null&&(r=pi(pi({},r),d.getChildContext())),m||d.getSnapshotBeforeUpdate==null||(T=d.getSnapshotBeforeUpdate(g,E)),Ov(e,Lh(ue=h!=null&&h.type===da&&h.key==null?h.props.children:h)?ue:[ue],t,n,r,i,o,s,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),L&&(d.__E=d.__=null)}catch($){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),At.__e($,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=oN(n.__e,t,n,r,i,o,s,c,u);(h=At.diffed)&&h(t)}function uf(e,t,n){for(var r=0;r<n.length;r++)Bh(n[r],n[++r],n[++r]);At.__c&&At.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){At.__e(o,i.__v)}})}function oN(e,t,n,r,i,o,s,a,c){var u,h,d,m,g,E,T,L=n.props,H=t.props,K=t.type;if(K==="svg"&&(i=!0),o!=null){for(u=0;u<o.length;u++)if((g=o[u])&&"setAttribute"in g==!!K&&(K?g.localName===K:g.nodeType===3)){e=g,o[u]=null;break}}if(e==null){if(K===null)return document.createTextNode(H);e=i?document.createElementNS("http://www.w3.org/2000/svg",K):document.createElement(K,H.is&&H),o=null,a=!1}if(K===null)L===H||a&&e.data===H||(e.data=H);else{if(o=o&&ul.call(e.childNodes),L=n.props||$s,!a&&o!=null)for(L={},u=0;u<e.attributes.length;u++)L[(g=e.attributes[u]).name]=g.value;for(u in L)g=L[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=g:u==="key"||u in H||yc(e,u,null,g,i));for(u in H)g=H[u],u=="children"?m=g:u=="dangerouslySetInnerHTML"?h=g:u=="value"?E=g:u=="checked"?T=g:u==="key"||a&&typeof g!="function"||L[u]===g||yc(e,u,g,L[u],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ov(e,Lh(m)?m:[m],t,n,r,i&&K!=="foreignObject",o,s,o?o[0]:n.__k&&jo(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&Iv(o[u]);a||(u="value",E!==void 0&&(E!==e[u]||K==="progress"&&!E||K==="option"&&E!==L[u])&&yc(e,u,E,L[u],!1),u="checked",T!==void 0&&T!==e[u]&&yc(e,u,T,L[u],!1))}return e}function Bh(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){At.__e(r,n)}}function lf(e,t,n){var r,i;if(At.unmount&&At.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bh(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){At.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&lf(r[i],t,n||typeof e.type!="function");n||e.__e==null||Iv(e.__e),e.__=e.__e=e.__d=void 0}function sN(e,t,n){return this.constructor(e,n)}function aN(e,t,n){var r,i,o,s;At.__&&At.__(e,t),i=(r=!1)?null:t.__k,o=[],s=[],Dh(t,e=t.__k=ot(da,null,[e]),i||$s,$s,t.ownerSVGElement!==void 0,i?null:t.firstChild?ul.call(t.childNodes):null,o,i?i.__e:t.firstChild,r,s),e.__d=void 0,uf(o,e,s)}ul=xh.slice,At={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},wv=0,Gc.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=pi({},this.state),typeof e=="function"&&(e=e(pi({},n),this.props)),e&&pi(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),tg(this))},Gc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tg(this))},Gc.prototype.render=da,Di=[],Tv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cf=function(e,t){return e.__v.__b-t.__v.__b},_u.__r=0;var Kr,It,sd,og,$o=0,Rv=[],Vc=[],jt=At,sg=jt.__b,ag=jt.__r,cg=jt.diffed,ug=jt.__c,lg=jt.unmount,dg=jt.__;function so(e,t){jt.__h&&jt.__h(It,e,$o||t),$o=0;var n=It.__H||(It.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Vc}),n.__[e]}function Hi(e){return $o=1,Mv(kv,e)}function Mv(e,t,n){var r=so(Kr++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):kv(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return!!m.__c});if(h.every(function(m){return!m.__N}))return!o||o.call(this,a,c,u);var d=!1;return h.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(d=!0)}}),!(!d&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};It.u=!0;var o=It.shouldComponentUpdate,s=It.componentWillUpdate;It.componentWillUpdate=function(a,c,u){if(this.__e){var h=o;o=void 0,i(a,c,u),o=h}s&&s.call(this,a,c,u)},It.shouldComponentUpdate=i}return r.__N||r.__}function cN(e,t){var n=so(Kr++,3);!jt.__s&&Fh(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function Nv(e,t){var n=so(Kr++,4);!jt.__s&&Fh(n.__H,t)&&(n.__=e,n.i=t,It.__h.push(n))}function uN(e){return $o=5,fa(function(){return{current:e}},[])}function lN(e,t,n){$o=6,Nv(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function fa(e,t){var n=so(Kr++,7);return Fh(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ko(e,t){return $o=8,fa(function(){return e},t)}function dN(e){var t=It.context[e.__c],n=so(Kr++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function fN(e,t){jt.useDebugValue&&jt.useDebugValue(t?t(e):e)}function hN(e){var t=so(Kr++,10),n=Hi();return t.__=e,It.componentDidCatch||(It.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function pN(){var e=so(Kr++,11);if(!e.__){for(var t=It.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function mN(){for(var e;e=Rv.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qc),e.__H.__h.forEach(df),e.__H.__h=[]}catch(t){e.__H.__h=[],jt.__e(t,e.__v)}}jt.__b=function(e){It=null,sg&&sg(e)},jt.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dg&&dg(e,t)},jt.__r=function(e){ag&&ag(e),Kr=0;var t=(It=e.__c).__H;t&&(sd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Vc,n.__N=n.i=void 0})):(t.__h.forEach(qc),t.__h.forEach(df),t.__h=[],Kr=0)),sd=It},jt.diffed=function(e){cg&&cg(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Rv.push(t)!==1&&og===jt.requestAnimationFrame||((og=jt.requestAnimationFrame)||gN)(mN)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Vc&&(n.__=n.__V),n.i=void 0,n.__V=Vc})),sd=It=null},jt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(qc),n.__h=n.__h.filter(function(r){return!r.__||df(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],jt.__e(r,n.__v)}}),ug&&ug(e,t)},jt.unmount=function(e){lg&&lg(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{qc(r)}catch(i){t=i}}),n.__H=void 0,t&&jt.__e(t,n.__v))};var fg=typeof requestAnimationFrame=="function";function gN(e){var t,n=function(){clearTimeout(r),fg&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);fg&&(t=requestAnimationFrame(n))}function qc(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function df(e){var t=It;e.__c=e.__(),It=t}function Fh(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function kv(e,t){return typeof t=="function"?t(e):t}const yN=Object.defineProperty({__proto__:null,useCallback:ko,useContext:dN,useDebugValue:fN,useEffect:cN,useErrorBoundary:hN,useId:pN,useImperativeHandle:lN,useLayoutEffect:Nv,useMemo:fa,useReducer:Mv,useRef:uN,useState:Hi},Symbol.toStringTag,{value:"Module"}),_N="http://www.w3.org/2000/svg";function bN(){const e=r=>Tt.createElementNS(_N,r),t=Fn(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Fn(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function vN({options:e}){const t=fa(()=>({__html:bN().outerHTML}),[]);return ot("h2",{class:"dialog__header"},ot("span",{class:"dialog__title"},e.formTitle),e.showBranding?ot("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function EN(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function ad(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function SN({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){const{tags:h,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:m,cancelButtonLabel:g,emailLabel:E,emailPlaceholder:T,isEmailRequired:L,isNameRequired:H,messageLabel:K,messagePlaceholder:V,nameLabel:F,namePlaceholder:J,submitButtonLabel:D,isRequiredLabel:W}=e,[ue,P]=Hi(!1),[$,G]=Hi(null),[q,ie]=Hi(!1),fe=u?.input,[ce,re]=Hi(null),X=ko(he=>{re(he),ie(!1)},[]),_e=ko(he=>{const Se=EN(he,{emailLabel:E,isEmailRequired:L,isNameRequired:H,messageLabel:K,nameLabel:F});return Se.length>0?G(`Please enter in the following required fields: ${Se.join(", ")}`):G(null),Se.length===0},[E,L,H,K,F]),ge=ko(async he=>{P(!0);try{if(he.preventDefault(),!(he.target instanceof HTMLFormElement))return;const Se=new FormData(he.target),Xe=await(u&&q?u.value():void 0),se={name:ad(Se,"name"),email:ad(Se,"email"),message:ad(Se,"message"),attachments:Xe?[Xe]:void 0};if(!_e(se))return;try{const He=await i({name:se.name,email:se.email,message:se.message,source:zM,tags:h},{attachments:se.attachments});o(se,He)}catch(He){Wc&&Y.error(He),G(He),s(He)}}finally{P(!1)}},[u&&q,o,s]);return ot("form",{class:"form",onSubmit:ge},fe&&q?ot(fe,{onError:X}):null,ot("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:ue},ot("div",{class:"form__top"},$?ot("div",{class:"form__error-container"},$):null,c?ot("label",{for:"name",class:"form__label"},ot(cd,{label:F,isRequiredLabel:W,isRequired:H}),ot("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:J,required:H,type:"text"})):ot("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ot("label",{for:"email",class:"form__label"},ot(cd,{label:E,isRequiredLabel:W,isRequired:L}),ot("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:T,required:L,type:"email"})):ot("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ot("label",{for:"message",class:"form__label"},ot(cd,{label:K,isRequiredLabel:W,isRequired:!0}),ot("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:V,required:!0,rows:5})),fe?ot("label",{for:"screenshot",class:"form__label"},ot("button",{class:"btn btn--default",disabled:ue,type:"button",onClick:()=>{re(null),ie(he=>!he)}},q?m:d),ce?ot("div",{class:"form__error-container"},ce.message):null):null),ot("div",{class:"btn-group"},ot("button",{class:"btn btn--primary",disabled:ue,type:"submit"},D),ot("button",{class:"btn btn--default",disabled:ue,type:"button",onClick:r},g))))}function cd({label:e,isRequired:t,isRequiredLabel:n}){return ot("span",{class:"form__label__text"},e,t&&ot("span",{class:"form__label__text--required"},n))}const _c=16,hg=17,wN="http://www.w3.org/2000/svg";function TN(){const e=c=>rr.document.createElementNS(wN,c),t=Fn(e("svg"),{width:`${_c}`,height:`${hg}`,viewBox:`0 0 ${_c} ${hg}`,fill:"inherit"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),i=Fn(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(i,r);const o=e("defs"),s=Fn(e("clipPath"),{id:"clip0_57_156"}),a=Fn(e("rect"),{width:`${_c}`,height:`${_c}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}function IN({open:e,onFormSubmitted:t,...n}){const r=n.options,i=fa(()=>({__html:TN().outerHTML}),[]),[o,s]=Hi(null),a=ko(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),c=ko((u,h)=>{n.onSubmitSuccess(u,h),s(setTimeout(()=>{t(),s(null)},VM))},[t]);return ot(da,null,o?ot("div",{class:"success__position",onClick:a},ot("div",{class:"success__content"},r.successMessageText,ot("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):ot("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ot("div",{class:"dialog__position"},ot("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},ot(vN,{options:r}),ot(SN,{...n,onSubmitSuccess:c})))))}const AN=`
121
+ `,r&&i.setAttribute("nonce",r),i}const Tv=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:i="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:h=!0,enableScreenshot:d=!0,useSentryUser:m={email:"email",name:"username"},tags:g,styleNonce:E,scriptNonce:T,colorScheme:L="system",themeLight:H={},themeDark:K={},addScreenshotButtonLabel:V=zM,cancelButtonLabel:F=kM,confirmButtonLabel:J=xM,emailLabel:D=BM,emailPlaceholder:W=DM,formTitle:ue=LM,isRequiredLabel:P=WM,messageLabel:$=HM,messagePlaceholder:G=FM,nameLabel:q=jM,namePlaceholder:ie=UM,removeScreenshotButtonLabel:fe=GM,submitButtonLabel:ce=PM,successMessageText:re=$M,triggerLabel:X=Ev,triggerAriaLabel:_e="",onFormOpen:ge,onFormClose:he,onSubmitSuccess:Se,onSubmitError:Xe,onFormSubmitted:se}={})=>{const He={id:i,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:h,enableScreenshot:d,useSentryUser:m,tags:g,styleNonce:E,scriptNonce:T,colorScheme:L,themeDark:K,themeLight:H,triggerLabel:X,triggerAriaLabel:_e,cancelButtonLabel:F,submitButtonLabel:ce,confirmButtonLabel:J,formTitle:ue,emailLabel:D,emailPlaceholder:W,messageLabel:$,messagePlaceholder:G,nameLabel:q,namePlaceholder:ie,successMessageText:re,isRequiredLabel:P,addScreenshotButtonLabel:V,removeScreenshotButtonLabel:fe,onFormClose:he,onFormOpen:ge,onSubmitError:Xe,onSubmitSuccess:Se,onFormSubmitted:se};let vt=null,Et=[];const tn=ht=>{if(!vt){const gt=Tt.createElement("div");gt.id=String(ht.id),Tt.body.appendChild(gt),vt=gt.attachShadow({mode:"open"}),vt.appendChild(tN(ht))}return vt},nn=async ht=>{const gt=ht.enableScreenshot&&XM();let Gt,nt;try{Gt=(t?t():await e("feedbackModalIntegration",T))(),nf(Gt)}catch{throw Wc&&Y.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Ke=gt?n?n():await e("feedbackScreenshotIntegration",T):void 0;Ke&&(nt=Ke(),nf(nt))}catch{Wc&&Y.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const rt=Gt.createDialog({options:{...ht,onFormClose:()=>{rt?.close(),ht.onFormClose?.()},onFormSubmitted:()=>{rt?.close(),ht.onFormSubmitted?.()}},screenshotIntegration:nt,sendFeedback:Sv,shadow:tn(ht)});return rt},$n=(ht,gt={})=>{const Gt=gc(He,gt),nt=typeof ht=="string"?Tt.querySelector(ht):typeof ht.addEventListener=="function"?ht:null;if(!nt)throw Wc&&Y.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let rt=null;const Ke=async()=>{rt||(rt=await nn({...Gt,onFormSubmitted:()=>{rt?.removeFromDom(),Gt.onFormSubmitted?.()}})),rt.appendToDom(),rt.open()};nt.addEventListener("click",Ke);const gn=()=>{Et=Et.filter(xt=>xt!==gn),rt?.removeFromDom(),rt=null,nt.removeEventListener("click",Ke)};return Et.push(gn),gn},Me=(ht={})=>{const gt=gc(He,ht),Gt=tn(gt),nt=QM({triggerLabel:gt.triggerLabel,triggerAriaLabel:gt.triggerAriaLabel,shadow:Gt,styleNonce:E});return $n(nt.el,{...gt,onFormOpen(){nt.hide()},onFormClose(){nt.show()},onFormSubmitted(){nt.show()}}),nt};return{name:"Feedback",setupOnce(){!uf()||!He.autoInject||(Tt.readyState==="loading"?Tt.addEventListener("DOMContentLoaded",()=>Me().appendToDom()):Me().appendToDom())},attachTo:$n,createWidget(ht={}){const gt=Me(gc(He,ht));return gt.appendToDom(),gt},async createForm(ht={}){return nn(gc(He,ht))},remove(){vt&&(vt.parentElement?.remove(),vt=null),Et.forEach(ht=>ht()),Et=[]}}};function nN(){return Re()?.getIntegrationByName("Feedback")}var ul,At,Iv,Di,ng,Av,lf,$s={},Dh=[],rN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Bh=Array.isArray;function pi(e,t){for(var n in t)e[n]=t[n];return e}function Ov(e){var t=e.parentNode;t&&t.removeChild(e)}function ot(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ul.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return zc(e,s,r,i,null)}function zc(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Iv,__i:-1,__u:0};return i==null&&At.vnode!=null&&At.vnode(o),o}function da(e){return e.children}function Gc(e,t){this.props=e,this.context=t}function jo(e,t){if(t==null)return e.__?jo(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?jo(e):null}function iN(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=pi({},i)).__v=i.__v+1,At.vnode&&At.vnode(r),Fh(s,r,i,e.__n,s.ownerSVGElement!==void 0,32&i.__u?[o]:null,t,o??jo(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&Cv(r),r}function Cv(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Cv(e)}}function rg(e){(!e.__d&&(e.__d=!0)&&Di.push(e)&&!_u.__r++||ng!==At.debounceRendering)&&((ng=At.debounceRendering)||Av)(_u)}function _u(){var e,t,n,r=[],i=[];for(Di.sort(lf);e=Di.shift();)e.__d&&(n=Di.length,t=iN(e,r,i)||t,n===0||Di.length>n?(df(r,t,i),i.length=r.length=0,t=void 0,Di.sort(lf)):t&&At.__c&&At.__c(t,Dh));t&&df(r,t,i),_u.__r=0}function Rv(e,t,n,r,i,o,s,a,c,u,h){var d,m,g,E,T,L=r&&r.__k||Dh,H=t.length;for(n.__d=c,oN(n,t,L),c=n.__d,d=0;d<H;d++)(g=n.__k[d])!=null&&typeof g!="boolean"&&typeof g!="function"&&(m=g.__i===-1?$s:L[g.__i]||$s,g.__i=d,Fh(e,g,m,i,o,s,a,c,u,h),E=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Hh(m.ref,null,g),h.push(g.ref,g.__c||E,g)),T==null&&E!=null&&(T=E),65536&g.__u||m.__k===g.__k?c=Mv(g,c,e):typeof g.type=="function"&&g.__d!==void 0?c=g.__d:E&&(c=E.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=c,n.__e=T}function oN(e,t,n){var r,i,o,s,a,c=t.length,u=n.length,h=u,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?zc(null,i,null,null,i):Bh(i)?zc(da,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?zc(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,a=sN(i,n,s=r+d,h),i.__i=a,o=null,a!==-1&&(h--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?h>c-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=jo(o)),ff(o,o,!1),n[r]=null,h--);if(h)for(r=0;r<u;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=jo(o)),ff(o,o))}function Mv(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Mv(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function sN(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&i==c.key&&o===c.type)return a;a++}}return-1}function ig(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rN.test(t)?n:n+"px"}function yc(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||ig(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||ig(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?sg:og,o)):e.removeEventListener(t,o?sg:og,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function og(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(At.event?At.event(e):e)}}function sg(e){if(this.l)return this.l[e.type+!0](At.event?At.event(e):e)}function Fh(e,t,n,r,i,o,s,a,c,u){var h,d,m,g,E,T,L,H,K,V,F,J,D,W,ue,P=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(h=At.__b)&&h(t);e:if(typeof P=="function")try{if(H=t.props,K=(h=P.contextType)&&r[h.__c],V=h?K?K.props.value:h.__:r,n.__c?L=(d=t.__c=n.__c).__=d.__E:("prototype"in P&&P.prototype.render?t.__c=d=new P(H,V):(t.__c=d=new Gc(H,V),d.constructor=P,d.render=cN),K&&K.sub(d),d.props=H,d.state||(d.state={}),d.context=V,d.__n=r,m=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=pi({},d.__s)),pi(d.__s,P.getDerivedStateFromProps(H,d.__s))),g=d.props,E=d.state,d.__v=t,m)P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(P.getDerivedStateFromProps==null&&H!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(H,V),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(H,d.__s,V)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=H,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function($){$&&($.__=t)}),F=0;F<d._sb.length;F++)d.__h.push(d._sb[F]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(H,d.__s,V),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,E,T)})}if(d.context=V,d.props=H,d.__P=e,d.__e=!1,J=At.__r,D=0,"prototype"in P&&P.prototype.render){for(d.state=d.__s,d.__d=!1,J&&J(t),h=d.render(d.props,d.state,d.context),W=0;W<d._sb.length;W++)d.__h.push(d._sb[W]);d._sb=[]}else do d.__d=!1,J&&J(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++D<25);d.state=d.__s,d.getChildContext!=null&&(r=pi(pi({},r),d.getChildContext())),m||d.getSnapshotBeforeUpdate==null||(T=d.getSnapshotBeforeUpdate(g,E)),Rv(e,Bh(ue=h!=null&&h.type===da&&h.key==null?h.props.children:h)?ue:[ue],t,n,r,i,o,s,a,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),L&&(d.__E=d.__=null)}catch($){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),At.__e($,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=aN(n.__e,t,n,r,i,o,s,c,u);(h=At.diffed)&&h(t)}function df(e,t,n){for(var r=0;r<n.length;r++)Hh(n[r],n[++r],n[++r]);At.__c&&At.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){At.__e(o,i.__v)}})}function aN(e,t,n,r,i,o,s,a,c){var u,h,d,m,g,E,T,L=n.props,H=t.props,K=t.type;if(K==="svg"&&(i=!0),o!=null){for(u=0;u<o.length;u++)if((g=o[u])&&"setAttribute"in g==!!K&&(K?g.localName===K:g.nodeType===3)){e=g,o[u]=null;break}}if(e==null){if(K===null)return document.createTextNode(H);e=i?document.createElementNS("http://www.w3.org/2000/svg",K):document.createElement(K,H.is&&H),o=null,a=!1}if(K===null)L===H||a&&e.data===H||(e.data=H);else{if(o=o&&ul.call(e.childNodes),L=n.props||$s,!a&&o!=null)for(L={},u=0;u<e.attributes.length;u++)L[(g=e.attributes[u]).name]=g.value;for(u in L)g=L[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=g:u==="key"||u in H||yc(e,u,null,g,i));for(u in H)g=H[u],u=="children"?m=g:u=="dangerouslySetInnerHTML"?h=g:u=="value"?E=g:u=="checked"?T=g:u==="key"||a&&typeof g!="function"||L[u]===g||yc(e,u,g,L[u],i);if(h)a||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),Rv(e,Bh(m)?m:[m],t,n,r,i&&K!=="foreignObject",o,s,o?o[0]:n.__k&&jo(n,0),a,c),o!=null)for(u=o.length;u--;)o[u]!=null&&Ov(o[u]);a||(u="value",E!==void 0&&(E!==e[u]||K==="progress"&&!E||K==="option"&&E!==L[u])&&yc(e,u,E,L[u],!1),u="checked",T!==void 0&&T!==e[u]&&yc(e,u,T,L[u],!1))}return e}function Hh(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){At.__e(r,n)}}function ff(e,t,n){var r,i;if(At.unmount&&At.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Hh(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){At.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&ff(r[i],t,n||typeof e.type!="function");n||e.__e==null||Ov(e.__e),e.__=e.__e=e.__d=void 0}function cN(e,t,n){return this.constructor(e,n)}function uN(e,t,n){var r,i,o,s;At.__&&At.__(e,t),i=(r=!1)?null:t.__k,o=[],s=[],Fh(t,e=t.__k=ot(da,null,[e]),i||$s,$s,t.ownerSVGElement!==void 0,i?null:t.firstChild?ul.call(t.childNodes):null,o,i?i.__e:t.firstChild,r,s),e.__d=void 0,df(o,e,s)}ul=Dh.slice,At={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Iv=0,Gc.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=pi({},this.state),typeof e=="function"&&(e=e(pi({},n),this.props)),e&&pi(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),rg(this))},Gc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rg(this))},Gc.prototype.render=da,Di=[],Av=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,lf=function(e,t){return e.__v.__b-t.__v.__b},_u.__r=0;var Kr,It,sd,ag,$o=0,Nv=[],Vc=[],jt=At,cg=jt.__b,ug=jt.__r,lg=jt.diffed,dg=jt.__c,fg=jt.unmount,hg=jt.__;function so(e,t){jt.__h&&jt.__h(It,e,$o||t),$o=0;var n=It.__H||(It.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Vc}),n.__[e]}function Hi(e){return $o=1,kv(xv,e)}function kv(e,t,n){var r=so(Kr++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xv(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return!!m.__c});if(h.every(function(m){return!m.__N}))return!o||o.call(this,a,c,u);var d=!1;return h.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(d=!0)}}),!(!d&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};It.u=!0;var o=It.shouldComponentUpdate,s=It.componentWillUpdate;It.componentWillUpdate=function(a,c,u){if(this.__e){var h=o;o=void 0,i(a,c,u),o=h}s&&s.call(this,a,c,u)},It.shouldComponentUpdate=i}return r.__N||r.__}function lN(e,t){var n=so(Kr++,3);!jt.__s&&Uh(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function Pv(e,t){var n=so(Kr++,4);!jt.__s&&Uh(n.__H,t)&&(n.__=e,n.i=t,It.__h.push(n))}function dN(e){return $o=5,fa(function(){return{current:e}},[])}function fN(e,t,n){$o=6,Pv(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function fa(e,t){var n=so(Kr++,7);return Uh(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ko(e,t){return $o=8,fa(function(){return e},t)}function hN(e){var t=It.context[e.__c],n=so(Kr++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function pN(e,t){jt.useDebugValue&&jt.useDebugValue(t?t(e):e)}function mN(e){var t=so(Kr++,10),n=Hi();return t.__=e,It.componentDidCatch||(It.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function gN(){var e=so(Kr++,11);if(!e.__){for(var t=It.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function yN(){for(var e;e=Nv.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qc),e.__H.__h.forEach(hf),e.__H.__h=[]}catch(t){e.__H.__h=[],jt.__e(t,e.__v)}}jt.__b=function(e){It=null,cg&&cg(e)},jt.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),hg&&hg(e,t)},jt.__r=function(e){ug&&ug(e),Kr=0;var t=(It=e.__c).__H;t&&(sd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Vc,n.__N=n.i=void 0})):(t.__h.forEach(qc),t.__h.forEach(hf),t.__h=[],Kr=0)),sd=It},jt.diffed=function(e){lg&&lg(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nv.push(t)!==1&&ag===jt.requestAnimationFrame||((ag=jt.requestAnimationFrame)||_N)(yN)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Vc&&(n.__=n.__V),n.i=void 0,n.__V=Vc})),sd=It=null},jt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(qc),n.__h=n.__h.filter(function(r){return!r.__||hf(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],jt.__e(r,n.__v)}}),dg&&dg(e,t)},jt.unmount=function(e){fg&&fg(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{qc(r)}catch(i){t=i}}),n.__H=void 0,t&&jt.__e(t,n.__v))};var pg=typeof requestAnimationFrame=="function";function _N(e){var t,n=function(){clearTimeout(r),pg&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);pg&&(t=requestAnimationFrame(n))}function qc(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function hf(e){var t=It;e.__c=e.__(),It=t}function Uh(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function xv(e,t){return typeof t=="function"?t(e):t}const bN=Object.defineProperty({__proto__:null,useCallback:ko,useContext:hN,useDebugValue:pN,useEffect:lN,useErrorBoundary:mN,useId:gN,useImperativeHandle:fN,useLayoutEffect:Pv,useMemo:fa,useReducer:kv,useRef:dN,useState:Hi},Symbol.toStringTag,{value:"Module"}),vN="http://www.w3.org/2000/svg";function EN(){const e=r=>Tt.createElementNS(vN,r),t=Fn(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Fn(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function SN({options:e}){const t=fa(()=>({__html:EN().outerHTML}),[]);return ot("h2",{class:"dialog__header"},ot("span",{class:"dialog__title"},e.formTitle),e.showBranding?ot("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function wN(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function ad(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function TN({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){const{tags:h,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:m,cancelButtonLabel:g,emailLabel:E,emailPlaceholder:T,isEmailRequired:L,isNameRequired:H,messageLabel:K,messagePlaceholder:V,nameLabel:F,namePlaceholder:J,submitButtonLabel:D,isRequiredLabel:W}=e,[ue,P]=Hi(!1),[$,G]=Hi(null),[q,ie]=Hi(!1),fe=u?.input,[ce,re]=Hi(null),X=ko(he=>{re(he),ie(!1)},[]),_e=ko(he=>{const Se=wN(he,{emailLabel:E,isEmailRequired:L,isNameRequired:H,messageLabel:K,nameLabel:F});return Se.length>0?G(`Please enter in the following required fields: ${Se.join(", ")}`):G(null),Se.length===0},[E,L,H,K,F]),ge=ko(async he=>{P(!0);try{if(he.preventDefault(),!(he.target instanceof HTMLFormElement))return;const Se=new FormData(he.target),Xe=await(u&&q?u.value():void 0),se={name:ad(Se,"name"),email:ad(Se,"email"),message:ad(Se,"message"),attachments:Xe?[Xe]:void 0};if(!_e(se))return;try{const He=await i({name:se.name,email:se.email,message:se.message,source:VM,tags:h},{attachments:se.attachments});o(se,He)}catch(He){Wc&&Y.error(He),G(He),s(He)}}finally{P(!1)}},[u&&q,o,s]);return ot("form",{class:"form",onSubmit:ge},fe&&q?ot(fe,{onError:X}):null,ot("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:ue},ot("div",{class:"form__top"},$?ot("div",{class:"form__error-container"},$):null,c?ot("label",{for:"name",class:"form__label"},ot(cd,{label:F,isRequiredLabel:W,isRequired:H}),ot("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:J,required:H,type:"text"})):ot("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ot("label",{for:"email",class:"form__label"},ot(cd,{label:E,isRequiredLabel:W,isRequired:L}),ot("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:T,required:L,type:"email"})):ot("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ot("label",{for:"message",class:"form__label"},ot(cd,{label:K,isRequiredLabel:W,isRequired:!0}),ot("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:V,required:!0,rows:5})),fe?ot("label",{for:"screenshot",class:"form__label"},ot("button",{class:"btn btn--default",disabled:ue,type:"button",onClick:()=>{re(null),ie(he=>!he)}},q?m:d),ce?ot("div",{class:"form__error-container"},ce.message):null):null),ot("div",{class:"btn-group"},ot("button",{class:"btn btn--primary",disabled:ue,type:"submit"},D),ot("button",{class:"btn btn--default",disabled:ue,type:"button",onClick:r},g))))}function cd({label:e,isRequired:t,isRequiredLabel:n}){return ot("span",{class:"form__label__text"},e,t&&ot("span",{class:"form__label__text--required"},n))}const _c=16,mg=17,IN="http://www.w3.org/2000/svg";function AN(){const e=c=>rr.document.createElementNS(IN,c),t=Fn(e("svg"),{width:`${_c}`,height:`${mg}`,viewBox:`0 0 ${_c} ${mg}`,fill:"inherit"}),n=Fn(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Fn(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),i=Fn(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(i,r);const o=e("defs"),s=Fn(e("clipPath"),{id:"clip0_57_156"}),a=Fn(e("rect"),{width:`${_c}`,height:`${_c}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}function ON({open:e,onFormSubmitted:t,...n}){const r=n.options,i=fa(()=>({__html:AN().outerHTML}),[]),[o,s]=Hi(null),a=ko(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),c=ko((u,h)=>{n.onSubmitSuccess(u,h),s(setTimeout(()=>{t(),s(null)},YM))},[t]);return ot(da,null,o?ot("div",{class:"success__position",onClick:a},ot("div",{class:"success__content"},r.successMessageText,ot("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):ot("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ot("div",{class:"dialog__position"},ot("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},ot(SN,{options:r}),ot(TN,{...n,onSubmitSuccess:c})))))}const CN=`
122
122
  .dialog {
123
123
  position: fixed;
124
124
  z-index: var(--z-index);
@@ -190,7 +190,7 @@ ${e==="system"?`
190
190
  transition: transform 0.2s ease-in-out;
191
191
  }
192
192
 
193
- `,ON=`
193
+ `,RN=`
194
194
  .dialog__header {
195
195
  display: flex;
196
196
  gap: 4px;
@@ -220,7 +220,7 @@ ${e==="system"?`
220
220
  .brand-link:focus-visible {
221
221
  outline: var(--outline);
222
222
  }
223
- `,CN=`
223
+ `,MN=`
224
224
  .form {
225
225
  display: flex;
226
226
  overflow: auto;
@@ -310,7 +310,7 @@ ${e==="system"?`
310
310
  color: var(--error-color);
311
311
  fill: var(--error-color);
312
312
  }
313
- `,RN=`
313
+ `,NN=`
314
314
  .btn-group {
315
315
  display: grid;
316
316
  gap: 8px;
@@ -370,7 +370,7 @@ ${e==="system"?`
370
370
  filter: var(--interactive-filter);
371
371
  outline: var(--button-focus-outline, var(--outline));
372
372
  }
373
- `,MN=`
373
+ `,kN=`
374
374
  .success__position {
375
375
  position: fixed;
376
376
  inset: var(--dialog-inset);
@@ -398,17 +398,17 @@ ${e==="system"?`
398
398
  .success__icon {
399
399
  display: flex;
400
400
  }
401
- `;function NN(e){const t=Tt.createElement("style");return t.textContent=`
401
+ `;function PN(e){const t=Tt.createElement("style");return t.textContent=`
402
402
  :host {
403
403
  --dialog-inset: var(--inset);
404
404
  }
405
405
 
406
- ${AN}
407
- ${ON}
408
406
  ${CN}
409
407
  ${RN}
410
408
  ${MN}
411
- `,e&&t.setAttribute("nonce",e),t}function kN(){const e=tt().getUser(),t=Qt().getUser(),n=nl().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const PN=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const i=r,o=e.useSentryUser,s=kN(),a=Tt.createElement("div"),c=NN(e.styleNonce);let u="";const h={get el(){return a},appendToDom(){!i.contains(c)&&!i.contains(a)&&(i.appendChild(c),i.appendChild(a))},removeFromDom(){a.remove(),c.remove(),Tt.body.style.overflow=u},open(){m(!0),e.onFormOpen?.(),Re()?.emit("openFeedbackWidget"),u=Tt.body.style.overflow,Tt.body.style.overflow="hidden"},close(){m(!1),Tt.body.style.overflow=u}},d=t?.createInput({h:ot,hooks:yN,dialog:h,options:e}),m=g=>{aN(ot(IN,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&s?.[o.name]||"",defaultEmail:o&&s?.[o.email]||"",onFormClose:()=>{m(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(E,T)=>{m(!1),e.onSubmitSuccess?.(E,T)},onSubmitError:E=>{e.onSubmitError?.(E)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:g}),a)};return h}});function xN({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function LN(e){const t=Tt.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
409
+ ${NN}
410
+ ${kN}
411
+ `,e&&t.setAttribute("nonce",e),t}function xN(){const e=tt().getUser(),t=Qt().getUser(),n=nl().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const LN=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const i=r,o=e.useSentryUser,s=xN(),a=Tt.createElement("div"),c=PN(e.styleNonce);let u="";const h={get el(){return a},appendToDom(){!i.contains(c)&&!i.contains(a)&&(i.appendChild(c),i.appendChild(a))},removeFromDom(){a.remove(),c.remove(),Tt.body.style.overflow=u},open(){m(!0),e.onFormOpen?.(),Re()?.emit("openFeedbackWidget"),u=Tt.body.style.overflow,Tt.body.style.overflow="hidden"},close(){m(!1),Tt.body.style.overflow=u}},d=t?.createInput({h:ot,hooks:bN,dialog:h,options:e}),m=g=>{uN(ot(ON,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&s?.[o.name]||"",defaultEmail:o&&s?.[o.email]||"",onFormClose:()=>{m(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(E,T)=>{m(!1),e.onSubmitSuccess?.(E,T)},onSubmitError:E=>{e.onSubmitError?.(E)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:g}),a)};return h}});function DN({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function BN(e){const t=Tt.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
412
412
  .editor {
413
413
  display: flex;
414
414
  flex-grow: 1;
@@ -500,36 +500,36 @@ ${MN}
500
500
  .editor__rect:hover button {
501
501
  opacity: 1;
502
502
  }
503
- `,e&&t.setAttribute("nonce",e),t}function DN({h:e}){return function({action:n,setAction:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},"Highlight"),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},"Hide")))}}function BN({hooks:e}){function t(){const[n,r]=e.useState(rr.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(rr.devicePixelRatio)},o=matchMedia(`(resolution: ${rr.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Ns.mediaDevices.getDisplayMedia({video:{width:rr.innerWidth*a,height:rr.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),h=Tt.createElement("video");await new Promise((d,m)=>{h.srcObject=u,h.onloadedmetadata=()=>{i(h,a),u.getTracks().forEach(g=>g.stop()),d()},h.play().catch(m)}),o()})().catch(s)},[])}}function FN(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function di(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function ud(e,t){di(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function ld(e,t,n){di(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{FN(o,i,t)})})}function HN({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=BN({hooks:t}),s=DN({h:e}),a=xN({h:e}),c={__html:LN(i.styleNonce).innerText},u=r.el.style,h=({screenshot:d})=>{const[m,g]=t.useState("highlight"),[E,T]=t.useState([]),L=t.useRef(null),H=t.useRef(null),K=t.useRef(null),V=t.useRef(null),[F,J]=t.useState(1),D=t.useMemo(()=>{const q=Tt.getElementById(i.id);if(!q)return"white";const ie=getComputedStyle(q);return ie.getPropertyValue("--button-primary-background")||ie.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const q=()=>{const ie=L.current;ie&&(di(d.canvas,{alpha:!1},fe=>{const ce=Math.min(ie.clientWidth/fe.width,ie.clientHeight/fe.height);J(ce)}),(ie.clientHeight===0||ie.clientWidth===0)&&setTimeout(q,0))};return q(),rr.addEventListener("resize",q),()=>{rr.removeEventListener("resize",q)}},[d]);const W=t.useCallback((q,ie)=>{di(q,{alpha:!0},(fe,ce)=>{ce.scale(ie,ie),fe.width=d.canvas.width,fe.height=d.canvas.height})},[d]);t.useEffect(()=>{W(H.current,d.dpi),ud(H.current,d.canvas)},[d]),t.useEffect(()=>{W(K.current,d.dpi),di(K.current,{alpha:!0},(q,ie)=>{ie.clearRect(0,0,q.width,q.height)}),ld(K.current,D,E)},[E,D]),t.useEffect(()=>{W(n,d.dpi),ud(n,d.canvas),di(Tt.createElement("canvas"),{alpha:!0},(q,ie)=>{ie.scale(d.dpi,d.dpi),q.width=d.canvas.width,q.height=d.canvas.height,ld(q,D,E),ud(n,q)})},[E,d,D]);const ue=q=>{if(!m||!V.current)return;const ie=V.current.getBoundingClientRect(),fe={type:m,x:q.offsetX/F,y:q.offsetY/F},ce=(_e,ge)=>{const he=(ge.clientX-ie.x)/F,Se=(ge.clientY-ie.y)/F;return{type:_e.type,x:Math.min(_e.x,he),y:Math.min(_e.y,Se),w:Math.abs(he-_e.x),h:Math.abs(Se-_e.y)}},re=_e=>{di(K.current,{alpha:!0},(ge,he)=>{he.clearRect(0,0,ge.width,ge.height)}),ld(K.current,D,[...E,ce(fe,_e)])},X=_e=>{const ge=ce(fe,_e);ge.w*F>=1&&ge.h*F>=1&&T(he=>[...he,ge]),Tt.removeEventListener("mousemove",re),Tt.removeEventListener("mouseup",X)};Tt.addEventListener("mousemove",re),Tt.addEventListener("mouseup",X)},P=t.useCallback(q=>ie=>{ie.preventDefault(),ie.stopPropagation(),T(fe=>{const ce=[...fe];return ce.splice(q,1),ce})},[]),$={width:`${d.canvas.width*F}px`,height:`${d.canvas.height*F}px`},G=q=>{q.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:L},e("canvas",{ref:H,id:"background",style:$}),e("canvas",{ref:K,id:"foreground",style:$}),e("div",{ref:V,onMouseDown:ue,style:$},E.map((q,ie)=>e("div",{key:ie,class:"editor__rect",style:{top:`${q.y*F}px`,left:`${q.x*F}px`,width:`${q.w*F}px`,height:`${q.h*F}px`}},e("button",{"aria-label":"Remove",onClick:P(ie),onMouseDown:G,onMouseUp:G,type:"button"},e(a,null))))))),e(s,{action:m,setAction:g}))};return function({onError:m}){const[g,E]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((T,L)=>{di(Tt.createElement("canvas"),{alpha:!1},(H,K)=>{K.scale(L,L),H.width=T.videoWidth,H.height=T.videoHeight,K.drawImage(T,0,0,H.width,H.height),E({canvas:H,dpi:L})}),n.width=T.videoWidth,n.height=T.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(T=>{u.display="block",m(T)},[])}),g?e(h,{screenshot:g}):e("div",null)}}const UN=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=Tt.createElement("canvas");return{input:HN({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),Fe=We;let ff=0;function Pv(){return ff>0}function jN(){ff++,setTimeout(()=>{ff--})}function Wo(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(_h(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>Wo(s,t));return e.apply(this,o)}catch(o){throw jN(),Jn(s=>{s.addEventProcessor(a=>(t.mechanism&&(Gd(a,void 0),bi(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),Xi(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Qb(r,e),Nn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Hh(){const e=to(),{referrer:t}=Fe.document||{},{userAgent:n}=Fe.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const $N={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},pg=Fe;async function xv(e,t){const n=$N[e],r=pg.Sentry=pg.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=WN(n),s=Fe.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((d,m)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",m)}),c=Fe.document.currentScript,u=Fe.document.body||Fe.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const h=r[e];if(typeof h!="function")throw new Error(`Could not load integration: ${e}`);return h}function WN(e){const n=Re()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${jr}/${e}.min.js`,n).toString()}const zN=Sv({lazyLoadIntegration:xv}),mg=Sv({getModalIntegration:()=>PN,getScreenshotIntegration:()=>UN});function ss(e,t,n,r){nf({level:e,message:t,attributes:n,severityNumber:r})}function GN(e,t){ss("trace",e,t)}function VN(e,t){ss("debug",e,t)}function qN(e,t){ss("info",e,t)}function YN(e,t){ss("warn",e,t)}function XN(e,t){ss("error",e,t)}function KN(e,t){ss("fatal",e,t)}const JN=Object.freeze(Object.defineProperty({__proto__:null,debug:VN,error:XN,fatal:KN,fmt:$C,info:qN,trace:GN,warn:YN},Symbol.toStringTag,{value:"Module"}));function ll(e,t){const n=Uh(e,t),r={type:nk(t),value:rk(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ZN(e,t,n,r){const o=Re()?.getOptions().normalizeDepth,s=sk(t),a={__serialized__:I0(t,o)};if(s)return{exception:{values:[ll(e,s)]},extra:a};const c={exception:{values:[{type:tl(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:ik(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Uh(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function dd(e,t){return{exception:{values:[ll(e,t)]}}}function Uh(e,t){const n=t.stacktrace||t.stack||"",r=ek(t),i=tk(t);try{return e(n,r,i)}catch{}return[]}const QN=/Minified React error #\d+;/i;function ek(e){return e&&QN.test(e.message)?1:0}function tk(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Lv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function nk(e){const t=e?.name;return!t&&Lv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function rk(e){const t=e?.message;return Lv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Dv(e,t,n,r){const i=n?.syntheticException||void 0,o=jh(e,t,i,r);return bi(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Xr(o)}function Bv(e,t,n="info",r,i){const o=r?.syntheticException||void 0,s=hf(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Xr(s)}function jh(e,t,n,r,i){let o;if(Xb(t)&&t.error)return dd(e,t.error);if(dm(t)||pA(t)){const s=t;if("stack"in t)o=dd(e,t);else{const a=s.name||(dm(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=hf(e,c,n,r),Gd(o,c)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return gi(t)?dd(e,t):Gr(t)||tl(t)?(o=ZN(e,t,n,i),bi(o,{synthetic:!0}),o):(o=hf(e,t,n,r),Gd(o,`${t}`),bi(o,{synthetic:!0}),o)}function hf(e,t,n,r){const i={};if(r&&n){const o=Uh(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),bi(i,{synthetic:!0})}if(el(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function ik(e,{isUnhandledRejection:t}){const n=EA(e),r=t?"promise rejection":"exception";return Xb(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:tl(e)?`Event \`${ok(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ok(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function sk(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const ak=5e3;class Fv extends bC{constructor(t){const n=ck(t),r=Fe.SENTRY_SDK_SOURCE||OM();GC(n,"browser",["browser"],r),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a}=this._options,c=s??a?.enableLogs;Fe.document&&(o||c)&&Fe.document.addEventListener("visibilitychange",()=>{Fe.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&$c(this))}),c&&(this.on("flush",()=>{$c(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{$c(this)},ak)})),i&&(this.on("postprocessEvent",WC),this.on("beforeSendSession",zC))}eventFromException(t,n){return Dv(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Bv(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function ck(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Fe.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const zo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Je=We,uk=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",as=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=uk(t.value,n),e(t)))}},lk=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ha=(e=!0)=>{const t=Je.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},cs=()=>ha()?.activationStart??0,us=(e,t=-1)=>{const n=ha();let r="navigate";return n&&(Je.document?.prerendering||cs()>0?r="prerender":Je.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:lk(),navigationType:r}},fd=new WeakMap;function $h(e,t){return fd.get(e)||fd.set(e,new t),fd.get(e)}class bu{constructor(){bu.prototype.__init.call(this),bu.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const ao=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},dl=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let xs=-1;const dk=()=>Je.document?.visibilityState==="hidden"&&!Je.document?.prerendering?0:1/0,vu=e=>{Je.document.visibilityState==="hidden"&&xs>-1&&(xs=e.type==="visibilitychange"?e.timeStamp:0,hk())},fk=()=>{addEventListener("visibilitychange",vu,!0),addEventListener("prerenderingchange",vu,!0)},hk=()=>{removeEventListener("visibilitychange",vu,!0),removeEventListener("prerenderingchange",vu,!0)},fl=()=>{if(Je.document&&xs<0){const e=cs();xs=(Je.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??dk(),fk()}return{get firstHiddenTime(){return xs}}},pa=e=>{Je.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},pk=[1800,3e3],mk=(e,t={})=>{pa(()=>{const n=fl(),r=us("FCP");let i;const s=ao("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-cs(),0),r.entries.push(c),i(!0)))});s&&(i=as(e,r,pk,t.reportAllChanges))})},gk=[.1,.25],yk=(e,t={})=>{mk(dl(()=>{const n=us("CLS",0);let r;const i=$h(t,bu),o=a=>{for(const c of a)i._processEntry(c);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},s=ao("layout-shift",o);s&&(r=as(e,n,gk,t.reportAllChanges),Je.document?.addEventListener("visibilitychange",()=>{Je.document?.visibilityState==="hidden"&&(o(s.takeRecords()),r(!0))}),Je?.setTimeout?.(r))}))},hl=e=>{const t=n=>{(n.type==="pagehide"||Je.document?.visibilityState==="hidden")&&e(n)};Je.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},_k=[100,300],bk=(e,t={})=>{pa(()=>{const n=fl(),r=us("FID");let i;const o=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),i(!0))},s=c=>{c.forEach(o)},a=ao("first-input",s);i=as(e,r,_k,t.reportAllChanges),a&&hl(dl(()=>{s(a.takeRecords()),a.disconnect()}))})};let Hv=0,hd=1/0,bc=0;const vk=e=>{e.forEach(t=>{t.interactionId&&(hd=Math.min(hd,t.interactionId),bc=Math.max(bc,t.interactionId),Hv=bc?(bc-hd)/7+1:0)})};let pf;const Uv=()=>pf?Hv:performance.interactionCount||0,Ek=()=>{"interactionCount"in performance||pf||(pf=ao("event",vk,{type:"event",buffered:!0,durationThreshold:0}))},pd=10;let jv=0;const Sk=()=>Uv()-jv;class Eu{constructor(){Eu.prototype.__init.call(this),Eu.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){jv=Uv(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(Sk()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<pd||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>pd){const i=this._longestInteractionList.splice(pd);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const $v=e=>{const t=Je.requestIdleCallback||Je.setTimeout;Je.document?.visibilityState==="hidden"?e():(e=dl(e),t(e),hl(e))},wk=[200,500],Tk=40,Ik=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&pa(()=>{Ek();const n=us("INP");let r;const i=$h(t,Eu),o=a=>{$v(()=>{for(const u of a)i._processEntry(u);const c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},s=ao("event",o,{durationThreshold:t.durationThreshold??Tk});r=as(e,n,wk,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),hl(()=>{o(s.takeRecords()),r(!0)}))})};class Ak{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const Ok=[2500,4e3],Ck=(e,t={})=>{pa(()=>{const n=fl(),r=us("LCP");let i;const o=$h(t,Ak),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-cs(),0),r.entries=[u],i())},a=ao("largest-contentful-paint",s);if(a){i=as(e,r,Ok,t.reportAllChanges);const c=dl(()=>{s(a.takeRecords()),a.disconnect(),i(!0)});for(const u of["keydown","click","visibilitychange"])Je.document&&addEventListener(u,()=>$v(c),{capture:!0,once:!0})}})},Rk=[800,1800],mf=e=>{Je.document?.prerendering?pa(()=>mf(e)):Je.document?.readyState!=="complete"?addEventListener("load",()=>mf(e),!0):setTimeout(e)},Mk=(e,t={})=>{const n=us("TTFB"),r=as(e,n,Rk,t.reportAllChanges);mf(()=>{const i=ha();i&&(n.value=Math.max(i.responseStart-cs(),0),n.entries=[i],r(!0))})},Ls={},Su={};let Wv,zv,Gv,Vv,qv;function Wh(e,t=!1){return ma("cls",e,kk,Wv,t)}function zh(e,t=!1){return ma("lcp",e,xk,Gv,t)}function Yv(e){return ma("fid",e,Pk,zv)}function Nk(e){return ma("ttfb",e,Lk,Vv)}function Xv(e){return ma("inp",e,Dk,qv)}function Ki(e,t){return Kv(e,t),Su[e]||(Bk(e),Su[e]=!0),Jv(e,t)}function ls(e,t){const n=Ls[e];if(n?.length)for(const r of n)try{r(t)}catch(i){zo&&Y.error(`Error while triggering instrumentation handler.
503
+ `,e&&t.setAttribute("nonce",e),t}function FN({h:e}){return function({action:n,setAction:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},"Highlight"),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},"Hide")))}}function HN({hooks:e}){function t(){const[n,r]=e.useState(rr.devicePixelRatio??1);return e.useEffect(()=>{const i=()=>{r(rr.devicePixelRatio)},o=matchMedia(`(resolution: ${rr.devicePixelRatio}dppx)`);return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Ns.mediaDevices.getDisplayMedia({video:{width:rr.innerWidth*a,height:rr.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),h=Tt.createElement("video");await new Promise((d,m)=>{h.srcObject=u,h.onloadedmetadata=()=>{i(h,a),u.getTracks().forEach(g=>g.stop()),d()},h.play().catch(m)}),o()})().catch(s)},[])}}function UN(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function di(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function ud(e,t){di(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function ld(e,t,n){di(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{UN(o,i,t)})})}function jN({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const o=HN({hooks:t}),s=FN({h:e}),a=DN({h:e}),c={__html:BN(i.styleNonce).innerText},u=r.el.style,h=({screenshot:d})=>{const[m,g]=t.useState("highlight"),[E,T]=t.useState([]),L=t.useRef(null),H=t.useRef(null),K=t.useRef(null),V=t.useRef(null),[F,J]=t.useState(1),D=t.useMemo(()=>{const q=Tt.getElementById(i.id);if(!q)return"white";const ie=getComputedStyle(q);return ie.getPropertyValue("--button-primary-background")||ie.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const q=()=>{const ie=L.current;ie&&(di(d.canvas,{alpha:!1},fe=>{const ce=Math.min(ie.clientWidth/fe.width,ie.clientHeight/fe.height);J(ce)}),(ie.clientHeight===0||ie.clientWidth===0)&&setTimeout(q,0))};return q(),rr.addEventListener("resize",q),()=>{rr.removeEventListener("resize",q)}},[d]);const W=t.useCallback((q,ie)=>{di(q,{alpha:!0},(fe,ce)=>{ce.scale(ie,ie),fe.width=d.canvas.width,fe.height=d.canvas.height})},[d]);t.useEffect(()=>{W(H.current,d.dpi),ud(H.current,d.canvas)},[d]),t.useEffect(()=>{W(K.current,d.dpi),di(K.current,{alpha:!0},(q,ie)=>{ie.clearRect(0,0,q.width,q.height)}),ld(K.current,D,E)},[E,D]),t.useEffect(()=>{W(n,d.dpi),ud(n,d.canvas),di(Tt.createElement("canvas"),{alpha:!0},(q,ie)=>{ie.scale(d.dpi,d.dpi),q.width=d.canvas.width,q.height=d.canvas.height,ld(q,D,E),ud(n,q)})},[E,d,D]);const ue=q=>{if(!m||!V.current)return;const ie=V.current.getBoundingClientRect(),fe={type:m,x:q.offsetX/F,y:q.offsetY/F},ce=(_e,ge)=>{const he=(ge.clientX-ie.x)/F,Se=(ge.clientY-ie.y)/F;return{type:_e.type,x:Math.min(_e.x,he),y:Math.min(_e.y,Se),w:Math.abs(he-_e.x),h:Math.abs(Se-_e.y)}},re=_e=>{di(K.current,{alpha:!0},(ge,he)=>{he.clearRect(0,0,ge.width,ge.height)}),ld(K.current,D,[...E,ce(fe,_e)])},X=_e=>{const ge=ce(fe,_e);ge.w*F>=1&&ge.h*F>=1&&T(he=>[...he,ge]),Tt.removeEventListener("mousemove",re),Tt.removeEventListener("mouseup",X)};Tt.addEventListener("mousemove",re),Tt.addEventListener("mouseup",X)},P=t.useCallback(q=>ie=>{ie.preventDefault(),ie.stopPropagation(),T(fe=>{const ce=[...fe];return ce.splice(q,1),ce})},[]),$={width:`${d.canvas.width*F}px`,height:`${d.canvas.height*F}px`},G=q=>{q.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:L},e("canvas",{ref:H,id:"background",style:$}),e("canvas",{ref:K,id:"foreground",style:$}),e("div",{ref:V,onMouseDown:ue,style:$},E.map((q,ie)=>e("div",{key:ie,class:"editor__rect",style:{top:`${q.y*F}px`,left:`${q.x*F}px`,width:`${q.w*F}px`,height:`${q.h*F}px`}},e("button",{"aria-label":"Remove",onClick:P(ie),onMouseDown:G,onMouseUp:G,type:"button"},e(a,null))))))),e(s,{action:m,setAction:g}))};return function({onError:m}){const[g,E]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((T,L)=>{di(Tt.createElement("canvas"),{alpha:!1},(H,K)=>{K.scale(L,L),H.width=T.videoWidth,H.height=T.videoHeight,K.drawImage(T,0,0,H.width,H.height),E({canvas:H,dpi:L})}),n.width=T.videoWidth,n.height=T.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(T=>{u.display="block",m(T)},[])}),g?e(h,{screenshot:g}):e("div",null)}}const $N=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const i=Tt.createElement("canvas");return{input:jN({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{const o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),Fe=We;let pf=0;function Lv(){return pf>0}function WN(){pf++,setTimeout(()=>{pf--})}function Wo(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(vh(e))return e}catch{return e}const r=function(...i){try{const o=i.map(s=>Wo(s,t));return e.apply(this,o)}catch(o){throw WN(),Jn(s=>{s.addEventProcessor(a=>(t.mechanism&&(qd(a,void 0),bi(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),Xi(o)}),o}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}t0(r,e),Nn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function jh(){const e=to(),{referrer:t}=Fe.document||{},{userAgent:n}=Fe.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const zN={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},gg=Fe;async function Dv(e,t){const n=zN[e],r=gg.Sentry=gg.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const o=GN(n),s=Fe.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);const a=new Promise((d,m)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",m)}),c=Fe.document.currentScript,u=Fe.document.body||Fe.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const h=r[e];if(typeof h!="function")throw new Error(`Could not load integration: ${e}`);return h}function GN(e){const n=Re()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${jr}/${e}.min.js`,n).toString()}const VN=Tv({lazyLoadIntegration:Dv}),yg=Tv({getModalIntegration:()=>LN,getScreenshotIntegration:()=>$N});function ss(e,t,n,r){of({level:e,message:t,attributes:n,severityNumber:r})}function qN(e,t){ss("trace",e,t)}function YN(e,t){ss("debug",e,t)}function XN(e,t){ss("info",e,t)}function KN(e,t){ss("warn",e,t)}function JN(e,t){ss("error",e,t)}function ZN(e,t){ss("fatal",e,t)}const QN=Object.freeze(Object.defineProperty({__proto__:null,debug:YN,error:JN,fatal:ZN,fmt:zC,info:XN,trace:qN,warn:KN},Symbol.toStringTag,{value:"Module"}));function ll(e,t){const n=$h(e,t),r={type:ik(t),value:ok(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ek(e,t,n,r){const o=Re()?.getOptions().normalizeDepth,s=ck(t),a={__serialized__:O0(t,o)};if(s)return{exception:{values:[ll(e,s)]},extra:a};const c={exception:{values:[{type:tl(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:sk(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=$h(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function dd(e,t){return{exception:{values:[ll(e,t)]}}}function $h(e,t){const n=t.stacktrace||t.stack||"",r=nk(t),i=rk(t);try{return e(n,r,i)}catch{}return[]}const tk=/Minified React error #\d+;/i;function nk(e){return e&&tk.test(e.message)?1:0}function rk(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Bv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function ik(e){const t=e?.name;return!t&&Bv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ok(e){const t=e?.message;return Bv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Fv(e,t,n,r){const i=n?.syntheticException||void 0,o=Wh(e,t,i,r);return bi(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Xr(o)}function Hv(e,t,n="info",r,i){const o=r?.syntheticException||void 0,s=mf(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Xr(s)}function Wh(e,t,n,r,i){let o;if(Jb(t)&&t.error)return dd(e,t.error);if(hm(t)||gA(t)){const s=t;if("stack"in t)o=dd(e,t);else{const a=s.name||(hm(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=mf(e,c,n,r),qd(o,c)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return gi(t)?dd(e,t):Gr(t)||tl(t)?(o=ek(e,t,n,i),bi(o,{synthetic:!0}),o):(o=mf(e,t,n,r),qd(o,`${t}`),bi(o,{synthetic:!0}),o)}function mf(e,t,n,r){const i={};if(r&&n){const o=$h(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),bi(i,{synthetic:!0})}if(el(t)){const{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function sk(e,{isUnhandledRejection:t}){const n=wA(e),r=t?"promise rejection":"exception";return Jb(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:tl(e)?`Event \`${ak(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ak(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ck(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const uk=5e3;class Uv extends EC{constructor(t){const n=lk(t),r=Fe.SENTRY_SDK_SOURCE||RM();qC(n,"browser",["browser"],r),super(n);const{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a}=this._options,c=s??a?.enableLogs;Fe.document&&(o||c)&&Fe.document.addEventListener("visibilitychange",()=>{Fe.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&$c(this))}),c&&(this.on("flush",()=>{$c(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{$c(this)},uk)})),i&&(this.on("postprocessEvent",GC),this.on("beforeSendSession",VC))}eventFromException(t,n){return Fv(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Hv(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}}function lk(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Fe.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const zo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Je=We,dk=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",as=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=dk(t.value,n),e(t)))}},fk=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ha=(e=!0)=>{const t=Je.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},cs=()=>ha()?.activationStart??0,us=(e,t=-1)=>{const n=ha();let r="navigate";return n&&(Je.document?.prerendering||cs()>0?r="prerender":Je.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:fk(),navigationType:r}},fd=new WeakMap;function zh(e,t){return fd.get(e)||fd.set(e,new t),fd.get(e)}class bu{constructor(){bu.prototype.__init.call(this),bu.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const ao=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},dl=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let xs=-1;const hk=()=>Je.document?.visibilityState==="hidden"&&!Je.document?.prerendering?0:1/0,vu=e=>{Je.document.visibilityState==="hidden"&&xs>-1&&(xs=e.type==="visibilitychange"?e.timeStamp:0,mk())},pk=()=>{addEventListener("visibilitychange",vu,!0),addEventListener("prerenderingchange",vu,!0)},mk=()=>{removeEventListener("visibilitychange",vu,!0),removeEventListener("prerenderingchange",vu,!0)},fl=()=>{if(Je.document&&xs<0){const e=cs();xs=(Je.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??hk(),pk()}return{get firstHiddenTime(){return xs}}},pa=e=>{Je.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},gk=[1800,3e3],yk=(e,t={})=>{pa(()=>{const n=fl(),r=us("FCP");let i;const s=ao("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-cs(),0),r.entries.push(c),i(!0)))});s&&(i=as(e,r,gk,t.reportAllChanges))})},_k=[.1,.25],bk=(e,t={})=>{yk(dl(()=>{const n=us("CLS",0);let r;const i=zh(t,bu),o=a=>{for(const c of a)i._processEntry(c);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},s=ao("layout-shift",o);s&&(r=as(e,n,_k,t.reportAllChanges),Je.document?.addEventListener("visibilitychange",()=>{Je.document?.visibilityState==="hidden"&&(o(s.takeRecords()),r(!0))}),Je?.setTimeout?.(r))}))},hl=e=>{const t=n=>{(n.type==="pagehide"||Je.document?.visibilityState==="hidden")&&e(n)};Je.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},vk=[100,300],Ek=(e,t={})=>{pa(()=>{const n=fl(),r=us("FID");let i;const o=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),i(!0))},s=c=>{c.forEach(o)},a=ao("first-input",s);i=as(e,r,vk,t.reportAllChanges),a&&hl(dl(()=>{s(a.takeRecords()),a.disconnect()}))})};let jv=0,hd=1/0,bc=0;const Sk=e=>{e.forEach(t=>{t.interactionId&&(hd=Math.min(hd,t.interactionId),bc=Math.max(bc,t.interactionId),jv=bc?(bc-hd)/7+1:0)})};let gf;const $v=()=>gf?jv:performance.interactionCount||0,wk=()=>{"interactionCount"in performance||gf||(gf=ao("event",Sk,{type:"event",buffered:!0,durationThreshold:0}))},pd=10;let Wv=0;const Tk=()=>$v()-Wv;class Eu{constructor(){Eu.prototype.__init.call(this),Eu.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Wv=$v(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(Tk()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<pd||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,o)=>o._latency-i._latency),this._longestInteractionList.length>pd){const i=this._longestInteractionList.splice(pd);for(const o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}}const zv=e=>{const t=Je.requestIdleCallback||Je.setTimeout;Je.document?.visibilityState==="hidden"?e():(e=dl(e),t(e),hl(e))},Ik=[200,500],Ak=40,Ok=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&pa(()=>{wk();const n=us("INP");let r;const i=zh(t,Eu),o=a=>{zv(()=>{for(const u of a)i._processEntry(u);const c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},s=ao("event",o,{durationThreshold:t.durationThreshold??Ak});r=as(e,n,Ik,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),hl(()=>{o(s.takeRecords()),r(!0)}))})};class Ck{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const Rk=[2500,4e3],Mk=(e,t={})=>{pa(()=>{const n=fl(),r=us("LCP");let i;const o=zh(t,Ck),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-cs(),0),r.entries=[u],i())},a=ao("largest-contentful-paint",s);if(a){i=as(e,r,Rk,t.reportAllChanges);const c=dl(()=>{s(a.takeRecords()),a.disconnect(),i(!0)});for(const u of["keydown","click","visibilitychange"])Je.document&&addEventListener(u,()=>zv(c),{capture:!0,once:!0})}})},Nk=[800,1800],yf=e=>{Je.document?.prerendering?pa(()=>yf(e)):Je.document?.readyState!=="complete"?addEventListener("load",()=>yf(e),!0):setTimeout(e)},kk=(e,t={})=>{const n=us("TTFB"),r=as(e,n,Nk,t.reportAllChanges);yf(()=>{const i=ha();i&&(n.value=Math.max(i.responseStart-cs(),0),n.entries=[i],r(!0))})},Ls={},Su={};let Gv,Vv,qv,Yv,Xv;function Gh(e,t=!1){return ma("cls",e,xk,Gv,t)}function Vh(e,t=!1){return ma("lcp",e,Dk,qv,t)}function Kv(e){return ma("fid",e,Lk,Vv)}function Pk(e){return ma("ttfb",e,Bk,Yv)}function Jv(e){return ma("inp",e,Fk,Xv)}function Ki(e,t){return Zv(e,t),Su[e]||(Hk(e),Su[e]=!0),Qv(e,t)}function ls(e,t){const n=Ls[e];if(n?.length)for(const r of n)try{r(t)}catch(i){zo&&Y.error(`Error while triggering instrumentation handler.
504
504
  Type: ${e}
505
505
  Name: ${zr(r)}
506
- Error:`,i)}}function kk(){return yk(e=>{ls("cls",{metric:e}),Wv=e},{reportAllChanges:!0})}function Pk(){return bk(e=>{ls("fid",{metric:e}),zv=e})}function xk(){return Ck(e=>{ls("lcp",{metric:e}),Gv=e},{reportAllChanges:!0})}function Lk(){return Mk(e=>{ls("ttfb",{metric:e}),Vv=e})}function Dk(){return Ik(e=>{ls("inp",{metric:e}),qv=e})}function ma(e,t,n,r,i=!1){Kv(e,t);let o;return Su[e]||(o=n(),Su[e]=!0),r&&t({metric:r}),Jv(e,t,i?o:void 0)}function Bk(e){const t={};e==="event"&&(t.durationThreshold=0),ao(e,n=>{ls(e,{entries:n})},t)}function Kv(e,t){Ls[e]=Ls[e]||[],Ls[e].push(t)}function Jv(e,t,n){return()=>{n&&n();const r=Ls[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Fk(e){return"duration"in e}function md(e){return typeof e=="number"&&isFinite(e)}function Jr(e,t,n,{...r}){const i=Qe(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),aa(e,()=>{const o=oo({startTime:t,...r});return o&&o.end(n),o})}function Gh(e){const t=Re();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),h=t.getIntegrationByName("Replay")?.getReplayId(),d=tt(),m=d.getUser(),g=m!==void 0?m.email||m.id||m.ip_address:void 0;let E;try{E=d.getScopeData().contexts.profile.profile_id}catch{}const T={release:s,environment:a,user:g||void 0,profile_id:E||void 0,replay_id:h||void 0,transaction:r,"user_agent.original":Je.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i};return oo({name:n,attributes:T,startTime:o,experimental:{standalone:!0}})}function pl(){return Je.addEventListener&&Je.performance}function Pt(e){return e/1e3}function Zv(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Qv(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function eE(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n),r=!0}hl(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),o?.(),s?.())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s?.()})}function Hk(e){let t=0,n;if(!Qv("layout-shift"))return;const r=Wh(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);eE(e,(i,o)=>{Uk(t,n,o,i),r()})}function Uk(e,t,n,r){zo&&Y.log(`Sending CLS span (${e})`);const i=Pt((mn()||0)+(t?.startTime||0)),o=tt().getScopeData().transactionName,s=t?Xn(t.sources[0]?.node):"Layout shift",a={[Ft]:"auto.http.browser.cls",[jn]:"ui.webvital.cls",[os]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,h)=>{a[`cls.source.${h+1}`]=Xn(u.node)});const c=Gh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("cls",{[oa]:"",[sa]:e}),c.end(i))}function jk(e){let t=0,n;if(!Qv("largest-contentful-paint"))return;const r=zh(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);eE(e,(i,o)=>{$k(t,n,o,i),r()})}function $k(e,t,n,r){zo&&Y.log(`Sending LCP span (${e})`);const i=Pt((mn()||0)+(t?.startTime||0)),o=tt().getScopeData().transactionName,s=t?Xn(t.element):"Largest contentful paint",a={[Ft]:"auto.http.browser.lcp",[jn]:"ui.webvital.lcp",[os]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Xn(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Gh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[oa]:"millisecond",[sa]:e}),c.end(i))}const Wk=2147483647;let gg=0,un={},Cn,wu;function zk({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=pl();if(r&&mn()){r.mark&&Je.performance.mark("sentry-tracing-init");const i=Kk(),o=t?jk(n):Xk(),s=Jk(),a=e?Hk(n):Yk();return()=>{i(),o?.(),s(),a?.()}}return()=>{}}function Gk(){Ki("longtask",({entries:e})=>{const t=en();if(!t)return;const{op:n,start_timestamp:r}=Qe(t);for(const i of e){const o=Pt(mn()+i.startTime),s=Pt(i.duration);n==="navigation"&&r&&o<r||Jr(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Ft]:"auto.ui.browser.metrics"}})}})}function Vk(){new PerformanceObserver(t=>{const n=en();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Pt(mn()+r.startTime),{start_timestamp:o,op:s}=Qe(n);if(s==="navigation"&&o&&i<o)continue;const a=Pt(r.duration),c={[Ft]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:h,invokerType:d,sourceURL:m,sourceFunctionName:g,sourceCharPosition:E}=u;c["browser.script.invoker"]=h,c["browser.script.invoker_type"]=d,m&&(c["code.filepath"]=m),g&&(c["code.function"]=g),E!==-1&&(c["browser.script.source_char_position"]=E),Jr(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function qk(){Ki("event",({entries:e})=>{const t=en();if(t){for(const n of e)if(n.name==="click"){const r=Pt(mn()+n.startTime),i=Pt(n.duration),o={name:Xn(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Ft]:"auto.ui.browser.metrics"}},s=Zb(n.target);s&&(o.attributes["ui.component_name"]=s),Jr(t,r,r+i,o)}}})}function Yk(){return Wh(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(un.cls={value:e.value,unit:""},wu=t)},!0)}function Xk(){return zh(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(un.lcp={value:e.value,unit:"millisecond"},Cn=t)},!0)}function Kk(){return Yv(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Pt(mn()),r=Pt(t.startTime);un.fid={value:e.value,unit:"millisecond"},un["mark.fid"]={value:n+r,unit:"second"}})}function Jk(){return Nk(({metric:e})=>{e.entries[e.entries.length-1]&&(un.ttfb={value:e.value,unit:"millisecond"})})}function Zk(e,t){const n=pl(),r=mn();if(!n?.getEntries||!r)return;const i=Pt(r),o=n.getEntries(),{op:s,start_timestamp:a}=Qe(e);if(o.slice(gg).forEach(c=>{const u=Pt(c.startTime),h=Pt(Math.max(0,c.duration));if(!(s==="navigation"&&a&&i+u<a))switch(c.entryType){case"navigation":{tP(e,c,i);break}case"mark":case"paint":case"measure":{Qk(e,c,u,h,i,t.ignorePerformanceApiSpans);const d=fl(),m=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&m&&(un.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&m&&(un.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{iP(e,c,c.name,u,h,i,t.ignoreResourceSpans);break}}}),gg=Math.max(o.length-1,0),oP(e),s==="pageload"){aP(un);const c=un["mark.fid"];c&&un.fid&&(Jr(e,c.value,c.value+Pt(un.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Ft]:"auto.ui.browser.metrics"}}),delete un["mark.fid"]),t.recordClsOnPageloadSpan||delete un.cls,t.recordLcpOnPageloadSpan||delete un.lcp,Object.entries(un).forEach(([u,h])=>{O0(u,h.value,h.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",cs()),sP(e,t)}Cn=void 0,wu=void 0,un={}}function Qk(e,t,n,r,i,o){if(["mark","measure"].includes(t.entryType)&&ar(t.name,o))return;const s=ha(!1),a=Pt(s?s.requestStart:0),c=i+Math.max(n,a),u=i+n,h=u+r,d={[Ft]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),eP(d,t),c<=h&&Jr(e,c,h,{name:t.name,op:t.entryType,attributes:d})}function eP(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&xo(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(xo(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function tP(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{vc(e,t,r,n)}),vc(e,t,"secureConnection",n,"TLS/SSL"),vc(e,t,"fetch",n,"cache"),vc(e,t,"domainLookup",n,"DNS"),rP(e,t,n)}function vc(e,t,n,r,i=n){const o=nP(n),s=t[o],a=t[`${n}Start`];!a||!s||Jr(e,r+Pt(a),r+Pt(s),{op:`browser.${i}`,name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function nP(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function rP(e,t,n){const r=n+Pt(t.requestStart),i=n+Pt(t.responseEnd),o=n+Pt(t.responseStart);t.responseEnd&&(Jr(e,r,i,{op:"browser.request",name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}),Jr(e,o,i,{op:"browser.response",name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}))}function iP(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const c=zi(n),u={[Ft]:"auto.resource.browser.metrics"};gd(u,t,"transferSize","http.response_transfer_size"),gd(u,t,"encodedBodySize","http.response_content_length"),gd(u,t,"decodedBodySize","http.decoded_response_content_length");const h=t.deliveryType;h!=null&&(u["http.response_delivery_type"]=h);const d=t.renderBlockingStatus;if(d&&(u["resource.render_blocking_status"]=d),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(Je.location.origin),t.nextHopProtocol!=null){const{name:E,version:T}=Zv(t.nextHopProtocol);u["network.protocol.name"]=E,u["network.protocol.version"]=T}const m=o+r,g=m+i;Jr(e,m,g,{name:n.replace(Je.location.origin,""),op:a,attributes:u})}function oP(e){const t=Je.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),md(n.rtt)&&(un["connection.rtt"]={value:n.rtt,unit:"millisecond"})),md(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),md(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function sP(e,t){Cn&&t.recordLcpOnPageloadSpan&&(Cn.element&&e.setAttribute("lcp.element",Xn(Cn.element)),Cn.id&&e.setAttribute("lcp.id",Cn.id),Cn.url&&e.setAttribute("lcp.url",Cn.url.trim().slice(0,200)),Cn.loadTime!=null&&e.setAttribute("lcp.loadTime",Cn.loadTime),Cn.renderTime!=null&&e.setAttribute("lcp.renderTime",Cn.renderTime),e.setAttribute("lcp.size",Cn.size)),wu?.sources&&t.recordClsOnPageloadSpan&&wu.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Xn(n.node)))}function gd(e,t,n,r){const i=t[n];i!=null&&i<Wk&&(e[r]=i)}function aP(e){const t=ha(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function cP(){return pl()&&mn()?Ki("element",uP):()=>{}}const uP=({entries:e})=>{const t=en(),n=t?Zt(t):void 0,r=n?Qe(n).description:tt().getScopeData().transactionName;e.forEach(i=>{const o=i;if(!o.identifier)return;const s=o.name,a=o.renderTime,c=o.loadTime,[u,h]=c?[Pt(c),"load-time"]:a?[Pt(a),"render-time"]:[Yt(),"entry-emission"],d=s==="image-paint"?Pt(Math.max(0,(a??0)-(c??0))):0,m={[Ft]:"auto.ui.browser.elementtiming",[jn]:"ui.elementtiming",[Hn]:"component","sentry.span_start_time_source":h,"sentry.transaction_name":r,"element.id":o.id,"element.type":o.element?.tagName?.toLowerCase()||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":s};sl({name:`element[${o.identifier}]`,attributes:m,startTime:u,onlyIfParent:!0},g=>{g.end(u+d)})})},lP=1e3;let yg,gf,yf;function tE(e){const t="dom";Ii(t,e),Ai(t,dP)}function dP(){if(!Je.document)return;const e=qn.bind(null,"dom"),t=_g(e,!0);Je.document.addEventListener("click",t,!1),Je.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Je[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(wn(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},h=u[s]=u[s]||{refCount:0};if(!h.handler){const d=_g(e);h.handler=d,o.call(this,s,d,c)}h.refCount++}catch{}return o.call(this,s,a,c)}}),wn(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},h=u[s];h&&(h.refCount--,h.refCount<=0&&(o.call(this,s,h.handler,c),h.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function fP(e){if(e.type!==gf)return!1;try{if(!e.target||e.target._sentryId!==yf)return!1}catch{}return!0}function hP(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function _g(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=pP(n);if(hP(n.type,r))return;Nn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Nn(r,"_sentryId",Tn());const i=n.type==="keypress"?"input":n.type;fP(n)||(e({event:n,name:i,global:t}),gf=n.type,yf=r?r._sentryId:void 0),clearTimeout(yg),yg=Je.setTimeout(()=>{yf=void 0,gf=void 0},lP)}}function pP(e){try{return e.target}catch{return null}}let Ec;function ml(e){const t="history";Ii(t,e),Ai(t,mP)}function mP(){if(Je.addEventListener("popstate",()=>{const t=Je.location.href,n=Ec;if(Ec=t,n===t)return;qn("history",{from:n,to:t})}),!_M())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Ec,o=gP(String(r));if(Ec=o,i===o)return t.apply(this,n);qn("history",{from:i,to:o})}return t.apply(this,n)}}wn(Je.history,"pushState",e),wn(Je.history,"replaceState",e)}function gP(e){try{return new URL(e,Je.location.origin).toString()}catch{return e}}const Yc={};function Vh(e){const t=Yc[e];if(t)return t;let n=Je[e];if(of(n))return Yc[e]=n.bind(Je);const r=Je.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){zo&&Y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Yc[e]=n.bind(Je))}function bg(e){Yc[e]=void 0}function ga(...e){return Vh("setTimeout")(...e)}const Fr="__sentry_xhr_v3__";function qh(e){const t="xhr";Ii(t,e),Ai(t,yP)}function yP(){if(!Je.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=Yt()*1e3,s=sr(r[0])?r[0].toUpperCase():void 0,a=_P(r[1]);if(!s||!a)return t.apply(n,r);n[Fr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Fr];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const h={endTimestamp:Yt()*1e3,startTimestamp:o,xhr:n,virtualError:i};qn("xhr",h)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,h,d){return c(),u.apply(h,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,h,d){const[m,g]=d,E=h[Fr];return E&&sr(m)&&sr(g)&&(E.request_headers[m.toLowerCase()]=g),u.apply(h,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Fr];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:Yt()*1e3,xhr:n};return qn("xhr",o),t.apply(n,r)}})}function _P(e){if(sr(e))return e;try{return e.toString()}catch{}}function nE(e){return new URLSearchParams(e).toString()}function Tu(e,t=Y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[nE(e)];if(!e)return[void 0]}catch(n){return zo&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return zo&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Yh(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const yd=[],Xc=new Map,bP=60;function vP(){if(pl()&&mn()){const t=EP();return()=>{t()}}return()=>{}}const vg={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function EP(){return Xv(SP)}const SP=({metric:e})=>{if(e.value==null)return;const t=Pt(e.value);if(t>bP)return;const n=e.entries.find(E=>E.duration===e.value&&vg[E.name]);if(!n)return;const{interactionId:r}=n,i=vg[n.name],o=Pt(mn()+n.startTime),s=en(),a=s?Zt(s):void 0,u=(r!=null?Xc.get(r):void 0)||a,h=u?Qe(u).description:tt().getScopeData().transactionName,d=Xn(n.target),m={[Ft]:"auto.http.browser.inp",[jn]:`ui.interaction.${i}`,[os]:n.duration},g=Gh({name:d,transaction:h,attributes:m,startTime:o});g&&(g.addEvent("inp",{[oa]:"millisecond",[sa]:e.value}),g.end(o+t))};function wP(){const e=({entries:t})=>{const n=en(),r=n&&Zt(n);t.forEach(i=>{if(!Fk(i)||!r)return;const o=i.interactionId;if(o!=null&&!Xc.has(o)){if(yd.length>10){const s=yd.shift();Xc.delete(s)}yd.push(o),Xc.set(o,r)}})};Ki("event",e),Ki("first-input",e)}function Xh(e,t=Vh("fetch")){let n=0,r=0;function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return bg("fetch"),pu("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return bg("fetch"),n-=s,r--,pu(c)}}return J0(e,i)}const TP=10,IP=20,AP=30,OP=40,CP=50;function Go(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?Ir:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const RP=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,MP=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,NP=/\((\S*)(?::(\d+))(?::(\d+))\)/,kP=e=>{const t=RP.exec(e);if(t){const[,r,i,o]=t;return Go(r,Ir,+i,+o)}const n=MP.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=NP.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[i,o]=aE(n[1]||Ir,n[2]);return Go(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},rE=[AP,kP],PP=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xP=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,LP=e=>{const t=PP.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=xP.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||Ir;return[i,r]=aE(i,r),Go(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},iE=[CP,LP],DP=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,BP=e=>{const t=DP.exec(e);return t?Go(t[2],t[1]||Ir,+t[3],t[4]?+t[4]:void 0):void 0},FP=[OP,BP],HP=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,UP=e=>{const t=HP.exec(e);return t?Go(t[2],t[3]||Ir,+t[1]):void 0},jP=[TP,UP],$P=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,WP=e=>{const t=$P.exec(e);return t?Go(t[5],t[3]||t[4]||Ir,+t[1],+t[2]):void 0},zP=[IP,WP],oE=[rE,iE],sE=Gb(...oE),aE=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ir,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function GP(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:io(r)}},o=VP(e);return Qr(i,[o])}function VP(e){return[{type:"user_report"},e]}const st=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Sc=1024,qP="Breadcrumbs",YP=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:qP,setup(n){t.console&&Nh(JP(n)),t.dom&&tE(KP(n,t.dom)),t.xhr&&qh(ZP(n)),t.fetch&&Ph(QP(n)),t.history&&ml(e2(n)),t.sentry&&n.on("beforeSendEvent",XP(n))}}},cE=YP;function XP(e){return function(n){Re()===e&&Ar({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Li(n)},{event:n})}}function KP(e,t){return function(r){if(Re()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Sc&&(st&&Y.warn(`\`dom.maxStringLength\` cannot exceed ${Sc}, but a value of ${a} was configured. Sentry will use ${Sc} instead.`),a=Sc),typeof s=="string"&&(s=[s]);try{const u=r.event,h=t2(u)?u.target:u;i=Xn(h,{keyAttrs:s,maxStringLength:a}),o=Zb(h)}catch{i="<unknown>"}if(i.length===0)return;const c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),Ar(c,{event:r.event,name:r.name,global:r.global})}}function JP(e){return function(n){if(Re()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:kh(n.level),message:cu(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${cu(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ar(r,{input:n.args,level:n.level})}}function ZP(e){return function(n){if(Re()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Fr];if(!r||!i||!o)return;const{method:s,url:a,status_code:c,body:u}=o,h={method:s,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},m={category:"xhr",data:h,type:"http",level:gv(c)};e.emit("beforeOutgoingRequestBreadcrumb",m,d),Ar(m,d)}}function QP(e){return function(n){if(Re()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Ar(a,s)}else{const o=n.response,s={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:s,type:"http",level:gv(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Ar(c,a)}}}function e2(e){return function(n){if(Re()!==e)return;let r=n.from,i=n.to;const o=zi(Fe.location.href);let s=r?zi(r):void 0;const a=zi(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Ar({category:"navigation",data:{from:r,to:i}})}}function t2(e){return!!e&&!!e.target}const n2=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],r2="BrowserApiErrors",i2=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:r2,setupOnce(){t.setTimeout&&wn(Fe,"setTimeout",Eg),t.setInterval&&wn(Fe,"setInterval",Eg),t.requestAnimationFrame&&wn(Fe,"requestAnimationFrame",o2),t.XMLHttpRequest&&"XMLHttpRequest"in Fe&&wn(XMLHttpRequest.prototype,"send",s2);const n=t.eventTarget;n&&(Array.isArray(n)?n:n2).forEach(i=>a2(i,t))}}},uE=i2;function Eg(e){return function(...t){const n=t[0];return t[0]=Wo(n,{mechanism:{data:{function:zr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function o2(e){return function(t){return e.apply(this,[Wo(t,{mechanism:{data:{function:"requestAnimationFrame",handler:zr(e)},handled:!1,type:"instrument"}})])}}function s2(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&wn(n,i,function(o){const s={mechanism:{data:{function:i,handler:zr(o)},handled:!1,type:"instrument"}},a=_h(o);return a&&(s.mechanism.data.handler=zr(a)),Wo(o,s)})}),e.apply(this,t)}}function a2(e,t){const r=Fe[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(wn(r,"addEventListener",function(i){return function(o,s,a){try{c2(s)&&(s.handleEvent=Wo(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:zr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&u2(this,o,s),i.apply(this,[o,Wo(s,{mechanism:{data:{function:"addEventListener",handler:zr(s),target:e},handled:!1,type:"instrument"}}),a])}}),wn(r,"removeEventListener",function(i){return function(o,s,a){try{const c=s.__sentry_wrapped__;c&&i.call(this,o,c,a)}catch{}return i.call(this,o,s,a)}}))}function c2(e){return typeof e.handleEvent=="function"}function u2(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const lE=()=>({name:"BrowserSession",setupOnce(){if(typeof Fe.document>"u"){st&&Y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Zd({ignoreDuration:!0}),Qd(),ml(({from:e,to:t})=>{e!==void 0&&e!==t&&(Zd({ignoreDuration:!0}),Qd())})}}),l2="GlobalHandlers",d2=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:l2,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(f2(n),Sg("onerror")),t.onunhandledrejection&&(h2(n),Sg("onunhandledrejection"))}}},dE=d2;function f2(e){Vb(t=>{const{stackParser:n,attachStacktrace:r}=fE();if(Re()!==e||Pv())return;const{msg:i,url:o,line:s,column:a,error:c}=t,u=g2(jh(n,c||i,void 0,r,!1),o,s,a);u.level="error",ua(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function h2(e){qb(t=>{const{stackParser:n,attachStacktrace:r}=fE();if(Re()!==e||Pv())return;const i=p2(t),o=xo(i)?m2(i):jh(n,i,void 0,r,!0);o.level="error",ua(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function p2(e){if(xo(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function m2(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function g2(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,h=n,d=sr(t)&&t.length>0?t:to();return c.length===0&&c.push({colno:u,filename:d,function:Ir,in_app:!0,lineno:h}),e}function Sg(e){st&&Y.log(`Global Handler attached: ${e}`)}function fE(){return Re()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const hE=()=>({name:"HttpContext",preprocessEvent(e){if(!Fe.navigator&&!Fe.location&&!Fe.document)return;const t=Hh(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),y2="cause",_2=5,b2="LinkedErrors",v2=(e={})=>{const t=e.limit||_2,n=e.key||y2;return{name:b2,preprocessEvent(r,i,o){const s=o.getOptions();sR(ll,s.stackParser,n,t,r,i)}}},pE=v2;function E2(){return S2()?(st&&Ti(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function S2(){if(typeof Fe.window>"u")return!1;const e=Fe;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=to(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Fe===Fe.top&&r.some(o=>n.startsWith(`${o}://`)))}function mE(e){return[rv(),tv(),uE(),cE(),dE(),pE(),av(),hE(),lE()]}function w2(e={}){const t=!e.skipBrowserExtensionCheck&&E2(),n={...e,enabled:t?!1:e.enabled,stackParser:lA(e.stackParser||sE),integrations:pC({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?mE():e.defaultIntegrations}),transport:e.transport||Xh};return MC(Fv,n)}function T2(){}function I2(e){e()}function A2(e={}){const t=Fe.document,n=t?.head||t?.body;if(!n){st&&Y.error("[showReportDialog] Global document not defined");return}const r=tt(),o=Re()?.getDsn();if(!o){st&&Y.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||x0()},a=Fe.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=fC(o,s);const{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){const h=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{Fe.removeEventListener("message",h)}};Fe.addEventListener("message",h)}n.appendChild(a)}const O2=We,C2="ReportingObserver",wg=new WeakMap,R2=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(wg.has(Re()))for(const i of r)Jn(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const c={};for(const u in i.body)c[u]=i.body[u];if(o.setExtra("body",c),i.type==="crash"){const u=i.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=i.body.message||a}gu(`${s}: ${a}`)})}return{name:C2,setupOnce(){if(!vM())return;new O2.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){wg.set(r,!0)}}},M2=R2,N2="HttpClient",k2=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:N2,setup(n){j2(n,t),$2(n,t)}}},P2=k2;function x2(e,t,n,r,i){if(yE(e,n.status,n.url)){const o=W2(t,r);let s,a,c,u;bE()&&([s,c]=Tg("Cookie",o),[a,u]=Tg("Set-Cookie",n));const h=_E({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:i});ua(h)}}function Tg(e,t){const n=B2(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=gE(i))}catch{}return[n,r]}function L2(e,t,n,r,i){if(yE(e,t.status,t.responseURL)){let o,s,a;if(bE()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=gE(u))}catch{}try{a=F2(t)}catch{}o=r}const c=_E({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i});ua(c)}}function D2(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function gE(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function B2(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function F2(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
507
- `).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function H2(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function U2(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function j2(e,t){yv()&&Ph(n=>{if(Re()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,c]=i;r&&x2(t,a,r,c,o||s)},!1)}function $2(e,t){"XMLHttpRequest"in We&&qh(n=>{if(Re()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[Fr];if(!s)return;const{method:a,request_headers:c}=s;try{L2(t,o,a,c,r||i)}catch(u){st&&Y.warn("Error while extracting response event form XHR response",u)}})}function yE(e,t,n){return U2(e.failedRequestStatusCodes,t)&&H2(e.failedRequestTargets,n)&&!Q0(n,Re())}function _E(e){const t=Re(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:D2(e.responseHeaders)}}};return bi(o,{type:"http.client",handled:!1}),o}function W2(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function bE(){const e=Re();return e?!!e.getOptions().sendDefaultPii:!1}const _d=We,z2=7,G2="ContextLines",V2=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:z2;return{name:G2,processEvent(n){return Y2(n,t)}}},q2=V2;function Y2(e,t){const n=_d.document,r=_d.location&&pv(_d.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const s=["<!DOCTYPE html>","<html>",...o.split(`
508
- `),"</html>"];return i.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>X2(u,s,r,t)))}),e}function X2(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||wA(t,e,r),e}const K2="GraphQLClient",J2=e=>({name:K2,setup(t){Z2(t,e),Q2(t,e)}});function Z2(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=Qe(n).data||{};if(!(o[jn]==="http.client"))return;const c=o[HA]||o["http.url"],u=o[FA]||o["http.method"];if(!sr(c)||!sr(u))return;const{endpoints:h}=t,d=ar(c,h),m=EE(r);if(d&&m){const g=SE(m);if(g){const E=vE(g);n.updateName(`${u} ${c} (${E})`),n.setAttribute("graphql.document",m)}}})}function Q2(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const h=s?.url,{endpoints:d}=t,m=ar(h,d),g=EE(r);if(m&&s&&g){const E=SE(g);if(!s.graphql&&E){const T=vE(E);s["graphql.document"]=E.query,s["graphql.operation"]=T}}}})}function vE(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=ex(t);return r?`${i} ${r}`:`${i}`}function EE(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Fr];n=r&&Tu(r.body)[0]}else{const r=Yh(e.input);n=Tu(r)[0]}return n}function ex(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function SE(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const tx=J2,Nt=We,Kh="sentryReplaySession",nx="replay_event",Jh="Unable to send Replay",rx=3e5,ix=9e5,ox=5e3,sx=5500,ax=6e4,cx=5e3,ux=3,Ig=15e4,wc=5e3,lx=3e3,dx=300,Zh=2e7,fx=4999,hx=15e3,Ag=36e5;var px=Object.defineProperty,mx=(e,t,n)=>t in e?px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Og=(e,t,n)=>mx(e,typeof t!="symbol"?t+"":t,n),Jt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Jt||{});function gx(e){return e.nodeType===e.ELEMENT_NODE}function Ds(e){return e?.host?.shadowRoot===e}function Bs(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function yx(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function _x(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Iu(e){try{const t=e.rules||e.cssRules;return t?yx(Array.from(t,wE).join("")):null}catch{return null}}function bx(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function wE(e){let t;if(Ex(e))try{t=Iu(e.styleSheet)||_x(e)}catch{}else if(Sx(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=bx(e)),r&&(n=vx(n)),r||i)return n}return t||e.cssText}function vx(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Ex(e){return"styleSheet"in e}function Sx(e){return"selectorText"in e}let TE=class{constructor(){Og(this,"idNodeMap",new Map),Og(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wx(){return new TE}function gl({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ws({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Vo(e){return e.toLowerCase()}function _f(e){return e.toUpperCase()}const Cg="__rrweb_original__";function Tx(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=Cg in o?o[Cg]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function Qh(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Vo(t):null}function Au(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function IE(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Rg={};function AE(e){const t=Rg[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Rg[e]=r.bind(window)}function bf(...e){return AE("setTimeout")(...e)}function OE(...e){return AE("clearTimeout")(...e)}function CE(e){try{return e.contentDocument}catch{}}let Ix=1;const Ax=new RegExp("[^a-z0-9-_:]"),zs=-2;function ep(){return Ix++}function Ox(e){if(e instanceof HTMLFormElement)return"form";const t=Vo(e.tagName);return Ax.test(t)?"div":t}function Cx(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let _o,Mg;const Rx=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Mx=/^(?:[a-z+]+:)?\/\//i,Nx=/^www\..*/i,kx=/^(data:)([^,]*),(.*)/i;function Ou(e,t){return(e||"").replace(Rx,(n,r,i,o,s,a)=>{const c=i||s||a,u=r||o||"";if(!c)return n;if(Mx.test(c)||Nx.test(c))return`url(${u}${c}${u})`;if(kx.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Cx(t)+c}${u})`;const h=t.split("/"),d=c.split("/");h.pop();for(const m of d)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${u}${h.join("/")}${u})`})}const Px=/^[^ \t\n\r\u000c]+/,xx=/^[, \t\n\r\u000c]+/;function Lx(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(xx),!(n>=t.length);){let o=r(Px);if(o.slice(-1)===",")o=Oo(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Oo(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}const Ng=new WeakMap;function Oo(e,t){return!t||t.trim()===""?t:yl(e,t)}function Dx(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function yl(e,t){let n=Ng.get(e);if(n||(n=e.createElement("a"),Ng.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function RE(e,t,n,r,i,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Oo(e,r):n==="srcset"?Lx(e,r):n==="style"?Ou(r,yl(e)):t==="object"&&n==="data"?Oo(e,r):typeof o=="function"?o(n,r,i):r)}function ME(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Bx(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Fx(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ui(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ui(e.parentNode,t,n,r+1)}function Co(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Fx(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function qo(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=Ui(s,Co(r,i)),c<0)return!0;a=Ui(s,Co(t,n),c>=0?c:1/0)}else{if(a=Ui(s,Co(t,n)),a<0)return!1;c=Ui(s,Co(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function Hx(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=bf(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{OE(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Ux(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=bf(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{OE(o),r=!0,t()})}function jx(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:E={},maskTextFn:T,maskInputFn:L,dataURLOptions:H={},inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:J=!1}=t,D=$x(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Jt.Document,childNodes:[],compatMode:e.compatMode}:{type:Jt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Jt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:D};case e.ELEMENT_NODE:return zx(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:g,maskAttributeFn:c,maskInputOptions:E,maskInputFn:L,dataURLOptions:H,inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:J,rootId:D,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m});case e.TEXT_NODE:return Wx(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,maskTextFn:T,maskInputOptions:E,maskInputFn:L,rootId:D});case e.CDATA_SECTION_NODE:return{type:Jt.CDATA,textContent:"",rootId:D};case e.COMMENT_NODE:return{type:Jt.Comment,textContent:e.textContent||"",rootId:D};default:return!1}}function $x(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Wx(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:h}=t,d=e.parentNode&&e.parentNode.tagName;let m=e.textContent;const g=d==="STYLE"?!0:void 0,E=d==="SCRIPT"?!0:void 0,T=d==="TEXTAREA"?!0:void 0;if(g&&m){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(m=Iu(e.parentNode.sheet))}catch(H){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${H}`,e)}m=Ou(m,yl(t.doc))}E&&(m="SCRIPT_PLACEHOLDER");const L=qo(e,r,o,i,s,n);if(!g&&!E&&!T&&m&&L&&(m=a?a(m,e.parentElement):m.replace(/[\S]/g,"*")),T&&m&&(c.textarea||L)&&(m=u?u(m,e.parentNode):m.replace(/[\S]/g,"*")),d==="OPTION"&&m){const H=gl({type:null,tagName:d,maskInputOptions:c});m=Ws({isMasked:qo(e,r,o,i,s,H),element:e,value:m,maskInputFn:u})}return{type:Jt.Text,textContent:m||"",isStyle:g,rootId:h}}function zx(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:E=!1,rootId:T,maskTextClass:L,unmaskTextClass:H,maskTextSelector:K,unmaskTextSelector:V}=t,F=Bx(e,r,i,o),J=Ox(e);let D={};const W=e.attributes.length;for(let P=0;P<W;P++){const $=e.attributes[P];$.name&&!ME(J,$.name,$.value)&&(D[$.name]=RE(n,J,Vo($.name),$.value,e,c))}if(J==="link"&&s){const P=Array.from(n.styleSheets).find(G=>G.href===e.href);let $=null;P&&($=Iu(P)),$&&(D.rel=null,D.href=null,D.crossorigin=null,D._cssText=Ou($,P.href))}if(J==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const P=Iu(e.sheet);P&&(D._cssText=Ou(P,yl(n)))}if(J==="input"||J==="textarea"||J==="select"||J==="option"){const P=e,$=Qh(P),G=Au(P,_f(J),$),q=P.checked;if($!=="submit"&&$!=="button"&&G){const ie=qo(P,L,K,H,V,gl({type:$,tagName:_f(J),maskInputOptions:a}));D.value=Ws({isMasked:ie,element:P,value:G,maskInputFn:u})}q&&(D.checked=q)}if(J==="option"&&(e.selected&&!a.select?D.selected=!0:delete D.selected),J==="canvas"&&m){if(e.__context==="2d")Tx(e)||(D.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){const P=e.toDataURL(h.type,h.quality),$=n.createElement("canvas");$.width=e.width,$.height=e.height;const G=$.toDataURL(h.type,h.quality);P!==G&&(D.rr_dataURL=P)}}if(J==="img"&&d){_o||(_o=n.createElement("canvas"),Mg=_o.getContext("2d"));const P=e,$=P.currentSrc||P.getAttribute("src")||"<unknown-src>",G=P.crossOrigin,q=()=>{P.removeEventListener("load",q);try{_o.width=P.naturalWidth,_o.height=P.naturalHeight,Mg.drawImage(P,0,0),D.rr_dataURL=_o.toDataURL(h.type,h.quality)}catch(ie){if(P.crossOrigin!=="anonymous"){P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0?q():P.addEventListener("load",q);return}else console.warn(`Cannot inline img src=${$}! Error: ${ie}`)}P.crossOrigin==="anonymous"&&(G?D.crossOrigin=G:P.removeAttribute("crossorigin"))};P.complete&&P.naturalWidth!==0?q():P.addEventListener("load",q)}if((J==="audio"||J==="video")&&(D.rr_mediaState=e.paused?"paused":"played",D.rr_mediaCurrentTime=e.currentTime),E||(e.scrollLeft&&(D.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(D.rr_scrollTop=e.scrollTop)),F){const{width:P,height:$}=e.getBoundingClientRect();D={class:D.class,rr_width:`${P}px`,rr_height:`${$}px`}}J==="iframe"&&!g(D.src)&&(!F&&!CE(e)&&(D.rr_src=D.src),delete D.src);let ue;try{customElements.get(J)&&(ue=!0)}catch{}return{type:Jt.Element,tagName:J,attributes:D,childNodes:[],isSVG:Dx(e)||void 0,needBlock:F,rootId:T,isCustom:ue}}function Mt(e){return e==null?"":e.toLowerCase()}function Gx(e,t){if(t.comment&&e.type===Jt.Comment)return!0;if(e.type===Jt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&IE(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Mt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Mt(e.attributes.name)==="application-name"||Mt(e.attributes.rel)==="icon"||Mt(e.attributes.rel)==="apple-touch-icon"||Mt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Mt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Mt(e.attributes.property).match(/^(og|twitter|fb):/)||Mt(e.attributes.name).match(/^(og|twitter):/)||Mt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Mt(e.attributes.name)==="robots"||Mt(e.attributes.name)==="googlebot"||Mt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Mt(e.attributes.name)==="author"||Mt(e.attributes.name)==="generator"||Mt(e.attributes.name)==="framework"||Mt(e.attributes.name)==="publisher"||Mt(e.attributes.name)==="progid"||Mt(e.attributes.property).match(/^article:/)||Mt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Mt(e.attributes.name)==="google-site-verification"||Mt(e.attributes.name)==="yandex-verification"||Mt(e.attributes.name)==="csrf-token"||Mt(e.attributes.name)==="p:domain_verify"||Mt(e.attributes.name)==="verify-v1"||Mt(e.attributes.name)==="verification"||Mt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ro(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:E={},maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V={},inlineImages:F=!1,recordCanvas:J=!1,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue=5e3,onBlockedImageLoad:P,onStylesheetLoad:$,stylesheetLoadTimeout:G=5e3,keepIframeSrcFn:q=()=>!1,newlyAddedElement:ie=!1}=t;let{preserveWhiteSpace:fe=!0}=t;const ce=jx(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,dataURLOptions:V,inlineImages:F,recordCanvas:J,keepIframeSrcFn:q,newlyAddedElement:ie});if(!ce)return console.warn(e,"not serialized"),null;let re;r.hasNode(e)?re=r.getId(e):Gx(ce,K)||!fe&&ce.type===Jt.Text&&!ce.isStyle&&!ce.textContent.replace(/^\s+|\s+$/gm,"").length?re=zs:re=ep();const X=Object.assign(ce,{id:re});if(r.add(e,X),re===zs)return null;D&&D(e);let _e=!m;if(X.type===Jt.Element){_e=_e&&!X.needBlock;const ge=e.shadowRoot;ge&&Bs(ge)&&(X.isShadowHost=!0)}if((X.type===Jt.Document||X.type===Jt.Element)&&_e){K.headWhitespace&&X.type===Jt.Element&&X.tagName==="head"&&(fe=!1);const ge={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onBlockedImageLoad:P,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q},he=e.childNodes?Array.from(e.childNodes):[];for(const Se of he){const Xe=Ro(Se,ge);Xe&&X.childNodes.push(Xe)}if(gx(e)&&e.shadowRoot)for(const Se of Array.from(e.shadowRoot.childNodes)){const Xe=Ro(Se,ge);Xe&&(Bs(e.shadowRoot)&&(Xe.isShadow=!0),X.childNodes.push(Xe))}}if(e.parentNode&&Ds(e.parentNode)&&Bs(e.parentNode)&&(X.isShadow=!0),X.type===Jt.Element&&X.tagName==="iframe"&&!X.needBlock&&Hx(e,()=>{const ge=CE(e);if(ge&&W){const he=Ro(ge,{doc:ge,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q});he&&W(e,he)}},ue),X.type===Jt.Element&&X.tagName==="img"&&!e.complete&&X.needBlock){const ge=e,he=()=>{if(ge.isConnected&&!ge.complete&&P)try{const Se=ge.getBoundingClientRect();Se.width>0&&Se.height>0&&P(ge,X,Se)}catch{}ge.removeEventListener("load",he)};ge.isConnected&&ge.addEventListener("load",he)}return X.type===Jt.Element&&X.tagName==="link"&&typeof X.attributes.rel=="string"&&(X.attributes.rel==="stylesheet"||X.attributes.rel==="preload"&&typeof X.attributes.href=="string"&&IE(X.attributes.href)==="css")&&Ux(e,()=>{if($){const ge=Ro(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q});ge&&$(e,ge)}},G),X.type===Jt.Element&&delete X.needBlock,X}function Vx(e,t){const{mirror:n=new TE,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:h=null,inlineStylesheet:d=!0,inlineImages:m=!1,recordCanvas:g=!1,maskAllInputs:E=!1,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOM:K=!1,dataURLOptions:V,preserveWhiteSpace:F,onSerialize:J,onIframeLoad:D,iframeLoadTimeout:W,onBlockedImageLoad:ue,onStylesheetLoad:P,stylesheetLoadTimeout:$,keepIframeSrcFn:G=()=>!1}=t||{};return Ro(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:E===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:E===!1?{}:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K===!0||K==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:K==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:K===!1?{}:K,dataURLOptions:V,inlineImages:m,recordCanvas:g,preserveWhiteSpace:F,onSerialize:J,onIframeLoad:D,iframeLoadTimeout:W,onBlockedImageLoad:ue,onStylesheetLoad:P,stylesheetLoadTimeout:$,keepIframeSrcFn:G,newlyAddedElement:!1})}function Sn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const wo=`Please stop import mirror directly. Instead of that,\r
506
+ Error:`,i)}}function xk(){return bk(e=>{ls("cls",{metric:e}),Gv=e},{reportAllChanges:!0})}function Lk(){return Ek(e=>{ls("fid",{metric:e}),Vv=e})}function Dk(){return Mk(e=>{ls("lcp",{metric:e}),qv=e},{reportAllChanges:!0})}function Bk(){return kk(e=>{ls("ttfb",{metric:e}),Yv=e})}function Fk(){return Ok(e=>{ls("inp",{metric:e}),Xv=e})}function ma(e,t,n,r,i=!1){Zv(e,t);let o;return Su[e]||(o=n(),Su[e]=!0),r&&t({metric:r}),Qv(e,t,i?o:void 0)}function Hk(e){const t={};e==="event"&&(t.durationThreshold=0),ao(e,n=>{ls(e,{entries:n})},t)}function Zv(e,t){Ls[e]=Ls[e]||[],Ls[e].push(t)}function Qv(e,t,n){return()=>{n&&n();const r=Ls[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Uk(e){return"duration"in e}function md(e){return typeof e=="number"&&isFinite(e)}function Jr(e,t,n,{...r}){const i=Qe(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),aa(e,()=>{const o=oo({startTime:t,...r});return o&&o.end(n),o})}function qh(e){const t=Re();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),h=t.getIntegrationByName("Replay")?.getReplayId(),d=tt(),m=d.getUser(),g=m!==void 0?m.email||m.id||m.ip_address:void 0;let E;try{E=d.getScopeData().contexts.profile.profile_id}catch{}const T={release:s,environment:a,user:g||void 0,profile_id:E||void 0,replay_id:h||void 0,transaction:r,"user_agent.original":Je.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i};return oo({name:n,attributes:T,startTime:o,experimental:{standalone:!0}})}function pl(){return Je.addEventListener&&Je.performance}function Pt(e){return e/1e3}function eE(e){let t="unknown",n="unknown",r="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function tE(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function nE(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n),r=!0}hl(()=>{i("pagehide")});const o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),o?.(),s?.())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s?.()})}function jk(e){let t=0,n;if(!tE("layout-shift"))return;const r=Gh(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);nE(e,(i,o)=>{$k(t,n,o,i),r()})}function $k(e,t,n,r){zo&&Y.log(`Sending CLS span (${e})`);const i=Pt((mn()||0)+(t?.startTime||0)),o=tt().getScopeData().transactionName,s=t?Xn(t.sources[0]?.node):"Layout shift",a={[Ft]:"auto.http.browser.cls",[jn]:"ui.webvital.cls",[os]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,h)=>{a[`cls.source.${h+1}`]=Xn(u.node)});const c=qh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("cls",{[oa]:"",[sa]:e}),c.end(i))}function Wk(e){let t=0,n;if(!tE("largest-contentful-paint"))return;const r=Vh(({metric:i})=>{const o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);nE(e,(i,o)=>{zk(t,n,o,i),r()})}function zk(e,t,n,r){zo&&Y.log(`Sending LCP span (${e})`);const i=Pt((mn()||0)+(t?.startTime||0)),o=tt().getScopeData().transactionName,s=t?Xn(t.element):"Largest contentful paint",a={[Ft]:"auto.http.browser.lcp",[jn]:"ui.webvital.lcp",[os]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Xn(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=qh({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[oa]:"millisecond",[sa]:e}),c.end(i))}const Gk=2147483647;let _g=0,un={},Cn,wu;function Vk({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=pl();if(r&&mn()){r.mark&&Je.performance.mark("sentry-tracing-init");const i=Zk(),o=t?Wk(n):Jk(),s=Qk(),a=e?jk(n):Kk();return()=>{i(),o?.(),s(),a?.()}}return()=>{}}function qk(){Ki("longtask",({entries:e})=>{const t=en();if(!t)return;const{op:n,start_timestamp:r}=Qe(t);for(const i of e){const o=Pt(mn()+i.startTime),s=Pt(i.duration);n==="navigation"&&r&&o<r||Jr(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Ft]:"auto.ui.browser.metrics"}})}})}function Yk(){new PerformanceObserver(t=>{const n=en();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const i=Pt(mn()+r.startTime),{start_timestamp:o,op:s}=Qe(n);if(s==="navigation"&&o&&i<o)continue;const a=Pt(r.duration),c={[Ft]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:h,invokerType:d,sourceURL:m,sourceFunctionName:g,sourceCharPosition:E}=u;c["browser.script.invoker"]=h,c["browser.script.invoker_type"]=d,m&&(c["code.filepath"]=m),g&&(c["code.function"]=g),E!==-1&&(c["browser.script.source_char_position"]=E),Jr(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Xk(){Ki("event",({entries:e})=>{const t=en();if(t){for(const n of e)if(n.name==="click"){const r=Pt(mn()+n.startTime),i=Pt(n.duration),o={name:Xn(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Ft]:"auto.ui.browser.metrics"}},s=e0(n.target);s&&(o.attributes["ui.component_name"]=s),Jr(t,r,r+i,o)}}})}function Kk(){return Gh(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(un.cls={value:e.value,unit:""},wu=t)},!0)}function Jk(){return Vh(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(un.lcp={value:e.value,unit:"millisecond"},Cn=t)},!0)}function Zk(){return Kv(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=Pt(mn()),r=Pt(t.startTime);un.fid={value:e.value,unit:"millisecond"},un["mark.fid"]={value:n+r,unit:"second"}})}function Qk(){return Pk(({metric:e})=>{e.entries[e.entries.length-1]&&(un.ttfb={value:e.value,unit:"millisecond"})})}function eP(e,t){const n=pl(),r=mn();if(!n?.getEntries||!r)return;const i=Pt(r),o=n.getEntries(),{op:s,start_timestamp:a}=Qe(e);if(o.slice(_g).forEach(c=>{const u=Pt(c.startTime),h=Pt(Math.max(0,c.duration));if(!(s==="navigation"&&a&&i+u<a))switch(c.entryType){case"navigation":{rP(e,c,i);break}case"mark":case"paint":case"measure":{tP(e,c,u,h,i,t.ignorePerformanceApiSpans);const d=fl(),m=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&m&&(un.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&m&&(un.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{sP(e,c,c.name,u,h,i,t.ignoreResourceSpans);break}}}),_g=Math.max(o.length-1,0),aP(e),s==="pageload"){uP(un);const c=un["mark.fid"];c&&un.fid&&(Jr(e,c.value,c.value+Pt(un.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Ft]:"auto.ui.browser.metrics"}}),delete un["mark.fid"]),t.recordClsOnPageloadSpan||delete un.cls,t.recordLcpOnPageloadSpan||delete un.lcp,Object.entries(un).forEach(([u,h])=>{R0(u,h.value,h.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",cs()),cP(e,t)}Cn=void 0,wu=void 0,un={}}function tP(e,t,n,r,i,o){if(["mark","measure"].includes(t.entryType)&&ar(t.name,o))return;const s=ha(!1),a=Pt(s?s.requestStart:0),c=i+Math.max(n,a),u=i+n,h=u+r,d={[Ft]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),nP(d,t),c<=h&&Jr(e,c,h,{name:t.name,op:t.entryType,attributes:d})}function nP(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&xo(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(xo(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function rP(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{vc(e,t,r,n)}),vc(e,t,"secureConnection",n,"TLS/SSL"),vc(e,t,"fetch",n,"cache"),vc(e,t,"domainLookup",n,"DNS"),oP(e,t,n)}function vc(e,t,n,r,i=n){const o=iP(n),s=t[o],a=t[`${n}Start`];!a||!s||Jr(e,r+Pt(a),r+Pt(s),{op:`browser.${i}`,name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function iP(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function oP(e,t,n){const r=n+Pt(t.requestStart),i=n+Pt(t.responseEnd),o=n+Pt(t.responseStart);t.responseEnd&&(Jr(e,r,i,{op:"browser.request",name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}),Jr(e,o,i,{op:"browser.response",name:t.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}))}function sP(e,t,n,r,i,o,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;const c=zi(n),u={[Ft]:"auto.resource.browser.metrics"};gd(u,t,"transferSize","http.response_transfer_size"),gd(u,t,"encodedBodySize","http.response_content_length"),gd(u,t,"decodedBodySize","http.decoded_response_content_length");const h=t.deliveryType;h!=null&&(u["http.response_delivery_type"]=h);const d=t.renderBlockingStatus;if(d&&(u["resource.render_blocking_status"]=d),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(Je.location.origin),t.nextHopProtocol!=null){const{name:E,version:T}=eE(t.nextHopProtocol);u["network.protocol.name"]=E,u["network.protocol.version"]=T}const m=o+r,g=m+i;Jr(e,m,g,{name:n.replace(Je.location.origin,""),op:a,attributes:u})}function aP(e){const t=Je.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),md(n.rtt)&&(un["connection.rtt"]={value:n.rtt,unit:"millisecond"})),md(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),md(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function cP(e,t){Cn&&t.recordLcpOnPageloadSpan&&(Cn.element&&e.setAttribute("lcp.element",Xn(Cn.element)),Cn.id&&e.setAttribute("lcp.id",Cn.id),Cn.url&&e.setAttribute("lcp.url",Cn.url.trim().slice(0,200)),Cn.loadTime!=null&&e.setAttribute("lcp.loadTime",Cn.loadTime),Cn.renderTime!=null&&e.setAttribute("lcp.renderTime",Cn.renderTime),e.setAttribute("lcp.size",Cn.size)),wu?.sources&&t.recordClsOnPageloadSpan&&wu.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Xn(n.node)))}function gd(e,t,n,r){const i=t[n];i!=null&&i<Gk&&(e[r]=i)}function uP(e){const t=ha(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function lP(){return pl()&&mn()?Ki("element",dP):()=>{}}const dP=({entries:e})=>{const t=en(),n=t?Zt(t):void 0,r=n?Qe(n).description:tt().getScopeData().transactionName;e.forEach(i=>{const o=i;if(!o.identifier)return;const s=o.name,a=o.renderTime,c=o.loadTime,[u,h]=c?[Pt(c),"load-time"]:a?[Pt(a),"render-time"]:[Yt(),"entry-emission"],d=s==="image-paint"?Pt(Math.max(0,(a??0)-(c??0))):0,m={[Ft]:"auto.ui.browser.elementtiming",[jn]:"ui.elementtiming",[Hn]:"component","sentry.span_start_time_source":h,"sentry.transaction_name":r,"element.id":o.id,"element.type":o.element?.tagName?.toLowerCase()||"unknown","element.size":o.naturalWidth&&o.naturalHeight?`${o.naturalWidth}x${o.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":o.url||void 0,"element.identifier":o.identifier,"element.paint_type":s};sl({name:`element[${o.identifier}]`,attributes:m,startTime:u,onlyIfParent:!0},g=>{g.end(u+d)})})},fP=1e3;let bg,_f,bf;function rE(e){const t="dom";Ii(t,e),Ai(t,hP)}function hP(){if(!Je.document)return;const e=qn.bind(null,"dom"),t=vg(e,!0);Je.document.addEventListener("click",t,!1),Je.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=Je[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(wn(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},h=u[s]=u[s]||{refCount:0};if(!h.handler){const d=vg(e);h.handler=d,o.call(this,s,d,c)}h.refCount++}catch{}return o.call(this,s,a,c)}}),wn(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},h=u[s];h&&(h.refCount--,h.refCount<=0&&(o.call(this,s,h.handler,c),h.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function pP(e){if(e.type!==_f)return!1;try{if(!e.target||e.target._sentryId!==bf)return!1}catch{}return!0}function mP(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function vg(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=gP(n);if(mP(n.type,r))return;Nn(n,"_sentryCaptured",!0),r&&!r._sentryId&&Nn(r,"_sentryId",Tn());const i=n.type==="keypress"?"input":n.type;pP(n)||(e({event:n,name:i,global:t}),_f=n.type,bf=r?r._sentryId:void 0),clearTimeout(bg),bg=Je.setTimeout(()=>{bf=void 0,_f=void 0},fP)}}function gP(e){try{return e.target}catch{return null}}let Ec;function ml(e){const t="history";Ii(t,e),Ai(t,yP)}function yP(){if(Je.addEventListener("popstate",()=>{const t=Je.location.href,n=Ec;if(Ec=t,n===t)return;qn("history",{from:n,to:t})}),!vM())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Ec,o=_P(String(r));if(Ec=o,i===o)return t.apply(this,n);qn("history",{from:i,to:o})}return t.apply(this,n)}}wn(Je.history,"pushState",e),wn(Je.history,"replaceState",e)}function _P(e){try{return new URL(e,Je.location.origin).toString()}catch{return e}}const Yc={};function Yh(e){const t=Yc[e];if(t)return t;let n=Je[e];if(af(n))return Yc[e]=n.bind(Je);const r=Je.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){zo&&Y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Yc[e]=n.bind(Je))}function Eg(e){Yc[e]=void 0}function ga(...e){return Yh("setTimeout")(...e)}const Fr="__sentry_xhr_v3__";function Xh(e){const t="xhr";Ii(t,e),Ai(t,bP)}function bP(){if(!Je.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=Yt()*1e3,s=sr(r[0])?r[0].toUpperCase():void 0,a=vP(r[1]);if(!s||!a)return t.apply(n,r);n[Fr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Fr];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const h={endTimestamp:Yt()*1e3,startTimestamp:o,xhr:n,virtualError:i};qn("xhr",h)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,h,d){return c(),u.apply(h,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,h,d){const[m,g]=d,E=h[Fr];return E&&sr(m)&&sr(g)&&(E.request_headers[m.toLowerCase()]=g),u.apply(h,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Fr];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const o={startTimestamp:Yt()*1e3,xhr:n};return qn("xhr",o),t.apply(n,r)}})}function vP(e){if(sr(e))return e;try{return e.toString()}catch{}}function iE(e){return new URLSearchParams(e).toString()}function Tu(e,t=Y){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[iE(e)];if(!e)return[void 0]}catch(n){return zo&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return zo&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Kh(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const yd=[],Xc=new Map,EP=60;function SP(){if(pl()&&mn()){const t=wP();return()=>{t()}}return()=>{}}const Sg={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function wP(){return Jv(TP)}const TP=({metric:e})=>{if(e.value==null)return;const t=Pt(e.value);if(t>EP)return;const n=e.entries.find(E=>E.duration===e.value&&Sg[E.name]);if(!n)return;const{interactionId:r}=n,i=Sg[n.name],o=Pt(mn()+n.startTime),s=en(),a=s?Zt(s):void 0,u=(r!=null?Xc.get(r):void 0)||a,h=u?Qe(u).description:tt().getScopeData().transactionName,d=Xn(n.target),m={[Ft]:"auto.http.browser.inp",[jn]:`ui.interaction.${i}`,[os]:n.duration},g=qh({name:d,transaction:h,attributes:m,startTime:o});g&&(g.addEvent("inp",{[oa]:"millisecond",[sa]:e.value}),g.end(o+t))};function IP(){const e=({entries:t})=>{const n=en(),r=n&&Zt(n);t.forEach(i=>{if(!Uk(i)||!r)return;const o=i.interactionId;if(o!=null&&!Xc.has(o)){if(yd.length>10){const s=yd.shift();Xc.delete(s)}yd.push(o),Xc.set(o,r)}})};Ki("event",e),Ki("first-input",e)}function Jh(e,t=Yh("fetch")){let n=0,r=0;function i(o){const s=o.body.length;n+=s,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Eg("fetch"),pu("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Eg("fetch"),n-=s,r--,pu(c)}}return Q0(e,i)}const AP=10,OP=20,CP=30,RP=40,MP=50;function Go(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?Ir:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const NP=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,kP=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,PP=/\((\S*)(?::(\d+))(?::(\d+))\)/,xP=e=>{const t=NP.exec(e);if(t){const[,r,i,o]=t;return Go(r,Ir,+i,+o)}const n=kP.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=PP.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[i,o]=uE(n[1]||Ir,n[2]);return Go(o,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},oE=[CP,xP],LP=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,DP=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,BP=e=>{const t=LP.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=DP.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||Ir;return[i,r]=uE(i,r),Go(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sE=[MP,BP],FP=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,HP=e=>{const t=FP.exec(e);return t?Go(t[2],t[1]||Ir,+t[3],t[4]?+t[4]:void 0):void 0},UP=[RP,HP],jP=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,$P=e=>{const t=jP.exec(e);return t?Go(t[2],t[3]||Ir,+t[1]):void 0},WP=[AP,$P],zP=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,GP=e=>{const t=zP.exec(e);return t?Go(t[5],t[3]||t[4]||Ir,+t[1],+t[2]):void 0},VP=[OP,GP],aE=[oE,sE],cE=qb(...aE),uE=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ir,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function qP(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:io(r)}},o=YP(e);return Qr(i,[o])}function YP(e){return[{type:"user_report"},e]}const st=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Sc=1024,XP="Breadcrumbs",KP=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:XP,setup(n){t.console&&Ph(QP(n)),t.dom&&rE(ZP(n,t.dom)),t.xhr&&Xh(e2(n)),t.fetch&&Lh(t2(n)),t.history&&ml(n2(n)),t.sentry&&n.on("beforeSendEvent",JP(n))}}},lE=KP;function JP(e){return function(n){Re()===e&&Ar({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Li(n)},{event:n})}}function ZP(e,t){return function(r){if(Re()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Sc&&(st&&Y.warn(`\`dom.maxStringLength\` cannot exceed ${Sc}, but a value of ${a} was configured. Sentry will use ${Sc} instead.`),a=Sc),typeof s=="string"&&(s=[s]);try{const u=r.event,h=r2(u)?u.target:u;i=Xn(h,{keyAttrs:s,maxStringLength:a}),o=e0(h)}catch{i="<unknown>"}if(i.length===0)return;const c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),Ar(c,{event:r.event,name:r.name,global:r.global})}}function QP(e){return function(n){if(Re()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:xh(n.level),message:cu(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${cu(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ar(r,{input:n.args,level:n.level})}}function e2(e){return function(n){if(Re()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[Fr];if(!r||!i||!o)return;const{method:s,url:a,status_code:c,body:u}=o,h={method:s,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:i},m={category:"xhr",data:h,type:"http",level:_v(c)};e.emit("beforeOutgoingRequestBreadcrumb",m,d),Ar(m,d)}}function t2(e){return function(n){if(Re()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Ar(a,s)}else{const o=n.response,s={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:s,type:"http",level:_v(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Ar(c,a)}}}function n2(e){return function(n){if(Re()!==e)return;let r=n.from,i=n.to;const o=zi(Fe.location.href);let s=r?zi(r):void 0;const a=zi(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),Ar({category:"navigation",data:{from:r,to:i}})}}function r2(e){return!!e&&!!e.target}const i2=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],o2="BrowserApiErrors",s2=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:o2,setupOnce(){t.setTimeout&&wn(Fe,"setTimeout",wg),t.setInterval&&wn(Fe,"setInterval",wg),t.requestAnimationFrame&&wn(Fe,"requestAnimationFrame",a2),t.XMLHttpRequest&&"XMLHttpRequest"in Fe&&wn(XMLHttpRequest.prototype,"send",c2);const n=t.eventTarget;n&&(Array.isArray(n)?n:i2).forEach(i=>u2(i,t))}}},dE=s2;function wg(e){return function(...t){const n=t[0];return t[0]=Wo(n,{mechanism:{data:{function:zr(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function a2(e){return function(t){return e.apply(this,[Wo(t,{mechanism:{data:{function:"requestAnimationFrame",handler:zr(e)},handled:!1,type:"instrument"}})])}}function c2(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&wn(n,i,function(o){const s={mechanism:{data:{function:i,handler:zr(o)},handled:!1,type:"instrument"}},a=vh(o);return a&&(s.mechanism.data.handler=zr(a)),Wo(o,s)})}),e.apply(this,t)}}function u2(e,t){const r=Fe[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(wn(r,"addEventListener",function(i){return function(o,s,a){try{l2(s)&&(s.handleEvent=Wo(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:zr(s),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&d2(this,o,s),i.apply(this,[o,Wo(s,{mechanism:{data:{function:"addEventListener",handler:zr(s),target:e},handled:!1,type:"instrument"}}),a])}}),wn(r,"removeEventListener",function(i){return function(o,s,a){try{const c=s.__sentry_wrapped__;c&&i.call(this,o,c,a)}catch{}return i.call(this,o,s,a)}}))}function l2(e){return typeof e.handleEvent=="function"}function d2(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const fE=()=>({name:"BrowserSession",setupOnce(){if(typeof Fe.document>"u"){st&&Y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ef({ignoreDuration:!0}),tf(),ml(({from:e,to:t})=>{e!==void 0&&e!==t&&(ef({ignoreDuration:!0}),tf())})}}),f2="GlobalHandlers",h2=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:f2,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(p2(n),Tg("onerror")),t.onunhandledrejection&&(m2(n),Tg("onunhandledrejection"))}}},hE=h2;function p2(e){Yb(t=>{const{stackParser:n,attachStacktrace:r}=pE();if(Re()!==e||Lv())return;const{msg:i,url:o,line:s,column:a,error:c}=t,u=_2(Wh(n,c||i,void 0,r,!1),o,s,a);u.level="error",ua(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function m2(e){Xb(t=>{const{stackParser:n,attachStacktrace:r}=pE();if(Re()!==e||Lv())return;const i=g2(t),o=xo(i)?y2(i):Wh(n,i,void 0,r,!0);o.level="error",ua(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function g2(e){if(xo(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function y2(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _2(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,h=n,d=sr(t)&&t.length>0?t:to();return c.length===0&&c.push({colno:u,filename:d,function:Ir,in_app:!0,lineno:h}),e}function Tg(e){st&&Y.log(`Global Handler attached: ${e}`)}function pE(){return Re()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const mE=()=>({name:"HttpContext",preprocessEvent(e){if(!Fe.navigator&&!Fe.location&&!Fe.document)return;const t=jh(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),b2="cause",v2=5,E2="LinkedErrors",S2=(e={})=>{const t=e.limit||v2,n=e.key||b2;return{name:E2,preprocessEvent(r,i,o){const s=o.getOptions();cR(ll,s.stackParser,n,t,r,i)}}},gE=S2;function w2(){return T2()?(st&&Ti(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function T2(){if(typeof Fe.window>"u")return!1;const e=Fe;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=to(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Fe===Fe.top&&r.some(o=>n.startsWith(`${o}://`)))}function yE(e){return[ov(),rv(),dE(),lE(),hE(),gE(),uv(),mE(),fE()]}function I2(e={}){const t=!e.skipBrowserExtensionCheck&&w2(),n={...e,enabled:t?!1:e.enabled,stackParser:fA(e.stackParser||cE),integrations:gC({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?yE():e.defaultIntegrations}),transport:e.transport||Jh};return kC(Uv,n)}function A2(){}function O2(e){e()}function C2(e={}){const t=Fe.document,n=t?.head||t?.body;if(!n){st&&Y.error("[showReportDialog] Global document not defined");return}const r=tt(),o=Re()?.getDsn();if(!o){st&&Y.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||D0()},a=Fe.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=pC(o,s);const{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){const h=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{Fe.removeEventListener("message",h)}};Fe.addEventListener("message",h)}n.appendChild(a)}const R2=We,M2="ReportingObserver",Ig=new WeakMap,N2=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(Ig.has(Re()))for(const i of r)Jn(o=>{o.setExtra("url",i.url);const s=`ReportingObserver [${i.type}]`;let a="No details available";if(i.body){const c={};for(const u in i.body)c[u]=i.body[u];if(o.setExtra("body",c),i.type==="crash"){const u=i.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=i.body.message||a}gu(`${s}: ${a}`)})}return{name:M2,setupOnce(){if(!SM())return;new R2.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Ig.set(r,!0)}}},k2=N2,P2="HttpClient",x2=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:P2,setup(n){W2(n,t),z2(n,t)}}},L2=x2;function D2(e,t,n,r,i){if(bE(e,n.status,n.url)){const o=G2(t,r);let s,a,c,u;EE()&&([s,c]=Ag("Cookie",o),[a,u]=Ag("Set-Cookie",n));const h=vE({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:i});ua(h)}}function Ag(e,t){const n=H2(t.headers);let r;try{const i=n[e]||n[e.toLowerCase()]||void 0;i&&(r=_E(i))}catch{}return[n,r]}function B2(e,t,n,r,i){if(bE(e,t.status,t.responseURL)){let o,s,a;if(EE()){try{const u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=_E(u))}catch{}try{a=U2(t)}catch{}o=r}const c=vE({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i});ua(c)}}function F2(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function _E(e){return e.split("; ").reduce((t,n)=>{const[r,i]=n.split("=");return r&&i&&(t[r]=i),t},{})}function H2(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function U2(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
507
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function j2(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function $2(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function W2(e,t){bv()&&Lh(n=>{if(Re()!==e)return;const{response:r,args:i,error:o,virtualError:s}=n,[a,c]=i;r&&D2(t,a,r,c,o||s)},!1)}function z2(e,t){"XMLHttpRequest"in We&&Xh(n=>{if(Re()!==e)return;const{error:r,virtualError:i}=n,o=n.xhr,s=o[Fr];if(!s)return;const{method:a,request_headers:c}=s;try{B2(t,o,a,c,r||i)}catch(u){st&&Y.warn("Error while extracting response event form XHR response",u)}})}function bE(e,t,n){return $2(e.failedRequestStatusCodes,t)&&j2(e.failedRequestTargets,n)&&!tv(n,Re())}function vE(e){const t=Re(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:F2(e.responseHeaders)}}};return bi(o,{type:"http.client",handled:!1}),o}function G2(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function EE(){const e=Re();return e?!!e.getOptions().sendDefaultPii:!1}const _d=We,V2=7,q2="ContextLines",Y2=(e={})=>{const t=e.frameContextLines!=null?e.frameContextLines:V2;return{name:q2,processEvent(n){return K2(n,t)}}},X2=Y2;function K2(e,t){const n=_d.document,r=_d.location&&gv(_d.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const o=n.documentElement.innerHTML;if(!o)return e;const s=["<!DOCTYPE html>","<html>",...o.split(`
508
+ `),"</html>"];return i.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>J2(u,s,r,t)))}),e}function J2(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||IA(t,e,r),e}const Z2="GraphQLClient",Q2=e=>({name:Z2,setup(t){ex(t,e),tx(t,e)}});function ex(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const o=Qe(n).data||{};if(!(o[jn]==="http.client"))return;const c=o[jA]||o["http.url"],u=o[UA]||o["http.method"];if(!sr(c)||!sr(u))return;const{endpoints:h}=t,d=ar(c,h),m=wE(r);if(d&&m){const g=TE(m);if(g){const E=SE(g);n.updateName(`${u} ${c} (${E})`),n.setAttribute("graphql.document",m)}}})}function tx(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){const h=s?.url,{endpoints:d}=t,m=ar(h,d),g=wE(r);if(m&&s&&g){const E=TE(g);if(!s.graphql&&E){const T=SE(E);s["graphql.document"]=E.query,s["graphql.operation"]=T}}}})}function SE(e){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=nx(t);return r?`${i} ${r}`:`${i}`}function wE(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Fr];n=r&&Tu(r.body)[0]}else{const r=Kh(e.input);n=Tu(r)[0]}return n}function nx(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function TE(e){let t;try{const n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}const rx=Q2,Nt=We,Zh="sentryReplaySession",ix="replay_event",Qh="Unable to send Replay",ox=3e5,sx=9e5,ax=5e3,cx=5500,ux=6e4,lx=5e3,dx=3,Og=15e4,wc=5e3,fx=3e3,hx=300,ep=2e7,px=4999,mx=15e3,Cg=36e5;var gx=Object.defineProperty,yx=(e,t,n)=>t in e?gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rg=(e,t,n)=>yx(e,typeof t!="symbol"?t+"":t,n),Jt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Jt||{});function _x(e){return e.nodeType===e.ELEMENT_NODE}function Ds(e){return e?.host?.shadowRoot===e}function Bs(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function bx(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function vx(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Iu(e){try{const t=e.rules||e.cssRules;return t?bx(Array.from(t,IE).join("")):null}catch{return null}}function Ex(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function IE(e){let t;if(wx(e))try{t=Iu(e.styleSheet)||vx(e)}catch{}else if(Tx(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=Ex(e)),r&&(n=Sx(n)),r||i)return n}return t||e.cssText}function Sx(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function wx(e){return"styleSheet"in e}function Tx(e){return"selectorText"in e}let AE=class{constructor(){Rg(this,"idNodeMap",new Map),Rg(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ix(){return new AE}function gl({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function Ws({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Vo(e){return e.toLowerCase()}function vf(e){return e.toUpperCase()}const Mg="__rrweb_original__";function Ax(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const o=t.getImageData,s=Mg in o?o[Mg]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function tp(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Vo(t):null}function Au(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function OE(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Ng={};function CE(e){const t=Ng[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Ng[e]=r.bind(window)}function Ef(...e){return CE("setTimeout")(...e)}function RE(...e){return CE("clearTimeout")(...e)}function ME(e){try{return e.contentDocument}catch{}}let Ox=1;const Cx=new RegExp("[^a-z0-9-_:]"),zs=-2;function np(){return Ox++}function Rx(e){if(e instanceof HTMLFormElement)return"form";const t=Vo(e.tagName);return Cx.test(t)?"div":t}function Mx(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let _o,kg;const Nx=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kx=/^(?:[a-z+]+:)?\/\//i,Px=/^www\..*/i,xx=/^(data:)([^,]*),(.*)/i;function Ou(e,t){return(e||"").replace(Nx,(n,r,i,o,s,a)=>{const c=i||s||a,u=r||o||"";if(!c)return n;if(kx.test(c)||Px.test(c))return`url(${u}${c}${u})`;if(xx.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Mx(t)+c}${u})`;const h=t.split("/"),d=c.split("/");h.pop();for(const m of d)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${u}${h.join("/")}${u})`})}const Lx=/^[^ \t\n\r\u000c]+/,Dx=/^[, \t\n\r\u000c]+/;function Bx(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s;const a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}const i=[];for(;r(Dx),!(n>=t.length);){let o=r(Lx);if(o.slice(-1)===",")o=Oo(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=Oo(e,o);let a=!1;for(;;){const c=t.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}const Pg=new WeakMap;function Oo(e,t){return!t||t.trim()===""?t:yl(e,t)}function Fx(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function yl(e,t){let n=Pg.get(e);if(n||(n=e.createElement("a"),Pg.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function NE(e,t,n,r,i,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Oo(e,r):n==="srcset"?Bx(e,r):n==="style"?Ou(r,yl(e)):t==="object"&&n==="data"?Oo(e,r):typeof o=="function"?o(n,r,i):r)}function kE(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Hx(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Ux(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ui(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ui(e.parentNode,t,n,r+1)}function Co(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Ux(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function qo(e,t,n,r,i,o){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){const u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(o){if(c=Ui(s,Co(r,i)),c<0)return!0;a=Ui(s,Co(t,n),c>=0?c:1/0)}else{if(a=Ui(s,Co(t,n)),a<0)return!1;c=Ui(s,Co(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function jx(e,t,n){const r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const a=Ef(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{RE(a),i=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return Ef(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function $x(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;const o=Ef(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{RE(o),r=!0,t()})}function Wx(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:E={},maskTextFn:T,maskInputFn:L,dataURLOptions:H={},inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:J=!1}=t,D=zx(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Jt.Document,childNodes:[],compatMode:e.compatMode}:{type:Jt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Jt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:D};case e.ELEMENT_NODE:return Vx(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:g,maskAttributeFn:c,maskInputOptions:E,maskInputFn:L,dataURLOptions:H,inlineImages:K,recordCanvas:V,keepIframeSrcFn:F,newlyAddedElement:J,rootId:D,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m});case e.TEXT_NODE:return Gx(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:h,maskTextSelector:d,unmaskTextSelector:m,maskTextFn:T,maskInputOptions:E,maskInputFn:L,rootId:D});case e.CDATA_SECTION_NODE:return{type:Jt.CDATA,textContent:"",rootId:D};case e.COMMENT_NODE:return{type:Jt.Comment,textContent:e.textContent||"",rootId:D};default:return!1}}function zx(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function Gx(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:h}=t,d=e.parentNode&&e.parentNode.tagName;let m=e.textContent;const g=d==="STYLE"?!0:void 0,E=d==="SCRIPT"?!0:void 0,T=d==="TEXTAREA"?!0:void 0;if(g&&m){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(m=Iu(e.parentNode.sheet))}catch(H){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${H}`,e)}m=Ou(m,yl(t.doc))}E&&(m="SCRIPT_PLACEHOLDER");const L=qo(e,r,o,i,s,n);if(!g&&!E&&!T&&m&&L&&(m=a?a(m,e.parentElement):m.replace(/[\S]/g,"*")),T&&m&&(c.textarea||L)&&(m=u?u(m,e.parentNode):m.replace(/[\S]/g,"*")),d==="OPTION"&&m){const H=gl({type:null,tagName:d,maskInputOptions:c});m=Ws({isMasked:qo(e,r,o,i,s,H),element:e,value:m,maskInputFn:u})}return{type:Jt.Text,textContent:m||"",isStyle:g,rootId:h}}function Vx(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:E=!1,rootId:T,maskTextClass:L,unmaskTextClass:H,maskTextSelector:K,unmaskTextSelector:V}=t,F=Hx(e,r,i,o),J=Rx(e);let D={};const W=e.attributes.length;for(let P=0;P<W;P++){const $=e.attributes[P];$.name&&!kE(J,$.name,$.value)&&(D[$.name]=NE(n,J,Vo($.name),$.value,e,c))}if(J==="link"&&s){const P=Array.from(n.styleSheets).find(G=>G.href===e.href);let $=null;P&&($=Iu(P)),$&&(D.rel=null,D.href=null,D.crossorigin=null,D._cssText=Ou($,P.href))}if(J==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const P=Iu(e.sheet);P&&(D._cssText=Ou(P,yl(n)))}if(J==="input"||J==="textarea"||J==="select"||J==="option"){const P=e,$=tp(P),G=Au(P,vf(J),$),q=P.checked;if($!=="submit"&&$!=="button"&&G){const ie=qo(P,L,K,H,V,gl({type:$,tagName:vf(J),maskInputOptions:a}));D.value=Ws({isMasked:ie,element:P,value:G,maskInputFn:u})}q&&(D.checked=q)}if(J==="option"&&(e.selected&&!a.select?D.selected=!0:delete D.selected),J==="canvas"&&m){if(e.__context==="2d")Ax(e)||(D.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){const P=e.toDataURL(h.type,h.quality),$=n.createElement("canvas");$.width=e.width,$.height=e.height;const G=$.toDataURL(h.type,h.quality);P!==G&&(D.rr_dataURL=P)}}if(J==="img"&&d){_o||(_o=n.createElement("canvas"),kg=_o.getContext("2d"));const P=e,$=P.currentSrc||P.getAttribute("src")||"<unknown-src>",G=P.crossOrigin,q=()=>{P.removeEventListener("load",q);try{_o.width=P.naturalWidth,_o.height=P.naturalHeight,kg.drawImage(P,0,0),D.rr_dataURL=_o.toDataURL(h.type,h.quality)}catch(ie){if(P.crossOrigin!=="anonymous"){P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0?q():P.addEventListener("load",q);return}else console.warn(`Cannot inline img src=${$}! Error: ${ie}`)}P.crossOrigin==="anonymous"&&(G?D.crossOrigin=G:P.removeAttribute("crossorigin"))};P.complete&&P.naturalWidth!==0?q():P.addEventListener("load",q)}if((J==="audio"||J==="video")&&(D.rr_mediaState=e.paused?"paused":"played",D.rr_mediaCurrentTime=e.currentTime),E||(e.scrollLeft&&(D.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(D.rr_scrollTop=e.scrollTop)),F){const{width:P,height:$}=e.getBoundingClientRect();D={class:D.class,rr_width:`${P}px`,rr_height:`${$}px`}}J==="iframe"&&!g(D.src)&&(!F&&!ME(e)&&(D.rr_src=D.src),delete D.src);let ue;try{customElements.get(J)&&(ue=!0)}catch{}return{type:Jt.Element,tagName:J,attributes:D,childNodes:[],isSVG:Fx(e)||void 0,needBlock:F,rootId:T,isCustom:ue}}function Mt(e){return e==null?"":e.toLowerCase()}function qx(e,t){if(t.comment&&e.type===Jt.Comment)return!0;if(e.type===Jt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&OE(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Mt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Mt(e.attributes.name)==="application-name"||Mt(e.attributes.rel)==="icon"||Mt(e.attributes.rel)==="apple-touch-icon"||Mt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Mt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Mt(e.attributes.property).match(/^(og|twitter|fb):/)||Mt(e.attributes.name).match(/^(og|twitter):/)||Mt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Mt(e.attributes.name)==="robots"||Mt(e.attributes.name)==="googlebot"||Mt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Mt(e.attributes.name)==="author"||Mt(e.attributes.name)==="generator"||Mt(e.attributes.name)==="framework"||Mt(e.attributes.name)==="publisher"||Mt(e.attributes.name)==="progid"||Mt(e.attributes.property).match(/^article:/)||Mt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Mt(e.attributes.name)==="google-site-verification"||Mt(e.attributes.name)==="yandex-verification"||Mt(e.attributes.name)==="csrf-token"||Mt(e.attributes.name)==="p:domain_verify"||Mt(e.attributes.name)==="verify-v1"||Mt(e.attributes.name)==="verification"||Mt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ro(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m=!1,inlineStylesheet:g=!0,maskInputOptions:E={},maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V={},inlineImages:F=!1,recordCanvas:J=!1,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue=5e3,onBlockedImageLoad:P,onStylesheetLoad:$,stylesheetLoadTimeout:G=5e3,keepIframeSrcFn:q=()=>!1,newlyAddedElement:ie=!1}=t;let{preserveWhiteSpace:fe=!0}=t;const ce=Wx(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,dataURLOptions:V,inlineImages:F,recordCanvas:J,keepIframeSrcFn:q,newlyAddedElement:ie});if(!ce)return console.warn(e,"not serialized"),null;let re;r.hasNode(e)?re=r.getId(e):qx(ce,K)||!fe&&ce.type===Jt.Text&&!ce.isStyle&&!ce.textContent.replace(/^\s+|\s+$/gm,"").length?re=zs:re=np();const X=Object.assign(ce,{id:re});if(r.add(e,X),re===zs)return null;D&&D(e);let _e=!m;if(X.type===Jt.Element){_e=_e&&!X.needBlock;const ge=e.shadowRoot;ge&&Bs(ge)&&(X.isShadowHost=!0)}if((X.type===Jt.Document||X.type===Jt.Element)&&_e){K.headWhitespace&&X.type===Jt.Element&&X.tagName==="head"&&(fe=!1);const ge={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:m,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onBlockedImageLoad:P,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q},he=e.childNodes?Array.from(e.childNodes):[];for(const Se of he){const Xe=Ro(Se,ge);Xe&&X.childNodes.push(Xe)}if(_x(e)&&e.shadowRoot)for(const Se of Array.from(e.shadowRoot.childNodes)){const Xe=Ro(Se,ge);Xe&&(Bs(e.shadowRoot)&&(Xe.isShadow=!0),X.childNodes.push(Xe))}}if(e.parentNode&&Ds(e.parentNode)&&Bs(e.parentNode)&&(X.isShadow=!0),X.type===Jt.Element&&X.tagName==="iframe"&&!X.needBlock&&jx(e,()=>{const ge=ME(e);if(ge&&W){const he=Ro(ge,{doc:ge,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q});he&&W(e,he)}},ue),X.type===Jt.Element&&X.tagName==="img"&&!e.complete&&X.needBlock){const ge=e,he=()=>{if(ge.isConnected&&!ge.complete&&P)try{const Se=ge.getBoundingClientRect();Se.width>0&&Se.height>0&&P(ge,X,Se)}catch{}ge.removeEventListener("load",he)};ge.isConnected&&ge.addEventListener("load",he)}return X.type===Jt.Element&&X.tagName==="link"&&typeof X.attributes.rel=="string"&&(X.attributes.rel==="stylesheet"||X.attributes.rel==="preload"&&typeof X.attributes.href=="string"&&OE(X.attributes.href)==="css")&&$x(e,()=>{if($){const ge=Ro(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K,dataURLOptions:V,inlineImages:F,recordCanvas:J,preserveWhiteSpace:fe,onSerialize:D,onIframeLoad:W,iframeLoadTimeout:ue,onStylesheetLoad:$,stylesheetLoadTimeout:G,keepIframeSrcFn:q});ge&&$(e,ge)}},G),X.type===Jt.Element&&delete X.needBlock,X}function Yx(e,t){const{mirror:n=new AE,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:h=null,inlineStylesheet:d=!0,inlineImages:m=!1,recordCanvas:g=!1,maskAllInputs:E=!1,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOM:K=!1,dataURLOptions:V,preserveWhiteSpace:F,onSerialize:J,onIframeLoad:D,iframeLoadTimeout:W,onBlockedImageLoad:ue,onStylesheetLoad:P,stylesheetLoadTimeout:$,keepIframeSrcFn:G=()=>!1}=t||{};return Ro(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:h,skipChild:!1,inlineStylesheet:d,maskInputOptions:E===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:E===!1?{}:E,maskAttributeFn:T,maskTextFn:L,maskInputFn:H,slimDOMOptions:K===!0||K==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:K==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:K===!1?{}:K,dataURLOptions:V,inlineImages:m,recordCanvas:g,preserveWhiteSpace:F,onSerialize:J,onIframeLoad:D,iframeLoadTimeout:W,onBlockedImageLoad:ue,onStylesheetLoad:P,stylesheetLoadTimeout:$,keepIframeSrcFn:G,newlyAddedElement:!1})}function Sn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const wo=`Please stop import mirror directly. Instead of that,\r
509
509
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
510
- or you can use record.mirror to access the mirror instance during recording.`;let kg={map:{},getId(){return console.error(wo),-1},getNode(){return console.error(wo),null},removeNodeFromMap(){console.error(wo)},has(){return console.error(wo),!1},reset(){console.error(wo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(kg=new Proxy(kg,{get(e,t,n){return t==="map"&&console.error(wo),Reflect.get(e,t,n)}}));function Gs(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),c=this;a<=0||a>t?(r&&(Qx(r),r=null),i=s,e.apply(c,o)):!r&&n.trailing!==!1&&(r=_l(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function NE(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_l(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>NE(e,t,o||{},!0)}function tp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let Cu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Cu=()=>new Date().getTime());function kE(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function PE(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xE(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function LE(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Dn(e,t,n,r,i){if(!e)return!1;const o=LE(e);if(!o)return!1;const s=Co(t,n);if(!i){const u=r&&o.matches(r);return s(o)&&!u}const a=Ui(o,s);let c=-1;return a<0?!1:(r&&(c=Ui(o,Co(null,r))),a>-1&&c<0?!0:a<c)}function qx(e,t){return t.getId(e)!==-1}function bd(e,t){return t.getId(e)===zs}function DE(e,t){if(Ds(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?DE(e.parentNode,t):!0:!0}function vf(e){return!!e.changedTouches}function Yx(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function BE(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function FE(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Ef(e){return!!e?.shadowRoot}class Xx{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function HE(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Kx(e){let t=e,n;for(;n=HE(t);)t=n;return t}function Jx(e){const t=e.ownerDocument;if(!t)return!1;const n=Kx(e);return t.contains(n)}function UE(e){const t=e.ownerDocument;return t?t.contains(e)||Jx(e):!1}const Pg={};function np(e){const t=Pg[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Pg[e]=r.bind(window)}function Zx(...e){return np("requestAnimationFrame")(...e)}function _l(...e){return np("setTimeout")(...e)}function Qx(...e){return np("clearTimeout")(...e)}var it=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(it||{}),ze=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ze||{}),bn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(bn||{}),Dr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Dr||{}),To=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(To||{});function rp(e){try{return e.contentDocument}catch{}}function eL(e){try{return e.contentWindow}catch{}}function xg(e){return"__ln"in e}class tL{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&xg(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&xg(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Lg=(e,t)=>`${e}@${t}`;class nL{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new tL,i=c=>{let u=c,h=zs;for(;h===zs;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},o=c=>{if(!c.parentNode||!UE(c))return;const u=Ds(c.parentNode)?this.mirror.getId(HE(c)):this.mirror.getId(c.parentNode),h=i(c);if(u===-1||h===-1)return r.addNode(c);const d=Ro(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{BE(m,this.mirror)&&!Dn(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(m),FE(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ef(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(m,g)=>{Dn(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(m,g),m.contentWindow&&this.canvasManager.addWindow(m.contentWindow),this.shadowDomManager.observeAttachShadow(m))},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},onBlockedImageLoad:(m,g,{width:E,height:T})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:g.id,attributes:{style:{width:`${E}px`,height:`${T}px`}}}]})}});d&&(t.push({parentId:u,nextId:h,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Dg(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!Bg(this.droppedSet,c)&&!Dg(this.removes,c,this.mirror)||Bg(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){const u=this.mirror.getId(s.value.parentNode),h=i(s.value);u!==-1&&h!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const d=this.mirror.getId(h.value.parentNode);if(i(h.value)===-1)continue;if(d!==-1){c=h;break}else{const g=h.value;if(g.parentNode&&g.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=g.parentNode.host;if(this.mirror.getId(E)!==-1){c=h;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const h=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);h.length<u.style.length&&(h+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!bd(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:qo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,LE(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=Qh(n),a=n.tagName;i=Au(n,a,s);const c=gl({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=qo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=Ws({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!rp(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!ME(n.tagName,r)&&(o.attributes[r]=RE(this.doc,Vo(n.tagName),Vo(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=Ds(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||bd(n,this.mirror)||!qx(n,this.mirror)||(this.addedSet.has(n)?(Sf(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||DE(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Lg(r,i)]?Sf(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:Ds(t.target)&&Bs(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(bd(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Lg(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Dn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Ef(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Sf(e,t){e.delete(t),t.childNodes?.forEach(n=>Sf(e,n))}function Dg(e,t,n){return e.length===0?!1:rL(e,t,n)}function rL(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function Bg(e,t){return e.size===0?!1:jE(e,t)}function jE(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:jE(e,n):!1}let Fs;function iL(e){Fs=e}function oL(){Fs=void 0}const mt=e=>Fs?(...n)=>{try{return e(...n)}catch(r){if(Fs&&Fs(r)===!0)return()=>{};throw r}}:e,Mo=[];function ya(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function $E(e,t){const n=new nL;Mo.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(mt(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function sL({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const c=Gs(mt(d=>{const m=Date.now()-a;e(s.map(g=>(g.timeOffset-=m,g)),d),s=[],a=null}),o),u=mt(Gs(mt(d=>{const m=ya(d),{clientX:g,clientY:E}=vf(d)?d.changedTouches[0]:d;a||(a=Cu()),s.push({x:g,y:E,id:r.getId(m),timeOffset:Cu()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?ze.Drag:d instanceof MouseEvent?ze.MouseMove:ze.TouchMove)}),i,{trailing:!1})),h=[Sn("mousemove",u,n),Sn("touchmove",u,n),Sn("drag",u,n)];return mt(()=>{h.forEach(d=>d())})}function aL({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const h=d=>m=>{const g=ya(m);if(Dn(g,r,i,o,!0))return;let E=null,T=d;if("pointerType"in m){switch(m.pointerType){case"mouse":E=Dr.Mouse;break;case"touch":E=Dr.Touch;break;case"pen":E=Dr.Pen;break}E===Dr.Touch?bn[d]===bn.MouseDown?T="TouchStart":bn[d]===bn.MouseUp&&(T="TouchEnd"):Dr.Pen}else vf(m)&&(E=Dr.Touch);E!==null?(u=E,(T.startsWith("Touch")&&E===Dr.Touch||T.startsWith("Mouse")&&E===Dr.Mouse)&&(E=null)):bn[d]===bn.Click&&(E=u,u=null);const L=vf(m)?m.changedTouches[0]:m;if(!L)return;const H=n.getId(g),{clientX:K,clientY:V}=L;mt(e)({type:bn[T],id:H,x:K,y:V,...E!==null&&{pointerType:E}})};return Object.keys(bn).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let m=Vo(d);const g=h(d);if(window.PointerEvent)switch(bn[d]){case bn.MouseDown:case bn.MouseUp:m=m.replace("mouse","pointer");break;case bn.TouchStart:case bn.TouchEnd:return}c.push(Sn(m,g,t))}),mt(()=>{c.forEach(d=>d())})}function WE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=mt(Gs(mt(c=>{const u=ya(c);if(!u||Dn(u,r,i,o,!0))return;const h=n.getId(u);if(u===t&&t.defaultView){const d=kE(t.defaultView);e({id:h,x:d.left,y:d.top})}else e({id:h,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return Sn("scroll",a,t)}function cL({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=mt(Gs(mt(()=>{const o=PE(),s=xE();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Sn("resize",i,t)}const uL=["INPUT","TEXTAREA","SELECT"],Fg=new WeakMap;function lL({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:h,userTriggeredOnInput:d,maskTextClass:m,unmaskTextClass:g,maskTextSelector:E,unmaskTextSelector:T}){function L(W){let ue=ya(W);const P=W.isTrusted,$=ue&&_f(ue.tagName);if($==="OPTION"&&(ue=ue.parentElement),!ue||!$||uL.indexOf($)<0||Dn(ue,r,i,o,!0))return;const G=ue;if(G.classList.contains(s)||a&&G.matches(a))return;const q=Qh(ue);let ie=Au(G,$,q),fe=!1;const ce=gl({maskInputOptions:c,tagName:$,type:q}),re=qo(ue,m,E,g,T,ce);(q==="radio"||q==="checkbox")&&(fe=ue.checked),ie=Ws({isMasked:re,element:ue,value:ie,maskInputFn:u}),H(ue,d?{text:ie,isChecked:fe,userTriggered:P}:{text:ie,isChecked:fe});const X=ue.name;q==="radio"&&X&&fe&&t.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(_e=>{if(_e!==ue){const ge=Ws({isMasked:re,element:_e,value:Au(_e,$,q),maskInputFn:u});H(_e,d?{text:ge,isChecked:!fe,userTriggered:!1}:{text:ge,isChecked:!fe})}})}function H(W,ue){const P=Fg.get(W);if(!P||P.text!==ue.text||P.isChecked!==ue.isChecked){Fg.set(W,ue);const $=n.getId(W);mt(e)({...ue,id:$})}}const V=(h.input==="last"?["change"]:["input","change"]).map(W=>Sn(W,mt(L),t)),F=t.defaultView;if(!F)return()=>{V.forEach(W=>W())};const J=F.Object.getOwnPropertyDescriptor(F.HTMLInputElement.prototype,"value"),D=[[F.HTMLInputElement.prototype,"value"],[F.HTMLInputElement.prototype,"checked"],[F.HTMLSelectElement.prototype,"value"],[F.HTMLTextAreaElement.prototype,"value"],[F.HTMLSelectElement.prototype,"selectedIndex"],[F.HTMLOptionElement.prototype,"selected"]];return J&&J.set&&V.push(...D.map(W=>NE(W[0],W[1],{set(){mt(L)({target:this,isTrusted:!1})}},!1,F))),mt(()=>{V.forEach(W=>W())})}function Ru(e){const t=[];function n(r,i){if(Tc("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Tc("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Tc("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Tc("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function fi(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function dL({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:mt((h,d,m)=>{const[g,E]=m,{id:T,styleId:L}=fi(d,t,n.styleMirror);return(T&&T!==-1||L&&L!==-1)&&e({id:T,styleId:L,adds:[{rule:g,index:E}]}),h.apply(d,m)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,removes:[{index:g}]}),h.apply(d,m)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,replace:g}),h.apply(d,m)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,replaceSync:g}),h.apply(d,m)})}));const c={};Ic("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ic("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ic("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ic("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([h,d])=>{u[h]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[h].insertRule,{apply:mt((m,g,E)=>{const[T,L]=E,{id:H,styleId:K}=fi(g.parentStyleSheet,t,n.styleMirror);return(H&&H!==-1||K&&K!==-1)&&e({id:H,styleId:K,adds:[{rule:T,index:[...Ru(g),L||0]}]}),m.apply(g,E)})}),d.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:mt((m,g,E)=>{const[T]=E,{id:L,styleId:H}=fi(g.parentStyleSheet,t,n.styleMirror);return(L&&L!==-1||H&&H!==-1)&&e({id:L,styleId:H,removes:[{index:[...Ru(g),T]}]}),m.apply(g,E)})})}),mt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([h,d])=>{d.prototype.insertRule=u[h].insertRule,d.prototype.deleteRule=u[h].deleteRule})})}function zE({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),mt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function fL({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:mt((a,c,u)=>{const[h,d,m]=u;if(n.has(h))return o.apply(c,[h,d,m]);const{id:g,styleId:E}=fi(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,set:{property:h,value:d,priority:m},index:Ru(c.parentRule)}),a.apply(c,u)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:mt((a,c,u)=>{const[h]=u;if(n.has(h))return s.apply(c,[h]);const{id:d,styleId:m}=fi(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,remove:{property:h},index:Ru(c.parentRule)}),a.apply(c,u)})}),mt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function hL({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=mt(u=>Gs(mt(h=>{const d=ya(h);if(!d||Dn(d,t,n,r,!0))return;const{currentTime:m,volume:g,muted:E,playbackRate:T}=d;e({type:u,id:i.getId(d),currentTime:m,volume:g,muted:E,playbackRate:T})}),o.media||500)),c=[Sn("play",a(To.Play),s),Sn("pause",a(To.Pause),s),Sn("seeked",a(To.Seeked),s),Sn("volumechange",a(To.VolumeChange),s),Sn("ratechange",a(To.RateChange),s)];return mt(()=>{c.forEach(u=>u())})}function pL({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,h){const d=new o(c,u,h);return i.set(d,{family:c,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const s=tp(t.fonts,"add",function(a){return function(c){return _l(mt(()=>{const u=i.get(c);u&&(e(u),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),mt(()=>{r.forEach(a=>a())})}function mL(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const c=mt(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const h=[],d=u.rangeCount||0;for(let m=0;m<d;m++){const g=u.getRangeAt(m),{startContainer:E,startOffset:T,endContainer:L,endOffset:H}=g;Dn(E,r,i,o,!0)||Dn(L,r,i,o,!0)||h.push({start:n.getId(E),startOffset:T,end:n.getId(L),endOffset:H})}s({ranges:h})});return c(),Sn("selectionchange",c)}function gL({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:tp(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}return i.apply(this,[o,s,a])}})}function yL(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=$E(e,e.doc));const i=sL(e),o=aL(e),s=WE(e),a=cL(e,{win:n}),c=lL(e),u=hL(e);let h=()=>{},d=()=>{},m=()=>{},g=()=>{};e.recordDOM&&(h=dL(e,{win:n}),d=zE(e,e.doc),m=fL(e,{win:n}),e.collectFonts&&(g=pL(e)));const E=mL(e),T=gL(e),L=[];for(const H of e.plugins)L.push(H.observer(H.callback,n,H.options));return mt(()=>{Mo.forEach(H=>H.reset()),r?.disconnect(),i(),o(),s(),a(),c(),u(),h(),d(),m(),g(),E(),T(),L.forEach(H=>H())})}function Tc(e){return typeof window[e]<"u"}function Ic(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class wf{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class _L{constructor(){this.crossOriginIframeMirror=new wf(ep),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class bL{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new wf(ep),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new wf(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=rp(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case it.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:it.IncrementalSnapshot,data:{source:ze.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case it.Meta:case it.Load:case it.DomContentLoaded:return!1;case it.Plugin:return n;case it.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case it.IncrementalSnapshot:switch(n.data.source){case ze.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ze.Drag:case ze.TouchMove:case ze.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ze.ViewportResize:return!1;case ze.MediaInteraction:case ze.MouseInteraction:case ze.Scroll:case ze.CanvasMutation:case ze.Input:return this.replaceIds(n.data,t,["id"]),n;case ze.StyleSheetRule:case ze.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case ze.Font:return n;case ze.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case ze.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Jt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class vL{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class EL{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Bs(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=$E({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(WE({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),_l(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(zE({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=rp(t),r=eL(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(tp(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&UE(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Hg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",SL=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ac=0;Ac<Hg.length;Ac++)SL[Hg.charCodeAt(Ac)]=Ac;class Ug{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class wL{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Xx,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:wE(a),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class TL{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,Zx(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Wt,Mu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const er=wx();function $r(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:h="rr-mask",unmaskTextClass:d=null,maskTextSelector:m=null,unmaskTextSelector:g=null,inlineStylesheet:E=!0,maskAllInputs:T,maskInputOptions:L,slimDOMOptions:H,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,maxCanvasSize:J=null,packFn:D,sampling:W={},dataURLOptions:ue={},mousemoveWait:P,recordDOM:$=!0,recordCanvas:G=!1,recordCrossOriginIframes:q=!1,recordAfter:ie=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:fe=!1,collectFonts:ce=!1,inlineImages:re=!1,plugins:X,keepIframeSrcFn:_e=()=>!1,ignoreCSSAttributes:ge=new Set([]),errorHandler:he,onMutation:Se,getCanvasManager:Xe}=e;iL(he);const se=q?window.parent===window:!0;let He=!1;if(!se)try{window.parent.document&&(He=!1)}catch{He=!0}if(se&&!t)throw new Error("emit function is required");if(!se&&!He)return()=>{};P!==void 0&&W.mousemove===void 0&&(W.mousemove=P),er.reset();const vt=T===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:L!==void 0?L:{},Et=H===!0||H==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:H==="all",headMetaDescKeywords:H==="all"}:H||{};Yx();let tn,nn=0;const $n=Ze=>{for(const rn of X||[])rn.eventProcessor&&(Ze=rn.eventProcessor(Ze));return D&&!He&&(Ze=D(Ze)),Ze};Wt=(Ze,rn)=>{const et=Ze;if(et.timestamp=Cu(),Mo[0]?.isFrozen()&&et.type!==it.FullSnapshot&&!(et.type===it.IncrementalSnapshot&&et.data.source===ze.Mutation)&&Mo.forEach(Lt=>Lt.unfreeze()),se)t?.($n(et),rn);else if(He){const Lt={type:"rrweb",event:$n(et),origin:window.location.origin,isCheckout:rn};window.parent.postMessage(Lt,"*")}if(et.type===it.FullSnapshot)tn=et,nn=0;else if(et.type===it.IncrementalSnapshot){if(et.data.source===ze.Mutation&&et.data.isAttachIframe)return;nn++;const Lt=r&&nn>=r,at=n&&tn&&et.timestamp-tn.timestamp>n;(Lt||at)&&ei(!0)}};const Me=Ze=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.Mutation,...Ze}})},ht=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Scroll,...Ze}}),gt=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.CanvasMutation,...Ze}}),Gt=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.AdoptedStyleSheet,...Ze}}),nt=new wL({mutationCb:Me,adoptedStyleSheetCb:Gt}),rt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new _L:new bL({mirror:er,mutationCb:Me,stylesheetManager:nt,recordCrossOriginIframes:q,wrappedEmit:Wt});for(const Ze of X||[])Ze.getMirror&&Ze.getMirror({nodeMirror:er,crossOriginIframeMirror:rt.crossOriginIframeMirror,crossOriginIframeStyleMirror:rt.crossOriginIframeStyleMirror});const Ke=new TL,gn=AL(Xe,{mirror:er,win:window,mutationCb:Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.CanvasMutation,...Ze}}),recordCanvas:G,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:J,sampling:W.canvas,dataURLOptions:ue,errorHandler:he}),xt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new vL:new EL({mutationCb:Me,scrollCb:ht,bypassOptions:{onMutation:Se,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:E,maskInputOptions:vt,dataURLOptions:ue,maskAttributeFn:K,maskTextFn:F,maskInputFn:V,recordCanvas:G,inlineImages:re,sampling:W,slimDOMOptions:Et,iframeManager:rt,stylesheetManager:nt,canvasManager:gn,keepIframeSrcFn:_e,processedNodeManager:Ke},mirror:er}),ei=(Ze=!1)=>{if(!$)return;Wt({type:it.Meta,data:{href:window.location.href,width:xE(),height:PE()}},Ze),nt.reset(),xt.init(),Mo.forEach(et=>et.lock());const rn=Vx(document,{mirror:er,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:E,maskAllInputs:vt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,slimDOM:Et,dataURLOptions:ue,recordCanvas:G,inlineImages:re,onSerialize:et=>{BE(et,er)&&rt.addIframe(et),FE(et,er)&&nt.trackLinkElement(et),Ef(et)&&xt.addShadowRoot(et.shadowRoot,document)},onIframeLoad:(et,Lt)=>{rt.attachIframe(et,Lt),et.contentWindow&&gn.addWindow(et.contentWindow),xt.observeAttachShadow(et)},onStylesheetLoad:(et,Lt)=>{nt.attachLinkElement(et,Lt)},onBlockedImageLoad:(et,Lt,{width:at,height:Pn})=>{Me({adds:[],removes:[],texts:[],attributes:[{id:Lt.id,attributes:{style:{width:`${at}px`,height:`${Pn}px`}}}]})},keepIframeSrcFn:_e});if(!rn)return console.warn("Failed to snapshot the document");Wt({type:it.FullSnapshot,data:{node:rn,initialOffset:kE(window)}}),Mo.forEach(et=>et.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&nt.adoptStyleSheets(document.adoptedStyleSheets,er.getId(document))};Mu=ei;try{const Ze=[],rn=Lt=>mt(yL)({onMutation:Se,mutationCb:Me,mousemoveCb:(at,Pn)=>Wt({type:it.IncrementalSnapshot,data:{source:Pn,positions:at}}),mouseInteractionCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.MouseInteraction,...at}}),scrollCb:ht,viewportResizeCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.ViewportResize,...at}}),inputCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Input,...at}}),mediaInteractionCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.MediaInteraction,...at}}),styleSheetRuleCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.StyleSheetRule,...at}}),styleDeclarationCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.StyleDeclaration,...at}}),canvasMutationCb:gt,fontCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Font,...at}}),selectionCb:at=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.Selection,...at}})},customElementCb:at=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.CustomElement,...at}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,maskInputOptions:vt,inlineStylesheet:E,sampling:W,recordDOM:$,recordCanvas:G,inlineImages:re,userTriggeredOnInput:fe,collectFonts:ce,doc:Lt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,keepIframeSrcFn:_e,blockSelector:o,unblockSelector:s,slimDOMOptions:Et,dataURLOptions:ue,mirror:er,iframeManager:rt,stylesheetManager:nt,shadowDomManager:xt,processedNodeManager:Ke,canvasManager:gn,ignoreCSSAttributes:ge,plugins:X?.filter(at=>at.observer)?.map(at=>({observer:at.observer,options:at.options,callback:Pn=>Wt({type:it.Plugin,data:{plugin:at.name,payload:Pn}})}))||[]},{});rt.addLoadListener(Lt=>{try{Ze.push(rn(Lt.contentDocument))}catch(at){console.warn(at)}});const et=()=>{ei(),Ze.push(rn(document))};return document.readyState==="interactive"||document.readyState==="complete"?et():(Ze.push(Sn("DOMContentLoaded",()=>{Wt({type:it.DomContentLoaded,data:{}}),ie==="DOMContentLoaded"&&et()})),Ze.push(Sn("load",()=>{Wt({type:it.Load,data:{}}),ie==="load"&&et()},window))),()=>{Ze.forEach(Lt=>Lt()),Ke.destroy(),Mu=void 0,oL()}}catch(Ze){console.warn(Ze)}}function IL(e){if(!Mu)throw new Error("please take full snapshot after start recording");Mu(e)}$r.mirror=er;$r.takeFullSnapshot=IL;function AL(e,t){try{return e?e(t):new Ug}catch{return console.warn("Unable to initialize CanvasManager"),new Ug}}var jg;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(jg||(jg={}));const OL=3,CL=5;function ip(e){return e>9999999999?e:e*1e3}function vd(e){return e>9999999999?e/1e3:e}function _a(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:it.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ln(t,10,1e3)}}),t.category==="console")))}const RL="button,a";function GE(e){return e.closest(RL)||e}function VE(e){const t=qE(e);return!t||!(t instanceof Element)?t:GE(t)}function qE(e){return ML(e)?e.target:e}function ML(e){return typeof e=="object"&&!!e&&"target"in e}let hi;function NL(e){return hi||(hi=[],kL()),hi.push(e),()=>{const t=hi?hi.indexOf(e):-1;t>-1&&hi.splice(t,1)}}function kL(){wn(Nt,"open",function(e){return function(...t){if(hi)try{hi.forEach(n=>n())}catch{}return e.apply(Nt,t)}})}const PL=new Set([ze.Mutation,ze.StyleSheetRule,ze.StyleDeclaration,ze.AdoptedStyleSheet,ze.CanvasMutation,ze.Selection,ze.MediaInteraction]);function xL(e,t,n){e.handleClick(t,n)}class LL{constructor(t,n,r=_a){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=NL(()=>{this._lastMutation=$g()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(BL(n,this._ignoreSelector)||!FL(t))return;const r={timestamp:vd(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=vd(t)}registerScroll(t=Date.now()){this._lastScroll=vd(t)}registerClick(t){const n=GE(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=$g();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",h={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Nt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(n,h);return}if(s>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Nt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ga(()=>this._checkClicks(),1e3)}}const DL=["A","BUTTON","INPUT"];function BL(e,t){return!!(!DL.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function FL(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function $g(){return Date.now()/1e3}function HL(e,t){try{if(!UL(t))return;const{source:n}=t.data;if(PL.has(n)&&e.registerMutation(t.timestamp),n===ze.Scroll&&e.registerScroll(t.timestamp),jL(t)){const{type:r,id:i}=t.data,o=$r.mirror.getNode(i);o instanceof HTMLElement&&r===bn.Click&&e.registerClick(o)}}catch{}}function UL(e){return e.type===OL}function jL(e){return e.data.source===ze.MouseInteraction}function wr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var op=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(op||{});const $L=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function WL(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if($L.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const zL=e=>t=>{if(!e.isEnabled())return;const n=GL(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&xL(e.clickDetector,n,VE(t.event)),_a(e,n)};function YE(e,t){const n=$r.mirror.getId(e),r=n&&$r.mirror.getNode(n),i=r&&$r.mirror.getMeta(r),o=i&&qL(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===op.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:WL(o.attributes)}}:{}}}function GL(e){const{target:t,message:n}=VL(e);return wr({category:`ui.${e.name}`,...YE(t,n)})}function VL(e){const t=e.name==="click";let n,r=null;try{r=t?VE(e.event):qE(e.event),n=Xn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function qL(e){return e.type===op.Element}function YL(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=XL(t);n&&_a(e,n)}function XL(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||KL(s)||!o)return null;const a=t||r||i,c=o.length===1;if(!a&&c)return null;const u=Xn(s,{maxStringLength:200})||"<unknown>",h=YE(s,u);return wr({category:"ui.keyDown",message:u,data:{...h.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function KL(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const JL={resource:nD,paint:eD,navigation:tD};function Oc(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function ZL(e){return e.map(QL).filter(Boolean)}function QL(e){const t=JL[e.entryType];return t?t(e):null}function Yo(e){return((mn()||Nt.performance.timeOrigin)+e)/1e3}function eD(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Yo(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function tD(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:h,loadEventEnd:d,redirectCount:m,startTime:g,transferSize:E,type:T}=e;return i===0?null:{type:`${t}.${T}`,start:Yo(g),end:Yo(o),name:n,data:{size:E,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:h,loadEventEnd:d,domComplete:o,redirectCount:m}}}function nD(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Yo(o),end:Yo(i),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function rD(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return bl(e,"largest-contentful-paint",n)}function iD(e){return e.sources!==void 0}function oD(e){const t=[],n=[];for(const r of e.entries)if(iD(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=$r.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return bl(e,"cumulative-layout-shift",n,t)}function sD(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return bl(e,"first-input-delay",n)}function aD(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return bl(e,"interaction-to-next-paint",n)}function bl(e,t,n,r){const i=e.value,o=e.rating,s=Yo(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>$r.mirror.getId(a)):void 0,attributions:r}}}function cD(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(Ki(i,n))}),r.push(zh(Oc(rD,e)),Wh(Oc(oD,e)),Yv(Oc(sD,e)),Xv(Oc(aD,e))),()=>{r.forEach(i=>i())}}const je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,uD='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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,0,0,0]),i=new t([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,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function lD(){const e=new Blob([uD]);return URL.createObjectURL(e)}const Wg=["log","warn","error"],Kc="[Replay] ";function Ed(e,t="info"){Ar({category:"console",data:{logger:"replay"},level:t,message:`${Kc}${e}`},{level:t})}function dD(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return je?(Wg.forEach(r=>{n[r]=(...i)=>{Y[r](Kc,...i),t&&Ed(i.join(""),kh(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),Y.error(Kc,r),e?Xi(r):t&&Ed(r,"error")},n.infoTick=(...r)=>{Y.log(Kc,...r),t&&setTimeout(()=>Ed(r[0]),0)}):Wg.forEach(r=>{n[r]=()=>{}}),n}const $e=dD();class sp extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Zh}.`)}}class XE{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Zh)throw new sp;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?ip(t):null}}class fD{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){je&&$e.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{const s=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){je&&$e.error("Error in compression worker: ",c.response),o(new Error("Error in compression worker"));return}i(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class hD{constructor(t){this._worker=new fD(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=ip(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Zh?Promise.reject(new sp):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{je&&$e.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class pD{constructor(t){this._fallback=new XE,this._compression=new hD(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){je&&$e.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){je&&$e.exception(o,"Failed to add events when switching buffers.")}}}function mD({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=gD(t);if(n)return n}return je&&$e.log("Using simple buffer"),new XE}function gD(e){try{const t=e||yD();if(!t)return;je&&$e.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new pD(n)}catch(t){je&&$e.exception(t,"Failed to create compression worker")}}function yD(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?lD():""}function ap(){try{return"sessionStorage"in Nt&&!!Nt.sessionStorage}catch{return!1}}function _D(e){bD(),e.session=void 0}function bD(){if(ap())try{Nt.sessionStorage.removeItem(Kh)}catch{}}function KE(e){return e===void 0?!1:Math.random()<e}function cp(e){if(ap())try{Nt.sessionStorage.setItem(Kh,JSON.stringify(e))}catch{}}function JE(e){const t=Date.now(),n=e.id||Tn(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a}}function vD(e,t){return KE(e)?"session":t?"buffer":!1}function zg({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=vD(e,t),o=JE({sampled:i,previousSessionId:r});return n&&cp(o),o}function ED(){if(!ap())return null;try{const e=Nt.sessionStorage.getItem(Kh);if(!e)return null;const t=JSON.parse(e);return je&&$e.infoTick("Loading existing session"),JE(t)}catch{return null}}function Tf(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function ZE(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Tf(e.started,t,r)||Tf(e.lastActivity,n,r)}function QE(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ZE(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Sd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&ED();return i?QE(i,{sessionIdleExpire:e,maxReplayDuration:t})?(je&&$e.infoTick("Session in sessionStorage is expired, creating new one..."),zg(r,{previousSessionId:i.id})):i:(je&&$e.infoTick("Creating new session"),zg(r,{previousSessionId:n}))}function SD(e){return e.type===it.Custom}function up(e,t,n){return tS(e,t)?(eS(e,t,n),!0):!1}function wD(e,t,n){return tS(e,t)?eS(e,t,n):Promise.resolve(null)}async function eS(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=TD(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof sp,a=s?"addEventSizeExceeded":"addEvent";if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a});const c=Re();c&&c.recordDroppedEvent("internal_sdk_error","replay")}}function tS(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ip(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(je&&$e.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function TD(e,t){try{if(typeof t=="function"&&SD(e))return t(e)}catch(n){return je&&$e.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function lp(e){return!e.type}function If(e){return e.type==="transaction"}function ID(e){return e.type==="replay_event"}function Gg(e){return e.type==="feedback"}function AD(e){return(t,n)=>{if(!e.isEnabled()||!lp(t)&&!If(t))return;const r=n?.statusCode;if(!(!r||r<200||r>=300)){if(If(t)){OD(e,t);return}CD(e,t)}}}function OD(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function CD(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ga(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function RD(e){return t=>{!e.isEnabled()||!lp(t)||MD(e,t)}}function MD(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=wr({category:"replay.hydrate-error",data:{url:to()}});_a(e,r)}}function ND(e){const t=Re();t&&t.on("beforeAddBreadcrumb",n=>kD(e,n))}function kD(e,t){if(!e.isEnabled()||!nS(t))return;const n=PD(t);n&&_a(e,n)}function PD(e){return!nS(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?xD(e):wr(e)}function xD(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return wr(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>wc?(n=!0,`${i.slice(0,wc)}…`):i;if(typeof i=="object")try{const o=Ln(i,7);return JSON.stringify(o).length>wc?(n=!0,`${JSON.stringify(o,null,2).slice(0,wc)}…`):o}catch{}return i});return wr({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function nS(e){return!!e.category}function LD(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function rS(){const e=tt().getPropagationContext().dsc;e&&delete e.replay_id;const t=en();if(t){const n=ur(t);delete n.replay_id}}function DD(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:it.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function BD(e,t){return e.recordingMode!=="buffer"||t.message===Jh||!t.exception||t.type?!1:KE(e.getOptions().errorSampleRate)}function FD(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:ID(t)?(delete t.breadcrumbs,t):!lp(t)&&!If(t)&&!Gg(t)?t:e.checkAndHandleExpiredSession()?Gg(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),DD(e,t),t):LD(t,n)&&!e.getOptions()._experiments.captureExceptions?(je&&$e.log("Ignoring error from rrweb internals",t),null):((BD(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(rS(),t),{id:"Replay"})}function vl(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:it.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function HD(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function UD(e){return t=>{if(!e.isEnabled())return;const n=HD(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(vl(e,[n]),!1)))}}function jD(e,t){return je&&e.getOptions()._experiments.traceInternals?!1:Q0(t,Re())}function iS(e,t){e.isEnabled()&&t!==null&&(jD(e,t.name)||e.addUpdate(()=>(vl(e,[t]),!0)))}function El(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=nE(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function oS(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Nu(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function sS(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:c}}}function Vs(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function yi(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=$D(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function Af(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function $D(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Ig,n=WD(e);if(t){const r=e.slice(0,Ig);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function WD(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ku(e,t){const n=zD(e);return ar(n,t)}function zD(e,t=Nt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Nt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function GD(e,t,n){try{const r=await qD(e,t,n),i=sS("resource.fetch",r);iS(n.replay,i)}catch(r){je&&$e.exception(r,"Failed to capture fetch breadcrumb")}}function VD(e,t){const{input:n,response:r}=t,i=n?Yh(n):void 0,o=El(i),s=r?oS(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function qD(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:h}=e.data,d=ku(s,n.networkDetailAllowUrls)&&!ku(s,n.networkDetailDenyUrls),m=d?YD(n,t.input,u):Vs(u),g=await XD(d,n,t.response,h);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:c,request:m,response:g}}function YD({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?ZD(n,t):{};if(!e)return yi(i,r,void 0);const o=Yh(n),[s,a]=Tu(o,$e),c=yi(i,r,s);return a?Nu(c,a):c}async function XD(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Vs(i);const o=r?aS(r.headers,n):{};if(!r||!t&&i!==void 0)return yi(o,i,void 0);const[s,a]=await JD(r),c=KD(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?Nu(c,a):c}function KD(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?El(e):n;return r?t?yi(i,o,e):yi(i,o,void 0):Vs(o)}catch(o){return je&&$e.exception(o,"Failed to serialize response body"),yi(i,n,void 0)}}async function JD(e){const t=QD(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await eB(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(je&&$e.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(je&&$e.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function aS(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function ZD(e,t){return e.length===1&&typeof e[0]!="string"?Vg(e[0],t):e.length===2?Vg(e[1],t):{}}function Vg(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?aS(n,t):Array.isArray(n)?{}:Af(n,t):{}}function QD(e){try{return e.clone()}catch(t){je&&$e.exception(t,"Failed to clone response body")}}function eB(e){return new Promise((t,n)=>{const r=ga(()=>n(new Error("Timeout while trying to read response body")),500);tB(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function tB(e){return await e.text()}async function nB(e,t,n){try{const r=iB(e,t,n),i=sS("resource.xhr",r);iS(n.replay,i)}catch(r){je&&$e.exception(r,"Failed to capture xhr breadcrumb")}}function rB(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=El(r),o=n.getResponseHeader("content-length")?oS(n.getResponseHeader("content-length")):cB(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function iB(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:c,method:u,status_code:h=0,request_body_size:d,response_body_size:m}=e.data;if(!c)return null;if(!a||!ku(c,n.networkDetailAllowUrls)||ku(c,n.networkDetailDenyUrls)){const D=Vs(d),W=Vs(m);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:D,response:W}}const g=a[Fr],E=g?Af(g.request_headers,n.networkRequestHeaders):{},T=Af(oB(a),n.networkResponseHeaders),[L,H]=n.networkCaptureBodies?Tu(s,$e):[void 0],[K,V]=n.networkCaptureBodies?sB(a):[void 0],F=yi(E,d,L),J=yi(T,m,K);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:H?Nu(F,H):F,response:V?Nu(J,V):J}}function oB(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
511
- `).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}function sB(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return aB(e.response,e.responseType)}catch(n){t.push(n)}return je&&$e.warn("Failed to get xhr response body",...t),[void 0]}function aB(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return je&&$e.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return je&&$e.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function cB(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return El(n)}catch{return}}function uB(e){const t=Re();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>lB(a,c,u))}catch{}}function lB(e,t,n){if(t.data)try{dB(t)&&hB(n)&&(rB(t,n),nB(t,n,e)),fB(t)&&pB(n)&&(VD(t,n),GD(t,n,e))}catch(r){je&&$e.exception(r,"Error when enriching network breadcrumb")}}function dB(e){return e.category==="xhr"}function fB(e){return e.category==="fetch"}function hB(e){return e?.xhr}function pB(e){return e?.response}function mB(e){const t=Re();tE(zL(e)),ml(UD(e)),ND(e),uB(e);const n=FD(e);D0(n),t&&(t.on("beforeSendEvent",RD(e)),t.on("afterSendEvent",AD(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function gB(e){try{return Promise.all(vl(e,[yB(Nt.performance.memory)]))}catch{return[]}}function yB(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function _B(e,t,n){return qC(e,t,{...n,setTimeoutImpl:ga})}const Cc=We.navigator;function bB(){return/iPhone|iPad|iPod/i.test(Cc?.userAgent??"")||/Macintosh/i.test(Cc?.userAgent??"")&&Cc?.maxTouchPoints&&Cc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function vB(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){je&&$e.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&HL(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!up(e,n,i))return!0;if(!i)return!1;const o=e.session;if(SB(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(je&&$e.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&cp(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function EB(e){const t=e.getOptions();return{type:it.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function SB(e,t){!t||!e.session||e.session.segmentId!==0||up(e,EB(e),!1)}function wB(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function TB(e,t,n,r){return Qr(A0(e,Th(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function IB({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
512
- `;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function AB({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await k0(e.getOptions(),r,o,t,e,Qt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function OB({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=IB({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:h}=r,d=Re(),m=tt(),g=d?.getTransport(),E=d?.getDsn();if(!d||!g||!E||!o.sampled)return Xr({});const T={type:nx,replay_start_timestamp:h/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},L=await AB({scope:m,client:d,replayId:t,event:T});if(!L)return d.recordDroppedEvent("event_processor","replay"),je&&$e.log("An event processor returned `null`, will not send event."),Xr({});delete L.sdkProcessingMetadata;const H=TB(L,s,E,d.getOptions().tunnel);let K;try{K=await g.send(H)}catch(F){const J=new Error(Jh);try{J.cause=F}catch{}throw J}if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new cS(K.statusCode);const V=K0({},K);if(X0(V,"replay"))throw new dp(V);return K}class cS extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class dp extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function uS(e,t={count:0,interval:cx}){const{recordingData:n,onError:r}=e;if(n.length)try{return await OB(e),!0}catch(i){if(i instanceof cS||i instanceof dp)throw i;if(P0("Replays",{_retryCount:t.count}),r&&r(i),t.count>=ux){const o=new Error(`${Jh} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{ga(async()=>{try{await uS(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const lS="__THROTTLED",CB="__SKIPPED";function RB(e,t,n){const r=new Map,i=a=>{const c=a-n;r.forEach((u,h)=>{h<c&&r.delete(h)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let s=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(i(c),o()>=t){const h=s;return s=!0,h?CB:lS}s=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class MB{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:rx,sessionIdleExpire:ix},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=_B(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=RB((s,a)=>wD(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(lx,r),timeout:r,scrollTimeout:dx,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new LL(this,o)),je){const s=t._experiments;$e.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Nt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=wr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=wr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{YL(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){je&&$e.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){je&&$e.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",je&&$e.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){je&&$e.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){je&&$e.log("Buffering is in progress, call `flush()` to save the replay");return}je&&$e.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Sd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){je&&$e.log("Buffering is in progress, call `flush()` to save the replay");return}je&&$e.infoTick("Starting replay in buffer mode");const t=Sd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=$r({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:ax}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:vB(this),...bB(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{je&&$e.log(`Stopping Replay${n?` triggered by ${n}`:""}`),rS(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,_D(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),je&&$e.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),je&&$e.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();je&&$e.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Tf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Nt.location.pathname}${Nt.location.hash}${Nt.location.search}`,n=`${Nt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===lS){const i=wr({category:"replay.throttled"});this.addUpdate(()=>!up(this,{type:CL,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||en(),n=t&&Zt(t),i=(n&&Qe(n).data||{})[Hn];if(!(!n||!i||!["route","custom"].includes(i)))return Qe(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=mD({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Sd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return QE(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Nt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Nt.addEventListener("blur",this._handleWindowBlur),Nt.addEventListener("focus",this._handleWindowFocus),Nt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(mB(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=cD(this)}_removeListeners(){try{Nt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Nt.removeEventListener("blur",this._handleWindowBlur),Nt.removeEventListener("focus",this._handleWindowFocus),Nt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||ZE(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){je&&$e.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:it.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=ZL(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(vl(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){je&&$e.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await gB(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await uS({replayId:t,recordingData:o,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Re();if(r){const i=n instanceof dp?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){je&&$e.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){je&&$e.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&je&&$e.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&cp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=wB(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=wr({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function ws(e,t){return[...e,...t].join(",")}function NB({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=ws(e,[".sentry-mask","[data-sentry-mask]"]),a=ws(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ws(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:ws(r,[]),ignoreSelector:ws(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function kB({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const qg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',PB=["content-length","content-type","accept"];let Yg=!1;const xB=e=>new LB(e);class LB{constructor({flushMinDelay:t=ox,flushMaxDelay:n=sx,minReplayDuration:r=fx,maxReplayDuration:i=Ag,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:h=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:m=750,mutationLimit:g=1e4,slowClickTimeout:E=7e3,slowClickIgnoreSelectors:T=[],networkDetailAllowUrls:L=[],networkDetailDenyUrls:H=[],networkCaptureBodies:K=!0,networkRequestHeaders:V=[],networkResponseHeaders:F=[],mask:J=[],maskAttributes:D=["title","placeholder","aria-label"],unmask:W=[],block:ue=[],unblock:P=[],ignore:$=[],maskFn:G,beforeAddRecordingEvent:q,beforeErrorSampling:ie,onError:fe}={}){this.name="Replay";const ce=NB({mask:J,unmask:W,block:ue,unblock:P,ignore:$});if(this._recordingOptions={maskAllInputs:h,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:G,maskInputFn:G,maskAttributeFn:(re,X,_e)=>kB({maskAttributes:D,maskAllText:u,privacyOptions:ce,key:re,value:X,el:_e}),...ce,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:re=>{try{re.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,hx),maxReplayDuration:Math.min(i,Ag),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:h,maskAllText:u,mutationBreadcrumbLimit:m,mutationLimit:g,slowClickTimeout:E,slowClickIgnoreSelectors:T,networkDetailAllowUrls:L,networkDetailDenyUrls:H,networkCaptureBodies:K,networkRequestHeaders:Xg(V),networkResponseHeaders:Xg(F),beforeAddRecordingEvent:q,beforeErrorSampling:ie,onError:fe,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${qg}`:qg),this._isInitialized&&af())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Yg}set _isInitialized(t){Yg=t}afterAllSetup(t){!af()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=DB(this._initialOptions,t);this._replay=new MB({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function DB(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=qi(n.replaysSessionSampleRate),o=qi(n.replaysOnErrorSampleRate);return i==null&&o==null&&Ti(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function Xg(e){return[...PB,...e.map(t=>t.toLowerCase())]}function BB(){return Re()?.getIntegrationByName("Replay")}var FB=Object.defineProperty,HB=(e,t,n)=>t in e?FB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kg=(e,t,n)=>HB(e,typeof t!="symbol"?t+"":t,n);class UB{constructor(){Kg(this,"idNodeMap",new Map),Kg(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function jB(){return new UB}function $B(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Of(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Of(e.parentNode,t,n,r+1)}function Jg(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if($B(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Io=`Please stop import mirror directly. Instead of that,\r
510
+ or you can use record.mirror to access the mirror instance during recording.`;let xg={map:{},getId(){return console.error(wo),-1},getNode(){return console.error(wo),null},removeNodeFromMap(){console.error(wo)},has(){return console.error(wo),!1},reset(){console.error(wo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(xg=new Proxy(xg,{get(e,t,n){return t==="map"&&console.error(wo),Reflect.get(e,t,n)}}));function Gs(e,t,n={}){let r=null,i=0;return function(...o){const s=Date.now();!i&&n.leading===!1&&(i=s);const a=t-(s-i),c=this;a<=0||a>t?(r&&(tL(r),r=null),i=s,e.apply(c,o)):!r&&n.trailing!==!1&&(r=_l(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function PE(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_l(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>PE(e,t,o||{},!0)}function rp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}let Cu=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Cu=()=>new Date().getTime());function xE(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function LE(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function DE(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function BE(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Dn(e,t,n,r,i){if(!e)return!1;const o=BE(e);if(!o)return!1;const s=Co(t,n);if(!i){const u=r&&o.matches(r);return s(o)&&!u}const a=Ui(o,s);let c=-1;return a<0?!1:(r&&(c=Ui(o,Co(null,r))),a>-1&&c<0?!0:a<c)}function Xx(e,t){return t.getId(e)!==-1}function bd(e,t){return t.getId(e)===zs}function FE(e,t){if(Ds(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?FE(e.parentNode,t):!0:!0}function Sf(e){return!!e.changedTouches}function Kx(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function HE(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function UE(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function wf(e){return!!e?.shadowRoot}class Jx{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jE(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Zx(e){let t=e,n;for(;n=jE(t);)t=n;return t}function Qx(e){const t=e.ownerDocument;if(!t)return!1;const n=Zx(e);return t.contains(n)}function $E(e){const t=e.ownerDocument;return t?t.contains(e)||Qx(e):!1}const Lg={};function ip(e){const t=Lg[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Lg[e]=r.bind(window)}function eL(...e){return ip("requestAnimationFrame")(...e)}function _l(...e){return ip("setTimeout")(...e)}function tL(...e){return ip("clearTimeout")(...e)}var it=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(it||{}),ze=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ze||{}),bn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(bn||{}),Dr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Dr||{}),To=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(To||{});function op(e){try{return e.contentDocument}catch{}}function nL(e){try{return e.contentWindow}catch{}}function Dg(e){return"__ln"in e}class rL{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Dg(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Dg(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Bg=(e,t)=>`${e}@${t}`;class iL{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new rL,i=c=>{let u=c,h=zs;for(;h===zs;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},o=c=>{if(!c.parentNode||!$E(c))return;const u=Ds(c.parentNode)?this.mirror.getId(jE(c)):this.mirror.getId(c.parentNode),h=i(c);if(u===-1||h===-1)return r.addNode(c);const d=Ro(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{HE(m,this.mirror)&&!Dn(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(m),UE(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),wf(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(m,g)=>{Dn(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(m,g),m.contentWindow&&this.canvasManager.addWindow(m.contentWindow),this.shadowDomManager.observeAttachShadow(m))},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},onBlockedImageLoad:(m,g,{width:E,height:T})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:g.id,attributes:{style:{width:`${E}px`,height:`${T}px`}}}]})}});d&&(t.push({parentId:u,nextId:h,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Fg(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!Hg(this.droppedSet,c)&&!Fg(this.removes,c,this.mirror)||Hg(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){const u=this.mirror.getId(s.value.parentNode),h=i(s.value);u!==-1&&h!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const d=this.mirror.getId(h.value.parentNode);if(i(h.value)===-1)continue;if(d!==-1){c=h;break}else{const g=h.value;if(g.parentNode&&g.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const E=g.parentNode.host;if(this.mirror.getId(E)!==-1){c=h;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const h=JSON.stringify(c.styleDiff),d=JSON.stringify(c._unchangedStyles);h.length<u.style.length&&(h+d).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!bd(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:qo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,BE(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){const s=tp(n),a=n.tagName;i=Au(n,a,s);const c=gl({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=qo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=Ws({isMasked:u,element:n,value:i,maskInputFn:this.maskInputFn})}if(Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!op(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!kE(n.tagName,r)&&(o.attributes[r]=NE(this.doc,Vo(n.tagName),Vo(r),i,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,u]:o._unchangedStyles[a]=[c,u]}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}case"childList":{if(Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),i=Ds(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Dn(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||bd(n,this.mirror)||!Xx(n,this.mirror)||(this.addedSet.has(n)?(Tf(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||FE(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Bg(r,i)]?Tf(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:Ds(t.target)&&Bs(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(bd(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Bg(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Dn(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),wf(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Tf(e,t){e.delete(t),t.childNodes?.forEach(n=>Tf(e,n))}function Fg(e,t,n){return e.length===0?!1:oL(e,t,n)}function oL(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function Hg(e,t){return e.size===0?!1:WE(e,t)}function WE(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:WE(e,n):!1}let Fs;function sL(e){Fs=e}function aL(){Fs=void 0}const mt=e=>Fs?(...n)=>{try{return e(...n)}catch(r){if(Fs&&Fs(r)===!0)return()=>{};throw r}}:e,Mo=[];function ya(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function zE(e,t){const n=new iL;Mo.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const o=new r(mt(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function cL({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const c=Gs(mt(d=>{const m=Date.now()-a;e(s.map(g=>(g.timeOffset-=m,g)),d),s=[],a=null}),o),u=mt(Gs(mt(d=>{const m=ya(d),{clientX:g,clientY:E}=Sf(d)?d.changedTouches[0]:d;a||(a=Cu()),s.push({x:g,y:E,id:r.getId(m),timeOffset:Cu()-a}),c(typeof DragEvent<"u"&&d instanceof DragEvent?ze.Drag:d instanceof MouseEvent?ze.MouseMove:ze.TouchMove)}),i,{trailing:!1})),h=[Sn("mousemove",u,n),Sn("touchmove",u,n),Sn("drag",u,n)];return mt(()=>{h.forEach(d=>d())})}function uL({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const h=d=>m=>{const g=ya(m);if(Dn(g,r,i,o,!0))return;let E=null,T=d;if("pointerType"in m){switch(m.pointerType){case"mouse":E=Dr.Mouse;break;case"touch":E=Dr.Touch;break;case"pen":E=Dr.Pen;break}E===Dr.Touch?bn[d]===bn.MouseDown?T="TouchStart":bn[d]===bn.MouseUp&&(T="TouchEnd"):Dr.Pen}else Sf(m)&&(E=Dr.Touch);E!==null?(u=E,(T.startsWith("Touch")&&E===Dr.Touch||T.startsWith("Mouse")&&E===Dr.Mouse)&&(E=null)):bn[d]===bn.Click&&(E=u,u=null);const L=Sf(m)?m.changedTouches[0]:m;if(!L)return;const H=n.getId(g),{clientX:K,clientY:V}=L;mt(e)({type:bn[T],id:H,x:K,y:V,...E!==null&&{pointerType:E}})};return Object.keys(bn).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let m=Vo(d);const g=h(d);if(window.PointerEvent)switch(bn[d]){case bn.MouseDown:case bn.MouseUp:m=m.replace("mouse","pointer");break;case bn.TouchStart:case bn.TouchEnd:return}c.push(Sn(m,g,t))}),mt(()=>{c.forEach(d=>d())})}function GE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){const a=mt(Gs(mt(c=>{const u=ya(c);if(!u||Dn(u,r,i,o,!0))return;const h=n.getId(u);if(u===t&&t.defaultView){const d=xE(t.defaultView);e({id:h,x:d.left,y:d.top})}else e({id:h,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return Sn("scroll",a,t)}function lL({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const i=mt(Gs(mt(()=>{const o=LE(),s=DE();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return Sn("resize",i,t)}const dL=["INPUT","TEXTAREA","SELECT"],Ug=new WeakMap;function fL({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:h,userTriggeredOnInput:d,maskTextClass:m,unmaskTextClass:g,maskTextSelector:E,unmaskTextSelector:T}){function L(W){let ue=ya(W);const P=W.isTrusted,$=ue&&vf(ue.tagName);if($==="OPTION"&&(ue=ue.parentElement),!ue||!$||dL.indexOf($)<0||Dn(ue,r,i,o,!0))return;const G=ue;if(G.classList.contains(s)||a&&G.matches(a))return;const q=tp(ue);let ie=Au(G,$,q),fe=!1;const ce=gl({maskInputOptions:c,tagName:$,type:q}),re=qo(ue,m,E,g,T,ce);(q==="radio"||q==="checkbox")&&(fe=ue.checked),ie=Ws({isMasked:re,element:ue,value:ie,maskInputFn:u}),H(ue,d?{text:ie,isChecked:fe,userTriggered:P}:{text:ie,isChecked:fe});const X=ue.name;q==="radio"&&X&&fe&&t.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(_e=>{if(_e!==ue){const ge=Ws({isMasked:re,element:_e,value:Au(_e,$,q),maskInputFn:u});H(_e,d?{text:ge,isChecked:!fe,userTriggered:!1}:{text:ge,isChecked:!fe})}})}function H(W,ue){const P=Ug.get(W);if(!P||P.text!==ue.text||P.isChecked!==ue.isChecked){Ug.set(W,ue);const $=n.getId(W);mt(e)({...ue,id:$})}}const V=(h.input==="last"?["change"]:["input","change"]).map(W=>Sn(W,mt(L),t)),F=t.defaultView;if(!F)return()=>{V.forEach(W=>W())};const J=F.Object.getOwnPropertyDescriptor(F.HTMLInputElement.prototype,"value"),D=[[F.HTMLInputElement.prototype,"value"],[F.HTMLInputElement.prototype,"checked"],[F.HTMLSelectElement.prototype,"value"],[F.HTMLTextAreaElement.prototype,"value"],[F.HTMLSelectElement.prototype,"selectedIndex"],[F.HTMLOptionElement.prototype,"selected"]];return J&&J.set&&V.push(...D.map(W=>PE(W[0],W[1],{set(){mt(L)({target:this,isTrusted:!1})}},!1,F))),mt(()=>{V.forEach(W=>W())})}function Ru(e){const t=[];function n(r,i){if(Tc("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Tc("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Tc("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Tc("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function fi(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function hL({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:mt((h,d,m)=>{const[g,E]=m,{id:T,styleId:L}=fi(d,t,n.styleMirror);return(T&&T!==-1||L&&L!==-1)&&e({id:T,styleId:L,adds:[{rule:g,index:E}]}),h.apply(d,m)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,removes:[{index:g}]}),h.apply(d,m)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,replace:g}),h.apply(d,m)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:mt((h,d,m)=>{const[g]=m,{id:E,styleId:T}=fi(d,t,n.styleMirror);return(E&&E!==-1||T&&T!==-1)&&e({id:E,styleId:T,replaceSync:g}),h.apply(d,m)})}));const c={};Ic("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ic("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ic("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ic("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([h,d])=>{u[h]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[h].insertRule,{apply:mt((m,g,E)=>{const[T,L]=E,{id:H,styleId:K}=fi(g.parentStyleSheet,t,n.styleMirror);return(H&&H!==-1||K&&K!==-1)&&e({id:H,styleId:K,adds:[{rule:T,index:[...Ru(g),L||0]}]}),m.apply(g,E)})}),d.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:mt((m,g,E)=>{const[T]=E,{id:L,styleId:H}=fi(g.parentStyleSheet,t,n.styleMirror);return(L&&L!==-1||H&&H!==-1)&&e({id:L,styleId:H,removes:[{index:[...Ru(g),T]}]}),m.apply(g,E)})})}),mt(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([h,d])=>{d.prototype.insertRule=u[h].insertRule,d.prototype.deleteRule=u[h].deleteRule})})}function VE({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){const a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),mt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function pL({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:mt((a,c,u)=>{const[h,d,m]=u;if(n.has(h))return o.apply(c,[h,d,m]);const{id:g,styleId:E}=fi(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||E&&E!==-1)&&e({id:g,styleId:E,set:{property:h,value:d,priority:m},index:Ru(c.parentRule)}),a.apply(c,u)})});const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:mt((a,c,u)=>{const[h]=u;if(n.has(h))return s.apply(c,[h]);const{id:d,styleId:m}=fi(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,remove:{property:h},index:Ru(c.parentRule)}),a.apply(c,u)})}),mt(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function mL({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){const a=mt(u=>Gs(mt(h=>{const d=ya(h);if(!d||Dn(d,t,n,r,!0))return;const{currentTime:m,volume:g,muted:E,playbackRate:T}=d;e({type:u,id:i.getId(d),currentTime:m,volume:g,muted:E,playbackRate:T})}),o.media||500)),c=[Sn("play",a(To.Play),s),Sn("pause",a(To.Pause),s),Sn("seeked",a(To.Seeked),s),Sn("volumechange",a(To.VolumeChange),s),Sn("ratechange",a(To.RateChange),s)];return mt(()=>{c.forEach(u=>u())})}function gL({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(c,u,h){const d=new o(c,u,h);return i.set(d,{family:c,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const s=rp(t.fonts,"add",function(a){return function(c){return _l(mt(()=>{const u=i.get(c);u&&(e(u),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),mt(()=>{r.forEach(a=>a())})}function yL(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e;let a=!0;const c=mt(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const h=[],d=u.rangeCount||0;for(let m=0;m<d;m++){const g=u.getRangeAt(m),{startContainer:E,startOffset:T,endContainer:L,endOffset:H}=g;Dn(E,r,i,o,!0)||Dn(L,r,i,o,!0)||h.push({start:n.getId(E),startOffset:T,end:n.getId(L),endOffset:H})}s({ranges:h})});return c(),Sn("selectionchange",c)}function _L({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:rp(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}return i.apply(this,[o,s,a])}})}function bL(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=zE(e,e.doc));const i=cL(e),o=uL(e),s=GE(e),a=lL(e,{win:n}),c=fL(e),u=mL(e);let h=()=>{},d=()=>{},m=()=>{},g=()=>{};e.recordDOM&&(h=hL(e,{win:n}),d=VE(e,e.doc),m=pL(e,{win:n}),e.collectFonts&&(g=gL(e)));const E=yL(e),T=_L(e),L=[];for(const H of e.plugins)L.push(H.observer(H.callback,n,H.options));return mt(()=>{Mo.forEach(H=>H.reset()),r?.disconnect(),i(),o(),s(),a(),c(),u(),h(),d(),m(),g(),E(),T(),L.forEach(H=>H())})}function Tc(e){return typeof window[e]<"u"}function Ic(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class If{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){const o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){const i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=i.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class vL{constructor(){this.crossOriginIframeMirror=new If(np),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class EL{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new If(np),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new If(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=op(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case it.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:it.IncrementalSnapshot,data:{source:ze.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case it.Meta:case it.Load:case it.DomContentLoaded:return!1;case it.Plugin:return n;case it.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case it.IncrementalSnapshot:switch(n.data.source){case ze.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ze.Drag:case ze.TouchMove:case ze.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case ze.ViewportResize:return!1;case ze.MediaInteraction:case ze.MouseInteraction:case ze.Scroll:case ze.CanvasMutation:case ze.Input:return this.replaceIds(n.data,t,["id"]),n;case ze.StyleSheetRule:case ze.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case ze.Font:return n;case ze.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case ze.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,i){for(const o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Jt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class SL{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class wL{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Bs(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=zE({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(GE({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),_l(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(VE({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=op(t),r=nL(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(rp(t.prototype,"attachShadow",function(i){return function(o){const s=i.call(this,o);return this.shadowRoot&&$E(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var jg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",TL=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ac=0;Ac<jg.length;Ac++)TL[jg.charCodeAt(Ac)]=Ac;class $g{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class IL{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Jx,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},i=[];for(const o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:IE(a),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class AL{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,eL(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Wt,Mu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const er=Ix();function $r(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:h="rr-mask",unmaskTextClass:d=null,maskTextSelector:m=null,unmaskTextSelector:g=null,inlineStylesheet:E=!0,maskAllInputs:T,maskInputOptions:L,slimDOMOptions:H,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,maxCanvasSize:J=null,packFn:D,sampling:W={},dataURLOptions:ue={},mousemoveWait:P,recordDOM:$=!0,recordCanvas:G=!1,recordCrossOriginIframes:q=!1,recordAfter:ie=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:fe=!1,collectFonts:ce=!1,inlineImages:re=!1,plugins:X,keepIframeSrcFn:_e=()=>!1,ignoreCSSAttributes:ge=new Set([]),errorHandler:he,onMutation:Se,getCanvasManager:Xe}=e;sL(he);const se=q?window.parent===window:!0;let He=!1;if(!se)try{window.parent.document&&(He=!1)}catch{He=!0}if(se&&!t)throw new Error("emit function is required");if(!se&&!He)return()=>{};P!==void 0&&W.mousemove===void 0&&(W.mousemove=P),er.reset();const vt=T===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:L!==void 0?L:{},Et=H===!0||H==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:H==="all",headMetaDescKeywords:H==="all"}:H||{};Kx();let tn,nn=0;const $n=Ze=>{for(const rn of X||[])rn.eventProcessor&&(Ze=rn.eventProcessor(Ze));return D&&!He&&(Ze=D(Ze)),Ze};Wt=(Ze,rn)=>{const et=Ze;if(et.timestamp=Cu(),Mo[0]?.isFrozen()&&et.type!==it.FullSnapshot&&!(et.type===it.IncrementalSnapshot&&et.data.source===ze.Mutation)&&Mo.forEach(Lt=>Lt.unfreeze()),se)t?.($n(et),rn);else if(He){const Lt={type:"rrweb",event:$n(et),origin:window.location.origin,isCheckout:rn};window.parent.postMessage(Lt,"*")}if(et.type===it.FullSnapshot)tn=et,nn=0;else if(et.type===it.IncrementalSnapshot){if(et.data.source===ze.Mutation&&et.data.isAttachIframe)return;nn++;const Lt=r&&nn>=r,at=n&&tn&&et.timestamp-tn.timestamp>n;(Lt||at)&&ei(!0)}};const Me=Ze=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.Mutation,...Ze}})},ht=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Scroll,...Ze}}),gt=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.CanvasMutation,...Ze}}),Gt=Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.AdoptedStyleSheet,...Ze}}),nt=new IL({mutationCb:Me,adoptedStyleSheetCb:Gt}),rt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new vL:new EL({mirror:er,mutationCb:Me,stylesheetManager:nt,recordCrossOriginIframes:q,wrappedEmit:Wt});for(const Ze of X||[])Ze.getMirror&&Ze.getMirror({nodeMirror:er,crossOriginIframeMirror:rt.crossOriginIframeMirror,crossOriginIframeStyleMirror:rt.crossOriginIframeStyleMirror});const Ke=new AL,gn=CL(Xe,{mirror:er,win:window,mutationCb:Ze=>Wt({type:it.IncrementalSnapshot,data:{source:ze.CanvasMutation,...Ze}}),recordCanvas:G,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:J,sampling:W.canvas,dataURLOptions:ue,errorHandler:he}),xt=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new SL:new wL({mutationCb:Me,scrollCb:ht,bypassOptions:{onMutation:Se,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:E,maskInputOptions:vt,dataURLOptions:ue,maskAttributeFn:K,maskTextFn:F,maskInputFn:V,recordCanvas:G,inlineImages:re,sampling:W,slimDOMOptions:Et,iframeManager:rt,stylesheetManager:nt,canvasManager:gn,keepIframeSrcFn:_e,processedNodeManager:Ke},mirror:er}),ei=(Ze=!1)=>{if(!$)return;Wt({type:it.Meta,data:{href:window.location.href,width:DE(),height:LE()}},Ze),nt.reset(),xt.init(),Mo.forEach(et=>et.lock());const rn=Yx(document,{mirror:er,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,inlineStylesheet:E,maskAllInputs:vt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,slimDOM:Et,dataURLOptions:ue,recordCanvas:G,inlineImages:re,onSerialize:et=>{HE(et,er)&&rt.addIframe(et),UE(et,er)&&nt.trackLinkElement(et),wf(et)&&xt.addShadowRoot(et.shadowRoot,document)},onIframeLoad:(et,Lt)=>{rt.attachIframe(et,Lt),et.contentWindow&&gn.addWindow(et.contentWindow),xt.observeAttachShadow(et)},onStylesheetLoad:(et,Lt)=>{nt.attachLinkElement(et,Lt)},onBlockedImageLoad:(et,Lt,{width:at,height:Pn})=>{Me({adds:[],removes:[],texts:[],attributes:[{id:Lt.id,attributes:{style:{width:`${at}px`,height:`${Pn}px`}}}]})},keepIframeSrcFn:_e});if(!rn)return console.warn("Failed to snapshot the document");Wt({type:it.FullSnapshot,data:{node:rn,initialOffset:xE(window)}}),Mo.forEach(et=>et.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&nt.adoptStyleSheets(document.adoptedStyleSheets,er.getId(document))};Mu=ei;try{const Ze=[],rn=Lt=>mt(bL)({onMutation:Se,mutationCb:Me,mousemoveCb:(at,Pn)=>Wt({type:it.IncrementalSnapshot,data:{source:Pn,positions:at}}),mouseInteractionCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.MouseInteraction,...at}}),scrollCb:ht,viewportResizeCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.ViewportResize,...at}}),inputCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Input,...at}}),mediaInteractionCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.MediaInteraction,...at}}),styleSheetRuleCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.StyleSheetRule,...at}}),styleDeclarationCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.StyleDeclaration,...at}}),canvasMutationCb:gt,fontCb:at=>Wt({type:it.IncrementalSnapshot,data:{source:ze.Font,...at}}),selectionCb:at=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.Selection,...at}})},customElementCb:at=>{Wt({type:it.IncrementalSnapshot,data:{source:ze.CustomElement,...at}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:h,unmaskTextClass:d,maskTextSelector:m,unmaskTextSelector:g,maskInputOptions:vt,inlineStylesheet:E,sampling:W,recordDOM:$,recordCanvas:G,inlineImages:re,userTriggeredOnInput:fe,collectFonts:ce,doc:Lt,maskAttributeFn:K,maskInputFn:V,maskTextFn:F,keepIframeSrcFn:_e,blockSelector:o,unblockSelector:s,slimDOMOptions:Et,dataURLOptions:ue,mirror:er,iframeManager:rt,stylesheetManager:nt,shadowDomManager:xt,processedNodeManager:Ke,canvasManager:gn,ignoreCSSAttributes:ge,plugins:X?.filter(at=>at.observer)?.map(at=>({observer:at.observer,options:at.options,callback:Pn=>Wt({type:it.Plugin,data:{plugin:at.name,payload:Pn}})}))||[]},{});rt.addLoadListener(Lt=>{try{Ze.push(rn(Lt.contentDocument))}catch(at){console.warn(at)}});const et=()=>{ei(),Ze.push(rn(document))};return document.readyState==="interactive"||document.readyState==="complete"?et():(Ze.push(Sn("DOMContentLoaded",()=>{Wt({type:it.DomContentLoaded,data:{}}),ie==="DOMContentLoaded"&&et()})),Ze.push(Sn("load",()=>{Wt({type:it.Load,data:{}}),ie==="load"&&et()},window))),()=>{Ze.forEach(Lt=>Lt()),Ke.destroy(),Mu=void 0,aL()}}catch(Ze){console.warn(Ze)}}function OL(e){if(!Mu)throw new Error("please take full snapshot after start recording");Mu(e)}$r.mirror=er;$r.takeFullSnapshot=OL;function CL(e,t){try{return e?e(t):new $g}catch{return console.warn("Unable to initialize CanvasManager"),new $g}}var Wg;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Wg||(Wg={}));const RL=3,ML=5;function sp(e){return e>9999999999?e:e*1e3}function vd(e){return e>9999999999?e/1e3:e}function _a(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:it.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ln(t,10,1e3)}}),t.category==="console")))}const NL="button,a";function qE(e){return e.closest(NL)||e}function YE(e){const t=XE(e);return!t||!(t instanceof Element)?t:qE(t)}function XE(e){return kL(e)?e.target:e}function kL(e){return typeof e=="object"&&!!e&&"target"in e}let hi;function PL(e){return hi||(hi=[],xL()),hi.push(e),()=>{const t=hi?hi.indexOf(e):-1;t>-1&&hi.splice(t,1)}}function xL(){wn(Nt,"open",function(e){return function(...t){if(hi)try{hi.forEach(n=>n())}catch{}return e.apply(Nt,t)}})}const LL=new Set([ze.Mutation,ze.StyleSheetRule,ze.StyleDeclaration,ze.AdoptedStyleSheet,ze.CanvasMutation,ze.Selection,ze.MediaInteraction]);function DL(e,t,n){e.handleClick(t,n)}class BL{constructor(t,n,r=_a){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=PL(()=>{this._lastMutation=zg()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(HL(n,this._ignoreSelector)||!UL(t))return;const r={timestamp:vd(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=vd(t)}registerScroll(t=Date.now()){this._lastScroll=vd(t)}registerClick(t){const n=qE(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=zg();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",h={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Nt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(n,h);return}if(s>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Nt.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ga(()=>this._checkClicks(),1e3)}}const FL=["A","BUTTON","INPUT"];function HL(e,t){return!!(!FL.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function UL(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function zg(){return Date.now()/1e3}function jL(e,t){try{if(!$L(t))return;const{source:n}=t.data;if(LL.has(n)&&e.registerMutation(t.timestamp),n===ze.Scroll&&e.registerScroll(t.timestamp),WL(t)){const{type:r,id:i}=t.data,o=$r.mirror.getNode(i);o instanceof HTMLElement&&r===bn.Click&&e.registerClick(o)}}catch{}}function $L(e){return e.type===RL}function WL(e){return e.data.source===ze.MouseInteraction}function wr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ap=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ap||{});const zL=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function GL(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(zL.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const VL=e=>t=>{if(!e.isEnabled())return;const n=qL(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&DL(e.clickDetector,n,YE(t.event)),_a(e,n)};function KE(e,t){const n=$r.mirror.getId(e),r=n&&$r.mirror.getNode(n),i=r&&$r.mirror.getMeta(r),o=i&&XL(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===ap.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:GL(o.attributes)}}:{}}}function qL(e){const{target:t,message:n}=YL(e);return wr({category:`ui.${e.name}`,...KE(t,n)})}function YL(e){const t=e.name==="click";let n,r=null;try{r=t?YE(e.event):XE(e.event),n=Xn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function XL(e){return e.type===ap.Element}function KL(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=JL(t);n&&_a(e,n)}function JL(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||ZL(s)||!o)return null;const a=t||r||i,c=o.length===1;if(!a&&c)return null;const u=Xn(s,{maxStringLength:200})||"<unknown>",h=KE(s,u);return wr({category:"ui.keyDown",message:u,data:{...h.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function ZL(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const QL={resource:iD,paint:nD,navigation:rD};function Oc(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function eD(e){return e.map(tD).filter(Boolean)}function tD(e){const t=QL[e.entryType];return t?t(e):null}function Yo(e){return((mn()||Nt.performance.timeOrigin)+e)/1e3}function nD(e){const{duration:t,entryType:n,name:r,startTime:i}=e,o=Yo(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function rD(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:h,loadEventEnd:d,redirectCount:m,startTime:g,transferSize:E,type:T}=e;return i===0?null:{type:`${t}.${T}`,start:Yo(g),end:Yo(o),name:n,data:{size:E,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:h,loadEventEnd:d,domComplete:o,redirectCount:m}}}function iD(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Yo(o),end:Yo(i),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function oD(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return bl(e,"largest-contentful-paint",n)}function sD(e){return e.sources!==void 0}function aD(e){const t=[],n=[];for(const r of e.entries)if(sD(r)){const i=[];for(const o of r.sources)if(o.node){n.push(o.node);const s=$r.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return bl(e,"cumulative-layout-shift",n,t)}function cD(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return bl(e,"first-input-delay",n)}function uD(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return bl(e,"interaction-to-next-paint",n)}function bl(e,t,n,r){const i=e.value,o=e.rating,s=Yo(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>$r.mirror.getId(a)):void 0,attributions:r}}}function lD(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(Ki(i,n))}),r.push(Vh(Oc(oD,e)),Gh(Oc(aD,e)),Kv(Oc(cD,e)),Jv(Oc(uD,e))),()=>{r.forEach(i=>i())}}const je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,dD='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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,0,0,0]),i=new t([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,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function fD(){const e=new Blob([dD]);return URL.createObjectURL(e)}const Gg=["log","warn","error"],Kc="[Replay] ";function Ed(e,t="info"){Ar({category:"console",data:{logger:"replay"},level:t,message:`${Kc}${e}`},{level:t})}function hD(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return je?(Gg.forEach(r=>{n[r]=(...i)=>{Y[r](Kc,...i),t&&Ed(i.join(""),xh(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),Y.error(Kc,r),e?Xi(r):t&&Ed(r,"error")},n.infoTick=(...r)=>{Y.log(Kc,...r),t&&setTimeout(()=>Ed(r[0]),0)}):Gg.forEach(r=>{n[r]=()=>{}}),n}const $e=hD();class cp extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ep}.`)}}class JE{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>ep)throw new cp;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?sp(t):null}}class pD{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){je&&$e.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((i,o)=>{const s=({data:a})=>{const c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){je&&$e.error("Error in compression worker: ",c.response),o(new Error("Error in compression worker"));return}i(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class mD{constructor(t){this._worker=new pD(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=sp(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>ep?Promise.reject(new cp):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{je&&$e.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class gD{constructor(t){this._fallback=new JE,this._compression=new mD(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){je&&$e.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,i=[];for(const o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){je&&$e.exception(o,"Failed to add events when switching buffers.")}}}function yD({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=_D(t);if(n)return n}return je&&$e.log("Using simple buffer"),new JE}function _D(e){try{const t=e||bD();if(!t)return;je&&$e.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new gD(n)}catch(t){je&&$e.exception(t,"Failed to create compression worker")}}function bD(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?fD():""}function up(){try{return"sessionStorage"in Nt&&!!Nt.sessionStorage}catch{return!1}}function vD(e){ED(),e.session=void 0}function ED(){if(up())try{Nt.sessionStorage.removeItem(Zh)}catch{}}function ZE(e){return e===void 0?!1:Math.random()<e}function lp(e){if(up())try{Nt.sessionStorage.setItem(Zh,JSON.stringify(e))}catch{}}function QE(e){const t=Date.now(),n=e.id||Tn(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a}}function SD(e,t){return ZE(e)?"session":t?"buffer":!1}function Vg({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=SD(e,t),o=QE({sampled:i,previousSessionId:r});return n&&lp(o),o}function wD(){if(!up())return null;try{const e=Nt.sessionStorage.getItem(Zh);if(!e)return null;const t=JSON.parse(e);return je&&$e.infoTick("Loading existing session"),QE(t)}catch{return null}}function Af(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function eS(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Af(e.started,t,r)||Af(e.lastActivity,n,r)}function tS(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!eS(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Sd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&wD();return i?tS(i,{sessionIdleExpire:e,maxReplayDuration:t})?(je&&$e.infoTick("Session in sessionStorage is expired, creating new one..."),Vg(r,{previousSessionId:i.id})):i:(je&&$e.infoTick("Creating new session"),Vg(r,{previousSessionId:n}))}function TD(e){return e.type===it.Custom}function dp(e,t,n){return rS(e,t)?(nS(e,t,n),!0):!1}function ID(e,t,n){return rS(e,t)?nS(e,t,n):Promise.resolve(null)}async function nS(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),s=AD(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){const s=o&&o instanceof cp,a=s?"addEventSizeExceeded":"addEvent";if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a});const c=Re();c&&c.recordDroppedEvent("internal_sdk_error","replay")}}function rS(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=sp(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(je&&$e.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function AD(e,t){try{if(typeof t=="function"&&TD(e))return t(e)}catch(n){return je&&$e.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function fp(e){return!e.type}function Of(e){return e.type==="transaction"}function OD(e){return e.type==="replay_event"}function qg(e){return e.type==="feedback"}function CD(e){return(t,n)=>{if(!e.isEnabled()||!fp(t)&&!Of(t))return;const r=n?.statusCode;if(!(!r||r<200||r>=300)){if(Of(t)){RD(e,t);return}MD(e,t)}}}function RD(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function MD(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ga(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function ND(e){return t=>{!e.isEnabled()||!fp(t)||kD(e,t)}}function kD(e,t){const n=t.exception?.values?.[0]?.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=wr({category:"replay.hydrate-error",data:{url:to()}});_a(e,r)}}function PD(e){const t=Re();t&&t.on("beforeAddBreadcrumb",n=>xD(e,n))}function xD(e,t){if(!e.isEnabled()||!iS(t))return;const n=LD(t);n&&_a(e,n)}function LD(e){return!iS(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?DD(e):wr(e)}function DD(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return wr(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>wc?(n=!0,`${i.slice(0,wc)}…`):i;if(typeof i=="object")try{const o=Ln(i,7);return JSON.stringify(o).length>wc?(n=!0,`${JSON.stringify(o,null,2).slice(0,wc)}…`):o}catch{}return i});return wr({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function iS(e){return!!e.category}function BD(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function oS(){const e=tt().getPropagationContext().dsc;e&&delete e.replay_id;const t=en();if(t){const n=ur(t);delete n.replay_id}}function FD(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:it.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function HD(e,t){return e.recordingMode!=="buffer"||t.message===Qh||!t.exception||t.type?!1:ZE(e.getOptions().errorSampleRate)}function UD(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:OD(t)?(delete t.breadcrumbs,t):!fp(t)&&!Of(t)&&!qg(t)?t:e.checkAndHandleExpiredSession()?qg(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),FD(e,t),t):BD(t,n)&&!e.getOptions()._experiments.captureExceptions?(je&&$e.log("Ignoring error from rrweb internals",t),null):((HD(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(oS(),t),{id:"Replay"})}function vl(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{const a=e.throttledAddEvent({type:it.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function jD(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function $D(e){return t=>{if(!e.isEnabled())return;const n=jD(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(vl(e,[n]),!1)))}}function WD(e,t){return je&&e.getOptions()._experiments.traceInternals?!1:tv(t,Re())}function sS(e,t){e.isEnabled()&&t!==null&&(WD(e,t.name)||e.addUpdate(()=>(vl(e,[t]),!0)))}function El(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=iE(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function aS(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Nu(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function cS(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:c}}}function Vs(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function yi(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:o}=zD(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function Cf(e,t){return Object.entries(e).reduce((n,[r,i])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function zD(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Og,n=GD(e);if(t){const r=e.slice(0,Og);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function GD(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ku(e,t){const n=VD(e);return ar(n,t)}function VD(e,t=Nt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Nt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function qD(e,t,n){try{const r=await XD(e,t,n),i=cS("resource.fetch",r);sS(n.replay,i)}catch(r){je&&$e.exception(r,"Failed to capture fetch breadcrumb")}}function YD(e,t){const{input:n,response:r}=t,i=n?Kh(n):void 0,o=El(i),s=r?aS(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function XD(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:h}=e.data,d=ku(s,n.networkDetailAllowUrls)&&!ku(s,n.networkDetailDenyUrls),m=d?KD(n,t.input,u):Vs(u),g=await JD(d,n,t.response,h);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:c,request:m,response:g}}function KD({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?eB(n,t):{};if(!e)return yi(i,r,void 0);const o=Kh(n),[s,a]=Tu(o,$e),c=yi(i,r,s);return a?Nu(c,a):c}async function JD(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return Vs(i);const o=r?uS(r.headers,n):{};if(!r||!t&&i!==void 0)return yi(o,i,void 0);const[s,a]=await QD(r),c=ZD(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?Nu(c,a):c}function ZD(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const o=e?.length&&n===void 0?El(e):n;return r?t?yi(i,o,e):yi(i,o,void 0):Vs(o)}catch(o){return je&&$e.exception(o,"Failed to serialize response body"),yi(i,n,void 0)}}async function QD(e){const t=tB(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await nB(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(je&&$e.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(je&&$e.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function uS(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function eB(e,t){return e.length===1&&typeof e[0]!="string"?Yg(e[0],t):e.length===2?Yg(e[1],t):{}}function Yg(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?uS(n,t):Array.isArray(n)?{}:Cf(n,t):{}}function tB(e){try{return e.clone()}catch(t){je&&$e.exception(t,"Failed to clone response body")}}function nB(e){return new Promise((t,n)=>{const r=ga(()=>n(new Error("Timeout while trying to read response body")),500);rB(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function rB(e){return await e.text()}async function iB(e,t,n){try{const r=sB(e,t,n),i=cS("resource.xhr",r);sS(n.replay,i)}catch(r){je&&$e.exception(r,"Failed to capture xhr breadcrumb")}}function oB(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=El(r),o=n.getResponseHeader("content-length")?aS(n.getResponseHeader("content-length")):lB(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function sB(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:c,method:u,status_code:h=0,request_body_size:d,response_body_size:m}=e.data;if(!c)return null;if(!a||!ku(c,n.networkDetailAllowUrls)||ku(c,n.networkDetailDenyUrls)){const D=Vs(d),W=Vs(m);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:D,response:W}}const g=a[Fr],E=g?Cf(g.request_headers,n.networkRequestHeaders):{},T=Cf(aB(a),n.networkResponseHeaders),[L,H]=n.networkCaptureBodies?Tu(s,$e):[void 0],[K,V]=n.networkCaptureBodies?cB(a):[void 0],F=yi(E,d,L),J=yi(T,m,K);return{startTimestamp:i,endTimestamp:o,url:c,method:u,statusCode:h,request:H?Nu(F,H):F,response:V?Nu(J,V):J}}function aB(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
511
+ `).reduce((n,r)=>{const[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}function cB(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return uB(e.response,e.responseType)}catch(n){t.push(n)}return je&&$e.warn("Failed to get xhr response body",...t),[void 0]}function uB(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return je&&$e.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return je&&$e.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function lB(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return El(n)}catch{return}}function dB(e){const t=Re();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>fB(a,c,u))}catch{}}function fB(e,t,n){if(t.data)try{hB(t)&&mB(n)&&(oB(t,n),iB(t,n,e)),pB(t)&&gB(n)&&(YD(t,n),qD(t,n,e))}catch(r){je&&$e.exception(r,"Error when enriching network breadcrumb")}}function hB(e){return e.category==="xhr"}function pB(e){return e.category==="fetch"}function mB(e){return e?.xhr}function gB(e){return e?.response}function yB(e){const t=Re();rE(VL(e)),ml($D(e)),PD(e),dB(e);const n=UD(e);F0(n),t&&(t.on("beforeSendEvent",ND(e)),t.on("afterSendEvent",CD(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function _B(e){try{return Promise.all(vl(e,[bB(Nt.performance.memory)]))}catch{return[]}}function bB(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function vB(e,t,n){return XC(e,t,{...n,setTimeoutImpl:ga})}const Cc=We.navigator;function EB(){return/iPhone|iPad|iPod/i.test(Cc?.userAgent??"")||/Macintosh/i.test(Cc?.userAgent??"")&&Cc?.maxTouchPoints&&Cc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function SB(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){je&&$e.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,e.clickDetector&&jL(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!dp(e,n,i))return!0;if(!i)return!1;const o=e.session;if(TB(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer){const s=e.eventBuffer.getEarliestTimestamp();s&&(je&&$e.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&lp(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function wB(e){const t=e.getOptions();return{type:it.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function TB(e,t){!t||!e.session||e.session.segmentId!==0||dp(e,wB(e),!1)}function IB(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function AB(e,t,n,r){return Qr(C0(e,Ah(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function OB({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
512
+ `;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function CB({client:e,scope:t,replayId:n,event:r}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);const s=await x0(e.getOptions(),r,o,t,e,Qt());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u}=a?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0"},s}async function RB({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){const s=OB({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:h}=r,d=Re(),m=tt(),g=d?.getTransport(),E=d?.getDsn();if(!d||!g||!E||!o.sampled)return Xr({});const T={type:ix,replay_start_timestamp:h/1e3,timestamp:i/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},L=await CB({scope:m,client:d,replayId:t,event:T});if(!L)return d.recordDroppedEvent("event_processor","replay"),je&&$e.log("An event processor returned `null`, will not send event."),Xr({});delete L.sdkProcessingMetadata;const H=AB(L,s,E,d.getOptions().tunnel);let K;try{K=await g.send(H)}catch(F){const J=new Error(Qh);try{J.cause=F}catch{}throw J}if(typeof K.statusCode=="number"&&(K.statusCode<200||K.statusCode>=300))throw new lS(K.statusCode);const V=Z0({},K);if(J0(V,"replay"))throw new hp(V);return K}class lS extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class hp extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function dS(e,t={count:0,interval:lx}){const{recordingData:n,onError:r}=e;if(n.length)try{return await RB(e),!0}catch(i){if(i instanceof lS||i instanceof hp)throw i;if(L0("Replays",{_retryCount:t.count}),r&&r(i),t.count>=dx){const o=new Error(`${Qh} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{ga(async()=>{try{await dS(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}const fS="__THROTTLED",MB="__SKIPPED";function NB(e,t,n){const r=new Map,i=a=>{const c=a-n;r.forEach((u,h)=>{h<c&&r.delete(h)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0);let s=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(i(c),o()>=t){const h=s;return s=!0,h?MB:fS}s=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class kB{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:ox,sessionIdleExpire:sx},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=vB(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=NB((s,a)=>ID(this,s,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(fx,r),timeout:r,scrollTimeout:hx,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new BL(this,o)),je){const s=t._experiments;$e.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Nt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=wr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=wr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{KL(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){je&&$e.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){je&&$e.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",je&&$e.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){je&&$e.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){je&&$e.log("Buffering is in progress, call `flush()` to save the replay");return}je&&$e.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Sd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){je&&$e.log("Buffering is in progress, call `flush()` to save the replay");return}je&&$e.infoTick("Starting replay in buffer mode");const t=Sd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=$r({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:ux}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:SB(this),...EB(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{je&&$e.log(`Stopping Replay${n?` triggered by ${n}`:""}`),oS(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,vD(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),je&&$e.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),je&&$e.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();je&&$e.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Af(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Nt.location.pathname}${Nt.location.hash}${Nt.location.search}`,n=`${Nt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===fS){const i=wr({category:"replay.throttled"});this.addUpdate(()=>!dp(this,{type:ML,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||en(),n=t&&Zt(t),i=(n&&Qe(n).data||{})[Hn];if(!(!n||!i||!["route","custom"].includes(i)))return Qe(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=yD({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Sd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return tS(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Nt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Nt.addEventListener("blur",this._handleWindowBlur),Nt.addEventListener("focus",this._handleWindowFocus),Nt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(yB(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=lD(this)}_removeListeners(){try{Nt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Nt.removeEventListener("blur",this._handleWindowBlur),Nt.removeEventListener("focus",this._handleWindowFocus),Nt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||eS(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){je&&$e.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:it.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=eD(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(vl(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){je&&$e.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await _B(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await dS({replayId:t,recordingData:o,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Re();if(r){const i=n instanceof hp?"ratelimit_backoff":"send_error";r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){je&&$e.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){je&&$e.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&je&&$e.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&lp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=IB(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){const a=wr({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function ws(e,t){return[...e,...t].join(",")}function PB({mask:e,unmask:t,block:n,unblock:r,ignore:i}){const o=["base","iframe[srcdoc]:not([src])"],s=ws(e,[".sentry-mask","[data-sentry-mask]"]),a=ws(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ws(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:ws(r,[]),ignoreSelector:ws(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function xB({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const Xg='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',LB=["content-length","content-type","accept"];let Kg=!1;const DB=e=>new BB(e);class BB{constructor({flushMinDelay:t=ax,flushMaxDelay:n=cx,minReplayDuration:r=px,maxReplayDuration:i=Cg,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:h=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:m=750,mutationLimit:g=1e4,slowClickTimeout:E=7e3,slowClickIgnoreSelectors:T=[],networkDetailAllowUrls:L=[],networkDetailDenyUrls:H=[],networkCaptureBodies:K=!0,networkRequestHeaders:V=[],networkResponseHeaders:F=[],mask:J=[],maskAttributes:D=["title","placeholder","aria-label"],unmask:W=[],block:ue=[],unblock:P=[],ignore:$=[],maskFn:G,beforeAddRecordingEvent:q,beforeErrorSampling:ie,onError:fe}={}){this.name="Replay";const ce=PB({mask:J,unmask:W,block:ue,unblock:P,ignore:$});if(this._recordingOptions={maskAllInputs:h,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:G,maskInputFn:G,maskAttributeFn:(re,X,_e)=>xB({maskAttributes:D,maskAllText:u,privacyOptions:ce,key:re,value:X,el:_e}),...ce,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:re=>{try{re.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,mx),maxReplayDuration:Math.min(i,Cg),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:h,maskAllText:u,mutationBreadcrumbLimit:m,mutationLimit:g,slowClickTimeout:E,slowClickIgnoreSelectors:T,networkDetailAllowUrls:L,networkDetailDenyUrls:H,networkCaptureBodies:K,networkRequestHeaders:Jg(V),networkResponseHeaders:Jg(F),beforeAddRecordingEvent:q,beforeErrorSampling:ie,onError:fe,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Xg}`:Xg),this._isInitialized&&uf())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Kg}set _isInitialized(t){Kg=t}afterAllSetup(t){!uf()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=FB(this._initialOptions,t);this._replay=new kB({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function FB(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=qi(n.replaysSessionSampleRate),o=qi(n.replaysOnErrorSampleRate);return i==null&&o==null&&Ti(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function Jg(e){return[...LB,...e.map(t=>t.toLowerCase())]}function HB(){return Re()?.getIntegrationByName("Replay")}var UB=Object.defineProperty,jB=(e,t,n)=>t in e?UB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zg=(e,t,n)=>jB(e,typeof t!="symbol"?t+"":t,n);class $B{constructor(){Zg(this,"idNodeMap",new Map),Zg(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function WB(){return new $B}function zB(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Rf(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Rf(e.parentNode,t,n,r+1)}function Qg(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(zB(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Io=`Please stop import mirror directly. Instead of that,\r
513
513
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
514
- or you can use record.mirror to access the mirror instance during recording.`;let Zg={map:{},getId(){return console.error(Io),-1},getNode(){return console.error(Io),null},removeNodeFromMap(){console.error(Io)},has(){return console.error(Io),!1},reset(){console.error(Io)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zg=new Proxy(Zg,{get(e,t,n){return t==="map"&&console.error(Io),Reflect.get(e,t,n)}}));function fp(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){fS(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>fp(e,t,o||{},!0)}function hp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function WB(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Sl(e,t,n,r,i){if(!e)return!1;const o=WB(e);if(!o)return!1;const s=Jg(t,n),a=Of(o,s);let c=-1;return a<0?!1:(r&&(c=Of(o,Jg(null,r))),a>-1&&c<0?!0:a<c)}const Qg={};function dS(e){const t=Qg[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return Qg[e]=r.bind(window)}function ki(...e){return dS("requestAnimationFrame")(...e)}function fS(...e){return dS("setTimeout")(...e)}var Xo=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Xo||{});let Jc;function zB(e){Jc=e}const wd=e=>Jc?(...n)=>{try{return e(...n)}catch(r){if(Jc&&Jc(r)===!0)return()=>{};throw r}}:e;var No="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",GB=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Rc=0;Rc<No.length;Rc++)GB[No.charCodeAt(Rc)]=Rc;var VB=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=No[t[n]>>2],i+=No[(t[n]&3)<<4|t[n+1]>>4],i+=No[(t[n+1]&15)<<2|t[n+2]>>6],i+=No[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const ey=new Map;function qB(e,t){let n=ey.get(e);return n||(n=new Map,ey.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const hS=(e,t,n)=>{if(!e||!(mS(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=qB(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Zc(e,t,n){if(e instanceof Array)return e.map(r=>Zc(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=VB(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Zc(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Zc(e.data,t,n),e.width,e.height]};if(mS(e,t)||typeof e=="object"){const r=e.constructor.name,i=hS(e,t,n);return{rr_type:r,index:i}}}}return e}const pS=(e,t,n)=>e.map(r=>Zc(r,t,n)),mS=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function YB(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=hp(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...h){return Sl(this.canvas,n,r,i,!0)||fS(()=>{const d=pS(h,t,this);e(this.canvas,{type:Xo["2D"],property:a,args:d})},0),u.apply(this,h)}});o.push(c)}catch{const c=fp(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Xo["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function XB(e){return e==="experimental-webgl"?"webgl":e}function ty(e,t,n,r,i){const o=[];try{const s=hp(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Sl(this,t,n,r,!0)){const h=XB(c);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function ny(e,t,n,r,i,o,s,a){const c=[],u=Object.getOwnPropertyNames(e);for(const h of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const d=hp(e,h,function(m){return function(...g){const E=m.apply(this,g);if(hS(E,a,this),"tagName"in this.canvas&&!Sl(this.canvas,r,i,o,!0)){const T=pS(g,a,this),L={type:t,property:h,args:T};n(this.canvas,L)}return E}});c.push(d)}catch{const d=fp(e,h,{set(m){n(this.canvas,{type:t,property:h,args:[m],setter:!0})}});c.push(d)}return c}function KB(e,t,n,r,i,o){const s=[];return s.push(...ny(t.WebGLRenderingContext.prototype,Xo.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...ny(t.WebGL2RenderingContext.prototype,Xo.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}const JB='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function ZB(){const e=new Blob([JB]);return URL.createObjectURL(e)}class QB{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&zB(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&wd(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}wd(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){const c=ty(t,r,i,o,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}ki(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(ZB());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:o,type:s,width:a,height:c}=r;this.mutationCb({id:i,type:Xo["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=ki(n)};t=ki(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const o=ty(t,n,r,i,!1),s=YB(this.processMutation.bind(this),t,n,r,i),a=KB(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){const i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{Sl(a,t,n,r)||i.push(a)})};for(const s of this.windows){const a=s.deref();let c;try{c=a&&a.document}catch{}c&&o(c)}for(const s of this.shadowDoms){const a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,d=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEach(E=>{const T=this.mirror.getId(E);if(!(!this.mirror.hasNode(E)||!E.width||!E.height||this.snapshotInProgressMap.get(T))){if(this.snapshotInProgressMap.set(T,!0),!n&&["webgl","webgl2"].includes(E.__context)){const L=E.getContext(E.__context);L?.getContextAttributes()?.preserveDrawingBuffer===!1&&L.clear(L.COLOR_BUFFER_BIT)}createImageBitmap(E).then(L=>{this.worker?.postMessage({id:T,bitmap:L,width:E.width,height:E.height,dataURLOptions:c,maxCanvasSize:u},[L])}).catch(L=>{wd(()=>{throw this.snapshotInProgressMap.delete(T),L})()})}}),!0)}startPendingCanvasMutationFlusher(){ki(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,ki(t)};ki(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),ki(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:a,...c}=s;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}jB();var ry;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ry||(ry={}));const iy={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},eF="ReplayCanvas",Mc=1280,tF=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Mc):Mc,n?Math.min(n,Mc):Mc]};let i;const o=new Promise(s=>i=s);return{name:eF,getOptions(){const{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const h=new QB({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return i(h),h},...iy[s]||iy.medium}},async snapshot(s,a){(await o).snapshot(s,a)}}},nF=tF;function br(e=0){return((mn()||performance.timeOrigin)+e)/1e3}function rF(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=Zv(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return mn()?[...t,["http.request.redirect_start",br(e.redirectStart)],["http.request.fetch_start",br(e.fetchStart)],["http.request.domain_lookup_start",br(e.domainLookupStart)],["http.request.domain_lookup_end",br(e.domainLookupEnd)],["http.request.connect_start",br(e.connectStart)],["http.request.secure_connection_start",br(e.secureConnectionStart)],["http.request.connection_end",br(e.connectEnd)],["http.request.request_start",br(e.requestStart)],["http.request.response_start",br(e.responseStart)],["http.request.response_end",br(e.responseEnd)]]:t}const oy=new WeakMap,Td=new Map,pp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function gS(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c}={...pp,...t},u=typeof o=="function"?o:m=>!0,h=m=>oF(m,a),d={};n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(g=>{if(g.op==="http.client"){const E=Td.get(g.span_id);E&&(g.timestamp=E/1e3,Td.delete(g.span_id))}}),m)),i&&EM(m=>{if(m.response){const g=oy.get(m.response);g&&m.endTimestamp&&Td.set(g,m.endTimestamp)}}),Ph(m=>{const g=cM(m,u,h,d);if(m.response&&m.fetchData.__span&&oy.set(m.response,m.fetchData.__span),g){const E=yS(m.fetchData.url),T=E?zi(E).host:void 0;g.setAttributes({"http.url":E,"server.address":T}),s&&sy(g),c?.(g,{headers:m.headers})}})),r&&qh(m=>{const g=sF(m,u,h,d);if(g){s&&sy(g);let E;try{E=new Headers(m.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(g,{headers:E})}})}function iF(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function sy(e){const{url:t}=Qe(e).data;if(!t||typeof t!="string")return;const n=Ki("resource",({entries:r})=>{r.forEach(i=>{iF(i)&&i.name.endsWith(t)&&(rF(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function oF(e,t){const n=to();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?ar(r.toString(),t)||o&&ar(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?ar(e,t):r}}function sF(e,t,n,r){const i=e.xhr,o=i?.[Fr];if(!i||i.__sentry_own_request__||!o)return;const{url:s,method:a}=o,c=vi()&&t(s);if(e.endTimestamp&&c){const T=i.__sentry_xhr_span_id__;if(!T)return;const L=r[T];L&&o.status_code!==void 0&&(js(L,o.status_code),L.end(),delete r[T]);return}const u=yS(s),h=zi(u||s),d=pv(s),m=!!en(),g=c&&m?oo({name:`${a} ${d}`,attributes:{url:s,type:"xhr","http.method":a,"http.url":u,"server.address":h?.host,[Ft]:"auto.http.browser",[jn]:"http.client",...h?.search&&{"http.query":h?.search},...h?.hash&&{"http.fragment":h?.hash}}}):new Yr;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(s)&&aF(i,vi()&&m?g:void 0);const E=Re();return E&&E.emit("beforeOutgoingRequestSpan",g,e),g}function aF(e,t){const{"sentry-trace":n,baggage:r}=Mh({span:t});n&&cF(e,n,r)}function cF(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const i=r?.baggage;(!i||!uF(i))&&e.setRequestHeader("baggage",n)}}catch{}}function uF(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function yS(e){try{return new URL(e,Fe.location.origin).href}catch{return}}function lF(){Fe.document?Fe.document.addEventListener("visibilitychange",()=>{const e=en();if(!e)return;const t=Zt(e);if(Fe.document.hidden&&t){const n="cancelled",{op:r,status:i}=Qe(t);st&&Y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:zt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):st&&Y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const dF=3600,_S="sentry_previous_trace",fF="sentry.previous_trace";function hF(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?gF():void 0;e.on("spanStart",s=>{if(Zt(s)!==s)return;const a=tt().getPropagationContext();i=pF(i,s,a),r&&mF(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=tt(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(Cf(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Cf(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[i0]:i.sampleRate}})}function pF(e,t,n){const r=Qe(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[rl])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=dF&&(st&&Y.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[UA]:"previous_trace"}}),t.setAttribute(fF,`${s.traceId}-${s.spanId}-${Cf(s)?1:0}`)),o)}function mF(e){try{Fe.sessionStorage.setItem(_S,JSON.stringify(e))}catch(t){st&&Y.warn("Could not store previous trace in sessionStorage",t)}}function gF(){try{const e=Fe.sessionStorage?.getItem(_S);return JSON.parse(e)}catch{return}}function Cf(e){return e.traceFlags===1}const yF="BrowserTracing",_F={...Uc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...pp},bF=(e={})=>{const t={name:void 0,source:void 0},n=Fe.document,{enableInp:r,enableElementTiming:i,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:h,idleTimeout:d,finalTimeout:m,childSpanTimeout:g,markBackgroundSpan:E,traceFetch:T,traceXHR:L,trackFetchStreamPerformance:H,shouldCreateSpanForRequest:K,enableHTTPTimings:V,ignoreResourceSpans:F,ignorePerformanceApiSpans:J,instrumentPageLoad:D,instrumentNavigation:W,detectRedirects:ue,linkPreviousTrace:P,consistentTraceSampling:$,onRequestSpanStart:G}={..._F,...e};let q,ie;function fe(ce,re,X=!0){const _e=re.op==="pageload",ge=h?h(re):re,he=ge.attributes||{};if(re.name!==ge.name&&(he[Hn]="custom",ge.attributes=he),!X){const se=no();oo({...ge,startTime:se}).end(se);return}t.name=ge.name,t.source=he[Hn];const Se=M0(ge,{idleTimeout:d,finalTimeout:m,childSpanTimeout:g,disableAutoFinish:_e,beforeSpanEnd:se=>{q?.(),Zk(se,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:F,ignorePerformanceApiSpans:J}),cy(ce,void 0);const He=tt(),vt=He.getPropagationContext();He.setPropagationContext({...vt,traceId:Se.spanContext().traceId,sampled:ro(Se),dsc:ur(se)})}});cy(ce,Se);function Xe(){n&&["interactive","complete"].includes(n.readyState)&&ce.emit("idleSpanEnableAutoFinish",Se)}_e&&n&&(n.addEventListener("readystatechange",()=>{Xe()}),Xe())}return{name:yF,setup(ce){if(b0(),q=zk({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:ce}),r&&vP(),i&&cP(),s&&We.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Vk():o&&Gk(),a&&qk(),ue&&n){const X=()=>{ie=Yt()};addEventListener("click",X,{capture:!0}),addEventListener("keydown",X,{capture:!0,passive:!0})}function re(){const X=qs(ce);X&&!Qe(X).timestamp&&(st&&Y.log(`[Tracing] Finishing current active span with op: ${Qe(X).op}`),X.setAttribute(uu,"cancelled"),X.end())}ce.on("startNavigationSpan",(X,_e)=>{if(Re()!==ce)return;if(_e?.isRedirect){st&&Y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),fe(ce,{op:"navigation.redirect",...X},!1);return}re(),Qt().setPropagationContext({traceId:qr(),sampleRand:Math.random()});const ge=tt();ge.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),ge.setSDKProcessingMetadata({normalizedRequest:void 0}),fe(ce,{op:"navigation",...X})}),ce.on("startPageLoadSpan",(X,_e={})=>{if(Re()!==ce)return;re();const ge=_e.sentryTrace||ay("sentry-trace"),he=_e.baggage||ay("baggage"),Se=d0(ge,he),Xe=tt();Xe.setPropagationContext(Se),Xe.setSDKProcessingMetadata({normalizedRequest:Hh()}),fe(ce,{op:"pageload",...X})})},afterAllSetup(ce){let re=to();if(P!=="off"&&hF(ce,{linkPreviousTrace:P,consistentTraceSampling:$}),Fe.location){if(D){const X=mn();bS(ce,{name:Fe.location.pathname,startTime:X?X/1e3:void 0,attributes:{[Hn]:"url",[Ft]:"auto.pageload.browser"}})}W&&ml(({to:X,from:_e})=>{if(_e===void 0&&re?.indexOf(X)!==-1){re=void 0;return}re=void 0;const ge=hv(X),he=qs(ce),Se=he&&ue&&EF(he,ie);vS(ce,{name:ge?.pathname||Fe.location.pathname,attributes:{[Hn]:"url",[Ft]:"auto.navigation.browser"}},{url:X,isRedirect:Se})})}E&&lF(),a&&vF(ce,d,m,g,t),r&&wP(),gS(ce,{traceFetch:T,traceXHR:L,trackFetchStreamPerformance:H,tracePropagationTargets:ce.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:K,enableHTTPTimings:V,onRequestSpanStart:G})}}};function bS(e,t,n){e.emit("startPageLoadSpan",t,n),tt().setTransactionName(t.name);const r=qs(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function vS(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=tt();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...Hh(),url:r}}),qs(e)}function ay(e){return Fe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function vF(e,t,n,r,i){const o=Fe.document;let s;const a=()=>{const c="ui.action.click",u=qs(e);if(u){const h=Qe(u).op;if(["navigation","pageload"].includes(h)){st&&Y.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(uu,"interactionInterrupted"),s.end(),s=void 0),!i.name){st&&Y.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=M0({name:i.name,op:c,attributes:{[Hn]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const ES="_sentry_idleSpan";function qs(e){return e[ES]}function cy(e,t){Nn(e,ES,t)}const uy=.3;function EF(e,t){const n=Qe(e),r=no(),i=n.start_timestamp;return!(r-i>uy||t&&r-t<=uy)}function Ko(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function SF(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ko(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function mp(e){return Ko(e.getAllKeys())}function wF(e,t,n){return e(r=>mp(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Ko(r.transaction)}))}function TF(e,t,n){return e(r=>mp(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Ko(r.transaction)}))}function IF(e){return e(t=>mp(t).then(n=>{const r=n[0];if(r!=null)return Ko(t.get(r)).then(i=>(t.delete(r),Ko(t.transaction).then(()=>i)))}))}function AF(e){let t;function n(){return t==null&&(t=SF(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=await fu(r);await wF(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=await fu(r);await TF(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await IF(n());if(r)return pO(r)}catch{}}}}function OF(e){return t=>{const n=e({...t,createStore:AF});return Fe.addEventListener("online",async r=>{await n.flush()}),n}}function CF(e=Xh){return OF(DC(e))}const ly=1e6,Qc=String(0),RF="main",Pu=Fe.navigator;let SS="",wS="",TS="",Rf=Pu?.userAgent||"",IS="";const MF=Pu?.language||Pu?.languages?.[0]||"";function NF(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const dy=Pu?.userAgentData;NF(dy)&&dy.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(SS=e.platform||"",TS=e.architecture||"",IS=e.model||"",wS=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Rf=`${t.brand} ${t.version}`}}).catch(e=>{});function kF(e){return!("thread_metadata"in e)}function PF(e){return kF(e)?DF(e):e}function xF(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&st&&Y.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function LF(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=xF(r),o=PF(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Yt()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Yt()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||il,runtime:{name:"javascript",version:Fe.navigator.userAgent},os:{name:SS,version:wS,build_number:Rf},device:{locale:MF,model:IS,manufacturer:Rf,architecture:TS,is_emulator:!1},debug_meta:{images:HF(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||Tn(),trace_id:i,active_thread_id:Qc,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function AS(e){return Qe(e).op==="pageload"}function DF(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Qc]:{name:RF}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=mn(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,h)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[h]={elapsed_since_start_ns:((u.timestamp+c-o)*ly).toFixed(0),stack_id:t,thread_id:Qc};return}let d=e.stacks[u.stackId];const m=[];for(;d;){m.push(d.frameId);const E=e.frames[d.frameId];E&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:E.name,abs_path:typeof E.resourceId=="number"?e.resources[E.resourceId]:void 0,lineno:E.line,colno:E.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const g={elapsed_since_start_ns:((u.timestamp+c-o)*ly).toFixed(0),stack_id:n,thread_id:Qc};r.stacks[n]=m,r.samples[h]=g,n++}),r}function BF(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function FF(e){const t=[];return Yi(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function HF(e){const r=Re()?.getOptions()?.stackParser;return r?zO(r,e):[]}function UF(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(st&&Y.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(st&&Y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function jF(e){return e.samples.length<2?(st&&Y.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(st&&Y.log("[Profiling] Discarding profile because it contains no frames"),!1)}let OS=!1;const CS=3e4;function $F(e){return typeof e=="function"}function WF(){const e=Fe.Profiler;if(!$F(e)){st&&Y.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(CS/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{st&&(Y.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),Y.log("[Profiling] Disabling profiling for current user session.")),OS=!0}}function fy(e){if(OS)return st&&Y.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return st&&Y.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=Re()?.getOptions();if(!n)return st&&Y.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return UF(r)?r?(r===!0?!0:Math.random()<r)?!0:(st&&Y.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(st&&Y.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(st&&Y.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function zF(e,t,n,r){return jF(n)?LF(e,t,n,r):null}const ji=new Map;function GF(){return ji.size}function VF(e){const t=ji.get(e);return t&&ji.delete(e),t}function qF(e,t){if(ji.set(e,t),ji.size>30){const n=ji.keys().next().value;ji.delete(n)}}function hy(e){let t;AS(e)&&(t=Yt()*1e3);const n=WF();if(!n)return;st&&Y.log(`[Profiling] started profiling span: ${Qe(e).description}`);const r=Tn();tt().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n)return n.stop().then(c=>{if(o&&(Fe.clearTimeout(o),o=void 0),st&&Y.log(`[Profiling] stopped profiling of span: ${Qe(e).description}`),!c){st&&Y.log(`[Profiling] profiler returned null profile for: ${Qe(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}qF(r,c)}).catch(c=>{st&&Y.log("[Profiling] error while stopping profiler:",c)})}let o=Fe.setTimeout(()=>{st&&Y.log("[Profiling] max profile duration elapsed, stopping profiling for:",Qe(e).description),i()},CS);const s=e.end.bind(e);function a(){return e?(i().then(()=>{s()},()=>{s()}),e):s()}e.end=a}const YF="BrowserProfiling",XF=()=>({name:YF,setup(e){const t=en(),n=t&&Zt(t);n&&AS(n)&&fy(n)&&hy(n),e.on("spanStart",r=>{r===Zt(r)&&fy(r)&&hy(r)}),e.on("beforeEnvelope",r=>{if(!GF())return;const i=FF(r);if(!i.length)return;const o=[];for(const s of i){const a=s?.contexts,c=a?.profile?.profile_id,u=a?.profile?.start_timestamp;if(typeof c!="string"){st&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){st&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}a?.profile&&delete a.profile;const h=VF(c);if(!h){st&&Y.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const d=zF(c,u,h,s);d&&o.push(d)}BF(r,o)})}}),KF=XF,JF="SpotlightBrowser",ZF=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:JF,setup:()=>{st&&Y.log("Using Sidecar URL",t)},processEvent:n=>t3(n)?null:n,afterAllSetup:n=>{QF(n,t)}}};function QF(e,t){const n=Vh("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){Y.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:fu(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,Y.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const e3=ZF;function t3(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const n3=()=>({name:"LaunchDarkly",processEvent(e,t,n){return la(e)}});function r3(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Fo(e,t.value),Ho(e,t.value)}}}const i3=()=>({name:"OpenFeature",processEvent(e,t,n){return la(e)}});class o3{after(t,n){Fo(n.flagKey,n.value),Ho(n.flagKey,n.value)}error(t,n,r){Fo(t.flagKey,t.defaultValue),Ho(t.flagKey,t.defaultValue)}}const s3=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;wn(t,"isEnabled",a3)},processEvent(t,n,r){return la(t)}});function a3(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Fo(n,r),Ho(n,r)):st&&Y.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const c3=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Fo(n.gate.name,n.gate.value),Ho(n.gate.name,n.gate.value)})},processEvent(t,n,r){return la(t)}});async function u3(){const e=Re();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}const l3="WebWorker",d3=({worker:e})=>({name:l3,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>py(t))},addWorker:t=>py(t)});function py(e){e.addEventListener("message",t=>{h3(t.data)&&(t.stopImmediatePropagation(),st&&Y.log("Sentry debugId web worker message received",t.data),Fe._sentryDebugIds={...t.data._sentryDebugIds,...Fe._sentryDebugIds})})}function f3({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function h3(e){return Gr(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(Gr(e._sentryDebugIds)||e._sentryDebugIds===void 0)}const p3=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:Fv,OpenFeatureIntegrationHook:o3,SDK_VERSION:jr,SEMANTIC_ATTRIBUTE_SENTRY_OP:jn,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:Ft,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:rl,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Hn,Scope:cr,WINDOW:Fe,addBreadcrumb:Ar,addEventProcessor:D0,addIntegration:ef,breadcrumbsIntegration:cE,browserApiErrorsIntegration:uE,browserProfilingIntegration:KF,browserSessionIntegration:lE,browserTracingIntegration:bF,buildLaunchDarklyFlagUsedHandler:r3,captureConsoleIntegration:hR,captureEvent:ua,captureException:Xi,captureFeedback:mv,captureMessage:gu,captureSession:Qd,chromeStackLineParser:rE,close:aC,consoleLoggingIntegration:gM,contextLinesIntegration:q2,continueTrace:RO,createTransport:J0,createUserFeedbackEnvelope:GP,dedupeIntegration:av,defaultRequestInstrumentationOptions:pp,defaultStackLineParsers:oE,defaultStackParser:sE,diagnoseSdkConnectivity:u3,endSession:Ch,eventFiltersIntegration:nv,eventFromException:Dv,eventFromMessage:Bv,exceptionFromError:ll,extraErrorDataIntegration:SR,featureFlagsIntegration:oM,feedbackAsyncIntegration:zN,feedbackIntegration:mg,feedbackSyncIntegration:mg,flush:sC,forceLoad:T2,functionToStringIntegration:tv,geckoStackLineParser:iE,getActiveSpan:en,getClient:Re,getCurrentScope:tt,getDefaultIntegrations:mE,getFeedback:eN,getGlobalScope:nl,getIsolationScope:Qt,getReplay:BB,getRootSpan:Zt,getSpanDescendants:Ps,getSpanStatusFromHttpCode:o0,getTraceData:Mh,globalHandlersIntegration:dE,graphqlClientIntegration:tx,httpClientIntegration:P2,httpContextIntegration:hE,inboundFiltersIntegration:rv,init:w2,instrumentOutgoingRequests:gS,instrumentSupabaseClient:dv,isEnabled:L0,isInitialized:cC,lastEventId:x0,launchDarklyIntegration:n3,lazyLoadIntegration:xv,linkedErrorsIntegration:pE,logger:JN,makeBrowserOfflineTransport:CF,makeFetchTransport:Xh,makeMultiplexedTransport:HC,moduleMetadataIntegration:uR,onLoad:I2,openFeatureIntegration:i3,opera10StackLineParser:jP,opera11StackLineParser:zP,parameterize:ev,registerSpanErrorInstrumentation:b0,registerWebWorker:f3,replayCanvasIntegration:nF,replayIntegration:xB,reportingObserverIntegration:M2,rewriteFramesIntegration:NR,sendFeedback:vv,setContext:P0,setCurrentClient:V0,setExtra:nC,setExtras:tC,setHttpStatus:js,setMeasurement:O0,setTag:iC,setTags:rC,setUser:oC,showReportDialog:A2,spanToBaggageHeader:oO,spanToJSON:Qe,spanToTraceHeader:m0,spotlightBrowserIntegration:e3,startBrowserTracingNavigationSpan:vS,startBrowserTracingPageLoadSpan:bS,startInactiveSpan:oo,startNewTrace:NO,startSession:Zd,startSpan:sl,startSpanManual:CO,statsigIntegration:c3,supabaseIntegration:zR,suppressTracing:MO,thirdPartyErrorFilterIntegration:eM,unleashIntegration:s3,updateSpanName:QA,webWorkerIntegration:d3,winjsStackLineParser:FP,withActiveSpan:aa,withIsolationScope:BA,withScope:Jn,zodErrorsIntegration:QR},Symbol.toStringTag,{value:"Module"})),wl=e=>{typeof window<"u"&&window.Sentry&&e(p3)},{useEffect:m3}=await kn("react"),RS=(e,t)=>m3(()=>{const n=e().catch(r=>{console.error("AsyncEffect error: ",r),wl(i=>i.captureException("AsyncEffect error: "+r.message,{extra:r}))});return function(){n.then(r=>{typeof r=="function"&&r()})}},t),{createContext:g3,useMemo:y3,useRef:_3,useState:b3}=await kn("react"),MS=g3(null),kU=e=>{const{writeKey:t,userId:n,traits:r,children:i}=e,o=_3(null),[s,a]=b3(!1);RS(async()=>{if(!t){console.log("[Analytics] No writeKey provided");return}const u=navigator.userAgent;if(rA(u)){console.log("[Analytics] Skipping load: bot detected");return}try{const{AnalyticsBrowser:d}=await dw(async()=>{const{AnalyticsBrowser:m}=await import("../index-NxahoDGS.js").then(g=>g.q);return{AnalyticsBrowser:m}},__vite__mapDeps([0,1,2,3,4]));o.current=d.load({writeKey:t}),n&&o.current.identify(n,r),a(!0)}catch(d){console.error("[Analytics] Failed to initialize:",d),o.current=null}},[t,n,r]);const c=y3(()=>!o.current||!s?{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}:{isInitialized:!0,track:(u,h)=>{o.current?.track(u,h)},identify:(u,h)=>{o.current?.identify(u,h)},page:(u,h)=>{o.current?.page(u,h)}},[s]);return Zy.jsx(MS.Provider,{value:c,children:i})},{createContext:v3}=await kn("react"),NS=v3(null);function Er(e,t){var n=t&&t.cache?t.cache:O3,r=t&&t.serializer?t.serializer:I3,i=t&&t.strategy?t.strategy:S3;return i(e,{cache:n,serializer:r})}function E3(e){return e==null||typeof e=="number"||typeof e=="boolean"}function kS(e,t,n,r){var i=E3(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function PS(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function gp(e,t,n,r,i){return n.bind(t,e,r,i)}function S3(e,t){var n=e.length===1?kS:PS;return gp(e,this,n,t.cache.create(),t.serializer)}function w3(e,t){return gp(e,this,PS,t.cache.create(),t.serializer)}function T3(e,t){return gp(e,this,kS,t.cache.create(),t.serializer)}var I3=function(){return JSON.stringify(arguments)},A3=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),O3={create:function(){return new A3}},Sr={variadic:w3,monadic:T3},ft;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ft||(ft={}));var kt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(kt||(kt={}));var Jo;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Jo||(Jo={}));function my(e){return e.type===kt.literal}function C3(e){return e.type===kt.argument}function xS(e){return e.type===kt.number}function LS(e){return e.type===kt.date}function DS(e){return e.type===kt.time}function BS(e){return e.type===kt.select}function FS(e){return e.type===kt.plural}function R3(e){return e.type===kt.pound}function HS(e){return e.type===kt.tag}function US(e){return!!(e&&typeof e=="object"&&e.type===Jo.number)}function Mf(e){return!!(e&&typeof e=="object"&&e.type===Jo.dateTime)}var jS=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,M3=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function N3(e){var t={};return e.replace(M3,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var k3=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function P3(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(k3).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),u=0,h=c;u<h.length;u++){var d=h[u];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:c})}return n}function x3(e){return e.replace(/^(.*?)-/,"")}var gy=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,$S=/^(@+)?(\+|#+)?[rs]?$/g,L3=/(\*)(0+)|(#+)(0+)|(0+)/g,WS=/^(0+)$/;function yy(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace($S,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function zS(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function D3(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!WS.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function _y(e){var t={},n=zS(e);return n||t}function B3(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=x3(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Be(Be(Be({},t),{notation:"scientific"}),i.options.reduce(function(c,u){return Be(Be({},c),_y(u))},{}));continue;case"engineering":t=Be(Be(Be({},t),{notation:"engineering"}),i.options.reduce(function(c,u){return Be(Be({},c),_y(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(L3,function(c,u,h,d,m,g){if(u)t.minimumIntegerDigits=h.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(WS.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(gy.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(gy,function(c,u,h,d,m,g){return h==="*"?t.minimumFractionDigits=u.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&g?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+g.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=Be(Be({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Be(Be({},t),yy(o)));continue}if($S.test(i.stem)){t=Be(Be({},t),yy(i.stem));continue}var s=zS(i.stem);s&&(t=Be(Be({},t),s));var a=D3(i.stem);a&&(t=Be(Be({},t),a))}return t}var Nc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function F3(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",u=H3(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function H3(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Nc[r||""]||Nc[n||""]||Nc["".concat(n,"-001")]||Nc["001"];return i[0]}var Id,U3=new RegExp("^".concat(jS.source,"*")),j3=new RegExp("".concat(jS.source,"*$"));function pt(e,t){return{start:e,end:t}}var $3=!!String.prototype.startsWith&&"_a".startsWith("a",1),W3=!!String.fromCodePoint,z3=!!Object.fromEntries,G3=!!String.prototype.codePointAt,V3=!!String.prototype.trimStart,q3=!!String.prototype.trimEnd,Y3=!!Number.isSafeInteger,X3=Y3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Nf=!0;try{var K3=VS("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Nf=((Id=K3.exec("a"))===null||Id===void 0?void 0:Id[0])==="a"}catch{Nf=!1}var by=$3?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},kf=W3?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,s;i>o;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},vy=z3?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],s=o[0],a=o[1];n[s]=a}return n},GS=G3?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},J3=V3?function(t){return t.trimStart()}:function(t){return t.replace(U3,"")},Z3=q3?function(t){return t.trimEnd()}:function(t){return t.replace(j3,"")};function VS(e,t){return new RegExp(e,t)}var Pf;if(Nf){var Ey=VS("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Pf=function(t,n){var r;Ey.lastIndex=n;var i=Ey.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Pf=function(t,n){for(var r=[];;){var i=GS(t,n);if(i===void 0||qS(i)||nH(i))break;r.push(i),n+=i>=65536?2:1}return kf.apply(void 0,r)};var Q3=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:kt.pound,location:pt(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,pt(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&xf(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:kt.literal,value:"<".concat(i,"/>"),location:pt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!xf(this.char()))return this.error(ft.INVALID_TAG,pt(a,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(ft.UNMATCHED_CLOSING_TAG,pt(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:kt.tag,value:i,children:s,location:pt(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,pt(a,this.clonePosition())))}else return this.error(ft.UNCLOSED_TAG,pt(r,this.clonePosition()))}else return this.error(ft.INVALID_TAG,pt(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&tH(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=pt(r,this.clonePosition());return{val:{type:kt.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!eH(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return kf.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),kf(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ft.EMPTY_ARGUMENT,pt(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ft.MALFORMED_ARGUMENT,pt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:kt.argument,value:i,location:pt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ft.MALFORMED_ARGUMENT,pt(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Pf(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=pt(t,o);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(ft.EXPECT_ARGUMENT_TYPE,pt(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var m=Z3(d.val);if(m.length===0)return this.error(ft.EXPECT_ARGUMENT_STYLE,pt(this.clonePosition(),this.clonePosition()));var g=pt(h,this.clonePosition());u={style:m,styleLocation:g}}var E=this.tryParseArgumentClose(i);if(E.err)return E;var T=pt(i,this.clonePosition());if(u&&by(u?.style,"::",0)){var L=J3(u.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(L,u.styleLocation);return d.err?d:{val:{type:kt.number,value:r,location:T,style:d.val},err:null}}else{if(L.length===0)return this.error(ft.EXPECT_DATE_TIME_SKELETON,T);var H=L;this.locale&&(H=F3(L,this.locale));var m={type:Jo.dateTime,pattern:H,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?N3(H):{}},K=a==="date"?kt.date:kt.time;return{val:{type:K,value:r,location:T,style:m},err:null}}}return{val:{type:a==="number"?kt.number:a==="date"?kt.date:kt.time,value:r,location:T,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var V=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,pt(V,Be({},V)));this.bumpSpace();var F=this.parseIdentifierIfPossible(),J=0;if(a!=="select"&&F.value==="offset"){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,pt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),F=this.parseIdentifierIfPossible(),J=d.val}var D=this.tryParsePluralOrSelectOptions(t,a,n,F);if(D.err)return D;var E=this.tryParseArgumentClose(i);if(E.err)return E;var W=pt(i,this.clonePosition());return a==="select"?{val:{type:kt.select,value:r,options:vy(D.val),location:W},err:null}:{val:{type:kt.plural,value:r,options:vy(D.val),offset:J,pluralType:a==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(ft.INVALID_ARGUMENT_TYPE,pt(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ft.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,pt(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=P3(t)}catch{return this.error(ft.INVALID_NUMBER_SKELETON,n)}return{val:{type:Jo.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?B3(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,s=!1,a=[],c=new Set,u=i.value,h=i.location;;){if(u.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ft.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;h=pt(d,this.clonePosition()),u=this.message.slice(d.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(s=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,pt(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(t+1,n,r);if(E.err)return E;var T=this.tryParseArgumentClose(g);if(T.err)return T;a.push([u,{value:E.val,location:pt(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return a.length===0?this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,pt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ft.MISSING_OTHER_CLAUSE,pt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=pt(i,this.clonePosition());return o?(s*=r,X3(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=GS(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(by(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&qS(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function xf(e){return e>=97&&e<=122||e>=65&&e<=90}function eH(e){return xf(e)||e===47}function tH(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function qS(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function nH(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Lf(e){e.forEach(function(t){if(delete t.location,BS(t)||FS(t))for(var n in t.options)delete t.options[n].location,Lf(t.options[n].value);else xS(t)&&US(t.style)||(LS(t)||DS(t))&&Mf(t.style)?delete t.style.location:HS(t)&&Lf(t.children)})}function rH(e,t){t===void 0&&(t={}),t=Be({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Q3(e,t).parse();if(n.err){var r=SyntaxError(ft[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Lf(n.val),n.val}var Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var Ci=function(e){dr(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Sy=function(e){dr(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Or.INVALID_VALUE,o)||this}return t}(Ci),iH=function(e){dr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Or.INVALID_VALUE,i)||this}return t}(Ci),oH=function(e){dr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Or.MISSING_VALUE,r)||this}return t}(Ci),vn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(vn||(vn={}));function sH(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==vn.literal||n.type!==vn.literal?t.push(n):r.value+=n.value,t},[])}function aH(e){return typeof e=="function"}function eu(e,t,n,r,i,o,s){if(e.length===1&&my(e[0]))return[{type:vn.literal,value:e[0].value}];for(var a=[],c=0,u=e;c<u.length;c++){var h=u[c];if(my(h)){a.push({type:vn.literal,value:h.value});continue}if(R3(h)){typeof o=="number"&&a.push({type:vn.literal,value:n.getNumberFormat(t).format(o)});continue}var d=h.value;if(!(i&&d in i))throw new oH(d,s);var m=i[d];if(C3(h)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?vn.literal:vn.object,value:m});continue}if(LS(h)){var g=typeof h.style=="string"?r.date[h.style]:Mf(h.style)?h.style.parsedOptions:void 0;a.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(DS(h)){var g=typeof h.style=="string"?r.time[h.style]:Mf(h.style)?h.style.parsedOptions:r.time.medium;a.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(xS(h)){var g=typeof h.style=="string"?r.number[h.style]:US(h.style)?h.style.parsedOptions:void 0;g&&g.scale&&(m=m*(g.scale||1)),a.push({type:vn.literal,value:n.getNumberFormat(t,g).format(m)});continue}if(HS(h)){var E=h.children,T=h.value,L=i[T];if(!aH(L))throw new iH(T,"function",s);var H=eu(E,t,n,r,i,o),K=L(H.map(function(J){return J.value}));Array.isArray(K)||(K=[K]),a.push.apply(a,K.map(function(J){return{type:typeof J=="string"?vn.literal:vn.object,value:J}}))}if(BS(h)){var V=h.options[m]||h.options.other;if(!V)throw new Sy(h.value,m,Object.keys(h.options),s);a.push.apply(a,eu(V.value,t,n,r,i));continue}if(FS(h)){var V=h.options["=".concat(m)];if(!V){if(!Intl.PluralRules)throw new Ci(`Intl.PluralRules is not available in this environment.
514
+ or you can use record.mirror to access the mirror instance during recording.`;let ey={map:{},getId(){return console.error(Io),-1},getNode(){return console.error(Io),null},removeNodeFromMap(){console.error(Io)},has(){return console.error(Io),!1},reset(){console.error(Io)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ey=new Proxy(ey,{get(e,t,n){return t==="map"&&console.error(Io),Reflect.get(e,t,n)}}));function pp(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){pS(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>pp(e,t,o||{},!0)}function mp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function GB(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Sl(e,t,n,r,i){if(!e)return!1;const o=GB(e);if(!o)return!1;const s=Qg(t,n),a=Rf(o,s);let c=-1;return a<0?!1:(r&&(c=Rf(o,Qg(null,r))),a>-1&&c<0?!0:a<c)}const ty={};function hS(e){const t=ty[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return ty[e]=r.bind(window)}function ki(...e){return hS("requestAnimationFrame")(...e)}function pS(...e){return hS("setTimeout")(...e)}var Xo=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Xo||{});let Jc;function VB(e){Jc=e}const wd=e=>Jc?(...n)=>{try{return e(...n)}catch(r){if(Jc&&Jc(r)===!0)return()=>{};throw r}}:e;var No="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qB=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Rc=0;Rc<No.length;Rc++)qB[No.charCodeAt(Rc)]=Rc;var YB=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=No[t[n]>>2],i+=No[(t[n]&3)<<4|t[n+1]>>4],i+=No[(t[n+1]&15)<<2|t[n+2]>>6],i+=No[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const ny=new Map;function XB(e,t){let n=ny.get(e);return n||(n=new Map,ny.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const mS=(e,t,n)=>{if(!e||!(yS(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=XB(n,r);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Zc(e,t,n){if(e instanceof Array)return e.map(r=>Zc(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,i=YB(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Zc(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Zc(e.data,t,n),e.width,e.height]};if(yS(e,t)||typeof e=="object"){const r=e.constructor.name,i=mS(e,t,n);return{rr_type:r,index:i}}}}return e}const gS=(e,t,n)=>e.map(r=>Zc(r,t,n)),yS=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function KB(e,t,n,r,i){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=mp(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...h){return Sl(this.canvas,n,r,i,!0)||pS(()=>{const d=gS(h,t,this);e(this.canvas,{type:Xo["2D"],property:a,args:d})},0),u.apply(this,h)}});o.push(c)}catch{const c=pp(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Xo["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function JB(e){return e==="experimental-webgl"?"webgl":e}function ry(e,t,n,r,i){const o=[];try{const s=mp(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Sl(this,t,n,r,!0)){const h=JB(c);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(u[0]&&typeof u[0]=="object"){const d=u[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function iy(e,t,n,r,i,o,s,a){const c=[],u=Object.getOwnPropertyNames(e);for(const h of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const d=mp(e,h,function(m){return function(...g){const E=m.apply(this,g);if(mS(E,a,this),"tagName"in this.canvas&&!Sl(this.canvas,r,i,o,!0)){const T=gS(g,a,this),L={type:t,property:h,args:T};n(this.canvas,L)}return E}});c.push(d)}catch{const d=pp(e,h,{set(m){n(this.canvas,{type:t,property:h,args:[m],setter:!0})}});c.push(d)}return c}function ZB(e,t,n,r,i,o){const s=[];return s.push(...iy(t.WebGLRenderingContext.prototype,Xo.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...iy(t.WebGL2RenderingContext.prototype,Xo.WebGL2,e,n,r,i,o,t)),()=>{s.forEach(a=>a())}}const QB='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function eF(){const e=new Blob([QB]);return URL.createObjectURL(e)}class tF{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&VB(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&wd(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:i,unblockSelector:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}wd(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){const c=ry(t,r,i,o,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}ki(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(eF());return t.onmessage=n=>{const r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;const{base64:o,type:s,width:a,height:c}=r;this.mutationCb({id:i,type:Xo["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=ki(n)};t=ki(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){const o=ry(t,n,r,i,!1),s=KB(this.processMutation.bind(this),t,n,r,i),a=ZB(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){const i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{Sl(a,t,n,r)||i.push(a)})};for(const s of this.windows){const a=s.deref();let c;try{c=a&&a.document}catch{}c&&o(c)}for(const s of this.shadowDoms){const a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){const{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,d=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEach(E=>{const T=this.mirror.getId(E);if(!(!this.mirror.hasNode(E)||!E.width||!E.height||this.snapshotInProgressMap.get(T))){if(this.snapshotInProgressMap.set(T,!0),!n&&["webgl","webgl2"].includes(E.__context)){const L=E.getContext(E.__context);L?.getContextAttributes()?.preserveDrawingBuffer===!1&&L.clear(L.COLOR_BUFFER_BIT)}createImageBitmap(E).then(L=>{this.worker?.postMessage({id:T,bitmap:L,width:E.width,height:E.height,dataURLOptions:c,maxCanvasSize:u},[L])}).catch(L=>{wd(()=>{throw this.snapshotInProgressMap.delete(T),L})()})}}),!0)}startPendingCanvasMutationFlusher(){ki(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,ki(t)};ki(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),ki(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const i=r.map(s=>{const{type:a,...c}=s;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}WB();var oy;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(oy||(oy={}));const sy={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},nF="ReplayCanvas",Mc=1280,rF=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Mc):Mc,n?Math.min(n,Mc):Mc]};let i;const o=new Promise(s=>i=s);return{name:nF,getOptions(){const{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return{enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{const h=new tF({...u,enableManualSnapshot:a,maxCanvasSize:c,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return i(h),h},...sy[s]||sy.medium}},async snapshot(s,a){(await o).snapshot(s,a)}}},iF=rF;function br(e=0){return((mn()||performance.timeOrigin)+e)/1e3}function oF(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=eE(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return mn()?[...t,["http.request.redirect_start",br(e.redirectStart)],["http.request.fetch_start",br(e.fetchStart)],["http.request.domain_lookup_start",br(e.domainLookupStart)],["http.request.domain_lookup_end",br(e.domainLookupEnd)],["http.request.connect_start",br(e.connectStart)],["http.request.secure_connection_start",br(e.secureConnectionStart)],["http.request.connection_end",br(e.connectEnd)],["http.request.request_start",br(e.requestStart)],["http.request.response_start",br(e.responseStart)],["http.request.response_end",br(e.responseEnd)]]:t}const ay=new WeakMap,Td=new Map,gp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function _S(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c}={...gp,...t},u=typeof o=="function"?o:m=>!0,h=m=>aF(m,a),d={};n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(g=>{if(g.op==="http.client"){const E=Td.get(g.span_id);E&&(g.timestamp=E/1e3,Td.delete(g.span_id))}}),m)),i&&wM(m=>{if(m.response){const g=ay.get(m.response);g&&m.endTimestamp&&Td.set(g,m.endTimestamp)}}),Lh(m=>{const g=lM(m,u,h,d);if(m.response&&m.fetchData.__span&&ay.set(m.response,m.fetchData.__span),g){const E=bS(m.fetchData.url),T=E?zi(E).host:void 0;g.setAttributes({"http.url":E,"server.address":T}),s&&cy(g),c?.(g,{headers:m.headers})}})),r&&Xh(m=>{const g=cF(m,u,h,d);if(g){s&&cy(g);let E;try{E=new Headers(m.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(g,{headers:E})}})}function sF(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function cy(e){const{url:t}=Qe(e).data;if(!t||typeof t!="string")return;const n=Ki("resource",({entries:r})=>{r.forEach(i=>{sF(i)&&i.name.endsWith(t)&&(oF(i).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function aF(e,t){const n=to();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const o=r.origin===i;return t?ar(r.toString(),t)||o&&ar(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?ar(e,t):r}}function cF(e,t,n,r){const i=e.xhr,o=i?.[Fr];if(!i||i.__sentry_own_request__||!o)return;const{url:s,method:a}=o,c=vi()&&t(s);if(e.endTimestamp&&c){const T=i.__sentry_xhr_span_id__;if(!T)return;const L=r[T];L&&o.status_code!==void 0&&(js(L,o.status_code),L.end(),delete r[T]);return}const u=bS(s),h=zi(u||s),d=gv(s),m=!!en(),g=c&&m?oo({name:`${a} ${d}`,attributes:{url:s,type:"xhr","http.method":a,"http.url":u,"server.address":h?.host,[Ft]:"auto.http.browser",[jn]:"http.client",...h?.search&&{"http.query":h?.search},...h?.hash&&{"http.fragment":h?.hash}}}):new Yr;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(s)&&uF(i,vi()&&m?g:void 0);const E=Re();return E&&E.emit("beforeOutgoingRequestSpan",g,e),g}function uF(e,t){const{"sentry-trace":n,baggage:r}=kh({span:t});n&&lF(e,n,r)}function lF(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const i=r?.baggage;(!i||!dF(i))&&e.setRequestHeader("baggage",n)}}catch{}}function dF(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function bS(e){try{return new URL(e,Fe.location.origin).href}catch{return}}function fF(){Fe.document?Fe.document.addEventListener("visibilitychange",()=>{const e=en();if(!e)return;const t=Zt(e);if(Fe.document.hidden&&t){const n="cancelled",{op:r,status:i}=Qe(t);st&&Y.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:zt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):st&&Y.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const hF=3600,vS="sentry_previous_trace",pF="sentry.previous_trace";function mF(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?_F():void 0;e.on("spanStart",s=>{if(Zt(s)!==s)return;const a=tt().getPropagationContext();i=gF(i,s,a),r&&yF(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;const a=tt(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(Mf(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Mf(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[s0]:i.sampleRate}})}function gF(e,t,n){const r=Qe(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[rl])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=hF&&(st&&Y.log(`Adding previous_trace ${s} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:s,attributes:{[$A]:"previous_trace"}}),t.setAttribute(pF,`${s.traceId}-${s.spanId}-${Mf(s)?1:0}`)),o)}function yF(e){try{Fe.sessionStorage.setItem(vS,JSON.stringify(e))}catch(t){st&&Y.warn("Could not store previous trace in sessionStorage",t)}}function _F(){try{const e=Fe.sessionStorage?.getItem(vS);return JSON.parse(e)}catch{return}}function Mf(e){return e.traceFlags===1}const bF="BrowserTracing",vF={...Uc,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...gp},EF=(e={})=>{const t={name:void 0,source:void 0},n=Fe.document,{enableInp:r,enableElementTiming:i,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:h,idleTimeout:d,finalTimeout:m,childSpanTimeout:g,markBackgroundSpan:E,traceFetch:T,traceXHR:L,trackFetchStreamPerformance:H,shouldCreateSpanForRequest:K,enableHTTPTimings:V,ignoreResourceSpans:F,ignorePerformanceApiSpans:J,instrumentPageLoad:D,instrumentNavigation:W,detectRedirects:ue,linkPreviousTrace:P,consistentTraceSampling:$,onRequestSpanStart:G}={...vF,...e};let q,ie;function fe(ce,re,X=!0){const _e=re.op==="pageload",ge=h?h(re):re,he=ge.attributes||{};if(re.name!==ge.name&&(he[Hn]="custom",ge.attributes=he),!X){const se=no();oo({...ge,startTime:se}).end(se);return}t.name=ge.name,t.source=he[Hn];const Se=k0(ge,{idleTimeout:d,finalTimeout:m,childSpanTimeout:g,disableAutoFinish:_e,beforeSpanEnd:se=>{q?.(),eP(se,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:F,ignorePerformanceApiSpans:J}),ly(ce,void 0);const He=tt(),vt=He.getPropagationContext();He.setPropagationContext({...vt,traceId:Se.spanContext().traceId,sampled:ro(Se),dsc:ur(se)})}});ly(ce,Se);function Xe(){n&&["interactive","complete"].includes(n.readyState)&&ce.emit("idleSpanEnableAutoFinish",Se)}_e&&n&&(n.addEventListener("readystatechange",()=>{Xe()}),Xe())}return{name:bF,setup(ce){if(E0(),q=Vk({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:ce}),r&&SP(),i&&lP(),s&&We.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Yk():o&&qk(),a&&Xk(),ue&&n){const X=()=>{ie=Yt()};addEventListener("click",X,{capture:!0}),addEventListener("keydown",X,{capture:!0,passive:!0})}function re(){const X=qs(ce);X&&!Qe(X).timestamp&&(st&&Y.log(`[Tracing] Finishing current active span with op: ${Qe(X).op}`),X.setAttribute(uu,"cancelled"),X.end())}ce.on("startNavigationSpan",(X,_e)=>{if(Re()!==ce)return;if(_e?.isRedirect){st&&Y.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),fe(ce,{op:"navigation.redirect",...X},!1);return}re(),Qt().setPropagationContext({traceId:qr(),sampleRand:Math.random()});const ge=tt();ge.setPropagationContext({traceId:qr(),sampleRand:Math.random()}),ge.setSDKProcessingMetadata({normalizedRequest:void 0}),fe(ce,{op:"navigation",...X})}),ce.on("startPageLoadSpan",(X,_e={})=>{if(Re()!==ce)return;re();const ge=_e.sentryTrace||uy("sentry-trace"),he=_e.baggage||uy("baggage"),Se=h0(ge,he),Xe=tt();Xe.setPropagationContext(Se),Xe.setSDKProcessingMetadata({normalizedRequest:jh()}),fe(ce,{op:"pageload",...X})})},afterAllSetup(ce){let re=to();if(P!=="off"&&mF(ce,{linkPreviousTrace:P,consistentTraceSampling:$}),Fe.location){if(D){const X=mn();ES(ce,{name:Fe.location.pathname,startTime:X?X/1e3:void 0,attributes:{[Hn]:"url",[Ft]:"auto.pageload.browser"}})}W&&ml(({to:X,from:_e})=>{if(_e===void 0&&re?.indexOf(X)!==-1){re=void 0;return}re=void 0;const ge=mv(X),he=qs(ce),Se=he&&ue&&wF(he,ie);SS(ce,{name:ge?.pathname||Fe.location.pathname,attributes:{[Hn]:"url",[Ft]:"auto.navigation.browser"}},{url:X,isRedirect:Se})})}E&&fF(),a&&SF(ce,d,m,g,t),r&&IP(),_S(ce,{traceFetch:T,traceXHR:L,trackFetchStreamPerformance:H,tracePropagationTargets:ce.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:K,enableHTTPTimings:V,onRequestSpanStart:G})}}};function ES(e,t,n){e.emit("startPageLoadSpan",t,n),tt().setTransactionName(t.name);const r=qs(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function SS(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});const o=tt();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...jh(),url:r}}),qs(e)}function uy(e){return Fe.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function SF(e,t,n,r,i){const o=Fe.document;let s;const a=()=>{const c="ui.action.click",u=qs(e);if(u){const h=Qe(u).op;if(["navigation","pageload"].includes(h)){st&&Y.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(uu,"interactionInterrupted"),s.end(),s=void 0),!i.name){st&&Y.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=k0({name:i.name,op:c,attributes:{[Hn]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const wS="_sentry_idleSpan";function qs(e){return e[wS]}function ly(e,t){Nn(e,wS,t)}const dy=.3;function wF(e,t){const n=Qe(e),r=no(),i=n.start_timestamp;return!(r-i>dy||t&&r-t<=dy)}function Ko(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function TF(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Ko(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function yp(e){return Ko(e.getAllKeys())}function IF(e,t,n){return e(r=>yp(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Ko(r.transaction)}))}function AF(e,t,n){return e(r=>yp(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Ko(r.transaction)}))}function OF(e){return e(t=>yp(t).then(n=>{const r=n[0];if(r!=null)return Ko(t.get(r)).then(i=>(t.delete(r),Ko(t.transaction).then(()=>i)))}))}function CF(e){let t;function n(){return t==null&&(t=TF(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const i=await fu(r);await IF(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const i=await fu(r);await AF(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await OF(n());if(r)return gO(r)}catch{}}}}function RF(e){return t=>{const n=e({...t,createStore:CF});return Fe.addEventListener("online",async r=>{await n.flush()}),n}}function MF(e=Jh){return RF(FC(e))}const fy=1e6,Qc=String(0),NF="main",Pu=Fe.navigator;let TS="",IS="",AS="",Nf=Pu?.userAgent||"",OS="";const kF=Pu?.language||Pu?.languages?.[0]||"";function PF(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const hy=Pu?.userAgentData;PF(hy)&&hy.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(TS=e.platform||"",AS=e.architecture||"",OS=e.model||"",IS=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Nf=`${t.brand} ${t.version}`}}).catch(e=>{});function xF(e){return!("thread_metadata"in e)}function LF(e){return xF(e)?FF(e):e}function DF(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&st&&Y.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function BF(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=DF(r),o=LF(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Yt()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:Yt()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||il,runtime:{name:"javascript",version:Fe.navigator.userAgent},os:{name:TS,version:IS,build_number:Nf},device:{locale:kF,model:OS,manufacturer:Nf,architecture:AS,is_emulator:!1},debug_meta:{images:jF(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||Tn(),trace_id:i,active_thread_id:Qc,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function CS(e){return Qe(e).op==="pageload"}function FF(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Qc]:{name:NF}}},i=e.samples[0];if(!i)return r;const o=i.timestamp,s=mn(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,h)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[h]={elapsed_since_start_ns:((u.timestamp+c-o)*fy).toFixed(0),stack_id:t,thread_id:Qc};return}let d=e.stacks[u.stackId];const m=[];for(;d;){m.push(d.frameId);const E=e.frames[d.frameId];E&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:E.name,abs_path:typeof E.resourceId=="number"?e.resources[E.resourceId]:void 0,lineno:E.line,colno:E.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const g={elapsed_since_start_ns:((u.timestamp+c-o)*fy).toFixed(0),stack_id:n,thread_id:Qc};r.stacks[n]=m,r.samples[h]=g,n++}),r}function HF(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function UF(e){const t=[];return Yi(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function jF(e){const r=Re()?.getOptions()?.stackParser;return r?VO(r,e):[]}function $F(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(st&&Y.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(st&&Y.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function WF(e){return e.samples.length<2?(st&&Y.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(st&&Y.log("[Profiling] Discarding profile because it contains no frames"),!1)}let RS=!1;const MS=3e4;function zF(e){return typeof e=="function"}function GF(){const e=Fe.Profiler;if(!zF(e)){st&&Y.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(MS/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{st&&(Y.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),Y.log("[Profiling] Disabling profiling for current user session.")),RS=!0}}function py(e){if(RS)return st&&Y.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return st&&Y.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const n=Re()?.getOptions();if(!n)return st&&Y.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return $F(r)?r?(r===!0?!0:Math.random()<r)?!0:(st&&Y.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(st&&Y.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(st&&Y.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function VF(e,t,n,r){return WF(n)?BF(e,t,n,r):null}const ji=new Map;function qF(){return ji.size}function YF(e){const t=ji.get(e);return t&&ji.delete(e),t}function XF(e,t){if(ji.set(e,t),ji.size>30){const n=ji.keys().next().value;ji.delete(n)}}function my(e){let t;CS(e)&&(t=Yt()*1e3);const n=GF();if(!n)return;st&&Y.log(`[Profiling] started profiling span: ${Qe(e).description}`);const r=Tn();tt().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n)return n.stop().then(c=>{if(o&&(Fe.clearTimeout(o),o=void 0),st&&Y.log(`[Profiling] stopped profiling of span: ${Qe(e).description}`),!c){st&&Y.log(`[Profiling] profiler returned null profile for: ${Qe(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}XF(r,c)}).catch(c=>{st&&Y.log("[Profiling] error while stopping profiler:",c)})}let o=Fe.setTimeout(()=>{st&&Y.log("[Profiling] max profile duration elapsed, stopping profiling for:",Qe(e).description),i()},MS);const s=e.end.bind(e);function a(){return e?(i().then(()=>{s()},()=>{s()}),e):s()}e.end=a}const KF="BrowserProfiling",JF=()=>({name:KF,setup(e){const t=en(),n=t&&Zt(t);n&&CS(n)&&py(n)&&my(n),e.on("spanStart",r=>{r===Zt(r)&&py(r)&&my(r)}),e.on("beforeEnvelope",r=>{if(!qF())return;const i=UF(r);if(!i.length)return;const o=[];for(const s of i){const a=s?.contexts,c=a?.profile?.profile_id,u=a?.profile?.start_timestamp;if(typeof c!="string"){st&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){st&&Y.log("[Profiling] cannot find profile for a span without a profile context");continue}a?.profile&&delete a.profile;const h=YF(c);if(!h){st&&Y.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}const d=VF(c,u,h,s);d&&o.push(d)}HF(r,o)})}}),ZF=JF,QF="SpotlightBrowser",e3=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:QF,setup:()=>{st&&Y.log("Using Sidecar URL",t)},processEvent:n=>r3(n)?null:n,afterAllSetup:n=>{t3(n,t)}}};function t3(e,t){const n=Yh("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){Y.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:fu(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,Y.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}const n3=e3;function r3(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}const i3=()=>({name:"LaunchDarkly",processEvent(e,t,n){return la(e)}});function o3(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Fo(e,t.value),Ho(e,t.value)}}}const s3=()=>({name:"OpenFeature",processEvent(e,t,n){return la(e)}});class a3{after(t,n){Fo(n.flagKey,n.value),Ho(n.flagKey,n.value)}error(t,n,r){Fo(t.flagKey,t.defaultValue),Ho(t.flagKey,t.defaultValue)}}const c3=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;wn(t,"isEnabled",u3)},processEvent(t,n,r){return la(t)}});function u3(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Fo(n,r),Ho(n,r)):st&&Y.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const l3=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Fo(n.gate.name,n.gate.value),Ho(n.gate.name,n.gate.value)})},processEvent(t,n,r){return la(t)}});async function d3(){const e=Re();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}const f3="WebWorker",h3=({worker:e})=>({name:f3,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>gy(t))},addWorker:t=>gy(t)});function gy(e){e.addEventListener("message",t=>{m3(t.data)&&(t.stopImmediatePropagation(),st&&Y.log("Sentry debugId web worker message received",t.data),Fe._sentryDebugIds={...t.data._sentryDebugIds,...Fe._sentryDebugIds})})}function p3({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function m3(e){return Gr(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(Gr(e._sentryDebugIds)||e._sentryDebugIds===void 0)}const g3=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:Uv,OpenFeatureIntegrationHook:a3,SDK_VERSION:jr,SEMANTIC_ATTRIBUTE_SENTRY_OP:jn,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:Ft,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:rl,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:Hn,Scope:cr,WINDOW:Fe,addBreadcrumb:Ar,addEventProcessor:F0,addIntegration:nf,breadcrumbsIntegration:lE,browserApiErrorsIntegration:dE,browserProfilingIntegration:ZF,browserSessionIntegration:fE,browserTracingIntegration:EF,buildLaunchDarklyFlagUsedHandler:o3,captureConsoleIntegration:mR,captureEvent:ua,captureException:Xi,captureFeedback:yv,captureMessage:gu,captureSession:tf,chromeStackLineParser:oE,close:uC,consoleLoggingIntegration:_M,contextLinesIntegration:X2,continueTrace:NO,createTransport:Q0,createUserFeedbackEnvelope:qP,dedupeIntegration:uv,defaultRequestInstrumentationOptions:gp,defaultStackLineParsers:aE,defaultStackParser:cE,diagnoseSdkConnectivity:d3,endSession:Mh,eventFiltersIntegration:iv,eventFromException:Fv,eventFromMessage:Hv,exceptionFromError:ll,extraErrorDataIntegration:TR,featureFlagsIntegration:aM,feedbackAsyncIntegration:VN,feedbackIntegration:yg,feedbackSyncIntegration:yg,flush:cC,forceLoad:A2,functionToStringIntegration:rv,geckoStackLineParser:sE,getActiveSpan:en,getClient:Re,getCurrentScope:tt,getDefaultIntegrations:yE,getFeedback:nN,getGlobalScope:nl,getIsolationScope:Qt,getReplay:HB,getRootSpan:Zt,getSpanDescendants:Ps,getSpanStatusFromHttpCode:a0,getTraceData:kh,globalHandlersIntegration:hE,graphqlClientIntegration:rx,httpClientIntegration:L2,httpContextIntegration:mE,inboundFiltersIntegration:ov,init:I2,instrumentOutgoingRequests:_S,instrumentSupabaseClient:hv,isEnabled:B0,isInitialized:lC,lastEventId:D0,launchDarklyIntegration:i3,lazyLoadIntegration:Dv,linkedErrorsIntegration:gE,logger:QN,makeBrowserOfflineTransport:MF,makeFetchTransport:Jh,makeMultiplexedTransport:jC,moduleMetadataIntegration:dR,onLoad:O2,openFeatureIntegration:s3,opera10StackLineParser:WP,opera11StackLineParser:VP,parameterize:nv,registerSpanErrorInstrumentation:E0,registerWebWorker:p3,replayCanvasIntegration:iF,replayIntegration:DB,reportingObserverIntegration:k2,rewriteFramesIntegration:PR,sendFeedback:Sv,setContext:L0,setCurrentClient:Y0,setExtra:iC,setExtras:rC,setHttpStatus:js,setMeasurement:R0,setTag:sC,setTags:oC,setUser:aC,showReportDialog:C2,spanToBaggageHeader:aO,spanToJSON:Qe,spanToTraceHeader:y0,spotlightBrowserIntegration:n3,startBrowserTracingNavigationSpan:SS,startBrowserTracingPageLoadSpan:ES,startInactiveSpan:oo,startNewTrace:PO,startSession:ef,startSpan:sl,startSpanManual:MO,statsigIntegration:l3,supabaseIntegration:VR,suppressTracing:kO,thirdPartyErrorFilterIntegration:nM,unleashIntegration:c3,updateSpanName:tO,webWorkerIntegration:h3,winjsStackLineParser:UP,withActiveSpan:aa,withIsolationScope:HA,withScope:Jn,zodErrorsIntegration:tM},Symbol.toStringTag,{value:"Module"})),wl=e=>{typeof window<"u"&&window.Sentry&&e(g3)},{useEffect:y3}=await kn("react"),NS=(e,t)=>y3(()=>{const n=e().catch(r=>{console.error("AsyncEffect error: ",r),wl(i=>i.captureException("AsyncEffect error: "+r.message,{extra:r}))});return function(){n.then(r=>{typeof r=="function"&&r()})}},t),{createContext:_3,useMemo:b3,useRef:v3,useState:E3}=await kn("react"),kS=_3(null),xU=e=>{const{writeKey:t,userId:n,traits:r,children:i}=e,o=v3(null),[s,a]=E3(!1);NS(async()=>{if(!t){console.log("[Analytics] No writeKey provided");return}const u=navigator.userAgent;if(oA(u)){console.log("[Analytics] Skipping load: bot detected");return}try{const{AnalyticsBrowser:d}=await hw(async()=>{const{AnalyticsBrowser:m}=await import("../index-CA-WFTlT.js").then(g=>g.q);return{AnalyticsBrowser:m}},__vite__mapDeps([0,1,2,3,4]));o.current=d.load({writeKey:t}),n&&o.current.identify(n,r),a(!0)}catch(d){console.error("[Analytics] Failed to initialize:",d),o.current=null}},[t,n,r]);const c=b3(()=>!o.current||!s?{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}:{isInitialized:!0,track:(u,h)=>{o.current?.track(u,h)},identify:(u,h)=>{o.current?.identify(u,h)},page:(u,h)=>{o.current?.page(u,h)}},[s]);return e_.jsx(kS.Provider,{value:c,children:i})},{createContext:S3}=await kn("react"),PS=S3(null);function Er(e,t){var n=t&&t.cache?t.cache:R3,r=t&&t.serializer?t.serializer:O3,i=t&&t.strategy?t.strategy:T3;return i(e,{cache:n,serializer:r})}function w3(e){return e==null||typeof e=="number"||typeof e=="boolean"}function xS(e,t,n,r){var i=w3(r)?r:n(r),o=t.get(i);return typeof o>"u"&&(o=e.call(this,r),t.set(i,o)),o}function LS(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,r),t.set(i,o)),o}function _p(e,t,n,r,i){return n.bind(t,e,r,i)}function T3(e,t){var n=e.length===1?xS:LS;return _p(e,this,n,t.cache.create(),t.serializer)}function I3(e,t){return _p(e,this,LS,t.cache.create(),t.serializer)}function A3(e,t){return _p(e,this,xS,t.cache.create(),t.serializer)}var O3=function(){return JSON.stringify(arguments)},C3=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),R3={create:function(){return new C3}},Sr={variadic:I3,monadic:A3},ft;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ft||(ft={}));var kt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(kt||(kt={}));var Jo;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Jo||(Jo={}));function yy(e){return e.type===kt.literal}function M3(e){return e.type===kt.argument}function DS(e){return e.type===kt.number}function BS(e){return e.type===kt.date}function FS(e){return e.type===kt.time}function HS(e){return e.type===kt.select}function US(e){return e.type===kt.plural}function N3(e){return e.type===kt.pound}function jS(e){return e.type===kt.tag}function $S(e){return!!(e&&typeof e=="object"&&e.type===Jo.number)}function kf(e){return!!(e&&typeof e=="object"&&e.type===Jo.dateTime)}var WS=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,k3=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function P3(e){var t={};return e.replace(k3,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var x3=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function L3(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(x3).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var o=i[r],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],c=s.slice(1),u=0,h=c;u<h.length;u++){var d=h[u];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:c})}return n}function D3(e){return e.replace(/^(.*?)-/,"")}var _y=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,zS=/^(@+)?(\+|#+)?[rs]?$/g,B3=/(\*)(0+)|(#+)(0+)|(0+)/g,GS=/^(0+)$/;function by(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(zS,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function VS(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function F3(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!GS.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function vy(e){var t={},n=VS(e);return n||t}function H3(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=D3(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=Be(Be(Be({},t),{notation:"scientific"}),i.options.reduce(function(c,u){return Be(Be({},c),vy(u))},{}));continue;case"engineering":t=Be(Be(Be({},t),{notation:"engineering"}),i.options.reduce(function(c,u){return Be(Be({},c),vy(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(B3,function(c,u,h,d,m,g){if(u)t.minimumIntegerDigits=h.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(GS.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(_y.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(_y,function(c,u,h,d,m,g){return h==="*"?t.minimumFractionDigits=u.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&g?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+g.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=Be(Be({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=Be(Be({},t),by(o)));continue}if(zS.test(i.stem)){t=Be(Be({},t),by(i.stem));continue}var s=VS(i.stem);s&&(t=Be(Be({},t),s));var a=F3(i.stem);a&&(t=Be(Be({},t),a))}return t}var Nc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function U3(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var o=0;r+1<e.length&&e.charAt(r+1)===i;)o++,r++;var s=1+(o&1),a=o<2?1:3+(o>>1),c="a",u=j3(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=c;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function j3(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Nc[r||""]||Nc[n||""]||Nc["".concat(n,"-001")]||Nc["001"];return i[0]}var Id,$3=new RegExp("^".concat(WS.source,"*")),W3=new RegExp("".concat(WS.source,"*$"));function pt(e,t){return{start:e,end:t}}var z3=!!String.prototype.startsWith&&"_a".startsWith("a",1),G3=!!String.fromCodePoint,V3=!!Object.fromEntries,q3=!!String.prototype.codePointAt,Y3=!!String.prototype.trimStart,X3=!!String.prototype.trimEnd,K3=!!Number.isSafeInteger,J3=K3?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Pf=!0;try{var Z3=YS("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Pf=((Id=Z3.exec("a"))===null||Id===void 0?void 0:Id[0])==="a"}catch{Pf=!1}var Ey=z3?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},xf=G3?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,o=0,s;i>o;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Sy=V3?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r],s=o[0],a=o[1];n[s]=a}return n},qS=q3?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),o;return i<55296||i>56319||n+1===r||(o=t.charCodeAt(n+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},Q3=Y3?function(t){return t.trimStart()}:function(t){return t.replace($3,"")},eH=X3?function(t){return t.trimEnd()}:function(t){return t.replace(W3,"")};function YS(e,t){return new RegExp(e,t)}var Lf;if(Pf){var wy=YS("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Lf=function(t,n){var r;wy.lastIndex=n;var i=wy.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Lf=function(t,n){for(var r=[];;){var i=qS(t,n);if(i===void 0||XS(i)||iH(i))break;r.push(i),n+=i>=65536?2:1}return xf.apply(void 0,r)};var tH=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:kt.pound,location:pt(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ft.UNMATCHED_CLOSING_TAG,pt(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Df(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:kt.literal,value:"<".concat(i,"/>"),location:pt(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Df(this.char()))return this.error(ft.INVALID_TAG,pt(a,this.clonePosition()));var c=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(ft.UNMATCHED_CLOSING_TAG,pt(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:kt.tag,value:i,children:s,location:pt(r,this.clonePosition())},err:null}:this.error(ft.INVALID_TAG,pt(a,this.clonePosition())))}else return this.error(ft.UNCLOSED_TAG,pt(r,this.clonePosition()))}else return this.error(ft.INVALID_TAG,pt(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&rH(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var o=this.tryParseQuote(n);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=pt(r,this.clonePosition());return{val:{type:kt.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!nH(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return xf.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),xf(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ft.EMPTY_ARGUMENT,pt(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ft.MALFORMED_ARGUMENT,pt(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:kt.argument,value:i,location:pt(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(ft.MALFORMED_ARGUMENT,pt(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Lf(this.message,n),i=n+r.length;this.bumpTo(i);var o=this.clonePosition(),s=pt(t,o);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(ft.EXPECT_ARGUMENT_TYPE,pt(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var m=eH(d.val);if(m.length===0)return this.error(ft.EXPECT_ARGUMENT_STYLE,pt(this.clonePosition(),this.clonePosition()));var g=pt(h,this.clonePosition());u={style:m,styleLocation:g}}var E=this.tryParseArgumentClose(i);if(E.err)return E;var T=pt(i,this.clonePosition());if(u&&Ey(u?.style,"::",0)){var L=Q3(u.style.slice(2));if(a==="number"){var d=this.parseNumberSkeletonFromString(L,u.styleLocation);return d.err?d:{val:{type:kt.number,value:r,location:T,style:d.val},err:null}}else{if(L.length===0)return this.error(ft.EXPECT_DATE_TIME_SKELETON,T);var H=L;this.locale&&(H=U3(L,this.locale));var m={type:Jo.dateTime,pattern:H,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?P3(H):{}},K=a==="date"?kt.date:kt.time;return{val:{type:K,value:r,location:T,style:m},err:null}}}return{val:{type:a==="number"?kt.number:a==="date"?kt.date:kt.time,value:r,location:T,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var V=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ft.EXPECT_SELECT_ARGUMENT_OPTIONS,pt(V,Be({},V)));this.bumpSpace();var F=this.parseIdentifierIfPossible(),J=0;if(a!=="select"&&F.value==="offset"){if(!this.bumpIf(":"))return this.error(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,pt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ft.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),F=this.parseIdentifierIfPossible(),J=d.val}var D=this.tryParsePluralOrSelectOptions(t,a,n,F);if(D.err)return D;var E=this.tryParseArgumentClose(i);if(E.err)return E;var W=pt(i,this.clonePosition());return a==="select"?{val:{type:kt.select,value:r,options:Sy(D.val),location:W},err:null}:{val:{type:kt.plural,value:r,options:Sy(D.val),offset:J,pluralType:a==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(ft.INVALID_ARGUMENT_TYPE,pt(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ft.EXPECT_ARGUMENT_CLOSING_BRACE,pt(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ft.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,pt(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=L3(t)}catch{return this.error(ft.INVALID_NUMBER_SKELETON,n)}return{val:{type:Jo.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?H3(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var o,s=!1,a=[],c=new Set,u=i.value,h=i.location;;){if(u.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,ft.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;h=pt(d,this.clonePosition()),u=this.message.slice(d.offset,this.offset())}else break}if(c.has(u))return this.error(n==="select"?ft.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ft.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(s=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,pt(this.clonePosition(),this.clonePosition()));var E=this.parseMessage(t+1,n,r);if(E.err)return E;var T=this.tryParseArgumentClose(g);if(T.err)return T;a.push([u,{value:E.val,location:pt(g,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,h=o.location}return a.length===0?this.error(n==="select"?ft.EXPECT_SELECT_ARGUMENT_SELECTOR:ft.EXPECT_PLURAL_ARGUMENT_SELECTOR,pt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ft.MISSING_OTHER_CLAUSE,pt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=pt(i,this.clonePosition());return o?(s*=r,J3(s)?{val:s,err:null}:this.error(n,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=qS(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ey(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&XS(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function Df(e){return e>=97&&e<=122||e>=65&&e<=90}function nH(e){return Df(e)||e===47}function rH(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function XS(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function iH(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Bf(e){e.forEach(function(t){if(delete t.location,HS(t)||US(t))for(var n in t.options)delete t.options[n].location,Bf(t.options[n].value);else DS(t)&&$S(t.style)||(BS(t)||FS(t))&&kf(t.style)?delete t.style.location:jS(t)&&Bf(t.children)})}function oH(e,t){t===void 0&&(t={}),t=Be({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new tH(e,t).parse();if(n.err){var r=SyntaxError(ft[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||Bf(n.val),n.val}var Or;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Or||(Or={}));var Ci=function(e){dr(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.code=r,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Ty=function(e){dr(t,e);function t(n,r,i,o){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Or.INVALID_VALUE,o)||this}return t}(Ci),sH=function(e){dr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Or.INVALID_VALUE,i)||this}return t}(Ci),aH=function(e){dr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Or.MISSING_VALUE,r)||this}return t}(Ci),vn;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(vn||(vn={}));function cH(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==vn.literal||n.type!==vn.literal?t.push(n):r.value+=n.value,t},[])}function uH(e){return typeof e=="function"}function eu(e,t,n,r,i,o,s){if(e.length===1&&yy(e[0]))return[{type:vn.literal,value:e[0].value}];for(var a=[],c=0,u=e;c<u.length;c++){var h=u[c];if(yy(h)){a.push({type:vn.literal,value:h.value});continue}if(N3(h)){typeof o=="number"&&a.push({type:vn.literal,value:n.getNumberFormat(t).format(o)});continue}var d=h.value;if(!(i&&d in i))throw new aH(d,s);var m=i[d];if(M3(h)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?vn.literal:vn.object,value:m});continue}if(BS(h)){var g=typeof h.style=="string"?r.date[h.style]:kf(h.style)?h.style.parsedOptions:void 0;a.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(FS(h)){var g=typeof h.style=="string"?r.time[h.style]:kf(h.style)?h.style.parsedOptions:r.time.medium;a.push({type:vn.literal,value:n.getDateTimeFormat(t,g).format(m)});continue}if(DS(h)){var g=typeof h.style=="string"?r.number[h.style]:$S(h.style)?h.style.parsedOptions:void 0;g&&g.scale&&(m=m*(g.scale||1)),a.push({type:vn.literal,value:n.getNumberFormat(t,g).format(m)});continue}if(jS(h)){var E=h.children,T=h.value,L=i[T];if(!uH(L))throw new sH(T,"function",s);var H=eu(E,t,n,r,i,o),K=L(H.map(function(J){return J.value}));Array.isArray(K)||(K=[K]),a.push.apply(a,K.map(function(J){return{type:typeof J=="string"?vn.literal:vn.object,value:J}}))}if(HS(h)){var V=h.options[m]||h.options.other;if(!V)throw new Ty(h.value,m,Object.keys(h.options),s);a.push.apply(a,eu(V.value,t,n,r,i));continue}if(US(h)){var V=h.options["=".concat(m)];if(!V){if(!Intl.PluralRules)throw new Ci(`Intl.PluralRules is not available in this environment.
515
515
  Try polyfilling it using "@formatjs/intl-pluralrules"
516
- `,Or.MISSING_INTL_API,s);var F=n.getPluralRules(t,{type:h.pluralType}).select(m-(h.offset||0));V=h.options[F]||h.options.other}if(!V)throw new Sy(h.value,m,Object.keys(h.options),s);a.push.apply(a,eu(V.value,t,n,r,i,m-(h.offset||0)));continue}}return sH(a)}function cH(e,t){return t?Be(Be(Be({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Be(Be({},e[r]),t[r]||{}),n},{})):e}function uH(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=cH(e[r],t[r]),n},Be({},e)):e}function Ad(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function lH(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.number),strategy:Sr.variadic}),getDateTimeFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.dateTime),strategy:Sr.variadic}),getPluralRules:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.pluralRules),strategy:Sr.variadic})}}var YS=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=o.formatToParts(c);if(u.length===1)return u[0].value;var h=u.reduce(function(d,m){return!d.length||m.type!==vn.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(c){return eu(o.ast,o.locales,o.formatters,o.formats,c,void 0,o.message)},this.resolvedOptions=function(){var c;return{locale:((c=o.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var a=fw(s,["formatters"]);this.ast=e.__parse(t,Be(Be({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=uH(e.formats,r),this.formatters=i&&i.formatters||lH(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=rH,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Ji;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Ji||(Ji={}));var ba=function(e){dr(t,e);function t(n,r,i){var o=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return o=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
516
+ `,Or.MISSING_INTL_API,s);var F=n.getPluralRules(t,{type:h.pluralType}).select(m-(h.offset||0));V=h.options[F]||h.options.other}if(!V)throw new Ty(h.value,m,Object.keys(h.options),s);a.push.apply(a,eu(V.value,t,n,r,i,m-(h.offset||0)));continue}}return cH(a)}function lH(e,t){return t?Be(Be(Be({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Be(Be({},e[r]),t[r]||{}),n},{})):e}function dH(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=lH(e[r],t[r]),n},Be({},e)):e}function Ad(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function fH(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.number),strategy:Sr.variadic}),getDateTimeFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.dateTime),strategy:Sr.variadic}),getPluralRules:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Br([void 0],n,!1)))},{cache:Ad(e.pluralRules),strategy:Sr.variadic})}}var KS=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=o.formatToParts(c);if(u.length===1)return u[0].value;var h=u.reduce(function(d,m){return!d.length||m.type!==vn.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(c){return eu(o.ast,o.locales,o.formatters,o.formats,c,void 0,o.message)},this.resolvedOptions=function(){var c;return{locale:((c=o.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var a=pw(s,["formatters"]);this.ast=e.__parse(t,Be(Be({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=dH(e.formats,r),this.formatters=i&&i.formatters||fH(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=oH,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Ji;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Ji||(Ji={}));var ba=function(e){dr(t,e);function t(n,r,i){var o=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return o=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
517
517
  `).concat(s?`
518
518
  `.concat(s.message,`
519
- `).concat(s.stack):""))||this,o.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,t),o}return t}(Error),dH=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.UNSUPPORTED_FORMATTER,n,r)||this}return t}(ba),fH=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.INVALID_CONFIG,n,r)||this}return t}(ba),wy=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.MISSING_DATA,n,r)||this}return t}(ba),Zn=function(e){dr(t,e);function t(n,r,i){var o=e.call(this,Ji.FORMAT_ERROR,"".concat(n,`
519
+ `).concat(s.stack):""))||this,o.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(o,t),o}return t}(Error),hH=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.UNSUPPORTED_FORMATTER,n,r)||this}return t}(ba),pH=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.INVALID_CONFIG,n,r)||this}return t}(ba),Iy=function(e){dr(t,e);function t(n,r){return e.call(this,Ji.MISSING_DATA,n,r)||this}return t}(ba),Zn=function(e){dr(t,e);function t(n,r,i){var o=e.call(this,Ji.FORMAT_ERROR,"".concat(n,`
520
520
  Locale: `).concat(r,`
521
521
  `),i)||this;return o.locale=r,o}return t}(ba),Od=function(e){dr(t,e);function t(n,r,i,o){var s=e.call(this,"".concat(n,`
522
522
  MessageID: `).concat(i?.id,`
523
523
  Default Message: `).concat(i?.defaultMessage,`
524
524
  Description: `).concat(i?.description,`
525
- `),r,o)||this;return s.descriptor=i,s.locale=r,s}return t}(Zn),hH=function(e){dr(t,e);function t(n,r){var i=e.call(this,Ji.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t}(ba);function pH(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function ds(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var mH=function(e){},gH=function(e){},yH={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:mH,onWarn:gH};function XS(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Pi(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function _H(e){e===void 0&&(e=XS());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.DateTimeFormat).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.dateTime),strategy:Sr.variadic}),o=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.NumberFormat).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.number),strategy:Sr.variadic}),s=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.PluralRules).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.pluralRules),strategy:Sr.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:Er(function(a,c,u,h){return new YS(a,c,u,Be({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:s}},h||{}))},{cache:Pi(e.message),strategy:Sr.variadic}),getRelativeTimeFormat:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(t.bind.apply(t,Br([void 0],a,!1)))},{cache:Pi(e.relativeTime),strategy:Sr.variadic}),getPluralRules:s,getListFormat:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(n.bind.apply(n,Br([void 0],a,!1)))},{cache:Pi(e.list),strategy:Sr.variadic}),getDisplayNames:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(r.bind.apply(r,Br([void 0],a,!1)))},{cache:Pi(e.displayNames),strategy:Sr.variadic})}}function yp(e,t,n,r){var i=e&&e[t],o;if(i&&(o=i[n]),o)return o;r(new dH("No ".concat(t," format named: ").concat(n)))}function kc(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Be({timeZone:t},e[r]),n},{})}function Ty(e,t){var n=Object.keys(Be(Be({},e),t));return n.reduce(function(r,i){return r[i]=Be(Be({},e[i]||{}),t[i]||{}),r},{})}function Iy(e,t){if(!t)return e;var n=YS.formats;return Be(Be(Be({},n),e),{date:Ty(kc(n.date,t),kc(e.date||{},t)),time:Ty(kc(n.time,t),kc(e.time||{},t))})}var Ay=function(e,t,n,r,i){var o=e.locale,s=e.formats,a=e.messages,c=e.defaultLocale,u=e.defaultFormats,h=e.fallbackOnEmptyString,d=e.onError,m=e.timeZone,g=e.defaultRichTextElements;n===void 0&&(n={id:""});var E=n.id,T=n.defaultMessage;pH(!!E,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var L=String(E),H=a&&Object.prototype.hasOwnProperty.call(a,L)&&a[L];if(Array.isArray(H)&&H.length===1&&H[0].type===kt.literal)return H[0].value;if(!r&&H&&typeof H=="string"&&!g)return H.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=Be(Be({},g),r||{}),s=Iy(s,m),u=Iy(u,m),!H){if(h===!1&&H==="")return H;if((!T||o&&o.toLowerCase()!==c.toLowerCase())&&d(new hH(n,o)),T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){return d(new Od('Error formatting default message for: "'.concat(L,'", rendering default message verbatim'),o,n,V)),typeof T=="string"?T:L}return L}try{var K=t.getMessageFormat(H,o,s,Be({formatters:t},i||{}));return K.format(r)}catch(V){d(new Od('Error formatting message: "'.concat(L,'", using ').concat(T?"default message":"id"," as fallback."),o,n,V))}if(T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){d(new Od('Error formatting the default message for: "'.concat(L,'", rendering message verbatim'),o,n,V))}return typeof H=="string"?H:typeof T=="string"?T:L},bH=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function va(e,t,n,r){var i=e.locale,o=e.formats,s=e.onError,a=e.timeZone;r===void 0&&(r={});var c=r.format,u=Be(Be({},a&&{timeZone:a}),c&&yp(o,t,c,s)),h=ds(r,bH,u);return t==="time"&&!h.hour&&!h.minute&&!h.second&&!h.timeStyle&&!h.dateStyle&&(h=Be(Be({},h),{hour:"numeric",minute:"numeric"})),n(i,h)}function vH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"date",t,s).format(a)}catch(c){e.onError(new Zn("Error formatting date.",e.locale,c))}return String(a)}function EH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"time",t,s).format(a)}catch(c){e.onError(new Zn("Error formatting time.",e.locale,c))}return String(a)}function SH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=n[2],a=s===void 0?{}:s,c=typeof i=="string"?new Date(i||0):i,u=typeof o=="string"?new Date(o||0):o;try{return va(e,"dateTimeRange",t,a).formatRange(c,u)}catch(h){e.onError(new Zn("Error formatting date time range.",e.locale,h))}return String(c)}function wH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"date",t,s).formatToParts(a)}catch(c){e.onError(new Zn("Error formatting date.",e.locale,c))}return[]}function TH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"time",t,s).formatToParts(a)}catch(c){e.onError(new Zn("Error formatting time.",e.locale,c))}return[]}var IH=["style","type","fallback","languageDisplay"];function AH(e,t,n,r){var i=e.locale,o=e.onError,s=Intl.DisplayNames;s||o(new Ci(`Intl.DisplayNames is not available in this environment.
525
+ `),r,o)||this;return s.descriptor=i,s.locale=r,s}return t}(Zn),mH=function(e){dr(t,e);function t(n,r){var i=e.call(this,Ji.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t}(ba);function gH(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function ds(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var yH=function(e){},_H=function(e){},bH={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:yH,onWarn:_H};function JS(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Pi(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function vH(e){e===void 0&&(e=JS());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.DateTimeFormat).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.dateTime),strategy:Sr.variadic}),o=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.NumberFormat).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.number),strategy:Sr.variadic}),s=Er(function(){for(var a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return new((a=Intl.PluralRules).bind.apply(a,Br([void 0],c,!1)))},{cache:Pi(e.pluralRules),strategy:Sr.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:Er(function(a,c,u,h){return new KS(a,c,u,Be({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:s}},h||{}))},{cache:Pi(e.message),strategy:Sr.variadic}),getRelativeTimeFormat:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(t.bind.apply(t,Br([void 0],a,!1)))},{cache:Pi(e.relativeTime),strategy:Sr.variadic}),getPluralRules:s,getListFormat:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(n.bind.apply(n,Br([void 0],a,!1)))},{cache:Pi(e.list),strategy:Sr.variadic}),getDisplayNames:Er(function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return new(r.bind.apply(r,Br([void 0],a,!1)))},{cache:Pi(e.displayNames),strategy:Sr.variadic})}}function bp(e,t,n,r){var i=e&&e[t],o;if(i&&(o=i[n]),o)return o;r(new hH("No ".concat(t," format named: ").concat(n)))}function kc(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Be({timeZone:t},e[r]),n},{})}function Ay(e,t){var n=Object.keys(Be(Be({},e),t));return n.reduce(function(r,i){return r[i]=Be(Be({},e[i]||{}),t[i]||{}),r},{})}function Oy(e,t){if(!t)return e;var n=KS.formats;return Be(Be(Be({},n),e),{date:Ay(kc(n.date,t),kc(e.date||{},t)),time:Ay(kc(n.time,t),kc(e.time||{},t))})}var Cy=function(e,t,n,r,i){var o=e.locale,s=e.formats,a=e.messages,c=e.defaultLocale,u=e.defaultFormats,h=e.fallbackOnEmptyString,d=e.onError,m=e.timeZone,g=e.defaultRichTextElements;n===void 0&&(n={id:""});var E=n.id,T=n.defaultMessage;gH(!!E,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var L=String(E),H=a&&Object.prototype.hasOwnProperty.call(a,L)&&a[L];if(Array.isArray(H)&&H.length===1&&H[0].type===kt.literal)return H[0].value;if(!r&&H&&typeof H=="string"&&!g)return H.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=Be(Be({},g),r||{}),s=Oy(s,m),u=Oy(u,m),!H){if(h===!1&&H==="")return H;if((!T||o&&o.toLowerCase()!==c.toLowerCase())&&d(new mH(n,o)),T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){return d(new Od('Error formatting default message for: "'.concat(L,'", rendering default message verbatim'),o,n,V)),typeof T=="string"?T:L}return L}try{var K=t.getMessageFormat(H,o,s,Be({formatters:t},i||{}));return K.format(r)}catch(V){d(new Od('Error formatting message: "'.concat(L,'", using ').concat(T?"default message":"id"," as fallback."),o,n,V))}if(T)try{var K=t.getMessageFormat(T,c,u,i);return K.format(r)}catch(V){d(new Od('Error formatting the default message for: "'.concat(L,'", rendering message verbatim'),o,n,V))}return typeof H=="string"?H:typeof T=="string"?T:L},EH=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function va(e,t,n,r){var i=e.locale,o=e.formats,s=e.onError,a=e.timeZone;r===void 0&&(r={});var c=r.format,u=Be(Be({},a&&{timeZone:a}),c&&bp(o,t,c,s)),h=ds(r,EH,u);return t==="time"&&!h.hour&&!h.minute&&!h.second&&!h.timeStyle&&!h.dateStyle&&(h=Be(Be({},h),{hour:"numeric",minute:"numeric"})),n(i,h)}function SH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"date",t,s).format(a)}catch(c){e.onError(new Zn("Error formatting date.",e.locale,c))}return String(a)}function wH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"time",t,s).format(a)}catch(c){e.onError(new Zn("Error formatting time.",e.locale,c))}return String(a)}function TH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=n[2],a=s===void 0?{}:s,c=typeof i=="string"?new Date(i||0):i,u=typeof o=="string"?new Date(o||0):o;try{return va(e,"dateTimeRange",t,a).formatRange(c,u)}catch(h){e.onError(new Zn("Error formatting date time range.",e.locale,h))}return String(c)}function IH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"date",t,s).formatToParts(a)}catch(c){e.onError(new Zn("Error formatting date.",e.locale,c))}return[]}function AH(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],o=n[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return va(e,"time",t,s).formatToParts(a)}catch(c){e.onError(new Zn("Error formatting time.",e.locale,c))}return[]}var OH=["style","type","fallback","languageDisplay"];function CH(e,t,n,r){var i=e.locale,o=e.onError,s=Intl.DisplayNames;s||o(new Ci(`Intl.DisplayNames is not available in this environment.
526
526
  Try polyfilling it using "@formatjs/intl-displaynames"
527
- `,Or.MISSING_INTL_API));var a=ds(r,IH);try{return t(i,a).of(n)}catch(c){o(new Zn("Error formatting display name.",i,c))}}var OH=["type","style"],Oy=Date.now();function CH(e){return"".concat(Oy,"_").concat(e,"_").concat(Oy)}function RH(e,t,n,r){r===void 0&&(r={});var i=KS(e,t,n,r).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return i.length===1?i[0]:i.length===0?"":i}function KS(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||o(new Ci(`Intl.ListFormat is not available in this environment.
527
+ `,Or.MISSING_INTL_API));var a=ds(r,OH);try{return t(i,a).of(n)}catch(c){o(new Zn("Error formatting display name.",i,c))}}var RH=["type","style"],Ry=Date.now();function MH(e){return"".concat(Ry,"_").concat(e,"_").concat(Ry)}function NH(e,t,n,r){r===void 0&&(r={});var i=ZS(e,t,n,r).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return i.length===1?i[0]:i.length===0?"":i}function ZS(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||o(new Ci(`Intl.ListFormat is not available in this environment.
528
528
  Try polyfilling it using "@formatjs/intl-listformat"
529
- `,Or.MISSING_INTL_API));var a=ds(r,OH);try{var c={},u=Array.from(n).map(function(h,d){if(typeof h=="object"&&h!==null){var m=CH(d);return c[m]=h,m}return String(h)});return t(i,a).formatToParts(u).map(function(h){return h.type==="literal"?h:Be(Be({},h),{value:c[h.value]||h.value})})}catch(h){o(new Zn("Error formatting list.",i,h))}return n}var MH=["type"];function NH(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={}),Intl.PluralRules||o(new Ci(`Intl.PluralRules is not available in this environment.
529
+ `,Or.MISSING_INTL_API));var a=ds(r,RH);try{var c={},u=Array.from(n).map(function(h,d){if(typeof h=="object"&&h!==null){var m=MH(d);return c[m]=h,m}return String(h)});return t(i,a).formatToParts(u).map(function(h){return h.type==="literal"?h:Be(Be({},h),{value:c[h.value]||h.value})})}catch(h){o(new Zn("Error formatting list.",i,h))}return n}var kH=["type"];function PH(e,t,n,r){var i=e.locale,o=e.onError;r===void 0&&(r={}),Intl.PluralRules||o(new Ci(`Intl.PluralRules is not available in this environment.
530
530
  Try polyfilling it using "@formatjs/intl-pluralrules"
531
- `,Or.MISSING_INTL_API));var s=ds(r,MH);try{return t(i,s).select(n)}catch(a){o(new Zn("Error formatting plural.",i,a))}return"other"}var kH=["numeric","style"];function PH(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=!!s&&yp(i,"relative",s,o)||{},c=ds(n,kH,a);return t(r,c)}function xH(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var o=Intl.RelativeTimeFormat;o||e.onError(new Ci(`Intl.RelativeTimeFormat is not available in this environment.
531
+ `,Or.MISSING_INTL_API));var s=ds(r,kH);try{return t(i,s).select(n)}catch(a){o(new Zn("Error formatting plural.",i,a))}return"other"}var xH=["numeric","style"];function LH(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=!!s&&bp(i,"relative",s,o)||{},c=ds(n,xH,a);return t(r,c)}function DH(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var o=Intl.RelativeTimeFormat;o||e.onError(new Ci(`Intl.RelativeTimeFormat is not available in this environment.
532
532
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
533
- `,Or.MISSING_INTL_API));try{return PH(e,t,i).format(n,r)}catch(s){e.onError(new Zn("Error formatting relative time.",e.locale,s))}return String(n)}var LH=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function JS(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=s&&yp(i,"number",s,o)||{},c=ds(n,LH,a);return t(r,c)}function DH(e,t,n,r){r===void 0&&(r={});try{return JS(e,t,r).format(n)}catch(i){e.onError(new Zn("Error formatting number.",e.locale,i))}return String(n)}function BH(e,t,n,r){r===void 0&&(r={});try{return JS(e,t,r).formatToParts(n)}catch(i){e.onError(new Zn("Error formatting number.",e.locale,i))}return[]}function FH(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function HH(e){e.onWarn&&e.defaultRichTextElements&&FH(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
533
+ `,Or.MISSING_INTL_API));try{return LH(e,t,i).format(n,r)}catch(s){e.onError(new Zn("Error formatting relative time.",e.locale,s))}return String(n)}var BH=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function QS(e,t,n){var r=e.locale,i=e.formats,o=e.onError;n===void 0&&(n={});var s=n.format,a=s&&bp(i,"number",s,o)||{},c=ds(n,BH,a);return t(r,c)}function FH(e,t,n,r){r===void 0&&(r={});try{return QS(e,t,r).format(n)}catch(i){e.onError(new Zn("Error formatting number.",e.locale,i))}return String(n)}function HH(e,t,n,r){r===void 0&&(r={});try{return QS(e,t,r).formatToParts(n)}catch(i){e.onError(new Zn("Error formatting number.",e.locale,i))}return[]}function UH(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function jH(e){e.onWarn&&e.defaultRichTextElements&&UH(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
534
534
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
535
- For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function Cd(e,t){var n=_H(t),r=Be(Be({},yH),e),i=r.locale,o=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new wy('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new wy('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new fH('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),HH(r),Be(Be({},r),{formatters:n,formatNumber:DH.bind(null,r,n.getNumberFormat),formatNumberToParts:BH.bind(null,r,n.getNumberFormat),formatRelativeTime:xH.bind(null,r,n.getRelativeTimeFormat),formatDate:vH.bind(null,r,n.getDateTimeFormat),formatDateToParts:wH.bind(null,r,n.getDateTimeFormat),formatTime:EH.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:SH.bind(null,r,n.getDateTimeFormat),formatTimeToParts:TH.bind(null,r,n.getDateTimeFormat),formatPlural:NH.bind(null,r,n.getPluralRules),formatMessage:Ay.bind(null,r,n),$t:Ay.bind(null,r,n),formatList:RH.bind(null,r,n.getListFormat),formatListToParts:KS.bind(null,r,n.getListFormat),formatDisplayName:AH.bind(null,r,n.getDisplayNames)})}const{useCallback:Cy,useContext:UH,useMemo:Ry,useState:jH}=await kn("react"),Rd=XS(),ZS=(e,t="",n={})=>(Object.entries(e).forEach(([r,i])=>{const o=t?`${t}.${r}`:r;if(typeof i=="string"){n[o]=i;return}if(i&&typeof i=="object"&&!Array.isArray(i)){ZS(i,o,n);return}console.error(`Invalid translation value for key "${o}". Expected string or nested object.`)}),n),$H=e=>{const t=UH(NS);if(!e&&!t)throw new Error("useTranslation must be used with either options or within a TranslationProvider");if(!e&&t)return t;if(e&&!e.locale)throw new Error("locale is required when using useTranslation with options");if(e&&!e.translations)throw new Error("translations is required when using useTranslation with options");const n=e,[r,i]=jH({locale:n.locale,translations:n.translations,error:null}),o=Ry(()=>{const u={};return Object.entries(r.translations).forEach(([h,d])=>{u[h]=ZS(d)}),u},[r.translations]),s=Ry(()=>{const u=o[r.locale],h=n.fallbackLocale&&o[n.fallbackLocale];if(!u&&h)return console.error(`No translations found for locale "${r.locale}". Using fallback locale "${n.fallbackLocale}".`),Cd({locale:r.locale,messages:h},Rd);if(!u)return console.error(`No translations found for locale "${r.locale}". Using empty translations.`),Cd({locale:r.locale,messages:{}},Rd);const m=n.fallbackLocale&&r.locale!==n.fallbackLocale&&h?{...h,...u}:u;return Cd({locale:r.locale,messages:m},Rd)},[r.locale,o,n.fallbackLocale]),a=Cy((u,h)=>s.formatMessage({id:u},h),[s]),c=Cy(u=>{if(!r.translations[u]){console.error(`Locale "${u}" not found in translations. Available locales: ${Object.keys(r.translations).join(", ")}`),i(h=>({...h,error:`Locale "${u}" not found`}));return}i(h=>({...h,locale:u,error:null}))},[r.translations]);return{t:a,intl:s,locale:r.locale,setLocale:c,error:r.error}},{useMemo:WH}=await kn("react"),PU=e=>{const{locale:t,translations:n,fallbackLocale:r,children:i}=e,o=$H({locale:t,translations:n,fallbackLocale:r}),s=WH(()=>o,[o]);return Zy.jsx(NS.Provider,{value:s,children:i})};var zH="2.0.7",GH=500,My="user-agent",Zo="",Ny="?",qt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Mn="browser",Wr="cpu",Tr="device",ir="engine",Un="os",Qo="result",ne="name",Q="type",oe="vendor",ae="version",En="architecture",Ys="major",te="model",tu="console",qe="mobile",St="tablet",Kt="smarttv",vr="wearable",Pc="xr",ks="embedded",bo="inapp",_p="brands",Bi="formFactors",bp="fullVersionList",es="platform",vp="platformVersion",Tl="bitness",Ri="sec-ch-ua",VH=Ri+"-full-version-list",qH=Ri+"-arch",YH=Ri+"-"+Tl,XH=Ri+"-form-factors",KH=Ri+"-"+qe,JH=Ri+"-"+te,QS=Ri+"-"+es,ZH=QS+"-version",ew=[_p,bp,qe,te,es,vp,En,Bi,Tl],xc="Amazon",vo="Apple",ky="ASUS",Py="BlackBerry",xi="Google",xy="Huawei",Md="Lenovo",Ly="Honor",Lc="LG",Nd="Microsoft",kd="Motorola",Dy="Nvidia",By="OnePlus",Pd="OPPO",Ts="Samsung",Fy="Sharp",Is="Sony",xd="Xiaomi",Ld="Zebra",Hy="Chrome",Uy="Chromium",li="Chromecast",nu="Edge",As="Firefox",Os="Opera",Dd="Facebook",jy="Sogou",Eo="Mobile ",Cs=" Browser",Df="Windows",QH=typeof window!==qt.UNDEFINED,Rn=QH&&window.navigator?window.navigator:void 0,Fi=Rn&&Rn.userAgentData?Rn.userAgentData:void 0,eU=function(e,t){var n={},r=t;if(!xu(t)){r={};for(var i in t)for(var o in t[i])r[o]=t[i][o].concat(r[o]?r[o]:[])}for(var s in e)n[s]=r[s]&&r[s].length%2===0?r[s].concat(e[s]):e[s];return n},Il=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Bf=function(e,t){if(typeof e===qt.OBJECT&&e.length>0){for(var n in e)if(mi(t)==mi(e[n]))return!0;return!1}return Ea(e)?mi(t)==mi(e):!1},xu=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?xu(e[n]):!1)},Ea=function(e){return typeof e===qt.STRING},Bd=function(e){if(e){for(var t=[],n=ts(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Lu(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=Lu(n[r]);return t}},mi=function(e){return Ea(e)?e.toLowerCase():e},Ff=function(e){return Ea(e)?ts(/[^\d\.]/g,e).split(".")[0]:void 0},Hr=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==qt.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},ts=function(e,t){return Ea(t)?t.replace(e,Zo):t},Rs=function(e){return ts(/\\?\"/g,e)},Lu=function(e,t){return e=ts(/^\s\s*/,String(e)),typeof t===qt.UNDEFINED?e:e.substring(0,t)},Hf=function(e,t){if(!(!e||!t))for(var n=0,r,i,o,s,a,c;n<t.length&&!a;){var u=t[n],h=t[n+1];for(r=i=0;r<u.length&&!a&&u[r];)if(a=u[r++].exec(e),a)for(o=0;o<h.length;o++)c=a[++i],s=h[o],typeof s===qt.OBJECT&&s.length>0?s.length===2?typeof s[1]==qt.FUNCTION?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===qt.FUNCTION&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=c?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:s.length==3?this[s[0]]=c?c.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=c?s[3].apply(this,[c.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=c||void 0;n+=2}},tr=function(e,t){for(var n in t)if(typeof t[n]===qt.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Bf(t[n][r],e))return n===Ny?void 0:n}else if(Bf(t[n],e))return n===Ny?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},$y={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Wy={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},tU={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},zy={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[ae,[ne,Eo+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[ae,[ne,nu+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[ae,[ne,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ne,ae],[/opios[\/ ]+([\w\.]+)/i],[ae,[ne,Os+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[ae,[ne,Os+" GX"]],[/\bopr\/([\w\.]+)/i],[ae,[ne,Os]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[ae,[ne,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[ae,[ne,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[ne,ae],[/quark(?:pc)?\/([-\w\.]+)/i],[ae,[ne,"Quark"]],[/\bddg\/([\w\.]+)/i],[ae,[ne,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[ae,[ne,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[ae,[ne,"WeChat"]],[/konqueror\/([\w\.]+)/i],[ae,[ne,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[ae,[ne,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[ae,[ne,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[ae,[ne,"Smart "+Md+Cs]],[/(avast|avg)\/([\w\.]+)/i],[[ne,/(.+)/,"$1 Secure"+Cs],ae],[/\bfocus\/([\w\.]+)/i],[ae,[ne,As+" Focus"]],[/\bopt\/([\w\.]+)/i],[ae,[ne,Os+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[ae,[ne,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[ae,[ne,"Dolphin"]],[/coast\/([\w\.]+)/i],[ae,[ne,Os+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[ae,[ne,"MIUI"+Cs]],[/fxios\/([\w\.-]+)/i],[ae,[ne,Eo+As]],[/\bqihoobrowser\/?([\w\.]*)/i],[ae,[ne,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ne,/(.+)/,"$1Browser"],ae],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ne,/(.+)/,"$1"+Cs],ae],[/samsungbrowser\/([\w\.]+)/i],[ae,[ne,Ts+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[ae,[ne,jy+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ne,jy+" Mobile"],ae],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ne,ae],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[ne],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[ae,ne],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ne,Dd],ae,[Q,bo]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[ne,ae,[Q,bo]],[/\bgsa\/([\w\.]+) .*safari\//i],[ae,[ne,"GSA"],[Q,bo]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[ae,[ne,"TikTok"],[Q,bo]],[/\[(linkedin)app\]/i],[ne,[Q,bo]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[ne,/(.+)/,"Zalo"],ae,[Q,bo]],[/(chromium)[\/ ]([-\w\.]+)/i],[ne,ae],[/headlesschrome(?:\/([\w\.]+)| )/i],[ae,[ne,Hy+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[ae,[ne,nu+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ne,Hy+" WebView"],ae],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[ae,[ne,"Android"+Cs]],[/chrome\/([\w\.]+) mobile/i],[ae,[ne,Eo+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ne,ae],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[ae,[ne,Eo+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ne,Eo+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[ae,ne],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ne,[ae,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ne,ae],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ne,Eo+As],ae],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ne,"Netscape"],ae],[/(wolvic|librewolf)\/([\w\.]+)/i],[ne,ae],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[ae,[ne,As+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[ne,[ae,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ne,[ae,/[^\d\.]+./,Zo]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[En,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[En,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[En,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[En,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[En,"arm"]],[/ sun4\w[;\)]/i],[[En,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[En,/ower/,Zo,mi]],[/mc680.0/i],[[En,"68k"]],[/winnt.+\[axp/i],[[En,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[te,[oe,Ts],[Q,St]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[te,[oe,Ts],[Q,qe]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[te,[oe,vo],[Q,qe]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[te,[oe,vo],[Q,St]],[/(macintosh);/i],[te,[oe,vo]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[te,[oe,Fy],[Q,qe]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[te,[oe,Ly],[Q,St]],[/honor([-\w ]+)[;\)]/i],[te,[oe,Ly],[Q,qe]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[te,[oe,xy],[Q,St]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[te,[oe,xy],[Q,qe]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[te,/_/g," "],[oe,xd],[Q,St]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[te,/_/g," "],[oe,xd],[Q,qe]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[te,[oe,By],[Q,qe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[te,[oe,Pd],[Q,qe]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[te,[oe,tr,{OnePlus:["203","304","403","404","413","415"],"*":Pd}],[Q,St]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[te,[oe,"BLU"],[Q,qe]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[te,[oe,"Vivo"],[Q,qe]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[te,[oe,"Realme"],[Q,qe]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[te,[oe,Md],[Q,St]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[te,[oe,Md],[Q,qe]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[te,[oe,kd],[Q,qe]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[te,[oe,kd],[Q,St]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[te,[oe,Lc],[Q,St]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[te,[oe,Lc],[Q,qe]],[/(nokia) (t[12][01])/i],[oe,te,[Q,St]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[te,/_/g," "],[Q,qe],[oe,"Nokia"]],[/(pixel (c|tablet))\b/i],[te,[oe,xi],[Q,St]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[te,[oe,xi],[Q,qe]],[/(google) (pixelbook( go)?)/i],[oe,te],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[te,[oe,Is],[Q,qe]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[te,"Xperia Tablet"],[oe,Is],[Q,St]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[te,[oe,xc],[Q,St]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[te,/(.+)/g,"Fire Phone $1"],[oe,xc],[Q,qe]],[/(playbook);[-\w\),; ]+(rim)/i],[te,oe,[Q,St]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[te,[oe,Py],[Q,qe]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[te,[oe,ky],[Q,St]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[te,[oe,ky],[Q,qe]],[/(nexus 9)/i],[te,[oe,"HTC"],[Q,St]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[oe,[te,/_/g," "],[Q,qe]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[te,[oe,"TCL"],[Q,St]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[te,[oe,"TCL"],[Q,qe]],[/(itel) ((\w+))/i],[[oe,mi],te,[Q,tr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[te,[oe,"Acer"],[Q,St]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[te,[oe,"Meizu"],[Q,qe]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[te,[oe,"Ulefone"],[Q,qe]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[te,[oe,"Energizer"],[Q,qe]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[te,[oe,"Cat"],[Q,qe]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[te,[oe,"Smartfren"],[Q,qe]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[te,[oe,"Nothing"],[Q,qe]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[te,[oe,"Archos"],[Q,St]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[te,[oe,"Archos"],[Q,qe]],[/; (n159v)/i],[te,[oe,"HMD"],[Q,qe]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[oe,te,[Q,St]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[oe,te,[Q,qe]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[oe,te,[Q,St]],[/(surface duo)/i],[te,[oe,Nd],[Q,St]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[te,[oe,"Fairphone"],[Q,qe]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[te,[oe,Dy],[Q,St]],[/(sprint) (\w+)/i],[oe,te,[Q,qe]],[/(kin\.[onetw]{3})/i],[[te,/\./g," "],[oe,Nd],[Q,qe]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[te,[oe,Ld],[Q,St]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[te,[oe,Ld],[Q,qe]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[oe,[Q,Kt]],[/hbbtv.+maple;(\d+)/i],[[te,/^/,"SmartTV"],[oe,Ts],[Q,Kt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[oe,te,[Q,Kt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[oe,Lc],[Q,Kt]],[/(apple) ?tv/i],[oe,[te,vo+" TV"],[Q,Kt]],[/crkey.*devicetype\/chromecast/i],[[te,li+" Third Generation"],[oe,xi],[Q,Kt]],[/crkey.*devicetype\/([^/]*)/i],[[te,/^/,"Chromecast "],[oe,xi],[Q,Kt]],[/fuchsia.*crkey/i],[[te,li+" Nest Hub"],[oe,xi],[Q,Kt]],[/crkey/i],[[te,li],[oe,xi],[Q,Kt]],[/(portaltv)/i],[te,[oe,Dd],[Q,Kt]],[/droid.+aft(\w+)( bui|\))/i],[te,[oe,xc],[Q,Kt]],[/(shield \w+ tv)/i],[te,[oe,Dy],[Q,Kt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[te,[oe,Fy],[Q,Kt]],[/(bravia[\w ]+)( bui|\))/i],[te,[oe,Is],[Q,Kt]],[/(mi(tv|box)-?\w+) bui/i],[te,[oe,xd],[Q,Kt]],[/Hbbtv.*(technisat) (.*);/i],[oe,te,[Q,Kt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[oe,/.+\/(\w+)/,"$1",tr,{LG:"lge"}],[te,Lu],[Q,Kt]],[/(playstation \w+)/i],[te,[oe,Is],[Q,tu]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[te,[oe,Nd],[Q,tu]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[oe,tr,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],te,[Q,tu]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[te,[oe,Ts],[Q,vr]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[oe,te,[Q,vr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[te,[oe,Pd],[Q,vr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[te,[oe,vo],[Q,vr]],[/(opwwe\d{3})/i],[te,[oe,By],[Q,vr]],[/(moto 360)/i],[te,[oe,kd],[Q,vr]],[/(smartwatch 3)/i],[te,[oe,Is],[Q,vr]],[/(g watch r)/i],[te,[oe,Lc],[Q,vr]],[/droid.+; (wt63?0{2,3})\)/i],[te,[oe,Ld],[Q,vr]],[/droid.+; (glass) \d/i],[te,[oe,xi],[Q,Pc]],[/(pico) ([\w ]+) os\d/i],[oe,te,[Q,Pc]],[/(quest( \d| pro)?s?).+vr/i],[te,[oe,Dd],[Q,Pc]],[/mobile vr; rv.+firefox/i],[[Q,Pc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[oe,[Q,ks]],[/(aeobc)\b/i],[te,[oe,xc],[Q,ks]],[/(homepod).+mac os/i],[te,[oe,vo],[Q,ks]],[/windows iot/i],[[Q,ks]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[te,[Q,Kt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[Q,Kt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[te,[Q,tr,{mobile:"Mobile",xr:"VR","*":St}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Q,St]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Q,qe]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[te,[oe,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[ae,[ne,nu+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ne,ae],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[ae,[ne,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ne,ae],[/ladybird\//i],[[ne,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[ae,ne]],os:[[/(windows nt) (6\.[23]); arm/i],[[ne,/N/,"R"],[ae,tr,$y]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[ne,ae],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[ae,/(;|\))/g,"",tr,$y],[ne,Df]],[/(windows ce)\/?([\d\.]*)/i],[ne,ae],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[ae,/_/g,"."],[ne,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[ne,"macOS"],[ae,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[ae,[ne,li+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[ae,[ne,li+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[ae,[ne,li+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[ae,[ne,li+" Linux"]],[/crkey\/([\d\.]+)/i],[ae,[ne,li]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[ae,ne],[/(ubuntu) ([\w\.]+) like android/i],[[ne,/(.+)/,"$1 Touch"],ae],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[ne,ae],[/\(bb(10);/i],[ae,[ne,Py]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[ae,[ne,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[ae,[ne,As+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[ae,[ne,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[ae,tr,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[ne,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[ae,[ne,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ne,"Chrome OS"],ae],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[ne,ae],[/(sunos) ?([\d\.]*)/i],[[ne,"Solaris"],ae],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ne,ae]]},Dc=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Hr.call(e.init,[[Mn,[ne,ae,Ys,Q]],[Wr,[En]],[Tr,[Q,te,oe]],[ir,[ne,ae]],[Un,[ne,ae]]]),Hr.call(e.isIgnore,[[Mn,[ae,Ys]],[ir,[ae]],[Un,[ae]]]),Hr.call(e.isIgnoreRgx,[[Mn,/ ?browser$/i],[Un,/ ?os$/i]]),Hr.call(e.toString,[[Mn,[ne,ae]],[Wr,[En]],[Tr,[oe,te]],[ir,[ne,ae]],[Un,[ne,ae]]]),e}(),nU=function(e,t){var n=Dc.init[t],r=Dc.isIgnore[t]||0,i=Dc.isIgnoreRgx[t]||0,o=Dc.toString[t]||0;function s(){Hr.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Fi?Fi.getHighEntropyValues(ew).then(function(a){return e.setCH(new tw(a,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Qo&&(s.prototype.is=function(a){var c=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Bf(r,u)&&mi(i?ts(i,this[u]):this[u])==mi(i?ts(i,a):a)){if(c=!0,a!=qt.UNDEFINED)break}else if(a==qt.UNDEFINED&&c){c=!c;break}return c},s.prototype.toString=function(){var a=Zo;for(var c in o)typeof this[o[c]]!==qt.UNDEFINED&&(a+=(a?" ":Zo)+this[o[c]]);return a||qt.UNDEFINED}),s.prototype.then=function(a){var c=this,u=function(){for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d])};u.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var h=new u;return a(h),h},new s};function tw(e,t){if(e=e||{},Hr.call(this,ew),t)Hr.call(this,[[_p,Bd(e[Ri])],[bp,Bd(e[VH])],[qe,/\?1/.test(e[KH])],[te,Rs(e[JH])],[es,Rs(e[QS])],[vp,Rs(e[ZH])],[En,Rs(e[qH])],[Bi,Bd(e[XH])],[Tl,Rs(e[YH])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==qt.UNDEFINED&&(this[n]=e[n])}function Si(e,t,n,r){return Hr.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",nU(this,e)]]),this}Si.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};Si.prototype.set=function(e,t){return this.data[e]=t,this};Si.prototype.setCH=function(e){return this.uaCH=e,this};Si.prototype.detectFeature=function(){if(Rn&&Rn.userAgent==this.ua)switch(this.itemType){case Mn:Rn.brave&&typeof Rn.brave.isBrave==qt.FUNCTION&&this.set(ne,"Brave");break;case Tr:!this.get(Q)&&Fi&&Fi[qe]&&this.set(Q,qe),this.get(te)=="Macintosh"&&Rn&&typeof Rn.standalone!==qt.UNDEFINED&&Rn.maxTouchPoints&&Rn.maxTouchPoints>2&&this.set(te,"iPad").set(Q,St);break;case Un:!this.get(ne)&&Fi&&Fi[es]&&this.set(ne,Fi[es]);break;case Qo:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(Mn,t(Mn)).set(Wr,t(Wr)).set(Tr,t(Tr)).set(ir,t(ir)).set(Un,t(Un))}return this};Si.prototype.parseUA=function(){switch(this.itemType!=Qo&&Hf.call(this.data,this.ua,this.rgxMap),this.itemType){case Mn:this.set(Ys,Ff(this.get(ae)));break;case Un:if(this.get(ne)=="iOS"&&this.get(ae)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(ae,e[1])}break}return this};Si.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case Mn:case ir:var n=e[bp]||e[_p],r;if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],s=n[i].version;this.itemType==Mn&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=Uy||r==nu&&/WebView2/.test(o))&&(o=tr(o,tU),r=this.get(ne),r&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(ne,o).set(ae,s).set(Ys,Ff(s)),r=o),this.itemType==ir&&o==Uy&&this.set(ae,s)}break;case Wr:var a=e[En];a&&(a&&e[Tl]=="64"&&(a+="64"),Hf.call(this.data,a+";",t));break;case Tr:if(e[qe]&&this.set(Q,qe),e[te]&&(this.set(te,e[te]),!this.get(Q)||!this.get(oe))){var c={};Hf.call(c,"droid 9; "+e[te]+")",t),!this.get(Q)&&c.type&&this.set(Q,c.type),!this.get(oe)&&c.vendor&&this.set(oe,c.vendor)}if(e[Bi]){var u;if(typeof e[Bi]!="string")for(var h=0;!u&&h<e[Bi].length;)u=tr(e[Bi][h++],Wy);else u=tr(e[Bi],Wy);this.set(Q,u)}break;case Un:var d=e[es];if(d){var m=e[vp];d==Df&&(m=parseInt(Ff(m),10)>=13?"11":"10"),this.set(ne,d).set(ae,m)}this.get(ne)==Df&&e[te]=="Xbox"&&this.set(ne,"Xbox").set(ae,void 0);break;case Qo:var g=this.data,E=function(T){return g[T].getItem().setCH(e).parseCH().get()};this.set(Mn,E(Mn)).set(Wr,E(Wr)).set(Tr,E(Tr)).set(ir,E(ir)).set(Un,E(Un))}return this};function lr(e,t,n){if(typeof e===qt.OBJECT?(xu(e,!0)?(typeof t===qt.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===qt.STRING&&!xu(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===qt.FUNCTION){var r={};n.forEach(function(h,d){r[String(d).toLowerCase()]=h}),n=r}else{var i={};for(var o in n)n.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=n[o]);n=i}if(!(this instanceof lr))return new lr(e,t,n).getResult();var s=typeof e===qt.STRING?e:n&&n[My]?n[My]:Rn&&Rn.userAgent?Rn.userAgent:Zo,a=new tw(n,!0),c=t?eU(zy,t):zy,u=function(h){return h==Qo?function(){return new Si(h,s,c,a).set("ua",s).set(Mn,this.getBrowser()).set(Wr,this.getCPU()).set(Tr,this.getDevice()).set(ir,this.getEngine()).set(Un,this.getOS()).get()}:function(){return new Si(h,s,c[h],a).parseUA().get()}};return Hr.call(this,[["getBrowser",u(Mn)],["getCPU",u(Wr)],["getDevice",u(Tr)],["getEngine",u(ir)],["getOS",u(Un)],["getResult",u(Qo)],["getUA",function(){return s}],["setUA",function(h){return Ea(h)&&(s=Lu(h,GH)),this}]]).setUA(s),this}lr.VERSION=zH;lr.BROWSER=Il([ne,ae,Ys,Q]);lr.CPU=Il([En]);lr.DEVICE=Il([te,oe,Q,tu,qe,Kt,St,vr,ks]);lr.ENGINE=lr.OS=Il([ne,ae]);const rU=Object.freeze({"68K":"68k",ALPHA:"alpha",ARM:"arm",ARM_64:"arm64",ARM_HF:"armhf",AVR:"avr",AVR_32:"avr32",IA64:"ia64",IRIX:"irix",IRIX_64:"irix64",MIPS:"mips",MIPS_64:"mips64",PA_RISC:"pa-risc",PPC:"ppc",SPARC:"sparc",SPARC_64:"sparc64",X86:"ia32",X86_64:"amd64"}),iU=Object.freeze({AIX:"AIX",AMIGA_OS:"Amiga OS",ANDROID:"Android",ANDROID_X86:"Android-x86",ARCAOS:"ArcaOS",ARCH:"Arch",BADA:"Bada",BEOS:"BeOS",BLACKBERRY:"BlackBerry",CENTOS:"CentOS",CHROME_OS:"Chrome OS",CHROMECAST:"Chromecast",CHROMECAST_ANDROID:"Chromecast Android",CHROMECAST_FUCHSIA:"Chromecast Fuchsia",CHROMECAST_LINUX:"Chromecast Linux",CHROMECAST_SMARTSPEAKER:"Chromecast SmartSpeaker",CONTIKI:"Contiki",DEBIAN:"Debian",DEEPIN:"Deepin",DRAGONFLY:"DragonFly",ELEMENTARY_OS:"elementary OS",FEDORA:"Fedora",FIREFOX_OS:"Firefox OS",FREEBSD:"FreeBSD",FUCHSIA:"Fuchsia",GENTOO:"Gentoo",GHOSTBSD:"GhostBSD",GNU:"GNU",HAIKU:"Haiku",HARMONYOS:"HarmonyOS",HP_UX:"HP-UX",HURD:"Hurd",IOS:"iOS",JOLI:"Joli",KAIOS:"KaiOS",KNOPPIX:"Knoppix",KUBUNTU:"Kubuntu",LINPUS:"Linpus",LINSPIRE:"Linspire",LINUX:"Linux",MACOS:"macOS",MAEMO:"Maemo",MAGEIA:"Mageia",MANDRIVA:"Mandriva",MANJARO:"Manjaro",MEEGO:"MeeGo",MINIX:"Minix",MINT:"Mint",MORPH_OS:"Morph OS",NETBSD:"NetBSD",NETRANGE:"NetRange",NETTV:"NetTV",NINTENDO:"Nintendo",OPENHARMONY:"OpenHarmony",OPENBSD:"OpenBSD",OPENVMS:"OpenVMS",OS2:"OS/2",PALM:"Palm",PC_BSD:"PC-BSD",PCLINUXOS:"PCLinuxOS",PICO:"Pico",PLAN9:"Plan9",PLAYSTATION:"PlayStation",QNX:"QNX",RASPBIAN:"Raspbian",REDHAT:"RedHat",RIM_TABLET_OS:"RIM Tablet OS",RISC_OS:"RISC OS",SABAYON:"Sabayon",SAILFISH:"Sailfish",SERENITYOS:"SerenityOS",SERIES40:"Series40",SLACKWARE:"Slackware",SOLARIS:"Solaris",SUSE:"SUSE",SYMBIAN:"Symbian",TIZEN:"Tizen",UBUNTU:"Ubuntu",UBUNTU_TOUCH:"Ubuntu Touch",UNIX:"Unix",VECTORLINUX:"VectorLinux",WATCHOS:"watchOS",WEBOS:"WebOS",WINDOWS:"Windows",WINDOWS_CE:"Windows CE",WINDOWS_IOT:"Windows IoT",WINDOWS_MOBILE:"Windows Mobile",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",XBOX:"Xbox",XUBUNTU:"Xubuntu",ZENWALK:"Zenwalk"}),oU=e=>{const{os:t,cpu:n}=typeof e!="string"?e:{os:new lr(e).getOS(),cpu:new lr(e).getCPU()};if(t.is(iU.MACOS)){if(n.is(rU.ARM))return!0;if(typeof window<"u")try{const r=document.createElement("canvas"),i=r.getContext("webgl2")||r.getContext("webgl")||r.getContext("experimental-webgl");return i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL).match(/apple m\d/i)}catch{return!1}}return!1},{useState:Gy}=await kn("react"),So="Unknown";function xU(){const[e,t]=Gy(!0),[n,r]=Gy();return RS(async()=>{t(!0);const i=new lr(navigator.userAgent),o=i.getResult(),s={name:o.browser.name??So,version:o.browser.version??So},a={name:o.engine.name??So,version:o.engine.version??So},[c,u,h]=await Promise.all([o.withClientHints(),i.getOS().withClientHints(),i.getCPU().withClientHints()]),d={name:u.name??So,version:u.version??So};let m;h.architecture?m=h.architecture:m=d.name==="macOS"&&oU(c)?"arm64":"Unknown",r({browser:s,engine:a,os:d,cpu:{architecture:m},mobile:i.getDevice().is("mobile"),tablet:i.getDevice().is("tablet")}),t(!1)},[]),[e,n]}const{useContext:sU}=await kn("react"),aU=()=>{const e=sU(MS);if(!e)throw new Error("useAnalytics must be used within AnalyticsProvider");return e.isInitialized?{isInitialized:!0,track:e.track,identify:e.identify,page:e.page}:{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}},{useCallback:Vy,useEffect:qy,useMemo:cU,useState:uU}=await kn("react"),LU=()=>({version:0,loading:!1,time:0,error:null,loaded:!1,reload:()=>{},set:()=>{}}),lU=(e,t=[],n={})=>{const[r,i]=uU({version:0,loading:!1,value:n.initialValue??null,time:0,error:null}),o=Vy(()=>{n.callWithTruthyDeps&&t.some(c=>!c)||i(c=>({...c,loading:!0,version:c.version+1}))},[r,n.callWithTruthyDeps,...t]);qy(()=>{o()},t),qy(()=>{if(!r.loading)return;let c=!1;const u=!1,h=Date.now();return Promise.resolve().then(()=>e()).then(d=>{c||i(m=>({...m,value:d,error:null,loading:u,time:Date.now()-h}))}).catch(d=>{console.error(d),wl(m=>m.captureException(d)),!c&&i(m=>({...m,value:m.value,error:d,loading:u,time:Date.now()-h}))}),()=>{c=!0}},[r]);const s=Vy(c=>{const u=typeof c=="function"?c(r.value):c;i(h=>({...h,value:u}))},[r]),a=cU(()=>({version:r.version,loading:r.loading,error:r.error,time:r.time,loaded:r.version!==0,reload:o,set:s}),[r,o,s]);return[r.value,a]},DU=lU,{useCallback:dU,useEffect:fU,useState:hU}=await kn("react"),BU=(e,t)=>{const[{loading:n,args:r},i]=hU({loading:!1,args:null});fU(()=>{if(!n||r===null)return;let s=!1;return Promise.resolve().then(()=>e(...r)).then(()=>{s||i({loading:!1,args:null})}).catch(a=>{console.error(a),wl(c=>c.captureException(a)),!s&&i({loading:!1,args:null})}),()=>{s=!0}},[n]);const o=dU((...s)=>{i({loading:!0,args:s})},[n,r,...t]);return[n,o]},{useCallback:pU,useMemo:mU,useState:gU}=await kn("react"),FU=(e,t)=>{const[n,r]=gU([]),i=mU(()=>n.map(([s])=>s),[n]),o=pU((s,...a)=>{if(n.find(([u])=>u===s))return;const c=Promise.resolve().then(()=>e(s,...a)).then(()=>{r(u=>u.filter(([h])=>h!==s))}).catch(u=>{console.error(u),wl(h=>h.captureException(u)),r(h=>h.filter(([d])=>d!==s))});r(u=>[...u,[s,c]])},[n,...t]);return[i,o]},{useEffect:Yy,useRef:Xy}=await kn("react"),HU=({onLoadMore:e,hasMore:t,isLoading:n,threshold:r=500,debounceMs:i=500})=>{const o=Xy(e),s=Xy(0);Yy(()=>{o.current=e},[e]),Yy(()=>{const a=()=>{const u=Date.now();if(u-s.current<i)return;const h=document.documentElement.scrollHeight,d=document.documentElement.scrollTop,m=document.documentElement.clientHeight;h-(d+m)<r&&t&&!n&&(s.current=u,o.current())};window.addEventListener("scroll",a,{passive:!0});const c=setTimeout(a,500);return()=>{window.removeEventListener("scroll",a),clearTimeout(c)}},[t,n,r,i])};var Uf;(function(e){e.NEWEST="newest",e.READ="read"})(Uf||(Uf={}));const yU=(e,t)=>{try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},nw=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},UU=e=>{try{localStorage.removeItem(e)}catch{}},{useCallback:Ms,useEffect:Bc,useMemo:_U,useRef:Ky,useState:Fd}=await kn("react"),bU=6e4,jf="dcl_notifications_onboarding",vU=()=>{const e=yU(jf,null);return e===null?(nw(jf,!0),!0):e},Jy=()=>{nw(jf,!1)},jU=e=>{const{identity:t,isNotificationsEnabled:n,notificationsUrl:r,availableNotificationTypes:i,queryIntervalMs:o=bU,initialActiveTab:s=Uf.NEWEST,onError:a,renderProfile:c}=e,[u,h]=Fd({isLoading:!1,notifications:[]}),[d,m]=Fd(()=>({activeTab:s,isOnboarding:vU(),isOpen:!1})),[g,E]=Fd(null),T=Ky([]),L=Ky(null);Bc(()=>{T.current=u.notifications},[u.notifications]),Bc(()=>{L.current=g},[g]);const H=_U(()=>i?new Set(i):null,[i]),K=Ms(W=>Promise.resolve().then(()=>W.getNotifications()).then(ue=>{const P=H?ue.filter(G=>H.has(G.type)):ue,$=P.some(G=>G.read);h(G=>({...G,isLoading:!1,notifications:P})),$&&(Jy(),m(G=>G.isOnboarding?{...G,isOnboarding:!1}:G))}).catch(ue=>{const P=ue instanceof Error?ue:new Error("Unknown error");console.error("Error fetching notifications:",P),a&&a(P),h($=>({...$,isLoading:!1}))}),[H,a]);Bc(()=>{if(!t){E(null);return}if(!r){const G=new Error("notificationsUrl is required");console.error("Notifications URL missing:",G),a&&a(G),E(null);return}const W=QI(t,{url:r});if(E(W),!n)return;let ue=!1;h(G=>({...G,isLoading:!0}));const P=()=>{ue||K(W)};P();const $=setInterval(P,o);return()=>{ue=!0,clearInterval($)}},[t,n,r,a,K,o]),Bc(()=>{if(!!d.isOpen)return;const ue=T.current,P=L.current;if(!P)return;const $=ue.filter(q=>!q.read).map(q=>q.id);if($.length===0)return;let G=!1;return Promise.resolve().then(()=>P.markNotificationsAsRead($)).then(()=>{G||h(q=>({...q,notifications:q.notifications.map(ie=>({...ie,read:$.includes(ie.id)?!0:ie.read}))}))}).catch(q=>{if(G)return;const ie=q instanceof Error?q:new Error("Unknown error");console.error("Error marking notifications as read:",ie),a&&a(ie)}),()=>{G=!0}},[d.isOpen,a]);const V=Ms(()=>{Jy(),m(W=>({...W,isOnboarding:!1}))},[]),F=Ms(()=>{m(W=>({...W,isOpen:!W.isOpen}))},[]),J=Ms(W=>{m(ue=>({...ue,activeTab:W}))},[]),D=Ms(W=>c?c(W):null,[c]);return{notifications:u.notifications,isLoading:u.isLoading,isModalOpen:d.isOpen,modalActiveTab:d.activeTab,isNotificationsOnboarding:d.isOnboarding,handleOnBegin:V,handleNotificationsOpen:F,handleOnChangeModalTab:J,handleRenderProfile:D}},{useEffect:EU}=await kn("react"),$U=e=>{const{page:t}=aU();EU(()=>{t(e)},[t,e])},{useCallback:SU,useState:wU}=await kn("react"),WU=e=>{const[t,n]=wU(e),r=SU(i=>n(o=>({...o,...i})),[]);return[t,r]};export{MS as AnalyticsContext,kU as AnalyticsProvider,NS as TranslationContext,PU as TranslationProvider,vU as checkIsOnboarding,LU as createAsyncMemoState,LU as createAsyncStateState,QI as createNotificationsClient,yU as getStorageItem,UU as removeStorageItem,Jy as setOnboardingDone,nw as setStorageItem,xU as useAdvancedUserAgentData,aU as useAnalytics,RS as useAsyncEffect,DU as useAsyncMemo,lU as useAsyncState,BU as useAsyncTask,FU as useAsyncTasks,HU as useInfiniteScroll,jU as useNotifications,$U as usePageTracking,WU as usePatchState,$H as useTranslation};
535
+ For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function Cd(e,t){var n=vH(t),r=Be(Be({},bH),e),i=r.locale,o=r.defaultLocale,s=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new Iy('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new Iy('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new pH('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),jH(r),Be(Be({},r),{formatters:n,formatNumber:FH.bind(null,r,n.getNumberFormat),formatNumberToParts:HH.bind(null,r,n.getNumberFormat),formatRelativeTime:DH.bind(null,r,n.getRelativeTimeFormat),formatDate:SH.bind(null,r,n.getDateTimeFormat),formatDateToParts:IH.bind(null,r,n.getDateTimeFormat),formatTime:wH.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:TH.bind(null,r,n.getDateTimeFormat),formatTimeToParts:AH.bind(null,r,n.getDateTimeFormat),formatPlural:PH.bind(null,r,n.getPluralRules),formatMessage:Cy.bind(null,r,n),$t:Cy.bind(null,r,n),formatList:NH.bind(null,r,n.getListFormat),formatListToParts:ZS.bind(null,r,n.getListFormat),formatDisplayName:CH.bind(null,r,n.getDisplayNames)})}const{useCallback:My,useContext:$H,useMemo:Ny,useState:WH}=await kn("react"),Rd=JS(),ew=(e,t="",n={})=>(Object.entries(e).forEach(([r,i])=>{const o=t?`${t}.${r}`:r;if(typeof i=="string"){n[o]=i;return}if(i&&typeof i=="object"&&!Array.isArray(i)){ew(i,o,n);return}console.error(`Invalid translation value for key "${o}". Expected string or nested object.`)}),n),zH=e=>{const t=$H(PS);if(!e&&!t)throw new Error("useTranslation must be used with either options or within a TranslationProvider");if(!e&&t)return t;if(e&&!e.locale)throw new Error("locale is required when using useTranslation with options");if(e&&!e.translations)throw new Error("translations is required when using useTranslation with options");const n=e,[r,i]=WH({locale:n.locale,translations:n.translations,error:null}),o=Ny(()=>{const u={};return Object.entries(r.translations).forEach(([h,d])=>{u[h]=ew(d)}),u},[r.translations]),s=Ny(()=>{const u=o[r.locale],h=n.fallbackLocale&&o[n.fallbackLocale];if(!u&&h)return console.error(`No translations found for locale "${r.locale}". Using fallback locale "${n.fallbackLocale}".`),Cd({locale:r.locale,messages:h},Rd);if(!u)return console.error(`No translations found for locale "${r.locale}". Using empty translations.`),Cd({locale:r.locale,messages:{}},Rd);const m=n.fallbackLocale&&r.locale!==n.fallbackLocale&&h?{...h,...u}:u;return Cd({locale:r.locale,messages:m},Rd)},[r.locale,o,n.fallbackLocale]),a=My((u,h)=>s.formatMessage({id:u},h),[s]),c=My(u=>{if(!r.translations[u]){console.error(`Locale "${u}" not found in translations. Available locales: ${Object.keys(r.translations).join(", ")}`),i(h=>({...h,error:`Locale "${u}" not found`}));return}i(h=>({...h,locale:u,error:null}))},[r.translations]);return{t:a,intl:s,locale:r.locale,setLocale:c,error:r.error}},{useMemo:GH}=await kn("react"),LU=e=>{const{locale:t,translations:n,fallbackLocale:r,children:i}=e,o=zH({locale:t,translations:n,fallbackLocale:r}),s=GH(()=>o,[o]);return e_.jsx(PS.Provider,{value:s,children:i})};var VH="2.0.7",qH=500,ky="user-agent",Zo="",Py="?",qt={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Mn="browser",Wr="cpu",Tr="device",ir="engine",Un="os",Qo="result",ne="name",Q="type",oe="vendor",ae="version",En="architecture",Ys="major",te="model",tu="console",qe="mobile",St="tablet",Kt="smarttv",vr="wearable",Pc="xr",ks="embedded",bo="inapp",vp="brands",Bi="formFactors",Ep="fullVersionList",es="platform",Sp="platformVersion",Tl="bitness",Ri="sec-ch-ua",YH=Ri+"-full-version-list",XH=Ri+"-arch",KH=Ri+"-"+Tl,JH=Ri+"-form-factors",ZH=Ri+"-"+qe,QH=Ri+"-"+te,tw=Ri+"-"+es,eU=tw+"-version",nw=[vp,Ep,qe,te,es,Sp,En,Bi,Tl],xc="Amazon",vo="Apple",xy="ASUS",Ly="BlackBerry",xi="Google",Dy="Huawei",Md="Lenovo",By="Honor",Lc="LG",Nd="Microsoft",kd="Motorola",Fy="Nvidia",Hy="OnePlus",Pd="OPPO",Ts="Samsung",Uy="Sharp",Is="Sony",xd="Xiaomi",Ld="Zebra",jy="Chrome",$y="Chromium",li="Chromecast",nu="Edge",As="Firefox",Os="Opera",Dd="Facebook",Wy="Sogou",Eo="Mobile ",Cs=" Browser",Ff="Windows",tU=typeof window!==qt.UNDEFINED,Rn=tU&&window.navigator?window.navigator:void 0,Fi=Rn&&Rn.userAgentData?Rn.userAgentData:void 0,nU=function(e,t){var n={},r=t;if(!xu(t)){r={};for(var i in t)for(var o in t[i])r[o]=t[i][o].concat(r[o]?r[o]:[])}for(var s in e)n[s]=r[s]&&r[s].length%2===0?r[s].concat(e[s]):e[s];return n},Il=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Hf=function(e,t){if(typeof e===qt.OBJECT&&e.length>0){for(var n in e)if(mi(t)==mi(e[n]))return!0;return!1}return Ea(e)?mi(t)==mi(e):!1},xu=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?xu(e[n]):!1)},Ea=function(e){return typeof e===qt.STRING},Bd=function(e){if(e){for(var t=[],n=ts(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var i=Lu(n[r]).split(";v=");t[r]={brand:i[0],version:i[1]}}else t[r]=Lu(n[r]);return t}},mi=function(e){return Ea(e)?e.toLowerCase():e},Uf=function(e){return Ea(e)?ts(/[^\d\.]/g,e).split(".")[0]:void 0},Hr=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==qt.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},ts=function(e,t){return Ea(t)?t.replace(e,Zo):t},Rs=function(e){return ts(/\\?\"/g,e)},Lu=function(e,t){return e=ts(/^\s\s*/,String(e)),typeof t===qt.UNDEFINED?e:e.substring(0,t)},jf=function(e,t){if(!(!e||!t))for(var n=0,r,i,o,s,a,c;n<t.length&&!a;){var u=t[n],h=t[n+1];for(r=i=0;r<u.length&&!a&&u[r];)if(a=u[r++].exec(e),a)for(o=0;o<h.length;o++)c=a[++i],s=h[o],typeof s===qt.OBJECT&&s.length>0?s.length===2?typeof s[1]==qt.FUNCTION?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===qt.FUNCTION&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=c?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=c?s[1].call(this,c,s[2]):void 0:s.length==3?this[s[0]]=c?c.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=c?s[3].apply(this,[c.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=c||void 0;n+=2}},tr=function(e,t){for(var n in t)if(typeof t[n]===qt.OBJECT&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Hf(t[n][r],e))return n===Py?void 0:n}else if(Hf(t[n],e))return n===Py?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},zy={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},Gy={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},rU={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Vy={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[ae,[ne,Eo+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[ae,[ne,nu+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[ae,[ne,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ne,ae],[/opios[\/ ]+([\w\.]+)/i],[ae,[ne,Os+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[ae,[ne,Os+" GX"]],[/\bopr\/([\w\.]+)/i],[ae,[ne,Os]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[ae,[ne,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[ae,[ne,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[ne,ae],[/quark(?:pc)?\/([-\w\.]+)/i],[ae,[ne,"Quark"]],[/\bddg\/([\w\.]+)/i],[ae,[ne,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[ae,[ne,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[ae,[ne,"WeChat"]],[/konqueror\/([\w\.]+)/i],[ae,[ne,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[ae,[ne,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[ae,[ne,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[ae,[ne,"Smart "+Md+Cs]],[/(avast|avg)\/([\w\.]+)/i],[[ne,/(.+)/,"$1 Secure"+Cs],ae],[/\bfocus\/([\w\.]+)/i],[ae,[ne,As+" Focus"]],[/\bopt\/([\w\.]+)/i],[ae,[ne,Os+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[ae,[ne,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[ae,[ne,"Dolphin"]],[/coast\/([\w\.]+)/i],[ae,[ne,Os+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[ae,[ne,"MIUI"+Cs]],[/fxios\/([\w\.-]+)/i],[ae,[ne,Eo+As]],[/\bqihoobrowser\/?([\w\.]*)/i],[ae,[ne,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ne,/(.+)/,"$1Browser"],ae],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ne,/(.+)/,"$1"+Cs],ae],[/samsungbrowser\/([\w\.]+)/i],[ae,[ne,Ts+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[ae,[ne,Wy+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ne,Wy+" Mobile"],ae],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ne,ae],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[ne],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[ae,ne],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ne,Dd],ae,[Q,bo]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[ne,ae,[Q,bo]],[/\bgsa\/([\w\.]+) .*safari\//i],[ae,[ne,"GSA"],[Q,bo]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[ae,[ne,"TikTok"],[Q,bo]],[/\[(linkedin)app\]/i],[ne,[Q,bo]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[ne,/(.+)/,"Zalo"],ae,[Q,bo]],[/(chromium)[\/ ]([-\w\.]+)/i],[ne,ae],[/headlesschrome(?:\/([\w\.]+)| )/i],[ae,[ne,jy+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[ae,[ne,nu+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ne,jy+" WebView"],ae],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[ae,[ne,"Android"+Cs]],[/chrome\/([\w\.]+) mobile/i],[ae,[ne,Eo+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ne,ae],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[ae,[ne,Eo+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ne,Eo+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[ae,ne],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ne,[ae,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ne,ae],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ne,Eo+As],ae],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ne,"Netscape"],ae],[/(wolvic|librewolf)\/([\w\.]+)/i],[ne,ae],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[ae,[ne,As+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[ne,[ae,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ne,[ae,/[^\d\.]+./,Zo]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[En,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[En,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[En,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[En,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[En,"arm"]],[/ sun4\w[;\)]/i],[[En,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[En,/ower/,Zo,mi]],[/mc680.0/i],[[En,"68k"]],[/winnt.+\[axp/i],[[En,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[te,[oe,Ts],[Q,St]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[te,[oe,Ts],[Q,qe]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[te,[oe,vo],[Q,qe]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[te,[oe,vo],[Q,St]],[/(macintosh);/i],[te,[oe,vo]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[te,[oe,Uy],[Q,qe]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[te,[oe,By],[Q,St]],[/honor([-\w ]+)[;\)]/i],[te,[oe,By],[Q,qe]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[te,[oe,Dy],[Q,St]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[te,[oe,Dy],[Q,qe]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[te,/_/g," "],[oe,xd],[Q,St]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[te,/_/g," "],[oe,xd],[Q,qe]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[te,[oe,Hy],[Q,qe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[te,[oe,Pd],[Q,qe]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[te,[oe,tr,{OnePlus:["203","304","403","404","413","415"],"*":Pd}],[Q,St]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[te,[oe,"BLU"],[Q,qe]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[te,[oe,"Vivo"],[Q,qe]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[te,[oe,"Realme"],[Q,qe]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[te,[oe,Md],[Q,St]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[te,[oe,Md],[Q,qe]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[te,[oe,kd],[Q,qe]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[te,[oe,kd],[Q,St]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[te,[oe,Lc],[Q,St]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[te,[oe,Lc],[Q,qe]],[/(nokia) (t[12][01])/i],[oe,te,[Q,St]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[te,/_/g," "],[Q,qe],[oe,"Nokia"]],[/(pixel (c|tablet))\b/i],[te,[oe,xi],[Q,St]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[te,[oe,xi],[Q,qe]],[/(google) (pixelbook( go)?)/i],[oe,te],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[te,[oe,Is],[Q,qe]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[te,"Xperia Tablet"],[oe,Is],[Q,St]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[te,[oe,xc],[Q,St]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[te,/(.+)/g,"Fire Phone $1"],[oe,xc],[Q,qe]],[/(playbook);[-\w\),; ]+(rim)/i],[te,oe,[Q,St]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[te,[oe,Ly],[Q,qe]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[te,[oe,xy],[Q,St]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[te,[oe,xy],[Q,qe]],[/(nexus 9)/i],[te,[oe,"HTC"],[Q,St]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[oe,[te,/_/g," "],[Q,qe]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[te,[oe,"TCL"],[Q,St]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[te,[oe,"TCL"],[Q,qe]],[/(itel) ((\w+))/i],[[oe,mi],te,[Q,tr,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[te,[oe,"Acer"],[Q,St]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[te,[oe,"Meizu"],[Q,qe]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[te,[oe,"Ulefone"],[Q,qe]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[te,[oe,"Energizer"],[Q,qe]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[te,[oe,"Cat"],[Q,qe]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[te,[oe,"Smartfren"],[Q,qe]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[te,[oe,"Nothing"],[Q,qe]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[te,[oe,"Archos"],[Q,St]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[te,[oe,"Archos"],[Q,qe]],[/; (n159v)/i],[te,[oe,"HMD"],[Q,qe]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[oe,te,[Q,St]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[oe,te,[Q,qe]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[oe,te,[Q,St]],[/(surface duo)/i],[te,[oe,Nd],[Q,St]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[te,[oe,"Fairphone"],[Q,qe]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[te,[oe,Fy],[Q,St]],[/(sprint) (\w+)/i],[oe,te,[Q,qe]],[/(kin\.[onetw]{3})/i],[[te,/\./g," "],[oe,Nd],[Q,qe]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[te,[oe,Ld],[Q,St]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[te,[oe,Ld],[Q,qe]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[oe,[Q,Kt]],[/hbbtv.+maple;(\d+)/i],[[te,/^/,"SmartTV"],[oe,Ts],[Q,Kt]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[oe,te,[Q,Kt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[oe,Lc],[Q,Kt]],[/(apple) ?tv/i],[oe,[te,vo+" TV"],[Q,Kt]],[/crkey.*devicetype\/chromecast/i],[[te,li+" Third Generation"],[oe,xi],[Q,Kt]],[/crkey.*devicetype\/([^/]*)/i],[[te,/^/,"Chromecast "],[oe,xi],[Q,Kt]],[/fuchsia.*crkey/i],[[te,li+" Nest Hub"],[oe,xi],[Q,Kt]],[/crkey/i],[[te,li],[oe,xi],[Q,Kt]],[/(portaltv)/i],[te,[oe,Dd],[Q,Kt]],[/droid.+aft(\w+)( bui|\))/i],[te,[oe,xc],[Q,Kt]],[/(shield \w+ tv)/i],[te,[oe,Fy],[Q,Kt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[te,[oe,Uy],[Q,Kt]],[/(bravia[\w ]+)( bui|\))/i],[te,[oe,Is],[Q,Kt]],[/(mi(tv|box)-?\w+) bui/i],[te,[oe,xd],[Q,Kt]],[/Hbbtv.*(technisat) (.*);/i],[oe,te,[Q,Kt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[oe,/.+\/(\w+)/,"$1",tr,{LG:"lge"}],[te,Lu],[Q,Kt]],[/(playstation \w+)/i],[te,[oe,Is],[Q,tu]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[te,[oe,Nd],[Q,tu]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[oe,tr,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],te,[Q,tu]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[te,[oe,Ts],[Q,vr]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[oe,te,[Q,vr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[te,[oe,Pd],[Q,vr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[te,[oe,vo],[Q,vr]],[/(opwwe\d{3})/i],[te,[oe,Hy],[Q,vr]],[/(moto 360)/i],[te,[oe,kd],[Q,vr]],[/(smartwatch 3)/i],[te,[oe,Is],[Q,vr]],[/(g watch r)/i],[te,[oe,Lc],[Q,vr]],[/droid.+; (wt63?0{2,3})\)/i],[te,[oe,Ld],[Q,vr]],[/droid.+; (glass) \d/i],[te,[oe,xi],[Q,Pc]],[/(pico) ([\w ]+) os\d/i],[oe,te,[Q,Pc]],[/(quest( \d| pro)?s?).+vr/i],[te,[oe,Dd],[Q,Pc]],[/mobile vr; rv.+firefox/i],[[Q,Pc]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[oe,[Q,ks]],[/(aeobc)\b/i],[te,[oe,xc],[Q,ks]],[/(homepod).+mac os/i],[te,[oe,vo],[Q,ks]],[/windows iot/i],[[Q,ks]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[te,[Q,Kt]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[Q,Kt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[te,[Q,tr,{mobile:"Mobile",xr:"VR","*":St}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[Q,St]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[Q,qe]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[te,[oe,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[ae,[ne,nu+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ne,ae],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[ae,[ne,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ne,ae],[/ladybird\//i],[[ne,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[ae,ne]],os:[[/(windows nt) (6\.[23]); arm/i],[[ne,/N/,"R"],[ae,tr,zy]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[ne,ae],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[ae,/(;|\))/g,"",tr,zy],[ne,Ff]],[/(windows ce)\/?([\d\.]*)/i],[ne,ae],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[ae,/_/g,"."],[ne,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[ne,"macOS"],[ae,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[ae,[ne,li+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[ae,[ne,li+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[ae,[ne,li+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[ae,[ne,li+" Linux"]],[/crkey\/([\d\.]+)/i],[ae,[ne,li]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[ae,ne],[/(ubuntu) ([\w\.]+) like android/i],[[ne,/(.+)/,"$1 Touch"],ae],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[ne,ae],[/\(bb(10);/i],[ae,[ne,Ly]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[ae,[ne,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[ae,[ne,As+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[ae,[ne,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[ae,tr,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[ne,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[ae,[ne,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ne,"Chrome OS"],ae],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[ne,ae],[/(sunos) ?([\d\.]*)/i],[[ne,"Solaris"],ae],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ne,ae]]},Dc=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Hr.call(e.init,[[Mn,[ne,ae,Ys,Q]],[Wr,[En]],[Tr,[Q,te,oe]],[ir,[ne,ae]],[Un,[ne,ae]]]),Hr.call(e.isIgnore,[[Mn,[ae,Ys]],[ir,[ae]],[Un,[ae]]]),Hr.call(e.isIgnoreRgx,[[Mn,/ ?browser$/i],[Un,/ ?os$/i]]),Hr.call(e.toString,[[Mn,[ne,ae]],[Wr,[En]],[Tr,[oe,te]],[ir,[ne,ae]],[Un,[ne,ae]]]),e}(),iU=function(e,t){var n=Dc.init[t],r=Dc.isIgnore[t]||0,i=Dc.isIgnoreRgx[t]||0,o=Dc.toString[t]||0;function s(){Hr.call(this,n)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Fi?Fi.getHighEntropyValues(nw).then(function(a){return e.setCH(new rw(a,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=Qo&&(s.prototype.is=function(a){var c=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Hf(r,u)&&mi(i?ts(i,this[u]):this[u])==mi(i?ts(i,a):a)){if(c=!0,a!=qt.UNDEFINED)break}else if(a==qt.UNDEFINED&&c){c=!c;break}return c},s.prototype.toString=function(){var a=Zo;for(var c in o)typeof this[o[c]]!==qt.UNDEFINED&&(a+=(a?" ":Zo)+this[o[c]]);return a||qt.UNDEFINED}),s.prototype.then=function(a){var c=this,u=function(){for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d])};u.prototype={is:s.prototype.is,toString:s.prototype.toString,withClientHints:s.prototype.withClientHints,withFeatureCheck:s.prototype.withFeatureCheck};var h=new u;return a(h),h},new s};function rw(e,t){if(e=e||{},Hr.call(this,nw),t)Hr.call(this,[[vp,Bd(e[Ri])],[Ep,Bd(e[YH])],[qe,/\?1/.test(e[ZH])],[te,Rs(e[QH])],[es,Rs(e[tw])],[Sp,Rs(e[eU])],[En,Rs(e[XH])],[Bi,Bd(e[JH])],[Tl,Rs(e[KH])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==qt.UNDEFINED&&(this[n]=e[n])}function Si(e,t,n,r){return Hr.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",iU(this,e)]]),this}Si.prototype.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data};Si.prototype.set=function(e,t){return this.data[e]=t,this};Si.prototype.setCH=function(e){return this.uaCH=e,this};Si.prototype.detectFeature=function(){if(Rn&&Rn.userAgent==this.ua)switch(this.itemType){case Mn:Rn.brave&&typeof Rn.brave.isBrave==qt.FUNCTION&&this.set(ne,"Brave");break;case Tr:!this.get(Q)&&Fi&&Fi[qe]&&this.set(Q,qe),this.get(te)=="Macintosh"&&Rn&&typeof Rn.standalone!==qt.UNDEFINED&&Rn.maxTouchPoints&&Rn.maxTouchPoints>2&&this.set(te,"iPad").set(Q,St);break;case Un:!this.get(ne)&&Fi&&Fi[es]&&this.set(ne,Fi[es]);break;case Qo:var e=this.data,t=function(n){return e[n].getItem().detectFeature().get()};this.set(Mn,t(Mn)).set(Wr,t(Wr)).set(Tr,t(Tr)).set(ir,t(ir)).set(Un,t(Un))}return this};Si.prototype.parseUA=function(){switch(this.itemType!=Qo&&jf.call(this.data,this.ua,this.rgxMap),this.itemType){case Mn:this.set(Ys,Uf(this.get(ae)));break;case Un:if(this.get(ne)=="iOS"&&this.get(ae)=="18.6"){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(ae,e[1])}break}return this};Si.prototype.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case Mn:case ir:var n=e[Ep]||e[vp],r;if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],s=n[i].version;this.itemType==Mn&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=$y||r==nu&&/WebView2/.test(o))&&(o=tr(o,rU),r=this.get(ne),r&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(ne,o).set(ae,s).set(Ys,Uf(s)),r=o),this.itemType==ir&&o==$y&&this.set(ae,s)}break;case Wr:var a=e[En];a&&(a&&e[Tl]=="64"&&(a+="64"),jf.call(this.data,a+";",t));break;case Tr:if(e[qe]&&this.set(Q,qe),e[te]&&(this.set(te,e[te]),!this.get(Q)||!this.get(oe))){var c={};jf.call(c,"droid 9; "+e[te]+")",t),!this.get(Q)&&c.type&&this.set(Q,c.type),!this.get(oe)&&c.vendor&&this.set(oe,c.vendor)}if(e[Bi]){var u;if(typeof e[Bi]!="string")for(var h=0;!u&&h<e[Bi].length;)u=tr(e[Bi][h++],Gy);else u=tr(e[Bi],Gy);this.set(Q,u)}break;case Un:var d=e[es];if(d){var m=e[Sp];d==Ff&&(m=parseInt(Uf(m),10)>=13?"11":"10"),this.set(ne,d).set(ae,m)}this.get(ne)==Ff&&e[te]=="Xbox"&&this.set(ne,"Xbox").set(ae,void 0);break;case Qo:var g=this.data,E=function(T){return g[T].getItem().setCH(e).parseCH().get()};this.set(Mn,E(Mn)).set(Wr,E(Wr)).set(Tr,E(Tr)).set(ir,E(ir)).set(Un,E(Un))}return this};function lr(e,t,n){if(typeof e===qt.OBJECT?(xu(e,!0)?(typeof t===qt.OBJECT&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===qt.STRING&&!xu(t,!0)&&(n=t,t=void 0),n)if(typeof n.append===qt.FUNCTION){var r={};n.forEach(function(h,d){r[String(d).toLowerCase()]=h}),n=r}else{var i={};for(var o in n)n.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=n[o]);n=i}if(!(this instanceof lr))return new lr(e,t,n).getResult();var s=typeof e===qt.STRING?e:n&&n[ky]?n[ky]:Rn&&Rn.userAgent?Rn.userAgent:Zo,a=new rw(n,!0),c=t?nU(Vy,t):Vy,u=function(h){return h==Qo?function(){return new Si(h,s,c,a).set("ua",s).set(Mn,this.getBrowser()).set(Wr,this.getCPU()).set(Tr,this.getDevice()).set(ir,this.getEngine()).set(Un,this.getOS()).get()}:function(){return new Si(h,s,c[h],a).parseUA().get()}};return Hr.call(this,[["getBrowser",u(Mn)],["getCPU",u(Wr)],["getDevice",u(Tr)],["getEngine",u(ir)],["getOS",u(Un)],["getResult",u(Qo)],["getUA",function(){return s}],["setUA",function(h){return Ea(h)&&(s=Lu(h,qH)),this}]]).setUA(s),this}lr.VERSION=VH;lr.BROWSER=Il([ne,ae,Ys,Q]);lr.CPU=Il([En]);lr.DEVICE=Il([te,oe,Q,tu,qe,Kt,St,vr,ks]);lr.ENGINE=lr.OS=Il([ne,ae]);const oU=Object.freeze({"68K":"68k",ALPHA:"alpha",ARM:"arm",ARM_64:"arm64",ARM_HF:"armhf",AVR:"avr",AVR_32:"avr32",IA64:"ia64",IRIX:"irix",IRIX_64:"irix64",MIPS:"mips",MIPS_64:"mips64",PA_RISC:"pa-risc",PPC:"ppc",SPARC:"sparc",SPARC_64:"sparc64",X86:"ia32",X86_64:"amd64"}),sU=Object.freeze({AIX:"AIX",AMIGA_OS:"Amiga OS",ANDROID:"Android",ANDROID_X86:"Android-x86",ARCAOS:"ArcaOS",ARCH:"Arch",BADA:"Bada",BEOS:"BeOS",BLACKBERRY:"BlackBerry",CENTOS:"CentOS",CHROME_OS:"Chrome OS",CHROMECAST:"Chromecast",CHROMECAST_ANDROID:"Chromecast Android",CHROMECAST_FUCHSIA:"Chromecast Fuchsia",CHROMECAST_LINUX:"Chromecast Linux",CHROMECAST_SMARTSPEAKER:"Chromecast SmartSpeaker",CONTIKI:"Contiki",DEBIAN:"Debian",DEEPIN:"Deepin",DRAGONFLY:"DragonFly",ELEMENTARY_OS:"elementary OS",FEDORA:"Fedora",FIREFOX_OS:"Firefox OS",FREEBSD:"FreeBSD",FUCHSIA:"Fuchsia",GENTOO:"Gentoo",GHOSTBSD:"GhostBSD",GNU:"GNU",HAIKU:"Haiku",HARMONYOS:"HarmonyOS",HP_UX:"HP-UX",HURD:"Hurd",IOS:"iOS",JOLI:"Joli",KAIOS:"KaiOS",KNOPPIX:"Knoppix",KUBUNTU:"Kubuntu",LINPUS:"Linpus",LINSPIRE:"Linspire",LINUX:"Linux",MACOS:"macOS",MAEMO:"Maemo",MAGEIA:"Mageia",MANDRIVA:"Mandriva",MANJARO:"Manjaro",MEEGO:"MeeGo",MINIX:"Minix",MINT:"Mint",MORPH_OS:"Morph OS",NETBSD:"NetBSD",NETRANGE:"NetRange",NETTV:"NetTV",NINTENDO:"Nintendo",OPENHARMONY:"OpenHarmony",OPENBSD:"OpenBSD",OPENVMS:"OpenVMS",OS2:"OS/2",PALM:"Palm",PC_BSD:"PC-BSD",PCLINUXOS:"PCLinuxOS",PICO:"Pico",PLAN9:"Plan9",PLAYSTATION:"PlayStation",QNX:"QNX",RASPBIAN:"Raspbian",REDHAT:"RedHat",RIM_TABLET_OS:"RIM Tablet OS",RISC_OS:"RISC OS",SABAYON:"Sabayon",SAILFISH:"Sailfish",SERENITYOS:"SerenityOS",SERIES40:"Series40",SLACKWARE:"Slackware",SOLARIS:"Solaris",SUSE:"SUSE",SYMBIAN:"Symbian",TIZEN:"Tizen",UBUNTU:"Ubuntu",UBUNTU_TOUCH:"Ubuntu Touch",UNIX:"Unix",VECTORLINUX:"VectorLinux",WATCHOS:"watchOS",WEBOS:"WebOS",WINDOWS:"Windows",WINDOWS_CE:"Windows CE",WINDOWS_IOT:"Windows IoT",WINDOWS_MOBILE:"Windows Mobile",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",XBOX:"Xbox",XUBUNTU:"Xubuntu",ZENWALK:"Zenwalk"}),aU=e=>{const{os:t,cpu:n}=typeof e!="string"?e:{os:new lr(e).getOS(),cpu:new lr(e).getCPU()};if(t.is(sU.MACOS)){if(n.is(oU.ARM))return!0;if(typeof window<"u")try{const r=document.createElement("canvas"),i=r.getContext("webgl2")||r.getContext("webgl")||r.getContext("experimental-webgl");return i.getParameter(i.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL).match(/apple m\d/i)}catch{return!1}}return!1},{useState:qy}=await kn("react"),So="Unknown";let Fd,Hd=!1;function DU(){const[e,t]=qy(!Hd),[n,r]=qy(Fd);return NS(async()=>{if(Hd)return;t(!0);const i=new lr(navigator.userAgent),o=i.getResult(),s={name:o.browser.name??So,version:o.browser.version??So},a={name:o.engine.name??So,version:o.engine.version??So},[c,u,h]=await Promise.all([o.withClientHints(),i.getOS().withClientHints(),i.getCPU().withClientHints()]),d={name:u.name??So,version:u.version??So};let m;h.architecture?m=h.architecture:m=d.name==="macOS"&&aU(c)?"arm64":"Unknown";const g={browser:s,engine:a,os:d,cpu:{architecture:m},mobile:i.getDevice().is("mobile"),tablet:i.getDevice().is("tablet")};Fd=g,Hd=!0,r(g),t(!1)},[]),[e,Fd??n]}const{useContext:cU}=await kn("react"),uU=()=>{const e=cU(kS);if(!e)throw new Error("useAnalytics must be used within AnalyticsProvider");return e.isInitialized?{isInitialized:!0,track:e.track,identify:e.identify,page:e.page}:{isInitialized:!1,track:()=>{},identify:()=>{},page:()=>{}}},{useCallback:Yy,useEffect:Xy,useMemo:lU,useState:dU}=await kn("react"),BU=()=>({version:0,loading:!1,time:0,error:null,loaded:!1,reload:()=>{},set:()=>{}}),fU=(e,t=[],n={})=>{const[r,i]=dU({version:0,loading:!1,value:n.initialValue??null,time:0,error:null}),o=Yy(()=>{n.callWithTruthyDeps&&t.some(c=>!c)||i(c=>({...c,loading:!0,version:c.version+1}))},[r,n.callWithTruthyDeps,...t]);Xy(()=>{o()},t),Xy(()=>{if(!r.loading)return;let c=!1;const u=!1,h=Date.now();return Promise.resolve().then(()=>e()).then(d=>{c||i(m=>({...m,value:d,error:null,loading:u,time:Date.now()-h}))}).catch(d=>{console.error(d),wl(m=>m.captureException(d)),!c&&i(m=>({...m,value:m.value,error:d,loading:u,time:Date.now()-h}))}),()=>{c=!0}},[r]);const s=Yy(c=>{const u=typeof c=="function"?c(r.value):c;i(h=>({...h,value:u}))},[r]),a=lU(()=>({version:r.version,loading:r.loading,error:r.error,time:r.time,loaded:r.version!==0,reload:o,set:s}),[r,o,s]);return[r.value,a]},FU=fU,{useCallback:hU,useEffect:pU,useState:mU}=await kn("react"),HU=(e,t)=>{const[{loading:n,args:r},i]=mU({loading:!1,args:null});pU(()=>{if(!n||r===null)return;let s=!1;return Promise.resolve().then(()=>e(...r)).then(()=>{s||i({loading:!1,args:null})}).catch(a=>{console.error(a),wl(c=>c.captureException(a)),!s&&i({loading:!1,args:null})}),()=>{s=!0}},[n]);const o=hU((...s)=>{i({loading:!0,args:s})},[n,r,...t]);return[n,o]},{useCallback:gU,useMemo:yU,useState:_U}=await kn("react"),UU=(e,t)=>{const[n,r]=_U([]),i=yU(()=>n.map(([s])=>s),[n]),o=gU((s,...a)=>{if(n.find(([u])=>u===s))return;const c=Promise.resolve().then(()=>e(s,...a)).then(()=>{r(u=>u.filter(([h])=>h!==s))}).catch(u=>{console.error(u),wl(h=>h.captureException(u)),r(h=>h.filter(([d])=>d!==s))});r(u=>[...u,[s,c]])},[n,...t]);return[i,o]},{useEffect:Ky,useRef:Jy}=await kn("react"),jU=({onLoadMore:e,hasMore:t,isLoading:n,threshold:r=500,debounceMs:i=500})=>{const o=Jy(e),s=Jy(0);Ky(()=>{o.current=e},[e]),Ky(()=>{const a=()=>{const u=Date.now();if(u-s.current<i)return;const h=document.documentElement.scrollHeight,d=document.documentElement.scrollTop,m=document.documentElement.clientHeight;h-(d+m)<r&&t&&!n&&(s.current=u,o.current())};window.addEventListener("scroll",a,{passive:!0});const c=setTimeout(a,500);return()=>{window.removeEventListener("scroll",a),clearTimeout(c)}},[t,n,r,i])};var $f;(function(e){e.NEWEST="newest",e.READ="read"})($f||($f={}));const bU=(e,t)=>{try{const n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},iw=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},$U=e=>{try{localStorage.removeItem(e)}catch{}},{useCallback:Ms,useEffect:Bc,useMemo:vU,useRef:Zy,useState:Ud}=await kn("react"),EU=6e4,Wf="dcl_notifications_onboarding",SU=()=>{const e=bU(Wf,null);return e===null?(iw(Wf,!0),!0):e},Qy=()=>{iw(Wf,!1)},WU=e=>{const{identity:t,isNotificationsEnabled:n,notificationsUrl:r,availableNotificationTypes:i,queryIntervalMs:o=EU,initialActiveTab:s=$f.NEWEST,onError:a,renderProfile:c}=e,[u,h]=Ud({isLoading:!1,notifications:[]}),[d,m]=Ud(()=>({activeTab:s,isOnboarding:SU(),isOpen:!1})),[g,E]=Ud(null),T=Zy([]),L=Zy(null);Bc(()=>{T.current=u.notifications},[u.notifications]),Bc(()=>{L.current=g},[g]);const H=vU(()=>i?new Set(i):null,[i]),K=Ms(W=>Promise.resolve().then(()=>W.getNotifications()).then(ue=>{const P=H?ue.filter(G=>H.has(G.type)):ue,$=P.some(G=>G.read);h(G=>({...G,isLoading:!1,notifications:P})),$&&(Qy(),m(G=>G.isOnboarding?{...G,isOnboarding:!1}:G))}).catch(ue=>{const P=ue instanceof Error?ue:new Error("Unknown error");console.error("Error fetching notifications:",P),a&&a(P),h($=>({...$,isLoading:!1}))}),[H,a]);Bc(()=>{if(!t){E(null);return}if(!r){const G=new Error("notificationsUrl is required");console.error("Notifications URL missing:",G),a&&a(G),E(null);return}const W=tA(t,{url:r});if(E(W),!n)return;let ue=!1;h(G=>({...G,isLoading:!0}));const P=()=>{ue||K(W)};P();const $=setInterval(P,o);return()=>{ue=!0,clearInterval($)}},[t,n,r,a,K,o]),Bc(()=>{if(!!d.isOpen)return;const ue=T.current,P=L.current;if(!P)return;const $=ue.filter(q=>!q.read).map(q=>q.id);if($.length===0)return;let G=!1;return Promise.resolve().then(()=>P.markNotificationsAsRead($)).then(()=>{G||h(q=>({...q,notifications:q.notifications.map(ie=>({...ie,read:$.includes(ie.id)?!0:ie.read}))}))}).catch(q=>{if(G)return;const ie=q instanceof Error?q:new Error("Unknown error");console.error("Error marking notifications as read:",ie),a&&a(ie)}),()=>{G=!0}},[d.isOpen,a]);const V=Ms(()=>{Qy(),m(W=>({...W,isOnboarding:!1}))},[]),F=Ms(()=>{m(W=>({...W,isOpen:!W.isOpen}))},[]),J=Ms(W=>{m(ue=>({...ue,activeTab:W}))},[]),D=Ms(W=>c?c(W):null,[c]);return{notifications:u.notifications,isLoading:u.isLoading,isModalOpen:d.isOpen,modalActiveTab:d.activeTab,isNotificationsOnboarding:d.isOnboarding,handleOnBegin:V,handleNotificationsOpen:F,handleOnChangeModalTab:J,handleRenderProfile:D}},{useEffect:wU}=await kn("react"),zU=e=>{const{page:t}=uU();wU(()=>{t(e)},[t,e])},{useCallback:TU,useState:IU}=await kn("react"),GU=e=>{const[t,n]=IU(e),r=TU(i=>n(o=>({...o,...i})),[]);return[t,r]};export{kS as AnalyticsContext,xU as AnalyticsProvider,PS as TranslationContext,LU as TranslationProvider,SU as checkIsOnboarding,BU as createAsyncMemoState,BU as createAsyncStateState,tA as createNotificationsClient,bU as getStorageItem,$U as removeStorageItem,Qy as setOnboardingDone,iw as setStorageItem,DU as useAdvancedUserAgentData,uU as useAnalytics,NS as useAsyncEffect,FU as useAsyncMemo,fU as useAsyncState,HU as useAsyncTask,UU as useAsyncTasks,jU as useInfiniteScroll,WU as useNotifications,zU as usePageTracking,GU as usePatchState,zH as useTranslation};