polyrouter 1.0.13 → 1.0.15

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 (1050) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +21 -17
  3. package/app/.next-cli-build/build-manifest.json +4 -4
  4. package/app/.next-cli-build/prerender-manifest.json +4 -4
  5. package/app/.next-cli-build/react-loadable-manifest.json +2 -2
  6. package/app/.next-cli-build/required-server-files.json +2 -1
  7. package/app/.next-cli-build/routes-manifest.json +24 -0
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page.js.nft.json +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/realtime/page_client-reference-manifest.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  80. package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  89. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  90. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  91. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.rsc +7 -7
  93. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +7 -7
  94. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +7 -7
  95. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  96. package/app/.next-cli-build/server/app/api/analytics/installation/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/analytics/installation/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/setup-password/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/setup-password/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  115. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  117. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  121. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  123. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  127. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  131. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  133. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  141. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/route.js +1 -0
  181. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/route.js.nft.json +1 -0
  182. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/route_client-reference-manifest.js +1 -0
  183. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/status/route.js +1 -0
  184. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/status/route.js.nft.json +1 -0
  185. package/app/.next-cli-build/server/app/api/mcp/chatgpt-web/status/route_client-reference-manifest.js +1 -0
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/chatgpt-web/cookie/route.js +1 -0
  211. package/app/.next-cli-build/server/app/api/oauth/chatgpt-web/cookie/route.js.nft.json +1 -0
  212. package/app/.next-cli-build/server/app/api/oauth/chatgpt-web/cookie/route_client-reference-manifest.js +1 -0
  213. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/trae/import/route.js +1 -0
  238. package/app/.next-cli-build/server/app/api/oauth/trae/import/route.js.nft.json +1 -0
  239. package/app/.next-cli-build/server/app/api/oauth/trae/import/route_client-reference-manifest.js +1 -0
  240. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  265. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  273. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  275. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  279. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  281. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  285. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  287. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  291. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  293. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/realtime/authorize/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/realtime/tickets/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/realtime/tickets/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/settings/public-telemetry/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/settings/public-telemetry/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  339. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/v1/images/edits/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/v1/images/edits/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  417. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  419. package/app/.next-cli-build/server/app/callback.html +1 -1
  420. package/app/.next-cli-build/server/app/callback.rsc +7 -7
  421. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +7 -7
  422. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  423. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +7 -7
  424. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  425. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +9 -9
  426. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +9 -9
  427. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +9 -9
  428. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  429. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  430. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +10 -10
  431. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +9 -9
  432. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +10 -10
  433. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  434. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  435. package/app/.next-cli-build/server/app/dashboard/combos.rsc +9 -9
  436. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +9 -9
  437. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +9 -9
  438. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  439. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  440. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +10 -10
  441. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +9 -9
  442. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +10 -10
  443. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  444. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  445. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +9 -9
  446. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +9 -9
  447. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +9 -9
  448. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  450. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +9 -9
  451. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +9 -9
  452. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +9 -9
  453. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
  456. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +9 -9
  457. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
  458. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  459. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  460. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +9 -9
  461. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +9 -9
  462. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
  463. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/providers.rsc +9 -9
  466. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +9 -9
  467. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
  468. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +9 -9
  471. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +9 -9
  472. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +9 -9
  473. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +9 -9
  476. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +9 -9
  477. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +9 -9
  478. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  480. package/app/.next-cli-build/server/app/dashboard/quota.rsc +10 -10
  481. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +10 -10
  482. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +10 -10
  483. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/realtime.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/realtime.rsc +8 -8
  486. package/app/.next-cli-build/server/app/dashboard/realtime.segments/!KGRhc2hib2FyZCk/dashboard/realtime/__PAGE__.segment.rsc +8 -8
  487. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_full.segment.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/realtime.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  494. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  495. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  496. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/skills.rsc +9 -9
  499. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +9 -9
  500. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +9 -9
  501. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +9 -9
  504. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +9 -9
  505. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +9 -9
  506. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  507. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/translator.rsc +9 -9
  509. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +9 -9
  510. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +9 -9
  511. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
  514. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
  515. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
  516. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  517. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  518. package/app/.next-cli-build/server/app/dashboard.rsc +10 -10
  519. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +9 -9
  520. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +10 -10
  521. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/index.html +1 -1
  523. package/app/.next-cli-build/server/app/index.rsc +7 -7
  524. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +7 -7
  525. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +7 -7
  526. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  527. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  528. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  529. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  530. package/app/.next-cli-build/server/app/landing.html +1 -1
  531. package/app/.next-cli-build/server/app/landing.rsc +8 -8
  532. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -8
  533. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +8 -8
  535. package/app/.next-cli-build/server/app/login/page.js +1 -1
  536. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  538. package/app/.next-cli-build/server/app/login.html +1 -1
  539. package/app/.next-cli-build/server/app/login.rsc +8 -8
  540. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +8 -8
  541. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  542. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +8 -8
  543. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  544. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/page.js +1 -1
  546. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  547. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  548. package/app/.next-cli-build/server/app/privacy/page.js +1 -1
  549. package/app/.next-cli-build/server/app/privacy/page.js.nft.json +1 -1
  550. package/app/.next-cli-build/server/app/privacy/page_client-reference-manifest.js +1 -1
  551. package/app/.next-cli-build/server/app/privacy.html +1 -1
  552. package/app/.next-cli-build/server/app/privacy.rsc +7 -7
  553. package/app/.next-cli-build/server/app/privacy.segments/_full.segment.rsc +7 -7
  554. package/app/.next-cli-build/server/app/privacy.segments/_tree.segment.rsc +2 -2
  555. package/app/.next-cli-build/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +8 -8
  556. package/app/.next-cli-build/server/app-paths-manifest.json +21 -17
  557. package/app/.next-cli-build/server/chunks/1522.js +4 -4
  558. package/app/.next-cli-build/server/chunks/1548.js +1 -0
  559. package/app/.next-cli-build/server/chunks/1605.js +1 -1
  560. package/app/.next-cli-build/server/chunks/1829.js +1 -1
  561. package/app/.next-cli-build/server/chunks/1882.js +1 -1
  562. package/app/.next-cli-build/server/chunks/2112.js +1 -1
  563. package/app/.next-cli-build/server/chunks/2194.js +1 -1
  564. package/app/.next-cli-build/server/chunks/2268.js +1 -1
  565. package/app/.next-cli-build/server/chunks/2430.js +3 -3
  566. package/app/.next-cli-build/server/chunks/318.js +19 -3
  567. package/app/.next-cli-build/server/chunks/3289.js +1 -1
  568. package/app/.next-cli-build/server/chunks/3792.js +1 -0
  569. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  570. package/app/.next-cli-build/server/chunks/412.js +2 -2
  571. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  572. package/app/.next-cli-build/server/chunks/4741.js +3 -3
  573. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  574. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  575. package/app/.next-cli-build/server/chunks/615.js +1 -1
  576. package/app/.next-cli-build/server/chunks/6198.js +8 -0
  577. package/app/.next-cli-build/server/chunks/6457.js +1 -1
  578. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  579. package/app/.next-cli-build/server/chunks/7807.js +1 -1
  580. package/app/.next-cli-build/server/chunks/8012.js +65 -0
  581. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  582. package/app/.next-cli-build/server/chunks/8185.js +1 -1
  583. package/app/.next-cli-build/server/chunks/827.js +1 -1
  584. package/app/.next-cli-build/server/chunks/869.js +1 -1
  585. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  586. package/app/.next-cli-build/server/functions-config-manifest.json +7 -0
  587. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  588. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  589. package/app/.next-cli-build/server/middleware.js +4 -4
  590. package/app/.next-cli-build/server/pages/404.html +1 -1
  591. package/app/.next-cli-build/server/pages/500.html +1 -1
  592. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  593. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  594. package/app/.next-cli-build/static/KhMV8HKalIINcrsYyx_UA/_buildManifest.js +1 -0
  595. package/app/.next-cli-build/static/chunks/1321-ce94f3872cdc2b8f.js +1 -0
  596. package/app/.next-cli-build/static/chunks/1a258343.350d928b0613e312.js +1 -0
  597. package/app/.next-cli-build/static/chunks/3794-d29203733ca4633c.js +52 -0
  598. package/app/.next-cli-build/static/chunks/3959-c17dd6ecfa8473bf.js +65 -0
  599. package/app/.next-cli-build/static/chunks/4024-8b67be3a8eadaba2.js +1 -0
  600. package/app/.next-cli-build/static/chunks/5497-ba537b648bfa654b.js +7 -0
  601. package/app/.next-cli-build/static/chunks/{6357.3ff0f6c83619e67b.js → 6357.e71f577e1ac2017c.js} +1 -1
  602. package/app/.next-cli-build/static/chunks/9da6db1e-a477e67005ce8908.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-03b2626d2312e74f.js → page-47d5fdc90d6fca50.js} +1 -1
  604. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-670266ac42d639dc.js → page-08204e88492207c7.js} +1 -1
  605. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-9d03ebc6b8993eb5.js → page-f144402147d2294b.js} +1 -1
  606. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-d159d9238efcc362.js → page-e30fcc4da9b7745b.js} +1 -1
  607. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-b47aed52431835b6.js → page-a37110c851c7ee0f.js} +1 -1
  608. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-269244fdc84ca89b.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-8ed4bc941d85eaa9.js → page-b7509b81d68331d0.js} +1 -1
  610. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-640540825e168b50.js → page-55b0f883389dd3e3.js} +1 -1
  611. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-dc497ba0da1df139.js → page-c221787a1c591564.js} +1 -1
  612. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e78f0c4c8720237c.js → page-f1c47b3788dfc672.js} +1 -1
  613. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-91cb73b1f2cba3eb.js → page-bf38caadfc3a7bb1.js} +1 -1
  614. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-fa12b004f508748a.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-c4050748d6821b55.js → page-671236f428a777f5.js} +1 -1
  616. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-904acbf5003a8eff.js +12 -0
  617. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-c31fbdfb86eea0b4.js → page-27a2cb517063a37c.js} +1 -1
  618. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d0bb692dac18758c.js → page-7fecfa1a2f5b7d76.js} +1 -1
  619. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-10691c9a6d96791c.js → page-87bf5774cfb7726a.js} +1 -1
  620. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-6f8353c36a244ae6.js → page-e7bf1b150860b20a.js} +1 -1
  621. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-c7b5e776132111f8.js → page-16264089e64d5bee.js} +1 -1
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-d30ed92db19690a1.js → page-f0bb10f1e7ff9c92.js} +1 -1
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-9040b4357c33f048.js → page-0cd8186140146994.js} +1 -1
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-66a435207cb92313.js → page-2eaf87a9ff382644.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-4bc13394ac695b8c.js → page-40058f670fe500f5.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-2ec2698af3e3e6e1.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/_global-error/page-db2d88d6d88ed29b.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/analytics/installation/route-db2d88d6d88ed29b.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-db2d88d6d88ed29b.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-db2d88d6d88ed29b.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-db2d88d6d88ed29b.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-db2d88d6d88ed29b.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-db2d88d6d88ed29b.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-db2d88d6d88ed29b.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/auth/setup-password/route-db2d88d6d88ed29b.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-db2d88d6d88ed29b.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-db2d88d6d88ed29b.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-db2d88d6d88ed29b.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-db2d88d6d88ed29b.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-db2d88d6d88ed29b.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-db2d88d6d88ed29b.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-db2d88d6d88ed29b.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-db2d88d6d88ed29b.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-db2d88d6d88ed29b.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-db2d88d6d88ed29b.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-db2d88d6d88ed29b.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-db2d88d6d88ed29b.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-db2d88d6d88ed29b.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-db2d88d6d88ed29b.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-db2d88d6d88ed29b.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-db2d88d6d88ed29b.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-db2d88d6d88ed29b.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-db2d88d6d88ed29b.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-db2d88d6d88ed29b.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-db2d88d6d88ed29b.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/combos/route-db2d88d6d88ed29b.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-db2d88d6d88ed29b.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-db2d88d6d88ed29b.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-db2d88d6d88ed29b.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-db2d88d6d88ed29b.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-db2d88d6d88ed29b.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-db2d88d6d88ed29b.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/health/route-db2d88d6d88ed29b.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/init/route-db2d88d6d88ed29b.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-db2d88d6d88ed29b.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/keys/route-db2d88d6d88ed29b.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/locale/route-db2d88d6d88ed29b.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-db2d88d6d88ed29b.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-db2d88d6d88ed29b.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/mcp/chatgpt-web/route-db2d88d6d88ed29b.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/mcp/chatgpt-web/status/route-db2d88d6d88ed29b.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-db2d88d6d88ed29b.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-db2d88d6d88ed29b.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-db2d88d6d88ed29b.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-db2d88d6d88ed29b.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-db2d88d6d88ed29b.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-db2d88d6d88ed29b.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-db2d88d6d88ed29b.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-db2d88d6d88ed29b.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-db2d88d6d88ed29b.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/models/route-db2d88d6d88ed29b.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/models/test/route-db2d88d6d88ed29b.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-db2d88d6d88ed29b.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/oauth/chatgpt-web/cookie/route-db2d88d6d88ed29b.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-db2d88d6d88ed29b.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-db2d88d6d88ed29b.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-db2d88d6d88ed29b.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-db2d88d6d88ed29b.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-db2d88d6d88ed29b.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-db2d88d6d88ed29b.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-db2d88d6d88ed29b.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-db2d88d6d88ed29b.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-db2d88d6d88ed29b.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-db2d88d6d88ed29b.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-db2d88d6d88ed29b.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-db2d88d6d88ed29b.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/oauth/trae/import/route-db2d88d6d88ed29b.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/pricing/route-db2d88d6d88ed29b.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-db2d88d6d88ed29b.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-db2d88d6d88ed29b.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-db2d88d6d88ed29b.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-db2d88d6d88ed29b.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-db2d88d6d88ed29b.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-db2d88d6d88ed29b.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-db2d88d6d88ed29b.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-db2d88d6d88ed29b.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-db2d88d6d88ed29b.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/providers/route-db2d88d6d88ed29b.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-db2d88d6d88ed29b.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-db2d88d6d88ed29b.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-db2d88d6d88ed29b.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-db2d88d6d88ed29b.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-db2d88d6d88ed29b.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-db2d88d6d88ed29b.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-db2d88d6d88ed29b.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-db2d88d6d88ed29b.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-db2d88d6d88ed29b.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-db2d88d6d88ed29b.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-db2d88d6d88ed29b.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-db2d88d6d88ed29b.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-db2d88d6d88ed29b.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-db2d88d6d88ed29b.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-db2d88d6d88ed29b.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-db2d88d6d88ed29b.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-db2d88d6d88ed29b.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/realtime/authorize/route-db2d88d6d88ed29b.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/realtime/tickets/route-db2d88d6d88ed29b.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-db2d88d6d88ed29b.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-db2d88d6d88ed29b.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/settings/public-telemetry/route-db2d88d6d88ed29b.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-db2d88d6d88ed29b.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/settings/route-db2d88d6d88ed29b.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-db2d88d6d88ed29b.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/tags/route-db2d88d6d88ed29b.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-db2d88d6d88ed29b.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-db2d88d6d88ed29b.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-db2d88d6d88ed29b.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-db2d88d6d88ed29b.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-db2d88d6d88ed29b.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-db2d88d6d88ed29b.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-db2d88d6d88ed29b.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-db2d88d6d88ed29b.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-db2d88d6d88ed29b.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-db2d88d6d88ed29b.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-db2d88d6d88ed29b.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-db2d88d6d88ed29b.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-db2d88d6d88ed29b.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-db2d88d6d88ed29b.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-db2d88d6d88ed29b.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-db2d88d6d88ed29b.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-db2d88d6d88ed29b.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-db2d88d6d88ed29b.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-db2d88d6d88ed29b.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-db2d88d6d88ed29b.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-db2d88d6d88ed29b.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-db2d88d6d88ed29b.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-db2d88d6d88ed29b.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-db2d88d6d88ed29b.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-db2d88d6d88ed29b.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-db2d88d6d88ed29b.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-db2d88d6d88ed29b.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-db2d88d6d88ed29b.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-db2d88d6d88ed29b.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/v1/images/edits/route-db2d88d6d88ed29b.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-db2d88d6d88ed29b.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-db2d88d6d88ed29b.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-db2d88d6d88ed29b.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-db2d88d6d88ed29b.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-db2d88d6d88ed29b.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-db2d88d6d88ed29b.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/v1/rerank/route-db2d88d6d88ed29b.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-db2d88d6d88ed29b.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-db2d88d6d88ed29b.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/v1/route-db2d88d6d88ed29b.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-db2d88d6d88ed29b.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-db2d88d6d88ed29b.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-db2d88d6d88ed29b.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-db2d88d6d88ed29b.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-db2d88d6d88ed29b.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-db2d88d6d88ed29b.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-db2d88d6d88ed29b.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-db2d88d6d88ed29b.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/version/route-db2d88d6d88ed29b.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-db2d88d6d88ed29b.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/version/update/route-db2d88d6d88ed29b.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/landing/page-8003579ac4a50ad7.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/login/{page-6667717a7afa8499.js → page-5ed7892846d9515e.js} +1 -1
  788. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-db2d88d6d88ed29b.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/page-db2d88d6d88ed29b.js +1 -0
  790. package/app/.next-cli-build/static/chunks/{main-d2d664d299c2e1bc.js → main-f5790cdbdcedda06.js} +1 -1
  791. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-db2d88d6d88ed29b.js +1 -0
  792. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-db2d88d6d88ed29b.js +1 -0
  793. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-db2d88d6d88ed29b.js +1 -0
  794. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-db2d88d6d88ed29b.js +1 -0
  795. package/app/.next-cli-build/static/chunks/{webpack-0f2e33a3ec5861c7.js → webpack-53761340c978c11c.js} +1 -1
  796. package/app/.next-cli-build/static/css/0dcaf31739cfe59e.css +1 -0
  797. package/app/custom-server.js +2 -0
  798. package/app/node_modules/@next/env/package.json +1 -1
  799. package/app/node_modules/@swc/helpers/esm/_interop_require_default.js +4 -0
  800. package/app/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +36 -0
  801. package/app/node_modules/@swc/helpers/package.json +703 -469
  802. package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
  803. package/app/node_modules/baseline-browser-mapping/package.json +3 -3
  804. package/app/node_modules/nanoid/package.json +1 -1
  805. package/app/node_modules/next/dist/build/swc/index.js +1 -1
  806. package/app/node_modules/next/dist/build/webpack-config.js +3 -3
  807. package/app/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +8 -6
  808. package/app/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +26 -20
  809. package/app/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +2 -1
  810. package/app/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +5 -2
  811. package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +2 -1
  812. package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +3 -1
  813. package/app/node_modules/next/dist/client/components/segment-cache/cache.js +150 -169
  814. package/app/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +16 -54
  815. package/app/node_modules/next/dist/client/components/segment-cache/navigation.js +115 -23
  816. package/app/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +61 -6
  817. package/app/node_modules/next/dist/client/components/segment-cache/scheduler.js +53 -36
  818. package/app/node_modules/next/dist/client/route-params.js +4 -8
  819. package/app/node_modules/next/dist/compiled/mini-css-extract-plugin/cjs.js +1 -1
  820. package/app/node_modules/next/dist/compiled/mini-css-extract-plugin/index.js +1 -1
  821. package/app/node_modules/next/dist/compiled/next-devtools/index.js +21 -21
  822. package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +26 -26
  823. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +26 -26
  824. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +26 -26
  825. package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +24 -24
  826. package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
  827. package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +9 -9
  828. package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +9 -9
  829. package/app/node_modules/next/dist/compiled/sass-loader/cjs.js +1 -1
  830. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  831. package/app/node_modules/next/dist/lib/turbopack-cache-seed.js +15 -7
  832. package/app/node_modules/next/dist/server/app-render/app-render.js +2 -0
  833. package/app/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +2 -1
  834. package/app/node_modules/next/dist/server/async-storage/request-store.js +29 -20
  835. package/app/node_modules/next/dist/server/async-storage/work-store.js +1 -0
  836. package/app/node_modules/next/dist/server/config.js +1 -1
  837. package/app/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +90 -11
  838. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +24 -4
  839. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  840. package/app/node_modules/next/dist/server/image-optimizer.js +1 -0
  841. package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  842. package/app/node_modules/next/dist/server/lib/encode-header-safe.js +44 -0
  843. package/app/node_modules/next/dist/server/lib/implicit-tags.js +3 -3
  844. package/app/node_modules/next/dist/server/lib/patch-fetch.js +2 -2
  845. package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
  846. package/app/node_modules/next/dist/server/use-cache/handlers.js +14 -0
  847. package/app/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +88 -2
  848. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  849. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  850. package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
  851. package/app/node_modules/next/package.json +11 -11
  852. package/app/node_modules/sql.js/dist/sql-wasm.js +74 -73
  853. package/app/node_modules/sql.js/package.json +1 -1
  854. package/app/node_modules/ws/lib/permessage-deflate.js +3 -1
  855. package/app/node_modules/ws/package.json +1 -1
  856. package/app/package.json +5 -3
  857. package/app/public/downloads/polyrouter-connector/README.txt +14 -0
  858. package/app/public/downloads/polyrouter-connector/background.js +138 -0
  859. package/app/public/downloads/polyrouter-connector/content.js +61 -0
  860. package/app/public/downloads/polyrouter-connector/icon.png +0 -0
  861. package/app/public/downloads/polyrouter-connector/manifest.json +38 -0
  862. package/app/public/downloads/polyrouter-connector/popup.css +99 -0
  863. package/app/public/downloads/polyrouter-connector/popup.html +36 -0
  864. package/app/public/downloads/polyrouter-connector/popup.js +9 -0
  865. package/app/public/downloads/polyrouter-connector.zip +0 -0
  866. package/app/public/providers/trae.png +0 -0
  867. package/app/public/providers/trae.svg +5 -0
  868. package/app/server.js +1 -1
  869. package/package.json +1 -1
  870. package/app/.next-cli-build/server/chunks/2620.js +0 -1
  871. package/app/.next-cli-build/server/chunks/4185.js +0 -1
  872. package/app/.next-cli-build/server/chunks/5852.js +0 -8
  873. package/app/.next-cli-build/server/chunks/8230.js +0 -65
  874. package/app/.next-cli-build/static/chunks/1321-bdfb5e6d5dadcda7.js +0 -1
  875. package/app/.next-cli-build/static/chunks/1a258343.6854776462735bdd.js +0 -1
  876. package/app/.next-cli-build/static/chunks/3794-d7cddff008311ab3.js +0 -52
  877. package/app/.next-cli-build/static/chunks/4024-823f5cdd3f7f04cc.js +0 -1
  878. package/app/.next-cli-build/static/chunks/5497-325815f573697f27.js +0 -7
  879. package/app/.next-cli-build/static/chunks/8591-9aad5435634b497b.js +0 -65
  880. package/app/.next-cli-build/static/chunks/9da6db1e-976640ccbb1e41ba.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-2ab5b8a56273130e.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-1fdda6a6a711f69c.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6022aa84d8a2143d.js +0 -12
  884. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-4a8ae0d8807210fe.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/_global-error/page-0ba50b07487d53e1.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/analytics/installation/route-0ba50b07487d53e1.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-0ba50b07487d53e1.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-0ba50b07487d53e1.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-0ba50b07487d53e1.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-0ba50b07487d53e1.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-0ba50b07487d53e1.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-0ba50b07487d53e1.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/auth/setup-password/route-0ba50b07487d53e1.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-0ba50b07487d53e1.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-0ba50b07487d53e1.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-0ba50b07487d53e1.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-0ba50b07487d53e1.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-0ba50b07487d53e1.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-0ba50b07487d53e1.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-0ba50b07487d53e1.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-0ba50b07487d53e1.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-0ba50b07487d53e1.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-0ba50b07487d53e1.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-0ba50b07487d53e1.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-0ba50b07487d53e1.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-0ba50b07487d53e1.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-0ba50b07487d53e1.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-0ba50b07487d53e1.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-0ba50b07487d53e1.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-0ba50b07487d53e1.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-0ba50b07487d53e1.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-0ba50b07487d53e1.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-0ba50b07487d53e1.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/combos/route-0ba50b07487d53e1.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-0ba50b07487d53e1.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-0ba50b07487d53e1.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-0ba50b07487d53e1.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-0ba50b07487d53e1.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-0ba50b07487d53e1.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-0ba50b07487d53e1.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/health/route-0ba50b07487d53e1.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/init/route-0ba50b07487d53e1.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-0ba50b07487d53e1.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/keys/route-0ba50b07487d53e1.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/locale/route-0ba50b07487d53e1.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-0ba50b07487d53e1.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-0ba50b07487d53e1.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-0ba50b07487d53e1.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-0ba50b07487d53e1.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-0ba50b07487d53e1.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-0ba50b07487d53e1.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-0ba50b07487d53e1.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-0ba50b07487d53e1.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-0ba50b07487d53e1.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-0ba50b07487d53e1.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-0ba50b07487d53e1.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/route-0ba50b07487d53e1.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/models/test/route-0ba50b07487d53e1.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-0ba50b07487d53e1.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-0ba50b07487d53e1.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-0ba50b07487d53e1.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-0ba50b07487d53e1.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-0ba50b07487d53e1.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-0ba50b07487d53e1.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-0ba50b07487d53e1.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-0ba50b07487d53e1.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-0ba50b07487d53e1.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-0ba50b07487d53e1.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-0ba50b07487d53e1.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-0ba50b07487d53e1.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-0ba50b07487d53e1.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/pricing/route-0ba50b07487d53e1.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-0ba50b07487d53e1.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-0ba50b07487d53e1.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-0ba50b07487d53e1.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-0ba50b07487d53e1.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-0ba50b07487d53e1.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-0ba50b07487d53e1.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-0ba50b07487d53e1.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-0ba50b07487d53e1.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-0ba50b07487d53e1.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/providers/route-0ba50b07487d53e1.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-0ba50b07487d53e1.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-0ba50b07487d53e1.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-0ba50b07487d53e1.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-0ba50b07487d53e1.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-0ba50b07487d53e1.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-0ba50b07487d53e1.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-0ba50b07487d53e1.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-0ba50b07487d53e1.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-0ba50b07487d53e1.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-0ba50b07487d53e1.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-0ba50b07487d53e1.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-0ba50b07487d53e1.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-0ba50b07487d53e1.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-0ba50b07487d53e1.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-0ba50b07487d53e1.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-0ba50b07487d53e1.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-0ba50b07487d53e1.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/realtime/authorize/route-0ba50b07487d53e1.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/realtime/tickets/route-0ba50b07487d53e1.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-0ba50b07487d53e1.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-0ba50b07487d53e1.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/settings/public-telemetry/route-0ba50b07487d53e1.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-0ba50b07487d53e1.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/settings/route-0ba50b07487d53e1.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-0ba50b07487d53e1.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/tags/route-0ba50b07487d53e1.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-0ba50b07487d53e1.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-0ba50b07487d53e1.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-0ba50b07487d53e1.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-0ba50b07487d53e1.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-0ba50b07487d53e1.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-0ba50b07487d53e1.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-0ba50b07487d53e1.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-0ba50b07487d53e1.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-0ba50b07487d53e1.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-0ba50b07487d53e1.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-0ba50b07487d53e1.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-0ba50b07487d53e1.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-0ba50b07487d53e1.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-0ba50b07487d53e1.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-0ba50b07487d53e1.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-0ba50b07487d53e1.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-0ba50b07487d53e1.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-0ba50b07487d53e1.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-0ba50b07487d53e1.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-0ba50b07487d53e1.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-0ba50b07487d53e1.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-0ba50b07487d53e1.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-0ba50b07487d53e1.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-0ba50b07487d53e1.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-0ba50b07487d53e1.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-0ba50b07487d53e1.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-0ba50b07487d53e1.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-0ba50b07487d53e1.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-0ba50b07487d53e1.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/v1/images/edits/route-0ba50b07487d53e1.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-0ba50b07487d53e1.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-0ba50b07487d53e1.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-0ba50b07487d53e1.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-0ba50b07487d53e1.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-0ba50b07487d53e1.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-0ba50b07487d53e1.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/v1/rerank/route-0ba50b07487d53e1.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-0ba50b07487d53e1.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-0ba50b07487d53e1.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/route-0ba50b07487d53e1.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-0ba50b07487d53e1.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-0ba50b07487d53e1.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-0ba50b07487d53e1.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-0ba50b07487d53e1.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-0ba50b07487d53e1.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-0ba50b07487d53e1.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-0ba50b07487d53e1.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-0ba50b07487d53e1.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/version/route-0ba50b07487d53e1.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-0ba50b07487d53e1.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/version/update/route-0ba50b07487d53e1.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/landing/page-153102f46b226989.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-0ba50b07487d53e1.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/page-0ba50b07487d53e1.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-0ba50b07487d53e1.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-0ba50b07487d53e1.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-0ba50b07487d53e1.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-0ba50b07487d53e1.js +0 -1
  1047. package/app/.next-cli-build/static/css/cfbc2ef62ed21a21.css +0 -1
  1048. package/app/.next-cli-build/static/kpszOnTsyBdW7PAPsg2JX/_buildManifest.js +0 -1
  1049. package/app/node_modules/next/dist/server/lib/encode-cache-tag.js +0 -45
  1050. /package/app/.next-cli-build/static/{kpszOnTsyBdW7PAPsg2JX → KhMV8HKalIINcrsYyx_UA}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8229],{32535:(e,t,i)=>{i.d(t,{Ay:()=>oC});var s,r,n,a="u">typeof window?window:void 0,o="u">typeof globalThis?globalThis:a,l=null==o?void 0:o.navigator,u=null==o?void 0:o.document,h=null==o?void 0:o.location,c=null==o?void 0:o.fetch,d=null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:void 0,p=null==o?void 0:o.AbortController,v=null==o?void 0:o.CompressionStream,g=null==l?void 0:l.userAgent;function f(){return!(!a||!1===a.navigator.onLine)}var _="u">typeof globalThis?globalThis:a;_&&"u"<typeof self&&(_.self=_),_&&"u"<typeof File&&(_.File=function(){});var m=null!=a?a:{},y={DEBUG:!1,LIB_VERSION:"0.5.0",LIB_NAME:"browser-common"};function b(e,t,i,s,r,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(s,r)}function w(e){return function(){var t=this,i=arguments;return new Promise(function(s,r){var n=e.apply(t,i);function a(e){b(n,s,r,a,o,"next",e)}function o(e){b(n,s,r,a,o,"throw",e)}a(void 0)})}}function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(null,arguments)}function k(e,t){if(null==e)return{};var i={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;i[s]=e[s]}return i}var E=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}};function S(e){return"string"==typeof e||e}function P(e){return"string"==typeof e?e:void 0}var O,I,F,C,$=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],T=((O={}).AnonymousId="anonymous_id",O.DistinctId="distinct_id",O.Props="props",O.EnablePersonProcessing="enable_person_processing",O.PersonMode="person_mode",O.FeatureFlagDetails="feature_flag_details",O.FeatureFlags="feature_flags",O.FeatureFlagPayloads="feature_flag_payloads",O.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",O.BootstrapFeatureFlags="bootstrap_feature_flags",O.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",O.OverrideFeatureFlags="override_feature_flags",O.Queue="queue",O.AiQueue="ai_queue",O.AiCaptureQueue="ai_capture_queue",O.LogsQueue="logs_queue",O.OptedOut="opted_out",O.SessionId="session_id",O.SessionStartTimestamp="session_start_timestamp",O.SessionLastTimestamp="session_timestamp",O.PersonProperties="person_properties",O.GroupProperties="group_properties",O.InstalledAppBuild="installed_app_build",O.InstalledAppVersion="installed_app_version",O.SessionReplay="session_replay",O.PushRegistered="push_registered",O.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",O.SurveyLastSeenDate="survey_last_seen_date",O.SurveysSeen="surveys_seen",O.Surveys="surveys",O.RemoteConfig="remote_config",O.FlagsEndpointWasHit="flags_endpoint_was_hit",O.DeviceId="device_id",O),M=((I={}).GZipJS="gzip-js",I.Base64="base64",I),R=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],A=["token"],L="NativeGzipValidationError",D=e=>e.length>=2&&31===e[0]&&139===e[1],N=(e,t)=>e===M.GZipJS||t===M.GZipJS||"gzip"===t,j=e=>!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):""),q=e=>{var t=Error("Native gzip produced invalid output: "+e);throw t.name=L,t},B=(F=w(function*(e,t){18>e.size&&q("too-short");var i=new Uint8Array((yield e.slice(0,10).arrayBuffer()));D(i)&&8===i[2]||q("invalid-header");var s=new DataView((yield e.slice(e.size-8).arrayBuffer()));s.getUint32(0,!0)!==(e=>{for(var t=(()=>{if(C)return C;C=[];for(var e=0;256>e;e++){for(var t=e,i=0;8>i;i++)t=1&t?0xedb88320^t>>>1:t>>>1;C[e]=t>>>0}return C})(),i=0xffffffff,s=0;e.length>s;s++)i=t[255&(i^e[s])]^i>>>8;return(0xffffffff^i)>>>0})(t)&&q("invalid-crc");var r=t.length>>>0;s.getUint32(4,!0)!==r&&q("invalid-size")}),function(e,t){return F.apply(this,arguments)});function H(){return(H=w(function*(e,t,i){void 0===t&&(t=!0);try{var s,r=(new TextEncoder).encode(e),n=new globalThis.CompressionStream("gzip"),a=n.writable.getWriter(),o=a.write(r).then(()=>a.close()).catch((s=w(function*(e){try{yield a.abort(e)}catch(e){}throw e}),function(e){return s.apply(this,arguments)})),l=new Response(n.readable).blob(),u=(yield Promise.all([l,o]))[0];return yield B(u,r),u}catch(e){if(null!=i&&i.rethrow)throw e;return t&&console.error("Failed to gzip compress data",e),null}})).apply(this,arguments)}var z=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],V=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return z.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function U(e,t){return -1!==e.indexOf(t)}var G=function(e){return e.trim()},W=function(e){return e.replace(/^\$/,"")};function J(e){var t,i=[];return null!=(t=JSON.stringify(e,function(e,t){if("bigint"==typeof t)return t.toString();if("function"!=typeof t&&"symbol"!=typeof t){if(t instanceof Error)return{name:t.name,message:t.message,stack:t.stack};if(t&&"object"==typeof t){for(;i.length>0&&i[i.length-1]!==this;)i.pop();if(i.includes(t))return"[Circular]";i.push(t)}return t}}))?t:"null"}var K=Object.prototype,Z=K.hasOwnProperty,Y=K.toString,Q=Array.isArray||function(e){return"[object Array]"===Y.call(e)},X=e=>"function"==typeof e,ee=e=>e===Object(e)&&!Q(e),et=e=>{if(ee(e)){for(var t in e)if(Z.call(e,t))return!1;return!0}return!1},ei=e=>void 0===e,es=e=>"[object String]"==Y.call(e),er=e=>es(e)&&0===e.trim().length,en=e=>null===e,ea=e=>ei(e)||en(e),eo=e=>"[object Number]"==Y.call(e)&&e==e,el=e=>eo(e)&&e>0,eu=e=>"[object Boolean]"===Y.call(e),eh=e=>U(R,e),ec=e=>U(A,e);function ed(e){return null===e||"object"!=typeof e}function ep(e,t){return({}).toString.call(e)==="[object "+t+"]"}function ev(e){switch(({}).toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return ef(e,Error)}}function eg(e){return"u">typeof Event&&ef(e,Event)}function ef(e,t){try{return e instanceof t}catch(e){return!1}}var e_=[!0,"true",1,"1","yes"],em=[!1,"false",0,"0","no"];function ey(e,t,i,s,r){return t>i&&(s.warn("min cannot be greater than max."),t=i),eo(e)?e>i?(s.warn(" cannot be greater than max: "+i+". Using max value instead."),i):t>e?(s.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(s.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+r),ey(r||i,t,i,s))}class eb{constructor(e){this.k={},this.S=e.S,this.C=ey(e.bucketSize,0,100,e.I),this.R=ey(e.refillRate,0,this.C,e.I),this.A=ey(e.refillInterval,0,864e5,e.I)}O(e,t){var i=Math.floor((t-e.lastAccess)/this.A);i>0&&(e.tokens=Math.min(e.tokens+i*this.R,this.C),e.lastAccess=e.lastAccess+i*this.A)}consumeRateLimit(e){var t,i=Date.now(),s=String(e),r=this.k[s];return r?this.O(r,i):this.k[s]=r={tokens:this.C,lastAccess:i},0===r.tokens||(r.tokens--,0===r.tokens&&(null==(t=this.S)||t.call(this,e)),0===r.tokens)}stop(){this.k={}}}var ew="Mobile",ex="Android",ek="Tablet",eE=ex+" "+ek,eS="iPad",eP="Apple",eO=eP+" Watch",eI="Safari",eF="BlackBerry",eC="Samsung",e$=eC+"Browser",eT=eC+" Internet",eM="Chrome",eR=eM+" OS",eA=eM+" iOS",eL="Internet Explorer",eD=eL+" "+ew,eN="Opera",ej=eN+" Mini",eq="Edge",eB="Microsoft "+eq,eH="Firefox",ez=eH+" iOS",eV="Nintendo",eU="PlayStation",eG="Xbox",eW=ex+" "+ew,eJ=ew+" "+eI,eK="Windows",eZ=eK+" Phone",eY="Nokia",eQ="Ouya",eX="Generic",e0=eX+" "+ew.toLowerCase(),e1=eX+" "+ek.toLowerCase(),e2="Konqueror",e3="Oculus Browser",e5="Vivaldi",e6="Yandex",e8="Whale",e4="DuckDuckGo",e9="Pale Moon",e7="Waterfox",te="Brave",tt="Google Search App",ti="(\\d+(\\.\\d+)?)",ts=RegExp("Version/"+ti),tr=RegExp(eG,"i"),tn=RegExp(eU+" \\w+","i"),ta=RegExp(eV+" \\w+","i"),to=RegExp(eF+"|PlayBook|BB10","i"),tl={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},tu=function(e,t,i,s){var r;return t=t||"",(null!=i&&i.brave?te:null)||(null!=s&&s.detectGoogleSearchApp&&U(e,"GSA/")?tt:U(e," OPR/")&&U(e,"Mini")?ej:U(e," OPR/")?eN:to.test(e)?eF:U(e,"IE"+ew)||U(e,"WPDesktop")?eD:U(e,"OculusBrowser")?e3:U(e,e$)?eT:U(e,eq)||U(e,"Edg/")?eB:U(e,e5+"/")?e5:U(e,"YaBrowser/")?e6:U(e,e8+"/")?e8:U(e,e4+"/")||U(e,"Ddg/")?e4:U(e,"FBIOS")?"Facebook "+ew:U(e,"UCWEB")||U(e,"UCBrowser")?"UC Browser":U(e,"CriOS")?eA:U(e,"CrMo")||U(e,eM)?eM:U(e,ex)&&U(e,eI)?eW:U(e,"FxiOS")?ez:U(e.toLowerCase(),e2.toLowerCase())?e2:U(e,te+"/")?te:(r=t)&&U(r,eP)||U(e,eI)&&!U(e,eM)&&!U(e,ex)?U(e,ew)?eJ:eI:U(e,"PaleMoon/")?e9:U(e,e7+"/")?e7:U(e,eH)?eH:U(e,"MSIE")||U(e,"Trident/")?eL:U(e,"Gecko")?eH:"")},th={[eD]:[RegExp("rv:"+ti)],[eB]:[RegExp(eq+"?\\/"+ti)],[eM]:[RegExp("("+eM+"|CrMo)\\/"+ti)],[eA]:[RegExp("CriOS\\/"+ti)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+ti)],[eI]:[ts],[eJ]:[ts],[eN]:[RegExp("(Opera|OPR)\\/"+ti)],[eH]:[RegExp(eH+"\\/"+ti)],[ez]:[RegExp("FxiOS\\/"+ti)],[e2]:[RegExp("Konqueror[:/]?"+ti,"i")],[eF]:[RegExp(eF+" "+ti),ts],[eW]:[RegExp("android\\s"+ti,"i")],[eT]:[RegExp(e$+"\\/"+ti)],[e3]:[RegExp("OculusBrowser\\/"+ti)],[e5]:[RegExp(e5+"\\/"+ti)],[e6]:[RegExp("YaBrowser\\/"+ti)],[e8]:[RegExp(e8+"\\/"+ti)],[te]:[RegExp(te+"\\/"+ti)],[e4]:[RegExp("(DuckDuckGo|Ddg)\\/"+ti)],[e9]:[RegExp("PaleMoon\\/"+ti)],[e7]:[RegExp(e7+"\\/"+ti)],[tt]:[RegExp("GSA\\/"+ti)],[eL]:[RegExp("(rv:|MSIE )"+ti)],Mozilla:[RegExp("rv:"+ti)]},tc=function(e,t,i,s){var r=th[tu(e,t,i,s)];if(ei(r))return null;for(var n=0;r.length>n;n++){var a=e.match(r[n]);if(a)return parseFloat(a[a.length-2])}return null},td=[[RegExp(eG+"; "+eG+" (.*?)[);]","i"),e=>[eG,e&&e[1]||""]],[RegExp(eV,"i"),[eV,""]],[RegExp(eU,"i"),[eU,""]],[to,[eF,""]],[RegExp(eK,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[eZ,""];if(new RegExp(ew).test(t)&&!/IEMobile\b/.test(t))return[eK+" "+ew,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var s=tl[i[1]]||"";return/arm/i.test(t)&&(s="RT"),[eK,s]}return[eK,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=ei(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+ex+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ex+")","i"),e=>e&&e[2]?[ex,[e[2],e[3],e[4]||"0"].join(".")]:[ex,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[eR,""]],[/Linux|debian/i,["Linux",""]]],tp=function(e){return ta.test(e)?eV:tn.test(e)?eU:tr.test(e)?eG:RegExp(eQ,"i").test(e)?eQ:RegExp("("+eZ+"|WPDesktop)","i").test(e)?eZ:/iPad/.test(e)?eS:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eO:to.test(e)?eF:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(eY,"i").test(e)?eY:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(ew).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?ex:eE:RegExp("(pda|"+ew+")","i").test(e)?e0:RegExp(ek,"i").test(e)&&!RegExp(ek+" pc","i").test(e)?e1:""},tv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function tg(e,t){return"string"==typeof e&&tv.test(e)?e:t()}function tf(e){return e?e.split("#")[0]:e}function t_(e,t){var i=setTimeout(e,t);return(null==i?void 0:i.unref)&&(null==i||i.unref()),i}function tm(e,t,i){return ty.apply(this,arguments)}function ty(){return(ty=w(function*(e,t,i){var s;try{return yield Promise.race([e,new Promise((e,r)=>{s=t_(()=>{try{null==i||i(),e()}catch(e){r(e)}},t)})])}finally{clearTimeout(s)}})).apply(this,arguments)}var tb={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},tw=tb.info;function tx(e){var t=[];for(var i in e){var s=e[i];en(s)||ei(s)||t.push({key:i,value:function e(t){if(eu(t))return{boolValue:t};if("number"==typeof t)return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if("string"==typeof t)return{stringValue:t};if(Q(t))return{arrayValue:{values:t.map(t=>e(t))}};try{return{stringValue:JSON.stringify(t)}}catch(e){return{stringValue:String(t)}}}(s)})}return t}function tk(e,t,i){return x({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":i})}function tE(e,t,i,s){return{resourceLogs:[{resource:{attributes:tx(t)},scopeLogs:[{scope:{name:i,version:s},logRecords:e}]}]}}let tS=class{constructor(e,t,i,s,r,n,a){var o;void 0===n&&(n=()=>Promise.resolve()),this._instance=e,this.Oi=t,this.I=i,this.Ji=s,this.Ki=r,this.Xi=n,this.tn=a,this.en=null,this.rn=0,this.nn=0,this.sn=0,this.an=0,this.ln=!1,this.un=t.maxBufferSize,this.hn=Math.max(null!=(o=t.maxQueueSize)?o:t.maxBufferSize,t.maxBufferSize),this.dn=t.flushIntervalMs,this.vn=t.maxBatchRecordsPerPost,this.cn=t.rateCapWindowMs,this.fn=t.maxLogsPerInterval}reset(){this.pn(),this.en=null,this.sn=0,this.an=0,this.ln=!1,this.rn=0,this.nn=0,this.vn=this.Oi.maxBatchRecordsPerPost}onReconnect(){this.nn=0,this.gn()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&null!=e&&e.body){var t=this.mn(e);if(null!==t)if(t.body){if(this.yn()){var i,s,r,n,a,o,l,u,h={record:(i=this.Ji(),r=(s=tb[t.level||"info"]||tw).text,n=s.number,a=String(Date.now())+"000000",o={},i.distinctId&&(o.posthogDistinctId=i.distinctId),i.sessionId&&(o.sessionId=i.sessionId),i.windowId&&(o["window.id"]=i.windowId),ea(i.sessionStartTimestamp)||(o.sessionStartTimestamp=String(i.sessionStartTimestamp)),ea(i.lastActivityTimestamp)||(o.lastActivityTimestamp=String(i.lastActivityTimestamp)),i.currentUrl&&(o["url.full"]=i.currentUrl),i.screenName&&(o["screen.name"]=i.screenName),i.appState&&(o["app.state"]=i.appState),i.activeFeatureFlags&&i.activeFeatureFlags.length>0&&(o.feature_flags=i.activeFeatureFlags),l=x({},o,t.attributes||{}),u={timeUnixNano:a,observedTimeUnixNano:a,severityNumber:n,severityText:r,body:{stringValue:t.body},attributes:tx(l)},t.trace_id&&(u.traceId=t.trace_id),t.span_id&&(u.spanId=t.span_id),ei(t.trace_flags)||(u.flags=t.trace_flags),u)};this.Ki(()=>this.bn(h))}}else this.I.info("Log was rejected in beforeSend function")}}mn(e){var t=this.Oi.beforeSend;if(!t)return e;var i=Q(t)?t:[t],s=e;for(var r of i)try{var n=r(s);if(!n)return this.I.info("Log was rejected in beforeSend function"),null;s=n}catch(e){return this.I.error("Error in beforeSend function for log:",e),null}return s}yn(){if(void 0===this.fn)return!0;var e=Date.now(),t=e-this.sn;return this.cn>t&&t>=0||(this.sn=e,this.an=0,this.ln=!1),this.fn>this.an?(this.an++,!0):(this.ln||(this.I.warn("captureLog dropping logs: exceeded "+this.fn+" logs per "+this.cn+"ms"),this.ln=!0),!1)}flush(){var e=this;return w(function*(){if(!e._instance.isDisabled)return e.en||(e.en=e._n().finally(()=>{e.en=null})),e.en})()}_n(){var e=this;return w(function*(){e.pn();var t=null!=(r=e._instance.getPersistedProperty(T.LogsQueue))?r:[];if(0!==t.length)for(var i=t.length,s=0;t.length>0&&i>s;){e.rn=0;var r,n,a,o=Math.min(t.length,e.vn),l=t.slice(0,o),u=tE(l.map(e=>e.record),e.wn(),null!=(n=e.tn)?n:e._instance.getLibraryId(),e._instance.getLibraryVersion()),h=yield e._instance.kn(u);if("too-large"===h.kind&&l.length>1)e.vn=Math.max(1,Math.floor(l.length/2)),e.I.warn("Received 413 when sending logs batch of size "+l.length+", reducing batch size to "+e.vn);else if("retry-later"===h.kind||("too-large"===h.kind?e.I.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):"ok"===h.kind&&e.Oi.maxBatchRecordsPerPost>e.vn&&(e.vn=Math.min(e.Oi.maxBatchRecordsPerPost,e.vn+1)),yield e.xn(l.length),t=null!=(a=e._instance.getPersistedProperty(T.LogsQueue))?a:[],s+=l.length,"fatal"===h.kind))throw h.error}})()}xn(e){var t=this;return w(function*(){var i,s=Math.max(0,e-t.rn),r=null!=(i=t._instance.getPersistedProperty(T.LogsQueue))?i:[];t._instance.setPersistedProperty(T.LogsQueue,r.slice(s)),yield t.Xi()})()}wn(){return tk(this.Oi,this._instance.getLibraryId(),this._instance.getLibraryVersion())}bn(e){var t;if(!this._instance.optedOut){var i=null!=(t=this._instance.getPersistedProperty(T.LogsQueue))?t:[];this.hn>i.length||(i.shift(),this.rn++,this.I.info("Logs queue is full, dropping oldest record.")),i.push(e),this._instance.setPersistedProperty(T.LogsQueue,i),this.un>i.length?this.Sn():this.gn()}}Sn(e){void 0===e&&(e=this.dn),this.Cn||(this.Cn=t_(()=>{this.Cn=void 0,this.gn()},e))}Tn(){var e=Math.min(Math.max(0,this.nn-1),6);return this.dn*Math.pow(2,e)}Mn(){var e=this._instance.getPersistedProperty(T.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return w(function*(){t.pn();var i=t.flush().catch(()=>{});void 0!==e?yield tm(i,e):yield i})()}flushWithTimeout(e){var t=this;return w(function*(){var i=t.flush();yield tm(i,e,()=>{i.catch(()=>{})})})()}gn(){this.flush().then(()=>{this.nn=0},e=>{this.nn++,this.I.error("PostHog logs flush failed:",e)}).finally(()=>{!this._instance.isDisabled&&this.Mn()&&this.Sn(this.Tn())})}pn(){this.Cn&&(clearTimeout(this.Cn),this.Cn=void 0)}};var tP=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function tO(e){return String(e)+"000000"}function tI(e,t,i,s){var r="";return s&&(r=Object.keys(s).sort().map(e=>JSON.stringify(e)+":"+JSON.stringify(s[e])).join(",")),e+"\0"+t+"\0"+(null!=i?i:"")+"\0"+r}let tF=class{constructor(e,t,i){this._instance=e,this.Oi=t,this.I=i,this.En=new Map,this.en=null,this.In=!1,this.Rn=new Map,this.Pn=new Set,this.An=0}count(e,t,i){void 0===t&&(t=1),this.Fn({name:e,type:"count",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}gauge(e,t,i){this.Fn({name:e,type:"gauge",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}histogram(e,t,i){this.Fn({name:e,type:"histogram",value:t,unit:null==i?void 0:i.unit,attributes:null==i?void 0:i.attributes})}flush(){var e,t=this,i=this.en,s=(e=w(function*(){i&&(yield i.catch(()=>{})),yield t.On()}),function(){return e.apply(this,arguments)})().finally(()=>{this.en===s&&(this.en=null)});return this.en=s,s}drainWindow(){if(0===this.En.size)return null;var e=this.En;return this.En=new Map,this.In=!1,this.Rn=new Map,this.Pn=new Set,this.Ln(e)}reset(){this.An++,this.pn(),this.En=new Map,this.en=null,this.In=!1,this.Rn=new Map,this.Pn=new Set}Fn(e){if(!this._instance.isDisabled&&!this._instance.optedOut){var t=this.mn(e);if(null!==t)if(t.name&&"string"==typeof t.name)if("number"==typeof t.value&&Number.isFinite(t.value))if("count"===t.type&&0>t.value)this.I.warn("Dropping count '"+t.name+"': counters are monotonic, value must be >= 0");else{try{i=t.attributes?x({},t.attributes):void 0,s=tI(t.type,t.name,t.unit,i)}catch(e){return void this.I.warn("Dropping metric '"+t.name+"': attributes could not be serialized",e)}var i,s,r=this.En.get(s);if(!r){if(!this.$n())return;r={name:t.name,type:t.type,unit:t.unit,attributes:i,windowStartMs:Date.now()},this.En.set(s,r)}var n=this.Rn.get(t.name);void 0===n?this.Rn.set(t.name,t.type):n===t.type||this.Pn.has(t.name)||(this.Pn.add(t.name),this.I.warn("Metric name '"+t.name+"' is already used as a "+n+"; recording it as a "+t.type+" too will blend both series in charts. Use a distinct name.")),this.Dn(r,t.value),this.Sn()}else this.I.warn("Dropping metric '"+t.name+"': value must be a finite number");else this.I.warn("Dropping metric with empty name")}}$n(){return this.Oi.maxSeriesPerFlush>this.En.size||(this.In||(this.In=!0,this.I.warn("Metric series cap reached ("+this.Oi.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Dn(e,t){var i;switch(e.type){case"count":e.total=(null!=(i=e.total)?i:0)+t;break;case"gauge":e.last=t;break;case"histogram":e.hist||(e.hist={count:0,sum:0,min:t,max:t,bucketCounts:Array(tP.length+1).fill(0)});var s=e.hist;s.count+=1,s.sum+=t,s.min=Math.min(s.min,t),s.max=Math.max(s.max,t),s.bucketCounts[function(e,t){for(var i=0;t.length>i;i++)if(t[i]>=e)return i;return t.length}(t,tP)]+=1}}mn(e){var t=this.Oi.beforeSend;if(!t)return e;var i=Q(t)?t:[t],s=e;for(var r of i)try{var n=r(s);if(!n)return this.I.info("Metric was rejected in beforeSend function"),null;s=n}catch(e){return this.I.error("Error in beforeSend function for metric:",e),null}return s}Sn(){this.Cn||(this.Cn=t_(()=>{this.Cn=void 0,this.flush().catch(e=>{this.I.error("Metrics flush failed:",e)})},this.Oi.flushIntervalMs))}pn(){this.Cn&&(clearTimeout(this.Cn),this.Cn=void 0)}On(){var e=this;return w(function*(){if(0!==e.En.size){var t=e.En;e.En=new Map,e.In=!1,e.Rn=new Map,e.Pn=new Set;var i=e.An,s=yield e._instance.Nn(e.Ln(t));if(i===e.An)switch(s.kind){case"ok":return;case"retry-later":return e.qn(t),void e.Sn();case"too-large":return void e.I.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void e.I.error("Failed to send metrics batch:",s.error)}}})()}Ln(e){var t,i,s,r,n,a,o;return t=this.jn(e),n=this.Oi,a=this._instance.getLibraryId(),o=this._instance.getLibraryVersion(),i=x({},n.resourceAttributes,{"service.name":n.serviceName||"unknown_service"},n.environment&&{"deployment.environment":n.environment},n.serviceVersion&&{"service.version":n.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":o}),s=this._instance.getLibraryId(),r=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:tx(i)},scopeMetrics:[{scope:{name:s,version:r},metrics:t}]}]}}jn(e){var t=tO(Date.now()),i=new Map;for(var s of e.values()){var r,n=tI(s.type,s.name,s.unit,void 0),a=i.get(n);a||(a=x({name:s.name},s.unit&&{unit:s.unit}),"count"===s.type?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:"gauge"===s.type?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},i.set(n,a));var o=tx(null!=(r=s.attributes)?r:{}),l=tO(s.windowStartMs);if("count"===s.type){var u,h={attributes:o,startTimeUnixNano:l,timeUnixNano:t,asDouble:null!=(u=s.total)?u:0};a.sum.dataPoints.push(h)}else if("gauge"===s.type){var c,d={attributes:o,timeUnixNano:t,asDouble:null!=(c=s.last)?c:0};a.gauge.dataPoints.push(d)}else s.hist&&a.histogram.dataPoints.push({attributes:o,startTimeUnixNano:l,timeUnixNano:t,count:s.hist.count,sum:s.hist.sum,min:s.hist.min,max:s.hist.max,bucketCounts:s.hist.bucketCounts,explicitBounds:tP})}return Array.from(i.values())}qn(e){var t,i;for(var s of e){var r=s[0],n=s[1],a=this.En.get(r);if(a)switch(a.windowStartMs=Math.min(a.windowStartMs,n.windowStartMs),a.type){case"count":a.total=(null!=(t=a.total)?t:0)+(null!=(i=n.total)?i:0);break;case"gauge":break;case"histogram":if(n.hist)if(a.hist){a.hist.count+=n.hist.count,a.hist.sum+=n.hist.sum,a.hist.min=Math.min(a.hist.min,n.hist.min),a.hist.max=Math.max(a.hist.max,n.hist.max);for(var o=0;a.hist.bucketCounts.length>o;o++)a.hist.bucketCounts[o]+=n.hist.bucketCounts[o]}else a.hist=n.hist}else this.$n()&&this.En.set(r,n)}}};class tC{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(i,t,0).apply(e),r=this.buildParsingContext(t),n=this.parseStacktrace(s,r);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return w(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&Q(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,s;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),x({},e,{cause:i,stack:s})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return w(function*(){var i=e;for(var s of t.modifiers)i=yield s(i);return i})()}convertToExceptionList(e,t){var i,s,r,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(s=t.handled)||s,synthetic:null!=(r=e.synthetic)&&r}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,x({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return sE&&i.length===sk||(sk=i.length,sE=i.reduce((i,s)=>{sx||(sx={});var r=sx[s];if(r)i[r[0]]=r[1];else for(var n=e(s),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,u=t[s];if(l&&u){i[l]=u,sx[s]=[l,u];break}}return i},{})),sE}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var s=(i,s)=>{if(4>=s){var r=this.buildCoercingContext(e,t,s);return this.applyCoercers(i,r)}};return x({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>s(e,i),next:e=>s(e,i+1)})}}function t$(e,t,i,s,r){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!(null!=t&&t.startsWith("webkit-masked-url://"))&&"<anonymous>"!==t};return ei(s)||(n.lineno=s),ei(r)||(n.colno=r),n}var tT=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),s=-1!==e.indexOf("safari-web-extension");return i||s?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},tM=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tR=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tA=/\((\S*)(?::(\d+))(?::(\d+))\)/,tL=(e,t)=>{var i=tM.exec(e);if(i)return t$(t,i[1],"?",+i[2],+i[3]);var s=tR.exec(e);if(s){if(s[2]&&0===s[2].indexOf("eval")){var r=tA.exec(s[2]);r&&(s[2]=r[1],s[3]=r[2],s[4]=r[3])}var n=tT(s[1]||"?",s[2]);return t$(t,n[1],n[0],s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}},tD=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tj=(e,t)=>{var i=tD.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var s=tN.exec(i[3]);s&&(i[1]=i[1]||"eval",i[3]=s[1],i[4]=s[2],i[5]="")}var r=i[3],n=i[1]||"?",a=tT(n,r);return t$(t,r=a[1],n=a[0],i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tq=/\(error: (.*)\)/;class tB{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=es(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ep(e,"DOMException")}isDOMError(e){return ep(e,"DOMError")}}class tH{match(e){return ev(e)}coerce(e,t){var i,s=this.getStack(e);return{type:this.getType(e),value:this.getMessage(e,t),stack:null!=s?s:null==(i=t.syntheticException)?void 0:i.stack,cause:e.cause?t.next(e.cause):void 0,synthetic:void 0===s}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return String(i.error&&"string"==typeof i.error.message?i.error.message:i)}getStack(e){return e.stacktrace||e.stack||void 0}}class tz{match(e){return!!ep(e,"ErrorEvent")&&(null!=e.error||this.li(e))}coerce(e,t){if(null!=e.error)return t.apply(e.error);var i,s=t.apply(e.message);return x({},s,{stack:null!=(i=this.hi(e))?i:s.stack,synthetic:!0})}li(e){return es(e.message)&&e.message.length>0}hi(e){var t,i,s=null!=(t=e.lineno)?t:0,r=null!=(i=e.colno)?i:0;if(es(e.filename)&&0!==e.filename.length&&0!==s)return"Error\n at "+e.filename+":"+s+":"+r}}var tV=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class tU{match(e){return"string"==typeof e}coerce(e,t){var i,s=this.getInfos(e),r=s[0],n=s[1];return{type:null!=r?r:"Error",value:null!=n?n:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,s=e.match(tV);return s&&(t=s[1],i=s[2]),[t,i]}}var tG=["fatal","error","warning","log","info","debug"];function tW(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var s=i.length;s>0;s--){var r=i.slice(0,s).join(", ");if(t>=r.length)return s===i.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class tJ{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,s,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null!=(i=this.getStack(e))?i:null==(s=t.syntheticException)?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(eg(e))return e.constructor.name;var t="name"in e?e.name:void 0;return es(t)&&!er(t)?t:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tW(e)}isSeverityLevel(e){return es(e)&&!er(e)&&tG.indexOf(e)>=0}getStack(e){try{return es(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:es(e.stack)&&e.stack.length>0?e.stack:void 0}catch(e){return}}getErrorPropertyFromObject(e){for(var t in e)if(({}).hasOwnProperty.call(e,t)){var i=e[t];if(ev(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tK{match(e){return eg(e)}coerce(e,t){var i,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+tW(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tZ{match(e){return ed(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tY{match(e){return ep(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!eg(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,s=this.getUnhandledRejectionReason(e);return ed(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tQ="$message",tX="$timestamp",t0=new Set([tQ,tX]),t1={enabled:!0,max_bytes:32768};function t2(e){var t;return e?{enabled:null!=(t=e.enabled)?t:t1.enabled,max_bytes:function(e,t){if(!eo(e)||e===1/0||e===-1/0)return t;var i=Math.floor(e);return 0>i?t:i}(e.max_bytes,t1.max_bytes)}:x({},t1)}class t3{constructor(e){this.Bn=[],this.Hn=0,this.Oi=t2(e)}setConfig(e){this.Oi=t2(e),this.zn()}add(e){var t=function(e){var t;try{t=J(e)}catch(e){return}try{var i=JSON.parse(t);if(!ee(i))return;var s=i[tQ],r=i[tX];if(!es(s)||0===s.trim().length||!es(r)&&!eo(r))return;return{step:i,json:t}}catch(e){return}}(e);if(t){var i=function(e){if("u">typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),i=0,s=0;t.length>s;s++)"%"===t[s]?(i+=1,s+=2):i+=1;return i}(t.json);i>this.Oi.max_bytes||(this.Bn.push({step:t.step,bytes:i}),this.Hn+=i,this.zn())}}getAttachable(){return this.Bn.map(e=>e.step)}clear(){this.Bn=[],this.Hn=0}size(){return this.Bn.length}zn(){for(;this.Hn>this.Oi.max_bytes&&this.Bn.length>0;){var e=this.Bn.shift();e&&(this.Hn-=e.bytes)}}}var t5=function(e,t){var i=(void 0===t?{}:t).debugEnabled,s={F(t){if(a&&(y.DEBUG||a.POSTHOG_DEBUG||i)&&!ei(a.console)&&a.console){for(var s=("__rrweb_original__"in a.console[t])?a.console[t].__rrweb_original__:a.console[t],r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];s(e,...n)}},debug(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.F("debug",...t)},info(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.F("log",...t)},warn(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.F("warn",...t)},error(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];s.F("error",...t)},critical(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];console.error(e,...i)},uninitializedWarning(e){s.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>t5(e+" "+t,i)};return s},t6=t5("[PostHog.js]"),t8=t6.createLogger,t4=t8("[ExternalScriptsLoader]"),t9=e=>{var t=null==u?void 0:u.querySelectorAll("script");if(t){for(var i=0;t.length>i;i++)if(t[i].src===e)return t[i]}},t7=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return t4.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var s=t9(t);if(s){if(s.__posthog_loading_callback_fired)return i();var r=s.__posthog_loading_error;return r?i(r):(s.addEventListener("load",e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)}),void s.addEventListener("error",e=>{s.__posthog_loading_error=e,i(e)}))}var n=()=>{if(!u)return i("document not found");if(t9(t))return t7(e,t,i);var s=u.createElement("script");if(s.type="text/javascript",s.crossOrigin="anonymous",s.src=t,s.onload=e=>{s.__posthog_loading_callback_fired=!0,i(void 0,e)},s.onerror=e=>{s.__posthog_loading_error=e,i(e)},e.config.prepare_external_dependency_script&&(s=e.config.prepare_external_dependency_script(s)),!s)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)u.head.appendChild(s);else{var r,n=u.querySelectorAll("body > script");n.length>0?null==(r=n[0].parentNode)||r.insertBefore(s,n[0]):u.body.appendChild(s)}};null!=u&&u.body?n():null==u||u.addEventListener("DOMContentLoaded",n)},ie={},it=(e,t)=>{var i="/static/"+t+".js?v="+e.version;return"toolbar"===t&&(i=i+"&t="+3e5*Math.floor(Date.now()/3e5)),e.requestRouter.endpointFor("assets",i)};m.__PosthogExtensions__=m.__PosthogExtensions__||{},m.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{if("remote-config"!==t){var s=e.config.strict_script_versioning;if(s){var r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js"),n=ie[r];if("fallback"===s&&n){if(t9(n))return void t7(e,n,i);delete ie[r]}t7(e,r,"fallback"===s?(s,n)=>{if(s)if("string"==typeof s)i(s);else{var a,o=it(e,t);ie[r]=o;var l=t9(r);null==l||null==(a=l.parentNode)||a.removeChild(l),t7(e,o,i)}else i(void 0,n)}:i)}else t7(e,it(e,t),i)}else{var a=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");t7(e,a,i)}},m.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var s=e.requestRouter.endpointFor("api",t);t7(e,s,i)},y.DEBUG=!1,y.LIB_VERSION="1.418.6",y.LIB_NAME="web";var ii="$people_distinct_id",is="distinct_id",ir="$device_id",ia="$device_model",io="__alias",il="__timers",iu="$autocapture_disabled_server_side",ih="$heatmaps_enabled_server_side",ic="$exception_capture_enabled_server_side",id="$error_tracking_suppression_rules",ip="$error_tracking_capture_extension_exceptions",iv="$web_vitals_enabled_server_side",ig="$dead_clicks_enabled_server_side",i_="$product_tours_enabled_server_side",im="$web_vitals_allowed_metrics",iy="$session_recording_remote_config",ib="$replay_sample_rate",iw="$replay_override_sampling",ix="$replay_override_linked_flag",ik="$replay_override_url_trigger",iE="$replay_override_event_trigger",iS="$sesid",iP="$session_is_sampled",iO="$enabled_feature_flags",iI="$active_feature_flags",iF="$early_access_features",iC="$feature_flag_details",i$="$feature_flag_payloads",iT="$feature_flag_request_id",iM="$minimal_flag_called_events",iR="$override_feature_flags",iA="$override_feature_flag_payloads",iL="$stored_person_properties",iD="$stored_group_properties",iN="$groups",ij="$surveys",iq="$surveys_loaded_at",iB="$surveys_activated",iH="$surveys_activated_session",iz="$surveys_activated_timestamps",iV="ph_product_tours",iU="$flag_call_reported",iG="$flag_call_reported_session_id",iW="$feature_flag_errors",iJ="$feature_flag_evaluated_at",iK="$user_state",iZ="$client_session_props",iY="$capture_rate_limit",iQ="$initial_campaign_params",iX="$initial_referrer_info",i0="$initial_person_info",i1="$epp",i2="$posthog_cookieless",i3="$cookieless_mode",i5="$sdk_debug_extensions_init_method",i6="$sdk_debug_extensions_init_time_ms",i8="$sdk_debug_recording_script_not_loaded",i4="PostHog loadExternalDependency extension not found.",i9="on_reject",i7="always",se="anonymous",st="identified",si="identified_only",ss="visibilitychange",sr="beforeunload",sn="$pageview",sa="$pageleave",so="$identify",sl="$groupidentify";function su(e,t){Q(e)&&e.forEach(t)}function sh(e,t){if(!ea(e))if(Q(e))e.forEach(t);else if(e instanceof FormData)e.forEach((e,i)=>t(e,i));else for(var i in e)Z.call(e,i)&&t(e[i],i)}var sc=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];for(var r of i)for(var n in r)void 0!==r[n]&&(e[n]=r[n]);return e};function sd(e){for(var t=Object.keys(e),i=t.length,s=Array(i);i--;)s[i]=[t[i],e[t[i]]];return s}var sp=function(e){try{return e()}catch(e){return}},sv=function(e){return function(){try{for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,i)}catch(e){t6.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),t6.critical(e)}}},sg=function(e){var t={};return sh(e,function(e,i){(es(e)&&e.length>0||eo(e))&&(t[i]=e)}),t},sf=["herokuapp.com","vercel.app","netlify.app"];function s_(e,t,i,s){var r=null!=s?s:{},n=r.capture,a=r.passive;null==e||e.addEventListener(t,i,{capture:void 0!==n&&n,passive:void 0===a||a})}function sm(e){return"ph_toolbar_internal"===e.name}var sy=e=>{if(u){try{for(var t=e+"=",i=u.cookie.split(";").filter(e=>e.length),s=0;i.length>s;s++){for(var r=i[s];" "==r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length,r.length))}}catch(e){}return null}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return eo(e)&&isFinite(e)&&Math.floor(e)===e});class sb{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,s){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(s)||0>e||0>t||0>i||0>s||e>0xffffffffffff||t>4095||i>0x3fffffff||s>0xffffffff)throw RangeError("invalid field value");var r=new Uint8Array(16);return r[0]=e/0x10000000000,r[1]=e/0x100000000,r[2]=e/0x1000000,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|t>>>8,r[7]=t,r[8]=128|i>>>24,r[9]=i>>>16,r[10]=i>>>8,r[11]=i,r[12]=s>>>24,r[13]=s>>>16,r[14]=s>>>8,r[15]=s,new sb(r)}toString(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new sb(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;16>t;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class sw{generate(){var e=this.generateOrAbort();if(!ei(e))return e;this.Tr=0;var t=this.generateOrAbort();if(ei(t))throw Error("Could not generate UUID after timestamp reset");return t}generateOrAbort(){var e=Date.now();if(e>this.Tr)this.Tr=e,this.Ir();else{if(this.Tr>=e+1e4)return;this.Er++,this.Er>0x3ffffffffff&&(this.Tr++,this.Ir())}return sb.fromFieldsV7(this.Tr,Math.trunc(this.Er/0x40000000),0x3fffffff&this.Er,this.Rr.nextUint32())}Ir(){this.Er=1024*this.Rr.nextUint32()+(1023&this.Rr.nextUint32())}constructor(){this.Tr=0,this.Er=0,this.Rr=new sO}}var sx,sk,sE,sS,sP=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};a&&!ei(a.crypto)&&crypto.getRandomValues&&(sP=e=>crypto.getRandomValues(e));class sO{nextUint32(){return this.ft.length>this.Ar||(sP(this.ft),this.Ar=0),this.ft[this.Ar++]}constructor(){this.ft=new Uint32Array(8),this.Ar=1/0}}var sI=()=>sF().toString(),sF=()=>(sS||(sS=new sw)).generate(),sC="",s$=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,sT={Lr:()=>!!u,Nr(e){t6.error("cookieStore error: "+e)},Fr:sy,Pr(e){var t;try{t=JSON.parse(sT.Fr(e))||{}}catch(e){}return t},Or(e,t,i,s,r){if(!u)return!1;try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=u),sC)return sC;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),s=Math.min(i.length,8),r="dmn_chk_"+sI();!sC&&s--;){var n=i.slice(s).join("."),a=r+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(r)&&(t.cookie=a+";max-age=0",sC=n)}return sC}(e);if(!i){var s,r=(s=e.match(s$))?s[0]:"";r!==i&&t6.info("Warning: cookie subdomain discovery mismatch",r,i),i=r}return i?"; domain=."+i:""}return""}(u.location.hostname,s);if(i){var l=new Date;l.setTime(l.getTime()+864e5*i),n="; expires="+l.toUTCString()}r&&(a="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return h.length>3686.4&&t6.warn("cookieStore warning: large cookie, len="+h.length),u.cookie=h,!0}catch(e){return!1}},Dr(e,t){if(null!=u&&u.cookie)try{sT.Or(e,"",-1,t)}catch(e){return}}},sM=null,sR={Lr(){if(!en(sM))return sM;var e=!0;if(ei(a))e=!1;else try{var t="__mplssupport__";sR.Or(t,"xyz"),'"xyz"'!==sR.Fr(t)&&(e=!1),sR.Dr(t)}catch(t){e=!1}return e||t6.error("localStorage unsupported; falling back to cookie store"),sM=e,e},Nr(e){t6.error("localStorage error: "+e)},Fr(e){try{return null==a?void 0:a.localStorage.getItem(e)}catch(e){sR.Nr(e)}return null},Pr(e){try{return JSON.parse(sR.Fr(e))||{}}catch(e){}return null},Or(e,t){try{return null==a||a.localStorage.setItem(e,JSON.stringify(t)),!0}catch(e){sR.Nr(e)}return!1},Dr(e){try{null==a||a.localStorage.removeItem(e)}catch(e){sR.Nr(e)}}},sA=[iL,iI,iO,iC,i$,iT,iJ,iW,iU],sL=[ir,is,iS,iP,i1,i0,iK],sD=["__proto__","constructor","prototype"],sN=e=>{if(!ee(e))return{};var t={};return Object.keys(e).forEach(i=>{-1===sD.indexOf(i)&&(t[i]=e[i])}),t},sj=function(e,t){void 0===t&&(t=[]);var i={};return[...sL,...t].forEach(t=>{var s=e[t];ei(s)||en(s)||""===s||(i[t]=s)}),i},sq=e=>{for(var t=5381,i=0x811c9dc5,s=0;e.length>s;s++){var r=e.charCodeAt(s);t=33*t^r,i=Math.imul(i^r,0x1000193)}return e.length.toString(36)+"."+(t>>>0).toString(36)+"."+(i>>>0).toString(36)},sB=(e,t)=>({p:t,f:sq(JSON.stringify(e))}),sH=(e,t)=>{if(!t)return{properties:[],isValid:!1};try{var i=sT.Pr(e+"_cpm"),s=(null==i?void 0:i.f)===sq(t)&&Q(i.p);return{properties:s?i.p:[],isValid:s}}catch(e){return{properties:[],isValid:!1}}},sz=(e,t)=>t+"|"+(sT.Fr(e+"_cpm")||""),sV={},sU={Lr:()=>!0,Nr(e){t6.error("memoryStorage error: "+e)},Fr:e=>sV[e]||null,Pr:e=>sV[e]||null,Or:(e,t)=>(sV[e]=t,!0),Dr(e){delete sV[e]}},sG=null,sW={Lr(){if(!en(sG))return sG;if(sG=!0,ei(a))sG=!1;else try{var e="__support__";sW.Or(e,"xyz"),'"xyz"'!==sW.Fr(e)&&(sG=!1),sW.Dr(e)}catch(e){sG=!1}return sG},Nr(e){t6.error("sessionStorage error: ",e)},Fr(e){try{return null==a?void 0:a.sessionStorage.getItem(e)}catch(e){sW.Nr(e)}return null},Pr(e){try{return JSON.parse(sW.Fr(e))||null}catch(e){}return null},Or(e,t){try{return null==a||a.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(e){sW.Nr(e)}return!1},Dr(e){try{null==a||a.sessionStorage.removeItem(e)}catch(e){sW.Nr(e)}}};class sJ{constructor(e){this._instance=e}get Oi(){return this._instance.config}get consent(){return this.Un()?0:this.Wn}isOptedOut(){return this.Oi.cookieless_mode===i7||this.isRejected()||-1===this.consent&&this.Oi.cookieless_mode===i9}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return 0===this.consent}isRejected(){return 0===this.consent||-1===this.consent&&this.Oi.opt_out_capturing_by_default}optInOut(e){this.Vn.Or(this.Gn,+!!e,this.Oi.cookie_expiration,this.Oi.cross_subdomain_cookie,this.Oi.secure_cookie)}reset(){this.Vn.Dr(this.Gn,this.Oi.cross_subdomain_cookie)}get Gn(){var e=this._instance.config,t=e.token,i=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(i?i+t:"__ph_opt_in_out_"+t)}get Wn(){var e=this.Vn.Fr(this.Gn);return U(e_,e)?1:U(em,e)?0:-1}get Vn(){var e=this.Oi.opt_out_capturing_persistence_type,t="localStorage"===e?sR:sT;if(!this.Zn||this.Zn!==t){this.Zn=t;var i="localStorage"===e?sT:sR;i.Fr(this.Gn)&&(this.Zn.Fr(this.Gn)||this.optInOut(U(e_,i.Fr(this.Gn))),i.Dr(this.Gn,this.Oi.cross_subdomain_cookie))}return this.Zn}Un(){return!!this.Oi.respect_dnt&&[null==l?void 0:l.doNotTrack,null==l?void 0:l.msDoNotTrack,m.doNotTrack].some(e=>U(e_,e))}}function sK(e,t){var i,s=null==e||null==(i=e.config)?void 0:i.get_current_url;if(!X(s))return t;try{var r=s(t);return es(r)&&r?r:t}catch(e){return t6.error("Error in get_current_url, falling back to window.location.href",e),t}}var sZ="__POSTHOG_TOOLBAR__";function sY(e){return e instanceof Element&&(e.id===sZ||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function sQ(e){return!!e&&1===e.nodeType}function sX(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function s0(e){return!!e&&3===e.nodeType}function s1(e){return!!e&&11===e.nodeType&&sQ(e.host)}function s2(e){return e?G(e).split(/\s+/):[]}function s3(e,t){var i,s,r=ei(s=null==a||null==(i=a.location)?void 0:i.href)?void 0:sK(t,s);return!!(r&&e&&e.some(e=>r.match(e)))}function s5(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return s2(t)}function s6(e){return ea(e)?null:G(e).split(/(\s+)/).filter(e=>rm(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function s8(e){var t="";return rh(e)&&!rc(e)&&e.childNodes&&e.childNodes.length&&sh(e.childNodes,function(e){var i;s0(e)&&e.textContent&&(t+=null!=(i=s6(e.textContent))?i:"")}),G(t)}function s4(e){var t;return ei(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}var s9=["a","button","form","input","select","textarea","label"];function s7(e,t){if(ei(t))return!0;var i,s=function(e){if(t.some(t=>(function(e,t){var i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;try{return!!i&&i.call(e,t)}catch(e){return!1}})(e,t)))return{v:!0}};for(var r of e)if(i=s(r))return i.v;return!1}function re(e){var t=e.parentNode;return!(!t||!sQ(t))&&t}var rt=[".ph-no-autocapture","[data-ph-no-autocapture]"],ri=["next","previous","prev",">","<"],rs=[...ri,"+","-","−","–"],rr=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,rn=[".ph-no-rageclick",".ph-no-capture"],ra=["","text","search","email","password","url","tel","number"];function ro(e,t){if(!a||rl(e)||(eu(t)?(s=!!t&&rn,r=void 0,n=!1):(s=null!=(o=null==t?void 0:t.css_selector_ignorelist)?o:rn,r=null==t?void 0:t.content_ignorelist,n=null!=(l=null==t?void 0:t.ignore_text_selection)&&l),!1===s)||n&&!(!(i=e)||!sQ(i))&&(sX(i,"textarea")||(sX(i,"input")?U(ra,(i.getAttribute("type")||"").toLowerCase()):function(e){if(e.isContentEditable)return!0;var t=null==e.getAttribute?void 0:e.getAttribute("contenteditable");return"true"===t||""===t}(i))))return!1;var i,s,r,n,o,l,u=ru(e,!1).targetElementList;return!function(e,t){var i;if(!1===e||ei(e))return!1;if(!0===e)i=ri;else{if(!Q(e))return!1;if(e.length>10)return t6.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var t=e.safeText,s=e.ariaLabel;return i.some(e=>rr(t,e)||rr(s,e))})}(r,u.map(e=>{var t;return{safeText:s8(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!s7(u,s)}var rl=e=>!e||sX(e,"html")||!sQ(e),ru=(e,t)=>{if(!a||rl(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,s=[e],r=e;r.parentNode&&!sX(r,"body");)if(s1(r.parentNode))s.push(r.parentNode.host),r=r.parentNode.host;else{var n=re(r);if(!n)break;if(t||s9.indexOf(n.tagName.toLowerCase())>-1)i=!0;else try{var o=a.getComputedStyle(n);o&&"pointer"===o.getPropertyValue("cursor")&&(i=!0)}catch(e){}s.push(n),r=n}return{parentIsUsefulElement:i,targetElementList:s}};function rh(e){for(var t=new Set,i=0,s=e;s.parentNode&&!sX(s,"body");s=s.parentNode){if(i++>=1e3||t.has(s))return!1;t.add(s);var r=s5(s);if(U(r,"ph-sensitive")||U(r,"ph-no-capture"))return!1}if(U(s5(e),"ph-include"))return!0;var n=e.type||"";if(es(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var a=e.name||e.id||"";return!es(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function rc(e){return!!(sX(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||sX(e,"select")||sX(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var rd=RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),rp=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,rv=[16,15,14,13],rg=RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),rf=RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),r_=/[0-9A-Za-z_]/;function rm(e,t){return void 0===t&&(t=!0),!(ea(e)||es(e)&&(e=G(e),(t?rd.test((e||"").replace(/[- ]/g,"")):function(e){var t;for(rp.lastIndex=0;t=rp.exec(e);){var i=t[2];if(i)for(var s=i.replace(/[- ]/g,""),r=0;s.length>r;r++)for(var n of rv){var a=r+n;if(s.length>=a){var o=s.slice(r,a);if(rd.test(o)&&function(e){for(var t=0,i=!1,s=e.length-1;s>=0;s--){var r=e.charCodeAt(s)-48;i&&(r*=2)>9&&(r-=9),t+=r,i=!i}return t%10==0}(o))return!0}}}return!1}(e))||(t?rg.test(e):function(e){var t;for(rf.lastIndex=0;t=rf.exec(e);){var i=t[1],s=t[3];if(!(i&&s&&r_.test(i)&&r_.test(s)))return!0}return!1}(e))))&&!0}function ry(e){var t=s8(e);return rm(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&sh(t.childNodes,function(t){var s;if(t&&"span"===(null==(s=t.tagName)?void 0:s.toLowerCase()))try{var r=s8(t);i=(i+" "+r).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){t6.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function rb(e){return e.replace(/"|\\"/g,'\\"')}var rw=t8("[Dead Clicks]"),rx=()=>!0,rk=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(ig)),s=e.instance.config.capture_dead_clicks;return eu(s)?s:!!ee(s)||i};class rE{get lazyLoadedDeadClicksAutocapture(){return this.Qn}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var t=e.config;"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[ig]:t.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.Jn(()=>{this.Kn()}):this.stop()}Jn(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.initDeadClicksAutocapture?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?rw.error("failed to load script",t):e()})}Kn(){var e;if(u){if(!this.Qn&&null!=(e=m.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=ee(this.instance.config.capture_dead_clicks)?x({},this.instance.config.capture_dead_clicks):{};t.__onCapture=this.onCapture,this.onCapture&&(t.capture_dead_swipes=!1),this.Qn=m.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.Qn.start(u),rw.info("starting...")}}else rw.error("`document` not found. Cannot start.")}stop(){this.Qn&&(this.Qn.stop(),this.Qn=void 0,rw.info("stopping..."))}}var rS=t8("[SegmentIntegration]"),rP="posthog-js";function rO(e,t){var i=void 0===t?{}:t,s=i.organization,r=i.projectId,n=i.prefix,a=i.severityAllowList,o=void 0===a?["error"]:a,l=i.sendExceptionsToPostHog,u=void 0===l||l;return t=>{if("*"!==o&&!o.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var i=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=i,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var a,l,h,c,d,p,v=(null==(a=t.exception)?void 0:a.values)||[],g=v.map(e=>x({},e,{stacktrace:e.stacktrace?x({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>x({},e,{platform:"web:javascript"}))}):void 0})),f={$exception_message:(null==(l=v[0])?void 0:l.value)||t.message,$exception_type:null==(h=v[0])?void 0:h.type,$exception_level:t.level,$exception_list:g,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=v[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=v[0])?void 0:d.type,$sentry_tags:t.tags};return s&&r&&(f.$sentry_url=(n||"https://sentry.io/organizations/")+s+"/issues/?project="+r+"&query="+t.event_id),u&&(null==(p=e.exceptions)||p.sendExceptionEvent(f)),t}}class rI{constructor(e,t,i,s,r,n){this.name=rP,this.setupOnce=function(a){a(rO(e,{organization:t,projectId:i,prefix:s,severityAllowList:r,sendExceptionsToPostHog:null==n||n}))}}}class rF{constructor(e){this.Yn=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength||i.crossTabAdoption)&&(t6.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.Xn=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.ts()}ts(){var e;this.es=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.Yn)}destroy(){var e;null==(e=this.es)||e.call(this),this.es=void 0}doPageView(e,t){var i,s=this.rs(e,t);return this.Xn={pathname:null!=(i=null==a?void 0:a.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var t;return this.rs(e,null==(t=this.Xn)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.Xn)?void 0:e.pageViewId}}rs(e,t){var i=this.Xn;if(!i)return{$pageview_id:t};var s={$pageview_id:t,$prev_pageview_id:i.pageViewId},r=this._instance.scrollManager.getContext();if(r&&!this._instance.config.disable_scroll_properties){var n=r.maxScrollHeight,a=r.lastScrollY,o=r.maxScrollY,l=r.maxContentHeight,u=r.lastContentY,h=r.maxContentY;if(!(ei(n)||ei(a)||ei(o)||ei(l)||ei(u)||ei(h))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),u=Math.ceil(u),h=Math.ceil(h);var c=n>1?ey(a/n,0,1,t6):1,d=n>1?ey(o/n,0,1,t6):1,p=l>1?ey(u/l,0,1,t6):1,v=l>1?ey(h/l,0,1,t6):1;s=sc(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:c,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:v})}}return i.pathname&&(s.$prev_pageview_pathname=i.pathname),i.timestamp&&(s.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),s}}var rC=["flags","surveys"],r$={[ii]:{exposure:"hidden"},[io]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[il]:{exposure:"hidden"},[iu]:{exposure:"event"},[ih]:{exposure:"hidden"},[ic]:{exposure:"event"},[id]:{exposure:"hidden"},[ip]:{exposure:"event"},[iv]:{exposure:"event"},[ig]:{exposure:"event"},[i_]:{exposure:"hidden"},[im]:{exposure:"event"},[iy]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[iS]:{exposure:"hidden"},[iP]:{exposure:"event"},[ib]:{exposure:"event",shouldSkipFromEventProperties:e=>en(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[iO]:{exposure:"hidden",storageGroup:"flags"},[iI]:{exposure:"hidden",storageGroup:"flags"},[iF]:{exposure:"hidden"},[iC]:{exposure:"hidden",storageGroup:"flags"},[i$]:{exposure:"hidden",storageGroup:"flags"},[iT]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[iM]:{exposure:"hidden",storageGroup:"flags"},[iR]:{exposure:"hidden"},[iA]:{exposure:"hidden"},[iL]:{exposure:"hidden"},[iD]:{exposure:"hidden"},[ij]:{exposure:"hidden",storageGroup:"surveys"},[iq]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[iB]:{exposure:"event"},[iH]:{exposure:"hidden"},[iz]:{exposure:"hidden"},[iV]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[iU]:{exposure:"hidden"},[iG]:{exposure:"hidden"},[iN]:{exposure:"event"},[iW]:{exposure:"hidden"},[iJ]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[iK]:{exposure:"hidden"},[iZ]:{exposure:"hidden"},[iY]:{exposure:"hidden"},[iQ]:{exposure:"hidden"},[iX]:{exposure:"hidden"},[i0]:{exposure:"hidden"},[i1]:{exposure:"hidden"},[iw]:{exposure:"event"},[ix]:{exposure:"event"},[ik]:{exposure:"event"},[iE]:{exposure:"event"},[i5]:{exposure:"event"},[i6]:{exposure:"event"},[i8]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},rT=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],rM=e=>{var t=r$[e];if(t)return t;for(var i of rT){var s=i[1];if(0===e.indexOf(i[0]))return s}},rR=(e,t)=>{try{return JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t)}catch(t){return J(e)}},rA=e=>{var t=null==u?void 0:u.createElement("a");return ei(t)?null:(t.href=e,t)},rL=function(e,t){for(var i,s=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;s.length>r;r++){var n=s[r].split("=");if(n[0]===t){i=n;break}}if(!Q(i)||2>i.length)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){t6.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},rD=function(e,t,i){if(!e||!t||!t.length)return e;for(var s=e.split("#"),r=s[1],n=(s[0]||"").split("?"),a=n[1],o=n[0],l=(a||"").split("&"),u=[],h=0;l.length>h;h++){var c=l[h].split("=");Q(c)&&(t.includes(c[0])?u.push(c[0]+"="+i):u.push(l[h]))}var d=o;return null!=a&&(d+="?"+u.join("&")),null!=r&&(d+="#"+r),d},rN=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},rj=(e,t)=>e>=t&&f(),rq=(e,t,i,s)=>{if(0===e){if(f()){var r=t+1;return r===i&&s(),r}return t}return 0},rB="https?://(.*)",rH=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rz=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...rH],rV="<masked>",rU=["li_fat_id"];function rG(e,t,i){if(!u)return{};var s,r=t?[...rH,...i||[]]:[],n=rW(rD(u.URL,r,rV),e);return sc((s={},sh(rU,function(e){var t=sy(e);s[e]=t||null}),s),n)}function rW(e,t){var i=rz.concat(t||[]),s={};return sh(i,function(t){var i=rL(e,t);s[t]=i||null}),s}function rJ(e){var t=e?0===e.search(rB+"google.([^/?]*)")?"google":0===e.search(rB+"bing.com")?"bing":0===e.search(rB+"yahoo.com")?"yahoo":0===e.search(rB+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!en(t)){i.$search_engine=t;var s=u?rL(u.referrer,"yahoo"!=t?"q":"p"):"";s.length&&(i.ph_keyword=s)}return i}function rK(){return navigator.language||navigator.userLanguage}var rZ="$direct";function rY(){return(null==u?void 0:u.referrer)||rZ}function rQ(e,t,i){void 0===i&&(i=!1);var s=e?[...rH,...t||[]]:[],r=i?tf(null==h?void 0:h.href):null==h?void 0:h.href,n=null==r?void 0:r.substring(0,1e3);return{r:rY().substring(0,1e3),u:n?rD(n,s,rV):void 0}}function rX(e,t){void 0===t&&(t=!1);var i,s=e.r,r=e.u,n=t?tf(r):r,a={$referrer:s,$referring_domain:null==s?void 0:s==rZ?rZ:null==(i=rA(s))?void 0:i.host};if(n){a.$current_url=n;var o=rA(n);a.$host=null==o?void 0:o.host,a.$pathname=null==o?void 0:o.pathname,sc(a,rW(n))}return s&&sc(a,rJ(s)),a}function r0(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var r1={flags:iJ,surveys:iq},r2=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],r3="main",r5=(e,t)=>{sh(e,(i,s)=>{var r=rM(s);r&&"event"!==r.exposure||({}).hasOwnProperty.call(t,s)||delete e[s]})};class r6{constructor(e,t,i){if(void 0===i&&(i=!0),this.ns={},this.ss=!1,this.os=!1,this.ls=!1,this.us=!1,this.Oi=e,this.hs=i,this.props={},this.ds=void 0,this.vs=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.Vn=this.cs(e),this.os=this.fs(e),this.load(),e.debug&&t6.info("Persistence loaded",e.persistence,x({},this.props)),this.update_config(e,e,t),this.save(),a){var s=()=>this.flush();s_(a,"beforeunload",s,{capture:!1}),s_(a,"pagehide",s,{capture:!1})}}ps(){var e,t=null==(e=this.Oi)?void 0:e.persistence_save_debounce_ms;return eo(t)&&t>0?t:0}gs(e){if(this.Oi.cookieWinsOnConflict&&"localstorage+cookie"===this.Oi.persistence.toLowerCase())if(e)try{var t=sj(e,this.Oi.cookie_persisted_properties||[]),i=sB(t,this.Oi.cookie_persisted_properties||[]),s=JSON.stringify(t)+"|"+JSON.stringify(i),r=sT.Fr(this.vs)||void 0;r&&sz(this.vs,r)===s&&(this.ys=s,this.bs=r)}catch(e){}else try{var n=sT.Fr(this.vs)||void 0;this.ys=n?sz(this.vs,n):void 0,this.bs=n}catch(e){}}syncCookieProperties(){return this._s(this.Oi)}_s(e,t){if(void 0===t&&(t=!1),this.ws&&!t||this.us||!e.cookieWinsOnConflict||"localstorage+cookie"!==e.persistence.toLowerCase())return!1;try{i=sT.Fr(this.vs)||void 0}catch(e){}if(!i||i===this.bs)return!1;var i,s,r=sz(this.vs,i);try{s=sN(JSON.parse(i))}catch(e){return!1}if((sT.Fr(this.vs)||void 0)!==i)return!1;this.ys=r,this.bs=i;var n=sH(this.vs,i),a=[...sL,...n.properties],o={};if(Object.keys(s).forEach(e=>{var t=s[e];(ei(t)||en(t)||""===t||e===iK&&t!==se&&t!==st)&&(o[e]=!0,delete s[e])}),et(s))return!1;var l=is in s||s[iK]===se||s[iK]===st,u=this.props[is],h=this.props[iK],c=sc({},this.props);[...sL,...e.cookie_persisted_properties||[]].forEach(e=>{if(-1!==a.indexOf(e)&&!(e in s)&&!o[e]&&(l||e!==is&&e!==iK)){var t=c[e];(n.isValid||-1===sL.indexOf(e)||!1!==t&&0!==t)&&delete c[e]}}),this.props=sc(c,s),!l||iK in s||iK in this.props||this.ks(iK,se);var d=this.props[is],p=this.props[iK];return l&&(d!==u||p!==h)&&(this.ls=!0,sW.Or(this.vs+"_cookie_identity_change_pending",!0),this.xs(iL),this.xs(iI),this.xs(iO),this.xs(iC),this.xs(i$),this.xs(iT),this.xs(iJ),this.xs(iW),this.xs(iU),p!==se||h!==st&&s[iK]!==se&&(ei(u)||d===u)||(r5(this.props,s),this.xs(iD)),p===st?this.props.$user_id=d:delete this.props.$user_id,this.xs(io)),!0}consumeCookieIdentityChange(){var e=this.vs+"_cookie_identity_change_pending",t=this.ls||!!sW.Fr(e);return this.ls=!1,t&&sW.Dr(e),t}Ss(e){return void 0===e&&(e=!1),!(this.us||this.ws&&!e||!this.Oi.cookieWinsOnConflict||"localstorage+cookie"!==this.Oi.persistence.toLowerCase()||(this.us=!0,0))}Cs(){this.us&&(ei(this.Ts)||(clearTimeout(this.Ts),this.Ts=void 0),delete this.ns[r3],this.Ms(!0))}Es(e){if(void 0===e&&(e=!0),this.us)try{e?this.Cs():ei(this.Ts)||(clearTimeout(this.Ts),this.Ts=void 0)}finally{this.us=!1}}isDisabled(){return!!this.ws}cs(e){-1===r2.indexOf(e.persistence.toLowerCase())&&(t6.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,s,r,n=(t=e.cookie_persisted_properties||[],i=e.cookieWinsOnConflict,void 0===t&&(t=[]),void 0===i&&(i=!1),s=[...sL,...t],x({},sR,{Pr(e){try{var t,r={};try{r=(t=sT.Fr(e)||void 0)?sN(JSON.parse(t)):{}}catch(e){}var n,a=JSON.parse(sR.Fr(e)||"{}");if(i){var o=sH(e,t),l=[...sL,...o.properties],u={};Object.keys(r).forEach(e=>{var t=r[e];en(t)||""===t||e===iK&&t!==se&&t!==st||(u[e]=t)});var h=is in u||u[iK]===se||u[iK]===st;if(Object.keys(u).length>0){var c,d=a[is],p=null!=(c=a[iK])?c:se;s.forEach(e=>{if(-1!==l.indexOf(e)&&!(e in r)&&(h||e!==is&&e!==iK)){var t=a[e];(o.isValid||-1===sL.indexOf(e)||!1!==t&&0!==t)&&delete a[e]}}),!h||iK in r||iK in a||(a[iK]=se),h&&((is in u?u[is]:a[is])!==d||(iK in u?u[iK]:a[iK])!==p)&&(sA.forEach(e=>delete a[e]),u[iK]===st&&is in u?a.$user_id=u[is]:delete a.$user_id,u[iK]!==st&&(delete a[iN],delete a[iD]),delete a.__alias)}n=sc(a,u)}else n=sc(r,a);return sR.Or(e,n),n}catch(e){}return null},Or(e,s,r,n,a,o){var l=sR.Or(e,s,void 0,void 0,o);try{var u=sj(s,t);if(Object.keys(u).length){if(i){var h=e+"_cpm",c=sB(u,t);if(sT.Or(h,c,r,n,a,o),sT.Fr(h)!==JSON.stringify(c)){sT.Dr(h,n);var d=sj(s);return sT.Or(e,d,r,n,a,o),l}}sT.Or(e,u,r,n,a,o)}}catch(e){sR.Nr(e)}return l},Dr(e,t){try{null==a||a.localStorage.removeItem(e),sT.Dr(e,t),sT.Dr(e+"_cpm",t)}catch(e){sR.Nr(e)}}})),o=!1,l=e.persistence.toLowerCase();return"localstorage"===l&&sR.Lr()?(r=sR,o=!0):"localstorage+cookie"===l&&n.Lr()?(r=n,o=!0):"sessionstorage"===l&&sW.Lr()?r=sW:"memory"===l?r=sU:"cookie"===l?r=sT:n.Lr()?(r=n,o=!0):r=sT,this.ss=o,r}Is(e){return this.vs+"__"+e}fs(e){return this.ss&&!!e.split_storage}properties(){var e={};return sh(this.props,(t,i)=>{var s=rM(i);if(!s||"event"===s.exposure){if(null!=s&&null!=s.shouldSkipFromEventProperties&&s.shouldSkipFromEventProperties(t))return;e[i]=t}}),e}load(){if(!this.ws){var e=this.Oi.cookieWinsOnConflict&&"localstorage+cookie"===this.Oi.persistence.toLowerCase(),t=e?sR.Pr(this.vs):null,i={};if(e)try{sh(i=sN(sT.Pr(this.vs)),(e,t)=>{(ei(e)||en(e)||""===e)&&delete i[t]})}catch(e){}var s=this.Vn.Pr(this.vs);if(s&&(this.props=sc({},s)),this.os&&this.Rs(),e&&s){var r,n,a=null==t?void 0:t[is],o=null!=(r=null==t?void 0:t[iK])?r:se,l=s[is],u=null!=(n=s[iK])?n:se;if(l!==a||u!==o){this.ls=!0,sW.Or(this.vs+"_cookie_identity_change_pending",!0);var h=sc({},this.props);sA.forEach(e=>delete h[e]),u!==se||o!==st&&i[iK]!==se&&(ei(a)||l===a)||(r5(h,i),delete h[iD]),this.props=h;var c=new Set;sA.forEach(e=>{var t,i=null==(t=rM(e))?void 0:t.storageGroup;i&&c.add(i)}),c.forEach(e=>{var t={};sh(this.props,(i,s)=>{var r;(null==(r=rM(s))?void 0:r.storageGroup)===e&&(t[s]=i)}),et(t)?(sR.Dr(this.Is(e)),this.ns[e]={}):sR.Or(this.Is(e),t)&&(this.ns[e]={persisted:!0,fingerprint:this.Ps(t,e)})})}}sW.Fr(this.vs+"_cookie_identity_change_pending")&&(this.ls=!0)}}Rs(){for(var e of rC){var t=sR.Pr(this.Is(e));if(t&&!et(t)){var i=this.As(e);i.persisted=!0,this.Fs(e)||(i.fingerprint=this.Ps(t,e)),this.Os(e,t)||sc(this.props,t)}}}Fs(e){return Object.keys(this.props).some(t=>{var i;return(null==(i=rM(t))?void 0:i.storageGroup)===e})}Os(e,t){var i=r1[e];if(!i)return!1;var s=t[i],r=this.props[i];return eo(s)&&eo(r)&&r>s}refreshKey(e){var t;if(!this.ws){var i=this.os?null==(t=rM(e))?void 0:t.storageGroup:void 0,s=i?sR.Pr(this.Is(i)):this.Vn.Pr(this.vs);if(s&&e in s)this.ks(e,s[e]);else{if(i){var r=this.Vn.Pr(this.vs);if(r&&e in r)return void this.ks(e,r[e])}this.xs(e)}}}save(){if(!this.ws){var e=this.ps();e>0?ei(this.Ts)&&(this.Ts=setTimeout(()=>{this.Ts=void 0,this.Ms()},e)):this.Ms()}}flush(){ei(this.Ts)||(clearTimeout(this.Ts),this.Ts=void 0,this.Ms())}Ms(e){void 0===e&&(e=!1),this.ws||this.us&&!e||(e||this.syncCookieProperties(),this.os?this.Ls():this.$s(this.Vn,this.vs,this.props,r3)&&this.gs(this.props))}Ls(){var e=this.Ds(),t=e.main,i=e.groups;for(var s of(this.$s(this.Vn,this.vs,t,r3)&&this.gs(t),rC)){var r,n=i[s];(!et(n)||null!=(r=this.ns[s])&&r.persisted)&&this.$s(sR,this.Is(s),n,s)}}Ds(){var e={},t={flags:{},surveys:{}};return sh(this.props,(i,s)=>{var r,n=null==(r=rM(s))?void 0:r.storageGroup;n?t[n][s]=i:e[s]=i}),{main:e,groups:t}}Ps(e,t){if(t===r3)return JSON.stringify(e)+"|"+this.Ns+"|"+this.qs+"|"+this.js;var i={};return sh(e,(e,t)=>{var s;i[t]=null!=(s=rM(t))&&s.volatile?"__volatile__":e}),JSON.stringify(i)}$s(e,t,i,s){var r,n=this.As(s);if(s!==r3&&!n.dirty&&!ei(n.fingerprint))return!1;try{if((r=this.Ps(i,s))===n.fingerprint)return n.dirty=!1,!1}catch(e){r=void 0}return e.Or(t,i,this.Ns,this.qs,this.js,this.Oi.debug)?(n.dirty=!1,s!==r3&&(n.persisted=!0),ei(r)||(n.fingerprint=r),!0):(this.Oi.debug&&t6.warn('failed to persist storage entry "'+t+'"; will retry on next save'),!1)}remove(e){var t=(void 0===e?{}:e).keepGroupEntries,i=void 0!==t&&t;if(ei(this.Ts)||(clearTimeout(this.Ts),this.Ts=void 0),this.Vn.Dr(this.vs,!1),this.Vn.Dr(this.vs,!0),!i&&this.hs)for(var s of rC)sR.Dr(this.Is(s));i?delete this.ns[r3]:this.ns={},this.ys=void 0,this.bs=void 0}clear(){this.remove(),this.props={}}register_once(e,t,i){if(ee(e)){this.syncCookieProperties(),ei(t)&&(t="None"),this.Ns=ei(i)?this.Bs:i;var s=!1;if(sh(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.ks(i,e),s=!0)}),s)return this.save(),!0}return!1}register(e,t){if(ee(e)){this.syncCookieProperties(),this.Ns=ei(t)?this.Bs:t;var i=!1;if(sh(e,(t,s)=>{e.hasOwnProperty(s)&&(this.props[s]!==t||ee(t)||Q(t))&&(this.ks(s,t),i=!0)}),i)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();var t=!1;for(var i of"string"==typeof e?[e]:e)i in this.props&&(this.xs(i),t=!0);t&&this.save()}update_campaign_params(){var e=null==u?void 0:u.URL;if(e!==this.ds){var t=rG(this.Oi.custom_campaign_params,this.Oi.mask_personal_data_properties,this.Oi.custom_personal_data_properties);et(sg(t))||this.register(t),this.ds=e}}update_search_keyword(){var e;this.register((e=null==u?void 0:u.referrer)?rJ(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rY(),$referring_domain:null!=u&&u.referrer&&(null==(e=rA(u.referrer))?void 0:e.host)||rZ},void 0)}set_initial_person_info(){this.props[iQ]||this.props[iX]||this.register_once({[i0]:rQ(this.Oi.mask_personal_data_properties,this.Oi.custom_personal_data_properties,this.Oi.disable_capture_url_hashes)},void 0)}get_initial_props(){var e,t,i,s={};sh([iX,iQ],e=>{var t=this.props[e];t&&sh(t,function(e,t){s["$initial_"+W(t)]=e})});var r=this.props[i0];return r&&sc(s,(void 0===(e=this.Oi.disable_capture_url_hashes)&&(e=!1),t=rX(r,e),i={},sh(t,function(e,t){i["$initial_"+W(t)]=e}),i)),s}safe_merge(e){return sh(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){var s=e.persistence!==t.persistence,r=!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),s=[...t].sort();return i.every((e,t)=>e===s[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[]),n=s||r,a=e.cookieWinsOnConflict!==t.cookieWinsOnConflict,o=e.disable_persistence||!!i,l=!!this.ws&&!o;o||this._s(t,l),this.Oi=e,!o&&(s||r||a)&&(this.ys=void 0,this.bs=void 0,this._s(x({},e,{cookie_persisted_properties:t.cookie_persisted_properties}),l));var u=n||a?this.cs(e):this.Vn,h=this.fs(e),c=n||h!==this.os,d=!o&&(c||e.cross_subdomain_cookie!==this.qs||e.secure_cookie!==this.js)&&this.Ss(l);try{if(this.Bs=this.Ns=e.cookie_expiration,this.set_disabled(o),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),c){var p=this.props;this.clear(),this.Vn=u,this.os=h,this.props=p,this.save()}else a&&(this.Vn=u,o||(delete this.ns[r3],this.Ms()))}finally{d&&this.Es()}}set_disabled(e){this.ws=e,this.ws?this.remove():this.save()}set_cross_subdomain(e){e!==this.qs&&(this.qs=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.js&&(this.js=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,t){var i=this.props[il]||{};i[e]=t,this.ks(il,i),this.save()}remove_event_timer(e){var t=this.props[il]||{},i=t[e];return ei(i)||(delete t[e],this.ks(il,t),this.save()),i}get_property(e){return this.props[e]}set_property(e,t){this.ks(e,t),this.save()}ks(e,t){var i;this.props[e]=t,null!=(i=rM(e))&&i.volatile||this.Hs(e)}xs(e){delete this.props[e],this.Hs(e)}Hs(e){var t,i=null==(t=rM(e))?void 0:t.storageGroup;i&&(this.As(i).dirty=!0)}As(e){return this.ns[e]||(this.ns[e]={})}}function r8(e){var t=!0;return{dispose(){if(t){t=!1;var i=e();i&&X(i.then)&&i.then(void 0,()=>{})}}}}var r4="gzip-js",r9="base64",r7="events",ne="cancelEvents",nt="survey shown",ni="survey dismissed",ns="survey sent",nr="popover",nn=t8("[RateLimiter]");class na{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{nn.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void nn.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,s,r=this.captureEventsBurstLimit,n=this.captureEventsPerSecond,a=(new Date).getTime(),o=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(iY))?t:{tokens:r,last:a};o.tokens+=(a-o.last)/1e3*n,o.last=a,o.tokens>r&&(o.tokens=r);var l=1>o.tokens;if(l||e||(o.tokens=Math.max(0,o.tokens-1)),l&&!e){var u=(eo(o.dropped)?o.dropped:0)+1;o.dropped=u,!this.lastEventRateLimited&&this.zs(u)&&(o.dropped=0)}return this.lastEventRateLimited=l,null==(s=this.instance.persistence)||s.set_property(iY,o),{isRateLimited:l,remainingTokens:o.tokens}}Us(e){var t=this.instance.config.property_denylist;return!Q(t)||!t.includes(e)}Ws(){var e;if(this.Us("$current_url")&&this.Us("$pathname")&&null!=h&&h.pathname)return""+(null!=(e=h.origin)?e:"")+h.pathname}zs(e){var t,i,s=this.captureEventsBurstLimit,r=this.captureEventsPerSecond,n=this.Ws(),a=this.Us("$session_id")?null==(t=(i=this.instance).get_session_id)?void 0:t.call(i):void 0,o=[e+" event(s) dropped since the last warning",n?"triggered on "+n:void 0,a?"session "+a:void 0].filter(Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited: "+o+". Config is set to "+r+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0})}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var no=t8("[RemoteConfig]");class nl{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}Vs(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}Gs(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:e})}load(){try{if(this.remoteConfig)return no.info("Using preloaded remote config",this.remoteConfig),this.Zs(this.remoteConfig),void this.Qs();if(this._instance.Js())return void no.warn("Remote config is disabled. Falling back to local config.");this.Vs(e=>{e?(this.Zs(e),this.Qs()):(no.info("No config found after loading remote JS config. Falling back to JSON."),this.Gs(e=>{this.Zs(e.json,e),this.Qs()}))})}catch(e){no.error("Error loading remote config",e),this.Zs()}}stop(){this.Ks&&(clearInterval(this.Ks),this.Ks=void 0)}refresh(){!this._instance.Js()&&u&&"hidden"!==u.visibilityState&&this._instance.reloadFeatureFlags()}Qs(){var e;if(!this.Ks){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.Ks=setInterval(()=>{this.refresh()},t))}}Zs(e,t){!e&&t&&(0===t.statusCode?t.error||no.warn("Failed to fetch remote config from PostHog."):no.error("Failed to fetch remote config from PostHog."));try{this._instance.Zs(e?{ok:!0,config:e}:{ok:!1})}catch(e){no.error("Error applying remote config",e)}if(!1!==(null==e?void 0:e.hasFeatureFlags)&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var i;null==(i=this._instance.featureFlags)||i.ensureFlagsLoaded()}catch(e){no.error("Error loading feature flags",e)}}}var nu=Uint8Array,nh=Uint16Array,nc=Uint32Array,nd=new nu([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]),np=new nu([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]),nv=new nu([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ng=function(e,t){for(var i=new nh(31),s=0;31>s;++s)i[s]=t+=1<<e[s-1];var r=new nc(i[30]);for(s=1;30>s;++s)for(var n=i[s];i[s+1]>n;++n)r[n]=n-i[s]<<5|s;return[i,r]},nf=ng(nd,2),n_=nf[1];nf[0][28]=258,n_[258]=28;for(var nm=ng(np,0)[1],ny=new nh(32768),nb=0;32768>nb;++nb){var nw=(43690&nb)>>>1|(21845&nb)<<1;ny[nb]=((65280&(nw=(61680&(nw=(52428&nw)>>>2|(13107&nw)<<2))>>>4|(3855&nw)<<4))>>>8|(255&nw)<<8)>>>1}var nx=function(e,t,i){for(var s=e.length,r=0,n=new nh(t);s>r;++r)++n[e[r]-1];var a,o=new nh(t);for(r=0;t>r;++r)o[r]=o[r-1]+n[r-1]<<1;if(i){a=new nh(1<<t);var l=15-t;for(r=0;s>r;++r)if(e[r])for(var u=r<<4|e[r],h=t-e[r],c=o[e[r]-1]++<<h,d=c|(1<<h)-1;d>=c;++c)a[ny[c]>>>l]=u}else for(a=new nh(s),r=0;s>r;++r)a[r]=ny[o[e[r]-1]++]>>>15-e[r];return a},nk=new nu(288);for(nb=0;144>nb;++nb)nk[nb]=8;for(nb=144;256>nb;++nb)nk[nb]=9;for(nb=256;280>nb;++nb)nk[nb]=7;for(nb=280;288>nb;++nb)nk[nb]=8;var nE=new nu(32);for(nb=0;32>nb;++nb)nE[nb]=5;var nS=nx(nk,9,0),nP=nx(nE,5,0),nO=function(e){return(e/8|0)+(7&e&&1)},nI=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var s=new(e instanceof nh?nh:e instanceof nc?nc:nu)(i-t);return s.set(e.subarray(t,i)),s},nF=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8},nC=function(e,t,i){var s=t/8|0;e[s]|=i<<=7&t,e[s+1]|=i>>>8,e[s+2]|=i>>>16},n$=function(e,t){for(var i=[],s=0;e.length>s;++s)e[s]&&i.push({s:s,f:e[s]});var r=i.length,n=i.slice();if(!r)return[new nu(0),0];if(1==r){var a=new nu(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],u=0,h=1,c=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};h!=r-1;)o=i[i[c].f>i[u].f?u++:c++],l=i[u!=h&&i[c].f>i[u].f?u++:c++],i[h++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(s=1;r>s;++s)n[s].s>d&&(d=n[s].s);var p=new nh(d+1),v=nT(i[h-1],p,0);if(v>t){s=0;var g=0,f=v-t,_=1<<f;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r>s;++s){var m=n[s].s;if(t>=p[m])break;g+=_-(1<<v-p[m]),p[m]=t}for(g>>>=f;g>0;){var y=n[s].s;t>p[y]?g-=1<<t-p[y]++-1:++s}for(;s>=0&&g;--s){var b=n[s].s;p[b]==t&&(--p[b],++g)}v=t}return[new nu(p),v]},nT=function(e,t,i){return -1==e.s?Math.max(nT(e.l,t,i+1),nT(e.r,t,i+1)):t[e.s]=i},nM=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new nh(++t),s=0,r=e[0],n=1,a=function(e){i[s++]=e},o=1;t>=o;++o)if(e[o]==r&&o!=t)++n;else{if(!r&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(r),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(r);n=1,r=e[o]}return[i.subarray(0,s),t]},nR=function(e,t){for(var i=0,s=0;t.length>s;++s)i+=e[s]*t[s];return i},nA=function(e,t,i){var s=i.length,r=nO(t+2);e[r]=255&s,e[r+1]=s>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var n=0;s>n;++n)e[r+n+4]=i[n];return 8*(r+4+s)},nL=function(e,t,i,s,r,n,a,o,l,u,h){nF(t,h++,i),++r[256];for(var c=n$(r,15),d=c[0],p=c[1],v=n$(n,15),g=v[0],f=v[1],_=nM(d),m=_[0],y=_[1],b=nM(g),w=b[0],x=b[1],k=new nh(19),E=0;m.length>E;++E)k[31&m[E]]++;for(E=0;w.length>E;++E)k[31&w[E]]++;for(var S=n$(k,7),P=S[0],O=S[1],I=19;I>4&&!P[nv[I-1]];--I);var F,C,$,T,M=u+5<<3,R=nR(r,nk)+nR(n,nE)+a,A=nR(r,d)+nR(n,g)+a+14+3*I+nR(k,P)+(2*k[16]+3*k[17]+7*k[18]);if(R>=M&&A>=M)return nA(t,h,e.subarray(l,l+u));if(nF(t,h,1+(R>A)),h+=2,R>A){F=nx(d,p,0),C=d,$=nx(g,f,0),T=g;var L=nx(P,O,0);for(nF(t,h,y-257),nF(t,h+5,x-1),nF(t,h+10,I-4),h+=14,E=0;I>E;++E)nF(t,h+3*E,P[nv[E]]);h+=3*I;for(var D=[m,w],N=0;2>N;++N){var j=D[N];for(E=0;j.length>E;++E)nF(t,h,L[q=31&j[E]]),h+=P[q],q>15&&(nF(t,h,j[E]>>>5&127),h+=j[E]>>>12)}}else F=nS,C=nk,$=nP,T=nE;for(E=0;o>E;++E)if(s[E]>255){nC(t,h,F[257+(q=s[E]>>>18&31)]),h+=C[q+257],q>7&&(nF(t,h,s[E]>>>23&31),h+=nd[q]);var q,B=31&s[E];nC(t,h,$[B]),h+=T[B],B>3&&(nC(t,h,s[E]>>>5&8191),h+=np[B])}else nC(t,h,F[s[E]]),h+=C[s[E]];return nC(t,h,F[256]),h+C[256]},nD=new nc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nN=function(){for(var e=new nc(256),t=0;256>t;++t){for(var i=t,s=9;--s;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),nj=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},nq=!!d||!!c,nB="text/plain",nH=!1,nz=(e,t)=>{var i=e.split("#"),s=i[1],r=i[0].split("?"),n=r[0],a=r[1];if(!a)return e;var o=a.split("&").filter(e=>e.split("=")[0]!==t).join("&");return n+(o?"?"+o:"")+(s?"#"+s:"")},nV=function(e,t,i){void 0===i&&(i=!0);var s,r,n,a,o,l=e.split("?"),u=l[0],h=l[1],c=x({},t),d=null!=(o=null==h?void 0:h.split("&").map(e=>{var t,s=e.split("="),r=s[0],n=i&&null!=(t=c[r])?t:s[1];return delete c[r],r+"="+n}))?o:[],p=(void 0===s&&(s="&"),a=[],sh(c,function(e,t){ei(e)||ei(t)||"undefined"===t||(r=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(t),a[a.length]=n+"="+r)}),a.join(s));return p&&d.push(p),d.length>0?u+"?"+d.join("&"):u},nU=e=>{if(e.Ys)return e.Ys;var t=e.data,i=e.compression;if(t){if(i===r4){var s,r,n,a,o,l,u,h,c=(s=function(e){var t=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var i=new nu(e.length+(e.length>>>1)),s=0,r=function(e){i[s++]=e},n=0;t>n;++n){if(s+5>i.length){var a=new nu(s+8+(t-n<<1));a.set(i),i=a}var o=e.charCodeAt(n);128>o?r(o):(2048>o?r(192|o>>>6):(o>55295&&57344>o?(r(240|(o=65536+(1047552&o)|1023&e.charCodeAt(++n))>>>18),r(128|o>>>12&63)):r(224|o>>>12),r(128|o>>>6&63)),r(128|63&o))}return nI(i,0,s)}(rR(t)),r={mtime:0},n=0xffffffff,a={p(e){for(var t=n,i=0;e.length>i;++i)t=nN[255&t^e[i]]^t>>>8;n=t},d:()=>0xffffffff^n},o=s.length,a.p(s),h=(l=10+(r.filename&&r.filename.length+1||0),u=function(e,t,i,s){var r=e.length,n=new nu(s+r+5*(1+Math.floor(r/7e3))+8),a=n.subarray(s,n.length-8),o=0;if(!t||8>r)for(var l=0;r>=l;l+=65535){var u=l+65535;r>u?o=nA(a,o,e.subarray(l,u)):(a[l]=!0,o=nA(a,o,e.subarray(l,r)))}else{for(var h=nD[t-1],c=h>>>13,d=8191&h,p=(1<<i)-1,v=new nh(32768),g=new nh(p+1),f=Math.ceil(i/3),_=2*f,m=function(t){return(e[t]^e[t+1]<<f^e[t+2]<<_)&p},y=new nc(25e3),b=new nh(288),w=new nh(32),x=0,k=0,E=(l=0,0),S=0,P=0;r>l;++l){var O=m(l),I=32767&l,F=g[O];if(v[I]=F,g[O]=I,l>=S){var C=r-l;if((x>7e3||E>24576)&&C>423){o=nL(e,a,0,y,b,w,k,E,P,l-P,o),E=x=k=0,P=l;for(var $=0;286>$;++$)b[$]=0;for($=0;30>$;++$)w[$]=0}var T=2,M=0,R=d,A=I-F&32767;if(C>2&&O==m(l-A))for(var L=Math.min(c,C)-1,D=Math.min(32767,l),N=Math.min(258,C);D>=A&&--R&&I!=F;){if(e[l+T]==e[l+T-A]){for(var j=0;N>j&&e[l+j]==e[l+j-A];++j);if(j>T){if(T=j,M=A,j>L)break;var q=Math.min(A,j-2),B=0;for($=0;q>$;++$){var H=l-A+$+32768&32767,z=H-v[H]+32768&32767;z>B&&(B=z,F=H)}}}A+=(I=F)-(F=v[I])+32768&32767}if(M){y[E++]=0x10000000|n_[T]<<18|nm[M];var V=31&n_[T],U=31&nm[M];k+=nd[V]+np[U],++b[257+V],++w[U],S=l+T,++x}else y[E++]=e[l],++b[e[l]]}}o=nL(e,a,!0,y,b,w,k,E,P,l-P,o)}return nI(n,0,s+nO(o)+8)}(s,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+r.mem,l)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:2*(9==t.level),e[9]=3,0!=t.mtime&&nj(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var s=0;i.length>=s;++s)e[s+10]=i.charCodeAt(s)}}(u,r),nj(u,h-8,a.d()),nj(u,h-4,o),u);return{contentType:nB,body:c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength),estimatedSize:c.byteLength}}if(i===r9){let e;var d,p="data="+encodeURIComponent("string"==typeof(e=(d=rR(t))?btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))):d)?e:rR(e));return{contentType:"application/x-www-form-urlencoded",body:p,estimatedSize:new Blob([p]).size}}var v=rR(t);return{contentType:"application/json",body:v,estimatedSize:new Blob([v]).size}}},nG=e=>{var t,i,s=()=>"sendBeacon"===e.transport?{url:nV(e.url,{compression:r9}),encodedBody:nU(x({},e,{compression:r9,Ys:void 0}))}:{url:nz(e.url,"compression"),encodedBody:nU(x({},e,{compression:void 0,Ys:void 0}))};try{t=nU(e)}catch(t){if(N(e.compression,rL(e.url,"compression")))return t6.error("Failed to gzip request body, sending uncompressed payload",t),s();throw t}return!(t&&N(e.compression,rL(e.url,"compression")))||((i=t.body)instanceof ArrayBuffer?D(new Uint8Array(i)):ArrayBuffer.isView(i)&&D(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)))?{url:e.url,encodedBody:t}:(nH=!0,s())},nW=e=>{try{return nG(e)}catch(t){return t6.error(t),void(null==e.callback||e.callback({statusCode:0,error:t}))}},nJ=(s=w(function*(e){var t=rR(e.data),i=yield function(e,t,i){return H.apply(this,arguments)}(t,y.DEBUG,{rethrow:!0});if(!i)return e;var s=yield i.arrayBuffer();return x({},e,{Ys:{contentType:nB,body:s,estimatedSize:s.byteLength}})}),function(e){return s.apply(this,arguments)}),nK=/Failed to fetch|NetworkError|Load failed/i,nZ=e=>"TypeError"===(null==e?void 0:e.name)&&nK.test((null==e?void 0:e.message)||""),nY=e=>{var t=nW(e);if(t){var i,s=t.url,r=t.encodedBody,n=null!=r?r:{},a=n.contentType,o=n.body,l=n.estimatedSize,u=new Headers;sh(e.headers,function(e,t){u.append(t,e)}),a&&u.append("Content-Type",a);var h=null,d=!1;if(p){var v=new p;h={signal:v.signal,timeout:setTimeout(()=>{var t,i;d=!0,v.abort(((i=Error("PostHog request timed out"+((t=e.timeout)?" after "+t+"ms":""))).name="AbortError",i))},e.timeout)}}var g=t=>{d&&"AbortError"===(null==t?void 0:t.name)||nZ(t)?t6.warn(t):t6.error(t),null==e.callback||e.callback({statusCode:0,error:t})};try{c(s,x({method:(null==e?void 0:e.method)||"GET",headers:u,keepalive:"POST"===e.method&&!e.Xs&&52428.8>(l||0),body:o,signal:null==(i=h)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var s={statusCode:t.status,text:i};if(200===t.status)try{s.json=JSON.parse(i)}catch(e){t6.error(e)}null==e.callback||e.callback(s)})).catch(g).finally(()=>h?clearTimeout(h.timeout):null)}catch(e){h&&clearTimeout(h.timeout),g(e)}}},nQ=e=>{try{var t,i=nG(e),s=i.url,r=i.encodedBody,n=null!=r?r:{},a=n.body,o=n.estimatedSize;if(!a)return;var u=a instanceof Blob?a:new Blob([a],{type:n.contentType});if(l.sendBeacon(s,u))return;var h=Q(e.data)?e.data:null==(t=e.data)?void 0:t.batch;if(Q(h)&&h.length>1&&(null!=o?o:0)>16384){var c=Math.ceil(h.length/2),d=t=>Q(e.data)?t:x({},e.data,{batch:t});return nQ(x({},e,{data:d(h.slice(0,c))})),void nQ(x({},e,{data:d(h.slice(c))}))}t6.warn("Beacon of ~"+(null!=o?o:0)+" bytes was rejected by the browser, falling back to fetch"),nY(x({},e,{Xs:!0}))}catch(e){t6.warn("Beacon send failed",e)}},nX=(e,t,i,s)=>{var r="query"===s?"POST"===t?"sent_at":"_":void 0;return nV(i===r4?nz(e,"compression"):e,x({},r?{[r]:Date.now().toString()}:{},i===r4?{}:{compression:i}))},n0=[];c&&n0.push({transport:"fetch",method:nY}),d&&n0.push({transport:"XHR",method(e){var t=nW(e);if(t){var i=new d,s=t.encodedBody;i.open(e.method||"GET",t.url,!0);var r=null!=s?s:{},n=r.contentType,a=r.body;sh(e.headers,function(e,t){i.setRequestHeader(t,e)}),n&&i.setRequestHeader("Content-Type",n),e.timeout&&(i.timeout=e.timeout),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(a)}}}),null!=l&&l.sendBeacon&&n0.push({transport:"sendBeacon",method:nQ});class n1{constructor(e,t){this.eo=!0,this.io=[],this.ro=ey((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,t6.createLogger("flush interval"),3e3),this.no=e}enqueue(e){this.io.push(e),this.so||this.oo()}unload(){this.ao();var e=Object.values(this.io.length>0?this.lo():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.uo(x({},e,{transport:"sendBeacon"}))})}enable(){this.eo=!1,this.oo()}oo(){var e=this;this.eo||(this.so=setTimeout(()=>{if(this.ao(),this.io.length>0){var t=this.lo();for(var i in t)!function(){var s=t[i],r=(new Date).getTime();s.data&&Q(s.data)&&sh(s.data,e=>{e.offset=Math.abs(e.timestamp-r),delete e.timestamp}),e.uo(s)}()}},this.ro))}uo(e){try{this.no(e)}catch(e){t6.error(e)}}ao(){clearTimeout(this.so),this.so=void 0}lo(){var e={};return sh(this.io,t=>{var i,s=(t?t.batchKey:null)||t.url;ei(e[s])&&(e[s]=x({},t,{data:[]})),null==(i=e[s].data)||i.push(t.data)}),this.io=[],e}}var n2=["retriesPerformedSoFar"];class n3{constructor(e){this.ho=!1,this.do=3e3,this.io=[],this._instance=e,this.io=[],this.vo=!0,!ei(a)&&"onLine"in a.navigator&&(this.vo=a.navigator.onLine,this.co=()=>{this.vo=!0,this.fo()},this.po=()=>{this.vo=!1},s_(a,"online",this.co),s_(a,"offline",this.po))}get length(){return this.io.length}retriableRequest(e){var t=e.retriesPerformedSoFar,i=k(e,n2);el(t)&&(i.url=nV(i.url,{retry_count:t})),this._instance._send_request(x({},i,{callback:e=>{if(200!==e.statusCode&&(400>e.statusCode||e.statusCode>=500)){if((0===e.statusCode?3:10)>(null!=t?t:0))return void this.bn(x({retriesPerformedSoFar:t},i));0===e.statusCode&&t6.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(null!=t?t:0)+" retries.")}null==i.callback||i.callback(e)}}))}bn(e){var t,i,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var r=Math.ceil((i=Math.min(18e5,t=3e3*Math.pow(2,s)))+(Math.random()-.5)*(i-t/2)),n=Date.now()+r;this.io.push({retryAt:n,requestOptions:e});var a="Enqueued failed request for retry in "+r;navigator.onLine||(a+=" (Browser is offline)"),t6.warn(a),this.ho||(this.ho=!0,this.mo())}mo(){(this.yo&&clearTimeout(this.yo),0===this.io.length)?(this.ho=!1,this.yo=void 0):this.yo=setTimeout(()=>{this.vo&&this.io.length>0&&this.fo(),this.mo()},this.do)}fo(){var e=Date.now(),t=[],i=this.io.filter(i=>e>i.retryAt||(t.push(i),!1));if(this.io=t,i.length>0)for(var s of i)this.retriableRequest(s.requestOptions)}unload(){for(var e of(this.yo&&(clearTimeout(this.yo),this.yo=void 0),this.ho=!1,ei(a)||(this.co&&(a.removeEventListener("online",this.co),this.co=void 0),this.po&&(a.removeEventListener("offline",this.po),this.po=void 0)),this.io)){var t=e.requestOptions;try{this._instance._send_request(x({},t,{transport:"sendBeacon"}))}catch(e){t6.error(e)}}this.io=[]}}class n5{constructor(e){this.bo=()=>{this._o||(this._o={});var e,t,i,s,r=this.scrollElement(),n=this.scrollY(),a=r?Math.max(0,r.scrollHeight-r.clientHeight):0,o=n+((null==r?void 0:r.clientHeight)||0),l=(null==r?void 0:r.scrollHeight)||0;this._o.lastScrollY=Math.ceil(n),this._o.maxScrollY=Math.max(n,null!=(e=this._o.maxScrollY)?e:0),this._o.maxScrollHeight=Math.max(a,null!=(t=this._o.maxScrollHeight)?t:0),this._o.lastContentY=o,this._o.maxContentY=Math.max(o,null!=(i=this._o.maxContentY)?i:0),this._o.maxContentHeight=Math.max(l,null!=(s=this._o.maxContentHeight)?s:0)},this._instance=e}get wo(){return this._instance.config.scroll_root_selector}getContext(){return this._o}resetContext(){var e=this._o;return setTimeout(this.bo,0),e}startMeasuringScrollPosition(){s_(a,"scroll",this.bo,{capture:!0}),s_(a,"scrollend",this.bo,{capture:!0}),s_(a,"resize",this.bo)}scrollElement(){if(!this.wo)return null==a?void 0:a.document.documentElement;for(var e of Q(this.wo)?this.wo:[this.wo]){var t=null==a?void 0:a.document.querySelector(e);if(t)return t}}ko(e){if(this.wo){var t=this.scrollElement();return t&&t["y"===e?"scrollTop":"scrollLeft"]||0}return a?"y"===e?a.scrollY||a.pageYOffset||a.document.documentElement.scrollTop||0:a.scrollX||a.pageXOffset||a.document.documentElement.scrollLeft||0:0}scrollY(){return this.ko("y")}scrollX(){return this.ko("x")}}var n6=e=>rQ(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties,null==e?void 0:e.config.disable_capture_url_hashes);class n8{constructor(e,t,i,s){this.ot=e=>{var t=this.xo();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.So(this._instance)};this.Co.register({[iZ]:i})}},this._instance=e,this.To=t,this.Co=i,this.So=s||n6,this.To.onSessionId(this.ot)}xo(){return this.Co.props[iZ]}getSetOnceProps(){var e,t=null==(e=this.xo())?void 0:e.props;return t?"r"in t?rX(t,this._instance.config.disable_capture_url_hashes):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return sh(sg(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+W(i)]=t}),e}}class n4{on(e,t){return this.Mo[e]||(this.Mo[e]=[]),this.Mo[e].push(t),()=>{this.Mo[e]=this.Mo[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Mo[e]||[])i(t);for(var s of this.Mo["*"]||[])s(e,t)}constructor(){this.Mo={}}}var n9=t8("[SessionId]");class n7{on(e,t){return this.Eo.on(e,t)}constructor(e,t,i){if(this.Io=null,this.Ro=null,this.Po=[],this.Ao=void 0,this.Fo=!1,this.Eo=new n4,this.Oo=(e,t)=>!(!el(e)||!el(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===i7)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Oi=e.config,this.Co=e.persistence,this.st=void 0,this._e=void 0,this._sessionStartTimestamp=null,this.Lo=void 0,this._sessionActivityTimestamp=null,this.$o=t||sI,this.Do=i||sI;var s,r=this.Oi.persistence_name||this.Oi.token;if(this._sessionTimeoutMs=1e3*ey(this.Oi.session_idle_timeout_seconds||1800,60,36e3,n9.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.No(),this.qo="ph_"+r+"_window_id",this.jo="ph_"+r+"_primary_window_exists",this.Bo()){var n=sW.Pr(this.qo),a=sW.Pr(this.jo);n&&!a?this.st=n:sW.Dr(this.qo),sW.Or(this.jo,!0)}null!=(s=this.Oi.bootstrap)&&s.sessionID&&this.setBootstrapSessionId(this.Oi.bootstrap.sessionID),this.Ho()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ei(this.Po)&&(this.Po=[]),this.Po.push(e),this._e&&e(this._e,this.st),()=>{this.Po=this.Po.filter(t=>t!==e)}}Bo(){return"memory"!==this.Oi.persistence&&!this.Co.ws&&sW.Lr()}zo(e){e!==this.st&&(this.st=e,this.Bo()&&sW.Or(this.qo,e))}Uo(){return this.st?this.st:this.Bo()?sW.Pr(this.qo):null}Wo(e){var t=this.Io;return!en(t)&&!en(e)&&5e3>Math.abs(e-t)}Vo(e,t,i){var s=t!==this._sessionActivityTimestamp,r=e===this._e&&i===this._sessionStartTimestamp;this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this._e=e,r&&!s||r&&this.Wo(t)||(this.Io=t,this.Co.register({[iS]:[t,e,i]}))}Go(){var e,t=null==(e=this.Oi)?void 0:e.persistence_save_debounce_ms;return el(t)&&t>0}Zo(){this.Go()?this.Co.refreshKey(iS):(this.Co.flush(),this.Co.load())}Qo(){var e;if(!en(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Io){this.Zo();var t=this.Jo();t[1]===this._e&&t[2]===this._sessionStartTimestamp&&(this.Io=this._sessionActivityTimestamp,this.Co.register({[iS]:[this._sessionActivityTimestamp,null!=(e=this._e)?e:null,this._sessionStartTimestamp]}),this.Co.flush())}}Ko(){var e=this.Jo()[0];return Math.max(el(e)?e:0,el(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0)}Yo(e){return this.Zo(),this.Oo(e,this.Ko())}Jo(){var e=this.Co.props[iS];return Q(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Io=null,this.Lo=void 0,clearTimeout(this.Xo),this.Xo=void 0,this.Vo(null,null,null)}setBootstrapSessionId(e,t){void 0===t&&(t=!1);var i=function(e,t){void 0===t&&(t=(new Date).getTime());try{var i=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(e);return i>t+6e4?void n9.error("Bootstrap sessionID cannot be in the future"):i}catch(e){return void n9.error("Invalid sessionID in bootstrap",e)}}(e);return!ei(i)&&(t?this.Lo={sessionId:e,sessionStartTimestamp:i}:this.Vo(e,(new Date).getTime(),i),!0)}destroy(){this.Fo=!0,this.Qo(),clearTimeout(this.Xo),this.Xo=void 0,this.Ao&&a&&(a.removeEventListener(sr,this.Ao,{capture:!1}),this.Ao=void 0),this.Po=[]}Ho(){this.Ao=()=>{this.Qo(),this.Bo()&&sW.Dr(this.jo)},s_(a,sr,this.Ao,{capture:!1})}checkAndGetSessionAndWindowId(e,t,i){if(void 0===e&&(e=!1),void 0===t&&(t=null),void 0===i&&(i=!1),this.Oi.cookieless_mode===i7)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s,r,n=t||(new Date).getTime(),a=this._e;i?this.Ro=n:(en(this.Ro)||this.Ro>n||n-this.Ro>=1e3)&&(null==(s=(r=this.Co).syncCookieProperties)||s.call(r),this.Ro=n);var o=this.Jo(),l=o[1],u=o[2],h=!ei(a)&&l!==a,c=this.Ko(),d=this.Uo(),p=this.Lo,v=!!p&&(p.sessionStartTimestamp>n+6e4||n-p.sessionStartTimestamp>864e5),g=p?v:el(u)&&Math.abs(n-u)>864e5,f=!1,_=h,m=!l||!!p,y=l,b=!m&&!e&&this.Oo(n,c);if(b){(b=this.Yo(n))||n9.info("cross-tab refresh kept the session alive",{sessionId:l});var w=this.Jo();l=w[1],u=w[2]}if(m||b||g){_=!1;var x=p&&!v;l=x?p.sessionId:this.$o(),d=this.Do(),n9.info("new session ID assigned",{sessionId:l,windowId:d,bootstrapped:!!x,changeReason:{noSessionId:m,activityTimeout:b,sessionPastMaximumLength:g}}),u=x?p.sessionStartTimestamp:n,this.Lo=void 0,f=!0}else d||(d=this.Do(),f=!0),(_=_||l!==y)&&(n9.info("adopted cross-tab session id",{sessionId:l,windowId:d}),f=!0);var k=el(c)&&e&&!g?c:n,E=el(u)?u:(new Date).getTime();this.zo(d),this.Vo(l,k,E),e||this.No();var S={noSessionId:m,activityTimeout:b,sessionPastMaximumLength:g,crossTabAdoption:_};return f&&this.Po.forEach(e=>e(l,d,S)),{sessionId:l,windowId:d,sessionStartTimestamp:E,changeReason:f?S:void 0,lastActivityTimestamp:c}}No(){this.Fo||(clearTimeout(this.Xo),this.Xo=setTimeout(()=>{if(!this.Fo)if(this.Yo((new Date).getTime())){var e=this._e;this.resetSessionId(),this.Eo.emit("forcedIdleReset",{idleSessionId:e})}else this.No()},1.1*this.sessionTimeoutMs))}}var ae=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&V(i,t))return!0;try{var s=null==e?void 0:e.userAgentData;if(null!=s&&s.brands&&s.brands.some(e=>V(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver};function at(){return(at=w(function*(){var e=null==l?void 0:l.userAgentData;if(null!=e&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),i=null==t?void 0:t.model;return es(i)&&i.length>0?i:void 0}catch(e){return void t6.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",e)}})).apply(this,arguments)}var ai=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function as(e,t,i){return rR({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var ar={exact:(e,t)=>t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>ai(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!ai(t,e))),icontains:(e,t)=>t.map(an).some(t=>e.map(an).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(an).every(t=>e.map(an).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},an=e=>e.toLowerCase();function aa(e,t){return!e||Object.entries(e).every(e=>{var i=e[1],s=null==t?void 0:t[e[0]];if(ei(s)||en(s))return!1;var r=[String(s)],n=ar[i.operator];return!!n&&n(i.values,r)})}var ao="custom",al="i.posthog.com",au=/^\/static\//,ah=["/s/","/e/","/i/"];class ac{constructor(e){this.ta={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+al,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.ta[this.apiHost]||(this.ta[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":ao),this.ta[this.apiHost]}ea(e){if(au.test(e)){var t=this.instance.config.asset_host;if("string"==typeof t)return t.trim().replace(/\/$/,"")||void 0}}ia(e){var t=rA(e);return t?t.protocol+"//"+t.host+t.pathname:void 0}ra(e,t,i){if("ui"===e)return i;var s=i,r=this.instance.config.rewriteRequestPath;if(r&&(s=r(new URL((null==(a=rA(i))?void 0:a.href)||i)).toString()),r&&"api"===e&&ah.some(e=>0===t.indexOf(e))){var n=this.ia(s);if(n){var a,o,l=this.apiHost,u=this.na;(null==(o=u)?void 0:o.apiHost)===l&&u.rewriteRequestPath===r||(u={apiHost:l,rewriteRequestPath:r,urls:new Set},this.na=u),u.urls.add(n)}}return s}isIngestionEndpoint(e){var t=this.na,i=this.ia(e);return(null==t?void 0:t.apiHost)===this.apiHost&&t.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!i&&t.urls.has(i)}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.ra(e,t,this.uiHost+t);if("flags"===e)return this.ra(e,t,this.flagsApiHost+t);if("assets"===e){var i=this.ea(t);if(i)return this.ra(e,t,""+i+t)}if(this.region===ao)return this.ra(e,t,this.apiHost+t);var s=al+t;switch(e){case"assets":return this.ra(e,t,"https://"+this.region+"-assets."+s);case"api":return this.ra(e,t,"https://"+this.region+"."+s)}}}function ad(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}var ap=t8("[Surveys]"),av="seenSurvey_",ag=e=>{try{var t=""+av+(e.current_iteration&&e.current_iteration>0?e.id+"_"+e.current_iteration:e.id);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){ap.error("Failed to persist survey seen state",e)}},af=["popover","widget","api"],a_={ignoreConditions:!1,ignoreDelay:!1,displayType:nr},am=t8("[PostHog ExternalIntegrations]"),ay={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ab{constructor(e){this._instance=e}Jn(e,t){var i;null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return am.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this;for(var i of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))!function(){var e,s,r,n=i[0],a=i[1];!a||null!=(e=m.__PosthogExtensions__)&&null!=(e=e.integrations)&&e[n]||t.Jn(ay[n],()=>{var e;null==(e=m.__PosthogExtensions__)||null==(e=e.integrations)||null==(e=e[n])||e.start(t._instance)}),!a&&null!=(s=m.__PosthogExtensions__)&&null!=(s=s.integrations)&&s[n]&&(null==(r=m.__PosthogExtensions__)||null==(r=r.integrations)||null==(r=r[n])||r.stop())}()}}class aw{constructor(e,t){this.I=e,this.sa=t,this.oa=new Map,this.aa=!1}add(e){var t=this;return w(function*(){if(t.aa)throw Error("Cannot add an extension to a disposed ExtensionRuntime");if(t.oa.has(e.name))throw Error('Browser extension "'+e.name+'" is already registered');t.oa.set(e.name,e);try{var i=e.setup(t.sa);i&&(yield i)}catch(i){var s=t.oa.get(e.name)===e;s&&t.oa.delete(e.name),t.I.error('Failed to set up browser extension "'+e.name+'"',i),s&&t.la(e)}})()}dispose(){if(!this.aa){this.aa=!0;var e=Array.from(this.oa.values()).reverse();for(var t of(this.oa.clear(),e))this.la(t)}}la(e){try{var t=null==e.dispose?void 0:e.dispose();t&&X(t.then)&&t.then(void 0,t=>{this.I.error('Failed to dispose browser extension "'+e.name+'"',t)})}catch(t){this.I.error('Failed to dispose browser extension "'+e.name+'"',t)}}}class ax{constructor(e){this._instance=e}initialize(){}get(e){var t=this._instance.persistence;if("string"==typeof e)return null==t?void 0:t.get_property(e);var i={};for(var s of e){var r=null==t?void 0:t.get_property(s);ei(r)||(i[s]=r)}return i}set(e,t){var i;null==(i=this._instance.persistence)||i.register("string"==typeof e?{[e]:t}:e)}remove(e){var t;null==(t=this._instance.persistence)||t.unregister(e)}}var ak="extensionsRemoteConfig";class aE{constructor(e){this.aa=!1,this.instance=e,this.I=t6,this.ua=e.ha,this.kv=new ax(e),this.onEvent=e=>r8(this.instance.on("eventCaptured",t=>{try{e({event:t.event,properties:t.properties})}catch(e){this.I.error("Browser extension event listener failed",e)}})),this.onRemoteConfig=e=>{if(this.aa)return r8(()=>{});var t=t=>{try{e(t)}catch(e){this.I.error("Browser extension remote config listener failed",e)}},i=this.instance.da.on(ak,t);return this.ua&&t(this.ua),r8(i)},this.va=new aw(t6.createLogger("[BrowserExtensions]"),this)}get logger(){return this.I}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return null!=(e=this.instance.get_property(ir))?e:this.distinctId}get deviceId(){var e=this.instance.get_property(ir);return"string"==typeof e?e:void 0}get library(){return{name:y.LIB_NAME,version:y.LIB_VERSION}}get initialPersonProperties(){var e,t;return null!=(e=null==(t=this.instance.persistence)?void 0:t.get_initial_props())?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,t,i,s,r=null==(e=this.instance.sessionManager)?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:null!=(t=null==r?void 0:r.sessionId)?t:"",windowId:null!=(i=null==r?void 0:r.windowId)?i:"",sessionStartTimestamp:null!=(s=null==r?void 0:r.sessionStartTimestamp)?s:0}}catch(e){return{sessionId:"",windowId:"",sessionStartTimestamp:0}}}get projectToken(){return this.instance.config.token}add(e){return this.va.add(e)}capture(e,t,i){var s=this;return w(function*(){i?s.instance.capture(e,t,{timestamp:i.timestamp,uuid:i.uuid,$set:i.set,$set_once:i.setOnce}):s.instance.capture(e,t)})()}registerDynamicEventProperties(e){return r8(this.instance.ca(e))}handleRemoteConfig(e){this.aa||(this.ua=e,this.instance.da.emit(ak,e))}sendRequest(e,t){var i=this;return w(function*(){void 0===t&&(t={});var s,r=i.instance.requestRouter.endpointFor(null!=(s=t.target)?s:"api",e),n={method:t.method,url:t.query?nV(r,t.query):r,data:t.body,headers:t.headers,timeout:t.timeoutMs,fireCallbackOnDrop:!0,transport:t.transport,compression:t.compression,timestampMode:t.sentAt};return"sendBeacon"===t.transport?(i.instance._send_request(n),{statusCode:202}):new Promise(e=>{n.callback=e,i.instance._send_request(n)})})()}dispose(){this.aa||(this.aa=!0,this.va.dispose())}}var aS={},aP=0,aO=()=>{},aI='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',aF="Surveys module not available",aC="sanitize_properties is deprecated. Use before_send instead",a$="Invalid value for property_denylist config: ",aT=["token","distinct_id",i3],aM="posthog",aR=!nq&&-1===(null==g?void 0:g.indexOf("MSIE"))&&-1===(null==g?void 0:g.indexOf("Mozilla")),aA=e=>{var t;return x({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!es(t))return!1;var i=t.split(".").slice(-2).join(".");for(var s of sf)if(i===s)return!1;return!0}(null==u?void 0:u.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:aO,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:h&&es(null==h?void 0:h.search)&&-1!==h.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:"fallback",enable_recording_console_log:void 0,secure_cookie:"https:"===(null==a||null==(t=a.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(e){t6.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:si,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:aO},{rageclick:e&&e>="2026-05-30"?{content_ignorelist:rs,ignore_text_selection:!0}:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:e&&e>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:e&&e>="2026-05-30"?250:0,split_storage:!(!e||"2026-05-30">e),detect_google_search_app:!(!e||"2026-05-30">e),disable_capture_url_hashes:!(!e||"2026-06-25">e),cookieWinsOnConflict:!(!e||"unset"===e||"2026-08-29">e)})},aL=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"],["__preview_cookie_wins_on_conflict","cookieWinsOnConflict"]],aD=e=>{var t={};for(var i of aL){var s=i[0],r=i[1];ei(e[s])||(t[r]=e[s])}var n=sc({},t,e),a=e.__preview_external_dependency_versioned_paths;return ei(a)||(ei(e.strict_script_versioning)&&(n.strict_script_versioning=!!a),es(a)&&ei(e.asset_host)&&(n.asset_host=a)),Q(e.property_blacklist)&&(ei(e.property_denylist)?n.property_denylist=e.property_blacklist:Q(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:t6.error(a$+e.property_denylist)),n};class aN{constructor(){this.__forceAllowLocalhost=!1}get fa(){return this.__forceAllowLocalhost}set fa(e){t6.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class aj{pa(e,t){if(e){var i=this.oa.indexOf(e);-1!==i&&this.oa.splice(i,1)}return this.oa.push(t),null==t.initialize||t.initialize(),t}ga(){return this.config.cookieless_mode===i7||this.config.cookieless_mode===i9&&this.consent.isRejected()}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new aN,this.ma=!1,this.version=y.LIB_VERSION,this.ya=new Set,this.ba="",this.da=new n4,this.oa=[],this._a=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=aA(),this.SentryIntegration=rI,this.sentryIntegration=e=>{var t;return t=rO(this,e),{name:rP,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.wa=!1,this.ka=null,this.xa=null,this.Sa=null,this.scrollManager=new n5(this),this.pageViewManager=new rF(this),this.rateLimiter=new na(this),this.requestRouter=new ac(this),this.consent=new sJ(this),this.externalIntegrations=new ab(this);var e,t=null!=(e=aj.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.metrics=t.metrics&&new t.metrics(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var s=es(e)?{[e]:t}:e;this.setPersonProperties(s),null==i||i({})},set_once:(e,t,i)=>{var s=es(e)?{[e]:t}:e;this.setPersonProperties(void 0,s),null==i||i({})}},this.on("eventCaptured",e=>t6.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==aM){var s,r=null!=(s=aS[i])?s:new aj;return r._init(e,t,i),aS[i]=r,aS[aM][i]=r,r}return this._init(e,t,i)}_init(e,t,i){void 0===t&&(t={});var s,r,n,o=es(e)?e.trim():"";if(!o)return t6.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return o!==(null==(n=this.config)?void 0:n.token)?console.warn("[PostHog.js]","You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('"+o+"', { ... }, 'project2')"):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=aA(t.defaults),t.debug=this.Ca(t.debug),this.Ta=t,this.Ma=[],t.person_profiles?this.xa=t.person_profiles:t.process_person&&(this.xa=t.process_person);var l=aA(t.defaults),u=aD(t),h=sc({},l,u,{name:i,token:o});ee(l.rageclick)&&ee(u.rageclick)&&(h.rageclick=sc({},l.rageclick,u.rageclick)),ee(l.session_recording)&&ee(u.session_recording)&&(h.session_recording=sc({},l.session_recording,u.session_recording)),this.set_config(h),this.config.on_xhr_error&&t6.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:r4;var c=this.Ea();if(this.persistence=new r6(this.config,c),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r6(x({},this.config,{persistence:"sessionStorage"}),c,!1),this.ba="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties","memory"!==this.config.persistence&&!c&&sW.Lr()){var d=sW.Pr(this.ba);Q(d)&&d.forEach(e=>{es(e)&&this.ya.add(e)})}else sW.Dr(this.ba);var p=x({},this.persistence.props),v=x({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.Ia=new n1(e=>this.Ra(e),this.config.request_queue_config),this.Pa=new n3(this),this.__request_queue=[];var g=this.ga();if(g||(this.sessionManager=new n7(this),this.sessionPropsManager=new n8(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId((e,t,i)=>{(null!=i&&i.activityTimeout||null!=i&&i.sessionPastMaximumLength||null!=i&&i.crossTabAdoption)&&this.Aa()})),this.Fa(),this.config.__preview_deferred_init_extensions?(t6.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Oa(g)},0)):(t6.info("Initializing extensions synchronously"),this.Oa(g)),y.DEBUG=y.DEBUG||this.config.debug,y.DEBUG&&t6.info("Starting in debug mode",{this:this,config:t,thisC:x({},this.config),p:p,s:v}),!this.config.identity_distinct_id||null!=(s=t.bootstrap)&&s.distinctID||(t.bootstrap=x({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(r=t.bootstrap)?void 0:r.distinctID)){var f=t.bootstrap.distinctID,_=this.get_distinct_id(),m=this.persistence.get_property(iK);if(t.bootstrap.isIdentifiedID&&null!=_&&_!==f&&m===se)this.identify(f);else if(t.bootstrap.isIdentifiedID&&null!=_&&_!==f&&m===st)t6.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var b=this.config.get_device_id(sI()),w=t.bootstrap.isIdentifiedID?b:f;this.persistence.set_property(iK,t.bootstrap.isIdentifiedID?st:se),this.register({distinct_id:f,$device_id:w})}}if(g)this.register_once({distinct_id:i2,$device_id:null},"");else if(!this.get_distinct_id()){var k=this.config.get_device_id(sI());this.register_once({distinct_id:k,$device_id:k},""),this.persistence.set_property(iK,se)}return s_(a,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var s=i=>{var s=()=>i.anonymousId()||sI();e.config.get_device_id=s,i.id()&&(e.register({distinct_id:i.id(),$device_id:s()}),e.persistence.set_property(iK,st)),t()},r=i.user();"then"in r&&X(r.then)?r.then(s):s(r)}(e,()=>{var s;i.register(("u">typeof Promise&&Promise.resolve||rS.warn("This browser does not have Promise support, and can not use the segment integration"),s=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(rS.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(rS.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var s=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},s,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>s(e,e.event.event),page:e=>s(e,sn),identify:e=>s(e,so),screen:e=>s(e,"$screen")})).then(()=>{t()})})}(this,()=>this.La()):this.La(),X(this.config._onCapture)&&this.config._onCapture!==aO&&(t6.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&t6.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return at.apply(this,arguments)})().then(e=>{e&&this.register({[ia]:e})}).catch(aO),this}Fa(){var e,t,i,s,r,n,a=null!=(e=null==(t=this.config.__extensionClasses)?void 0:t.featureFlags)?e:null==(i=aj.__defaultExtensionClasses)?void 0:i.featureFlags;a&&(this.featureFlags&&this.featureFlags instanceof a||(null==(s=this.$a)||s.call(this),this.$a=void 0,this.featureFlags=new a(this)),X(this.featureFlags.onReloading)&&X(this.featureFlags.setup)?this.$a||(this.$a=this.featureFlags.onReloading(()=>{this.da.emit("featureFlagsReloading",!0)}),this.Da().add(this.featureFlags)):null==(r=(n=this.featureFlags).initialize)||r.call(n))}Oa(e){var t,i,s,r,n,a,o,l=performance.now(),u=x({},aj.__defaultExtensionClasses,this.config.__extensionClasses),h=[];u.exceptions&&this.oa.push(this.exceptions=null!=(t=this.exceptions)?t:new u.exceptions(this)),u.historyAutocapture&&this.oa.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.oa.push(this.tracingHeaders=new u.tracingHeaders(this)),u.siteApps&&this.oa.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.oa.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||h.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.oa.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.oa.push(this.surveys=null!=(i=this.surveys)?i:new u.surveys(this)),u.logs&&this.oa.push(this.logs=null!=(s=this.logs)?s:new u.logs(this)),u.metrics&&this.oa.push(this.metrics=null!=(r=this.metrics)?r:new u.metrics(this)),u.conversations&&this.oa.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.oa.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.oa.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.oa.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.oa.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.oa.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,rk)),u.toolbar&&this.oa.push(this.toolbar=null!=(a=this.toolbar)?a:new u.toolbar(this)),u.experiments&&this.oa.push(this.experiments=null!=(o=this.experiments)?o:new u.experiments(this)),this.oa.forEach(e=>{e.initialize&&h.push(()=>{null==e.initialize||e.initialize()})}),h.push(()=>{if(this.Na){var e=this.Na;this.Na=void 0,this.oa.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}}),this.qa(h,l)}qa(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.qa(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){t6.error("Error initializing extension:",e)}}var s=Math.round(performance.now()-t);this.register_for_session({[i5]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[i6]:s}),this.config.__preview_deferred_init_extensions&&t6.info("PostHog extensions initialized ("+s+"ms)")}Zs(e){var t;if(!u||!u.body)return t6.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Zs(e)},500);if(this.config.__preview_deferred_init_extensions&&(this.Na=e),this.ha=e,this.compression=void 0,e.ok){var i,s=e.config;s.supportedCompression&&!this.config.disable_compression&&(this.compression=U(s.supportedCompression,r4)?r4:U(s.supportedCompression,r9)?r9:void 0),null!=(i=s.analytics)&&i.endpoint&&(this.analyticsDefaultEndpoint=s.analytics.endpoint)}this.set_config({person_profiles:this.xa?this.xa:si}),null==(t=this.ja)||t.handleRemoteConfig(e),this.oa.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))}La(){try{this.config.loaded(this)}catch(e){t6.critical("`loaded` function failed",e)}if(this.Ba(),this.config.internal_or_test_user_hostname&&null!=h&&h.hostname){var e=h.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.ga())&&this.Ha()},1),this.za=new nl(this),this.za.load()}Ba(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.Ia)||e.enable())}_dom_loaded(){this.is_capturing()&&su(this.__request_queue,e=>this.Ra(e)),this.__request_queue=[],this.Ba()}_handle_unload(){var e,t,i,s,r;null==(e=this.surveys)||null==e.handlePageUnload||e.handlePageUnload(),null==(t=this.metrics)||t.flush("sendBeacon"),this.config.request_batching?(this.Ua()&&this.capture(sa),null==(i=this.logs)||i.flushLogs("sendBeacon"),null==(s=this.Ia)||s.unload(),null==(r=this.Pa)||r.unload()):this.Ua()&&this.capture(sa,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?aR?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=x({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,(ei(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,s,r,n,a=x({},e);a.timeout=a.timeout||6e4;var o,l,u,h,c,d=null!=(s=a.transport)?s:"fetch";"sendBeacon"===d&&ei(a.compression)&&a.data&&(a.compression=r9),"POST"===a.method&&a.data&&("capture-body"===a.timestampMode?a.data={api_key:null!=(l=null==(c=(h=(Q(o=a.data)?o:[o]).map(e=>x({},e,e.timestamp instanceof Date&&!isNaN(e.timestamp.getTime())?{timestamp:e.timestamp.toISOString()}:{})))[0])||null==(u=c.properties)?void 0:u.token)?l:null==c?void 0:c.token,batch:h,sent_at:(new Date).toISOString()}:"body"===a.timestampMode&&(t=a.data,void 0===i&&(i=(new Date).toISOString()),a.data=Q(t)?t.map(e=>x({},e,{sent_at:i})):x({},t,{sent_at:i}))),a.url=nX(a.url,a.method,a.compression,a.timestampMode);var p=n0.filter(e=>!a.disableTransport||!e.transport||!a.disableTransport.includes(e.transport)),g=null!=(r=null==(n=function(e){for(var t=0;e.length>t;t++)if(e[t].transport===d)return e[t]}(p))?void 0:n.method)?r:p[0].method;if(!g)throw Error("No available transport method");var f=e=>{try{g(e)}catch(e){nZ(e)?t6.warn(e):t6.error(e),null==a.callback||a.callback({statusCode:0,error:e})}};"sendBeacon"!==d&&a.data&&a.compression===r4&&v&&"u">typeof Promise&&!nH?nJ(a).then(e=>{f(e)}).catch(t=>{j(t)?(nH=!0,f(x({},a,{compression:void 0,url:nX(e.url,e.method,void 0,e.timestampMode)}))):((e=>{if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return j(e)||t===L})(t)&&(nH=!0),f(a))}):g(a)})(x({},e,{callback:t=>{var i,s;this.rateLimiter.checkForLimiting(t),400>t.statusCode||null==(i=(s=this.config).on_request_error)||i.call(s,t),null==e.callback||e.callback(t)}}))):e.fireCallbackOnDrop&&(null==e.callback||e.callback({statusCode:0}))}Ra(e){this.Pa?this.Pa.retriableRequest(e):this._send_request(e)}_execute_array(e){aP++;try{var t,i=[],s=[],r=[];su(e,e=>{if(e)if(Q(t=e[0]))r.push(e);else if(X(e))try{e.call(this)}catch(t){t6.error("Error executing queued PostHog call",e,t)}else Q(e)&&"alias"===t?i.push(e):Q(e)&&-1!==t.indexOf("capture")&&X(this[t])?r.push(e):s.push(e)});var n=function(e,t){su(e,function(e){try{if(Q(e[0])){var i=t;sh(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else t[e[0]].apply(t,e.slice(1))}catch(t){t6.error("Error executing queued PostHog call",e,t)}})};n(i,this),n(s,this),n(r,this)}finally{aP--}}push(e){if(aP>0&&Q(e)&&es(e[0])){var t=aj.prototype[e[0]];X(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var s,r,n,a,o;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ia){if(this.is_capturing())if(!ei(e)&&es(e)){var l=!this.config.opt_out_useragent_filter&&this._is_bot();if(!l||this.config.__preview_capture_bot_pageviews){var u=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==u||!u.isRateLimited){null!=t&&t.$current_url&&!es(null==t?void 0:t.$current_url)&&(t6.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.Wa||t6.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var h,c,d,p,v=new Date,g=(null==i?void 0:i.timestamp)||v,f=tg(null==i?void 0:i.uuid,sI),_={uuid:f,event:e,properties:this.calculateEventProperties(e,t||{},g,f)};e===sn&&this.config.__preview_capture_bot_pageviews&&l&&(_.event="$bot_pageview",_.properties.$browser_type="bot"),u&&(_.properties.$lib_rate_limit_remaining_tokens=u.remainingTokens);var m="$feature_flag_called"===e&&!1===_.properties.$feature_flag_has_experiment&&!0===this.get_property(iM);(null==i?void 0:i.$set)&&!m&&(_.$set=null==i?void 0:i.$set);var y=null==i?void 0:i.$unset;y&&(_.$unset=y);var b,w,k,E=m?void 0:this.Va(null==i?void 0:i.$set_once,e!==sl,e===so);if(E&&(_.$set_once=E),null!=i&&i._noTruncate||(r=this.config.properties_string_max_length,n=_,a=e=>es(e)?e.slice(0,r):e,o=new Set,_=function e(t,i){if(t!==Object(t))return a?a(t):t;if(!o.has(t)){var s;if(o.add(t),Q(t))s=[],su(t,t=>{s.push(e(t))});else{var r={};sh(t,(t,i)=>{o.has(t)||(r[i]=e(t,i))}),s=r}return s}}(n)),_.timestamp=g,ei(null==i?void 0:i.timestamp)||(_.properties.$event_time_override_provided=!0,_.properties.$event_time_override_system_time=v),m&&(_.properties=(h=_.properties,void 0===(c=aT)&&(c=[]),d={},p=e=>{void 0!==h[e]&&(d[e]=h[e])},$.forEach(p),c.forEach(p),d)),e===ni||e===ns){var S=null==t?void 0:t.$survey_id,P=null==t?void 0:t.$survey_iteration;ag({id:S,current_iteration:P}),_.$set=x({},_.$set,{[(b={id:S,current_iteration:P},k="$survey_"+(w=e===ns?"responded":"dismissed")+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(k="$survey_"+w+"/"+b.id+"/"+b.current_iteration),k)]:!0})}else e===nt&&(_.$set=x({},_.$set,{$survey_last_seen_date:(new Date).toISOString()}));if("product tour shown"===e){var O=null==t?void 0:t.$product_tour_type;O&&(_.$set=x({},_.$set,{["$product_tour_last_seen_date/"+O]:(new Date).toISOString()}))}var I=x({},_.properties.$set,_.$set);if(et(I)||this.setPersonPropertiesForFlags(I),!ea(this.config.before_send)){var F=this.mn(_);if(!F)return;(_=F).uuid=tg(_.uuid,sI)}this.da.emit("eventCaptured",_);var C=null!=(s=null==i?void 0:i._url)?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),T={method:"POST",url:C,data:_,compression:"best-available",timestampMode:"recordings"===(null==i?void 0:i._batchKey)||/\/s\/(?:\?|$)/.test(C)?"body":"capture-body",batchKey:null==i?void 0:i._batchKey,transport:null==i?void 0:i.transport};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.Ra(T):this.Ia.enqueue(T),_}t6.critical("This capture call is ignored due to client rate limiting.")}}else t6.error("No event name provided to posthog.capture")}else t6.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}Da(){var e;return null!=(e=this.ja)?e:this.ja=new aE(this)}ca(e){this._a.push(e);var t=!0;return()=>{if(t){t=!1;var i=this._a.indexOf(e);-1!==i&&this._a.splice(i,1)}}}Ga(e){var t,i,s;return void 0===e&&(e=!0),!(null==(t=this.persistence)||!t.consumeCookieIdentityChange())&&(this.Sa=null,this.persistence.get_property(iK)===se&&(null==(s=this.sessionPersistence)||s.clear(),this.ya.clear(),this.Za()),null==(i=this.featureFlags)||i.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,t,i,s,r){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;this.persistence.syncCookieProperties(),this.Ga();var n,o=r?void 0:this.persistence.remove_event_timer(e),l=x({},t);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.ga()&&(l[i3]=!0),"$snapshot"===e){var c=x({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=c.distinct_id,(!es(l.distinct_id)&&!eo(l.distinct_id)||er(l.distinct_id))&&t6.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var d,p=function(e,t,i,s){if(void 0===s&&(s=!1),!g)return{};var r,n,o,l,u,c=e?[...rH,...t||[]]:[],d=function(e){for(var t=0;td.length>t;t++){var i=td[t],s=i[1],r=i[0].exec(e),n=r&&(X(s)?s(r,e):s);if(n)return n}return["",""]}(g),p=d[0],v=d[1],f=null!=(u="u">typeof navigator?navigator:void 0)&&u.brave?{brave:!0}:{},_={};ei(i)||(_.detectGoogleSearchApp=i);var m={},b=null==(r=navigator)||null==(r=r.userAgentData)?void 0:r.platform,w=null==(n=navigator)?void 0:n.maxTouchPoints,x=null==a||null==(o=a.screen)?void 0:o.width,k=null==a||null==(l=a.screen)?void 0:l.height,E=null==a?void 0:a.devicePixelRatio;ei(b)||(m.userAgentDataPlatform=b),ei(w)||(m.maxTouchPoints=w),ei(x)||(m.screenWidth=x),ei(k)||(m.screenHeight=k),ei(E)||(m.devicePixelRatio=E);var S,P,O,I,F,C,$=sc(sg({$os:p,$os_version:v,$browser:tu(g,navigator.vendor,f,_),$device:tp(g),$device_type:(C=tp(g))===eS||C===eE||"Kobo"===C||"Kindle Fire"===C||C===e1?ek:C===eV||C===eG||C===eU||C===eQ?"Console":C===eO?"Wearable":C?ew:"Android"===(null==m?void 0:m.userAgentDataPlatform)&&(null!=(P=null==m?void 0:m.maxTouchPoints)?P:0)>0?600>Math.min(null!=(O=null==m?void 0:m.screenWidth)?O:0,null!=(I=null==m?void 0:m.screenHeight)?I:0)/(null!=(F=null==m?void 0:m.devicePixelRatio)?F:1)?ew:ek:"Desktop",$timezone:r0(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:rD(s?tf(null==h?void 0:h.href):null==h?void 0:h.href,c,rV),$host:null==h?void 0:h.host,$pathname:null==h?void 0:h.pathname,$raw_user_agent:g.length>1e3?g.substring(0,997)+"...":g,$browser_version:tc(g,navigator.vendor,f,_),$browser_language:rK(),$browser_language_prefix:"string"==typeof(S=rK())?S.split("-")[0]:void 0,$screen_height:null==a?void 0:a.screen.height,$screen_width:null==a?void 0:a.screen.width,$viewport_height:null==a?void 0:a.innerHeight,$viewport_width:null==a?void 0:a.innerWidth,$lib:y.LIB_NAME,$lib_version:y.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return y.SDK_DIST_CHANNEL&&($.$sdk_dist_channel=y.SDK_DIST_CHANNEL),$}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var v=this.sessionManager.checkAndGetSessionAndWindowId(r,i.getTime(),!0),f=v.windowId;l.$session_id=v.sessionId,l.$window_id=f}this.sessionPropsManager&&sc(l,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&sc(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=null==(n=this.Pa)?void 0:n.length}catch(e){l.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===ao&&(l.$lib_custom_api_host=this.config.api_host),d=e!==sn||r?e!==sa||r?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,s),l=sc(l,d),e===sn&&u&&(l.title=u.title),!ei(o)){var _=i.getTime()-o;l.$duration=parseFloat((_/1e3).toFixed(3))}g&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser");var m=this.persistence.properties(),b=this.sessionPersistence.properties();sh(["$referrer","$referring_domain"],e=>{e in m&&delete b[e]});var w={};if(this._a.length>0)for(var k of this._a.slice())try{sc(w,k())}catch(e){t6.error("Failed to produce browser extension event properties",e)}(l=sc({},p,m,b,x({},w,l))).$is_identified=this._isIdentified(),Q(this.config.property_denylist)?sh(this.config.property_denylist,function(e){delete l[e]}):t6.error(a$+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var E=this.config.sanitize_properties;E&&(t6.error(aC),l=E(l,e));var S=this.Qa();return l.$process_person_profile=S,S&&!r&&this.Ja("_calculate_event_properties"),l}Va(e,t,i){if(void 0===t&&(t=!0),void 0===i&&(i=!1),!this.persistence||!this.Qa()||this.ma&&!i)return e;var s,r=sc({},this.persistence.get_initial_props(),(null==(s=this.sessionPropsManager)?void 0:s.getSetOnceProps())||{},e||{}),n=this.config.sanitize_properties;return n&&(t6.error(aC),r=n(r,"$set_once")),t&&(this.ma=!0),et(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var s;null==(s=this.persistence)||s.register_once(e,t,i)}register_for_session(e){var t,i;null==(t=this.persistence)||t.syncCookieProperties(),this.Ga(),null==(i=this.sessionPersistence)||i.register(e),Object.keys(e).forEach(e=>this.ya.add(e)),this.Za()}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e),this.ya.delete(e),this.Za()}Ka(e,t){this.register({[e]:t})}Aa(){this.ya.forEach(e=>{var t;null==(t=this.sessionPersistence)||t.unregister(e)}),this.ya.clear(),this.Za()}Za(){var e;if(this.ba)if("memory"===this.config.persistence||null!=(e=this.sessionPersistence)&&e.ws||!sW.Lr())sW.Dr(this.ba);else{var t=[];this.ya.forEach(e=>t.push(e)),t.length>0?sW.Or(this.ba,t):sW.Dr(this.ba)}}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}getAllFeatureFlags(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.getAllFeatureFlags())?e:[]}isFeatureEnabled(e,t){var i,s;return null!=(i=null==(s=this.featureFlags)?void 0:s.isFeatureEnabled(e,t))?i:null==t?void 0:t.defaultValue}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var s;null==(s=this.featureFlags)||s.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var s;null==(s=this.featureFlags)||s.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var s;return void 0===t&&(t=!1),null==(s=this.featureFlags)?void 0:s.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.da.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:aF}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:aF})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:aF})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=a_),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:aF}}canRenderSurveyAsync(e,t){var i,s;return void 0===t&&(t=!1),null!=(i=null==(s=this.surveys)?void 0:s.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:aF})}Ya(e){return!e||er(e)?(t6.critical("Unique user id has not been set in posthog.identify"),!1):e===i2?(t6.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(t6.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,t,i){if(!this.__loaded||!this.persistence)return t6.uninitializedWarning("posthog.identify");if(eo(e)&&(e=e.toString(),t6.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Ya(e)&&this.Ja("posthog.identify")){var s=this.get_distinct_id(),r=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==s,n=this.Ga(!1),a=this.persistence.Ss(),o=!1;try{var l=this.get_distinct_id();this.register({$user_id:e}),this.get_property(ir)||this.register_once({$had_persisted_distinct_id:!0,$device_id:l},""),e!==l&&e!==this.get_property(io)&&(this.unregister(io),this.register({distinct_id:e}));var u,h=(this.persistence.get_property(iK)||se)===se,c=e!==l,d=!c&&h;if(c&&h)this.persistence.set_property(iK,st),this.setPersonPropertiesForFlags({$set:t||{},$set_once:i||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.Cs(),this.capture(so,{distinct_id:e,$anon_distinct_id:l},{$set:t||{},$set_once:i||{}}),this.Sa=as(e,t,i),null==(u=this.featureFlags)||u.setAnonymousDistinctId(l);else if(d){this.persistence.set_property(iK,st);var p=t||{},v=i||{};this.setPersonPropertiesForFlags({$set:p,$set_once:v},!1),this.config.cookieWinsOnConflict&&this.persistence.Cs(),this.capture("$set",{$set:p,$set_once:v}),this.Sa=as(e,t,i)}else(t||i)&&this.setPersonProperties(t,i);c||r||n?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(iU)):d&&(t||i)&&this.reloadFeatureFlags(),o=!0}finally{a&&this.persistence.Es(o)}}}setPersonProperties(e,t){if((e||t)&&this.Ja("posthog.setPersonProperties")){var i=as(this.get_distinct_id(),e,t);this.Sa!==i?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.Sa=i):t6.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var t,i=(Q(e)?e:[e]).filter(e=>es(e)&&e.length>0);0!==i.length&&this.Ja("posthog.unsetPersonProperties")&&(null==(t=this.featureFlags)||t.unsetPersonPropertiesForFlags(i,!0),this.capture("$set",{$unset:i}),this.Sa=null)}group(e,t,i){var s;if(e&&t){null==(s=this.persistence)||s.syncCookieProperties(),this.Ga();var r=this.getGroups(),n=r[e]!==t;if(n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:x({},r,{[e]:t})}),n||i){var a={$group_type:e,$group_key:t};i&&(a.$group_set=i),this.capture(sl,a)}i&&this.setGroupPropertiesForFlags({[e]:i}),n&&!i&&this.reloadFeatureFlags()}else t6.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(e){var t;void 0===e&&(e=!0),null==(t=this.featureFlags)||t.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.Ja("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){var t=eu(e)?e:null==e?void 0:e.resetDeviceID,i=eu(e)||null==e?void 0:e.bootstrap;this.Xa(t,!1,i)}Xa(e,t,i){if(void 0===t&&(t=!1),t6.info("reset"),!this.__loaded)return t6.uninitializedWarning("posthog.reset");var s,r,n,a,o,l,u,h,c,d,p,v,g,f,_,m,y,b,w=null==i?void 0:i.sessionID;this.config.bootstrap=i||(null==(s=this.Ta)?void 0:s.bootstrap)||{},null==(r=this.featureFlags)||null==r.updateConfig||r.updateConfig(this.config,this.Js());var k=this.get_property(ir),E=this.get_property(ia),S=this.get_property(iy),P=this.is_capturing();this.consent.reset(),t||!P||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");var O=null==(n=this.persistence)||null==n.Ss?void 0:n.Ss(),I=!1;try{if(null==(a=this.persistence)||a.clear(),null==(o=this.sessionPersistence)||o.clear(),this.ya.clear(),this.Za(),ei(S)||null==(f=this.persistence)||f.register({[iy]:S}),null==(l=this.surveys)||l.reset(),null==(u=this.za)||u.stop(),null==(h=this.featureFlags)||h.reset(),null==(c=this.conversations)||c.reset(),null==(d=this.logs)||d.reset(),null==(p=this.metrics)||p.reset(),null==(v=this.persistence)||v.set_property(iK,se),null==(g=this.sessionManager)||g.resetSessionId(),this.Sa=null,this.config.cookieless_mode===i7)this.register_once({distinct_id:i2,$device_id:null},"");else{var F=this.config.get_device_id(sI());this.register_once({distinct_id:F,$device_id:e?F:k},""),e||ei(E)||this.register({[ia]:E})}if(this.register({$last_posthog_reset:(new Date).toISOString()},1),i&&(void 0===i.distinctID||this.ga()||(null==(y=this.persistence)||y.set_property(iK,i.isIdentifiedID?st:se),this.register({distinct_id:i.distinctID})),null==(_=this.featureFlags)||_.initialize(),!(ei(w)||null!=(m=this.sessionManager)&&m.setBootstrapSessionId(w,!0)))){var C=x({},i);delete C.sessionID,this.config.bootstrap=C}delete this.config.identity_distinct_id,delete this.config.identity_hash,I=!0}finally{O&&(null==(b=this.persistence)||null==b.Es||b.Es(I))}this.reloadFeatureFlags()}shutdown(e){var t=this;return w(function*(){var e,i,s,r,n,a,o,l;if(t.__loaded){null==(e=t.za)||e.stop(),null==(i=t.ja)||i.dispose(),null==(s=t.sessionRecording)||s.dispose(),null==(r=t.logs)||r.flushLogs("sendBeacon"),null==(n=t.metrics)||n.flush("sendBeacon"),null==(a=t.Ia)||a.unload(),null==(o=t.Pa)||o.unload();try{null==(l=t.featureFlags)||l.destroy()}catch(e){t6.error("Error while destroying feature flags",e)}}else t6.uninitializedWarning("posthog.shutdown")})()}setIdentity(e,t){var i;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(i=this.conversations)||i.tl()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e.el()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=t.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t.sessionId);if(null!=e&&e.withTimestamp&&i){var r,n=null!=(r=e.timestampLookBack)?r:10;if(!i)return s;s+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return s}alias(e,t){return e===this.get_property(ii)?(t6.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ja("posthog.alias")?(ei(t)&&(t=this.get_distinct_id()),e!==t?(this.Ka(io,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(t6.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=x({},this.config);if(ee(e)){sc(this.config,aD(e));var i,s,r,n,a,o,l,u,h,c,d,p,v=this.Ea();null==(i=this.persistence)||i.update_config(this.config,t,v),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new r6(x({},this.config,{persistence:"sessionStorage"}),v,!1);var g=this.Ca(this.config.debug);eu(g)&&(this.config.debug=g),eu(this.config.debug)&&(this.config.debug?(y.DEBUG=!0,sR.Lr()&&sR.Or("ph_debug",!0),t6.info("set_config",{config:e,oldConfig:t,newConfig:x({},this.config)})):(y.DEBUG=!1,sR.Lr()&&sR.Dr("ph_debug"))),null==(s=this.featureFlags)||null==s.updateConfig||s.updateConfig(this.config,this.Js()),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(n=this.exceptions)||n.onConfigChange(),null==(a=this.sessionRecording)||a.startIfEnabledOrStop(),null==(o=this.tracingHeaders)||o.startIfEnabledOrStop(),null==(l=this.autocapture)||l.startIfEnabled(),null==(u=this.heatmaps)||u.startIfEnabled(),null==(h=this.exceptionObserver)||h.startIfEnabledOrStop(),null==(c=this.deadClicksAutocapture)||c.startIfEnabledOrStop(),null==(d=this.surveys)||d.loadIfEnabled(),this.il(),null==(p=this.externalIntegrations)||p.startIfEnabledOrStop()}}_overrideSDKInfo(e,t){y.LIB_NAME=e,y.LIB_VERSION=t}startSessionRecording(e){var t,i,s,r,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(s=this.sessionRecording)||s.overrideLinkedFlag()),o.url_trigger&&(null==(r=this.sessionRecording)||r.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var i=Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(x({},s,t))}}addExceptionStep(e,t){var i;null==(i=this.exceptions)||i.addExceptionStep(e,t)}captureLog(e){var t;null==(t=this.logs)||t.captureLog(e)}get logger(){var e,t;return null!=(e=null==(t=this.logs)?void 0:t.logger)?e:aj.rl}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:aM;return t!==aM&&(t=aM+"."+t),t}_isIdentified(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(iK))===st||(null==(t=this.sessionPersistence)?void 0:t.get_property(iK))===st}Qa(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===si&&!this._isIdentified()&&et(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[io])&&(null==(t=this.persistence)||null==(t=t.props)||!t[i1]))}Ua(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Qa()||this.Ja("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Ja("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Ja(e){return"never"===this.config.person_profiles?(t6.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ka(i1,!0),!0)}Ea(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==i9)}il(){var e,t,i,s,r=this.Ea();return(null==(e=this.persistence)?void 0:e.ws)!==r&&(null==(i=this.persistence)||i.set_disabled(r)),(null==(t=this.sessionPersistence)?void 0:t.ws)!==r&&(null==(s=this.sessionPersistence)||s.set_disabled(r)),r&&(this.ya.clear(),this.Za()),r}opt_in_capturing(e){var t;if(this.config.cookieless_mode!==i7){if(this.ga()){this.Xa(!0,!0),null==(r=this.sessionManager)||r.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=new n7(this),this.pageViewManager=new rF(this),this.persistence&&(this.sessionPropsManager=new n8(this,this.sessionManager,this.persistence));var i,s,r,n,a,o,l,u,h=null!=(a=null==(o=this.config.__extensionClasses)?void 0:o.sessionRecording)?a:null==(l=aj.__defaultExtensionClasses)?void 0:l.sessionRecording;h&&(this.sessionRecording=this.pa(this.sessionRecording,new h(this)),this.ha&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this.ha)))}this.consent.optInOut(!0),this.il(),this.Ba(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),this.config.cookieless_mode==i9&&(null==(i=this.surveys)||i.loadIfEnabled()),(ei(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(s=null==e?void 0:e.captureEventName)?s:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ha()}else t6.warn(aI)}opt_out_capturing(){var e,t,i;this.config.cookieless_mode!==i7?(this.config.cookieless_mode===i9&&this.consent.isOptedIn()&&this.Xa(!0,!0),this.consent.optInOut(!1),this.il(),this.config.cookieless_mode===i9&&(this.register({distinct_id:i2,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Ha(),this.Ba())):t6.warn(aI)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===i7||(this.config.cookieless_mode===i9?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.il()}_is_bot(){return l?ae(l,this.config.custom_blocked_useragents):void 0}Ha(){u&&("visible"===u.visibilityState?this.wa||(this.wa=!0,this.capture(sn,{title:u.title},{send_instantly:!0}),this.ka&&(u.removeEventListener(ss,this.ka),this.ka=null)):this.ka||(this.ka=this.Ha.bind(this),s_(u,ss,this.ka)))}debug(e){!1===e?(null==a||a.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==a||a.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Js(){var e,t,i,s,r=this.Ta||{};return"advanced_disable_flags"in r?!!r.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(t6.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in r&&!ea(r[e]),s=t in r&&!ea(r[t]),i?r[e]:!!s&&(t6&&t6.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),r[t]))}mn(e){if(ea(this.config.before_send))return e;var t,i=Object.keys(null!=(t=e.properties)?t:{}).filter(ec),s=Q(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var n of s)try{if(r=n(r),ea(r)){var a="Event '"+e.event+"' was rejected in beforeSend function";return eh(e.event)?t6.warn(a+". This can cause unexpected behavior."):t6.info(a),null}r.properties&&!et(r.properties)||t6.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}catch(t){return t6.error("Error in beforeSend function for event '"+e.event+"':",t),null}for(var o of i)if(r.properties&&ea(r.properties[o]))return t6.warn("Event '"+e.event+"' had its '"+o+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return r}getPageViewId(){var e;return null==(e=this.pageViewManager.Xn)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}Ca(e){var t=eu(e)&&!e,i=sR.Lr()&&"true"===sR.Fr("ph_debug");return!t&&(!!i||e)}}aj.__defaultExtensionClasses={},aj.rl={trace:r=()=>{},debug:r,info:r,warn:r,error:r,fatal:r},function(e,t){for(var i=0;t.length>i;i++)e.prototype[t[i]]=sv(e.prototype[t[i]])}(aj,["identify"]);class aq{constructor(e){this.disabled=!1===e;var t=ee(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(t-s.y)<this.thresholdPx&&this.timeoutMs>i-s.timestamp){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var aB="$copy_autocapture",aH=t8("[AutoCapture]");function az(e,t){return t.length>e?t.slice(0,e)+"...":t}var aV=t8("[ExceptionAutocapture]"),aU=()=>{},aG=t8("[TracingHeaders]"),aW=t8("[Web Vitals]"),aJ="disabled",aK="lazy_loading",aZ="awaiting_config",aY="missing_config";t8("[SessionRecording]"),t8("[SessionRecording]");var aQ="[SessionRecording]",aX=t8(aQ),a0=t8("[Heatmaps]");function a1(e){return ee(e)&&"clientX"in e&&"clientY"in e&&eo(e.clientX)&&eo(e.clientY)}var a2=t8("[Product Tours]"),a3=e=>{var t;return!e.config.disable_product_tours&&!(null==(t=e.persistence)||!t.get_property(i_))},a5=["$set_once","$set"],a6=t8("[SiteApps]"),a8="Error while initializing PostHog app with config id ";function a4(e,t,i){if(ea(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class a9{constructor(e){this.nl=new n4,this.sl=(e,t)=>this.ol(e,t)&&this.al(e,t)&&this.ll(e,t)&&this.ul(e,t),this.ol=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.hl=new Set,this.dl=new Set}init(){var e,t;ei(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!ei(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e=>{var t,i;null==(t=this.dl)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.hl)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var s,r=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&r.add(null==e?void 0:e.selector)})}),null==(s=this._instance)||s.autocapture.setElementSelectors(r)}}on(e,t){var i;null!=t&&0!=e.length&&(this.hl.has(e)||this.hl.has(t.event))&&this.dl&&(null==(i=this.dl)?void 0:i.size)>0&&this.dl.forEach(e=>{this.vl(t,e)&&this.nl.emit("actionCaptured",e.name)})}cl(e){this.onAction("actionCaptured",t=>e(t))}vl(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.sl(e,i))return!0;return!1}onAction(e,t){return this.nl.on(e,t)}al(e,t){if(null!=t&&t.url){var i,s=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!s||"string"!=typeof s||!a4(s,t.url,t.url_matching||"contains"))return!1}return!0}ll(e,t){return!!this.fl(e,t)&&!!this.pl(e,t)&&!!this.gl(e,t)}fl(e,t){if(null==t||!t.href)return!0;var i=this.ml(e);if(i.length>0)return i.some(e=>a4(e.href,t.href,t.href_matching||"exact"));var s,r,n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!n&&a4((r=n.match(/(?::|")href="(.*?)"/))?r[1]:"",t.href,t.href_matching||"exact")}pl(e,t){if(null==t||!t.text)return!0;var i=this.ml(e);if(i.length>0)return i.some(e=>a4(e.text,t.text,t.text_matching||"exact")||a4(e.$el_text,t.text,t.text_matching||"exact"));var s,r,n,a,o=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";return!!o&&(r=function(e){for(var t,i=[],s=/(?::|")text="(.*?)"/g;!ea(t=s.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(o),n=t.text,a=t.text_matching||"exact",r.some(e=>a4(e,n,a)))}gl(e,t){if(null==t||!t.selector)return!0;var i,s,r=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=r&&r.includes(t.selector))return!0;var n=(null==e||null==(s=e.properties)?void 0:s.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}ml(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}ul(e,t){return null==t||!t.properties||0===t.properties.length||aa(t.properties.reduce((e,t)=>{var i=Q(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class a7{constructor(e){var t;this.yl=[],this._instance=e,this.bl=new Map,this._l=new Map,this.wl=new Map,null==(t=this._instance)||null==t.onSessionId||t.onSessionId(e=>this.kl(e))}xl(e){return!1}Sl(){return null}Cl(e){}Tl(){}Ml(e,t){return!!e&&aa(e.propertyFilters,null==t?void 0:t.properties)}El(e,t){var i=new Map;return e.forEach(e=>{var s;null==(s=e.conditions)||null==(s=s[t])||null==(s=s.values)||s.forEach(t=>{if(null!=t&&t.name){var s=i.get(t.name)||[];s.push(e.id),i.set(t.name,s)}})}),i}Il(e,t,i){var s=(i===r7?this.bl:this._l).get(e),r=[];return this.Rl(e=>{r=e.filter(e=>null==s?void 0:s.includes(e.id))}),r.filter(s=>{var r,n=null==(r=s.conditions)||null==(r=r[i])||null==(r=r.values)?void 0:r.find(t=>t.name===e);return this.Ml(n,t)})}register(e){var t;ei(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.Pl(e),this.Al(e))}Al(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.Fl&&(this.Fl=new a9(this._instance),this.Fl.init(),this.Fl.cl(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,s,r,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)?void 0:s.length)>0&&(null==(r=this.Fl)||r.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.wl.get(t.name);i&&i.push(e.id),this.wl.set(t.name,i||[e.id])}}))}))}Pl(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),s=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});0===i.length&&0===s.length||(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.bl=this.El(e,r7),this._l=this.El(e,ne))}onEvent(e,t){var i,s,r=this.Ol(),n=(null==t||null==(i=t.properties)?void 0:i.$survey_id)||(null==t||null==(s=t.properties)?void 0:s.$product_tour_id);if(n&&this.getActivatedIds().includes(n)){var a=this.Ll(e,n);if("consume"===a)return r.info("event consumed activated item, removing it",{event:e,itemId:n}),void this.$l([n]);if("persist"===a)return r.info("shown item promoted to persisted activation",{event:e,itemId:n}),this.Dl(n),void this.Nl([n])}if(this._l.has(e)){var o=this.Il(e,t,ne);o.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:o.map(e=>e.id)}),this.$l(o.map(e=>e.id)),o.forEach(e=>this.ql(e.id)))}if(this.bl.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.bl.get(e)});var l=this.Il(e,t,r7);this.jl(l.map(e=>e.id))}}onAction(e){this.wl.has(e)&&this.jl(this.wl.get(e)||[])}jl(e){var t;if(0!==e.length){var i=!(null==(t=this._instance)||null==t.get_session_id||!t.get_session_id()),s=[];for(var r of e)i&&this.xl(r)?this.Dl(r)&&this.Bl(r):s.push(r);s.length>0&&(this.yl=[...new Set([...this.yl,...s])]),this.Ol().info("updating activated items",{activatedItems:this.getActivatedIds()})}}Dl(e){this.yl=this.yl.filter(t=>t!==e);var t=this.Hl();return!t.includes(e)&&(this.zl([...t,e]),this.Ul(),!0)}$l(e){var t=new Set(e);this.yl=this.yl.filter(e=>!t.has(e));var i=this.Wl(),s=i.filter(e=>!t.has(e));s.length!==i.length&&(this.zl(s),0===s.length&&this.Vl()),this.Nl(e)}Gl(){var e,t=this.Sl();if(!t)return{};var i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t];return i&&"object"==typeof i?i:{}}Bl(e){if(this.Sl()){var t=this.Gl();this.Cl(x({},t,{[e]:Date.now()}))}}Nl(e){if(this.Sl()){var t=this.Gl(),i={},s=!1;for(var r of Object.entries(t)){var n=r[0],a=r[1];e.includes(n)?s=!0:i[n]=a}s&&(et(i)?this.Tl():this.Cl(i))}}Zl(){this.Sl()&&this.Tl()}getActivationTimestamp(e){if(this.Hl().includes(e)){var t=this.Gl()[e];return eo(t)?t:void 0}}Wl(){var e,t=this.Ql();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}Hl(){var e,t,i=this.Wl();if(0===i.length)return[];var s=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[this.Jl()],r=null==(t=this._instance)||null==t.get_session_id?void 0:t.get_session_id();return r&&s===r?i:[]}Ul(){var e,t=null==(e=this._instance)||null==e.get_session_id?void 0:e.get_session_id();t&&this.Kl(t)}Vl(){this.Yl()}kl(e){var t,i=null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[this.Jl()];if(i&&i!==e){var s=this.Wl(),r=this.Gl();s.length>0&&(this.zl([]),s.filter(e=>eo(r[e])).forEach(e=>this.ql(e))),this.Vl(),this.Zl()}}getActivatedIds(){return[...new Set([...this.Hl(),...this.yl])].filter(e=>!this.Xl(e))}reset(){this.yl=[],this.Wl().length>0&&this.zl([]),this.Vl(),this.Zl()}getEventToItemsMap(){return this.bl}tu(){return this.Fl}}class oe extends a7{constructor(e){super(e)}Ql(){return iB}Jl(){return iH}Sl(){return iz}Cl(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[iz]:e})}Tl(){var e;null==(e=this._instance)||null==(e=e.persistence)||e.unregister(iz)}xl(e){this.Rl(t=>{i=t.find(t=>t.id===e)});var t,i,s=null==(t=i)||null==(t=t.appearance)?void 0:t.surveyPopupDelaySeconds;return eo(s)&&s>0}eu(){return nt}Rl(e){var t;null==(t=this._instance)||t.getSurveys(e)}ql(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}Ol(){return ap}zl(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[iB]:e})}Kl(e){var t;null==(t=this._instance)||null==(t=t.persistence)||t.register({[iH]:e})}Yl(){var e;null==(e=this._instance)||null==(e=e.persistence)||e.unregister(iH)}Xl(){return!1}Ll(e,t){var i,s,r;return this.Rl(e=>{r=e.find(e=>e.id===t)}),!r||ad(i=r)&&!(null==(s=i.conditions)||null==(s=s.events)||!s.repeatedActivation)||"always"===i.schedule?e===nt?"consume":"ignore":e===nt?"persist":e===ni||e===ns?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var ot="SDK is not enabled or survey functionality is not yet loaded",oi="Disabled. Not loading surveys.",os=null!=a&&a.location?rN(a.location.hash,"__posthog")||rN(location.hash,"state"):null,or="_postHogToolbarParams",on=t8("[Toolbar]"),oa=t8("[FeatureFlags]");class oo{constructor(e,t){void 0===t&&(t=!1),this.iu=!1,this.update(e,t)}update(e,t){var i,s,r,n;this.ru={bootstrap:{featureFlags:null==(i=e.bootstrap)?void 0:i.featureFlags,featureFlagPayloads:null==(s=e.bootstrap)?void 0:s.featureFlagPayloads},remoteRequestsDisabled:t,featureFlagsDisabled:!!e.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!e.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!e.advanced_feature_flags_dedup_per_session,cacheTtlMs:e.feature_flag_cache_ttl_ms,requestTimeoutMs:e.feature_flag_request_timeout_ms,compression:e.disable_compression?"none":"base64",evaluationContexts:null!=(r=null!=(n=e.evaluation_contexts)?n:e.evaluation_environments)?r:[],flagKeys:Q(e.flag_keys)?e.flag_keys:void 0},!e.evaluation_environments||e.evaluation_contexts||this.iu||(oa.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.iu=!0),ei(e.flag_keys)||Q(e.flag_keys)||oa.error("Invalid flag_keys found:",e.flag_keys,"Expected array of non-empty strings")}get(){return this.ru}}var ol=t8("[FeatureFlags]"),ou=t8("[FeatureFlags]",{debugEnabled:!0}),oh="\" failed. Feature flags didn't load in time.",oc="connection_error",od=e=>{for(var t={},i=0;e.length>i;i++)t[e[i]]=!0;return t},op=e=>{var t={};for(var i of sd(e||{})){var s=i[1];s&&(t[i[0]]=s)}return t},ov=t8("[Error tracking]"),og=["chrome-extension://","moz-extension://","safari-extension:","safari-web-extension:"],of="Refusing to render web experiment since the viewer is a likely bot",o_={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>-1===t.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>ai(t,e),not_regex:(e,t)=>!ai(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e};class om{get Oi(){return this._instance.config}constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{om.nu("retrieved web experiments from the server"),t.su=new Map,e.forEach(e=>{if(e.feature_flag_key){t.su&&(om.nu("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.su)||i.set(e.feature_flag_key,e));var i,s=t._instance.getFeatureFlag(e.feature_flag_key);es(s)&&e.variants[s]&&t.ou(e.name,s,e.variants[s].transforms)}else if(e.variants)for(var r in e.variants){var n=e.variants[r];om.au(n,t._instance)&&t.ou(e.name,r,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())om.nu(of);else if(!this.Oi.disable_web_experiments){if(ea(this.su))return this.su=new Map,this.loadIfEnabled(),void this.previewWebExperiment();om.nu("applying feature flags",e),e.forEach(e=>{var t;if(this.su&&null!=(t=this.su)&&t.has(e)){var i,s=this._instance.getFeatureFlag(e),r=null==(i=this.su)?void 0:i.get(e);s&&null!=r&&r.variants[s]&&this.ou(r.name,s,r.variants[s].transforms)}})}}previewWebExperiment(){var e=om.getWindowLocation();if(null!=e&&e.search){var t=rL(null==e?void 0:e.search,"__experiment_id"),i=rL(null==e?void 0:e.search,"__experiment_variant");t&&i&&(om.nu("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.lu(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this.Oi.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this.Oi.disable_web_experiments&&!i)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!t)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Oi.token),method:"GET",timestampMode:"query",callback:t=>e(200===t.statusCode&&t.json&&t.json.experiments||[])})}lu(e,t,i){var s=i.filter(t=>t.id===e);s&&s.length>0&&(om.nu("Previewing web experiment ["+s[0].name+"] with variant ["+t+"]"),this.ou(s[0].name,t,s[0].variants[t].transforms))}static au(e,t){return!ea(e.conditions)&&om.uu(e,t)&&om.hu(e)}static uu(e,t){if(ea(e.conditions)||ea(null==(s=e.conditions)?void 0:s.url))return!0;var i=om.getWindowLocation();if(i){var s,r,n,a,o=sK(t,i.href);return null==(r=e.conditions)||!r.url||o_[null!=(n=null==(a=e.conditions)?void 0:a.urlMatchType)?n:"icontains"](e.conditions.url,o)}return!1}static getWindowLocation(){return null==a?void 0:a.location}static hu(e){if(ea(e.conditions)||ea(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rG();if(t.utm_source){var i,s,r,n,a,o,l,u,h,c=null==(s=e.conditions)||null==(s=s.utm)||!s.utm_campaign||(null==(r=e.conditions)||null==(r=r.utm)?void 0:r.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,v=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(h=e.conditions)||null==(h=h.utm)?void 0:h.utm_term)==t.utm_term;return c&&p&&v&&d}return!1}static nu(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];t6.info("[WebExperiments] "+e,i)}ou(e,t,i){this._is_bot()?om.nu(of):"control"!==t?i.forEach(i=>{if(i.selector){om.nu("applying transform of variant "+t+" for experiment "+e+" ",i);var s,r=null==(s=document)?void 0:s.querySelectorAll(i.selector);null==r||r.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):om.nu("Control variants leave the page unmodified.")}_is_bot(){return l&&this._instance?ae(l,this.Oi.custom_blocked_useragents):void 0}}var oy=t8("[Conversations]"),ob="Conversations not available yet.",ow="console",ox="__posthogHandledLogsRequestError",ok=(e,t)=>{var i=e instanceof Error?e:Error(t);return i[ox]=!0,i},oE=e=>!!e&&"object"==typeof e&&!0===e[ox],oS={featureFlags:class{constructor(e){this.name="featureFlags",this.du=!1,this.featureFlagEventHandlers=[],this.I=ol,this.vu={},this.cu={},this.fu=[],this.pu=!1,this.gu=!1,this.mu=0,this.yu=!1,this.bu=!1,this._u=!1,this.wu=!1,this.ku=0,this.Tt=()=>{var e=this.xu();this.ku=0,e&&this.reloadFeatureFlags()},"get"in e?this.Su=e:(this.Cu=new oo(e.config,e.Js()),this.Su=this.Cu)}updateConfig(e,t){var i;null==(i=this.Cu)||i.update(e,t)}setup(e){var t,i;return this.Tu=e,this.I=e.logger.createLogger("[FeatureFlags]"),i=()=>{this.Tu===e&&(this.Tu=void 0,this.sa=e,this.Mu(e))},null!=(t=e.kv.initialize())&&t.then?t.then(i):i()}Mu(e){if(this.sa===e)return a&&s_(a,"online",this.Tt),this.Eu=e.registerDynamicEventProperties(()=>this.Iu()?this.vu:this.cu),this.Ru(),this.initialize()}destroy(){null==a||a.removeEventListener("online",this.Tt)}dispose(){var e;this.mu++,this.bu=!1,this.Tu=void 0,this.sa&&(this.Pu(),null==(e=this.Eu)||e.dispose(),this.Eu=void 0,this.fu=[],null==a||a.removeEventListener("online",this.Tt),this.sa=void 0)}get Oi(){return this.Su.get()}Au(e){var t;return null==(t=this.sa)?void 0:t.kv.get(e)}Or(e){this.Fu(()=>{var t;return null==(t=this.sa)?void 0:t.kv.set(e)})}Dr(e){this.Fu(()=>{var t;return null==(t=this.sa)?void 0:t.kv.remove(e)})}Fu(e){try{e()}catch(e){this.I.error("Failed to update feature flag persistence",e)}}Ru(){var e={};for(var t of[iI,i$,iT,iR]){var i=this.Au(t);ei(i)||(e[t]=i)}this.vu=e;var s=x({},e),r=this.Au(iO);if(r)for(var n of Object.entries(r))s["$feature/"+n[0]]=n[1];this.cu=s}Iu(){var e=this.Oi.cacheTtlMs;if(!e||0>=e)return!1;var t=this.Au(iJ);return"number"!=typeof t||Date.now()-t>e}Ou(){return!!this.Iu()&&(this.wu||this.gu||(this.wu=!0,this.I.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Lu(){var e=this.Oi.evaluationContexts;return null!=e&&e.length?e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||this.I.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}$u(){var e=this.Oi.flagKeys;if(!ei(e))return e.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||this.I.error("Invalid flag key found:",e,"Expected non-empty string"),t})}initialize(){var e,t,i=this.Oi,s=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(s).length){var r,n,a=null!=(r=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?r:{},o=Object.keys(s).filter(e=>!!s[e]).reduce((e,t)=>(e[t]=s[t]||!1,e),{}),l=Object.keys(a).filter(e=>o[e]).reduce((e,t)=>(e[t]=a[t],e),{});return this.Du({featureFlags:o,featureFlagPayloads:l})}}updateFlags(e,t,i){var s,r,n=null!=i&&i.merge&&null!=(s=this.Au(iO))?s:{},a=null!=i&&i.merge&&null!=(r=this.Au(i$))?r:{},o=x({},n,e),l=x({},a,t),u={};for(var h of Object.entries(o)){var c=h[0],d=h[1];u[c]={key:c,enabled:S(d),variant:P(d),reason:void 0,metadata:ei(null==l?void 0:l[c])?void 0:{id:0,version:void 0,description:void 0,payload:l[c]}}}this.Du({flags:u})}get hasLoadedFlags(){return this.pu}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.Au(iC),t=this.Au(iR),i=this.Au(iA);if(!i&&!t)return e||{};var s=sc({},e||{});for(var r of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=s[r],l=null==t?void 0:t[r],u=ei(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,h=ei(l)?null==o?void 0:o.variant:"string"==typeof l?l:void 0,c=null==i?void 0:i[r],d=x({},o,{enabled:u,variant:u?null!=h?h:null==o?void 0:o.variant:void 0});u!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),h!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),c&&(d.metadata=x({},null==o?void 0:o.metadata,{payload:c,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),s[r]=d}return this.du||(this.I.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:s}),this.du=!0),s}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(i=>{var s=e[i];return{key:i,enabled:S(s),variant:P(s),payload:E(t[i])}})}getFlagVariants(){var e=this.Au(iO),t=this.Au(iR);if(!t)return e||{};for(var i=sc({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.du||(this.I.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.du=!0),i}getFlagPayloads(){var e=this.Au(i$),t=this.Au(iA);if(!t)return e||{};for(var i=sc({},e||{}),s=Object.keys(t),r=0;s.length>r;r++)i[s[r]]=t[s[r]];return this.du||(this.I.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.du=!0),i}reloadFeatureFlags(){this.yu||this.Oi.featureFlagsDisabled||this.xu()||this.Nu||(this.fu.slice().forEach(e=>{try{e()}catch(e){this.I.error("Error while running feature flags reloading callback",e)}}),this.Nu=setTimeout(()=>{this.qu()},5))}Pu(){clearTimeout(this.Nu),this.Nu=void 0}onReloading(e){return this.fu.push(e),()=>{this.fu=this.fu.filter(t=>t!==e)}}ensureFlagsLoaded(){this.pu||this.gu||this.Nu||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.yu=e}resetFlagCallReported(){this.Dr(iU)}qu(e){this.Pu();var t=this.sa;if(t&&!this.Oi.remoteRequestsDisabled&&!this.xu())if(this.gu)this.bu=!0;else{var i={token:t.projectToken,distinct_id:t.distinctId,groups:t.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:x({},t.initialPersonProperties,this.Au(iL)||{},{$lib:t.library.name,$lib_version:t.library.version}),group_properties:this.Au(iD),timezone:r0()};ei(t.deviceId)||(i.$device_id=t.deviceId),(null!=e&&e.disableFlags||this.Oi.featureFlagsDisabled)&&(i.disable_flags=!0);var s=this.Lu();s.length&&(i.evaluation_contexts=s);var r=this.$u();ei(r)||(i.flag_keys=r);var n=this.Oi.onlyEvaluateSurveyFeatureFlags,a=this.mu;this.gu=!0;var o=()=>{this.bu&&(this.bu=!1,this.qu())},l=e=>{this.gu=!1,a===this.mu&&(this.Or({[iW]:[oc]}),this.I.error("Feature flag request failed",e)),o()};try{t.sendRequest("/flags/?v=2"+(n?"&only_evaluate_survey_feature_flags=true":""),{target:"flags",method:"POST",body:i,compression:"base64"===this.Oi.compression?r9:void 0,sentAt:"body",timeoutMs:this.Oi.requestTimeoutMs}).then(e=>{var t,s,r=null!=(t=e.json)?t:{},l=200!==e.statusCode;if(this.gu=!1,a===this.mu){if(this.ju(e.statusCode),l||this.bu||(this.$anon_distinct_id=void 0),!i.disable_flags||this.bu){this._u=!l;var u=[];e.error?u.push(e.error instanceof Error&&"AbortError"===e.error.name?"timeout":e.error instanceof Error?oc:"unknown_error"):200!==e.statusCode&&u.push("api_error_"+e.statusCode),r.errorsWhileComputingFlags&&u.push("errors_while_computing_flags");var h=!(null==(s=r.quotaLimited)||!s.includes("feature_flags"));h&&u.push("quota_limited"),this.Or({[iW]:u}),h?this.I.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):i.disable_flags||this.Du(r,l,{partialResponse:n}),o()}}else o()}).catch(l)}catch(e){l(e)}}}xu(){return rj(this.ku,3)}ju(e){this.ku=rq(e,this.ku,3,()=>this.I.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes."))}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this._u)if(this.pu||this.getFlags()&&this.getFlags().length>0){if(!this.Ou()){var s=this.getFeatureFlagResult(e,t);return null!=(i=null==s?void 0:s.variant)?i:null==s?void 0:s.enabled}}else this.I.warn('getFeatureFlag for key "'+e+oh)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this._u)if(this.pu||this.getFlags()&&this.getFlags().length>0){if(!this.Ou()){var i,s=this.getFlagVariants(),r=e in s,n=s[e],a=this.getFlagPayloads()[e],o=String(n),l=this.Au(iT)||void 0,u=this.Au(iJ)||void 0,h=this.Au(iU)||{};if(this.Oi.deduplicateCallsPerSession){var c,d=null==(c=this.sa)?void 0:c.session.sessionId,p=this.Au(iG);d&&d!==p&&(h={},i=d)}if(!t.send_event&&"send_event"in t)i&&this.Or({[iU]:h,[iG]:i});else if(e in h&&h[e].includes(o))i&&this.Or({[iU]:h,[iG]:i});else{Q(h[e])?h[e].push(o):h[e]=[o],this.Or(x({[iU]:h},i?{[iG]:i}:{}));var v=this.getFeatureFlagDetails(e),g=[...null!=(_=this.Au(iW))?_:[]];ei(n)&&g.push("flag_missing");var f={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:null!=a?a:null,$feature_flag_request_id:l,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:null!=(m=null==(y=this.Oi.bootstrap)||null==(y=y.featureFlags)?void 0:y[e])?m:null,$feature_flag_bootstrapped_payload:null!=(b=null==(w=this.Oi.bootstrap)||null==(w=w.featureFlagPayloads)?void 0:w[e])?b:null,$used_bootstrap_value:!this._u};ei(null==v||null==(k=v.metadata)?void 0:k.has_experiment)||(f.$feature_flag_has_experiment=v.metadata.has_experiment),ei(null==v||null==(S=v.metadata)?void 0:S.version)||(f.$feature_flag_version=v.metadata.version);var _,m,y,b,w,k,S,P,O,I,F,C,$,T=null!=(P=null==v||null==(O=v.reason)?void 0:O.description)?P:null==v||null==(I=v.reason)?void 0:I.code;T&&(f.$feature_flag_reason=T),null!=v&&null!=(F=v.metadata)&&F.id&&(f.$feature_flag_id=v.metadata.id),ei(null==v?void 0:v.original_variant)&&ei(null==v?void 0:v.original_enabled)||(f.$feature_flag_original_response=ei(v.original_variant)?v.original_enabled:v.original_variant),null!=v&&null!=(C=v.metadata)&&C.original_payload&&(f.$feature_flag_original_payload=null==v||null==($=v.metadata)?void 0:$.original_payload),g.length&&(f.$feature_flag_error=g.join(",")),this.Bu(f)}if(r)return{key:e,enabled:!!n,variant:"string"==typeof n?n:void 0,payload:E(a)}}}else this.I.warn('getFeatureFlagResult for key "'+e+oh)}Bu(e){try{var t;null==(t=this.sa)||t.capture("$feature_flag_called",e).catch(e=>{this.I.error("Failed to capture feature flag call",e)})}catch(e){this.I.error("Failed to capture feature flag call",e)}}getRemoteConfigPayload(e,t){this.Hu(e,t)}Hu(e,t){var i=this;return w(function*(){var s=i.sa;if(s){var r={distinct_id:s.distinctId,token:s.projectToken,person_properties:{$lib:s.library.name,$lib_version:s.library.version}},n=i.Lu();n.length&&(r.evaluation_contexts=n);var a,o=i.$u();ei(o)||(r.flag_keys=o);try{var l,u=null==(l=(yield s.sendRequest("/flags/?v=2",{target:"flags",method:"POST",body:r,compression:"base64"===i.Oi.compression?r9:void 0,sentAt:"body",timeoutMs:i.Oi.requestTimeoutMs})).json)?void 0:l.featureFlagPayloads;a=(null==u?void 0:u[e])||void 0}catch(e){return void i.I.error("Remote config feature flag request failed",e)}try{t(a)}catch(e){i.I.error("Remote config feature flag callback failed",e)}}})()}isFeatureEnabled(e,t){if(void 0===t&&(t={}),t.fresh&&!this._u)return t.defaultValue;if(!(this.pu||this.getFlags()&&this.getFlags().length>0))return this.I.warn('isFeatureEnabled for key "'+e+oh),t.defaultValue;var i=this.getFeatureFlag(e,t);return ei(i)?t.defaultValue:!!i}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,i){this.Du(e,t,i)}Du(e,t,i){if(this.sa){this.pu=!0;var s=function(e,t,i,s,r,n){void 0===t&&(t={}),void 0===i&&(i={}),void 0===s&&(s={}),void 0===n&&(n=ol);var a,o,l=(a=n,(o=e.flags)?x({},e,{featureFlags:Object.fromEntries(Object.keys(o).map(e=>{var t;return[e,null!=(t=o[e].variant)?t:o[e].enabled]})),featureFlagPayloads:Object.fromEntries(Object.keys(o).filter(e=>o[e].enabled).filter(e=>{var t;return null==(t=o[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=o[e].metadata)?void 0:t.payload]}))}):(e.featureFlags&&a.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e)),u=l.flags,h=l.featureFlags,c=l.featureFlagPayloads;if(h){var d=e.requestId,p=e.evaluatedAt;if(Q(h)){n.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var v={};if(h)for(var g=0;h.length>g;g++)v[h[g]]=!0;return{[iI]:h,[iO]:v,[iM]:!1}}var f=h,_=c,m=u;if(null!=r&&r.partialResponse)f=x({},t,f),_=x({},i,_),m=x({},s,m);else if(e.errorsWhileComputingFlags)if(u){var y=new Set(Object.keys(u).filter(e=>{var t;return!(null!=(t=u[e])&&t.failed)}));f=x({},t,Object.fromEntries(Object.entries(f).filter(e=>y.has(e[0])))),_=x({},i,Object.fromEntries(Object.entries(_||{}).filter(e=>y.has(e[0])))),m=x({},s,Object.fromEntries(Object.entries(m||{}).filter(e=>y.has(e[0]))))}else f=x({},t,f),_=x({},i,_),m=x({},s,m);return x({[iI]:Object.keys(op(f)),[iO]:f||{},[i$]:_||{},[iC]:m||{},[iM]:!0===e.minimalFlagCalledEvents},d?{[iT]:d}:{},p?{[iJ]:p}:{})}}(e,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),i,this.I);s&&this.Or(s),t||(this.wu=!1),this.zu(t)}}override(e,t){void 0===t&&(t=!1),this.I.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){this.Uu(e)}Uu(e){if(this.sa){if(!1===e)return this.Dr([iR,iA]),this.zu(),void ou.info("All overrides cleared");if(Q(e))return this.Or({[iR]:od(e)}),this.zu(),void ou.info("Flag overrides set",{flags:e});if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){this.du=!!(null!=(t=e.suppressWarning)&&t);var t,i={},s=e.flags,r=e.payloads;return s&&(i[iR]=Q(s)?od(s):s),r&&(i[iA]=r),Object.keys(i).length&&this.Or(i),!1===s&&!1===r?this.Dr([iR,iA]):!1===s?this.Dr(iR):!1===r&&this.Dr(iA),this.zu(),!1===s?ou.info("Flag overrides cleared"):s&&ou.info("Flag overrides set",{flags:s}),void(!1===r?ou.info("Payload overrides cleared"):r&&ou.info("Payload overrides set",{payloads:r}))}if(e&&"object"==typeof e)return this.Or({[iR]:e}),this.zu(),void ou.info("Flag overrides set",{flags:e});this.I.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}else this.I.warn("posthog.featureFlags.overrideFeatureFlags called before feature flags were ready")}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.pu){var t=this.Wu(),i=t.flags,s=t.flagVariants;try{e(i,s)}catch(e){this.I.error("Error while running feature flags callback",e)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var s,r=(this.Au(iF)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};r&&(a.$early_access_feature_name=r.name),i&&(a.$feature_enrollment_stage=i);var o=x({},this.getFlagVariants(),{[e]:t});this.Or({[iI]:Object.keys(op(o)),[iO]:o,[iL]:x({},this.Au(iL)||{},n)}),this.zu();try{null==(s=this.sa)||s.capture("$feature_enrollment_update",a).catch(e=>{this.I.error("Failed to capture early access feature enrollment",e)})}catch(e){this.I.error("Failed to capture early access feature enrollment",e)}}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var s=this.Au(iF);!s||t?this.Vu(e,i):e(s)}Vu(e,t){var i=this;return w(function*(){var s=i.sa;if(s){var r,n=t?"&"+t.map(e=>"stage="+e).join("&"):"";try{var a=yield s.sendRequest("/api/early_access_features/?token="+s.projectToken+n,{target:"api",method:"GET",sentAt:"query"});if(!a.json)return;i.Or({[iF]:r=a.json.earlyAccessFeatures})}catch(e){return void i.I.error("Early access feature request failed",e)}try{e(r)}catch(e){i.I.error("Early access feature callback failed",e)}}})()}Wu(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}zu(e){this.Ru();var t=this.Wu(),i=t.flags,s=t.flagVariants;this.featureFlagEventHandlers.forEach(t=>{try{t(i,s,{errorsLoading:e})}catch(e){this.I.error("Error while running feature flags callback",e)}})}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0),this.Gu(e,t)}Gu(e,t){void 0===t&&(t=!0);var i=this.Au(iL)||{},s=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),r=null==e?void 0:e.$set_once,n={};if(r)for(var a in r)({}).hasOwnProperty.call(r,a)&&(a in i||(n[a]=r[a]));this.Or({[iL]:x({},i,n,s)}),t&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=x({},this.Au(iL)||{});e.forEach(e=>{delete i[e]}),this.Or({[iL]:i}),t&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){void 0===e&&(e=!0),this.Dr(iL),e&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this.Au(iD)||{},s=x({},i);for(var r of Object.keys(e))s[r]=x({},i[r],e[r]);this.Or({[iD]:s}),t&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.Au(iD)||{};this.Or({[iD]:x({},t,{[e]:{}})})}else this.Dr(iD)}reset(){this.mu++,this.bu=!1,this.vu={},this.cu={},this.pu=!1,this.yu=!1,this._u=!1,this.$anon_distinct_id=void 0,this.Pu(),this.du=!1,this.ku=0}}},oP=x({productTours:class{get Co(){return this._instance.persistence}constructor(e){this.ld=null,this.ud=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(e.ok){var t,i,s=e.config;if("productTours"in s){if(this.Co&&this.Co.register({[i_]:!!s.productTours}),!a3(this._instance))return!this.ld&&ea(null==(t=this.Co)?void 0:t.props[iV])||a2.info("product tours disabled; stopping and clearing cached tours"),null==(i=this.ld)||i.stop(),this.ld=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.ld&&a3(this._instance)&&this.Jn(()=>this.hd())}Jn(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?a2.error("Could not load product tours script",t):e()})}hd(){var e;!this.ld&&null!=(e=m.__PosthogExtensions__)&&e.generateProductTours&&(this.ld=m.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!Q(this.ud)||t){var i=this.Co;if(i){var s=i.props[iV];if(Q(s)&&!t)return this.ud=s,void e(s,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",timestampMode:"query",callback:t=>{if(a3(this._instance)){var s=t.statusCode;if(200!==s||!t.json){var r="Product Tours API could not be loaded, status: "+s;return 0===s?t.error||a2.warn(r):a2.error(r),void e([],{isLoaded:!1,error:r})}var n=Q(t.json.product_tours)?t.json.product_tours:[];this.ud=n,i&&i.register({[iV]:n}),e(n,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.ud,{isLoaded:!0})}getActiveProductTours(e){ea(this.ld)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.ld.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.ld)||t.showTourById(e)}previewTour(e){this.ld?this.ld.previewTour(e):this.Jn(()=>{var t;this.hd(),null==(t=this.ld)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.ld)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.ld)||e.nextStep()}previousStep(){var e;null==(e=this.ld)||e.previousStep()}clearCache(){var e;this.ud=null,null==(e=this.Co)||e.unregister(iV)}resetTour(e){var t;null==(t=this.ld)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.ld)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.ld)||t.cancelPendingTour(e)}}},oS),oO=x({surveys:class{get Oi(){return this._instance.config}constructor(e){this.Ed=void 0,this._surveyManager=null,this.Id=!1,this.Rd=[],this.Pd=null,this.Ad=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Oi.disable_surveys){if(!e.ok)return ap.warn("Remote config unavailable. Not loading surveys.");var t=e.config.surveys;if(ea(t))return ap.warn("Flags not loaded yet. Not loading surveys.");var i=Q(t);this.Ed=i?t.length>0:t,ap.info("flags response received, isSurveysEnabled: "+this.Ed),this.loadIfEnabled()}}reset(){try{var e;null==(e=this._surveyEventReceiver)||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var t=[],i=0;i<localStorage.length;i++){var s=localStorage.key(i);(null!=s&&s.startsWith(av)||null!=s&&s.startsWith("inProgressSurvey_"))&&t.push(s)}t.forEach(e=>localStorage.removeItem(e))}catch(e){}}loadIfEnabled(){if(!this._surveyManager)if(this.Id)ap.info("Already initializing surveys, skipping...");else if(this.Oi.disable_surveys)ap.info(oi);else if(this.Oi.cookieless_mode&&this._instance.consent.isOptedOut())ap.info("Not loading surveys in cookieless mode without consent.");else{var e=null==m?void 0:m.__PosthogExtensions__;if(e){if(!ei(this.Ed)||this.Oi.advanced_enable_surveys){var t=this.Ed||this.Oi.advanced_enable_surveys;this.Id=!0;try{var i=e.generateSurveys;if(i)return void this.Fd(i,t);var s=e.loadExternalDependency;if(!s)return void this.Od(i4);s(this._instance,"surveys",i=>{i||!e.generateSurveys?this.Od("Could not load surveys script",i):this.Fd(e.generateSurveys,t)})}catch(e){throw this.Od("Error initializing surveys",e),e}finally{this.Id=!1}}}else ap.error("PostHog Extensions not found.")}}Fd(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new oe(this._instance),ap.info("Surveys loaded successfully"),this.Ld({isLoaded:!0})}Od(e,t){ap.error(e,t),this.Ld({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Rd.push(e),this._surveyManager&&this.Ld({isLoaded:!0}),()=>{this.Rd=this.Rd.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this.Oi.disable_surveys)return ap.info(oi),e([]);var i,s=this._instance.get_property(ij);s&&!t?(e(s,{isLoaded:!0}),this.$d()&&this.getSurveys(()=>{},!0)):"u">typeof Promise&&this.Pd?this.Pd.then(t=>e(t.surveys,t.context)):("u">typeof Promise&&(this.Pd=new Promise(e=>{i=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Oi.token),method:"GET",timestampMode:"query",timeout:this.Oi.surveys_request_timeout_ms,callback:t=>{this.Pd=null;var s=t.statusCode;if(200!==s||!t.json){var r="Surveys API could not be loaded, status: "+s;0!==s?ap.error(r):t.error||ap.warn(r),this.Ad=Date.now();var n={isLoaded:!1,error:r};return e([],n),void(null==i||i({surveys:[],context:n}))}this.Ad=null;var a,o,l=t.json.surveys||[],u=l.filter(e=>{var t;return!(!e.start_date||e.end_date)&&(ad(e)||!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length))});u.length>0&&(null==(o=this._surveyEventReceiver)||o.register(u)),null==(a=this._instance.persistence)||a.register({[ij]:l,[iq]:Date.now()});var h={isLoaded:!0};e(l,h),null==i||i({surveys:l,context:h})}}))}$d(){return this.Dd()&&!this.Pd&&!this.Nd()}Dd(){var e=this._instance.get_property(iq);return eo(e)&&Date.now()-e>3e5}Nd(){return eo(this.Ad)&&3e5>Date.now()-this.Ad}markSurveyAsSeen(e,t){var i;ag({id:e,current_iteration:null!=(i=null==t?void 0:t.iteration)?i:null});try{localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())}catch(e){}}Ld(e){for(var t of this.Rd)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(e){ap.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!ea(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);ap.warn("init was not called")}qd(e){var t=null;return this.getSurveys(i=>{var s;t=null!=(s=i.find(t=>t.id===e))?s:null}),t}jd(e){if(ea(this._surveyManager))return{eligible:!1,reason:ot};var t="string"==typeof e?this.qd(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}Bd(e){if(ea(this._surveyManager))return{eligible:!1,reason:ot};var t="string"==typeof e?this.qd(e):e;return t?this._surveyManager.checkSurveyRenderability(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(ea(this._surveyManager))return ap.warn("init was not called"),{visible:!1,disabledReason:ot};var t=this.Bd(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return ea(this._surveyManager)?(ap.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:ot})):new Promise(i=>{this.getSurveys(t=>{var s,r=null!=(s=t.find(t=>t.id===e))?s:null;if(r){var n=this.Bd(r);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var s;if(ea(this._surveyManager))ap.warn("init was not called");else{var r="string"==typeof e?this.qd(e):e;if(null!=r&&r.id)if(af.includes(r.type)){var n=null==u?void 0:u.querySelector(t);if(n)return null!=(s=r.appearance)&&s.surveyPopupDelaySeconds?(ap.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;ap.info("Rendering survey "+r.id+" with delay of "+(null==(e=r.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(r,n,i),ap.info("Survey "+r.id+" rendered")},1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,n,i);ap.warn("Survey element not found")}else ap.warn("Surveys of type "+r.type+" cannot be rendered in the app");else ap.warn("Survey not found")}}displaySurvey(e,t){var i;if(ea(this._surveyManager))ap.warn("init was not called");else{var s=this.qd(e);if(s){var r=s;if(null!=(i=s.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=x({},s,{appearance:x({},s.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==nr&&t.initialResponses&&ap.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.jd(s);if(!n.eligible)return void ap.warn("Survey is not eligible to be displayed: ",n.reason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else ap.warn("Survey not found")}}cancelPendingSurvey(e){ea(this._surveyManager)?ap.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||null==e.handlePageUnload||e.handlePageUnload()}}},oS),oI=x({experiments:om},oS),oF=x({},oS,{sessionRecording:class{get Oi(){return this._instance.config}get Co(){return this._instance.persistence}get started(){var e;return!(null==(e=this.Zu)||!e.isStarted)}get status(){var e,t;return this.Qu===aZ||this.Qu===aY?this.Qu:null!=(e=null==(t=this.Zu)?void 0:t.status)?e:this.Qu}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Qu=aJ,this.Ju=void 0,this.Ku=!1,this.kt=(()=>{if(null==u||!u.visibilityState||"visible"===u.visibilityState)return!0;var e,t=null==a||null==(e=a.performance)||null==e.getEntriesByType?void 0:e.getEntriesByType("visibility-state");return!(null!=t&&t.length)||t.some(e=>"visible"===e.name)})(),this.It=()=>{var e;"visible"===(null==u?void 0:u.visibilityState)&&(this.kt=!0,null==(e=this.Zu)||null==e.setDocumentWasEverVisible||e.setDocumentWasEverVisible(!0))},this._instance=e,!this._instance.sessionManager)throw aX.error("started without valid sessionManager"),Error(aQ+" started without valid sessionManager. This is a bug.");if(this.Oi.cookieless_mode===i7)throw Error(aQ+' cannot be used with cookieless_mode="always"');null!=u&&u.addEventListener&&s_(u,"visibilitychange",this.It)}initialize(){this.startIfEnabledOrStop()}dispose(){this.Ku=!0,null==u||null==u.removeEventListener||u.removeEventListener("visibilitychange",this.It),this.stopRecording()}get Yu(){var e,t=!(null==(e=this._instance.get_property(iy))||!e.enabled),i=!this.Oi.disable_session_recording,s=this.Oi.disable_session_recording||this._instance.consent.isOptedOut();return a&&t&&i&&!s}startIfEnabledOrStop(e){var t;if(!(this.Ku||this.Yu&&null!=(t=this.Zu)&&t.isStarted)){var i=!ei(Object.assign)&&!ei(Array.from);this.Yu&&i?(this.Xu(e),aX.info("starting")):(this.Qu=aJ,this.stopRecording())}}Xu(e){var t,i,s;this.Yu&&(this.Qu!==aZ&&this.Qu!==aY&&(this.Qu=aK),null!=m&&null!=(t=m.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=m.__PosthogExtensions__)&&i.initSessionRecording?this.th(e):null==(s=m.__PosthogExtensions__)||null==s.loadExternalDependency||s.loadExternalDependency(this._instance,this.eh,t=>{if(t)return this._instance.register_for_session({[i8]:!0}),aX.error("could not load recorder",t);this.th(e)}))}stopRecording(){var e,t;null==(e=this.Ju)||e.call(this),this.Ju=void 0,null==(t=this.Zu)||t.stop()}ih(){var e,t;null==(e=this.Ju)||e.call(this),this.Ju=void 0,null==(t=this.Zu)||t.discard()}rh(){var e,t;null==(e=this.Co)||e.unregister(iP),null==(t=this.Co)||t.unregister(ib)}nh(e,t){if(ea(e))return null;var i=eo(e)?e:parseFloat(e);return"number"!=typeof i||!Number.isFinite(i)||0>i||i>1?(aX.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):i}sh(e){if(this.Co){var t,i,s=this.Co,r=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,r=this.nh(null==(t=this.Oi.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.nh(null==i?void 0:i.sampleRate,"remote config sampleRate"),a=null!=r?r:n;ea(a)&&this.rh();var o=null==i?void 0:i.minimumDurationMilliseconds;s.register({[iy]:x({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:x({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:ei(o)?null:o,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers,version:null==i?void 0:i.version,triggerGroups:null==i?void 0:i.triggerGroups})})};r(),null==(t=this.Ju)||t.call(this),this.Ju=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(r)}}onRemoteConfig(e){var t=e.ok?e.config:void 0;return t&&"sessionRecording"in t?!1===t.sessionRecording?(this.sh(t),void this.ih()):(this.sh(t),void this.startIfEnabledOrStop()):(this.Qu===aZ&&(this.Qu=aY,aX.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.Zu)&&i.log?this.Zu.log(e,t):aX.warn("log called before recorder was ready")}get eh(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(iy);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}oh(){var e,t=this._instance.get_property(iy);if(!t)return!1;try{e="object"==typeof t?t:JSON.parse(t)}catch(e){return aX.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}return!ea(e.cache_timestamp)&&36e5>=Date.now()-e.cache_timestamp}th(e){var t,i,s,r;if(!this.Ku){if(null==(t=m.__PosthogExtensions__)||!t.initSessionRecording)return aX.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[i8]:!0});if(this.Zu||(this.Zu=null==(r=m.__PosthogExtensions__)?void 0:r.initSessionRecording(this._instance,this.kt),this.Zu._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.oh()){if(this.Qu===aY||this.Qu===aZ)return;return this.Qu=aZ,aX.info("persisted remote config is stale, requesting fresh config before starting"),void new nl(this._instance).load()}this.Qu=aK,null==(i=(s=this.Zu).setDocumentWasEverVisible)||i.call(s,this.kt),this.Zu.start(e)}}onRRwebEmit(e){var t;null==(t=this.Zu)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Zu||null==(t=this.Co)||t.register({[ix]:!0}),null==(e=this.Zu)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Zu||null==(t=this.Co)||t.register({[iw]:!0}),null==(e=this.Zu)||e.overrideSampling()}overrideTrigger(e){var t,i;this.Zu||null==(i=this.Co)||i.register({["url"===e?ik:iE]:!0}),null==(t=this.Zu)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.Zu)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.Zu)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.ah=!1,this.lh=null,this.uh=!1,this.hh=!1,this.instance=e,this.rageclicks=new aq(e.config.rageclick),this.dh=null}initialize(){this.startIfEnabled()}get Oi(){var e,t,i=ee(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}fh(){if(this.isBrowserSupported()){if(a&&u){var e=e=>{e=e||(null==a?void 0:a.event);try{this.ph(e)}catch(e){aH.error("Failed to capture event",e)}};if(s_(u,"submit",e,{capture:!0}),s_(u,"change",e,{capture:!0}),s_(u,"click",e,{capture:!0}),this.Oi.capture_copied_text){var t=e=>{e=e||(null==a?void 0:a.event);try{this.ph(e,aB)}catch(e){aH.error("Failed to capture copy/cut event",e)}};s_(u,"copy",t,{capture:!0}),s_(u,"cut",t,{capture:!0})}}}else aH.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.ah&&(this.fh(),this.ah=!0)}onRemoteConfig(e){if(this.uh=!0,e.ok){var t=e.config;t.elementsChainAsString&&(this.hh=t.elementsChainAsString);var i=t.autocapture_opt_out;eu(i)&&(this.instance.persistence&&this.instance.persistence.register({[iu]:i}),this.lh=i),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(e){this.dh=e}getElementSelectors(e){var t,i=[];return null==(t=this.dh)||t.forEach(t=>{var s=null==u?void 0:u.querySelectorAll(t);null==s||s.forEach(s=>{e===s&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[iu],s=this.lh,r=this.instance.Js()&&!this.uh;if(en(s)&&!eu(i)&&!r)return!1;var n=null!=(t=this.lh)?t:!!i;return!!this.instance.config.autocapture&&!n}ph(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,s=s4(e);s0(s)&&(s=s.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&ro(s,this.instance.config.rageclick)&&this.ph(e,"$rageclick");var r=t===aB;if(s&&function(e,t,i,s,r,n){if(!a||rl(e)||null!=i&&i.url_allowlist&&!s3(i.url_allowlist,n)||null!=i&&i.url_ignorelist&&s3(i.url_ignorelist,n))return!1;if(null!=i&&i.dom_event_allowlist){var o,l=i.dom_event_allowlist;if(l&&!l.some(e=>t.type===e))return!1}var u=ru(e,s),h=u.parentIsUsefulElement,c=u.targetElementList;if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(ei(i))return!0;var s,r=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(s=r(n))return s.v;return!1}(c,i)||!s7(c,null==i?void 0:i.css_selector_allowlist)||s7(c,null!=(o=null==i?void 0:i.css_selector_ignorelist)?o:rt))return!1;try{var d=a.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0}catch(e){}var p=e.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(r||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(r||["change","click"]).indexOf(t.type)>=0;default:return h?(r||["click"]).indexOf(t.type)>=0:(r||["click"]).indexOf(t.type)>=0&&(s9.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(s,e,this.Oi,r,r?["copy","cut"]:void 0,this.instance)){var n=function(e,t){var i,s,r=t.e,n=t.maskAllElementAttributes,o=t.maskAllText,l=t.elementAttributeIgnoreList,u=t.elementsChainAsString,h=t.disableCaptureUrlHashes;if(!sQ(e))return{props:{}};for(var c=[e],d=new Set([e]),p=e;p.parentNode&&!sX(p,"body")&&1e3>c.length;)if(s1(p.parentNode)){var v=p.parentNode.host;if(d.has(v))break;d.add(v),c.push(v),p=v}else{if(!sQ(p.parentNode)||d.has(p.parentNode))break;d.add(p.parentNode),c.push(p.parentNode),p=p.parentNode}var g,f=[],_={},m=!1,y=!1;if(sh(c,e=>{var t=rh(e);if(sX(e,"a")){var i=e.getAttribute("href");m=!!(t&&i&&rm(i))&&(h?tf(i):i)}U(s5(e),"ph-no-capture")&&(y=!0),f.push(function(e,t,i,s,r){void 0===r&&(r=!1);var n=e.tagName.toLowerCase(),a={tag_name:n};s9.indexOf(n)>-1&&!i&&(a.$el_text="a"===n.toLowerCase()||"button"===n.toLowerCase()?az(1024,ry(e)):az(1024,s8(e)));var o=s5(e);o.length>0&&(a.classes=o.filter(function(e){return""!==e})),sh(e.attributes,function(i){var n;if((!rc(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==s||!s.includes(i.name))&&!t&&rm(i.value)&&(!es(n=i.name)||"_ngcontent"!==n.substring(0,10)&&"_nghost"!==n.substring(0,7))){var o=i.value;"class"===i.name&&(o=s2(o).join(" ")),a["attr__"+i.name]=az(1024,"href"===i.name&&r?tf(o):o)}});for(var l=1,u=1,h=e;h=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!sQ(t));return t}(h);)l++,h.tagName===e.tagName&&u++;return a.nth_child=l,a.nth_of_type=u,a}(e,n,o,l,h)),sc(_,function(e){if(!rh(e))return{};var t={};return sh(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),s=e.value;i&&s&&rm(s)&&(t[i]=s)}}),t}(e))}),y)return{props:{},explicitNoCapture:y};if(o||(f[0].$el_text=sX(e,"a")||sX(e,"button")?ry(e):s8(e)),m){f[0].attr__href=m;var b,w,k=null==(b=rA(m))?void 0:b.host,E=null==a||null==(w=a.location)?void 0:w.host;k&&E&&k!==E&&(g=m)}return{props:sc({$event_type:r.type,$ce_version:1},u?{}:{$elements:f},{$elements_chain:f.map(e=>{var t,i,s={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(i=e.attr__href)?void 0:i.slice(0,2048),attr_class:function(e){var t=e.attr__class;if(t)return Q(t)?t:s2(t)}(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return sd(e).filter(e=>0===e[0].indexOf("attr__")).forEach(e=>s.attributes[e[0]]=e[1]),s}).map(e=>{var t,i,s="";if(e.tag_name&&(s+=e.tag_name),e.attr_class)for(var r of(e.attr_class.sort(),e.attr_class))s+="."+r.replace(/"/g,"");var n=x({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return sd(n).sort((e,t)=>e[0].localeCompare(t[0])).forEach(e=>{var t=e[1];return a[rb(e[0].toString())]=rb(t.toString())}),(s+=":")+sd(a).map(e=>e[0]+'="'+e[1]+'"').join("")}).join(";")},null!=(i=f[0])&&i.$el_text?{$el_text:null==(s=f[0])?void 0:s.$el_text}:{},g&&"click"===r.type?{$external_click_url:g}:{},_)}}(s,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Oi.element_attribute_ignorelist,elementsChainAsString:this.hh,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),o=n.props;if(n.explicitNoCapture)return!1;var l=this.getElementSelectors(s);if(l&&l.length>0&&(o.$element_selectors=l),t===aB){var u,h=s6(null==a||null==(u=a.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!h)return!1;o.$selected_content=h,o.$copy_type=c}return this.instance.capture(t,o),!0}}}isBrowserSupported(){return X(null==u?void 0:u.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.gh=(null==a||null==(t=a.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(t6.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.mh&&this.mh(),this.mh=void 0,t6.info("History API monitoring stopped")}monitorHistoryChanges(){a&&a.history&&(this.yh("pushState"),this.yh("replaceState"),this.bh())}yh(e){var t;if(a&&(null==(t=a.history[e])||!t.__posthog_wrapped__)){var i=this;!function(e,t,i){try{if(!(t in e))return aU;var s={next:e[t]},r=i(function(){for(var e=arguments.length,t=Array(e),i=0;e>i;i++)t[i]=arguments[i];return s.next.apply(this,t)});X(r)&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:s}})),e[t]=r}catch(e){return aU}}(a.history,e,t=>function(s,r,n){t.call(this,s,r,n),i._h(e)})}}_h(e){try{var t,i=null==a||null==(t=a.location)?void 0:t.pathname;if(!i)return;i!==this.gh&&this.isEnabled&&this._instance.capture(sn,{navigation_type:e}),this.gh=i}catch(t){t6.error("Error capturing "+e+" pageview",t)}}bh(){if(!this.mh){var e=()=>{this._h("popstate")};s_(a,"popstate",e),this.mh=()=>{a&&a.removeEventListener("popstate",e)}}}},heatmaps:class{get Oi(){return this.instance.config}constructor(e){var t;this.wh=!1,this.ah=!1,this.kh=null,this.instance=e,this.wh=!(null==(t=this.instance.persistence)||!t.props[ih]),this.rageclicks=new aq(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return ee(this.Oi.capture_heatmaps)&&this.Oi.capture_heatmaps.flush_interval_milliseconds&&(e=this.Oi.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return ea(this.Oi.capture_heatmaps)?ea(this.Oi.enable_heatmaps)?this.wh:this.Oi.enable_heatmaps:!1!==this.Oi.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.ah||(a0.info("starting..."),this.xh(),this.It());else{var e;clearInterval(null!=(e=this.kh)?e:void 0),this.Sh(),this.getAndClearBuffer()}}onRemoteConfig(e){if(e.ok){var t=e.config;if("heatmaps"in t){var i=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ih]:i}),this.wh=i,this.startIfEnabled()}}}getAndClearBuffer(){var e=this.ft;return this.ft=void 0,e}Ch(e){a1(e.originalEvent)&&this.mi(e.originalEvent,"deadclick")}It(){this.kh&&clearInterval(this.kh),this.kh="visible"===(null==u?void 0:u.visibilityState)?setInterval(this.fo.bind(this),this.flushIntervalMilliseconds):null}xh(){a&&u&&(this.Th=this.fo.bind(this),s_(a,sr,this.Th),this.Mh=e=>this.mi(e||(null==a?void 0:a.event)),s_(u,"click",this.Mh,{capture:!0}),this.Eh=e=>this.Ih(e||(null==a?void 0:a.event)),s_(u,"mousemove",this.Eh,{capture:!0}),this.Rh=new rE(this.instance,rx,this.Ch.bind(this)),this.Rh.startIfEnabledOrStop(),this.Ph=this.It.bind(this),s_(u,ss,this.Ph),this.ah=!0)}Sh(){var e;a&&u&&(this.Th&&a.removeEventListener(sr,this.Th),this.Mh&&u.removeEventListener("click",this.Mh,{capture:!0}),this.Eh&&u.removeEventListener("mousemove",this.Eh,{capture:!0}),this.Ph&&u.removeEventListener(ss,this.Ph),clearTimeout(this.Ah),null==(e=this.Rh)||e.stop(),this.ah=!1)}Fh(e,t){var i=this.instance.scrollManager.scrollY(),s=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),n=function(e,t,i){for(var s=e;s&&sQ(s)&&!sX(s,"body")&&s!==i;){var r,n,o,l=void 0;try{l=null==(r=null!=(n=null==(o=s.ownerDocument)?void 0:o.defaultView)?n:a)?void 0:r.getComputedStyle(s).position}catch(e){break}if(U(t,l))return!0;s=re(s)}return!1}(s4(e),["fixed","sticky"],r);return{x:e.clientX+(n?0:s),y:e.clientY+(n?0:i),target_fixed:n,type:t}}mi(e,t){var i;if(void 0===t&&(t="click"),!sY(e.target)&&a1(e)){var s=this.Fh(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&ro(s4(e),this.instance.config.rageclick)&&this.Fn(x({},s,{type:"rageclick"})),this.Fn(s)}}Ih(e){!sY(e.target)&&a1(e)&&(clearTimeout(this.Ah),this.Ah=setTimeout(()=>{this.Fn(this.Fh(e,"mousemove"))},500))}Fn(e){if(a){var t=this.Oi.disable_capture_url_hashes?tf(a.location.href):a.location.href,i=this.Oi.custom_personal_data_properties,s=rD(t,this.Oi.mask_personal_data_properties?[...rH,...i||[]]:[],rV);this.ft=this.ft||{},this.ft[s]||(this.ft[s]=[]),this.ft[s].push(e)}}fo(){this.ft&&!et(this.ft)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:rE,webVitalsAutocapture:class{constructor(e){var t;this.wh=!1,this.ah=!1,this.ft={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Oh=()=>{clearTimeout(this.Lh),this.Lh=void 0,0!==this.ft.metrics.length&&(this._instance.capture("$web_vitals",x({$current_url:this.ft.url},this.ft.metrics.reduce((e,t)=>x({},e,{["$web_vitals_"+t.name+"_event"]:x({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{}))),this.ft={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.$h=e=>{var t;if(this.ft=this.ft||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},ea(null==e?void 0:e.name)||ea(null==e?void 0:e.value))aW.error("Invalid metric received",e);else{var i="string"==typeof e.navigationURL?e.navigationURL:void 0,s=this.Dh(i);if(!ei(s)){var r=eo(e.navigationId)||"string"==typeof e.navigationId?"navigation:"+e.navigationId:"url:"+s;if(!this.Nh||this.Nh>e.value){this.ft.navigationKey!==r&&(this.Oh(),this.Lh=setTimeout(this.Oh,this.flushToCaptureTimeoutMs)),ei(this.ft.navigationKey)&&(this.ft.navigationKey=r,this.ft.url=s),this.ft.firstMetricTimestamp=ei(this.ft.firstMetricTimestamp)?Date.now():this.ft.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var n=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),a=x({},e,i?{navigationURL:s}:{},{$current_url:s,timestamp:Date.now()});ei(n)||(a.$session_id=n.sessionId,a.$window_id=n.windowId),this.ft.metrics.push(a),this.ft.metrics.length===this.allowedMetrics.length&&this.Oh()}else aW.error("Ignoring metric with value >= "+this.Nh,e)}}},this.qh=()=>{if(!this.ah){var e,t,i,s,r=m.__PosthogExtensions__,n=null==r?void 0:r.postHogWebVitalsCallbacksByFlavor,a=(null==n?void 0:n[this.jh])||("web-vitals"===this.jh&&ei(n)?null==r?void 0:r.postHogWebVitalsCallbacks:void 0);if(ei(a)||(e=a.onLCP,t=a.onCLS,i=a.onFCP,s=a.onINP),e&&t&&i&&s){var o={reportSoftNavs:this.useSoftNavs};this.allowedMetrics.indexOf("LCP")>-1&&e(this.$h.bind(this),o),this.allowedMetrics.indexOf("CLS")>-1&&t(this.$h.bind(this),o),this.allowedMetrics.indexOf("FCP")>-1&&i(this.$h.bind(this),o),this.allowedMetrics.indexOf("INP")>-1&&s(this.$h.bind(this),o),this.ah=!0}else aW.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.wh=!(null==(t=this._instance.persistence)||!t.props[iv]),this.startIfEnabled()}get Bh(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,i=ee(this.Bh)?null==(e=this.Bh)?void 0:e.web_vitals_allowed_metrics:void 0;return ea(i)?(null==(t=this._instance.persistence)?void 0:t.props[im])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(ee(this.Bh)?this.Bh.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=ee(this.Bh)?this.Bh.web_vitals_attribution:void 0;return null!=e&&e}get useSoftNavs(){var e=ee(this.Bh)?this.Bh.__preview_web_vitals_soft_navs:void 0;return null!=e&&e}get Nh(){var e=ee(this.Bh)&&eo(this.Bh.__web_vitals_max_value)?this.Bh.__web_vitals_max_value:9e5;return e>0&&6e4>=e?9e5:e}get isEnabled(){var e=null==h?void 0:h.protocol;if("http:"!==e&&"https:"!==e)return aW.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=ee(this.Bh)?this.Bh.web_vitals:eu(this.Bh)?this.Bh:void 0;return eu(t)?t:this.wh}startIfEnabled(){this.isEnabled&&!this.ah&&(aW.info("enabled, starting..."),this.Jn(this.qh))}onRemoteConfig(e){if(e.ok){var t=e.config;if("capturePerformance"in t){var i=ee(t.capturePerformance)&&!!t.capturePerformance.web_vitals,s=ee(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[iv]:i}),this._instance.persistence.register({[im]:s})),this.wh=i,this.startIfEnabled()}}}get jh(){return this.useSoftNavs?this.useAttribution?"web-vitals-with-attribution-soft-navs":"web-vitals-soft-navs":this.useAttribution?"web-vitals-with-attribution":"web-vitals"}Jn(e){var t=m.__PosthogExtensions__,i=this.jh,s=null==t?void 0:t.postHogWebVitalsCallbacksByFlavor;null!=s&&s[i]||"web-vitals"===i&&ei(s)&&null!=t&&t.postHogWebVitalsCallbacks?e():null==t||null==t.loadExternalDependency||t.loadExternalDependency(this._instance,i,t=>{t?aW.error("failed to load script",t):e()})}Dh(e){var t=e||(null==a?void 0:a.location.href);if(t){var i=this._instance.config.disable_capture_url_hashes?tf(t):t,s=this._instance.config.custom_personal_data_properties;return rD(i,this._instance.config.mask_personal_data_properties?[...rH,...s||[]]:[],rV)}aW.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t;this.qh=()=>{var e;if(a&&this.isEnabled&&null!=(e=m.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=m.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=m.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,s=m.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Hh&&this.Oi.capture_unhandled_errors&&(this.Hh=t(this.captureException.bind(this))),!this.zh&&this.Oi.capture_unhandled_rejections&&(this.zh=i(this.captureException.bind(this))),!this.Uh&&this.Oi.capture_console_errors&&(this.Uh=s(this.captureException.bind(this)))}catch(e){aV.error("failed to start",e),this.Wh()}}},this._instance=e,this.Vh=!(null==(t=this._instance.persistence)||!t.props[ic]),this.oe=new eb(x({},function(e){var t,i,s,r;return void 0===e&&(e={}),{refillRate:null!=(t=null!=(i=e.exceptionRateLimiterRefillRate)?i:e.__exceptionRateLimiterRefillRate)?t:1,bucketSize:null!=(s=null!=(r=e.exceptionRateLimiterBucketSize)?r:e.__exceptionRateLimiterBucketSize)?s:10}}(this._instance.config.error_tracking),{refillInterval:1e4,I:aV})),this.Oi=this.Gh(),this.startIfEnabledOrStop()}Gh(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return ee(e)?t=x({},t,e):(ei(e)?this.Vh:e)&&(t=x({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Oi.capture_console_errors||this.Oi.capture_unhandled_errors||this.Oi.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(aV.info("enabled"),this.Wh(),this.Jn(this.qh)):this.Wh()}Jn(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.errorWrappingFunctions?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return aV.error("failed to load script",t);e()})}Wh(){var e,t,i;null==(e=this.Hh)||e.call(this),this.Hh=void 0,null==(t=this.zh)||t.call(this),this.zh=void 0,null==(i=this.Uh)||i.call(this),this.Uh=void 0}onRemoteConfig(e){if(e.ok){var t=e.config;"autocaptureExceptions"in t&&(this.Vh=!!t.autocaptureExceptions,this._instance.persistence&&this._instance.persistence.register({[ic]:this.Vh}),this.Oi=this.Gh(),this.startIfEnabledOrStop())}}onConfigChange(){this.Oi=this.Gh()}captureException(e){var t,i,s,r=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.oe.consumeRateLimit(r)?aV.info("Skipping exception capture because of client rate limiting.",{exception:r}):null==(s=this._instance.exceptions)||s.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.Zh=[],this.Qh=new tC([new tB,new tY,new tz,new tH,new tK,new tJ,new tU,new tZ],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),s=1;t>s;s++)i[s-1]=arguments[s];return function(t,s){void 0===s&&(s=0);for(var r=[],n=t.split("\n"),a=s;n.length>a;a++){var o=n[a];if(1024>=o.length){var l=tq.test(o)?o.replace(tq,"$1"):o;if(!l.match(/\S*Error: /)){for(var u of i){var h=u(l,e);if(h){r.push(h);break}}if(r.length>=50)break}}}if(!r.length)return[];var c=Array.from(r);return c.reverse(),c.slice(0,50).map(e=>x({},e,{filename:e.filename||(c[c.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tL,tj)),this._instance=e,this.Zh=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(id))?t:[],this.Jh=t2(this.Kh()),this.Yh=new t3(this.Jh)}onConfigChange(){this.Jh=t2(this.Kh()),this.Yh.setConfig(this.Jh)}onRemoteConfig(e){var t,i,s;if(e.ok){var r=e.config;if("errorTracking"in r){var n=null!=(t=null==(i=r.errorTracking)?void 0:i.suppressionRules)?t:[],a=null==(s=r.errorTracking)?void 0:s.captureExtensionExceptions;this.Zh=n,this._instance.persistence&&this._instance.persistence.register({[id]:this.Zh,[ip]:a})}}}get Xh(){var e,t=!!this._instance.get_property(ip),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Qh.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}addExceptionStep(e,t){if(this.Jh.enabled)try{if(!es(e)||0===e.trim().length)return void ov.warn("Ignoring exception step because message must be a non-empty string");var i=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((i,s)=>(t0.has(s)?t.push(s):i[s]=e[s],i),{}),droppedKeys:t}}(this.td(t)),s=i.sanitizedProperties,r=i.droppedKeys;r.length>0&&ov.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.Yh.add(x({[tQ]:e,[tX]:(new Date).toISOString()},s))}catch(e){ov.error("Failed to add exception step. Ignoring breadcrumb.",e)}}sendExceptionEvent(e){var t;try{var i=e.$exception_list;if(this.ed(i)){if(this.rd(i))return this.nd("Exception dropped: matched a suppression rule"),void ov.info("Skipping exception capture because a suppression rule matched");if(!this.Xh&&this.sd(i))return this.nd("Exception dropped: thrown by a browser extension"),void ov.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.od(i))return this.nd("Exception dropped: thrown by the PostHog SDK"),void ov.info("Skipping exception capture because it was thrown by the PostHog SDK")}var s=this.Jh.enabled&&ea(e.$exception_steps)?this.ad(e):e,r="string"==typeof(t=globalThis._posthogReleaseId)&&t.length>0?t:void 0;r&&(s.$release_id=r);try{var n=this._instance.capture("$exception",s,{_noTruncate:!0,_batchKey:"exceptionEvent",Wa:!0});return n&&this.Yh.clear(),n}catch(e){return ov.error("Failed to capture exception event. Dropping this exception.",e),void this.Yh.clear()}}catch(e){return void ov.error("Failed to process exception event. Ignoring this exception.",e)}}ad(e){try{var t=this.Yh.getAttachable();return 0===t.length?e:x({},e,{$exception_steps:t})}catch(t){return ov.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}}nd(e){this.Jh.enabled&&this.Yh.add({[tQ]:e,[tX]:(new Date).toISOString()})}td(e){return ee(e)?x({},e):{}}Kh(){var e,t;return null!=(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)?e:{}}rd(e){if(0===e.length)return!1;try{var t=e.reduce((e,t)=>{var i=t.type,s=t.value;return es(i)&&i.length>0&&e.$exception_types.push(i),es(s)&&s.length>0&&e.$exception_values.push(s),e},{$exception_types:[],$exception_values:[]});return this.Zh.some(e=>{var i=e.values.map(e=>{var i=ar[e.operator],s=t[e.key];if(!i||!s)return!1;var r=Q(e.value)?e.value:[e.value];return r.length>0&&i(r,s)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}catch(e){return ov.warn("Failed to evaluate suppression rules. Capturing the exception.",e),!1}}sd(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>{var t=e.filename;return!!t&&og.some(e=>t.startsWith(e))})}od(e){if(e.length>0){var t,i,s,r,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(s=null==a||null==(r=a.filename)?void 0:r.includes("posthog.com/static"))&&s}return!1}ed(e){return!ea(e)&&Q(e)}}},oP,{siteApps:class{constructor(e){this.dd=0,this._instance=e,this.vd=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}fd(e,t){if(t){var i=this.globalsForEvent(t);this.vd.push(i),this.vd.length>1e3&&(this.vd=this.vd.slice(10))}}get siteAppLoaders(){var e;return null==(e=m._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.fd.bind(this));this.pd=()=>{e(),this.vd=[],this.pd=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,s,r,n,a,o,l={},u=this._instance.get_property("$groups")||[];for(var h of Object.entries(this._instance.get_property("$stored_group_properties")||{})){var c=h[0];l[c]={id:u[c],type:c,properties:h[1]}}var d=e.$set_once,p=e.$set;return{event:x({},k(e,a5),{properties:x({},e.properties,p?{$set:x({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:x({},null!=(s=null==(r=e.properties)?void 0:r.$set_once)?s:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}gd(e){var t,i=null==(t=e.tagName)?void 0:t.toLowerCase();return"style"===i&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(a6.error("prepare_external_dependency_stylesheet returned null"),null):"script"===i&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(a6.error("prepare_external_dependency_script returned null"),null):e}md(){if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var e,t,i,s,r,n,a,o,l=null==u?void 0:u.defaultView,h=null==l||null==(e=l.Node)?void 0:e.prototype;if(!l||!h)return()=>{};if(this.dd++,this.yd)return this.bd();var c=[],d=this,p=new WeakSet,v=(e,t,i)=>{if(null!=e&&e[t]){var s=e[t];e[t]=i(s),c.push(()=>{e[t]=s})}},g=e=>{if(p.has(e))return e;var t=d.gd(e);return t&&p.add(t),t},f=e=>e.map(e=>"string"==typeof e?e:g(e)).filter(e=>!en(e));return v(h,"appendChild",e=>function(t){var i=g(t);return i?e.call(this,i):t}),v(h,"insertBefore",e=>function(t,i){var s=g(t);return s?e.call(this,s,i):t}),v(h,"replaceChild",e=>function(t,i){var s=g(t);return s?e.call(this,s,i):i}),[null==(t=l.Element)?void 0:t.prototype,null==(i=l.Document)?void 0:i.prototype,null==(s=l.DocumentFragment)?void 0:s.prototype].forEach(e=>{v(e,"append",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),v(e,"prepend",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))})}),[null==(r=l.Element)?void 0:r.prototype,null==(n=l.CharacterData)?void 0:n.prototype,null==(a=l.DocumentType)?void 0:a.prototype].forEach(e=>{v(e,"before",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),v(e,"after",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];return e.apply(this,f(i))}),v(e,"replaceWith",e=>function(){for(var t=arguments.length,i=Array(t),s=0;t>s;s++)i[s]=arguments[s];var r=f(i);return i.length&&!r.length?void 0:e.apply(this,r)})}),v(null==(o=l.Element)?void 0:o.prototype,"insertAdjacentElement",e=>function(t,i){var s=g(i);return s?e.call(this,t,s):null}),this.yd=()=>{c.forEach(e=>e()),this.yd=void 0},this.bd()}bd(){var e=!1;return()=>{var t;e||(e=!0,this.dd--,0===this.dd&&(null==(t=this.yd)||t.call(this)))}}_d(e,t){void 0===t&&(t=!0);var i=this.md();try{var s=e(i);return t&&i(),s}catch(e){throw i(),e}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.vd.length&&(a6.info("Processing "+this.vd.length+" events for site app with id "+e.id),this.vd.forEach(e=>this._d(()=>null==t.processEvent?void 0:t.processEvent(e))),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.pd)||i.call(this))},s=!1,r=r=>{t.errored=!r,t.loaded=!0,a6.info("Site app with id "+e.id+" "+(r?"loaded":"errored")),s&&i()};try{var n=this._d(t=>e.init({posthog:this._instance,callback(e){t(),r(e)}}),!1).processEvent;n&&(t.processEvent=n),s=!0}catch(t){a6.error(a8+e.id,t),r(!1)}if(s&&t.loaded)try{i()}catch(i){a6.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}wd(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}kd(e){var t=this;if(0!==Object.keys(this.apps).length){var i=this.globalsForEvent(e),s=function(s){try{t._d(()=>null==s.processEvent?void 0:s.processEvent(i))}catch(t){a6.error("Error while processing event "+e.event+" for site app "+s.id,t)}};for(var r of Object.values(this.apps))s(r)}}onRemoteConfig(e){var t,i,s,r=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.wd(),void this._instance.on("eventCaptured",e=>this.kd(e))):void a6.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.pd)||i.call(this),e.ok){var n=e.config;if(null!=(s=n.siteApps)&&s.length)if(this.isEnabled)for(var a of n.siteApps)!function(){var e,t=a.id,i=a.url;m["__$$ph_site_app_"+t]=r._instance,null==(e=m.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(r._instance,i,e=>{if(e)return a6.error(a8+t,e)})}();else a6.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},oO,{tracingHeaders:class{constructor(e){this.xd=void 0,this.Sd=void 0,this.Cd=void 0,this.qh=()=>{var e,t,i=this.Td();i?(ei(this.xd)&&(this.xd=null==(e=m.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)?void 0:e._patchXHR(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),ei(this.Sd)&&(this.Sd=null==(t=m.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)?void 0:t._patchFetch(i,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.Wh()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Jn(e){var t,i;null!=(t=m.__PosthogExtensions__)&&t.tracingHeadersPatchFns?e():null==(i=m.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return aG.error("failed to load script",t);e()})}Md(){var e,t;return null!=(e=null!=(t=this._instance.config.tracing_headers)?t:this._instance.config.addTracingHeaders)?e:this._instance.config.__add_tracing_headers}Td(){var e=this.Md();return Q(e)?(Q(this.Cd)?this.Cd.splice(0,this.Cd.length,...e):this.Cd=[...e],e.length>0?this.Cd:void 0):(Q(this.Cd)&&this.Cd.splice(0),this.Cd=e||void 0,this.Cd)}Wh(){var e,t;null==(e=this.xd)||e.call(this),null==(t=this.Sd)||t.call(this),this.xd=void 0,this.Sd=void 0}startIfEnabledOrStop(){this.Td()?this.Jn(this.qh):this.Wh()}}},{toolbar:class{constructor(e){this.instance=e}Hd(e){m.ph_toolbar_state=e}zd(){var e;return null!=(e=m.ph_toolbar_state)?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),sm(this.instance.config)||!a||!u)return!1;e=null!=e?e:a.location,i=null!=i?i:a.history;try{if(!t){try{a.localStorage.setItem("test","test"),a.localStorage.removeItem("test")}catch(e){return!1}t=null==a?void 0:a.localStorage}var s,r=os||rN(e.hash,"__posthog")||rN(e.hash,"state"),n=r?sp(()=>JSON.parse(atob(decodeURIComponent(r))))||sp(()=>JSON.parse(decodeURIComponent(r))):null;return n&&"ph_authorize"===n.action?((s=n).source="url",s&&Object.keys(s).length>0&&(n.desiredHash?e.hash=n.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((s=JSON.parse(t.getItem(or)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token||(this.loadToolbar(s),0))}catch(e){return!1}}Ud(e){var t=m.ph_load_toolbar||m.ph_load_editor;!ea(t)&&X(t)?t(e,this.instance):on.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==u||!u.getElementById(sZ));if(!a||i)return!1;var s="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,r=x({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},s?{instrument:!1}:{});return(a.localStorage.setItem(or,JSON.stringify(x({},r,{source:void 0}))),2===this.zd())?this.Ud(r):0===this.zd()&&(this.Hd(1),null==(t=m.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(on.error("[Toolbar] Failed to load",e),this.Hd(0)):(this.Hd(2),this.Ud(r))}),s_(a,"turbolinks:load",()=>{this.Hd(0),this.loadToolbar(r)})),!0}Wd(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},oI,{conversations:class{constructor(e){this.Vd=void 0,this._conversationsManager=null,this.Gd=!1,this.Me=null,this.Zd=!1,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations&&(this.Qd=e.ok,e.ok)){var t=e.config.conversations;ea(t)||(eu(t)?this.Vd=t:(this.Vd=t.enabled,this.Me=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.Vd=void 0,this.Me=null,this.Qd=void 0,this.Zd=!1}loadIfEnabled(){if(!(this._conversationsManager||this.Gd||this._instance.config.disable_conversations||sm(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==m?void 0:m.__PosthogExtensions__;if(e&&!ei(this.Vd)&&this.Vd)if(this.Me&&this.Me.token){this.Gd=!0;try{var t=e.initConversations;if(t)return this.Jd(t),void(this.Gd=!1);var i=e.loadExternalDependency;if(!i)return void this.Kd(i4);i(this._instance,"conversations",t=>{t||!e.initConversations?this.Kd("Could not load conversations script",t):this.Jd(e.initConversations),this.Gd=!1})}catch(e){this.Kd("Error initializing conversations",e),this.Gd=!1}}else oy.error("Conversations enabled but missing token in remote config.")}}Jd(e){if(this.Me)try{this._conversationsManager=e(this.Me,this._instance),this.Zd=!1,oy.info("Conversations loaded successfully")}catch(e){this.Kd("Error completing conversations initialization",e)}else oy.error("Cannot complete initialization: remote config is null")}Kd(e,t){oy.error(e,t),this._conversationsManager=null,this.Gd=!1,this.Zd=!0}show(){this._conversationsManager?this._conversationsManager.show():oy.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.Vd&&!en(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?"disabled_by_config":sm(this._instance.config)?"disabled_for_toolbar":this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?"consent_opted_out":!1===this.Qd?"remote_config_failed":ei(this.Vd)?this.Qd?"disabled_in_project":"remote_config_pending":this.Vd?ea(this.Me)||!this.Me.token?"missing_token":null!=m&&m.__PosthogExtensions__?this.Gd?"initializing":this.Zd?"load_failed":"not_loaded":"extensions_unavailable":"disabled_in_project"}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var s=this;return w(function*(){return s._conversationsManager?s._conversationsManager.sendMessage(e,t,i):(oy.warn(ob),null)})()}getMessages(e,t){var i=this;return w(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(oy.warn(ob),null)})()}markAsRead(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(oy.warn(ob),null)})()}getTickets(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(oy.warn(ob),null)})()}requestRestoreLink(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(oy.warn(ob),null)})()}restoreFromToken(e){var t=this;return w(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(oy.warn(ob),null)})()}restoreFromUrlToken(){var e=this;return w(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(oy.warn(ob),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}tl(){var e;null==(e=this._conversationsManager)||e.setIdentity()}el(){var e;null==(e=this._conversationsManager)||e.clearIdentity()}}},{logs:class{constructor(e){var t,i=this;this.Yd=!1,this.Xd=!1,this.I=t8("[logs]"),this.tv=x({},this.I,{error(){for(var e=arguments.length,t=Array(e),s=0;e>s;s++)t[s]=arguments[s];t.some(oE)||i.I.error(...t)}}),this.io=[],this.ev=[],this.ku=0,this.iv=()=>{var e,t;this.ku=0,null==(e=this.rv)||e.onReconnect(),null==(t=this.nv)||t.onReconnect()},this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Yd=!0),a&&s_(a,"online",this.iv)}sv(e,t,i,s){var r,n,a,o,l,u,h,c,d,p,v,g,f,_,m=(r=null==(_=this._instance)||null==(_=_.config)?void 0:_.logs,d=null!=(n=null==r?void 0:r.flushIntervalMs)?n:3e3,p=null!=(a=null==r?void 0:r.maxBufferSize)?a:100,g=ei(v=null!=i&&i.consoleCapture?void 0:null!=(o=null==r?void 0:r.maxLogsPerInterval)?o:1e3)?Math.max(p,2048):Math.max(p,v),{serviceName:null!=(l=null!=(u=null==(f=null==r?void 0:r.resourceAttributes)?void 0:f["service.name"])?u:null==r?void 0:r.serviceName)?l:null==i?void 0:i.serviceNameDefault,serviceVersion:null!=(h=null==f?void 0:f["service.version"])?h:null==r?void 0:r.serviceVersion,environment:null!=(c=null==f?void 0:f["deployment.environment"])?c:null==r?void 0:r.environment,resourceAttributes:f,beforeSend:null==r?void 0:r.beforeSend,flushIntervalMs:d,maxBufferSize:p,maxQueueSize:g,maxBatchRecordsPerPost:100,rateCapWindowMs:d,maxLogsPerInterval:v,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0});return[new tS(this.ov(e,t),m,this.tv,()=>this.av(),e=>e(),void 0,s),m]}lv(){var e,t=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;if(!this.rv||this.uv!==t){null==(i=this.rv)||i.reset(),this.uv=t;var i,s=this.sv(()=>this.io,e=>{this.io=e});this.rv=s[0],this.hv=s[1]}return this.rv}dv(){var e,t=null==(e=this._instance)||null==(e=e.config)?void 0:e.logs;if(!this.nv||this.vv!==t){null==(i=this.nv)||i.reset(),this.vv=t;var i,s=this.sv(()=>this.ev,e=>{this.ev=e},{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},ow);this.nv=s[0],this.fv=s[1]}return this.nv}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t;if(e.ok){var i=null==(t=e.config.logs)?void 0:t.captureConsoleLogs;!ea(i)&&i&&(this.Yd=!0,this.loadIfEnabled())}}reset(){var e,t;this.io=[],null==(e=this.rv)||e.reset(),this.ev=[],null==(t=this.nv)||t.reset(),this.ku=0}captureLog(e){this.lv().captureLog(e)}ui(e){this.dv().captureLog(e)}get logger(){return this.pv||(this.pv={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.pv}flushLogs(e){e?this.gv(e):(this.rv&&this.rv.flush().catch(e=>this.mv(e)),this.nv&&this.nv.flush().catch(e=>this.mv(e)))}mv(e){oE(e)||this.I.error("PostHog logs flush failed:",e)}loadIfEnabled(){if(this.Yd&&!this.Xd){var e=null==m?void 0:m.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",t=>{var i;t||null==(i=e.logs)||!i.initializeLogs?this.I.error("Could not load logs script",t):(e.logs.initializeLogs(this._instance),this.Xd=!0)}):this.I.error(i4)}else this.I.error("PostHog Extensions not found.")}}ov(e,t){var i=this._instance;return{get isDisabled(){return!1},get optedOut(){return!i.is_capturing()},getPersistedProperty:t=>t===T.LogsQueue?e():void 0,setPersistedProperty(e,i){e===T.LogsQueue&&t(null!=i?i:[])},kn:e=>this.kn(e),getLibraryId:()=>y.LIB_NAME,getLibraryVersion:()=>y.LIB_VERSION}}kn(e){return new Promise(t=>{if(rj(this.ku,3))t({kind:"fatal",error:ok(void 0,"logs endpoint is unreachable, dropping batch")});else{var i=!1,s=e=>{i||(i=!0,clearTimeout(r),t(e))},r=setTimeout(()=>{this.I.warn("Logs request timed out before receiving a response"),s({kind:"retry-later",error:ok(void 0,"logs request timed out")})},9e4);this._instance._send_request({method:"POST",url:this.yv(),data:e,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:e=>{var t,i=e.statusCode;(this.bv(i),i>=200&&300>i)?s({kind:"ok"}):413===i?s({kind:"too-large"}):0!==i&&429!==i&&500>i?s({kind:"fatal",error:Error("logs request failed with status "+i)}):0===i?(e.error||this.I.warn("Logs request failed before receiving an HTTP response"),s({kind:"retry-later",error:ok(e.error,"logs request failed before receiving an HTTP response")})):s({kind:"retry-later",error:null!=(t=e.error)?t:Error("logs request failed with status "+i)})}})}})}bv(e){(0!==e||this._instance.__loaded)&&(this.ku=rq(e,this.ku,3,()=>this.I.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes.")))}gv(e){this.io.length>0&&this._v(e,this.io,this.hv,y.LIB_NAME,e=>{this.io=e}),this.ev.length>0&&this._v(e,this.ev,this.fv,ow,e=>{this.ev=e})}_v(e,t,i,s,r){if(0!==t.length){var n=t.map(e=>e.record);r([]);var a=tE(n,tk(i,y.LIB_NAME,y.LIB_VERSION),s,y.LIB_VERSION);this._instance._send_request({method:"POST",url:this.yv(),data:a,compression:"best-available",batchKey:"logs",transport:e})}}yv(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}av(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var i=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),s=i.windowId,r=i.sessionStartTimestamp,n=i.lastActivityTimestamp;t.sessionId=i.sessionId,t.windowId=s,ea(r)||(t.sessionStartTimestamp=r),ea(n)||(t.lastActivityTimestamp=n)}if(null!=m&&null!=(e=m.location)&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?tf(m.location.href):m.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},{metrics:class{constructor(e){this.I=t8("[metrics]"),this._instance=e}initialize(){}lv(){var e,t,i,s,r,n,a,o,l=null==(a=this._instance)||null==(a=a.config)?void 0:a.metrics;return this.rv&&this.uv===l||(null==(o=this.rv)||o.reset(),this.uv=l,this.rv=new tF(this.ov(),{serviceName:null!=(e=null==(n=null==l?void 0:l.resourceAttributes)?void 0:n["service.name"])?e:null==l?void 0:l.serviceName,serviceVersion:null!=(t=null==n?void 0:n["service.version"])?t:null==l?void 0:l.serviceVersion,environment:null!=(i=null==n?void 0:n["deployment.environment"])?i:null==l?void 0:l.environment,resourceAttributes:n,beforeSend:null==l?void 0:l.beforeSend,flushIntervalMs:null!=(s=null==l?void 0:l.flushIntervalMs)?s:1e4,maxSeriesPerFlush:null!=(r=null==l?void 0:l.maxSeriesPerFlush)?r:1e3},this.I)),this.rv}count(e,t,i){void 0===t&&(t=1),this.lv().count(e,t,i)}gauge(e,t,i){this.lv().gauge(e,t,i)}histogram(e,t,i){this.lv().histogram(e,t,i)}flush(e){if(!this.rv)return Promise.resolve();if(e){var t=this.rv.drainWindow();return t&&this.Nn(t,e),Promise.resolve()}return this.rv.flush().catch(e=>this.I.error("PostHog metrics flush failed:",e))}reset(){var e;null==(e=this.rv)||e.reset()}ov(){var e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},Nn:e=>t.Nn(e),getLibraryId:()=>y.LIB_NAME,getLibraryVersion:()=>y.LIB_VERSION}}Nn(e,t){return new Promise(i=>{var s=!1,r=e=>{s||(s=!0,clearTimeout(n),i(e))},n=setTimeout(()=>r({kind:"retry-later",error:Error("metrics request timed out")}),9e4);this._instance._send_request(x({method:"POST",url:this.wv(),data:e,compression:"best-available",batchKey:"metrics"},t&&{transport:t},{fireCallbackOnDrop:!0,callback(e){var t,i=e.statusCode;i>=200&&300>i?r({kind:"ok"}):413===i?r({kind:"too-large"}):0!==i&&429!==i&&500>i?r({kind:"fatal",error:Error("metrics request failed with status "+i)}):r({kind:"retry-later",error:null!=(t=e.error)?t:Error("metrics request failed with status "+i)})}}))})}wv(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}});aj.__defaultExtensionClasses=x({},oF);var oC=(y.SDK_DIST_CHANNEL="npm",n=aS[aM]=new aj,function(){function e(){e.done||(e.done=!0,aR=!1,sh(aS,function(e){e._dom_loaded()}))}null!=u&&u.addEventListener?"complete"===u.readyState?e():s_(u,"DOMContentLoaded",e,{capture:!1}):a&&t6.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n)}}]);