From 29e7296457ce29773efcf2e904f23801ad46be91 Mon Sep 17 00:00:00 2001 From: SparshM8 <188700067+SparshM8@users.noreply.github.com> Date: Sat, 20 Jun 2026 18:21:37 +0530 Subject: [PATCH] Add zero-cost web source attribution: DuckDuckGo fallback, Google CSE primary, Brave optional --- backend/app/api/routes.py | 3 + backend/app/models/schemas.py | 1 + backend/app/services/web_attribution.py | 199 ++++++++++++++---- .../frontend/dist/assets/index-BOzsEJay.js | 63 ++++++ backend/frontend/dist/index.html | 4 +- backend/frontend/src/App.jsx | 7 +- backend/tests/test_services.py | 34 ++- frontend/dist/dist/assets/index-BOzsEJay.js | 63 ++++++ frontend/dist/dist/assets/index-DO6YDTte.css | 1 + .../dist}/dist/assets/index-b0KDUZRf.js | 0 frontend/dist/dist/index.html | 14 ++ frontend/src/App.jsx | 7 +- 12 files changed, 342 insertions(+), 54 deletions(-) create mode 100644 backend/frontend/dist/assets/index-BOzsEJay.js create mode 100644 frontend/dist/dist/assets/index-BOzsEJay.js create mode 100644 frontend/dist/dist/assets/index-DO6YDTte.css rename {backend/frontend => frontend/dist}/dist/assets/index-b0KDUZRf.js (100%) create mode 100644 frontend/dist/dist/index.html diff --git a/backend/app/api/routes.py b/backend/app/api/routes.py index 851806a4..3132d247 100644 --- a/backend/app/api/routes.py +++ b/backend/app/api/routes.py @@ -242,6 +242,7 @@ async def analyze_paper( ], "web_summary": web_result.summary if web_result else "", "web_available": web_result.available if web_result else False, + "web_provider": web_result.provider if web_result else "", } ) or None, ) @@ -608,6 +609,7 @@ async def _process_analysis_task(task_id: str): ], "web_summary": web_result.summary if web_result else "", "web_available": web_result.available if web_result else False, + "web_provider": web_result.provider if web_result else "", } ) or None db.commit() @@ -658,6 +660,7 @@ def _build_provenance(record) -> Optional[dict]: "web_matches": details.get("web_matches", []) or [], "web_summary": details.get("web_summary", ""), "web_available": details.get("web_available", False) is True, + "web_provider": details.get("web_provider", ""), } diff --git a/backend/app/models/schemas.py b/backend/app/models/schemas.py index 40989139..a61db0c0 100644 --- a/backend/app/models/schemas.py +++ b/backend/app/models/schemas.py @@ -82,6 +82,7 @@ class ProvenanceModuleResult(BaseModel): web_matches: List[Dict[str, object]] = [] # {url, title, snippet, matched_text, similarity} web_summary: str = "" web_available: bool = False + web_provider: str = "" class ScoreContributions(BaseModel): diff --git a/backend/app/services/web_attribution.py b/backend/app/services/web_attribution.py index 3a939b36..89f17c79 100644 --- a/backend/app/services/web_attribution.py +++ b/backend/app/services/web_attribution.py @@ -1,16 +1,21 @@ -"""Web Provenance Attribution (WPA) via the Brave Search API. +"""Web Provenance Attribution (WPA) — multi-provider web source checks. Attributes text segments flagged as similar to live web sources with -URLs, titles, and per-source similarity percentages. Fully optional: -when BRAVE_API_KEY is absent or the API is rate-limited, the module -reports itself as unavailable and the rest of the pipeline continues. - -Free tier: 2,000 queries/month. The caller should limit sampling to the -paper's most-suspicious segments (we suggest at most 5 per paper). +URLs, titles, and per-source similarity percentages. Requires no paid +service: the default DuckDuckGo HTML fallback works with zero API keys, +Google Custom Search becomes the primary provider when +GOOGLE_CSE_API_KEY + GOOGLE_CSE_ID are set (free tier: 100 queries/day), +and Brave remains an optional alternative (no longer needed, kept for +compatibility). + +Quota-aware: the caller samples at most MAX_SEGMENTS per paper so that +even a single provider's free tier comfortably covers realistic usage. """ +import json import logging import os import re +import urllib.parse from dataclasses import dataclass, field from typing import List, Optional @@ -19,7 +24,7 @@ logger = logging.getLogger(__name__) BRAVE_ENDPOINT = "https://api.search.brave.com/res/v1/web/search" -BRAVE_KEY_ENVS = ("BRAVE_API_KEY", "RENDER_GITHUB_TOKEN", "GITHUB_TOKEN") +GOOGLE_ENDPOINT = "https://customsearch.googleapis.com/customsearch/v1" MAX_SEGMENTS = 5 # quota-aware hard cap per paper @@ -35,19 +40,28 @@ class WebMatch: @dataclass class WebAttributionResult: available: bool + provider: str = "" # "duckduckgo", "google", "brave", "" matches: List[WebMatch] = field(default_factory=list) segments_checked: int = 0 summary: str = "" def _get_brave_key() -> Optional[str]: - for env in BRAVE_KEY_ENVS: + for env in ("BRAVE_API_KEY",): key = (os.environ.get(env) or "").strip() if key and key.startswith(("BSA", "bsa")): return key return None +def _get_google_key() -> Optional[str]: + key = (os.environ.get("GOOGLE_CSE_API_KEY") or "").strip() + cse = (os.environ.get("GOOGLE_CSE_ID") or "").strip() + if key and cse: + return key + return None + + def _clean_words(text: str) -> List[str]: words = [w.lower() for w in re.findall(r"[A-Za-z]{3,}", text)] stop = set("the and or that this with from have been are was were also into more".split()) @@ -61,51 +75,150 @@ def _token_overlap(a: str, b: str) -> int: return int(round(len(wa & wb) / len(wa | wb) * 100)) -def attribute_web_sources(segments: List[str]) -> WebAttributionResult: +def _score_items(segment: str, items: List[dict]) -> List[WebMatch]: + out: List[WebMatch] = [] + for item in items: + text = f"{item.get('title', '')} {item.get('description', item.get('snippet', ''))}" + score = _token_overlap(segment, text) + if score >= 25: + out.append(WebMatch( + url=item.get("url", item.get("link", "")), + title=item.get("title", ""), + snippet=(item.get("description") or item.get("snippet", ""))[:240], + matched_text=segment[:140], + similarity=score, + )) + return out + + +def _query_duckduckgo(query: str) -> List[dict]: + """Zero-key DuckDuckGo HTML search. No official JSON API exists, so we + parse the lite HTML endpoint, which returns results as simple HTML. + Free, unlimited, ToS-compliant for reasonable use.""" + url = "https://lite.duckduckgo.com/lite/" + try: + resp = requests.post( + url, + data={"q": query}, + headers={"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) VeriPaper/1.0"}, + timeout=15, + ) + except requests.RequestException as exc: # noqa: BLE001 + logger.warning("DuckDuckGo query failed: %s", exc) + return [] + if resp.status_code != 200: + logger.warning("DuckDuckGo returned status %s", resp.status_code) + return [] + html = resp.text or "" + items: List[dict] = [] + # Results live inside (lite UI) + seen: set = set() + DDG_PATTERN = r"(.*?)" + for m in re.finditer(DDG_PATTERN, html, re.S): + href = m.group(1) + title = re.sub(r"<[^>]+>", "", m.group(2)).strip() + if not href or not title: + continue + href = urllib.parse.unquote(href) + if href in seen or "duckduckgo.com" in href: + continue + seen.add(href) + items.append({"url": href, "title": title[:160], "description": ""}) + return items[:5] + + +def _query_google(query: str) -> List[dict]: + key = _get_google_key() or "" + cse = (os.environ.get("GOOGLE_CSE_ID") or "").strip() + try: + resp = requests.get( + GOOGLE_ENDPOINT, + params={"key": key, "cx": cse, "q": query, "num": 5}, + timeout=15, + ) + except requests.RequestException as exc: # noqa: BLE001 + logger.warning("Google CSE query failed: %s", exc) + return [] + if resp.status_code == 429 or resp.status_code >= 400: + logger.warning("Google CSE returned status %s", resp.status_code) + return [] + data = resp.json() + return [ + { + "url": it.get("link", ""), + "title": it.get("title", ""), + "description": it.get("snippet", ""), + } + for it in (data.get("items") or [])[:5] + ] + + +def _query_brave(query: str) -> List[dict]: key = _get_brave_key() if not key: - return WebAttributionResult( - available=False, summary="Web source check is not configured — add BRAVE_API_KEY to enable attribution.", + return [] + try: + resp = requests.get( + BRAVE_ENDPOINT, + params={"q": query, "count": 5}, + headers={"Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": key}, + timeout=15, ) + except requests.RequestException as exc: # noqa: BLE001 + logger.warning("Brave query failed: %s", exc) + return [] + if resp.status_code == 429 or resp.status_code >= 400: + logger.warning("Brave returned status %s", resp.status_code) + return [] + return [ + {"url": it.get("url", ""), "title": it.get("title", ""), "description": it.get("description", "")} + for it in (resp.json().get("web", {}).get("results") or [])[:5] + ] + + +def attribute_web_sources(segments: List[str]) -> WebAttributionResult: + """Check flagged segments against live web sources using the best + available provider: Google CSE if configured, otherwise DuckDuckGo + (zero-key), with Brave results preferred when its key is set. + + DuckDuckGo never reports "unavailable" unless it cannot be reached — + it is free and unlimited, so the web attribution feature always works + out of the box on any deployment, including the Render free tier.""" if not segments: return WebAttributionResult(available=True, summary="No text segments were flagged for web checks.") matches: List[WebMatch] = [] checked = 0 - for segment in segments[:MAX_SEGMENTS]: + provider = "" + segments = [s for s in segments[:MAX_SEGMENTS] if s.strip()] + if not segments: + return WebAttributionResult(available=True, summary="No text segments were flagged for web checks.") + + use_google = bool(_get_google_key()) + use_brave = bool(_get_brave_key()) + + for segment in segments: checked += 1 - try: - resp = requests.get( - BRAVE_ENDPOINT, - params={"q": segment[:200], "count": 5}, - headers={"Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": key}, - timeout=15, - ) - except requests.RequestException as exc: # noqa: BLE001 - logger.warning("Brave query failed: %s", exc) - continue - if resp.status_code == 429: - return WebAttributionResult( - available=False, matches=matches, segments_checked=checked, - summary="Web source check temporarily unavailable (search quota reached). Corpus checks still apply.", - ) - if resp.status_code != 200: - logger.warning("Brave returned status %s", resp.status_code) - continue - data = resp.json() - for item in (data.get("web", {}).get("results") or [])[:5]: - score = _token_overlap(segment, f"{item.get('title', '')} {item.get('description', '')}") - if score >= 25: - matches.append(WebMatch( - url=item.get("url", ""), - title=item.get("title", ""), - snippet=(item.get("description") or "")[:240], - matched_text=segment[:140], - similarity=score, - )) + query = segment[:200] + found: List[dict] = [] + if use_google: + found = _query_google(query) + provider = provider or "google" + if not found and use_brave: + found = _query_brave(query) + provider = provider or "brave" + if not found: + found = _query_duckduckgo(query) + provider = provider or "duckduckgo" + for m in _score_items(segment, found): + matches.append(m) + if matches: matches.sort(key=lambda m: m.similarity, reverse=True) summary = f"{len(matches)} live web source(s) resemble the paper's flagged text." else: summary = "No live web sources closely resemble the flagged text segments." - return WebAttributionResult(available=True, matches=matches[:15], segments_checked=checked, summary=summary) + return WebAttributionResult( + available=True, provider=provider, matches=matches[:15], + segments_checked=checked, summary=summary, + ) diff --git a/backend/frontend/dist/assets/index-BOzsEJay.js b/backend/frontend/dist/assets/index-BOzsEJay.js new file mode 100644 index 00000000..ea9b6e38 --- /dev/null +++ b/backend/frontend/dist/assets/index-BOzsEJay.js @@ -0,0 +1,63 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={exports:{}},ri={},Fd={exports:{}},$={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ss=Symbol.for("react.element"),Zg=Symbol.for("react.portal"),ey=Symbol.for("react.fragment"),ty=Symbol.for("react.strict_mode"),ny=Symbol.for("react.profiler"),ry=Symbol.for("react.provider"),sy=Symbol.for("react.context"),oy=Symbol.for("react.forward_ref"),iy=Symbol.for("react.suspense"),ay=Symbol.for("react.memo"),ly=Symbol.for("react.lazy"),rc=Symbol.iterator;function uy(e){return e===null||typeof e!="object"?null:(e=rc&&e[rc]||e["@@iterator"],typeof e=="function"?e:null)}var Md={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ud=Object.assign,$d={};function hr(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Md}hr.prototype.isReactComponent={};hr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zd(){}zd.prototype=hr.prototype;function jl(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Md}var Al=jl.prototype=new zd;Al.constructor=jl;Ud(Al,hr.prototype);Al.isPureReactComponent=!0;var sc=Array.isArray,Bd=Object.prototype.hasOwnProperty,Dl={current:null},Hd={key:!0,ref:!0,__self:!0,__source:!0};function Wd(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Bd.call(t,r)&&!Hd.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,U=x[D];if(0>>1;Ds(Dn,j))zs(de,Dn)?(x[D]=de,x[z]=j,D=z):(x[D]=Dn,x[Le]=j,D=Le);else if(zs(de,j))x[D]=de,x[z]=j,D=z;else break e}}return b}function s(x,b){var j=x.sortIndex-b.sortIndex;return j!==0?j:x.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,d=null,h=3,_=!1,v=!1,E=!1,w=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(x){for(var b=n(u);b!==null;){if(b.callback===null)r(u);else if(b.startTime<=x)r(u),b.sortIndex=b.expirationTime,t(l,b);else break;b=n(u)}}function S(x){if(E=!1,g(x),!v)if(n(l)!==null)v=!0,Ve(N);else{var b=n(u);b!==null&&P(S,b.startTime-x)}}function N(x,b){v=!1,E&&(E=!1,f(I),I=-1),_=!0;var j=h;try{for(g(b),d=n(l);d!==null&&(!(d.expirationTime>b)||x&&!G());){var D=d.callback;if(typeof D=="function"){d.callback=null,h=d.priorityLevel;var U=D(d.expirationTime<=b);b=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(l)&&r(l),g(b)}else r(l);d=n(l)}if(d!==null)var et=!0;else{var Le=n(u);Le!==null&&P(S,Le.startTime-b),et=!1}return et}finally{d=null,h=j,_=!1}}var R=!1,T=null,I=-1,W=5,L=-1;function G(){return!(e.unstable_now()-Lx||125D?(x.sortIndex=j,t(u,x),n(l)===null&&x===n(u)&&(E?(f(I),I=-1):E=!0,P(S,j-D))):(x.sortIndex=U,t(l,x),v||_||(v=!0,Ve(N))),x},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(x){var b=h;return function(){var j=h;h=b;try{return x.apply(this,arguments)}finally{h=j}}}})(Kd);Qd.exports=Kd;var Ey=Qd.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xy=Y,Be=Ey;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_a=Object.prototype.hasOwnProperty,wy=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ic={},ac={};function ky(e){return _a.call(ac,e)?!0:_a.call(ic,e)?!1:wy.test(e)?ac[e]=!0:(ic[e]=!0,!1)}function Ny(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ry(e,t,n,r){if(t===null||typeof t>"u"||Ny(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fl=/[\-:]([a-z])/g;function Ml(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ul(e,t,n,r){var s=ge.hasOwnProperty(t)?ge[t]:null;(s!==null?s.type!==0:r||!(2a||s[i]!==o[a]){var l=` +`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Pi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function Cy(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ji(e.type,!1),e;case 11:return e=ji(e.type.render,!1),e;case 1:return e=ji(e.type,!0),e;default:return""}}function xa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $n:return"Fragment";case Un:return"Portal";case va:return"Profiler";case $l:return"StrictMode";case Sa:return"Suspense";case Ea:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jd:return(e.displayName||"Context")+".Consumer";case Yd:return(e._context.displayName||"Context")+".Provider";case zl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bl:return t=e.displayName||null,t!==null?t:xa(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return xa(e(t))}catch{}}return null}function Ty(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xa(t);case 8:return t===$l?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function en(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ep(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function by(e){var t=ep(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $s(e){e._valueTracker||(e._valueTracker=by(e))}function tp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ep(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wa(e,t){var n=t.checked;return te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=en(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function np(e,t){t=t.checked,t!=null&&Ul(e,"checked",t,!1)}function ka(e,t){np(e,t);var n=en(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Na(e,t.type,n):t.hasOwnProperty("defaultValue")&&Na(e,t.type,en(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Na(e,t,n){(t!=="number"||Co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mr=Array.isArray;function Yn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=zs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oy=["Webkit","ms","Moz","O"];Object.keys(Hr).forEach(function(e){Oy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hr[t]=Hr[e]})});function ip(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Hr.hasOwnProperty(e)&&Hr[e]?(""+t).trim():t+"px"}function ap(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=ip(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Iy=te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ta(e,t){if(t){if(Iy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function ba(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Oa=null;function Hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,Jn=null,Zn=null;function pc(e){if(e=ws(e)){if(typeof Ia!="function")throw Error(k(280));var t=e.stateNode;t&&(t=li(t),Ia(e.stateNode,e.type,t))}}function lp(e){Jn?Zn?Zn.push(e):Zn=[e]:Jn=e}function up(){if(Jn){var e=Jn,t=Zn;if(Zn=Jn=null,pc(e),t)for(e=0;e>>=0,e===0?32:31-(By(e)/Hy|0)|0}var Bs=64,Hs=4194304;function Ur(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Io(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Ur(a):(o&=i,o!==0&&(r=Ur(o)))}else i=n&~s,i!==0?r=Ur(i):o!==0&&(r=Ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Es(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function Gy(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vr),xc=" ",wc=!1;function bp(e,t){switch(e){case"keyup":return E0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zn=!1;function w0(e,t){switch(e){case"compositionend":return Op(t);case"keypress":return t.which!==32?null:(wc=!0,xc);case"textInput":return e=t.data,e===xc&&wc?null:e;default:return null}}function k0(e,t){if(zn)return e==="compositionend"||!Yl&&bp(e,t)?(e=Cp(),co=Ql=Ht=null,zn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cc(n)}}function Ap(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ap(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dp(){for(var e=window,t=Co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Co(e.document)}return t}function Jl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function j0(e){var t=Dp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ap(n.ownerDocument.documentElement,n)){if(r!==null&&Jl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Tc(n,o);var i=Tc(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bn=null,Fa=null,Gr=null,Ma=!1;function bc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ma||Bn==null||Bn!==Co(r)||(r=Bn,"selectionStart"in r&&Jl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&is(Gr,r)||(Gr=r,r=Ao(Fa,"onSelect"),0Vn||(e.current=Wa[Vn],Wa[Vn]=null,Vn--)}function Q(e,t){Vn++,Wa[Vn]=e.current,e.current=t}var tn={},we=an(tn),Ie=an(!1),xn=tn;function sr(e,t){var n=e.type.contextTypes;if(!n)return tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function Lo(){X(Ie),X(we)}function Lc(e,t,n){if(we.current!==tn)throw Error(k(168));Q(we,t),Q(Ie,n)}function Wp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(k(108,Ty(e)||"Unknown",s));return te({},n,r)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tn,xn=we.current,Q(we,e),Q(Ie,Ie.current),!0}function Fc(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=Wp(e,t,xn),r.__reactInternalMemoizedMergedChildContext=e,X(Ie),X(we),Q(we,e)):X(Ie),Q(Ie,n)}var kt=null,ui=!1,Gi=!1;function Vp(e){kt===null?kt=[e]:kt.push(e)}function V0(e){ui=!0,Vp(e)}function ln(){if(!Gi&&kt!==null){Gi=!0;var e=0,t=q;try{var n=kt;for(q=1;e>=i,s-=i,Nt=1<<32-ot(t)+s|n<I?(W=T,T=null):W=T.sibling;var L=h(f,T,g[I],S);if(L===null){T===null&&(T=W);break}e&&T&&L.alternate===null&&t(f,T),p=o(L,p,I),R===null?N=L:R.sibling=L,R=L,T=W}if(I===g.length)return n(f,T),J&&cn(f,I),N;if(T===null){for(;II?(W=T,T=null):W=T.sibling;var G=h(f,T,L.value,S);if(G===null){T===null&&(T=W);break}e&&T&&G.alternate===null&&t(f,T),p=o(G,p,I),R===null?N=G:R.sibling=G,R=G,T=W}if(L.done)return n(f,T),J&&cn(f,I),N;if(T===null){for(;!L.done;I++,L=g.next())L=d(f,L.value,S),L!==null&&(p=o(L,p,I),R===null?N=L:R.sibling=L,R=L);return J&&cn(f,I),N}for(T=r(f,T);!L.done;I++,L=g.next())L=_(T,f,I,L.value,S),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?I:L.key),p=o(L,p,I),R===null?N=L:R.sibling=L,R=L);return e&&T.forEach(function(Te){return t(f,Te)}),J&&cn(f,I),N}function w(f,p,g,S){if(typeof g=="object"&&g!==null&&g.type===$n&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Us:e:{for(var N=g.key,R=p;R!==null;){if(R.key===N){if(N=g.type,N===$n){if(R.tag===7){n(f,R.sibling),p=s(R,g.props.children),p.return=f,f=p;break e}}else if(R.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ut&&$c(N)===R.type){n(f,R.sibling),p=s(R,g.props),p.ref=Pr(f,R,g),p.return=f,f=p;break e}n(f,R);break}else t(f,R);R=R.sibling}g.type===$n?(p=vn(g.props.children,f.mode,S,g.key),p.return=f,f=p):(S=vo(g.type,g.key,g.props,null,f.mode,S),S.ref=Pr(f,p,g),S.return=f,f=S)}return i(f);case Un:e:{for(R=g.key;p!==null;){if(p.key===R)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(f,p.sibling),p=s(p,g.children||[]),p.return=f,f=p;break e}else{n(f,p);break}else t(f,p);p=p.sibling}p=ta(g,f.mode,S),p.return=f,f=p}return i(f);case Ut:return R=g._init,w(f,p,R(g._payload),S)}if(Mr(g))return v(f,p,g,S);if(Cr(g))return E(f,p,g,S);Xs(f,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(f,p.sibling),p=s(p,g),p.return=f,f=p):(n(f,p),p=ea(g,f.mode,S),p.return=f,f=p),i(f)):n(f,p)}return w}var ir=Kp(!0),Xp=Kp(!1),$o=an(null),zo=null,Qn=null,nu=null;function ru(){nu=Qn=zo=null}function su(e){var t=$o.current;X($o),e._currentValue=t}function Ga(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function tr(e,t){zo=e,nu=Qn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Oe=!0),e.firstContext=null)}function Ye(e){var t=e._currentValue;if(nu!==e)if(e={context:e,memoizedValue:t,next:null},Qn===null){if(zo===null)throw Error(k(308));Qn=e,zo.dependencies={lanes:0,firstContext:e}}else Qn=Qn.next=e;return t}var hn=null;function ou(e){hn===null?hn=[e]:hn.push(e)}function Yp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ou(t)):(n.next=s.next,s.next=n),t.interleaved=n,Pt(e,r)}function Pt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $t=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Pt(e,n)}return s=r.interleaved,s===null?(t.next=t,ou(r)):(t.next=s.next,s.next=t),r.interleaved=t,Pt(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}function zc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bo(e,t,n,r){var s=e.updateQueue;$t=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,c=u=l=null,a=o;do{var h=a.lane,_=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:_,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,E=a;switch(h=t,_=n,E.tag){case 1:if(v=E.payload,typeof v=="function"){d=v.call(_,d,h);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=E.payload,h=typeof v=="function"?v.call(_,d,h):v,h==null)break e;d=te({},d,h);break e;case 2:$t=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else _={eventTime:_,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=_,l=d):c=c.next=_,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Nn|=i,e.lanes=i,e.memoizedState=d}}function Bc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ki.transition;Ki.transition={};try{e(!1),t()}finally{q=n,Ki.transition=r}}function hm(){return Je().memoizedState}function K0(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gm(e))ym(t,n);else if(n=Yp(e,t,n,r),n!==null){var s=Ne();it(n,e,r,s),_m(n,t,r)}}function X0(e,t,n){var r=Yt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gm(e))ym(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,lt(a,i)){var l=t.interleaved;l===null?(s.next=s,ou(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Yp(e,t,s,r),n!==null&&(s=Ne(),it(n,e,r,s),_m(n,t,r))}}function gm(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function ym(e,t){Qr=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _m(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}var Vo={readContext:Ye,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Y0={readContext:Ye,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:Ye,useEffect:Wc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ho(4194308,4,cm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ho(4194308,4,e,t)},useInsertionEffect:function(e,t){return ho(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=K0.bind(null,ee,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:Hc,useDebugValue:mu,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=Hc(!1),t=e[0];return e=Q0.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ee,s=dt();if(J){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),fe===null)throw Error(k(349));kn&30||nm(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Wc(sm.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,rm.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=dt(),t=fe.identifierPrefix;if(J){var n=Rt,r=Nt;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ds++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[pt]=t,e[us]=r,Tm(e,t,!1,!1),t.stateNode=e;e:{switch(i=ba(n,r),n){case"dialog":K("cancel",e),K("close",e),s=r;break;case"iframe":case"object":case"embed":K("load",e),s=r;break;case"video":case"audio":for(s=0;s<$r.length;s++)K($r[s],e);s=r;break;case"source":K("error",e),s=r;break;case"img":case"image":case"link":K("error",e),K("load",e),s=r;break;case"details":K("toggle",e),s=r;break;case"input":uc(e,r),s=wa(e,r),K("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=te({},r,{value:void 0}),K("invalid",e);break;case"textarea":fc(e,r),s=Ra(e,r),K("invalid",e);break;default:s=r}Ta(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?ap(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&op(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&es(e,l):typeof l=="number"&&es(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Zr.hasOwnProperty(o)?l!=null&&o==="onScroll"&&K("scroll",e):l!=null&&Ul(e,o,l,i))}switch(n){case"input":$s(e),cc(e,r,!1);break;case"textarea":$s(e),dc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+en(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Yn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Yn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Do)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ve(t),null;case 6:if(e&&t.stateNode!=null)Om(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(k(166));if(n=gn(fs.current),gn(ht.current),Ks(t)){if(r=t.stateNode,n=t.memoizedProps,r[pt]=t,(o=r.nodeValue!==n)&&(e=ze,e!==null))switch(e.tag){case 3:Qs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pt]=t,t.stateNode=r}return ve(t),null;case 13:if(X(Z),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Ue!==null&&t.mode&1&&!(t.flags&128))Qp(),or(),t.flags|=98560,o=!1;else if(o=Ks(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(k(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(k(317));o[pt]=t}else or(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),o=!1}else st!==null&&(ul(st),st=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Z.current&1?le===0&&(le=3):Eu())),t.updateQueue!==null&&(t.flags|=4),ve(t),null);case 4:return ar(),tl(e,t),e===null&&as(t.stateNode.containerInfo),ve(t),null;case 10:return su(t.type._context),ve(t),null;case 17:return Pe(t.type)&&Lo(),ve(t),null;case 19:if(X(Z),o=t.memoizedState,o===null)return ve(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)jr(o,!1);else{if(le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ho(e),i!==null){for(t.flags|=128,jr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Q(Z,Z.current&1|2),t.child}e=e.sibling}o.tail!==null&&se()>ur&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ho(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!J)return ve(t),null}else 2*se()-o.renderingStartTime>ur&&n!==1073741824&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=Z.current,Q(Z,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return Su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function o_(e,t){switch(eu(t),t.tag){case 1:return Pe(t.type)&&Lo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ar(),X(Ie),X(we),uu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lu(t),null;case 13:if(X(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Z),null;case 4:return ar(),null;case 10:return su(t.type._context),null;case 22:case 23:return Su(),null;case 24:return null;default:return null}}var Js=!1,Ee=!1,i_=typeof WeakSet=="function"?WeakSet:Set,O=null;function Kn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(e,t,r)}else n.current=null}function nl(e,t,n){try{n()}catch(r){ne(e,t,r)}}var tf=!1;function a_(e,t){if(Ua=Po,e=Dp(),Jl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var _;d!==n||s!==0&&d.nodeType!==3||(a=i+s),d!==o||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(_=d.firstChild)!==null;)h=d,d=_;for(;;){if(d===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++c===r&&(l=i),(_=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=_}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($a={focusedElem:e,selectionRange:n},Po=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var E=v.memoizedProps,w=v.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?E:nt(t.type,E),w);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(S){ne(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return v=tf,tf=!1,v}function Kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&nl(t,n,o)}s=s.next}while(s!==r)}}function di(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Im(e){var t=e.alternate;t!==null&&(e.alternate=null,Im(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pt],delete t[us],delete t[Ha],delete t[H0],delete t[W0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pm(e){return e.tag===5||e.tag===3||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Do));else if(r!==4&&(e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}var pe=null,rt=!1;function Lt(e,t,n){for(n=n.child;n!==null;)jm(e,t,n),n=n.sibling}function jm(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(si,n)}catch{}switch(n.tag){case 5:Ee||Kn(n,t);case 6:var r=pe,s=rt;pe=null,Lt(e,t,n),pe=r,rt=s,pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?qi(e.parentNode,n):e.nodeType===1&&qi(e,n),ss(e)):qi(pe,n.stateNode));break;case 4:r=pe,s=rt,pe=n.stateNode.containerInfo,rt=!0,Lt(e,t,n),pe=r,rt=s;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&nl(n,t,i),s=s.next}while(s!==r)}Lt(e,t,n);break;case 1:if(!Ee&&(Kn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ne(n,t,a)}Lt(e,t,n);break;case 21:Lt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Lt(e,t,n),Ee=r):Lt(e,t,n);break;default:Lt(e,t,n)}}function rf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i_),t.forEach(function(r){var s=g_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u_(r/1960))-r,10e?16:e,Wt===null)var r=!1;else{if(e=Wt,Wt=null,Qo=0,H&6)throw Error(k(331));var s=H;for(H|=4,O=e.current;O!==null;){var o=O,i=o.child;if(O.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lse()-_u?_n(e,0):yu|=n),je(e,t)}function zm(e,t){t===0&&(e.mode&1?(t=Hs,Hs<<=1,!(Hs&130023424)&&(Hs=4194304)):t=1);var n=Ne();e=Pt(e,t),e!==null&&(Es(e,t,n),je(e,n))}function h_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zm(e,n)}function g_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),zm(e,n)}var Bm;Bm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Oe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Oe=!1,r_(e,t,n);Oe=!!(e.flags&131072)}else Oe=!1,J&&t.flags&1048576&&qp(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;go(e,t),e=t.pendingProps;var s=sr(t,we.current);tr(t,n),s=fu(null,t,r,e,s,n);var o=du();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(o=!0,Fo(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,iu(t),s.updater=fi,t.stateNode=s,s._reactInternals=t,Ka(t,r,e,n),t=Ja(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Zl(t),ke(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(go(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=__(r),e=nt(r,e),s){case 0:t=Ya(null,t,r,e,n);break e;case 1:t=Jc(null,t,r,e,n);break e;case 11:t=Xc(null,t,r,e,n);break e;case 14:t=Yc(null,t,r,nt(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Ya(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Jc(e,t,r,s,n);case 3:e:{if(Nm(t),e===null)throw Error(k(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Jp(e,t),Bo(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=lr(Error(k(423)),t),t=Zc(e,t,r,n,s);break e}else if(r!==s){s=lr(Error(k(424)),t),t=Zc(e,t,r,n,s);break e}else for(Ue=Qt(t.stateNode.containerInfo.firstChild),ze=t,J=!0,st=null,n=Xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(or(),r===s){t=jt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Zp(t),e===null&&qa(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,za(r,s)?i=null:o!==null&&za(r,o)&&(t.flags|=32),km(e,t),ke(e,t,i,n),t.child;case 6:return e===null&&qa(t),null;case 13:return Rm(e,t,n);case 4:return au(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ir(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Xc(e,t,r,s,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Q($o,r._currentValue),r._currentValue=i,o!==null)if(lt(o.value,i)){if(o.children===s.children&&!Ie.current){t=jt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Ct(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ga(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(k(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ga(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ke(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,tr(t,n),s=Ye(s),r=r(s),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,s=nt(r,t.pendingProps),s=nt(r.type,s),Yc(e,t,r,s,n);case 15:return xm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),go(e,t),t.tag=1,Pe(r)?(e=!0,Fo(t)):e=!1,tr(t,n),vm(t,r,s),Ka(t,r,s,n),Ja(null,t,r,!0,e,n);case 19:return Cm(e,t,n);case 22:return wm(e,t,n)}throw Error(k(156,t.tag))};function Hm(e,t){return gp(e,t)}function y_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qe(e,t,n,r){return new y_(e,t,n,r)}function xu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function __(e){if(typeof e=="function")return xu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zl)return 11;if(e===Bl)return 14}return 2}function Jt(e,t){var n=e.alternate;return n===null?(n=Qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vo(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")xu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $n:return vn(n.children,s,o,t);case $l:i=8,s|=8;break;case va:return e=Qe(12,n,t,s|2),e.elementType=va,e.lanes=o,e;case Sa:return e=Qe(13,n,t,s),e.elementType=Sa,e.lanes=o,e;case Ea:return e=Qe(19,n,t,s),e.elementType=Ea,e.lanes=o,e;case Zd:return mi(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yd:i=10;break e;case Jd:i=9;break e;case zl:i=11;break e;case Bl:i=14;break e;case Ut:i=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Qe(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function vn(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function mi(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Zd,e.lanes=n,e.stateNode={isHidden:!1},e}function ea(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function ta(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v_(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Di(0),this.expirationTimes=Di(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Di(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function wu(e,t,n,r,s,o,i,a,l){return e=new v_(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Qe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iu(o),e}function S_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gm)}catch(e){console.error(e)}}Gm(),Gd.exports=He;var N_=Gd.exports,df=N_;ya.createRoot=df.createRoot,ya.hydrateRoot=df.hydrateRoot;const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,B=globalThis,Zt="10.70.0";function vi(){return Si(B),B}function Si(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Zt,t[Zt]=t[Zt]||{}}function _r(e,t,n=B){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Zt]=r[Zt]||{};return s[e]||(s[e]=t())}const R_=["debug","info","warn","error","log","assert","trace"],C_="Sentry Logger ",Yo={};function vr(e){if(!("console"in B))return e();const t=B.console,n={},r=Object.keys(Yo);r.forEach(s=>{const o=Yo[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function T_(){Tu().enabled=!0}function b_(){Tu().enabled=!1}function Qm(){return Tu().enabled}function O_(...e){Cu("log",...e)}function I_(...e){Cu("warn",...e)}function P_(...e){Cu("error",...e)}function Cu(e,...t){F&&Qm()&&vr(()=>{B.console[e](`${C_}[${e}]:`,...t)})}function Tu(){return F?_r("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const A={enable:T_,disable:b_,isEnabled:Qm,log:O_,warn:I_,error:P_},Km=50,Cn="?",pf=/\(error: (.*)\)/,mf=/captureMessage|captureException/;function Xm(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(` +`);for(let a=r;a1024&&(l=l.slice(0,1024));const u=pf.test(l)?l.replace(pf,"$1"):l;if(!u.includes("Error: ")){for(const c of t){const d=c(u);if(d){o.push(d);break}}if(o.length>=Km+s)break}}return A_(o.slice(s))}}function j_(e){return Array.isArray(e)?Xm(...e):e}function A_(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(to(t).function||"")&&t.pop(),t.reverse(),mf.test(to(t).function||"")&&(t.pop(),mf.test(to(t).function||"")&&t.pop()),t.slice(0,Km).map(n=>({...n,filename:n.filename||to(t).filename,function:n.function||Cn}))}function to(e){return e[e.length-1]||{}}const na="";function nn(e){try{return!e||typeof e!="function"?na:e.name||na}catch{return na}}function hf(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const zr={},gf={};function jn(e,t){return zr[e]=zr[e]||[],zr[e].push(t),()=>{const n=zr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function An(e,t){if(!gf[e]){gf[e]=!0;try{t()}catch(n){F&&A.error(`Error while instrumenting ${e}`,n)}}}function at(e,t){const n=e&&zr[e];if(n)for(const r of n)try{r(t)}catch(s){F&&A.error(`Error while triggering instrumentation handler. +Type: ${e} +Name: ${nn(r)} +Error:`,s)}}let ra=null;function D_(e){const t="error";jn(t,e),An(t,L_)}function L_(){ra=B.onerror,B.onerror=function(e,t,n,r,s){return at("error",{column:r,error:s,line:n,msg:e,url:t}),ra?ra.apply(this,arguments):!1},B.onerror.__SENTRY_INSTRUMENTED__=!0}let sa=null;function F_(e){const t="unhandledrejection";jn(t,e),An(t,M_)}function M_(){sa=B.onunhandledrejection,B.onunhandledrejection=function(e){return at("unhandledrejection",e),sa?sa.apply(this,arguments):!0},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ym=Object.prototype.toString;function gt(e){switch(Ym.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ou(e,Error)}}function Sr(e,t){return Ym.call(e)===`[object ${t}]`}function Jm(e){return Sr(e,"ErrorEvent")}function yf(e){return Sr(e,"DOMError")}function U_(e){return Sr(e,"DOMException")}function Tt(e){return Sr(e,"String")}function bu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ns(e){return e===null||bu(e)||typeof e!="object"&&typeof e!="function"}function gs(e){return Sr(e,"Object")}function Ei(e){return typeof e=="object"&&e!==null}function xi(e){return typeof Event<"u"&&Ou(e,Event)}function $_(e){return Sr(e,"RegExp")}function Rs(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Ou(e,t){try{return e instanceof t}catch{return!1}}function Zm(e){return typeof Request<"u"&&Ou(e,Request)}function $e(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&eh(s,r);try{e[t]=s}catch{F&&A.log(`Failed to replace method "${t}" in object`,e)}}function rn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{F&&A.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function eh(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,rn(e,"__sentry_original__",t)}catch{}}function Iu(e){return e.__sentry_original__}function th(e){if(gt(e))return{message:e.message,name:e.name,stack:e.stack,..._f(e)};if(xi(e)){const{type:t,target:n,currentTarget:r,detail:s}=e;return{type:t,target:n,currentTarget:r,...s?{detail:s}:{},..._f(e)}}return e}function _f(e){return Ei(e)?Object.fromEntries(Object.entries(e)):{}}function z_(e){const t=Object.keys(th(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Fn;function wi(e){if(Fn!==void 0)return Fn?Fn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=B;return t in n&&typeof n[t]=="function"?(Fn=n[t],Fn(e)):(Fn=null,e())}function Jo(){return wi(()=>Math.random())}function Er(){return wi(()=>Date.now())}const B_=Symbol.for("sentry.skipNormalization"),H_=Symbol.for("sentry.overrideNormalizationDepth");function W_(e){return!!e[B_]}function V_(e){const t=e[H_];return typeof t=="number"?t:void 0}let cl;function nh(e){cl=e}function wt(e,t=100,n=1/0){try{return fl("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function rh(e,t=3,n=100*1024){const r=wt(e,t);return Q_(r)>n?rh(e,t-1,n):r}function fl(e,t,n=1/0,r=1/0,s=K_()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=sh(e,t);if(!a.startsWith("[object "))return a;if(W_(t))return t;const l=V_(t),u=l!==void 0?l:n;if(u===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const v=c.toJSON();return fl("",v,u-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const _=th(t);for(const v in _){if(!Object.prototype.hasOwnProperty.call(_,v))continue;if(h>=r){d[v]="[MaxProperties ~]";break}const E=_[v];d[v]=fl(v,E,u-1,r,s),h++}return i(t),d}function sh(e,t){try{if(cl){const r=cl(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${nn(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${q_(t)}]`}catch(n){return`**non-serializable** (${n})`}}function q_(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function G_(e){return~-encodeURI(e).split(/%..|./).length}function Q_(e){return G_(JSON.stringify(e))}function K_(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function dl(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function vf(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;re.randomUUID()).replace(/-/g,"")}catch{}return oa||(oa="10000000100040008000"+1e11),oa.replace(/[018]/g,t=>(t^(Y_()&15)>>t/4).toString(16))}function oh(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function pn(e){const{message:t,event_id:n}=e;if(t)return t;const r=oh(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function pl(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Sn(e,t){const n=oh(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s==null?void 0:s.data,...t.data};n.mechanism.data=o}}function Sf(e){if(J_(e))return!0;try{rn(e,"__sentry_captured__",!0)}catch{}return!1}function J_(e){try{return e.__sentry_captured__}catch{}}const ih=1e3;function Ts(){return Er()/ih}function Z_(){const{performance:e}=B;if(!(e!=null&&e.now)||!e.timeOrigin)return Ts;const t=e.timeOrigin;return()=>(t+wi(()=>e.now()))/ih}let Ef;function bt(){return(Ef??(Ef=Z_()))()}function ev(e){const t=bt(),n={sid:Xe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>nv(n)};return e&&cr(n,e),n}function cr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||bt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Xe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function tv(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),cr(e,n)}function nv(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function bs(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=bs(r[s],t[s],n-1));return r}function xf(){return Xe()}function ah(){return Xe().substring(16)}function rv(e){try{const t=B.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function lh(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const ml="_sentrySpan";function wf(e,t){t?rn(e,ml,rv(t)):delete e[ml]}function kf(e){return lh(e[ml])}const sv=100;class ut{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:xf(),sampleRand:Jo()}}clone(){const t=new ut;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,wf(t,kf(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&cr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof ut?n.getScopeData():gs(n)?t:void 0,{tags:s,attributes:o,extra:i,user:a,contexts:l,level:u,fingerprint:c=[],propagationContext:d,conversationId:h}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),h&&(this._conversationId=h),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,wf(this,void 0),this._attachments=[],this.setPropagationContext({traceId:xf(),sampleRand:Jo()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var o;const r=typeof n=="number"?n:sv;if(r<=0)return this;const s={timestamp:Ts(),...t,message:t.message?dl(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:kf(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=bs(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Xe();if(!this._client)return F&&A.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||Xe();if(!this._client)return F&&A.warn("No client configured on scope - will not capture message!"),s;const o=(r==null?void 0:r.syntheticException)??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=t.event_id||(n==null?void 0:n.event_id)||Xe();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(F&&A.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function ov(){return _r("defaultCurrentScope",()=>new ut)}function iv(){return _r("defaultIsolationScope",()=>new ut)}const Nf=e=>e instanceof Promise&&!e[uh],uh=Symbol("chained PromiseLike"),av=(e,t,n)=>{const r=e.then(s=>(t(s),s),s=>{throw n(s),s});return Nf(r)&&Nf(e)?r:lv(e,r)},lv=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];typeof s=="function"?Object.defineProperty(t,r,{value:(...o)=>s.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[uh]:!0}),t};class uv{constructor(t,n){let r;t?r=t:r=new ut;let s;n?s=n:s=new ut,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Rs(r)?av(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function fr(){const e=vi(),t=Si(e);return t.stack=t.stack||new uv(ov(),iv())}function cv(e){return fr().withScope(e)}function fv(e,t){const n=fr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Rf(e){return fr().withScope(()=>e(fr().getIsolationScope()))}function dv(){return{withIsolationScope:Rf,withScope:cv,withSetScope:fv,withSetIsolationScope:(e,t)=>Rf(t),getCurrentScope:()=>fr().getScope(),getIsolationScope:()=>fr().getIsolationScope()}}function Pu(e){const t=Si(e);return t.acs?t.acs:dv()}function pv(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function mv(e,t){const{value:n,unit:r}=pv(e)?e:{value:e,unit:void 0},s=hv(n),o=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...o}}function Cf(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const o=mv(s,t);o&&(n[r]=o)}return n}function hv(e){if(Array.isArray(e))return{value:e,type:"array"};const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function ct(){const e=vi();return Pu(e).getCurrentScope()}function yt(){const e=vi();return Pu(e).getIsolationScope()}function ch(){return _r("globalScope",()=>new ut)}function ju(...e){const t=vi(),n=Pu(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function ue(){return ct().getClient()}function gv(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||ah()};return r&&(o.parent_span_id=r),o}const fh="sentry.source",dh="sentry.sample_rate",yv="sentry.previous_trace_sample_rate",Au="sentry.op",ph="sentry.origin",mh="sentry.profile_id",hh="sentry.exclusive_time",_v="gen_ai.conversation.id",vv=0,Sv=1,Ev="_sentryScope",xv="_sentryIsolationScope";function hl(e){const t=e;return{scope:t[Ev],isolationScope:lh(t[xv])}}const Tf="sentry-";function wv(e){const t=kv(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.startsWith(Tf)){const i=s.slice(Tf.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function kv(e){if(!(!e||!Tt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=bf(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):bf(e)}function bf(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const Nv=/^o(\d+)\./,Rv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Cv(e){return e==="http"||e==="https"}function xr(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Tv(e){const t=Rv.exec(e);if(!t){vr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return gh({host:o,pass:s,path:l,projectId:u,port:i,protocol:n,publicKey:r})}function gh(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bv(e){if(!F)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(A.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Cv(r)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ov(e){const t=e.match(Nv);return t==null?void 0:t[1]}function Iv(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Ov(n)),r}function yh(e){const t=typeof e=="string"?Tv(e):gh(e);if(!(!t||!bv(t)))return t}function Pv(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const _h=1;let Of=!1;function jv(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:Os(e).parent_span_id,o=hl(e).scope,i=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||ah():t;return{parent_span_id:s,span_id:i,trace_id:n}}function Av(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===_h,attributes:o,...s}))}function If(e){return typeof e=="number"?Pf(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Pf(e.getTime()):bt()}function Pf(e){return e>9999999999?e/1e3:e}function Os(e){if(Mv(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Fv(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:l}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:Dv(e),start_timestamp:If(s),timestamp:If(i)||void 0,status:$v(a),op:r[Au],origin:r[ph],links:Av(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dv(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function Lv(e){var t;return{...e,attributes:Cf(e.attributes),links:(t=e.links)==null?void 0:t.map(n=>({...n,attributes:Cf(n.attributes)}))}}function Fv(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Mv(e){return typeof e.getSpanJSON=="function"}function Uv(e){const{traceFlags:t}=e.spanContext();return t===_h}function $v(e){if(!(!e||e.code===vv))return e.code===Sv?"ok":e.message||"internal_error"}const zv="_sentryRootSpan",Du=Bv;function Bv(e){return e[zv]||e}function jf(){Of||(vr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Of=!0)}function Af(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=ue())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Df(e){A.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Lf(e,t){if(!(t!=null&&t.length))return!1;for(const n of t){if(Vv(n)){if(e.description&&Jr(e.description,n))return F&&Df(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const s=n.name?e.description&&Jr(e.description,n.name):!0,o=n.op?e.op&&Jr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,l])=>{var u;return Hv((u=e.attributes)==null?void 0:u[a],l)}):!0;if(s&&o&&i)return F&&Df(e),!0}return!1}function Hv(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Jr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Wv(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function Vv(e){return typeof e=="string"||e instanceof RegExp}const qv=Symbol.for("sentry.nonRecordingSpan");function Gv(e){return!!e&&e[qv]===!0}const Lu="production",Qv="_frozenDsc";function vh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Lu,release:n.release,public_key:r,trace_id:e,org_id:Iv(t)};return t.emit("createDsc",s),s}function Sh(e,t){const n=t.getPropagationContext();return n.dsc||vh(n.traceId,e)}function Kv(e){var w;const t=ue();if(!t)return{};const n=Du(e),r=Os(n),s=r.data,o=n.spanContext().traceState,i=(o==null?void 0:o.get("sentry.sample_rate"))??s[dh]??s[yv];function a(f){return(typeof i=="number"||typeof i=="string")&&(f.sample_rate=`${i}`),f}const l=n[Qv];if(l)return a(l);const u=Gv(n),c=u&&n.dropReason==="ignored";if(u&&(!Af(t.getOptions())||c)){const f=hl(n).scope;if(f){const p={...Sh(t,f)};return c&&(p.sampled="false"),a(p)}}const d=o==null?void 0:o.get("sentry.dsc"),h=d&&wv(d);if(h)return a(h);const _=vh(e.spanContext().traceId,t),v=s[fh]??s["sentry.segment.name.source"],E=r.description;return v!=="url"&&E&&(_.transaction=E),Af()&&(_.sampled=String(Uv(n)),_.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((w=hl(n).scope)==null?void 0:w.getPropagationContext().sampleRand.toString())),a(_),t.emit("createDsc",_,n),_}function Xv(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function wr(e,t=[]){return[e,t]}function Ff(e,t){const[n,r]=e;return[n,[...r,t]]}function gl(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Yv(e,t){return gl(e,(n,r)=>t.includes(r))}function yl(e){const t=Si(B);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Jv(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[yl(r),o]:r.push(typeof o=="string"?yl(o):o)}for(const o of n){const[i,a]=o;if(s(` +${JSON.stringify(i)} +`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(wt(a))}s(l)}}return typeof r=="string"?r:Zv(r)}function Zv(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function eS(e){const t=typeof e.data=="string"?yl(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Eh={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function tS(e){return e in Eh}function Mf(e){return tS(e)?Eh[e]:e}function xh(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function nS(e,t,n,r){var o;const s=(o=e.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Er()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:xr(r)},...s&&{trace:s}}}function rS(e,t){var r,s,o,i;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((s=e.sdk)==null?void 0:s.packages)||[],...t.packages||[]],settings:(o=e.sdk)!=null&&o.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function sS(e,t,n,r){const s=xh(n),o={sent_at:new Date(Er()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:xr(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return wr(o,[i])}function oS(e,t,n,r){const s=xh(n),o=e.type&&e.type!=="replay_event"?e.type:"event";rS(e,n==null?void 0:n.sdk);const i=nS(e,s,r,t);return delete e.sdkProcessingMetadata,wr(i,[[{type:o},e]])}function iS(e){return e.getOptions().traceLifecycle==="stream"}function aS(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;lS(e,t),r&&fS(e,r),dS(e,n),uS(e,s),cS(e,o)}function Uf(e,t){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:a,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:d,attachments:h,propagationContext:_,transactionName:v,span:E}=t;Dr(e,"extra",n),Dr(e,"tags",r),Dr(e,"attributes",s),Dr(e,"user",o),Dr(e,"contexts",i),e.sdkProcessingMetadata=bs(e.sdkProcessingMetadata,l,2),a&&(e.level=a),v&&(e.transactionName=v),E&&(e.span=E),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,..._}}function Dr(e,t,n){e[t]=bs(e[t],n,1)}function wh(e,t){const n=ch().getScopeData();return e&&Uf(n,e.getScopeData()),t&&Uf(n,t.getScopeData()),n}function lS(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function uS(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function cS(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fS(e,t){e.contexts={trace:jv(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Kv(t),...e.sdkProcessingMetadata};const n=Du(t),r=Os(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function dS(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const pS="url.full";function kh(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const ia=0,$f=1,zf=2;function Is(e){return new ys(t=>{t(e)})}function Nh(e){return new ys((t,n)=>{n(e)})}class ys{constructor(t){this._state=ia,this._handlers=[],this._runExecutor(t)}then(t,n){return new ys((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ys((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===ia)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===$f&&n[1](this._value),this._state===zf&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===ia){if(Rs(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n($f,o)},s=o=>{n(zf,o)};try{t(r,s)}catch(o){s(o)}}}function mS(e,t,n,r=0){try{const s=_l(t,n,e,r);return Rs(s)?s:Is(s)}catch(s){return Nh(s)}}function _l(e,t,n,r){const s=n[r];if(!e||!s)return e;const o=s({...e},t);return F&&o===null&&A.log(`Event processor "${s.id||"?"}" dropped event`),Rs(o)?o.then(i=>_l(i,t,n,r+1)):_l(o,t,n,r+1)}let Et,Bf,Hf,Ft;function hS(e){const t=B._sentryDebugIds,n=B._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ft&&r.length===Bf&&s.length===Hf)return Ft;Bf=r.length,Hf=s.length,Ft={},Et||(Et={});const o=(i,a)=>{for(const l of i){const u=a[l],c=Et==null?void 0:Et[l];if(c&&Ft&&u)Ft[c[0]]=u,Et&&(Et[l]=[c[0],u]);else if(u){const d=e(l);for(let h=d.length-1;h>=0;h--){const _=d[h],v=_==null?void 0:_.filename;if(v&&Ft&&Et){Ft[v]=u,Et[l]=[v,u];break}}}}};return t&&o(r,t),n&&o(s,n),Ft}function gS(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Xe(),timestamp:t.timestamp||Ts()},u=n.integrations||e.integrations.map(f=>f.name);yS(l,e),SS(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&_S(l,e.stackParser);const c=xS(r,n.captureContext);n.mechanism&&Sn(l,n.mechanism);const d=s?s.getEventProcessors():[],h=wh(o,c),_=[...n.attachments||[],...h.attachments];_.length&&(n.attachments=_),aS(l,h);const v=[...d,...h.eventProcessors];return(n.data&&n.data.__sentry__===!0?Is(l):mS(v,l,n)).then(f=>(f&&vS(f),typeof i=="number"&&i>0?ES(f,i,a):f))}function yS(e,t){var a,l;const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||Lu,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i!=null&&i.url&&o&&(i.url=dl(i.url,o)),o&&((l=(a=e.exception)==null?void 0:a.values)==null||l.forEach(u=>{u.value&&(u.value=dl(u.value,o))}))}function _S(e,t){var r,s;const n=hS(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,a;(a=(i=o.stacktrace)==null?void 0:i.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function vS(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,a;(a=(i=o.stacktrace)==null?void 0:i.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([o,i])=>{n.push({type:"sourcemap",code_file:o,debug_id:i})})}function SS(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ES(e,t,n){var s,o;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:wt(i.data,t,n)}}))},...e.user&&{user:wt(e.user,t,n)},...e.contexts&&{contexts:wt(e.contexts,t,n)},...e.extra&&{extra:wt(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=wt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:wt(i.data,t,n)}}))),(o=e.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=wt(e.contexts.flags,3,n)),r}function xS(e,t){if(!t)return e;const n=e?e.clone():new ut;return n.update(t),n}function wS(e){if(e)return kS(e)?{captureContext:e}:RS(e)?{captureContext:e}:e}function kS(e){return e instanceof ut||typeof e=="function"}const NS=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function RS(e){return Object.keys(e).some(t=>NS.includes(t))}function Fu(e,t){return ct().captureException(e,wS(t))}function Mu(e,t){return ct().captureEvent(e,t)}function Rh(e,t){yt().setContext(e,t)}function Ch(){return yt().lastEventId()}function vl(e){const t=yt(),{user:n}=wh(t,ct()),{userAgent:r}=B.navigator||{},s=ev({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return(o==null?void 0:o.status)==="ok"&&cr(o,{status:"exited"}),Uu(),t.setSession(s),s}function Uu(){const e=yt(),n=ct().getSession()||e.getSession();n&&tv(n),Th(),e.setSession()}function Th(){const e=yt(),t=ue(),n=e.getSession();n&&t&&t.captureSession(n)}function So(e=!1){if(e){Uu();return}Th()}function bh(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const CS="7";function Oh(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function TS(e){return`${Oh(e)}${e.projectId}/envelope/`}function bS(e,t){const n={sentry_version:CS};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function OS(e,t,n){return t||`${TS(e)}?${bS(e,n)}`}function IS(e,t){const n=yh(e);if(!n)return"";const r=`${Oh(n)}embed/error-page/`;let s=`dsn=${xr(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Wf=[];function PS(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function jS(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return PS(r)}function AS(e,t){const n={};return t.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Ih(e,r,n)}),n}function Vf(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function Ih(e,t,n){if(n[t.name]){F&&A.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Wf.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Wf.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}["processSpan","processSegmentSpan"].forEach(r=>{const s=t[r];typeof s=="function"&&e.on(r,o=>s.call(t,o,e))}),F&&A.log(`Integration installed: ${t.name}`)}function DS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function LS(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function FS(){return!DS()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function $u(){return typeof window<"u"&&(!FS()||MS())}function MS(){const e=B.process;return(e==null?void 0:e.type)==="renderer"}function US(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function $S(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=xr(r)),wr(o,[US(e,s)])}function zS(e,t){const n=t??BS(e)??[];if(n.length===0)return;const r=e.getOptions(),s=$S(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ph().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function BS(e){return Ph().get(e)}function Ph(){return _r("clientToLogBufferMap",()=>new WeakMap)}function HS(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function WS(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=xr(r)),wr(o,[HS(e,s)])}function VS(e,t){const n=t??qS(e)??[];if(n.length===0)return;const r=e.getOptions(),s=WS(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);jh().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function qS(e){return jh().get(e)}function jh(){return _r("clientToMetricBufferMap",()=>new WeakMap)}function GS(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return Lv(t)}function QS(e,t){var o,i,a;if(e.type!=="transaction"||!((o=e.spans)!=null&&o.length)||!((i=e.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||t.getOptions().streamGenAiSpans===!1||iS(t))return;const n=[],r=[];for(const l of e.spans)(a=l.op)!=null&&a.startsWith("gen_ai.")?n.push(GS(l)):r.push(l);if(n.length===0)return;e.spans=r;const s=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}const zu=Symbol.for("SentryBufferFullError");function Bu(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function o(i){if(!t.size)return Is(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const l=[a,new Promise(u=>bh(setTimeout(()=>u(!1),i)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:s,drain:o}}const KS=60*1e3;function XS(e,t=Er()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?KS:r-t}function YS(e,t){return e[t]||e.all||0}function JS(e,t,n=Er()){return YS(e,t)>n}function ZS(e,{statusCode:t,headers:n},r=Er()){const s={...e},o=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),h=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+h;else for(const _ of u.split(";"))_==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[_]=r+h):s[_]=r+h}else i?s.all=r+XS(i,r):t===429&&(s.all=r+60*1e3);return s}const Ah=64;function Dh(e,t,n=Bu(e.bufferSize||Ah)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(gl(i,(d,h)=>{const _=Mf(h);JS(r,_)?e.recordDroppedEvent("ratelimit_backoff",_):a.push(d)}),a.length===0)return Promise.resolve({});const l=wr(i[0],a),u=d=>{if(Yv(l,["client_report"])){F&&A.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}gl(l,(h,_)=>{e.recordDroppedEvent(d,Mf(_))})},c=()=>t({body:Jv(l)}).then(d=>d.statusCode===413?(F&&A.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),d):(F&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&A.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=ZS(r,d),d),d=>{throw u("network_error"),F&&A.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===zu)return F&&A.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:s}}function eE(e,t,n){const r=[{type:"client_report"},{timestamp:Ts(),discarded_events:e}];return wr(t?{dsn:t}:{},[r])}function Lh(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function tE(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i==null?void 0:i[mh],exclusive_time:i==null?void 0:i[hh],measurements:e.measurements,is_segment:!0}}function nE(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[mh]:e.profile_id},...e.exclusive_time&&{[hh]:e.exclusive_time}}}},measurements:e.measurements}}const no=["forwarded","-ip","remote-","via","-user"];function rE(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:no},httpHeaders:{request:{deny:no},response:{deny:no}},httpBodies:[],urlQueryParams:{deny:no},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const sE={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function oE(e){var r,s,o,i,a,l;const t=e.dataCollection!=null?sE:rE(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:((r=n.httpHeaders)==null?void 0:r.request)??t.httpHeaders.request,response:((s=n.httpHeaders)==null?void 0:s.response)??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:((o=n.graphQL)==null?void 0:o.document)??t.graphQL.document,variables:((i=n.graphQL)==null?void 0:i.variables)??t.graphQL.variables},genAI:{inputs:((a=n.genAI)==null?void 0:a.inputs)??t.genAI.inputs,outputs:((l=n.genAI)==null?void 0:l.outputs)??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const qf="Not capturing exception because it's already been captured.",Gf="Discarded session because of missing or non-string release",Fh=Symbol.for("SentryInternalError"),Mh=Symbol.for("SentryDoNotSendEventError"),iE=5e3;function Eo(e){return{message:e,[Fh]:!0}}function aa(e){return{message:e,[Mh]:!0}}function Qf(e){return Ei(e)&&Fh in e}function Kf(e){return Ei(e)&&Mh in e}function Xf(e,t,n,r,s){let o=0,i,a=!1;e.on(n,()=>{o=0,clearTimeout(i),a=!1}),e.on(t,l=>{if(o+=r(l),o>=8e5)s(e);else if(!a){const u=e.getOptions()._flushInterval??iE;u>0&&(a=!0,i=bh(setTimeout(()=>{s(e)},u)))}}),e.on("flush",()=>{s(e)})}class aE{constructor(t){var r,s,o;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Bu(((r=t.transportOptions)==null?void 0:r.bufferSize)??Ah),this._dataCollection=oE(t),t.dsn?this._dsn=yh(t.dsn):F&&A.warn("No DSN provided, client will not send events."),this._dsn){const i=OS(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}this._options.enableLogs=this._options.enableLogs??((s=this._options._experiments)==null?void 0:s.enableLogs),this._options.enableLogs&&Xf(this,"afterCaptureLog","flushLogs",fE,zS),(this._options.enableMetrics??((o=this._options._experiments)==null?void 0:o.enableMetrics)??!0)&&Xf(this,"afterCaptureMetric","flushMetrics",cE,VS)}captureException(t,n,r){const s=Xe();if(Sf(t))return F&&A.log(qf),s;const o={event_id:s,...n};return this._process(()=>this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r)).then(i=>i),"error"),o.event_id}captureMessage(t,n,r,s){const o={event_id:Xe(),...r},i=bu(t)?t:String(t),a=Ns(t),l=a?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(()=>l.then(u=>this._captureEvent(u,o,s)),a?"unknown":"error"),o.event_id}captureEvent(t,n,r){const s=Xe();if(n!=null&&n.originalException&&Sf(n.originalException))return F&&A.log(qf),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,l=i.capturedSpanIsolationScope,u=Yf(t.type);return this._process(()=>this._captureEvent(t,o,a||r,l),u),o.event_id}captureSession(t){this.sendSession(t),cr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Ih(this,t,this._integrations),n||Vf(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=QS(t,this);let s=oS(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])s=Ff(s,eS(o));r&&(s=Ff(s,r)),this.sendEnvelope(s).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Lu}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){F&&A.warn(Gf);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){F&&A.warn(Gf);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=sS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;F&&A.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return F&&A.error("Error while sending envelope:",n),{}}return F&&A.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=AS(this,t),Vf(this,t)}_updateSessionFromEvent(t,n){var l,u;let r=n.level==="fatal",s=!1;const o=(l=n.exception)==null?void 0:l.values;if(o){s=!0,r=!1;for(const c of o)if(((u=c.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(cr(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),gS(o,t,n,r,this,s).then(a=>{var u;if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...(u=a.contexts)==null?void 0:u.trace,...gv(r)},...a.contexts};const l=Sh(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=ct(),s=yt()){return F&&Sl(t)&&A.log(`Captured error event \`${Lh(t)[0]||""}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{F&&(Kf(o)?A.log(o.message):Qf(o)?A.warn(o.message):A.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=Uh(t),l=Sl(t),c=`before send for type \`${t.type||"error"}\``,d=typeof i>"u"?void 0:Pv(i),h=Yf(t.type);return this._prepareEvent(t,n,r,s).then(_=>{var w;if(_===null)throw this.recordDroppedEvent("event_processor",h),aa("An event processor returned `null`, will not send event.");if(((w=n.data)==null?void 0:w.__sentry__)===!0)return _;const E=uE(this,o,_,n);return lE(E,c)}).then(_=>{var w;if(_===null){if(this.recordDroppedEvent("before_send",h),a){const p=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",p)}throw aa(`${c} returned \`null\`, will not send event.`)}const v=r.getSession()||s.getSession();if(l&&v&&this._updateSessionFromEvent(v,_),l&&typeof d=="number"&&Jo()>d)throw this.recordDroppedEvent("sample_rate","error"),aa(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const f=((w=_.sdkProcessingMetadata)==null?void 0:w.spanCountBeforeProcessing)||0,p=_.spans?_.spans.length:0,g=f-p;g>0&&this.recordDroppedEvent("before_send","span",g)}const E=_.transaction_info;if(a&&E&&_.transaction!==t.transaction){const f="custom";_.transaction_info={...E,source:f}}return this.sendEvent(_,n),_}).then(null,_=>{throw Kf(_)||Qf(_)?_:(this.captureException(_,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:_}),Eo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${_}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===zu&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){F&&A.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){F&&A.log("No outcomes to send");return}if(!this._dsn){F&&A.log("No dsn provided, will not send outcomes");return}F&&A.log("Sending outcomes:",t);const n=eE(t,this._options.tunnel&&xr(this._dsn));this.sendEnvelope(n)}}function Yf(e){return e==="replay_event"?"replay":e||"error"}function lE(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Rs(e))return e.then(r=>{if(!gs(r)&&r!==null)throw Eo(n);return r},r=>{throw Eo(`${t} rejected with ${r}`)});if(!gs(e)&&e!==null)throw Eo(n);return e}function uE(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:i}=t,a=!Xv(t.beforeSendSpan)&&t.beforeSendSpan;let l=n;if(Sl(l)&&s)return s(l,r);if(Uh(l)){if(a||i){const u=tE(l);if(i!=null&&i.length&&Lf({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const c=a(u);c?l=bs(n,nE(c)):jf()}if(l.spans){const c=[],d=l.spans;for(const _ of d){if(i!=null&&i.length&&Lf({description:_.description,op:_.op,attributes:_.data},i)){Wv(d,_);continue}if(a){const v=a(_);v?c.push(v):(jf(),c.push(_))}else c.push(_)}const h=l.spans.length-c.length;h&&e.recordDroppedEvent("before_send","span",h),l.spans=c}}if(o){if(l.spans){const u=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(l,r)}}return l}function Sl(e){return e.type===void 0}function Uh(e){return e.type==="transaction"}function cE(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+$h(e.attributes)}function fE(e){let t=0;return e.message&&(t+=e.message.length*2),t+$h(e.attributes)}function $h(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Jf(n[0]):Ns(n)?t+=Jf(n):t+=100}),t}function Jf(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function dE(e,t){t.debug===!0&&(F?A.enable():vr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ct().update(t.initialScope);const r=new e(t);return zh(r),r.init(),r}function zh(e){ct().setClient(e)}function la(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function pE(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),o=e.indexOf(",");let i="";if(t&&o!==-1){const a=e.slice(o+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return e}function mE(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Bh(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Zt})),s.version=Zt)}const hE=100;function sn(e,t){const n=ue(),r=yt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=hE}=n.getOptions();if(o<=0)return;const a={timestamp:Ts(),...e},l=s?vr(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}const gE="FunctionToString",Zf=new WeakMap,yE=()=>({name:gE,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Iu(this);let r;try{Zf.has(ue())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Zf.set(e,!0)}}),Hh=yE,_E=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],vE="EventFilters",Wh=(e={})=>{let t;return{name:vE,setup(n){const r=n.getOptions();t=ed(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=ed(e,o)}return SE(n,t)?null:n}}},Vh=(e={})=>({...Wh(e),name:"InboundFilters"});function ed(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_E],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function SE(e,t){if(e.type){if(e.type==="transaction"&&xE(e,t.ignoreTransactions))return F&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${pn(e)}`),!0}else{if(EE(e,t.ignoreErrors))return F&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${pn(e)}`),!0;if(RE(e))return F&&A.warn(`Event dropped due to not having an error message, error type or stacktrace. +Event: ${pn(e)}`),!0;if(wE(e,t.denyUrls))return F&&A.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${pn(e)}. +Url: ${Zo(e)}`),!0;if(!kE(e,t.allowUrls))return F&&A.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${pn(e)}. +Url: ${Zo(e)}`),!0}return!1}function EE(e,t){return t!=null&&t.length?Lh(e).some(n=>Cs(n,t)):!1}function xE(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Cs(n,t):!1}function wE(e,t){if(!(t!=null&&t.length))return!1;const n=Zo(e);return n?Cs(n,t):!1}function kE(e,t){if(!(t!=null&&t.length))return!0;const n=Zo(e);return n?Cs(n,t):!0}function NE(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Zo(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(o=>{var i,a,l;return((i=o.mechanism)==null?void 0:i.parent_id)===void 0&&((l=(a=o.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?NE(s):null}catch{return F&&A.error(`Cannot extract url for event ${pn(e)}`),null}}function RE(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function CE(e,t,n,r,s,o){var a;if(!((a=s.exception)!=null&&a.values)||!o||!gt(o.originalException))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=El(e,t,r,o.originalException,n,s.exception.values,i,0))}function El(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let l=[...o];if(gt(r[s])){td(i,a,r);const u=e(t,r[s]),c=l.length;nd(u,s,c,a),l=El(e,t,n,r[s],s,[u,...l],u,c)}return qh(r)&&r.errors.forEach((u,c)=>{if(gt(u)){td(i,a,r);const d=e(t,u),h=l.length;nd(d,`errors[${c}]`,h,a),l=El(e,t,n,u,s,[d,...l],d,h)}}),l}function qh(e){return Array.isArray(e.errors)}function td(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...qh(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function nd(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function TE(e){return gt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function rd(e){return TE(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const sd=new Set([]);function bE(e){const t="console",n=jn(t,e);return An(t,OE),n}const od=new Set;function OE(){"console"in B&&R_.forEach(function(e){od.has(e)||!(e in B.console)||(od.add(e),$e(B.console,e,function(t){return Yo[e]=t,function(...n){const r=n[0],s=Yo[e],o=sd.size&&typeof r=="string"&&Cs(r,sd);o||at("console",{args:n,level:e}),(!o||F&&A.isEnabled())&&(s==null||s.apply(B.console,n))}}))})}function IE(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const PE="Dedupe",jE=()=>{let e;return{name:PE,processEvent(t){if(t.type)return t;try{if(AE(t,e))return F&&A.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Gh=jE;function AE(e,t){return t?!!(DE(e,t)||LE(e,t)):!1}function DE(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Kh(e,t)||!Qh(e,t))}function LE(e,t){const n=id(t),r=id(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Kh(e,t)||!Qh(e,t))}function Qh(e,t){let n=hf(e),r=hf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s({name:FE,setup(e){e.on("spanStart",t=>{const n=ct().getScopeData(),r=yt().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:o,data:i,description:a}=Os(t);if(!(o!=null&&o.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(a!=null&&a.startsWith("ai.")))return;t.setAttribute(_v,s)}})}}),UE=ME;function Xh(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const _s=B;function $E(){return"history"in _s&&!!_s.history}function zE(){if(!("fetch"in _s))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function xl(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function BE(){var n;if(typeof EdgeRuntime=="string")return!0;if(!zE())return!1;if(xl(_s.fetch))return!0;let e=!1;const t=_s.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=xl(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){F&&A.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function HE(e,t){const n="fetch",r=jn(n,e);return An(n,()=>WE(void 0,t)),r}function WE(e,t=!1){t&&!BE()||$e(B,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=VE(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:bt()*1e3,virtualError:s,headers:qE(r)};return at("fetch",{...a}),n.apply(B,r).then(async l=>(at("fetch",{...a,endTimestamp:bt()*1e3,response:l}),l),l=>{at("fetch",{...a,endTimestamp:bt()*1e3,error:l}),gt(l)&&l.stack===void 0&&(l.stack=s.stack,rn(l,"framesToPop",1));const u=ue(),c=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(c!==!1&>(l)&&l.name==="TypeError"&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const _=new URL(a.fetchData.url).host;c==="always"?l.message=`${l.message} (${_})`:rn(l,"__sentry_fetch_url_host__",_)}catch{}throw l})}})}function xo(e,t){return Ei(e)&&!!e[t]}function ad(e){return typeof e=="string"?e:e?xo(e,"url")?e.url:e.toString?e.toString():"":""}function VE(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ad(n),method:xo(r,"method")?String(r.method).toUpperCase():Zm(n)&&xo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ad(t),method:xo(t,"method")?String(t.method).toUpperCase():"GET"}}function qE(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Zm(t))return new Headers(t.headers)}catch{}}const Yh=B;function Hu(){try{return Yh.document.location.href}catch{return""}}function GE(e,t=5){if(!Yh.HTMLElement)return null;let n=e;for(let r=0;r0}function QE(){wl++,setTimeout(()=>{wl--})}function dr(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const o=e.__sentry_wrapped__;return typeof o=="function"?o:e}if(Iu(e))return e}catch{return e}const r=function(...s){B._sentryWrappedDepth=(B._sentryWrappedDepth||0)+1;try{const o=s.map(i=>dr(i,t));return e.apply(this,o)}catch(o){throw QE(),ju(i=>{i.addEventProcessor(a=>(t.mechanism&&(pl(a,void 0),Sn(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Fu(o)}),o}finally{B._sentryWrappedDepth=(B._sentryWrappedDepth||0)-1}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}eh(r,e),rn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ld(){const e=Hu(),{referrer:t}=V.document||{},{userAgent:n}=V.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function ki(e,t){const n=Ni(e,t),r={type:ZE(t),value:ex(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function KE(e,t,n,r){const s=ue(),o=s==null?void 0:s.getOptions().normalizeDepth,i=rx(t),a={__serialized__:rh(t,o)};if(i)return{exception:{values:[ki(e,i)]},extra:a};const l={exception:{values:[{type:xi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:tx(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ni(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function ua(e,t){return{exception:{values:[ki(e,t)]}}}function Ni(e,t){const n=t.stacktrace||t.stack||"",r=YE(t),s=JE(t);try{return e(n,r,s)}catch{}return[]}const XE=/Minified React error #\d+;/i;function YE(e){return e&&XE.test(e.message)?1:0}function JE(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zh(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function ZE(e){const t=e==null?void 0:e.name;return!t&&Zh(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ex(e){const t=e==null?void 0:e.message;return Zh(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?rd(t.error):rd(e):"No error message"}function eg(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,o=Wu(e,t,s,r);return Sn(o),o.level="error",n!=null&&n.event_id&&(o.event_id=n.event_id),Is(o)}function tg(e,t,n="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,i=kl(e,t,o,s);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),Is(i)}function Wu(e,t,n,r,s){var i,a;let o;if(Jm(t)&&t.error)return ua(e,t.error);if(yf(t)||U_(t)){const l=t;if("stack"in t){o=ua(e,t);const u=(a=(i=o.exception)==null?void 0:i.values)==null?void 0:a[0];if(r&&n&&u&&!u.stacktrace){const c=Ni(e,n);c.length&&(u.stacktrace={frames:c},Sn(o,{synthetic:!0}))}}else{const u=l.name||(yf(l)?"DOMError":"DOMException"),c=l.message?`${u}: ${l.message}`:u;o=kl(e,c,n,r),pl(o,c)}return"code"in l&&(o.tags={...o.tags,"DOMException.code":`${l.code}`}),o}return gt(t)?ua(e,t):gs(t)||xi(t)?(o=KE(e,t,n,s),Sn(o,{synthetic:!0}),o):(o=kl(e,t,n,r),pl(o,`${t}`),Sn(o,{synthetic:!0}),o)}function kl(e,t,n,r){const s={};if(r&&n){const o=Ni(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),Sn(s,{synthetic:!0})}if(bu(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function tx(e,{isUnhandledRejection:t}){const n=z_(e),r=t?"promise rejection":"exception";return Jm(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:xi(e)?`Event \`${nx(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function nx(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function rx(e){return Object.values(e).find(gt)}class ng extends aE{constructor(t){var i;const n=sx(t),r=V.SENTRY_SDK_SOURCE||LS();Bh(n,"browser",["browser"],r),super(n);const{userInfo:s}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:s?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:o}=this._options;V.document&&V.document.addEventListener("visibilitychange",()=>{V.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),s&&this.on("beforeSendSession",mE)}eventFromException(t,n){return eg(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return tg(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function sx(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=V.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ox=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,re=B;function ud(e,t,n){re.document&&re.addEventListener(e,t,n)}function cd(e,t,n){re.document&&re.removeEventListener(e,t,n)}const ix=e=>{let t=!1;return()=>{t||(e(),t=!0)}},ax=e=>{var n;const t=re.requestIdleCallback||re.setTimeout;((n=re.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=ix(e),ud("visibilitychange",e,{once:!0,capture:!0}),ud("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),cd("visibilitychange",e,{capture:!0}),cd("pagehide",e,{capture:!0})}))},lx=80,dn={};try{typeof Node<"u"&&(dn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(dn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,dn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,dn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,dn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(dn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Mt(e,t,n){const r=dn[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return typeof s=="function"?s.call(e,n):s}function rg(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||lx;for(;n&&o++1&&i+s.length*l+u.length>=d));)s.push(u),i+=u.length,n=Mt(n,"parentNode");return s.reverse().join(a)}catch{return""}}function ux(e,t){const n=[],r=Mt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const o=Mt(e,"dataset");if(o){if(o.sentryComponent)return o.sentryComponent;if(o.sentryElement)return o.sentryElement}}n.push(r.toLowerCase());const s=t!=null&&t.length?t.filter(o=>Mt(e,"getAttribute",o)).map(o=>[o,Mt(e,"getAttribute",o)]):null;if(s!=null&&s.length)s.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{const o=Mt(e,"id");o&&n.push(`#${o}`);const i=Mt(e,"className");if(i&&Tt(i)){const a=i.split(/\s+/);for(const l of a)n.push(`.${l}`)}}for(const o of["aria-label","type","name","title","alt"]){const i=Mt(e,"getAttribute",o);i&&n.push(`[${o}="${i}"]`)}return n.join("")}const cx=1e3;let fd,Nl,Rl;function fx(e){const t="dom";jn(t,e),An(t,dx)}function dx(){if(!re.document)return;const e=at.bind(null,"dom"),t=dd(e,!0);re.document.addEventListener("click",t,!1),re.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var o,i;const s=(o=re[n])==null?void 0:o.prototype;(i=s==null?void 0:s.hasOwnProperty)!=null&&i.call(s,"addEventListener")&&($e(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},h=d[l]=d[l]||{refCount:0};if(!h.handler){const _=dd(e);h.handler=_,a.call(this,l,_,c)}h.refCount++}catch{}return a.call(this,l,u,c)}}),$e(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},h=d[l];h&&(h.refCount--,h.refCount<=0&&(a.call(this,l,h.handler,c),h.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function px(e){if(e.type!==Nl)return!1;try{if(!e.target||e.target._sentryId!==Rl)return!1}catch{}return!0}function mx(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function dd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=hx(n);if(mx(n.type,r))return;rn(n,"_sentryCaptured",!0),r&&!r._sentryId&&rn(r,"_sentryId",Xe());const s=n.type==="keypress"?"input":n.type;px(n)||(e({event:n,name:s,global:t}),Nl=n.type,Rl=r?r._sentryId:void 0),clearTimeout(fd),fd=re.setTimeout(()=>{Rl=void 0,Nl=void 0},cx)}}function hx(e){try{return e.target}catch{return null}}let ro;function sg(e){const t="history";jn(t,e),An(t,gx)}function gx(){if(re.addEventListener("popstate",()=>{const t=re.location.href,n=ro;if(ro=t,n===t)return;at("history",{from:n,to:t})}),!$E())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=ro,o=yx(String(r));if(ro=o,s===o)return t.apply(this,n);at("history",{from:s,to:o})}return t.apply(this,n)}}$e(re.history,"pushState",e),$e(re.history,"replaceState",e)}function yx(e){try{return new URL(e,re.location.origin).toString()}catch{return e}}const wo={};function _x(e){const t=wo[e];if(t)return t;let n=re[e];if(xl(n))return wo[e]=n.bind(re);const r=re.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){ox&&A.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(wo[e]=n.bind(re))}function vx(e){wo[e]=void 0}const Br="__sentry_xhr_v3__";function Sx(e){const t="xhr";jn(t,e),An(t,Ex)}function Ex(){if(!re.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,o=bt()*1e3,i=Tt(r[0])?r[0].toUpperCase():void 0,a=xx(r[1]);if(!i||!a)return t.apply(n,r);n[Br]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[Br];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:bt()*1e3,startTimestamp:o,xhr:n,virtualError:s};at("xhr",c),n.removeEventListener("readystatechange",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[h,_]=d,v=c[Br];return v&&Tt(h)&&Tt(_)&&(v.request_headers[h.toLowerCase()]=_),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Br];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:bt()*1e3,xhr:n};return at("xhr",o),t.apply(n,r)}})}function xx(e){if(Tt(e))return e;try{return e.toString()}catch{}}function wx(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}const kx=40;function og(e,t=_x("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw vx("fetch"),l}finally{n-=i,r--}}return Dh(e,s,Bu(e.bufferSize||kx))}const pr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nx=30,Rx=50;function Cl(e,t,n,r){const s={filename:e,function:t===""?Cn:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Cx=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Tx=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bx=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ox=/at (.+?) ?\(data:(.+?),/,Ix=e=>{var s;const t=e.match(Ox);if(t)return{filename:``,function:t[1]};const n=Cx.exec(e);if(n){const[,o,i,a]=n;return Cl(o,Cn,+i,+a)}const r=Tx.exec(e);if(r){if(((s=r[2])==null?void 0:s.indexOf("eval"))===0){const l=bx.exec(r[2]);l&&(r[2]=l[1],r[3]=l[2],r[4]=l[3])}const[i,a]=cg(r[1]||Cn,r[2]);return Cl(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},ig=[Nx,Ix],Px=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jx=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ax=e=>{const t=Px.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=jx.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||Cn;return[s,r]=cg(s,r),Cl(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ag=[Rx,Ax],lg=[ig,ag],ug=Xm(...lg),cg=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Cn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},so=1024,Dx="Breadcrumbs",Lx=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Dx,setup(n){t.console&&bE(Ux(n)),t.dom&&fx(Mx(n,t.dom)),t.xhr&&Sx($x(n)),t.fetch&&HE(zx(n)),t.history&&sg(Bx(n)),t.sentry&&n.on("beforeSendEvent",Fx(n))}}},fg=Lx;function Fx(e){return function(n){ue()===e&&sn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function Mx(e,t){return function(r){if(ue()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>so&&(pr&&A.warn(`\`dom.maxStringLength\` cannot exceed ${so}, but a value of ${a} was configured. Sentry will use ${so} instead.`),a=so),typeof i=="string"&&(i=[i]);try{const u=r.event,c=Hx(u)?u.target:u;s=rg(c,{keyAttrs:i,maxStringLength:a}),o=GE(c)}catch{s=""}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};o&&(l.data={"ui.component_name":o}),sn(l,{event:r.event,name:r.name,global:r.global})}}function Ux(e){return function(n){if(ue()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:IE(n.level),message:vf(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${vf(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;sn(r,{input:n.args,level:n.level})}}function $x(e){return function(n){if(ue()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Br];if(!r||!s||!o)return;const{method:i,url:a,status_code:l,body:u}=o,c={method:i,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},h={category:"xhr",data:c,type:"http",level:Xh(l)};e.emit("beforeOutgoingRequestBreadcrumb",h,d),sn(h,d)}}function zx(e){return function(n){if(ue()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),sn(i,o)}else{const o=n.response,i={...n.fetchData,status_code:o==null?void 0:o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:i,type:"http",level:Xh(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),sn(l,a)}}}function Bx(e){return function(n){if(ue()!==e)return;let r=n.from,s=n.to;const o=la(V.location.href);let i=r?la(r):void 0;const a=la(s);i!=null&&i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),sn({category:"navigation",data:{from:r,to:s}})}}function Hx(e){return!!e&&!!e.target}const Wx="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Vx="BrowserApiErrors",qx=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Vx,setupOnce(){t.setTimeout&&$e(V,"setTimeout",pd),t.setInterval&&$e(V,"setInterval",pd),t.requestAnimationFrame&&$e(V,"requestAnimationFrame",Gx),t.XMLHttpRequest&&"XMLHttpRequest"in V&&$e(XMLHttpRequest.prototype,"send",Qx);const n=t.eventTarget;n&&(Array.isArray(n)?n:Wx).forEach(s=>Kx(s,t))}}},dg=qx;function pd(e){return function(...t){const n=t[0];return t[0]=dr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${nn(e)}`}}),e.apply(this,t)}}function Gx(e){return function(t){return e.apply(this,[dr(t,{mechanism:{data:{handler:nn(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Qx(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&$e(n,s,function(o){const i={mechanism:{data:{handler:nn(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Iu(o);return a&&(i.mechanism.data.handler=nn(a)),dr(o,i)})}),e.apply(this,t)}}function Kx(e,t){var s,o;const r=(s=V[e])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&($e(r,"addEventListener",function(i){return function(a,l,u){try{Xx(l)&&(l.handleEvent=dr(l.handleEvent,{mechanism:{data:{handler:nn(l),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Yx(this,a,l),i.apply(this,[a,dr(l,{mechanism:{data:{handler:nn(l),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),$e(r,"removeEventListener",function(i){return function(a,l,u){try{if(Object.prototype.hasOwnProperty.call(l,"__sentry_wrapped__")){const c=l.__sentry_wrapped__;c&&i.call(this,a,c,u)}}catch{}return i.call(this,a,l,u)}}))}function Xx(e){return typeof e.handleEvent=="function"}function Yx(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const pg=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof V.document>"u"){pr&&A.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}vl({ignoreDuration:!0});let n=!1;ax(()=>{n||(So(),n=!0)});const r=yt();let s=r.getUser();r.addScopeListener(o=>{const i=o.getUser();((s==null?void 0:s.id)!==(i==null?void 0:i.id)||(s==null?void 0:s.ip_address)!==(i==null?void 0:i.ip_address))&&(s=i,n&&So())}),t==="route"&&sg(({from:o,to:i})=>{o!==i&&(vl({ignoreDuration:!0}),So(),n=!0)})}}},Jx="CultureContext",Zx=()=>({name:Jx,preprocessEvent(e){var n;const t=md();t&&(e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}})},processSegmentSpan(e){const t=md();t&&kh(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}),mg=Zx;function md(){try{const e=V.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ew="GlobalHandlers",tw=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ew,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(nw(n),hd("onerror")),t.onunhandledrejection&&(rw(n),hd("onunhandledrejection"))}}},hg=tw;function nw(e){D_(t=>{const{stackParser:n,attachStacktrace:r}=gg();if(ue()!==e||Jh())return;const{msg:s,url:o,line:i,column:a,error:l}=t,u=iw(Wu(n,l||s,void 0,r,!1),o,i,a);u.level="error",Mu(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function rw(e){F_(t=>{const{stackParser:n,attachStacktrace:r}=gg();if(ue()!==e||Jh())return;const s=sw(t),o=Ns(s)?ow(s):Wu(n,s,void 0,r,!0);o.level="error",Mu(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function sw(e){if(Ns(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function ow(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function iw(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:r,lineno:n,filename:aw(t)??Hu(),function:Cn,in_app:!0}),e}function hd(e){pr&&A.log(`Global Handler attached: ${e}`)}function gg(){const e=ue();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function aw(e){if(!(!Tt(e)||e.length===0))return e.startsWith("data:")?`<${pE(e,!1)}>`:e}const yg=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!V.navigator&&!V.location&&!V.document)return;const t=ld(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){var r;const t=(r=e.attributes)==null?void 0:r[Au];if(!V.navigator&&!V.location&&!V.document)return;const n=ld();kh(e,{[pS]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),lw="cause",uw=5,cw="LinkedErrors",fw=(e={})=>{const t=e.limit||uw,n=e.key||lw;return{name:cw,preprocessEvent(r,s,o){const i=o.getOptions();CE(ki,i.stackParser,n,t,r,s)}}},_g=fw,dw=/^HTML(\w*)Element$/;function Vu(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(wx(e)){const t=pw(e);if(dw.test(t))return`[HTMLElement: ${rg(e)}]`}}function pw(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function mw(){return hw()?(pr&&vr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function hw(){var s;if(typeof V.window>"u")return!1;const e=V;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((s=t==null?void 0:t.runtime)!=null&&s.id))return!1;const n=Hu();return!(V===V.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function vg(e){return[Vh(),Hh(),UE(),dg(),fg(),hg(),_g(),Gh(),yg(),mg(),pg()]}function gw(e={}){const t=!e.skipBrowserExtensionCheck&&mw();let n=e.defaultIntegrations==null?vg():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:j_(e.stackParser||ug),integrations:jS({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||og};return nh(Vu),dE(ng,r)}function Tl(e={}){const t=V.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){pr&&A.error("[showReportDialog] Global document not defined");return}const r=ct(),s=ue(),o=s==null?void 0:s.getDsn();if(!o){pr&&A.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Ch()},a=V.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=IS(o,i);const{onLoad:l,onClose:u}=i;if(l&&(a.onload=l),u){const c=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{V.removeEventListener("message",c)}};V.addEventListener("message",c)}n.appendChild(a)}function yw(e){return gs(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Sg(e){const t={...e};Bh(t,"react"),Rh("react",{version:Y.version});const n=gw(t);return nh(_w),n}function _w(e){return yw(e)?"[SyntheticEvent]":Vu(e)}function vw(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Sw(e,t){const n=new WeakSet;function r(s,o){if(!n.has(s)){if(s.cause)return n.add(s),r(s.cause,o);s.cause=o}}r(e,t)}function Eg(e,{componentStack:t},n){if(vw(Y.version)&>(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,Sw(e,r)}return Fu(e,n)}const Ew=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ca={componentStack:null,error:null,eventId:null};let xw=class extends Y.Component{constructor(t){super(t),this.state=ca,this._openFallbackReportDialog=!0;const n=ue();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Tl({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:s,onError:o,showDialog:i,dialogOptions:a}=this.props;ju(l=>{s&&s(l,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,c=Eg(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});o&&o(t,r,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&Tl({...a,eventId:c})),this.setState({error:t,componentStack:r,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&(this.state===ca?s(null,null,null):s(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(ca)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const s=typeof t=="function"?Y.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Y.isValidElement(s)?s:(t&&Ew&&A.warn("fallback did not produce a valid ReactElement"),null)}};const ww=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:ng,ErrorBoundary:xw,SDK_VERSION:Zt,SEMANTIC_ATTRIBUTE_SENTRY_OP:Au,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:ph,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:dh,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:fh,Scope:ut,WINDOW:V,addBreadcrumb:sn,breadcrumbsIntegration:fg,browserApiErrorsIntegration:dg,browserSessionIntegration:pg,captureEvent:Mu,captureException:Fu,captureReactException:Eg,captureSession:So,chromeStackLineParser:ig,createTransport:Dh,cultureContextIntegration:mg,dedupeIntegration:Gh,defaultStackLineParsers:lg,defaultStackParser:ug,endSession:Uu,eventFiltersIntegration:Wh,eventFromException:eg,eventFromMessage:tg,exceptionFromError:ki,functionToStringIntegration:Hh,geckoStackLineParser:ag,getClient:ue,getCurrentScope:ct,getDefaultIntegrations:vg,getGlobalScope:ch,getIsolationScope:yt,getRootSpan:Du,globalHandlersIntegration:hg,httpContextIntegration:yg,inboundFiltersIntegration:Vh,init:Sg,lastEventId:Ch,linkedErrorsIntegration:_g,makeFetchTransport:og,normalizeStringifyValue:Vu,setContext:Rh,setCurrentClient:zh,showReportDialog:Tl,spanToJSON:Os,startSession:vl,withScope:ju},Symbol.toStringTag,{value:"Module"}));Sg({dsn:"https://c5c92309ea775dd3d9fee496a8c05312@o4511942207799296.ingest.de.sentry.io/4511942214287440",environment:"production",tracesSampleRate:0,replaysSessionSampleRate:0,replaysOnErrorSampleRate:0,beforeSend(e){return e.request&&(e.request.data=void 0),e}});function xg(e,t){return function(){return e.apply(t,arguments)}}const{toString:kw}=Object.prototype,{getPrototypeOf:mr}=Object,{iterator:Ps,toStringTag:wg}=Symbol,ei=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vs=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),ei(n,t))return!0;n=mr(n)}return!1},Nw=(e,t)=>e!=null&&vs(e,t)?e[t]:void 0,qu=(e=>t=>{const n=kw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=e=>(e=e.toLowerCase(),t=>qu(t)===e),Ri=e=>t=>typeof t===e,{isArray:Tn}=Array,bn=Ri("undefined");function kr(e){return e!==null&&!bn(e)&&e.constructor!==null&&!bn(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kg=Ze("ArrayBuffer");function Rw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kg(e.buffer),t}const Cw=Ri("string"),Ae=Ri("function"),Ng=Ri("number"),Nr=e=>e!==null&&typeof e=="object",Tw=e=>e===!0||e===!1,ko=e=>{if(!Nr(e))return!1;const t=mr(e);return(t===null||t===Object.prototype||mr(t)===null)&&!vs(e,wg)&&!vs(e,Ps)},bw=e=>{if(!Nr(e)||kr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ow=Ze("Date"),Iw=Ze("File"),Pw=e=>!!(e&&typeof e.uri<"u"),jw=e=>e&&typeof e.getParts<"u",Aw=Ze("Blob"),Dw=Ze("FileList"),Lw=Ze("Set"),Fw=e=>Nr(e)&&Ae(e.pipe);function Mw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const gd=Mw(),yd=typeof gd.FormData<"u"?gd.FormData:void 0,Uw=e=>{if(!e)return!1;if(yd&&e instanceof yd)return!0;const t=mr(e);if(!t||t===Object.prototype||!Ae(e.append))return!1;const n=qu(e);return n==="formdata"||n==="object"&&Ae(e.toString)&&e.toString()==="[object FormData]"},$w=Ze("URLSearchParams"),[zw,Bw,Hw,Ww]=["ReadableStream","Request","Response","Headers"].map(Ze),Vw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function js(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Tn(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cg=e=>!bn(e)&&e!==yn;function bl(...e){const{caseless:t,skipUndefined:n}=Cg(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&typeof i=="string"&&Rg(r,i)||i,l=ei(r,a)?r[a]:void 0;ko(l)&&ko(o)?r[a]=bl(l,o):ko(o)?r[a]=bl({},o):Tn(o)?r[a]=o.slice():(!n||!bn(o))&&(r[a]=o)};for(let o=0,i=e.length;o(js(t,(s,o)=>{n&&Ae(s)?Object.defineProperty(e,o,{__proto__:null,value:xg(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Gw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kw=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&mr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Xw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Yw=e=>{if(!e)return null;if(Tn(e))return e;let t=e.length;if(!Ng(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mr(Uint8Array)),Zw=(e,t)=>{const r=(e&&e[Ps]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},e1=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},t1=Ze("HTMLFormElement"),n1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:r1}=Object.prototype,s1=Ze("RegExp"),Tg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};js(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},o1=e=>{Tg(e,(t,n)=>{if(Ae(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},i1=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Tn(e)?r(e):r(String(e).split(t)),n},a1=()=>{},l1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function u1(e){return!!(e&&Ae(e.append)&&e[wg]==="FormData"&&e[Ps])}const c1=e=>{const t=new WeakSet,n=r=>{if(Nr(r)){if(t.has(r))return;if(kr(r))return r;if(!("toJSON"in r)){t.add(r);let s;if(Lw(r)){s=[];for(const o of r){const i=n(o);!bn(i)&&s.push(i)}}else s=Tn(r)?[]:{},js(r,(o,i)=>{const a=n(o);!bn(a)&&(s[i]=a)});return t.delete(r),s}}return r};return n(e)},f1=Ze("AsyncFunction"),d1=e=>e&&(Nr(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),bg=((e,t)=>e?setImmediate:t?((n,r)=>(yn.addEventListener("message",({source:s,data:o})=>{s===yn&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),yn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ae(yn.postMessage)),p1=typeof queueMicrotask<"u"?queueMicrotask.bind(yn):typeof process<"u"&&process.nextTick||bg,Og=e=>e!=null&&Ae(e[Ps]),m1=e=>e!=null&&vs(e,Ps)&&Og(e),y={isArray:Tn,isArrayBuffer:kg,isBuffer:kr,isFormData:Uw,isArrayBufferView:Rw,isString:Cw,isNumber:Ng,isBoolean:Tw,isObject:Nr,isPlainObject:ko,isEmptyObject:bw,isReadableStream:zw,isRequest:Bw,isResponse:Hw,isHeaders:Ww,isUndefined:bn,isDate:Ow,isFile:Iw,isReactNativeBlob:Pw,isReactNative:jw,isBlob:Aw,isRegExp:s1,isFunction:Ae,isStream:Fw,isURLSearchParams:$w,isTypedArray:Jw,isFileList:Dw,forEach:js,merge:bl,extend:qw,trim:Vw,stripBOM:Gw,inherits:Qw,toFlatObject:Kw,kindOf:qu,kindOfTest:Ze,endsWith:Xw,toArray:Yw,forEachEntry:Zw,matchAll:e1,isHTMLForm:t1,hasOwnProperty:ei,hasOwnProp:ei,hasOwnInPrototypeChain:vs,getSafeProp:Nw,reduceDescriptors:Tg,freezeMethods:o1,toObjectSet:i1,toCamelCase:n1,noop:a1,toFiniteNumber:l1,findKey:Rg,global:yn,isContextDefined:Cg,isSpecCompliantForm:u1,toJSONObject:c1,isAsyncFn:f1,isThenable:d1,setImmediate:bg,asap:p1,isIterable:Og,isSafeIterable:m1},h1=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g1=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const a=y.hasOwnProp(t,n);!n||a&&y.hasOwnProp(h1,n)||(n==="set-cookie"?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+", "+r:r)}),t};function y1(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const _1=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),v1=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Gu(e,t){return y.isArray(e)?e.map(n=>Gu(n,t)):y1(String(e).replace(t,""))}const S1=e=>Gu(e,_1),E1=e=>Gu(e,v1);function Ig(e){const t=Object.create(null);return y.forEach(e.toJSON(),(n,r)=>{t[r]=E1(n)}),t}const _d=Symbol("internals");function Lr(e){return e&&String(e).trim().toLowerCase()}function No(e){return e===!1||e==null?e:y.isArray(e)?e.map(No):S1(String(e))}function x1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const w1=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function fa(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function k1(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function N1(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(a){const l=fa(n.slice(r,a)),u=l.indexOf("=");if(u<1)return;const c=fa(l.slice(0,u));if(!w1.test(c))return;const d=c.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=fa(l.slice(u+1));t[d]=k1(h)}for(let a=0;a/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function da(e,t,n,r,s){if(y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!y.isString(t)){if(y.isString(r))return t.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(t)}}function C1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function T1(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let xe=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,l,u){const c=Lr(l);if(!c)return;const d=y.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=No(a))}const i=(a,l)=>y.forEach(a,(u,c)=>o(u,c,l));if(y.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(y.isString(t)&&(t=t.trim())&&!R1(t))i(g1(t),n);else if(y.isObject(t)&&y.isSafeIterable(t)){let a=Object.create(null),l,u;for(const c of t){if(!y.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],y.hasOwnProp(a,u)?(l=a[u],a[u]=y.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Lr(t),t){const r=y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return x1(s);if(y.isFunction(n))return n.call(this,s,r);if(y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lr(t),t){const r=y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||da(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Lr(i),i){const a=y.findKey(r,i);a&&(!n||da(r,r[a],a,n))&&(delete r[a],s=!0)}}return y.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||da(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return y.forEach(this,(s,o)=>{const i=y.findKey(r,o);if(i){n[i]=No(s),delete n[o];return}const a=t?C1(o):String(o).trim();a!==o&&delete n[o],n[a]=No(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){const t=this.get("set-cookie");return y.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return N1(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[_d]=this[_d]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Lr(i);r[a]||(T1(s,i),r[a]=!0)}return y.isArray(t)?t.forEach(o):o(t),this}};xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});y.freezeMethods(xe);const ti="[REDACTED ****]";function b1(e){if(y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function O1(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||y.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof xe&&(o=o.toJSON()),r.push(o);let i;if(y.isArray(o))i=[],o.forEach((a,l)=>{const u=s(a);y.isUndefined(u)||(i[l]=u)});else{if(!y.isPlainObject(o)&&b1(o))return r.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const u=n.has(a.toLowerCase())?ti:s(l);y.isUndefined(u)||(i[a]=u)}}return r.pop(),i};return s(e)}function vd(e){try{return String(e)}catch{return""}}function I1(e){return e.errors.map(n=>{try{return n&&n.message?vd(n.message):vd(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let C=class Pg extends Error{static from(t,n,r,s,o,i){let a=t.message;!a&&y.isArray(t.errors)&&t.errors.length&&(a=I1(t));const l=new Pg(a,n||t.code,r,s,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&y.hasOwnProp(t,"redact")?t.redact:void 0,r=y.isArray(n)&&n.length>0?O1(t,n):y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};C.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";C.ERR_BAD_OPTION="ERR_BAD_OPTION";C.ECONNABORTED="ECONNABORTED";C.ETIMEDOUT="ETIMEDOUT";C.ECONNREFUSED="ECONNREFUSED";C.ERR_NETWORK="ERR_NETWORK";C.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";C.ERR_DEPRECATED="ERR_DEPRECATED";C.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";C.ERR_BAD_REQUEST="ERR_BAD_REQUEST";C.ERR_CANCELED="ERR_CANCELED";C.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";C.ERR_INVALID_URL="ERR_INVALID_URL";C.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const P1=null,jg=100;function Ol(e){return y.isPlainObject(e)||y.isArray(e)}function Ag(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function pa(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ag(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function j1(e){return y.isArray(e)&&!e.some(Ol)}const A1=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function Ci(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!y.isUndefined(g[p])});const r=n.metaTokens,s=n.visitor||v,o=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?jg:n.maxDepth,u=a&&y.isSpecCompliantForm(t),c=[];if(!y.isFunction(s))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(y.isDate(f))return f.toISOString();if(y.isBoolean(f))return f.toString();if(!u&&y.isBlob(f))throw new C("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(f)||y.isTypedArray(f)){if(u&&typeof a=="function")return new a([f]);throw new C("Blob is not supported. Use a Buffer instead.",C.ERR_NOT_SUPPORT)}return f}function h(f){if(f>l)throw new C("Object is too deeply nested ("+f+" levels). Max depth: "+l,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(f,p){if(l===1/0)return JSON.stringify(f);const g=[];return JSON.stringify(f,function(N,R){if(!y.isObject(R))return R;for(;g.length&&g[g.length-1]!==this;)g.pop();return g.push(R),h(p+g.length-1),R})}function v(f,p,g){let S=f;if(y.isReactNative(t)&&y.isReactNativeBlob(f))return t.append(pa(g,p,o),d(f)),!1;if(f&&!g&&typeof f=="object"){if(y.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=_(f,1);else if(y.isArray(f)&&j1(f)||(y.isFileList(f)||y.endsWith(p,"[]"))&&(S=y.toArray(f)))return p=Ag(p),S.forEach(function(R,T){!(y.isUndefined(R)||R===null)&&t.append(i===!0?pa([p],T,o):i===null?p:p+"[]",d(R))}),!1}return Ol(f)?!0:(t.append(pa(g,p,o),d(f)),!1)}const E=Object.assign(A1,{defaultVisitor:v,convertValue:d,isVisitable:Ol});function w(f,p,g=0){if(!y.isUndefined(f)){if(h(g),c.indexOf(f)!==-1)throw new Error("Circular reference detected in "+p.join("."));c.push(f),y.forEach(f,function(N,R){(!(y.isUndefined(N)||N===null)&&s.call(t,N,y.isString(R)?R.trim():R,p,E))===!0&&w(N,p?p.concat(R):[R],g+1)}),c.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Sd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Qu(e,t){this._pairs=[],e&&Ci(e,this,t)}const Dg=Qu.prototype;Dg.append=function(t,n){this._pairs.push([t,n])};Dg.toString=function(t){const n=t?r=>t.call(this,r,Sd):Sd;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function D1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lg(e,t,n){if(!t)return e;e=e||"";const r=y.isFunction(n)?{serialize:n}:n,s=y.getSafeProp(r,"encode")||D1,o=y.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=y.isURLSearchParams(t)?t.toString():new Qu(t,r).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ed{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},L1=typeof URLSearchParams<"u"?URLSearchParams:Qu,F1=typeof FormData<"u"?FormData:null,M1=typeof Blob<"u"?Blob:null,U1={isBrowser:!0,classes:{URLSearchParams:L1,FormData:F1,Blob:M1},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",Il=typeof navigator=="object"&&navigator||void 0,$1=Xu&&(!Il||["ReactNative","NativeScript","NS"].indexOf(Il.product)<0),z1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",B1=Xu&&window.location.href||"http://localhost",H1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:z1,navigator:Il,origin:B1},Symbol.toStringTag,{value:"Module"})),me={...H1,...U1};function W1(e,t){return Ci(e,new me.classes.URLSearchParams,{visitor:function(n,r,s,o){return me.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const xd=jg;function Fg(e){if(e>xd)throw new C("FormData field is too deeply nested ("+e+" levels). Max depth: "+xd,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function V1(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Fg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function q1(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&y.isArray(s)?s.length:i,l?(y.hasOwnProp(s,i)?s[i]=y.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!a):((!y.hasOwnProp(s,i)||!y.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&y.isArray(s[i])&&(s[i]=q1(s[i])),!a)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,s)=>{t(V1(r),s,n,0)}),n}return null}const Mn=(e,t)=>e!=null&&y.hasOwnProp(e,t)?e[t]:void 0;function G1(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const As={transitional:Ku,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=y.isObject(t);if(o&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return s?JSON.stringify(Mg(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=Mn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return W1(t,l).toString();if((a=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Mn(this,"env"),c=u&&u.FormData;return Ci(a?{"files[]":t}:t,c&&new c,l)}}return o||s?(n.setContentType("application/json",!1),G1(t)):t}],transformResponse:[function(t){const n=Mn(this,"transitional")||As.transitional,r=n&&n.forcedJSONParsing,s=Mn(this,"responseType"),o=s==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!s||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Mn(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?C.from(l,C.ERR_BAD_RESPONSE,this,null,Mn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],e=>{As.headers[e]={}});function ma(e,t){const n=this||As,r=t||n,s=xe.from(r.headers);let o=r.data;return y.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ug(e){return!!(e&&e.__CANCEL__)}let Ds=class extends C{constructor(t,n,r){super(t??"canceled",C.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function $g(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,n.status>=400&&n.status<500?C.ERR_BAD_REQUEST:C.ERR_BAD_RESPONSE,n.config,n.request,n))}function Q1(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function K1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[o];i||(i=u),n[s]=l,r[s]=u;let d=o,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i{n=c,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?i(u,c):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const ni=(e,t,n=3)=>{let r=0;const s=K1(50,250);return X1(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),u=Math.max(0,l-r),c=s(u);r=Math.max(r,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},wd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kd=(e,t=y.asap)=>(...n)=>t(()=>e(...n)),Y1=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,J1=me.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];y.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),y.isString(r)&&a.push(`path=${r}`),y.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),y.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const tk=/^https?:(?!\/\/)/i,nk=/[\t\n\r]/g;function rk(e){let t=0;for(;t`${n}${r}${ti}`)}function ik(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ti}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ti}`);return n===-1?s:`${s}#${ok(t.slice(n+1))}`}function Nd(e,t){if(typeof e=="string"){const n=sk(e);if(tk.test(n))throw new C(`Invalid URL ${JSON.stringify(ik(n))}: missing "//" after protocol`,C.ERR_INVALID_URL,t)}}function zg(e,t,n,r){Nd(t,r);let s=!Z1(t);return e&&(s||n===!1)?(Nd(e,r),ek(e,t)):t}const Rd=e=>e instanceof xe?{...e}:e,ak=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function On(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,d,h,_){return y.isPlainObject(c)&&y.isPlainObject(d)?y.merge.call({caseless:_},c,d):y.isPlainObject(d)?y.merge({},d):y.isArray(d)?d.slice():d}function s(c,d,h,_){if(y.isUndefined(d)){if(!y.isUndefined(c))return r(void 0,c,h,_)}else return r(c,d,h,_)}function o(c,d){if(!y.isUndefined(d))return r(void 0,d)}function i(c,d){if(y.isUndefined(d)){if(!y.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c){const d=y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!y.isUndefined(d))if(y.isPlainObject(d)){if(y.hasOwnProp(d,c))return d[c]}else return;const h=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(y.isPlainObject(h)&&y.hasOwnProp(h,c))return h[c]}function l(c,d,h){if(y.hasOwnProp(t,h))return r(c,d);if(y.hasOwnProp(e,h))return r(void 0,c)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(c,d,h)=>s(Rd(c),Rd(d),h,!0)};return y.forEach(ak({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=y.hasOwnProp(u,d)?u[d]:s,_=y.hasOwnProp(e,d)?e[d]:void 0,v=y.hasOwnProp(t,d)?t[d]:void 0,E=h(_,v,d);y.isUndefined(E)&&h!==l||(n[d]=E)}),y.hasOwnProp(t,"validateStatus")&&y.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const lk=["content-type","content-length"];function uk(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{lk.includes(r.toLowerCase())&&e.set(r,s)})}const ck=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Bg(e){const t=On({},e),n=h=>y.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=xe.from(a),t.url=Lg(zg(u,d,c,t),n("params"),n("paramsSerializer")),l){const h=y.getSafeProp(l,"username")||"",_=y.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(h+":"+(_?ck(_):"")))}catch(v){throw C.from(v,C.ERR_BAD_OPTION_VALUE,e)}}if(y.isFormData(r)&&(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv||y.isReactNative(r)?a.setContentType(void 0):y.isFunction(r.getHeaders)&&uk(a,r.getHeaders(),n("formDataHeaderPolicy"))),me.hasStandardBrowserEnv&&(y.isFunction(s)&&(s=s(t)),s===!0||s==null&&Y1(t.url))){const _=o&&i&&J1.read(i);_&&a.set(o,_)}return t}const fk=typeof XMLHttpRequest<"u",dk=fk&&function(e){return new Promise(function(n,r){const s=Bg(e);let o=s.data;const i=xe.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,h,_,v;function E(){_&&_(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function f(){if(!w)return;const g=xe.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:g,config:e,request:w};$g(function(T){n(T),E()},function(T){r(T),E()},N),w=null}"onloadend"in w?w.onloadend=f:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(f)},w.onabort=function(){w&&(r(new C("Request aborted",C.ECONNABORTED,e,w)),E(),w=null)},w.onerror=function(S){const N=S&&S.message?S.message:"Network Error",R=new C(N,C.ERR_NETWORK,e,w);R.event=S||null,r(R),E(),w=null},w.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ku;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new C(S,N.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,w)),E(),w=null},o===void 0&&i.setContentType(null),"setRequestHeader"in w&&y.forEach(Ig(i),function(S,N){w.setRequestHeader(N,S)}),y.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([h,v]=ni(u,!0),w.addEventListener("progress",h)),l&&w.upload&&([d,_]=ni(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",_)),(s.cancelToken||s.signal)&&(c=g=>{w&&(r(!g||g.type?new Ds(null,e,w):g),w.abort(),E(),w=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const p=Q1(s.url);if(p&&!me.protocols.includes(p)){r(new C("Unsupported protocol "+p+":",C.ERR_BAD_REQUEST,e)),E();return}w.send(o||null)})},pk=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const u=l instanceof Error?l:this.reason;n.abort(u instanceof C?u:new Ds(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new C(`timeout of ${t}ms exceeded`,C.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>y.asap(i),a},mk=function*(e,t){let n=e.byteLength;if(n{const s=hk(e,t);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Td=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Hg=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,yk=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,_k=e=>e===9||e===10||e===12||e===13||e===32,vk=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Sk=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Ek=e=>{const t=e.length;let n=0,r=0,s=!1;for(let o=0;o0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?Sk(e):vk(n)},xk=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let i=0;for(let a=0,l=s.length;a=55296&&u<=56319&&a+1=56320&&c<=57343?(i+=4,a++):i+=3}else i+=3}return i};function wk(e){const t=typeof e=="string"?e.indexOf("#"):-1;return xk(t===-1?e:e.slice(0,t),Ek)}const Yu="1.19.0",Od=64*1024,{isFunction:oo}=y,kk=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Id=e=>{if(!y.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Pd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Nk=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Rk=e=>{const t=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,a=s?oo(s):typeof fetch=="function",l=oo(o),u=oo(i);if(!a)return!1;const c=a&&oo(n),d=a&&(typeof r=="function"?(f=>p=>f.encode(p))(new r):async f=>new Uint8Array(await new o(f).arrayBuffer())),h=l&&c&&Pd(()=>{let f=!1;const p=new o(me.origin,{body:new n,method:"POST",get duplex(){return f=!0,"half"}}),g=p.headers.has("Content-Type");return p.body!=null&&p.body.cancel(),f&&!g}),_=u&&c&&Pd(()=>y.isReadableStream(new i("").body)),v={stream:_&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!v[f]&&(v[f]=(p,g)=>{let S=p&&p[f];if(S)return S.call(p);throw new C(`Response type '${f}' is not supported`,C.ERR_NOT_SUPPORT,g)})});const E=async f=>{if(f==null)return 0;if(y.isBlob(f))return f.size;if(y.isSpecCompliantForm(f))return(await new o(me.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(y.isArrayBufferView(f)||y.isArrayBuffer(f))return f.byteLength;if(y.isURLSearchParams(f)&&(f=f+""),y.isString(f))return(await d(f)).byteLength},w=async(f,p)=>{const g=y.toFiniteNumber(f.getContentLength());return g??E(p)};return async f=>{let{url:p,method:g,data:S,signal:N,cancelToken:R,timeout:T,onDownloadProgress:I,onUploadProgress:W,responseType:L,headers:G,withCredentials:Te="same-origin",fetchOptions:De,maxContentLength:ye,maxBodyLength:_t}=Bg(f);const Ve=y.isNumber(ye)&&ye>-1,P=y.isNumber(_t)&&_t>-1,x=z=>y.hasOwnProp(f,z)?f[z]:void 0;let b=s||fetch;L=L?(L+"").toLowerCase():"text";let j=pk([N,R&&R.toAbortSignal()],T),D=null;const U=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let et,Le=null;const Dn=()=>new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,f,D);try{let z;const de=x("auth");if(de){const M=y.getSafeProp(de,"username")||"",Fe=y.getSafeProp(de,"password")||"";z={username:M,password:Fe}}if(Nk(p)){const M=new URL(p,me.origin);if(!z&&(M.username||M.password)){const Fe=Id(M.username),Dt=Id(M.password);z={username:Fe,password:Dt}}(M.username||M.password)&&(M.username="",M.password="",p=M.href)}if(z&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(kk((z.username||"")+":"+(z.password||""))))),Ve&&typeof p=="string"&&p.startsWith("data:")&&wk(p)>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D);if(P&&g!=="get"&&g!=="head"){const M=await E(S);if(typeof M=="number"&&isFinite(M)&&(et=M,M>_t))throw Dn()}const Fs=P&&(y.isReadableStream(S)||y.isStream(S)),Zu=(M,Fe,Dt)=>Cd(M,Od,un=>{if(P&&un>_t)throw Le=Dn();Fe&&Fe(un)},Dt);if(h&&g!=="get"&&g!=="head"&&(W||Fs)){if(et=et??await w(G,S),et!==0||Fs){let M=new o(p,{method:"POST",body:S,duplex:"half"}),Fe;if(y.isFormData(S)&&(Fe=M.headers.get("content-type"))&&G.setContentType(Fe),M.body){const[Dt,un]=W&&wd(et,ni(kd(W)))||[];S=Zu(M.body,Dt,un)}}}else if(Fs&&!l&&c&&g!=="get"&&g!=="head")S=Zu(S);else if(Fs&&l&&!h&&g!=="get"&&g!=="head")throw new C("Stream request bodies are not supported by the current fetch implementation",C.ERR_NOT_SUPPORT,f,D);y.isString(Te)||(Te=Te?"include":"omit");const Xg=l&&"credentials"in o.prototype;if(y.isFormData(S)){const M=G.getContentType();M&&/^multipart\/form-data/i.test(M)&&!/boundary=/i.test(M)&&G.delete("content-type")}G.set("User-Agent","axios/"+Yu,!1);const ec={...De,signal:j,method:g.toUpperCase(),headers:Ig(G.normalize()),body:S,duplex:"half",credentials:Xg?Te:void 0};D=l&&new o(p,ec);let vt=await(l?b(D,De):b(p,ec));const tc=xe.from(vt.headers);if(Ve){const M=y.toFiniteNumber(tc.getContentLength());if(M!=null&&M>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D)}const bi=_&&(L==="stream"||L==="response");if(_&&vt.body&&(I||Ve||bi&&U)){const M={};["status","statusText","headers"].forEach(Rr=>{M[Rr]=vt[Rr]});const Fe=y.toFiniteNumber(tc.getContentLength()),[Dt,un]=I&&wd(Fe,ni(kd(I),!0))||[];let nc=0;const Yg=Rr=>{if(Ve&&(nc=Rr,nc>ye))throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D);Dt&&Dt(Rr)};vt=new i(Cd(vt.body,Od,Yg,()=>{un&&un(),U&&U()}),M)}L=L||"text";let St=await v[y.findKey(v,L)||"text"](vt,f);if(Ve&&!_&&!bi){let M;if(St!=null&&(typeof St.byteLength=="number"?M=St.byteLength:typeof St.size=="number"?M=St.size:typeof St=="string"&&(M=typeof r=="function"?new r().encode(St).byteLength:St.length)),typeof M=="number"&&M>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D)}return!bi&&U&&U(),await new Promise((M,Fe)=>{$g(M,Fe,{data:St,headers:xe.from(vt.headers),status:vt.status,statusText:vt.statusText,config:f,request:D})})}catch(z){if(U&&U(),j&&j.aborted&&j.reason instanceof C){const de=j.reason;throw de.config=f,D&&(de.request=D),z!==de&&Object.defineProperty(de,"cause",{__proto__:null,value:z,writable:!0,enumerable:!1,configurable:!0}),de}if(Le)throw D&&!Le.request&&(Le.request=D),Le;if(z instanceof C)throw D&&!z.request&&(z.request=D),z;if(z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)){const de=new C("Network Error",C.ERR_NETWORK,f,D,z&&z.response);throw Object.defineProperty(de,"cause",{__proto__:null,value:z.cause||z,writable:!0,enumerable:!1,configurable:!0}),de}throw C.from(z,z&&z.code,f,D,z&&z.response)}}},Ck=new Map,Wg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,l,u,c=Ck;for(;a--;)l=o[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:Rk(t)),c=u;return u};Wg();const Ju={http:P1,xhr:dk,fetch:{get:Wg}};y.forEach(Ju,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const jd=e=>`- ${e}`,Tk=e=>y.isFunction(e)||e===null||e===!1;function bk(e,t){e=y.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since : +`+i.map(jd).join(` +`):" "+jd(i[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+a,C.ERR_NOT_SUPPORT)}return s}const Vg={getAdapter:bk,adapters:Ju};function ha(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function ga(e){return ha(e),e.headers=xe.from(e.headers),e.data=ma.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vg.getAdapter(e.adapter||As.adapter,e)(e).then(function(r){ha(e),e.response=r;try{r.data=ma.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=xe.from(r.headers),r},function(r){if(!Ug(r)&&(ha(e),r&&r.response)){e.response=r.response;try{r.response.data=ma.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=xe.from(r.response.headers)}return Promise.reject(r)})}const Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ad={};Ti.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Yu+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new C(s(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!Ad[i]&&(Ad[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Ti.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ok(e,t,n){if(typeof e!="object"||e===null)throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const a=e[o],l=a===void 0||i(a,o,e);if(l!==!0)throw new C("option "+o+" must be "+l,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+o,C.ERR_BAD_OPTION)}}const Ro={assertOptions:Ok,validators:Ti},Se=Ro.validators;let En=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ed,response:new Ed}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` +`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` +`),a=i===-1?-1:o.indexOf(` +`,i+1),l=a===-1?"":o.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` +`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=On(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ro.assertOptions(r,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean),advertiseZstdAcceptEncoding:Se.transitional(Se.boolean),validateStatusUndefinedResolves:Se.transitional(Se.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:Ro.assertOptions(s,{encode:Se.function,serialize:Se.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ro.assertOptions(n,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&y.merge(o.common,o[n.method]);o&&y.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete o[v]}),n.headers=xe.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(n)===!1)return;l=l&&E.synchronous;const w=n.transitional||Ku;w&&w.legacyInterceptorReqResOrdering?a.unshift(E.fulfilled,E.rejected):a.push(E.fulfilled,E.rejected)});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let c,d=0,h;if(!l){const v=[ga.bind(this),void 0];for(v.unshift(...a),v.push(...u),h=v.length,c=Promise.resolve(n);dga.call(this,_)))}catch(f){c=Promise.reject(f)}break}}if(!c)try{c=ga.call(this,_)}catch(v){c=Promise.reject(v)}for(d=0,h=u.length;d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new Ds(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qg(function(s){t=s}),cancel:t}}};function Pk(e){return function(n){return e.apply(null,n)}}function jk(e){return y.isObject(e)&&e.isAxiosError===!0}const Pl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pl).forEach(([e,t])=>{Pl[t]=e});function Gg(e){const t=new En(e),n=xg(En.prototype.request,t);return y.extend(n,En.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Gg(On(e,s))},n}const oe=Gg(As);oe.Axios=En;oe.CanceledError=Ds;oe.CancelToken=Ik;oe.isCancel=Ug;oe.VERSION=Yu;oe.toFormData=Ci;oe.AxiosError=C;oe.Cancel=oe.CanceledError;oe.all=function(t){return Promise.all(t)};oe.spread=Pk;oe.isAxiosError=jk;oe.mergeConfig=On;oe.AxiosHeaders=xe;oe.formToJSON=e=>Mg(y.isHTMLForm(e)?new FormData(e):e);oe.getAdapter=Vg.getAdapter;oe.HttpStatusCode=Pl;oe.default=oe;const{Axios:fN,AxiosError:dN,CanceledError:pN,isCancel:mN,CancelToken:hN,VERSION:gN,all:yN,Cancel:_N,isAxiosError:vN,spread:SN,toFormData:EN,AxiosHeaders:xN,HttpStatusCode:wN,formToJSON:kN,getAdapter:NN,mergeConfig:RN,create:CN}=oe,Ak="".trim(),Dk="/api",Ls=oe.create({baseURL:Ak||Dk});async function Lk(e){const t=new FormData;return t.append("file",e),(await Ls.post("/analyze/async",t,{headers:{"Content-Type":"multipart/form-data"}})).data}async function Fk(e){return(await Ls.get(`/analyze/${e}/status`)).data}async function Mk(e,t,n=1e3,r=12e4){const s=Date.now();for(;Date.now()-ssetTimeout(i,n))}throw new Error("Analysis timed out after "+r/1e3+" seconds")}async function Uk(){return(await Ls.get("/history")).data}async function $k(e){return(await Ls.get(`/history/${e}`)).data}async function zk(){return(await Ls.get("/detector/config")).data}function Bk(e){if(!e){alert("No PDF report available.");return}const t="".trim(),n=t?new URL(t,window.location.origin).origin:window.location.origin,r=e.startsWith("http")?e:`${n}${e}`,s=`VeriPaper_Report_${new Date().toISOString().split("T")[0]}.pdf`,o=document.createElement("a");o.href=r,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o)}function Hk(e){var a,l,u,c,d,h,_,v,E,w,f,p,g,S,N,R,T,I,W,L,G;const t=["Metric","Score","Details"],n=[["Overall Research Credibility",`${e.overall_research_credibility}%`,e.verdict_detail||""],["Plagiarism / Similarity",`${Math.round(((a=e.plagiarism)==null?void 0:a.score)??0)}%`,((l=e.plagiarism)==null?void 0:l.summary)||""],["AI-Generated Probability",`${Math.round(((u=e.ai_detection)==null?void 0:u.ai_probability)??0)}%`,`Confidence: ${((c=e.ai_detection)==null?void 0:c.confidence)||""}`],["Citation Validity",`${Math.round(((d=e.citation)==null?void 0:d.validity_score)??0)}%`,((h=e.citation)==null?void 0:h.summary)||""],["Statistical Risk",`${Math.round(((_=e.statistics)==null?void 0:_.risk_score)??0)}%`,((v=e.statistics)==null?void 0:v.summary)||""],["Writing Standards",`${Math.round(((E=e.writing)==null?void 0:E.score)??0)}%`,((w=e.writing)==null?void 0:w.grade)||""],["","",""],["Word Count",e.word_count||"",""],["Sections Detected",e.section_count||"",""],["Duplicate Paragraphs (self-plagiarism)",((f=e.plagiarism)==null?void 0:f.duplicate_paragraphs)??0,""],["Valid DOIs",((p=e.citation)==null?void 0:p.valid_dois)??0,`of ${((g=e.citation)==null?void 0:g.total_dois)??0} total`],["Invalid DOIs Found",(((S=e.citation)==null?void 0:S.invalid_dois)||[]).length,(((N=e.citation)==null?void 0:N.invalid_dois)||[]).join("; ")],["Top Plagiarism Match",(I=(T=(R=e.plagiarism)==null?void 0:R.matches)==null?void 0:T[0])!=null&&I.similarity?`${Math.round(e.plagiarism.matches[0].similarity)}%`:"N/A",((G=(L=(W=e.plagiarism)==null?void 0:W.matches)==null?void 0:L[0])==null?void 0:G.title)||""]],r=[t.join(","),...n.map(Te=>Te.map(De=>`"${String(De).replace(/"/g,'""')}"`).join(","))].join(` +`),s=`VeriPaper_Analysis_${new Date().toISOString().split("T")[0]}.csv`,o=new Blob([r],{type:"text/csv;charset=utf-8;"}),i=document.createElement("a");i.href=URL.createObjectURL(o),i.download=s,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(i.href)}function Wk(e){const t=`VeriPaper_Analysis_${new Date().toISOString().split("T")[0]}.json`,n=JSON.stringify(e,null,2),r=new Blob([n],{type:"application/json;charset=utf-8;"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(s.href)}function Vk(e){try{const t=Qg(),r=[{...e,timestamp:new Date().toISOString(),id:`analysis_${Date.now()}`},...t].slice(0,10);localStorage.setItem("veripaper_history",JSON.stringify(r))}catch(t){console.error("Failed to save history:",t)}}function Qg(){try{const e=localStorage.getItem("veripaper_history");if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return console.error("Failed to parse history:",e),[]}}class qk extends Y.Component{constructor(t){super(t),this.state={err:null}}static getDerivedStateFromError(t){return{err:t}}render(){return this.state.err?(this.props.fallback||(()=>null))(this.state.err):this.props.children}}const Gk={Credible:{badge:"bg-emerald-100 text-emerald-800 border-emerald-200",title:"Looks Credible",desc:"This paper passes the checks well. It can move forward in review, keeping in mind these are likelihood signals, not proof."},"Needs review":{badge:"bg-amber-100 text-amber-800 border-amber-200",title:"Needs Review",desc:"Some checks raised mild concerns. A human reviewer should look at the flagged sections before accepting."},"High risk":{badge:"bg-red-100 text-red-800 border-red-200",title:"High Risk Signals",desc:"Strong integrity concerns were detected. Prioritize manual investigation of the flagged issues."}};function Qk(e){return Gk[e]||{badge:"bg-slate-100 text-slate-700 border-slate-200",title:e||"Pending",desc:"Analysis complete."}}function Kg(e,t=!1){const n=t?100-e:e;return n<30?{text:"Low concern",cls:"text-emerald-700",bar:"bg-emerald-500"}:n<60?{text:"Moderate",cls:"text-amber-700",bar:"bg-amber-500"}:{text:"High concern",cls:"text-red-700",bar:"bg-red-500"}}const io={plagiarism:"Similarity & Plagiarism",ai_detection:"AI-Written Content",citation:"Citation Authenticity",statistics:"Statistical Integrity",writing:"Writing & Standards",provenance:"Provenance Chain Verification"},Dd={plagiarism:"Compares your paper against an indexed corpus of 2,500+ open-access abstracts (semantic similarity) and scans for duplicated text between the paper's own sections. Higher score = more overlap found.",ai_detection:"A fine-tuned DistilBERT model, trained on 3,600 real arXiv abstracts versus controlled AI rewrites, estimates the probability that the text was generated by an AI. Higher = more AI-like.",citation:"Every DOI is checked live against the CrossRef registry. Missing or invalid DOIs reduce the score, because fabricated references are a common integrity red flag.",statistics:"Looks for unrealistic numeric patterns — suspiciously clean p-values, round percentages, and implausible results — that often appear in manipulated reporting.",writing:"Checks the paper against academic conventions: required sections, formal tone, consistent citation style, citation-text linkage, figure/table references, and heading hierarchy.",provenance:"VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Web-source attribution runs against live web search at zero cost (no API key required)."};function Kk({score:e,size:t=96}){const n=(t-12)/2,r=2*Math.PI*n,s=r*(1-Math.min(100,Math.max(0,e))/100);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:t,height:t},children:[m.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[m.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"#e2e8f0",strokeWidth:8}),m.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:e>=70?"#10b981":e>=45?"#f59e0b":"#ef4444",strokeWidth:8,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:s,style:{transition:"stroke-dashoffset 0.8s ease"}})]}),m.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[m.jsx("span",{className:"text-xl font-bold text-slate-900",children:Math.round(e)}),m.jsx("span",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:"/ 100"})]})]})}function Xk({value:e,color:t="bg-blue-500"}){return m.jsx("div",{className:"w-full h-1.5 bg-slate-200 rounded-full overflow-hidden",children:m.jsx("div",{className:`h-full rounded-full ${t}`,style:{width:`${Math.min(100,Math.max(0,e))}%`}})})}function Yk({data:e}){return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Corpus matches"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.matches.length})]}),m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Repeated paragraphs"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.duplicate_paragraphs})]})]}),e.matches.length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Matched sources"}),m.jsx("div",{className:"space-y-2",children:e.matches.map((t,n)=>m.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[m.jsx("p",{className:"font-medium text-slate-900 text-sm",children:t.title}),m.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[Math.round(t.similarity),"% similar · ",t.source]}),m.jsxs("p",{className:"text-xs text-slate-600 mt-2 italic",children:['"',t.matched_text,'"']})]},n))})]}),e.matches.length===0&&m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"No significant similarity to the indexed open corpus. Note: free-tier analysis checks a representative corpus of open-access literature, not the whole internet."})]})}function Jk({data:e}){const t=e.ai_probability<38,n=e.ai_probability>62;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:t?"The text shows natural human writing patterns — varied sentence structure and organic rhythm that AI generators rarely reproduce.":n?"The text shows strong AI-like regularity: unusually uniform sentence lengths, dense hedging phrases, and templated argument flow.":"Signals are mixed. The model cannot decide confidently — common for well-edited human text or lightly AI-assisted drafts."}),m.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"Engine:"})," ",e.engine==="transformer_finetuned"?"Fine-tuned transformer (DistilBERT)":e.engine]}),m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"Trained on:"})," 3,600 real arXiv abstracts vs. controlled AI rewrites"]}),m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"What it means:"})," this is a probability, not proof. Always treat as one signal among many."]})]})]})}function Zk({data:e}){var t,n;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Total DOIs"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.total_dois})]}),m.jsxs("div",{className:"card bg-emerald-50 border-emerald-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-emerald-700",children:"Verified"}),m.jsx("p",{className:"text-2xl font-bold text-emerald-800",children:e.valid_dois})]}),m.jsxs("div",{className:"card bg-red-50 border-red-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-red-700",children:"Invalid / missing"}),m.jsx("p",{className:"text-2xl font-bold text-red-800",children:(((t=e.invalid_dois)==null?void 0:t.length)||0)+e.references_without_doi})]})]}),((n=e.verified_dois)==null?void 0:n.length)>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Reference-by-reference"}),m.jsx("div",{className:"space-y-2",children:e.verified_dois.map((r,s)=>m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${r.valid?"bg-emerald-50 border-emerald-200":"bg-red-50 border-red-200"}`,children:[m.jsx("p",{className:"font-medium text-slate-900",children:r.doi}),r.title&&m.jsxs("p",{className:"text-slate-600 mt-1",children:[r.title,r.year?` (${r.year})`:""]}),m.jsx("p",{className:r.valid?"text-emerald-700":"text-red-700",children:r.valid?"✓ Exists in CrossRef":"✗ Not found in CrossRef — verify the source"})]},s))})]})]})}function eN({data:e}){var t;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),((t=e.findings)==null?void 0:t.length)>0?m.jsx("div",{className:"space-y-2",children:e.findings.map((n,r)=>m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${n.severity==="high"?"bg-red-50 border-red-200":n.severity==="medium"?"bg-amber-50 border-amber-200":"bg-slate-50 border-slate-200"}`,children:[m.jsxs("p",{className:"font-semibold text-slate-900",children:[n.category," ",m.jsxs("span",{className:"font-normal text-slate-500",children:["· ",n.severity]})]}),m.jsx("p",{className:"text-slate-600 mt-1",children:n.detail})]},r))}):m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"No suspicious numeric patterns detected in the reported results."})]})}function tN({data:e}){var n,r,s;if(!e)return m.jsx("p",{className:"text-sm text-slate-500",children:"Provenance data is not available for this analysis."});const t=({label:o,value:i,goodHigh:a,noteKey:l}={})=>{const u=typeof i=="number"?i:0,c=a?100-u:u,{text:d,cls:h,bar:_}=Kg(c);return m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500",children:o}),m.jsx("p",{className:"text-xl font-bold mt-1",children:Math.round(u)}),m.jsx("div",{className:"h-1.5 w-full bg-slate-200 rounded-full mt-1.5 overflow-hidden",children:m.jsx("div",{className:`h-full rounded-full ${_}`,style:{width:`${Math.min(100,Math.max(0,u))}%`}})}),m.jsx("p",{className:`text-[11px] mt-1.5 ${h}`,children:d}),l&&m.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:l})]})};return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[t({label:"Retraction contamination",value:e.contamination_score,goodHigh:!1}),t({label:"Citation-graph coherence",value:e.graph_anomaly_score,goodHigh:!1}),t({label:"Claim–citation alignment",value:e.alignment_score,goodHigh:!0}),t({label:"Statistical forensics",value:e.fingerprint_score,goodHigh:!0})]}),(((n=e.retracted_dois)==null?void 0:n.length)||0)>0&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("p",{className:"text-xs font-semibold text-red-700 uppercase tracking-wide",children:"⚠ Cited retracted research"}),e.retracted_dois.map((o,i)=>m.jsxs("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg text-xs",children:[m.jsx("p",{className:"font-medium text-slate-900",children:o.doi||"Unknown DOI"}),o.retraction_date&&m.jsxs("p",{className:"text-slate-600 mt-0.5",children:["Retracted ",o.retraction_date]}),o.notice_type&&m.jsxs("p",{className:"text-slate-500 mt-0.5",children:["Notice: ",o.notice_type]}),o.reason&&m.jsx("p",{className:"text-red-700 mt-0.5",children:o.reason})]},i))]}),(((r=e.alignment_verdicts)==null?void 0:r.length)||0)>0&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:"Claim-by-claim alignment"}),e.alignment_verdicts.map((o,i)=>{const a=o.alignment==="aligned",l=o.alignment==="weak";return m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${a?"bg-emerald-50 border-emerald-200":l?"bg-amber-50 border-amber-200":"bg-red-50 border-red-200"}`,children:[m.jsxs("p",{className:"font-medium text-slate-900 break-all",children:[o.doi||"Referenced claim"," ",m.jsx("span",{className:`ml-2 font-semibold ${a?"text-emerald-700":"text-amber-700"}`,children:a?"✓ Aligned":l?"⚠ Weak":"✗ Unsupported"})]}),o.reason&&m.jsx("p",{className:"text-slate-600 mt-1",children:o.reason}),typeof o.overlap=="number"&&m.jsxs("p",{className:"text-slate-500 mt-1",children:["Lexical overlap with cited abstract: ",Math.round(o.overlap*100),"%"]})]},i)})]}),e.web_summary&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:["Web source attribution · ",e.web_provider?e.web_provider.charAt(0).toUpperCase()+e.web_provider.slice(1):"unavailable"]}),e.web_available?(((s=e.web_matches)==null?void 0:s.length)||0)>0?m.jsx("div",{className:"space-y-2",children:e.web_matches.map((o,i)=>m.jsxs("div",{className:"p-3 bg-slate-50 border border-slate-200 rounded-lg text-xs",children:[m.jsx("p",{className:"font-semibold text-slate-900 truncate",children:o.title?m.jsx("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",className:"underline",children:o.title}):o.url}),o.snippet&&m.jsx("p",{className:"text-slate-600 mt-1 line-clamp-2",children:o.snippet}),m.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[m.jsx("div",{className:"h-1.5 flex-1 bg-slate-200 rounded-full overflow-hidden",children:m.jsx("div",{className:"h-full bg-indigo-500 rounded-full",style:{width:`${Math.min(100,Math.max(0,o.similarity||0))}%`}})}),m.jsxs("span",{className:"text-slate-500",children:[Math.round(o.similarity||0),"%"]})]})]},i))}):m.jsxs("p",{className:"text-xs text-emerald-700 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:["✓ Checked the live web (",e.web_provider||"search",") — no close matches for the flagged text."]}):m.jsx("p",{className:"text-xs text-slate-500 bg-slate-50 border border-slate-200 rounded-lg p-3",children:e.web_summary})]})]})}function nN({data:e}){return m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"flex flex-wrap gap-2",children:(e.checks||[]).map((t,n)=>m.jsxs("span",{className:`text-xs px-2.5 py-1 rounded-full border ${t.passed?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-amber-50 text-amber-700 border-amber-200"}`,children:[t.passed?"✓":"⚠"," ",t.name]},n))}),m.jsxs("div",{className:"space-y-3",children:[(e.checks||[]).filter(t=>!t.passed).map((t,n)=>{var r;return m.jsxs("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded-lg",children:[m.jsx("p",{className:"text-sm font-semibold text-amber-900",children:t.name}),m.jsx("p",{className:"text-xs text-amber-800 mt-1",children:t.detail}),((r=t.suggestions)==null?void 0:r.length)>0&&m.jsxs("p",{className:"text-xs text-amber-700 mt-1",children:[m.jsx("span",{className:"font-semibold",children:"Fix:"})," ",t.suggestions[0]]})]},n)}),(e.checks||[]).filter(t=>!t.passed).length===0&&m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"All writing-standards checks passed."})]}),Object.keys(e.section_map||{}).length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Detected structure"}),m.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.values(e.section_map).map((t,n)=>m.jsx("span",{className:"text-[11px] px-2 py-0.5 bg-slate-100 text-slate-600 rounded",children:t},n))})]})]})}function rN(e){const t=(n,r=0)=>typeof n=="number"&&Number.isFinite(n)?n:r;return{id:e.id,filename:e.filename,word_count:e.word_count,section_count:0,sections:[],overall_research_credibility:t(e.overall_research_credibility),verdict:e.verdict,report_path:e.report_path,analyzed_at:e.analyzed_at,action_items:[],risk_triggers:[],plagiarism:{score:t(e.plagiarism_score),summary:"Replay of a stored analysis — detailed source matches are not kept after the original scan completes (papers are never permanently stored).",matches:[],duplicate_paragraphs:0},ai_detection:{ai_probability:t(e.ai_probability),confidence:e.ai_confidence,engine:e.ai_engine},citation:{validity_score:t(e.citation_validity_score),summary:"Replay of a stored analysis — per-reference details are not kept after the original scan completes.",total_dois:0,valid_dois:0,invalid_dois:[],references_without_doi:0,verified_dois:[]},statistics:{risk_score:100-t(e.statistical_risk_score),summary:"Replay of a stored analysis — numeric findings are not kept after the original scan completes.",findings:[]},writing:{score:t(e.writing_quality_score),checks:[]},provenance:sN(e)}}function sN(e){const t=(r,s)=>typeof r=="number"&&Number.isFinite(r)?r:s,n=e.provenance_details||{};return e.provenance_score==null&&!n?null:{score:t(e.provenance_score,50),summary:n.summary||"Replay of a stored analysis — detailed provenance evidence is not kept after the original scan completes.",contamination_score:n.contamination_score??t(e.retraction_contamination_score,50),graph_anomaly_score:n.graph_anomaly_score??t(e.citation_graph_anomaly_score,50),alignment_score:n.alignment_score??t(e.claim_alignment_score,50),fingerprint_score:n.fingerprint_score??t(e.methodology_fingerprint_score,50),contamination_summary:n.contamination_summary||"",retracted_dois:n.retracted_dois||[],alignment_verdicts:n.alignment_verdicts||[],fingerprint_notes:n.fingerprint_notes||{},graph_density:n.graph_density||0,isolated_references:n.isolated_references||0,web_matches:n.web_matches||[],web_summary:n.web_summary||"",web_available:n.web_available===!0,web_provider:n.web_provider||""}}function oN(){var De,ye,_t,Ve;const[e,t]=Y.useState(null),[n,r]=Y.useState(!1),[s,o]=Y.useState(0),[i,a]=Y.useState(null),[l,u]=Y.useState(""),[c,d]=Y.useState("ai_detection"),[h,_]=Y.useState(null),[v,E]=Y.useState([]),[w]=Y.useState(Qg()),[f,p]=Y.useState(!1),[g,S]=Y.useState(""),[N,R]=Y.useState(!1),T=()=>m.jsxs("div",{className:"p-6 text-center",children:[m.jsx("p",{className:"text-sm font-medium text-slate-900",children:"This detail could not be shown"}),m.jsx("p",{className:"text-xs text-slate-500 mt-2 max-w-md mx-auto",children:"The detailed data for this older analysis is not kept on the server (papers are never stored). The overview scores above are still accurate — for a full replay, re-upload the paper."})]});Y.useEffect(()=>{zk().then(_).catch(()=>{}),Uk().then(P=>E(Array.isArray(P)?P:(P==null?void 0:P.results)??[])).catch(()=>{}),localStorage.getItem("veripaper_onboarded")||p(!0)},[]);const I=Y.useMemo(()=>{var P,x,b,j,D,U;return i?[{key:"plagiarism",score:((P=i.plagiarism)==null?void 0:P.score)??0,invert:!0},{key:"ai_detection",score:((x=i.ai_detection)==null?void 0:x.ai_probability)??0},{key:"citation",score:((b=i.citation)==null?void 0:b.validity_score)??0},{key:"statistics",score:100-(((j=i.statistics)==null?void 0:j.risk_score)??0),invert:!0},{key:"writing",score:((D=i.writing)==null?void 0:D.score)??0},{key:"provenance",score:((U=i.provenance)==null?void 0:U.score)??0}]:[]},[i]),W=Y.useMemo(()=>i?Qk(i.verdict):null,[i]),L=async P=>{if(P.preventDefault(),!e){u("Please select a paper first (PDF, DOCX or TXT).");return}if(e.size>15*1024*1024){u("File is larger than 15 MB.");return}u(""),r(!0),a(null),o(8);const x=[];try{o(10);const{task_id:b}=await Lk(e),D=(await Mk(b,U=>{U.status==="queued"?o(15):U.status==="processing"&&o(50)},800,12e4)).result;o(100),a(D),Vk(D),E(U=>[{id:`analysis_${Date.now()}`,filename:D.filename,analyzed_at:new Date().toISOString(),overall_research_credibility:D.overall_research_credibility,verdict:D.verdict},...U].slice(0,15)),d("ai_detection")}catch(b){u(G(b,"Analysis failed. Please try again."))}finally{x.forEach(clearTimeout),r(!1)}},G=(P,x)=>{var j,D;const b=((D=(j=P==null?void 0:P.response)==null?void 0:j.data)==null?void 0:D.detail)??(P==null?void 0:P.message)??x;if(typeof b=="string")return b;if(Array.isArray(b)){const U=b[0];return U&&typeof U.msg=="string"?U.msg:String(b[0]??x)}return b&&typeof b.msg=="string"?b.msg:b&&typeof b.detail=="string"?b.detail:x},Te=async P=>{u(""),S("");const x=Number(P.id);if(!Number.isFinite(x)){S("This entry was saved in your browser only — re-upload the paper for a fresh verification.");return}R(!0);try{const b=await $k(x);a(rN(b)),d("ai_detection")}catch(b){S(G(b,"Could not open this analysis. Re-upload the paper for a fresh verification."))}finally{R(!1)}};return m.jsxs("div",{className:"min-h-screen bg-slate-50",children:[m.jsx("header",{className:"sticky top-0 z-40 bg-white/90 backdrop-blur border-b border-slate-200",children:m.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-600 to-indigo-700 text-white font-bold flex items-center justify-center",children:"V"}),m.jsxs("div",{children:[m.jsx("p",{className:"font-bold text-slate-900 leading-tight",children:"VeriPaper"}),m.jsx("p",{className:"text-[11px] text-slate-500 leading-tight",children:"Research Verification Suite"})]})]}),m.jsxs("nav",{className:"hidden sm:flex items-center gap-1 text-sm",children:[m.jsx("a",{href:"#analyze",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"Analyze"}),m.jsx("a",{href:"#history",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"History"}),m.jsx("a",{href:"#method",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"How it works"})]})]})}),m.jsxs("main",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-8 space-y-8",children:[m.jsxs("section",{className:"text-center max-w-2xl mx-auto",children:[m.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full bg-blue-100 text-blue-700 mb-4",children:"✦ VeriPaper — the 6-in-1 integrity check"}),m.jsxs("h1",{className:"text-3xl sm:text-4xl font-black text-slate-900 tracking-tight",children:["Is your research paper really ",m.jsx("span",{className:"text-blue-600",children:"credible?"})]}),m.jsx("p",{className:"text-slate-600 mt-3",children:"One upload. Six checks: plagiarism, AI authorship, citation authenticity, statistical integrity, academic writing standards, and provenance-chain verification — every result explained in plain language."})]}),m.jsx("section",{id:"analyze",className:"card bg-white border border-slate-200 shadow-sm",children:m.jsxs("form",{onSubmit:L,className:"space-y-4",children:[m.jsxs("label",{className:"flex flex-col items-center justify-center border-2 border-dashed border-slate-300 rounded-xl p-8 text-center cursor-pointer hover:border-blue-500 hover:bg-blue-50/40 transition-colors",children:[m.jsx("input",{type:"file",accept:".pdf,.docx,.txt",className:"hidden",onChange:P=>{var x;return t(((x=P.target.files)==null?void 0:x[0])||null)}}),m.jsx("span",{className:"text-3xl",children:"📄"}),m.jsx("p",{className:"font-semibold text-slate-900 mt-2 text-sm break-all",children:e?e.name:"Drop your paper here, or click to browse"}),m.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"PDF, DOCX, or TXT · max 15 MB · processed privately, never shared"})]}),l&&m.jsxs("p",{className:"text-xs font-medium text-red-700 bg-red-50 border border-red-200 rounded-lg p-3",children:["⚠ ",l]}),n&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex justify-between text-xs text-slate-600",children:[m.jsx("span",{children:"Analyzing… (parsing · AI model · similarity corpus · CrossRef)"}),m.jsxs("span",{children:[Math.round(s),"%"]})]}),m.jsx(Xk,{value:s,color:"bg-blue-500"})]}),m.jsx("button",{type:"submit",disabled:n||!e,className:"w-full btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Analyzing…":"Run Full Verification"})]})}),i&&m.jsxs("section",{className:"space-y-6",children:[m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[m.jsx(Kk,{score:i.overall_research_credibility,size:110}),m.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[m.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500 font-semibold mb-1",children:"Overall credibility"}),m.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:W.title}),m.jsx("p",{className:"text-sm text-slate-600 mt-2 max-w-xl",children:W.desc}),m.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 justify-center sm:justify-start",children:[m.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full border font-medium ${W.badge}`,children:i.verdict}),m.jsxs("span",{className:"text-xs px-2.5 py-1 rounded-full bg-slate-100 text-slate-600",children:[i.word_count," words · ",i.section_count," sections · ",i.filename]})]})]})]}),(((De=i.action_items)==null?void 0:De.length)>0||((ye=i.risk_triggers)==null?void 0:ye.length)>0)&&m.jsxs("div",{className:"mt-5 border-t border-slate-100 pt-4",children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-2",children:"Recommended next steps"}),m.jsx("ol",{className:"space-y-1.5",children:i.action_items.map((P,x)=>m.jsxs("li",{className:"flex gap-2 text-sm text-slate-700",children:[m.jsxs("span",{className:"font-semibold text-blue-600",children:[x+1,"."]})," ",P]},x))})]})]}),m.jsx("div",{className:"grid grid-cols-5 gap-2",children:I.map(P=>{const x=Kg(P.score),b=c===P.key;return m.jsxs("button",{onClick:()=>d(P.key),className:`card text-center py-3 px-1 border transition-colors ${b?"border-blue-500 ring-1 ring-blue-500 bg-blue-50/40":"bg-white border-slate-200 hover:border-slate-300"}`,children:[m.jsx("p",{className:"text-[11px] font-semibold text-slate-500 leading-tight",children:io[P.key]}),m.jsx("p",{className:`text-lg font-bold leading-tight mt-1 ${x.cls}`,children:Math.round(P.score)}),m.jsx("p",{className:`text-[10px] leading-tight mt-0.5 ${x.cls}`,children:x.text})]},P.key)})}),m.jsx(qk,{fallback:T,children:m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-3 border-b border-slate-100 pb-4 mb-4",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"font-bold text-slate-900",children:io[c]}),m.jsx("p",{className:"text-xs text-slate-500 mt-1 max-w-xl",children:Dd[c]})]}),m.jsxs("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:[c==="statistics"?"Integrity: ":c==="citation"||c==="writing"||c==="provenance"?"Score: ":"Risk: ",Math.round(I.find(P=>P.key===c).score)," / 100"]})]}),c==="plagiarism"&&m.jsx(Yk,{data:i.plagiarism}),c==="ai_detection"&&m.jsx(Jk,{data:i.ai_detection}),c==="citation"&&m.jsx(Zk,{data:i.citation}),c==="statistics"&&m.jsx(eN,{data:i.statistics}),c==="writing"&&m.jsx(nN,{data:i.writing}),c==="provenance"&&m.jsx(tN,{data:i.provenance})]})}),m.jsxs("div",{className:"grid lg:grid-cols-[1fr_320px] gap-6",children:[m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsx("h3",{className:"font-bold text-slate-900 mb-3 text-sm",children:"Detected structure"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:i.sections.map((P,x)=>m.jsxs("div",{className:"text-xs px-2.5 py-1.5 bg-slate-50 border border-slate-200 rounded-lg",children:[m.jsx("span",{className:"font-medium text-slate-800",children:P.heading}),m.jsxs("span",{className:"text-slate-500",children:[" · ",P.word_count,"w"]})]},x))})]}),m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm space-y-3",children:[m.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:"Export evidence"}),m.jsx("button",{onClick:()=>Bk(i.report_path),className:"btn-primary w-full text-sm",children:"📥 PDF Report"}),m.jsx("button",{onClick:()=>Hk(i),className:"btn-secondary w-full text-sm",children:"CSV Export"}),m.jsx("button",{onClick:()=>Wk(i),className:"btn-secondary w-full text-sm",children:"JSON Export"})]})]})]}),m.jsxs("section",{id:"history",className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsx("h3",{className:"font-bold text-slate-900 mb-4",children:"Analysis history"}),v.length===0?m.jsx("p",{className:"text-sm text-slate-500 py-8 text-center",children:"No analyses yet — your first verification will appear here."}):m.jsx("div",{className:"space-y-2",children:v.map((P,x)=>m.jsxs("button",{onClick:()=>Te(P),className:"w-full text-left flex items-center justify-between p-3 bg-slate-50 rounded-lg border border-slate-200 hover:border-blue-300 hover:bg-blue-50 transition-colors disabled:opacity-60",disabled:N,children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium text-slate-900",children:P.filename}),m.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:new Date(P.analyzed_at).toLocaleString()})]}),m.jsxs("span",{className:"text-xs font-semibold text-slate-600",children:[Math.round(P.overall_research_credibility),"% · ",P.verdict]})]},P.id||x))}),g&&m.jsx("p",{className:"text-xs text-red-600 bg-red-50 border border-red-200 rounded-lg p-3 mt-3",children:g}),N&&m.jsx("p",{className:"text-xs text-slate-500 mt-3",children:"Opening previous analysis…"}),w.length>0&&m.jsxs("p",{className:"text-[11px] text-slate-400 mt-3",children:["Also saved locally in this browser (",w.length," entries)."]})]}),m.jsxs("section",{id:"method",className:"space-y-4",children:[m.jsx("h3",{className:"font-bold text-slate-900 text-lg",children:"How VeriPaper verifies a paper"}),m.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:Object.entries(Dd).map(([P,x])=>m.jsxs("div",{className:"card bg-white border border-slate-200",children:[m.jsx("p",{className:"text-sm font-bold text-slate-900",children:io[P]}),m.jsx("p",{className:"text-xs text-slate-600 mt-2 leading-relaxed",children:x})]},P))}),m.jsxs("div",{className:"card bg-amber-50 border border-amber-200 text-xs text-amber-800 p-4",children:[m.jsx("span",{className:"font-semibold",children:"Important:"})," every score is a likelihood signal generated by statistical models — not legal proof of misconduct. Use VeriPaper to triage and prioritize manual review, never as the sole basis for an accusation."]})]})]}),m.jsx("footer",{className:"border-t border-slate-200 bg-white py-8 mt-8",children:m.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 flex flex-col sm:flex-row items-center justify-between gap-3 text-xs text-slate-500",children:[m.jsx("p",{children:"© 2026 VeriPaper — Research Verification Suite"}),(h==null?void 0:h.ai_detection)&&m.jsxs("p",{children:["AI model: ",((_t=h.ai_detection.model_version)==null?void 0:_t.split("/").pop())||h.ai_detection.model_version," (validation F1 ",(Ve=h.ai_detection.metrics)==null?void 0:Ve.f1,")"]})]})}),f&&m.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>{p(!1),localStorage.setItem("veripaper_onboarded","1")},children:m.jsxs("div",{className:"bg-white rounded-2xl shadow-xl max-w-md w-full p-6",onClick:P=>P.stopPropagation(),children:[m.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Welcome to VeriPaper 👋"}),m.jsx("p",{className:"text-sm text-slate-600 mt-2",children:"Upload any research paper (PDF/DOCX/TXT) and we'll check five things at once:"}),m.jsx("ul",{className:"mt-3 space-y-1.5 text-sm text-slate-700",children:Object.values(io).map((P,x)=>m.jsxs("li",{className:"flex gap-2",children:[m.jsxs("span",{className:"text-blue-600 font-bold",children:[x+1,"."]})," ",P]},x))}),m.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"Scores are signals to guide review — not proof."}),m.jsx("button",{onClick:()=>{p(!1),localStorage.setItem("veripaper_onboarded","1")},className:"btn-primary w-full mt-4",children:"Got it — start analyzing"})]})})]})}ya.createRoot(document.getElementById("root")).render(m.jsx(my.StrictMode,{children:m.jsx(ww.ErrorBoundary,{fallback:m.jsx(iN,{}),children:m.jsx(oN,{})})}));function iN({error:e}){return m.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center p-6",children:m.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl p-8 max-w-md text-center",children:[m.jsx("h1",{className:"text-xl font-bold text-white mb-2",children:"Something went wrong"}),m.jsx("p",{className:"text-slate-300 mb-6 text-sm",children:"VeriPaper hit an unexpected error and we have already reported it. Try refreshing the page — your analysis history is saved locally."}),m.jsx("button",{onClick:()=>window.location.reload(),className:"px-5 py-2 rounded-lg bg-violet-600 hover:bg-violet-500 text-white text-sm font-medium transition-colors",children:"Refresh page"})]})})} diff --git a/backend/frontend/dist/index.html b/backend/frontend/dist/index.html index d749acaa..6778f640 100644 --- a/backend/frontend/dist/index.html +++ b/backend/frontend/dist/index.html @@ -5,8 +5,8 @@ VeriPaper — Research Paper Verification Suite - - + +
diff --git a/backend/frontend/src/App.jsx b/backend/frontend/src/App.jsx index 5bbde870..93c9f823 100644 --- a/backend/frontend/src/App.jsx +++ b/backend/frontend/src/App.jsx @@ -55,7 +55,7 @@ const MODULE_EXPLAIN = { citation: "Every DOI is checked live against the CrossRef registry. Missing or invalid DOIs reduce the score, because fabricated references are a common integrity red flag.", statistics: "Looks for unrealistic numeric patterns — suspiciously clean p-values, round percentages, and implausible results — that often appear in manipulated reporting.", writing: "Checks the paper against academic conventions: required sections, formal tone, consistent citation style, citation-text linkage, figure/table references, and heading hierarchy.", - provenance: "VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Optional web-source attribution needs a BRAVE_API_KEY on the server.", + provenance: "VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Web-source attribution runs against live web search at zero cost (no API key required).", }; function GradeGauge({ score, size = 96 }) { @@ -271,7 +271,7 @@ function ProvenancePanel({ data }) { )} {data.web_summary && (
-

Web source attribution {data.web_available ? "" : "(not configured)"}

+

Web source attribution · {data.web_provider ? data.web_provider.charAt(0).toUpperCase() + data.web_provider.slice(1) : "unavailable"}

{data.web_available ? ( (data.web_matches?.length || 0) > 0 ? (
@@ -291,7 +291,7 @@ function ProvenancePanel({ data }) { ))}
) : ( -

✓ No matching sources found on the open web.

+

✓ Checked the live web ({data.web_provider || "search"}) — no close matches for the flagged text.

) ) : (

{data.web_summary}

@@ -418,6 +418,7 @@ function buildReplayProvenance(record) { web_matches: details.web_matches || [], web_summary: details.web_summary || "", web_available: details.web_available === true, + web_provider: details.web_provider || "", }; } diff --git a/backend/tests/test_services.py b/backend/tests/test_services.py index 65b696f7..f653ccc6 100644 --- a/backend/tests/test_services.py +++ b/backend/tests/test_services.py @@ -180,6 +180,8 @@ def test_scoring_high_ai_yields_review_verdict(): fingerprint_methodology, fuse_pcv_scores, ) +import types +from app.services import web_attribution from app.services.web_attribution import attribute_web_sources @@ -223,9 +225,35 @@ def test_pcv_fusion_bounded_and_reasonable(): assert 0 <= fused <= 100 -def test_web_attribution_degrades_without_key(monkeypatch): +def test_web_attribution_works_without_any_key(monkeypatch): + """Web attribution stays available with zero API keys via the DuckDuckGo fallback.""" monkeypatch.setenv("BRAVE_API_KEY", "") + monkeypatch.setenv("GOOGLE_CSE_API_KEY", "") + monkeypatch.delenv("GOOGLE_CSE_ID", raising=False) + + class _FakeResp: + status_code = 200 + text = ( + "" + "Example machine learning evaluation paper" + ) + + def _fake_post(url, **kwargs): + return _FakeResp() + + monkeypatch.setattr(web_attribution, "requests", types.SimpleNamespace(post=_fake_post, get=lambda *a, **k: _FakeResp())) result = attribute_web_sources(["a sentence about machine learning evaluation"]) - assert result.available is False - assert "not configured" in result.summary.lower() + assert result.available is True + assert result.provider == "duckduckgo" + assert result.segments_checked == 1 + assert len(result.matches) == 1 + assert result.matches[0].url == "https://example.com/paper" + + +def test_web_attribution_empty_segments_needs_no_provider(monkeypatch): + monkeypatch.setenv("BRAVE_API_KEY", "") + monkeypatch.setenv("GOOGLE_CSE_API_KEY", "") + result = attribute_web_sources([]) + assert result.available is True + assert result.matches == [] diff --git a/frontend/dist/dist/assets/index-BOzsEJay.js b/frontend/dist/dist/assets/index-BOzsEJay.js new file mode 100644 index 00000000..ea9b6e38 --- /dev/null +++ b/frontend/dist/dist/assets/index-BOzsEJay.js @@ -0,0 +1,63 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ld={exports:{}},ri={},Fd={exports:{}},$={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ss=Symbol.for("react.element"),Zg=Symbol.for("react.portal"),ey=Symbol.for("react.fragment"),ty=Symbol.for("react.strict_mode"),ny=Symbol.for("react.profiler"),ry=Symbol.for("react.provider"),sy=Symbol.for("react.context"),oy=Symbol.for("react.forward_ref"),iy=Symbol.for("react.suspense"),ay=Symbol.for("react.memo"),ly=Symbol.for("react.lazy"),rc=Symbol.iterator;function uy(e){return e===null||typeof e!="object"?null:(e=rc&&e[rc]||e["@@iterator"],typeof e=="function"?e:null)}var Md={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ud=Object.assign,$d={};function hr(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Md}hr.prototype.isReactComponent={};hr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zd(){}zd.prototype=hr.prototype;function jl(e,t,n){this.props=e,this.context=t,this.refs=$d,this.updater=n||Md}var Al=jl.prototype=new zd;Al.constructor=jl;Ud(Al,hr.prototype);Al.isPureReactComponent=!0;var sc=Array.isArray,Bd=Object.prototype.hasOwnProperty,Dl={current:null},Hd={key:!0,ref:!0,__self:!0,__source:!0};function Wd(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Bd.call(t,r)&&!Hd.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,U=x[D];if(0>>1;Ds(Dn,j))zs(de,Dn)?(x[D]=de,x[z]=j,D=z):(x[D]=Dn,x[Le]=j,D=Le);else if(zs(de,j))x[D]=de,x[z]=j,D=z;else break e}}return b}function s(x,b){var j=x.sortIndex-b.sortIndex;return j!==0?j:x.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,d=null,h=3,_=!1,v=!1,E=!1,w=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(x){for(var b=n(u);b!==null;){if(b.callback===null)r(u);else if(b.startTime<=x)r(u),b.sortIndex=b.expirationTime,t(l,b);else break;b=n(u)}}function S(x){if(E=!1,g(x),!v)if(n(l)!==null)v=!0,Ve(N);else{var b=n(u);b!==null&&P(S,b.startTime-x)}}function N(x,b){v=!1,E&&(E=!1,f(I),I=-1),_=!0;var j=h;try{for(g(b),d=n(l);d!==null&&(!(d.expirationTime>b)||x&&!G());){var D=d.callback;if(typeof D=="function"){d.callback=null,h=d.priorityLevel;var U=D(d.expirationTime<=b);b=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(l)&&r(l),g(b)}else r(l);d=n(l)}if(d!==null)var et=!0;else{var Le=n(u);Le!==null&&P(S,Le.startTime-b),et=!1}return et}finally{d=null,h=j,_=!1}}var R=!1,T=null,I=-1,W=5,L=-1;function G(){return!(e.unstable_now()-Lx||125D?(x.sortIndex=j,t(u,x),n(l)===null&&x===n(u)&&(E?(f(I),I=-1):E=!0,P(S,j-D))):(x.sortIndex=U,t(l,x),v||_||(v=!0,Ve(N))),x},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(x){var b=h;return function(){var j=h;h=b;try{return x.apply(this,arguments)}finally{h=j}}}})(Kd);Qd.exports=Kd;var Ey=Qd.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xy=Y,Be=Ey;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_a=Object.prototype.hasOwnProperty,wy=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ic={},ac={};function ky(e){return _a.call(ac,e)?!0:_a.call(ic,e)?!1:wy.test(e)?ac[e]=!0:(ic[e]=!0,!1)}function Ny(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ry(e,t,n,r){if(t===null||typeof t>"u"||Ny(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fl=/[\-:]([a-z])/g;function Ml(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fl,Ml);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ul(e,t,n,r){var s=ge.hasOwnProperty(t)?ge[t]:null;(s!==null?s.type!==0:r||!(2a||s[i]!==o[a]){var l=` +`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Pi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function Cy(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ji(e.type,!1),e;case 11:return e=ji(e.type.render,!1),e;case 1:return e=ji(e.type,!0),e;default:return""}}function xa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $n:return"Fragment";case Un:return"Portal";case va:return"Profiler";case $l:return"StrictMode";case Sa:return"Suspense";case Ea:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jd:return(e.displayName||"Context")+".Consumer";case Yd:return(e._context.displayName||"Context")+".Provider";case zl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bl:return t=e.displayName||null,t!==null?t:xa(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return xa(e(t))}catch{}}return null}function Ty(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xa(t);case 8:return t===$l?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function en(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ep(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function by(e){var t=ep(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $s(e){e._valueTracker||(e._valueTracker=by(e))}function tp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ep(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wa(e,t){var n=t.checked;return te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=en(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function np(e,t){t=t.checked,t!=null&&Ul(e,"checked",t,!1)}function ka(e,t){np(e,t);var n=en(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Na(e,t.type,n):t.hasOwnProperty("defaultValue")&&Na(e,t.type,en(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Na(e,t,n){(t!=="number"||Co(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mr=Array.isArray;function Yn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=zs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oy=["Webkit","ms","Moz","O"];Object.keys(Hr).forEach(function(e){Oy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hr[t]=Hr[e]})});function ip(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Hr.hasOwnProperty(e)&&Hr[e]?(""+t).trim():t+"px"}function ap(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=ip(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Iy=te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ta(e,t){if(t){if(Iy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function ba(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Oa=null;function Hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,Jn=null,Zn=null;function pc(e){if(e=ws(e)){if(typeof Ia!="function")throw Error(k(280));var t=e.stateNode;t&&(t=li(t),Ia(e.stateNode,e.type,t))}}function lp(e){Jn?Zn?Zn.push(e):Zn=[e]:Jn=e}function up(){if(Jn){var e=Jn,t=Zn;if(Zn=Jn=null,pc(e),t)for(e=0;e>>=0,e===0?32:31-(By(e)/Hy|0)|0}var Bs=64,Hs=4194304;function Ur(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Io(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Ur(a):(o&=i,o!==0&&(r=Ur(o)))}else i=n&~s,i!==0?r=Ur(i):o!==0&&(r=Ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Es(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ot(t),e[t]=n}function Gy(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Vr),xc=" ",wc=!1;function bp(e,t){switch(e){case"keyup":return E0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zn=!1;function w0(e,t){switch(e){case"compositionend":return Op(t);case"keypress":return t.which!==32?null:(wc=!0,xc);case"textInput":return e=t.data,e===xc&&wc?null:e;default:return null}}function k0(e,t){if(zn)return e==="compositionend"||!Yl&&bp(e,t)?(e=Cp(),co=Ql=Ht=null,zn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cc(n)}}function Ap(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ap(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dp(){for(var e=window,t=Co();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Co(e.document)}return t}function Jl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function j0(e){var t=Dp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ap(n.ownerDocument.documentElement,n)){if(r!==null&&Jl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Tc(n,o);var i=Tc(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bn=null,Fa=null,Gr=null,Ma=!1;function bc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ma||Bn==null||Bn!==Co(r)||(r=Bn,"selectionStart"in r&&Jl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&is(Gr,r)||(Gr=r,r=Ao(Fa,"onSelect"),0Vn||(e.current=Wa[Vn],Wa[Vn]=null,Vn--)}function Q(e,t){Vn++,Wa[Vn]=e.current,e.current=t}var tn={},we=an(tn),Ie=an(!1),xn=tn;function sr(e,t){var n=e.type.contextTypes;if(!n)return tn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function Lo(){X(Ie),X(we)}function Lc(e,t,n){if(we.current!==tn)throw Error(k(168));Q(we,t),Q(Ie,n)}function Wp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(k(108,Ty(e)||"Unknown",s));return te({},n,r)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tn,xn=we.current,Q(we,e),Q(Ie,Ie.current),!0}function Fc(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=Wp(e,t,xn),r.__reactInternalMemoizedMergedChildContext=e,X(Ie),X(we),Q(we,e)):X(Ie),Q(Ie,n)}var kt=null,ui=!1,Gi=!1;function Vp(e){kt===null?kt=[e]:kt.push(e)}function V0(e){ui=!0,Vp(e)}function ln(){if(!Gi&&kt!==null){Gi=!0;var e=0,t=q;try{var n=kt;for(q=1;e>=i,s-=i,Nt=1<<32-ot(t)+s|n<I?(W=T,T=null):W=T.sibling;var L=h(f,T,g[I],S);if(L===null){T===null&&(T=W);break}e&&T&&L.alternate===null&&t(f,T),p=o(L,p,I),R===null?N=L:R.sibling=L,R=L,T=W}if(I===g.length)return n(f,T),J&&cn(f,I),N;if(T===null){for(;II?(W=T,T=null):W=T.sibling;var G=h(f,T,L.value,S);if(G===null){T===null&&(T=W);break}e&&T&&G.alternate===null&&t(f,T),p=o(G,p,I),R===null?N=G:R.sibling=G,R=G,T=W}if(L.done)return n(f,T),J&&cn(f,I),N;if(T===null){for(;!L.done;I++,L=g.next())L=d(f,L.value,S),L!==null&&(p=o(L,p,I),R===null?N=L:R.sibling=L,R=L);return J&&cn(f,I),N}for(T=r(f,T);!L.done;I++,L=g.next())L=_(T,f,I,L.value,S),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?I:L.key),p=o(L,p,I),R===null?N=L:R.sibling=L,R=L);return e&&T.forEach(function(Te){return t(f,Te)}),J&&cn(f,I),N}function w(f,p,g,S){if(typeof g=="object"&&g!==null&&g.type===$n&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Us:e:{for(var N=g.key,R=p;R!==null;){if(R.key===N){if(N=g.type,N===$n){if(R.tag===7){n(f,R.sibling),p=s(R,g.props.children),p.return=f,f=p;break e}}else if(R.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ut&&$c(N)===R.type){n(f,R.sibling),p=s(R,g.props),p.ref=Pr(f,R,g),p.return=f,f=p;break e}n(f,R);break}else t(f,R);R=R.sibling}g.type===$n?(p=vn(g.props.children,f.mode,S,g.key),p.return=f,f=p):(S=vo(g.type,g.key,g.props,null,f.mode,S),S.ref=Pr(f,p,g),S.return=f,f=S)}return i(f);case Un:e:{for(R=g.key;p!==null;){if(p.key===R)if(p.tag===4&&p.stateNode.containerInfo===g.containerInfo&&p.stateNode.implementation===g.implementation){n(f,p.sibling),p=s(p,g.children||[]),p.return=f,f=p;break e}else{n(f,p);break}else t(f,p);p=p.sibling}p=ta(g,f.mode,S),p.return=f,f=p}return i(f);case Ut:return R=g._init,w(f,p,R(g._payload),S)}if(Mr(g))return v(f,p,g,S);if(Cr(g))return E(f,p,g,S);Xs(f,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,p!==null&&p.tag===6?(n(f,p.sibling),p=s(p,g),p.return=f,f=p):(n(f,p),p=ea(g,f.mode,S),p.return=f,f=p),i(f)):n(f,p)}return w}var ir=Kp(!0),Xp=Kp(!1),$o=an(null),zo=null,Qn=null,nu=null;function ru(){nu=Qn=zo=null}function su(e){var t=$o.current;X($o),e._currentValue=t}function Ga(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function tr(e,t){zo=e,nu=Qn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Oe=!0),e.firstContext=null)}function Ye(e){var t=e._currentValue;if(nu!==e)if(e={context:e,memoizedValue:t,next:null},Qn===null){if(zo===null)throw Error(k(308));Qn=e,zo.dependencies={lanes:0,firstContext:e}}else Qn=Qn.next=e;return t}var hn=null;function ou(e){hn===null?hn=[e]:hn.push(e)}function Yp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ou(t)):(n.next=s.next,s.next=n),t.interleaved=n,Pt(e,r)}function Pt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $t=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Pt(e,n)}return s=r.interleaved,s===null?(t.next=t,ou(r)):(t.next=s.next,s.next=t),r.interleaved=t,Pt(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}function zc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bo(e,t,n,r){var s=e.updateQueue;$t=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,c=u=l=null,a=o;do{var h=a.lane,_=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:_,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,E=a;switch(h=t,_=n,E.tag){case 1:if(v=E.payload,typeof v=="function"){d=v.call(_,d,h);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=E.payload,h=typeof v=="function"?v.call(_,d,h):v,h==null)break e;d=te({},d,h);break e;case 2:$t=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else _={eventTime:_,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=_,l=d):c=c.next=_,i|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Nn|=i,e.lanes=i,e.memoizedState=d}}function Bc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ki.transition;Ki.transition={};try{e(!1),t()}finally{q=n,Ki.transition=r}}function hm(){return Je().memoizedState}function K0(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gm(e))ym(t,n);else if(n=Yp(e,t,n,r),n!==null){var s=Ne();it(n,e,r,s),_m(n,t,r)}}function X0(e,t,n){var r=Yt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gm(e))ym(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,lt(a,i)){var l=t.interleaved;l===null?(s.next=s,ou(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Yp(e,t,s,r),n!==null&&(s=Ne(),it(n,e,r,s),_m(n,t,r))}}function gm(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function ym(e,t){Qr=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _m(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vl(e,n)}}var Vo={readContext:Ye,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Y0={readContext:Ye,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:Ye,useEffect:Wc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ho(4194308,4,cm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ho(4194308,4,e,t)},useInsertionEffect:function(e,t){return ho(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=K0.bind(null,ee,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:Hc,useDebugValue:mu,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=Hc(!1),t=e[0];return e=Q0.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ee,s=dt();if(J){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),fe===null)throw Error(k(349));kn&30||nm(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Wc(sm.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,rm.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=dt(),t=fe.identifierPrefix;if(J){var n=Rt,r=Nt;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ds++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[pt]=t,e[us]=r,Tm(e,t,!1,!1),t.stateNode=e;e:{switch(i=ba(n,r),n){case"dialog":K("cancel",e),K("close",e),s=r;break;case"iframe":case"object":case"embed":K("load",e),s=r;break;case"video":case"audio":for(s=0;s<$r.length;s++)K($r[s],e);s=r;break;case"source":K("error",e),s=r;break;case"img":case"image":case"link":K("error",e),K("load",e),s=r;break;case"details":K("toggle",e),s=r;break;case"input":uc(e,r),s=wa(e,r),K("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=te({},r,{value:void 0}),K("invalid",e);break;case"textarea":fc(e,r),s=Ra(e,r),K("invalid",e);break;default:s=r}Ta(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?ap(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&op(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&es(e,l):typeof l=="number"&&es(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Zr.hasOwnProperty(o)?l!=null&&o==="onScroll"&&K("scroll",e):l!=null&&Ul(e,o,l,i))}switch(n){case"input":$s(e),cc(e,r,!1);break;case"textarea":$s(e),dc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+en(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Yn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Yn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Do)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ve(t),null;case 6:if(e&&t.stateNode!=null)Om(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(k(166));if(n=gn(fs.current),gn(ht.current),Ks(t)){if(r=t.stateNode,n=t.memoizedProps,r[pt]=t,(o=r.nodeValue!==n)&&(e=ze,e!==null))switch(e.tag){case 3:Qs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pt]=t,t.stateNode=r}return ve(t),null;case 13:if(X(Z),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Ue!==null&&t.mode&1&&!(t.flags&128))Qp(),or(),t.flags|=98560,o=!1;else if(o=Ks(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(k(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(k(317));o[pt]=t}else or(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),o=!1}else st!==null&&(ul(st),st=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Z.current&1?le===0&&(le=3):Eu())),t.updateQueue!==null&&(t.flags|=4),ve(t),null);case 4:return ar(),tl(e,t),e===null&&as(t.stateNode.containerInfo),ve(t),null;case 10:return su(t.type._context),ve(t),null;case 17:return Pe(t.type)&&Lo(),ve(t),null;case 19:if(X(Z),o=t.memoizedState,o===null)return ve(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)jr(o,!1);else{if(le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ho(e),i!==null){for(t.flags|=128,jr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Q(Z,Z.current&1|2),t.child}e=e.sibling}o.tail!==null&&se()>ur&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ho(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!J)return ve(t),null}else 2*se()-o.renderingStartTime>ur&&n!==1073741824&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=Z.current,Q(Z,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return Su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function o_(e,t){switch(eu(t),t.tag){case 1:return Pe(t.type)&&Lo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ar(),X(Ie),X(we),uu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return lu(t),null;case 13:if(X(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(Z),null;case 4:return ar(),null;case 10:return su(t.type._context),null;case 22:case 23:return Su(),null;case 24:return null;default:return null}}var Js=!1,Ee=!1,i_=typeof WeakSet=="function"?WeakSet:Set,O=null;function Kn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(e,t,r)}else n.current=null}function nl(e,t,n){try{n()}catch(r){ne(e,t,r)}}var tf=!1;function a_(e,t){if(Ua=Po,e=Dp(),Jl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var _;d!==n||s!==0&&d.nodeType!==3||(a=i+s),d!==o||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(_=d.firstChild)!==null;)h=d,d=_;for(;;){if(d===e)break t;if(h===n&&++u===s&&(a=i),h===o&&++c===r&&(l=i),(_=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=_}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($a={focusedElem:e,selectionRange:n},Po=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var E=v.memoizedProps,w=v.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?E:nt(t.type,E),w);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(S){ne(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return v=tf,tf=!1,v}function Kr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&nl(t,n,o)}s=s.next}while(s!==r)}}function di(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Im(e){var t=e.alternate;t!==null&&(e.alternate=null,Im(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pt],delete t[us],delete t[Ha],delete t[H0],delete t[W0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pm(e){return e.tag===5||e.tag===3||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Do));else if(r!==4&&(e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}var pe=null,rt=!1;function Lt(e,t,n){for(n=n.child;n!==null;)jm(e,t,n),n=n.sibling}function jm(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(si,n)}catch{}switch(n.tag){case 5:Ee||Kn(n,t);case 6:var r=pe,s=rt;pe=null,Lt(e,t,n),pe=r,rt=s,pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?qi(e.parentNode,n):e.nodeType===1&&qi(e,n),ss(e)):qi(pe,n.stateNode));break;case 4:r=pe,s=rt,pe=n.stateNode.containerInfo,rt=!0,Lt(e,t,n),pe=r,rt=s;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&nl(n,t,i),s=s.next}while(s!==r)}Lt(e,t,n);break;case 1:if(!Ee&&(Kn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ne(n,t,a)}Lt(e,t,n);break;case 21:Lt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Lt(e,t,n),Ee=r):Lt(e,t,n);break;default:Lt(e,t,n)}}function rf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i_),t.forEach(function(r){var s=g_.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~o}if(r=s,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u_(r/1960))-r,10e?16:e,Wt===null)var r=!1;else{if(e=Wt,Wt=null,Qo=0,H&6)throw Error(k(331));var s=H;for(H|=4,O=e.current;O!==null;){var o=O,i=o.child;if(O.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lse()-_u?_n(e,0):yu|=n),je(e,t)}function zm(e,t){t===0&&(e.mode&1?(t=Hs,Hs<<=1,!(Hs&130023424)&&(Hs=4194304)):t=1);var n=Ne();e=Pt(e,t),e!==null&&(Es(e,t,n),je(e,n))}function h_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zm(e,n)}function g_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),zm(e,n)}var Bm;Bm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)Oe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Oe=!1,r_(e,t,n);Oe=!!(e.flags&131072)}else Oe=!1,J&&t.flags&1048576&&qp(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;go(e,t),e=t.pendingProps;var s=sr(t,we.current);tr(t,n),s=fu(null,t,r,e,s,n);var o=du();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(o=!0,Fo(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,iu(t),s.updater=fi,t.stateNode=s,s._reactInternals=t,Ka(t,r,e,n),t=Ja(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Zl(t),ke(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(go(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=__(r),e=nt(r,e),s){case 0:t=Ya(null,t,r,e,n);break e;case 1:t=Jc(null,t,r,e,n);break e;case 11:t=Xc(null,t,r,e,n);break e;case 14:t=Yc(null,t,r,nt(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Ya(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Jc(e,t,r,s,n);case 3:e:{if(Nm(t),e===null)throw Error(k(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Jp(e,t),Bo(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=lr(Error(k(423)),t),t=Zc(e,t,r,n,s);break e}else if(r!==s){s=lr(Error(k(424)),t),t=Zc(e,t,r,n,s);break e}else for(Ue=Qt(t.stateNode.containerInfo.firstChild),ze=t,J=!0,st=null,n=Xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(or(),r===s){t=jt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Zp(t),e===null&&qa(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,za(r,s)?i=null:o!==null&&za(r,o)&&(t.flags|=32),km(e,t),ke(e,t,i,n),t.child;case 6:return e===null&&qa(t),null;case 13:return Rm(e,t,n);case 4:return au(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ir(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),Xc(e,t,r,s,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Q($o,r._currentValue),r._currentValue=i,o!==null)if(lt(o.value,i)){if(o.children===s.children&&!Ie.current){t=jt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Ct(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ga(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(k(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ga(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ke(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,tr(t,n),s=Ye(s),r=r(s),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,s=nt(r,t.pendingProps),s=nt(r.type,s),Yc(e,t,r,s,n);case 15:return xm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nt(r,s),go(e,t),t.tag=1,Pe(r)?(e=!0,Fo(t)):e=!1,tr(t,n),vm(t,r,s),Ka(t,r,s,n),Ja(null,t,r,!0,e,n);case 19:return Cm(e,t,n);case 22:return wm(e,t,n)}throw Error(k(156,t.tag))};function Hm(e,t){return gp(e,t)}function y_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qe(e,t,n,r){return new y_(e,t,n,r)}function xu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function __(e){if(typeof e=="function")return xu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zl)return 11;if(e===Bl)return 14}return 2}function Jt(e,t){var n=e.alternate;return n===null?(n=Qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vo(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")xu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $n:return vn(n.children,s,o,t);case $l:i=8,s|=8;break;case va:return e=Qe(12,n,t,s|2),e.elementType=va,e.lanes=o,e;case Sa:return e=Qe(13,n,t,s),e.elementType=Sa,e.lanes=o,e;case Ea:return e=Qe(19,n,t,s),e.elementType=Ea,e.lanes=o,e;case Zd:return mi(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yd:i=10;break e;case Jd:i=9;break e;case zl:i=11;break e;case Bl:i=14;break e;case Ut:i=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Qe(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function vn(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function mi(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Zd,e.lanes=n,e.stateNode={isHidden:!1},e}function ea(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function ta(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v_(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Di(0),this.expirationTimes=Di(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Di(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function wu(e,t,n,r,s,o,i,a,l){return e=new v_(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Qe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iu(o),e}function S_(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gm)}catch(e){console.error(e)}}Gm(),Gd.exports=He;var N_=Gd.exports,df=N_;ya.createRoot=df.createRoot,ya.hydrateRoot=df.hydrateRoot;const F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,B=globalThis,Zt="10.70.0";function vi(){return Si(B),B}function Si(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Zt,t[Zt]=t[Zt]||{}}function _r(e,t,n=B){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Zt]=r[Zt]||{};return s[e]||(s[e]=t())}const R_=["debug","info","warn","error","log","assert","trace"],C_="Sentry Logger ",Yo={};function vr(e){if(!("console"in B))return e();const t=B.console,n={},r=Object.keys(Yo);r.forEach(s=>{const o=Yo[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function T_(){Tu().enabled=!0}function b_(){Tu().enabled=!1}function Qm(){return Tu().enabled}function O_(...e){Cu("log",...e)}function I_(...e){Cu("warn",...e)}function P_(...e){Cu("error",...e)}function Cu(e,...t){F&&Qm()&&vr(()=>{B.console[e](`${C_}[${e}]:`,...t)})}function Tu(){return F?_r("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const A={enable:T_,disable:b_,isEnabled:Qm,log:O_,warn:I_,error:P_},Km=50,Cn="?",pf=/\(error: (.*)\)/,mf=/captureMessage|captureException/;function Xm(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(` +`);for(let a=r;a1024&&(l=l.slice(0,1024));const u=pf.test(l)?l.replace(pf,"$1"):l;if(!u.includes("Error: ")){for(const c of t){const d=c(u);if(d){o.push(d);break}}if(o.length>=Km+s)break}}return A_(o.slice(s))}}function j_(e){return Array.isArray(e)?Xm(...e):e}function A_(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(to(t).function||"")&&t.pop(),t.reverse(),mf.test(to(t).function||"")&&(t.pop(),mf.test(to(t).function||"")&&t.pop()),t.slice(0,Km).map(n=>({...n,filename:n.filename||to(t).filename,function:n.function||Cn}))}function to(e){return e[e.length-1]||{}}const na="";function nn(e){try{return!e||typeof e!="function"?na:e.name||na}catch{return na}}function hf(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const zr={},gf={};function jn(e,t){return zr[e]=zr[e]||[],zr[e].push(t),()=>{const n=zr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function An(e,t){if(!gf[e]){gf[e]=!0;try{t()}catch(n){F&&A.error(`Error while instrumenting ${e}`,n)}}}function at(e,t){const n=e&&zr[e];if(n)for(const r of n)try{r(t)}catch(s){F&&A.error(`Error while triggering instrumentation handler. +Type: ${e} +Name: ${nn(r)} +Error:`,s)}}let ra=null;function D_(e){const t="error";jn(t,e),An(t,L_)}function L_(){ra=B.onerror,B.onerror=function(e,t,n,r,s){return at("error",{column:r,error:s,line:n,msg:e,url:t}),ra?ra.apply(this,arguments):!1},B.onerror.__SENTRY_INSTRUMENTED__=!0}let sa=null;function F_(e){const t="unhandledrejection";jn(t,e),An(t,M_)}function M_(){sa=B.onunhandledrejection,B.onunhandledrejection=function(e){return at("unhandledrejection",e),sa?sa.apply(this,arguments):!0},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Ym=Object.prototype.toString;function gt(e){switch(Ym.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ou(e,Error)}}function Sr(e,t){return Ym.call(e)===`[object ${t}]`}function Jm(e){return Sr(e,"ErrorEvent")}function yf(e){return Sr(e,"DOMError")}function U_(e){return Sr(e,"DOMException")}function Tt(e){return Sr(e,"String")}function bu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ns(e){return e===null||bu(e)||typeof e!="object"&&typeof e!="function"}function gs(e){return Sr(e,"Object")}function Ei(e){return typeof e=="object"&&e!==null}function xi(e){return typeof Event<"u"&&Ou(e,Event)}function $_(e){return Sr(e,"RegExp")}function Rs(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Ou(e,t){try{return e instanceof t}catch{return!1}}function Zm(e){return typeof Request<"u"&&Ou(e,Request)}function $e(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&eh(s,r);try{e[t]=s}catch{F&&A.log(`Failed to replace method "${t}" in object`,e)}}function rn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{F&&A.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function eh(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,rn(e,"__sentry_original__",t)}catch{}}function Iu(e){return e.__sentry_original__}function th(e){if(gt(e))return{message:e.message,name:e.name,stack:e.stack,..._f(e)};if(xi(e)){const{type:t,target:n,currentTarget:r,detail:s}=e;return{type:t,target:n,currentTarget:r,...s?{detail:s}:{},..._f(e)}}return e}function _f(e){return Ei(e)?Object.fromEntries(Object.entries(e)):{}}function z_(e){const t=Object.keys(th(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let Fn;function wi(e){if(Fn!==void 0)return Fn?Fn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=B;return t in n&&typeof n[t]=="function"?(Fn=n[t],Fn(e)):(Fn=null,e())}function Jo(){return wi(()=>Math.random())}function Er(){return wi(()=>Date.now())}const B_=Symbol.for("sentry.skipNormalization"),H_=Symbol.for("sentry.overrideNormalizationDepth");function W_(e){return!!e[B_]}function V_(e){const t=e[H_];return typeof t=="number"?t:void 0}let cl;function nh(e){cl=e}function wt(e,t=100,n=1/0){try{return fl("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function rh(e,t=3,n=100*1024){const r=wt(e,t);return Q_(r)>n?rh(e,t-1,n):r}function fl(e,t,n=1/0,r=1/0,s=K_()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=sh(e,t);if(!a.startsWith("[object "))return a;if(W_(t))return t;const l=V_(t),u=l!==void 0?l:n;if(u===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const v=c.toJSON();return fl("",v,u-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let h=0;const _=th(t);for(const v in _){if(!Object.prototype.hasOwnProperty.call(_,v))continue;if(h>=r){d[v]="[MaxProperties ~]";break}const E=_[v];d[v]=fl(v,E,u-1,r,s),h++}return i(t),d}function sh(e,t){try{if(cl){const r=cl(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${nn(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${q_(t)}]`}catch(n){return`**non-serializable** (${n})`}}function q_(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function G_(e){return~-encodeURI(e).split(/%..|./).length}function Q_(e){return G_(JSON.stringify(e))}function K_(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function dl(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function vf(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;re.randomUUID()).replace(/-/g,"")}catch{}return oa||(oa="10000000100040008000"+1e11),oa.replace(/[018]/g,t=>(t^(Y_()&15)>>t/4).toString(16))}function oh(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function pn(e){const{message:t,event_id:n}=e;if(t)return t;const r=oh(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function pl(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Sn(e,t){const n=oh(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s==null?void 0:s.data,...t.data};n.mechanism.data=o}}function Sf(e){if(J_(e))return!0;try{rn(e,"__sentry_captured__",!0)}catch{}return!1}function J_(e){try{return e.__sentry_captured__}catch{}}const ih=1e3;function Ts(){return Er()/ih}function Z_(){const{performance:e}=B;if(!(e!=null&&e.now)||!e.timeOrigin)return Ts;const t=e.timeOrigin;return()=>(t+wi(()=>e.now()))/ih}let Ef;function bt(){return(Ef??(Ef=Z_()))()}function ev(e){const t=bt(),n={sid:Xe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>nv(n)};return e&&cr(n,e),n}function cr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||bt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Xe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function tv(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),cr(e,n)}function nv(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function bs(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=bs(r[s],t[s],n-1));return r}function xf(){return Xe()}function ah(){return Xe().substring(16)}function rv(e){try{const t=B.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function lh(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const ml="_sentrySpan";function wf(e,t){t?rn(e,ml,rv(t)):delete e[ml]}function kf(e){return lh(e[ml])}const sv=100;class ut{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:xf(),sampleRand:Jo()}}clone(){const t=new ut;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,wf(t,kf(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&cr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof ut?n.getScopeData():gs(n)?t:void 0,{tags:s,attributes:o,extra:i,user:a,contexts:l,level:u,fingerprint:c=[],propagationContext:d,conversationId:h}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),h&&(this._conversationId=h),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,wf(this,void 0),this._attachments=[],this.setPropagationContext({traceId:xf(),sampleRand:Jo()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var o;const r=typeof n=="number"?n:sv;if(r<=0)return this;const s={timestamp:Ts(),...t,message:t.message?dl(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:kf(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=bs(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Xe();if(!this._client)return F&&A.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||Xe();if(!this._client)return F&&A.warn("No client configured on scope - will not capture message!"),s;const o=(r==null?void 0:r.syntheticException)??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=t.event_id||(n==null?void 0:n.event_id)||Xe();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(F&&A.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function ov(){return _r("defaultCurrentScope",()=>new ut)}function iv(){return _r("defaultIsolationScope",()=>new ut)}const Nf=e=>e instanceof Promise&&!e[uh],uh=Symbol("chained PromiseLike"),av=(e,t,n)=>{const r=e.then(s=>(t(s),s),s=>{throw n(s),s});return Nf(r)&&Nf(e)?r:lv(e,r)},lv=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];typeof s=="function"?Object.defineProperty(t,r,{value:(...o)=>s.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[uh]:!0}),t};class uv{constructor(t,n){let r;t?r=t:r=new ut;let s;n?s=n:s=new ut,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Rs(r)?av(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function fr(){const e=vi(),t=Si(e);return t.stack=t.stack||new uv(ov(),iv())}function cv(e){return fr().withScope(e)}function fv(e,t){const n=fr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Rf(e){return fr().withScope(()=>e(fr().getIsolationScope()))}function dv(){return{withIsolationScope:Rf,withScope:cv,withSetScope:fv,withSetIsolationScope:(e,t)=>Rf(t),getCurrentScope:()=>fr().getScope(),getIsolationScope:()=>fr().getIsolationScope()}}function Pu(e){const t=Si(e);return t.acs?t.acs:dv()}function pv(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function mv(e,t){const{value:n,unit:r}=pv(e)?e:{value:e,unit:void 0},s=hv(n),o=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...o}}function Cf(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const o=mv(s,t);o&&(n[r]=o)}return n}function hv(e){if(Array.isArray(e))return{value:e,type:"array"};const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}function ct(){const e=vi();return Pu(e).getCurrentScope()}function yt(){const e=vi();return Pu(e).getIsolationScope()}function ch(){return _r("globalScope",()=>new ut)}function ju(...e){const t=vi(),n=Pu(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function ue(){return ct().getClient()}function gv(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||ah()};return r&&(o.parent_span_id=r),o}const fh="sentry.source",dh="sentry.sample_rate",yv="sentry.previous_trace_sample_rate",Au="sentry.op",ph="sentry.origin",mh="sentry.profile_id",hh="sentry.exclusive_time",_v="gen_ai.conversation.id",vv=0,Sv=1,Ev="_sentryScope",xv="_sentryIsolationScope";function hl(e){const t=e;return{scope:t[Ev],isolationScope:lh(t[xv])}}const Tf="sentry-";function wv(e){const t=kv(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.startsWith(Tf)){const i=s.slice(Tf.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function kv(e){if(!(!e||!Tt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=bf(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):bf(e)}function bf(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}const Nv=/^o(\d+)\./,Rv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Cv(e){return e==="http"||e==="https"}function xr(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Tv(e){const t=Rv.exec(e);if(!t){vr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return gh({host:o,pass:s,path:l,projectId:u,port:i,protocol:n,publicKey:r})}function gh(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bv(e){if(!F)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(A.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Cv(r)?t&&isNaN(parseInt(t,10))?(A.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(A.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(A.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ov(e){const t=e.match(Nv);return t==null?void 0:t[1]}function Iv(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Ov(n)),r}function yh(e){const t=typeof e=="string"?Tv(e):gh(e);if(!(!t||!bv(t)))return t}function Pv(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const _h=1;let Of=!1;function jv(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:Os(e).parent_span_id,o=hl(e).scope,i=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||ah():t;return{parent_span_id:s,span_id:i,trace_id:n}}function Av(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===_h,attributes:o,...s}))}function If(e){return typeof e=="number"?Pf(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Pf(e.getTime()):bt()}function Pf(e){return e>9999999999?e/1e3:e}function Os(e){if(Mv(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Fv(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:a,links:l}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:Dv(e),start_timestamp:If(s),timestamp:If(i)||void 0,status:$v(a),op:r[Au],origin:r[ph],links:Av(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Dv(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function Lv(e){var t;return{...e,attributes:Cf(e.attributes),links:(t=e.links)==null?void 0:t.map(n=>({...n,attributes:Cf(n.attributes)}))}}function Fv(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Mv(e){return typeof e.getSpanJSON=="function"}function Uv(e){const{traceFlags:t}=e.spanContext();return t===_h}function $v(e){if(!(!e||e.code===vv))return e.code===Sv?"ok":e.message||"internal_error"}const zv="_sentryRootSpan",Du=Bv;function Bv(e){return e[zv]||e}function jf(){Of||(vr(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Of=!0)}function Af(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=ue())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Df(e){A.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Lf(e,t){if(!(t!=null&&t.length))return!1;for(const n of t){if(Vv(n)){if(e.description&&Jr(e.description,n))return F&&Df(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const s=n.name?e.description&&Jr(e.description,n.name):!0,o=n.op?e.op&&Jr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,l])=>{var u;return Hv((u=e.attributes)==null?void 0:u[a],l)}):!0;if(s&&o&&i)return F&&Df(e),!0}return!1}function Hv(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Jr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Wv(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function Vv(e){return typeof e=="string"||e instanceof RegExp}const qv=Symbol.for("sentry.nonRecordingSpan");function Gv(e){return!!e&&e[qv]===!0}const Lu="production",Qv="_frozenDsc";function vh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Lu,release:n.release,public_key:r,trace_id:e,org_id:Iv(t)};return t.emit("createDsc",s),s}function Sh(e,t){const n=t.getPropagationContext();return n.dsc||vh(n.traceId,e)}function Kv(e){var w;const t=ue();if(!t)return{};const n=Du(e),r=Os(n),s=r.data,o=n.spanContext().traceState,i=(o==null?void 0:o.get("sentry.sample_rate"))??s[dh]??s[yv];function a(f){return(typeof i=="number"||typeof i=="string")&&(f.sample_rate=`${i}`),f}const l=n[Qv];if(l)return a(l);const u=Gv(n),c=u&&n.dropReason==="ignored";if(u&&(!Af(t.getOptions())||c)){const f=hl(n).scope;if(f){const p={...Sh(t,f)};return c&&(p.sampled="false"),a(p)}}const d=o==null?void 0:o.get("sentry.dsc"),h=d&&wv(d);if(h)return a(h);const _=vh(e.spanContext().traceId,t),v=s[fh]??s["sentry.segment.name.source"],E=r.description;return v!=="url"&&E&&(_.transaction=E),Af()&&(_.sampled=String(Uv(n)),_.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((w=hl(n).scope)==null?void 0:w.getPropagationContext().sampleRand.toString())),a(_),t.emit("createDsc",_,n),_}function Xv(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function wr(e,t=[]){return[e,t]}function Ff(e,t){const[n,r]=e;return[n,[...r,t]]}function gl(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Yv(e,t){return gl(e,(n,r)=>t.includes(r))}function yl(e){const t=Si(B);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Jv(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[yl(r),o]:r.push(typeof o=="string"?yl(o):o)}for(const o of n){const[i,a]=o;if(s(` +${JSON.stringify(i)} +`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(wt(a))}s(l)}}return typeof r=="string"?r:Zv(r)}function Zv(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function eS(e){const t=typeof e.data=="string"?yl(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Eh={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function tS(e){return e in Eh}function Mf(e){return tS(e)?Eh[e]:e}function xh(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function nS(e,t,n,r){var o;const s=(o=e.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Er()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:xr(r)},...s&&{trace:s}}}function rS(e,t){var r,s,o,i;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((s=e.sdk)==null?void 0:s.packages)||[],...t.packages||[]],settings:(o=e.sdk)!=null&&o.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function sS(e,t,n,r){const s=xh(n),o={sent_at:new Date(Er()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:xr(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return wr(o,[i])}function oS(e,t,n,r){const s=xh(n),o=e.type&&e.type!=="replay_event"?e.type:"event";rS(e,n==null?void 0:n.sdk);const i=nS(e,s,r,t);return delete e.sdkProcessingMetadata,wr(i,[[{type:o},e]])}function iS(e){return e.getOptions().traceLifecycle==="stream"}function aS(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;lS(e,t),r&&fS(e,r),dS(e,n),uS(e,s),cS(e,o)}function Uf(e,t){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:a,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:d,attachments:h,propagationContext:_,transactionName:v,span:E}=t;Dr(e,"extra",n),Dr(e,"tags",r),Dr(e,"attributes",s),Dr(e,"user",o),Dr(e,"contexts",i),e.sdkProcessingMetadata=bs(e.sdkProcessingMetadata,l,2),a&&(e.level=a),v&&(e.transactionName=v),E&&(e.span=E),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),h.length&&(e.attachments=[...e.attachments,...h]),e.propagationContext={...e.propagationContext,..._}}function Dr(e,t,n){e[t]=bs(e[t],n,1)}function wh(e,t){const n=ch().getScopeData();return e&&Uf(n,e.getScopeData()),t&&Uf(n,t.getScopeData()),n}function lS(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function uS(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function cS(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fS(e,t){e.contexts={trace:jv(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Kv(t),...e.sdkProcessingMetadata};const n=Du(t),r=Os(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function dS(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const pS="url.full";function kh(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const ia=0,$f=1,zf=2;function Is(e){return new ys(t=>{t(e)})}function Nh(e){return new ys((t,n)=>{n(e)})}class ys{constructor(t){this._state=ia,this._handlers=[],this._runExecutor(t)}then(t,n){return new ys((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ys((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===ia)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===$f&&n[1](this._value),this._state===zf&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===ia){if(Rs(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n($f,o)},s=o=>{n(zf,o)};try{t(r,s)}catch(o){s(o)}}}function mS(e,t,n,r=0){try{const s=_l(t,n,e,r);return Rs(s)?s:Is(s)}catch(s){return Nh(s)}}function _l(e,t,n,r){const s=n[r];if(!e||!s)return e;const o=s({...e},t);return F&&o===null&&A.log(`Event processor "${s.id||"?"}" dropped event`),Rs(o)?o.then(i=>_l(i,t,n,r+1)):_l(o,t,n,r+1)}let Et,Bf,Hf,Ft;function hS(e){const t=B._sentryDebugIds,n=B._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ft&&r.length===Bf&&s.length===Hf)return Ft;Bf=r.length,Hf=s.length,Ft={},Et||(Et={});const o=(i,a)=>{for(const l of i){const u=a[l],c=Et==null?void 0:Et[l];if(c&&Ft&&u)Ft[c[0]]=u,Et&&(Et[l]=[c[0],u]);else if(u){const d=e(l);for(let h=d.length-1;h>=0;h--){const _=d[h],v=_==null?void 0:_.filename;if(v&&Ft&&Et){Ft[v]=u,Et[l]=[v,u];break}}}}};return t&&o(r,t),n&&o(s,n),Ft}function gS(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Xe(),timestamp:t.timestamp||Ts()},u=n.integrations||e.integrations.map(f=>f.name);yS(l,e),SS(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&_S(l,e.stackParser);const c=xS(r,n.captureContext);n.mechanism&&Sn(l,n.mechanism);const d=s?s.getEventProcessors():[],h=wh(o,c),_=[...n.attachments||[],...h.attachments];_.length&&(n.attachments=_),aS(l,h);const v=[...d,...h.eventProcessors];return(n.data&&n.data.__sentry__===!0?Is(l):mS(v,l,n)).then(f=>(f&&vS(f),typeof i=="number"&&i>0?ES(f,i,a):f))}function yS(e,t){var a,l;const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||Lu,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i!=null&&i.url&&o&&(i.url=dl(i.url,o)),o&&((l=(a=e.exception)==null?void 0:a.values)==null||l.forEach(u=>{u.value&&(u.value=dl(u.value,o))}))}function _S(e,t){var r,s;const n=hS(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,a;(a=(i=o.stacktrace)==null?void 0:i.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function vS(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,a;(a=(i=o.stacktrace)==null?void 0:i.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([o,i])=>{n.push({type:"sourcemap",code_file:o,debug_id:i})})}function SS(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function ES(e,t,n){var s,o;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:wt(i.data,t,n)}}))},...e.user&&{user:wt(e.user,t,n)},...e.contexts&&{contexts:wt(e.contexts,t,n)},...e.extra&&{extra:wt(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=wt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:wt(i.data,t,n)}}))),(o=e.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=wt(e.contexts.flags,3,n)),r}function xS(e,t){if(!t)return e;const n=e?e.clone():new ut;return n.update(t),n}function wS(e){if(e)return kS(e)?{captureContext:e}:RS(e)?{captureContext:e}:e}function kS(e){return e instanceof ut||typeof e=="function"}const NS=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function RS(e){return Object.keys(e).some(t=>NS.includes(t))}function Fu(e,t){return ct().captureException(e,wS(t))}function Mu(e,t){return ct().captureEvent(e,t)}function Rh(e,t){yt().setContext(e,t)}function Ch(){return yt().lastEventId()}function vl(e){const t=yt(),{user:n}=wh(t,ct()),{userAgent:r}=B.navigator||{},s=ev({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return(o==null?void 0:o.status)==="ok"&&cr(o,{status:"exited"}),Uu(),t.setSession(s),s}function Uu(){const e=yt(),n=ct().getSession()||e.getSession();n&&tv(n),Th(),e.setSession()}function Th(){const e=yt(),t=ue(),n=e.getSession();n&&t&&t.captureSession(n)}function So(e=!1){if(e){Uu();return}Th()}function bh(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const CS="7";function Oh(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function TS(e){return`${Oh(e)}${e.projectId}/envelope/`}function bS(e,t){const n={sentry_version:CS};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function OS(e,t,n){return t||`${TS(e)}?${bS(e,n)}`}function IS(e,t){const n=yh(e);if(!n)return"";const r=`${Oh(n)}embed/error-page/`;let s=`dsn=${xr(n)}`;for(const o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=t.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${s}`}const Wf=[];function PS(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function jS(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return PS(r)}function AS(e,t){const n={};return t.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Ih(e,r,n)}),n}function Vf(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function Ih(e,t,n){if(n[t.name]){F&&A.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Wf.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Wf.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}["processSpan","processSegmentSpan"].forEach(r=>{const s=t[r];typeof s=="function"&&e.on(r,o=>s.call(t,o,e))}),F&&A.log(`Integration installed: ${t.name}`)}function DS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function LS(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function FS(){return!DS()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function $u(){return typeof window<"u"&&(!FS()||MS())}function MS(){const e=B.process;return(e==null?void 0:e.type)==="renderer"}function US(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function $S(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=xr(r)),wr(o,[US(e,s)])}function zS(e,t){const n=t??BS(e)??[];if(n.length===0)return;const r=e.getOptions(),s=$S(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ph().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function BS(e){return Ph().get(e)}function Ph(){return _r("clientToLogBufferMap",()=>new WeakMap)}function HS(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function WS(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=xr(r)),wr(o,[HS(e,s)])}function VS(e,t){const n=t??qS(e)??[];if(n.length===0)return;const r=e.getOptions(),s=WS(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);jh().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function qS(e){return jh().get(e)}function jh(){return _r("clientToMetricBufferMap",()=>new WeakMap)}function GS(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return Lv(t)}function QS(e,t){var o,i,a;if(e.type!=="transaction"||!((o=e.spans)!=null&&o.length)||!((i=e.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||t.getOptions().streamGenAiSpans===!1||iS(t))return;const n=[],r=[];for(const l of e.spans)(a=l.op)!=null&&a.startsWith("gen_ai.")?n.push(GS(l)):r.push(l);if(n.length===0)return;e.spans=r;const s=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...$u()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}const zu=Symbol.for("SentryBufferFullError");function Bu(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function o(i){if(!t.size)return Is(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const l=[a,new Promise(u=>bh(setTimeout(()=>u(!1),i)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:s,drain:o}}const KS=60*1e3;function XS(e,t=Er()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?KS:r-t}function YS(e,t){return e[t]||e.all||0}function JS(e,t,n=Er()){return YS(e,t)>n}function ZS(e,{statusCode:t,headers:n},r=Er()){const s={...e},o=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),h=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+h;else for(const _ of u.split(";"))_==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[_]=r+h):s[_]=r+h}else i?s.all=r+XS(i,r):t===429&&(s.all=r+60*1e3);return s}const Ah=64;function Dh(e,t,n=Bu(e.bufferSize||Ah)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(gl(i,(d,h)=>{const _=Mf(h);JS(r,_)?e.recordDroppedEvent("ratelimit_backoff",_):a.push(d)}),a.length===0)return Promise.resolve({});const l=wr(i[0],a),u=d=>{if(Yv(l,["client_report"])){F&&A.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}gl(l,(h,_)=>{e.recordDroppedEvent(d,Mf(_))})},c=()=>t({body:Jv(l)}).then(d=>d.statusCode===413?(F&&A.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),d):(F&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&A.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=ZS(r,d),d),d=>{throw u("network_error"),F&&A.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===zu)return F&&A.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:s}}function eE(e,t,n){const r=[{type:"client_report"},{timestamp:Ts(),discarded_events:e}];return wr(t?{dsn:t}:{},[r])}function Lh(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function tE(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i==null?void 0:i[mh],exclusive_time:i==null?void 0:i[hh],measurements:e.measurements,is_segment:!0}}function nE(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[mh]:e.profile_id},...e.exclusive_time&&{[hh]:e.exclusive_time}}}},measurements:e.measurements}}const no=["forwarded","-ip","remote-","via","-user"];function rE(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:no},httpHeaders:{request:{deny:no},response:{deny:no}},httpBodies:[],urlQueryParams:{deny:no},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const sE={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function oE(e){var r,s,o,i,a,l;const t=e.dataCollection!=null?sE:rE(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:((r=n.httpHeaders)==null?void 0:r.request)??t.httpHeaders.request,response:((s=n.httpHeaders)==null?void 0:s.response)??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:((o=n.graphQL)==null?void 0:o.document)??t.graphQL.document,variables:((i=n.graphQL)==null?void 0:i.variables)??t.graphQL.variables},genAI:{inputs:((a=n.genAI)==null?void 0:a.inputs)??t.genAI.inputs,outputs:((l=n.genAI)==null?void 0:l.outputs)??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const qf="Not capturing exception because it's already been captured.",Gf="Discarded session because of missing or non-string release",Fh=Symbol.for("SentryInternalError"),Mh=Symbol.for("SentryDoNotSendEventError"),iE=5e3;function Eo(e){return{message:e,[Fh]:!0}}function aa(e){return{message:e,[Mh]:!0}}function Qf(e){return Ei(e)&&Fh in e}function Kf(e){return Ei(e)&&Mh in e}function Xf(e,t,n,r,s){let o=0,i,a=!1;e.on(n,()=>{o=0,clearTimeout(i),a=!1}),e.on(t,l=>{if(o+=r(l),o>=8e5)s(e);else if(!a){const u=e.getOptions()._flushInterval??iE;u>0&&(a=!0,i=bh(setTimeout(()=>{s(e)},u)))}}),e.on("flush",()=>{s(e)})}class aE{constructor(t){var r,s,o;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Bu(((r=t.transportOptions)==null?void 0:r.bufferSize)??Ah),this._dataCollection=oE(t),t.dsn?this._dsn=yh(t.dsn):F&&A.warn("No DSN provided, client will not send events."),this._dsn){const i=OS(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}this._options.enableLogs=this._options.enableLogs??((s=this._options._experiments)==null?void 0:s.enableLogs),this._options.enableLogs&&Xf(this,"afterCaptureLog","flushLogs",fE,zS),(this._options.enableMetrics??((o=this._options._experiments)==null?void 0:o.enableMetrics)??!0)&&Xf(this,"afterCaptureMetric","flushMetrics",cE,VS)}captureException(t,n,r){const s=Xe();if(Sf(t))return F&&A.log(qf),s;const o={event_id:s,...n};return this._process(()=>this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r)).then(i=>i),"error"),o.event_id}captureMessage(t,n,r,s){const o={event_id:Xe(),...r},i=bu(t)?t:String(t),a=Ns(t),l=a?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(()=>l.then(u=>this._captureEvent(u,o,s)),a?"unknown":"error"),o.event_id}captureEvent(t,n,r){const s=Xe();if(n!=null&&n.originalException&&Sf(n.originalException))return F&&A.log(qf),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,l=i.capturedSpanIsolationScope,u=Yf(t.type);return this._process(()=>this._captureEvent(t,o,a||r,l),u),o.event_id}captureSession(t){this.sendSession(t),cr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Ih(this,t,this._integrations),n||Vf(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=QS(t,this);let s=oS(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])s=Ff(s,eS(o));r&&(s=Ff(s,r)),this.sendEnvelope(s).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Lu}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){F&&A.warn(Gf);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){F&&A.warn(Gf);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=sS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;F&&A.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return F&&A.error("Error while sending envelope:",n),{}}return F&&A.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=AS(this,t),Vf(this,t)}_updateSessionFromEvent(t,n){var l,u;let r=n.level==="fatal",s=!1;const o=(l=n.exception)==null?void 0:l.values;if(o){s=!0,r=!1;for(const c of o)if(((u=c.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(cr(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),gS(o,t,n,r,this,s).then(a=>{var u;if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...(u=a.contexts)==null?void 0:u.trace,...gv(r)},...a.contexts};const l=Sh(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=ct(),s=yt()){return F&&Sl(t)&&A.log(`Captured error event \`${Lh(t)[0]||""}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{F&&(Kf(o)?A.log(o.message):Qf(o)?A.warn(o.message):A.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=Uh(t),l=Sl(t),c=`before send for type \`${t.type||"error"}\``,d=typeof i>"u"?void 0:Pv(i),h=Yf(t.type);return this._prepareEvent(t,n,r,s).then(_=>{var w;if(_===null)throw this.recordDroppedEvent("event_processor",h),aa("An event processor returned `null`, will not send event.");if(((w=n.data)==null?void 0:w.__sentry__)===!0)return _;const E=uE(this,o,_,n);return lE(E,c)}).then(_=>{var w;if(_===null){if(this.recordDroppedEvent("before_send",h),a){const p=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",p)}throw aa(`${c} returned \`null\`, will not send event.`)}const v=r.getSession()||s.getSession();if(l&&v&&this._updateSessionFromEvent(v,_),l&&typeof d=="number"&&Jo()>d)throw this.recordDroppedEvent("sample_rate","error"),aa(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const f=((w=_.sdkProcessingMetadata)==null?void 0:w.spanCountBeforeProcessing)||0,p=_.spans?_.spans.length:0,g=f-p;g>0&&this.recordDroppedEvent("before_send","span",g)}const E=_.transaction_info;if(a&&E&&_.transaction!==t.transaction){const f="custom";_.transaction_info={...E,source:f}}return this.sendEvent(_,n),_}).then(null,_=>{throw Kf(_)||Qf(_)?_:(this.captureException(_,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:_}),Eo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${_}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===zu&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){F&&A.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){F&&A.log("No outcomes to send");return}if(!this._dsn){F&&A.log("No dsn provided, will not send outcomes");return}F&&A.log("Sending outcomes:",t);const n=eE(t,this._options.tunnel&&xr(this._dsn));this.sendEnvelope(n)}}function Yf(e){return e==="replay_event"?"replay":e||"error"}function lE(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Rs(e))return e.then(r=>{if(!gs(r)&&r!==null)throw Eo(n);return r},r=>{throw Eo(`${t} rejected with ${r}`)});if(!gs(e)&&e!==null)throw Eo(n);return e}function uE(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:i}=t,a=!Xv(t.beforeSendSpan)&&t.beforeSendSpan;let l=n;if(Sl(l)&&s)return s(l,r);if(Uh(l)){if(a||i){const u=tE(l);if(i!=null&&i.length&&Lf({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const c=a(u);c?l=bs(n,nE(c)):jf()}if(l.spans){const c=[],d=l.spans;for(const _ of d){if(i!=null&&i.length&&Lf({description:_.description,op:_.op,attributes:_.data},i)){Wv(d,_);continue}if(a){const v=a(_);v?c.push(v):(jf(),c.push(_))}else c.push(_)}const h=l.spans.length-c.length;h&&e.recordDroppedEvent("before_send","span",h),l.spans=c}}if(o){if(l.spans){const u=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(l,r)}}return l}function Sl(e){return e.type===void 0}function Uh(e){return e.type==="transaction"}function cE(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+$h(e.attributes)}function fE(e){let t=0;return e.message&&(t+=e.message.length*2),t+$h(e.attributes)}function $h(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Jf(n[0]):Ns(n)?t+=Jf(n):t+=100}),t}function Jf(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function dE(e,t){t.debug===!0&&(F?A.enable():vr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ct().update(t.initialScope);const r=new e(t);return zh(r),r.init(),r}function zh(e){ct().setClient(e)}function la(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function pE(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),o=e.indexOf(",");let i="";if(t&&o!==-1){const a=e.slice(o+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return e}function mE(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Bh(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Zt})),s.version=Zt)}const hE=100;function sn(e,t){const n=ue(),r=yt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=hE}=n.getOptions();if(o<=0)return;const a={timestamp:Ts(),...e},l=s?vr(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,o))}const gE="FunctionToString",Zf=new WeakMap,yE=()=>({name:gE,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Iu(this);let r;try{Zf.has(ue())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Zf.set(e,!0)}}),Hh=yE,_E=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],vE="EventFilters",Wh=(e={})=>{let t;return{name:vE,setup(n){const r=n.getOptions();t=ed(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=ed(e,o)}return SE(n,t)?null:n}}},Vh=(e={})=>({...Wh(e),name:"InboundFilters"});function ed(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_E],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function SE(e,t){if(e.type){if(e.type==="transaction"&&xE(e,t.ignoreTransactions))return F&&A.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${pn(e)}`),!0}else{if(EE(e,t.ignoreErrors))return F&&A.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${pn(e)}`),!0;if(RE(e))return F&&A.warn(`Event dropped due to not having an error message, error type or stacktrace. +Event: ${pn(e)}`),!0;if(wE(e,t.denyUrls))return F&&A.warn(`Event dropped due to being matched by \`denyUrls\` option. +Event: ${pn(e)}. +Url: ${Zo(e)}`),!0;if(!kE(e,t.allowUrls))return F&&A.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Event: ${pn(e)}. +Url: ${Zo(e)}`),!0}return!1}function EE(e,t){return t!=null&&t.length?Lh(e).some(n=>Cs(n,t)):!1}function xE(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Cs(n,t):!1}function wE(e,t){if(!(t!=null&&t.length))return!1;const n=Zo(e);return n?Cs(n,t):!1}function kE(e,t){if(!(t!=null&&t.length))return!0;const n=Zo(e);return n?Cs(n,t):!0}function NE(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Zo(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(o=>{var i,a,l;return((i=o.mechanism)==null?void 0:i.parent_id)===void 0&&((l=(a=o.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?NE(s):null}catch{return F&&A.error(`Cannot extract url for event ${pn(e)}`),null}}function RE(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function CE(e,t,n,r,s,o){var a;if(!((a=s.exception)!=null&&a.values)||!o||!gt(o.originalException))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=El(e,t,r,o.originalException,n,s.exception.values,i,0))}function El(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let l=[...o];if(gt(r[s])){td(i,a,r);const u=e(t,r[s]),c=l.length;nd(u,s,c,a),l=El(e,t,n,r[s],s,[u,...l],u,c)}return qh(r)&&r.errors.forEach((u,c)=>{if(gt(u)){td(i,a,r);const d=e(t,u),h=l.length;nd(d,`errors[${c}]`,h,a),l=El(e,t,n,u,s,[d,...l],d,h)}}),l}function qh(e){return Array.isArray(e.errors)}function td(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...qh(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function nd(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function TE(e){return gt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function rd(e){return TE(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const sd=new Set([]);function bE(e){const t="console",n=jn(t,e);return An(t,OE),n}const od=new Set;function OE(){"console"in B&&R_.forEach(function(e){od.has(e)||!(e in B.console)||(od.add(e),$e(B.console,e,function(t){return Yo[e]=t,function(...n){const r=n[0],s=Yo[e],o=sd.size&&typeof r=="string"&&Cs(r,sd);o||at("console",{args:n,level:e}),(!o||F&&A.isEnabled())&&(s==null||s.apply(B.console,n))}}))})}function IE(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const PE="Dedupe",jE=()=>{let e;return{name:PE,processEvent(t){if(t.type)return t;try{if(AE(t,e))return F&&A.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Gh=jE;function AE(e,t){return t?!!(DE(e,t)||LE(e,t)):!1}function DE(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Kh(e,t)||!Qh(e,t))}function LE(e,t){const n=id(t),r=id(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Kh(e,t)||!Qh(e,t))}function Qh(e,t){let n=hf(e),r=hf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s({name:FE,setup(e){e.on("spanStart",t=>{const n=ct().getScopeData(),r=yt().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:o,data:i,description:a}=Os(t);if(!(o!=null&&o.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(a!=null&&a.startsWith("ai.")))return;t.setAttribute(_v,s)}})}}),UE=ME;function Xh(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const _s=B;function $E(){return"history"in _s&&!!_s.history}function zE(){if(!("fetch"in _s))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function xl(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function BE(){var n;if(typeof EdgeRuntime=="string")return!0;if(!zE())return!1;if(xl(_s.fetch))return!0;let e=!1;const t=_s.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=xl(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){F&&A.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function HE(e,t){const n="fetch",r=jn(n,e);return An(n,()=>WE(void 0,t)),r}function WE(e,t=!1){t&&!BE()||$e(B,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=VE(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:bt()*1e3,virtualError:s,headers:qE(r)};return at("fetch",{...a}),n.apply(B,r).then(async l=>(at("fetch",{...a,endTimestamp:bt()*1e3,response:l}),l),l=>{at("fetch",{...a,endTimestamp:bt()*1e3,error:l}),gt(l)&&l.stack===void 0&&(l.stack=s.stack,rn(l,"framesToPop",1));const u=ue(),c=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(c!==!1&>(l)&&l.name==="TypeError"&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const _=new URL(a.fetchData.url).host;c==="always"?l.message=`${l.message} (${_})`:rn(l,"__sentry_fetch_url_host__",_)}catch{}throw l})}})}function xo(e,t){return Ei(e)&&!!e[t]}function ad(e){return typeof e=="string"?e:e?xo(e,"url")?e.url:e.toString?e.toString():"":""}function VE(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ad(n),method:xo(r,"method")?String(r.method).toUpperCase():Zm(n)&&xo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ad(t),method:xo(t,"method")?String(t.method).toUpperCase():"GET"}}function qE(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Zm(t))return new Headers(t.headers)}catch{}}const Yh=B;function Hu(){try{return Yh.document.location.href}catch{return""}}function GE(e,t=5){if(!Yh.HTMLElement)return null;let n=e;for(let r=0;r0}function QE(){wl++,setTimeout(()=>{wl--})}function dr(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const o=e.__sentry_wrapped__;return typeof o=="function"?o:e}if(Iu(e))return e}catch{return e}const r=function(...s){B._sentryWrappedDepth=(B._sentryWrappedDepth||0)+1;try{const o=s.map(i=>dr(i,t));return e.apply(this,o)}catch(o){throw QE(),ju(i=>{i.addEventProcessor(a=>(t.mechanism&&(pl(a,void 0),Sn(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Fu(o)}),o}finally{B._sentryWrappedDepth=(B._sentryWrappedDepth||0)-1}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}eh(r,e),rn(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ld(){const e=Hu(),{referrer:t}=V.document||{},{userAgent:n}=V.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function ki(e,t){const n=Ni(e,t),r={type:ZE(t),value:ex(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function KE(e,t,n,r){const s=ue(),o=s==null?void 0:s.getOptions().normalizeDepth,i=rx(t),a={__serialized__:rh(t,o)};if(i)return{exception:{values:[ki(e,i)]},extra:a};const l={exception:{values:[{type:xi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:tx(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ni(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function ua(e,t){return{exception:{values:[ki(e,t)]}}}function Ni(e,t){const n=t.stacktrace||t.stack||"",r=YE(t),s=JE(t);try{return e(n,r,s)}catch{}return[]}const XE=/Minified React error #\d+;/i;function YE(e){return e&&XE.test(e.message)?1:0}function JE(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zh(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function ZE(e){const t=e==null?void 0:e.name;return!t&&Zh(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ex(e){const t=e==null?void 0:e.message;return Zh(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?rd(t.error):rd(e):"No error message"}function eg(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,o=Wu(e,t,s,r);return Sn(o),o.level="error",n!=null&&n.event_id&&(o.event_id=n.event_id),Is(o)}function tg(e,t,n="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,i=kl(e,t,o,s);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),Is(i)}function Wu(e,t,n,r,s){var i,a;let o;if(Jm(t)&&t.error)return ua(e,t.error);if(yf(t)||U_(t)){const l=t;if("stack"in t){o=ua(e,t);const u=(a=(i=o.exception)==null?void 0:i.values)==null?void 0:a[0];if(r&&n&&u&&!u.stacktrace){const c=Ni(e,n);c.length&&(u.stacktrace={frames:c},Sn(o,{synthetic:!0}))}}else{const u=l.name||(yf(l)?"DOMError":"DOMException"),c=l.message?`${u}: ${l.message}`:u;o=kl(e,c,n,r),pl(o,c)}return"code"in l&&(o.tags={...o.tags,"DOMException.code":`${l.code}`}),o}return gt(t)?ua(e,t):gs(t)||xi(t)?(o=KE(e,t,n,s),Sn(o,{synthetic:!0}),o):(o=kl(e,t,n,r),pl(o,`${t}`),Sn(o,{synthetic:!0}),o)}function kl(e,t,n,r){const s={};if(r&&n){const o=Ni(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),Sn(s,{synthetic:!0})}if(bu(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function tx(e,{isUnhandledRejection:t}){const n=z_(e),r=t?"promise rejection":"exception";return Jm(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:xi(e)?`Event \`${nx(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function nx(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function rx(e){return Object.values(e).find(gt)}class ng extends aE{constructor(t){var i;const n=sx(t),r=V.SENTRY_SDK_SOURCE||LS();Bh(n,"browser",["browser"],r),super(n);const{userInfo:s}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:s?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:o}=this._options;V.document&&V.document.addEventListener("visibilitychange",()=>{V.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),s&&this.on("beforeSendSession",mE)}eventFromException(t,n){return eg(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return tg(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function sx(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=V.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ox=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,re=B;function ud(e,t,n){re.document&&re.addEventListener(e,t,n)}function cd(e,t,n){re.document&&re.removeEventListener(e,t,n)}const ix=e=>{let t=!1;return()=>{t||(e(),t=!0)}},ax=e=>{var n;const t=re.requestIdleCallback||re.setTimeout;((n=re.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=ix(e),ud("visibilitychange",e,{once:!0,capture:!0}),ud("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),cd("visibilitychange",e,{capture:!0}),cd("pagehide",e,{capture:!0})}))},lx=80,dn={};try{typeof Node<"u"&&(dn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(dn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,dn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,dn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,dn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(dn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Mt(e,t,n){const r=dn[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return typeof s=="function"?s.call(e,n):s}function rg(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||lx;for(;n&&o++1&&i+s.length*l+u.length>=d));)s.push(u),i+=u.length,n=Mt(n,"parentNode");return s.reverse().join(a)}catch{return""}}function ux(e,t){const n=[],r=Mt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const o=Mt(e,"dataset");if(o){if(o.sentryComponent)return o.sentryComponent;if(o.sentryElement)return o.sentryElement}}n.push(r.toLowerCase());const s=t!=null&&t.length?t.filter(o=>Mt(e,"getAttribute",o)).map(o=>[o,Mt(e,"getAttribute",o)]):null;if(s!=null&&s.length)s.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{const o=Mt(e,"id");o&&n.push(`#${o}`);const i=Mt(e,"className");if(i&&Tt(i)){const a=i.split(/\s+/);for(const l of a)n.push(`.${l}`)}}for(const o of["aria-label","type","name","title","alt"]){const i=Mt(e,"getAttribute",o);i&&n.push(`[${o}="${i}"]`)}return n.join("")}const cx=1e3;let fd,Nl,Rl;function fx(e){const t="dom";jn(t,e),An(t,dx)}function dx(){if(!re.document)return;const e=at.bind(null,"dom"),t=dd(e,!0);re.document.addEventListener("click",t,!1),re.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var o,i;const s=(o=re[n])==null?void 0:o.prototype;(i=s==null?void 0:s.hasOwnProperty)!=null&&i.call(s,"addEventListener")&&($e(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},h=d[l]=d[l]||{refCount:0};if(!h.handler){const _=dd(e);h.handler=_,a.call(this,l,_,c)}h.refCount++}catch{}return a.call(this,l,u,c)}}),$e(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},h=d[l];h&&(h.refCount--,h.refCount<=0&&(a.call(this,l,h.handler,c),h.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function px(e){if(e.type!==Nl)return!1;try{if(!e.target||e.target._sentryId!==Rl)return!1}catch{}return!0}function mx(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function dd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=hx(n);if(mx(n.type,r))return;rn(n,"_sentryCaptured",!0),r&&!r._sentryId&&rn(r,"_sentryId",Xe());const s=n.type==="keypress"?"input":n.type;px(n)||(e({event:n,name:s,global:t}),Nl=n.type,Rl=r?r._sentryId:void 0),clearTimeout(fd),fd=re.setTimeout(()=>{Rl=void 0,Nl=void 0},cx)}}function hx(e){try{return e.target}catch{return null}}let ro;function sg(e){const t="history";jn(t,e),An(t,gx)}function gx(){if(re.addEventListener("popstate",()=>{const t=re.location.href,n=ro;if(ro=t,n===t)return;at("history",{from:n,to:t})}),!$E())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=ro,o=yx(String(r));if(ro=o,s===o)return t.apply(this,n);at("history",{from:s,to:o})}return t.apply(this,n)}}$e(re.history,"pushState",e),$e(re.history,"replaceState",e)}function yx(e){try{return new URL(e,re.location.origin).toString()}catch{return e}}const wo={};function _x(e){const t=wo[e];if(t)return t;let n=re[e];if(xl(n))return wo[e]=n.bind(re);const r=re.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){ox&&A.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(wo[e]=n.bind(re))}function vx(e){wo[e]=void 0}const Br="__sentry_xhr_v3__";function Sx(e){const t="xhr";jn(t,e),An(t,Ex)}function Ex(){if(!re.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,o=bt()*1e3,i=Tt(r[0])?r[0].toUpperCase():void 0,a=xx(r[1]);if(!i||!a)return t.apply(n,r);n[Br]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[Br];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:bt()*1e3,startTimestamp:o,xhr:n,virtualError:s};at("xhr",c),n.removeEventListener("readystatechange",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[h,_]=d,v=c[Br];return v&&Tt(h)&&Tt(_)&&(v.request_headers[h.toLowerCase()]=_),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Br];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:bt()*1e3,xhr:n};return at("xhr",o),t.apply(n,r)}})}function xx(e){if(Tt(e))return e;try{return e.toString()}catch{}}function wx(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}const kx=40;function og(e,t=_x("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw vx("fetch"),l}finally{n-=i,r--}}return Dh(e,s,Bu(e.bufferSize||kx))}const pr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Nx=30,Rx=50;function Cl(e,t,n,r){const s={filename:e,function:t===""?Cn:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Cx=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Tx=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bx=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ox=/at (.+?) ?\(data:(.+?),/,Ix=e=>{var s;const t=e.match(Ox);if(t)return{filename:``,function:t[1]};const n=Cx.exec(e);if(n){const[,o,i,a]=n;return Cl(o,Cn,+i,+a)}const r=Tx.exec(e);if(r){if(((s=r[2])==null?void 0:s.indexOf("eval"))===0){const l=bx.exec(r[2]);l&&(r[2]=l[1],r[3]=l[2],r[4]=l[3])}const[i,a]=cg(r[1]||Cn,r[2]);return Cl(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},ig=[Nx,Ix],Px=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jx=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ax=e=>{const t=Px.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=jx.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||Cn;return[s,r]=cg(s,r),Cl(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ag=[Rx,Ax],lg=[ig,ag],ug=Xm(...lg),cg=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Cn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},so=1024,Dx="Breadcrumbs",Lx=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Dx,setup(n){t.console&&bE(Ux(n)),t.dom&&fx(Mx(n,t.dom)),t.xhr&&Sx($x(n)),t.fetch&&HE(zx(n)),t.history&&sg(Bx(n)),t.sentry&&n.on("beforeSendEvent",Fx(n))}}},fg=Lx;function Fx(e){return function(n){ue()===e&&sn({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function Mx(e,t){return function(r){if(ue()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>so&&(pr&&A.warn(`\`dom.maxStringLength\` cannot exceed ${so}, but a value of ${a} was configured. Sentry will use ${so} instead.`),a=so),typeof i=="string"&&(i=[i]);try{const u=r.event,c=Hx(u)?u.target:u;s=rg(c,{keyAttrs:i,maxStringLength:a}),o=GE(c)}catch{s=""}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};o&&(l.data={"ui.component_name":o}),sn(l,{event:r.event,name:r.name,global:r.global})}}function Ux(e){return function(n){if(ue()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:IE(n.level),message:vf(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${vf(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;sn(r,{input:n.args,level:n.level})}}function $x(e){return function(n){if(ue()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Br];if(!r||!s||!o)return;const{method:i,url:a,status_code:l,body:u}=o,c={method:i,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},h={category:"xhr",data:c,type:"http",level:Xh(l)};e.emit("beforeOutgoingRequestBreadcrumb",h,d),sn(h,d)}}function zx(e){return function(n){if(ue()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),sn(i,o)}else{const o=n.response,i={...n.fetchData,status_code:o==null?void 0:o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:i,type:"http",level:Xh(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),sn(l,a)}}}function Bx(e){return function(n){if(ue()!==e)return;let r=n.from,s=n.to;const o=la(V.location.href);let i=r?la(r):void 0;const a=la(s);i!=null&&i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),sn({category:"navigation",data:{from:r,to:s}})}}function Hx(e){return!!e&&!!e.target}const Wx="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Vx="BrowserApiErrors",qx=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Vx,setupOnce(){t.setTimeout&&$e(V,"setTimeout",pd),t.setInterval&&$e(V,"setInterval",pd),t.requestAnimationFrame&&$e(V,"requestAnimationFrame",Gx),t.XMLHttpRequest&&"XMLHttpRequest"in V&&$e(XMLHttpRequest.prototype,"send",Qx);const n=t.eventTarget;n&&(Array.isArray(n)?n:Wx).forEach(s=>Kx(s,t))}}},dg=qx;function pd(e){return function(...t){const n=t[0];return t[0]=dr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${nn(e)}`}}),e.apply(this,t)}}function Gx(e){return function(t){return e.apply(this,[dr(t,{mechanism:{data:{handler:nn(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Qx(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&$e(n,s,function(o){const i={mechanism:{data:{handler:nn(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Iu(o);return a&&(i.mechanism.data.handler=nn(a)),dr(o,i)})}),e.apply(this,t)}}function Kx(e,t){var s,o;const r=(s=V[e])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&($e(r,"addEventListener",function(i){return function(a,l,u){try{Xx(l)&&(l.handleEvent=dr(l.handleEvent,{mechanism:{data:{handler:nn(l),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Yx(this,a,l),i.apply(this,[a,dr(l,{mechanism:{data:{handler:nn(l),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),$e(r,"removeEventListener",function(i){return function(a,l,u){try{if(Object.prototype.hasOwnProperty.call(l,"__sentry_wrapped__")){const c=l.__sentry_wrapped__;c&&i.call(this,a,c,u)}}catch{}return i.call(this,a,l,u)}}))}function Xx(e){return typeof e.handleEvent=="function"}function Yx(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const pg=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof V.document>"u"){pr&&A.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}vl({ignoreDuration:!0});let n=!1;ax(()=>{n||(So(),n=!0)});const r=yt();let s=r.getUser();r.addScopeListener(o=>{const i=o.getUser();((s==null?void 0:s.id)!==(i==null?void 0:i.id)||(s==null?void 0:s.ip_address)!==(i==null?void 0:i.ip_address))&&(s=i,n&&So())}),t==="route"&&sg(({from:o,to:i})=>{o!==i&&(vl({ignoreDuration:!0}),So(),n=!0)})}}},Jx="CultureContext",Zx=()=>({name:Jx,preprocessEvent(e){var n;const t=md();t&&(e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}})},processSegmentSpan(e){const t=md();t&&kh(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}),mg=Zx;function md(){try{const e=V.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ew="GlobalHandlers",tw=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ew,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(nw(n),hd("onerror")),t.onunhandledrejection&&(rw(n),hd("onunhandledrejection"))}}},hg=tw;function nw(e){D_(t=>{const{stackParser:n,attachStacktrace:r}=gg();if(ue()!==e||Jh())return;const{msg:s,url:o,line:i,column:a,error:l}=t,u=iw(Wu(n,l||s,void 0,r,!1),o,i,a);u.level="error",Mu(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function rw(e){F_(t=>{const{stackParser:n,attachStacktrace:r}=gg();if(ue()!==e||Jh())return;const s=sw(t),o=Ns(s)?ow(s):Wu(n,s,void 0,r,!0);o.level="error",Mu(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function sw(e){if(Ns(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function ow(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function iw(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:r,lineno:n,filename:aw(t)??Hu(),function:Cn,in_app:!0}),e}function hd(e){pr&&A.log(`Global Handler attached: ${e}`)}function gg(){const e=ue();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function aw(e){if(!(!Tt(e)||e.length===0))return e.startsWith("data:")?`<${pE(e,!1)}>`:e}const yg=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!V.navigator&&!V.location&&!V.document)return;const t=ld(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){var r;const t=(r=e.attributes)==null?void 0:r[Au];if(!V.navigator&&!V.location&&!V.document)return;const n=ld();kh(e,{[pS]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),lw="cause",uw=5,cw="LinkedErrors",fw=(e={})=>{const t=e.limit||uw,n=e.key||lw;return{name:cw,preprocessEvent(r,s,o){const i=o.getOptions();CE(ki,i.stackParser,n,t,r,s)}}},_g=fw,dw=/^HTML(\w*)Element$/;function Vu(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(wx(e)){const t=pw(e);if(dw.test(t))return`[HTMLElement: ${rg(e)}]`}}function pw(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function mw(){return hw()?(pr&&vr(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function hw(){var s;if(typeof V.window>"u")return!1;const e=V;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((s=t==null?void 0:t.runtime)!=null&&s.id))return!1;const n=Hu();return!(V===V.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function vg(e){return[Vh(),Hh(),UE(),dg(),fg(),hg(),_g(),Gh(),yg(),mg(),pg()]}function gw(e={}){const t=!e.skipBrowserExtensionCheck&&mw();let n=e.defaultIntegrations==null?vg():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:j_(e.stackParser||ug),integrations:jS({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||og};return nh(Vu),dE(ng,r)}function Tl(e={}){const t=V.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){pr&&A.error("[showReportDialog] Global document not defined");return}const r=ct(),s=ue(),o=s==null?void 0:s.getDsn();if(!o){pr&&A.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Ch()},a=V.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=IS(o,i);const{onLoad:l,onClose:u}=i;if(l&&(a.onload=l),u){const c=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{V.removeEventListener("message",c)}};V.addEventListener("message",c)}n.appendChild(a)}function yw(e){return gs(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Sg(e){const t={...e};Bh(t,"react"),Rh("react",{version:Y.version});const n=gw(t);return nh(_w),n}function _w(e){return yw(e)?"[SyntheticEvent]":Vu(e)}function vw(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Sw(e,t){const n=new WeakSet;function r(s,o){if(!n.has(s)){if(s.cause)return n.add(s),r(s.cause,o);s.cause=o}}r(e,t)}function Eg(e,{componentStack:t},n){if(vw(Y.version)&>(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,Sw(e,r)}return Fu(e,n)}const Ew=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ca={componentStack:null,error:null,eventId:null};let xw=class extends Y.Component{constructor(t){super(t),this.state=ca,this._openFallbackReportDialog=!0;const n=ue();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&Tl({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:s,onError:o,showDialog:i,dialogOptions:a}=this.props;ju(l=>{s&&s(l,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,c=Eg(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});o&&o(t,r,c),i&&(this._lastEventId=c,this._openFallbackReportDialog&&Tl({...a,eventId:c})),this.setState({error:t,componentStack:r,eventId:c})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:s}=this.props;s&&(this.state===ca?s(null,null,null):s(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:s}=this.state;t&&t(n,r,s),this.setState(ca)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const s=typeof t=="function"?Y.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Y.isValidElement(s)?s:(t&&Ew&&A.warn("fallback did not produce a valid ReactElement"),null)}};const ww=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:ng,ErrorBoundary:xw,SDK_VERSION:Zt,SEMANTIC_ATTRIBUTE_SENTRY_OP:Au,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:ph,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:dh,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:fh,Scope:ut,WINDOW:V,addBreadcrumb:sn,breadcrumbsIntegration:fg,browserApiErrorsIntegration:dg,browserSessionIntegration:pg,captureEvent:Mu,captureException:Fu,captureReactException:Eg,captureSession:So,chromeStackLineParser:ig,createTransport:Dh,cultureContextIntegration:mg,dedupeIntegration:Gh,defaultStackLineParsers:lg,defaultStackParser:ug,endSession:Uu,eventFiltersIntegration:Wh,eventFromException:eg,eventFromMessage:tg,exceptionFromError:ki,functionToStringIntegration:Hh,geckoStackLineParser:ag,getClient:ue,getCurrentScope:ct,getDefaultIntegrations:vg,getGlobalScope:ch,getIsolationScope:yt,getRootSpan:Du,globalHandlersIntegration:hg,httpContextIntegration:yg,inboundFiltersIntegration:Vh,init:Sg,lastEventId:Ch,linkedErrorsIntegration:_g,makeFetchTransport:og,normalizeStringifyValue:Vu,setContext:Rh,setCurrentClient:zh,showReportDialog:Tl,spanToJSON:Os,startSession:vl,withScope:ju},Symbol.toStringTag,{value:"Module"}));Sg({dsn:"https://c5c92309ea775dd3d9fee496a8c05312@o4511942207799296.ingest.de.sentry.io/4511942214287440",environment:"production",tracesSampleRate:0,replaysSessionSampleRate:0,replaysOnErrorSampleRate:0,beforeSend(e){return e.request&&(e.request.data=void 0),e}});function xg(e,t){return function(){return e.apply(t,arguments)}}const{toString:kw}=Object.prototype,{getPrototypeOf:mr}=Object,{iterator:Ps,toStringTag:wg}=Symbol,ei=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vs=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),ei(n,t))return!0;n=mr(n)}return!1},Nw=(e,t)=>e!=null&&vs(e,t)?e[t]:void 0,qu=(e=>t=>{const n=kw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=e=>(e=e.toLowerCase(),t=>qu(t)===e),Ri=e=>t=>typeof t===e,{isArray:Tn}=Array,bn=Ri("undefined");function kr(e){return e!==null&&!bn(e)&&e.constructor!==null&&!bn(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kg=Ze("ArrayBuffer");function Rw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kg(e.buffer),t}const Cw=Ri("string"),Ae=Ri("function"),Ng=Ri("number"),Nr=e=>e!==null&&typeof e=="object",Tw=e=>e===!0||e===!1,ko=e=>{if(!Nr(e))return!1;const t=mr(e);return(t===null||t===Object.prototype||mr(t)===null)&&!vs(e,wg)&&!vs(e,Ps)},bw=e=>{if(!Nr(e)||kr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ow=Ze("Date"),Iw=Ze("File"),Pw=e=>!!(e&&typeof e.uri<"u"),jw=e=>e&&typeof e.getParts<"u",Aw=Ze("Blob"),Dw=Ze("FileList"),Lw=Ze("Set"),Fw=e=>Nr(e)&&Ae(e.pipe);function Mw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const gd=Mw(),yd=typeof gd.FormData<"u"?gd.FormData:void 0,Uw=e=>{if(!e)return!1;if(yd&&e instanceof yd)return!0;const t=mr(e);if(!t||t===Object.prototype||!Ae(e.append))return!1;const n=qu(e);return n==="formdata"||n==="object"&&Ae(e.toString)&&e.toString()==="[object FormData]"},$w=Ze("URLSearchParams"),[zw,Bw,Hw,Ww]=["ReadableStream","Request","Response","Headers"].map(Ze),Vw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function js(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Tn(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cg=e=>!bn(e)&&e!==yn;function bl(...e){const{caseless:t,skipUndefined:n}=Cg(this)&&this||{},r={},s=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const a=t&&typeof i=="string"&&Rg(r,i)||i,l=ei(r,a)?r[a]:void 0;ko(l)&&ko(o)?r[a]=bl(l,o):ko(o)?r[a]=bl({},o):Tn(o)?r[a]=o.slice():(!n||!bn(o))&&(r[a]=o)};for(let o=0,i=e.length;o(js(t,(s,o)=>{n&&Ae(s)?Object.defineProperty(e,o,{__proto__:null,value:xg(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Gw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kw=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&mr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Xw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Yw=e=>{if(!e)return null;if(Tn(e))return e;let t=e.length;if(!Ng(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mr(Uint8Array)),Zw=(e,t)=>{const r=(e&&e[Ps]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},e1=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},t1=Ze("HTMLFormElement"),n1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:r1}=Object.prototype,s1=Ze("RegExp"),Tg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};js(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},o1=e=>{Tg(e,(t,n)=>{if(Ae(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},i1=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Tn(e)?r(e):r(String(e).split(t)),n},a1=()=>{},l1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function u1(e){return!!(e&&Ae(e.append)&&e[wg]==="FormData"&&e[Ps])}const c1=e=>{const t=new WeakSet,n=r=>{if(Nr(r)){if(t.has(r))return;if(kr(r))return r;if(!("toJSON"in r)){t.add(r);let s;if(Lw(r)){s=[];for(const o of r){const i=n(o);!bn(i)&&s.push(i)}}else s=Tn(r)?[]:{},js(r,(o,i)=>{const a=n(o);!bn(a)&&(s[i]=a)});return t.delete(r),s}}return r};return n(e)},f1=Ze("AsyncFunction"),d1=e=>e&&(Nr(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),bg=((e,t)=>e?setImmediate:t?((n,r)=>(yn.addEventListener("message",({source:s,data:o})=>{s===yn&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),yn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ae(yn.postMessage)),p1=typeof queueMicrotask<"u"?queueMicrotask.bind(yn):typeof process<"u"&&process.nextTick||bg,Og=e=>e!=null&&Ae(e[Ps]),m1=e=>e!=null&&vs(e,Ps)&&Og(e),y={isArray:Tn,isArrayBuffer:kg,isBuffer:kr,isFormData:Uw,isArrayBufferView:Rw,isString:Cw,isNumber:Ng,isBoolean:Tw,isObject:Nr,isPlainObject:ko,isEmptyObject:bw,isReadableStream:zw,isRequest:Bw,isResponse:Hw,isHeaders:Ww,isUndefined:bn,isDate:Ow,isFile:Iw,isReactNativeBlob:Pw,isReactNative:jw,isBlob:Aw,isRegExp:s1,isFunction:Ae,isStream:Fw,isURLSearchParams:$w,isTypedArray:Jw,isFileList:Dw,forEach:js,merge:bl,extend:qw,trim:Vw,stripBOM:Gw,inherits:Qw,toFlatObject:Kw,kindOf:qu,kindOfTest:Ze,endsWith:Xw,toArray:Yw,forEachEntry:Zw,matchAll:e1,isHTMLForm:t1,hasOwnProperty:ei,hasOwnProp:ei,hasOwnInPrototypeChain:vs,getSafeProp:Nw,reduceDescriptors:Tg,freezeMethods:o1,toObjectSet:i1,toCamelCase:n1,noop:a1,toFiniteNumber:l1,findKey:Rg,global:yn,isContextDefined:Cg,isSpecCompliantForm:u1,toJSONObject:c1,isAsyncFn:f1,isThenable:d1,setImmediate:bg,asap:p1,isIterable:Og,isSafeIterable:m1},h1=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g1=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim();const a=y.hasOwnProp(t,n);!n||a&&y.hasOwnProp(h1,n)||(n==="set-cookie"?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+", "+r:r)}),t};function y1(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const _1=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),v1=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Gu(e,t){return y.isArray(e)?e.map(n=>Gu(n,t)):y1(String(e).replace(t,""))}const S1=e=>Gu(e,_1),E1=e=>Gu(e,v1);function Ig(e){const t=Object.create(null);return y.forEach(e.toJSON(),(n,r)=>{t[r]=E1(n)}),t}const _d=Symbol("internals");function Lr(e){return e&&String(e).trim().toLowerCase()}function No(e){return e===!1||e==null?e:y.isArray(e)?e.map(No):S1(String(e))}function x1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const w1=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function fa(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function k1(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}function N1(e){const t=Object.create(null),n=String(e);let r=0,s=!1,o=!1;function i(a){const l=fa(n.slice(r,a)),u=l.indexOf("=");if(u<1)return;const c=fa(l.slice(0,u));if(!w1.test(c))return;const d=c.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=fa(l.slice(u+1));t[d]=k1(h)}for(let a=0;a/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function da(e,t,n,r,s){if(y.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!y.isString(t)){if(y.isString(r))return t.indexOf(r)!==-1;if(y.isRegExp(r))return r.test(t)}}function C1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function T1(e,t){const n=y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let xe=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,l,u){const c=Lr(l);if(!c)return;const d=y.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=No(a))}const i=(a,l)=>y.forEach(a,(u,c)=>o(u,c,l));if(y.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(y.isString(t)&&(t=t.trim())&&!R1(t))i(g1(t),n);else if(y.isObject(t)&&y.isSafeIterable(t)){let a=Object.create(null),l,u;for(const c of t){if(!y.isArray(c))throw new TypeError("Object iterator must return a key-value pair");u=c[0],y.hasOwnProp(a,u)?(l=a[u],a[u]=y.isArray(l)?[...l,c[1]]:[l,c[1]]):a[u]=c[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Lr(t),t){const r=y.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return x1(s);if(y.isFunction(n))return n.call(this,s,r);if(y.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lr(t),t){const r=y.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||da(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Lr(i),i){const a=y.findKey(r,i);a&&(!n||da(r,r[a],a,n))&&(delete r[a],s=!0)}}return y.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||da(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return y.forEach(this,(s,o)=>{const i=y.findKey(r,o);if(i){n[i]=No(s),delete n[o];return}const a=t?C1(o):String(o).trim();a!==o&&delete n[o],n[a]=No(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return y.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&y.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){const t=this.get("set-cookie");return y.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return N1(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[_d]=this[_d]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Lr(i);r[a]||(T1(s,i),r[a]=!0)}return y.isArray(t)?t.forEach(o):o(t),this}};xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);y.reduceDescriptors(xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});y.freezeMethods(xe);const ti="[REDACTED ****]";function b1(e){if(y.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(y.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function O1(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||y.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof xe&&(o=o.toJSON()),r.push(o);let i;if(y.isArray(o))i=[],o.forEach((a,l)=>{const u=s(a);y.isUndefined(u)||(i[l]=u)});else{if(!y.isPlainObject(o)&&b1(o))return r.pop(),o;i=Object.create(null);for(const[a,l]of Object.entries(o)){const u=n.has(a.toLowerCase())?ti:s(l);y.isUndefined(u)||(i[a]=u)}}return r.pop(),i};return s(e)}function vd(e){try{return String(e)}catch{return""}}function I1(e){return e.errors.map(n=>{try{return n&&n.message?vd(n.message):vd(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let C=class Pg extends Error{static from(t,n,r,s,o,i){let a=t.message;!a&&y.isArray(t.errors)&&t.errors.length&&(a=I1(t));const l=new Pg(a,n||t.code,r,s,o);return Object.defineProperty(l,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),i&&Object.assign(l,i),l}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&y.hasOwnProp(t,"redact")?t.redact:void 0,r=y.isArray(n)&&n.length>0?O1(t,n):y.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};C.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";C.ERR_BAD_OPTION="ERR_BAD_OPTION";C.ECONNABORTED="ECONNABORTED";C.ETIMEDOUT="ETIMEDOUT";C.ECONNREFUSED="ECONNREFUSED";C.ERR_NETWORK="ERR_NETWORK";C.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";C.ERR_DEPRECATED="ERR_DEPRECATED";C.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";C.ERR_BAD_REQUEST="ERR_BAD_REQUEST";C.ERR_CANCELED="ERR_CANCELED";C.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";C.ERR_INVALID_URL="ERR_INVALID_URL";C.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const P1=null,jg=100;function Ol(e){return y.isPlainObject(e)||y.isArray(e)}function Ag(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function pa(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ag(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function j1(e){return y.isArray(e)&&!e.some(Ol)}const A1=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function Ci(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!y.isUndefined(g[p])});const r=n.metaTokens,s=n.visitor||v,o=n.dots,i=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?jg:n.maxDepth,u=a&&y.isSpecCompliantForm(t),c=[];if(!y.isFunction(s))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(y.isDate(f))return f.toISOString();if(y.isBoolean(f))return f.toString();if(!u&&y.isBlob(f))throw new C("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(f)||y.isTypedArray(f)){if(u&&typeof a=="function")return new a([f]);throw new C("Blob is not supported. Use a Buffer instead.",C.ERR_NOT_SUPPORT)}return f}function h(f){if(f>l)throw new C("Object is too deeply nested ("+f+" levels). Max depth: "+l,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(f,p){if(l===1/0)return JSON.stringify(f);const g=[];return JSON.stringify(f,function(N,R){if(!y.isObject(R))return R;for(;g.length&&g[g.length-1]!==this;)g.pop();return g.push(R),h(p+g.length-1),R})}function v(f,p,g){let S=f;if(y.isReactNative(t)&&y.isReactNativeBlob(f))return t.append(pa(g,p,o),d(f)),!1;if(f&&!g&&typeof f=="object"){if(y.endsWith(p,"{}"))p=r?p:p.slice(0,-2),f=_(f,1);else if(y.isArray(f)&&j1(f)||(y.isFileList(f)||y.endsWith(p,"[]"))&&(S=y.toArray(f)))return p=Ag(p),S.forEach(function(R,T){!(y.isUndefined(R)||R===null)&&t.append(i===!0?pa([p],T,o):i===null?p:p+"[]",d(R))}),!1}return Ol(f)?!0:(t.append(pa(g,p,o),d(f)),!1)}const E=Object.assign(A1,{defaultVisitor:v,convertValue:d,isVisitable:Ol});function w(f,p,g=0){if(!y.isUndefined(f)){if(h(g),c.indexOf(f)!==-1)throw new Error("Circular reference detected in "+p.join("."));c.push(f),y.forEach(f,function(N,R){(!(y.isUndefined(N)||N===null)&&s.call(t,N,y.isString(R)?R.trim():R,p,E))===!0&&w(N,p?p.concat(R):[R],g+1)}),c.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Sd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Qu(e,t){this._pairs=[],e&&Ci(e,this,t)}const Dg=Qu.prototype;Dg.append=function(t,n){this._pairs.push([t,n])};Dg.toString=function(t){const n=t?r=>t.call(this,r,Sd):Sd;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function D1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lg(e,t,n){if(!t)return e;e=e||"";const r=y.isFunction(n)?{serialize:n}:n,s=y.getSafeProp(r,"encode")||D1,o=y.getSafeProp(r,"serialize");let i;if(o?i=o(t,r):i=y.isURLSearchParams(t)?t.toString():new Qu(t,r).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ed{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},L1=typeof URLSearchParams<"u"?URLSearchParams:Qu,F1=typeof FormData<"u"?FormData:null,M1=typeof Blob<"u"?Blob:null,U1={isBrowser:!0,classes:{URLSearchParams:L1,FormData:F1,Blob:M1},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",Il=typeof navigator=="object"&&navigator||void 0,$1=Xu&&(!Il||["ReactNative","NativeScript","NS"].indexOf(Il.product)<0),z1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",B1=Xu&&window.location.href||"http://localhost",H1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:$1,hasStandardBrowserWebWorkerEnv:z1,navigator:Il,origin:B1},Symbol.toStringTag,{value:"Module"})),me={...H1,...U1};function W1(e,t){return Ci(e,new me.classes.URLSearchParams,{visitor:function(n,r,s,o){return me.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const xd=jg;function Fg(e){if(e>xd)throw new C("FormData field is too deeply nested ("+e+" levels). Max depth: "+xd,C.ERR_FORM_DATA_DEPTH_EXCEEDED)}function V1(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Fg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function q1(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&y.isArray(s)?s.length:i,l?(y.hasOwnProp(s,i)?s[i]=y.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!a):((!y.hasOwnProp(s,i)||!y.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&y.isArray(s[i])&&(s[i]=q1(s[i])),!a)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,s)=>{t(V1(r),s,n,0)}),n}return null}const Mn=(e,t)=>e!=null&&y.hasOwnProp(e,t)?e[t]:void 0;function G1(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const As={transitional:Ku,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=y.isObject(t);if(o&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return s?JSON.stringify(Mg(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=Mn(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return W1(t,l).toString();if((a=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Mn(this,"env"),c=u&&u.FormData;return Ci(a?{"files[]":t}:t,c&&new c,l)}}return o||s?(n.setContentType("application/json",!1),G1(t)):t}],transformResponse:[function(t){const n=Mn(this,"transitional")||As.transitional,r=n&&n.forcedJSONParsing,s=Mn(this,"responseType"),o=s==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!s||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Mn(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?C.from(l,C.ERR_BAD_RESPONSE,this,null,Mn(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch","query"],e=>{As.headers[e]={}});function ma(e,t){const n=this||As,r=t||n,s=xe.from(r.headers);let o=r.data;return y.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ug(e){return!!(e&&e.__CANCEL__)}let Ds=class extends C{constructor(t,n,r){super(t??"canceled",C.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function $g(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new C("Request failed with status code "+n.status,n.status>=400&&n.status<500?C.ERR_BAD_REQUEST:C.ERR_BAD_RESPONSE,n.config,n.request,n))}function Q1(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function K1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[o];i||(i=u),n[s]=l,r[s]=u;let d=o,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i{n=c,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?i(u,c):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const ni=(e,t,n=3)=>{let r=0;const s=K1(50,250);return X1(o=>{if(!o||typeof o.loaded!="number")return;const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=Math.max(0,a!=null?Math.min(i,a):i),u=Math.max(0,l-r),c=s(u);r=Math.max(r,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a?(a-l)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},wd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kd=(e,t=y.asap)=>(...n)=>t(()=>e(...n)),Y1=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,J1=me.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];y.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),y.isString(r)&&a.push(`path=${r}`),y.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),y.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const tk=/^https?:(?!\/\/)/i,nk=/[\t\n\r]/g;function rk(e){let t=0;for(;t`${n}${r}${ti}`)}function ik(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ti}@`),n=t.indexOf("#"),s=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ti}`);return n===-1?s:`${s}#${ok(t.slice(n+1))}`}function Nd(e,t){if(typeof e=="string"){const n=sk(e);if(tk.test(n))throw new C(`Invalid URL ${JSON.stringify(ik(n))}: missing "//" after protocol`,C.ERR_INVALID_URL,t)}}function zg(e,t,n,r){Nd(t,r);let s=!Z1(t);return e&&(s||n===!1)?(Nd(e,r),ek(e,t)):t}const Rd=e=>e instanceof xe?{...e}:e,ak=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function On(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(c,d,h,_){return y.isPlainObject(c)&&y.isPlainObject(d)?y.merge.call({caseless:_},c,d):y.isPlainObject(d)?y.merge({},d):y.isArray(d)?d.slice():d}function s(c,d,h,_){if(y.isUndefined(d)){if(!y.isUndefined(c))return r(void 0,c,h,_)}else return r(c,d,h,_)}function o(c,d){if(!y.isUndefined(d))return r(void 0,d)}function i(c,d){if(y.isUndefined(d)){if(!y.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c){const d=y.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!y.isUndefined(d))if(y.isPlainObject(d)){if(y.hasOwnProp(d,c))return d[c]}else return;const h=y.hasOwnProp(e,"transitional")?e.transitional:void 0;if(y.isPlainObject(h)&&y.hasOwnProp(h,c))return h[c]}function l(c,d,h){if(y.hasOwnProp(t,h))return r(c,d);if(y.hasOwnProp(e,h))return r(void 0,c)}const u={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:l,headers:(c,d,h)=>s(Rd(c),Rd(d),h,!0)};return y.forEach(ak({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=y.hasOwnProp(u,d)?u[d]:s,_=y.hasOwnProp(e,d)?e[d]:void 0,v=y.hasOwnProp(t,d)?t[d]:void 0,E=h(_,v,d);y.isUndefined(E)&&h!==l||(n[d]=E)}),y.hasOwnProp(t,"validateStatus")&&y.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(y.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const lk=["content-type","content-length"];function uk(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{lk.includes(r.toLowerCase())&&e.set(r,s)})}const ck=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Bg(e){const t=On({},e),n=h=>y.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=xe.from(a),t.url=Lg(zg(u,d,c,t),n("params"),n("paramsSerializer")),l){const h=y.getSafeProp(l,"username")||"",_=y.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(h+":"+(_?ck(_):"")))}catch(v){throw C.from(v,C.ERR_BAD_OPTION_VALUE,e)}}if(y.isFormData(r)&&(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv||y.isReactNative(r)?a.setContentType(void 0):y.isFunction(r.getHeaders)&&uk(a,r.getHeaders(),n("formDataHeaderPolicy"))),me.hasStandardBrowserEnv&&(y.isFunction(s)&&(s=s(t)),s===!0||s==null&&Y1(t.url))){const _=o&&i&&J1.read(i);_&&a.set(o,_)}return t}const fk=typeof XMLHttpRequest<"u",dk=fk&&function(e){return new Promise(function(n,r){const s=Bg(e);let o=s.data;const i=xe.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,h,_,v;function E(){_&&_(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function f(){if(!w)return;const g=xe.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:g,config:e,request:w};$g(function(T){n(T),E()},function(T){r(T),E()},N),w=null}"onloadend"in w?w.onloadend=f:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(f)},w.onabort=function(){w&&(r(new C("Request aborted",C.ECONNABORTED,e,w)),E(),w=null)},w.onerror=function(S){const N=S&&S.message?S.message:"Network Error",R=new C(N,C.ERR_NETWORK,e,w);R.event=S||null,r(R),E(),w=null},w.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Ku;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new C(S,N.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,w)),E(),w=null},o===void 0&&i.setContentType(null),"setRequestHeader"in w&&y.forEach(Ig(i),function(S,N){w.setRequestHeader(N,S)}),y.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),a&&a!=="json"&&(w.responseType=s.responseType),u&&([h,v]=ni(u,!0),w.addEventListener("progress",h)),l&&w.upload&&([d,_]=ni(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",_)),(s.cancelToken||s.signal)&&(c=g=>{w&&(r(!g||g.type?new Ds(null,e,w):g),w.abort(),E(),w=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const p=Q1(s.url);if(p&&!me.protocols.includes(p)){r(new C("Unsupported protocol "+p+":",C.ERR_BAD_REQUEST,e)),E();return}w.send(o||null)})},pk=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,i();const u=l instanceof Error?l:this.reason;n.abort(u instanceof C?u:new Ds(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new C(`timeout of ${t}ms exceeded`,C.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>{if(!r){if(l.aborted){s.call(l);return}l.addEventListener("abort",s,{once:!0})}});const{signal:a}=n;return a.unsubscribe=()=>y.asap(i),a},mk=function*(e,t){let n=e.byteLength;if(n{const s=hk(e,t);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let h=o+=d;n(h)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Td=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Hg=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,yk=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,_k=e=>e===9||e===10||e===12||e===13||e===32,vk=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Sk=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Ek=e=>{const t=e.length;let n=0,r=0,s=!1;for(let o=0;o0){s=!0;continue}n++}}return s||r>2||r>0&&(n+r)%4!==0||n%4===1?Sk(e):vk(n)},xk=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),s=e.slice(n+1);if(/;base64/i.test(r))return t(s);let i=0;for(let a=0,l=s.length;a=55296&&u<=56319&&a+1=56320&&c<=57343?(i+=4,a++):i+=3}else i+=3}return i};function wk(e){const t=typeof e=="string"?e.indexOf("#"):-1;return xk(t===-1?e:e.slice(0,t),Ek)}const Yu="1.19.0",Od=64*1024,{isFunction:oo}=y,kk=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Id=e=>{if(!y.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Pd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Nk=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Rk=e=>{const t=y.global!==void 0&&y.global!==null?y.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=y.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:i}=e,a=s?oo(s):typeof fetch=="function",l=oo(o),u=oo(i);if(!a)return!1;const c=a&&oo(n),d=a&&(typeof r=="function"?(f=>p=>f.encode(p))(new r):async f=>new Uint8Array(await new o(f).arrayBuffer())),h=l&&c&&Pd(()=>{let f=!1;const p=new o(me.origin,{body:new n,method:"POST",get duplex(){return f=!0,"half"}}),g=p.headers.has("Content-Type");return p.body!=null&&p.body.cancel(),f&&!g}),_=u&&c&&Pd(()=>y.isReadableStream(new i("").body)),v={stream:_&&(f=>f.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!v[f]&&(v[f]=(p,g)=>{let S=p&&p[f];if(S)return S.call(p);throw new C(`Response type '${f}' is not supported`,C.ERR_NOT_SUPPORT,g)})});const E=async f=>{if(f==null)return 0;if(y.isBlob(f))return f.size;if(y.isSpecCompliantForm(f))return(await new o(me.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(y.isArrayBufferView(f)||y.isArrayBuffer(f))return f.byteLength;if(y.isURLSearchParams(f)&&(f=f+""),y.isString(f))return(await d(f)).byteLength},w=async(f,p)=>{const g=y.toFiniteNumber(f.getContentLength());return g??E(p)};return async f=>{let{url:p,method:g,data:S,signal:N,cancelToken:R,timeout:T,onDownloadProgress:I,onUploadProgress:W,responseType:L,headers:G,withCredentials:Te="same-origin",fetchOptions:De,maxContentLength:ye,maxBodyLength:_t}=Bg(f);const Ve=y.isNumber(ye)&&ye>-1,P=y.isNumber(_t)&&_t>-1,x=z=>y.hasOwnProp(f,z)?f[z]:void 0;let b=s||fetch;L=L?(L+"").toLowerCase():"text";let j=pk([N,R&&R.toAbortSignal()],T),D=null;const U=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let et,Le=null;const Dn=()=>new C("Request body larger than maxBodyLength limit",C.ERR_BAD_REQUEST,f,D);try{let z;const de=x("auth");if(de){const M=y.getSafeProp(de,"username")||"",Fe=y.getSafeProp(de,"password")||"";z={username:M,password:Fe}}if(Nk(p)){const M=new URL(p,me.origin);if(!z&&(M.username||M.password)){const Fe=Id(M.username),Dt=Id(M.password);z={username:Fe,password:Dt}}(M.username||M.password)&&(M.username="",M.password="",p=M.href)}if(z&&(G.delete("authorization"),G.set("Authorization","Basic "+btoa(kk((z.username||"")+":"+(z.password||""))))),Ve&&typeof p=="string"&&p.startsWith("data:")&&wk(p)>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D);if(P&&g!=="get"&&g!=="head"){const M=await E(S);if(typeof M=="number"&&isFinite(M)&&(et=M,M>_t))throw Dn()}const Fs=P&&(y.isReadableStream(S)||y.isStream(S)),Zu=(M,Fe,Dt)=>Cd(M,Od,un=>{if(P&&un>_t)throw Le=Dn();Fe&&Fe(un)},Dt);if(h&&g!=="get"&&g!=="head"&&(W||Fs)){if(et=et??await w(G,S),et!==0||Fs){let M=new o(p,{method:"POST",body:S,duplex:"half"}),Fe;if(y.isFormData(S)&&(Fe=M.headers.get("content-type"))&&G.setContentType(Fe),M.body){const[Dt,un]=W&&wd(et,ni(kd(W)))||[];S=Zu(M.body,Dt,un)}}}else if(Fs&&!l&&c&&g!=="get"&&g!=="head")S=Zu(S);else if(Fs&&l&&!h&&g!=="get"&&g!=="head")throw new C("Stream request bodies are not supported by the current fetch implementation",C.ERR_NOT_SUPPORT,f,D);y.isString(Te)||(Te=Te?"include":"omit");const Xg=l&&"credentials"in o.prototype;if(y.isFormData(S)){const M=G.getContentType();M&&/^multipart\/form-data/i.test(M)&&!/boundary=/i.test(M)&&G.delete("content-type")}G.set("User-Agent","axios/"+Yu,!1);const ec={...De,signal:j,method:g.toUpperCase(),headers:Ig(G.normalize()),body:S,duplex:"half",credentials:Xg?Te:void 0};D=l&&new o(p,ec);let vt=await(l?b(D,De):b(p,ec));const tc=xe.from(vt.headers);if(Ve){const M=y.toFiniteNumber(tc.getContentLength());if(M!=null&&M>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D)}const bi=_&&(L==="stream"||L==="response");if(_&&vt.body&&(I||Ve||bi&&U)){const M={};["status","statusText","headers"].forEach(Rr=>{M[Rr]=vt[Rr]});const Fe=y.toFiniteNumber(tc.getContentLength()),[Dt,un]=I&&wd(Fe,ni(kd(I),!0))||[];let nc=0;const Yg=Rr=>{if(Ve&&(nc=Rr,nc>ye))throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D);Dt&&Dt(Rr)};vt=new i(Cd(vt.body,Od,Yg,()=>{un&&un(),U&&U()}),M)}L=L||"text";let St=await v[y.findKey(v,L)||"text"](vt,f);if(Ve&&!_&&!bi){let M;if(St!=null&&(typeof St.byteLength=="number"?M=St.byteLength:typeof St.size=="number"?M=St.size:typeof St=="string"&&(M=typeof r=="function"?new r().encode(St).byteLength:St.length)),typeof M=="number"&&M>ye)throw new C("maxContentLength size of "+ye+" exceeded",C.ERR_BAD_RESPONSE,f,D)}return!bi&&U&&U(),await new Promise((M,Fe)=>{$g(M,Fe,{data:St,headers:xe.from(vt.headers),status:vt.status,statusText:vt.statusText,config:f,request:D})})}catch(z){if(U&&U(),j&&j.aborted&&j.reason instanceof C){const de=j.reason;throw de.config=f,D&&(de.request=D),z!==de&&Object.defineProperty(de,"cause",{__proto__:null,value:z,writable:!0,enumerable:!1,configurable:!0}),de}if(Le)throw D&&!Le.request&&(Le.request=D),Le;if(z instanceof C)throw D&&!z.request&&(z.request=D),z;if(z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)){const de=new C("Network Error",C.ERR_NETWORK,f,D,z&&z.response);throw Object.defineProperty(de,"cause",{__proto__:null,value:z.cause||z,writable:!0,enumerable:!1,configurable:!0}),de}throw C.from(z,z&&z.code,f,D,z&&z.response)}}},Ck=new Map,Wg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,l,u,c=Ck;for(;a--;)l=o[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:Rk(t)),c=u;return u};Wg();const Ju={http:P1,xhr:dk,fetch:{get:Wg}};y.forEach(Ju,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const jd=e=>`- ${e}`,Tk=e=>y.isFunction(e)||e===null||e===!1;function bk(e,t){e=y.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since : +`+i.map(jd).join(` +`):" "+jd(i[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+a,C.ERR_NOT_SUPPORT)}return s}const Vg={getAdapter:bk,adapters:Ju};function ha(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ds(null,e)}function ga(e){return ha(e),e.headers=xe.from(e.headers),e.data=ma.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vg.getAdapter(e.adapter||As.adapter,e)(e).then(function(r){ha(e),e.response=r;try{r.data=ma.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=xe.from(r.headers),r},function(r){if(!Ug(r)&&(ha(e),r&&r.response)){e.response=r.response;try{r.response.data=ma.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=xe.from(r.response.headers)}return Promise.reject(r)})}const Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ad={};Ti.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Yu+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new C(s(i," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!Ad[i]&&(Ad[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};Ti.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ok(e,t,n){if(typeof e!="object"||e===null)throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const a=e[o],l=a===void 0||i(a,o,e);if(l!==!0)throw new C("option "+o+" must be "+l,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+o,C.ERR_BAD_OPTION)}}const Ro={assertOptions:Ok,validators:Ti},Se=Ro.validators;let En=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ed,response:new Ed}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` +`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` +`),a=i===-1?-1:o.indexOf(` +`,i+1),l=a===-1?"":o.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` +`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=On(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ro.assertOptions(r,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean),advertiseZstdAcceptEncoding:Se.transitional(Se.boolean),validateStatusUndefinedResolves:Se.transitional(Se.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:Ro.assertOptions(s,{encode:Se.function,serialize:Se.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ro.assertOptions(n,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&y.merge(o.common,o[n.method]);o&&y.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete o[v]}),n.headers=xe.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(n)===!1)return;l=l&&E.synchronous;const w=n.transitional||Ku;w&&w.legacyInterceptorReqResOrdering?a.unshift(E.fulfilled,E.rejected):a.push(E.fulfilled,E.rejected)});const u=[];this.interceptors.response.forEach(function(E){u.push(E.fulfilled,E.rejected)});let c,d=0,h;if(!l){const v=[ga.bind(this),void 0];for(v.unshift(...a),v.push(...u),h=v.length,c=Promise.resolve(n);dga.call(this,_)))}catch(f){c=Promise.reject(f)}break}}if(!c)try{c=ga.call(this,_)}catch(v){c=Promise.reject(v)}for(d=0,h=u.length;d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new Ds(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qg(function(s){t=s}),cancel:t}}};function Pk(e){return function(n){return e.apply(null,n)}}function jk(e){return y.isObject(e)&&e.isAxiosError===!0}const Pl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pl).forEach(([e,t])=>{Pl[t]=e});function Gg(e){const t=new En(e),n=xg(En.prototype.request,t);return y.extend(n,En.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Gg(On(e,s))},n}const oe=Gg(As);oe.Axios=En;oe.CanceledError=Ds;oe.CancelToken=Ik;oe.isCancel=Ug;oe.VERSION=Yu;oe.toFormData=Ci;oe.AxiosError=C;oe.Cancel=oe.CanceledError;oe.all=function(t){return Promise.all(t)};oe.spread=Pk;oe.isAxiosError=jk;oe.mergeConfig=On;oe.AxiosHeaders=xe;oe.formToJSON=e=>Mg(y.isHTMLForm(e)?new FormData(e):e);oe.getAdapter=Vg.getAdapter;oe.HttpStatusCode=Pl;oe.default=oe;const{Axios:fN,AxiosError:dN,CanceledError:pN,isCancel:mN,CancelToken:hN,VERSION:gN,all:yN,Cancel:_N,isAxiosError:vN,spread:SN,toFormData:EN,AxiosHeaders:xN,HttpStatusCode:wN,formToJSON:kN,getAdapter:NN,mergeConfig:RN,create:CN}=oe,Ak="".trim(),Dk="/api",Ls=oe.create({baseURL:Ak||Dk});async function Lk(e){const t=new FormData;return t.append("file",e),(await Ls.post("/analyze/async",t,{headers:{"Content-Type":"multipart/form-data"}})).data}async function Fk(e){return(await Ls.get(`/analyze/${e}/status`)).data}async function Mk(e,t,n=1e3,r=12e4){const s=Date.now();for(;Date.now()-ssetTimeout(i,n))}throw new Error("Analysis timed out after "+r/1e3+" seconds")}async function Uk(){return(await Ls.get("/history")).data}async function $k(e){return(await Ls.get(`/history/${e}`)).data}async function zk(){return(await Ls.get("/detector/config")).data}function Bk(e){if(!e){alert("No PDF report available.");return}const t="".trim(),n=t?new URL(t,window.location.origin).origin:window.location.origin,r=e.startsWith("http")?e:`${n}${e}`,s=`VeriPaper_Report_${new Date().toISOString().split("T")[0]}.pdf`,o=document.createElement("a");o.href=r,o.download=s,document.body.appendChild(o),o.click(),document.body.removeChild(o)}function Hk(e){var a,l,u,c,d,h,_,v,E,w,f,p,g,S,N,R,T,I,W,L,G;const t=["Metric","Score","Details"],n=[["Overall Research Credibility",`${e.overall_research_credibility}%`,e.verdict_detail||""],["Plagiarism / Similarity",`${Math.round(((a=e.plagiarism)==null?void 0:a.score)??0)}%`,((l=e.plagiarism)==null?void 0:l.summary)||""],["AI-Generated Probability",`${Math.round(((u=e.ai_detection)==null?void 0:u.ai_probability)??0)}%`,`Confidence: ${((c=e.ai_detection)==null?void 0:c.confidence)||""}`],["Citation Validity",`${Math.round(((d=e.citation)==null?void 0:d.validity_score)??0)}%`,((h=e.citation)==null?void 0:h.summary)||""],["Statistical Risk",`${Math.round(((_=e.statistics)==null?void 0:_.risk_score)??0)}%`,((v=e.statistics)==null?void 0:v.summary)||""],["Writing Standards",`${Math.round(((E=e.writing)==null?void 0:E.score)??0)}%`,((w=e.writing)==null?void 0:w.grade)||""],["","",""],["Word Count",e.word_count||"",""],["Sections Detected",e.section_count||"",""],["Duplicate Paragraphs (self-plagiarism)",((f=e.plagiarism)==null?void 0:f.duplicate_paragraphs)??0,""],["Valid DOIs",((p=e.citation)==null?void 0:p.valid_dois)??0,`of ${((g=e.citation)==null?void 0:g.total_dois)??0} total`],["Invalid DOIs Found",(((S=e.citation)==null?void 0:S.invalid_dois)||[]).length,(((N=e.citation)==null?void 0:N.invalid_dois)||[]).join("; ")],["Top Plagiarism Match",(I=(T=(R=e.plagiarism)==null?void 0:R.matches)==null?void 0:T[0])!=null&&I.similarity?`${Math.round(e.plagiarism.matches[0].similarity)}%`:"N/A",((G=(L=(W=e.plagiarism)==null?void 0:W.matches)==null?void 0:L[0])==null?void 0:G.title)||""]],r=[t.join(","),...n.map(Te=>Te.map(De=>`"${String(De).replace(/"/g,'""')}"`).join(","))].join(` +`),s=`VeriPaper_Analysis_${new Date().toISOString().split("T")[0]}.csv`,o=new Blob([r],{type:"text/csv;charset=utf-8;"}),i=document.createElement("a");i.href=URL.createObjectURL(o),i.download=s,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(i.href)}function Wk(e){const t=`VeriPaper_Analysis_${new Date().toISOString().split("T")[0]}.json`,n=JSON.stringify(e,null,2),r=new Blob([n],{type:"application/json;charset=utf-8;"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(s.href)}function Vk(e){try{const t=Qg(),r=[{...e,timestamp:new Date().toISOString(),id:`analysis_${Date.now()}`},...t].slice(0,10);localStorage.setItem("veripaper_history",JSON.stringify(r))}catch(t){console.error("Failed to save history:",t)}}function Qg(){try{const e=localStorage.getItem("veripaper_history");if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return console.error("Failed to parse history:",e),[]}}class qk extends Y.Component{constructor(t){super(t),this.state={err:null}}static getDerivedStateFromError(t){return{err:t}}render(){return this.state.err?(this.props.fallback||(()=>null))(this.state.err):this.props.children}}const Gk={Credible:{badge:"bg-emerald-100 text-emerald-800 border-emerald-200",title:"Looks Credible",desc:"This paper passes the checks well. It can move forward in review, keeping in mind these are likelihood signals, not proof."},"Needs review":{badge:"bg-amber-100 text-amber-800 border-amber-200",title:"Needs Review",desc:"Some checks raised mild concerns. A human reviewer should look at the flagged sections before accepting."},"High risk":{badge:"bg-red-100 text-red-800 border-red-200",title:"High Risk Signals",desc:"Strong integrity concerns were detected. Prioritize manual investigation of the flagged issues."}};function Qk(e){return Gk[e]||{badge:"bg-slate-100 text-slate-700 border-slate-200",title:e||"Pending",desc:"Analysis complete."}}function Kg(e,t=!1){const n=t?100-e:e;return n<30?{text:"Low concern",cls:"text-emerald-700",bar:"bg-emerald-500"}:n<60?{text:"Moderate",cls:"text-amber-700",bar:"bg-amber-500"}:{text:"High concern",cls:"text-red-700",bar:"bg-red-500"}}const io={plagiarism:"Similarity & Plagiarism",ai_detection:"AI-Written Content",citation:"Citation Authenticity",statistics:"Statistical Integrity",writing:"Writing & Standards",provenance:"Provenance Chain Verification"},Dd={plagiarism:"Compares your paper against an indexed corpus of 2,500+ open-access abstracts (semantic similarity) and scans for duplicated text between the paper's own sections. Higher score = more overlap found.",ai_detection:"A fine-tuned DistilBERT model, trained on 3,600 real arXiv abstracts versus controlled AI rewrites, estimates the probability that the text was generated by an AI. Higher = more AI-like.",citation:"Every DOI is checked live against the CrossRef registry. Missing or invalid DOIs reduce the score, because fabricated references are a common integrity red flag.",statistics:"Looks for unrealistic numeric patterns — suspiciously clean p-values, round percentages, and implausible results — that often appear in manipulated reporting.",writing:"Checks the paper against academic conventions: required sections, formal tone, consistent citation style, citation-text linkage, figure/table references, and heading hierarchy.",provenance:"VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Web-source attribution runs against live web search at zero cost (no API key required)."};function Kk({score:e,size:t=96}){const n=(t-12)/2,r=2*Math.PI*n,s=r*(1-Math.min(100,Math.max(0,e))/100);return m.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:t,height:t},children:[m.jsxs("svg",{width:t,height:t,className:"-rotate-90",children:[m.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:"#e2e8f0",strokeWidth:8}),m.jsx("circle",{cx:t/2,cy:t/2,r:n,fill:"none",stroke:e>=70?"#10b981":e>=45?"#f59e0b":"#ef4444",strokeWidth:8,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:s,style:{transition:"stroke-dashoffset 0.8s ease"}})]}),m.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[m.jsx("span",{className:"text-xl font-bold text-slate-900",children:Math.round(e)}),m.jsx("span",{className:"text-[10px] uppercase tracking-wide text-slate-500",children:"/ 100"})]})]})}function Xk({value:e,color:t="bg-blue-500"}){return m.jsx("div",{className:"w-full h-1.5 bg-slate-200 rounded-full overflow-hidden",children:m.jsx("div",{className:`h-full rounded-full ${t}`,style:{width:`${Math.min(100,Math.max(0,e))}%`}})})}function Yk({data:e}){return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Corpus matches"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.matches.length})]}),m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Repeated paragraphs"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.duplicate_paragraphs})]})]}),e.matches.length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Matched sources"}),m.jsx("div",{className:"space-y-2",children:e.matches.map((t,n)=>m.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[m.jsx("p",{className:"font-medium text-slate-900 text-sm",children:t.title}),m.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[Math.round(t.similarity),"% similar · ",t.source]}),m.jsxs("p",{className:"text-xs text-slate-600 mt-2 italic",children:['"',t.matched_text,'"']})]},n))})]}),e.matches.length===0&&m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"No significant similarity to the indexed open corpus. Note: free-tier analysis checks a representative corpus of open-access literature, not the whole internet."})]})}function Jk({data:e}){const t=e.ai_probability<38,n=e.ai_probability>62;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:t?"The text shows natural human writing patterns — varied sentence structure and organic rhythm that AI generators rarely reproduce.":n?"The text shows strong AI-like regularity: unusually uniform sentence lengths, dense hedging phrases, and templated argument flow.":"Signals are mixed. The model cannot decide confidently — common for well-edited human text or lightly AI-assisted drafts."}),m.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"Engine:"})," ",e.engine==="transformer_finetuned"?"Fine-tuned transformer (DistilBERT)":e.engine]}),m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"Trained on:"})," 3,600 real arXiv abstracts vs. controlled AI rewrites"]}),m.jsxs("p",{children:[m.jsx("span",{className:"font-semibold",children:"What it means:"})," this is a probability, not proof. Always treat as one signal among many."]})]})]})}function Zk({data:e}){var t,n;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Total DOIs"}),m.jsx("p",{className:"text-2xl font-bold text-slate-900",children:e.total_dois})]}),m.jsxs("div",{className:"card bg-emerald-50 border-emerald-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-emerald-700",children:"Verified"}),m.jsx("p",{className:"text-2xl font-bold text-emerald-800",children:e.valid_dois})]}),m.jsxs("div",{className:"card bg-red-50 border-red-200",children:[m.jsx("p",{className:"text-xs uppercase tracking-wide text-red-700",children:"Invalid / missing"}),m.jsx("p",{className:"text-2xl font-bold text-red-800",children:(((t=e.invalid_dois)==null?void 0:t.length)||0)+e.references_without_doi})]})]}),((n=e.verified_dois)==null?void 0:n.length)>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Reference-by-reference"}),m.jsx("div",{className:"space-y-2",children:e.verified_dois.map((r,s)=>m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${r.valid?"bg-emerald-50 border-emerald-200":"bg-red-50 border-red-200"}`,children:[m.jsx("p",{className:"font-medium text-slate-900",children:r.doi}),r.title&&m.jsxs("p",{className:"text-slate-600 mt-1",children:[r.title,r.year?` (${r.year})`:""]}),m.jsx("p",{className:r.valid?"text-emerald-700":"text-red-700",children:r.valid?"✓ Exists in CrossRef":"✗ Not found in CrossRef — verify the source"})]},s))})]})]})}function eN({data:e}){var t;return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),((t=e.findings)==null?void 0:t.length)>0?m.jsx("div",{className:"space-y-2",children:e.findings.map((n,r)=>m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${n.severity==="high"?"bg-red-50 border-red-200":n.severity==="medium"?"bg-amber-50 border-amber-200":"bg-slate-50 border-slate-200"}`,children:[m.jsxs("p",{className:"font-semibold text-slate-900",children:[n.category," ",m.jsxs("span",{className:"font-normal text-slate-500",children:["· ",n.severity]})]}),m.jsx("p",{className:"text-slate-600 mt-1",children:n.detail})]},r))}):m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"No suspicious numeric patterns detected in the reported results."})]})}function tN({data:e}){var n,r,s;if(!e)return m.jsx("p",{className:"text-sm text-slate-500",children:"Provenance data is not available for this analysis."});const t=({label:o,value:i,goodHigh:a,noteKey:l}={})=>{const u=typeof i=="number"?i:0,c=a?100-u:u,{text:d,cls:h,bar:_}=Kg(c);return m.jsxs("div",{className:"card bg-slate-50 border-slate-200",children:[m.jsx("p",{className:"text-[11px] uppercase tracking-wide text-slate-500",children:o}),m.jsx("p",{className:"text-xl font-bold mt-1",children:Math.round(u)}),m.jsx("div",{className:"h-1.5 w-full bg-slate-200 rounded-full mt-1.5 overflow-hidden",children:m.jsx("div",{className:`h-full rounded-full ${_}`,style:{width:`${Math.min(100,Math.max(0,u))}%`}})}),m.jsx("p",{className:`text-[11px] mt-1.5 ${h}`,children:d}),l&&m.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:l})]})};return m.jsxs("div",{className:"space-y-4",children:[m.jsx("p",{className:"text-sm text-slate-600",children:e.summary}),m.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[t({label:"Retraction contamination",value:e.contamination_score,goodHigh:!1}),t({label:"Citation-graph coherence",value:e.graph_anomaly_score,goodHigh:!1}),t({label:"Claim–citation alignment",value:e.alignment_score,goodHigh:!0}),t({label:"Statistical forensics",value:e.fingerprint_score,goodHigh:!0})]}),(((n=e.retracted_dois)==null?void 0:n.length)||0)>0&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("p",{className:"text-xs font-semibold text-red-700 uppercase tracking-wide",children:"⚠ Cited retracted research"}),e.retracted_dois.map((o,i)=>m.jsxs("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg text-xs",children:[m.jsx("p",{className:"font-medium text-slate-900",children:o.doi||"Unknown DOI"}),o.retraction_date&&m.jsxs("p",{className:"text-slate-600 mt-0.5",children:["Retracted ",o.retraction_date]}),o.notice_type&&m.jsxs("p",{className:"text-slate-500 mt-0.5",children:["Notice: ",o.notice_type]}),o.reason&&m.jsx("p",{className:"text-red-700 mt-0.5",children:o.reason})]},i))]}),(((r=e.alignment_verdicts)==null?void 0:r.length)||0)>0&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:"Claim-by-claim alignment"}),e.alignment_verdicts.map((o,i)=>{const a=o.alignment==="aligned",l=o.alignment==="weak";return m.jsxs("div",{className:`p-3 rounded-lg border text-xs ${a?"bg-emerald-50 border-emerald-200":l?"bg-amber-50 border-amber-200":"bg-red-50 border-red-200"}`,children:[m.jsxs("p",{className:"font-medium text-slate-900 break-all",children:[o.doi||"Referenced claim"," ",m.jsx("span",{className:`ml-2 font-semibold ${a?"text-emerald-700":"text-amber-700"}`,children:a?"✓ Aligned":l?"⚠ Weak":"✗ Unsupported"})]}),o.reason&&m.jsx("p",{className:"text-slate-600 mt-1",children:o.reason}),typeof o.overlap=="number"&&m.jsxs("p",{className:"text-slate-500 mt-1",children:["Lexical overlap with cited abstract: ",Math.round(o.overlap*100),"%"]})]},i)})]}),e.web_summary&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:["Web source attribution · ",e.web_provider?e.web_provider.charAt(0).toUpperCase()+e.web_provider.slice(1):"unavailable"]}),e.web_available?(((s=e.web_matches)==null?void 0:s.length)||0)>0?m.jsx("div",{className:"space-y-2",children:e.web_matches.map((o,i)=>m.jsxs("div",{className:"p-3 bg-slate-50 border border-slate-200 rounded-lg text-xs",children:[m.jsx("p",{className:"font-semibold text-slate-900 truncate",children:o.title?m.jsx("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",className:"underline",children:o.title}):o.url}),o.snippet&&m.jsx("p",{className:"text-slate-600 mt-1 line-clamp-2",children:o.snippet}),m.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[m.jsx("div",{className:"h-1.5 flex-1 bg-slate-200 rounded-full overflow-hidden",children:m.jsx("div",{className:"h-full bg-indigo-500 rounded-full",style:{width:`${Math.min(100,Math.max(0,o.similarity||0))}%`}})}),m.jsxs("span",{className:"text-slate-500",children:[Math.round(o.similarity||0),"%"]})]})]},i))}):m.jsxs("p",{className:"text-xs text-emerald-700 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:["✓ Checked the live web (",e.web_provider||"search",") — no close matches for the flagged text."]}):m.jsx("p",{className:"text-xs text-slate-500 bg-slate-50 border border-slate-200 rounded-lg p-3",children:e.web_summary})]})]})}function nN({data:e}){return m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"flex flex-wrap gap-2",children:(e.checks||[]).map((t,n)=>m.jsxs("span",{className:`text-xs px-2.5 py-1 rounded-full border ${t.passed?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-amber-50 text-amber-700 border-amber-200"}`,children:[t.passed?"✓":"⚠"," ",t.name]},n))}),m.jsxs("div",{className:"space-y-3",children:[(e.checks||[]).filter(t=>!t.passed).map((t,n)=>{var r;return m.jsxs("div",{className:"p-3 bg-amber-50 border border-amber-200 rounded-lg",children:[m.jsx("p",{className:"text-sm font-semibold text-amber-900",children:t.name}),m.jsx("p",{className:"text-xs text-amber-800 mt-1",children:t.detail}),((r=t.suggestions)==null?void 0:r.length)>0&&m.jsxs("p",{className:"text-xs text-amber-700 mt-1",children:[m.jsx("span",{className:"font-semibold",children:"Fix:"})," ",t.suggestions[0]]})]},n)}),(e.checks||[]).filter(t=>!t.passed).length===0&&m.jsx("p",{className:"text-xs text-slate-500 bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:"All writing-standards checks passed."})]}),Object.keys(e.section_map||{}).length>0&&m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Detected structure"}),m.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.values(e.section_map).map((t,n)=>m.jsx("span",{className:"text-[11px] px-2 py-0.5 bg-slate-100 text-slate-600 rounded",children:t},n))})]})]})}function rN(e){const t=(n,r=0)=>typeof n=="number"&&Number.isFinite(n)?n:r;return{id:e.id,filename:e.filename,word_count:e.word_count,section_count:0,sections:[],overall_research_credibility:t(e.overall_research_credibility),verdict:e.verdict,report_path:e.report_path,analyzed_at:e.analyzed_at,action_items:[],risk_triggers:[],plagiarism:{score:t(e.plagiarism_score),summary:"Replay of a stored analysis — detailed source matches are not kept after the original scan completes (papers are never permanently stored).",matches:[],duplicate_paragraphs:0},ai_detection:{ai_probability:t(e.ai_probability),confidence:e.ai_confidence,engine:e.ai_engine},citation:{validity_score:t(e.citation_validity_score),summary:"Replay of a stored analysis — per-reference details are not kept after the original scan completes.",total_dois:0,valid_dois:0,invalid_dois:[],references_without_doi:0,verified_dois:[]},statistics:{risk_score:100-t(e.statistical_risk_score),summary:"Replay of a stored analysis — numeric findings are not kept after the original scan completes.",findings:[]},writing:{score:t(e.writing_quality_score),checks:[]},provenance:sN(e)}}function sN(e){const t=(r,s)=>typeof r=="number"&&Number.isFinite(r)?r:s,n=e.provenance_details||{};return e.provenance_score==null&&!n?null:{score:t(e.provenance_score,50),summary:n.summary||"Replay of a stored analysis — detailed provenance evidence is not kept after the original scan completes.",contamination_score:n.contamination_score??t(e.retraction_contamination_score,50),graph_anomaly_score:n.graph_anomaly_score??t(e.citation_graph_anomaly_score,50),alignment_score:n.alignment_score??t(e.claim_alignment_score,50),fingerprint_score:n.fingerprint_score??t(e.methodology_fingerprint_score,50),contamination_summary:n.contamination_summary||"",retracted_dois:n.retracted_dois||[],alignment_verdicts:n.alignment_verdicts||[],fingerprint_notes:n.fingerprint_notes||{},graph_density:n.graph_density||0,isolated_references:n.isolated_references||0,web_matches:n.web_matches||[],web_summary:n.web_summary||"",web_available:n.web_available===!0,web_provider:n.web_provider||""}}function oN(){var De,ye,_t,Ve;const[e,t]=Y.useState(null),[n,r]=Y.useState(!1),[s,o]=Y.useState(0),[i,a]=Y.useState(null),[l,u]=Y.useState(""),[c,d]=Y.useState("ai_detection"),[h,_]=Y.useState(null),[v,E]=Y.useState([]),[w]=Y.useState(Qg()),[f,p]=Y.useState(!1),[g,S]=Y.useState(""),[N,R]=Y.useState(!1),T=()=>m.jsxs("div",{className:"p-6 text-center",children:[m.jsx("p",{className:"text-sm font-medium text-slate-900",children:"This detail could not be shown"}),m.jsx("p",{className:"text-xs text-slate-500 mt-2 max-w-md mx-auto",children:"The detailed data for this older analysis is not kept on the server (papers are never stored). The overview scores above are still accurate — for a full replay, re-upload the paper."})]});Y.useEffect(()=>{zk().then(_).catch(()=>{}),Uk().then(P=>E(Array.isArray(P)?P:(P==null?void 0:P.results)??[])).catch(()=>{}),localStorage.getItem("veripaper_onboarded")||p(!0)},[]);const I=Y.useMemo(()=>{var P,x,b,j,D,U;return i?[{key:"plagiarism",score:((P=i.plagiarism)==null?void 0:P.score)??0,invert:!0},{key:"ai_detection",score:((x=i.ai_detection)==null?void 0:x.ai_probability)??0},{key:"citation",score:((b=i.citation)==null?void 0:b.validity_score)??0},{key:"statistics",score:100-(((j=i.statistics)==null?void 0:j.risk_score)??0),invert:!0},{key:"writing",score:((D=i.writing)==null?void 0:D.score)??0},{key:"provenance",score:((U=i.provenance)==null?void 0:U.score)??0}]:[]},[i]),W=Y.useMemo(()=>i?Qk(i.verdict):null,[i]),L=async P=>{if(P.preventDefault(),!e){u("Please select a paper first (PDF, DOCX or TXT).");return}if(e.size>15*1024*1024){u("File is larger than 15 MB.");return}u(""),r(!0),a(null),o(8);const x=[];try{o(10);const{task_id:b}=await Lk(e),D=(await Mk(b,U=>{U.status==="queued"?o(15):U.status==="processing"&&o(50)},800,12e4)).result;o(100),a(D),Vk(D),E(U=>[{id:`analysis_${Date.now()}`,filename:D.filename,analyzed_at:new Date().toISOString(),overall_research_credibility:D.overall_research_credibility,verdict:D.verdict},...U].slice(0,15)),d("ai_detection")}catch(b){u(G(b,"Analysis failed. Please try again."))}finally{x.forEach(clearTimeout),r(!1)}},G=(P,x)=>{var j,D;const b=((D=(j=P==null?void 0:P.response)==null?void 0:j.data)==null?void 0:D.detail)??(P==null?void 0:P.message)??x;if(typeof b=="string")return b;if(Array.isArray(b)){const U=b[0];return U&&typeof U.msg=="string"?U.msg:String(b[0]??x)}return b&&typeof b.msg=="string"?b.msg:b&&typeof b.detail=="string"?b.detail:x},Te=async P=>{u(""),S("");const x=Number(P.id);if(!Number.isFinite(x)){S("This entry was saved in your browser only — re-upload the paper for a fresh verification.");return}R(!0);try{const b=await $k(x);a(rN(b)),d("ai_detection")}catch(b){S(G(b,"Could not open this analysis. Re-upload the paper for a fresh verification."))}finally{R(!1)}};return m.jsxs("div",{className:"min-h-screen bg-slate-50",children:[m.jsx("header",{className:"sticky top-0 z-40 bg-white/90 backdrop-blur border-b border-slate-200",children:m.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-600 to-indigo-700 text-white font-bold flex items-center justify-center",children:"V"}),m.jsxs("div",{children:[m.jsx("p",{className:"font-bold text-slate-900 leading-tight",children:"VeriPaper"}),m.jsx("p",{className:"text-[11px] text-slate-500 leading-tight",children:"Research Verification Suite"})]})]}),m.jsxs("nav",{className:"hidden sm:flex items-center gap-1 text-sm",children:[m.jsx("a",{href:"#analyze",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"Analyze"}),m.jsx("a",{href:"#history",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"History"}),m.jsx("a",{href:"#method",className:"px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100",children:"How it works"})]})]})}),m.jsxs("main",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-8 space-y-8",children:[m.jsxs("section",{className:"text-center max-w-2xl mx-auto",children:[m.jsx("span",{className:"inline-block text-xs font-semibold px-3 py-1 rounded-full bg-blue-100 text-blue-700 mb-4",children:"✦ VeriPaper — the 6-in-1 integrity check"}),m.jsxs("h1",{className:"text-3xl sm:text-4xl font-black text-slate-900 tracking-tight",children:["Is your research paper really ",m.jsx("span",{className:"text-blue-600",children:"credible?"})]}),m.jsx("p",{className:"text-slate-600 mt-3",children:"One upload. Six checks: plagiarism, AI authorship, citation authenticity, statistical integrity, academic writing standards, and provenance-chain verification — every result explained in plain language."})]}),m.jsx("section",{id:"analyze",className:"card bg-white border border-slate-200 shadow-sm",children:m.jsxs("form",{onSubmit:L,className:"space-y-4",children:[m.jsxs("label",{className:"flex flex-col items-center justify-center border-2 border-dashed border-slate-300 rounded-xl p-8 text-center cursor-pointer hover:border-blue-500 hover:bg-blue-50/40 transition-colors",children:[m.jsx("input",{type:"file",accept:".pdf,.docx,.txt",className:"hidden",onChange:P=>{var x;return t(((x=P.target.files)==null?void 0:x[0])||null)}}),m.jsx("span",{className:"text-3xl",children:"📄"}),m.jsx("p",{className:"font-semibold text-slate-900 mt-2 text-sm break-all",children:e?e.name:"Drop your paper here, or click to browse"}),m.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"PDF, DOCX, or TXT · max 15 MB · processed privately, never shared"})]}),l&&m.jsxs("p",{className:"text-xs font-medium text-red-700 bg-red-50 border border-red-200 rounded-lg p-3",children:["⚠ ",l]}),n&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex justify-between text-xs text-slate-600",children:[m.jsx("span",{children:"Analyzing… (parsing · AI model · similarity corpus · CrossRef)"}),m.jsxs("span",{children:[Math.round(s),"%"]})]}),m.jsx(Xk,{value:s,color:"bg-blue-500"})]}),m.jsx("button",{type:"submit",disabled:n||!e,className:"w-full btn-primary disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Analyzing…":"Run Full Verification"})]})}),i&&m.jsxs("section",{className:"space-y-6",children:[m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[m.jsx(Kk,{score:i.overall_research_credibility,size:110}),m.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[m.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500 font-semibold mb-1",children:"Overall credibility"}),m.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:W.title}),m.jsx("p",{className:"text-sm text-slate-600 mt-2 max-w-xl",children:W.desc}),m.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 justify-center sm:justify-start",children:[m.jsx("span",{className:`text-xs px-2.5 py-1 rounded-full border font-medium ${W.badge}`,children:i.verdict}),m.jsxs("span",{className:"text-xs px-2.5 py-1 rounded-full bg-slate-100 text-slate-600",children:[i.word_count," words · ",i.section_count," sections · ",i.filename]})]})]})]}),(((De=i.action_items)==null?void 0:De.length)>0||((ye=i.risk_triggers)==null?void 0:ye.length)>0)&&m.jsxs("div",{className:"mt-5 border-t border-slate-100 pt-4",children:[m.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide mb-2",children:"Recommended next steps"}),m.jsx("ol",{className:"space-y-1.5",children:i.action_items.map((P,x)=>m.jsxs("li",{className:"flex gap-2 text-sm text-slate-700",children:[m.jsxs("span",{className:"font-semibold text-blue-600",children:[x+1,"."]})," ",P]},x))})]})]}),m.jsx("div",{className:"grid grid-cols-5 gap-2",children:I.map(P=>{const x=Kg(P.score),b=c===P.key;return m.jsxs("button",{onClick:()=>d(P.key),className:`card text-center py-3 px-1 border transition-colors ${b?"border-blue-500 ring-1 ring-blue-500 bg-blue-50/40":"bg-white border-slate-200 hover:border-slate-300"}`,children:[m.jsx("p",{className:"text-[11px] font-semibold text-slate-500 leading-tight",children:io[P.key]}),m.jsx("p",{className:`text-lg font-bold leading-tight mt-1 ${x.cls}`,children:Math.round(P.score)}),m.jsx("p",{className:`text-[10px] leading-tight mt-0.5 ${x.cls}`,children:x.text})]},P.key)})}),m.jsx(qk,{fallback:T,children:m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-3 border-b border-slate-100 pb-4 mb-4",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"font-bold text-slate-900",children:io[c]}),m.jsx("p",{className:"text-xs text-slate-500 mt-1 max-w-xl",children:Dd[c]})]}),m.jsxs("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:[c==="statistics"?"Integrity: ":c==="citation"||c==="writing"||c==="provenance"?"Score: ":"Risk: ",Math.round(I.find(P=>P.key===c).score)," / 100"]})]}),c==="plagiarism"&&m.jsx(Yk,{data:i.plagiarism}),c==="ai_detection"&&m.jsx(Jk,{data:i.ai_detection}),c==="citation"&&m.jsx(Zk,{data:i.citation}),c==="statistics"&&m.jsx(eN,{data:i.statistics}),c==="writing"&&m.jsx(nN,{data:i.writing}),c==="provenance"&&m.jsx(tN,{data:i.provenance})]})}),m.jsxs("div",{className:"grid lg:grid-cols-[1fr_320px] gap-6",children:[m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsx("h3",{className:"font-bold text-slate-900 mb-3 text-sm",children:"Detected structure"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:i.sections.map((P,x)=>m.jsxs("div",{className:"text-xs px-2.5 py-1.5 bg-slate-50 border border-slate-200 rounded-lg",children:[m.jsx("span",{className:"font-medium text-slate-800",children:P.heading}),m.jsxs("span",{className:"text-slate-500",children:[" · ",P.word_count,"w"]})]},x))})]}),m.jsxs("div",{className:"card bg-white border border-slate-200 shadow-sm space-y-3",children:[m.jsx("h3",{className:"font-bold text-slate-900 text-sm",children:"Export evidence"}),m.jsx("button",{onClick:()=>Bk(i.report_path),className:"btn-primary w-full text-sm",children:"📥 PDF Report"}),m.jsx("button",{onClick:()=>Hk(i),className:"btn-secondary w-full text-sm",children:"CSV Export"}),m.jsx("button",{onClick:()=>Wk(i),className:"btn-secondary w-full text-sm",children:"JSON Export"})]})]})]}),m.jsxs("section",{id:"history",className:"card bg-white border border-slate-200 shadow-sm",children:[m.jsx("h3",{className:"font-bold text-slate-900 mb-4",children:"Analysis history"}),v.length===0?m.jsx("p",{className:"text-sm text-slate-500 py-8 text-center",children:"No analyses yet — your first verification will appear here."}):m.jsx("div",{className:"space-y-2",children:v.map((P,x)=>m.jsxs("button",{onClick:()=>Te(P),className:"w-full text-left flex items-center justify-between p-3 bg-slate-50 rounded-lg border border-slate-200 hover:border-blue-300 hover:bg-blue-50 transition-colors disabled:opacity-60",disabled:N,children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium text-slate-900",children:P.filename}),m.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:new Date(P.analyzed_at).toLocaleString()})]}),m.jsxs("span",{className:"text-xs font-semibold text-slate-600",children:[Math.round(P.overall_research_credibility),"% · ",P.verdict]})]},P.id||x))}),g&&m.jsx("p",{className:"text-xs text-red-600 bg-red-50 border border-red-200 rounded-lg p-3 mt-3",children:g}),N&&m.jsx("p",{className:"text-xs text-slate-500 mt-3",children:"Opening previous analysis…"}),w.length>0&&m.jsxs("p",{className:"text-[11px] text-slate-400 mt-3",children:["Also saved locally in this browser (",w.length," entries)."]})]}),m.jsxs("section",{id:"method",className:"space-y-4",children:[m.jsx("h3",{className:"font-bold text-slate-900 text-lg",children:"How VeriPaper verifies a paper"}),m.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:Object.entries(Dd).map(([P,x])=>m.jsxs("div",{className:"card bg-white border border-slate-200",children:[m.jsx("p",{className:"text-sm font-bold text-slate-900",children:io[P]}),m.jsx("p",{className:"text-xs text-slate-600 mt-2 leading-relaxed",children:x})]},P))}),m.jsxs("div",{className:"card bg-amber-50 border border-amber-200 text-xs text-amber-800 p-4",children:[m.jsx("span",{className:"font-semibold",children:"Important:"})," every score is a likelihood signal generated by statistical models — not legal proof of misconduct. Use VeriPaper to triage and prioritize manual review, never as the sole basis for an accusation."]})]})]}),m.jsx("footer",{className:"border-t border-slate-200 bg-white py-8 mt-8",children:m.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 flex flex-col sm:flex-row items-center justify-between gap-3 text-xs text-slate-500",children:[m.jsx("p",{children:"© 2026 VeriPaper — Research Verification Suite"}),(h==null?void 0:h.ai_detection)&&m.jsxs("p",{children:["AI model: ",((_t=h.ai_detection.model_version)==null?void 0:_t.split("/").pop())||h.ai_detection.model_version," (validation F1 ",(Ve=h.ai_detection.metrics)==null?void 0:Ve.f1,")"]})]})}),f&&m.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>{p(!1),localStorage.setItem("veripaper_onboarded","1")},children:m.jsxs("div",{className:"bg-white rounded-2xl shadow-xl max-w-md w-full p-6",onClick:P=>P.stopPropagation(),children:[m.jsx("h3",{className:"text-lg font-bold text-slate-900",children:"Welcome to VeriPaper 👋"}),m.jsx("p",{className:"text-sm text-slate-600 mt-2",children:"Upload any research paper (PDF/DOCX/TXT) and we'll check five things at once:"}),m.jsx("ul",{className:"mt-3 space-y-1.5 text-sm text-slate-700",children:Object.values(io).map((P,x)=>m.jsxs("li",{className:"flex gap-2",children:[m.jsxs("span",{className:"text-blue-600 font-bold",children:[x+1,"."]})," ",P]},x))}),m.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"Scores are signals to guide review — not proof."}),m.jsx("button",{onClick:()=>{p(!1),localStorage.setItem("veripaper_onboarded","1")},className:"btn-primary w-full mt-4",children:"Got it — start analyzing"})]})})]})}ya.createRoot(document.getElementById("root")).render(m.jsx(my.StrictMode,{children:m.jsx(ww.ErrorBoundary,{fallback:m.jsx(iN,{}),children:m.jsx(oN,{})})}));function iN({error:e}){return m.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center p-6",children:m.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl p-8 max-w-md text-center",children:[m.jsx("h1",{className:"text-xl font-bold text-white mb-2",children:"Something went wrong"}),m.jsx("p",{className:"text-slate-300 mb-6 text-sm",children:"VeriPaper hit an unexpected error and we have already reported it. Try refreshing the page — your analysis history is saved locally."}),m.jsx("button",{onClick:()=>window.location.reload(),className:"px-5 py-2 rounded-lg bg-violet-600 hover:bg-violet-500 text-white text-sm font-medium transition-colors",children:"Refresh page"})]})})} diff --git a/frontend/dist/dist/assets/index-DO6YDTte.css b/frontend/dist/dist/assets/index-DO6YDTte.css new file mode 100644 index 00000000..b209e25e --- /dev/null +++ b/frontend/dist/dist/assets/index-DO6YDTte.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.btn-primary{cursor:pointer;border-radius:.5rem;border-style:none;padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}.btn-primary:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-primary:active{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){.btn-primary{padding:.75rem 1.5rem}}.btn-primary{background:var(--gradient-primary)}.btn-primary:hover:not(:disabled){--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));box-shadow:0 12px 24px #3b82f64d}.btn-primary:active:not(:disabled){--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.btn-secondary{border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.btn-secondary:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.btn-secondary:active{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.btn-secondary{padding:.75rem 1.5rem}}.btn-secondary:hover:not(:disabled){--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.card{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:1.5rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.card:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateY(-2px)}.card-elevated{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:1.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}@media (min-width: 640px){.card-elevated{padding:2rem}}.input{width:100%;border-radius:.5rem;border-width:2px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:.75rem 1rem;font-size:.875rem;line-height:1.25rem}.input::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(148 163 184 / var(--tw-placeholder-opacity, 1))}.input::placeholder{--tw-placeholder-opacity: 1;color:rgb(148 163 184 / var(--tw-placeholder-opacity, 1))}.input{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1));outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity, 1))}.input:disabled{cursor:not-allowed;--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input::-moz-placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.input::placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}textarea.input{resize:both;min-height:100px}select.input{cursor:pointer}.badge{display:inline-flex;align-items:center;gap:.375rem;border-radius:9999px;padding:.25rem .75rem;font-size:.75rem;line-height:1rem;font-weight:600}code{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1));padding:.25rem .5rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}pre{overflow-x:auto;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1));padding:1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-2{margin-left:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-16{height:4rem}.h-9{height:2.25rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-9{width:2.25rem}.w-full{width:100%}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50\/40{background-color:#eff6ff66}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-violet-600{--tw-bg-opacity: 1;background-color:rgb(124 58 237 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/90{background-color:#ffffffe6}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-600{--tw-gradient-from: #2563eb var(--tw-gradient-from-position);--tw-gradient-to: rgb(37 99 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-indigo-700{--tw-gradient-to: #4338ca var(--tw-gradient-to-position)}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-4{padding-bottom:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}:root{--primary: #3b82f6;--primary-dark: #1e40af;--primary-light: #60a5fa;--success: #10b981;--success-light: #d1fae5;--warning: #f59e0b;--warning-light: #fef3c7;--error: #ef4444;--error-light: #fee2e2;--slate-50: #f8fafc;--slate-100: #f1f5f9;--slate-200: #e2e8f0;--slate-300: #cbd5e1;--slate-400: #94a3b8;--slate-500: #64748b;--slate-600: #475569;--slate-700: #334155;--slate-900: #0f172a;--gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);--gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);--gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);--gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);--gradient-soft: linear-gradient(135deg, #f0f4ff 0%, #f5f3ff 100%)}*{margin:0;padding:0;box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.6}@keyframes fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@keyframes slideDown{0%{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:translateY(0)}}@keyframes pulseSoft{0%,to{opacity:1}50%{opacity:.6}}@keyframes bounceSoft{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}::-webkit-scrollbar-thumb{-webkit-transition:background-color .2s ease;transition:background-color .2s ease}.section-container{margin-left:auto;margin-right:auto;max-width:80rem;padding:3rem 1rem}@media (min-width: 640px){.section-container{padding:4rem 1.5rem}}@media (min-width: 1024px){.section-container{padding-top:5rem;padding-bottom:5rem}}.section-title{font-size:1.875rem;line-height:2.25rem;font-weight:700;letter-spacing:-.025em;--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.section-title{font-size:2.25rem;line-height:2.5rem}}.section-subtitle{margin-top:.5rem;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.grid-auto{display:grid;grid-auto-rows:max-content;gap:1.5rem}@media (min-width: 640px){.grid-auto{gap:2rem}}.text-gradient{background:var(--gradient-primary);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.text-muted{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-small{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.border-light{border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.shadow-subtle{box-shadow:0 1px 3px #0000000d,0 1px 2px #00000008}.shadow-soft{box-shadow:0 4px 6px #00000012,0 2px 4px #0000000d}.shadow-medium{box-shadow:0 10px 15px #0000001a,0 4px 6px #0000000d}@media (max-width: 640px){.section-title{font-size:1.5rem;line-height:2rem}.section-subtitle{font-size:1rem;line-height:1.5rem}}@media print{.no-print{display:none}}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\:border-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50\/40:hover{background-color:#eff6ff66}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-violet-500:hover{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (min-width: 640px){.sm\:flex{display:flex}.sm\:flex-row{flex-direction:row}.sm\:justify-start{justify-content:flex-start}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[1fr_320px\]{grid-template-columns:1fr 320px}}@media (prefers-color-scheme: dark){.dark\:fill-slate-800{fill:#1e293b}.dark\:text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}} diff --git a/backend/frontend/dist/assets/index-b0KDUZRf.js b/frontend/dist/dist/assets/index-b0KDUZRf.js similarity index 100% rename from backend/frontend/dist/assets/index-b0KDUZRf.js rename to frontend/dist/dist/assets/index-b0KDUZRf.js diff --git a/frontend/dist/dist/index.html b/frontend/dist/dist/index.html new file mode 100644 index 00000000..6778f640 --- /dev/null +++ b/frontend/dist/dist/index.html @@ -0,0 +1,14 @@ + + + + + + VeriPaper — Research Paper Verification Suite + + + + + +
+ + diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 5bbde870..93c9f823 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -55,7 +55,7 @@ const MODULE_EXPLAIN = { citation: "Every DOI is checked live against the CrossRef registry. Missing or invalid DOIs reduce the score, because fabricated references are a common integrity red flag.", statistics: "Looks for unrealistic numeric patterns — suspiciously clean p-values, round percentages, and implausible results — that often appear in manipulated reporting.", writing: "Checks the paper against academic conventions: required sections, formal tone, consistent citation style, citation-text linkage, figure/table references, and heading hierarchy.", - provenance: "VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Optional web-source attribution needs a BRAVE_API_KEY on the server.", + provenance: "VeriPaper's flagship check: traces every claim to its cited origin and stress-tests the evidence base. It blends retraction-contamination tracing (live against Retraction Watch via CrossRef), citation-graph coherence, claim-to-citation alignment, and statistical forensics (Benford's law, p-curve, impossible-precision detection). Web-source attribution runs against live web search at zero cost (no API key required).", }; function GradeGauge({ score, size = 96 }) { @@ -271,7 +271,7 @@ function ProvenancePanel({ data }) { )} {data.web_summary && (
-

Web source attribution {data.web_available ? "" : "(not configured)"}

+

Web source attribution · {data.web_provider ? data.web_provider.charAt(0).toUpperCase() + data.web_provider.slice(1) : "unavailable"}

{data.web_available ? ( (data.web_matches?.length || 0) > 0 ? (
@@ -291,7 +291,7 @@ function ProvenancePanel({ data }) { ))}
) : ( -

✓ No matching sources found on the open web.

+

✓ Checked the live web ({data.web_provider || "search"}) — no close matches for the flagged text.

) ) : (

{data.web_summary}

@@ -418,6 +418,7 @@ function buildReplayProvenance(record) { web_matches: details.web_matches || [], web_summary: details.web_summary || "", web_available: details.web_available === true, + web_provider: details.web_provider || "", }; }