PageSourceSearch

https://matchups.ai/assets/index-BmE33H0E.js

js matchups.ai collected 2026-10-05 13:38:53 UTC 898,638 bytes, 462 lines download raw bytes

vendor: 5,878 bytes, lines 1-18
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SubscriptionShop-D6r8vGYG.js","assets/mail-OPpyLLCG.js","assets/smartphone-ColKZN89.js","assets/settings-DXv-9aDd.js","assets/rotate-ccw-BjGNDDaY.js","assets/History-Bi873EcP.js","assets/shield-check-Dlejaf0z.js","assets/coins-CvGnrxXR.js","assets/chevron-right-BqtnimQS.js","assets/AdminPanel-O5LabOsd.js","assets/message-circle-B4A44vWv.js","assets/endOfDay-AQ9c47mN.js","assets/credit-card-DLJ4DpYx.js","assets/circle-x-BxQ5DpQ5.js","assets/key-C4Ots_o6.js","assets/FAQ-CY1ijkSF.js","assets/shield-OnRUKlnx.js","assets/Account-Bo3EWMCA.js","assets/Support-Bd2nyydK.js","assets/MediaAssets-DvzTzmrC.js","assets/GolfPage-BVRNeteQ.js","assets/PropsPage-BjUq0dWH.js","assets/TwitterAds-W3-SPTLO.js"])))=>i.map(i=>d[i]);
2(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function a(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=a(l);fetch(l.href,o)}})();function $l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $S(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var a=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var l=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(a,i,l.get?l:{enumerable:!0,get:function(){return e[i]}})}),a}var fh={exports:{}},fl={};/**
3 * @license React
4 * react-jsx-runtime.production.js
5 *
6 * Copyright (c) Meta Platforms, Inc. and affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var sy;function YS(){if(sy)return fl;sy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(i,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var h in l)h!=="key"&&(o[h]=l[h])}else o=l;return l=o.ref,{$$typeof:e,type:i,key:u,ref:l!==void 0?l:null,props:o}}return fl.Fragment=t,fl.jsx=a,fl.jsxs=a,fl}var ly;function WS(){return ly||(ly=1,fh.exports=YS()),fh.exports}var d=WS(),mh={exports:{}},Me={};/**
11 * @license React
12 * react.production.js
13 *
14 * Copyright (c) Meta Platforms, Inc. and affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var oy;function KS(){if(oy)return Me;oy=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),x=Symbol.iterator;function w(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,_={};function C(L,F,S){this.props=L,this.context=F,this.refs=_,this.updater=S||N}C.prototype.isReactComponent={},C.prototype.setState=function(L,F){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,F,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function T(){}T.prototype=C.prototype;function j(L,F,S){this.props=L,this.context=F,this.refs=_,this.updater=S||N}var B=j.prototype=new T;B.constructor=j,A(B,C.prototype),B.isPureReactComponent=!0;var Q=Array.isArray;function O(){}var V={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function q(L,F,S){var de=S.ref;return{$$typeof:e,type:L,key:F,ref:de!==void 0?de:null,props:S}}function E(L,F){return q(L.type,F,L.props)}function G(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function D(L){var F={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(S){return F[S]})}var U=/\/+/g;function z(L,F){return typeof L=="object"&&L!==null&&L.key!=null?D(""+L.key):F.toString(36)}function $(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(O,O):(L.status="pending",L.then(function(F){L.status==="pending"&&(L.status="fulfilled",L.value=F)},function(F){L.status==="pending"&&(L.status="rejected",L.reason=F)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function P(L,F,S,de,oe){var pe=typeof L;(pe==="undefined"||pe==="boolean")&&(L=null);var ge=!1;if(L===null)ge=!0;else switch(pe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(L.$$typeof){case e:case t:ge=!0;break;case y:return ge=L._init,P(ge(L._payload),F,S,de,oe)}}if(ge)return oe=oe(L),ge=de===""?"."+z(L,0):de,Q(oe)?(S="",ge!=null&&(S=ge.replace(U,"$&/")+"/"),P(oe,F,S,"",function(Ie){return Ie})):oe!=null&&(G(oe)&&(oe=E(oe,S+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(U,"$&/")+"/")+ge)),F.push(oe)),1;ge=0;
vendor: 14,544 bytes, lines 18-42
18var xe=de===""?".":de+":";if(Q(L))for(var we=0;we<L.length;we++)de=L[we],pe=xe+z(de,we),ge+=P(de,F,S,pe,oe);else if(we=w(L),typeof we=="function")for(L=we.call(L),we=0;!(de=L.next()).done;)de=de.value,pe=xe+z(de,we++),ge+=P(de,F,S,pe,oe);else if(pe==="object"){if(typeof L.then=="function")return P($(L),F,S,de,oe);throw F=String(L),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return ge}function te(L,F,S){if(L==null)return L;var de=[],oe=0;return P(L,de,"","",function(pe){return F.call(S,pe,oe++)}),de}function fe(L){if(L._status===-1){var F=L._result;F=F(),F.then(function(S){(L._status===0||L._status===-1)&&(L._status=1,L._result=S)},function(S){(L._status===0||L._status===-1)&&(L._status=2,L._result=S)}),L._status===-1&&(L._status=0,L._result=F)}if(L._status===1)return L._result.default;throw L._result}var ce=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},R={map:te,forEach:function(L,F,S){te(L,function(){F.apply(this,arguments)},S)},count:function(L){var F=0;return te(L,function(){F++}),F},toArray:function(L){return te(L,function(F){return F})||[]},only:function(L){if(!G(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Me.Activity=b,Me.Children=R,Me.Component=C,Me.Fragment=a,Me.Profiler=l,Me.PureComponent=j,Me.StrictMode=i,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Me.__COMPILER_RUNTIME={__proto__:null,c:function(L){return V.H.useMemoCache(L)}},Me.cache=function(L){return function(){return L.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(L,F,S){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var de=A({},L.props),oe=L.key;if(F!=null)for(pe in F.key!==void 0&&(oe=""+F.key),F)!ee.call(F,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&F.ref===void 0||(de[pe]=F[pe]);var pe=arguments.length-2;if(pe===1)de.children=S;else if(1<pe){for(var ge=Array(pe),xe=0;xe<pe;xe++)ge[xe]=arguments[xe+2];de.children=ge}return q(L.type,oe,de)},Me.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Me.createElement=function(L,F,S){var de,oe={},pe=null;if(F!=null)for(de in F.key!==void 0&&(pe=""+F.key),F)ee.call(F,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(oe[de]=F[de]);var ge=arguments.length-2;if(ge===1)oe.children=S;else if(1<ge){for(var xe=Array(ge),we=0;we<ge;we++)xe[we]=arguments[we+2];oe.children=xe}if(L&&L.defaultProps)for(de in ge=L.defaultProps,ge)oe[de]===void 0&&(oe[de]=ge[de]);return q(L,pe,oe)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(L){return{$$typeof:h,render:L}},Me.isValidElement=G,Me.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:fe}},Me.memo=function(L,F){return{$$typeof:p,type:L,compare:F===void 0?null:F}},Me.startTransition=function(L){var F=V.T,S={};V.T=S;try{var de=L(),oe=V.S;oe!==null&&oe(S,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(O,ce)}catch(pe){ce(pe)}finally{F!==null&&S.types!==null&&(F.types=S.types),V.T=F}},Me.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Me.use=function(L){return V.H.use(L)},Me.useActionState=function(L,F,S){return V.H.useActionState(L,F,S)},Me.useCallback=function(L,F){return V.H.useCallback(L,F)},Me.useContext=function(L){return V.H.useContext(L)},Me.useDebugValue=function(){},Me.useDeferredValue=function(L,F){return V.H.useDeferredValue(L,F)},Me.useEffect=function(L,F){return V.H.useEffect(L,F)},Me.useEffectEvent=function(L){return V.H.useEffectEvent(L)},Me.useId=function(){return V.H.useId()},Me.useImperativeHandle=function(L,F,S){return V.H.useImperativeHandle(L,F,S)},Me.useInsertionEffect=function(L,F){return V.H.useInsertionEffect(L,F)},Me.useLayoutEffect=function(L,F){return V.H.useLayoutEffect(L,F)},Me.useMemo=function(L,F){return V.H.useMemo(L,F)},Me.useOptimistic=function(L,F){return V.H.useOptimistic(L,F)},Me.useReducer=function(L,F,S){return V.H.useReducer(L,F,S)},Me.useRef=function(L){return V.H.useRef(L)},Me.useState=function(L){return V.H.useState(L)},Me.useSyncExternalStore=function(L,F,S){return V.H.useSyncExternalStore(L,F,S)},Me.useTransition=function(){return V.H.useTransition()},Me.version="19.2.3",Me}var cy;function Mf(){return cy||(cy=1,mh.exports=KS()),mh.exports}var J=Mf();const sn=$l(J);var ph={exports:{}},ml={},gh={exports:{}},yh={};/**
19 * @license React
20 * scheduler.production.js
21 *
22 * Copyright (c) Meta Platforms, Inc. and affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */var uy;function JS(){return uy||(uy=1,(function(e){function t(P,te){var fe=P.length;P.push(te);e:for(;0<fe;){var ce=fe-1>>>1,R=P[ce];if(0<l(R,te))P[ce]=te,P[fe]=R,fe=ce;else break e}}function a(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var te=P[0],fe=P.pop();if(fe!==te){P[0]=fe;e:for(var ce=0,R=P.length,L=R>>>1;ce<L;){var F=2*(ce+1)-1,S=P[F],de=F+1,oe=P[de];if(0>l(S,fe))de<R&&0>l(oe,S)?(P[ce]=oe,P[de]=fe,ce=de):(P[ce]=S,P[F]=fe,ce=F);else if(de<R&&0>l(oe,fe))P[ce]=oe,P[de]=fe,ce=de;else break e}}return te}function l(P,te){var fe=P.sortIndex-te.sortIndex;return fe!==0?fe:P.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var f=[],p=[],y=1,b=null,x=3,w=!1,N=!1,A=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function B(P){for(var te=a(p);te!==null;){if(te.callback===null)i(p);else if(te.startTime<=P)i(p),te.sortIndex=te.expirationTime,t(f,te);else break;te=a(p)}}function Q(P){if(A=!1,B(P),!N)if(a(f)!==null)N=!0,O||(O=!0,D());else{var te=a(p);te!==null&&$(Q,te.startTime-P)}}var O=!1,V=-1,ee=5,q=-1;function E(){return _?!0:!(e.unstable_now()-q<ee)}function G(){if(_=!1,O){var P=e.unstable_now();q=P;var te=!0;try{e:{N=!1,A&&(A=!1,T(V),V=-1),w=!0;var fe=x;try{t:{for(B(P),b=a(f);b!==null&&!(b.expirationTime>P&&E());){var ce=b.callback;if(typeof ce=="function"){b.callback=null,x=b.priorityLevel;var R=ce(b.expirationTime<=P);if(P=e.unstable_now(),typeof R=="function"){b.callback=R,B(P),te=!0;break t}b===a(f)&&i(f),B(P)}else i(f);b=a(f)}if(b!==null)te=!0;else{var L=a(p);L!==null&&$(Q,L.startTime-P),te=!1}}break e}finally{b=null,x=fe,w=!1}te=void 0}}finally{te?D():O=!1}}}var D;if(typeof j=="function")D=function(){j(G)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,z=U.port2;U.port1.onmessage=G,D=function(){z.postMessage(null)}}else D=function(){C(G,0)};function $(P,te){V=C(function(){P(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(P){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var fe=x;x=te;try{return P()}finally{x=fe}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(P,te){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var fe=x;x=P;try{return te()}finally{x=fe}},e.unstable_scheduleCallback=function(P,te,fe){var ce=e.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?ce+fe:ce):fe=ce,P){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=fe+R,P={id:y++,callback:te,priorityLevel:P,startTime:fe,expirationTime:R,sortIndex:-1},fe>ce?(P.sortIndex=fe,t(p,P),a(f)===null&&P===a(p)&&(A?(T(V),V=-1):A=!0,$(Q,fe-ce))):(P.sortIndex=R,t(f,P),N||w||(N=!0,O||(O=!0,D()))),P},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(P){var te=x;return function(){var fe=x;x=te;try{return P.apply(this,arguments)}finally{x=fe}}}})(yh)),yh}var dy;function XS(){return dy||(dy=1,gh.exports=JS()),gh.exports}var bh={exports:{}},pn={};/**
27 * @license React
28 * react-dom.production.js
29 *
30 * Copyright (c) Meta Platforms, Inc. and affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var hy;function QS(){if(hy)return pn;hy=1;var e=Mf();function t(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(f,p,y){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:b==null?null:""+b,children:f,containerInfo:p,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,pn.createPortal=function(f,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return o(f,p,null,y)},pn.flushSync=function(f){var p=u.T,y=i.p;try{if(u.T=null,i.p=2,f)return f()}finally{u.T=p,i.p=y,i.d.f()}},pn.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(f,p))},pn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},pn.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var y=p.as,b=h(y,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?i.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:x,fetchPriority:w}):y==="script"&&i.d.X(f,{crossOrigin:b,integrity:x,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pn.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);i.d.M(f,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(f)},pn.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,b=h(y,p.crossOrigin);i.d.L(f,y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pn.preloadModule=function(f,p){if(typeof f=="string")if(p){var y=h(p.as,p.crossOrigin);i.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(f)},pn.requestFormReset=function(f){i.d.r(f)},pn.unstable_batchedUpdates=function(f,p){return f(p)},pn.useFormState=function(f,p,y){return u.H.useFormState(f,p,y)},pn.useFormStatus=function(){return u.H.useHostTransitionStatus()},pn.version="19.2.3",pn}var fy;function Rx(){if(fy)return bh.exports;fy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bh.exports=QS(),bh.exports}/**
35 * @license React
36 * react-dom-client.production.js
37 *
38 * Copyright (c) Meta Platforms, Inc. and affiliates.
39 *
40 * This source code is licensed under the MIT license found in the
41 * LICENSE file in the root directory of this source tree.
42 */var my;function ZS(){if(my)return ml;my=1;var e=XS(),t=Mf(),a=Rx();function i(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var r=n,s=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(s=r.return),n=r.return;while(n)}return r.tag===3?s:null}function u(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function h(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function f(n){if(o(n)!==n)throw Error(i(188))}function p(n){var r=n.alternate;if(!r){if(r=o(n),r===null)throw Error(i(188));return r!==n?null:n}for(var s=n,c=r;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return f(m),n;if(g===c)return f(m),r;g=g.sibling}throw Error(i(188))}if(s.return!==c.return)s=m,c=g;else{for(var v=!1,k=m.child;k;){if(k===s){v=!0,s=m,c=g;break}
vendor: 14,244 bytes, lines 42-49
42if(k===c){v=!0,c=m,s=g;break}k=k.sibling}if(!v){for(k=g.child;k;){if(k===s){v=!0,s=g,c=m;break}if(k===c){v=!0,c=g,s=m;break}k=k.sibling}if(!v)throw Error(i(189))}}if(s.alternate!==c)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),E=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function D(n){return n===null||typeof n!="object"?null:(n=G&&n[G]||n["@@iterator"],typeof n=="function"?n:null)}var U=Symbol.for("react.client.reference");function z(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===U?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case A:return"Fragment";case C:return"Profiler";case _:return"StrictMode";case Q:return"Suspense";case O:return"SuspenseList";case q:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case j:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case B:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case V:return r=n.displayName||null,r!==null?r:z(n.type)||"Memo";case ee:r=n._payload,n=n._init;try{return z(n(r))}catch{}}return null}var $=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},ce=[],R=-1;function L(n){return{current:n}}function F(n){0>R||(n.current=ce[R],ce[R]=null,R--)}function S(n,r){R++,ce[R]=n.current,n.current=r}var de=L(null),oe=L(null),pe=L(null),ge=L(null);function xe(n,r){switch(S(pe,r),S(oe,n),S(de,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?Cg(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=Cg(r),n=jg(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}F(de),S(de,n)}function we(){F(de),F(oe),F(pe)}function Ie(n){n.memoizedState!==null&&S(ge,n);var r=de.current,s=jg(r,n.type);r!==s&&(S(oe,n),S(de,s))}function jt(n){oe.current===n&&(F(de),F(oe)),ge.current===n&&(F(ge),cl._currentValue=fe)}var st,fn;function pt(n){if(st===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);st=r&&r[1]||"",fn=-1<s.stack.indexOf(`
43    at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
44`+st+n+fn}var Et=!1;function At(n,r){if(!n||Et)return"";Et=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(X){var K=X}Reflect.construct(n,[],se)}else{try{se.call()}catch(X){K=X}n.call(se.prototype)}}else{try{throw Error()}catch(X){K=X}(se=n())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(X){if(X&&K&&typeof X.stack=="string")return[X.stack,K.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),v=g[0],k=g[1];if(v&&k){var M=v.split(`
45`),W=k.split(`
46`);for(m=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;m<W.length&&!W[m].includes("DetermineComponentFrameRoot");)m++;if(c===M.length||m===W.length)for(c=M.length-1,m=W.length-1;1<=c&&0<=m&&M[c]!==W[m];)m--;for(;1<=c&&0<=m;c--,m--)if(M[c]!==W[m]){if(c!==1||m!==1)do if(c--,m--,0>m||M[c]!==W[m]){var re=`
47`+M[c].replace(" at new "," at ");return n.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",n.displayName)),re}while(1<=c&&0<=m);break}}}finally{Et=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?pt(s):""}function Kt(n,r){switch(n.tag){case 26:case 27:case 5:return pt(n.type);case 16:return pt("Lazy");case 13:return n.child!==r&&r!==null?pt("Suspense Fallback"):pt("Suspense");case 19:return pt("SuspenseList");case 0:case 15:return At(n.type,!1);case 11:return At(n.type.render,!1);case 1:return At(n.type,!0);case 31:return pt("Activity");default:return""}}function nt(n){try{var r="",s=null;do r+=Kt(n,s),s=n,n=n.return;while(n);return r}catch(c){return`
48Error generating stack: `+c.message+`
49`+c.stack}}var Ut=Object.prototype.hasOwnProperty,Jt=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,zt=e.unstable_shouldYield,xn=e.unstable_requestPaint,lt=e.unstable_now,kn=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,je=e.unstable_LowPriority,He=e.unstable_IdlePriority,_t=e.log,Pt=e.unstable_setDisableYieldValue,at=null,gt=null;function Ft(n){if(typeof _t=="function"&&Pt(n),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(at,n)}catch{}}var be=Math.clz32?Math.clz32:sa,Ze=Math.log,Ke=Math.LN2;function sa(n){return n>>>=0,n===0?32:31-(Ze(n)/Ke|0)|0}var wn=256,Na=262144,la=4194304;function Ee(n){var r=n&42;if(r!==0)return r;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function mn(n,r,s){var c=n.pendingLanes;if(c===0)return 0;var m=0,g=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var k=c&134217727;return k!==0?(c=k&~g,c!==0?m=Ee(c):(v&=k,v!==0?m=Ee(v):s||(s=k&~n,s!==0&&(m=Ee(s))))):(k=c&~g,k!==0?m=Ee(k):v!==0?m=Ee(v):s||(s=c&~n,s!==0&&(m=Ee(s)))),m===0?0:r!==0&&r!==m&&(r&g)===0&&(g=m&-m,s=r&-r,g>=s||g===32&&(s&4194048)!==0)?r:m}function vn(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function Or(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ka(){var n=la;return la<<=1,(la&62914560)===0&&(la=4194304),n}function Z(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function ue(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function le(n,r,s,c,m,g){var v=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var k=n.entanglements,M=n.expirationTimes,W=n.hiddenUpdates;for(s=v&~s;0<s;){var re=31-be(s),se=1<<re;k[re]=0,M[re]=-1;var K=W[re];if(K!==null)for(W[re]=null,re=0;re<K.length;re++){var X=K[re];X!==null&&(X.lane&=-536870913)}s&=~se}c!==0&&ye(n,c,0),g!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=g&~(v&~r))}function ye(n,r,s){n.pendingLanes|=r,n.suspendedLanes&=~r;var c=31-be(r);n.entangledLanes|=r,n.entanglements[c]=n.entanglements[c]|1073741824|s&261930}function ve(n,r){var s=n.entangledLanes|=r;for(n=n.entanglements;s;){var c=31-be(s),m=1<<c;m&r|n[c]&r&&(n[c]|=r),s&=~m}}function Pe(n,r){var s=r&-r;return s=(s&42)!==0?1:$e(s),(s&(n.suspendedLanes|r))!==0?0:s}function $e(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Nt(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ot(){var n=te.p;return n!==0?n:(n=window.event,n===void 0?32:Zg(n.type))}function Dt(n,r){var s=te.p;try{return te.p=n,r()}finally{te.p=s}}var rt=Math.random().toString(36).slice(2),Le="__reactFiber$"+rt,Qe="__reactProps$"+rt,Sn="__reactContainer$"+rt,pa="__reactEvents$"+rt,L1="__reactListeners$"+rt,M1="__reactHandles$"+rt,gm="__reactResources$"+rt,Ns="__reactMarker$"+rt;function iu(n){delete n[Le],delete n[Qe],delete n[pa],delete n[L1],delete n[M1]}function ui(n){var r=n[Le];if(r)return r;for(var s=n.parentNode;s;){if(r=s[Sn]||s[Le]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(n=Ig(n);n!==null;){if(s=n[Le])return s;n=Ig(n)}return r}n=s,s=n.parentNode}return null}function di(n){if(n=n[Le]||n[Sn]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function ks(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(i(33))}function hi(n){var r=n[gm];return r||(r=n[gm]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function nn(n){n[Ns]=!0}var ym=new Set,bm={};function Rr(n,r){fi(n,r),fi(n+"Capture",r)}function fi(n,r){for(bm[n]=r,n=0;n<r.length;n++)ym.add(r[n])}var I1=RegExp("^[: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]*$"),xm={},wm={};function U1(n){return Ut.call(wm,n)?!0:Ut.call(xm,n)?!1:I1.test(n)?wm[n]=!0:(xm[n]=!0,!1)}function Xl(n,r,s){if(U1(r))if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+s)}}function Ql(n,r,s){if(s===null)n.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+s)}}function ka(n,r,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(r,s,""+c)}}function Wn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function vm(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function B1(n,r,s){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,g=c.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return m.call(this)},set:function(v){s=""+v,g.call(this,v)}}),Object.defineProperty(n,r,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(v){s=""+v},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function su(n){if(!n._valueTracker){var r=vm(n)?"checked":"value";n._valueTracker=B1(n,r,""+n[r])}}function Sm(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var s=r.getValue(),c="";return n&&(c=vm(n)?n.checked?"true":"false":n.value),n=c,n!==s?(r.setValue(n),!0):!1}function Zl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var z1=/[\n"\\]/g;function Kn(n){return n.replace(z1,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function lu(n,r,s,c,m,g,v,k){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),r!=null?v==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Wn(r)):n.value!==""+Wn(r)&&(n.value=""+Wn(r)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),r!=null?ou(n,v,Wn(r)):s!=null?ou(n,v,Wn(s)):c!=null&&n.removeAttribute("value"),m==null&&g!=null&&(n.defaultChecked=!!g),m!=null&&(n.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?n.name=""+Wn(k):n.removeAttribute("name")}function Em(n,r,s,c,m,g,v,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){su(n);return}s=s!=null?""+Wn(s):"",r=r!=null?""+Wn(r):s,k||r===n.value||(n.value=r),n.defaultValue=r}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=k?n.checked:!!c,n.defaultChecked=!!c,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),su(n)}function ou(n,r,s){r==="number"&&Zl(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function mi(n,r,s,c){if(n=n.options,r){r={};for(var m=0;m<s.length;m++)r["$"+s[m]]=!0;for(s=0;s<n.length;s++)m=r.hasOwnProperty("$"+n[s].value),n[s].selected!==m&&(n[s].selected=m),m&&c&&(n[s].defaultSelected=!0)}else{for(s=""+Wn(s),r=null,m=0;m<n.length;m++){if(n[m].value===s){n[m].selected=!0,c&&(n[m].defaultSelected=!0);return}r!==null||n[m].disabled||(r=n[m])}r!==null&&(r.selected=!0)}}function Nm(n,r,s){if(r!=null&&(r=""+Wn(r),r!==n.value&&(n.value=r),s==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=s!=null?""+Wn(s):""}function km(n,r,s,c){if(r==null){if(c!=null){if(s!=null)throw Error(i(92));if($(c)){if(1<c.length)throw Error(i(93));c=c[0]}s=c}s==null&&(s=""),r=s}
vendor: 4,266 bytes, line 49
49s=Wn(r),n.defaultValue=s,c=n.textContent,c===s&&c!==""&&c!==null&&(n.value=c),su(n)}function pi(n,r){if(r){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=r;return}}n.textContent=r}var P1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Am(n,r,s){var c=r.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":c?n.setProperty(r,s):typeof s!="number"||s===0||P1.has(r)?r==="float"?n.cssFloat=s:n[r]=(""+s).trim():n[r]=s+"px"}function _m(n,r,s){if(r!=null&&typeof r!="object")throw Error(i(62));if(n=n.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var m in r)c=r[m],r.hasOwnProperty(m)&&s[m]!==c&&Am(n,m,c)}else for(var g in r)r.hasOwnProperty(g)&&Am(n,g,r[g])}function cu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 H1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
49-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),V1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function eo(n){return V1.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Aa(){}var uu=null;function du(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var gi=null,yi=null;function Tm(n){var r=di(n);if(r&&(n=r.stateNode)){var s=n[Qe]||null;e:switch(n=r.stateNode,r.type){case"input":if(lu(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),r=s.name,s.type==="radio"&&r!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Kn(""+r)+'"][type="radio"]'),r=0;r<s.length;r++){var c=s[r];if(c!==n&&c.form===n.form){var m=c[Qe]||null;if(!m)throw Error(i(90));lu(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(r=0;r<s.length;r++)c=s[r],c.form===n.form&&Sm(c)}break e;case"textarea":Nm(n,s.value,s.defaultValue);break e;case"select":r=s.value,r!=null&&mi(n,!!s.multiple,r,!1)}}}var hu=!1;function Cm(n,r,s){if(hu)return n(r,s);hu=!0;try{var c=n(r);return c}finally{if(hu=!1,(gi!==null||yi!==null)&&(Ho(),gi&&(r=gi,n=yi,yi=gi=null,Tm(r),n)))for(r=0;r<n.length;r++)Tm(n[r])}}function As(n,r){var s=n.stateNode;if(s===null)return null;var c=s[Qe]||null;if(c===null)return null;s=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(i(231,r,typeof s));return s}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fu=!1;if(_a)try{var _s={};Object.defineProperty(_s,"passive",{get:function(){fu=!0}}),window.addEventListener("test",_s,_s),window.removeEventListener("test",_s,_s)}catch{fu=!1}var Ja=null,mu=null,to=null;function jm(){if(to)return to;var n,r=mu,s=r.length,c,m="value"in Ja?Ja.value:Ja.textContent,g=m.length;for(n=0;n<s&&r[n]===m[n];n++);var v=s-n;for(c=1;c<=v&&r[s-c]===m[g-c];c++);return to=m.slice(n,1<c?1-c:void 0)}function no(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function ao(){return!0}function Fm(){return!1}function An(n){function r(s,c,m,g,v){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=g,this.target=v,this.currentTarget=null;for(var k in n)n.hasOwnProperty(k)&&(s=n[k],this[k]=s?s(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?ao:Fm,this.isPropagationStopped=Fm,this}return b(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ao)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ao)},persist:function(){},isPersistent:ao}),r}var Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=An(Dr),Ts=b({},Dr,{view:0,detail:0}),G1=An(Ts),pu,gu,Cs,io=b({},Ts,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Cs&&(Cs&&n.type==="mousemove"?(pu=n.screenX-Cs.screenX,gu=n.screenY-Cs.screenY):gu=pu=0,Cs=n),pu)},movementY:function(n){return"movementY"in n?n.movementY:gu}}),Om=An(io),q1=b({},io,{dataTransfer:0}),$1=An(q1),Y1=b({},Ts,{relatedTarget:0}),yu=An(Y1),W1=b({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),K1=An(W1),J1=b({},Dr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),X1=An(J1),Q1=b({},Dr,{data:0}),Rm=An(Q1),Z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ev={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},tv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nv(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=tv[n])?!!r[n]:!1}function bu(){return nv}var av=b({},Ts,{key:function(n){if(n.key){var r=Z1[n.key]||n.key;if(r!=="Unidentified")return r}
vendor: 5,186 bytes, line 49
49return n.type==="keypress"?(n=no(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ev[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bu,charCode:function(n){return n.type==="keypress"?no(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?no(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),rv=An(av),iv=b({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dm=An(iv),sv=b({},Ts,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bu}),lv=An(sv),ov=b({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),cv=An(ov),uv=b({},io,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),dv=An(uv),hv=b({},Dr,{newState:0,oldState:0}),fv=An(hv),mv=[9,13,27,32],xu=_a&&"CompositionEvent"in window,js=null;_a&&"documentMode"in document&&(js=document.documentMode);var pv=_a&&"TextEvent"in window&&!js,Lm=_a&&(!xu||js&&8<js&&11>=js),Mm=" ",Im=!1;function Um(n,r){switch(n){case"keyup":return mv.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bm(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var bi=!1;function gv(n,r){switch(n){case"compositionend":return Bm(r);case"keypress":return r.which!==32?null:(Im=!0,Mm);case"textInput":return n=r.data,n===Mm&&Im?null:n;default:return null}}function yv(n,r){if(bi)return n==="compositionend"||!xu&&Um(n,r)?(n=jm(),to=mu=Ja=null,bi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Lm&&r.locale!=="ko"?null:r.data;default:return null}}var bv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zm(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!bv[n.type]:r==="textarea"}function Pm(n,r,s,c){gi?yi?yi.push(c):yi=[c]:gi=c,r=Ko(r,"onChange"),0<r.length&&(s=new ro("onChange","change",null,s,c),n.push({event:s,listeners:r}))}var Fs=null,Os=null;function xv(n){Eg(n,0)}function so(n){var r=ks(n);if(Sm(r))return n}function Hm(n,r){if(n==="change")return r}var Vm=!1;if(_a){var wu;if(_a){var vu="oninput"in document;if(!vu){var Gm=document.createElement("div");Gm.setAttribute("oninput","return;"),vu=typeof Gm.oninput=="function"}wu=vu}else wu=!1;Vm=wu&&(!document.documentMode||9<document.documentMode)}function qm(){Fs&&(Fs.detachEvent("onpropertychange",$m),Os=Fs=null)}function $m(n){if(n.propertyName==="value"&&so(Os)){var r=[];Pm(r,Os,n,du(n)),Cm(xv,r)}}function wv(n,r,s){n==="focusin"?(qm(),Fs=r,Os=s,Fs.attachEvent("onpropertychange",$m)):n==="focusout"&&qm()}function vv(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return so(Os)}function Sv(n,r){if(n==="click")return so(r)}function Ev(n,r){if(n==="input"||n==="change")return so(r)}function Nv(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Ln=typeof Object.is=="function"?Object.is:Nv;function Rs(n,r){if(Ln(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var s=Object.keys(n),c=Object.keys(r);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Ut.call(r,m)||!Ln(n[m],r[m]))return!1}return!0}function Ym(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Wm(n,r){var s=Ym(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=r&&c>=r)return{node:s,offset:r-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Ym(s)}}function Km(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Km(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function Jm(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=Zl(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=Zl(n.document)}return r}function Su(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var kv=_a&&"documentMode"in document&&11>=document.documentMode,xi=null,Eu=null,Ds=null,Nu=!1;function Xm(n,r,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Nu||xi==null||xi!==Zl(c)||(c=xi,"selectionStart"in c&&Su(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focu
vendor: 18,888 bytes, line 49
49sNode:c.focusNode,focusOffset:c.focusOffset}),Ds&&Rs(Ds,c)||(Ds=c,c=Ko(Eu,"onSelect"),0<c.length&&(r=new ro("onSelect","select",null,r,s),n.push({event:r,listeners:c}),r.target=xi)))}function Lr(n,r){var s={};return s[n.toLowerCase()]=r.toLowerCase(),s["Webkit"+n]="webkit"+r,s["Moz"+n]="moz"+r,s}var wi={animationend:Lr("Animation","AnimationEnd"),animationiteration:Lr("Animation","AnimationIteration"),animationstart:Lr("Animation","AnimationStart"),transitionrun:Lr("Transition","TransitionRun"),transitionstart:Lr("Transition","TransitionStart"),transitioncancel:Lr("Transition","TransitionCancel"),transitionend:Lr("Transition","TransitionEnd")},ku={},Qm={};_a&&(Qm=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function Mr(n){if(ku[n])return ku[n];if(!wi[n])return n;var r=wi[n],s;for(s in r)if(r.hasOwnProperty(s)&&s in Qm)return ku[n]=r[s];return n}var Zm=Mr("animationend"),e0=Mr("animationiteration"),t0=Mr("animationstart"),Av=Mr("transitionrun"),_v=Mr("transitionstart"),Tv=Mr("transitioncancel"),n0=Mr("transitionend"),a0=new Map,Au="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Au.push("scrollEnd");function oa(n,r){a0.set(n,r),Rr(r,[n])}var lo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Jn=[],vi=0,_u=0;function oo(){for(var n=vi,r=_u=vi=0;r<n;){var s=Jn[r];Jn[r++]=null;var c=Jn[r];Jn[r++]=null;var m=Jn[r];Jn[r++]=null;var g=Jn[r];if(Jn[r++]=null,c!==null&&m!==null){var v=c.pending;v===null?m.next=m:(m.next=v.next,v.next=m),c.pending=m}g!==0&&r0(s,m,g)}}function co(n,r,s,c){Jn[vi++]=n,Jn[vi++]=r,Jn[vi++]=s,Jn[vi++]=c,_u|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Tu(n,r,s,c){return co(n,r,s,c),uo(n)}function Ir(n,r){return co(n,null,null,r),uo(n)}function r0(n,r,s){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s);for(var m=!1,g=n.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(m=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,m&&r!==null&&(m=31-be(s),n=g.hiddenUpdates,c=n[m],c===null?n[m]=[r]:c.push(r),r.lane=s|536870912),g):null}function uo(n){if(50<nl)throw nl=0,Id=null,Error(i(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Si={};function Cv(n,r,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(n,r,s,c){return new Cv(n,r,s,c)}function Cu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ta(n,r){var s=n.alternate;return s===null?(s=Mn(n.tag,r,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=r,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,r=n.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function i0(n,r){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,r=s.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function ho(n,r,s,c,m,g){var v=0;if(c=n,typeof n=="function")Cu(n)&&(v=1);else if(typeof n=="string")v=DS(n,s,de.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case q:return n=Mn(31,s,r,m),n.elementType=q,n.lanes=g,n;case A:return Ur(s.children,m,g,r);case _:v=8,m|=24;break;case C:return n=Mn(12,s,r,m|2),n.elementType=C,n.lanes=g,n;case Q:return n=Mn(13,s,r,m),n.elementType=Q,n.lanes=g,n;case O:return n=Mn(19,s,r,m),n.elementType=O,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case j:v=10;break e;case T:v=9;break e;case B:v=11;break e;case V:v=14;break e;case ee:v=16,c=null;break e}v=29,s=Error(i(130,n===null?"null":typeof n,"")),c=null}return r=Mn(v,s,r,m),r.elementType=n,r.type=c,r.lanes=g,r}function Ur(n,r,s,c){return n=Mn(7,n,c,r),n.lanes=s,n}function ju(n,r,s){return n=Mn(6,n,null,r),n.lanes=s,n}function s0(n){var r=Mn(18,null,null,0);return r.stateNode=n,r}function Fu(n,r,s){return r=Mn(4,n.children!==null?n.children:[],n.key,r),r.lanes=s,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var l0=new WeakMap;function Xn(n,r){if(typeof n=="object"&&n!==null){var s=l0.get(n);return s!==void 0?s:(r={value:n,source:r,stack:nt(r)},l0.set(n,r),r)}return{value:n,source:r,stack:nt(r)}}var Ei=[],Ni=0,fo=null,Ls=0,Qn=[],Zn=0,Xa=null,ga=1,ya="";function Ca(n,r){Ei[Ni++]=Ls,Ei[Ni++]=fo,fo=n,Ls=r}function o0(n,r,s){Qn[Zn++]=ga,Qn[Zn++]=ya,Qn[Zn++]=Xa,Xa=n;var c=ga;n=ya;var m=32-be(c)-1;c&=~(1<<m),s+=1;var g=32-be(r)+m;if(30<g){var v=m-m%5;g=(c&(1<<v)-1).toString(32),c>>=v,m-=v,ga=1<<32-be(r)+m|s<<m|c,ya=g+n}else ga=1<<g|s<<m|c,ya=n}function Ou(n){n.return!==null&&(Ca(n,1),o0(n,1,0))}function Ru(n){for(;n===fo;)fo=Ei[--Ni],Ei[Ni]=null,Ls=Ei[--Ni],Ei[Ni]=null;for(;n===Xa;)Xa=Qn[--Zn],Qn[Zn]=null,ya=Qn[--Zn],Qn[Zn]=null,ga=Qn[--Zn],Qn[Zn]=null}function c0(n,r){Qn[Zn++]=ga,Qn[Zn++]=ya,Qn[Zn++]=Xa,ga=r.id,ya=r.overflow,Xa=n}var ln=null,vt=null,Je=!1,Qa=null,ea=!1,Du=Error(i(519));function Za(n){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ms(Xn(r,n)),Du}function u0(n){var r=n.stateNode,s=n.type,c=n.memoizedProps;switch(r[Le]=n,r[Qe]=c,s){case"dialog":Ge("cancel",r),Ge("close",r);break;case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(s=0;s<rl.length;s++)Ge(rl[s],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"details":Ge("toggle",r);break;case"input":Ge("invalid",r),Em(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ge("invalid",r);break;case"textarea":Ge("invalid",r),km(r,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||r.textContent===""+s||c.suppressHydrationWarning===!0||_g(r.textContent,s)?(c.popover!=null&&(Ge("beforetoggle",r),Ge("toggle",r)),c.onScroll!=null&&Ge("scroll",r),c.onScrollEnd!=null&&Ge("scrollend",r),c.onClick!=null&&(r.onclick=Aa),r=!0):r=!1,r||Za(n,!0)}function d0(n){for(ln=n.return;ln;)switch(ln.tag){case 5:case 31:case 13:ea=!1;return;case 27:case 3:ea=!0;return;default:ln=ln.return}}function ki(n){if(n!==ln)return!1;if(!Je)return d0(n),Je=!0,!1;var r=n.tag,s;if((s=r!==3&&r!==27)&&((s=r===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Qd(n.type,n.memoizedProps)),s=!s),s&&vt&&Za(n),d0(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));vt=Mg(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));vt=Mg(n)}else r===27?(r=vt,fr(n.type)?(n=ah,ah=null,vt=n):vt=r):vt=ln?na(n.stateNode.nextSibling):null;return!0}function Br(){vt=ln=null,Je=!1}function Lu(){var n=Qa;return n!==null&&(jn===null?jn=n:jn.push.apply(jn,n),Qa=null),n}function Ms(n){Qa===null?Qa=[n]:Qa.push(n)}var Mu=L(null),zr=null,ja=null;function er(n,r,s){S(Mu,r._currentValue),r._currentValue=s}function Fa(n){n._currentValue=Mu.current,F(Mu)}function Iu(n,r,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===s)break;n=n.return}}function Uu(n,r,s,c){var m=n.child;for(m!==null&&(m.return=n);m!==null;){var g=m.dependencies;if(g!==null){var v=m.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=m;for(var M=0;M<r.length;M++)if(k.context===r[M]){g.lanes|=s,k=g.alternate,k!==null&&(k.lanes|=s),Iu(g.return,s,n),c||(v=null);break e}g=k.next}}else if(m.tag===18){if(v=m.return,v===null)throw Error(i(341));v.lanes|=s,g=v.alternate,g!==null&&(g.lanes|=s),Iu(v,s,n),v=null}else v=m.child;if(v!==null)v.return=m;else for(v=m;v!==null;){if(v===n){v=null;break}if(m=v.sibling,m!==null){m.return=v.return,v=m;break}v=v.return}m=v}}function Ai(n,r,s,c){n=null;for(var m=r,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var v=m.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var k=m.type;Ln(m.pendingProps.value,v.value)||(n!==null?n.push(k):n=[k])}}else if(m===ge.current){if(v=m.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(n!==null?n.push(cl):n=[cl])}m=m.return}n!==null&&Uu(r,n,s,c),r.flags|=262144}function mo(n){for(n=n.firstContext;n!==null;){if(!Ln(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Pr(n){zr=n,ja=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function on(n){return h0(zr,n)}function po(n,r){return zr===null&&Pr(n),h0(n,r)}function h0(n,r){var s=r._currentValue;if(r={context:r,memoizedValue:s,next:null},ja===null){if(n===null)throw Error(i(308));ja=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else ja=ja.next=r;return s}var jv=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(s,c){n.push(c)}};this.abort=function(){r.aborted=!0,n.forEach(function(s){return s()})}},Fv=e.unstable_scheduleCallback,Ov=e.unstable_NormalPriority,Ht={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bu(){return{controller:new jv,data:new Map,refCount:0}}function Is(n){n.refCount--,n.refCount===0&&Fv(Ov,function(){n.controller.abort()})}var Us=null,zu=0,_i=0,Ti=null;function Rv(n,r){if(Us===null){var s=Us=[];zu=0,_i=Vd(),Ti={status:"pending",value:void 0,then:function(c){s.push(c)}}}return zu++,r.then(f0,f0),r}function f0(){if(--zu===0&&Us!==null){Ti!==null&&(Ti.status="fulfilled");var n=Us;Us=null,_i=0,Ti=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function Dv(n,r){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return n.then(function(){c.status="fulfilled",c.value=r;for(var m=0;m<s.length;m++)(0,s[m])(r)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var m0=P.S;P.S=function(n,r){Xp=lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Rv(n,r),m0!==null&&m0(n,r)};var Hr=L(null);function Pu(){var n=Hr.current;return n!==null?n:yt.pooledCache}function go(n,r){r===null?S(Hr,Hr.current):S(Hr,r.pool)}function p0(){var n=Pu();return n===null?null:{parent:Ht._currentValue,pool:n}}var Ci=Error(i(460)),Hu=Error(i(474)),yo=Error(i(542)),bo={then:function(){}};function g0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function y0(n,r,s){switch(s=n[s],s===void 0?n.push(r):s!==r&&(r.then(Aa,Aa),r=s),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,x0(n),n;default:if(typeof r.status=="string")r.then(Aa,Aa);else{if(n=yt,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=r,n.status="pending",n.then(function(c){if(r.status==="pending"){var m=r;m.status="fulfilled",m.value=c}},function(c){if(r.status==="pending"){var m=r;m.status="rejected",m.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,x0(n),n}throw Gr=r,Ci}}function Vr(n){try{var r=n._init;return r(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Gr=s,Ci):s}}var Gr=null;function b0(){if(Gr===null)throw Error(i(459));var n=Gr;return Gr=null,n}function x0(n){if(n===Ci||n===yo)throw Error(i(483))}var ji=null,Bs=0;function xo(n){var r=Bs;return Bs+=1,ji===null&&(ji=[]),y0(ji,n,r)}function zs(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function wo(n,r){throw r.$$typeof===x?Error(i(525)):(n=Object.prototype.toString.call(r),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function w0(n){function r(H,I){if(n){var Y=H.deletions;Y===null?(H.deletions=[I],H.flags|=16):Y.push(I)}}function s(H,I){if(!n)return null;for(;I!==null;)r(H,I),I=I.sibling;return null}function c(H){for(var I=new Map;H!==null;)H.key!==null?I.set(H.key,H):I.set(H.index,H),H=H.sibling;return I}function m(H,I){return H=Ta(H,I),H.index=0,H.sibling=null,H}function g(H,I,Y){return H.index=Y,n?(Y=H.alternate,Y!==null?(Y=Y.index,Y<I?(H.flags|=67108866,I):Y):(H.flags|=67108866,I)):(H.flags|=1048576,I)}function v(H){return n&&H.alternate===null&&(H.flags|=67108866),H}function k(H,I,Y,ie){return I===null||I.tag!==6?(I=ju(Y,H.mode,ie),I.return=H,I):(I=m(I,Y),I.return=H,I)}function M(H,I,Y,ie){var Te=Y.type;return Te===A?re(H,I,Y.props.children,ie,Y.key):I!==null&&(I.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ee&&Vr(Te)===I.type)?(I=m(I,Y.props),zs(I,Y),I.return=H,I):(I=ho(Y.type,Y.key,Y.props,null,H.mode,ie),zs(I,Y),I.return=H,I)}function W(H,I,Y,ie){return I===null||I.tag!==4||I.stateNode.containerInfo!==Y.containerInfo||I.stateNode.implementation!==Y.implementation?(I=Fu(Y,H.mode,ie),I.return=H,I):(I=m(I,Y.children||[]),I.return=H,I)}function re(H,I,Y,ie,Te){return I===null||I.tag!==7?(I=Ur(Y,H.mode,ie,Te),I.return=H,I):(I=m(I,Y),I.return=H,I)}function se(H,I,Y){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=ju(""+I,H.mode,Y),I.return=H,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return Y=ho(I.type,I.key,I.props,null,H.mode,Y),zs(Y,I),Y.return=H,Y;case N:return I=Fu(I,H.mode,Y),I.return=H,I;case ee:return I=Vr(I),se(H,I,Y)}if($(I)||D(I))return I=Ur(I,H.mode,Y,null),I.return=H,I;if(typeof I.then=="function")return se(H,xo(I),Y);if(I.$$typeof===j)return se(H,po(H,I),Y);wo(H,I)}return null}function K(H,I,Y,ie){var Te=I!==null?I.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Te!==null?null:k(H,I,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return Y.key===Te?M(H,I,Y,ie):null;case N:return Y.key===Te?W(H,I,Y,ie):null;case ee:return Y=Vr(Y),K(H,I,Y,ie)}if($(Y)||D(Y))return Te!==null?null:re(H,I,Y,ie,null);if(typeof Y.then=="function")return K(H,I,xo(Y),ie);if(Y.$$typeof===j)return K(H,I,po(H,Y),ie);wo(H,Y)}return null}function X(H,I,Y,ie,Te){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return H=H.get(Y)||null,k(I,H,""+ie,Te);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return H=H.get(ie.key===null?Y:ie.key)||null,M(I,H,ie,Te);case N:return H=H.get(ie.key===null?Y:ie.key)||null,W(I,H,ie,Te);case ee:return ie=Vr(ie),X(H,I,Y,ie,Te)}if($(ie)||D(ie))return H=H.get(Y)||null,re(I,H,ie,Te,null);if(typeof ie.then=="function")return X(H,I,Y,xo(ie),Te);if(ie.$$typeof===j)return X(H,I,Y,po(I,ie),Te);wo(I,ie)}return null}function Se(H,I,Y,ie){for(var Te=null,et=null,Ne=I,Be=I=0,We=null;Ne!==null&&Be<Y.length;Be++){Ne.index>Be?(We=Ne,Ne=null):We=Ne.sibling;var tt=K(H,Ne,Y[Be],ie);if(tt===null){Ne===null&&(Ne=We);break}n&&Ne&&tt.alternate===null&&r(H,Ne),I=g(tt,I,Be),et===null?Te=tt:et.sibling=tt,et=tt,Ne=We}if(Be===Y.length)return s(H,Ne),Je&&Ca(H,Be),Te;if(Ne===null){for(;Be<Y.length;Be++)Ne=se(H,Y[Be],ie),Ne!==null&&(I=g(Ne,I,Be),et===null?Te=Ne:et.sibling=Ne,et=Ne);return Je&&Ca(H,Be),Te}for(Ne=c(Ne);Be<Y.length;Be++)We=X(Ne,H,Be,Y[Be],ie),We!==null&&(n&&We.alternate!==null&&Ne.delete(We.key===null?Be:We.key),I=g(We,I,Be),et===null?Te=We:et.sibling=We,et=We);return n&&Ne.forEach(function(br){return r(H,br)}),Je&&Ca(H,Be),Te}function Fe(H,I,Y,ie){if(Y==null)throw Error(i(151));for(var Te=null,et=null,Ne=I,Be=I=0,We=null,tt=Y.next();Ne!==null&&!tt.done;Be++,tt=Y.next()){Ne.index>Be?(We=Ne,Ne=null):We=Ne.sibling;var br=K(H,Ne,tt.value,ie);if(br===null){Ne===null&&(Ne=We);break}n&&Ne&&br.alternate===null&&r(H,Ne),I=g(br,I,Be),et===null?Te=br:et.sibling=br,et=br,Ne=We}if(tt.done)return s(H,Ne),Je&&Ca(H,Be),Te;if(Ne===null){for(;!tt.done;Be++,tt=Y.next())tt=se(H,tt.value,ie),tt!==null&&(I=g(tt,I,Be),et===null?Te=tt:et.sibling=tt,et=tt);return Je&&Ca(H,Be),Te}for(Ne=c(Ne);!tt.done;Be++,tt=Y.next())tt=X(Ne,H,Be,tt.value,ie),tt!==null&&(n&&tt.alternate!==null&&Ne.delete(tt.key===null?Be:tt.key),I=g(tt,I,Be),et===null?Te=tt:et.sibling=tt,et=tt);return n&&Ne.forEach(function(qS){return r(H,qS)}),Je&&Ca(H,Be),Te}function mt(H,I,Y,ie){if(typeof Y=="object"&&Y!==null&&Y.type===A&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:e:{for(var Te=Y.key;I!==null;){if(I.key===Te){if(Te=Y.type,Te===A){if(I.tag===7){s(H,I.sibling),ie=m(I,Y.props.children),ie.return=H,H=ie;break e}}else if(I.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ee&&Vr(Te)===I.type){s(H,I.sibling),ie=m(I,Y.props),zs(ie,Y),ie.return=H,H=ie;break e}s(H,I);break}else r(H,I);I=I.sibling}Y.type===A?(ie=Ur(Y.props.children,H.mode,ie,Y.key),ie.return=H,H=ie):(ie=ho(Y.type,Y.key,Y.props,null,H.mode,ie),zs(ie,Y),ie.return=H,H=ie)}return v(H);case N:e:{for(Te=Y.key;I!==null;){if(I.key===Te)if(I.tag===4&&I.stateNode.containerInfo===Y.containerInfo&&I.stateNode.implementation===Y.implementation){s(H,I.sibling),ie=m(I,Y.children||[]),ie.return=H,H=ie;break e}else{s(H,I);break}else r(H,I);I=I.sibling}ie=Fu(Y,H.mode,ie),ie.return=H,H=ie}return v(H);case ee:return Y=Vr(Y),mt(H,I,Y,ie)}if($(Y))return Se(H,I,Y,ie);
vendor: 7,100 bytes, line 49
49if(D(Y)){if(Te=D(Y),typeof Te!="function")throw Error(i(150));return Y=Te.call(Y),Fe(H,I,Y,ie)}if(typeof Y.then=="function")return mt(H,I,xo(Y),ie);if(Y.$$typeof===j)return mt(H,I,po(H,Y),ie);wo(H,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,I!==null&&I.tag===6?(s(H,I.sibling),ie=m(I,Y),ie.return=H,H=ie):(s(H,I),ie=ju(Y,H.mode,ie),ie.return=H,H=ie),v(H)):s(H,I)}return function(H,I,Y,ie){try{Bs=0;var Te=mt(H,I,Y,ie);return ji=null,Te}catch(Ne){if(Ne===Ci||Ne===yo)throw Ne;var et=Mn(29,Ne,null,H.mode);return et.lanes=ie,et.return=H,et}finally{}}}var qr=w0(!0),v0=w0(!1),tr=!1;function Vu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gu(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function nr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ar(n,r,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(it&2)!==0){var m=c.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),c.pending=r,r=uo(n),r0(n,null,s),r}return co(n,c,r,s),uo(n)}function Ps(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var c=r.lanes;c&=n.pendingLanes,s|=c,r.lanes=s,ve(n,s)}}function qu(n,r){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var v={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=v:g=g.next=v,s=s.next}while(s!==null);g===null?m=g=r:g=g.next=r}else m=g=r;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var $u=!1;function Hs(){if($u){var n=Ti;if(n!==null)throw n}}function Vs(n,r,s,c){$u=!1;var m=n.updateQueue;tr=!1;var g=m.firstBaseUpdate,v=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var M=k,W=M.next;M.next=null,v===null?g=W:v.next=W,v=M;var re=n.alternate;re!==null&&(re=re.updateQueue,k=re.lastBaseUpdate,k!==v&&(k===null?re.firstBaseUpdate=W:k.next=W,re.lastBaseUpdate=M))}if(g!==null){var se=m.baseState;v=0,re=W=M=null,k=g;do{var K=k.lane&-536870913,X=K!==k.lane;if(X?(Ye&K)===K:(c&K)===K){K!==0&&K===_i&&($u=!0),re!==null&&(re=re.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Se=n,Fe=k;K=r;var mt=s;switch(Fe.tag){case 1:if(Se=Fe.payload,typeof Se=="function"){se=Se.call(mt,se,K);break e}se=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Fe.payload,K=typeof Se=="function"?Se.call(mt,se,K):Se,K==null)break e;se=b({},se,K);break e;case 2:tr=!0}}K=k.callback,K!==null&&(n.flags|=64,X&&(n.flags|=8192),X=m.callbacks,X===null?m.callbacks=[K]:X.push(K))}else X={lane:K,tag:k.tag,payload:k.payload,callback:k.callback,next:null},re===null?(W=re=X,M=se):re=re.next=X,v|=K;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;X=k,k=X.next,X.next=null,m.lastBaseUpdate=X,m.shared.pending=null}}while(!0);re===null&&(M=se),m.baseState=M,m.firstBaseUpdate=W,m.lastBaseUpdate=re,g===null&&(m.shared.lanes=0),or|=v,n.lanes=v,n.memoizedState=se}}function S0(n,r){if(typeof n!="function")throw Error(i(191,n));n.call(r)}function E0(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)S0(s[n],r)}var Fi=L(null),vo=L(0);function N0(n,r){n=za,S(vo,n),S(Fi,r),za=n|r.baseLanes}function Yu(){S(vo,za),S(Fi,Fi.current)}function Wu(){za=vo.current,F(Fi),F(vo)}var In=L(null),ta=null;function rr(n){var r=n.alternate;S(Lt,Lt.current&1),S(In,n),ta===null&&(r===null||Fi.current!==null||r.memoizedState!==null)&&(ta=n)}function Ku(n){S(Lt,Lt.current),S(In,n),ta===null&&(ta=n)}function k0(n){n.tag===22?(S(Lt,Lt.current),S(In,n),ta===null&&(ta=n)):ir()}function ir(){S(Lt,Lt.current),S(In,In.current)}function Un(n){F(In),ta===n&&(ta=null),F(Lt)}var Lt=L(0);function So(n){for(var r=n;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||th(s)||nh(s)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Oa=0,Ue=null,ht=null,Vt=null,Eo=!1,Oi=!1,$r=!1,No=0,Gs=0,Ri=null,Lv=0;function Ot(){throw Error(i(321))}function Ju(n,r){if(r===null)return!1;for(var s=0;s<r.length&&s<n.length;s++)if(!Ln(n[s],r[s]))return!1;return!0}function Xu(n,r,s,c,m,g){return Oa=g,Ue=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,P.H=n===null||n.memoizedState===null?op:hd,$r=!1,g=s(c,m),$r=!1,Oi&&(g=_0(r,s,c,m)),A0(n),g}function A0(n){P.H=Ys;var r=ht!==null&&ht.next!==null;if(Oa=0,Vt=ht=Ue=null,Eo=!1,Gs=0,Ri=null,r)throw Error(i(300));n===null||Gt||(n=n.dependencies,n!==null&&mo(n)&&(Gt=!0))}function _0(n,r,s,c){Ue=n;var m=0;do{if(Oi&&(Ri=null),Gs=0,Oi=!1,25<=m)throw Error(i(301));if(m+=1,Vt=ht=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}P.H=cp,g=r(s,c)}while(Oi);return g}function Mv(){var n=P.H,r=n.useState()[0];return r=typeof r.then=="function"?qs(r):r,n=n.useState()[0],(ht!==null?ht.memoizedState:null)!==n&&(Ue.flags|=1024),r}function Qu(){var n=No!==0;return No=0,n}function Zu(n,r,s){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~s}function ed(n){if(Eo){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}Eo=!1}Oa=0,Vt=ht=Ue=null,Oi=!1,Gs=No=0,Ri=null}function En(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Ue.memoizedState=Vt=n:Vt=Vt.next=n,Vt}function Mt(){if(ht===null){var n=Ue.alternate;n=n!==null?n.memoizedState:null}else n=ht.next;var r=Vt===null?Ue.memoizedState:Vt.next;if(r!==null)Vt=r,ht=n;else{if(n===null)throw Ue.alternate===null?Error(i(467)):Error(i(310));ht=n,n={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Vt===null?Ue.memoizedState=Vt=n:Vt=Vt.next=n}return Vt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qs(n){var r=Gs;return Gs+=1,Ri===null&&(Ri=[]),n=y0(Ri,n,r),r=Ue,(Vt===null?r.memoizedState:Vt.next)===null&&(r=r.alternate,P.H=r===null||r.memoizedState===null?op:hd),n}function Ao(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return qs(n);if(n.$$typeof===j)return on(n)}throw Error(i(438,String(n)))}function td(n){var r=null,s=Ue.updateQueue;if(s!==null&&(r=s.memoCache),r==null){var c=Ue.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(m){return m.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}
vendor: 13,693 bytes, line 49
49),s===null&&(s=ko(),Ue.updateQueue=s),s.memoCache=r,s=r.data[r.index],s===void 0)for(s=r.data[r.index]=Array(n),c=0;c<n;c++)s[c]=E;return r.index++,s}function Ra(n,r){return typeof r=="function"?r(n):r}function _o(n){var r=Mt();return nd(r,ht,n)}function nd(n,r,s){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=s;var m=n.baseQueue,g=c.pending;if(g!==null){if(m!==null){var v=m.next;m.next=g.next,g.next=v}r.baseQueue=m=g,c.pending=null}if(g=n.baseState,m===null)n.memoizedState=g;else{r=m.next;var k=v=null,M=null,W=r,re=!1;do{var se=W.lane&-536870913;if(se!==W.lane?(Ye&se)===se:(Oa&se)===se){var K=W.revertLane;if(K===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),se===_i&&(re=!0);else if((Oa&K)===K){W=W.next,K===_i&&(re=!0);continue}else se={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},M===null?(k=M=se,v=g):M=M.next=se,Ue.lanes|=K,or|=K;se=W.action,$r&&s(g,se),g=W.hasEagerState?W.eagerState:s(g,se)}else K={lane:se,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},M===null?(k=M=K,v=g):M=M.next=K,Ue.lanes|=se,or|=se;W=W.next}while(W!==null&&W!==r);if(M===null?v=g:M.next=k,!Ln(g,n.memoizedState)&&(Gt=!0,re&&(s=Ti,s!==null)))throw s;n.memoizedState=g,n.baseState=v,n.baseQueue=M,c.lastRenderedState=g}return m===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function ad(n){var r=Mt(),s=r.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=n;var c=s.dispatch,m=s.pending,g=r.memoizedState;if(m!==null){s.pending=null;var v=m=m.next;do g=n(g,v.action),v=v.next;while(v!==m);Ln(g,r.memoizedState)||(Gt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),s.lastRenderedState=g}return[g,c]}function T0(n,r,s){var c=Ue,m=Mt(),g=Je;if(g){if(s===void 0)throw Error(i(407));s=s()}else s=r();var v=!Ln((ht||m).memoizedState,s);if(v&&(m.memoizedState=s,Gt=!0),m=m.queue,sd(F0.bind(null,c,m,n),[n]),m.getSnapshot!==r||v||Vt!==null&&Vt.memoizedState.tag&1){if(c.flags|=2048,Di(9,{destroy:void 0},j0.bind(null,c,m,s,r),null),yt===null)throw Error(i(349));g||(Oa&127)!==0||C0(c,r,s)}return s}function C0(n,r,s){n.flags|=16384,n={getSnapshot:r,value:s},r=Ue.updateQueue,r===null?(r=ko(),Ue.updateQueue=r,r.stores=[n]):(s=r.stores,s===null?r.stores=[n]:s.push(n))}function j0(n,r,s,c){r.value=s,r.getSnapshot=c,O0(r)&&R0(n)}function F0(n,r,s){return s(function(){O0(r)&&R0(n)})}function O0(n){var r=n.getSnapshot;n=n.value;try{var s=r();return!Ln(n,s)}catch{return!0}}function R0(n){var r=Ir(n,2);r!==null&&Fn(r,n,2)}function rd(n){var r=En();if(typeof n=="function"){var s=n;if(n=s(),$r){Ft(!0);try{s()}finally{Ft(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:n},r}function D0(n,r,s,c){return n.baseState=s,nd(n,ht,typeof c=="function"?c:Ra)}function Iv(n,r,s,c,m){if(jo(n))throw Error(i(485));if(n=r.action,n!==null){var g={payload:m,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){g.listeners.push(v)}};P.T!==null?s(!0):g.isTransition=!1,c(g),s=r.pending,s===null?(g.next=r.pending=g,L0(r,g)):(g.next=s.next,r.pending=s.next=g)}}function L0(n,r){var s=r.action,c=r.payload,m=n.state;if(r.isTransition){var g=P.T,v={};P.T=v;try{var k=s(m,c),M=P.S;M!==null&&M(v,k),M0(n,r,k)}catch(W){id(n,r,W)}finally{g!==null&&v.types!==null&&(g.types=v.types),P.T=g}}else try{g=s(m,c),M0(n,r,g)}catch(W){id(n,r,W)}}function M0(n,r,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){I0(n,r,c)},function(c){return id(n,r,c)}):I0(n,r,s)}function I0(n,r,s){r.status="fulfilled",r.value=s,U0(r),n.state=s,r=n.pending,r!==null&&(s=r.next,s===r?n.pending=null:(s=s.next,r.next=s,L0(n,s)))}function id(n,r,s){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=s,U0(r),r=r.next;while(r!==c)}n.action=null}function U0(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function B0(n,r){return r}function z0(n,r){if(Je){var s=yt.formState;if(s!==null){e:{var c=Ue;if(Je){if(vt){t:{for(var m=vt,g=ea;m.nodeType!==8;){if(!g){m=null;break t}if(m=na(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){vt=na(m.nextSibling),c=m.data==="F!";break e}}Za(c)}c=!1}c&&(r=s[0])}}return s=En(),s.memoizedState=s.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B0,lastRenderedState:r},s.queue=c,s=ip.bind(null,Ue,c),c.dispatch=s,c=rd(!1),g=dd.bind(null,Ue,!1,c.queue),c=En(),m={state:r,dispatch:null,action:n,pending:null},c.queue=m,s=Iv.bind(null,Ue,m,g,s),m.dispatch=s,c.memoizedState=n,[r,s,!1]}function P0(n){var r=Mt();return H0(r,ht,n)}function H0(n,r,s){if(r=nd(n,r,B0)[0],n=_o(Ra)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=qs(r)}catch(v){throw v===Ci?yo:v}else c=r;r=Mt();var m=r.queue,g=m.dispatch;return s!==r.memoizedState&&(Ue.flags|=2048,Di(9,{destroy:void 0},Uv.bind(null,m,s),null)),[c,g,n]}function Uv(n,r){n.action=r}function V0(n){var r=Mt(),s=ht;if(s!==null)return H0(r,s,n);Mt(),r=r.memoizedState,s=Mt();var c=s.queue.dispatch;return s.memoizedState=n,[r,c,!1]}function Di(n,r,s,c){return n={tag:n,create:s,deps:c,inst:r,next:null},r=Ue.updateQueue,r===null&&(r=ko(),Ue.updateQueue=r),s=r.lastEffect,s===null?r.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,r.lastEffect=n),n}function G0(){return Mt().memoizedState}function To(n,r,s,c){var m=En();Ue.flags|=n,m.memoizedState=Di(1|r,{destroy:void 0},s,c===void 0?null:c)}function Co(n,r,s,c){var m=Mt();c=c===void 0?null:c;var g=m.memoizedState.inst;ht!==null&&c!==null&&Ju(c,ht.memoizedState.deps)?m.memoizedState=Di(r,g,s,c):(Ue.flags|=n,m.memoizedState=Di(1|r,g,s,c))}function q0(n,r){To(8390656,8,n,r)}function sd(n,r){Co(2048,8,n,r)}function Bv(n){Ue.flags|=4;var r=Ue.updateQueue;if(r===null)r=ko(),Ue.updateQueue=r,r.events=[n];else{var s=r.events;s===null?r.events=[n]:s.push(n)}}function $0(n){var r=Mt().memoizedState;return Bv({ref:r,nextImpl:n}),function(){if((it&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function Y0(n,r){return Co(4,2,n,r)}function W0(n,r){return Co(4,4,n,r)}function K0(n,r){if(typeof r=="function"){n=n();var s=r(n);return function(){typeof s=="function"?s():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function J0(n,r,s){s=s!=null?s.concat([n]):null,Co(4,4,K0.bind(null,r,n),s)}function ld(){}function X0(n,r){var s=Mt();r=r===void 0?null:r;var c=s.memoizedState;return r!==null&&Ju(r,c[1])?c[0]:(s.memoizedState=[n,r],n)}function Q0(n,r){var s=Mt();r=r===void 0?null:r;var c=s.memoizedState;if(r!==null&&Ju(r,c[1]))return c[0];if(c=n(),$r){Ft(!0);try{n()}finally{Ft(!1)}}return s.memoizedState=[c,r],c}function od(n,r,s){return s===void 0||(Oa&1073741824)!==0&&(Ye&261930)===0?n.memoizedState=r:(n.memoizedState=s,n=Zp(),Ue.lanes|=n,or|=n,s)}function Z0(n,r,s,c){return Ln(s,r)?s:Fi.current!==null?(n=od(n,s,c),Ln(n,r)||(Gt=!0),n):(Oa&42)===0||(Oa&1073741824)!==0&&(Ye&261930)===0?(Gt=!0,n.memoizedState=s):(n=Zp(),Ue.lanes|=n,or|=n,r)}function ep(n,r,s,c,m){var g=te.p;te.p=g!==0&&8>g?g:8;var v=P.T,k={};P.T=k,dd(n,!1,r,s);try{var M=m(),W=P.S;if(W!==null&&W(k,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var re=Dv(M,c);$s(n,r,re,Pn(n))}else $s(n,r,c,Pn(n))}catch(se){$s(n,r,{then:function(){},status:"rejected",reason:se},Pn())}finally{te.p=g,v!==null&&k.types!==null&&(v.types=k.types),P.T=v}}function zv(){}function cd(n,r,s,c){if(n.tag!==5)throw Error(i(476));var m=tp(n).queue;ep(n,m,r,fe,s===null?zv:function(){return np(n),s(c)})}function tp(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:fe},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function np(n){var r=tp(n);r.next===null&&(r=n.alternate.memoizedState),$s(n,r.next.queue,{},Pn())}function ud(){return on(cl)}function ap(){return Mt().memoizedState}function rp(){return Mt().memoizedState}function Pv(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=Pn();n=nr(s);var c=ar(r,n,s);c!==null&&(Fn(c,r,s),Ps(c,r,s)),r={cache:Bu()},n.payload=r;return}r=r.return}}function Hv(n,r,s){var c=Pn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},jo(n)?sp(r,s):(s=Tu(n,r,s,c),s!==null&&(Fn(s,n,c),lp(s,r,c)))}function ip(n,r,s){var c=Pn();$s(n,r,s,c)}function $s(n,r,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(jo(n))sp(r,m);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var v=r.lastRenderedState,k=g(v,s);if(m.hasEagerState=!0,m.eagerState=k,Ln(k,v))return co(n,r,m,0),yt===null&&oo(),!1}catch{}finally{}if(s=Tu(n,r,m,c),s!==null)return Fn(s,n,c),lp(s,r,c),!0}return!1}function dd(n,r,s,c){if(c={lane:2,revertLane:Vd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},jo(n)){if(r)throw Error(i(479))}else r=Tu(n,s,c,2),r!==null&&Fn(r,n,2)}function jo(n){var r=n.alternate;return n===Ue||r!==null&&r===Ue}function sp(n,r){Oi=Eo=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function lp(n,r,s){if((s&4194048)!==0){var c=r.lanes;c&=n.pendingLanes,s|=c,r.lanes=s,ve(n,s)}}var Ys={readContext:on,use:Ao,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useLayoutEffect:Ot,useInsertionEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useSyncExternalStore:Ot,useId:Ot,useHostTransitionStatus:Ot,useFormState:Ot,useActionState:Ot,useOptimistic:Ot,useMemoCache:Ot,useCacheRefresh:Ot};Ys.useEffectEvent=Ot;var op={readContext:on,use:Ao,useCallback:function(n,r){return En().memoizedState=[n,r===void 0?null:r],n},useContext:on,useEffect:q0,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,To(4194308,4,K0.bind(null,r,n),s)},useLayoutEffect:function(n,r){return To(4194308,4,n,r)},useInsertionEffect:function(n,r){To(4,2,n,r)},useMemo:function(n,r){var s=En();r=r===void 0?null:r;var c=n();if($r){Ft(!0);try{n()}finally{Ft(!1)}}return s.memoizedState=[c,r],c},useReducer:function(n,r,s){var c=En();if(s!==void 0){var m=s(r);if($r){Ft(!0);try{s(r)}finally{Ft(!1)}}}else m=r;return c.memoizedState=c.baseState=m,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:m},c.queue=n,n=n.dispatch=Hv.bind(null,Ue,n),[c.memoizedState,n]},useRef:function(n){var r=En();return n={current:n},r.memoizedState=n},useState:function(n){n=rd(n);var r=n.queue,s=ip.bind(null,Ue,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:ld,useDeferredValue:function(n,r){var s=En();return od(s,n,r)},useTransition:function(){var n=rd(!1);return n=ep.bind(null,Ue,n.queue,!0,!1),En().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var c=Ue,m=En();if(Je){if(s===void 0)throw Error(i(407));s=s()}else{if(s=r(),yt===null)throw Error(i(349));(Ye&127)!==0||C0(c,r,s)}m.memoizedState=s;var g={value:s,getSnapshot:r};return m.queue=g,q0(F0.bind(null,c,g,n),[n]),c.flags|=2048,Di(9,{destroy:void 0},j0.bind(null,c,g,s,r),null),s},useId:function(){var n=En(),r=yt.identifierPrefix;if(Je){var s=ya,c=ga;s=(c&~(1<<32-be(c)-1)).toString(32)+s,r="_"+r+"R_"+s,s=No++,0<s&&(r+="H"+s.toString(32)),r+="_"}else s=Lv++,r="_"+r+"r_"+s.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:ud,useFormState:z0,useActionState:z0,useOptimistic:function(n){var r=En();r.memoizedState=r.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=s,r=dd.bind(null,Ue,!0,s),s.dispatch=r,[n,r]},useMemoCache:td,useCacheRefresh:function(){return En().memoizedState=Pv.bind(null,Ue)},useEffectEvent:function(n){var r=En(),s={impl:n};return r.memoizedState=s,function(){if((it&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}},hd={readContext:on,use:Ao,useCallback:X0,useContext:on,useEffect:sd,useImperativeHandle:J0,useInsertionEffect:Y0,useLayoutEffect:W0,useMemo:Q0,useReducer:_o,useRef:G0,useState:function(){return _o(Ra)},useDebugValue:ld,useDeferredValue:function(n,r){var s=Mt();return Z0(s,ht.memoizedState,n,r)},useTransition:function(){var n=_o(Ra)[0],r=Mt().memoizedState;return[typeof n=="boolean"?n:qs(n),r]},useSyncExternalStore:T0,useId:ap,useHostTransitionStatus:ud,useFormState:P0,useActionState:P0,useOptimistic:function(n,r){var s=Mt();return D0(s,ht,n,r)},useMemoCache:td,useCacheRefresh:rp};hd.useEffectEvent=$0;var cp={readContext:on,use:Ao,useCallback:X0,useContext:on,useEffect:sd,useImperativeHandle:J0,useInsertionEffect:Y0,useLayoutEffect:W0,useMemo:Q0,useReducer:ad,useRef:G0,useState:function(){return ad(Ra)},useDebugValue:ld,useDeferredValue:function(n,r){var s=Mt();return ht===null?od(s,n,r):Z0(s,ht.memoizedState,n,r)},useTransition:function(){var n=ad(Ra)[0],r=Mt().memoizedState;return[typeof n=="boolean"?n:qs(n),r]},useSyncExternalStore:T0,useId:ap,useHostTransitionStatus:ud,useFormState:V0,useActionState:V0,useOptimistic:function(n,r){var s=Mt();return ht!==null?D0(s,ht,n,r):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:td,useCacheRefresh:rp};cp.useEffectEvent=$0;function fd(n,r,s,c){r=n.memoizedState,s=s(c,r),s=s==null?r:b({},r,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}
vendor: 5,743 bytes, line 49
49var md={enqueueSetState:function(n,r,s){n=n._reactInternals;var c=Pn(),m=nr(c);m.payload=r,s!=null&&(m.callback=s),r=ar(n,m,c),r!==null&&(Fn(r,n,c),Ps(r,n,c))},enqueueReplaceState:function(n,r,s){n=n._reactInternals;var c=Pn(),m=nr(c);m.tag=1,m.payload=r,s!=null&&(m.callback=s),r=ar(n,m,c),r!==null&&(Fn(r,n,c),Ps(r,n,c))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var s=Pn(),c=nr(s);c.tag=2,r!=null&&(c.callback=r),r=ar(n,c,s),r!==null&&(Fn(r,n,s),Ps(r,n,s))}};function up(n,r,s,c,m,g,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,v):r.prototype&&r.prototype.isPureReactComponent?!Rs(s,c)||!Rs(m,g):!0}function dp(n,r,s,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,c),r.state!==n&&md.enqueueReplaceState(r,r.state,null)}function Yr(n,r){var s=r;if("ref"in r){s={};for(var c in r)c!=="ref"&&(s[c]=r[c])}if(n=n.defaultProps){s===r&&(s=b({},s));for(var m in n)s[m]===void 0&&(s[m]=n[m])}return s}function hp(n){lo(n)}function fp(n){console.error(n)}function mp(n){lo(n)}function Fo(n,r){try{var s=n.onUncaughtError;s(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function pp(n,r,s){try{var c=n.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function pd(n,r,s){return s=nr(s),s.tag=3,s.payload={element:null},s.callback=function(){Fo(n,r)},s}function gp(n){return n=nr(n),n.tag=3,n}function yp(n,r,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=c.value;n.payload=function(){return m(g)},n.callback=function(){pp(r,s,c)}}var v=s.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){pp(r,s,c),typeof m!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function Vv(n,r,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=s.alternate,r!==null&&Ai(r,s,m,!0),s=In.current,s!==null){switch(s.tag){case 31:case 13:return ta===null?Vo():s.alternate===null&&Rt===0&&(Rt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===bo?s.flags|=16384:(r=s.updateQueue,r===null?s.updateQueue=new Set([c]):r.add(c),zd(n,c,m)),!1;case 22:return s.flags|=65536,c===bo?s.flags|=16384:(r=s.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=r):(s=r.retryQueue,s===null?r.retryQueue=new Set([c]):s.add(c)),zd(n,c,m)),!1}throw Error(i(435,s.tag))}return zd(n,c,m),Vo(),!1}if(Je)return r=In.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=m,c!==Du&&(n=Error(i(422),{cause:c}),Ms(Xn(n,s)))):(c!==Du&&(r=Error(i(423),{cause:c}),Ms(Xn(r,s))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,c=Xn(c,s),m=pd(n.stateNode,c,m),qu(n,m),Rt!==4&&(Rt=2)),!1;var g=Error(i(520),{cause:c});if(g=Xn(g,s),tl===null?tl=[g]:tl.push(g),Rt!==4&&(Rt=2),r===null)return!0;c=Xn(c,s),s=r;do{switch(s.tag){case 3:return s.flags|=65536,n=m&-m,s.lanes|=n,n=pd(s.stateNode,c,n),qu(s,n),!1;case 1:if(r=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(cr===null||!cr.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=gp(m),yp(m,n,s,c),qu(s,m),!1}s=s.return}while(s!==null);return!1}var gd=Error(i(461)),Gt=!1;function cn(n,r,s,c){r.child=n===null?v0(r,null,s,c):qr(r,n.child,s,c)}function bp(n,r,s,c,m){s=s.render;var g=r.ref;if("ref"in c){var v={};for(var k in c)k!=="ref"&&(v[k]=c[k])}else v=c;return Pr(r),c=Xu(n,r,s,v,g,m),k=Qu(),n!==null&&!Gt?(Zu(n,r,m),Da(n,r,m)):(Je&&k&&Ou(r),r.flags|=1,cn(n,r,c,m),r.child)}function xp(n,r,s,c,m){if(n===null){var g=s.type;return typeof g=="function"&&!Cu(g)&&g.defaultProps===void 0&&s.compare===null?(r.tag=15,r.type=g,wp(n,r,g,c,m)):(n=ho(s.type,null,c,r,r.mode,m),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,!Nd(n,m)){var v=g.memoizedProps;if(s=s.compare,s=s!==null?s:Rs,s(v,c)&&n.ref===r.ref)return Da(n,r,m)}return r.flags|=1,n=Ta(g,c),n.ref=r.ref,n.return=r,r.child=n}function wp(n,r,s,c,m){if(n!==null){var g=n.memoizedProps;if(Rs(g,c)&&n.ref===r.ref)if(Gt=!1,r.pendingProps=c=g,Nd(n,m))(n.flags&131072)!==0&&(Gt=!0);else return r.lanes=n.lanes,Da(n,r,m)}return yd(n,r,s,c,m)}function vp(n,r,s,c){var m=c.children,g=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((r.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,n!==null){for(c=r.child=n.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~g}else c=0,r.child=null;return Sp(n,r,g,s,c)}if((s&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&go(r,g!==null?g.cachePool:null),g!==null?N0(r,g):Yu(),k0(r);else return c=r.lanes=536870912,Sp(n,r,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(go(r,g.cachePool),N0(r,g),ir(),r.memoizedState=null):(n!==null&&go(r,null),Yu(),ir());return cn(n,r,m,s),r.child}function Ws(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Sp(n,r,s,c,m){var g=Pu();return g=g===null?null:{parent:Ht._currentValue,pool:g},r.memoizedState={baseLanes:s,cachePool:g},n!==null&&go(r,null),Yu(),k0(r),n!==null&&Ai(n,r,c,!0),r.childLanes=m,null}function Oo(n,r){return r=Do({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Ep(n,r,s){return qr(r,n.child,null,s),n=Oo(r,r.pendingProps),n.flags|=2,Un(r),r.memoizedState=null,n}
vendor: 5,649 bytes, line 49
49function Gv(n,r,s){var c=r.pendingProps,m=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Je){if(c.mode==="hidden")return n=Oo(r,c),r.lanes=536870912,Ws(null,n);if(Ku(r),(n=vt)?(n=Lg(n,ea),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Xa!==null?{id:ga,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},s=s0(n),s.return=r,r.child=s,ln=r,vt=null)):n=null,n===null)throw Za(r);return r.lanes=536870912,null}return Oo(r,c)}var g=n.memoizedState;if(g!==null){var v=g.dehydrated;if(Ku(r),m)if(r.flags&256)r.flags&=-257,r=Ep(n,r,s);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(i(558));else if(Gt||Ai(n,r,s,!1),m=(s&n.childLanes)!==0,Gt||m){if(c=yt,c!==null&&(v=Pe(c,s),v!==0&&v!==g.retryLane))throw g.retryLane=v,Ir(n,v),Fn(c,n,v),gd;Vo(),r=Ep(n,r,s)}else n=g.treeContext,vt=na(v.nextSibling),ln=r,Je=!0,Qa=null,ea=!1,n!==null&&c0(r,n),r=Oo(r,c),r.flags|=4096;return r}return n=Ta(n.child,{mode:c.mode,children:c.children}),n.ref=r.ref,r.child=n,n.return=r,n}function Ro(n,r){var s=r.ref;if(s===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(n===null||n.ref!==s)&&(r.flags|=4194816)}}function yd(n,r,s,c,m){return Pr(r),s=Xu(n,r,s,c,void 0,m),c=Qu(),n!==null&&!Gt?(Zu(n,r,m),Da(n,r,m)):(Je&&c&&Ou(r),r.flags|=1,cn(n,r,s,m),r.child)}function Np(n,r,s,c,m,g){return Pr(r),r.updateQueue=null,s=_0(r,c,s,m),A0(n),c=Qu(),n!==null&&!Gt?(Zu(n,r,g),Da(n,r,g)):(Je&&c&&Ou(r),r.flags|=1,cn(n,r,s,g),r.child)}function kp(n,r,s,c,m){if(Pr(r),r.stateNode===null){var g=Si,v=s.contextType;typeof v=="object"&&v!==null&&(g=on(v)),g=new s(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=md,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},Vu(r),v=s.contextType,g.context=typeof v=="object"&&v!==null?on(v):Si,g.state=r.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(fd(r,s,v,c),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(v=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),v!==g.state&&md.enqueueReplaceState(g,g.state,null),Vs(r,c,g,m),Hs(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(n===null){g=r.stateNode;var k=r.memoizedProps,M=Yr(s,k);g.props=M;var W=g.context,re=s.contextType;v=Si,typeof re=="object"&&re!==null&&(v=on(re));var se=s.getDerivedStateFromProps;re=typeof se=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=r.pendingProps!==k,re||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||W!==v)&&dp(r,g,c,v),tr=!1;var K=r.memoizedState;g.state=K,Vs(r,c,g,m),Hs(),W=r.memoizedState,k||K!==W||tr?(typeof se=="function"&&(fd(r,s,se,c),W=r.memoizedState),(M=tr||up(r,s,M,c,K,W,v))?(re||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=W),g.props=c,g.state=W,g.context=v,c=M):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,Gu(n,r),v=r.memoizedProps,re=Yr(s,v),g.props=re,se=r.pendingProps,K=g.context,W=s.contextType,M=Si,typeof W=="object"&&W!==null&&(M=on(W)),k=s.getDerivedStateFromProps,(W=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(v!==se||K!==M)&&dp(r,g,c,M),tr=!1,K=r.memoizedState,g.state=K,Vs(r,c,g,m),Hs();var X=r.memoizedState;v!==se||K!==X||tr||n!==null&&n.dependencies!==null&&mo(n.dependencies)?(typeof k=="function"&&(fd(r,s,k,c),X=r.memoizedState),(re=tr||up(r,s,re,c,K,X,M)||n!==null&&n.dependencies!==null&&mo(n.dependencies))?(W||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,X,M),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,X,M)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||v===n.memoizedProps&&K===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&K===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=X),g.props=c,g.state=X,g.context=M,c=re):(typeof g.componentDidUpdate!="function"||v===n.memoizedProps&&K===n.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&K===n.memoizedState||(r.flags|=1024),c=!1)}return g=c,Ro(n,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,n!==null&&c?(r.child=qr(r,n.child,null,m),r.child=qr(r,null,s,m)):cn(n,r,s,m),r.memoizedState=g.state,n=r.child):n=Da(n,r,m),n}function Ap(n,r,s,c){return Br(),r.flags|=256,cn(n,r,s,c),r.child}var bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(n){return{baseLanes:n,cachePool:p0()}}function wd(n,r,s){return n=n!==null?n.childLanes&~s:0,r&&(n|=zn),n}
vendor: 5,546 bytes, line 49
49function _p(n,r,s){var c=r.pendingProps,m=!1,g=(r.flags&128)!==0,v;if((v=g)||(v=n!==null&&n.memoizedState===null?!1:(Lt.current&2)!==0),v&&(m=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,n===null){if(Je){if(m?rr(r):ir(),(n=vt)?(n=Lg(n,ea),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:Xa!==null?{id:ga,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},s=s0(n),s.return=r,r.child=s,ln=r,vt=null)):n=null,n===null)throw Za(r);return nh(n)?r.lanes=32:r.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(ir(),m=r.mode,k=Do({mode:"hidden",children:k},m),c=Ur(c,m,s,null),k.return=r,c.return=r,k.sibling=c,r.child=k,c=r.child,c.memoizedState=xd(s),c.childLanes=wd(n,v,s),r.memoizedState=bd,Ws(null,c)):(rr(r),vd(r,k))}var M=n.memoizedState;if(M!==null&&(k=M.dehydrated,k!==null)){if(g)r.flags&256?(rr(r),r.flags&=-257,r=Sd(n,r,s)):r.memoizedState!==null?(ir(),r.child=n.child,r.flags|=128,r=null):(ir(),k=c.fallback,m=r.mode,c=Do({mode:"visible",children:c.children},m),k=Ur(k,m,s,null),k.flags|=2,c.return=r,k.return=r,c.sibling=k,r.child=c,qr(r,n.child,null,s),c=r.child,c.memoizedState=xd(s),c.childLanes=wd(n,v,s),r.memoizedState=bd,r=Ws(null,c));else if(rr(r),nh(k)){if(v=k.nextSibling&&k.nextSibling.dataset,v)var W=v.dgst;v=W,c=Error(i(419)),c.stack="",c.digest=v,Ms({value:c,source:null,stack:null}),r=Sd(n,r,s)}else if(Gt||Ai(n,r,s,!1),v=(s&n.childLanes)!==0,Gt||v){if(v=yt,v!==null&&(c=Pe(v,s),c!==0&&c!==M.retryLane))throw M.retryLane=c,Ir(n,c),Fn(v,n,c),gd;th(k)||Vo(),r=Sd(n,r,s)}else th(k)?(r.flags|=192,r.child=n.child,r=null):(n=M.treeContext,vt=na(k.nextSibling),ln=r,Je=!0,Qa=null,ea=!1,n!==null&&c0(r,n),r=vd(r,c.children),r.flags|=4096);return r}return m?(ir(),k=c.fallback,m=r.mode,M=n.child,W=M.sibling,c=Ta(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,W!==null?k=Ta(W,k):(k=Ur(k,m,s,null),k.flags|=2),k.return=r,c.return=r,c.sibling=k,r.child=c,Ws(null,c),c=r.child,k=n.child.memoizedState,k===null?k=xd(s):(m=k.cachePool,m!==null?(M=Ht._currentValue,m=m.parent!==M?{parent:M,pool:M}:m):m=p0(),k={baseLanes:k.baseLanes|s,cachePool:m}),c.memoizedState=k,c.childLanes=wd(n,v,s),r.memoizedState=bd,Ws(n.child,c)):(rr(r),s=n.child,n=s.sibling,s=Ta(s,{mode:"visible",children:c.children}),s.return=r,s.sibling=null,n!==null&&(v=r.deletions,v===null?(r.deletions=[n],r.flags|=16):v.push(n)),r.child=s,r.memoizedState=null,s)}function vd(n,r){return r=Do({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function Do(n,r){return n=Mn(22,n,null,r),n.lanes=0,n}function Sd(n,r,s){return qr(r,n.child,null,s),n=vd(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Tp(n,r,s){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Iu(n.return,r,s)}function Ed(n,r,s,c,m,g){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:g}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=s,v.tailMode=m,v.treeForkCount=g)}function Cp(n,r,s){var c=r.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var v=Lt.current,k=(v&2)!==0;if(k?(v=v&1|2,r.flags|=128):v&=1,S(Lt,v),cn(n,r,c,s),c=Je?Ls:0,!k&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Tp(n,s,r);else if(n.tag===19)Tp(n,s,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(m){case"forwards":for(s=r.child,m=null;s!==null;)n=s.alternate,n!==null&&So(n)===null&&(m=s),s=s.sibling;s=m,s===null?(m=r.child,r.child=null):(m=s.sibling,s.sibling=null),Ed(r,!1,m,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=r.child,r.child=null;m!==null;){if(n=m.alternate,n!==null&&So(n)===null){r.child=m;break}n=m.sibling,m.sibling=s,s=m,m=n}Ed(r,!0,s,null,g,c);break;case"together":Ed(r,!1,null,null,void 0,c);break;default:r.memoizedState=null}return r.child}function Da(n,r,s){if(n!==null&&(r.dependencies=n.dependencies),or|=r.lanes,(s&r.childLanes)===0)if(n!==null){if(Ai(n,r,s,!1),(s&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(i(153));if(r.child!==null){for(n=r.child,s=Ta(n,n.pendingProps),r.child=s,s.return=r;n.sibling!==null;)n=n.sibling,s=s.sibling=Ta(n,n.pendingProps),s.return=r;s.sibling=null}return r.child}function Nd(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&mo(n)))}function qv(n,r,s){switch(r.tag){case 3:xe(r,r.stateNode.containerInfo),er(r,Ht,n.memoizedState.cache),Br();break;case 27:case 5:Ie(r);break;case 4:xe(r,r.stateNode.containerInfo);break;case 10:er(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Ku(r),null;break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(rr(r),r.flags|=128,null):(s&r.child.childLanes)!==0?_p(n,r,s):(rr(r),n=Da(n,r,s),n!==null?n.sibling:null);rr(r);break;case 19:var m=(n.flags&128)!==0;if(c=(s&r.childLanes)!==0,c||(Ai(n,r,s,!1),c=(s&r.childLanes)!==0),m){if(c)return Cp(n,r,s);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),S(Lt,Lt.current),c)break;return null;case 22:return r.lanes=0,vp(n,r,s,r.pendingProps);case 24:er(r,Ht,n.memoizedState.cache)}return Da(n,r,s)}function jp(n,r,s){if(n!==null)if(n.memoizedProps!==r.pendingProps)Gt=!0;else{if(!Nd(n,s)&&(r.flags&128)===0)return Gt=!1,qv(n,r,s);Gt=(n.flags&131072)!==0}
vendor: 1,561 bytes, line 49
49else Gt=!1,Je&&(r.flags&1048576)!==0&&o0(r,Ls,r.index);switch(r.lanes=0,r.tag){case 16:e:{var c=r.pendingProps;if(n=Vr(r.elementType),r.type=n,typeof n=="function")Cu(n)?(c=Yr(n,c),r.tag=1,r=kp(null,r,n,c,s)):(r.tag=0,r=yd(null,r,n,c,s));else{if(n!=null){var m=n.$$typeof;if(m===B){r.tag=11,r=bp(null,r,n,c,s);break e}else if(m===V){r.tag=14,r=xp(null,r,n,c,s);break e}}throw r=z(n)||n,Error(i(306,r,""))}}return r;case 0:return yd(n,r,r.type,r.pendingProps,s);case 1:return c=r.type,m=Yr(c,r.pendingProps),kp(n,r,c,m,s);case 3:e:{if(xe(r,r.stateNode.containerInfo),n===null)throw Error(i(387));c=r.pendingProps;var g=r.memoizedState;m=g.element,Gu(n,r),Vs(r,c,null,s);var v=r.memoizedState;if(c=v.cache,er(r,Ht,c),c!==g.cache&&Uu(r,[Ht],s,!0),Hs(),c=v.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Ap(n,r,c,s);break e}else if(c!==m){m=Xn(Error(i(424)),r),Ms(m),r=Ap(n,r,c,s);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(vt=na(n.firstChild),ln=r,Je=!0,Qa=null,ea=!0,s=v0(r,null,c,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Br(),c===m){r=Da(n,r,s);break e}cn(n,r,c,s)}r=r.child}return r;case 26:return Ro(n,r),n===null?(s=Pg(r.type,null,r.pendingProps,null))?r.memoizedState=s:Je||(s=r.type,n=r.pendingProps,c=Jo(pe.current).createElement(s),c[Le]=r,c[Qe]=n,un(c,s,n),nn(c),r.stateNode=c):r.memoizedState=Pg(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;
vendor: 4,787 bytes, line 49
49case 27:return Ie(r),n===null&&Je&&(c=r.stateNode=Ug(r.type,r.pendingProps,pe.current),ln=r,ea=!0,m=vt,fr(r.type)?(ah=m,vt=na(c.firstChild)):vt=m),cn(n,r,r.pendingProps.children,s),Ro(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Je&&((m=c=vt)&&(c=vS(c,r.type,r.pendingProps,ea),c!==null?(r.stateNode=c,ln=r,vt=na(c.firstChild),ea=!1,m=!0):m=!1),m||Za(r)),Ie(r),m=r.type,g=r.pendingProps,v=n!==null?n.memoizedProps:null,c=g.children,Qd(m,g)?c=null:v!==null&&Qd(m,v)&&(r.flags|=32),r.memoizedState!==null&&(m=Xu(n,r,Mv,null,null,s),cl._currentValue=m),Ro(n,r),cn(n,r,c,s),r.child;case 6:return n===null&&Je&&((n=s=vt)&&(s=SS(s,r.pendingProps,ea),s!==null?(r.stateNode=s,ln=r,vt=null,n=!0):n=!1),n||Za(r)),null;case 13:return _p(n,r,s);case 4:return xe(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=qr(r,null,c,s):cn(n,r,c,s),r.child;case 11:return bp(n,r,r.type,r.pendingProps,s);case 7:return cn(n,r,r.pendingProps,s),r.child;case 8:return cn(n,r,r.pendingProps.children,s),r.child;case 12:return cn(n,r,r.pendingProps.children,s),r.child;case 10:return c=r.pendingProps,er(r,r.type,c.value),cn(n,r,c.children,s),r.child;case 9:return m=r.type._context,c=r.pendingProps.children,Pr(r),m=on(m),c=c(m),r.flags|=1,cn(n,r,c,s),r.child;case 14:return xp(n,r,r.type,r.pendingProps,s);case 15:return wp(n,r,r.type,r.pendingProps,s);case 19:return Cp(n,r,s);case 31:return Gv(n,r,s);case 22:return vp(n,r,s,r.pendingProps);case 24:return Pr(r),c=on(Ht),n===null?(m=Pu(),m===null&&(m=yt,g=Bu(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),r.memoizedState={parent:c,cache:m},Vu(r),er(r,Ht,m)):((n.lanes&s)!==0&&(Gu(n,r),Vs(r,null,null,s),Hs()),m=n.memoizedState,g=r.memoizedState,m.parent!==c?(m={parent:c,cache:c},r.memoizedState=m,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=m),er(r,Ht,c)):(c=g.cache,er(r,Ht,c),c!==m.cache&&Uu(r,[Ht],s,!0))),cn(n,r,r.pendingProps.children,s),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function La(n){n.flags|=4}function kd(n,r,s,c,m){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(m&335544128)===m)if(n.stateNode.complete)n.flags|=8192;else if(ag())n.flags|=8192;else throw Gr=bo,Hu}else n.flags&=-16777217}function Fp(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!$g(r))if(ag())n.flags|=8192;else throw Gr=bo,Hu}function Lo(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?Ka():536870912,n.lanes|=r,Ui|=r)}function Ks(n,r){if(!Je)switch(n.tailMode){case"hidden":r=n.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function St(n){var r=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(r)for(var m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=c,n.childLanes=s,r}function $v(n,r,s){var c=r.pendingProps;switch(Ru(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(r),null;case 1:return St(r),null;case 3:return s=r.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),Fa(Ht),we(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(ki(r)?La(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Lu())),St(r),null;case 26:var m=r.type,g=r.memoizedState;return n===null?(La(r),g!==null?(St(r),Fp(r,g)):(St(r),kd(r,m,null,c,s))):g?g!==n.memoizedState?(La(r),St(r),Fp(r,g)):(St(r),r.flags&=-16777217):(n=n.memoizedProps,n!==c&&La(r),St(r),kd(r,m,n,c,s)),null;case 27:if(jt(r),s=pe.current,m=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&La(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return St(r),null}n=de.current,ki(r)?u0(r):(n=Ug(m,c,s),r.stateNode=n,La(r))}return St(r),null;case 5:if(jt(r),m=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==c&&La(r);else{if(!c){if(r.stateNode===null)throw Error(i(166));return St(r),null}if(g=de.current,ki(r))u0(r);else{var v=Jo(pe.current);switch(g){case 1:g=v.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=v.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=v.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=v.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=v.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;
vendor: 20,334 bytes, line 49
49case"select":g=typeof c.is=="string"?v.createElement("select",{is:c.is}):v.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?v.createElement(m,{is:c.is}):v.createElement(m)}}g[Le]=r,g[Qe]=c;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)g.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=g;e:switch(un(g,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&La(r)}}return St(r),kd(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==c&&La(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(i(166));if(n=pe.current,ki(r)){if(n=r.stateNode,s=r.memoizedProps,c=null,m=ln,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}n[Le]=r,n=!!(n.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||_g(n.nodeValue,s)),n||Za(r,!0)}else n=Jo(n).createTextNode(c),n[Le]=r,r.stateNode=n}return St(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(c=ki(r),s!==null){if(n===null){if(!c)throw Error(i(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[Le]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;St(r),n=!1}else s=Lu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?(Un(r),r):(Un(r),null);if((r.flags&128)!==0)throw Error(i(558))}return St(r),null;case 13:if(c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(m=ki(r),c!==null&&c.dehydrated!==null){if(n===null){if(!m)throw Error(i(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(i(317));m[Le]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;St(r),m=!1}else m=Lu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(Un(r),r):(Un(r),null)}return Un(r),(r.flags&128)!==0?(r.lanes=s,r):(s=c!==null,n=n!==null&&n.memoizedState!==null,s&&(c=r.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==m&&(c.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),Lo(r,r.updateQueue),St(r),null);case 4:return we(),n===null&&Yd(r.stateNode.containerInfo),St(r),null;case 10:return Fa(r.type),St(r),null;case 19:if(F(Lt),c=r.memoizedState,c===null)return St(r),null;if(m=(r.flags&128)!==0,g=c.rendering,g===null)if(m)Ks(c,!1);else{if(Rt!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=So(n),g!==null){for(r.flags|=128,Ks(c,!1),n=g.updateQueue,r.updateQueue=n,Lo(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)i0(s,n),s=s.sibling;return S(Lt,Lt.current&1|2),Je&&Ca(r,c.treeForkCount),r.child}n=n.sibling}c.tail!==null&&lt()>zo&&(r.flags|=128,m=!0,Ks(c,!1),r.lanes=4194304)}else{if(!m)if(n=So(g),n!==null){if(r.flags|=128,m=!0,n=n.updateQueue,r.updateQueue=n,Lo(r,n),Ks(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Je)return St(r),null}else 2*lt()-c.renderingStartTime>zo&&s!==536870912&&(r.flags|=128,m=!0,Ks(c,!1),r.lanes=4194304);c.isBackwards?(g.sibling=r.child,r.child=g):(n=c.last,n!==null?n.sibling=g:r.child=g,c.last=g)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=lt(),n.sibling=null,s=Lt.current,S(Lt,m?s&1|2:s&1),Je&&Ca(r,c.treeForkCount),n):(St(r),null);case 22:case 23:return Un(r),Wu(),c=r.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(s&536870912)!==0&&(r.flags&128)===0&&(St(r),r.subtreeFlags&6&&(r.flags|=8192)):St(r),s=r.updateQueue,s!==null&&Lo(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==s&&(r.flags|=2048),n!==null&&F(Hr),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),Fa(Ht),St(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function Yv(n,r){switch(Ru(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Fa(Ht),we(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return jt(r),null;case 31:if(r.memoizedState!==null){if(Un(r),r.alternate===null)throw Error(i(340));Br()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Un(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(i(340));Br()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return F(Lt),null;case 4:return we(),null;case 10:return Fa(r.type),null;case 22:case 23:return Un(r),Wu(),n!==null&&F(Hr),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Fa(Ht),null;case 25:return null;default:return null}}function Op(n,r){switch(Ru(r),r.tag){case 3:Fa(Ht),we();break;case 26:case 27:case 5:jt(r);break;case 4:we();break;case 31:r.memoizedState!==null&&Un(r);break;case 13:Un(r);break;case 19:F(Lt);break;case 10:Fa(r.type);break;case 22:case 23:Un(r),Wu(),n!==null&&F(Hr);break;case 24:Fa(Ht)}}function Js(n,r){try{var s=r.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&n)===n){c=void 0;var g=s.create,v=s.inst;c=g(),v.destroy=c}s=s.next}while(s!==m)}}catch(k){ut(r,r.return,k)}}function sr(n,r,s){try{var c=r.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var g=m.next;c=g;do{if((c.tag&n)===n){var v=c.inst,k=v.destroy;if(k!==void 0){v.destroy=void 0,m=r;var M=s,W=k;try{W()}catch(re){ut(m,M,re)}}}c=c.next}while(c!==g)}}catch(re){ut(r,r.return,re)}}function Rp(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{E0(r,s)}catch(c){ut(n,n.return,c)}}}function Dp(n,r,s){s.props=Yr(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(c){ut(n,r,c)}}function Xs(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof s=="function"?n.refCleanup=s(c):s.current=c}}catch(m){ut(n,r,m)}}function ba(n,r){var s=n.ref,c=n.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){ut(n,r,m)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){ut(n,r,m)}else s.current=null}function Lp(n){var r=n.type,s=n.memoizedProps,c=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){ut(n,n.return,m)}}function Ad(n,r,s){try{var c=n.stateNode;pS(c,n.type,s,r),c[Qe]=r}catch(m){ut(n,n.return,m)}}function Mp(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&fr(n.type)||n.tag===4}function _d(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Mp(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&fr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Td(n,r,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(n),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Aa));else if(c!==4&&(c===27&&fr(n.type)&&(s=n.stateNode,r=null),n=n.child,n!==null))for(Td(n,r,s),n=n.sibling;n!==null;)Td(n,r,s),n=n.sibling}function Mo(n,r,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(c!==4&&(c===27&&fr(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(Mo(n,r,s),n=n.sibling;n!==null;)Mo(n,r,s),n=n.sibling}function Ip(n){var r=n.stateNode,s=n.memoizedProps;try{for(var c=n.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);un(r,c,s),r[Le]=n,r[Qe]=s}catch(g){ut(n,n.return,g)}}var Ma=!1,qt=!1,Cd=!1,Up=typeof WeakSet=="function"?WeakSet:Set,an=null;function Wv(n,r){if(n=n.containerInfo,Jd=ac,n=Jm(n),Su(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var v=0,k=-1,M=-1,W=0,re=0,se=n,K=null;t:for(;;){for(var X;se!==s||m!==0&&se.nodeType!==3||(k=v+m),se!==g||c!==0&&se.nodeType!==3||(M=v+c),se.nodeType===3&&(v+=se.nodeValue.length),(X=se.firstChild)!==null;)K=se,se=X;for(;;){if(se===n)break t;if(K===s&&++W===m&&(k=v),K===g&&++re===c&&(M=v),(X=se.nextSibling)!==null)break;se=K,K=se.parentNode}se=X}s=k===-1||M===-1?null:{start:k,end:M}}else s=null}s=s||{start:0,end:0}}else s=null;for(Xd={focusedElem:n,selectionRange:s},ac=!1,an=r;an!==null;)if(r=an,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,an=n;else for(;an!==null;){switch(r=an,g=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)m=n[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,s=r,m=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var Se=Yr(s.type,m);n=c.getSnapshotBeforeUpdate(Se,g),c.__reactInternalSnapshotBeforeUpdate=n}catch(Fe){ut(s,s.return,Fe)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,s=n.nodeType,s===9)eh(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":eh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=r.sibling,n!==null){n.return=r.return,an=n;break}an=r.return}}function Bp(n,r,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Ua(n,s),c&4&&Js(5,s);break;case 1:if(Ua(n,s),c&4)if(n=s.stateNode,r===null)try{n.componentDidMount()}catch(v){ut(s,s.return,v)}else{var m=Yr(s.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(m,r,n.__reactInternalSnapshotBeforeUpdate)}catch(v){ut(s,s.return,v)}}c&64&&Rp(s),c&512&&Xs(s,s.return);break;case 3:if(Ua(n,s),c&64&&(n=s.updateQueue,n!==null)){if(r=null,s.child!==null)switch(s.child.tag){case 27:case 5:r=s.child.stateNode;break;case 1:r=s.child.stateNode}try{E0(n,r)}catch(v){ut(s,s.return,v)}}break;case 27:r===null&&c&4&&Ip(s);case 26:case 5:Ua(n,s),r===null&&c&4&&Lp(s),c&512&&Xs(s,s.return);break;case 12:Ua(n,s);break;case 31:Ua(n,s),c&4&&Hp(n,s);break;case 13:Ua(n,s),c&4&&Vp(n,s),c&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=aS.bind(null,s),ES(n,s))));break;case 22:if(c=s.memoizedState!==null||Ma,!c){r=r!==null&&r.memoizedState!==null||qt,m=Ma;var g=qt;Ma=c,(qt=r)&&!g?Ba(n,s,(s.subtreeFlags&8772)!==0):Ua(n,s),Ma=m,qt=g}break;case 30:break;default:Ua(n,s)}}function zp(n){var r=n.alternate;r!==null&&(n.alternate=null,zp(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&iu(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var kt=null,_n=!1;function Ia(n,r,s){for(s=s.child;s!==null;)Pp(n,r,s),s=s.sibling}function Pp(n,r,s){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(at,s)}catch{}switch(s.tag){case 26:qt||ba(s,r),Ia(n,r,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:qt||ba(s,r);var c=kt,m=_n;fr(s.type)&&(kt=s.stateNode,_n=!1),Ia(n,r,s),sl(s.stateNode),kt=c,_n=m;break;case 5:qt||ba(s,r);case 6:if(c=kt,m=_n,kt=null,Ia(n,r,s),kt=c,_n=m,kt!==null)if(_n)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(s.stateNode)}catch(g){ut(s,r,g)}else try{kt.removeChild(s.stateNode)}catch(g){ut(s,r,g)}break;case 18:kt!==null&&(_n?(n=kt,Rg(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),$i(n)):Rg(kt,s.stateNode));break;case 4:c=kt,m=_n,kt=s.stateNode.containerInfo,_n=!0,Ia(n,r,s),kt=c,_n=m;break;case 0:case 11:case 14:case 15:sr(2,s,r),qt||sr(4,s,r),Ia(n,r,s);break;case 1:qt||(ba(s,r),c=s.stateNode,typeof c.componentWillUnmount=="function"&&Dp(s,r,c)),Ia(n,r,s);break;case 21:Ia(n,r,s);break;case 22:qt=(c=qt)||s.memoizedState!==null,Ia(n,r,s),qt=c;break;default:Ia(n,r,s)}}function Hp(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{$i(n)}catch(s){ut(r,r.return,s)}}}function Vp(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{$i(n)}catch(s){ut(r,r.return,s)}}function Kv(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Up),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Up),r;default:throw Error(i(435,n.tag))}}function Io(n,r){var s=Kv(n);r.forEach(function(c){if(!s.has(c)){s.add(c);var m=rS.bind(null,n,c);c.then(m,m)}})}function Tn(n,r){var s=r.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],g=n,v=r,k=v;e:for(;k!==null;){switch(k.tag){case 27:if(fr(k.type)){kt=k.stateNode,_n=!1;break e}break;case 5:kt=k.stateNode,_n=!1;break e;case 3:case 4:kt=k.stateNode.containerInfo,_n=!0;break e}k=k.return}if(kt===null)throw Error(i(160));Pp(g,v,m),kt=null,_n=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Gp(r,n),r=r.sibling}var ca=null;function Gp(n,r){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Tn(r,n),Cn(n),c&4&&(sr(3,n,n.return),Js(3,n),sr(5,n,n.return));break;case 1:Tn(r,n),Cn(n),c&512&&(qt||s===null||ba(s,s.return)),c&64&&Ma&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=ca;if(Tn(r,n),Cn(n),c&512&&(qt||s===null||ba(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=n.memoizedState,s===null)if(c===null)if(n.stateNode===null){e:{c=n.type,s=n.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":g=m.getElementsByTagName("title")[0],(!g||g[Ns]||g[Le]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(c),m.head.insertBefore(g,m.querySelector("head > title"))),un(g,c,s),g[Le]=n,nn(g),c=g;break e;case"link":var v=Gg("link","href",m).get(c+(s.href||""));if(v){for(var k=0;k<v.length;k++)if(g=v[k],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){v.splice(k,1);break t}}g=m.createElement(c),un(g,c,s),m.head.appendChild(g);break;case"meta":if(v=Gg("meta","content",m).get(c+(s.content||""))){for(k=0;k<v.length;k++)if(g=v[k],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){v.splice(k,1);break t}}g=m.createElement(c),un(g,c,s),m.head.appendChild(g);break;default:throw Error(i(468,c))}g[Le]=n,nn(g),c=g}n.stateNode=c}else qg(m,n.type,n.stateNode);else n.stateNode=Vg(m,c,n.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?qg(m,n.type,n.stateNode):Vg(m,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Ad(n,n.memoizedProps,s.memoizedProps)}break;case 27:Tn(r,n),Cn(n),c&512&&(qt||s===null||ba(s,s.return)),s!==null&&c&4&&Ad(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Tn(r,n),Cn(n),c&512&&(qt||s===null||ba(s,s.return)),n.flags&32){m=n.stateNode;try{pi(m,"")}catch(Se){ut(n,n.return,Se)}}c&4&&n.stateNode!=null&&(m=n.memoizedProps,Ad(n,m,s!==null?s.memoizedProps:m)),c&1024&&(Cd=!0);break;case 6:if(Tn(r,n),Cn(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,s=n.stateNode;try{s.nodeValue=c}catch(Se){ut(n,n.return,Se)}}break;case 3:if(Zo=null,m=ca,ca=Xo(r.containerInfo),Tn(r,n),ca=m,Cn(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{$i(r.containerInfo)}catch(Se){ut(n,n.return,Se)}Cd&&(Cd=!1,qp(n));break;case 4:c=ca,ca=Xo(n.stateNode.containerInfo),Tn(r,n),Cn(n),ca=c;break;case 12:Tn(r,n),Cn(n);break;case 31:Tn(r,n),Cn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Io(n,c)));break;case 13:Tn(r,n),Cn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Bo=lt()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Io(n,c)));break;case 22:m=n.memoizedState!==null;var M=s!==null&&s.memoizedState!==null,W=Ma,re=qt;if(Ma=W||m,qt=re||M,Tn(r,n),qt=re,Ma=W,Cn(n),c&8192)e:for(r=n.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(s===null||M||Ma||qt||Wr(n)),s=null,r=n;;){if(r.tag===5||r.tag===26){if(s===null){M=s=r;try{if(g=M.stateNode,m)v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{k=M.stateNode;var se=M.memoizedProps.style,K=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(Se){ut(M,M.return,Se)}}}else if(r.tag===6){if(s===null){M=r;try{M.stateNode.nodeValue=m?"":M.memoizedProps}catch(Se){ut(M,M.return,Se)}}}else if(r.tag===18){if(s===null){M=r;try{var X=M.stateNode;m?Dg(X,!0):Dg(M.stateNode,!1)}catch(Se){ut(M,M.return,Se)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;s===r&&(s=null),r=r.return}s===r&&(s=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=n.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,Io(n,s))));break;case 19:Tn(r,n),Cn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Io(n,c)));break;case 30:break;case 21:break;default:Tn(r,n),Cn(n)}}function Cn(n){var r=n.flags;if(r&2){try{for(var s,c=n.return;c!==null;){if(Mp(c)){s=c;break}c=c.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var m=s.stateNode,g=_d(n);Mo(n,g,m);break;case 5:var v=s.stateNode;s.flags&32&&(pi(v,""),s.flags&=-33);var k=_d(n);Mo(n,k,v);break;case 3:case 4:var M=s.stateNode.containerInfo,W=_d(n);Td(n,W,M);break;default:throw Error(i(161))}}catch(re){ut(n,n.return,re)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function qp(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;qp(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Ua(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Bp(n,r.alternate,r),r=r.sibling}function Wr(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:sr(4,r,r.return),Wr(r);break;case 1:ba(r,r.return);var s=r.stateNode;typeof s.componentWillUnmount=="function"&&Dp(r,r.return,s),Wr(r);break;case 27:sl(r.stateNode);case 26:case 5:ba(r,r.return),Wr(r);break;case 22:r.memoizedState===null&&Wr(r);break;case 30:Wr(r);break;default:Wr(r)}n=n.sibling}}function Ba(n,r,s){for(s=s&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,m=n,g=r,v=g.flags;switch(g.tag){case 0:case 11:case 15:Ba(m,g,s),Js(4,g);break;case 1:if(Ba(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(W){ut(c,c.return,W)}if(c=g,m=c.updateQueue,m!==null){var k=c.stateNode;try{var M=m.shared.hiddenCallbacks;if(M!==null)for(m.shared.hiddenCallbacks=null,m=0;m<M.length;m++)S0(M[m],k)}catch(W){ut(c,c.return,W)}}s&&v&64&&Rp(g),Xs(g,g.return);break;case 27:Ip(g);case 26:case 5:Ba(m,g,s),s&&c===null&&v&4&&Lp(g),Xs(g,g.return);break;case 12:Ba(m,g,s);break;case 31:Ba(m,g,s),s&&v&4&&Hp(m,g);break;case 13:Ba(m,g,s),s&&v&4&&Vp(m,g);break;case 22:g.memoizedState===null&&Ba(m,g,s),Xs(g,g.return);break;case 30:break;default:Ba(m,g,s)}r=r.sibling}}
vendor: 19,862 bytes, line 49
49function jd(n,r){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Is(s))}function Fd(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Is(n))}function ua(n,r,s,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)$p(n,r,s,c),r=r.sibling}function $p(n,r,s,c){var m=r.flags;switch(r.tag){case 0:case 11:case 15:ua(n,r,s,c),m&2048&&Js(9,r);break;case 1:ua(n,r,s,c);break;case 3:ua(n,r,s,c),m&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&Is(n)));break;case 12:if(m&2048){ua(n,r,s,c),n=r.stateNode;try{var g=r.memoizedProps,v=g.id,k=g.onPostCommit;typeof k=="function"&&k(v,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(M){ut(r,r.return,M)}}else ua(n,r,s,c);break;case 31:ua(n,r,s,c);break;case 13:ua(n,r,s,c);break;case 23:break;case 22:g=r.stateNode,v=r.alternate,r.memoizedState!==null?g._visibility&2?ua(n,r,s,c):Qs(n,r):g._visibility&2?ua(n,r,s,c):(g._visibility|=2,Li(n,r,s,c,(r.subtreeFlags&10256)!==0||!1)),m&2048&&jd(v,r);break;case 24:ua(n,r,s,c),m&2048&&Fd(r.alternate,r);break;default:ua(n,r,s,c)}}function Li(n,r,s,c,m){for(m=m&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var g=n,v=r,k=s,M=c,W=v.flags;switch(v.tag){case 0:case 11:case 15:Li(g,v,k,M,m),Js(8,v);break;case 23:break;case 22:var re=v.stateNode;v.memoizedState!==null?re._visibility&2?Li(g,v,k,M,m):Qs(g,v):(re._visibility|=2,Li(g,v,k,M,m)),m&&W&2048&&jd(v.alternate,v);break;case 24:Li(g,v,k,M,m),m&&W&2048&&Fd(v.alternate,v);break;default:Li(g,v,k,M,m)}r=r.sibling}}function Qs(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var s=n,c=r,m=c.flags;switch(c.tag){case 22:Qs(s,c),m&2048&&jd(c.alternate,c);break;case 24:Qs(s,c),m&2048&&Fd(c.alternate,c);break;default:Qs(s,c)}r=r.sibling}}var Zs=8192;function Mi(n,r,s){if(n.subtreeFlags&Zs)for(n=n.child;n!==null;)Yp(n,r,s),n=n.sibling}function Yp(n,r,s){switch(n.tag){case 26:Mi(n,r,s),n.flags&Zs&&n.memoizedState!==null&&LS(s,ca,n.memoizedState,n.memoizedProps);break;case 5:Mi(n,r,s);break;case 3:case 4:var c=ca;ca=Xo(n.stateNode.containerInfo),Mi(n,r,s),ca=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Zs,Zs=16777216,Mi(n,r,s),Zs=c):Mi(n,r,s));break;default:Mi(n,r,s)}}function Wp(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function el(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var c=r[s];an=c,Jp(c,n)}Wp(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Kp(n),n=n.sibling}function Kp(n){switch(n.tag){case 0:case 11:case 15:el(n),n.flags&2048&&sr(9,n,n.return);break;case 3:el(n);break;case 12:el(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,Uo(n)):el(n);break;default:el(n)}}function Uo(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var s=0;s<r.length;s++){var c=r[s];an=c,Jp(c,n)}Wp(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:sr(8,r,r.return),Uo(r);break;case 22:s=r.stateNode,s._visibility&2&&(s._visibility&=-3,Uo(r));break;default:Uo(r)}n=n.sibling}}function Jp(n,r){for(;an!==null;){var s=an;switch(s.tag){case 0:case 11:case 15:sr(8,s,r);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Is(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,an=c;else e:for(s=n;an!==null;){c=an;var m=c.sibling,g=c.return;if(zp(c),c===s){an=null;break e}if(m!==null){m.return=g,an=m;break e}an=g}}}var Jv={getCacheForType:function(n){var r=on(Ht),s=r.data.get(n);return s===void 0&&(s=n(),r.data.set(n,s)),s},cacheSignal:function(){return on(Ht).controller.signal}},Xv=typeof WeakMap=="function"?WeakMap:Map,it=0,yt=null,Ve=null,Ye=0,ct=0,Bn=null,lr=!1,Ii=!1,Od=!1,za=0,Rt=0,or=0,Kr=0,Rd=0,zn=0,Ui=0,tl=null,jn=null,Dd=!1,Bo=0,Xp=0,zo=1/0,Po=null,cr=null,Xt=0,ur=null,Bi=null,Pa=0,Ld=0,Md=null,Qp=null,nl=0,Id=null;function Pn(){return(it&2)!==0&&Ye!==0?Ye&-Ye:P.T!==null?Vd():ot()}function Zp(){if(zn===0)if((Ye&536870912)===0||Je){var n=Na;Na<<=1,(Na&3932160)===0&&(Na=262144),zn=n}else zn=536870912;return n=In.current,n!==null&&(n.flags|=32),zn}function Fn(n,r,s){(n===yt&&(ct===2||ct===9)||n.cancelPendingCommit!==null)&&(zi(n,0),dr(n,Ye,zn,!1)),ue(n,s),((it&2)===0||n!==yt)&&(n===yt&&((it&2)===0&&(Kr|=s),Rt===4&&dr(n,Ye,zn,!1)),xa(n))}function eg(n,r,s){if((it&6)!==0)throw Error(i(327));var c=!s&&(r&127)===0&&(r&n.expiredLanes)===0||vn(n,r),m=c?eS(n,r):Bd(n,r,!0),g=c;do{if(m===0){Ii&&!c&&dr(n,r,0,!1);break}else{if(s=n.current.alternate,g&&!Qv(s)){m=Bd(n,r,!1),g=!1;continue}if(m===2){if(g=r,n.errorRecoveryDisabledLanes&g)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var k=n;m=tl;var M=k.current.memoizedState.isDehydrated;if(M&&(zi(k,v).flags|=256),v=Bd(k,v,!1),v!==2){if(Od&&!M){k.errorRecoveryDisabledLanes|=g,Kr|=g,m=4;break e}g=jn,jn=m,g!==null&&(jn===null?jn=g:jn.push.apply(jn,g))}m=v}if(g=!1,m!==2)continue}}if(m===1){zi(n,0),dr(n,r,0,!0);break}e:{switch(c=n,g=m,g){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:dr(c,r,zn,!lr);break e;case 2:jn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(m=Bo+300-lt(),10<m)){if(dr(c,r,zn,!lr),mn(c,0,!0)!==0)break e;Pa=r,c.timeoutHandle=Fg(tg.bind(null,c,s,jn,Po,Dd,r,zn,Kr,Ui,lr,g,"Throttled",-0,0),m);break e}tg(c,s,jn,Po,Dd,r,zn,Kr,Ui,lr,g,null,-0,0)}}break}while(!0);xa(n)}function tg(n,r,s,c,m,g,v,k,M,W,re,se,K,X){if(n.timeoutHandle=-1,se=r.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Aa},Yp(r,g,se);var Se=(g&62914560)===g?Bo-lt():(g&4194048)===g?Xp-lt():0;if(Se=MS(se,Se),Se!==null){Pa=g,n.cancelPendingCommit=Se(cg.bind(null,n,r,g,s,c,m,v,k,M,re,se,null,K,X)),dr(n,g,v,!W);return}}cg(n,r,g,s,c,m,v,k,M)}function Qv(n){for(var r=n;;){var s=r.tag;if((s===0||s===11||s===15)&&r.flags&16384&&(s=r.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],g=m.getSnapshot;m=m.value;try{if(!Ln(g(),m))return!1}catch{return!1}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function dr(n,r,s,c){r&=~Rd,r&=~Kr,n.suspendedLanes|=r,n.pingedLanes&=~r,c&&(n.warmLanes|=r),c=n.expirationTimes;for(var m=r;0<m;){var g=31-be(m),v=1<<g;c[g]=-1,m&=~v}s!==0&&ye(n,s,r)}function Ho(){return(it&6)===0?(al(0),!1):!0}function Ud(){if(Ve!==null){if(ct===0)var n=Ve.return;else n=Ve,ja=zr=null,ed(n),ji=null,Bs=0,n=Ve;for(;n!==null;)Op(n.alternate,n),n=n.return;Ve=null}}function zi(n,r){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,bS(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Pa=0,Ud(),yt=n,Ve=s=Ta(n.current,null),Ye=r,ct=0,Bn=null,lr=!1,Ii=vn(n,r),Od=!1,Ui=zn=Rd=Kr=or=Rt=0,jn=tl=null,Dd=!1,(r&8)!==0&&(r|=r&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=r;0<c;){var m=31-be(c),g=1<<m;r|=n[m],c&=~g}return za=r,oo(),s}function ng(n,r){Ue=null,P.H=Ys,r===Ci||r===yo?(r=b0(),ct=3):r===Hu?(r=b0(),ct=4):ct=r===gd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Bn=r,Ve===null&&(Rt=1,Fo(n,Xn(r,n.current)))}function ag(){var n=In.current;return n===null?!0:(Ye&4194048)===Ye?ta===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?n===ta:!1}function rg(){var n=P.H;return P.H=Ys,n===null?Ys:n}function ig(){var n=P.A;return P.A=Jv,n}function Vo(){Rt=4,lr||(Ye&4194048)!==Ye&&In.current!==null||(Ii=!0),(or&134217727)===0&&(Kr&134217727)===0||yt===null||dr(yt,Ye,zn,!1)}function Bd(n,r,s){var c=it;it|=2;var m=rg(),g=ig();(yt!==n||Ye!==r)&&(Po=null,zi(n,r)),r=!1;var v=Rt;e:do try{if(ct!==0&&Ve!==null){var k=Ve,M=Bn;switch(ct){case 8:Ud(),v=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(r=!0);var W=ct;if(ct=0,Bn=null,Pi(n,k,M,W),s&&Ii){v=0;break e}break;default:W=ct,ct=0,Bn=null,Pi(n,k,M,W)}}Zv(),v=Rt;break}catch(re){ng(n,re)}while(!0);return r&&n.shellSuspendCounter++,ja=zr=null,it=c,P.H=m,P.A=g,Ve===null&&(yt=null,Ye=0,oo()),v}function Zv(){for(;Ve!==null;)sg(Ve)}function eS(n,r){var s=it;it|=2;var c=rg(),m=ig();yt!==n||Ye!==r?(Po=null,zo=lt()+500,zi(n,r)):Ii=vn(n,r);e:do try{if(ct!==0&&Ve!==null){r=Ve;var g=Bn;t:switch(ct){case 1:ct=0,Bn=null,Pi(n,r,g,1);break;case 2:case 9:if(g0(g)){ct=0,Bn=null,lg(r);break}r=function(){ct!==2&&ct!==9||yt!==n||(ct=7),xa(n)},g.then(r,r);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:g0(g)?(ct=0,Bn=null,lg(r)):(ct=0,Bn=null,Pi(n,r,g,7));break;case 5:var v=null;switch(Ve.tag){case 26:v=Ve.memoizedState;case 5:case 27:var k=Ve;if(v?$g(v):k.stateNode.complete){ct=0,Bn=null;var M=k.sibling;if(M!==null)Ve=M;else{var W=k.return;W!==null?(Ve=W,Go(W)):Ve=null}break t}}ct=0,Bn=null,Pi(n,r,g,5);break;case 6:ct=0,Bn=null,Pi(n,r,g,6);break;case 8:Ud(),Rt=6;break e;default:throw Error(i(462))}}tS();break}catch(re){ng(n,re)}while(!0);return ja=zr=null,P.H=c,P.A=m,it=s,Ve!==null?0:(yt=null,Ye=0,oo(),Rt)}function tS(){for(;Ve!==null&&!zt();)sg(Ve)}function sg(n){var r=jp(n.alternate,n,za);n.memoizedProps=n.pendingProps,r===null?Go(n):Ve=r}function lg(n){var r=n,s=r.alternate;switch(r.tag){case 15:case 0:r=Np(s,r,r.pendingProps,r.type,void 0,Ye);break;case 11:r=Np(s,r,r.pendingProps,r.type.render,r.ref,Ye);break;case 5:ed(r);default:Op(s,r),r=Ve=i0(r,za),r=jp(s,r,za)}n.memoizedProps=n.pendingProps,r===null?Go(n):Ve=r}function Pi(n,r,s,c){ja=zr=null,ed(r),ji=null,Bs=0;var m=r.return;try{if(Vv(n,m,r,s,Ye)){Rt=1,Fo(n,Xn(s,n.current)),Ve=null;return}}catch(g){if(m!==null)throw Ve=m,g;Rt=1,Fo(n,Xn(s,n.current)),Ve=null;return}r.flags&32768?(Je||c===1?n=!0:Ii||(Ye&536870912)!==0?n=!1:(lr=n=!0,(c===2||c===9||c===3||c===6)&&(c=In.current,c!==null&&c.tag===13&&(c.flags|=16384))),og(r,n)):Go(r)}function Go(n){var r=n;do{if((r.flags&32768)!==0){og(r,lr);return}n=r.return;var s=$v(r.alternate,r,za);if(s!==null){Ve=s;return}if(r=r.sibling,r!==null){Ve=r;return}Ve=r=n}while(r!==null);Rt===0&&(Rt=5)}function og(n,r){do{var s=Yv(n.alternate,n);if(s!==null){s.flags&=32767,Ve=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!r&&(n=n.sibling,n!==null)){Ve=n;return}Ve=n=s}while(n!==null);Rt=6,Ve=null}function cg(n,r,s,c,m,g,v,k,M){n.cancelPendingCommit=null;do qo();while(Xt!==0);if((it&6)!==0)throw Error(i(327));if(r!==null){if(r===n.current)throw Error(i(177));if(g=r.lanes|r.childLanes,g|=_u,le(n,s,g,v,k,M),n===yt&&(Ve=yt=null,Ye=0),Bi=r,ur=n,Pa=s,Ld=g,Md=m,Qp=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,iS(ke,function(){return mg(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=te.p,te.p=2,v=it,it|=4;try{Wv(n,r,s)}finally{it=v,te.p=m,P.T=c}}Xt=1,ug(),dg(),hg()}}function ug(){if(Xt===1){Xt=0;var n=ur,r=Bi,s=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=te.p;te.p=2;var m=it;it|=4;try{Gp(r,n);var g=Xd,v=Jm(n.containerInfo),k=g.focusedElem,M=g.selectionRange;if(v!==k&&k&&k.ownerDocument&&Km(k.ownerDocument.documentElement,k)){if(M!==null&&Su(k)){var W=M.start,re=M.end;if(re===void 0&&(re=W),"selectionStart"in k)k.selectionStart=W,k.selectionEnd=Math.min(re,k.value.length);else{var se=k.ownerDocument||document,K=se&&se.defaultView||window;if(K.getSelection){var X=K.getSelection(),Se=k.textContent.length,Fe=Math.min(M.start,Se),mt=M.end===void 0?Fe:Math.min(M.end,Se);!X.extend&&Fe>mt&&(v=mt,mt=Fe,Fe=v);var H=Wm(k,Fe),I=Wm(k,mt);if(H&&I&&(X.rangeCount!==1||X.anchorNode!==H.node||X.anchorOffset!==H.offset||X.focusNode!==I.node||X.focusOffset!==I.offset)){var Y=se.createRange();Y.setStart(H.node,H.offset),X.removeAllRanges(),Fe>mt?(X.addRange(Y),X.extend(I.node,I.offset)):(Y.setEnd(I.node,I.offset),X.addRange(Y))}}}}for(se=[],X=k;X=X.parentNode;)X.nodeType===1&&se.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var ie=se[k];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}ac=!!Jd,Xd=Jd=null}finally{it=m,te.p=c,P.T=s}}n.current=r,Xt=2}}function dg(){if(Xt===2){Xt=0;var n=ur,r=Bi,s=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=te.p;te.p=2;var m=it;it|=4;try{Bp(n,r.alternate,r)}finally{it=m,te.p=c,P.T=s}}Xt=3}}function hg(){if(Xt===4||Xt===3){Xt=0,xn();var n=ur,r=Bi,s=Pa,c=Qp;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Xt=5:(Xt=0,Bi=ur=null,fg(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(cr=null),Nt(s),r=r.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(at,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=P.T,m=te.p,te.p=2,P.T=null;try{for(var g=n.onRecoverableError,v=0;v<c.length;v++){var k=c[v];g(k.value,{componentStack:k.stack})}}finally{P.T=r,te.p=m}}(Pa&3)!==0&&qo(),xa(n),m=n.pendingLanes,(s&261930)!==0&&(m&42)!==0?n===Id?nl++:(nl=0,Id=n):nl=0,al(0)}}function fg(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,Is(r)))}function qo(){return ug(),dg(),hg(),mg()}function mg(){if(Xt!==5)return!1;var n=ur,r=Ld;Ld=0;var s=Nt(Pa),c=P.T,m=te.p;try{te.p=32>s?32:s,P.T=null,s=Md,Md=null;var g=ur,v=Pa;if(Xt=0,Bi=ur=null,Pa=0,(it&6)!==0)throw Error(i(331));var k=it;if(it|=4,Kp(g.current),$p(g,g.current,v,s),it=k,al(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(at,g)}catch{}return!0}finally{te.p=m,P.T=c,fg(n,r)}}function pg(n,r,s){r=Xn(s,r),r=pd(n.stateNode,r,2),n=ar(n,r,2),n!==null&&(ue(n,2),xa(n))}function ut(n,r,s){if(n.tag===3)pg(n,n,s);else for(;r!==null;){if(r.tag===3){pg(r,n,s);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(cr===null||!cr.has(c))){n=Xn(s,n),s=gp(2),c=ar(r,s,2),c!==null&&(yp(s,c,r,n),ue(c,2),xa(c));break}}r=r.return}}function zd(n,r,s){var c=n.pingCache;if(c===null){c=n.pingCache=new Xv;var m=new Set;c.set(r,m)}else m=c.get(r),m===void 0&&(m=new Set,c.set(r,m));m.has(s)||(Od=!0,m.add(s),n=nS.bind(null,n,r,s),r.then(n,n))}function nS(n,r,s){var c=n.pingCache;c!==null&&c.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,yt===n&&(Ye&s)===s&&(Rt===4||Rt===3&&(Ye&62914560)===Ye&&300>lt()-Bo?(it&2)===0&&zi(n,0):Rd|=s,Ui===Ye&&(Ui=0)),xa(n)}function gg(n,r){r===0&&(r=Ka()),n=Ir(n,r),n!==null&&(ue(n,r),xa(n))}function aS(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),gg(n,s)}function rS(n,r){var s=0;switch(n.tag){case 31:case 13:var c=n.stateNode,m=n.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(r),gg(n,s)}function iS(n,r){return Jt(n,r)}var $o=null,Hi=null,Pd=!1,Yo=!1,Hd=!1,hr=0;function xa(n){n!==Hi&&n.next===null&&(Hi===null?$o=Hi=n:Hi=Hi.next=n),Yo=!0,Pd||(Pd=!0,lS())}function al(n,r){if(!Hd&&Yo){Hd=!0;do for(var s=!1,c=$o;c!==null;){if(n!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var v=c.suspendedLanes,k=c.pingedLanes;g=(1<<31-be(42|n)+1)-1,g&=m&~(v&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,wg(c,g))}else g=Ye,g=mn(c,c===yt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||vn(c,g)||(s=!0,wg(c,g));c=c.next}while(s);Hd=!1}}function sS(){yg()}function yg(){Yo=Pd=!1;var n=0;hr!==0&&yS()&&(n=hr);for(var r=lt(),s=null,c=$o;c!==null;){var m=c.next,g=bg(c,r);g===0?(c.next=null,s===null?$o=m:s.next=m,m===null&&(Hi=s)):(s=c,(n!==0||(g&3)!==0)&&(Yo=!0)),c=m}Xt!==0&&Xt!==5||al(n),hr!==0&&(hr=0)}function bg(n,r){for(var s=n.suspendedLanes,c=n.pingedLanes,m=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var v=31-be(g),k=1<<v,M=m[v];M===-1?((k&s)===0||(k&c)!==0)&&(m[v]=Or(k,r)):M<=r&&(n.expiredLanes|=k),g&=~k}if(r=yt,s=Ye,s=mn(n,n===r?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,s===0||n===r&&(ct===2||ct===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Bt(c),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||vn(n,s)){if(r=s&-s,r===n.callbackPriority)return r;switch(c!==null&&Bt(c),Nt(s)){case 2:case 8:s=he;break;case 32:s=ke;break;case 268435456:s=He;break;default:s=ke}return c=xg.bind(null,n),s=Jt(s,c),n.callbackPriority=r,n.callbackNode=s,r}return c!==null&&c!==null&&Bt(c),n.callbackPriority=2,n.callbackNode=null,2}function xg(n,r){if(Xt!==0&&Xt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(qo()&&n.callbackNode!==s)return null;var c=Ye;return c=mn(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(eg(n,c,r),bg(n,lt()),n.callbackNode!=null&&n.callbackNode===s?xg.bind(null,n):null)}function wg(n,r){if(qo())return null;eg(n,r,!0)}function lS(){xS(function(){(it&6)!==0?Jt(ne,sS):yg()})}function Vd(){if(hr===0){var n=_i;n===0&&(n=wn,wn<<=1,(wn&261888)===0&&(wn=256)),hr=n}return hr}function vg(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:eo(""+n)}function Sg(n,r){var s=r.ownerDocument.createElement("input");return s.name=r.name,s.value=r.value,n.id&&s.setAttribute("form",n.id),r.parentNode.insertBefore(s,r),n=new FormData(n),s.parentNode.removeChild(s),n}function oS(n,r,s,c,m){if(r==="submit"&&s&&s.stateNode===m){var g=vg((m[Qe]||null).action),v=c.submitter;v&&(r=(r=v[Qe]||null)?vg(r.formAction):v.getAttribute("formAction"),r!==null&&(g=r,v=null));var k=new ro("action","action",null,c,m);n.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(hr!==0){var M=v?Sg(m,v):new FormData(m);cd(s,{pending:!0,data:M,method:m.method,action:g},null,M)}}else typeof g=="function"&&(k.preventDefault(),M=v?Sg(m,v):new FormData(m),cd(s,{pending:!0,data:M,method:m.method,action:g},g,M))},currentTarget:m}]})}}for(var Gd=0;Gd<Au.length;Gd++){var qd=Au[Gd],cS=qd.toLowerCase(),uS=qd[0].toUpperCase()+qd.slice(1);oa(cS,"on"+uS)}oa(Zm,"onAnimationEnd"),oa(e0,"onAnimationIteration"),oa(t0,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Av,"onTransitionRun"),oa(_v,"onTransitionStart"),oa(Tv,"onTransitionCancel"),oa(n0,"onTransitionEnd"),fi("onMouseEnter",["mouseout","mouseover"]),fi("onMouseLeave",["mouseout","mouseover"]),fi("onPointerEnter",["pointerout","pointerover"]),fi("onPointerLeave",["pointerout","pointerover"]),Rr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rl));function Eg(n,r){r=(r&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],m=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var v=c.length-1;0<=v;
vendor: 3,991 bytes, line 49
49v--){var k=c[v],M=k.instance,W=k.currentTarget;if(k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=W;try{g(m)}catch(re){lo(re)}m.currentTarget=null,g=M}else for(v=0;v<c.length;v++){if(k=c[v],M=k.instance,W=k.currentTarget,k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=W;try{g(m)}catch(re){lo(re)}m.currentTarget=null,g=M}}}}function Ge(n,r){var s=r[pa];s===void 0&&(s=r[pa]=new Set);var c=n+"__bubble";s.has(c)||(Ng(r,n,2,!1),s.add(c))}function $d(n,r,s){var c=0;r&&(c|=4),Ng(s,n,c,r)}var Wo="_reactListening"+Math.random().toString(36).slice(2);function Yd(n){if(!n[Wo]){n[Wo]=!0,ym.forEach(function(s){s!=="selectionchange"&&(dS.has(s)||$d(s,!1,n),$d(s,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Wo]||(r[Wo]=!0,$d("selectionchange",!1,r))}}function Ng(n,r,s,c){switch(Zg(r)){case 2:var m=BS;break;case 8:m=zS;break;default:m=oh}s=m.bind(null,r,s,n),m=void 0,!fu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),c?m!==void 0?n.addEventListener(r,s,{capture:!0,passive:m}):n.addEventListener(r,s,!0):m!==void 0?n.addEventListener(r,s,{passive:m}):n.addEventListener(r,s,!1)}function Wd(n,r,s,c,m){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var v=c.tag;if(v===3||v===4){var k=c.stateNode.containerInfo;if(k===m)break;if(v===4)for(v=c.return;v!==null;){var M=v.tag;if((M===3||M===4)&&v.stateNode.containerInfo===m)return;v=v.return}for(;k!==null;){if(v=ui(k),v===null)return;if(M=v.tag,M===5||M===6||M===26||M===27){c=g=v;continue e}k=k.parentNode}}c=c.return}Cm(function(){var W=g,re=du(s),se=[];e:{var K=a0.get(n);if(K!==void 0){var X=ro,Se=n;switch(n){case"keypress":if(no(s)===0)break e;case"keydown":case"keyup":X=rv;break;case"focusin":Se="focus",X=yu;break;case"focusout":Se="blur",X=yu;break;case"beforeblur":case"afterblur":X=yu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Om;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=lv;break;case Zm:case e0:case t0:X=K1;break;case n0:X=cv;break;case"scroll":case"scrollend":X=G1;break;case"wheel":X=dv;break;case"copy":case"cut":case"paste":X=X1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Dm;break;case"toggle":case"beforetoggle":X=fv}var Fe=(r&4)!==0,mt=!Fe&&(n==="scroll"||n==="scrollend"),H=Fe?K!==null?K+"Capture":null:K;Fe=[];for(var I=W,Y;I!==null;){var ie=I;if(Y=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Y===null||H===null||(ie=As(I,H),ie!=null&&Fe.push(il(I,ie,Y))),mt)break;I=I.return}0<Fe.length&&(K=new X(K,Se,null,s,re),se.push({event:K,listeners:Fe}))}}if((r&7)===0){e:{if(K=n==="mouseover"||n==="pointerover",X=n==="mouseout"||n==="pointerout",K&&s!==uu&&(Se=s.relatedTarget||s.fromElement)&&(ui(Se)||Se[Sn]))break e;if((X||K)&&(K=re.window===re?re:(K=re.ownerDocument)?K.defaultView||K.parentWindow:window,X?(Se=s.relatedTarget||s.toElement,X=W,Se=Se?ui(Se):null,Se!==null&&(mt=o(Se),Fe=Se.tag,Se!==mt||Fe!==5&&Fe!==27&&Fe!==6)&&(Se=null)):(X=null,Se=W),X!==Se)){if(Fe=Om,ie="onMouseLeave",H="onMouseEnter",I="mouse",(n==="pointerout"||n==="pointerover")&&(Fe=Dm,ie="onPointerLeave",H="onPointerEnter",I="pointer"),mt=X==null?K:ks(X),Y=Se==null?K:ks(Se),K=new Fe(ie,I+"leave",X,s,re),K.target=mt,K.relatedTarget=Y,ie=null,ui(re)===W&&(Fe=new Fe(H,I+"enter",Se,s,re),Fe.target=Y,Fe.relatedTarget=mt,ie=Fe),mt=ie,X&&Se)t:{for(Fe=hS,H=X,I=Se,Y=0,ie=H;ie;ie=Fe(ie))Y++;ie=0;for(var Te=I;Te;Te=Fe(Te))ie++;for(;0<Y-ie;)H=Fe(H),Y--;for(;0<ie-Y;)I=Fe(I),ie--;for(;Y--;){if(H===I||I!==null&&H===I.alternate){Fe=H;break t}H=Fe(H),I=Fe(I)}Fe=null}else Fe=null;X!==null&&kg(se,K,X,Fe,!1),Se!==null&&mt!==null&&kg(se,mt,Se,Fe,!0)}}
vendor: 5,203 bytes, lines 49-50
49e:{if(K=W?ks(W):window,X=K.nodeName&&K.nodeName.toLowerCase(),X==="select"||X==="input"&&K.type==="file")var et=Hm;else if(zm(K))if(Vm)et=Ev;else{et=vv;var Ne=wv}else X=K.nodeName,!X||X.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?W&&cu(W.elementType)&&(et=Hm):et=Sv;if(et&&(et=et(n,W))){Pm(se,et,s,re);break e}Ne&&Ne(n,K,W),n==="focusout"&&W&&K.type==="number"&&W.memoizedProps.value!=null&&ou(K,"number",K.value)}switch(Ne=W?ks(W):window,n){case"focusin":(zm(Ne)||Ne.contentEditable==="true")&&(xi=Ne,Eu=W,Ds=null);break;case"focusout":Ds=Eu=xi=null;break;case"mousedown":Nu=!0;break;case"contextmenu":case"mouseup":case"dragend":Nu=!1,Xm(se,s,re);break;case"selectionchange":if(kv)break;case"keydown":case"keyup":Xm(se,s,re)}var Be;if(xu)e:{switch(n){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else bi?Um(n,s)&&(We="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(We="onCompositionStart");We&&(Lm&&s.locale!=="ko"&&(bi||We!=="onCompositionStart"?We==="onCompositionEnd"&&bi&&(Be=jm()):(Ja=re,mu="value"in Ja?Ja.value:Ja.textContent,bi=!0)),Ne=Ko(W,We),0<Ne.length&&(We=new Rm(We,n,null,s,re),se.push({event:We,listeners:Ne}),Be?We.data=Be:(Be=Bm(s),Be!==null&&(We.data=Be)))),(Be=pv?gv(n,s):yv(n,s))&&(We=Ko(W,"onBeforeInput"),0<We.length&&(Ne=new Rm("onBeforeInput","beforeinput",null,s,re),se.push({event:Ne,listeners:We}),Ne.data=Be)),oS(se,n,W,s,re)}Eg(se,r)})}function il(n,r,s){return{instance:n,listener:r,currentTarget:s}}function Ko(n,r){for(var s=r+"Capture",c=[];n!==null;){var m=n,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=As(n,s),m!=null&&c.unshift(il(n,m,g)),m=As(n,r),m!=null&&c.push(il(n,m,g))),n.tag===3)return c;n=n.return}return[]}function hS(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function kg(n,r,s,c,m){for(var g=r._reactName,v=[];s!==null&&s!==c;){var k=s,M=k.alternate,W=k.stateNode;if(k=k.tag,M!==null&&M===c)break;k!==5&&k!==26&&k!==27||W===null||(M=W,m?(W=As(s,g),W!=null&&v.unshift(il(s,W,M))):m||(W=As(s,g),W!=null&&v.push(il(s,W,M)))),s=s.return}v.length!==0&&n.push({event:r,listeners:v})}var fS=/\r\n?/g,mS=/\u0000|\uFFFD/g;function Ag(n){return(typeof n=="string"?n:""+n).replace(fS,`
50`).replace(mS,"")}function _g(n,r){return r=Ag(r),Ag(n)===r}function ft(n,r,s,c,m,g){switch(s){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||pi(n,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&pi(n,""+c);break;case"className":Ql(n,"class",c);break;case"tabIndex":Ql(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(n,s,c);break;case"style":_m(n,c,g);break;case"data":if(r!=="object"){Ql(n,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||s!=="href")){n.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=eo(""+c),n.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(r!=="input"&&ft(n,r,"name",m.name,m,null),ft(n,r,"formEncType",m.formEncType,m,null),ft(n,r,"formMethod",m.formMethod,m,null),ft(n,r,"formTarget",m.formTarget,m,null)):(ft(n,r,"encType",m.encType,m,null),ft(n,r,"method",m.method,m,null),ft(n,r,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=eo(""+c),n.setAttribute(s,c);break;case"onClick":c!=null&&(n.onclick=Aa);break;case"onScroll":c!=null&&Ge("scroll",n);break;case"onScrollEnd":c!=null&&Ge("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));n.innerHTML=s}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}s=eo(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""+c):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
50ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":c===!0?n.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,c):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(s,c):n.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(s):n.setAttribute(s,c);break;case"popover":Ge("beforetoggle",n),Ge("toggle",n),Xl(n,"popover",c);break;case"xlinkActuate":ka(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ka(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ka(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ka(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ka(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ka(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ka(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ka(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ka(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Xl(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=H1.get(s)||s,Xl(n,s,c))}}function Kd(n,r,s,c,m,g){switch(s){case"style":_m(n,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));n.innerHTML=s}}break;case"children":typeof c=="string"?pi(n,c):(typeof c=="number"||typeof c=="bigint")&&pi(n,""+c);break;case"onScroll":c!=null&&Ge("scroll",n);break;case"onScrollEnd":c!=null&&Ge("scrollend",n);break;case"onClick":c!=null&&(n.onclick=Aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bm.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),r=s.slice(2,m?s.length-7:void 0),g=n[Qe]||null,g=g!=null?g[s]:null,typeof g=="function"&&n.removeEventListener(r,g,m),typeof c=="function")){typeof g!="function"&&g!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(r,c,m);break e}s in n?n[s]=c:c===!0?n.setAttribute(s,""):Xl(n,s,c)}}}function un(n,r,s){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",n),Ge("load",n);var c=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var v=s[g];if(v!=null)switch(g){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:ft(n,r,g,v,s,null)}}m&&ft(n,r,"srcSet",s.srcSet,s,null),c&&ft(n,r,"src",s.src,s,null);return;case"input":Ge("invalid",n);var k=g=v=m=null,M=null,W=null;for(c in s)if(s.hasOwnProperty(c)){var re=s[c];if(re!=null)switch(c){case"name":m=re;break;case"type":v=re;break;case"checked":M=re;break;case"defaultChecked":W=re;break;case"value":g=re;break;case"defaultValue":k=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,r));break;default:ft(n,r,c,re,s,null)}}Em(n,g,k,M,W,v,m,!1);return;case"select":Ge("invalid",n),c=v=g=null;for(m in s)if(s.hasOwnProperty(m)&&(k=s[m],k!=null))switch(m){case"value":g=k;break;case"defaultValue":v=k;break;case"multiple":c=k;default:ft(n,r,m,k,s,null)}r=g,s=v,n.multiple=!!c,r!=null?mi(n,!!c,r,!1):s!=null&&mi(n,!!c,s,!0);return;case"textarea":Ge("invalid",n),g=m=c=null;for(v in s)if(s.hasOwnProperty(v)&&(k=s[v],k!=null))switch(v){case"value":c=k;break;case"defaultValue":m=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:ft(n,r,v,k,s,null)}km(n,c,m,g);return;case"option":for(M in s)if(s.hasOwnProperty(M)&&(c=s[M],c!=null))switch(M){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ft(n,r,M,c,s,null)}return;case"dialog":Ge("beforetoggle",n),Ge("toggle",n),Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":Ge("load",n);break;case"video":case"audio":for(c=0;c<rl.length;c++)Ge(rl[c],n);break;case"image":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"embed":case"source":case"link":Ge("error",n),Ge("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in s)if(s.hasOwnProperty(W)&&(c=s[W],c!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:ft(n,r,W,c,s,null)}return;default:if(cu(r)){for(re in s)s.hasOwnProperty(re)&&(c=s[re],c!==void 0&&Kd(n,r,re,c,s,void 0));return}}for(k in s)s.hasOwnProperty(k)&&(c=s[k],c!=null&&ft(n,r,k,c,s,null))}function pS(n,r,s,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,v=null,k=null,M=null,W=null,re=null;for(X in s){var se=s[X];if(s.hasOwnProperty(X)&&se!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":M=se;default:c.hasOwnProperty(X)||ft(n,r,X,null,c,se)}}for(var K in c){var X=c[K];if(se=s[K],c.hasOwnProperty(K)&&(X!=null||se!=null))switch(K){case"type":g=X;break;case"name":m=X;break;case"checked":W=X;break;case"defaultChecked":re=X;break;case"value":v=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,r));break;default:X!==se&&ft(n,r,K,X,c,se)}}lu(n,v,k,M,W,re,g,m);return;case"select":X=v=k=K=null;for(g in s)if(M=s[g],s.hasOwnProperty(g)&&M!=null)switch(g){case"value":break;case"multiple":X=M;default:c.hasOwnProperty(g)||ft(n,r,g,null,c,M)}for(m in c)if(g=c[m],M=s[m],c.hasOwnProperty(m)&&(g!=null||M!=null))switch(m){case"value":K=g;break;case"defaultValue":k=g;break;case"multiple":v=g;default:g!==M&&ft(n,r,m,g,c,M)}r=k,s=v,c=X,K!=null?mi(n,!!s,K,!1):!!c!=!!s&&(r!=null?mi(n,!!s,r,!0):mi(n,!!s,s?[]:"",!1));return;case"textarea":X=K=null;for(k in s)if(m=s[k],s.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ft(n,r,k,null,c,m)}for(v in c)if(m=c[v],g=s[v],c.hasOwnProperty(v)&&(m!=null||g!=null))switch(v){case"value":K=m;break;case"defaultValue":X=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(i(91));break;default:m!==g&&ft(n,r,v,m,c,g)}Nm(n,K,X);return;case"option":for(var Se in s)if(K=s[Se],s.hasOwnProperty(Se)&&K!=null&&!c.hasOwnProperty(Se))switch(Se){case"selected":n.selected=!1;break;default:ft(n,r,Se,null,c,K)}for(M in c)if(K=c[M],X=s[M],c.hasOwnProperty(M)&&K!==X&&(K!=null||X!=null))switch(M){case"selected":n.selected=K&&t
vendor: 6,017 bytes, line 50
50ypeof K!="function"&&typeof K!="symbol";break;default:ft(n,r,M,K,c,X)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Fe in s)K=s[Fe],s.hasOwnProperty(Fe)&&K!=null&&!c.hasOwnProperty(Fe)&&ft(n,r,Fe,null,c,K);for(W in c)if(K=c[W],X=s[W],c.hasOwnProperty(W)&&K!==X&&(K!=null||X!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(i(137,r));break;default:ft(n,r,W,K,c,X)}return;default:if(cu(r)){for(var mt in s)K=s[mt],s.hasOwnProperty(mt)&&K!==void 0&&!c.hasOwnProperty(mt)&&Kd(n,r,mt,void 0,c,K);for(re in c)K=c[re],X=s[re],!c.hasOwnProperty(re)||K===X||K===void 0&&X===void 0||Kd(n,r,re,K,c,X);return}}for(var H in s)K=s[H],s.hasOwnProperty(H)&&K!=null&&!c.hasOwnProperty(H)&&ft(n,r,H,null,c,K);for(se in c)K=c[se],X=s[se],!c.hasOwnProperty(se)||K===X||K==null&&X==null||ft(n,r,se,K,c,X)}function Tg(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gS(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],g=m.transferSize,v=m.initiatorType,k=m.duration;if(g&&k&&Tg(v)){for(v=0,k=m.responseEnd,c+=1;c<s.length;c++){var M=s[c],W=M.startTime;if(W>k)break;var re=M.transferSize,se=M.initiatorType;re&&Tg(se)&&(M=M.responseEnd,v+=re*(M<k?1:(k-W)/(M-W)))}if(--c,r+=8*(g+v)/(m.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Jd=null,Xd=null;function Jo(n){return n.nodeType===9?n:n.ownerDocument}function Cg(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jg(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function Qd(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Zd=null;function yS(){var n=window.event;return n&&n.type==="popstate"?n===Zd?!1:(Zd=n,!0):(Zd=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,bS=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,xS=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(n){return Og.resolve(null).then(n).catch(wS)}:Fg;function wS(n){setTimeout(function(){throw n})}function fr(n){return n==="head"}function Rg(n,r){var s=r,c=0;do{var m=s.nextSibling;if(n.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){n.removeChild(m),$i(r);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")sl(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,sl(s);for(var g=s.firstChild;g;){var v=g.nextSibling,k=g.nodeName;g[Ns]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=v}}else s==="body"&&sl(n.ownerDocument.body);s=m}while(s);$i(r)}function Dg(n,r){var s=n;n=0;do{var c=s.nextSibling;if(s.nodeType===1?r?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(r?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=c}while(s)}function eh(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var s=r;switch(r=r.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":eh(s),iu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function vS(n,r,s,c){for(;n.nodeType===1;){var m=s;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Ns])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==m.rel||n.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||n.getAttribute("title")!==(m.title==null?null:m.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(m.src==null?null:m.src)||n.getAttribute("type")!==(m.type==null?null:m.type)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=na(n.nextSibling),n===null)break}return null}function SS(n,r,s){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=na(n.nextSibling),n===null))return null;return n}function Lg(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=na(n.nextSibling),n===null))return null;return n}function th(n){return n.data==="$?"||n.data==="$~"}function nh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function ES(n,r){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||s.readyState!=="loading")r();else{var c=function(){r(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function na(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;
vendor: 12,167 bytes, line 50
50if(r==="/$"||r==="/&")return null}}return n}var ah=null;function Mg(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(r===0)return na(n.nextSibling);r--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||r++}n=n.nextSibling}return null}function Ig(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(r===0)return n;r--}else s!=="/$"&&s!=="/&"||r++}n=n.previousSibling}return null}function Ug(n,r,s){switch(r=Jo(s),n){case"html":if(n=r.documentElement,!n)throw Error(i(452));return n;case"head":if(n=r.head,!n)throw Error(i(453));return n;case"body":if(n=r.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function sl(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);iu(n)}var aa=new Map,Bg=new Set;function Xo(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ha=te.d;te.d={f:NS,r:kS,D:AS,C:_S,L:TS,m:CS,X:FS,S:jS,M:OS};function NS(){var n=Ha.f(),r=Ho();return n||r}function kS(n){var r=di(n);r!==null&&r.tag===5&&r.type==="form"?np(r):Ha.r(n)}var Vi=typeof document>"u"?null:document;function zg(n,r,s){var c=Vi;if(c&&typeof r=="string"&&r){var m=Kn(r);m='link[rel="'+n+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),Bg.has(m)||(Bg.add(m),n={rel:n,crossOrigin:s,href:r},c.querySelector(m)===null&&(r=c.createElement("link"),un(r,"link",n),nn(r),c.head.appendChild(r)))}}function AS(n){Ha.D(n),zg("dns-prefetch",n,null)}function _S(n,r){Ha.C(n,r),zg("preconnect",n,r)}function TS(n,r,s){Ha.L(n,r,s);var c=Vi;if(c&&n&&r){var m='link[rel="preload"][as="'+Kn(r)+'"]';r==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Kn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Kn(s.imageSizes)+'"]')):m+='[href="'+Kn(n)+'"]';var g=m;switch(r){case"style":g=Gi(n);break;case"script":g=qi(n)}aa.has(g)||(n=b({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),aa.set(g,n),c.querySelector(m)!==null||r==="style"&&c.querySelector(ll(g))||r==="script"&&c.querySelector(ol(g))||(r=c.createElement("link"),un(r,"link",n),nn(r),c.head.appendChild(r)))}}function CS(n,r){Ha.m(n,r);var s=Vi;if(s&&n){var c=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+Kn(c)+'"][href="'+Kn(n)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=qi(n)}if(!aa.has(g)&&(n=b({rel:"modulepreload",href:n},r),aa.set(g,n),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ol(g)))return}c=s.createElement("link"),un(c,"link",n),nn(c),s.head.appendChild(c)}}}function jS(n,r,s){Ha.S(n,r,s);var c=Vi;if(c&&n){var m=hi(c).hoistableStyles,g=Gi(n);r=r||"default";var v=m.get(g);if(!v){var k={loading:0,preload:null};if(v=c.querySelector(ll(g)))k.loading=5;else{n=b({rel:"stylesheet",href:n,"data-precedence":r},s),(s=aa.get(g))&&rh(n,s);var M=v=c.createElement("link");nn(M),un(M,"link",n),M._p=new Promise(function(W,re){M.onload=W,M.onerror=re}),M.addEventListener("load",function(){k.loading|=1}),M.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Qo(v,r,c)}v={type:"stylesheet",instance:v,count:1,state:k},m.set(g,v)}}}function FS(n,r){Ha.X(n,r);var s=Vi;if(s&&n){var c=hi(s).hoistableScripts,m=qi(n),g=c.get(m);g||(g=s.querySelector(ol(m)),g||(n=b({src:n,async:!0},r),(r=aa.get(m))&&ih(n,r),g=s.createElement("script"),nn(g),un(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function OS(n,r){Ha.M(n,r);var s=Vi;if(s&&n){var c=hi(s).hoistableScripts,m=qi(n),g=c.get(m);g||(g=s.querySelector(ol(m)),g||(n=b({src:n,async:!0,type:"module"},r),(r=aa.get(m))&&ih(n,r),g=s.createElement("script"),nn(g),un(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function Pg(n,r,s,c){var m=(m=pe.current)?Xo(m):null;if(!m)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Gi(s.href),s=hi(m).hoistableStyles,c=s.get(r),c||(c={type:"style",instance:null,count:0,state:null},s.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Gi(s.href);var g=hi(m).hoistableStyles,v=g.get(n);if(v||(m=m.ownerDocument||m,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,v),(g=m.querySelector(ll(n)))&&!g._p&&(v.instance=g,v.state.loading=5),aa.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},aa.set(n,s),g||RS(m,n,s,v.state))),r&&c===null)throw Error(i(528,""));return v}if(r&&c!==null)throw Error(i(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=qi(s),s=hi(m).hoistableScripts,c=s.get(r),c||(c={type:"script",instance:null,count:0,state:null},s.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Gi(n){return'href="'+Kn(n)+'"'}function ll(n){return'link[rel="stylesheet"]['+n+"]"}function Hg(n){return b({},n,{"data-precedence":n.precedence,precedence:null})}function RS(n,r,s,c){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=n.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),un(r,"link",s),nn(r),n.head.appendChild(r))}function qi(n){return'[src="'+Kn(n)+'"]'}function ol(n){return"script[async]"+n}function Vg(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var c=n.querySelector('style[data-href~="'+Kn(s.href)+'"]');if(c)return r.instance=c,nn(c),c;var m=b({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),nn(c),un(c,"style",m),Qo(c,s.precedence,n),r.instance=c;case"stylesheet":m=Gi(s.href);var g=n.querySelector(ll(m));if(g)return r.state.loading|=4,r.instance=g,nn(g),g;c=Hg(s),(m=aa.get(m))&&rh(c,m),g=(n.ownerDocument||n).createElement("link"),nn(g);var v=g;return v._p=new Promise(function(k,M){v.onload=k,v.onerror=M}),un(g,"link",c),r.state.loading|=4,Qo(g,s.precedence,n),r.instance=g;case"script":return g=qi(s.src),(m=n.querySelector(ol(g)))?(r.instance=m,nn(m),m):(c=s,(m=aa.get(g))&&(c=b({},s),ih(c,m)),n=n.ownerDocument||n,m=n.createElement("script"),nn(m),un(m,"link",c),n.head.appendChild(m),r.instance=m);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,Qo(c,s.precedence,n));return r.instance}function Qo(n,r,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,g=m,v=0;v<c.length;v++){var k=c[v];if(k.dataset.precedence===r)g=k;else if(g!==m)break}g?g.parentNode.insertBefore(n,g.nextSibling):(r=s.nodeType===9?s.head:s,r.insertBefore(n,r.firstChild))}function rh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function ih(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Zo=null;function Gg(n,r,s){if(Zo===null){var c=new Map,m=Zo=new Map;m.set(s,c)}else m=Zo,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(n))return c;for(c.set(n,null),s=s.getElementsByTagName(n),m=0;m<s.length;m++){var g=s[m];if(!(g[Ns]||g[Le]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var v=g.getAttribute(r)||"";v=n+v;var k=c.get(v);k?k.push(g):c.set(v,[g])}}return c}function qg(n,r,s){n=n.ownerDocument||n,n.head.insertBefore(s,r==="title"?n.querySelector("head > title"):null)}function DS(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function $g(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function LS(n,r,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=Gi(c.href),g=r.querySelector(ll(m));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=ec.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=g,nn(g);return}g=r.ownerDocument||r,c=Hg(c),(m=aa.get(m))&&rh(c,m),g=g.createElement("link"),nn(g);var v=g;v._p=new Promise(function(k,M){v.onload=k,v.onerror=M}),un(g,"link",c),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=ec.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var sh=0;function MS(n,r){return n.stylesheets&&n.count===0&&nc(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var c=setTimeout(function(){if(n.stylesheets&&nc(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+r);0<n.imgBytes&&sh===0&&(sh=62500*gS());var m=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&nc(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>sh?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var tc=null;function nc(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,tc=new Map,r.forEach(IS,n),tc=null,ec.call(n))}function IS(n,r){if(!(r.state.loading&4)){var s=tc.get(n);if(s)var c=s.get(null);else{s=new Map,tc.set(n,s);for(var m=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var v=m[g];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(s.set(v.dataset.precedence,v),c=v)}c&&s.set(null,c)}m=r.instance,v=m.getAttribute("data-precedence"),g=s.get(v)||c,g===c&&s.set(null,m),s.set(v,m),this.count++,c=ec.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),g?g.parentNode.insertBefore(m,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(m,n.firstChild)),r.state.loading|=4}}var cl={$$typeof:j,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function US(n,r,s,c,m,g,v,k,M){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Z(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z(0),this.hiddenUpdates=Z(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Yg(n,r,s,c,m,g,v,k,M,W,re,se){return n=new US(n,r,s,v,M,W,re,se,k),r=1,g===!0&&(r|=24),g=Mn(3,null,null,r),n.current=g,g.stateNode=n,r=Bu(),r.refCount++,n.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:r},Vu(g),n}function Wg(n){return n?(n=Si,n):Si}function Kg(n,r,s,c,m,g){m=Wg(m),c.context===null?c.context=m:c.pendingContext=m,c=nr(r),
vendor: 4,083 bytes, line 50
50c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=ar(n,c,r),s!==null&&(Fn(s,n,r),Ps(s,n,r))}function Jg(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<r?s:r}}function lh(n,r){Jg(n,r),(n=n.alternate)&&Jg(n,r)}function Xg(n){if(n.tag===13||n.tag===31){var r=Ir(n,67108864);r!==null&&Fn(r,n,67108864),lh(n,67108864)}}function Qg(n){if(n.tag===13||n.tag===31){var r=Pn();r=$e(r);var s=Ir(n,r);s!==null&&Fn(s,n,r),lh(n,r)}}var ac=!0;function BS(n,r,s,c){var m=P.T;P.T=null;var g=te.p;try{te.p=2,oh(n,r,s,c)}finally{te.p=g,P.T=m}}function zS(n,r,s,c){var m=P.T;P.T=null;var g=te.p;try{te.p=8,oh(n,r,s,c)}finally{te.p=g,P.T=m}}function oh(n,r,s,c){if(ac){var m=ch(c);if(m===null)Wd(n,r,c,rc,s),ey(n,c);else if(HS(m,n,r,s,c))c.stopPropagation();else if(ey(n,c),r&4&&-1<PS.indexOf(n)){for(;m!==null;){var g=di(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var v=Ee(g.pendingLanes);if(v!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;v;){var M=1<<31-be(v);k.entanglements[1]|=M,v&=~M}xa(g),(it&6)===0&&(zo=lt()+500,al(0))}}break;case 31:case 13:k=Ir(g,2),k!==null&&Fn(k,g,2),Ho(),lh(g,2)}if(g=ch(c),g===null&&Wd(n,r,c,rc,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else Wd(n,r,c,null,s)}}function ch(n){return n=du(n),uh(n)}var rc=null;function uh(n){if(rc=null,n=ui(n),n!==null){var r=o(n);if(r===null)n=null;else{var s=r.tag;if(s===13){if(n=u(r),n!==null)return n;n=null}else if(s===31){if(n=h(r),n!==null)return n;n=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return rc=n,null}function Zg(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kn()){case ne:return 2;case he:return 8;case ke:case je:return 32;case He:return 268435456;default:return 32}default:return 32}}var dh=!1,mr=null,pr=null,gr=null,ul=new Map,dl=new Map,yr=[],PS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ey(n,r){switch(n){case"focusin":case"focusout":mr=null;break;case"dragenter":case"dragleave":pr=null;break;case"mouseover":case"mouseout":gr=null;break;case"pointerover":case"pointerout":ul.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":dl.delete(r.pointerId)}}function hl(n,r,s,c,m,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[m]},r!==null&&(r=di(r),r!==null&&Xg(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),n)}function HS(n,r,s,c,m){switch(r){case"focusin":return mr=hl(mr,n,r,s,c,m),!0;case"dragenter":return pr=hl(pr,n,r,s,c,m),!0;case"mouseover":return gr=hl(gr,n,r,s,c,m),!0;case"pointerover":var g=m.pointerId;
vendor: 5,694 bytes, line 50
50return ul.set(g,hl(ul.get(g)||null,n,r,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,dl.set(g,hl(dl.get(g)||null,n,r,s,c,m)),!0}return!1}function ty(n){var r=ui(n.target);if(r!==null){var s=o(r);if(s!==null){if(r=s.tag,r===13){if(r=u(s),r!==null){n.blockedOn=r,Dt(n.priority,function(){Qg(s)});return}}else if(r===31){if(r=h(s),r!==null){n.blockedOn=r,Dt(n.priority,function(){Qg(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ic(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var s=ch(n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);uu=c,s.target.dispatchEvent(c),uu=null}else return r=di(s),r!==null&&Xg(r),n.blockedOn=s,!1;r.shift()}return!0}function ny(n,r,s){ic(n)&&s.delete(r)}function VS(){dh=!1,mr!==null&&ic(mr)&&(mr=null),pr!==null&&ic(pr)&&(pr=null),gr!==null&&ic(gr)&&(gr=null),ul.forEach(ny),dl.forEach(ny)}function sc(n,r){n.blockedOn===r&&(n.blockedOn=null,dh||(dh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VS)))}var lc=null;function ay(n){lc!==n&&(lc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){lc===n&&(lc=null);for(var r=0;r<n.length;r+=3){var s=n[r],c=n[r+1],m=n[r+2];if(typeof c!="function"){if(uh(c||s)===null)continue;break}var g=di(s);g!==null&&(n.splice(r,3),r-=3,cd(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function $i(n){function r(M){return sc(M,n)}mr!==null&&sc(mr,n),pr!==null&&sc(pr,n),gr!==null&&sc(gr,n),ul.forEach(r),dl.forEach(r);for(var s=0;s<yr.length;s++){var c=yr[s];c.blockedOn===n&&(c.blockedOn=null)}for(;0<yr.length&&(s=yr[0],s.blockedOn===null);)ty(s),s.blockedOn===null&&yr.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],g=s[c+1],v=m[Qe]||null;if(typeof g=="function")v||ay(s);else if(v){var k=null;if(g&&g.hasAttribute("formAction")){if(m=g,v=g[Qe]||null)k=v.formAction;else if(uh(m)!==null)continue}else k=v.action;typeof k=="function"?s[c+1]=k:(s.splice(c,3),c-=3),ay(s)}}}function ry(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(v){return m=v})},focusReset:"manual",scroll:"manual"})}function r(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),m!==null&&(m(),m=null)}}}function hh(n){this._internalRoot=n}oc.prototype.render=hh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(i(409));var s=r.current,c=Pn();Kg(s,c,n,r,null,null)},oc.prototype.unmount=hh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Kg(n.current,2,null,n,null,null),Ho(),r[Sn]=null}};function oc(n){this._internalRoot=n}oc.prototype.unstable_scheduleHydration=function(n){if(n){var r=ot();n={blockedOn:null,target:n,priority:r};for(var s=0;s<yr.length&&r!==0&&r<yr[s].priority;s++);yr.splice(s,0,n),s===0&&ty(n)}};var iy=t.version;if(iy!=="19.2.3")throw Error(i(527,iy,"19.2.3"));te.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=p(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var GS={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{at=cc.inject(GS),gt=cc}catch{}}return ml.createRoot=function(n,r){if(!l(n))throw Error(i(299));var s=!1,c="",m=hp,g=fp,v=mp;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Yg(n,1,!1,null,null,s,c,null,m,g,v,ry),n[Sn]=r.current,Yd(n),new hh(r)},ml.hydrateRoot=function(n,r,s){if(!l(n))throw Error(i(299));var c=!1,m="",g=hp,v=fp,k=mp,M=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError),s.formState!==void 0&&(M=s.formState)),r=Yg(n,1,!0,r,s??null,c,m,M,g,v,k,ry),r.context=Wg(null),s=r.current,c=Pn(),c=$e(c),m=nr(c),m.callback=null,ar(s,m,c),s=c,r.current.lanes=s,ue(r,s),xa(r),n[Sn]=r.current,Yd(n),new oc(r)},ml.version="19.2.3",ml}var py;function eE(){if(py)return ph.exports;py=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ph.exports=ZS(),ph.exports}var tE=eE();const nE=$l(tE),aE="modulepreload",rE=function(e){return"/"+e},gy={},tn=function(t,a,i){let l=Promise.resolve();if(a&&a.length>0){let u=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}
50))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=u(a.map(p=>{if(p=rE(p),p in gy)return;gy[p]=!0;const y=p.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const x=document.createElement("link");if(x.rel=y?"stylesheet":aE,y||(x.as="script"),x.crossOrigin="",x.href=p,f&&x.setAttribute("nonce",f),document.head.appendChild(x),y)return new Promise((w,N)=>{x.addEventListener("load",w),x.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${p}`)))})}))}function o(u){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=u,window.dispatchEvent(h),!h.defaultPrevented)throw u}return l.then(u=>{for(const h of u||[])h.status==="rejected"&&o(h.reason);return t().catch(o)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */var ys;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ys||(ys={}));class xh extends Error{constructor(t,a,i){super(t),this.message=t,this.code=a,this.data=i}}const iE=e=>{var t,a;return e!=null&&e.androidBridge?"android":!((a=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||a===void 0)&&a.bridge?"ios":"web"},sE=e=>{const t=e.CapacitorCustomPlatform||null,a=e.Capacitor||{},i=a.Plugins=a.Plugins||{},l=()=>t!==null?t.name:iE(e),o=()=>l()!=="web",u=b=>{const x=p.get(b);return!!(x!=null&&x.platforms.has(l())||h(b))},h=b=>{var x;return(x=a.PluginHeaders)===null||x===void 0?void 0:x.find(w=>w.name===b)},f=b=>e.console.error(b),p=new Map,y=(b,x={})=>{const w=p.get(b);if(w)return console.warn(`Capacitor plugin "${b}" already registered. Cannot register plugins twice.`),w.proxy;const N=l(),A=h(b);let _;const C=async()=>(!_&&N in x?_=typeof x[N]=="function"?_=await x[N]():_=x[N]:t!==null&&!_&&"web"in x&&(_=typeof x.web=="function"?_=await x.web():_=x.web),_),T=(ee,q)=>{var E,G;if(A){const D=A==null?void 0:A.methods.find(U=>q===U.name);if(D)return D.rtype==="promise"?U=>a.nativePromise(b,q.toString(),U):(U,z)=>a.nativeCallback(b,q.toString(),U,z);if(ee)return(E=ee[q])===null||E===void 0?void 0:E.bind(ee)}else{if(ee)return(G=ee[q])===null||G===void 0?void 0:G.bind(ee);throw new xh(`"${b}" plugin is not implemented on ${N}`,ys.Unimplemented)}},j=ee=>{let q;const E=(...G)=>{const D=C().then(U=>{const z=T(U,ee);if(z){const $=z(...G);return q=$==null?void 0:$.remove,$}else throw new xh(`"${b}.${ee}()" is not implemented on ${N}`,ys.Unimplemented)});return ee==="addListener"&&(D.remove=async()=>q()),D};return E.toString=()=>`${ee.toString()}() { [capacitor code] }`,Object.defineProperty(E,"name",{value:ee,writable:!1,configurable:!1}),E},B=j("addListener"),Q=j("removeListener"),O=(ee,q)=>{const E=B({eventName:ee},q),G=async()=>{const U=await E;Q({eventName:ee,callbackId:U},q)},D=new Promise(U=>E.then(()=>U({remove:G})));return D.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await G()},D},V=new Proxy({},{get(ee,q){switch(q){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return A?O:B;case"removeListener":return Q;default:return j(q)}}});return i[b]=V,p.set(b,{name:b,proxy:V,platforms:new Set([...Object.keys(x),...A?[N]:[]])}),V};return a.convertFileSrc||(a.convertFileSrc=b=>b),a.getPlatform=l,a.handleError=f,a.isNativePlatform=o,a.isPluginAvailable=u,a.registerPlugin=y,a.Exception=xh,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a},lE=e=>e.Capacitor=sE(e),It=lE(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),oi=It.registerPlugin;class If{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,a){let i=!1;this.listeners[t]||(this.listeners[t]=[],i=!0),this.listeners[t].push(a);const o=this.windowListeners[t];o&&!o.registered&&this.addWindowListener(o),i&&this.sendRetainedArgumentsForEvent(t);const u=async()=>this.removeListener(t,a);return Promise.resolve({remove:u})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,a,i){const l=this.listeners[t];if(!l){if(i){let o=this.retainedEventArguments[t];o||(o=[]),o.push(a),this.retainedEventArguments[t]=o}return}l.forEach(o=>o(a))}hasListeners(t){var a;return!!(!((a=this.listeners[t])===null||a===void 0)&&a.length)}registerWindowListener(t,a){this.windowListeners[a]={registered:!1,windowEventName:t,pluginEventName:a,handler:i=>{this.notifyListeners(a,i)}}}unimplemented(t="not implemented"){return new It.Exception(t,ys.Unimplemented)}unavailable(t="not available"){return new It.Exception(t,ys.Unavailable)}async removeListener(t,a){const i=this.listeners[t];if(!i)return;const l=i.indexOf(a);this.listeners[t].splice(l,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}
50addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const a=this.retainedEventArguments[t];a&&(delete this.retainedEventArguments[t],a.forEach(i=>{this.notifyListeners(t,i)}))}}const yy=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),by=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class oE extends If{async getCookies(){const t=document.cookie,a={};return t.split(";").forEach(i=>{if(i.length<=0)return;let[l,o]=i.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");l=by(l).trim(),o=by(o).trim(),a[l]=o}),a}async setCookie(t){try{const a=yy(t.key),i=yy(t.value),l=`; expires=${(t.expires||"").replace("expires=","")}`,o=(t.path||"/").replace("path=",""),u=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${a}=${i||""}${l}; path=${o}; ${u};`}catch(a){return Promise.reject(a)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(a){return Promise.reject(a)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const a of t)document.cookie=a.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}oi("CapacitorCookies",{web:()=>new oE});const cE=async e=>new Promise((t,a)=>{const i=new FileReader;i.onload=()=>{const l=i.result;t(l.indexOf(",")>=0?l.split(",")[1]:l)},i.onerror=l=>a(l),i.readAsDataURL(e)}),uE=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(l=>l.toLocaleLowerCase()).reduce((l,o,u)=>(l[o]=e[t[u]],l),{})},dE=(e,t=!0)=>e?Object.entries(e).reduce((i,l)=>{const[o,u]=l;let h,f;return Array.isArray(u)?(f="",u.forEach(p=>{h=t?encodeURIComponent(p):p,f+=`${o}=${h}&`}),f.slice(0,-1)):(h=t?encodeURIComponent(u):u,f=`${o}=${h}`),`${i}&${f}`},"").substr(1):null,hE=(e,t={})=>{const a=Object.assign({method:e.method||"GET",headers:e.headers},t),l=uE(e.headers)["content-type"]||"";if(typeof e.data=="string")a.body=e.data;else if(l.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[u,h]of Object.entries(e.data||{}))o.set(u,h);a.body=o.toString()}else if(l.includes("multipart/form-data")||e.data instanceof FormData){const o=new FormData;if(e.data instanceof FormData)e.data.forEach((h,f)=>{o.append(f,h)});else for(const h of Object.keys(e.data))o.append(h,e.data[h]);a.body=o;const u=new Headers(a.headers);u.delete("content-type"),a.headers=u}else(l.includes("application/json")||typeof e.data=="object")&&(a.body=JSON.stringify(e.data));return a};class fE extends If{async request(t){const a=hE(t,t.webFetchExtra),i=dE(t.params,t.shouldEncodeUrlParams),l=i?`${t.url}?${i}`:t.url,o=await fetch(l,a),u=o.headers.get("content-type")||"";let{responseType:h="text"}=o.ok?t:{};u.includes("application/json")&&(h="json");let f,p;switch(h){case"arraybuffer":case"blob":p=await o.blob(),f=await cE(p);break;case"json":f=await o.json();break;case"document":case"text":default:f=await o.text()}const y={};return o.headers.forEach((b,x)=>{y[x]=b}),{data:f,headers:y,status:o.status,url:o.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}oi("CapacitorHttp",{web:()=>new fE});var xy;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(xy||(xy={}));var wy;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(wy||(wy={}));class mE extends If{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}oi("SystemBars",{web:()=>new mE});const Nl=oi("App",{web:()=>tn(()=>import("./web-BxTm-2UG.js"),[]).then(e=>new e.AppWeb)});var Tc;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(Tc||(Tc={}));var vy;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(vy||(vy={}));const Cc=oi("StatusBar");/**
51 * @license lucide-react v0.561.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const pE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gE=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,i)=>i?i.toUpperCase():a.toLowerCase()),Sy=e=>{const t=gE(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dx=(...e)=>e.filter((t,a,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===a).join(" ").trim(),yE=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
56 * @license lucide-react v0.561.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */var bE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
61 * @license lucide-react v0.561.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const xE=J.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:l="",children:o,iconNode:u,...h},f)=>J.createElement("svg",{ref:f,...bE,width:t,height:t,stroke:e,strokeWidth:i?Number(a)*24/Number(t):a,className:Dx("lucide",l),...!o&&!yE(h)&&{"aria-hidden":"true"},...h},[...u.map(([p,y])=>J.createElement(p,y)),...Array.isArray(o)?o:[o]]));/**
66 * @license lucide-react v0.561.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const _e=(e,t)=>
70{const a=J.forwardRef(({className:i,...l},o)=>J.createElement(xE,{ref:o,iconNode:t,className:Dx(`lucide-${pE(Sy(e))}`,`lucide-${e}`,i),...l}));return a.displayName=Sy(e),a};/**
71 * @license lucide-react v0.561.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const wE=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],tf=_e("activity",wE);/**
76 * @license lucide-react v0.561.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const vE=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],kl=_e("arrow-down",vE);/**
81 * @license lucide-react v0.561.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const SE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],EE=_e("arrow-left",SE);/**
86 * @license lucide-react v0.561.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const NE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ey=_e("arrow-right",NE);/**
91 * @license lucide-react v0.561.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const kE=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],AE=_e("arrow-up-down",kE);/**
96 * @license lucide-react v0.561.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const _E=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Al=_e("arrow-up",_E);/**
101 * @license lucide-react v0.561.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const TE=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],CE=_e("bug",TE);/**
106 * @license lucide-react v0.561.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const jE=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ny=_e("calendar",jE);/**
111 * @license lucide-react v0.561.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const FE=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],OE=_e("chart-column",FE);/**
116 * @license lucide-react v0.561.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const RE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nf=_e("check",RE);/**
121 * @license lucide-react v0.561.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const DE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Lx=_e("chevron-down",DE);/**
126 * @license lucide-react v0.561.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const LE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Mx=_e("chevron-up",LE);/**
131 * @license lucide-react v0.561.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const ME=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ix=_e("circle-alert",ME);/**
136 * @license lucide-react v0.561.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const IE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Zt=_e("circle-check-big",IE);/**
141 * @license lucide-react v0.561.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const UE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}
145]],BE=_e("circle-check",UE);/**
146 * @license lucide-react v0.561.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const zE=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],PE=_e("circle-play",zE);/**
151 * @license lucide-react v0.561.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const HE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],VE=_e("circle-question-mark",HE);/**
156 * @license lucide-react v0.561.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const GE=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ky=_e("clock",GE);/**
161 * @license lucide-react v0.561.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const qE=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$E=_e("database",qE);/**
166 * @license lucide-react v0.561.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const YE=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],WE=_e("dollar-sign",YE);/**
171 * @license lucide-react v0.561.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const KE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],af=_e("download",KE);/**
176 * @license lucide-react v0.561.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const JE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],XE=_e("eye-off",JE);/**
181 * @license lucide-react v0.561.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const QE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZE=_e("eye",QE);/**
186 * @license lucide-react v0.561.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const eN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],bs=_e("file-text",eN);/**
191 * @license lucide-react v0.561.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const tN=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],nN=_e("funnel",tN);/**
196 * @license lucide-react v0.561.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const aN=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],Nr=_e("gem",aN);/**
201 * @license lucide-react v0.561.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const rN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],iN=_e("info",rN);/**
206 * @license lucide-react v0.561.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const sN=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],lN=_e("layers",sN);/**
211 * @license lucide-react v0.561.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const oN=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Ay=_e("layout-grid",oN);/**
216 * @license lucide-react v0.561.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const cN=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],_y=_e("list",cN);/**
221 * @license lucide-react v0.561.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const uN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jc=_e("loader-circle",uN);/**
226 * @license lucide-react v0.561.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const dN=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ii=_e("lock",dN);/**
231 * @license lucide-react v0.561.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const hN=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}
235],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],fN=_e("log-in",hN);/**
236 * @license lucide-react v0.561.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const mN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ty=_e("log-out",mN);/**
241 * @license lucide-react v0.561.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const pN=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],gN=_e("menu",pN);/**
246 * @license lucide-react v0.561.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const yN=[["path",{d:"M5 12h14",key:"1ays0h"}]],bN=_e("minus",yN);/**
251 * @license lucide-react v0.561.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const xN=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],si=_e("refresh-cw",xN);/**
256 * @license lucide-react v0.561.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const wN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],vN=_e("search",wN);/**
261 * @license lucide-react v0.561.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const SN=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],EN=_e("share-2",SN);/**
266 * @license lucide-react v0.561.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const NN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Cy=_e("shield-alert",NN);/**
271 * @license lucide-react v0.561.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const kN=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
275],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Fc=_e("sparkles",kN);/**
276 * @license lucide-react v0.561.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const AN=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],_N=_e("square-check-big",AN);/**
281 * @license lucide-react v0.561.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const TN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],CN=_e("square",TN);/**
286 * @license lucide-react v0.561.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const jN=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],jy=_e("star",jN);/**
291 * @license lucide-react v0.561.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const FN=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],ON=_e("swords",FN);/**
296 * @license lucide-react v0.561.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const RN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ll=_e("target",RN);/**
301 * @license lucide-react v0.561.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const DN=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ux=_e("terminal",DN);/**
306 * @license lucide-react v0.561.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const LN=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],MN=_e("trash-2",LN);/**
311 * @license lucide-react v0.561.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const IN=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],UN=_e("trending-up",IN);/**
316 * @license lucide-react v0.561.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const BN=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Bx=_e("triangle-alert",BN);/**
321 * @license lucide-react v0.561.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const zN=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],Wc=_e("trophy",zN);/**
326 * @license lucide-react v0.561.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const PN=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}
330]],HN=_e("twitter",PN);/**
331 * @license lucide-react v0.561.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const VN=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],GN=_e("user",VN);/**
336 * @license lucide-react v0.561.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const qN=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Fy=_e("users",qN);/**
341 * @license lucide-react v0.561.0 - ISC
342 *
343 * This source code is licensed under the ISC license.
344 * See the LICENSE file in the root directory of this source tree.
345 */const $N=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sa=_e("x",$N);/**
346 * @license lucide-react v0.561.0 - ISC
347 *
348 * This source code is licensed under the ISC license.
349 * See the LICENSE file in the root directory of this source tree.
350 */const YN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],xs=_e("zap",YN);function zx(e){var t,a,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=zx(e[t]))&&(i&&(i+=" "),i+=a)}else for(a in e)e[a]&&(i&&(i+=" "),i+=a);return i}function ae(){for(var e,t,a=0,i="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=zx(e))&&(i&&(i+=" "),i+=t);return i}const WN=({children:e,user:t,currentView:a,onNavigate:i,onLogout:l,dbConnected:o=!0,isNativeApp:u=!1,isAndroid:h=!1,onRefresh:f})=>{var D,U;const[p,y]=J.useState(!1),[b,x]=J.useState(0),[w,N]=J.useState(!1),A=J.useRef(0),_=J.useRef(null),C=J.useRef(null),T=80,j=15,B=J.useRef(!1),Q=J.useCallback(()=>{const z=C.current;return z&&z.scrollTop>0?z.scrollTop:window.scrollY>0?window.scrollY:document.documentElement.scrollTop>0?document.documentElement.scrollTop:document.body.scrollTop>0?document.body.scrollTop:0},[]),O=J.useCallback(z=>{!u||!f||(B.current=!1,Q()<=0?A.current=z.touches[0].clientY:A.current=0)},[u,f,Q]),V=J.useCallback(z=>{if(!u||!f||w)return;if(A.current<=0||Q()>0){B.current=!1;return}const P=z.touches[0].clientY-A.current;if(P>j){B.current=!0;const te=Math.min((P-j)*.5,T*1.5);x(te)}else if(!B.current)return},[u,f,w]),ee=J.useCallback(async()=>{if(!(!u||!f))if(A.current=0,B.current=!1,b>=T&&!w){N(!0),x(T);try{await f()}finally{N(!1),x(0)}}else x(0)},[u,f,b,w]);J.useEffect(()=>{if(!(!u||!f))return document.addEventListener("touchstart",O,{passive:!0}),document.addEventListener("touchmove",V,{passive:!0}),document.addEventListener("touchend",ee),()=>{document.removeEventListener("touchstart",O),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",ee)}},[u,f,O,V,ee]);const q=z=>{i(z),y(!1)},E=z=>ae("text-2xl font-teko font-light uppercase tracking-wide transition-colors",a===z?"text-brand":"text-gray-400 hover:text-white"),G=z=>{window.scrollTo({top:0,behavior:"smooth"}),i(z)};return d.jsxs("div",{ref:C,className:ae("bg-[#050505] text-white font-sans text-sm selection:bg-brand selection:text-black flex flex-col w-full relative",h?"h-screen overflow-y-auto overflow-x-hidden":"min-h-screen overflow-x-hidden"),children:[d.jsx("header",{className:ae("fixed top-0 left-0 right-0 z-50 bg-[#050505] border-b border-white/10 flex items-end shadow-[0_8px_30px_rgba(0,0,0,0.6)]","pb-2 md:pb-3",h?"pt-8":u?"pt-[env(safe-area-inset-top)]":"pt-3 md:pt-4"),children:d.jsxs("div",{className:"app-container h-full flex items-center px-4 md:px-6 relative",children:[d.jsx("div",{className:"flex items-center gap-2 cursor-pointer group",onClick:()=>q(u||t?"dashboard":"home"),role:"banner",children:d.jsxs("div",{className:"font-teko font-light text-4xl text-white tracking-tight uppercase group-hover:text-brand transition-colors",children:["MATCHUPS",d.jsx("span",{className:"text-brand",children:".AI"})]})}),d.jsxs("nav",{className:"hidden md:flex items-center gap-8 ml-12",children:[d.jsx("button",{onClick:()=>
350i("dashboard"),className:E("dashboard"),children:"Game Picks"}),d.jsx("button",{onClick:()=>i("props"),className:E("props"),children:"Player Props"}),(!t||((D=t.subscription)==null?void 0:D.plan)==="none")&&d.jsx("button",{onClick:()=>i("shop"),className:E("shop"),children:"Pricing"}),d.jsx("button",{onClick:()=>i("history"),className:E("history"),children:"History"}),(t==null?void 0:t.isAdmin)&&d.jsx("button",{onClick:()=>i("admin"),title:"Admin",className:ae(E("admin"),"flex items-center"),children:d.jsx(Cy,{className:"w-4 h-4"})})]}),d.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-6",children:[!u&&d.jsxs("div",{className:"hidden xl:flex items-center gap-2",children:[d.jsx("a",{href:"https://play.google.com/store/apps/details?id=ai.matchups.app",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on Google Play",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/google-play-badge-logo-svgrepo-com-cropped.svg",alt:"Get it on Google Play",className:"h-9"})}),d.jsx("a",{href:"https://apps.apple.com/us/app/matchups-ai/id6758458477",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on the App Store",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/Download_on_the_App_Store_Badge.svg",alt:"Download on the App Store",className:"h-9"})})]}),d.jsx("div",{className:"h-6 w-px bg-white/10 hidden sm:block"}),d.jsxs("div",{className:"flex items-center gap-3",children:[t?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"hidden md:block text-gray-500 font-teko font-light text-lg tracking-wide",children:["Welcome back",t.firstName?`, ${t.firstName}`:","]}),d.jsx("button",{onClick:()=>i("account"),className:ae("hidden md:flex p-2 transition-colors items-center gap-2 rounded-full",a==="account"?"text-brand bg-brand/10":"text-gray-400 hover:text-white hover:bg-white/5"),title:"Account",children:d.jsx(GN,{className:"w-4 h-4"})}),d.jsx("button",{onClick:l,className:"hidden md:flex p-2 text-gray-400 hover:text-white transition-colors items-center gap-2 hover:bg-white/5 rounded-full",title:"Logout",children:d.jsx(Ty,{className:"w-4 h-4"})})]}):d.jsx("button",{onClick:()=>i("login"),className:"hidden md:flex px-6 py-1.5 text-black bg-brand hover:bg-white transition-all items-center gap-2 rounded text-xl font-teko font-normal uppercase tracking-wide",children:"Login"}),t&&d.jsxs("span",{className:"md:hidden text-gray-500 font-teko font-light text-lg tracking-wide",children:["Welcome back",t.firstName?`, ${t.firstName}`:","]}),d.jsx("button",{onClick:()=>y(!0),className:"md:hidden p-2 text-gray-300 hover:text-brand transition-colors",children:d.jsx(gN,{className:"w-8 h-8"})})]})]})]})}),p&&d.jsxs("div",{className:"md:hidden fixed inset-0 bg-[#050505] z-[200] flex flex-col overflow-hidden",style:{paddingTop:h?"5rem":"calc(4rem + env(safe-area-inset-top))",paddingBottom:h?"4rem":"max(2rem, env(safe-area-inset-bottom))",WebkitBackfaceVisibility:"hidden",backfaceVisibility:"hidden"},onClick:z=>z.stopPropagation(),children:[d.jsx("button",{onClick:()=>y(!1),className:"absolute top-0 right-0 p-4 text-gray-300 hover:text-brand transition-colors z-[210]",style:{marginTop:"max(1rem, env(safe-area-inset-top))"},children:d.jsx(Sa,{className:"w-8 h-8"})}),d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 space-y-3",children:[d.jsx("button",{onClick:()=>
350q("dashboard"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="dashboard"?"text-brand":"text-gray-400 hover:text-white"),children:"Game Picks"}),d.jsx("button",{onClick:()=>q("props"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="props"?"text-brand":"text-gray-400 hover:text-white"),children:"Player Props"}),(!t||((U=t.subscription)==null?void 0:U.plan)==="none")&&d.jsx("button",{onClick:()=>q("shop"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="shop"?"text-brand":"text-gray-400 hover:text-white"),children:"Pricing"}),d.jsx("button",{onClick:()=>q("history"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="history"?"text-brand":"text-gray-400 hover:text-white"),children:"History"}),d.jsx("button",{onClick:()=>q("support"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="support"?"text-brand":"text-gray-400 hover:text-white"),children:"Support"}),t&&d.jsx("button",{onClick:()=>q("account"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center",a==="account"?"text-brand":"text-gray-400 hover:text-white"),children:"Account"}),(t==null?void 0:t.isAdmin)&&d.jsxs("button",{onClick:()=>q("admin"),className:ae("py-2 font-teko font-light text-3xl uppercase tracking-wide transition-all text-center flex items-center gap-3",a==="admin"?"text-brand":"text-gray-400 hover:text-white"),children:[d.jsx(Cy,{className:"w-6 h-6"})," Admin"]}),d.jsx("div",{className:"h-px bg-white/10 w-32 my-4"}),t?d.jsxs("button",{onClick:()=>{l(),y(!1)},className:"py-2 font-teko font-light text-3xl uppercase tracking-wide text-red-400 hover:text-red-300 transition-all text-center flex items-center gap-3",children:[d.jsx(Ty,{className:"w-6 h-6"})," Logout"]}):d.jsxs("button",{onClick:()=>{q("login")},className:"py-2 font-teko font-light text-3xl uppercase tracking-wide text-brand hover:text-white transition-all text-center flex items-center gap-3",children:[d.jsx(fN,{className:"w-6 h-6"})," Login"]}),d.jsxs("div",{className:"flex items-center gap-4 mt-6 pt-4 border-t border-white/5",children:[d.jsx("button",{onClick:()=>q("faq"),className:"font-teko text-lg uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"FAQ"}),d.jsx("span",{className:"text-gray-700",children:"•"}),d.jsx("button",{onClick:()=>q("privacy"),className:"font-teko text-lg uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"Privacy"}),d.jsx("span",{className:"text-gray-700",children:"•"}),d.jsx("button",{onClick:()=>q("terms"),className:"font-teko text-lg uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"Terms"})]}),!u&&d.jsxs("div",{className:"flex items-center gap-3 mt-10",children:[d.jsx("a",{href:"https://play.google.com/store/apps/details?id=ai.matchups.app",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on Google Play",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/google-play-badge-logo-svgrepo-com-cropped.svg",alt:"Get it on Google Play",className:"h-10 w-auto"})}),d.jsx("a",{href:"https://apps.apple.com/us/app/matchups-ai/id6758458477",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on the App Store",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/Download_on_the_App_Store_Badge.svg",alt:"Download on the App Store",className:"h-10 w-auto"})})]})]})]}),u&&f&&b>0&&d.jsx("div",{className:"fixed left-0 right-0 flex justify-center z-[100] pointer-events-none",style:{top:72+b/2},children:d.jsx("div",{className:ae("bg-dark-900 border border-white/20 rounded-full p-2 shadow-lg transition-transform",w&&"animate-spin"),children:d.jsx(si,{className:ae("w-5 h-5",b>=T?"text-brand":"text-gray-400")})})}),d.jsx("main",{ref:_,className:ae("w-full transition-transform",!h&&"flex-1",a==="home"?"main-content-home pb-0":a==="twitter-ads"?"main-content-page pb-12":u?"main-content-page pb-24 px-4 md:px-6 app-container":"main-content-page pb-12 px-4 md:px-6 app-container"),style:{...h?{paddingTop:"6rem",paddingBottom:"9rem"}:{},...u&&b>0?{transform:`translateY(${b}px)`}:{}},children:e}),h&&d.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40 pointer-events-none border-t border-white/15",style:{height:"120px",background:"linear-gradient(to bottom, #1a1a1a 60%, #111 60%)"}}),!u&&d.jsx("footer",{className:"py-8 md:py-12 border-t border-white/10 bg-[#080808] mt-auto",children:d.jsxs("div",{className:"app-container px-6 flex flex-col items-center gap-6 md:gap-8",children:[d.jsxs("div",{className:"w-full flex justify-center gap-4 md:gap-12 flex-wrap",children:[d.jsx("button",{onClick:()=>
vendor: 8,039 bytes, line 350
350G("dashboard"),className:"text-lg md:text-2xl font-teko font-light uppercase tracking-wide transition-colors text-gray-400 hover:text-white",children:"GAME PICKS"}),d.jsx("button",{onClick:()=>G("props"),className:"text-lg md:text-2xl font-teko font-light uppercase tracking-wide transition-colors text-gray-400 hover:text-white",children:"PLAYER PROPS"}),d.jsx("button",{onClick:()=>G("march-madness"),className:"text-lg md:text-2xl font-teko font-light uppercase tracking-wide transition-colors text-gray-400 hover:text-white",children:"MARCH MADNESS"}),d.jsx("button",{onClick:()=>G("history"),className:"text-lg md:text-2xl font-teko font-light uppercase tracking-wide transition-colors text-gray-400 hover:text-white",children:"HISTORY"}),d.jsx("button",{onClick:()=>G("shop"),className:"text-lg md:text-2xl font-teko font-light uppercase tracking-wide transition-colors text-gray-400 hover:text-white",children:"PRICING"})]}),d.jsxs("div",{className:"w-full flex justify-center items-center gap-4 md:gap-10 flex-wrap",children:[d.jsx("button",{onClick:()=>G("faq"),className:"text-base md:text-lg font-teko font-light uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"FAQ"}),d.jsx("button",{onClick:()=>G("privacy"),className:"text-base md:text-lg font-teko font-light uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"PRIVACY"}),d.jsx("button",{onClick:()=>G("terms"),className:"text-base md:text-lg font-teko font-light uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"TERMS"}),d.jsx("button",{onClick:()=>G("support"),className:"text-base md:text-lg font-teko font-light uppercase tracking-wide text-gray-500 hover:text-gray-300 transition-colors",children:"SUPPORT"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("a",{href:"https://play.google.com/store/apps/details?id=ai.matchups.app",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on Google Play",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/google-play-badge-logo-svgrepo-com-cropped.svg",alt:"Get it on Google Play",className:"h-8 md:h-12"})}),d.jsx("a",{href:"https://apps.apple.com/us/app/matchups-ai/id6758458477",target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",title:"Download on the App Store",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/Download_on_the_App_Store_Badge.svg",alt:"Download on the App Store",className:"h-8 md:h-12"})})]}),d.jsx("a",{href:"https://x.com/matchupsai",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 hover:text-white transition-colors",title:"Follow us on X",children:d.jsx(HN,{className:"w-5 h-5"})}),d.jsx("div",{className:"text-center",children:d.jsxs("p",{className:"text-[11px] leading-relaxed text-gray-500 font-mono tracking-wide",children:["© ",new Date().getFullYear()," MATCHUPS.AI • ENGINE V2.4.1"]})})]})})]})},Px=6048e5,KN=864e5,PO=43200,HO=1440,Oy=Symbol.for("constructDateFrom");function $a(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Oy in e?e[Oy](t):e instanceof Date?new e.constructor(t):new Date(t)}function ia(e,t){return $a(t||e,e)}function Ry(e,t,a){const i=ia(e,a==null?void 0:a.in);return isNaN(t)?$a(e,NaN):(t&&i.setDate(i.getDate()+t),i)}let JN={};function Kc(){return JN}function Ml(e,t){var h,f,p,y;const a=Kc(),i=(t==null?void 0:t.weekStartsOn)??((f=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??a.weekStartsOn??((y=(p=a.locale)==null?void 0:p.options)==null?void 0:y.weekStartsOn)??0,l=ia(e,t==null?void 0:t.in),o=l.getDay(),u=(o<i?7:0)+o-i;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}function Oc(e,t){return Ml(e,{...t,weekStartsOn:1})}function Hx(e,t){const a=ia(e,t==null?void 0:t.in),i=a.getFullYear(),l=$a(a,0);l.setFullYear(i+1,0,4),l.setHours(0,0,0,0);const o=Oc(l),u=$a(a,0);u.setFullYear(i,0,4),u.setHours(0,0,0,0);const h=Oc(u);return a.getTime()>=o.getTime()?i+1:a.getTime()>=h.getTime()?i:i-1}function Dy(e){const t=ia(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function Vx(e,...t){const a=$a.bind(null,e||t.find(i=>typeof i=="object"));return t.map(a)}function Rc(e,t){const a=ia(e,t==null?void 0:t.in);return a.setHours(0,0,0,0),a}function XN(e,t,a){const[i,l]=Vx(a==null?void 0:a.in,e,t),o=Rc(i),u=Rc(l),h=+o-Dy(o),f=+u-Dy(u);return Math.round((h-f)/KN)}function QN(e,t){const a=Hx(e,t),i=$a(e,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),Oc(i)}function ZN(e,t,a){const[i,l]=Vx(a==null?void 0:a.in,e,t);return+Rc(i)==+Rc(l)}function ek(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Il(e){return!(!ek(e)&&typeof e!="number"||isNaN(+ia(e)))}function tk(e,t){const a=ia(e,t==null?void 0:t.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const nk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ak=(e,t,a)=>{let i;const l=nk[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+i:i+" ago":i};function wh(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const rk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ik={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lk={date:wh({formats:rk,defaultWidth:"full"}),time:wh({formats:ik,defaultWidth:"full"}),dateTime:wh({formats:sk,defaultWidth:"full"})},ok={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ck=(e,t,a,i)=>ok[e];function pl(e){return(t,a)=>{const i=a!=null&&a.context?String(a.context):"standalone";let l;if(i==="formatting"&&e.formattingValues){const u=e.defaultFormattingWidth||e.defaultWidth,h=a!=null&&a.width?String(a.width):u;l=e.formattingValues[h]||e.formattingValues[u]}else{const u=e.defaultWidth,h=a!=null&&a.width?String(a.width):e.defaultWidth;l=e.values[h]||e.values[u]}const o=e.argumentCallback?e.argumentCallback(t):t;return l[o]}}const uk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hk={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
350ay","Saturday"]},mk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},pk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gk=(e,t)=>{const a=Number(e),i=a%100;if(i>20||i<10)switch(i%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},yk={ordinalNumber:gk,era:pl({values:uk,defaultWidth:"wide"}),quarter:pl({values:dk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:pl({values:hk,defaultWidth:"wide"}),day:pl({values:fk,defaultWidth:"wide"}),dayPeriod:pl({values:mk,defaultWidth:"wide",formattingValues:pk,defaultFormattingWidth:"wide"})};function gl(e){return(t,a={})=>{const i=a.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;const u=o[0],h=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(h)?xk(h,b=>b.test(u)):bk(h,b=>b.test(u));let p;p=e.valueCallback?e.valueCallback(f):f,p=a.valueCallback?a.valueCallback(p):p;const y=t.slice(u.length);return{value:p,rest:y}}}function bk(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function xk(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function wk(e){return(t,a={})=>{const i=t.match(e.matchPattern);if(!i)return null;const l=i[0],o=t.match(e.parsePattern);if(!o)return null;let u=e.valueCallback?e.valueCallback(o[0]):o[0];u=a.valueCallback?a.valueCallback(u):u;const h=t.slice(l.length);return{value:u,rest:h}}}const vk=/^(\d+)(th|st|nd|rd)?/i,Sk=/\d+/i,Ek={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Nk={any:[/^b/i,/^(a|c)/i]},kk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ak={any:[/1/i,/2/i,/3/i,/4/i]},_k={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ck={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Fk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ok={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Rk={ordinalNumber:wk({matchPattern:vk,parsePattern:Sk,valueCallback:e=>parseInt(e,10)}),era:gl({matchPatterns:Ek,defaultMatchWidth:"wide",parsePatterns:Nk,defaultParseWidth:"any"}),quarter:gl({matchPatterns:kk,defaultMatchWidth:"wide",parsePatterns:Ak,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gl({matchPatterns:_k,defaultMatchWidth:"wide",parsePatterns:Tk,defaultParseWidth:"any"}),day:gl({matchPatterns:Ck,defaultMatchWidth:"wide",parsePatterns:jk,defaultParseWidth:"any"}),dayPeriod:gl({matchPatterns:Fk,defaultMatchWidth:"any",parsePatterns:Ok,defaultParseWidth:"any"})},Dk={code:"en-US",formatDistance:ak,formatLong:lk,formatRelative:ck,localize:yk,match:Rk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Lk(e,t){const a=ia(e,t==null?void 0:t.in);return XN(a,tk(a))+1}function Mk(e,t){const a=ia(e,t==null?void 0:t.in),i=+Oc(a)-+QN(a);return Math.round(i/Px)+1}function Gx(e,t){var y,b,x,w;const a=ia(e,t==null?void 0:t.in),i=a.getFullYear(),l=Kc(),o=(t==null?void 0:t.firstWeekContainsDate)??((b=(y=t==null?void 0:t.locale)==null?void 0:y.options)==null?void 0:b.firstWeekContainsDate)??l.firstWeekContainsDate??((w=(x=l.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,u=$a((t==null?void 0:t.in)||e,0);u.setFullYear(i+1,0,o),u.setHours(0,0,0,0);const h=Ml(u,t),f=$a((t==null?void 0:t.in)||e,0);f.setFullYear(i,0,o),f.setHours(0,0,0,0);const p=Ml(f,t);return+a>=+h?i+1:+a>=+p?i:i-1}function Ik(e,t){var h,f,p,y;const a=Kc(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((y=(p=a.locale)==null?void 0:p.options)==null?void 0:y.firstWeekContainsDate)??1,l=Gx(e,t),o=$a((t==null?void 0:t.in)||e,0);return o.setFullYear(l,0,i),o.setHours(0,0,0,0),Ml(o,t)}function Uk(e,t){const a=ia(e,t==null?void 0:t.in),i=+Ml(a,t)-+Ik(a,t);return Math.round(i/Px)+1}function dt(e,t){const a=e<0?"-":"",i=Math.abs(e).toString().padStart(t,"0");return a+i}const xr={y(e,t){const a=e.getFullYear(),i=a>0?a:1-a;return dt(t==="yy"?i%100:i,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):dt(a+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const a=t.length,i=e.getMilliseconds(),l=Math.trunc(i*Math.pow(10,a-3));return dt(l,t.length)}},Yi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ly={G:function(e,t,a){const i=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(i,{width:"abbreviated"});case"GGGGG":return a.era(i,{width:"narrow"});case"GGGG":default:return a.era(i,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const i=e.getFullYear(),l=i>0?i:1-i;return a.ordinalNumber(l,{unit:"year"})}return xr.y(e,t)},Y:function(e,t,a,i){const l=Gx(e,i),o=l>0?l:1-l;if(t==="YY"){const u=o%100;return dt(u,2)}return t==="Yo"?a.ordinalNumber(o,{unit:"year"}):dt(o,t.length)},R:function(e,t){const a=Hx(e);return dt(a,t.length)},u:function(e,t){const a=e.getFullYear();return dt(a,t.length)},Q:function(e,t,a){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return dt(i,2);case"Qo":return a.ordinalNumber(i,{unit:"quarter"});case"QQQ":return a.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,a){const i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return dt(i,2);case"qo":return a.ordinalNumber(i,{unit:"quarter"});case"qqq":return a.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,a){const i=e.getMonth();switch(t){case"M":case"MM":return xr.M(e,t);case"Mo":return a.ordinalNumber(i+1,{unit:"month"});case"MMM":return a.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,a){const i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return dt(i+1,2);case"Lo":return a.ordinalNumber(i+1,{unit:"month"});case"LLL":return a.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,a,i){const l=Uk(e,i);return t==="wo"?a.ordinalNumber(l,{unit:"week"}):dt(l,t.length)},I:function(e,t,a){const i=Mk(e);return t==="Io"?a.ordinalNumber(i,{unit:"week"}):dt(i,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):xr.d(e,t)},D:function(e,t,a){const i=Lk(e);return t==="Do"?a.ordinalNumber(i,{unit:"dayOfYear"}):dt(i,t.length)},E:function(e,t,a){const i=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(i,{width:"short",context:"formatting"});case"EEEE":default:return a.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,a,i){const l=e.getDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return dt(o,2);case"eo":return a.ordinalNumber(o,{unit:"day"});case"eee":return a.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(l,{width:"short",context:"formatting"});case"eeee":default:return a.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,a,i){const l=e.getDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return dt(o,t.length);case"co":return a.ordinalNumber(o,{unit:"day"});case"ccc":return a.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(l,{width:"narrow",context:"standalone"});case"cccccc":return a.day(l,{width:"short",context:"standalone"});case"cccc":default:return a.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,a){const i=e.getDay(),l=i===0?7:i;switch(t){case"i":return String(l);case"ii":return dt(l,t.length);case"io":return a.ordinalNumber(l,{unit:"day"});case"iii":return a.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(i,{width:"short",context:"formatting"});case"iiii":default:return a.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,a){const l=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,a){const i=e.getHours();let l;switch(i===12?l=Yi.noon:i===0?l=Yi.midnight:l=i/12>
vendor: 8,500 bytes, line 350
350=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,a){const i=e.getHours();let l;switch(i>=17?l=Yi.evening:i>=12?l=Yi.afternoon:i>=4?l=Yi.morning:l=Yi.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let i=e.getHours()%12;return i===0&&(i=12),a.ordinalNumber(i,{unit:"hour"})}return xr.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):xr.H(e,t)},K:function(e,t,a){const i=e.getHours()%12;return t==="Ko"?a.ordinalNumber(i,{unit:"hour"}):dt(i,t.length)},k:function(e,t,a){let i=e.getHours();return i===0&&(i=24),t==="ko"?a.ordinalNumber(i,{unit:"hour"}):dt(i,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):xr.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):xr.s(e,t)},S:function(e,t){return xr.S(e,t)},X:function(e,t,a){const i=e.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return Iy(i);case"XXXX":case"XX":return Zr(i);case"XXXXX":case"XXX":default:return Zr(i,":")}},x:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"x":return Iy(i);case"xxxx":case"xx":return Zr(i);case"xxxxx":case"xxx":default:return Zr(i,":")}},O:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+My(i,":");case"OOOO":default:return"GMT"+Zr(i,":")}},z:function(e,t,a){const i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+My(i,":");case"zzzz":default:return"GMT"+Zr(i,":")}},t:function(e,t,a){const i=Math.trunc(+e/1e3);return dt(i,t.length)},T:function(e,t,a){return dt(+e,t.length)}};function My(e,t=""){const a=e>0?"-":"+",i=Math.abs(e),l=Math.trunc(i/60),o=i%60;return o===0?a+String(l):a+String(l)+t+dt(o,2)}function Iy(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):Zr(e,t)}function Zr(e,t=""){const a=e>0?"-":"+",i=Math.abs(e),l=dt(Math.trunc(i/60),2),o=dt(i%60,2);return a+l+t+o}const Uy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},qx=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Bk=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],i=a[1],l=a[2];if(!l)return Uy(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Uy(i,t)).replace("{{time}}",qx(l,t))},zk={p:qx,P:Bk},Pk=/^D+$/,Hk=/^Y+$/,Vk=["D","DD","YY","YYYY"];function Gk(e){return Pk.test(e)}function qk(e){return Hk.test(e)}function $k(e,t,a){const i=Yk(e,t,a);if(console.warn(i),Vk.includes(e))throw new RangeError(i)}function Yk(e,t,a){const i=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Wk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jk=/^'([^]*?)'?$/,Xk=/''/g,Qk=/[a-zA-Z]/;function Wt(e,t,a){var y,b,x,w;const i=Kc(),l=i.locale??Dk,o=i.firstWeekContainsDate??((b=(y=i.locale)==null?void 0:y.options)==null?void 0:b.firstWeekContainsDate)??1,u=i.weekStartsOn??((w=(x=i.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)??0,h=ia(e,a==null?void 0:a.in);if(!Il(h))throw new RangeError("Invalid time value");let f=t.match(Kk).map(N=>{const A=N[0];if(A==="p"||A==="P"){const _=zk[A];return _(N,l.formatLong)}return N}).join("").match(Wk).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const A=N[0];if(A==="'")return{isToken:!1,value:Zk(N)};if(Ly[A])return{isToken:!0,value:N};if(A.match(Qk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:N}});l.localize.preprocessor&&(f=l.localize.preprocessor(h,f));const p={firstWeekContainsDate:o,weekStartsOn:u,locale:l};return f.map(N=>{if(!N.isToken)return N.value;const A=N.value;(qk(A)||Gk(A))&&$k(A,t,String(e));const _=Ly[A[0]];return _(h,A,l.localize,p)}).join("")}function Zk(e){const t=e.match(Jk);return t?t[1].replace(Xk,"'"):e}const Wi={"atlanta hawks":"ATL",hawks:"ATL","boston celtics":"BOS",celtics:"BOS","brooklyn nets":"BKN",nets:"BKN","charlotte hornets":"CHA",hornets:"CHA","chicago bulls":"CHI",bulls:"CHI","cleveland cavaliers":"CLE",cavaliers:"CLE",cavs:"CLE","dallas mavericks":"DAL",mavericks:"DAL",mavs:"DAL","denver nuggets":"DEN",nuggets:"DEN","detroit pistons":"DET",pistons:"DET","golden state warriors":"GSW",warriors:"GSW","houston rockets":"HOU",rockets:"HOU","indiana pacers":"IND",pacers:"IND","los angeles clippers":"LAC","la clippers":"LAC",clippers:"LAC","los angeles lakers":"LAL","la lakers":"LAL",lakers:"LAL","memphis grizzlies":"MEM",grizzlies:"MEM","miami heat":"MIA",heat:"MIA","milwaukee bucks":"MIL",bucks:"MIL","minnesota timberwolves":"MIN",timberwolves:"MIN",wolves:"MIN","new orleans pelicans":"NOP",pelicans:"NOP","new york knicks":"NYK",knicks:"NYK","oklahoma city thunder":"OKC",thunder:"OKC","orlando magic":"ORL",magic:"ORL","philadelphia 76ers":"PHI","76ers":"PHI",sixers:"PHI","phoenix suns":"PHX",suns:"PHX","portland trail blazers":"POR","trail blazers":"POR",blazers:"POR","sacramento kings":"SAC",kings:"SAC","san antonio spurs":"SAS",spurs:"SAS","toronto raptors":"TOR",raptors:"TOR","utah jazz":"UTA",jazz:"UTA","washington wizards":"WAS",wizards:"WAS","anaheim ducks":"ANA",ducks:"ANA","arizona coyotes":"ARI",coyotes:"ARI","boston bruins":"BOS",bruins:"BOS","buffalo sabres":"BUF",sabres:"BUF","calgary flames":"CGY",flames:"CGY","carolina hurricanes":"CAR",hurricanes:"CAR",canes:"CAR","chicago blackhawks":"CHI",blackhawks:"CHI","colorado avalanche":"COL",avalanche:"COL",avs:"COL","columbus blue jackets":"CBJ","blue jackets":"CBJ","dallas stars":"DAL",stars:"DAL","detroit red wings":"DET","red wings":"DET","edmonton oilers":"EDM",oilers:"EDM","florida panthers":"FLA",panthers:"FLA","los angeles kings":"LAK","la kings":"LAK","minnesota wild":"MIN",wild:"MIN","montreal canadiens":"MTL",canadiens:"MTL",habs:"MTL","nashville predators":"NSH",predators:"NSH",preds:"NSH","new jersey devils":"NJD",devils:"NJD","new york islanders":"NYI",islanders:"NYI","new york rangers":"NYR",rangers:"NYR","ottawa senators":"OTT",senators:"OTT",sens:"OTT","philadelphia flyers":"PHI",flyers:"PHI","pittsburgh penguins":"PIT",penguins:"PIT",pens:"PIT","san jose sharks":"SJS",sharks:"SJS","seattle kraken":"SEA",kraken:"SEA","st. louis blues":"STL","st louis blues":"STL",blues:"STL","tampa bay lightning":"TBL",lightning:"TBL",bolts:"TBL","toronto maple leafs":"TOR","maple leafs":"TOR",leafs:"TOR","vancouver canucks":"VAN",canucks:"VAN","vegas golden knights":"VGK","golden knights":"VGK",knights:"VGK","washington capitals":"WSH",capitals:"WSH",caps:"WSH","winnipeg jets":"WPG",jets:"WPG","utah hockey club":"UTA","arizona cardinals":"ARI",cardinals:"ARI","atlanta falcons":"ATL",falcons:"ATL","baltimore ravens":"BAL",ravens:"BAL","buffalo bills":"BUF",bills:"BUF","carolina panthers":"CAR","chicago bears":"CHI",bears:"CHI","cincinnati bengals":"CIN",bengals:"CIN","cleveland browns":"CLE",browns:"CLE","dallas cowboys":"DAL",cowboys:"DAL","denver broncos":"DEN",broncos:"DEN","detroit lions":"DET",lions:"DET","green bay packers":"GB",packers:"GB","houston texans":"HOU",texans:"HOU","indianapolis colts":"IND",colts:"IND","jacksonville jaguars":"JAX",jaguars:"JAX",jags:"JAX","kansas city chiefs":"KC",chiefs:"KC","las vegas raiders":"LV",raiders:"LV","los angeles chargers":"LAC","la chargers":"LAC",chargers:"LAC","los angeles rams":"LAR","la rams":"LAR",rams:"LAR","miami dolphins":"MIA",dolphins:"MIA","minnesota vikings":"MIN",vikings:"MIN","new england patriots":"NE",patriots:"NE",pats:"NE","new orleans 
350saints":"NO",saints:"NO","new york giants":"NYG",giants:"NYG","new york jets":"NYJ","philadelphia eagles":"PHI",eagles:"PHI","pittsburgh steelers":"PIT",steelers:"PIT","san francisco 49ers":"SF","49ers":"SF",niners:"SF","seattle seahawks":"SEA",seahawks:"SEA","tampa bay buccaneers":"TB",buccaneers:"TB",bucs:"TB","tennessee titans":"TEN",titans:"TEN","washington commanders":"WAS",commanders:"WAS","arizona diamondbacks":"ARI",diamondbacks:"ARI",dbacks:"ARI","atlanta braves":"ATL",braves:"ATL","baltimore orioles":"BAL",orioles:"BAL",os:"BAL","boston red sox":"BOS","red sox":"BOS","chicago cubs":"CHC",cubs:"CHC","chicago white sox":"CWS","white sox":"CWS","cincinnati reds":"CIN",reds:"CIN","cleveland guardians":"CLE",guardians:"CLE","colorado rockies":"COL",rockies:"COL","detroit tigers":"DET",tigers:"DET","houston astros":"HOU",astros:"HOU","kansas city royals":"KC",royals:"KC","los angeles angels":"LAA","la angels":"LAA",angels:"LAA","los angeles dodgers":"LAD","la dodgers":"LAD",dodgers:"LAD","miami marlins":"MIA",marlins:"MIA","milwaukee brewers":"MIL",brewers:"MIL","minnesota twins":"MIN",twins:"MIN","new york mets":"NYM",mets:"NYM","new york yankees":"NYY",yankees:"NYY","oakland athletics":"OAK",athletics:"OAK",as:"OAK","philadelphia phillies":"PHI",phillies:"PHI","pittsburgh pirates":"PIT",pirates:"PIT","san diego padres":"SD",padres:"SD","san francisco giants":"SF","seattle mariners":"SEA",mariners:"SEA","st. louis cardinals":"STL","st louis cardinals":"STL","tampa bay rays":"TB",rays:"TB","texas rangers":"TEX","toronto blue jays":"TOR","blue jays":"TOR","washington nationals":"WSH",nationals:"WSH",nats:"WSH",auburn:"AUB","auburn tigers":"AUB",alabama:"BAMA","alabama crimson tide":"BAMA","crimson tide":"BAMA",arkansas:"ARK","arkansas razorbacks":"ARK",razorbacks:"ARK","florida gators":"UF",gators:"UF",georgia:"UGA","georgia bulldogs":"UGA",kentucky:"KENT","kentucky wildcats":"KENT",lsu:"LSU","lsu tigers":"LSU","mississippi state":"MSST","mississippi state bulldogs":"MSST","ole miss":"MISS","ole miss rebels":"MISS",missouri:"MIZ","missouri tigers":"MIZ",oklahoma:"OKLA","oklahoma sooners":"OKLA",sooners:"OKLA","south carolina":"SCAR","south carolina gamecocks":"SCAR",gamecocks:"SCAR",tennessee:"TENN","tennessee volunteers":"TENN",volunteers:"TENN",vols:"TENN","texas a&m":"TXAM","texas a&m aggies":"TXAM",aggies:"TXAM",vanderbilt:"VANDY","vanderbilt commodores":"VANDY",commodores:"VANDY",illinois:"ILL","illinois fighting illini":"ILL",illini:"ILL",iowa:"IOWA","iowa hawkeyes":"IOWA",hawkeyes:"IOWA",maryland:"MARY","maryland terrapins":"MARY",terrapins:"MARY",terps:"MARY",michigan:"MICH","michigan wolverines":"MICH",wolverines:"MICH","michigan state":"MSU","michigan state spartans":"MSU",spartans:"MSU",nebraska:"NEB","nebraska cornhuskers":"NEB",cornhuskers:"NEB",huskers:"NEB",northwestern:"NW","northwestern wildcats":"NW","ohio state":"OSU","ohio state buckeyes":"OSU",buckeyes:"OSU","penn state":"PSU","penn state nittany lions":"PSU","nittany lions":"PSU",purdue:"PUR","purdue boilermakers":"PUR",boilermakers:"PUR",rutgers:"RUTG","rutgers scarlet knights":"RUTG","scarlet knights":"RUTG",wisconsin:"WISC","wisconsin badgers":"WISC",badgers:"WISC",minnesota:"MINN","minnesota golden gophers":"MINN","golden gophers":"MINN",gophers:"MINN",oregon:"ORE","oregon ducks":"ORE",ucla:"UCLA","ucla bruins":"UCLA",usc:"USC","usc trojans":"USC",trojans:"USC",washington:"WASH","washington huskies":"WASH",huskies:"WASH",arizona:"ARIZ","arizona wildcats":"ARIZ","arizona state":"ASU","arizona state sun devils":"ASU","sun devils":"ASU",baylor:"BAY","baylor bears":"BAY",byu:"BYU","byu cougars":"BYU",ucf:"UCF","ucf knights":"UCF",colorado:"COLO","colorado buffaloes":"COLO",buffaloes:"COLO",cincinnati:"CINC","cincinnati bearcats":"CINC",bearcats:"CINC","iowa state":"ISU","iowa state cyclones":"ISU",cyclones:"ISU",kansas:"KU","kansas jayhawks":"KU",jayhawks:"KU","kansas state":"KSU","kansas state wildcats":"KSU","oklahoma state":"OKST","oklahoma state cowboys":"OKST",tcu:"TCU","tcu horned frogs":"TCU","horned frogs":"TCU","texas tech":"TTU","texas tech red raiders":"TTU","red raiders":"TTU","west virginia":"WVU","west virginia mountaineers":"WVU",mountaineers:"WVU",utah:"UTAH","utah utes":"UTAH",utes:"UTAH",houston:"HOUST","houston cougars":"HOUST",cougars:"HOUST","boston college":"BC","boston college eagles":"BC",clemson:"CLEM","clemson tigers":"CLEM",duke:"DUKE","duke blue devils":"DUKE","blue devils":"DUKE","florida state":"FSU","florida state seminoles":"FSU",seminoles:"FSU",noles:"FSU","georgia tech":"GT","georgia tech yellow jackets":"GT","yellow jackets":"GT",louisville:"LOU","louisville cardinals":"LOU","north carolina":"UNC","north carolina tar heels":"UNC","tar heels":"UNC","nc state":"NCST","nc state wolfpack":"NCST",wolfpack:"NCST","notre dame":"ND","notre dame fighting irish":"ND","fighting irish":"ND",pittsburgh:"PITT","pittsburgh panthers":"PITT",smu:"SMU","smu mustangs":"SMU",mustangs:"SMU",syracuse:"CUSE","syracuse orange":"CUSE",virginia:"UVA","virginia cavaliers":"UVA","virginia tech":"VT","virginia tech hokies":"VT",hokies:"VT","wake forest":"WAKE","wake forest demon deacons":"WAKE","demon deacons":"WAKE","boise state":"BSU","boise state broncos":"BSU","colorado state":"CSU","colorado state rams":"CSU","fresno state":"FRES","fresno state bulldogs":"FRES","san diego state":"SDSU","san diego state aztecs":"SDSU",aztecs:"SDSU",unlv:"UNLV","unlv rebels":"UNLV","utah state":"USU","utah state aggies":"USU",wyoming:"WYO","wyoming cowboys":"WYO",gonzaga:"GONZ","gonzaga bulldogs":"GONZ",zags:"GONZ",marquette:"MARQ","marquette golden eagles":"MARQ",xavier:"XAVI","xavier musketeers":"XAVI",musketeers:"XAVI",uconn:"UCONN",connecticut:"UCONN","connecticut huskies":"UCONN",villanova:"VILL","villanova wildcats":"VILL",creighton:"CREIG","creighton bluejays":"CREIG",bluejays:"CREIG","iu indianapolis":"IUIN","iu indy":"IUIN",milwaukee:"MILW","milwaukee panthers":"MILW","wichita state":"WICH","wichita state shockers":"WICH",shockers:"WICH",drake:"DRKE","drake bulldogs":"DRKE",bradley:"BRAD","bradley braves":"BRAD","loyola chicago":"LOYC","loyola-chicago":"LOYC",ramblers:"LOYC",georgetown:"GTWN","georgetown university":"GTWN","georgetown hoyas":"GTWN",hoyas:"GTWN","george mason":"GMAS","george mason patriots":"GMAS","george washington":"GW","george washington colonials":"GW","gw colonials":"GW","saint josephs":"SJU","saint joseph's":"SJU","st josephs":"SJU","st. joseph's":"SJU","saint joseph's hawks":"SJU","st joes":"SJU","st. joe's":"SJU","saint joes":"SJU","saint joe's":"SJU","eastern illinois":"EIU","eastern illinois panthers":"EIU","eiu panthers":"EIU",niagara:"NIAG","niagara purple eagles":"NIAG",canisius:"CANI","canisius golden griffins":"CANI",manhattan:"MANH","manhattan jaspers":"MANH","saint peter's":"STPET","saint peters":"STPET","st peters":"STPET","st. peter's":"STPET","st peter's":"STPET",marist:"MRST","marist red foxes":"MRST",fairfield:"FAIR","fairfield stags":"FAIR",iona:"IONA","iona gaels":"IONA",rider:"RID","rider broncs":"RID",quinnipiac:"QUIN","quinnipiac bobcats":"QUIN",siena:"SIEN","siena saints":"SIEN",cornell:"CORN","cornell big red":"CORN",columbia:"COLM","columbia lions":"COLM",pennsylvania:"PENN",penn:"PENN","penn quakers":"PENN",brown:"BROWN","brown bears":"BROWN",dartmouth:"DART","dartmouth big green":"DART",harvard:"HARV","harvard crimson":"HARV",yale:"YALE","yale bulldogs":"YALE",princeton:"PRIN","princeton tigers":"PRIN","mount st. mary's":"MSM","mount st marys":"MSM","mount st mary's":"MSM","mt st marys":"MSM","mt. st. mary's":"MSM","miami (oh)":"MIAMI","miami redhawks":"MIAMI","miami oh":"MIAMI",redhawks:"MIAMI",bryant:"BRY","bryant bulldogs":"BRY",wagner:"WAG","wagner seahawks":"WAG","long island university":"LIU","long island":"LIU",liu:"LIU",merrimack:"MRMK","merrimack warriors":"MRMK","central connecticut":"CCSU","central connecticut state":"CCSU","fairleigh dickinson":"FDU","fairleigh dickinson knights":"FDU","
350st francis-pennsylvania":"SFPA","st francis pa":"SFPA","saint francis pa":"SFPA","st josephs brooklyn":"SFBK","st francis brooklyn":"SFBK","stony brook":"STON","stony brook seawolves":"STON","sacred heart":"SACR","sacred heart pioneers":"SACR","le moyne":"LEMO","le moyne dolphins":"LEMO",lindenwood:"LNWD","lindenwood lions":"LNWD",njit:"NJIT","njit highlanders":"NJIT",butler:"BUTL","butler bulldogs":"BUTL",providence:"PROV","providence friars":"PROV",friars:"PROV","st johns":"STJO","st. john's":"STJO","st. johns":"STJO","saint johns":"STJO","red storm":"STJO","seton hall":"HALL","seton hall pirates":"HALL",depaul:"DPAU","depaul blue demons":"DPAU",dayton:"DAY","dayton flyers":"DAY",vcu:"VCU","vcu rams":"VCU","rhode island":"URI",uri:"URI","rhode island rams":"URI",davidson:"DAV","davidson wildcats":"DAV",richmond:"RICH","richmond spiders":"RICH",spiders:"RICH",fordham:"FORD","fordham rams":"FORD","la salle":"LASAL",lasalle:"LASAL","la salle explorers":"LASAL","saint louis":"SLU","st louis billikens":"SLU","saint louis billikens":"SLU",umass:"UMASS",massachusetts:"UMASS","umass minutemen":"UMASS",duquesne:"DUQ","duquesne dukes":"DUQ","st bonaventure":"STBON","st. bonaventure":"STBON","saint bonaventure":"STBON",bonaventure:"STBON","saint mary's":"SMC","saint marys":"SMC","st. mary's":"SMC","st marys":"SMC","san francisco":"SFDON","san francisco dons":"SFDON",portland:"PORT","portland pilots":"PORT",pepperdine:"PEPP","pepperdine waves":"PEPP","santa clara":"SCLAR","santa clara broncos":"SCLAR","san diego":"SDIEGO","san diego toreros":"SDIEGO",lmu:"LMU","loyola marymount":"LMU","loyola marymount lions":"LMU",pacific:"PAC","pacific tigers":"PAC",belmont:"BELM","belmont bruins":"BELM",samford:"SAMF","samford bulldogs":"SAMF",furman:"FUR","furman paladins":"FUR",chattanooga:"CHAT","chattanooga mocs":"CHAT",wofford:"WOF","wofford terriers":"WOF",etsu:"ETSU","east tennessee state":"ETSU","east tennessee":"ETSU",mercer:"MERC","mercer bears":"MERC","the citadel":"CITAD",citadel:"CITAD","citadel bulldogs":"CITAD",vmi:"VMI","virginia military":"VMI","western carolina":"WCAR","western carolina catamounts":"WCAR","unc greensboro":"UNCG",uncg:"UNCG","murray state":"MUR","murray state racers":"MUR","indiana state":"INST","indiana state sycamores":"INST",evansville:"EVAN","evansville purple aces":"EVAN","missouri state":"MOST","missouri state bears":"MOST","northern iowa":"UNI","northern iowa panthers":"UNI","illinois state":"ILST","illinois state redbirds":"ILST",valparaiso:"VAL","valparaiso beacons":"VAL",bellarmine:"BELL","bellarmine knights":"BELL",siu:"SIU","southern illinois":"SIU",hofstra:"HOF","hofstra pride":"HOF",charleston:"COFC","college of charleston":"COFC",delaware:"DEL","delaware blue hens":"DEL",drexel:"DREX","drexel dragons":"DREX",elon:"ELON","elon phoenix":"ELON",hampton:"HAMP","hampton pirates":"HAMP",northeastern:"NEAST","northeastern huskies":"NEAST",towson:"TOWSN","towson tigers":"TOWSN","unc wilmington":"UNCW",uncw:"UNCW","unc-wilmington":"UNCW","william & mary":"WM","william and mary":"WM",stetson:"STET","stetson hatters":"STET",monmouth:"MONM","monmouth hawks":"MONM","north carolina a&t":"NCAT","nc a&t":"NCAT",detroit:"DETM","detroit mercy":"DETM","detroit titans":"DETM","northern kentucky":"NKU","northern kentucky norse":"NKU",oakland:"OAKL","oakland golden grizzlies":"OAKL","cleveland state":"CLEV","cleveland state vikings":"CLEV","wright state":"WRST","wright state raiders":"WRST","youngstown state":"YSU","youngstown state penguins":"YSU","purdue fort wayne":"PURFW","purdue-fort wayne":"PURFW","robert morris":"RMU","robert morris colonials":"RMU",vermont:"UVM","vermont catamounts":"UVM",catamounts:"UVM",umbc:"UMBC","umbc retrievers":"UMBC",binghamton:"BING","binghamton bearcats":"BING",maine:"MAINE","maine black bears":"MAINE","
350new hampshire":"UNH","new hampshire wildcats":"UNH","umass lowell":"UML","umass-lowell":"UML",ualbany:"ALB",albany:"ALB","albany great danes":"ALB",bucknell:"BUCK","bucknell bison":"BUCK",lafayette:"LAF","lafayette leopards":"LAF",lehigh:"LEH","lehigh mountain hawks":"LEH","holy cross":"HOLYCR","holy cross crusaders":"HOLYCR",colgate:"COLG","colgate raiders":"COLG","boston university":"BU","boston u":"BU",american:"AMER","american university":"AMER","american eagles":"AMER",navy:"NAVY","navy midshipmen":"NAVY",army:"ARMY","army black knights":"ARMY","appalachian state":"APP","app state":"APP","appalachian st":"APP","georgia state":"GSU","georgia state panthers":"GSU","georgia southern":"GASOU","georgia southern eagles":"GASOU","coastal carolina":"CCU","coastal carolina chanticleers":"CCU",troy:"TROY","troy trojans":"TROY","south alabama":"SALA","south alabama jaguars":"SALA","old dominion":"ODU","old dominion monarchs":"ODU","james madison":"JMU","james madison dukes":"JMU",marshall:"MARSH","marshall thundering herd":"MARSH","western kentucky":"WKU","western kentucky hilltoppers":"WKU","little rock":"LR","arkansas-little rock":"LR",ualr:"LR","texas state":"TXST","texas state bobcats":"TXST","texas-arlington":"UTA2","ut arlington":"UTA2",uta:"UTA2","ut-arlington":"UTA2",charlotte:"CHAR","charlotte 49ers":"CHAR","north texas":"UNT","north texas mean green":"UNT","middle tennessee":"MTSU","middle tennessee state":"MTSU",mtsu:"MTSU",fiu:"FIU","florida international":"FIU",fau:"FAU","florida atlantic":"FAU",uab:"UAB","uab blazers":"UAB","east carolina":"ECU","east carolina pirates":"ECU",rice:"RICE","rice owls":"RICE",tulane:"TULN","tulane green wave":"TULN",tulsa:"TULS","tulsa golden hurricane":"TULS",memphis:"MEM2","memphis tigers":"MEM2",utep:"UTEP","utep miners":"UTEP",temple:"TEMP","temple owls":"TEMP",usf:"USF","south florida":"USF","south florida bulls":"USF","southern methodist":"SMU","grand canyon":"GCU","grand canyon antelopes":"GCU",seattle:"SEAT","seattle u":"SEAT","seattle redhawks":"SEAT","california baptist":"CBU","cal baptist":"CBU","abilene christian":"ACU","abilene christian wildcats":"ACU","tarleton state":"TARST",tarleton:"TARST","utah valley":"UVU","utah valley wolverines":"UVU","new mexico":"NMEX","new mexico lobos":"NMEX","new mexico state":"NMSU","new mexico state aggies":"NMSU","sam houston":"SAM","sam houston state":"SAM","sam houston bearkats":"SAM","northern arizona":"NAU","northern arizona lumberjacks":"NAU","eastern washington":"EWU","eastern washington eagles":"EWU","montana state":"MONST","montana state bobcats":"MONST",montana:"MONT","montana grizzlies":"MONT","portland state":"PORTST","portland state vikings":"PORTST","weber state":"WEBB","weber state wildcats":"WEBB",idaho:"IDAHO","idaho vandals":"IDAHO","idaho state":"IDAST","idaho state bengals":"IDAST","sacramento state":"SACST","sacramento state hornets":"SACST",stanford:"STAN","stanford cardinal":"STAN","cal state-northridge":"CSUN","cal state northridge":"CSUN",csun:"CSUN",hawaii:"HAW","hawai'i":"HAW","hawaii rainbow warriors":"HAW","long beach state":"LBST","long beach state beach":"LBST","long beach":"LBST","uc irvine":"UCI","uc irvine anteaters":"UCI","bowling green":"BGSU","bowling green falcons":"BGSU","central michigan":"CMU","central michigan chippewas":"CMU","eastern michigan":"EMU","eastern michigan eagles":"EMU","western michigan":"WMU","western michigan broncos":"WMU","northern illinois":"NIU","northern illinois huskies":"NIU",ohio:"OHIO","ohio bobcats":"OHIO",toledo:"TOL","toledo rockets":"TOL",buffalo:"BUFF","buffalo bulls":"BUFF",akron:"AKR","akron zips":"AKR","kent state":"KNST","kent state golden flashes":"KNST","ball state":"BALL","ball state cardinals":"BALL","eastern kentucky":"EKU","eastern kentucky colonels":"EKU","tennessee tech":"TNTECH","tennessee tech golden eagles":"TNTECH","tennessee state":"TNST","tennessee state tigers":"TNST","southeast missouri state":"SEMO","southeast missouri":"SEMO","se missouri state":"SEMO","morehead state":"MORE","morehead state eagles":"MORE","austin peay":"APSU","austin peay governors":"APSU",liberty:"LIB","liberty flames":"LIB","florida gulf coast":"FGCU",fgcu:"FGCU","florida gulf coast eagles":"FGCU","north florida":"UNF","north florida ospreys":"UNF","jacksonville state":"JAS","jacksonville state gamecocks":"JAS","kennesaw state":"KENN",kennesaw:"KENN","kennesaw state owls":"KENN",lipscomb:"LIP","lipscomb bisons":"LIP",campbell:"CAMP","campbell fighting camels":"CAMP","east texas a&m":"ETAMU","east texas a&m lions":"ETAMU","texas a&m-commerce":"ETAMU","texas a&m commerce":"ETAMU","ut rio grande valley":"UTRGV",utrgv:"UTRGV","ut rio grande valley vaqueros":"UTRGV","rio grande valley":"UTRGV","stephen f. austin":"SFA","stephen f austin":"SFA","sfa lumberjacks":"SFA","stephen f. austin lumberjacks":"SFA","new orleans":"UNO","new orleans privateers":"UNO",uno:"UNO",mcneese:"MCNEE","mcneese state":"MCNEE","mcneese cowboys":"MCNEE","nicholls state":"NICH",nicholls:"NICH","northwestern state":"NWST","northwestern state demons":"NWST","incarnate word":"UIW",uiw:"UIW",howard:"HOW","howard bison":"HOW","morgan state":"MORG","morgan state bears":"MORG","norfolk state":"NSU","
350norfolk state spartans":"NSU","coppin state":"COPP","coppin state eagles":"COPP","south carolina state":"SCST","south carolina state bulldogs":"SCST","nc central":"NCCU","north carolina central":"NCCU","alcorn state":"ALCN","alcorn state braves":"ALCN","jackson state":"JKST","jackson state tigers":"JKST",grambling:"GRAM","grambling state":"GRAM","bethune-cookman":"BETH","bethune cookman":"BETH","florida a&m":"FAMU","florida am":"FAMU",famu:"FAMU","texas southern":"TSU","texas southern tigers":"TSU","prairie view":"PVAM","prairie view a&m":"PVAM","southern university":"SOUT2",southern:"SOUT2",radford:"RAD","radford highlanders":"RAD",winthrop:"WINTH","winthrop eagles":"WINTH","high point":"HPU","high point panthers":"HPU",longwood:"LONG","longwood lancers":"LONG","gardner-webb":"GARD","gardner webb":"GARD","charleston southern":"CHSO","charleston southern buccaneers":"CHSO",presbyterian:"PRES","presbyterian blue hose":"PRES","sc upstate":"USCUP","south carolina upstate":"USCUP","usc upstate":"USCUP","north alabama":"UNA","north alabama lions":"UNA","central arkansas":"UCA","central arkansas bears":"UCA","chicago state":"CHST","chicago state cougars":"CHST","west georgia":"WGEO","west georgia wolves":"WGEO",indiana:"IU","indiana hoosiers":"IU",mercyhurst:"MRCY","mercyhurst lakers":"MRCY","new haven":"NHVN","new haven chargers":"NHVN","unc asheville":"UNCA","unc-asheville":"UNCA","southern miss":"SOUM","southern mississippi":"SOUM",lamar:"LAMAR","lamar cardinals":"LAMAR","texas a and m-corpus christi":"TAMUCC","texas a&m-corpus christi":"TAMUCC","north dakota state":"NDSU",ndsu:"NDSU","north dakota state bison":"NDSU","south dakota state":"SDST2","sdsu jackrabbits":"SDST2","oral roberts":"ORU","oral roberts golden eagles":"ORU"};function Ct(e){if(!e)return"";const t=e.trim();if(t.length<=4&&t===t.toUpperCase())return t;const i=t.replace(/[\u2018\u2019\u2032]/g,"'").replace(/\s*\(.*?\)\s*$/,"").trim().toLowerCase();if(Wi[i])return Wi[i];const l=i.split(" ").pop()||"";if(Wi[l])return Wi[l];const o=i.replace(/'/g,"");return Wi[o]?Wi[o]:t.substring(0,3).toUpperCase()}const Dc=["Initializing Research Agent...","Loading Daily League Brief Context...","Querying Live Odds & Line Movement...","Analyzing Advanced Metrics (EPA/DVOA)...","Evaluating Roster & Injury Impact...","Simulating Game Script Scenarios...","Checking Historical Trends...","Synthesizing Strategic Mismatches...","Drafting Narrative Analysis...","Finalizing Prediction Confidence...","Cross-Referencing Sources...","Formatting Final Executive Report..."],eA=["Initializing Golf Research Agent...","Loading Tournament & Course Data...","Querying Current Betting Odds...","Analyzing Strokes Gained Metrics...","Evaluating Course History & Fit...","Checking Recent Form (Last 5 Events)...","Analyzing Weather Conditions...","Cross-Referencing Statistical Edges...","Identifying Value Picks & Dark Horses...","Ranking Top 10 Contenders...","Synthesizing Final Analysis...","Formatting Tournament Report..."],$x=90*1e3,tA=({state:e})=>{const[t,a]=J.useState(0),i=J.useRef(null),l=J.useRef(e.startTime);e.startTime!==l.current&&(l.current=e.startTime),J.useEffect(()=>{if(e.status==="completed"){a(100);return}const f=()=>{let b=(Date.now()-l.current)/$x*100;e.status!=="completed"&&b>99?b=99:e.status==="completed"&&(b=100),a(b),b<100&&e.status!=="completed"&&(i.current=requestAnimationFrame(f))};return i.current=requestAnimationFrame(f),()=>{i.current!==null&&cancelAnimationFrame(i.current)}},[e.status,e.startTime]);const o=Dc.length,u=100/o,h=Math.min(o-1,Math.floor(t/u));return d.jsxs("div",{className:"mt-6 p-6 bg-dark-950/80 border border-white/10 rounded-xl overflow-hidden relative backdrop-blur-xl shadow-2xl ring-1 ring-white/5",children:[d.jsxs("div",{className:"flex justify-between items-end mb-6 relative z-10",children:[d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(Fc,{className:"w-4 h-4 text-brand animate-pulse"}),d.jsx("span",{className:"text-[10px] text-brand font-mono uppercase tracking-[0.2em] font-bold",children:"System Processing"})]}),d.jsx("h3",{className:"font-teko font-light text-3xl text-white uppercase tracking-wide leading-none",children:"Research Agent Active"})]}),d.jsxs("span",{className:"font-teko font-light text-4xl text-white/90 leading-none",children:[Math.floor(t),d.jsx("span",{className:"text-xl text-brand",children:"%"})]})]}),d.jsx("div",{className:"h-1 bg-white/5 w-full rounded-full overflow-hidden mb-8 relative z-10",children:d.jsx("div",{className:"h-full bg-gradient-to-r from-brand/40 via-brand to-white shadow-[0_0_20px_rgba(51,214,82,0.6)] relative transition-all duration-100 ease-linear",style:{width:`${t}%`},children:d.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-8 bg-white blur-[4px] animate-pulse"})})}),d.jsx("div",{className:"relative z-10 flex flex-col gap-1 min-h-[120px]",children:Dc.map((f,p)=>
vendor: 5,308 bytes, line 350
350{if(p<h-2||p>h+1)return null;const y=p===h,b=p<h;return d.jsxs("div",{className:ae("flex items-center gap-2 transition-all duration-500 transform",y?"translate-x-2 opacity-100 scale-100 py-0.5":b?"opacity-30 scale-95 blur-[0.5px]":"opacity-30 translate-y-2 blur-[0.5px]"),children:[y?d.jsx(jc,{className:"w-3.5 h-3.5 text-brand animate-spin"}):b?d.jsx(BE,{className:"w-3.5 h-3.5 text-brand/50"}):d.jsx("div",{className:"w-3.5 h-3.5 rounded-full border border-white/10"}),d.jsx("span",{className:ae("uppercase tracking-wider transition-colors font-mono",y?"text-white text-xs font-bold shadow-black drop-shadow-md":"text-[10px] text-gray-500"),children:f})]},p)})}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-brand/5 via-transparent to-transparent pointer-events-none"}),d.jsx("div",{className:"absolute -top-20 -right-20 w-64 h-64 bg-brand/10 blur-[80px] rounded-full pointer-events-none animate-pulse"})]})};var Yx=Rx();function nA(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const aA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iA={};function By(e,t){return(iA.jsx?rA:aA).test(e)}const sA=/[ \t\n\f\r]/g;function lA(e){return typeof e=="object"?e.type==="text"?zy(e.value):!1:zy(e)}function zy(e){return e.replace(sA,"")===""}class Yl{constructor(t,a,i){this.normal=a,this.property=t,i&&(this.space=i)}}Yl.prototype.normal={};Yl.prototype.property={};Yl.prototype.space=void 0;function Wx(e,t){const a={},i={};for(const l of e)Object.assign(a,l.property),Object.assign(i,l.normal);return new Yl(a,i,t)}function rf(e){return e.toLowerCase()}class Dn{constructor(t,a){this.attribute=a,this.property=t}}Dn.prototype.attribute="";Dn.prototype.booleanish=!1;Dn.prototype.boolean=!1;Dn.prototype.commaOrSpaceSeparated=!1;Dn.prototype.commaSeparated=!1;Dn.prototype.defined=!1;Dn.prototype.mustUseProperty=!1;Dn.prototype.number=!1;Dn.prototype.overloadedBoolean=!1;Dn.prototype.property="";Dn.prototype.spaceSeparated=!1;Dn.prototype.space=void 0;let oA=0;const ze=ci(),$t=ci(),sf=ci(),me=ci(),wt=ci(),ps=ci(),Hn=ci();function ci(){return 2**++oA}const lf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:$t,commaOrSpaceSeparated:Hn,commaSeparated:ps,number:me,overloadedBoolean:sf,spaceSeparated:wt},Symbol.toStringTag,{value:"Module"})),vh=Object.keys(lf);class Uf extends Dn{constructor(t,a,i,l){let o=-1;if(super(t,a),Py(this,"space",l),typeof i=="number")for(;++o<vh.length;){const u=vh[o];Py(this,vh[o],(i&lf[u])===lf[u])}}}Uf.prototype.defined=!0;function Py(e,t,a){a&&(e[t]=a)}function Ss(e){const t={},a={};for(const[i,l]of Object.entries(e.properties)){const o=new Uf(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),t[i]=o,a[rf(i)]=i,a[rf(o.attribute)]=i}return new Yl(t,a,e.space)}const Kx=Ss({properties:{ariaActiveDescendant:null,ariaAtomic:$t,ariaAutoComplete:null,ariaBusy:$t,ariaChecked:$t,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:wt,ariaCurrent:null,ariaDescribedBy:wt,ariaDetails:null,ariaDisabled:$t,ariaDropEffect:wt,ariaErrorMessage:null,ariaExpanded:$t,ariaFlowTo:wt,ariaGrabbed:$t,ariaHasPopup:null,ariaHidden:$t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wt,ariaLevel:me,ariaLive:null,ariaModal:$t,ariaMultiLine:$t,ariaMultiSelectable:$t,ariaOrientation:null,ariaOwns:wt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:$t,ariaReadOnly:$t,ariaRelevant:null,ariaRequired:$t,ariaRoleDescription:wt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:$t,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Jx(e,t){return t in e?e[t]:t}function Xx(e,t){return Jx(e,t.toLowerCase())}const cA=Ss({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ps,acceptCharset:wt,accessKey:wt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:wt,autoFocus:ze,autoPlay:ze,blocking:wt,capture:null,charSet:null,checked:ze,cite:null,className:wt,cols:me,colSpan:null,content:null,contentEditable:$t,controls:ze,controlsList:wt,coords:me|ps,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:sf,draggable:$t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:wt,height:me,hidden:sf,high:me,href:null,hrefLang:null,htmlFor:wt,httpEquiv:wt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:wt,itemRef:wt,itemScope:ze,itemType:wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxCl
350ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:me,pattern:null,ping:wt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:wt,required:ze,reversed:ze,rows:me,rowSpan:me,sandbox:wt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:$t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:$t,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:$t,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:Xx}),uA=Ss({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
350-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Hn,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:wt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ps,g2:ps,glyphName:ps,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 4,405 bytes, lines 350-351
350Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jx}),Qx=Ss({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Zx=Ss({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xx}),ew=Ss({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),dA={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hA=/[A-Z]/g,Hy=/-[a-z]/g,fA=/^data[-\w.:]+$/i;function mA(e,t){const a=rf(t);let i=t,l=Dn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&fA.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Hy,gA);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Hy.test(o)){let u=o.replace(hA,pA);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=Uf}return new l(i,t)}function pA(e){return"-"+e.toLowerCase()}function gA(e){return e.charAt(1).toUpperCase()}const yA=Wx([Kx,cA,Qx,Zx,ew],"html"),Bf=Wx([Kx,uA,Qx,Zx,ew],"svg");function bA(e){return e.join(" ").trim()}var Ki={},Sh,Vy;function xA(){if(Vy)return Sh;Vy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,h=/^\s+|\s+$/g,f=`
351`,p="/",y="*",b="",x="comment",w="declaration";function N(_,C){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];C=C||{};var T=1,j=1;function B(z){var $=z.match(t);$&&(T+=$.length);var P=z.lastIndexOf(f);j=~P?z.length-P:j+z.length}function Q(){var z={line:T,column:j};return function($){return $.position=new O(z),q(),$}}function O(z){this.start=z,this.end={line:T,column:j},this.source=C.source}O.prototype.content=_;function V(z){var $=new Error(C.source+":"+T+":"+j+": "+z);
vendor: 4,693 bytes, line 351
351if($.reason=z,$.filename=C.source,$.line=T,$.column=j,$.source=_,!C.silent)throw $}function ee(z){var $=z.exec(_);if($){var P=$[0];return B(P),_=_.slice(P.length),$}}function q(){ee(a)}function E(z){var $;for(z=z||[];$=G();)$!==!1&&z.push($);return z}function G(){var z=Q();if(!(p!=_.charAt(0)||y!=_.charAt(1))){for(var $=2;b!=_.charAt($)&&(y!=_.charAt($)||p!=_.charAt($+1));)++$;if($+=2,b===_.charAt($-1))return V("End of comment missing");var P=_.slice(2,$-2);return j+=2,B(P),_=_.slice($),j+=2,z({type:x,comment:P})}}function D(){var z=Q(),$=ee(i);if($){if(G(),!ee(l))return V("property missing ':'");var P=ee(o),te=z({type:w,property:A($[0].replace(e,b)),value:P?A(P[0].replace(e,b)):b});return ee(u),te}}function U(){var z=[];E(z);for(var $;$=D();)$!==!1&&(z.push($),E(z));return z}return q(),U()}function A(_){return _?_.replace(h,b):b}return Sh=N,Sh}var Gy;function wA(){if(Gy)return Ki;Gy=1;var e=Ki&&Ki.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.default=a;const t=e(xA());function a(i,l){let o=null;if(!i||typeof i!="string")return o;const u=(0,t.default)(i),h=typeof l=="function";return u.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:y}=f;h?l(p,y,f):y&&(o=o||{},o[p]=y)}),o}return Ki}var yl={},qy;function vA(){if(qy)return yl;qy=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(p){return!p||a.test(p)||e.test(p)},u=function(p,y){return y.toUpperCase()},h=function(p,y){return"".concat(y,"-")},f=function(p,y){return y===void 0&&(y={}),o(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(l,h):p=p.replace(i,h),p.replace(t,u))};return yl.camelCase=f,yl}var bl,$y;function SA(){if($y)return bl;$y=1;var e=bl&&bl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(wA()),a=vA();function i(l,o){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(h,f){h&&f&&(u[(0,a.camelCase)(h,o)]=f)}),u}return i.default=i,bl=i,bl}var EA=SA();const NA=$l(EA),tw=nw("end"),zf=nw("start");function nw(e){return t;function t(a){const i=a&&a.position&&a.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function kA(e){const t=zf(e),a=tw(e);if(t&&a)return{start:t,end:a}}function Tl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yy(e.position):"start"in e||"end"in e?Yy(e):"line"in e||"column"in e?of(e):""}function of(e){return Wy(e&&e.line)+":"+Wy(e&&e.column)}function Yy(e){return of(e&&e.start)+"-"+of(e&&e.end)}function Wy(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,a,i){super(),typeof a=="string"&&(i=a,a=void 0);let l="",o={},u=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof t=="string"?l=t:!o.cause&&t&&(u=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?o.ruleId=i:(o.source=i.slice(0,f),o.ruleId=i.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=h?h.line:void 0,this.name=Tl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const Pf={}.hasOwnProperty,AA=new Map,_A=/[A-Z]/g,TA=new Set(["table","tbody","thead","tfoot","tr"]),CA=new Set(["td","th"]),aw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jA(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=UA(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 9,216 bytes, line 351
351if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=IA(a,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bf:yA,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=rw(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function rw(e,t,a){if(t.type==="element")return FA(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return OA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DA(e,t,a);if(t.type==="mdxjsEsm")return RA(e,t);if(t.type==="root")return LA(e,t,a);if(t.type==="text")return MA(e,t)}function FA(e,t,a){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=Bf,e.schema=l),e.ancestors.push(t);const o=sw(e,t.tagName,!1),u=BA(e,t);let h=Vf(e,t);return TA.has(t.tagName)&&(h=h.filter(function(f){return typeof f=="string"?!lA(f):!0})),iw(e,u,o,t),Hf(u,h),e.ancestors.pop(),e.schema=i,e.create(t,o,u,a)}function OA(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ul(e,t.position)}function RA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ul(e,t.position)}function DA(e,t,a){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=Bf,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:sw(e,t.name,!0),u=zA(e,t),h=Vf(e,t);return iw(e,u,o,t),Hf(u,h),e.ancestors.pop(),e.schema=i,e.create(t,o,u,a)}function LA(e,t,a){const i={};return Hf(i,Vf(e,t)),e.create(t,e.Fragment,i,a)}function MA(e,t){return t.value}function iw(e,t,a,i){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=i)}function Hf(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function IA(e,t,a){return i;function i(l,o,u,h){const p=Array.isArray(u.children)?a:t;return h?p(o,u,h):p(o,u)}}function UA(e,t){return a;function a(i,l,o,u){const h=Array.isArray(o.children),f=zf(i);return t(l,o,u,h,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function BA(e,t){const a={};let i,l;for(l in t.properties)if(l!=="children"&&Pf.call(t.properties,l)){const o=PA(e,l,t.properties[l]);if(o){const[u,h]=o;e.tableCellAlignToStyle&&u==="align"&&typeof h=="string"&&CA.has(t.tagName)?i=h:a[u]=h}}if(i){const o=a.style||(a.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return a}function zA(e,t){const a={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const o=i.data.estree.body[0];o.type;const u=o.expression;u.type;const h=u.properties[0];h.type,Object.assign(a,e.evaluater.evaluateExpression(h.argument))}else Ul(e,t.position);else{const l=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const h=i.value.data.estree.body[0];h.type,o=e.evaluater.evaluateExpression(h.expression)}else Ul(e,t.position);else o=i.value===null?!0:i.value;a[l]=o}return a}function Vf(e,t){const a=[];let i=-1;const l=e.passKeys?new Map:AA;for(;++i<t.children.length;){const o=t.children[i];let u;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const p=l.get(f)||0;u=f+"-"+p,l.set(f,p+1)}}const h=rw(e,o,u);h!==void 0&&a.push(h)}return a}function PA(e,t,a){const i=mA(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=i.commaSeparated?nA(a):bA(a)),i.property==="style"){let l=typeof a=="object"?a:HA(e,String(a));return e.stylePropertyNameCase==="css"&&(l=VA(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?dA[i.property]||i.property:i.attribute,a]}}function HA(e,t){try{return NA(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const i=a,l=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=aw+"#cannot-parse-style-attribute",l}}function sw(e,t,a){let i;if(!a)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,u;for(;++o<l.length;){const h=By(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};u=u?{type:"MemberExpression",object:u,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}i=u}else i=By(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return Pf.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ul(e)}function Ul(e,t){const a=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=aw+"#cannot-handle-mdx-estrees-without-createevaluater",a}function VA(e){const t={};let a;for(a in e)Pf.call(e,a)&&(t[GA(a)]=e[a]);return t}function GA(e){let t=e.replace(_A,qA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qA(e){return"-"+e.toLowerCase()}const Eh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$A={};function Gf(e,t){const a=$A,i=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,l=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return lw(e,i,l)}function lw(e,t,a){if(YA(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ky(e.children,t,a)}return Array.isArray(e)?Ky(e,t,a):""}function Ky(e,t,a){const i=[];let l=-1;for(;++l<e.length;)i[l]=lw(e[l],t,a);return i.join("")}function YA(e){return!!(e&&typeof e=="object")}const Jy=document.createElement("i");function qf(e){const t="&"+e+";";Jy.innerHTML=t;const a=Jy.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function $n(e,t,a,i){const l=e.length;let o=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,a=a>0?a:0,i.length<1e4)u=Array.from(i),u.unshift(t,a),e.splice(...u);else for(a&&e.splice(t,a);o<i.length;)u=i.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function ra(e,t){return e.length>0?($n(e,e.length,0,t),e):t}const Xy={}.hasOwnProperty;function ow(e){const t={};let a=-1;for(;++a<e.length;)WA(t,e[a]);return t}function WA(e,t){let a;for(a in t){const l=(Xy.call(e,a)?e[a]:void 0)||(e[a]={}),o=t[a];let u;if(o)for(u in o){Xy.call(l,u)||(l[u]=[]);const h=o[u];KA(l[u],Array.isArray(h)?h:h?[h]:[])}}}function KA(e,t){let a=-1;const i=[];for(;++a<t.length;)(t[a].add==="after"?e:i).push(t[a]);$n(e,0,0,i)}function cw(e,t){const a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function ma(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=Tr(/[A-Za-z]/),yn=Tr(/[\dA-Za-z]/),JA=Tr(/[#-'*+\--9=?A-Z^-~]/);function Lc(e){return e!==null&&(e<32||e===127)}const cf=Tr(/\d/),XA=Tr(/[\dA-Fa-f]/),QA=Tr(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function bt(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const Jc=Tr(new RegExp("\\p{P}|\\p{S}","u")),li=Tr(/\s/);function Tr(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function Es(e){const t=[];let a=-1,i=0,l=0;for(;++a<e.length;){const o=e.charCodeAt(a);let u="";if(o===37&&yn(e.charCodeAt(a+1))&&yn(e.charCodeAt(a+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const h=e.charCodeAt(a+1);o<56320&&h>56319&&h<57344?(u=String.fromCharCode(o,h),l=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(i,a),encodeURIComponent(u)),i=a+l+1,u=""),l&&(a+=l,l=0)}return t.join("")+e.slice(i)}function Xe(e,t,a,i){const l=i?i-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(f){return qe(f)?(e.enter(a),h(f)):t(f)}function h(f){return qe(f)&&o++<l?(e.consume(f),h):(e.exit(a),t(f))}}const ZA={tokenize:e_};function e_(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let a;return t;function i(h){if(h===null){e.consume(h);return}return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Xe(e,t,"linePrefix")}function l(h){return e.enter("paragraph"),o(h)}function o(h){const f=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=f),a=f,u(h)}function u(h){if(h===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(h);return}return Ce(h)?(e.consume(h),e.exit("chunkText"),o):(e.consume(h),u)}}const t_={tokenize:n_},Qy={tokenize:a_};function n_(e){const t=this,a=[];let i=0,l,o,u;return h;function h(j){if(i<a.length){const B=a[i];
vendor: 7,972 bytes, line 351
351return t.containerState=B[1],e.attempt(B[0].continuation,f,p)(j)}return p(j)}function f(j){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&T();const B=t.events.length;let Q=B,O;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){O=t.events[Q][1].end;break}C(i);let V=B;for(;V<t.events.length;)t.events[V][1].end={...O},V++;return $n(t.events,Q+1,0,t.events.slice(B)),t.events.length=V,p(j)}return h(j)}function p(j){if(i===a.length){if(!l)return x(j);if(l.currentConstruct&&l.currentConstruct.concrete)return N(j);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Qy,y,b)(j)}function y(j){return l&&T(),C(i),x(j)}function b(j){return t.parser.lazy[t.now().line]=i!==a.length,u=t.now().offset,N(j)}function x(j){return t.containerState={},e.attempt(Qy,w,N)(j)}function w(j){return i++,a.push([t.currentConstruct,t.containerState]),x(j)}function N(j){if(j===null){l&&T(),C(0),e.consume(j);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),A(j)}function A(j){if(j===null){_(e.exit("chunkFlow"),!0),C(0),e.consume(j);return}return Ce(j)?(e.consume(j),_(e.exit("chunkFlow")),i=0,t.interrupt=void 0,h):(e.consume(j),A)}function _(j,B){const Q=t.sliceStream(j);if(B&&Q.push(null),j.previous=o,o&&(o.next=j),o=j,l.defineSkip(j.start),l.write(Q),t.parser.lazy[j.start.line]){let O=l.events.length;for(;O--;)if(l.events[O][1].start.offset<u&&(!l.events[O][1].end||l.events[O][1].end.offset>u))return;const V=t.events.length;let ee=V,q,E;for(;ee--;)if(t.events[ee][0]==="exit"&&t.events[ee][1].type==="chunkFlow"){if(q){E=t.events[ee][1].end;break}q=!0}for(C(i),O=V;O<t.events.length;)t.events[O][1].end={...E},O++;$n(t.events,ee+1,0,t.events.slice(V)),t.events.length=O}}function C(j){let B=a.length;for(;B-- >j;){const Q=a[B];t.containerState=Q[1],Q[0].exit.call(t,e)}a.length=j}function T(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function a_(e,t,a){return Xe(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ws(e){if(e===null||bt(e)||li(e))return 1;if(Jc(e))return 2}function Xc(e,t,a){const i=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!i.includes(o)&&(t=o(t,a),i.push(o))}return t}const uf={name:"attention",resolveAll:r_,tokenize:i_};function r_(e,t){let a=-1,i,l,o,u,h,f,p,y;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(i=a;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[i][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const b={...e[i][1].end},x={...e[a][1].start};Zy(b,-f),Zy(x,f),u={type:f>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},h={type:f>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:x},o={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[a][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...h.end}},e[i][1].end={...u.start},e[a][1].start={...h.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=ra(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=ra(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",o,t]]),p=ra(p,Xc(t.parser.constructs.insideSpan.null,e.slice(i+1,a),t)),p=ra(p,[["exit",o,t],["enter",h,t],["exit",h,t],["exit",l,t]]),e[a][1].end.offset-e[a][1].start.offset?(y=2,p=ra(p,[["enter",e[a][1],t],["exit",e[a][1],t]])):y=0,$n(e,i-1,a-i+3,p),a=i+p.length-y-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function i_(e,t){const a=this.parser.constructs.attentionMarkers.null,i=this.previous,l=ws(i);let o;return u;function u(f){return o=f,e.enter("attentionSequence"),h(f)}function h(f){if(f===o)return e.consume(f),h;const p=e.exit("attentionSequence"),y=ws(f),b=!y||y===2&&l||a.includes(f),x=!l||l===2&&y||a.includes(i);return p._open=!!(o===42?b:b&&(l||!x)),p._close=!!(o===42?x:x&&(y||!b)),t(f)}}function Zy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const s_={name:"autolink",tokenize:l_};function l_(e,t,a){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(w){return Nn(w)?(e.consume(w),u):w===64?a(w):p(w)}function u(w){return w===43||w===45||w===46||yn(w)?(i=1,h(w)):p(w)}function h(w){return w===58?(e.consume(w),i=0,f):(w===43||w===45||w===46||yn(w))&&i++<32?(e.consume(w),h):(i=0,p(w))}function f(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||Lc(w)?a(w):(e.consume(w),f)}function p(w){return w===64?(e.consume(w),y):JA(w)?(e.consume(w),p):a(w)}function y(w){return yn(w)?b(w):a(w)}function b(w){return w===46?(e.consume(w),i=0,y):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):x(w)}function x(w){if((w===45||yn(w))&&i++<63){const N=w===45?x:b;return e.consume(w),N}return a(w)}}const Wl={partial:!0,tokenize:o_};function o_(e,t,a){return i;function i(o){return qe(o)?Xe(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Ce(o)?t(o):a(o)}}const uw={continuation:{tokenize:u_},exit:d_,name:"blockQuote",tokenize:c_};function c_(e,t,a){const i=this;return l;function l(u){if(u===62){const h=i.containerState;return h.open||(e.enter("blockQuote",{_container:!0}),h.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return a(u)}function o(u){return qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function u_(e,t,a){const i=this;return l;function l(u){return qe(u)?Xe(e,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(uw,t,a)(u)}}function d_(e){e.exit("blockQuote")}const dw={name:"characterEscape",tokenize:h_};function h_(e,t,a){return i;function i(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return QA(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(o)}}const hw={name:"characterReference",tokenize:f_};function f_(e,t,a){const i=this;let l=0,o,u;return h;function h(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),f}function f(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,u=yn,y(b))}function p(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=XA,y):(e.enter("characterReferenceValue"),o=7,u=cf,y(b))}function y(b){if(b===59&&l){const x=e.exit("characterReferenceValue");return u===yn&&!qf(i.sliceSerialize(x))?a(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(b)&&l++<o?(e.consume(b),y):a(b)}}const eb={partial:!0,tokenize:p_},tb={concrete:!0,name:"codeFenced",tokenize:m_};function m_(e,t,a){const i=this,l={partial:!0,tokenize:Q};let o=0,u=0,h;return f;function f(O){return p(O)}function p(O){const V=i.events[i.events.length-1];return o=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,h=O,e.enter("co
351deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(O)}function y(O){return O===h?(u++,e.consume(O),y):u<3?a(O):(e.exit("codeFencedFenceSequence"),qe(O)?Xe(e,b,"whitespace")(O):b(O))}function b(O){return O===null||Ce(O)?(e.exit("codeFencedFence"),i.interrupt?t(O):e.check(eb,A,B)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(O)):qe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xe(e,w,"whitespace")(O)):O===96&&O===h?a(O):(e.consume(O),x)}function w(O){return O===null||Ce(O)?b(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(O))}function N(O){return O===null||Ce(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(O)):O===96&&O===h?a(O):(e.consume(O),N)}function A(O){return e.attempt(l,B,_)(O)}function _(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),C}function C(O){return o>0&&qe(O)?Xe(e,T,"linePrefix",o+1)(O):T(O)}function T(O){return O===null||Ce(O)?e.check(eb,A,B)(O):(e.enter("codeFlowValue"),j(O))}function j(O){return O===null||Ce(O)?(e.exit("codeFlowValue"),T(O)):(e.consume(O),j)}function B(O){return e.exit("codeFenced"),t(O)}function Q(O,V,ee){let q=0;return E;function E($){return O.enter("lineEnding"),O.consume($),O.exit("lineEnding"),G}function G($){return O.enter("codeFencedFence"),qe($)?Xe(O,D,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):D($)}function D($){return $===h?(O.enter("codeFencedFenceSequence"),U($)):ee($)}function U($){return $===h?(q++,O.consume($),U):q>=u?(O.exit("codeFencedFenceSequence"),qe($)?Xe(O,z,"whitespace")($):z($)):ee($)}function z($){return $===null||Ce($)?(O.exit("codeFencedFence"),V($)):ee($)}}}function p_(e,t,a){const i=this;return l;function l(u){return u===null?a(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return i.parser.lazy[i.now().line]?a(u):t(u)}}const Nh={name:"codeIndented",tokenize:y_},g_={partial:!0,tokenize:b_};function y_(e,t,a){const i=this;return l;function l(p){return e.enter("codeIndented"),Xe(e,o,"linePrefix",5)(p)}function o(p){const y=i.events[i.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?u(p):a(p)}function u(p){return p===null?f(p):Ce(p)?e.attempt(g_,u,f)(p):(e.enter("codeFlowValue"),h(p))}function h(p){return p===null||Ce(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),h)}function f(p){return e.exit("codeIndented"),t(p)}}function b_(e,t,a){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?a(u):Ce(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):Xe(e,o,"linePrefix",5)(u)}function o(u){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?t(u):Ce(u)?l(u):a(u)}}const x_={name:"codeText",previous:v_,resolve:w_,tokenize:S_};function w_(e){let t=e.length-4,a=3,i,l;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=a;++i<t;)if(e[i][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(i=a-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function v_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function S_(e,t,a){let i=0,l,o;return u;function u(b){return e.enter("codeText"),e.enter("codeTextSequence"),h(b)}function h(b){return b===96?(e.consume(b),i++,h):(e.exit("codeTextSequence"),f(b))}function f(b){return b===null?a(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),f):b===96?(o=e.enter("codeTextSequence"),l=0,y(b)):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Ce(b)?(e.exit("codeTextData"),f(b)):(e.consume(b),p)}function y(b){return b===96?(e.consume(b),l++,y):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(b)):(o.type="codeTextData",p(b))}}class E_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){const i=a??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,a,i){const l=a||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&xl(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),xl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),xl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const a=this.left.splice(t,Number.POSITIVE_INFINITY);xl(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);xl(this.left,a.reverse())}}}function xl(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}function fw(e){const t={};let a=-1,i,l,o,u,h,f,p;const y=new E_(e);for(;++a<y.length;){for(;a in t;)a=t[a];if(i=y.get(a),a&&i[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,N_(y,a)),a=t[a],p=!0);else if(i[1]._container){for(o=a,l=void 0;o--;)if(u=y.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(y.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...y.get(l)[1].start},h=y.slice(l,a),h.unshift(i),y.splice(l,a-l+1,h))}}return $n(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function N_(e,t){const a=e.get(t)[1],i=e.get(t)[2];let l=t-1;const o=[];let u=a._tokenizer;u||(u=i.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const h=u.events,f=[],p={};let y,b,x=-1,w=a,N=0,A=0;const _=[A];for(;w;){for(;e.get(++l)[1]!==w;);o.push(l),w._tokenizer||(y=i.sliceStream(w),w.next||y.push(null),b&&u.defineSki
vendor: 18,588 bytes, line 351
351p(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(y),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),b=w,w=w.next}for(w=a;++x<h.length;)h[x][0]==="exit"&&h[x-1][0]==="enter"&&h[x][1].type===h[x-1][1].type&&h[x][1].start.line!==h[x][1].end.line&&(A=x+1,_.push(A),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):_.pop(),x=_.length;x--;){const C=h.slice(_[x],_[x+1]),T=o.pop();f.push([T,T+C.length-1]),e.splice(T,2,C)}for(f.reverse(),x=-1;++x<f.length;)p[N+f[x][0]]=N+f[x][1],N+=f[x][1]-f[x][0]-1;return p}const k_={resolve:__,tokenize:T_},A_={partial:!0,tokenize:C_};function __(e){return fw(e),e}function T_(e,t){let a;return i;function i(h){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),l(h)}function l(h){return h===null?o(h):Ce(h)?e.check(A_,u,o)(h):(e.consume(h),l)}function o(h){return e.exit("chunkContent"),e.exit("content"),t(h)}function u(h){return e.consume(h),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,l}}function C_(e,t,a){const i=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xe(e,o,"linePrefix")}function o(u){if(u===null||Ce(u))return a(u);const h=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?t(u):e.interrupt(i.parser.constructs.flow,a,t)(u)}}function mw(e,t,a,i,l,o,u,h,f){const p=f||Number.POSITIVE_INFINITY;let y=0;return b;function b(C){return C===60?(e.enter(i),e.enter(l),e.enter(o),e.consume(C),e.exit(o),x):C===null||C===32||C===41||Lc(C)?a(C):(e.enter(i),e.enter(u),e.enter(h),e.enter("chunkString",{contentType:"string"}),A(C))}function x(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(l),e.exit(i),t):(e.enter(h),e.enter("chunkString",{contentType:"string"}),w(C))}function w(C){return C===62?(e.exit("chunkString"),e.exit(h),x(C)):C===null||C===60||Ce(C)?a(C):(e.consume(C),C===92?N:w)}function N(C){return C===60||C===62||C===92?(e.consume(C),w):w(C)}function A(C){return!y&&(C===null||C===41||bt(C))?(e.exit("chunkString"),e.exit(h),e.exit(u),e.exit(i),t(C)):y<p&&C===40?(e.consume(C),y++,A):C===41?(e.consume(C),y--,A):C===null||C===32||C===40||Lc(C)?a(C):(e.consume(C),C===92?_:A)}function _(C){return C===40||C===41||C===92?(e.consume(C),A):A(C)}}function pw(e,t,a,i,l,o){const u=this;let h=0,f;return p;function p(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(o),y}function y(w){return h>999||w===null||w===91||w===93&&!f||w===94&&!h&&"_hiddenFootnoteSupport"in u.parser.constructs?a(w):w===93?(e.exit(o),e.enter(l),e.consume(w),e.exit(l),e.exit(i),t):Ce(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||w===91||w===93||Ce(w)||h++>999?(e.exit("chunkString"),y(w)):(e.consume(w),f||(f=!qe(w)),w===92?x:b)}function x(w){return w===91||w===92||w===93?(e.consume(w),h++,b):b(w)}}function gw(e,t,a,i,l,o){let u;return h;function h(x){return x===34||x===39||x===40?(e.enter(i),e.enter(l),e.consume(x),e.exit(l),u=x===40?41:x,f):a(x)}function f(x){return x===u?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),t):(e.enter(o),p(x))}function p(x){return x===u?(e.exit(o),f(u)):x===null?a(x):Ce(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Xe(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===u||x===null||Ce(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?b:y)}function b(x){return x===u||x===92?(e.consume(x),y):y(x)}}function Cl(e,t){let a;return i;function i(l){return Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a=!0,i):qe(l)?Xe(e,i,a?"linePrefix":"lineSuffix")(l):t(l)}}const j_={name:"definition",tokenize:O_},F_={partial:!0,tokenize:R_};function O_(e,t,a){const i=this;let l;return o;function o(w){return e.enter("definition"),u(w)}function u(w){return pw.call(i,e,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function h(w){return l=ma(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),f):a(w)}function f(w){return bt(w)?Cl(e,p)(w):p(w)}function p(w){return mw(e,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function y(w){return e.attempt(F_,b,b)(w)}function b(w){return qe(w)?Xe(e,x,"whitespace")(w):x(w)}function x(w){return w===null||Ce(w)?(e.exit("definition"),i.parser.defined.push(l),t(w)):a(w)}}function R_(e,t,a){return i;function i(h){return bt(h)?Cl(e,l)(h):a(h)}function l(h){return gw(e,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return qe(h)?Xe(e,u,"whitespace")(h):u(h)}function u(h){return h===null||Ce(h)?t(h):a(h)}}const D_={name:"hardBreakEscape",tokenize:L_};function L_(e,t,a){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Ce(o)?(e.exit("hardBreakEscape"),t(o)):a(o)}}const M_={name:"headingAtx",resolve:I_,tokenize:U_};function I_(e,t){let a=e.length-2,i=3,l,o;return e[i][1].type==="whitespace"&&(i+=2),a-2>i&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(i===a-1||a-4>i&&e[a-2][1].type==="whitespace")&&(a-=i+1===a?2:4),a>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[a][1].end},o={type:"chunkText",start:e[i][1].start,end:e[a][1].end,contentType:"text"},$n(e,i,a-i+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function U_(e,t,a){let i=0;return l;function l(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),u(y)}function u(y){return y===35&&i++<6?(e.consume(y),u):y===null||bt(y)?(e.exit("atxHeadingSequence"),h(y)):a(y)}function h(y){return y===35?(e.enter("atxHeadingSequence"),f(y)):y===null||Ce(y)?(e.exit("atxHeading"),t(y)):qe(y)?Xe(e,h,"whitespace")(y):(e.enter("atxHeadingText"),p(y))}function f(y){return y===35?(e.consume(y),f):(e.exit("atxHeadingSequence"),h(y))}function p(y){return y===null||y===35||bt(y)?(e.exit("atxHeadingText"),h(y)):(e.consume(y),p)}}const B_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nb=["pre","script","style","textarea"],z_={concrete:!0,name:"htmlFlow",resolveTo:V_,tokenize:G_},P_={partial:!0,tokenize:$_},H_={partial:!0,tokenize:q_};function V_(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function G_(e,t,a){const i=this;let l,o,u,h,f;return p;function p(S){return y(S)}function y(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),b}function b(S){return S===33?(e.consume(S),x):S===47?(e.consume(S),o=!0,A):S===63?(e.consume(S),l=3,i.interrupt?t:R):Nn(S)?(e.consume(S),u=String.fromCharCode(S),_):a(S)}function x(S){return S===45?(e.consume(S),l=2,w):S===91?(e.consume(S),l=5,h=0,N):Nn(S)?(e.consume(S),l=4,i.interrupt?t:R):a(S)}function w(S){return S===45?(e.consume(S),i.interrupt?t:R):a(S)}function N(S){const de="CDATA[";return S===de.charCodeAt(h++)?(e.consume(S),h===de.length?i.interrupt?t:D:N):a(S)}function A(S){return Nn(S)?(e.consume(S),u=String.fromCharCode(S),_):a(S)}function _(S){if(S===null||S===47||S===62||bt(S)){const de=S===47,oe=u.toLowerCase();return!de&&!o&&nb.includes(oe)?(l=1,i.interrupt?t(S):D(S)):B_.includes(u.toLowerCase())?(l=6,de?(e.consume(S),C):i.interrupt?t(S):D(S)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?a(S):o?T(S):j(S))}return S===45||yn(S)?(e.consume(S),u+=String.fromCharCode(S),_):a(S)}function C(S){return S===62?(e.consume(S),i.interrupt?t:D):a(S)}function T(S){return qe(S)?(e.consume(S),T):E(S)}function j(S){return S===47?(e.consume(S),E):S===58||S===95||Nn(S)?(e.consume(S),B):qe(S)?(e.consume(S),j):E(S)}function B(S){return S===45||S===46||S===58||S===95||yn(S)?(e.consume(S),B):Q(S)}function Q(S){return S===61?(e.consume(S),O):qe(S)?(e.consume(S),Q):j(S)}function O(S){return S===null||S===60||S===61||S===62||S===96?a(S):S===34||S===39?(e.consume(S),f=S,V):qe(S)?(e.consume(S),O):ee(S)}function V(S){return S===f?(e.consume(S),f=null,q):S===null||Ce(S)?a(S):(e.consume(S),V)}function ee(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||bt(S)?Q(S):(e.consume(S),ee)}function q(S){return S===47||S===62||qe(S)?j(S):a(S)}function E(S){return S===62?(e.consume(S),G):a(S)}function G(S){return S===null||Ce(S)?D(S):qe(S)?(e.consume(S),G):a(S)}function D(S){return S===45&&l===2?(e.consume(S),P):S===60&&l===1?(e.consume(S),te):S===62&&l===4?(e.consume(S),L):S===63&&l===3?(e.consume(S),R):S===93&&l===5?(e.consume(S),ce):Ce(S)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(P_,F,U)(S)):S===null||Ce(S)?(e.exit("htmlFlowData"),U(S)):(e.consume(S),D)}function U(S){return e.check(H_,z,F)(S)}function z(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$}function $(S){return S===null||Ce(S)?U(S):(e.enter("htmlFlowData"),D(S))}function P(S){return S===45?(e.consume(S),R):D(S)}function te(S){return S===47?(e.consume(S),u="",fe):D(S)}function fe(S){if(S===62){const de=u.toLowerCase();return nb.includes(de)?(e.consume(S),L):D(S)}return Nn(S)&&u.length<8?(e.consume(S),u+=String.fromCharCode(S),fe):D(S)}function ce(S){return S===93?(e.consume(S),R):D(S)}function R(S){return S===62?(e.consume(S),L):S===45&&l===2?(e.consume(S),R):D(S)}function L(S){return S===null||Ce(S)?(e.exit("htmlFlowData"),F(S)):(e.consume(S),L)}function F(S){return e.exit("htmlFlow"),t(S)}}function q_(e,t,a){const i=this;return l;function l(u){return Ce(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):a(u)}function o(u){return i.parser.lazy[i.now().line]?a(u):t(u)}}function $_(e,t,a){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Wl,t,a)}}const Y_={name:"htmlText",tokenize:W_};function W_(e,t,a){const i=this;let l,o,u;return h;function h(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),Q):R===63?(e.consume(R),j):Nn(R)?(e.consume(R),ee):a(R)}function p(R){return R===45?(e.consume(R),y):R===91?(e.consume(R),o=0,N):Nn(R)?(e.consume(R),T):a(R)}function y(R){return R===45?(e.consume(R),w):a(R)}function b(R){return R===null?a(R):R===45?(e.consume(R),x):Ce(R)?(u=b,te(R)):(e.consume(R),b)}function x(R){return R===45?(e.consume(R),w):b(R)}function w(R){return R===62?P(R):R===45?x(R):b(R)}function N(R){const L="CDATA[";return R===L.charCodeAt(o++)?(e.consume(R),o===L.length?A:N):a(R)}function A(R){return R===null?a(R):R===93?(e.consume(R),_):Ce(R)?(u=A,te(R)):(e.consume(R),A)}function _(R){return R===93?(e.consume(R),C):A(R)}function C(R){return R===62?P(R):R===93?(e.consume(R),C):A(R)}function T(R){return R===null||R===62?P(R):Ce(R)?(u=T,te(R)):(e.consume(R),T)}function j(R){return R===null?a(R):R===63?(e.consume(R),B):Ce(R)?(u=j,te(R)):(e.consume(R),j)}function B(R){return R===62?P(R):j(R)}function Q(R){return Nn(R)?(e.consume(R),O):a(R)}function O(R){return R===45||yn(R)?(e.consume(R),O):V(R)}function V(R){return Ce(R)?(u=V,te(R)):qe(R)?(e.consume(R),V):P(R)}function ee(R){return R===45||yn(R)?(e.consume(R),ee):R===47||R===62||bt(R)?q(R):a(R)}function q(R){return R===47?(e.consume(R),P):R===58||R===95||Nn(R)?(e.consume(R),E):Ce(R)?(u=q,te(R)):qe(R)?(e.consume(R),q):P(R)}function E(R){return R===45||R===46||R===58||R===95||yn(R)?(e.consume(R),E):G(R)}function G(R){return R===61?(e.consume(R),D):Ce(R)?(u=G,te(R)):qe(R)?(e.consume(R),G):q(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?a(R):R===34||R===39?(e.consume(R),l=R,U):Ce(R)?(u=D,te(R)):qe(R)?(e.consume(R),D):(e.consume(R),z)}function U(R){return R===l?(e.consume(R),l=void 0,$):R===null?a(R):Ce(R)?(u=U,te(R)):(e.consume(R),U)}function z(R){return R===null||R===34||R===39||R===60||R===61||R===96?a(R):R===47||R===62||bt(R)?q(R):(e.consume(R),z)}function $(R){return R===47||R===62||bt(R)?q(R):a(R)}function P(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):a(R)}function te(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),fe}function fe(R){return qe(R)?Xe(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ce(R)}function ce(R){return e.enter("htmlTextData"),u(R)}}const $f={name:"labelEnd",resolveAll:Q_,resolveTo:Z_,tokenize:e2},K_={tokenize:t2},J_={tokenize:n2},X_={tokenize:a2};function Q_(e){let t=-1;const a=[];for(;++t<e.length;){const i=e[t][1];if(a.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==a.length&&$n(e,0,e.length,a),e}function Z_(e,t){let a=e.length,i=0,l,o,u,h;for(;a--;)if(l=e[a][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[a][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[a][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=a,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=a);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},y={type:"labelText",start:{...e[o+i+2][1].end},end:{...e[u-2][1].start}};return h=[["enter",f,t],["enter",p,t]],h=ra(h,e.slice(o+1,o+i+3)),h=ra(h,[["enter",y,t]]),h=ra(h,Xc(t.parser.constructs.insideSpan.null,e.slice(o+i+4,u-3),t)),h=ra(h,[["exit",y,t],e[u-2],e[u-1],["exit",p,t]]),h=ra(h,e.slice(u+1)),h=ra(h,[["exit",f,t]]),$n(e,o,e.length,h),e}function e2(e,t,a){const i=this;let l=i.events.length,o,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){o=i.events[l][1];break}return h;function h(x){return o?o._inactive?b(x):(u=i.parser.defined.includes(ma(i.sliceSerialize({start:o.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):a(x)}function f(x){return x===40?e.attempt(K_,y,u?y:b)(x):x===91?e.attempt(J_,y,u?p:b)(x):u?y(x):b(x)}function p(x){return e.attempt(X_,y,b)(x)}function y(x){return t(x)}function b(x){return o._balanced=!0,a(x)}}function t2(e,t,a){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),l}function l(b){return bt(b)?Cl(e,o)(b):o(b)}function o(b){return b===41?y(b):mw(e,u,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function u(b){return bt(b)?Cl(e,f)(b):y(b)}function h(b){return a(b)}function f(b){return b===34||b===39||b===40?gw(e,p,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):y(b)}function p(b){return bt(b)?Cl(e,y)(b):y(b)}function y(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),t):a(b)}}function n2(e,t,a){const i=this;return l;function l(h){return pw.call(i,e,o,u,"reference","referenceMarker","referenceString")(h)}function o(h){return i.parser.defined.includes(ma(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(h):a(h)}function u(h){return a(h)}}function a2(e,t,a){return i;function i(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):a(o)}}const r2={name:"labelStartImage",resolveAll:$f.resolveAll,tokenize:i2};function i2(e,t,a){const i=this;return l;function l(h){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(h),e.exit("labelImageMarker"),o}function o(h){return h===91?(e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelImage"),u):a(h)}function u(h){return h===94&&"_hiddenFootnoteSupport"in i.parser.constructs?a(h):t(h)}}const s2={name:"labelStartLink",resolveAll:$f.resolveAll,tokenize:l2};function l2(e,t,a){const i=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?a(u):t(u)}}const kh={name:"lineEnding",tokenize:o2};function o2(e,t){return a;function a(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Xe(e,t,"linePrefix")}}const Ac={name:"thematicBreak",tokenize:c2};function c2(e,t,a){let i=0,l;return o;function o(p){return e.enter("thematicBreak"),u(p)}function u(p){return l=p,h(p)}function h(p){return p===l?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||Ce(p))?(e.exit("thematicBreak"),t(p)):a(p)}function f(p){return p===l?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),qe(p)?Xe(e,h,"whitespace")(p):h(p))}}const On={continuation:{tokenize:f2},exit:p2,name:"list",tokenize:h2},u2={partial:!0,tokenize:g2},d2={partial:!0,tokenize:m2};function h2(e,t,a){const i=this,l=i.events[i.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return h;function h(w){const N=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:cf(w)){if(i.containerState.type||(i.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(Ac,a,p)(w):p(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(w)}return a(w)}function f(w){return cf(w)&&++u<10?(e.consume(w),f):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),p(w)):a(w)}function p(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(Wl,i.interrupt?a:y,e.attempt(u2,x,b))}
vendor: 5,359 bytes, line 351
351function y(w){return i.containerState.initialBlankLine=!0,o++,x(w)}function b(w){return qe(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),x):a(w)}function x(w){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function f2(e,t,a){const i=this;return i.containerState._closeFlow=void 0,e.check(Wl,l,o);function l(h){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Xe(e,t,"listItemIndent",i.containerState.size+1)(h)}function o(h){return i.containerState.furtherBlankLines||!qe(h)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(h)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(d2,t,u)(h))}function u(h){return i.containerState._closeFlow=!0,i.interrupt=void 0,Xe(e,e.attempt(On,t,a),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function m2(e,t,a){const i=this;return Xe(e,l,"listItemIndent",i.containerState.size+1);function l(o){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(o):a(o)}}function p2(e){e.exit(this.containerState.type)}function g2(e,t,a){const i=this;return Xe(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const u=i.events[i.events.length-1];return!qe(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):a(o)}}const ab={name:"setextUnderline",resolveTo:y2,tokenize:b2};function y2(e,t){let a=e.length,i,l,o;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){i=a;break}e[a][1].type==="paragraph"&&(l=a)}else e[a][1].type==="content"&&e.splice(a,1),!o&&e[a][1].type==="definition"&&(o=a);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",u,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function b2(e,t,a){const i=this;let l;return o;function o(p){let y=i.events.length,b;for(;y--;)if(i.events[y][1].type!=="lineEnding"&&i.events[y][1].type!=="linePrefix"&&i.events[y][1].type!=="content"){b=i.events[y][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),l=p,u(p)):a(p)}function u(p){return e.enter("setextHeadingLineSequence"),h(p)}function h(p){return p===l?(e.consume(p),h):(e.exit("setextHeadingLineSequence"),qe(p)?Xe(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||Ce(p)?(e.exit("setextHeadingLine"),t(p)):a(p)}}const x2={tokenize:w2};function w2(e){const t=this,a=e.attempt(Wl,i,e.attempt(this.parser.constructs.flowInitial,l,Xe(e,e.attempt(this.parser.constructs.flow,l,e.attempt(k_,l)),"linePrefix")));return a;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const v2={resolveAll:bw()},S2=yw("string"),E2=yw("text");function yw(e){return{resolveAll:bw(e==="text"?N2:void 0),tokenize:t};function t(a){const i=this,l=this.parser.constructs[e],o=a.attempt(l,u,h);return u;function u(y){return p(y)?o(y):h(y)}function h(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),f}function f(y){return p(y)?(a.exit("data"),o(y)):(a.consume(y),f)}function p(y){if(y===null)return!0;const b=l[y];let x=-1;if(b)for(;++x<b.length;){const w=b[x];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function bw(e){return t;function t(a,i){let l=-1,o;for(;++l<=a.length;)o===void 0?a[l]&&a[l][1].type==="data"&&(o=l,l++):(!a[l]||a[l][1].type!=="data")&&(l!==o+2&&(a[o][1].end=a[l-1][1].end,a.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(a,i):a}}function N2(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const i=e[a-1][1],l=t.sliceStream(i);let o=l.length,u=-1,h=0,f;for(;o--;){const p=l[o];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)h++,u--;if(u)break;u=-1}else if(p===-2)f=!0,h++;else if(p!==-1){o++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(h=0),h){const p={type:a===e.length||f||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:i.start._bufferIndex+u,_index:i.start._index+o,line:i.end.line,column:i.end.column-h,offset:i.end.offset-h},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(a,0,["enter",p,t],["exit",p,t]),a+=2)}a++}return e}const k2={42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:uw},A2={91:j_},_2={[-2]:Nh,[-1]:Nh,32:Nh},T2={35:M_,42:Ac,45:[ab,Ac],60:z_,61:ab,95:Ac,96:tb,126:tb},C2={38:hw,92:dw},j2={[-5]:kh,[-4]:kh,[-3]:kh,33:r2,38:hw,42:uf,60:[s_,Y_],91:s2,92:[D_,dw],93:$f,95:uf,96:x_},F2={null:[uf,v2]},O2={null:[42,95]},R2={null:[]},D2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:O2,contentInitial:A2,disable:R2,document:k2,flow:T2,flowInitial:_2,insideSpan:F2,string:C2,text:j2},Symbol.toStringTag,{value:"Module"}));function L2(e,t,a){let i={_bufferIndex:-1,_index:0,line:a&&a.line||1,c
vendor: 14,832 bytes, lines 351-353
351olumn:a&&a.column||1,offset:a&&a.offset||0};const l={},o=[];let u=[],h=[];const f={attempt:V(Q),check:V(O),consume:T,enter:j,exit:B,interrupt:V(O,{interrupt:!0})},p={code:null,containerState:{},defineSkip:A,events:[],now:N,parser:e,previous:null,sliceSerialize:x,sliceStream:w,write:b};let y=t.tokenize.call(p,f);return t.resolveAll&&o.push(t),p;function b(G){return u=ra(u,G),_(),u[u.length-1]!==null?[]:(ee(t,0),p.events=Xc(o,p.events,p),p.events)}function x(G,D){return I2(w(G),D)}function w(G){return M2(u,G)}function N(){const{_bufferIndex:G,_index:D,line:U,column:z,offset:$}=i;return{_bufferIndex:G,_index:D,line:U,column:z,offset:$}}function A(G){l[G.line]=G.column,E()}function _(){let G;for(;i._index<u.length;){const D=u[i._index];if(typeof D=="string")for(G=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===G&&i._bufferIndex<D.length;)C(D.charCodeAt(i._bufferIndex));else C(D)}}function C(G){y=y(G)}function T(G){Ce(G)?(i.line++,i.column=1,i.offset+=G===-3?2:1,E()):G!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=G}function j(G,D){const U=D||{};return U.type=G,U.start=N(),p.events.push(["enter",U,p]),h.push(U),U}function B(G){const D=h.pop();return D.end=N(),p.events.push(["exit",D,p]),D}function Q(G,D){ee(G,D.from)}function O(G,D){D.restore()}function V(G,D){return U;function U(z,$,P){let te,fe,ce,R;return Array.isArray(z)?F(z):"tokenize"in z?F([z]):L(z);function L(pe){return ge;function ge(xe){const we=xe!==null&&pe[xe],Ie=xe!==null&&pe.null,jt=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Ie)?Ie:Ie?[Ie]:[]];return F(jt)(xe)}}function F(pe){return te=pe,fe=0,pe.length===0?P:S(pe[fe])}function S(pe){return ge;function ge(xe){return R=q(),ce=pe,pe.partial||(p.currentConstruct=pe),pe.name&&p.parser.constructs.disable.null.includes(pe.name)?oe():pe.tokenize.call(D?Object.assign(Object.create(p),D):p,f,de,oe)(xe)}}function de(pe){return G(ce,R),$}function oe(pe){return R.restore(),++fe<te.length?S(te[fe]):P}}}function ee(G,D){G.resolveAll&&!o.includes(G)&&o.push(G),G.resolve&&$n(p.events,D,p.events.length-D,G.resolve(p.events.slice(D),p)),G.resolveTo&&(p.events=G.resolveTo(p.events,p))}function q(){const G=N(),D=p.previous,U=p.currentConstruct,z=p.events.length,$=Array.from(h);return{from:z,restore:P};function P(){i=G,p.previous=D,p.currentConstruct=U,p.events.length=z,h=$,E()}}function E(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function M2(e,t){const a=t.start._index,i=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let u;if(a===l)u=[e[a].slice(i,o)];else{if(u=e.slice(a,l),i>-1){const h=u[0];typeof h=="string"?u[0]=h.slice(i):u.shift()}o>0&&u.push(e[l].slice(0,o))}return u}function I2(e,t){let a=-1;const i=[];let l;for(;++a<e.length;){const o=e[a];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
352`;break}case-3:{u=`\r
353`;break}case-2:{u=t?" ":"	";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(o)}l=o===-2,i.push(u)}return i.join("")}function U2(e){const i={constructs:ow([D2,...(e||{}).extensions||[]]),content:l(ZA),defined:[],document:l(t_),flow:l(x2),lazy:{},string:l(S2),text:l(E2)};return i;function l(o){return u;function u(h){return L2(i,o,h)}}}function B2(e){for(;!fw(e););return e}const rb=/[\0\t\n\r]/g;function z2(){let e=1,t="",a=!0,i;return l;function l(o,u,h){const f=[];let p,y,b,x,w;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),b=0,t="",a&&(o.charCodeAt(0)===65279&&b++,a=void 0);b<o.length;){if(rb.lastIndex=b,p=rb.exec(o),x=p&&p.index!==void 0?p.index:o.length,w=o.charCodeAt(x),!p){t=o.slice(b);break}if(w===10&&b===x&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),b<x&&(f.push(o.slice(b,x)),e+=x-b),w){case 0:{f.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,f.push(-2);e++<y;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}b=x+1}return h&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const P2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H2(e){return e.replace(P2,V2)}function V2(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const l=a.charCodeAt(1),o=l===120||l===88;return cw(a.slice(o?2:1),o?16:10)}return qf(a)||e}const xw={}.hasOwnProperty;function G2(e,t,a){return typeof t!="string"&&(a=t,t=void 0),q2(a)(B2(U2(a).document().write(z2()(e,t,!0))))}function q2(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ut),autolinkProtocol:q,autolinkEmail:q,atxHeading:o(Et),blockQuote:o(Ie),characterEscape:q,characterReference:q,codeFenced:o(jt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(jt,u),codeText:o(st,u),codeTextData:q,data:q,codeFlowValue:q,definition:o(fn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(pt),hardBreakEscape:o(At),hardBreakTrailing:o(At),htmlFlow:o(Kt,u),htmlFlowData:q,htmlText:o(Kt,u),htmlTextData:q,image:o(nt),label:u,link:o(Ut),listItem:o(Bt),listItemValue:x,listOrdered:o(Jt,b),listUnordered:o(Jt),paragraph:o(zt),reference:S,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(Et),strong:o(xn),thematicBreak:o(kn)},exit:{atxHeading:f(),atxHeadingSequence:Q,autolink:f(),autolinkEmail:we,autolinkProtocol:xe,blockQuote:f(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:pe,characterReference:ge,codeFenced:f(_),codeFencedFence:A,codeFencedFenceInfo:w,codeFencedFenceMeta:N,codeFlowValue:E,codeIndented:f(C),codeText:f($),codeTextData:E,data:E,definition:f(),definitionDestinationString:B,definitionLabelString:T,definitionTitleString:j,emphasis:f(),hardBreakEscape:f(D),hardBreakTrailing:f(D),htmlFlow:f(U),htmlFlowData:E,htmlText:f(z),htmlTextData:E,image:f(te),label:ce,labelText:fe,lineEnding:G,link:f(P),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:de,resourceDestinationString:R,resourceTitleString:L,resource:F,setextHeading:f(ee),setextHeadingLineSequence:V,setextHeadingText:O,strong:f(),thematicBreak:f()}};ww(t,(e||{}).mdastExtensions||[]);const a={};return i;function i(ne){let he={type:"root",children:[]};const ke={stack:[he],tokenStack:[],config:t,enter:h,exit:p,buffer:u,resume:y,data:a},je=[];let He=-1;for(;++He<ne.length;)if(ne[He][1].type==="listOrdered"||ne[He][1].type==="listUnordered")if(ne[He][0]==="enter")je.push(He);else{const _t=je.pop();He=l(ne,_t,He)}for(He=-1;++He<ne.length;){const _t=t[ne[He][0]];xw.call(_t,ne[He][1].type)&&_t[ne[He][1].type].call(Object.assign({sliceSerialize:ne[He][2].sliceSerialize},ke),ne[He][1])}if(ke.tokenStack.length>0){const _t=ke.tokenStack[ke.tokenStack.length-1];(_t[1]||ib).call(ke,void 0,_t[0])}for(he.position={start:wr(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:wr(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)he=t.transforms[He](he)||he;return he}function l(ne,he,ke){let je=he-1,He=-1,_t=!1,Pt,at,gt,Ft;for(;++je<=ke;){const be=ne[je];switch(be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{be[0]==="enter"?He++:He--,Ft=void 0;break}case"lineEndingBlank":{be[0]==="enter"&&(Pt&&!Ft&&!He&&!gt&&(gt=je),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!He&&be[0]==="enter"&&be[1].type==="listItemPrefix"||He===-1&&be[0]==="exit"&&(be[1].type==="listUnordered"||be[1].type==="listOrdered")){if(Pt){let Ze=je;for(at=void 0;Ze--;){const Ke=ne[Ze];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;at&&(ne[at][1].type="lineEndingBlank",_t=!0),Ke[1].type="lineEnding",at=Ze}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}gt&&(!at||gt<at)&&(Pt._spread=!0),Pt.end=Object.assign({},at?ne[at][1].start:be[1].end),ne.splice(at||je,0,["exit",Pt,be[2]]),je++,ke++}if(be[1].type==="listItemPrefix"){const Ze={type:"listItem",_spread:!1,start:Object.assign({},be[1].start),end:void 0};Pt=Ze,ne.splice(je,0,["enter",Ze,be[2]]),je++,ke++,gt=void 0,Ft=!0}}}return ne[he][1]._spread=_t,ke}function o(ne,he){return ke;function ke(je){h.call(this,ne(je),je),he&&he.call(this,je)}}function u(){this.stack.push({type:"fragment",children:[]})}function h(ne,he,ke){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([he,ke||void 0]),ne.position={start:wr(he.start),end:void 0}}function f(ne){return he;function he(ke){ne&&ne.call(this,ke),p.call(this,ke)}}function p(ne,he){const ke=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==ne.type&&(he?he.call(this,ne,je[0]):(je[1]||ib).call(this,ne,je[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Tl({start:ne.start,end:ne.end})+"): it’s not open");ke.position.end=wr(ne.end)}function y(){return Gf(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.lang=ne}function N(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.meta=ne}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.value=ne.replace(/(\r?\n|\r)$/g,"")}function T(ne){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.label=he,ke.identifier=ma(this.sliceSerialize(ne)).toLowerCase()}function j(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.title=ne}function B(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.url=ne}function Q(ne){const he=this.stack[this.stack.length-1];if(!he.depth){const ke=this.sliceSerialize(ne).length;he.depth=ke}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function V(ne){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function q(ne){const ke=this.stack[this.stack.length-1].children;let je=ke[ke.length-1];(!je||je.type!=="text")&&(je=lt(),je.position={start:wr(ne.start),end:void 0},ke.push(je)),this.stack.push(je)}function E(ne){const he=this.stack.pop();he.value+=this.sliceSerialize(ne),he.position.end=wr(ne.end)}function G(ne){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=he.children[he.children.length-1];ke.position.end=wr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(q.call(this,ne),E.call(this,ne))}function D(){this.data.atHardBreak=!0}function U(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.value=ne}function z(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.value=ne}function $(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.value=ne}function P(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=he,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function te(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=he,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function fe(ne){const he=this.sliceSerialize(ne),ke=this.stack[this.stack.length-2];ke.label=H2(he),ke.identifier=ma(he).toLowerCase()}function ce(){const ne=this.stack[this.stack.length-1],he=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const je=ne.children;ke.children=je}else ke.alt=he}function R(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.url=ne}function L(){const ne=this.resume(),he=this.stack[this.stack.length-1];he.title=ne}function F(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function de(ne){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.label=he,ke.identifier=ma(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function oe(ne){this.data.characterReferenceType=ne.type}function pe(ne){const he=this.sliceSerialize(ne),ke=this.data.characterReferenceType;let je;ke?(je=cw(he,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=qf(he);const He=this.stack[this.stack.length-1];He.value+=je}function ge(ne){const he=this.stack.pop();he.position.end=wr(ne.end)}function xe(ne){E.call(this,ne);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(ne)}function we(ne){E.call(this,ne);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(ne)}function Ie(){return{type:"blockquote",children:[]}}function jt(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function fn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pt(){return{type:"emphasis",children:[]}}function Et(){return{type:"heading",depth:0,children:[]}}function At(){return{type:"break"}}function Kt(){return{type:"html",value:""}}function nt(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Jt(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Bt(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function zt(){return{type:"paragraph",children:[]}}function xn(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function kn(){return{type:"thematicBreak"}}}function wr(e){return{line:e.line,column:e.column,offset:e.offset}}function ww(e,t){let a=-1;for(;++a<t.length;){const i=t[a];Array.isArray(i)?ww(e,i):$2(e,i)}}function $2(e,t){let a;for(a in t)if(xw.call(t,a))switch(a){case"canContainEols":{const i=t[a];i&&e[a].push(...i);break}case"transforms":{const i=t[a];i&&e[a].push(...i);break}case"enter":case"exit":{const i=t[a];i&&Object.assign(e[a],i);break}}}function ib(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Tl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tl({start:t.start,end:t.end}
vendor: 9,340 bytes, lines 353-357
353)+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tl({start:t.start,end:t.end})+") is still open")}function Y2(e){const t=this;t.parser=a;function a(i){return G2(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function W2(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function K2(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
354`}]}function J2(e,t){const a=t.value?t.value+`
355`:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:a}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function X2(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Q2(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Z2(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=Es(i.toLowerCase()),o=e.footnoteOrder.indexOf(i);let u,h=e.footnoteCounts.get(i);h===void 0?(h=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=o+1,h+=1,e.footnoteCounts.set(i,h);const f={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+l,id:a+"fnref-"+l+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function eT(e,t){const a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tT(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function vw(e,t){const a=t.referenceType;let i="]";if(a==="collapsed"?i+="[]":a==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=i:l.push({type:"text",value:i}),l}function nT(e,t){const a=String(t.identifier).toUpperCase(),i=e.definitionById.get(a);if(!i)return vw(e,t);const l={src:Es(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function aT(e,t){const a={src:Es(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function rT(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const i={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,i),e.applyData(t,i)}function iT(e,t){const a=String(t.identifier).toUpperCase(),i=e.definitionById.get(a);if(!i)return vw(e,t);const l={href:Es(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function sT(e,t){const a={href:Es(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function lT(e,t,a){const i=e.all(t),l=a?oT(a):Sw(t),o={},u=[];if(typeof t.checked=="boolean"){const y=i[0];let b;y&&y.type==="element"&&y.tagName==="p"?b=y:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<i.length;){const y=i[h];(l||h!==0||y.type!=="element"||y.tagName!=="p")&&u.push({type:"text",value:`
356`}),y.type==="element"&&y.tagName==="p"&&!l?u.push(...y.children):u.push(y)}const f=i[i.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
357`});const p={type:"element",tagName:"li",properties:o,children:u};return e.patch(t,p),e.applyData(t,p)}function oT(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const a=e.children;let i=-1;for(;!t&&++i<a.length;)t=Sw(a[i])}return t}function Sw(e){const t=e.spread;return t??e.children.length>1}function cT(e,t){const a={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++l<i.length;){const u=i[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function uT(e,t){const a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function dT(e,t){const a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}function hT(e,t){const a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function fT(e,t){const a=e.all(t),i=a.shift(),l=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],u),l.push(u)}if(a.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},h=zf(t.children[1]),f=tw(t.children[t.children.length-1]);h&&f&&(u.position={start:h,end:f}),l.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function mT(e,t,a){const i=a?a.children:void 0,o=(i?i.indexOf(t):1)===0?"th":"td",u=a&&a.type==="table"?a.align:void 0,h=u?u.length:t.children.length;let f=-1;const p=[];for(;++f<h;){const b=t.children[f],x={},w=u?u[f]:void 0;w&&(x.align=w);let N={type:"element",tagName:o,properties:x,children:[]};b&&(N.children=e.all(b),e.patch(b,N),N=e.applyData(b,N)),p.push(N)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,y),e.applyData(t,y)}function pT(e,t){const a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}const sb=9,lb=32;function gT(e){const t=String(e),a=/\r?\n|\r/g;let i=a.exec(t),l=0;const o=[];for(;i;)o.push(ob(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=a.exec(t);return o.push(ob(t.slice(l),l>0,!1)),o.join("")}function ob(e,t,a){let i=0,l=e.length;if(t){let o=e.codePointAt(i);for(;o===sb||o===lb;)i++,o=e.codePointAt(i)}if(a){let o=e.codePointAt(l-1);for(;o===sb||o===lb;)l--,o=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function yT(e,t){const a={type:"text",value:gT(String(t.value))};return e.patch(t,a),e.applyData(t,a)}function bT(e,t){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}const xT={blockquote:W2,break:K2,code:J2,delete:X2,emphasis:Q2,footnoteReference:Z2,heading:eT,html:tT,imageReference:nT,image:aT,inlineCode:rT,linkReference:iT,link:sT,listItem:lT,list:cT,paragraph:uT,root:dT,strong:hT,table:fT,tableCell:pT,tableRow:mT,text:yT,thematicBreak:bT,toml:uc,yaml:uc,definition:uc,footnoteDefinition:uc};function uc(){}const Ew=-1,Qc=0,jl=1,Mc=2,Yf=3,Wf=4,Kf=5,Jf=6,Nw=7,kw=8,cb=typeof self=="object"?self:globalThis,wT=(e,t)=>{const a=(l,o)=>(e.set(o,l),l),i=l=>{if(e.has(l))return e.get(l);const[o,u]=t[l];switch(o){case Qc:case Ew:return a(u,l);case jl:{const h=a([],l);for(const f of u)h.push(i(f));return h}case Mc:{const h=a({},l);for(const[f,p]of u)h[i(f)]=i(p);return h}case Yf:return a(new Date(u),l);case Wf:{const{source:h,flags:f}=u;return a(new RegExp(h,f),l)}case Kf:{const h=a(new Map,l);for(const[f,p]of u)h.set(i(f),i(p));return h}case Jf:{const h=a(new Set,l);for(const f of u)h.add(i(f));return h}case Nw:{const{name:h,message:f}=u;return a(new cb[h](f),l)}case kw:return a(BigInt(u),l);case"BigInt":return a(Object(BigInt(u)),l);case"ArrayBuffer":return a(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:h}=new Uint8Array(u);return a(new DataView(h),u)}}return a(new cb[o](u),l)};return i},ub=e=>wT(new Map,e)(0),Ji="",{toString:vT}={},{keys:ST}=Object,wl=e=>{const t=typeof e;if(t!=="object"||!e)return[Qc,t];const a=vT.call(e).slice(8,-1);switch(a){case"Array":return[jl,Ji];case"Object":return[Mc,Ji];case"Date":return[Yf,Ji];case"RegExp":return[Wf,Ji];case"Map":return[Kf,Ji];case"Set":return[Jf,Ji];case"DataView":return[jl,a]}return a.includes("Array")?[jl,a]:a.includes("Error")?[Nw,a]:[Mc,a]},dc=([e,t])=>e===Qc&&(t==="function"||t==="symbol"),ET=(e,t,a,i)=>{const l=(u,h)=>{const f=i.push(u)-1;return a.set(h,f),f},o=u=>{if(a.has(u))return a.get(u);let[h,f]=wl(u);switch(h){case Qc:{let y=u;switch(f){case"bigint":h=kw,y=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);y=null;break;case"undefined":return l([Ew],u)}return l([h,y],u)}
vendor: 7,742 bytes, lines 357-363
357case jl:{if(f){let x=u;return f==="DataView"?x=new Uint8Array(u.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(u)),l([f,[...x]],u)}const y=[],b=l([h,y],u);for(const x of u)y.push(o(x));return b}case Mc:{if(f)switch(f){case"BigInt":return l([f,u.toString()],u);case"Boolean":case"Number":case"String":return l([f,u.valueOf()],u)}if(t&&"toJSON"in u)return o(u.toJSON());const y=[],b=l([h,y],u);for(const x of ST(u))(e||!dc(wl(u[x])))&&y.push([o(x),o(u[x])]);return b}case Yf:return l([h,u.toISOString()],u);case Wf:{const{source:y,flags:b}=u;return l([h,{source:y,flags:b}],u)}case Kf:{const y=[],b=l([h,y],u);for(const[x,w]of u)(e||!(dc(wl(x))||dc(wl(w))))&&y.push([o(x),o(w)]);return b}case Jf:{const y=[],b=l([h,y],u);for(const x of u)(e||!dc(wl(x)))&&y.push(o(x));return b}}const{message:p}=u;return l([h,{name:f,message:p}],u)};return o},db=(e,{json:t,lossy:a}={})=>{const i=[];return ET(!(t||a),!!t,new Map,i)(e),i},Ic=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ub(db(e,t)):structuredClone(e):(e,t)=>ub(db(e,t));function NT(e,t){const a=[{type:"text",value:"↩"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function kT(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function AT(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||NT,i=e.options.footnoteBackLabel||kT,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const y=e.all(p),b=String(p.identifier).toUpperCase(),x=Es(b.toLowerCase());let w=0;const N=[],A=e.footnoteCounts.get(b);for(;A!==void 0&&++w<=A;){N.length>0&&N.push({type:"text",value:" "});let T=typeof a=="string"?a:a(f,w);typeof T=="string"&&(T={type:"text",value:T}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,w),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const _=y[y.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const T=_.children[_.children.length-1];T&&T.type==="text"?T.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...N)}else y.push(...N);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!0)};e.patch(p,C),h.push(C)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ic(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
358`},{type:"element",tagName:"ol",properties:{},children:e.wrap(h,!0)},{type:"text",value:`
359`}]}}const Zc=(function(e){if(e==null)return jT;if(typeof e=="function")return eu(e);if(typeof e=="object")return Array.isArray(e)?_T(e):TT(e);if(typeof e=="string")return CT(e);throw new Error("Expected function, string, or object as test")});function _T(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Zc(e[a]);return eu(i);function i(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function TT(e){const t=e;return eu(a);function a(i){const l=i;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function CT(e){return eu(t);function t(a){return a&&a.type===e}}function eu(e){return t;function t(a,i,l){return!!(FT(a)&&e.call(this,a,typeof i=="number"?i:void 0,l||void 0))}}function jT(){return!0}function FT(e){return e!==null&&typeof e=="object"&&"type"in e}const Aw=[],OT=!0,df=!1,RT="skip";function _w(e,t,a,i){let l;typeof t=="function"&&typeof a!="function"?(i=a,a=t):l=t;const o=Zc(l),u=i?-1:1;h(e,void 0,[])();function h(f,p,y){const b=f&&typeof f=="object"?f:{};if(typeof b.type=="string"){const w=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(w?"<"+w+">":""))+")"})}return x;function x(){let w=Aw,N,A,_;if((!t||o(f,p,y[y.length-1]||void 0))&&(w=DT(a(f,y)),w[0]===df))return w;if("children"in f&&f.children){const C=f;if(C.children&&w[0]!==RT)for(A=(i?C.children.length:-1)+u,_=y.concat(C);A>-1&&A<C.children.length;){const T=C.children[A];if(N=h(T,A,_)(),N[0]===df)return N;A=typeof N[1]=="number"?N[1]:A+u}}return w}}}function DT(e){return Array.isArray(e)?e:typeof e=="number"?[OT,e]:e==null?Aw:[e]}function Xf(e,t,a,i){let l,o,u;typeof t=="function"&&typeof a!="function"?(o=void 0,u=t,l=a):(o=t,u=a,l=i),_w(e,o,h,l);function h(f,p){const y=p[p.length-1],b=y?y.children.indexOf(f):void 0;return u(f,b,y)}}const hf={}.hasOwnProperty,LT={};function MT(e,t){const a=t||LT,i=new Map,l=new Map,o=new Map,u={...xT,...a.handlers},h={all:p,applyData:UT,definitionById:i,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:u,one:f,options:a,patch:IT,wrap:zT};return Xf(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const b=y.type==="definition"?i:l,x=String(y.identifier).toUpperCase();b.has(x)||b.set(x,y)}}),h;function f(y,b){const x=y.type,w=h.handlers[x];if(hf.call(h.handlers,x)&&w)return w(h,y,b);if(h.options.passThrough&&h.options.passThrough.includes(x)){if("children"in y){const{children:A,..._}=y,C=Ic(_);return C.children=h.all(y),C}return Ic(y)}return(h.options.unknownHandler||BT)(h,y,b)}function p(y){const b=[];if("children"in y){const x=y.children;let w=-1;for(;++w<x.length;){const N=h.one(x[w],y);if(N){if(w&&x[w-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=hb(N.value)),!Array.isArray(N)&&N.type==="element")){const A=N.children[0];A&&A.type==="text"&&(A.value=hb(A.value))}Array.isArray(N)?b.push(...N):b.push(N)}}}return b}}function IT(e,t){e.position&&(t.position=kA(e))}function UT(e,t){let a=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof i=="string")if(a.type==="element")a.tagName=i;else{const u="children"in a?a.children:[a];a={type:"element",tagName:i,properties:{},children:u}}a.type==="element"&&o&&Object.assign(a.properties,Ic(o)),"children"in a&&a.children&&l!==null&&l!==void 0&&(a.children=l)}return a}function BT(e,t){const a=t.data||{},i="value"in t&&!(hf.call(a,"hProperties")||hf.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function zT(e,t){const a=[];let i=-1;for(t&&a.push({type:"text",value:`
360`});++i<e.length;)i&&a.push({type:"text",value:`
361`}),a.push(e[i]);return t&&e.length>0&&a.push({type:"text",value:`
362`}),a}function hb(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}function fb(e,t){const a=MT(e,t),i=a.one(e,void 0),l=AT(a),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
363`},l),o}function PT(e,t){return e&&"run"in e?async function(a,i){const l=fb(a,{file:i,...t});await e.run(l,i)}:function(a,i){return fb(a,{file:i,...e||t})}}function mb(e){if(e)throw e}var Ah,pb;function HT(){if(pb)return Ah;pb=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},o=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var y=e.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!b)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},u=function(p,y){a&&y.name==="__proto__"?a(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue}
vendor: 12,373 bytes, line 363
363,h=function(p,y){if(y==="__proto__")if(e.call(p,y)){if(i)return i(p,y).value}else return;return p[y]};return Ah=function f(){var p,y,b,x,w,N,A=arguments[0],_=1,C=arguments.length,T=!1;for(typeof A=="boolean"&&(T=A,A=arguments[1]||{},_=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});_<C;++_)if(p=arguments[_],p!=null)for(y in p)b=h(A,y),x=h(p,y),A!==x&&(T&&x&&(o(x)||(w=l(x)))?(w?(w=!1,N=b&&l(b)?b:[]):N=b&&o(b)?b:{},u(A,{name:y,newValue:f(T,N,x)})):typeof x<"u"&&u(A,{name:y,newValue:x}));return A},Ah}var VT=HT();const _h=$l(VT);function ff(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function GT(){const e=[],t={run:a,use:i};return t;function a(...l){let o=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);h(null,...l);function h(f,...p){const y=e[++o];let b=-1;if(f){u(f);return}for(;++b<l.length;)(p[b]===null||p[b]===void 0)&&(p[b]=l[b]);l=p,y?qT(y,h)(...p):u(null,...p)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function qT(e,t){let a;return i;function i(...u){const h=e.length>u.length;let f;h&&u.push(l);try{f=e.apply(this,u)}catch(p){const y=p;if(h&&a)throw y;return l(y)}h||(f&&f.then&&typeof f.then=="function"?f.then(o,l):f instanceof Error?l(f):o(f))}function l(u,...h){a||(a=!0,t(u,...h))}function o(u){l(null,u)}}const wa={basename:$T,dirname:YT,extname:WT,join:KT,sep:"/"};function $T(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Kl(e);let a=0,i=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){a=l+1;break}}else i<0&&(o=!0,i=l+1);return i<0?"":e.slice(a,i)}if(t===e)return"";let u=-1,h=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){a=l+1;break}}else u<0&&(o=!0,u=l+1),h>-1&&(e.codePointAt(l)===t.codePointAt(h--)?h<0&&(i=l):(h=-1,i=u));return a===i?i=u:i<0&&(i=e.length),e.slice(a,i)}function YT(e){if(Kl(e),e.length===0)return".";let t=-1,a=e.length,i;for(;--a;)if(e.codePointAt(a)===47){if(i){t=a;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function WT(e){Kl(e);let t=e.length,a=-1,i=0,l=-1,o=0,u;for(;t--;){const h=e.codePointAt(t);if(h===47){if(u){i=t+1;break}continue}a<0&&(u=!0,a=t+1),h===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||a<0||o===0||o===1&&l===a-1&&l===i+1?"":e.slice(l,a)}function KT(...e){let t=-1,a;for(;++t<e.length;)Kl(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":JT(a)}function JT(e){Kl(e);const t=e.codePointAt(0)===47;let a=XT(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function XT(e,t){let a="",i=0,l=-1,o=0,u=-1,h,f;for(;++u<=e.length;){if(u<e.length)h=e.codePointAt(u);else{if(h===47)break;h=47}if(h===47){if(!(l===u-1||o===1))if(l!==u-1&&o===2){if(a.length<2||i!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(f=a.lastIndexOf("/"),f!==a.length-1){f<0?(a="",i=0):(a=a.slice(0,f),i=a.length-1-a.lastIndexOf("/")),l=u,o=0;continue}}else if(a.length>0){a="",i=0,l=u,o=0;continue}}t&&(a=a.length>0?a+"/..":"..",i=2)}else a.length>0?a+="/"+e.slice(l+1,u):a=e.slice(l+1,u),i=u-l-1;l=u,o=0}else h===46&&o>-1?o++:o=-1}return a}function Kl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QT={cwd:ZT};function ZT(){return"/"}function mf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function eC(e){if(typeof e=="string")e=new URL(e);else if(!mf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return tC(e)}function tC(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const i=t.codePointAt(a+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Th=["history","path","basename","stem","extname","dirname"];class Tw{constructor(t){let a;t?mf(t)?a={path:t}:typeof t=="string"||nC(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":QT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Th.length;){const o=Th[i];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let l;for(l in a)Th.includes(l)||(this[l]=a[l])}get basename(){return typeof this.path=="string"?wa.basename(this.path):void 0}set basename(t){jh(t,"basename"),Ch(t,"basename"),this.path=wa.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?wa.dirname(this.path):void 0}set dirname(t){gb(this.basename,"dirname"),this.path=wa.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?wa.extname(this.path):void 0}set extname(t){if(Ch(t,"extname"),gb(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wa.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){mf(t)&&(t=eC(t)),jh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?wa.basename(this.path,this.extname):void 0}set stem(t){jh(t,"stem"),Ch(t,"stem"),this.path=wa.join(this.dirname||"",t+(this.extname||""))}fail(t,a,i){const l=this.message(t,a,i);throw l.fatal=!0,l}info(t,a,i){const l=this.message(t,a,i);return l.fatal=void 0,l}message(t,a,i){const l=new bn(t,a,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ch(e,t){if(e&&e.includes(wa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wa.sep+"`")}function jh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function gb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function nC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aC=(function(e){const i=this.constructor.prototype,l=i[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,i),o}),rC={}.hasOwnProperty;class Qf extends aC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GT()}copy(){const t=new Qf;let a=-1;for(;++a<this.attachers.length;){const i=this.attachers[a];t.use(...i)}return t.data(_h(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Rh("data",this.frozen),this.namespace[t]=a,this):rC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=a.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=hc(t),i=this.parser||this.Parser;return Fh("parse",i),i(String(a),a)}process(t,a){const i=this;return this.freeze(),Fh("process",this.parser||this.Parser),Oh("process",this.compiler||this.Compiler),a?l(void 0,a):new Promise(l);function l(o,u){const h=hc(t),f=i.parse(h);i.run(f,h,function(y,b,x){if(y||!b||!x)return p(y);const w=b,N=i.stringify(w,x);lC(N)?x.value=N:x.result=N,p(y,x)});function p(y,b){y||!b?u(y):o?o(b):a(void 0,b)}}}processSync(t){let a=!1,i;return this.freeze(),Fh("processSync",this.parser||this.Parser),Oh("processSync",this.compiler||this.Compiler),this.process(t,l),bb("processSync","process",a),i;function l(o,u){a=!0,mb(o),i=u}}run(t,a,i){yb(t),this.freeze();const l=this.transformers;return!i&&typeof a=="function"&&(i=a,a=void 0),i?o(void 0,i):new Promise(o);function o(u,h){const f=hc(a);l.run(t,f,p);function p(y,b,x){const w=b||t;y?h(y):u?u(w):i(void 0,w,x)}}}runSync(t,a){let i=!1,l;return this.run(t,a,o),bb("runSync","run",i),l;function o(u,h){mb(u),l=h,i=!0}}stringify(t,a){this.freeze();const i=hc(a),l=this.compiler||this.Compiler;return Oh("stringify",l),yb(t),l(t,i)}use(t,...a){const i=this.attachers,l=this.namespace;if(Rh("use",this.frozen),t!=null)if(typeof t=="function")f(t,a);else if(typeof t=="object")Array.isArray(t)?h(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,...b]=p;f(y,b)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(p.plugins),p.settings&&(l.settings=_h(!0,l.settings,p.settings))}function h(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const b=p[y];o(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,y){let b=-1,x=-1;for(;++b<i.length;)if(i[b][0]===p){x=b;break}if(x===-1)i.push([p,...y]);else if(y.length>0){let[w,...N]=y;const A=i[x][1];ff(A)&&ff(w)&&(w=_h(!0,A,w)),i[x]=[p,w,...N]}}}}const iC=new Qf().freeze();function Fh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yb(e){if(!ff(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bb(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function hc(e){return sC(e)?e:new Tw(e)}function sC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lC(e){return typeof e=="string"||oC(e)}function oC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xb=[],wb={allowDangerousHtml:!0},uC=/^(https?|ircs?|mailto|xmpp)$/i,dC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function vb(e){const t=e.allowedElements,a=e.allowElement,i=e.children||"",l=e.className,o=e.components,u=e.disallowedElements,h=e.rehypePlugins||xb,f=e.remarkPlugins||xb,p=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wb}
vendor: 5,752 bytes, line 363
363:wb,y=e.skipHtml,b=e.unwrapDisallowed,x=e.urlTransform||hC,w=iC().use(Y2).use(f).use(PT,p).use(h),N=new Tw;typeof i=="string"&&(N.value=i);for(const T of dC)Object.hasOwn(e,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+cC+T.id,void 0);const A=w.parse(N);let _=w.runSync(A,N);return l&&(_={type:"element",tagName:"div",properties:{className:l},children:_.type==="root"?_.children:[_]}),Xf(_,C),jA(_,{Fragment:d.Fragment,components:o,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function C(T,j,B){if(T.type==="raw"&&B&&typeof j=="number")return y?B.children.splice(j,1):B.children[j]={type:"text",value:T.value},j;if(T.type==="element"){let Q;for(Q in Eh)if(Object.hasOwn(Eh,Q)&&Object.hasOwn(T.properties,Q)){const O=T.properties[Q],V=Eh[Q];(V===null||V.includes(T.tagName))&&(T.properties[Q]=x(String(O||""),Q,T))}}if(T.type==="element"){let Q=t?!t.includes(T.tagName):u?u.includes(T.tagName):!1;if(!Q&&a&&typeof j=="number"&&(Q=!a(T,j,B)),Q&&B&&typeof j=="number")return b&&T.children?B.children.splice(j,1,...T.children):B.children.splice(j,1),j}}}function hC(e){const t=e.indexOf(":"),a=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t<0||l>-1&&t>l||a>-1&&t>a||i>-1&&t>i||uC.test(e.slice(0,t))?e:""}function Sb(e,t){const a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=a.indexOf(t);for(;l!==-1;)i++,l=a.indexOf(t,l+t.length);return i}function fC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mC(e,t,a){const l=Zc((a||{}).ignore||[]),o=pC(t);let u=-1;for(;++u<o.length;)_w(e,"text",h);function h(p,y){let b=-1,x;for(;++b<y.length;){const w=y[b],N=x?x.children:void 0;if(l(w,N?N.indexOf(w):void 0,x))return;x=w}if(x)return f(p,y)}function f(p,y){const b=y[y.length-1],x=o[u][0],w=o[u][1];let N=0;const _=b.children.indexOf(p);let C=!1,T=[];x.lastIndex=0;let j=x.exec(p.value);for(;j;){const B=j.index,Q={index:j.index,input:j.input,stack:[...y,p]};let O=w(...j,Q);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?x.lastIndex=B+1:(N!==B&&T.push({type:"text",value:p.value.slice(N,B)}),Array.isArray(O)?T.push(...O):O&&T.push(O),N=B+j[0].length,C=!0),!x.global)break;j=x.exec(p.value)}return C?(N<p.value.length&&T.push({type:"text",value:p.value.slice(N)}),b.children.splice(_,1,...T)):T=[p],_+T.length}}function pC(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<a.length;){const l=a[i];t.push([gC(l[0]),yC(l[1])])}return t}function gC(e){return typeof e=="string"?new RegExp(fC(e),"g"):e}function yC(e){return typeof e=="function"?e:function(){return e}}const Dh="phrasing",Lh=["autolink","link","image","label"];function bC(){return{transforms:[kC],enter:{literalAutolink:wC,literalAutolinkEmail:Mh,literalAutolinkHttp:Mh,literalAutolinkWww:Mh},exit:{literalAutolink:NC,literalAutolinkEmail:EC,literalAutolinkHttp:vC,literalAutolinkWww:SC}}}function xC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Lh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Lh},{character:":",before:"[ps]",after:"\\/",inConstruct:Dh,notInConstruct:Lh}]}}function wC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Mh(e){this.config.enter.autolinkProtocol.call(this,e)}function vC(e){this.config.exit.autolinkProtocol.call(this,e)}function SC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function EC(e){this.config.exit.autolinkEmail.call(this,e)}function NC(e){this.exit(e)}function kC(e){mC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,AC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_C]],{ignore:["link","linkReference"]})}function AC(e,t,a,i,l){let o="";if(!Cw(l)||(/^w/i.test(t)&&(a=t+a,t="",o="http://"),!TC(a)))return!1;const u=CC(a+i);if(!u[0])return!1;const h={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[h,{type:"text",value:u[1]}]:h}function _C(e,t,a,i){return!Cw(i,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+a,children:[{type:"text",value:t+"@"+a}]}}function TC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function CC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let a=t[0],i=a.indexOf(")");const l=Sb(e,"(");let o=Sb(e,")");for(;i!==-1&&l>o;)e+=a.slice(0,i+1),a=a.slice(i+1),i=a.indexOf(")"),o++;return[e,a]}function Cw(e,t){const a=e.input.charCodeAt(e.index-1);return(e.index===0||li(a)||Jc(a))&&(!t||a!==47)}jw.peek=UC;function jC(){this.buffer()}function FC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function OC(){this.buffer()}function RC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DC(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=ma(this.sliceSerialize(e)).toLowerCase(),a.label=t}function LC(e){this.exit(e)}function MC(e){const t=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=ma(this.sliceSerialize(e)).toLowerCase(),a.label=t}function IC(e){this.exit(e)}function UC(){return"["}function jw(e,t,a,i){const l=a.createTracker(i);let o=l.move("[^");const u=a.enter("footnoteReference"),h=a.enter("reference");return o+=l.move(a.safe(a.associationId(e),{after:"]",before:o})),h(),u(),o+=l.move("]"),o}
vendor: 4,282 bytes, lines 363-367
363function BC(){return{enter:{gfmFootnoteCallString:jC,gfmFootnoteCall:FC,gfmFootnoteDefinitionLabelString:OC,gfmFootnoteDefinition:RC},exit:{gfmFootnoteCallString:DC,gfmFootnoteCall:LC,gfmFootnoteDefinitionLabelString:MC,gfmFootnoteDefinition:IC}}}function zC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:a,footnoteReference:jw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(i,l,o,u){const h=o.createTracker(u);let f=h.move("[^");const p=o.enter("footnoteDefinition"),y=o.enter("label");return f+=h.move(o.safe(o.associationId(i),{before:f,after:"]"})),y(),f+=h.move("]:"),i.children&&i.children.length>0&&(h.shift(4),f+=h.move((t?`
364`:" ")+o.indentLines(o.containerFlow(i,h.current()),t?Fw:PC))),p(),f}}function PC(e,t,a){return t===0?e:Fw(e,t,a)}function Fw(e,t,a){return(a?"":"    ")+e}const HC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ow.peek=YC;function VC(){return{canContainEols:["delete"],enter:{strikethrough:qC},exit:{strikethrough:$C}}}function GC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HC}],handlers:{delete:Ow}}}function qC(e){this.enter({type:"delete",children:[]},e)}function $C(e){this.exit(e)}function Ow(e,t,a,i){const l=a.createTracker(i),o=a.enter("strikethrough");let u=l.move("~~");return u+=a.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),o(),u}function YC(){return"~"}function WC(e){return e.length}function KC(e,t){const a=t||{},i=(a.align||[]).concat(),l=a.stringLength||WC,o=[],u=[],h=[],f=[];let p=0,y=-1;for(;++y<e.length;){const A=[],_=[];let C=-1;for(e[y].length>p&&(p=e[y].length);++C<e[y].length;){const T=JC(e[y][C]);if(a.alignDelimiters!==!1){const j=l(T);_[C]=j,(f[C]===void 0||j>f[C])&&(f[C]=j)}A.push(T)}u[y]=A,h[y]=_}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<p;)o[b]=Eb(i[b]);else{const A=Eb(i);for(;++b<p;)o[b]=A}b=-1;const x=[],w=[];for(;++b<p;){const A=o[b];let _="",C="";A===99?(_=":",C=":"):A===108?_=":":A===114&&(C=":");let T=a.alignDelimiters===!1?1:Math.max(1,f[b]-_.length-C.length);const j=_+"-".repeat(T)+C;a.alignDelimiters!==!1&&(T=_.length+T+C.length,T>f[b]&&(f[b]=T),w[b]=T),x[b]=j}u.splice(1,0,x),h.splice(1,0,w),y=-1;const N=[];for(;++y<u.length;){const A=u[y],_=h[y];b=-1;const C=[];for(;++b<p;){const T=A[b]||"";let j="",B="";if(a.alignDelimiters!==!1){const Q=f[b]-(_[b]||0),O=o[b];O===114?j=" ".repeat(Q):O===99?Q%2?(j=" ".repeat(Q/2+.5),B=" ".repeat(Q/2-.5)):(j=" ".repeat(Q/2),B=j):B=" ".repeat(Q)}a.delimiterStart!==!1&&!b&&C.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&T==="")&&(a.delimiterStart!==!1||b)&&C.push(" "),a.alignDelimiters!==!1&&C.push(j),C.push(T),a.alignDelimiters!==!1&&C.push(B),a.padding!==!1&&C.push(" "),(a.delimiterEnd!==!1||b!==p-1)&&C.push("|")}N.push(a.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return N.join(`
365`)}function JC(e){return e==null?"":String(e)}function Eb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function XC(e,t,a,i){const l=a.enter("blockquote"),o=a.createTracker(i);o.move("> "),o.shift(2);const u=a.indentLines(a.containerFlow(e,o.current()),QC);return l(),u}function QC(e,t,a){return">"+(a?"":" ")+e}function ZC(e,t){return Nb(e,t.inConstruct,!0)&&!Nb(e,t.notInConstruct,!1)}function Nb(e,t,a){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return a;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function kb(e,t,a,i){let l=-1;for(;++l<a.unsafe.length;)if(a.unsafe[l].character===`
366`&&ZC(a.stack,a.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
367`}function ej(e,t){const a=String(e);let i=a.indexOf(t),l=i,o=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++o>u&&(u=o):o=1,l=i+t.length,i=a.indexOf(t,l);return u}function tj(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nj(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function aj(e,t,a,i){const l=nj(a),o=e.value||"",u=l==="`"?"GraveAccent":"Tilde";
vendor: 12,628 bytes, lines 367-378
367if(tj(e,a)){const b=a.enter("codeIndented"),x=a.indentLines(o,rj);return b(),x}const h=a.createTracker(i),f=l.repeat(Math.max(ej(o,l)+1,3)),p=a.enter("codeFenced");let y=h.move(f);if(e.lang){const b=a.enter(`codeFencedLang${u}`);y+=h.move(a.safe(e.lang,{before:y,after:" ",encode:["`"],...h.current()})),b()}if(e.lang&&e.meta){const b=a.enter(`codeFencedMeta${u}`);y+=h.move(" "),y+=h.move(a.safe(e.meta,{before:y,after:`
368`,encode:["`"],...h.current()})),b()}return y+=h.move(`
369`),o&&(y+=h.move(o+`
370`)),y+=h.move(f),p(),y}function rj(e,t,a){return(a?"":"    ")+e}function Zf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ij(e,t,a,i){const l=Zf(a),o=l==='"'?"Quote":"Apostrophe",u=a.enter("definition");let h=a.enter("label");const f=a.createTracker(i);let p=f.move("[");return p+=f.move(a.safe(a.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),h(),!e.url||/[\0- \u007F]/.test(e.url)?(h=a.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(a.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(h=a.enter("destinationRaw"),p+=f.move(a.safe(e.url,{before:p,after:e.title?" ":`
371`,...f.current()}))),h(),e.title&&(h=a.enter(`title${o}`),p+=f.move(" "+l),p+=f.move(a.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),h()),u(),p}function sj(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Bl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Uc(e,t,a){const i=ws(e),l=ws(t);return i===void 0?l===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Rw.peek=lj;function Rw(e,t,a,i){const l=sj(a),o=a.enter("emphasis"),u=a.createTracker(i),h=u.move(l);let f=u.move(a.containerPhrasing(e,{after:l,before:h,...u.current()}));const p=f.charCodeAt(0),y=Uc(i.before.charCodeAt(i.before.length-1),p,l);y.inside&&(f=Bl(p)+f.slice(1));const b=f.charCodeAt(f.length-1),x=Uc(i.after.charCodeAt(0),b,l);x.inside&&(f=f.slice(0,-1)+Bl(b));const w=u.move(l);return o(),a.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},h+f+w}function lj(e,t,a){return a.options.emphasis||"*"}function oj(e,t){let a=!1;return Xf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return a=!0,df}),!!((!e.depth||e.depth<3)&&Gf(e)&&(t.options.setext||a))}function cj(e,t,a,i){const l=Math.max(Math.min(6,e.depth||1),1),o=a.createTracker(i);if(oj(e,a)){const y=a.enter("headingSetext"),b=a.enter("phrasing"),x=a.containerPhrasing(e,{...o.current(),before:`
372`,after:`
373`});return b(),y(),x+`
374`+(l===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
375`))+1))}const u="#".repeat(l),h=a.enter("headingAtx"),f=a.enter("phrasing");o.move(u+" ");let p=a.containerPhrasing(e,{before:"# ",after:`
376`,...o.current()});return/^[\t ]/.test(p)&&(p=Bl(p.charCodeAt(0))+p.slice(1)),p=p?u+" "+p:u,a.options.closeAtx&&(p+=" "+u),f(),h(),p}Dw.peek=uj;function Dw(e){return e.value||""}function uj(){return"<"}Lw.peek=dj;function Lw(e,t,a,i){const l=Zf(a),o=l==='"'?"Quote":"Apostrophe",u=a.enter("image");let h=a.enter("label");const f=a.createTracker(i);let p=f.move("![");return p+=f.move(a.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=a.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(a.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(h=a.enter("destinationRaw"),p+=f.move(a.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),h(),e.title&&(h=a.enter(`title${o}`),p+=f.move(" "+l),p+=f.move(a.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),h()),p+=f.move(")"),u(),p}function dj(){return"!"}Mw.peek=hj;function Mw(e,t,a,i){const l=e.referenceType,o=a.enter("imageReference");let u=a.enter("label");const h=a.createTracker(i);let f=h.move("![");const p=a.safe(e.alt,{before:f,after:"]",...h.current()});f+=h.move(p+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const b=a.safe(a.associationId(e),{before:f,after:"]",...h.current()});return u(),a.stack=y,o(),l==="full"||!p||p!==b?f+=h.move(b+"]"):l==="shortcut"?f=f.slice(0,-1):f+=h.move("]"),f}function hj(){return"!"}Iw.peek=fj;function Iw(e,t,a){let i=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<a.unsafe.length;){const u=a.unsafe[o],h=a.compilePattern(u);let f;if(u.atBreak)for(;f=h.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return l+i+l}function fj(){return"`"}function Uw(e,t){const a=Gf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Bw.peek=mj;function Bw(e,t,a,i){const l=Zf(a),o=l==='"'?"Quote":"Apostrophe",u=a.createTracker(i);let h,f;if(Uw(e,a)){const y=a.stack;a.stack=[],h=a.enter("autolink");let b=u.move("<");return b+=u.move(a.containerPhrasing(e,{before:b,after:">",...u.current()})),b+=u.move(">"),h(),a.stack=y,b}h=a.enter("link"),f=a.enter("label");let p=u.move("[");return p+=u.move(a.containerPhrasing(e,{before:p,after:"](",...u.current()})),p+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=a.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(a.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(f=a.enter("destinationRaw"),p+=u.move(a.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=a.enter(`title${o}`),p+=u.move(" "+l),p+=u.move(a.safe(e.title,{before:p,after:l,...u.current()})),p+=u.move(l),f()),p+=u.move(")"),h(),p}function mj(e,t,a){return Uw(e,a)?"<":"["}zw.peek=pj;function zw(e,t,a,i){const l=e.referenceType,o=a.enter("linkReference");let u=a.enter("label");const h=a.createTracker(i);let f=h.move("[");const p=a.containerPhrasing(e,{before:f,after:"]",...h.current()});f+=h.move(p+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const b=a.safe(a.associationId(e),{before:f,after:"]",...h.current()});return u(),a.stack=y,o(),l==="full"||!p||p!==b?f+=h.move(b+"]"):l==="shortcut"?f=f.slice(0,-1):f+=h.move("]"),f}function pj(){return"["}function em(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function gj(e){const t=em(e),a=e.options.bulletOther;if(!a)return t==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+a+"`) to be different");return a}function yj(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Pw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function bj(e,t,a,i){const l=a.enter("list"),o=a.bulletCurrent;let u=e.ordered?yj(a):em(a);const h=e.ordered?u==="."?")":".":gj(a);let f=t&&a.bulletLastUsed?u===a.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(f=!0),Pw(a)===u&&y){let b=-1;for(;++b<e.children.length;){const x=e.children[b];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=h),a.bulletCurrent=u;const p=a.containerFlow(e,i);return a.bulletLastUsed=u,a.bulletCurrent=o,l(),p}function xj(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wj(e,t,a,i){const l=xj(a);let o=a.bulletCurrent||em(a);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(a.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const h=a.createTracker(i);h.move(o+" ".repeat(u-o.length)),h.shift(u);const f=a.enter("listItem"),p=a.indentLines(a.containerFlow(e,h.current()),y);return f(),p;function y(b,x,w){return x?(w?"":" ".repeat(u))+b:(w?o:o+" ".repeat(u-o.length))+b}}function vj(e,t,a,i){const l=a.enter("paragraph"),o=a.enter("phrasing"),u=a.containerPhrasing(e,i);return o(),l(),u}const Sj=Zc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ej(e,t,a,i){return(e.children.some(function(u){return Sj(u)})?a.containerPhrasing:a.containerFlow).call(a,e,i)}function Nj(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hw.peek=kj;function Hw(e,t,a,i){const l=Nj(a),o=a.enter("strong"),u=a.createTracker(i),h=u.move(l+l);let f=u.move(a.containerPhrasing(e,{after:l,before:h,...u.current()}));const p=f.charCodeAt(0),y=Uc(i.before.charCodeAt(i.before.length-1),p,l);y.inside&&(f=Bl(p)+f.slice(1));const b=f.charCodeAt(f.length-1),x=Uc(i.after.charCodeAt(0),b,l);x.inside&&(f=f.slice(0,-1)+Bl(b));const w=u.move(l+l);return o(),a.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},h+f+w}function kj(e,t,a){return a.options.strong||"*"}function Aj(e,t,a,i){return a.safe(e.value,i)}function _j(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Tj(e,t,a){const i=(Pw(a)+(a.options.ruleSpaces?" ":"")).repeat(_j(a));return a.options.ruleSpaces?i.slice(0,-1):i}const Vw={blockquote:XC,break:kb,code:aj,definition:ij,emphasis:Rw,hardBreak:kb,heading:cj,html:Dw,image:Lw,imageReference:Mw,inlineCode:Iw,link:Bw,linkReference:zw,list:bj,listItem:wj,paragraph:vj,root:Ej,strong:Hw,text:Aj,thematicBreak:Tj};function Cj(){return{enter:{table:jj,tableData:Ab,tableHeader:Ab,tableRow:Oj},exit:{codeText:Rj,table:Fj,tableData:Ih,tableHeader:Ih,tableRow:Ih}}}function jj(e){const t=e._align;this.enter({type:"table",align:t.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function Fj(e){this.exit(e),this.data.inTable=void 0}function Oj(e){this.enter({type:"tableRow",children:[]},e)}function Ih(e){this.exit(e)}function Ab(e){this.enter({type:"tableCell",children:[]},e)}function Rj(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Dj));const a=this.stack[this.stack.length-1];a.type,a.value=t,this.exit(e)}function Dj(e,t){return t==="|"?t:e}function Lj(e){const t=e||{},a=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,o=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
377`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:f,tableRow:h}};function u(w,N,A,_){return p(y(w,A,_),w.align)}function h(w,N,A,_){const C=b(w,A,_),T=p([C]);return T.slice(0,T.indexOf(`
378`))}function f(w,N,A,_){const C=A.enter("tableCell"),T=A.enter("phrasing"),j=A.containerPhrasing(w,{..._,before:o,after:o});return T(),C(),j}function p(w,N){return KC(w,{align:N,alignDelimiters:i,padding:a,stringLength:l})}function y(w,N,A){const _=w.children;let C=-1;const T=[],j=N.enter("table");for(;++C<_.length;)T[C]=b(_[C],N,A);return j(),T}function b(w,N,A){const _=w.children;let C=-1;const T=[],j=N.enter("tableRow");for(;++C<_.length;)T[C]=f(_[C],w,N,A);return j(),T}
vendor: 10,669 bytes, line 378
378function x(w,N,A){let _=Vw.inlineCode(w,N,A);return A.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function Mj(){return{exit:{taskListCheckValueChecked:_b,taskListCheckValueUnchecked:_b,paragraph:Uj}}}function Ij(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Bj}}}function _b(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Uj(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const i=a.children[0];if(i&&i.type==="text"){const l=t.children;let o=-1,u;for(;++o<l.length;){const h=l[o];if(h.type==="paragraph"){u=h;break}}u===a&&(i.value=i.value.slice(1),i.value.length===0?a.children.shift():a.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,a.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function Bj(e,t,a,i){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",h=a.createTracker(i);o&&h.move(u);let f=Vw.listItem(e,t,a,{...i,...h.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(y){return y+u}}function zj(){return[bC(),BC(),VC(),Cj(),Mj()]}function Pj(e){return{extensions:[xC(),zC(e),GC(),Lj(e),Ij()]}}const Hj={tokenize:Wj,partial:!0},Gw={tokenize:Kj,partial:!0},qw={tokenize:Jj,partial:!0},$w={tokenize:Xj,partial:!0},Vj={tokenize:Qj,partial:!0},Yw={name:"wwwAutolink",tokenize:$j,previous:Kw},Ww={name:"protocolAutolink",tokenize:Yj,previous:Jw},Ya={name:"emailAutolink",tokenize:qj,previous:Xw},Ea={};function Gj(){return{text:Ea}}let Jr=48;for(;Jr<123;)Ea[Jr]=Ya,Jr++,Jr===58?Jr=65:Jr===91&&(Jr=97);Ea[43]=Ya;Ea[45]=Ya;Ea[46]=Ya;Ea[95]=Ya;Ea[72]=[Ya,Ww];Ea[104]=[Ya,Ww];Ea[87]=[Ya,Yw];Ea[119]=[Ya,Yw];function qj(e,t,a){const i=this;let l,o;return u;function u(b){return!pf(b)||!Xw.call(i,i.previous)||tm(i.events)?a(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),h(b))}function h(b){return pf(b)?(e.consume(b),h):b===64?(e.consume(b),f):a(b)}function f(b){return b===46?e.check(Vj,y,p)(b):b===45||b===95||yn(b)?(o=!0,e.consume(b),f):y(b)}function p(b){return e.consume(b),l=!0,f}function y(b){return o&&l&&Nn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(b)):a(b)}}function $j(e,t,a){const i=this;return l;function l(u){return u!==87&&u!==119||!Kw.call(i,i.previous)||tm(i.events)?a(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Hj,e.attempt(Gw,e.attempt(qw,o),a),a)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function Yj(e,t,a){const i=this;let l="",o=!1;return u;function u(b){return(b===72||b===104)&&Jw.call(i,i.previous)&&!tm(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(b),e.consume(b),h):a(b)}function h(b){if(Nn(b)&&l.length<5)return l+=String.fromCodePoint(b),e.consume(b),h;if(b===58){const x=l.toLowerCase();if(x==="http"||x==="https")return e.consume(b),f}return a(b)}function f(b){return b===47?(e.consume(b),o?p:(o=!0,f)):a(b)}function p(b){return b===null||Lc(b)||bt(b)||li(b)||Jc(b)?a(b):e.attempt(Gw,e.attempt(qw,y),a)(b)}function y(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(b)}}function Wj(e,t,a){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),o):a(u)}function o(u){return u===null?a(u):t(u)}}function Kj(e,t,a){let i,l,o;return u;function u(p){return p===46||p===95?e.check($w,f,h)(p):p===null||bt(p)||li(p)||p!==45&&Jc(p)?f(p):(o=!0,e.consume(p),u)}function h(p){return p===95?i=!0:(l=i,i=void 0),e.consume(p),u}function f(p){return l||i||!o?a(p):t(p)}}function Jj(e,t){let a=0,i=0;return l;function l(u){return u===40?(a++,e.consume(u),l):u===41&&i<a?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check($w,t,o)(u):u===null||bt(u)||li(u)?t(u):(e.consume(u),l)}function o(u){return u===41&&i++,e.consume(u),l}}function Xj(e,t,a){return i;function i(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(e.consume(h),i):h===38?(e.consume(h),o):h===93?(e.consume(h),l):h===60||h===null||bt(h)||li(h)?t(h):a(h)}function l(h){return h===null||h===40||h===91||bt(h)||li(h)?t(h):i(h)}function o(h){return Nn(h)?u(h):a(h)}function u(h){return h===59?(e.consume(h),i):Nn(h)?(e.consume(h),u):a(h)}}function Qj(e,t,a){return i;function i(o){return e.consume(o),l}function l(o){return yn(o)?a(o):t(o)}}function Kw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bt(e)}function Jw(e){return!Nn(e)}function Xw(e){return!(e===47||pf(e))}function pf(e){return e===43||e===45||e===46||e===95||yn(e)}function tm(e){let t=e.length,a=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){a=!0;break}if(i._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const Zj={tokenize:l3,partial:!0};function e3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r3,continuation:{tokenize:i3},exit:s3}},text:{91:{name:"gfmFootnoteCall",tokenize:a3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:t3,resolveTo:n3}}}}function t3(e,t,a){const i=this;let l=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const f=i.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return h;function h(f){if(!u||!u._balanced)return a(f);const p=ma(i.sliceSerialize({start:u.end,end:i.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?a(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function n3(e,t){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[e[a+1],e[a+2],["enter",i,t],e[a+3],e[a+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(a,e.length-a+1,...h),e}function a3(e,t,a){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,u;return h;function h(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),f}function f(b){return b!==94?a(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(b){if(o>999||b===93&&!u||b===null||b===91||bt(b))return a(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return l.includes(ma(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):a(b)}return bt(b)||(u=!0),o++,e.consume(b),b===92?y:p}function y(b){return b===91||b===92||b===93?(e.consume(b),o++,p):p(b)}}function r3(e,t,a){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,u=0,h;return f;function f(N){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(N){return N===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):a(N)}function y(N){if(u>999||N===93&&!h||N===null||N===91||bt(N))return a(N);if(N===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return o=ma(i.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return bt(N)||(h=!0),u++,e.consume(N),N===92?b:y}function b(N){return N===91||N===92||N===93?(e.consume(N),u++,y):y(N)}function x(N){return N===58?(e.enter("definitionMarker"),e.consume(N),e.exit("definitionMarker"),l.includes(o)||l.push(o),Xe(e,w,"gfmFootnoteDefinitionWhitespace")):a(N)}function w(N){return t(N)}}function i3(e,t,a){return e.check(Wl,t,e.attempt(Zj,t,a))}function s3(e){e.exit("gfmFootnoteDefinition")}function l3(e,t,a){const i=this;return Xe(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):a(o)}}function o3(e){let a=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:l};return a==null&&(a=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,h){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let p=f;for(;p--;)if(u[p][0]==="exit"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[p][1].end.offset-u[p][1].start.offset){u[f][1].type="strikethroughSequence",u[p][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},u[p][1].start),end:Object.assign({},u[f][1].end)},b={type:"strikethroughText",start:Object.assign({},u[p][1].end),end:Object.assign({},u[f][1].start)},x=[["enter",y,h],["enter",u[p][1],h],["exit",u[p][1],h],["enter",b,h]],w=h.parser.constructs.insideSpan.null;w&&$n(x,x.length,0,Xc(w,u.slice(p+1,f),h)),$n(x,x.length,0,[["exit",b,h],["enter",u[f][1],h],["exit",u[f][1],h],["exit",y,h]]),$n(u,p-1,f-p+3,x),f=p+x.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function o(u,h,f){const p=this.previous,y=this.events;let b=0;return x;function x(N){return p===126&&y[y.length-1][1].type!=="characterEscape"?f(N):(u.enter("strikethroughSequenceTemporary"),w(N))}function w(N){const A=ws(p);if(N===126)return b>1?f(N):(u.consume(N),b++,w);
vendor: 4,732 bytes, line 378
378if(b<2&&!a)return f(N);const _=u.exit("strikethroughSequenceTemporary"),C=ws(N);return _._open=!C||C===2&&!!A,_._close=!A||A===2&&!!C,h(N)}}}class c3{constructor(){this.map=[]}add(t,a,i){u3(this,t,a,i)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let a=this.map.length;const i=[];for(;a>0;)a-=1,i.push(t.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),t.length=this.map[a][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const o of l)t.push(o);l=i.pop()}this.map.length=0}}function u3(e,t,a,i){let l=0;if(!(a===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=a,e.map[l][2].push(...i);return}l+=1}e.map.push([t,a,i])}}function d3(e,t){let a=!1;const i=[];for(;t<e.length;){const l=e[t];if(a){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(a=!0);t+=1}return i}function h3(){return{flow:{null:{name:"table",tokenize:f3,resolveAll:m3}}}}function f3(e,t,a){const i=this;let l=0,o=0,u;return h;function h(E){let G=i.events.length-1;for(;G>-1;){const z=i.events[G][1].type;if(z==="lineEnding"||z==="linePrefix")G--;else break}const D=G>-1?i.events[G][1].type:null,U=D==="tableHead"||D==="tableRow"?O:f;return U===O&&i.parser.lazy[i.now().line]?a(E):U(E)}function f(E){return e.enter("tableHead"),e.enter("tableRow"),p(E)}function p(E){return E===124||(u=!0,o+=1),y(E)}function y(E){return E===null?a(E):Ce(E)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),w):a(E):qe(E)?Xe(e,y,"whitespace")(E):(o+=1,u&&(u=!1,l+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),u=!0,y):(e.enter("data"),b(E)))}function b(E){return E===null||E===124||bt(E)?(e.exit("data"),y(E)):(e.consume(E),E===92?x:b)}function x(E){return E===92||E===124?(e.consume(E),b):b(E)}function w(E){return i.interrupt=!1,i.parser.lazy[i.now().line]?a(E):(e.enter("tableDelimiterRow"),u=!1,qe(E)?Xe(e,N,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):N(E))}function N(E){return E===45||E===58?_(E):E===124?(u=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),A):Q(E)}function A(E){return qe(E)?Xe(e,_,"whitespace")(E):_(E)}function _(E){return E===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),C):E===45?(o+=1,C(E)):E===null||Ce(E)?B(E):Q(E)}function C(E){return E===45?(e.enter("tableDelimiterFiller"),T(E)):Q(E)}function T(E){return E===45?(e.consume(E),T):E===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(E))}function j(E){return qe(E)?Xe(e,B,"whitespace")(E):B(E)}function B(E){return E===124?N(E):E===null||Ce(E)?!u||l!==o?Q(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):Q(E)}function Q(E){return a(E)}function O(E){return e.enter("tableRow"),V(E)}function V(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),V):E===null||Ce(E)?(e.exit("tableRow"),t(E)):qe(E)?Xe(e,V,"whitespace")(E):(e.enter("data"),ee(E))}function ee(E){return E===null||E===124||bt(E)?(e.exit("data"),V(E)):(e.consume(E),E===92?q:ee)}function q(E){return E===92||E===124?(e.consume(E),ee):ee(E)}}function m3(e,t){let a=-1,i=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],h=!1,f=0,p,y,b;const x=new c3;for(;++a<e.length;){const w=e[a],N=w[1];w[0]==="enter"?N.type==="tableHead"?(h=!1,f!==0&&(Tb(x,t,f,p,y),y=void 0,f=0),p={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(a,0,[["enter",p,t]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(i=!0,b=void 0,o=[0,0,0,0],u=[0,a+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(a,0,[["enter",y,t]])),l=N.type==="tableDelimiterRow"?2:y?3:1):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],b=fc(x,t,o,l,void 0,b),o=[0,0,0,0]),u[2]=a)):N.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(u[0]=u[1],b=fc(x,t,o,l,void 0,b)),o=u,u=[o[1],a,0,0])):N.type==="tableHead"?(h=!0,f=a):N.type==="tableRow"||N.type==="tableDelimiterRow"?(f=a,o[1]!==0?(u[0]=u[1],b=fc(x,t,o,l,a,b)):u[1]!==0&&(b=fc(x,t,u,l,a,b)),l=0):l&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(u[3]=a)}for(f!==0&&Tb(x,t,f,p,y),x.consume(t.events),a=-1;++a<t.events.length;){const w=t.events[a];
378w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=d3(t.events,a))}return e}function fc(e,t,a,i,l,o){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",h="tableContent";a[0]!==0&&(o.end=Object.assign({},cs(t.events,a[0])),e.add(a[0],0,[["exit",o,t]]));const f=cs(t.events,a[1]);if(o={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(a[1],0,[["enter",o,t]]),a[2]!==0){const p=cs(t.events,a[2]),y=cs(t.events,a[3]),b={type:h,start:Object.assign({},p),end:Object.assign({},y)};if(e.add(a[2],0,[["enter",b,t]]),i!==2){const x=t.events[a[2]],w=t.events[a[3]];if(x[1].end=Object.assign({},w[1].end),x[1].type="chunkText",x[1].contentType="text",a[3]>a[2]+1){const N=a[2]+1,A=a[3]-a[2]-1;e.add(N,A,[])}}e.add(a[3]+1,0,[["exit",b,t]])}return l!==void 0&&(o.end=Object.assign({},cs(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function Tb(e,t,a,i,l){const o=[],u=cs(t.events,a);l&&(l.end=Object.assign({},u),o.push(["exit",l,t])),i.end=Object.assign({},u),o.push(["exit",i,t]),e.add(a+1,0,o)}function cs(e,t){const a=e[t],i=a[0]==="enter"?"start":"end";return a[1][i]}const p3={name:"tasklistCheck",tokenize:y3};function g3(){return{text:{91:p3}}}function y3(e,t,a){const i=this;return l;function l(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?a(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return bt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):a(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),h):a(f)}function h(f){return Ce(f)?t(f):qe(f)?e.check({tokenize:b3},t,a)(f):a(f)}}function b3(e,t,a){return Xe(e,i,"whitespace");function i(l){return l===null?a(l):t(l)}}function x3(e){return ow([Gj(),e3(),o3(e),h3(),g3()])}const w3={};function Cb(e){const t=this,a=e||w3,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(x3(a)),o.push(zj()),u.push(Pj(a))}const nm=oi("Browser",{web:()=>tn(()=>import("./web-DutTP2sn.js"),[]).then(e=>new e.BrowserWeb)}),am=Object.freeze(Object.defineProperty({__proto__:null,Browser:nm},Symbol.toStringTag,{value:"Module"})),zl=()=>It.isNativePlatform(),vr=e=>e.toLocaleDateString("en-CA",{timeZone:"America/New_York"}),qa=e=>zl()?`https://matchups.ai${e}`:e,v3=async(e,t={})=>{const{inAppBrowser:a=!0,replace:i=!0}=t;if(zl())try{a?await nm.open({url:e,presentationStyle:"popover",toolbarColor:"#050505"}):await Nl.openUrl({url:e})}catch(l){console.error("Failed to open browser:",l),window.open(e,"_blank")}else i?window.location.href=e:window.open(e,"_blank")},VO=e=>{if(!zl())return()=>{};const t=nm.addListener("browserFinished",()=>{e()});return()=>{t.then(a=>a.remove())}},Qw=J.createContext(null),mc=(e,t)=>{if(e===t)return 1;if(!e||!t)return 0;if(e.includes(t)||t.includes(e))return .9;const a=e.length>t.length?e:t,i=e.length>t.length?t:e;let l=0;for(let o=0;o<i.length&&i[o]===a[o];o++)l++;return l<4&&l<i.length*.7?0:l/a.length},vl=e=>{const t=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z\s]/g,""),a=t.split(/\s+/).filter(i=>i.length>0);return a[a.length-1]||t.replace(/\s+/g,"")},Sl=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z]/g,"");function S3({children:e}){const[t,a]=J.useState({}),[i,l]=J.useState(!1),[o,u]=J.useState(null),[h,f]=J.useState(!1),[p,y]=J.useState(null),[b,x]=J.useState(null),w=J.useCallback(async()=>{if(!(o&&Date.now()-o<300*1e3)){l(!0),y(null);try{const T=await fetch(qa("/api/odds_cache?sport=ALL"));if(!T.ok){const B=`HTTP ${T.status}: ${T.statusText}`;y(B);return}const j=await T.json();a(j.odds||{}),x({total:j.eventCount||0,cached:j.cached||!1,apiRemaining:j.apiRemaining||null}),u(Date.now()),f(!0),y(null)}catch(T){const j=T instanceof Error?T.message:"Unknown error";y(j)}finally{l(!1)}}},[o]);J.useEffect(()=>{!h&&!i&&w()},[h,i,w]);const N=J.useCallback(T=>({...T,homeTeam:T.awayTeam,awayTeam:T.homeTeam,homeOdds:T.awayOdds,awayOdds:T.homeOdds,homeSpread:T.awaySpread,awaySpread:T.homeSpread,dkHomeBetLink:T.dkAwayBetLink,dkAwayBetLink:T.dkHomeBetLink,fdHomeBetLink:T.fdAwayBetLink,fdAwayBetLink:T.fdHomeBetLink}),[]),A=J.useCallback((T,j)=>{const B=Sl(T.homeTeam),Q=Sl(j),O=vl(T.homeTeam),V=vl(j);if(B.includes(Q)||Q.includes(B)||O===V)return!1;const ee=Sl(T.awayTeam),q=vl(T.awayTeam);return!!(ee.includes(Q)||Q.includes(ee)||q===V)},[]),_=J.useCallback((T,j)=>{const B=Sl(T),Q=Sl(j),O=`${B}_${Q}`;if(t[O])return t[O];const V=`${Q}_${B}
378`;if(t[V])return N(t[V]);const ee=vl(T),q=vl(j);for(const[D,U]of Object.entries(t)){const z=D.toLowerCase(),$=z.includes(ee),P=z.includes(q);if($&&P)return A(U,T)?N(U):U}let E=null;const G=.75;for(const[D,U]of Object.entries(t)){const z=D.toLowerCase().split("_");if(z.length!==2)continue;const $=(mc(B,z[0])+mc(Q,z[1]))/2,P=(mc(B,z[1])+mc(Q,z[0]))/2,te=P>$,fe=Math.max($,P);fe>=G&&(!E||fe>E.score)&&(E={key:D,odds:U,score:fe,flipped:te})}return E?E.flipped?N(E.odds):E.odds:null},[t,N,A]),C=J.useMemo(()=>({getOddsForGame:_,oddsCache:t,isLoading:i,lastFetched:o,refreshAllOdds:w,hasFetched:h,fetchError:p,oddsStats:b}),[_,t,i,o,w,h,p,b]);return d.jsx(Qw.Provider,{value:C,children:e})}function tu(){const e=J.useContext(Qw);if(!e)throw new Error("useOdds must be used within an OddsProvider");return e}function E3(e,t){const{getOddsForGame:a}=tu();return J.useMemo(()=>a(e,t),[a,e,t])}const pc={ATL:["#E03A3E","#C1D32F"],BOS:["#007A33","#BA9653"],BKN:["#000000","#FFFFFF"],CHA:["#1D1160","#00788C"],CHI:["#CE1141","#000000"],CLE:["#860038","#FDBB30"],DAL:["#00538C","#002B5E"],DEN:["#0E2240","#FEC524"],DET:["#C8102E","#1D42BA"],GSW:["#1D428A","#FFC72C"],HOU:["#CE1141","#000000"],IND:["#002D62","#FDBB30"],LAC:["#C8102E","#1D428A"],LAL:["#552583","#FDB927"],MEM:["#5D76A9","#12173F"],MIA:["#98002E","#F9A01B"],MIL:["#00471B","#EEE1C6"],MIN:["#0C2340","#236192"],NOP:["#0C2340","#C8102E"],NYK:["#006BB6","#F58426"],OKC:["#007AC1","#EF6C00"],ORL:["#0077C0","#C4CED4"],PHI:["#006BB6","#ED174C"],PHX:["#1D1160","#E56020"],POR:["#E03A3E","#000000"],SAC:["#5A2D81","#63727A"],SAS:["#C4CED4","#000000"],TOR:["#CE1141","#000000"],UTA:["#002B5C","#00471B"],WAS:["#002B5C","#E31837"],ARI:["#97233F","#000000"],BAL:["#241773","#000000"],BUF:["#00338D","#C60C30"],CAR:["#0085CA","#101820"],CIN:["#FB4F14","#000000"],GB:["#203731","#FFB612"],JAX:["#006778","#9F792C"],KC:["#E31837","#FFB81C"],LV:["#A5ACAF","#000000"],LAR:["#003594","#FFA300"],NE:["#002244","#C60C30"],NO:["#D3BC8D","#101820"],NYG:["#0B2265","#A71930"],NYJ:["#125740","#000000"],PIT:["#FFB612","#101820"],SF:["#AA0000","#B3995D"],SEA:["#002244","#69BE28"],TB:["#D50A0A","#FF7900"],TEN:["#0C2340","#4B92DB"],VGK:["#B4975A","#333F42"],COL:["#6F263D","#236192"],CBJ:["#002654","#CE1141"],NSH:["#FFB81C","#041E42"],NJD:["#CE1141","#000000"],NYI:["#00539B","#F47D30"],NYR:["#0038A8","#CE1141"],OTT:["#C52032","#C2912C"],SJS:["#006D75","#EA7200"],STL:["#002F87","#FCB514"],TBL:["#002868","#FFFFFF"],VAN:["#00205B","#00843D"],WPG:["#041E42","#004C97"],CGY:["#D2001C","#FAAF19"],EDM:["#041E42","#FF4C00"],FLA:["#041E42","#C8102E"],MTL:["#AF1E2D","#192168"],WSH:["#C8102E","#041E42"],CHC:["#0E3386","#CC3433"],CWS:["#27251F","#C4CED4"],CHW:["#27251F","#C4CED4"],LAD:["#005A9C","#EF3E42"],LAA:["#BA0021","#003263"],NYM:["#002D72","#FF5910"],NYY:["#003087","#C4CED4"],SD:["#2F241D","#FFC425"],TEX:["#003278","#C0111F"],OAK:["#003831","#EFB21E"],AUB:["#0C2340","#E87722"],BAMA:["#9E1B32","#828A8F"],ARK:["#9D2235","#000000"],FLO:["#0021A5","#FA4616"],UGA:["#BA0C2F","#000000"],UF:["#0021A5","#FA4616"],KENT:["#0033A0","#FFFFFF"],LSU:["#461D7C","#FDD023"],MSST:["#660000","#FFFFFF"],MISS:["#CE1126","#14213D"],MIZ:["#F1B82D","#000000"],OKLA:["#841617","#FDF9D8"],SCAR:["#73000A","#000000"],TENN:["#FF8200","#58595B"],TXAM:["#500000","#FFFFFF"],VANDY:["#CFAE70","#000000"],ILL:["#E84A27","#13294B"],IOWA:["#FFCD00","#000000"],MARY:["#E03A3E","#FFD520"],MICH:["#00274C","#FFCB05"],MSU:["#18453B","#FFFFFF"],NEB:["#E41C38","#000000"],NW:["#4E2A84","#000000"],OSU:["#BB0000","#666666"],PSU:["#041E42","#FFFFFF"],PUR:["#CEB888","#000000"],RUTG:["#CC0033","#5F6A72"],WISC:["#C5050C","#000000"],MINN:["#7A0019","#FFCD00"],ORE:["#154733","#FEE123"],UCLA:["#2D68C4","#F2A900"],USC:["#990000","#FFC72C"],WASH:["#4B2E83","#E8D3A2"],ARIZ:["#CC0033","#003366"],ASU:["#8C1D40","#FFC627"],BAY:["#154734","#FFB81C"],BYU:["#002E5D","#FFFFFF"],UCF:["#BA9B37","#000000"],UCO:["#CFB87C","#000000"],CINC:["#E00122","#000000"],ISU:["#C8102E","#F1BE48"],KU:["#0051BA","#E8000D"],KSU:["#512888","#FFFFFF"],OKST:["#FF6600","#000000"],TCU:["#4D1979","#A3A9AC"],TTU:["#CC0000","#000000"],WVU:["#002855","#EAAA00"],UTAH:["#CC0000","#000000"],COLO:["#CFB87C","#000000"],HOUST:["#C8102E","#FFFFFF"],BC:["#98002E","#BC9B6A"],CLEM:["#F56600","#522D80"],DUKE:["#003087","#FFFFFF"],FSU:["#782F40","#CEB888"],GT:["#B3A369","#003057"],LOU:["#AD0000","#000000"],UNC:["#7BAFD4","#13294B"],NCST:["#CC0000","#000000"],ND:["#0C2340","#C99700"],PITT:["#003594","#FFB81C"],SMU:["#CC0035","#0038A8"],CUSE:["#F76900","#002D62"],UVA:["#232D4B","#F84C1E"],VT:["#630031","#CF4420"],WAKE:["#9E7E38","#000000"],ECU:["#592A8A","#FFC72C"],MEM2:["#003087","#898D8D"],NAVY:["#00205B","#C5B783"],RICE:["#003DA5","#C1C6C8"],TLNE:["#006747","#418FDE"],TULN:["#00573F","#87CEEB"],USF:["#006747","#CFC493"],TEMP:["#9D2235","#000000"],BSU:["#0033A0","#D64309"],CSU:["#1E4D2B","#C8C372"],FRES:["#DB0032","#13294B"],SDSU:["#A6192E","#000000"],UNLV:["#CF0A2C","#666666"],USU:["#0F2439","#FFFFFF"],WYO:["#492F24","#FFC425"],GONZ:["#002967","#C8102E"],SDIEGO:["#002855","#97D4E9"],LMU:["#8B2332","#2C5F7C"],MARQ:["#003087","#FFCD00"],XAVI:["#002D62","#9EA2A2"],CONN:["#000E2F","#FFFFFF"],UCONN:["#000E2F","#FFFFFF"],VILL:["#003087","#13294B"],CREIG:["#005CA9","#FFFFFF"],PROV:["#000000","#A5ACAF"],STJO:["#CE1141","#FFFFFF"],DPAU:["#005EB8","#E4002B"],HARV:["#A51C30","#000000"],YALE:["#00356B","#FFFFFF"],PRIN:["#E77500","#000000"],COLM:["#9BCBEB","#002B7F"],PENN:["#011F5B","#990000"],CORN:["#B31B1B","#FFFFFF"],ARMY:["#000000","#D3BC8D"],COLG:["#862633","#FFFFFF"],JVST:["#003DA5","#FFFFFF"],ALCN:["#512888","#F1AB00"],MILW:["#000000","#FFD700"],IUIN:["#AE0C20","#000000"],SFA:["#3F2587","#FFFFFF"],TARL:["#582C83","#FFFFFF"],GTWN:["#041E42","#8D817B"],WICH:["#000000","#FFCD00"],DRKE:["#004477","#F
378FFFFF"],BRAD:["#C8102E","#FFFFFF"],IND2:["#9D2235","#000000"],LOYC:["#6C0633","#FDB515"],GMAS:["#006633","#FFCC33"],GMU:["#006633","#FFCC33"],GMASON:["#006633","#FFCC33"],GW:["#033C5A","#AA9868"],GWASH:["#033C5A","#AA9868"],GWU:["#033C5A","#AA9868"],SJU:["#9E1B32","#A7A8AA"],STJOS:["#9E1B32","#A7A8AA"],STJOE:["#9E1B32","#A7A8AA"],EIU:["#004B83","#9EA2A2"],EILL:["#004B83","#9EA2A2"],BUTL:["#13294B","#c8c7c7"],BUT:["#13294B","#c8c7c7"],HALL:["#004488","#A2AAAD"],SETON:["#004488","#A2AAAD"],SHU:["#004488","#A2AAAD"],DAY:["#CE1141","#004B8D"],DAYT:["#CE1141","#004B8D"],VCU:["#000000","#FFB300"],URI:["#75B2DD","#002147"],DAV:["#BF0C26","#000000"],DAVIDSON:["#BF0C26","#000000"],RICH:["#000066","#990000"],RICHM:["#000066","#990000"],FORD:["#860038","#FFFFFF"],FORDHAM:["#860038","#FFFFFF"],LASAL:["#003366","#FFCC00"],LASALLE:["#003366","#FFCC00"],SLU:["#003DA5","#FFFFFF"],STLOU:["#003DA5","#FFFFFF"],UMASS:["#971B2F","#FFFFFF"],MASS:["#971B2F","#FFFFFF"],DUQ:["#041E42","#FFFFFF"],DUQUESNE:["#041E42","#FFFFFF"],STBON:["#54261a","#fdb726"],BONA:["#54261a","#fdb726"],SMC:["#D80024","#06315B"],STMARY:["#D80024","#06315B"],STMARYS:["#D80024","#06315B"],SFDON:["#00543C","#FDBB30"],SANFRAN:["#00543C","#FDBB30"],PORT:["#1e1656","#5e6A71"],PORTL:["#1e1656","#5e6A71"],PEPP:["#00205C","#EE7624"],PEPPERDINE:["#00205C","#EE7624"],SCLAR:["#862633","#FFFFFF"],SANTACLARA:["#862633","#FFFFFF"],BELM:["#C8102E","#00205B"],BELMONT:["#C8102E","#00205B"],SAMF:["#002649","#C4161D"],SAMFORD:["#002649","#C4161D"],FUR:["#582c83","#201547"],FURM:["#582c83","#201547"],FURMAN:["#582c83","#201547"],CHAT:["#00386b","#e0aa0f"],CHATT:["#00386b","#e0aa0f"],WOF:["#886E4C","#000000"],WOFFORD:["#886E4C","#000000"],ETSU:["#041e42","#FFC72C"],NDSU:["#0A5640","#FFC72A"],NDST:["#0A5640","#FFC72A"],DENV:["#8b2332","#8b6f4b"],DENVER:["#8b2332","#8b6f4b"],ORU:["#002f60","#C5b783"],ORAL:["#002f60","#C5b783"],MUR:["#002144","#ECAC00"],MURR:["#002144","#ECAC00"],MURRAY:["#002144","#ECAC00"],UNI:["#4B116F","#FFCC00"],NOIA:["#4B116F","#FFCC00"],MONT:["#660033","#000000"],SDST2:["#0033A0","#FFD100"],USD:["#ad0000","#000000"],SDAK:["#ad0000","#000000"],NDAK:["#009A44","#000000"],IONA:["#6F2C3F","#F2A900"],FAIR:["#C8102E","#A2AAAD"],FAIRFIELD:["#C8102E","#A2AAAD"],SIEN:["#FFC72C","#006747"],SIENA:["#FFC72C","#006747"],HOF:["#0B1E73","#FEB612"],HOFSTRA:["#0B1E73","#FEB612"],RID:["#981E32","#6C6F70"],RIDER:["#981E32","#6C6F70"],QUIN:["#0C2340","#FFB81C"],QUINNIPIAC:["#0C2340","#FFB81C"],NIAG:["#5A2D81","#FFFFFF"],NIAGARA:["#5A2D81","#FFFFFF"],CANI:["#003087","#FFBF00"],CANISIUS:["#003087","#FFBF00"],MANH:["#006747","#FFFFFF"],MANHATTAN:["#006747","#FFFFFF"],MARIST:["#B31B1B","#FFFFFF"],MAR:["#B31B1B","#FFFFFF"],STPET:["#0066B3","#FFFFFF"],SAINTPETERS:["#0066B3","#FFFFFF"],SPU:["#0066B3","#FFFFFF"],UVM:["#005710","#FFC20E"],VERMONT:["#005710","#FFC20E"],UMBC:["#000000","#FFC20E"],ALB:["#46166B","#EEB211"],ALBAN:["#46166B","#EEB211"],LIP:["#331E54","#F4AA00"],LIPSCOMB:["#331E54","#F4AA00"],UNF:["#00246B","#D9D9D9"],NFLA:["#00246B","#D9D9D9"],KENN:["#FDBB30","#0B1315"],KENNESAW:["#FDBB30","#0B1315"],LIB:["#0A254E","#990000"],LIBERTY:["#0A254E","#990000"],UTEP:["#041E42","#FF8200"],TULS:["#002D72","#C8102E"],TULSA:["#002D72","#C8102E"],BROWN:["#4E3629","#ED1C24"],BRN:["#4E3629","#ED1C24"],DART:["#00693E","#FFFFFF"],DARTMOUTH:["#00693E","#FFFFFF"],BUCK:["#003B71","#E87722"],BUCKNELL:["#003B71","#E87722"],LAF:["#8C1515","#FFFFFF"],LAFAYETTE:["#8C1515","#FFFFFF"],LEH:["#653819","#FFFFFF"],LEHIGH:["#653819","#FFFFFF"],HOLYCR:["#602D89","#FFFFFF"],HOLYCROSS:["#602D89","#FFFFFF"],LOY:["#602D89","#FFFFFF"],LOYMD:["#006B3F","#FFFFFF"],BOST:["#CC0000","#FFFFFF"],BOSTONU:["#CC0000","#FFFFFF"],NAVY2:["#00205B","#C5B783"],COFC:["#7A252E","#FFFFFF"],CHARLESTON:["#7A252E","#FFFFFF"],DEL:["#00539F","#FFD100"],DELAWARE:["#00539F","#FFD100"],DREX:["#07294D","#FFC600"],DREXEL:["#07294D","#FFC600"],ELON:["#7C0A02","#9E7E38"],ELONG:["#7C0A02","#9E7E38"],HAMP:["#003C71","#FFFFFF"],HAMPTON:["#003C71","#FFFFFF"],MONM:["#003087","#7D9BC1"],MONMOUTH:["#003087","#7D9BC1"],NEAST:["#C8102E","#000000"],NORTHEASTERN:["#C8102E","#000000"],UNCW:["#006666","#FFC20E"],TOWSN:["#FFCC00","#000000"],TOWSON:["#FFCC00","#000000"],WILL:["#006747","#FFCC00"],WM:["#006747","#FFCC00"],WILLIAMMARY:["#006747","#FFCC00"],STET:["#006633","#FFFFFF"],STETSON:["#006633","#FFFFFF"],CLEV:["#006633","#C5B783"],CLEVST:["#006633","#C5B783"],DETROITMERCY:["#041E42","#C8102E"],GB2:["#004225","#C5050C"],GREENBAY:["#004225","#C5050C"],IUPUI:["#006298","#CE1141"],MIL3:["#002F65","#FFCD00"],NMKU:["#FFC82E","#000000"],NKU:["#FFC82E","#000000"],NORTHERNKENTUCKY:["#FFC82E","#000000"],OAKL:["#CFB53B","#000000"],OAKLAND:["#CFB53B","#000000"],PURFW:["#C69214","#000000"],PURDUE_FW:["#C69214","#000000"],RBRTO:["#002F5F","#E2
3781833"],RMU:["#002F5F","#E21833"],ROBERTMORRIS:["#002F5F","#E21833"],WRST:["#006747","#FFC627"],WRIGHT:["#006747","#FFC627"],WRIGHTSTATE:["#006747","#FFC627"],YSU:["#C8102E","#FFFFFF"],YOUNGSTOWN:["#C8102E","#FFFFFF"],BELL:["#DC143C","#000000"],BELLARMINE:["#DC143C","#000000"],EVAN:["#CC0033","#FFFFFF"],EVANSVILLE:["#CC0033","#FFFFFF"],ILS:["#CE1141","#FFFFFF"],ILSTU:["#CE1141","#FFFFFF"],ILLINOISST:["#CE1141","#FFFFFF"],INST:["#00539F","#FFFFFF"],INDIANAST:["#00539F","#FFFFFF"],MOST:["#8B0020","#000000"],MISSOURIST:["#8B0020","#000000"],SIU:["#8B0000","#FFFFFF"],SIUE:["#C8102E","#000000"],VAL:["#654321","#FFD700"],VALPO:["#654321","#FFD700"],VALPARAISO:["#654321","#FFD700"],KENT2:["#002664","#F0AB00"],KENTST:["#002664","#F0AB00"],APS:["#000000","#FFCC00"],APPST:["#000000","#FFCC00"],APPALACHIANST:["#000000","#FFCC00"],ARKLR:["#CC0033","#000000"],ARKANSASLR:["#CC0033","#000000"],ARST2:["#C8102E","#002F5F"],ARKANSASST:["#C8102E","#002F5F"],CCU:["#006747","#A57C52"],COASTCAR:["#006747","#A57C52"],GSU:["#0033A0","#C8102E"],GEORGIAST:["#0033A0","#C8102E"],GASOU:["#011E41","#87714D"],GEORGIASOUTHERN:["#011E41","#87714D"],JAS:["#981E32","#C5B887"],JAXST:["#981E32","#C5B887"],JACKSONVILLEST:["#981E32","#C5B887"],LATECH2:["#002F8B","#E31837"],LAMAR:["#CE1126","#FFFFFF"],LAM:["#8B0015","#FFFFFF"],LAMONROE:["#8B0015","#FFFFFF"],ULM:["#8B0015","#FFFFFF"],LALAFAYETTE:["#CE1126","#003087"],ULL:["#CE1126","#003087"],MARSH2:["#00B140","#000000"],MARSHALL2:["#00B140","#000000"],ODU:["#003057","#C1C6C8"],OLDDOM:["#003057","#C1C6C8"],OLDDOMINION:["#003057","#C1C6C8"],SHSU:["#F37321","#003B5C"],SAMHOU:["#F37321","#003B5C"],SAMHOUSTON:["#F37321","#003B5C"],SOUT:["#041E42","#CFC493"],SOUTHERN:["#041E42","#CFC493"],TXST2:["#501214","#8D734A"],TEXASST:["#501214","#8D734A"],TRY:["#8B2332","#000000"],TROYST:["#8B2332","#000000"],ABI:["#461D7C","#FFFFFF"],ABILENE:["#461D7C","#FFFFFF"],ACU:["#461D7C","#FFFFFF"],CALB:["#003087","#FFFFFF"],CALBAPTIST:["#003087","#FFFFFF"],CBU:["#003087","#FFFFFF"],GCCU:["#522D80","#FFCD00"],GCU:["#522D80","#FFCD00"],GRANDCANYON:["#522D80","#FFCD00"],NMST:["#8B0020","#000000"],NEWMEXICOST:["#8B0020","#000000"],SACRAMENTOST:["#00573F","#C4903B"],SEAUCH:["#C8102E","#FFD700"],SEATTLEU:["#C8102E","#FFD700"],SFAUSTIN:["#3F2587","#FFFFFF"],TARST:["#582C83","#FFFFFF"],TARLETON:["#582C83","#FFFFFF"],UVALL:["#165C31","#FFFFFF"],UTAHV:["#165C31","#FFFFFF"],UTAHVALLEY:["#165C31","#FFFFFF"],ESTWN:["#A81F37","#FFFFFF"],EWU:["#A81F37","#FFFFFF"],EASTERNWASH:["#A81F37","#FFFFFF"],IDST:["#F07800","#000000"],IDAHO:["#F5B800","#000000"],IDAST:["#F07800","#000000"],IDAHOST:["#F07800","#000000"],MONT2:["#660033","#000000"],MONTANA:["#660033","#000000"],MONST:["#0033A0","#FFC425"],MONTANAST:["#0033A0","#FFC425"],NAU:["#003f87","#febb12"],NORTHERNARIZONA:["#003f87","#febb12"],PORTST:["#005A31","#C0C0C0"],PORTLANDST:["#005A31","#C0C0C0"],SAC2:["#00573F","#C4903B"],SACST:["#00573F","#C4903B"],WEBB:["#4F2683","#FFFFFF"],WEBER:["#4F2683","#FFFFFF"],WEBERST:["#4F2683","#FFFFFF"],HBU:["#005DAA","#EF3D42"],HOUSTONBAPTIST:["#005DAA","#EF3D42"],INCAR:["#C8102E","#0C2340"],INCARNATEWORD:["#C8102E","#0C2340"],LMAR:["#CE1126","#FFFFFF"],LAMARLOU:["#CE1126","#FFFFFF"],MCNEE:["#FFC72C","#000000"],MCNEESE:["#FFC72C","#000000"],NICH:["#B31B1B","#FFFFFF"],NICHOLLS:["#B31B1B","#FFFFFF"],NW2:["#4E2A84","#FFFFFF"],NWST:["#4E2A84","#FFFFFF"],NORTHWESTERNST:["#4E2A84","#FFFFFF"],SELA:["#006747","#FFD100"],SOUTHEASTERNLA:["#006747","#FFD100"],TAMU:["#E41937","#000000"],TAMUCC:["#E41937","#000000"],TEXASAMCC:["#E41937","#000000"],UIW:["#C8102E","#0C2340"],ALAST:["#CC0000","#FFFFFF"],ALABAMAST:["#CC0000","#FFFFFF"],ALCSN:["#512888","#F1AB00"],ALCORNST:["#512888","#F1AB00"],ARKPB:["#8B0034","#FFFFFF"],ARKANSASPB:["#8B0034","#FFFFFF"],BETH:["#003087","#E03A3E"],BETHUNE:["#003087","#E03A3E"],FLAS:["#FA4616","#002147"],FLORIDAAM:["#FA4616","#002147"],FAMU:["#FA4616","#002147"],GRAM2:["#FDB515","#000000"],GRAMBLING2:["#FDB515","#000000"],JKST2:["#003DA5","#FFFFFF"],JACKSONST:["#003DA5","#FFFFFF"],MSVS:["#003087","#FFFFFF"],MSVST:["#003087","#FFFFFF"],MISSISSIPPIVALLEYST:["#003087","#FFFFFF"],PRAIR:["#660033","#FFCC00"],PRAIRIEVIEW:["#660033","#FFCC00"],PVAM:["#660033","#FFCC00"],SOUT2:["#0038A8","#FFC72C"],SOUTHERNMS:["#0038A8","#FFC72C"],TXSO:["#8B1A1A","#5C5C5C"],TEXASSOUTHERN:["#8B1A1A","#5C5C5C"],TSU:["#8B1A1A","#5C5C5C"],COPP:["#990000","#94B2D7"],COPPINST:["#990000","#94B2D7"],DEL2:["#00539F","#FFD100"],DELAWAREST:["#00539F","#FFD100"],DSU:["#00539F","#FFD100"],HOW:["#003A63","#E51937"],HOWARD:["#003A63","#E51937"],MDES:["#005A31","#FFB81C"],MDEASTERNSHORE:["#005A31","#FFB81C"],UMES:["#005A31","#FFB81C"],MORG:["#F47321","#003087"],MORGAN:["#F47321","#003087"],MORGANST:["#F47321","#003087"],NCCU:["#8B0020","#8B8682"],NCCENT:["#8B0020","#8B8682"],NCCENTRALL:["#8B0020","#8B8682"],NCAT:["#005035","#FFCD00"],NCAT2:["#005035","#FFCD00"],NCAAT:["#005035","#FFCD00"],NORF:["#007A3D","#FFCB05"],NORFOLK:["#007A3D","#FFCB05"],NSU:["#007A3D","#FFCB05"],SCST:["#7C2529","#FFD700"],SOUTHCAROLINAST:["#7C2529","#FFD700"],CAMP:["#F47920","#2C2A29"],CAMPBELL:["#F47920","#2C2A29"],CHSO:["#003DA5","#CC0000"],CHARLESTONSOUTHERN:["#003DA5","#CC0000"],GARD:["#C8102E","#000000"],GARDNER:["#C8102E","#000000"],GARDNERWEBB:["#C8102E","#000000"],HIGH:["#3300
37872","#FFFFFF"],HIGHPOINT:["#330072","#FFFFFF"],HPU:["#330072","#FFFFFF"],LONG:["#003A70","#E03C31"],LONGWOOD:["#003A70","#E03C31"],PRES:["#041E42","#EE7125"],PRESBYTERIAN:["#041E42","#EE7125"],RAD:["#CC0000","#000000"],RADFORD:["#CC0000","#000000"],USCUP:["#6A1E2E","#FFFFFF"],USCUPSTATE:["#6A1E2E","#FFFFFF"],WINTH:["#872434","#FFCC33"],WINTHROP:["#872434","#FFCC33"],APSU:["#BA0C2F","#000000"],AUSTINPEAY:["#BA0C2F","#000000"],BELM2:["#C8102E","#00205B"],EILL2:["#004B83","#9EA2A2"],EASTERNILLINOIS:["#004B83","#9EA2A2"],EKY:["#8B0020","#FFFFFF"],EKU:["#8B0020","#FFFFFF"],EASTERNKENTUCKY:["#8B0020","#FFFFFF"],LNWD:["#003A70","#E03C31"],LINDENWOOD:["#003A70","#E03C31"],MORE:["#003087","#FFC72C"],MOREHEAD:["#003087","#FFC72C"],MOREHEADST:["#003087","#FFC72C"],MURR2:["#002144","#ECAC00"],MURRAYST:["#002144","#ECAC00"],SEMO:["#C8102E","#000000"],SOUTHEASTMISSOURI:["#C8102E","#000000"],SIUE2:["#C8102E","#000000"],SIUEDWARDSVILLE:["#C8102E","#000000"],TNMT:["#003087","#DC143C"],TNTECH:["#003087","#DC143C"],TENNESSEETECH:["#003087","#DC143C"],TNST:["#0C2340","#5D92C4"],TENNESSEEST:["#0C2340","#5D92C4"],UTM:["#003087","#E87722"],UTMARTIN:["#003087","#E87722"],AUS:["#C8102E","#FFFFFF"],AUSTY:["#C8102E","#FFFFFF"],AUSTINPEAY2:["#C8102E","#FFFFFF"],CENT:["#005035","#FFD100"],CENTRALAR:["#005035","#FFD100"],EKU2:["#8B0020","#FFFFFF"],FGCU:["#006E51","#0067B1"],FLORIDAGULFCOAST:["#006E51","#0067B1"],JAXU:["#003087","#FFFFFF"],JACKSONVILLE:["#003087","#FFFFFF"],QUEENS:["#002D5A","#BC955C"],STET2:["#006633","#FFFFFF"],BRY:["#6E4A1F","#FFFFFF"],BRYANT:["#6E4A1F","#FFFFFF"],CCSU:["#003087","#FFFFFF"],CENTRALCONN:["#003087","#FFFFFF"],FDU:["#003B71","#8B1A1A"],FAIRDICKINSON:["#003B71","#8B1A1A"],LIU:["#003366","#998542"],LONGISLAND:["#003366","#998542"],MERR:["#003087","#FFFFFF"],MERRIMACK:["#003087","#FFFFFF"],MT:["#002B5C","#C8102E"],MOUNTSTMARYS:["#002B5C","#C8102E"],SAC3:["#003087","#FFFFFF"],SACREDHEART:["#003087","#FFFFFF"],SFBK:["#C8102E","#FFFFFF"],SFBROOKLYN:["#C8102E","#FFFFFF"],STFRANCISNY:["#C8102E","#FFFFFF"],SFPA:["#C8102E","#FFFFFF"],STFRANCISPA:["#C8102E","#FFFFFF"],WAG:["#003366","#006747"],WAGNER:["#003366","#006747"],BING:["#005A43","#FFFFFF"],BINGHAMTON:["#005A43","#FFFFFF"],MAINE:["#003263","#8E9AA9"],MASS2:["#971B2F","#FFFFFF"],UMASSLOWELL:["#005A8B","#FFFFFF"],UML:["#005A8B","#FFFFFF"],NHMP:["#003087","#FFFFFF"],NEWHAMPSHIRE:["#003087","#FFFFFF"],UNH:["#003087","#FFFFFF"],STON:["#990000","#CCCCCC"],STONYBROOK:["#990000","#CCCCCC"],NJIT:["#D9272E","#0C2340"],NIA:["#5A2D81","#FFFFFF"],CAN:["#003087","#FFBF00"],MAN:["#006747","#FFFFFF"],MRST:["#B31B1B","#FFFFFF"],MSM:["#002B5C","#C8102E"],SIE:["#FFC72C","#006747"],BOI:["#0033A0","#D64309"],DRA:["#004477","#FFFFFF"],EVA:["#CC0033","#FFFFFF"],ELO:["#7C0A02","#9E7E38"],MRMK:["#003087","#FFFFFF"],MERC:["#F37321","#000000"],CITAD:["#6CADDF","#FFFFFF"],VMI:["#C8102E","#FFC72C"],WCAR:["#592A8A","#C3953D"],UNCG:["#003087","#FFC72C"],ILST:["#CE1141","#FFFFFF"],DETM:["#041E42","#C8102E"],BU:["#CC0000","#FFFFFF"],AMER:["#C8102E","#002B7F"],SALA:["#003E7E","#CE1141"],UNA:["#4E008E","#FFCC00"],UCA:["#4F2D7F","#A7A7A7"],CHST:["#006633","#FFFFFF"],WGEO:["#CC0000","#002244"],IU:["#990000","#FFFFFF"],MRCY:["#006747","#FFFFFF"],NHVN:["#003087","#FFD100"],SEAT:["#C8102E","#FFD700"],STAN:["#8C1515","#FFFFFF"],LR:["#8B0020","#B3B3B3"],LBST:["#000000","#FFC72C"],UCI:["#0064A4","#FFD200"],CSUN:["#CE1141","#000000"],LEMO:["#006633","#FFFFFF"],PAC:["#F47920","#000000"],SACR:["#CE1141","#A7A8AA"],UTA2:["#0064B1","#F47321"],UNCA:["#003DA5","#FFFFFF"],TAMCC:["#E41937","#000000"],UVU:["#165C31","#FFFFFF"],COLST:["#1E4D2B","#C8C372"],COST:["#1E4D2B","#C8C372"],AUBUR:["#0C2340","#E87722"],AUBRN:["#0C2340","#E87722"],BOISE:["#0033A0","#D64309"],SDST:["#A6192E","#000000"],UTST:["#0F2439","#FFFFFF"],FRNO:["#DB0032","#13294B"],NMEX:["#BA0C2F","#63666A"],NMSU:["#8B0020","#000000"],SJSU:["#0055A2","#E5A823"],HAWAI:["#024731","#000000"],HAW:["#024731","#000000"],ALA:["#9E1B32","#828A8F"],MSSP:["#660000","#FFFFFF"],OLEMISS:["#CE1126","#14213D"],OLE:["#CE1126","#14213D"],TXST:["#501214","#8D734A"],UTSA:["#0C2340","#F47321"],MTSU:["#0066CC","#000000"],WKU:["#B01E24","#000000"],FIU:["#081E3F","#B6862C"],FAU:["#003366","#CC0000"],UAB:["#1E6B52","#FFD100"],CHAR:["#00703C","#FFFFFF"],NTEX:["#00853E","#FFFFFF"],UNT:["#00853E","#FFFFFF"],LATECH:["#002F8B","#E31837"],LT:["#002F8B","#E31837"],MARSH:["#00B140","#000000"],JMAD:["#450084","#CBB677"],JMU:["#450084","#CBB677"],APP:["#000000","#FFCC00"],GASO:["#011E41","#87714D"],TROY:["#8B2332","#000000"],ARST:["#8C1D40","#F
378FC627"],SAM:["#F37321","#003B5C"],JKST:["#003DA5","#FFFFFF"],GRAM:["#FDB515","#000000"],SOUM:["#0038A8","#FFC72C"],BALL:["#BA0C2F","#FFFFFF"],KNST:["#002664","#F0AB00"],AKRON:["#041E42","#8D734A"],AKR:["#041E42","#8D734A"],BGSU:["#4F2C1D","#FF7300"],EMICH:["#006747","#FFFFFF"],EMU:["#006747","#FFFFFF"],CMICH:["#6A0032","#FFC82E"],CMU:["#6A0032","#FFC82E"],WMICH:["#362115","#B59966"],WMU:["#362115","#B59966"],NIU:["#BA0C2F","#000000"],OHIO:["#00694E","#FFFFFF"],TOLDO:["#003E7E","#FFD200"],TOL:["#003E7E","#FFD200"],BUFF:["#005BBB","#FFFFFF"],MIAMI:["#B61E2E","#FFFFFF"],ETAMU:["#461D7C","#FFD700"],UTRGV:["#F15A22","#003F87"],SFAX:["#3F2587","#FFFFFF"],UNO:["#003DA5","#C8C9C7"]},N3=e=>{const t=e.replace("#",""),a=parseInt(t.substring(0,2),16)/255,i=parseInt(t.substring(2,4),16)/255,l=parseInt(t.substring(4,6),16)/255,o=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4),h=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return .2126*o+.7152*u+.0722*h},k3={NBA:{ATL:["#E03A3E","#C1D32F"],BOS:["#007A33","#BA9653"],BKN:["#000000","#FFFFFF"],CHA:["#1D1160","#00788C"],CHI:["#CE1141","#000000"],CLE:["#860038","#FDBB30"],DAL:["#00538C","#002B5E"],DEN:["#0E2240","#FEC524"],DET:["#C8102E","#1D42BA"],GSW:["#1D428A","#FFC72C"],HOU:["#CE1141","#000000"],IND:["#002D62","#FDBB30"],LAC:["#C8102E","#1D428A"],LAL:["#552583","#FDB927"],MEM:["#5D76A9","#12173F"],MIA:["#98002E","#F9A01B"],MIL:["#00471B","#EEE1C6"],MIN:["#0C2340","#236192"],NOP:["#0C2340","#C8102E"],NYK:["#006BB6","#F58426"],OKC:["#007AC1","#EF6C00"],ORL:["#0077C0","#C4CED4"],PHI:["#006BB6","#ED174C"],PHX:["#1D1160","#E56020"],POR:["#E03A3E","#000000"],SAC:["#5A2D81","#63727A"],SAS:["#C4CED4","#000000"],TOR:["#CE1141","#000000"],UTA:["#002B5C","#00471B"],WAS:["#002B5C","#E31837"]},NFL:{ARI:["#97233F","#000000"],ATL:["#A71930","#000000"],BAL:["#241773","#000000"],BUF:["#00338D","#C60C30"],CAR:["#0085CA","#101820"],CHI:["#0B162A","#C83803"],CIN:["#FB4F14","#000000"],CLE:["#311D00","#FF3C00"],DAL:["#003594","#869397"],DEN:["#FB4F14","#002244"],DET:["#0076B6","#B0B7BC"],GB:["#203731","#FFB612"],HOU:["#03202F","#A71930"],IND:["#002C5F","#A2AAAD"],JAX:["#006778","#9F792C"],KC:["#E31837","#FFB81C"],LAC:["#0080C6","#FFC20E"],LAR:["#003594","#FFA300"],LV:["#A5ACAF","#000000"],MIA:["#008E97","#FC4C02"],MIN:["#4F2683","#FFC62F"],NE:["#002244","#C60C30"],NO:["#D3BC8D","#101820"],NYG:["#0B2265","#A71930"],NYJ:["#125740","#000000"],PHI:["#004C54","#A5ACAF"],PIT:["#FFB612","#101820"],SEA:["#002244","#69BE28"],SF:["#AA0000","#B3995D"],TB:["#D50A0A","#FF7900"],TEN:["#0C2340","#4B92DB"],WAS:["#5A1414","#FFB612"]},NHL:{ANA:["#F47A38","#B5985A"],BOS:["#FFB81C","#000000"],BUF:["#003087","#FFB81C"],CAR:["#CE1141","#000000"],CGY:["#D2001C","#FAAF19"],CHI:["#CF0A2C","#000000"],COL:["#6F263D","#236192"],CBJ:["#002654","#CE1141"],DAL:["#006847","#8F8F8C"],DET:["#CE1141","#FFFFFF"],EDM:["#041E42","#FF4C00"],FLA:["#041E42","#C8102E"],LAK:["#111111","#A2AAAD"],LA:["#111111","#A2AAAD"],MIN:["#154734","#A6192E"],MTL:["#AF1E2D","#192168"],NSH:["#FFB81C","#041E42"],NJD:["#CE1141","#000000"],NYI:["#00539B","#F47D30"],NYR:["#0038A8","#CE1141"],OTT:["#C52032","#C2912C"],PHI:["#F74902","#000000"],PIT:["#FCB514","#000000"],SEA:["#001628","#99D9D9"],SJS:["#006D75","#EA7200"],STL:["#002F87","#FCB514"],TB:["#002868","#FFFFFF"],TBL:["#002868","#FFFFFF"],TOR:["#00205B","#FFFFFF"],UTA:["#6CACE4","#010101"],VAN:["#00205B","#00843D"],VGK:["#B4975A","#333F42"],WPG:["#041E42","#004C97"],WSH:["#C8102E","#041E42"],WAS:["#C8102E","#041E42"]},MLB:{ARI:["#A71930","#E3D4AD"],ATL:["#CE1141","#13274F"],BAL:["#DF4601","#000000"],BOS:["#BD3039","#0C2340"],CHC:["#0E3386","#CC3433"],CWS:["#27251F","#C4CED4"],CHW:["#27251F","#C4CED4"],CIN:["#C6011F","#000000"],CLE:["#00385D","#E31937"],COL:["#333366","#C4CED4"],DET:["#0C2340","#FA4616"],HOU:["#002D62","#EB6E1F"],KC:["#004687","#BD9B60"],LAA:["#BA0021","#003263"],LAD:["#005A9C","#EF3E42"],MIA:["#00A3E0","#EF3340"],MIL:["#FFC52F","#12284B"],MIN:["#002B5C","#D31145"],NYM:["#002D72","#FF5910"],NYY:["#003087","#C4CED4"],OAK:["#003831","#EFB21E"],PHI:["#E81828","#002D72"],PIT:["#27251F","#FDB827"],SD:["#2F241D","#FFC425"],SF:["#FD5A1E","#27251F"],SEA:["#0C2
378C56","#005C5C"],STL:["#C41E3A","#0C2340"],TB:["#092C5C","#8FBCE6"],TEX:["#003278","#C0111F"],TOR:["#134A8E","#E8291C"],WSH:["#AB0003","#14225A"],WAS:["#AB0003","#14225A"]}},Ga=(e,t)=>{const a=(e||"").toUpperCase().trim();if(!a)return["#1a1a1a","#111111"];if(t){const i=t.toUpperCase(),l=k3[i];if(l!=null&&l[a])return l[a]}if(pc[a])return pc[a];for(const i of[4,3]){const l=a.substring(0,i);if(pc[l])return pc[l]}return["#1a1a1a","#111111"]},Xi=e=>{const t=N3(e);let a;t<.1?a=.4+(.1-t)*.8:t<.2?a=.32+(.2-t)*.8:t<.4?a=.22+(.4-t)*.5:a=.15+(t-.4)*.12,a=Math.max(.15,Math.min(.5,a));const i=Math.round(a*255).toString(16).padStart(2,"0");return`linear-gradient(135deg, ${e}${i} 0%, transparent 70%)`};function A3(e){if(!e)return"";let t=e;t=t.replace(/<br\s*\/?>\s*<br\s*\/?>/gi,`
379
380`),t=t.replace(/<br\s*\/?>/gi,`
381`),t=t.replace(/([^\n])\s*## /g,`$1
382
383## `),t=t.replace(/^(## [^\n]{5,80}?\))\s+([A-Z])/gm,`$1
384
385$2`);const a=["Executive Summary","Final Prediction","Conclusion","Overview","Key Takeaways?","Introduction","Summary","Prediction","Background","Methodology","Injury Report","Pace (?:&|&amp;) Tempo Analysis",'The "X-Factor" Variable',"The X-Factor Variable","The X Factor"].join("|");t=t.replace(new RegExp(`^(## (?:${a}))\\s+([A-Z])`,"gm"),`$1
386
387$2`);const i=t.split(`
388`),l=[];for(const o of i)if(o.startsWith("## ")&&o.length>100){const u=o.substring(3).split(/\s+/);let h=-1;for(let f=2;f<Math.min(u.length-1,15);f++)if(/^[A-Z]/.test(u[f])&&u[f+1]&&/^[a-z]/.test(u[f+1])&&u.slice(0,f).join(" ").length>=12){h=f;break}h>0?l.push(`## ${u.slice(0,h).join(" ")}`,"",u.slice(h).join(" ")):l.push(o)}else l.push(o);return l.join(`
389`).trim()}const _3=({isOpen:e,onClose:t,report:a,title:i,debugData:l,propsData:o,updates:u,game:h,prediction:f})=>{const p=J.useRef(null),y=J.useRef(!1),[b,x]=J.useState(!1),{getOddsForGame:w}=tu(),N=sn.useMemo(()=>A3(a),[a]),_=[...u||(l==null?void 0:l.updates)||[]].sort((F,S)=>S.timestamp-F.timestamp),C=F=>"runType"in F&&!("title"in F);if(J.useEffect(()=>{e&&!y.current&&(p.current&&(p.current.scrollTop=0),x(!1)),y.current=e},[e]),J.useEffect(()=>{const F=S=>{S.key==="Escape"&&t()};return e&&window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[e,t]),!e)return null;const T=f||l,j=!o||o.length===0,B=T==null?void 0:T.winnerId,Q=T!=null&&T.confidence?T.confidence<=1?Math.round(T.confidence*100):Math.round(T.confidence):0,O=(T==null?void 0:T.homeScorePrediction)??(T==null?void 0:T.homeScore),V=(T==null?void 0:T.awayScorePrediction)??(T==null?void 0:T.awayScore),ee=(T==null?void 0:T.keyFactors)||[],q=(T==null?void 0:T.summary)||"",E=B&&h?B===h.homeTeam.id?h.homeTeam:h.awayTeam:null,G=O!==void 0&&V!==void 0?Math.abs(Math.round(O)-Math.round(V)):null,D=h?w(h.homeTeam.fullName||h.homeTeam.name,h.awayTeam.fullName||h.awayTeam.name):null,U=F=>F===void 0?0:F<=1?Math.round(F*100):Math.round(F),z=F=>{if(!h)return null;const oe=(new Date(h.date).getTime()-F)/(1e3*60*60);return oe>0?oe<1?"< 1 HOUR OUT":`${Math.round(oe)} HOURS OUT`:"LIVE / FINAL"},$=F=>{F.currentTarget.style.display="none"},P=F=>{let S=F.selection||"",de=F.analysis||"",oe=F.confidence;if(S.length>100&&(S.includes("**Analysis**:")||S.includes("Analysis:"))){const pe=S.includes("**Analysis**:")?"**Analysis**:":"Analysis:",ge=S.split(pe);S=ge[0].replace(/\*\*Selection\*\*:/g,"").trim(),!de&&ge[1]&&(de=ge[1].split("**Confidence**:")[0].trim())}return S=S.replace(/\*\*/g,"").trim(),{selection:S,analysis:de,confidence:oe,odds:F.odds}},fe=j?(F=>{const S=[],de=F.split(`
390`);let oe=!1;const pe=/\b(out|doubtful|questionable|day-to-day|probable|gtd|injured|ir|suspended|illness|concussion|hamstring|knee|ankle|shoulder|back|hip|foot|calf|groin|wrist|thumb|finger|quad|acl|mcl|rest|personal|load management)\b/i;for(const ge of de){const xe=ge.toLowerCase();if(xe.includes("injur")&&(xe.includes("#")||xe.includes("**"))){oe=!0;continue}if(oe){if(ge.startsWith("#")||ge.startsWith("**")&&!ge.startsWith("**-")&&!ge.match(/^\*\*[A-Z][a-z]/)){oe=!1;continue}const we=ge.replace(/^[-*•]\s*/,"").replace(/\*\*/g,"").trim();we.length>5&&we.length<200&&pe.test(we)&&S.push(we)}}return S.slice(0,8)})(a):[],ce=F=>F==null?"--":F>0?`+${F}`:`${F}`,R=({icon:F,title:S,badge:de,badgeColor:oe})=>d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx("span",{className:"flex items-center justify-center w-4 h-4 shrink-0",children:F}),d.jsx("span",{className:"text-white font-teko text-xl uppercase tracking-wide leading-none",children:S}),de&&d.jsx("span",{className:ae("text-xs font-bold px-2 py-0.5 rounded-full",oe||"bg-brand/20 text-brand"),children:de})]}),L=D&&(D.homeSpread!==null||D.total!==null||D.homeOdds!==null);return Yx.createPortal(d.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 bg-black/90 animate-in fade-in duration-200",onClick:F=>{F.target===F.currentTarget&&t()},children:d.jsxs("div",{className:"w-full max-w-3xl relative",children:[d.jsx("button",{onClick:t,className:"absolute top-2 right-2 z-50 w-9 h-9 md:w-8 md:h-8 rounded-full bg-black/60 hover:bg-black/80 transition-colors text-white/70 hover:text-white flex items-center justify-center shadow-xl",children:d.jsx(Sa,{className:"w-4 h-4"})}),d.jsxs("div",{ref:p,className:"bg-[#111111] border border-white/[0.08] rounded-2xl shadow-2xl max-h-[85vh] overflow-y-auto overscroll-contain",children:[j&&h?(()=>{const F=h.awayTeam.abbreviation||Ct(h.awayTeam.name),S=h.homeTeam.abbreviation||Ct(h.homeTeam.name),[de]=Ga(Ct(h.awayTeam.name)||F,h.sport),[oe]=Ga(Ct(h.homeTeam.name)||S,h.sport),pe=B===h.homeTeam.id?Ct(h.homeTeam.name)||S:Ct(h.awayTeam.name)||F,[ge]=Ga(pe,h.sport),xe=B===h.awayTeam.id,we=B===h.homeTeam.id;return d.jsxs("div",{className:"relative overflow-hidden",style:{background:`linear-gradient(to right, ${de}80 0%, #111111 50%, ${oe}80 100%)`},children:[B&&ge!=="#1a1a1a"&&d.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:`linear-gradient(135deg, ${ge}50 0%, transparent 60%)`}}),d.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 pointer-events-none opacity-[0.05]",children:d.jsx("img",{src:h.awayTeam.logoUrl,alt:"",className:"w-36 h-36 md:w-44 md:h-44 object-contain",onError:$})}),d.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 pointer-events-none opacity-[0.05]",children:d.jsx("img",{src:h.homeTeam.logoUrl,alt:"",className:"w-36 h-36 md:w-44 md:h-44 object-contain",onError:$})}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#111111] via-black/20 to-transparent"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/30 via-trans
390parent to-transparent"}),d.jsxs("div",{className:"relative z-10 flex items-center gap-1.5 text-[10px] text-white/50 font-medium uppercase tracking-wider pt-4 px-5",children:[d.jsx("span",{children:h.sport||"NFL"}),d.jsx("span",{className:"text-white/20",children:"•"}),d.jsx("span",{children:Il(new Date(h.date))?Wt(new Date(h.date),"EEE, MMM d"):""}),d.jsx("span",{className:"text-white/20",children:"•"}),d.jsx("span",{children:Il(new Date(h.date))?Wt(new Date(h.date),"h:mm a"):""})]}),d.jsxs("div",{className:"relative z-10 flex items-center justify-between px-6 md:px-10 py-6 md:py-8",children:[d.jsxs("div",{className:"flex flex-col items-center gap-2 min-w-0 ml-2 md:ml-6",children:[h.awayTeam.logoUrl&&d.jsx("img",{src:h.awayTeam.logoUrl,alt:"",className:ae("w-16 h-16 md:w-20 md:h-20 object-contain drop-shadow-2xl transition-all",!xe&&B?"opacity-40 grayscale":""),onError:$}),d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:ae("font-teko text-2xl md:text-3xl uppercase tracking-wide leading-none",!xe&&B?"text-white/30":"text-white"),children:F}),h.awayTeam.record&&d.jsx("span",{className:ae("text-[10px] md:text-xs font-sans leading-none block mt-0.5",!xe&&B?"text-white/20":"text-white/40"),children:h.awayTeam.record})]})]}),d.jsxs("div",{className:"flex flex-col items-center gap-1 flex-shrink-0",children:[O!==void 0&&V!==void 0?d.jsxs("div",{className:"flex items-center gap-3 md:gap-5",children:[d.jsx("span",{className:ae("font-teko text-5xl md:text-6xl leading-none",xe?"text-white":"text-white/30"),children:Math.round(V)}),d.jsx("span",{className:"font-mono text-[10px] text-white/20 font-bold",children:"-"}),d.jsx("span",{className:ae("font-teko text-5xl md:text-6xl leading-none",we?"text-white":"text-white/30"),children:Math.round(O)})]}):d.jsx("div",{className:"text-white/30 font-mono text-sm font-bold",children:"VS"}),d.jsx("span",{className:"text-[7px] text-white/25 uppercase tracking-wider font-mono mt-0.5",children:"Predicted"})]}),d.jsxs("div",{className:"flex flex-col items-center gap-2 min-w-0 mr-2 md:mr-6",children:[h.homeTeam.logoUrl&&d.jsx("img",{src:h.homeTeam.logoUrl,alt:"",className:ae("w-16 h-16 md:w-20 md:h-20 object-contain drop-shadow-2xl transition-all",!we&&B?"opacity-40 grayscale":""),onError:$}),d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:ae("font-teko text-2xl md:text-3xl uppercase tracking-wide leading-none",!we&&B?"text-white/30":"text-white"),children:S}),h.homeTeam.record&&d.jsx("span",{className:ae("text-[10px] md:text-xs font-sans leading-none block mt-0.5",!we&&B?"text-white/20":"text-white/40"),children:h.homeTeam.record})]})]})]})]})})():d.jsx("div",{className:"flex items-center justify-between p-4 md:p-6 border-b border-white/10 bg-gradient-to-r from-dark-700 to-dark-800",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"bg-brand/10 p-2 rounded-lg border border-brand/20 hidden md:block",children:d.jsx(bs,{className:"w-5 h-5 text-brand"})}),d.jsx("h3",{className:"font-teko font-light text-2xl md:text-3xl text-white tracking-tight uppercase leading-none",children:i})]})}),d.jsxs("div",{className:"p-4 md:p-6 space-y-4 md:space-y-6",children:[j&&h&&T&&(()=>{const F=E&&(Ct(E.name)||E.abbreviation)||"",[S]=F?Ga(F,h==null?void 0:h.sport):["#1a1a1a"];return d.jsxs("div",{className:"grid grid-cols-4 gap-2 md:gap-3",children:[E&&d.jsxs("div",{className:"border rounded-xl p-4 text-center col-span-2",style:{background:`linear-gradient(135deg, ${S}35 0%, transparent 70%)`,borderColor:`${S}30`},children:[d.jsx("div",{className:"text-gray-500 text-[9px] uppercase tracking-widest mb-1.5 font-sans",children:"Winner"}),d.jsxs("div",{className:"flex items-center justify-center gap-2.5",children:[E.logoUrl&&d.jsx("img",{src:E.logoUrl,alt:"",className:"w-6 h-6 object-contain",onError:$}),d.jsx("span",{className:"font-teko text-2xl text-white",children:F}),d.jsx("span",{className:"text-white/15 font-teko text-sm",children:"•"}),d.jsxs("span",{className:ae("font-teko text-3xl leading-none",Q>=80?"text-amber-400":Q>=70?"text-brand":"text-white"),children:[Q,"%"]})]})]}),G!==null&&d.jsxs("div",{className:"bg-white/[0.04] border border-white/[0.08] rounded-xl p-4 text-center",children:[d.jsx("div",{className:"text-gray-500 text-[9px] uppercase tracking-widest mb-1.5 font-sans",children:"Spread"}),d.jsx("div",{className:"font-teko text-3xl text-white leading-none",children:G===0?"PK":`-${G}`})]}),O!==void 0&&V!==void 0&&d.jsxs("div",{className:"bg-white/[0.04] border border-white/[0.08] rounded-xl p-4 text-center",children:[d.jsx("div",{className:"text-gray-500 text-[9px] uppercase tracking-widest mb-1.5 font-sans",children:"Total"}),d.jsx("div",{className:"font-teko text-3xl text-white leading-none",children:Math.round(O)+Math.round(V)})]})]})})(),j&&h&&L&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(WE,{className:"w-4 h-4 text-emerald-400"}),title:"Vegas Lines",badgeColor:"bg-emerald-500/20 text-emerald-400"}),d.jsx("div",{className:"bg-white/[0.02] rounded-xl border border-white/[0.08] overflow-hidden",children:d.jsxs("div",{className:"grid grid-cols-3 divide-x divide-white/5",children:[D.homeSpread!==null&&d.jsxs("div",{className:"p-3 text-center",children:[d.jsx("div",{className:"text-gray-500 text-[10px] uppercase tracking-wider mb-1",children:"Spread"}),d.jsxs("div",{className:"text-white font-teko text-lg",children:[h.homeTeam.abbreviation||Ct(h.homeTeam.name)||"HOME"," ",D.homeSpread>0?"+":"",D.homeSpread]})]}),D.total!==null&&d.jsxs("div",{className:"p-3 text-center",children:[d.jsx("div",{className:"text-gray-500 text-[10px] uppercase tracking-wider mb-1",children:"O/U"}),d.jsx("div",{className:"text-white font-teko text-lg",children:D.total})]}),(D.homeOdds!==null||D.awayOdds!==null)&&d.jsxs("div",{className:"p-3 text-center",children:[d.jsx("div",{className:"text-gray-500 text-[10px] uppercase tracking-wider mb-1",children:"ML"}),d.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm",children:[d.jsx("span",{className:"text-gray-400 font-teko text-lg",children:ce(D.awayOdds)}),d.jsx("span",{className:"text-gray-600",children:"/"}),d.jsx("span",{className:"text-gray-400 font-teko text-lg",children:ce(D.homeOdds)})]})]})]})})]}),_.length>0&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(tf,{className:"w-4 h-4 text-cyan-400"}),title:"Live Updates",badge:`${_.length}`,badgeColor:"bg-cyan-500/20 text-cyan-400"}),d.jsx("div",{className:"space-y-3",children:_.map((F,S)=>{if(C(F)){const At=z(F.timestamp),Kt=_.length-S,nt=F.oldLine!==F.newLine,Ut=F.oldConfidence!==F.newConfidence,Jt=U(F.oldConfidence),Bt=U(F.newConfidence),zt=Bt-Jt;return d.jsxs("div",{className:"relative bg-white/[0.02] border border-white/5 rounded-xl p-4 md:p-5",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsxs("span",{className:"bg-brand px-2 py-0.5 rounded-full text-black font-mono text-[10px] font-bold uppercase tracking-wider",children:["#",Kt]}),d.jsx("span",{className:"text-gray-400 text-xs",children:F.runType==="6h"?"6-Hour Update":F.runType==="1h"?"1-Hour Update":"Update"}),At&&d.jsxs("span",{className:"text-gray-500 text-[10px] font-mono flex items-center gap-1 ml-auto",children:[d.jsx(ky,{className:"w-2.5 h-2.5"}),At]})]}),d.jsx("p",{className:"text-gray-300 text-sm leading-relaxed mb-3",children:F.changes||"Updated analysis with latest odds and news."}),(nt||Ut)&&d.jsxs("div",{className:"flex items-center gap-4 pt-3 border-t border-white/5",children:[nt&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx("span",{className:"text-gray-500 text-xs uppercase",children:"Line:"}),d.jsx("span",{className:"text-gray-400 font-mono",children:F.oldLine??"N/A"}),d.jsx(UN,{className:"w-3 h-3 text-brand"}),d.jsx("span",{className:"text-white font-mono font-bold",children:F.newLine??"N/A"})]}),Ut&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx("span",{className:"text-gray-500 text-xs uppercase",children:"Conf:"}),d.jsxs("span",{className:ae("font-teko text-lg",Bt>=80?"text-amber-400":"text-brand"),children:[Bt,"%"]}),zt!==0&&d.jsx("span",{className:ae("text-xs font-bold font-mono",zt>0?"text-emerald-400":"text-red-400"),children:zt>0?`+${zt}`:zt})]})]})]},S)}const de=F.oldHomeScore!==void 0,oe=At=>Math.round(At),pe=oe(F.newHomeScore||0),ge=oe(F.newAwayScore||0),xe=U(F.oldConfidence),we=U(F.newConfidence),Ie=we-xe,jt=F.oldWinnerId!==F.newWinnerId&&F.oldWinnerId&&F.newWinnerId,st=F.newHomeScore!==void 0&&F.newAwayScore!==void 0?F.newHomeScore>F.newAwayScore?h==null?void 0:h.homeTeam.id:h==null?void 0:h.awayTeam.id:null,fn=st&&h?st===h.homeTeam.id?h.homeTeam:h.awayTeam:null,pt=z(F.timestamp),Et=_.length-S;return d.jsxs("div",{className:"relative bg-white/[0.02] border border-white/5 rounded-xl p-4 md:p-5",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsxs("span",{className:"bg-brand px-2 py-0.5 rounded-full text-black font-mono text-[10px] font-bold uppercase tracking-wider",children:["#",Et]}),d.jsx("span",{className:"text-gray-300 text-sm font-medium truncate",children:F.title}),pt&&d.jsxs("span",{className:"text-gray-500 text-[10px] font-mono flex items-center gap-1 ml-auto flex-shrink-0",children:[d.jsx(ky,{className:"w-2.5 h-2.5"}),pt]})]}),F.impact!=="None"&&d.jsxs("div",{className:"mb-3 pl-3 border-l-2 border-brand/50",children:[d.jsx("span",{className:"text-brand font-bold text-[10px] uppercase tracking-wider block mb-0.5",children:"Impact"}),d.jsx("p",{className:"text-gray-300 text-sm italic",children:F.impact})]}),d.jsx("p",{className:"text-gray-300 text-sm leading-relaxed",children:F.text}),de&&d.jsxs("div",{className:"mt-3 pt-3 border-t border-white/5",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[(h==null?void 0:h.awayTeam.logoUrl)&&d.jsx("img",{src:h.awayTeam.logoUrl,alt:"",className:"w-5 h-5 object-contain",onError:$}),d.jsx("span",{className:ae("font-teko text-xl",st===(h==null?void 0:h.awayTeam.id)?"text-white":"text-gray-600"),children:ge})]}),d.jsx("span",{className:"text-gray-600 text-xs",children:"-"}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:ae("font-teko text-xl",st===(h==null?void 0:h.homeTeam.id)?"text-white":"text-gray-600"),children:pe}),(h==null?void 0:h.homeTeam.logoUrl)&&d.jsx("img",{src:h.homeTeam.logoUrl,alt:"",className:"w-5 h-5 object-contain",onError:$})]})]}),d.jsx("div",{className:"flex items-center gap-3",children:d.jsxs("div",{className:ae("px-2 py-1 rounded-lg border font-teko text-lg leading-none",we>=80?"bg-amber-500/10 border-amber-500/30 text-amber-400":"bg-brand/10 border-brand/30 text-brand"),children:[we,"%",Ie!==0&&d.jsx("span",{className:ae("text-xs font-mono ml-1",Ie>0?"text-emerald-400":"text-red-400"),children:Ie>0?`+${Ie}`:Ie})]})})]}),jt&&d.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[d.jsx("span",{className:"px-2 py-0.5 bg-amber-500/20 border border-amber-500/30 rounded text-[9px] text-amber-400 font-bold uppercase tracking-widest animate-pulse",children:"WINNER FLIP"}),fn&&d.jsxs("span",{className:"text-amber-400 text-xs",children:["→ ",fn.name]})]})]})]},S)})})]}),j&&q&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(ON,{className:"w-4 h-4 text-brand"}),title:"Matchup Summary"}),d.jsx("div",{className:"bg-white/5 rounded-lg p-4 border border-white/10",children:d.jsx("p",{className:"text-gray-300 text-sm leading-relaxed font-sans",children:q})})]}),j&&ee.length>0&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(Ll,{className:"w-4 h-4 text-brand"}),title:"Key Factors",badge:`${ee.length}`}),d.jsx("div",{className:"space-y-2",children:ee.map((F,S)=>d.jsxs("div",{className:"flex items-start gap-3 bg-white/5 rounded-lg p-3 border border-white/10",children:[d.jsx("div",{className:"w-5 h-5 rounded-full bg-brand/20 border border-brand/30 flex items-center justify-center flex-shrink-0 mt-0.5",children:d.jsx("span",{className:"text-brand text-xs font-bold",children:S+1})}),d.jsx("span",{className:"text-gray-300 text-sm font-sans",children:F})]},S))})]}),j&&fe.length>0&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(Bx,{className:"w-4 h-4 text-amber-400"}),title:"Injury Report",badge:`${fe.length}
390`,badgeColor:"bg-amber-500/20 text-amber-400"}),d.jsx("div",{className:"bg-amber-500/5 rounded-lg p-4 border border-amber-500/20",children:d.jsx("div",{className:"space-y-1.5",children:fe.map((F,S)=>d.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[d.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-400 flex-shrink-0 mt-1.5"}),d.jsx("span",{className:"text-gray-300 font-sans",children:F})]},S))})})]}),o&&o.length>0&&d.jsxs("div",{children:[d.jsx(R,{icon:d.jsx(Ll,{className:"w-4 h-4 text-brand"}),title:"High-Value Targets",badge:`${o.length}`}),d.jsx("div",{className:"space-y-3",children:o.map((F,S)=>{const{selection:de,analysis:oe,confidence:pe}=P(F);let ge=pe||0;return ge>0&&ge<=1&&(ge=Math.round(ge*100)),d.jsxs("div",{className:"bg-white/[0.02] border border-white/10 rounded-xl p-4 hover:border-brand/30 transition-colors",children:[d.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-3 mb-2",children:[d.jsxs("div",{className:"flex-1",children:[F.playerName&&d.jsx("div",{className:"text-gray-400 font-teko uppercase tracking-wide text-base mb-1",children:F.playerName}),d.jsx("h5",{className:"font-teko font-light text-xl md:text-2xl text-white leading-none uppercase tracking-wide",children:de})]}),d.jsxs("div",{className:"flex items-center gap-2 bg-dark-950 border border-white/10 px-3 py-1.5 rounded-lg",children:[d.jsx(xs,{className:ae("w-3.5 h-3.5",ge>=80?"text-amber-500":"text-brand")}),d.jsxs("span",{className:ae("font-teko text-2xl leading-none",ge>=80?"text-amber-500":"text-brand"),children:[ge,"%"]})]})]}),oe&&d.jsx("p",{className:"text-gray-400 text-sm leading-relaxed border-t border-white/5 pt-2",children:oe})]},S)})})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between cursor-pointer group",onClick:()=>x(!b),children:[d.jsx(R,{icon:d.jsx(bs,{className:"w-4 h-4 text-brand"}),title:"Full Research Report"}),d.jsx("button",{className:"text-gray-500 group-hover:text-white transition-colors p-1",children:b?d.jsx(Mx,{className:"w-5 h-5"}):d.jsx(Lx,{className:"w-5 h-5"})})]}),!b&&a&&d.jsxs("div",{className:"relative bg-white/[0.02] border border-white/5 rounded-xl p-4 md:p-6 mt-1 max-h-[10rem] overflow-hidden cursor-pointer",onClick:()=>x(!0),children:[d.jsx(vb,{remarkPlugins:[Cb],components:{h1:({node:F,...S})=>d.jsx("h1",{className:"font-teko font-light text-lg text-white mb-2 uppercase tracking-tight",...S}),h2:({node:F,...S})=>d.jsx("h2",{className:"font-teko font-light text-base text-brand mb-2 uppercase tracking-wide",...S}),h3:({node:F,...S})=>d.jsx("h3",{className:"font-teko font-normal text-sm text-white/90 mb-1 uppercase tracking-wide",...S}),p:({node:F,...S})=>d.jsx("p",{className:"mb-2 text-gray-400 font-sans font-light text-sm leading-relaxed",...S}),ul:({node:F,...S})=>d.jsx("ul",{className:"list-none space-y-1 text-gray-400 text-sm ml-2",...S}),ol:({node:F,...S})=>d.jsx("ol",{className:"list-decimal space-y-1 text-gray-400 text-sm ml-6",...S}),li:({node:F,...S})=>d.jsx("li",{className:"pl-1",...S}),strong:({node:F,...S})=>d.jsx("strong",{className:"text-gray-300 font-medium",...S}),em:({node:F,...S})=>d.jsx("em",{className:"text-gray-400 not-italic",...S}),a:()=>null,blockquote:({node:F,...S})=>d.jsx("blockquote",{className:"text-gray-400 text-sm",...S}),table:()=>null,thead:()=>null,tbody:()=>null,tr:()=>null,th:()=>null,td:()=>null},children:N}),d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-dark-900 via-dark-900/90 to-transparent pointer-events-none"}),d.jsx("div",{className:"absolute bottom-3 left-0 right-0 flex justify-center pointer-events-none",children:d.jsx("span",{className:"bg-dark-800 border border-white/10 text-gray-400 text-[10px] uppercase tracking-widest font-sans px-3 py-1 rounded-full",children:"Tap to expand"})})]}),b&&d.jsx("div",{className:"bg-white/[0.02] border border-white/5 rounded-xl p-4 md:p-6 mt-1",children:d.jsx(vb,{remarkPlugins:[Cb],components:{h1:({node:F,...S})=>d.jsx("h1",{className:"font-teko font-light text-2xl text-white mb-4 border-b border-white/10 pb-2 uppercase tracking-tight",...S}),h2:({node:F,...S})=>d.jsx("h2",{className:"font-teko font-light text-xl text-brand mt-6 mb-3 uppercase tracking-wide border-l-2 border-brand pl-3",...S}),h3:({node:F,...S})=>d.jsx("h3",{className:"font-teko font-normal text-lg text-white/90 mt-4 mb-2 uppercase tracking-wide flex items-center gap-2 before:content-['•'] before:text-brand before:mr-1",...S}),p:({node:F,...S})=>d.jsx("p",{className:"mb-3 text-gray-300 font-sans font-light !leading-[1.6rem] text-sm tracking-wide break-words",...S}),ul:({node:F,...S})=>d.jsx("ul",{className:"list-none space-y-1.5 mb-4 text-gray-300 text-sm ml-2 !leading-[1.6rem]",...S}),ol:({node:F,...S})=>d.jsx("ol",{className:"list-decimal space-y-1.5 mb-4 text-gray-300 text-sm ml-6 !leading-[1.6rem] pl-2",...S}),li:({node:F,...S})=>d.jsx("li",{className:"pl-2 border-l border-transparent hover:border-brand/50 transition-colors",...S}),strong:({node:F,...S})=>d.jsx("strong",{className:"text-white font-medium",...S}),em:({node:F,...S})=>d.jsx("em",{className:"text-brand/80 not-italic",...S}),a:({node:F,...S})=>d.jsx("a",{className:"text-brand hover:text-white hover:underline transition-all break-all text-xs font-mono",target:"_blank",rel:"noopener noreferrer",...S}),blockquote:({node:F,...S})=>d.jsx("blockquote",{className:"border-l-2 border-brand/50 pl-4 py-1 my-4 italic text-gray-300 bg-white/[0.02] rounded-r-lg text-sm !leading-[1.6rem]",...S}),table:({node:F,...S})=>d.jsx("div",{className:"overflow-x-auto my-4 border border-white/10 rounded-lg bg-black/20",children:d.jsx("table",{className:"w-full text-left border-collapse",...S})}),thead:({node:F,...S})=>d.jsx("thead",{className:"bg-white/5 text-brand font-teko font-light text-base uppercase tracking-widest border-b border-white/10",...S}),tbody:({node:F,...S})=>d.jsx("tbody",{className:"divide-y divide-white/5",...S}),tr:({node:F,...S})=>d.jsx("tr",{className:"hover:bg-white/5 transition-colors",...S}),th:({node:F,...S})=>d.jsx("th",{className:"p-2 font-normal whitespace-nowrap text-xs uppercase tracking-wider",...S}),td:({node:F,...S})=>d.jsx("td",{className:"p-2 text-xs font-mono text-gray-300 whitespace-nowrap",...S})},children:N})})]}),d.jsxs("div",{className:"pt-4 border-t border-white/5 flex flex-col items-center text-center opacity-40",children:[d.jsx("div",{className:"font-teko font-light text-lg text-white uppercase tracking-widest",children:"Matchups.AI Intelligence"}),d.jsxs("div",{className:"text-[9px] font-mono text-gray-500 uppercase",children:["Deep Research Agent • ",new Date().toLocaleDateString()]})]}),l&&(l.debug_raw_usage_source||l.debug_root_keys||l.usage||l.debug_usage_raw)&&d.jsxs("div",{className:"p-3 bg-black/40 border border-white/10 rounded-lg font-mono text-[10px] text-gray-500 overflow-hidden",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2 text-brand",children:[d.jsx(Ux,{className:"w-3 h-3"}),d.jsx("span",{className:"uppercase font-bold",children:"API Debug"})]}),l.usage&&d.jsxs("div",{className:"flex items-center gap-3 text-gray-400",children:[d.jsxs("span",{children:[d.jsx("span",{className:"text-blue-400",children:"P:"})," ",l.usage.promptTokens]}),d.jsxs("span",{children:[d.jsx("span",{className:"text-green-400",children:"R:"})," ",l.usage.completionTokens]}),d.jsxs("span",{className:"font-bold text-white",children:[d.jsx("span",{className:"text-amber-400",children:"T:"})," ",l.usage.totalTokens]})]})]}),l.usage&&d.jsx("pre",{className:"bg-black p-2 rounded border border-white/5 overflow-x-auto text-amber-400",children:JSON.stringify(l.usage,null,2)})]})]})]})]})}),document.body)},Zw=sn.memo(_3,(e,t)=>{var a,i;
390return e.isOpen===t.isOpen&&e.report===t.report&&e.title===t.title&&e.debugData===t.debugData&&e.propsData===t.propsData&&e.updates===t.updates&&((a=e.game)==null?void 0:a.id)===((i=t.game)==null?void 0:i.id)&&e.prediction===t.prediction}),jb=["#SportsBetting","#SportsAnalytics","#BettingPicks","#SharpMoney","#DailyPicks"],Fb={NFL:["#NFLPicks","#NFLBets","#NFLBetting","#NFLSunday"],NCAAF:["#CFBPicks","#CollegeFootball","#NCAAFBets","#CFBBetting","#CFBAnalytics"],NBA:["#NBAPicks","#NBABets","#NBABetting","#NBAAnalytics"],CBB:["#CBBPicks","#CollegeBasketball","#CBBBetting","#NCAABets","#CBBAnalytics"],NHL:["#NHLPicks","#NHLBets","#NHLBetting","#NHLAnalytics"],MLB:["#MLBPicks","#MLBBets","#MLBBetting","#MLBAnalytics"],DEFAULT:["#SportsPicks"]},Ob={NFL:"#NFLProps",NBA:"#NBAProps",NHL:"#NHLProps",MLB:"#MLBProps"},T3="https://matchups.ai",C3="@matchupsai",j3=(e,t,a)=>{var b;const i=e.sport||"NFL",l=jb[Math.floor(Math.random()*jb.length)],o=Fb[i]||Fb.DEFAULT;let u=o[Math.floor(Math.random()*o.length)];const h=!t&&a;h&&Ob[i]&&(u+=` ${Ob[i]}`);const f=`${l} ${u}`,p=`${e.awayTeam.name} @ ${e.homeTeam.name}`;let y="";if(t!=null&&t.result&&t.result.confidence>=80){const x=t.result.winnerId===e.homeTeam.id?e.homeTeam.name:e.awayTeam.name;y=`🚨 ELITE EDGE
391
392${p}
393
394Pick: 🔒 ${x}
395Confidence: ${Math.round(t.result.confidence)}%`}else if(h&&(a!=null&&a.result)){const x=(b=a.result.bestBets)==null?void 0:b[0];x?y=`⚡ PROPS VALUE
396
397${p}
398
399Target: ${x.selection}
400Odds: ${x.odds}
401Confidence: ${x.confidence}%`:y=`📊 PROPS ANALYSIS
402
403${p}
404
405Full breakdown available on Matchups.ai`}else if(t!=null&&t.result){const x=t.result.winnerId===e.homeTeam.id?e.homeTeam.name:e.awayTeam.name;y=`🤖 AI MODEL
406
407${p}
408
409Pick: ${x}
410Score: ${t.result.scorePrediction}
411Confidence: ${Math.round(t.result.confidence)}%`}else y=`📡 INTEL DROP
412
413${p}`;return`${y}
414
415🔗 ${T3}
416${f} ${C3}`},F3=e=>{const t=`https://twitter.com/intent/tweet?text=${encodeURIComponent(e)}`;window.open(t,"_blank","width=550,height=420")},e1=J.createContext(void 0),Rb="matchups_bet_slip";function O3({children:e}){const[t,a]=J.useState([]),[i,l]=J.useState(!1),[o,u]=J.useState(!1),[h,f]=J.useState(null),[p,y]=J.useState(null),b=J.useCallback(()=>y(null),[]);J.useEffect(()=>{try{const O=localStorage.getItem(Rb);if(O){const V=JSON.parse(O),ee=Date.now(),q=V.filter(E=>{var G,D;return(G=E.game)!=null&&G.date?new Date(E.game.date).getTime()>ee-2.5*60*60*1e3:(D=E.prop)!=null&&D.gameDate?new Date(E.prop.gameDate).getTime()>ee-2.5*60*60*1e3:!0});a(q)}}catch{}},[]),J.useEffect(()=>{try{localStorage.setItem(Rb,JSON.stringify(t))}catch{}},[t]);const x=J.useCallback(O=>{var ee,q,E,G;if(O.type==="prop"&&((ee=O.prop)!=null&&ee.id)&&t.some(U=>{var z,$;return U.type==="prop"&&((z=U.prop)==null?void 0:z.id)===(($=O.prop)==null?void 0:$.id)}))return;const V={...O,id:`${O.type}-${((q=O.game)==null?void 0:q.id)||((E=O.golfer)==null?void 0:E.id)||((G=O.prop)==null?void 0:G.id)}-${O.selectedTeamId||"outright"}-${Date.now()}`,addedAt:Date.now()};a(D=>[...D,V]),typeof window<"u"&&window.innerWidth>=768&&l(!0)},[t]),w=J.useCallback(O=>{a(V=>V.filter(ee=>ee.id!==O))},[]),N=J.useCallback(()=>{a([]),l(!1)},[]),A=J.useCallback((O,V)=>t.some(ee=>{var q,E,G;return((q=ee.game)==null?void 0:q.id)===O?V?ee.selectedTeamId===V:!0:((E=ee.golfer)==null?void 0:E.id)===O||((G=ee.prop)==null?void 0:G.id)===O}),[t]),_=J.useCallback(O=>{var E,G;const V=((E=O.game)==null?void 0:E.id)||((G=O.golfer)==null?void 0:G.id);if(!V)return{action:"removed"};const ee=t.findIndex(D=>{var U,z;return O.type==="game"&&((U=D.game)==null?void 0:U.id)===V?D.selectedTeamId===O.selectedTeamId:O.type==="golf"&&((z=D.golfer)==null?void 0:z.id)===V});if(ee>=0)return w(t[ee].id),{action:"removed"};const q=t.findIndex(D=>{var U;return O.type==="game"&&((U=D.game)==null?void 0:U.id)===V?D.selectedTeamId!==O.selectedTeamId:!1});if(q>=0){const D=t[q],U=D.selectedTeamName||"the other team";return w(D.id),x(O),y({message:`Replaced ${U} with ${O.selectedTeamName}`,type:"info"}),setTimeout(()=>y(null),3e3),{action:"replaced",replacedTeam:U}}return x(O),{action:"added"}},[t,x,w]),C=J.useCallback(()=>{var E;const O={};t.forEach(G=>{const D=G.sport.toLowerCase();O[D]=(O[D]||0)+1});const V=((E=Object.entries(O).sort((G,D)=>D[1]-G[1])[0])==null?void 0:E[0])||"nfl";return`https://sportsbook.draftkings.com/${{nfl:"football/nfl",nba:"basketball/nba",mlb:"baseball/mlb",nhl:"hockey/nhl",ncaaf:"football/college-football",cbb:"basketball/college-basketball",golf:"golf"}[V]||"football/nfl"}?wpsrc=Organic`},[t]),T=J.useCallback(async O=>{if(O.length===0)return[];try{const V=O.map(G=>{var D,U,z,$,P,te,fe;return{gameId:(D=G.prop)==null?void 0:D.gameId,playerName:((U=G.prop)==null?void 0:U.playerName)||"",propT
416ype:(($=(z=G.prop)==null?void 0:z.prop)==null?void 0:$.type)||"player_points",direction:(((te=(P=G.prop)==null?void 0:P.prop)==null?void 0:te.direction)||"OVER").toLowerCase(),sport:((fe=G.sport)==null?void 0:fe.toUpperCase())||"NBA"}}),ee=await fetch(qa("/api/props_betslip_links"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!ee.ok)return j(O);const q=await ee.json(),E=Array.isArray(q)?q:[q];return O.map((G,D)=>{var fe,ce,R;const U=E[D],z=(G.sport||"nba").toLowerCase(),$=(fe=G.prop)==null?void 0:fe.prop;if(U!=null&&U.found)return{index:D,odds:U.dkOdds||($==null?void 0:$.odds)||-110,dkEventLink:U.dkLink||U.dkEventLink,dkSourceId:U.dkSourceId||null,dkOdds:U.dkOdds||($==null?void 0:$.odds)||-110,fdEventLink:U.fdLink||U.fdEventLink,fdSourceId:U.fdSourceId||null,fdOdds:U.fdOdds||U.dkOdds||($==null?void 0:$.odds)||-110,commenceTime:((ce=G.prop)==null?void 0:ce.gameDate)||null};const P=z==="nba"?"leagues/basketball/nba":z==="nfl"?"leagues/football/nfl":z==="nhl"?"leagues/hockey/nhl":z==="mlb"?"leagues/baseball/mlb":"leagues/basketball/nba",te=z==="nba"?"navigation/nba":z==="nfl"?"navigation/nfl":z==="nhl"?"navigation/nhl":z==="mlb"?"navigation/mlb":"navigation/nba";return{index:D,odds:($==null?void 0:$.odds)||-110,dkEventLink:(U==null?void 0:U.fallbackDkLink)||`https://sportsbook.draftkings.com/${P}?wpsrc=Organic`,dkSourceId:null,dkOdds:($==null?void 0:$.odds)||-110,fdEventLink:(U==null?void 0:U.fallbackFdLink)||`https://sportsbook.fanduel.com/${te}`,fdSourceId:null,fdOdds:($==null?void 0:$.fdOdds)||($==null?void 0:$.odds)||-110,commenceTime:((R=G.prop)==null?void 0:R.gameDate)||null}})}catch(V){return console.error("[BetSlip] Props API error:",V),j(O)}},[]),j=J.useCallback(O=>O.map((V,ee)=>{var U,z;const q=(V.sport||"nba").toLowerCase(),E=(U=V.prop)==null?void 0:U.prop;let G;E!=null&&E.dkSourceId?G=`https://sportsbook.draftkings.com/event/${E.dkSourceId}?wpsrc=Organic`:G=`https://sportsbook.draftkings.com/${q==="nba"?"leagues/basketball/nba":q==="nfl"?"leagues/football/nfl":q==="nhl"?"leagues/hockey/nhl":q==="mlb"?"leagues/baseball/mlb":"leagues/basketball/nba"}?wpsrc=Organic`;let D;return E!=null&&E.fdSourceId?D=`https://sportsbook.fanduel.com/event/${E.fdSourceId}`:D=`https://sportsbook.fanduel.com/${q==="nba"?"navigation/nba":q==="nfl"?"navigation/nfl":q==="nhl"?"navigation/nhl":q==="mlb"?"navigation/mlb":"navigation/nba"}`,{index:ee,odds:(E==null?void 0:E.odds)||-110,dkEventLink:G,dkSourceId:(E==null?void 0:E.dkSourceId)||null,dkOdds:(E==null?void 0:E.odds)||-110,fdEventLink:D,fdSourceId:(E==null?void 0:E.fdSourceId)||null,fdOdds:(E==null?void 0:E.fdOdds)||(E==null?void 0:E.odds)||-110,commenceTime:((z=V.prop)==null?void 0:z.gameDate)||null}}),[]),B=J.useCallback(async()=>{var O,V,ee,q,E,G;if(t.length===0){f(null);return}u(!0);try{const D=t.filter(F=>F.type==="game"&&F.game),U=t.filter(F=>F.type==="prop"&&F.prop),z=await T(U);if(D.length===0){f({american:U.length===1&&((V=(O=U[0].prop)==null?void 0:O.prop)==null?void 0:V.odds)||null,decimal:null,dkAmerican:U.length===1&&((q=(ee=U[0].prop)==null?void 0:ee.prop)==null?void 0:q.odds)||null,dkDecimal:null,dkMatchedCount:U.length,fdAmerican:U.length===1&&((G=(E=U[0].prop)==null?void 0:E.prop)==null?void 0:G.odds)||null,fdDecimal:null,fdMatchedCount:U.length,matchedCount:U.length,legLinks:z,fetchedAt:Date.now()}),u(!1);return}const $=D.map(F=>({sport:F.sport,homeTeam:F.game.homeTeam.fullName||F.game.homeTeam.name,awayTeam:F.game.awayTeam.fullName||F.game.awayTeam.name,selectedTeam:F.selectedTeamId===F.game.homeTeam.id?F.game.homeTeam.fullName||F.game.homeTeam.name:F.game.awayTeam.fullName||F.game.awayTeam.name})),P=await fetch(qa("/api/betslip_links"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({picks:$})});if(!P.ok){f({american:null,decimal:null,dkAmerican:null,dkDecimal:null,dkMatchedCount:0,fdAmerican:null,fdDecimal:null,fdMatchedCount:0,matchedCount:0,legLinks:z,fetchedAt:Date.now()});return}const te=await P.json(),fe=te.legLinks||[],ce=[];let R=0,L=0;t.forEach((F,S)=>{F.type==="game"&&F.game?(fe[R]&&ce.push({...fe[R],index:S}),R++):F.type==="prop"&&F.prop&&(z[L]&&ce.push({...z[L],index:S}),L++)}),f({american:te.parlayOdds||null,decimal:te.parlayDecimal||null,dkAmerican:te.dkParlayOdds||null,dkDecimal:te.dkParlayDecimal||null,dkMatchedCount:(te.dkMatchedCount||0)+U.length,fdAmerican:te.fdParlayOdds||null,fdDecimal:te.fdParlayDecimal||null,fdMatchedCount:(te.fdMatchedCount||0)+U.length,matchedCount:(te.matchedCount||0)+U.length,legLinks:ce,fetchedAt:Date.now()})}catch(D){console.error("[BetSlip] Error fetching odds:",D),f(null)}finally{u(!1)}},[t,T]);J.useEffect(()=>{t.length>0?B():f(null)},[t.length]);const Q=(()=>{var q;if(!h)return!1;const O=Date.now()-h.fetchedAt,ee=((q=h.legLinks)==null?void 0:q.some(E=>E.commenceTime?new Date(E.commenceTime).getTime()<Date.now():!1))?120*1e3:600*1e3;return O>ee})();return d.jsx(e1.Provider,{value:{picks:t,addPick:x,removePick:w,clearSlip:N,isInSlip:A,togglePick:_,generateDraftKingsUrl:C,fetchParlayOdds:B,parlayOdds:h,isExpanded:i,setIsExpanded:l,isFetchingLinks:o,lastNotification:p,clearNotification:b,hasStaleOdds:Q},children:e})}function rm(){const e=J.useContext(e1);if(e===void 0)throw new Error("useBetSlip must be used within a BetSlipProvider");return e}const R3=({sport:e,className:t})=>{const a=(e||"NFL").toUpperCase(),i={NFL:"https://api.matchups.ai/storage/v1/object/public/images/nfl.svg",NCAAF:"https://api.matchups.ai/storage/v1/object/public/images/ncaaf.svg",NBA:"https://api.matchups.ai/storage/v1/object/public/images/nba.svg",CBB:"https://api.matchups.ai/storage/v1/object/public/images/cbb.svg",
416NHL:"https://api.matchups.ai/storage/v1/object/public/images/nhl.svg",MLB:"https://api.matchups.ai/storage/v1/object/public/images/mlb.svg"};return i[a]?d.jsx("div",{className:ae(t,"bg-gray-400 group-hover:bg-brand transition-colors duration-300"),style:{maskImage:`url(${i[a]})`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:`url(${i[a]})`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):d.jsx(Wc,{className:ae(t,"text-gray-400 group-hover:text-brand")})},El=e=>{e.currentTarget.src="https://api.matchups.ai/storage/v1/object/public/images/default.png"},D3=J.memo(({game:e,prediction:t,propsPrediction:a,user:i,isAdmin:l,hasFullAccess:o,onAdminInit:u,onAdminFix:h,onDelete:f,onNavigateShop:p})=>{var gt,Ft,be,Ze,Ke,sa,wn,Na,la;const[y,b]=J.useState("game"),[x,w]=J.useState(null),[N,A]=J.useState(!1),{togglePick:_,isInSlip:C}=rm(),{isLoading:T}=tu(),j=E3(e.homeTeam.fullName||e.homeTeam.name,e.awayTeam.fullName||e.awayTeam.name),B=(j==null?void 0:j.dkHomeBetLink)||(j==null?void 0:j.dkAwayBetLink),Q=(j==null?void 0:j.fdHomeBetLink)||(j==null?void 0:j.fdAwayBetLink),O=j&&(B||Q)&&(j.homeOdds!==null||j.awayOdds!==null),V=(Ee,mn=!1)=>{if(Ee===null)return null;const vn=Ee>=0?`+${Ee}`:`${Ee}`;return mn?`(${vn})`:vn},ee=(Ee,mn,vn=!1)=>{const Or=Ee!=null,Ka=mn!=null;return!Or&&!Ka?null:d.jsxs("div",{className:"flex flex-col gap-1",children:[Or&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-5 flex items-center justify-center",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/DKNG.svg",alt:"DK",className:"w-3.5 h-3.5"})}),d.jsx("span",{className:"font-teko text-base text-gray-400 leading-none",children:V(Ee)})]}),Ka&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-5 flex items-center justify-center",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/Fanduel_Shield_2016.svg",alt:"FD",className:"w-3 h-3"})}),d.jsx("span",{className:"font-teko text-base text-gray-400 leading-none",children:V(mn)})]})]})},q=J.useCallback(Ee=>{_({type:"game",game:e,selectedTeamId:Ee.id,selectedTeamName:Ee.name,label:`${Ee.name} ML`,sport:e.sport||"NFL"})},[e,_]),E=!!(i!=null&&i.stripeSubscriptionId)&&((gt=i==null?void 0:i.subscription)==null?void 0:gt.status)==="active",G=i?i.subscription.expiryDate>Date.now()||i.grantedByAdmin||E:!1,D=o||(i==null?void 0:i.grantedByAdmin)||G&&(((Ft=i==null?void 0:i.subscription)==null?void 0:Ft.status)==="active"||((be=i==null?void 0:i.subscription)==null?void 0:be.status)==="canceled"&&(((Ze=i==null?void 0:i.subscription)==null?void 0:Ze.expiryDate)||0)>Date.now()),U=e.completed&&e.homeScore!==void 0&&e.awayScore!==void 0,z=!0,$=!i||!D,P=(i==null?void 0:i.isAdmin)||U||D||$,te=!1;J.useEffect(()=>{y==="props"&&!te&&P&&b("game"),y==="props"&&b("game")},[P,te,y,z]);const fe=y==="game"?!P:!te;let ce=new Date(e.date);if(!Il(ce)){const Ee=new Date;Ee.setDate(Ee.getDate()+1),ce=Ee}Wt(ce,"EEE, MMM d • h:mm a");const R=ce.getTime()<Date.now(),L=e.status&&e.status!=="Scheduled"&&e.status!=="Final",F=e.status==="Live"?"text-red-500 animate-pulse font-bold":"text-gray-400",S=y==="game"?t:a,de=(S==null?void 0:S.status)==="researching",oe=(S==null?void 0:S.status)==="completed",pe=(oe||(i==null?void 0:i.isAdmin)&&(S==null?void 0:S.status)==="failed")&&(S==null?void 0:S.result),ge=(S==null?void 0:S.status)==="failed";let xe=null,we,Ie;if(y==="game"&&(t!=null&&t.result)){const Ee=t.result;xe=Ee.winnerId;const mn=Number(Ee.homeScorePrediction),vn=Number(Ee.awayScorePrediction);!isNaN(mn)&&!isNaN(vn)&&(we=Math.round(mn),Ie=Math.round(vn),we>Ie?xe=e.homeTeam.id:Ie>we&&(xe=e.awayTeam.id))}const jt=U&&Number(e.homeScore)===Number(e.awayScore),st=U&&!jt?e.homeScore>e.awayScore?e.homeTeam.id:e.awayTeam.id:null,fn=!jt&&(U?st===e.awayTeam.id:xe===e.awayTeam.id),pt=!jt&&(U?st===e.homeTeam.id:xe===e.homeTeam.id);let Et=S!=null&&S.result?S.result.confidence:0;Et>0&&Et<=1&&(Et=Math.round(Et*100));const At=!fe&&(S==null?void 0:S.result)&&Et>=80,Kt=xe===e.homeTeam.id?e.homeTeam:e.awayTeam,nt=(Ke=S==null?void 0:S.result)==null?void 0:Ke.usage;nt!=null&&nt.totalTokens,nt!=null&&nt.promptTokens,nt!=null&&nt.completionTokens,nt!=null&&nt.searchQueries;const Ut=async()=>
416{if(!N){A(!0);try{await u(e.id,y)}catch{}finally{A(!1)}}},Jt=()=>{const Ee=j3(e,t,a);F3(Ee)},Bt=J.useCallback(()=>w(null),[]),zt=ge&&(i==null?void 0:i.isAdmin),xn=!S||ge&&!(i!=null&&i.isAdmin),lt=(sa=S==null?void 0:S.result)==null?void 0:sa.updates,kn=lt&&lt.length>0,ne=e.awayTeam.abbreviation||Ct(e.awayTeam.name),he=e.homeTeam.abbreviation||Ct(e.homeTeam.name),[ke]=Ga(Ct(e.awayTeam.name)||ne,e.sport),[je]=Ga(Ct(e.homeTeam.name)||he,e.sport),He=oe&&xe?Ct(xe===e.homeTeam.id?e.homeTeam.name:e.awayTeam.name):Ct(e.homeTeam.name)||he,[_t,Pt]=Ga(He,e.sport),at=C(e.id,e.awayTeam.id)||C(e.id,e.homeTeam.id);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:ae("group relative rounded-2xl overflow-hidden flex flex-col h-full transition-all duration-300",at?"ring-2 ring-brand":At?"ring-2 ring-amber-500/40":"ring-1 ring-white/[0.08] hover:ring-white/20"),children:[d.jsxs("div",{className:"relative h-36 md:h-40 overflow-hidden",style:{background:`linear-gradient(to right, ${ke}66 0%, #0f0f0f 50%, ${je}66 100%)`},children:[oe&&_t!=="#1a1a1a"&&d.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:`linear-gradient(135deg, ${_t}50 0%, transparent 60%)`}}),d.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none opacity-[0.06]",children:d.jsx("img",{src:e.awayTeam.logoUrl,alt:"",className:"w-28 h-28 object-contain",onError:El})}),d.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none opacity-[0.06]",children:d.jsx("img",{src:e.homeTeam.logoUrl,alt:"",className:"w-28 h-28 object-contain",onError:El})}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#111111] via-black/30 to-transparent"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/40 via-transparent to-transparent"}),d.jsx("div",{className:"absolute top-3 left-3 z-10",children:d.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-white/50 font-medium uppercase tracking-wider",children:[d.jsx(R3,{sport:e.sport||"NFL",className:"w-3.5 h-3.5"}),d.jsx("span",{children:e.sport||"NFL"}),d.jsx("span",{className:"text-white/20",children:"•"}),d.jsx("span",{className:ae(R&&!U?"text-red-400":L?F:""),children:U?"FINAL":R?"STARTED":L?(wn=e.status)==null?void 0:wn.toUpperCase():Wt(ce,"h:mm a")}),kn&&!U&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-white/20",children:"•"}),d.jsxs("span",{className:"text-emerald-400 font-bold flex items-center gap-0.5 animate-pulse",children:[d.jsx(si,{className:"w-2.5 h-2.5"})," UPD"]})]})]})}),R&&!U&&d.jsxs("div",{className:"absolute top-3 right-3 z-10 flex items-center gap-1.5 bg-red-600/90 px-2 py-0.5 rounded",children:[d.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-white opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-white"})]}),d.jsx("span",{className:"text-[9px] font-bold text-white uppercase tracking-wider leading-none",children:"Live"})]}),d.jsxs("div",{className:ae("absolute inset-0 z-10 flex items-center justify-between px-6 md:px-8 pt-8",fe&&"opacity-20 blur-[1px]"),children:[d.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[d.jsx("img",{src:e.awayTeam.logoUrl,alt:ne,onError:El,className:ae("w-14 h-14 md:w-16 md:h-16 object-contain drop-shadow-2xl transition-all",!fn&&oe?"opacity-40 grayscale":"")}),d.jsx("span",{className:ae("font-teko text-lg md:text-xl leading-none uppercase",!fn&&oe?"text-white/30":"text-white/80"),children:ne})]}),d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx("div",{className:"flex items-center gap-3 md:gap-4",children:y==="game"&&(U||oe)?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:ae("font-teko text-4xl md:text-5xl leading-none",!fn&&oe?"text-white/30":"text-white"),children:U?e.awayScore:Ie!==void 0?Ie:"-"}),d.jsx("span",{className:"font-mono text-[10px] text-white/30 font-bold",children:"-"}),d.jsx("span",{className:ae("font-teko text-4xl md:text-5xl leading-none",!pt&&oe?"text-white/30":"text-white"),children:U?e.homeScore:we!==void 0?we:"-"})]}):d.jsx("span",{className:"font-mono text-xs text-white/30 font-bold",children:"VS"})}),y==="game"&&(U||oe)&&d.jsx("span",{className:"text-[7px] text-white/30 uppercase tracking-wider font-mono mt-0.5",children:U?"FINAL":"PREDICTED"})]}),d.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[d.jsx("img",{src:e.homeTeam.logoUrl,alt:he,onError:El,className:ae("w-14 h-14 md:w-16 md:h-16 object-contain drop-shadow-2xl transition-all",!pt&&oe?"opacity-40 grayscale":"")}),d.jsx("span",{className:ae("font-teko text-lg md:text-xl leading-none uppercase",!pt&&oe?"text-white/30":"text-white/80"),children:he})]})]})]}),d.jsxs("div",{className:"bg-[#141414] px-4 py-3 flex-1 flex flex-col relative",children:[fe&&d.jsxs("div",{className:"absolute inset-0 z-30 flex flex-col items-center justify-center p-6 text-center animate-in fade-in bg-[#141414]",children:[d.jsx("div",{className:"p-3 bg-white/5 rounded-full border border-white/10 mb-3",children:d.jsx(ii,{className:"w-5 h-5 text-gray-500"})}),d.jsx("h4",{className:"font-teko font-light text-2xl text-white mb-2 uppercase tracking-wide",children:"INTEL LOCKED"}),d.jsx("button",{onClick:p,className:"px-5 py-1.5 border border-white/20 hover:bg-white hover:text-black text-white text-[10px] font-mono uppercase tracking-[0.2em] rounded transition-all",children:"UNLOCK ACCESS"})]}),d.jsx("div",{className:ae("flex-1 flex flex-col",fe&&"hidden"),children:xn?d.jsx("div",{className:"flex-1 flex flex-col items-center justify-center text-center py-4",children:i!=null&&i.isAdmin?d.jsxs("button",{onClick:Ut,disabled:N,className:ae("px-5 py-2 border border-brand/30 text-brand font-bold text-xs hover:bg-brand hover:text-black transition-colors rounded uppercase tracking-wide flex items-center gap-2",N&&"opacity-50 cursor-not-allowed"),children:[d.jsx(PE,{className:"w-4 h-4"})," ",N?"STARTING...":"INITIATE"]}):d.jsxs("div",{className:"text-gray-600 font-mono text-[9px] uppercase tracking-widest flex items-center gap-2 border border-white/5 px-4 py-2 rounded-full",children:[d.jsx("div",{className:"w-1.5 h-1.5 bg-gray-600 rounded-full animate-pulse"}),"PENDING ANALYSIS"]})}):de?d.jsx(tA,{state:S},S.startTime):oe&&pe&&!fe?d.jsxs("div",{className:"flex-1 flex flex-col animate-in fade-in slide-in-from-bottom-2",children:[y==="game"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("img",{src:Kt.logoUrl,className:"w-5 h-5 object-contain",alt:"winner",onError:El}),d.jsx("span",{className:"font-teko text-lg md:text-xl uppercase leading-none text-white",children:Kt.name})]}),d.jsxs("div",{className:"flex items-baseline gap-1.5 px-3 py-1.5 rounded-lg bg-white/[0.06]",children:[d.jsxs("span",{className:ae("font-teko text-2xl md:text-3xl leading-none",Et>=80?"text-amber-400":Et>65?"text-brand":"text-gray-400"),children:[Et,"%"]}),(()=>{if(!lt||lt.length===0)return null;const Ee=lt[lt.length-1];return Ee.newConfidence>Ee.oldConfidence?d.jsx(Al,{className:"w-3.5 h-3.5 text-emerald-400",strokeWidth:3}):Ee.newConfidence<Ee.oldConfidence?d.jsx(kl,{className:"w-3.5 h-3.5 text-red-400",strokeWidth:3}):null})(),d.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-wider",children:"conf"})]})]}),d.jsx("p",{className:"text-[10px] md:text-[11px] text-gray-400 font-light leading-relaxed line-clamp-2 md:line-clamp-3 mb-3 opacity-80",children:S.result.summary}),O&&d.jsxs("div",{className:"flex items-center justify-center gap-3 mb-3",children:[d.jsxs("button",{onClick:()=>q(e.awayTeam),className:ae("flex items-center gap-2 px-3 py-1.5 rounded-lg border transition-all text-xs",C(e.id,e.awayTeam.id)?"bg-brand/10 border-brand":"bg-white/[0.03] border-white/5 hover:bg-white/[0.08]"),children:[d.jsx("span",{className:"text-white/50 font-teko text-sm",children:ne}),ee(j==null?void 0:j.dkAwayOdds,j==null?void 0:j.fdAwayOdds)]}),d.jsxs("button",{onClick:()=>q(e.homeTeam),className:ae("flex items-center gap-2 px-3 py-1.5 rounded-lg border transition-all text-xs",C(e.id,e.homeTeam.id)?"bg-brand/10 border-brand":"bg-white/[0.03] border-white/5 hover:bg-white/[0.08]"),children:[d.jsx("span",{className:"text-white/50 font-teko text-sm",children:he}),ee(j==null?void 0:j.dkHomeOdds,j==null?void 0:j.fdHomeOdds)]})]})]}):d.jsx("div",{}),d.jsx("div",{className:"mt-auto",children:d.jsx("button",{onClick:()=>w(y),className:"w-full flex items-center justify-center gap-2 py-2 bg-white/[0.03] hover:bg-white/[0.08] border border-white/5 hover:border-white/10 rounded-lg text-[9px] md:text-[10px] text-gray-400 hover:text-white transition-all uppercase tracking-[0.15em] font-medium group",children:kn&&y==="game"?d.jsxs(d.Fragment,{children:[d.jsx(si,{className:"w-3 h-3 text-emerald-500 animate-pulse"})," VIEW UPDATE (",lt.length,")"]}):d.jsxs(d.Fragment,{children:[d.jsx(bs,{className:"w-3 h-3 text-gray-500 group-hover:text-brand transition-colors"})," READ GAME REPORT"]})})})]}):zt?d.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 opacity-50 py-4",children:[d.jsx(Ix,{className:"w-6 h-6 text-red-900"}),d.jsx("span",{className:"text-[10px] text-red-500 uppercase tracking-widest font-mono",children:"Analysis Failed"}),(i==null?void 0:i.isAdmin)&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>u(e.id,y),className:"text-[10px] underline text-gray-500 hover:text-white transition-colors",children:"Retry"}),d.jsxs("button",{onClick:()=>w(y),className:"flex items-center gap-1.5 text-[9px] text-red-400 hover:text-white border border-red-500/20 bg-red-500/10 px-2 py-1 rounded uppercase tracking-wider transition-colors",children:[d.jsx(CE,{className:"w-3 h-3"})," Error Log"]})]})]}):null})]}),oe&&pe&&!fe&&d.jsx("div",{className:"flex items-center justify-end px-4 py-2 bg-[#111111] border-t border-white/[0.04]",children:d.jsx("button",{onClick:Jt,className:"text-gray-600 hover:text-white transition-colors p-1",title:"Share on X",children:d.jsx(EN,{className:"w-3.5 h-3.5"})})})]}),pe&&d.jsx(Zw,{isOpen:x===y,onClose:Bt,title:y==="game"?"Game Prediction Report":"Props Analysis Report",report:((Na=S==null?void 0:S.result)==null?void 0:Na.fullReport)||"",debugData:i!=null&&i.isAdmin?S==null?void 0:S.result:void 0,propsData:y==="props"?(la=S==null?void 0:S.result)==null?void 0:la.bestBets:void 0,updates:lt,game:e,prediction:S==null?void 0:S.result})]})},(e,t)=>{var a,i,l,o,u,h,f,p,y,b,x,w;return e.game.id===t.game.id&&e.game.completed===t.game.completed&&e.game.homeScore===t.game.homeScore&&e.game.awayScore===t.game.awayScore&&((a=e.prediction)==null?void 0:a.status)===((i=t.prediction)==null?void 0:i.status)&&((l=e.prediction)==null?void 0:l.lastUpdated)===((o=t.prediction)==null?void 0:o.lastUpdated)&&((u=e.propsPrediction)==null?void 0:u.status)===((h=t.propsPrediction)==null?void 0:h.status)&&((f=e.propsPrediction)==null?void 0:f.lastUpdated)===((p=t.propsPrediction)==null?void 0:p.lastUpdated)&&((y=e.user)==null?void 0:y.id)===((b=t.user)==null?void 0:b.id)&&((x=e.user)==null?void 0:x.isAdmin)===((w=t.user)==null?void 0:w.isAdmin)});function nu(e,t){var a={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(a[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)t.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(a[i[l]]=e[i[l]]);return a}function L3(e,t,a,i){function l(o){return o instanceof a?o:new a(function(u){u(o)})}return new(a||(a=Promise))(function(o,u){function h(y){try{p(i.next(y))}catch(b){u(b)}}function f(y){try{p(i.throw(y))}catch(b){u(b)}}function p(y){y.done?o(y.value):l(y.value).then(h,f)}p((i=i.apply(e,t||[])).next())})}const M3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
416class im extends Error{constructor(t,a="FunctionsError",i){super(t),this.name=a,this.context=i}}class I3 extends im{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Db extends im{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Lb extends im{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var gf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(gf||(gf={}));class U3{constructor(t,{headers:a={},customFetch:i,region:l=gf.Any}={}){this.url=t,this.headers=a,this.region=l,this.fetch=M3(i)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return L3(this,arguments,void 0,function*(a,i={}){var l;let o,u;try{const{headers:h,method:f,body:p,signal:y,timeout:b}=i;let x={},{region:w}=i;w||(w=this.region);const N=new URL(`${this.url}/${a}`);w&&w!=="any"&&(x["x-region"]=w,N.searchParams.set("forceFunctionRegion",w));let A;p&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?typeof Blob<"u"&&p instanceof Blob||p instanceof ArrayBuffer?(x["Content-Type"]="application/octet-stream",A=p):typeof p=="string"?(x["Content-Type"]="text/plain",A=p):typeof FormData<"u"&&p instanceof FormData?A=p:(x["Content-Type"]="application/json",A=JSON.stringify(p)):p&&typeof p!="string"&&!(typeof Blob<"u"&&p instanceof Blob)&&!(p instanceof ArrayBuffer)&&!(typeof FormData<"u"&&p instanceof FormData)?A=JSON.stringify(p):A=p;let _=y;b&&(u=new AbortController,o=setTimeout(()=>u.abort(),b),y?(_=u.signal,y.addEventListener("abort",()=>u.abort())):_=u.signal);const C=yield this.fetch(N.toString(),{method:f||"POST",headers:Object.assign(Object.assign(Object.assign({},x),this.headers),h),body:A,signal:_}).catch(Q=>{throw new I3(Q)}),T=C.headers.get("x-relay-error");if(T&&T==="true")throw new Db(C);if(!C.ok)throw new Lb(C);let j=((l=C.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim(),B;return j==="application/json"?B=yield C.json():j==="application/octet-stream"||j==="application/pdf"?B=yield C.blob():j==="text/event-stream"?B=C:j==="multipart/form-data"?B=yield C.formData():B=yield C.text(),{data:B,error:null,response:C}}catch(h){return{data:null,error:h,response:h instanceof Lb||h instanceof Db?h.context:void 0}}finally{o&&clearTimeout(o)}})}}var rn={},Qi={},Zi={},es={},ts={},ns={},B3=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},vs=B3();const z3=vs.fetch,t1=vs.fetch.bind(vs),n1=vs.Headers,P3=vs.Request,H3=vs.Response,V3=Object.freeze(Object.defineProperty({__proto__:null,Headers:n1,Request:P3,Response:H3,default:t1,fetch:z3},Symbol.toStringTag,{value:"Module"})),G3=$S(V3);var gc={},Mb;function a1(){if(Mb)return gc;Mb=1,Object.defineProperty(gc,"__esModule",{value:!0});class e extends Error{constructor(a){super(a.message),this.name="PostgrestError",this.details=a.details,this.hint=a.hint,this.co
416de=a.code}}return gc.default=e,gc}var Ib;function r1(){if(Ib)return ns;Ib=1;var e=ns&&ns.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ns,"__esModule",{value:!0});const t=e(G3),a=e(a1());class i{constructor(o){var u,h;this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=new Headers(o.headers),this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=(u=o.shouldThrowOnError)!==null&&u!==void 0?u:!1,this.signal=o.signal,this.isMaybeSingle=(h=o.isMaybeSingle)!==null&&h!==void 0?h:!1,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,u){return this.headers=new Headers(this.headers),this.headers.set(o,u),this}then(o,u){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const h=this.fetch;let f=h(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async p=>{var y,b,x,w;let N=null,A=null,_=null,C=p.status,T=p.statusText;if(p.ok){if(this.method!=="HEAD"){const O=await p.text();O===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((y=this.headers.get("Accept"))===null||y===void 0)&&y.includes("application/vnd.pgrst.plan+text"))?A=O:A=JSON.parse(O))}const B=(b=this.headers.get("Prefer"))===null||b===void 0?void 0:b.match(/count=(exact|planned|estimated)/),Q=(x=p.headers.get("content-range"))===null||x===void 0?void 0:x.split("/");B&&Q&&Q.length>1&&(_=parseInt(Q[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(A)&&(A.length>1?(N={code:"PGRST116",details:`Results contain ${A.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},A=null,_=null,C=406,T="Not Acceptable"):A.length===1?A=A[0]:A=null)}else{const B=await p.text();try{N=JSON.parse(B),Array.isArray(N)&&p.status===404&&(A=[],N=null,C=200,T="OK")}catch{p.status===404&&B===""?(C=204,T="No Content"):N={message:B}}if(N&&this.isMaybeSingle&&(!((w=N==null?void 0:N.details)===null||w===void 0)&&w.includes("0 rows"))&&(N=null,C=200,T="OK"),N&&this.shouldThrowOnError)throw new a.default(N)}return{error:N,data:A,count:_,status:C,statusText:T}});return this.shouldThrowOnError||(f=f.catch(p=>{var y,b,x;return{error:{message:`${(y=p==null?void 0:p.name)!==null&&y!==void 0?y:"FetchError"}: ${p==null?void 0:p.message}`,details:`${(b=p==null?void 0:p.stack)!==null&&b!==void 0?b:""}`,hint:"",code:`${(x=p==null?void 0:p.code)!==null&&x!==void 0?x:""}`},data:null,count:null,status:0,statusText:""}})),f.then(o,u)}returns(){return this}overrideTypes(){return this}}return ns.default=i,ns}var Ub;function i1(){if(Ub)return ts;
416Ub=1;var e=ts&&ts.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ts,"__esModule",{value:!0});const t=e(r1());class a extends t.default{select(l){let o=!1;const u=(l??"*").split("").map(h=>/\s/.test(h)&&!o?"":(h==='"'&&(o=!o),h)).join("");return this.url.searchParams.set("select",u),this.headers.append("Prefer","return=representation"),this}order(l,{ascending:o=!0,nullsFirst:u,foreignTable:h,referencedTable:f=h}={}){const p=f?`${f}.order`:"order",y=this.url.searchParams.get(p);return this.url.searchParams.set(p,`${y?`${y},`:""}${l}.${o?"asc":"desc"}${u===void 0?"":u?".nullsfirst":".nullslast"}`),this}limit(l,{foreignTable:o,referencedTable:u=o}={}){const h=typeof u>"u"?"limit":`${u}.limit`;return this.url.searchParams.set(h,`${l}`),this}range(l,o,{foreignTable:u,referencedTable:h=u}={}){const f=typeof h>"u"?"offset":`${h}.offset`,p=typeof h>"u"?"limit":`${h}.limit`;return this.url.searchParams.set(f,`${l}`),this.url.searchParams.set(p,`${o-l+1}`),this}abortSignal(l){return this.signal=l,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:l=!1,verbose:o=!1,settings:u=!1,buffers:h=!1,wal:f=!1,format:p="text"}={}){var y;const b=[l?"analyze":null,o?"verbose":null,u?"settings":null,h?"buffers":null,f?"wal":null].filter(Boolean).join("|"),x=(y=this.headers.get("Accept"))!==null&&y!==void 0?y:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${p}; for="${x}"; options=${b};`),p==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(l){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${l}`),this}}return ts.default=a,ts}var Bb;
416function sm(){if(Bb)return es;Bb=1;var e=es&&es.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(es,"__esModule",{value:!0});const t=e(i1());class a extends t.default{eq(l,o){return this.url.searchParams.append(l,`eq.${o}`),this}neq(l,o){return this.url.searchParams.append(l,`neq.${o}`),this}gt(l,o){return this.url.searchParams.append(l,`gt.${o}`),this}gte(l,o){return this.url.searchParams.append(l,`gte.${o}`),this}lt(l,o){return this.url.searchParams.append(l,`lt.${o}`),this}lte(l,o){return this.url.searchParams.append(l,`lte.${o}`),this}like(l,o){return this.url.searchParams.append(l,`like.${o}`),this}likeAllOf(l,o){return this.url.searchParams.append(l,`like(all).{${o.join(",")}}`),this}likeAnyOf(l,o){return this.url.searchParams.append(l,`like(any).{${o.join(",")}}`),this}ilike(l,o){return this.url.searchParams.append(l,`ilike.${o}`),this}ilikeAllOf(l,o){return this.url.searchParams.append(l,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(l,o){return this.url.searchParams.append(l,`ilike(any).{${o.join(",")}}`),this}is(l,o){return this.url.searchParams.append(l,`is.${o}`),this}in(l,o){const u=Array.from(new Set(o)).map(h=>typeof h=="string"&&new RegExp("[,()]").test(h)?`"${h}"`:`${h}`).join(",");return this.url.searchParams.append(l,`in.(${u})`),this}contains(l,o){return typeof o=="string"?this.url.searchParams.append(l,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(l,`cs.{${o.join(",")}}`):this.url.searchParams.append(l,`cs.${JSON.stringify(o)}`),this}containedBy(l,o){return typeof o=="string"?this.url.searchParams.append(l,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(l,`cd.{${o.join(",")}}`):this.url.searchParams.append(l,`cd.${JSON.stringify(o)}`),this}rangeGt(l,o){return this.url.searchParams.append(l,`sr.${o}`),this}rangeGte(l,o){return this.url.searchParams.append(l,`nxl.${o}`),this}rangeLt(l,o){return this.url.searchParams.append(l,`sl.${o}`),this}rangeLte(l,o){return this.url.searchParams.append(l,`nxr.${o}`),this}rangeAdjacent(l,o){return this.url.searchParams.append(l,`adj.${o}`),this}overlaps(l,o){return typeof o=="string"?this.url.searchParams.append(l,`ov.${o}`):this.url.searchParams.append(l,`ov.{${o.join(",")}}`),this}textSearch(l,o,{config:u,type:h}={}){let f="";h==="plain"?f="pl":h==="phrase"?f="ph":h==="websearch"&&(f="w");const p=u===void 0?"":`(${u})`;return this.url.searchParams.append(l,`${f}fts${p}.${o}`),this}match(l){return Object.entries(l).forEach(([o,u])=>{this.url.searchParams.append(o,`eq.${u}`)}),this}not(l,o,u){return this.url.searchParams.append(l,`not.${o}.${u}`),this}or(l,{foreignTable:o,referencedTable:u=o}={}){const h=u?`${u}.or`:"or";return this.url.searchParams.append(h,`(${l})`),this}filter(l,o,u){return this.url.searchParams.append(l,`${o}.${u}`),this}}return es.default=a,es}var zb;function s1(){if(zb)return Zi;zb=1;var e=Zi&&Zi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Zi,"__esModule",{value:!0});const t=e(sm());class a{constructor(l,{headers:o={},schema:u,fetch:h}){this.url=l,this.headers=new Headers(o),this.schema=u,this.fetch=h}select(l,{head:o=!1,count:u}={}){const h=o?"HEAD":"GET";let f=!1;const p=(l??"*").split("").map(y=>/\s/.test(y)&&!f?"":(y==='"'&&(f=!f),y)).join("");return this.url.searchParams.set("select",p),u&&this.headers.append("Prefer",`count=${u}`),new t.default({method:h,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(l,{count:o,defaultToNull:u=!0}={}){var h;const f="POST";if(o&&this.headers.append("Prefer",`count=${o}`),u||this.headers.append("Prefer","missing=default"),Array.isArray(l)){const p=l.reduce((y,b)=>y.concat(Object.keys(b)),[]);if(p.length>0){const y=[...new Set(p)].map(b=>`"${b}"`);this.url.searchParams.set("columns",y.join(","))}}return new t.default({method:f,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(h=this.fetch)!==null&&h!==void 0?h:fetch})}upsert(l,{onConflict:o,ignoreDuplicates:u=!1,count:h,defaultToNull:f=!0}={}){var p;const y="POST";if(this.headers.append("Prefer",`resolution=${u?"ignore":"merge"}-duplicates`),o!==void 0&&this.url.searchParams.set("on_conflict",o),h&&this.headers.append("Prefer",`count=${h}`),f||this.headers.append("Prefer","missing=default"),Array.isArray(l)){const b=l.reduce((x,w)=>x.concat(Object.keys(w)),[]);if(b.length>0){const x=[...new Set(b)].map(w=>`"${w}"`);this.url.searchParams.set("columns",x.join(","))}}return new t.default({method:y,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(p=this.fetch)!==null&&p!==void 0?p:fetch})}update(l,{count:o}={}){var u;const h="PATCH";return o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:h,url:this.url,headers:this.headers,schema:this.schema,body:l,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}delete({count:l}={}){var o;const u="DELETE";return l&&this.headers.append("Prefer",`count=${l}`),new t.default({method:u,url:this.url,headers:this.headers,schema:this.schema,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}}return Zi.default=a,Zi}var Pb;function q3(){if(Pb)return Qi;Pb=1;
416var e=Qi&&Qi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qi,"__esModule",{value:!0});const t=e(s1()),a=e(sm());class i{constructor(o,{headers:u={},schema:h,fetch:f}={}){this.url=o,this.headers=new Headers(u),this.schemaName=h,this.fetch=f}from(o){const u=new URL(`${this.url}/${o}`);return new t.default(u,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(o){return new i(this.url,{headers:this.headers,schema:o,fetch:this.fetch})}rpc(o,u={},{head:h=!1,get:f=!1,count:p}={}){var y;let b;const x=new URL(`${this.url}/rpc/${o}`);let w;h||f?(b=h?"HEAD":"GET",Object.entries(u).filter(([A,_])=>_!==void 0).map(([A,_])=>[A,Array.isArray(_)?`{${_.join(",")}}`:`${_}`]).forEach(([A,_])=>{x.searchParams.append(A,_)})):(b="POST",w=u);const N=new Headers(this.headers);return p&&N.set("Prefer",`count=${p}`),new a.default({method:b,url:x,headers:N,schema:this.schemaName,body:w,fetch:(y=this.fetch)!==null&&y!==void 0?y:fetch})}}return Qi.default=i,Qi}var Hb;function $3(){if(Hb)return rn;Hb=1;var e=rn&&rn.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(rn,"__esModule",{value:!0}),rn.PostgrestError=rn.PostgrestBuilder=rn.PostgrestTransformBuilder=rn.PostgrestFilterBuilder=rn.PostgrestQueryBuilder=rn.PostgrestClient=void 0;const t=e(q3());rn.PostgrestClient=t.default;const a=e(s1());rn.PostgrestQueryBuilder=a.default;const i=e(sm());rn.PostgrestFilterBuilder=i.default;const l=e(i1());rn.PostgrestTransformBuilder=l.default;const o=e(r1());rn.PostgrestBuilder=o.default;const u=e(a1());return rn.PostgrestError=u.default,rn.default={PostgrestClient:t.default,PostgrestQueryBuilder:a.default,PostgrestFilterBuilder:i.default,PostgrestTransformBuilder:l.default,PostgrestBuilder:o.default,PostgrestError:u.default},rn}var Y3=$3();const W3=$l(Y3),{PostgrestClient:K3,PostgrestQueryBuilder:GO,PostgrestFilterBuilder:qO,PostgrestTransformBuilder:$O,PostgrestBuilder:YO,PostgrestError:WO}=W3;class J3{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const a=globalThis.process;if(a){const i=a.versions;if(i&&i.node){const l=i.node,o=parseInt(l.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
417import ws from "ws"
418new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let a=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(a+=`
419
420Suggested solution: ${t.workaround}`),new Error(a)}static createWebSocket(t,a){const i=this.getWebSocketConstructor();return new i(t,a)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const X3="2.90.1",Q3=`realtime-js/${X3}`,l1="1.0.0",Z3="2.0.0",Vb=l1,yf=1e4,e5=1e3,t5=100;var Sr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Sr||(Sr={}));var en;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(en||(en={}));var fa;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(fa||(fa={}));var bf;(function(e){e.websocket="websocket"})(bf||(bf={}));var ti;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ti||(ti={}));
420class n5{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,a){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return a(this._binaryEncodeUserBroadcastPush(t));let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return a(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(t){var a;return this._isArrayBuffer((a=t.payload)===null||a===void 0?void 0:a.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var a,i;const l=(i=(a=t.payload)===null||a===void 0?void 0:a.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(t){var a,i;const l=(i=(a=t.payload)===null||a===void 0?void 0:a.payload)!==null&&i!==void 0?i:{},u=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,u)}_encodeUserBroadcastPush(t,a,i){var l,o;const u=t.topic,h=(l=t.ref)!==null&&l!==void 0?l:"",f=(o=t.join_ref)!==null&&o!==void 0?o:"",p=t.payload.event,y=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},b=Object.keys(y).length===0?"":JSON.stringify(y);if(f.length>255)throw new Error(`joinRef length ${f.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`ref length ${h.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`topic length ${u.length} exceeds maximum of 255`);if(p.length>255)throw new Error(`userEvent length ${p.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const x=this.USER_BROADCAST_PUSH_META_LENGTH+f.length+h.length+u.length+p.length+b.length,w=new ArrayBuffer(this.HEADER_LENGTH+x);let N=new DataView(w),A=0;N.setUint8(A++,this.KINDS.userBroadcastPush),N.setUint8(A++,f.length),N.setUint8(A++,h.length),N.setUint8(A++,u.length),N.setUint8(A++,p.length),N.setUint8(A++,b.length),N.setUint8(A++,a),Array.from(f,C=>N.setUint8(A++,C.charCodeAt(0))),Array.from(h,C=>N.setUint8(A++,C.charCodeAt(0))),Array.from(u,C=>N.setUint8(A++,C.charCodeAt(0))),Array.from(p,C=>N.setUint8(A++,C.charCodeAt(0))),Array.from(b,C=>N.setUint8(A++,C.charCodeAt(0)));var _=new Uint8Array(w.byteLength+i.byteLength);return _.set(new Uint8Array(w),0),_.set(new Uint8Array(i),w.byteLength),_.buffer}decode(t,a){if(this._isArrayBuffer(t)){let i=this._binaryDecode(t);return a(i)}if(typeof t=="string"){const i=JSON.parse(t),[l,o,u,h,f]=i;return a({join_ref:l,ref:o,topic:u,event:h,payload:f})}return a({})}_binaryDecode(t){const a=new DataView(t),i=a.getUint8(0),l=new TextDecoder;switch(i){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,a,l)}}_decodeUserBroadcast(t,a,i){const l=a.getUint8(1),o=a.getUint8(2),u=a.getUint8(3),h=a.getUint8(4);let f=this.HEADER_LENGTH+4;const p=i.decode(t.slice(f,f+l));f=f+l;const y=i.decode(t.slice(f,f+o));f=f+o;const b=i.decode(t.slice(f,f+u));f=f+u;const x=t.slice(f,t.byteLength),w=h===this.JSON_ENCODING?JSON.parse(i.decode(x)):x,N={type:this.BROADCAST_EVENT,event:y,payload:w};return u>0&&(N.meta=JSON.parse(b)),{join_ref:null,ref:null,topic:p,event:this.BROADCAST_EVENT,payload:N}}_isArrayBuffer(t){var a;return t instanceof ArrayBuffer||((a=t==null?void 0:t.constructor)===null||a===void 0?void 0:a.name)==="ArrayBuffer"}_pick(t,a){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([i])=>a.includes(i)))}}class o1{constructor(t,a){this.callback=t,this.timerCalc=a,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=a}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var xt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(xt||(xt={}));const Gb=(e,t,a={})=>{var i;const l=(i=a.skipTypes)!==null&&i!==void 0?i:[];return t?Object.keys(t).reduce((o,u)=>(o[u]=a5(u,e,t,l),o),{}):{}},a5=(e,t,a,i)=>{const l=t.find(h=>h.name===e),o=l==null?void 0:l.type,u=a[e];return o&&!i.includes(o)?c1(o,u):xf(u)},c1=(e,t)=>{if(e.charAt(0)==="_"){const a=e.slice(1,e.length);return l5(t,a)}switch(e){case xt.bool:return r5(t);case xt.float4:case xt.float8:case xt.int2:case xt.int4:case xt.int8:case xt.numeric:case xt.oid:return i5(t);case xt.json:case xt.jsonb:return s5(t);case xt.timestamp:return o5(t);case xt.abstime:case xt.date:case xt.daterange:case xt.int4range:case xt.int8range:case xt.money:case xt.reltime:case xt.text:case xt.time:case xt.timestamptz:case xt.timetz:case xt.tsrange:case xt.tstzrange:return xf(t);default:return xf(t)}},xf=e=>e,r5=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},i5=e=>{if(typeof e=="string"){const t=parseFloat(e);
420if(!Number.isNaN(t))return t}return e},s5=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},l5=(e,t)=>{if(typeof e!="string")return e;const a=e.length-1,i=e[a];if(e[0]==="{"&&i==="}"){let o;const u=e.slice(1,a);try{o=JSON.parse("["+u+"]")}catch{o=u?u.split(","):[]}return o.map(h=>c1(t,h))}return e},o5=e=>typeof e=="string"?e.replace(" ","T"):e,u1=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Uh{constructor(t,a,i={},l=yf){this.channel=t,this.event=a,this.payload=i,this.timeout=l,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,a){var i;return this._hasReceived(t)&&a((i=this.receivedResp)===null||i===void 0?void 0:i.response),this.recHooks.push({status:t,callback:a}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=a=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=a,this._matchReceive(a)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,a){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:a})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:a}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(a))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var qb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(qb||(qb={}));class Fl{constructor(t,a){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const i=(a==null?void 0:a.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},l=>{const{onJoin:o,onLeave:u,onSync:h}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Fl.syncState(this.state,l,o,u),this.pendingDiffs.forEach(f=>{this.state=Fl.syncDiff(this.state,f,o,u)}),this.pendingDiffs=[],h()}),this.channel._on(i.diff,{},l=>{const{onJoin:o,onLeave:u,onSync:h}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Fl.syncDiff(this.state,l,o,u),h())}),this.onJoin((l,o,u)=>{this.channel._trigger("presence",{event:"join",key:l,currentPresences:o,newPresences:u})}),this.onLeave((l,o,u)=>{this.channel._trigger("presence",{event:"leave",key:l,currentPresences:o,leftPresences:u})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,a,i,l){const o=this.cloneDeep(t),u=this.transformState(a),h={},f={};return this.map(o,(p,y)=>{u[p]||(f[p]=y)}),this.map(u,(p,y)=>{const b=o[p];if(b){const x=y.map(_=>_.presence_ref),w=b.map(_=>_.presence_ref),N=y.filter(_=>w.indexOf(_.presence_ref)<0),A=b.filter(_=>x.indexOf(_.presence_ref)<0);N.length>0&&(h[p]=N),A.length>0&&(f[p]=A)}else h[p]=y}),this.syncDiff(o,{joins:h,leaves:f},i,l)}static syncDiff(t,a,i,l){const{joins:o,leaves:u}={joins:this.transformState(a.joins),leaves:this.transformState(a.leaves)};return i||(i=()=>{}),l||(l=()=>{}),this.map(o,(h,f)=>{var p;const y=(p=t[h])!==null&&p!==void 0?p:[];if(t[h]=this.cloneDeep(f),y.length>0){const b=t[h].map(w=>w.presence_ref),x=y.filter(w=>b.indexOf(w.presence_ref)<0);t[h].unshift(...x)}i(h,y,f)}),this.map(u,(h,f)=>{let p=t[h];if(!p)return;const y=f.map(b=>b.presence_ref);p=p.filter(b=>y.indexOf(b.presence_ref)<0),t[h]=p,l(h,p,f),p.length===0&&delete t[h]}),t}static map(t,a){return Object.getOwnPropertyNames(t).map(i=>a(i,t[i]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((a,i)=>{const l=t[i];return"metas"in l?a[i]=l.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):a[i]=l,a},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var $b;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})($b||($b={}));var Ol;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Ol||(Ol={}));var Va;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Va||(Va={}));class hs{constructor(t,a={config:{}},i){var l,o;if(this.topic=t,this.params=a,this.socket=i,this.bindings={},this.state=en.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},a.config),this.timeout=this.socket.timeout,this.joinPush=new Uh(this,fa.join,this.params,this.timeout),this.rejoinTimer=new o1(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=en.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(u=>u.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=en.closed,this.socket._remove(this)}),this._onError(u=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,u),this.state=en.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=en.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",u=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,u),this.state=en.errored,this.rejoinTimer.scheduleTimeout())}),this._on(fa.reply,{},(u,h)=>{this._trigger(this._replyEventName(h),u)}),this.presence=new Fl(this),this.broadcastEndpointURL=u1(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,a=this.timeout){var i,l,o;if(this.socket.isConnected()||this.socket.connect(),this.state==en.closed){const{config:{broadcast:u,presence:h,private:f}}=this.params,p=(l=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(w=>w.filter))!==null&&l!==void 0?l:[],y=!!this.bindings[Ol.PRESENCE]&&this.bindings[Ol.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,b={},x={broadcast:u,presence:Object.assign(Object.assign({},h),{enabled:y}),postgres_changes:p,private:f};this.socket.accessTokenValue&&(b.access_token=this.socket.accessTokenValue),this._onError(w=>
420t==null?void 0:t(Va.CHANNEL_ERROR,w)),this._onClose(()=>t==null?void 0:t(Va.CLOSED)),this.updateJoinPayload(Object.assign({config:x},b)),this.joinedOnce=!0,this._rejoin(a),this.joinPush.receive("ok",async({postgres_changes:w})=>{var N;if(this.socket._isManualToken()||this.socket.setAuth(),w===void 0){t==null||t(Va.SUBSCRIBED);return}else{const A=this.bindings.postgres_changes,_=(N=A==null?void 0:A.length)!==null&&N!==void 0?N:0,C=[];for(let T=0;T<_;T++){const j=A[T],{filter:{event:B,schema:Q,table:O,filter:V}}=j,ee=w&&w[T];if(ee&&ee.event===B&&hs.isFilterValueEqual(ee.schema,Q)&&hs.isFilterValueEqual(ee.table,O)&&hs.isFilterValueEqual(ee.filter,V))C.push(Object.assign(Object.assign({},j),{id:ee.id}));else{this.unsubscribe(),this.state=en.errored,t==null||t(Va.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=C,t&&t(Va.SUBSCRIBED);return}}).receive("error",w=>{this.state=en.errored,t==null||t(Va.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(w).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Va.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,a={}){return await this.send({type:"presence",event:"track",payload:t},a.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,a,i){return this.state===en.joined&&t===Ol.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,a,i)}async httpSend(t,a,i={}){var l;if(a==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const u={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:a,private:this.private}]})},h=await this._fetchWithTimeout(this.broadcastEndpointURL,u,(l=i.timeout)!==null&&l!==void 0?l:this.timeout);if(h.status===202)return{success:!0};let f=h.statusText;try{const p=await h.json();f=p.error||p.message||f}catch{}return Promise.reject(new Error(f))}async send(t,a={}){var i,l;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
420in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:u}=t,h={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(h.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f={method:"POST",headers:h,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:u,private:this.private}]})};try{const p=await this._fetchWithTimeout(this.broadcastEndpointURL,f,(i=a.timeout)!==null&&i!==void 0?i:this.timeout);return await((l=p.body)===null||l===void 0?void 0:l.cancel()),p.ok?"ok":"error"}catch(p){return p.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var u,h,f;const p=this._push(t.type,t,a.timeout||this.timeout);t.type==="broadcast"&&!(!((f=(h=(u=this.params)===null||u===void 0?void 0:u.config)===null||h===void 0?void 0:h.broadcast)===null||f===void 0)&&f.ack)&&o("ok"),p.receive("ok",()=>o("ok")),p.receive("error",()=>o("error")),p.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=en.leaving;const a=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(fa.close,"leave",this._joinRef())};this.joinPush.destroy();let i=null;return new Promise(l=>{i=new Uh(this,fa.leave,{},t),i.receive("ok",()=>{a(),l("ok")}).receive("timeout",()=>{a(),l("timed out")}).receive("error",()=>{l("error")}),i.send(),this._canPush()||i.trigger("ok",{})}).finally(()=>{i==null||i.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=en.closed,this.bindings={}}async _fetchWithTimeout(t,a,i){const l=new AbortController,o=setTimeout(()=>l.abort(),i),u=await this.socket.fetch(t,Object.assign(Object.assign({},a),{signal:l.signal}));return clearTimeout(o),u}_push(t,a,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let l=new Uh(this,t,a,i);return this._canPush()?l.send():this._addToPushBuffer(l),l}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>t5){const a=this.pushBuffer.shift();a&&(a.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload))}}_onMessage(t,a,i){return a}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,a,i){var l,o;const u=t.toLocaleLowerCase(),{close:h,error:f,leave:p,join:y}=fa;if(i&&[h,f,p,y].indexOf(u)>=0&&i!==this._joinRef())return;let x=this._onMessage(u,a,i);if(a&&!x)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(u)?(l=this.bindings.postgres_changes)===null||l===void 0||l.filter(w=>{var N,A,_;return((N=w.filter)===null||N===void 0?void 0:N.event)==="*"||((_=(A=w.filter)===null||A===void 0?void 0:A.event)===null||_===void 0?void 0:_.toLocaleLowerCase())===u}).map(w=>w.callback(x,i)):(o=this.bindings[u])===null||o===void 0||o.filter(w=>{var N,A,_,C,T,j,B,Q;if(["broadcast","presence","postgres_changes"].includes(u))if("id"in w){const O=w.id,V=(N=w.filter)===null||N===void 0?void 0:N.event;return O&&((A=a.ids)===null||A===void 0?void 0:A.includes(O))&&(V==="*"||(V==null?void 0:V.toLocaleLowerCase())===((_=a.data)===null||_===void 0?void 0:_.type.toLocaleLowerCase()))&&(!(!((C=w.filter)===null||C===void 0)&&C.table)||w.filter.table===((T=a.data)===null||T===void 0?void 0:T.table))}else{const O=(B=(j=w==null?void 0:w.filter)===null||j===void 0?void 0:j.event)===null||B===void 0?void 0:B.toLocaleLowerCase();return O==="*"||O===((Q=a==null?void 0:a.event)===null||Q===void 0?void 0:Q.toLocaleLowerCase())}else return w.type.toLocaleLowerCase()===u}).map(w=>{if(typeof x=="object"&&"ids"in x){const N=x.data,{schema:A,table:_,commit_timestamp:C,type:T,errors:j}=N;x=Object.assign(Object.assign({},{schema:A,table:_,commit_timestamp:C,eventType:T,new:{},old:{},errors:j}),this._getPayloadRecords(N))}w.callback(x,i)})}_isClosed(){return this.state===en.closed}_isJoined(){return this.state===en.joined}_isJoining(){return this.state===en.joining}_isLeaving(){return this.state===en.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,a,i){const l=t.toLocaleLowerCase(),o={type:l,filter:a,callback:i};return this.bindings[l]?this.bindings[l].push(o):this.bindings[l]=[o],this}_off(t,a){const i=t.toLocaleLowerCase();return this.bindings[i]&&(this.bindings[i]=this.bindings[i].filter(l=>{var o;return!(((o=l.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===i&&hs.isEqual(l.filter,a))})),this}static isEqual(t,a){if(Object.keys(t).length!==Object.keys(a).length)return!1;for(const i in t)if(t[i]!==a[i])return!1;return!0}static isFilterValueEqual(t,a){return(t??void 0)===(a??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(fa.close,{},t)}_onError(t){this._on(fa.error,{},a=>t(a))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=en.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const a={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(a.new=Gb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(a.old=Gb(t.columns,t.old_record)),a}}const Bh=()=>{},yc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},c5=[1e3,2e3,5e3,1e4],u5=1e4,d5=`
421  addEventListener("message", (e) => {
422    if (e.data.event === "start") {
423      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
424    }
425  });`;class h5{constructor(t,a){var i;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=yf,this.transport=null,this.heartbeatIntervalMs=yc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Bh,this.ref=0,this.reconnectTimer=null,this.vsn=Vb,this.logger=Bh,this.conn=null,this.sendBuffer=[],this.serializer
425=new n5,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=l=>l?(...o)=>l(...o):(...o)=>fetch(...o),!(!((i=a==null?void 0:a.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=a.params.apikey,this.endPoint=`${t}/${bf.websocket}`,this.httpEndpoint=u1(t),this._initializeOptions(a),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(a==null?void 0:a.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=J3.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const a=t.message;throw a.includes("Node.js")?new Error(`${a}
426
427To use Realtime in Node.js, you need to provide a WebSocket implementation:
428
429Option 1: Use Node.js 22+ which has native WebSocket support
430Option 2: Install and provide the "ws" package:
431
432  npm install ws
433
434  import ws from "ws"
435  const client = new RealtimeClient(url, {
436    ...options,
437    transport: ws
438  })`):new Error(`WebSocket not available: ${a}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,a){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const i=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(i),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,a??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const a=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),a}async removeAllChannels(){const t=await Promise.all(this.channels.map(a=>a.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,a,i){this.logger(t,a,i)}connectionState(){switch(this.conn&&this.conn.readyState){case Sr.connecting:return ti.Connecting;case Sr.open:return ti.Open;case Sr.closing:return ti.Closing;default:return ti.Closed}}isConnected(){return this.connectionState()===ti.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,a={config:{}}){const i=`realtime:${t}`,l=this.getChannels().find(o=>o.topic===i);if(l)return l;{const o=new hs(`realtime:${t}`,a,this);return this.channels.push(o),o}}push(t){const{topic:a,event:i,payload:l,ref:o}=t,u=()=>{this.encode(t,h=>{var f;(f=this.conn)===null||f===void 0||f.send(h)})};this.log("push",`${a} ${i} (${o})`,l),this.isConnected()?u():this.sendBuffer.push(u)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(a){this.log("error","error in heartbeat callback",a)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(a){this.log("error","error in heartbeat callback",a)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(e5,"heartbeat timeout"),setTimeout(()=>{var a;this.isConnected()||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout()},yc.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(a){this.log("error","error in heartbeat callback",a)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let a=this.channels.find(i=>i.topic===t&&(i._isJoined()||i._isJoining()));a&&(this.log("transport",`leaving duplicate topic "${t}"`),a.unsubscribe())}_remove(t){this.channels=this.channels.filter(a=>a.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,a=>{if(a.topic==="phoenix"&&a.event==="phx_reply"&&a.ref&&a.ref===this.pendingHeartbeatRef){const p=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(a.payload.status==="ok"?"ok":"error",p)}catch(y){this.log("error","error in heartbeat callback",y)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:i,event:l,payload:o,ref:u}=a,h=u?`(${u})`:"",f=o.status||"";this.log("receive",`${f} ${i} ${l} ${h}`.trim(),o),this.channels.filter(p=>
438p._isMember(i)).forEach(p=>p._trigger(l,o,u)),this._triggerStateCallbacks("message",a)})}_clearTimer(t){var a;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((a=this.reconnectTimer)===null||a===void 0||a.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Sr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Sr.open||this.conn.readyState===Sr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(a=>{this.log("error","error waiting for auth on connect",a),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=a=>{this.log("worker","worker error",a.message),this._terminateWorker()},this.workerRef.onmessage=a=>{a.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var a;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(a=this.reconnectTimer)===null||a===void 0||a.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(fa.error))}_appendParams(t,a){if(Object.keys(a).length===0)return t;const i=t.match(/\?/)?"&":"?",l=new URLSearchParams(a);return`${t}${i}${l}`}_workerObjectUrl(t){let a;if(t)a=t;else{const i=new Blob([d5],{type:"application/javascript"});a=URL.createObjectURL(i)}return a}_setConnectionState(t,a=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=a)}async _performAuth(t=null){let a,i=!1;if(t)a=t,i=!0;else if(this.accessToken)try{a=await this.accessToken()}catch(l){this.log("error","Error fetching access token from callback",l),a=this.accessTokenValue}else a=this.accessTokenValue;i?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=a&&(this.accessTokenValue=a,this.channels.forEach(l=>{const o={access_token:a,version:Q3};a&&l.updateJoinPayload(o),l.joinedOnce&&l._isJoined()&&l._push(fa.access_token,{access_token:a})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(a=>{this.log("error",`Error setting auth in ${t}`,a)})}_triggerStateCallbacks(t,a){try{this.stateChangeCallbacks[t].forEach(i=>{try{i(a)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(i){this.log("error",`error triggering ${t} callbacks`,i)}}_setupReconnectionTimer(){this.reconnectTimer=new o1(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},yc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var a,i,l,o,u,h,f,p,y,b,x,w;switch(this.transport=(a=t==null?void 0:t.transport)!==null&&a!==void 0?a:null,this.timeout=(i=t==null?void 0:t.t
438imeout)!==null&&i!==void 0?i:yf,this.heartbeatIntervalMs=(l=t==null?void 0:t.heartbeatIntervalMs)!==null&&l!==void 0?l:yc.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(u=t==null?void 0:t.accessToken)!==null&&u!==void 0?u:null,this.heartbeatCallback=(h=t==null?void 0:t.heartbeatCallback)!==null&&h!==void 0?h:Bh,this.vsn=(f=t==null?void 0:t.vsn)!==null&&f!==void 0?f:Vb,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(p=t==null?void 0:t.reconnectAfterMs)!==null&&p!==void 0?p:(N=>c5[N-1]||u5),this.vsn){case l1:this.encode=(y=t==null?void 0:t.encode)!==null&&y!==void 0?y:((N,A)=>A(JSON.stringify(N))),this.decode=(b=t==null?void 0:t.decode)!==null&&b!==void 0?b:((N,A)=>A(JSON.parse(N)));break;case Z3:this.encode=(x=t==null?void 0:t.encode)!==null&&x!==void 0?x:this.serializer.encode.bind(this.serializer),this.decode=(w=t==null?void 0:t.decode)!==null&&w!==void 0?w:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Pl=class extends Error{constructor(e,t){var a;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((a=t.icebergType)==null?void 0:a.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function f5(e,t,a){const i=new URL(t,e);if(a)for(const[l,o]of Object.entries(a))o!==void 0&&i.searchParams.set(l,o);return i.toString()}async function m5(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function p5(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:a,path:i,query:l,body:o,headers:u}){const h=f5(e.baseUrl,i,l),f=await m5(e.auth),p=await t(h,{method:a,headers:{...o?{"Content-Type":"application/json"}:{},...f,...u},body:o?JSON.stringify(o):void 0}),y=await p.text(),b=(p.headers.get("content-type")||"").includes("application/json"),x=b&&y?JSON.parse(y):y;if(!p.ok){const w=b?x:void 0,N=w==null?void 0:w.error;throw new Pl((N==null?void 0:N.message)??`Request failed with status ${p.status}`,{status:p.status,icebergType:N==null?void 0:N.type,icebergCode:N==null?void 0:N.code,details:w})}return{status:p.status,headers:p.headers,data:x}}}}function bc(e){return e.join("�")}var g5=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:bc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(e,t){const a={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:a})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${bc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${bc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${bc(e.namespace)}`}),!0}catch(t){if(t instanceof Pl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(a){if(a instanceof Pl&&a.status===409)return;throw a}}};function as(e){return e.join("�")}var y5=class{constructor(e,t="",a){this.client=e,this.prefix=t,this.accessDelegation=a}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const a={};return this.accessDelegation&&(a["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables`,body:t,headers:a})).data.metadata}async updateTable(e,t){const a=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":a.data["metadata-location"],metadata:a.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${as(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(a){if(a instanceof Pl&&a.status===404)return!1;throw a}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(a){if(a instanceof Pl&&a.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw a}}},b5=class{constructor(e){var i;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const a=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=p5({baseUrl:a,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(i=e.accessDelegation)==null?void 0:i.join(","),this.namespaceOps=new g5(this.client,t),this.tableOps=new y5(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
438async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},au=class extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}};function Tt(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var x5=class extends au{constructor(e,t,a){super(e),this.name="StorageApiError",this.status=t,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},wf=class extends au{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}};const lm=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),w5=()=>Response,vf=e=>{if(Array.isArray(e))return e.map(a=>vf(a));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([a,i])=>{const l=a.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[l]=vf(i)}),t},v5=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},S5=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function E5(e,t){if(Hl(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var i=a.call(e,t);if(Hl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function N5(e){var t=E5(e,"string");return Hl(t)=="symbol"?t:t+""}function k5(e,t,a){return(t=N5(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Yb(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,i)}return a}function Re(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Yb(Object(a),!0).forEach(function(i){k5(e,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Yb(Object(a)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(a,i))})}return e}const zh=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},A5=async(e,t,a)=>{e instanceof await w5()&&!(a!=null&&a.noResolveJson)?e.json().then(i=>{const l=e.status||500,o=(i==null?void 0:i.statusCode)||l+"";t(new x5(zh(i),l,o))}).catch(i=>{t(new wf(zh(i),i))}):t(new wf(zh(e),e))},_5=(e,t,a,i)=>{const l={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!i?l:(v5(i)?(l.headers=Re({"Content-Type":"application/json"},t==null?void 0:t.headers),l.body=JSON.stringify(i)):l.body=i,t!=null&&t.duplex&&(l.duplex=t.duplex),Re(Re({},l),a))};async function Jl(e,t,a,i,l,o){return new Promise((u,h)=>{e(a,_5(t,i,l,o)).then(f=>{if(!f.ok)throw f;return i!=null&&i.noResolveJson?f:f.json()}).then(f=>u(f)).catch(f=>A5(f,h,i))})}async function Vl(e,t,a,i){return Jl(e,"GET",t,a,i)}async function ha(e,t,a,i,l){return Jl(e,"POST",t,i,l,a)}async function Sf(e,t,a,i,l){return Jl(e,"PUT",t,i,l,a)}async function T5(e,t,a,i){return Jl(e,"HEAD",t,Re(Re({},a),{},{noResolveJson:!0}),i)}async function om(e,t,a,i,l){return Jl(e,"DELETE",t,i,l,a)}var C5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Tt(t))return{data:null,error:t};throw t}}};let d1;d1=Symbol.toStringTag;var j5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[d1]="BlobDownloadBuilder",this.promise=null}asStream(){return new C5(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Tt(t))return{data:null,error:t};throw t}}};const F5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Wb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var O5=class{constructor(e,t={},a,i){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=a,this.fetch=lm(i)}throwOnError(){return this.shouldThrowOnError=!0,this}async uploadOrUpdate(e,t,a,i){var l=this;try{let o;const u=Re(Re({},Wb),i);let h=Re(Re({},l.headers),e==="POST"&&{"x-upsert":String(u.upsert)});const f=u.metadata;
438typeof Blob<"u"&&a instanceof Blob?(o=new FormData,o.append("cacheControl",u.cacheControl),f&&o.append("metadata",l.encodeMetadata(f)),o.append("",a)):typeof FormData<"u"&&a instanceof FormData?(o=a,o.has("cacheControl")||o.append("cacheControl",u.cacheControl),f&&!o.has("metadata")&&o.append("metadata",l.encodeMetadata(f))):(o=a,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType,f&&(h["x-metadata"]=l.toBase64(l.encodeMetadata(f))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!u.duplex&&(u.duplex="half")),i!=null&&i.headers&&(h=Re(Re({},h),i.headers));const p=l._removeEmptyFolders(t),y=l._getFinalPath(p),b=await(e=="PUT"?Sf:ha)(l.fetch,`${l.url}/object/${y}`,o,Re({headers:h},u!=null&&u.duplex?{duplex:u.duplex}:{}));return{data:{path:p,id:b.Id,fullPath:b.Key},error:null}}catch(o){if(l.shouldThrowOnError)throw o;if(Tt(o))return{data:null,error:o};throw o}}async upload(e,t,a){return this.uploadOrUpdate("POST",e,t,a)}async uploadToSignedUrl(e,t,a,i){var l=this;const o=l._removeEmptyFolders(e),u=l._getFinalPath(o),h=new URL(l.url+`/object/upload/sign/${u}`);h.searchParams.set("token",t);try{let f;const p=Re({upsert:Wb.upsert},i),y=Re(Re({},l.headers),{"x-upsert":String(p.upsert)});return typeof Blob<"u"&&a instanceof Blob?(f=new FormData,f.append("cacheControl",p.cacheControl),f.append("",a)):typeof FormData<"u"&&a instanceof FormData?(f=a,f.append("cacheControl",p.cacheControl)):(f=a,y["cache-control"]=`max-age=${p.cacheControl}`,y["content-type"]=p.contentType),{data:{path:o,fullPath:(await Sf(l.fetch,h.toString(),f,{headers:y})).Key},error:null}}catch(f){if(l.shouldThrowOnError)throw f;if(Tt(f))return{data:null,error:f};throw f}}async createSignedUploadUrl(e,t){var a=this;try{let i=a._getFinalPath(e);const l=Re({},a.headers);t!=null&&t.upsert&&(l["x-upsert"]="true");const o=await ha(a.fetch,`${a.url}/object/upload/sign/${i}`,{},{headers:l}),u=new URL(a.url+o.url),h=u.searchParams.get("token");if(!h)throw new au("No token returned by API");return{data:{signedUrl:u.toString(),path:e,token:h},error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Tt(i))return{data:null,error:i};throw i}}async update(e,t,a){return this.uploadOrUpdate("PUT",e,t,a)}async move(e,t,a){var i=this;try{return{data:await ha(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:e,destinationKey:t,de
438stinationBucket:a==null?void 0:a.destinationBucket},{headers:i.headers}),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Tt(l))return{data:null,error:l};throw l}}async copy(e,t,a){var i=this;try{return{data:{path:(await ha(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:e,destinationKey:t,destinationBucket:a==null?void 0:a.destinationBucket},{headers:i.headers})).Key},error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Tt(l))return{data:null,error:l};throw l}}async createSignedUrl(e,t,a){var i=this;try{let l=i._getFinalPath(e),o=await ha(i.fetch,`${i.url}/object/sign/${l}`,Re({expiresIn:t},a!=null&&a.transform?{transform:a.transform}:{}),{headers:i.headers});const u=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return o={signedUrl:encodeURI(`${i.url}${o.signedURL}${u}`)},{data:o,error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Tt(l))return{data:null,error:l};throw l}}async createSignedUrls(e,t,a){var i=this;try{const l=await ha(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:t,paths:e},{headers:i.headers}),o=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return{data:l.map(u=>Re(Re({},u),{},{signedUrl:u.signedURL?encodeURI(`${i.url}${u.signedURL}${o}`):null})),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Tt(l))return{data:null,error:l};throw l}}download(e,t){const a=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),l=i?`?${i}`:"",o=this._getFinalPath(e),u=()=>Vl(this.fetch,`${this.url}/${a}/${o}${l}`,{headers:this.headers,noResolveJson:!0});return new j5(u,this.shouldThrowOnError)}async info(e){var t=this;const a=t._getFinalPath(e);try{return{data:vf(await Vl(t.fetch,`${t.url}/object/info/${a}`,{headers:t.headers})),error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(Tt(i))return{data:null,error:i};throw i}}async exists(e){var t=this;const a=t._getFinalPath(e);try{return await T5(t.fetch,`${t.url}/object/${a}`,{headers:t.headers}),{data:!0,error:null}}catch(i){if(t.shouldThrowOnError)throw i;if(Tt(i)&&i instanceof wf){const l=i.originalError;if([400,404].includes(l==null?void 0:l.status))return{data:!1,error:i}}throw i}}getPublicUrl(e,t){const a=this._getFinalPath(e),i=[],l=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";l!==""&&i.push(l);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",u=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});u!==""&&i.push(u);let h=i.join("&");return h!==""&&(h=`?${h}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${a}${h}`)}}}async remove(e){var t=this;try{return{data:await om(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async list(e,t,a){var i=this;try{const l=Re(Re(Re({},F5),t),{},{prefix:e||""});return{data:await ha(i.fetch,`${i.url}/object/list/${i.bucketId}`,l,{headers:i.headers},a),error:null}}catch(l){if(i.shouldThrowOnError)throw l;if(Tt(l))return{data:null,error:l};throw l}}async listV2(e,t){var a=this;try{const i=Re({},e);return{data:await ha(a.fetch,`${a.url}/object/list-v2/${a.bucketId}`,i,{headers:a.headers},t),error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Tt(i))return{data:null,error:i};throw i}}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const h1="2.90.1",f1={"X-Client-Info":`storage-js/${h1}`};var R5=class{constructor(e,t={},a,i){this.shouldThrowOnError=!1;const l=new URL(e);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase.")),this.url=l.href.replace(/\/$/,""),this.headers=Re(Re({},f1),t),this.fetch=lm(a)}throwOnError(){return this.shouldThrowOnError=!0,this}async listBuckets(e){var t=this;try{const a=t.listBucketOptionsToQueryString(e);return{data:await Vl(t.fetch,`${t.url}/bucket${a}`,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async getBucket(e){var t=this;try{return{data:await Vl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async createBucket(e,t={public:!1}){var a=this;try{return{data:await ha(a.fetch,`${a.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:a.headers}),error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Tt(i))return{data:null,error:i};throw i}}async updateBucket(e,t){var a=this;try{return{data:await Sf(a.fetch,`${a.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:a.headers}),error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Tt(i))return{data:null,error:i};throw i}}async emptyBucket(e){var t=this;try{return{data:await ha(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async deleteBucket(e){var t=this;try{return{data:await om(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},D5=class{constructor(e,t={},a){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Re(Re({},f1),t),this.fetch=lm(a)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await ha(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async listBuckets(e){var t=this;try{const a=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&a.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&a.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&a.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&a.set("sortOrder",e.sortOrder),e!=null&&e.search&&a.set("search",e.search);const i=a.toString(),l=i?`${t.url}/bucket?${i}`:`${t.url}/bucket`;return{data:await Vl(t.fetch,l,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}async deleteBucket(e){var t=this;try{return{data:await om(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Tt(a))return{data:null,error:a};throw a}}from(e){var t=this;if(!S5(e))throw new au("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const a=new b5({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(a,{get(l,o){const u=l[o];return typeof u!="function"?u:async(...h)=>{try{return{data:await u.apply(l,h),error:null}}catch(f){if(i)throw f;return{data:null,error:f}}}}})}};const cm={"X-Client-Info":`storage-js/${h1}`,"Content-Type":"application/json"};
438var m1=class extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Gn(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}var Ph=class extends m1{constructor(e,t,a){super(e),this.name="StorageVectorsApiError",this.status=t,this.statusCode=a}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},L5=class extends m1{constructor(e,t){super(e),this.name="StorageVectorsUnknownError",this.originalError=t}};const um=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),M5=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kb=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),I5=async(e,t,a)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(a!=null&&a.noResolveJson)){const i=e.status||500,l=e;if(typeof l.json=="function")l.json().then(o=>{const u=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Ph(Kb(o),i,u))}).catch(()=>{const o=i+"";t(new Ph(l.statusText||`HTTP ${i} error`,i,o))});else{const o=i+"";t(new Ph(l.statusText||`HTTP ${i} error`,i,o))}}else t(new L5(Kb(e),e))},U5=(e,t,a,i)=>{const l={method:e,headers:(t==null?void 0:t.headers)||{}};return i?(M5(i)?(l.headers=Re({"Content-Type":"application/json"},t==null?void 0:t.headers),l.body=JSON.stringify(i)):l.body=i,Re(Re({},l),a)):l};async function B5(e,t,a,i,l,o){return new Promise((u,h)=>{e(a,U5(t,i,l,o)).then(f=>{if(!f.ok)throw f;if(i!=null&&i.noResolveJson)return f;const p=f.headers.get("content-type");return!p||!p.includes("application/json")?{}:f.json()}).then(f=>u(f)).catch(f=>I5(f,h,i))})}async function qn(e,t,a,i,l){return B5(e,"POST",t,i,l,a)}var z5=class{constructor(e,t={},a){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Re(Re({},cm),t),this.fetch=um(a)}throwOnError(){return this.shouldThrowOnError=!0,this}async createIndex(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{},error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async getIndex(e,t){var a=this;try{return{data:await qn(a.fetch,`${a.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:a.headers}),error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Gn(i))return{data:null,error:i};throw i}}async listIndexes(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async deleteIndex(e,t){var a=this;try{return{data:await qn(a.fetch,`${a.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:a.headers})||{},error:null}}catch(i){if(a.shouldThrowOnError)throw i;if(Gn(i))return{data:null,error:i};throw i}}},P5=class{constructor(e,t={},a){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Re(Re({},cm),t),this.fetch=um(a)}throwOnError(){return this.shouldThrowOnError=!0,this}async putVectors(e){var t=this;try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:await qn(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{},error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async getVectors(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async listVectors(e){var t=this;try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:await qn(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async queryVectors(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async deleteVectors(e){var t=this;try{if(e.keys.length<1||e.keys.length>
438500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:await qn(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{},error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}},H5=class{constructor(e,t={},a){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Re(Re({},cm),t),this.fetch=um(a)}throwOnError(){return this.shouldThrowOnError=!0,this}async createBucket(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async getBucket(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async listBuckets(e={}){var t=this;try{return{data:await qn(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}),error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}async deleteBucket(e){var t=this;try{return{data:await qn(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{},error:null}}catch(a){if(t.shouldThrowOnError)throw a;if(Gn(a))return{data:null,error:a};throw a}}},V5=class extends H5{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new G5(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,a=this;return t().call(a,e)}async getBucket(e){var t=()=>super.getBucket,a=this;return t().call(a,e)}async listBuckets(e={}){var t=()=>super.listBuckets,a=this;return t().call(a,e)}async deleteBucket(e){var t=()=>super.deleteBucket,a=this;return t().call(a,e)}},G5=class extends z5{constructor(e,t,a,i){super(e,t,i),this.vectorBucketName=a}async createIndex(e){var t=()=>super.createIndex,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,a=this;return t().call(a,a.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,a=this;return t().call(a,a.vectorBucketName,e)}index(e){return new q5(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},q5=class extends P5{constructor(e,t,a,i,l){super(e,t,l),this.vectorBucketName=a,this.indexName=i}async putVectors(e){var t=()=>super.putVectors,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async getVectors(e){var t=()=>super.getVectors,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,a=this;return t().call(a,Re(Re({},e),{},{vectorBucketName:a.vectorBucketName,indexName:a.indexName}))}},$5=class extends R5{constructor(e,t={},a,i){super(e,t,a,i)}from(e){return new O5(this.url,this.headers,e,this.fetch)}get vectors(){return new V5(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new D5(this.url+"/iceberg",this.headers,this.fetch)}};const Y5="2.39.0";let _l="";typeof Deno<"u"?_l="deno":typeof document<"u"?_l="web":typeof navigator<"u"&&navigator.product==="ReactNative"?_l="react-native":_l="node";const W5={"X-Client-Info":`supabase-js-${_l}/${Y5}`};var K5=function(e,t,a,i){function l(o){return o instanceof a?o:new a(function(u){u(o)})}return new(a||(a=Promise))(function(o,u){function h(y){try{p(i.next(y))}catch(b){u(b)}}function f(y){try{p(i.throw(y))}catch(b){u(b)}}function p(y){y.done?o(y.value):l(y.value).then(h,f)}p((i=i.apply(e,t||[])).next())})};const J5=e=>{let t;return e?t=e:typeof fetch>"u"?t=t1:t=fetch,(...a)=>t(...a)},X5=()=>typeof Headers>"u"?n1:Headers,Q5=(e,t,a)=>{const i=J5(a),l=X5();return(o,u)=>K5(void 0,void 0,void 0,function*(){var h;const f=(h=yield t())!==null&&h!==void 0?h:e;let p=new l(u==null?void 0:u.headers);return p.has("apikey")||p.set("apikey",e),p.has("Authorization")||p.set("Authorization",`Bearer ${f}`),i(o,Object.assign(Object.assign({},u),{headers:p}))})};function Z5(e){return e.replace(/\/$/,"")}function eF(e,t){const{db:a,auth:i,realtime:l,global:o}=e,{db:u,auth:h,realtime:f,global:p}=t;return{db:Object.assign(Object.assign({},u),a),auth:Object.assign(Object.assign({},h),i),realtime:Object.assign(Object.assign({},f),l),global:Object.assign(Object.assign({},p),o)}}const p1="2.90.1",us=30*1e3,Ef=3,Hh=Ef*us,tF="http://localhost:9999",nF="supabase.auth.token",aF={"X-Client-Info":`gotrue-js/${p1}`},Nf="X-Supabase-Api-Version",g1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},rF=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,iF=600*1e3;
438class Gl extends Error{constructor(t,a,i){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=a,this.code=i}}function Ae(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class sF extends Gl{constructor(t,a,i){super(t,a,i),this.name="AuthApiError",this.status=a,this.code=i}}function lF(e){return Ae(e)&&e.name==="AuthApiError"}class ni extends Gl{constructor(t,a){super(t),this.name="AuthUnknownError",this.originalError=a}}class Wa extends Gl{constructor(t,a,i,l){super(t,i,l),this.name=a,this.status=i}}class Vn extends Wa{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function oF(e){return Ae(e)&&e.name==="AuthSessionMissingError"}class rs extends Wa{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class xc extends Wa{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class wc extends Wa{constructor(t,a=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function cF(e){return Ae(e)&&e.name==="AuthImplicitGrantRedirectError"}class Jb extends Wa{constructor(t,a=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=a}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class uF extends Wa{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class kf extends Wa{constructor(t,a){super(t,"AuthRetryableFetchError",a,void 0)}}function Vh(e){return Ae(e)&&e.name==="AuthRetryableFetchError"}class Xb extends Wa{constructor(t,a,i){super(t,"AuthWeakPasswordError",a,"weak_password"),this.reasons=i}}class Af extends Wa{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Qb=` 	
439\r=`.split(""),dF=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Qb.length;t+=1)e[Qb[t].charCodeAt(0)]=-2;for(let t=0;t<Bc.length;t+=1)e[Bc[t].charCodeAt(0)]=t;return e})();function Zb(e,t,a){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const i=t.queue>>t.queuedBits-6&63;a(Bc[i]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const i=t.queue>>t.queuedBits-6&63;a(Bc[i]),t.queuedBits-=6}}function y1(e,t,a){const i=dF[e];if(i>-1)for(t.queue=t.queue<<6|i,t.queuedBits+=6;t.queuedBits>=8;)a(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function ex(e){const t=[],a=u=>{t.push(String.fromCodePoint(u))},i={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},o=u=>{mF(u,i,a)};for(let u=0;u<e.length;u+=1)y1(e.charCodeAt(u),l,o);return t.join("")}function hF(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function fF(e,t){for(let a=0;a<e.length;a+=1){let i=e.charCodeAt(a);if(i>55295&&i<=56319){const l=(i-55296)*1024&65535;i=(e.charCodeAt(a+1)-56320&65535|l)+65536,a+=1}hF(i,t)}}function mF(e,t,a){if(t.utf8seq===0){if(e<=127){a(e);return}for(let i=1;i<6;i+=1)if((e>>7-i&1)===0){t.utf8seq=i;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&a(t.codepoint)}}function gs(e){const t=[],a={queue:0,queuedBits:0},i=l=>{t.push(l)};for(let l=0;l<e.length;l+=1)y1(e.charCodeAt(l),a,i);return new Uint8Array(t)}function pF(e){const t=[];return fF(e,a=>t.push(a)),new Uint8Array(t)}function ri(e){const t=[],a={queue:0,queuedBits:0},i=l=>{t.push(l)};return e.forEach(l=>Zb(l,a,i)),Zb(null,a,i),t.join("")}function gF(e){return Math.round(Date.now()/1e3)+e}function yF(){return Symbol("auth-callback")}const hn=()=>typeof window<"u"&&typeof document<"u",Xr={tested:!1,writable:!1},b1=()=>
439{if(!hn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Xr.tested)return Xr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Xr.tested=!0,Xr.writable=!0}catch{Xr.tested=!0,Xr.writable=!1}return Xr.writable};function bF(e){const t={},a=new URL(e);if(a.hash&&a.hash[0]==="#")try{new URLSearchParams(a.hash.substring(1)).forEach((l,o)=>{t[o]=l})}catch{}return a.searchParams.forEach((i,l)=>{t[l]=i}),t}const x1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),xF=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ds=async(e,t,a)=>{await e.setItem(t,JSON.stringify(a))},Qr=async(e,t)=>{const a=await e.getItem(t);if(!a)return null;try{return JSON.parse(a)}catch{return a}},dn=async(e,t)=>{await e.removeItem(t)};class ru{constructor(){this.promise=new ru.promiseConstructor((t,a)=>{this.resolve=t,this.reject=a})}}ru.promiseConstructor=Promise;function Gh(e){const t=e.split(".");if(t.length!==3)throw new Af("Invalid JWT structure");for(let i=0;i<t.length;i++)if(!rF.test(t[i]))throw new Af("JWT not in base64url format");return{header:JSON.parse(ex(t[0])),payload:JSON.parse(ex(t[1])),signature:gs(t[2]),raw:{header:t[0],payload:t[1]}}}async function wF(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function vF(e,t){return new Promise((i,l)=>{(async()=>{for(let o=0;o<1/0;o++)try{const u=await e(o);if(!t(o,null,u)){i(u);return}}catch(u){if(!t(o,u)){l(u);return}}})()})}function SF(e){return("0"+e.toString(16)).substr(-2)}function EF(){const t=new Uint32Array(56);if(typeof crypto>"u"){const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=a.length;let l="";for(let o=0;o<56;o++)l+=a.charAt(Math.floor(Math.random()*i));return l}return crypto.getRandomValues(t),Array.from(t,SF).join("")}async function NF(e){const a=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",a),l=new Uint8Array(i);return Array.from(l).map(o=>String.fromCharCode(o)).join("")}async function kF(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const a=await NF(e);return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function is(e,t,a=!1){const i=EF();let l=i;a&&(l+="/PASSWORD_RECOVERY"),await ds(e,`${t}-code-verifier`,l);const o=await kF(i);return[o,i===o?"plain":"s256"]}const AF=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function _F(e){const t=e.headers.get(Nf);if(!t||!t.match(AF))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function TF(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function CF(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const jF=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ss(e){if(!jF.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function qh(){const e={};return new Proxy(e,{get:(t,a)=>{if(a==="__isUserNotAvailableProxy")return!0;if(typeof a=="symbol"){const i=a.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${a}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,a)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${a}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function FF(e,t){return new Proxy(e,{get:(a,i,l)=>{if(i==="__isInsecureUserWarningProxy")return!0;
439if(typeof i=="symbol"){const o=i.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(a,i,l)}return!t.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(a,i,l)}})}function tx(e){return JSON.parse(JSON.stringify(e))}const ei=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),OF=[502,503,504];async function nx(e){var t;if(!xF(e))throw new kf(ei(e),0);if(OF.includes(e.status))throw new kf(ei(e),e.status);let a;try{a=await e.json()}catch(o){throw new ni(ei(o),o)}let i;const l=_F(e);if(l&&l.getTime()>=g1["2024-01-01"].timestamp&&typeof a=="object"&&a&&typeof a.code=="string"?i=a.code:typeof a=="object"&&a&&typeof a.error_code=="string"&&(i=a.error_code),i){if(i==="weak_password")throw new Xb(ei(a),e.status,((t=a.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(i==="session_not_found")throw new Vn}else if(typeof a=="object"&&a&&typeof a.weak_password=="object"&&a.weak_password&&Array.isArray(a.weak_password.reasons)&&a.weak_password.reasons.length&&a.weak_password.reasons.reduce((o,u)=>o&&typeof u=="string",!0))throw new Xb(ei(a),e.status,a.weak_password.reasons);throw new sF(ei(a),e.status||500,i)}const RF=(e,t,a,i)=>{const l={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),l.body=JSON.stringify(i),Object.assign(Object.assign({},l),a))};async function Oe(e,t,a,i){var l;const o=Object.assign({},i==null?void 0:i.headers);o[Nf]||(o[Nf]=g1["2024-01-01"].name),i!=null&&i.jwt&&(o.Authorization=`Bearer ${i.jwt}`);const u=(l=i==null?void 0:i.query)!==null&&l!==void 0?l:{};i!=null&&i.redirectTo&&(u.redirect_to=i.redirectTo);const h=Object.keys(u).length?"?"+new URLSearchParams(u).toString():"",f=await DF(e,t,a+h,{headers:o,noResolveJson:i==null?void 0:i.noResolveJson},{},i==null?void 0:i.body);return i!=null&&i.xform?i==null?void 0:i.xform(f):{data:Object.assign({},f),error:null}}async function DF(e,t,a,i,l,o){const u=RF(t,i,l,o);let h;try{h=await e(a,Object.assign({},u))}catch(f){throw console.error(f),new kf(ei(f),0)}if(h.ok||await nx(h),i!=null&&i.noResolveJson)return h;try{return await h.json()}catch(f){await nx(f)}}function da(e){var t;let a=null;IF(e)&&(a=Object.assign({},e),e.expires_at||(a.expires_at=gF(e.expires_in)));const i=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:a,user:i},error:null}}function ax(e){const t=da(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((a,i)=>a&&typeof i=="string",!0)&&(t.data.weak_password=e.weak_password),t}function kr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function LF(e){return{data:e,error:null}}function MF(e){const{action_link:t,email_otp:a,hashed_token:i,redirect_to:l,verification_type:o}=e,u=nu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),h={action_link:t,email_otp:a,hashed_token:i,redirect_to:l,verification_type:o},f=Object.assign({},u);return{data:{properties:h,user:f},error:null}}function rx(e){return e}function IF(e){return e.access_token&&e.refresh_token&&e.expires_in}const $h=["global","local","others"];class UF{constructor({url:t="",headers:a={},fetch:i}){this.url=t,this.headers=a,this.fetch=x1(i),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,a=$h[0]){if($h.indexOf(a)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${$h.join(", ")}`);try{return await Oe(this.fetch,"POST",`${this.url}/logout?scope=${a}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(i){if(Ae(i))return{data:null,error:i};throw i}}async inviteUserByEmail(t,a={}){try{return await Oe(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:a.data},headers:this.headers,redirectTo:a.redirectTo,xform:kr})}catch(i){if(Ae(i))return{data:{user:null},error:i};throw i}}async generateLink(t){try{const{options:a}=t,i=nu(t,["options"]),l=Object.assign(Object.assign({},i),a);return"newEmail"in i&&(l.new_email=i==null?void 0:i.newEmail,delete l.newEmail),await Oe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:MF,redirectTo:a==null?void 0:a.redirectTo})}catch(a){if(Ae(a))return{data:{properties:null,user:null},error:a};throw a}}async createUser(t){try{return await Oe(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:kr})}catch(a){if(Ae(a))return{data:{user:null},error:a};throw a}}async listUsers(t){var a,i,l,o,u,h,f;try{const p={nextPage:null,lastPage:0,total:0},y=await Oe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(a=t==null?void 0:t.page)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:"",per_page:(o=(l=t==null?void 0:t.perPage)===null||l===void 0?void 0:l.toString())!==null&&o!==void 0?o:""},xform:rx});if(y.error)throw y.error;const b=await y.json(),x=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(f=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(N=>{const A=parseInt(N.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(N.split(";")[1].split("=")[1]);p[`${_}Page`]=A}),p.total=parseInt(x)),{data:Object.assign(Object.assign({},b),p),error:null}}catch(p){if(Ae(p))return{data:{users:[]},error:p};throw p}}async getUserById(t){ss(t);try{return await Oe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:kr})}catch(a){if(Ae(a))return{data:{user:null},error:a};throw a}}async updateUserById(t,a){ss(t);try{return await Oe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:a,headers:this.headers,xform:kr})}catch(i){if(Ae(i))return{data:{user:null},error:i};throw i}}async deleteUser(t,a=!1){ss(t);
439try{return await Oe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:a},xform:kr})}catch(i){if(Ae(i))return{data:{user:null},error:i};throw i}}async _listFactors(t){ss(t.userId);try{const{data:a,error:i}=await Oe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:a,error:i}}catch(a){if(Ae(a))return{data:null,error:a};throw a}}async _deleteFactor(t){ss(t.userId),ss(t.id);try{return{data:await Oe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(a){if(Ae(a))return{data:null,error:a};throw a}}async _listOAuthClients(t){var a,i,l,o,u,h,f;try{const p={nextPage:null,lastPage:0,total:0},y=await Oe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(a=t==null?void 0:t.page)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:"",per_page:(o=(l=t==null?void 0:t.perPage)===null||l===void 0?void 0:l.toString())!==null&&o!==void 0?o:""},xform:rx});if(y.error)throw y.error;const b=await y.json(),x=(u=y.headers.get("x-total-count"))!==null&&u!==void 0?u:0,w=(f=(h=y.headers.get("link"))===null||h===void 0?void 0:h.split(","))!==null&&f!==void 0?f:[];return w.length>0&&(w.forEach(N=>{const A=parseInt(N.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(N.split(";")[1].split("=")[1]);p[`${_}Page`]=A}),p.total=parseInt(x)),{data:Object.assign(Object.assign({},b),p),error:null}}catch(p){if(Ae(p))return{data:{clients:[]},error:p};throw p}}async _createOAuthClient(t){try{return await Oe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Ae(a))return{data:null,error:a};throw a}}async _getOAuthClient(t){try{return await Oe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Ae(a))return{data:null,error:a};throw a}}async _updateOAuthClient(t,a){try{return await Oe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:a,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Ae(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(t){try{return await Oe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(a){if(Ae(a))return{data:null,error:a};throw a}}async _regenerateOAuthClientSecret(t){try{return await Oe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:a=>({data:a,error:null})})}catch(a){if(Ae(a))return{data:null,error:a};throw a}}}function ix(e={}){return{getItem:t=>e[t]||null,setItem:(t,a)=>{e[t]=a},removeItem:t=>{delete e[t]}}}const ls={debug:!!(globalThis&&b1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class w1 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class BF extends w1{}async function zF(e,t,a){ls.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const i=new globalThis.AbortController;return t>0&&setTimeout(()=>{i.abort(),ls.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async l=>{if(l){ls.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,l.name);try{return await a()}finally{ls.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,l.name)}}else{if(t===0)throw ls.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new BF(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ls.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await a()}}))}function PF(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function v1(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
439" is invalid.`);return e.toLowerCase()}function HF(e){return parseInt(e,16)}function VF(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,i=>i.toString(16).padStart(2,"0")).join("")}function GF(e){var t;const{chainId:a,domain:i,expirationTime:l,issuedAt:o=new Date,nonce:u,notBefore:h,requestId:f,resources:p,scheme:y,uri:b,version:x}=e;{if(!Number.isInteger(a))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${a}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(u&&u.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${u}`);if(!b)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(x!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${x}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
440`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const w=v1(e.address),N=y?`${y}://${i}`:i,A=e.statement?`${e.statement}
441`:"",_=`${N} wants you to sign in with your Ethereum account:
442${w}
443
444${A}`;let C=`URI: ${b}
445Version: ${x}
446Chain ID: ${a}${u?`
447Nonce: ${u}`:""}
448Issued At: ${o.toISOString()}`;if(l&&(C+=`
449Expiration Time: ${l.toISOString()}`),h&&(C+=`
450Not Before: ${h.toISOString()}`),f&&(C+=`
451Request ID: ${f}`),p){let T=`
452Resources:`;for(const j of p){if(!j||typeof j!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${j}`);T+=`
453- ${j}`}C+=T}return`${_}
454${C}`}class Yt extends Error{constructor({message:t,code:a,cause:i,name:l}){var o;super(t,{cause:i}),this.__isWebAuthnError=!0,this.name=(o=l??(i instanceof Error?i.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=a}}class zc extends Yt{constructor(t,a){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:a,message:t}),this.name="WebAuthnUnknownError",this.originalError=a}}function qF({error:e,options:t}){var a,i,l;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Yt({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((a=o.authenticatorSelection)===null||a===void 0?void 0:a.requireResidentKey)===!0)return new Yt({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Yt({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((l=o.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new Yt({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Yt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(h=>h.type==="public-key").length===0?new Yt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Yt({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const u=window.location.hostname;if(S1(u)){if(o.rp.id!==u)return new Yt({message:`The RP ID "${o.rp.id}
454" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Yt({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Yt({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function $F({error:e,options:t}){const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Yt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Yt({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(S1(i)){if(a.rpId!==i)return new Yt({message:`The RP ID "${a.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Yt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Yt({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Yt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class YF{createNewAbortSignal(){if(this.controller){const a=new Error("Cancelling existing WebAuthn API call for new one");a.name="AbortError",this.controller.abort(a)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const WF=new YF;function KF(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:a,excludeCredentials:i}=e,l=nu(e,["challenge","user","excludeCredentials"]),o=gs(t).buffer,u=Object.assign(Object.assign({},a),{id:gs(a.id).buffer}),h=Object.assign(Object.assign({},l),{challenge:o,user:u});if(i&&i.length>0){h.excludeCredentials=new Array(i.length);for(let f=0;f<i.length;f++){const p=i[f];h.excludeCredentials[f]=Object.assign(Object.assign({},p),{id:gs(p.id).buffer,type:p.type||"public-key",transports:p.transports})}}return h}function JF(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:a}=e,i=nu(e,["challenge","allowCredentials"]),l=gs(t).buffer,o=Object.assign(Object.assign({},i),{challenge:l});if(a&&a.length>0){o.allowCredentials=new Array(a.length);for(let u=0;u<a.length;u++){const h=a[u];o.allowCredentials[u]=Object.assign(Object.assign({},h),{id:gs(h.id).buffer,type:h.type||"public-key",transports:h.transports})}}return o}function XF(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const a=e;return{id:e.id,rawId:e.id,response:{attestationObject:ri(new Uint8Array(e.response.attestationObject)),clientDataJSON:ri(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=a.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function QF(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const a=e,i=e.getClientExtensionResults(),l=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ri(new Uint8Array(l.authenticatorData)),clientDataJSON:ri(new Uint8Array(l.clientDataJSON)),signature:ri(new Uint8Array(l.signature)),userHandle:l.userHandle?ri(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(t=a.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function S1(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function sx(){var e,t;return!!(hn()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function ZF(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zc("Browser returned unexpected credential type",t)}:{data:null,error:new zc("Empty credential response",t)}}
454catch(t){return{data:null,error:qF({error:t,options:e})}}}async function e4(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new zc("Browser returned unexpected credential type",t)}:{data:null,error:new zc("Empty credential response",t)}}catch(t){return{data:null,error:$F({error:t,options:e})}}}const t4={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},n4={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Pc(...e){const t=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),a=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),i={};for(const l of e)if(l)for(const o in l){const u=l[o];if(u!==void 0)if(Array.isArray(u))i[o]=u;else if(a(u))i[o]=u;else if(t(u)){const h=i[o];t(h)?i[o]=Pc(h,u):i[o]=Pc(u)}else i[o]=u}return i}function a4(e,t){return Pc(t4,e,t||{})}function r4(e,t){return Pc(n4,e,t||{})}class i4{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:a,friendlyName:i,signal:l},o){try{const{data:u,error:h}=await this.client.mfa.challenge({factorId:t,webauthn:a});if(!u)return{data:null,error:h};const f=l??WF.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:p}=u.webauthn.credential_options.publicKey;p.name||(p.name=`${p.id}:${i}`),p.displayName||(p.displayName=p.name)}switch(u.webauthn.type){case"create":{const p=a4(u.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:y,error:b}=await ZF({publicKey:p,signal:f});return y?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const p=r4(u.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:y,error:b}=await e4(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:p,signal:f}));return y?{data:{factorId:t,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(u){return Ae(u)?{data:null,error:u}:{data:null,error:new ni("Unexpected error in challenge",u)}}}async _verify({challengeId:t,factorId:a,webauthn:i}){return this.client.mfa.verify({factorId:a,challengeId:t,webauthn:i})}async _authenticate({factorId:t,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},o){if(!a)return{data:null,error:new Gl("rpId is required for WebAuthn authentication")};try{if(!sx())return{data:null,error:new ni("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this.challenge({factorId:t,webauthn:{rpId:a,rpOrigins:i},signal:l},{request:o});if(!u)return{data:null,error:h};const{webauthn:f}=u;return this._verify({factorId:t,challengeId:u.challengeId,webauthn:{type:f.type,rpId:a,rpOrigins:i,credential_response:f.credential_response}})}catch(u){return Ae(u)?{data:null,error:u}:{data:null,error:new ni("Unexpected error in authenticate",u)}}}async _register({friendlyName:t,webauthn:{rpId:a=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},o){if(!a)return{data:null,error:new Gl("rpId is required for WebAuthn registration")};try{if(!sx())return{data:null,error:new ni("Browser does not support WebAuthn",null)};const{data:u,error:h}=await this._enroll({friendlyName:t});if(!u)return await this.client.mfa.listFactors().then(y=>{var b;return(b=y.data)===null||b===void 0?void 0:b.all.find(x=>x.factor_type==="webauthn"&&x.friendly_name===t&&x.status!=="unverified")}).then(y=>y?this.client.mfa.unenroll({factorId:y==null?void 0:y.id}):void 0),{data:null,error:h};const{data:f,error:p}=await this._challenge({factorId:u.id,friendlyName:u.friendly_name,webauthn:{rpId:a,rpOrigins:i},signal:l},{create:o});return f?this._verify({factorId:u.id,challengeId:f.challengeId,webauthn:{rpId:a,rpOrigins:i,type:f.webauthn.type,credential_response:f.webauthn.credential_response}}):{data:null,error:p}}catch(u){return Ae(u)?{data:null,error:u}:{data:null,error:new ni("Unexpected error in register",u)}}}}PF();const s4={url:tF,storageKey:nF,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:aF,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function lx(e,t,a){return await a()}const os={};class ql{get jwks(){var t,a;return(a=(t=os[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&a!==void 0?a:{keys:[]}}set jwks(t){os[this.storageKey]=Object.assign(Object.assign({},os[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,a;return(a=(t=os[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&a!==void 0?a:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){os[this.storageKey]=Object.assign(Object.assign({},os[this.storageKey]),{cachedAt:t})}constructor(t){var a,i,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},s4),t);if(this.storageKey=o.storageKey,this.instanceID=(a=ql.nextInstanceID[this.storageKey])!==null&&a!==void 0?a:0,ql.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&hn()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new UF({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=x1(o.fetch),this.lock=o.lock||lx,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&hn()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=zF:this.lock=lx,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new i4(this)}
454,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:b1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ix(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=ix(this.memoryStorage)),hn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u),await this._notifyAllSubscribers(u.data.event,u.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${p1}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let a={},i="none";if(hn()&&(a=bF(window.location.href),this._isImplicitGrantCallback(a)?i="implicit":await this._isPKCECallback(a)&&(i="pkce")),hn()&&this.detectSessionInUrl&&i!=="none"){const{data:l,error:o}=await this._getSessionFromURL(a,i);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),cF(o)){const f=(t=o.details)===null||t===void 0?void 0:t.code;if(f==="identity_already_exists"||f==="identity_not_found"||f==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:u,redirectType:h}=l;return this._debug("#_initialize()","detected session in URL",u,"redirect type",h),await this._saveSession(u),setTimeout(async()=>{h==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",u):await this._notifyAllSubscribers("SIGNED_IN",u)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(a){return Ae(a)?this._returnResult({error:a}):this._returnResult({error:new ni("Unexpected error during initialization",a)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var a,i,l;try{const o=await Oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(l=t==null?void 0:t.options)===null||l===void 0?void 0:l.captchaToken}},xform:da}),{data:u,error:h}=o;if(h||!u)return this._returnResult({data:{user:null,session:null},error:h});const f=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(o){if(Ae(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var a,i,l;try{let o;if("email"in t){const{email:y,password:b,options:x}=t;let w=null,N=null;this.flowType==="pkce"&&([w,N]=await is(this.storage,this.storageKey)),o=await Oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:x==null?void 0:x.emailRedirectTo,body:{email:y,password:b,data:(a=x==null?void 0:x.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken},code_challenge:w,code_challenge_method:N},xform:da})}else if("phone"in t){const{phone:y,password:b,options:x}=t;o=await Oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:b,data:(i=x==null?void 0:x.data)!==null&&i!==void 0?i:{},channel:(l=x==null?void 0:x.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:x==null?void 0:x.captchaToken}},xform:da})}else throw new xc("You must provide either an email or phone number and a password");const{data:u,error:h}=o;if(h||!u)return await dn(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:h});const f=u.session,p=u.user;return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers("SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(o){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let a;if("email"in t){const{email:o,password:u,options:h}=t;a=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:u,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:ax})}else if("phone"in t){const{phone:o,password:u,options:h}=t;a=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:u,gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:ax})}else throw new xc("You must provide either an email or phone number and a password");const{data:i,error:l}=a;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!i||!i.session||!i.user){const o=new rs;return this._returnResult({data:{user:null,session:null},error:o})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:l})}catch(a){if(Ae(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOAuth(t){var a,i,l,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(a=t.options)===null||a===void 0?void 0:a.redirectTo,scopes:(i=t.options)===null||i===void 0?void 0:i.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(o=t.o
454ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:a}=t;switch(a){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${a}"`)}}async signInWithEthereum(t){var a,i,l,o,u,h,f,p,y,b,x;let w,N;if("message"in t)w=t.message,N=t.signature;else{const{chain:A,wallet:_,statement:C,options:T}=t;let j;if(hn())if(typeof _=="object")j=_;else{const q=window;if("ethereum"in q&&typeof q.ethereum=="object"&&"request"in q.ethereum&&typeof q.ethereum.request=="function")j=q.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof _!="object"||!(T!=null&&T.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=_}const B=new URL((a=T==null?void 0:T.url)!==null&&a!==void 0?a:window.location.href),Q=await j.request({method:"eth_requestAccounts"}).then(q=>q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!Q||Q.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const O=v1(Q[0]);let V=(i=T==null?void 0:T.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!V){const q=await j.request({method:"eth_chainId"});V=HF(q)}const ee={domain:B.host,address:O,statement:C,uri:B.href,version:"1",chainId:V,nonce:(l=T==null?void 0:T.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(u=(o=T==null?void 0:T.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&u!==void 0?u:new Date,expirationTime:(h=T==null?void 0:T.signInWithEthereum)===null||h===void 0?void 0:h.expirationTime,notBefore:(f=T==null?void 0:T.signInWithEthereum)===null||f===void 0?void 0:f.notBefore,requestId:(p=T==null?void 0:T.signInWithEthereum)===null||p===void 0?void 0:p.requestId,resources:(y=T==null?void 0:T.signInWithEthereum)===null||y===void 0?void 0:y.resources};w=GF(ee),N=await j.request({method:"personal_sign",params:[VF(w),O]})}try{const{data:A,error:_}=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:N},!((b=t.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(x=t.options)===null||x===void 0?void 0:x.captchaToken}}:null),xform:da});if(_)throw _;if(!A||!A.session||!A.user){const C=new rs;return this._returnResult({data:{user:null,session:null},error:C})}return A.session&&(await this._saveSession(A.session),await this._notifyAllSubscribers("SIGNED_IN",A.session)),this._returnResult({data:Object.assign({},A),error:_})}catch(A){if(Ae(A))return this._returnResult({data:{user:null,session:null},error:A});throw A}}async signInWithSolana(t){var a,i,l,o,u,h,f,p,y,b,x,w;let N,A;if("message"in t)N=t.message,A=t.signature;else{const{chain:_,wallet:C,statement:T,options:j}=t;let B;if(hn())if(typeof C=="object")B=C;else{const O=window;if("solana"in O&&typeof O.solana=="object"&&("signIn"in O.solana&&typeof O.solana.signIn=="function"||"signMessage"in O.solana&&typeof O.solana.signMessage=="function"))B=O.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof C!="object"||!(j!=null&&j.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");B=C}const Q=new URL((a=j==null?void 0:j.url)!==null&&a!==void 0?a:window.location.href);if("signIn"in B&&B.signIn){const O=await B.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},j==null?void 0:j.signInWithSolana),{version:"1",domain:Q.host,uri:Q.href}),T?{statement:T}:null));let V;if(Array.isArray(O)&&O[0]&&typeof O[0]=="object")V=O[0];else if(O&&typeof O=="object"&&"signedMessage"in O&&"signature"in O)V=O;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in V&&"signature"in V&&(typeof V.signedMessage=="string"||V.signedMessage instanceof Uint8Array)&&V.signature instanceof Uint8Array)N=typeof V.signedMessage=="string"?V.signedMessage:new TextDecoder().decode(V.signedMessage),A=V.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in B)||typeof B.signMessage!="function"||!("publicKey"in B)||typeof B!="object"||!B.publicKey||!("toBase58"in B.publicKey)||typeof B.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");N=[`${Q.host} wants you to sign in with your Solana account:`,B.publicKey.toBase58(),...T?["",T,""]:[""],"Version: 1",`URI: ${Q.href}`,`Issued At: ${(l=(i=j==null?void 0:j.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((o=j==null?void 0:j.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${j.signInWithSolana.notBefore}`]:[],...!((u=j==null?void 0:j.signInWithSolana)===null||u===void 0)&&u.expirationTime?[`Expiration Time: ${j.signInWithSolana.expirationTime}`]:[],...!((h=j==null?void 0:j.signInWithSolana)===null||h===void 0)&&h.
454chainId?[`Chain ID: ${j.signInWithSolana.chainId}`]:[],...!((f=j==null?void 0:j.signInWithSolana)===null||f===void 0)&&f.nonce?[`Nonce: ${j.signInWithSolana.nonce}`]:[],...!((p=j==null?void 0:j.signInWithSolana)===null||p===void 0)&&p.requestId?[`Request ID: ${j.signInWithSolana.requestId}`]:[],...!((b=(y=j==null?void 0:j.signInWithSolana)===null||y===void 0?void 0:y.resources)===null||b===void 0)&&b.length?["Resources",...j.signInWithSolana.resources.map(V=>`- ${V}`)]:[]].join(`
455`);const O=await B.signMessage(new TextEncoder().encode(N),"utf8");if(!O||!(O instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");A=O}}try{const{data:_,error:C}=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:N,signature:ri(A)},!((x=t.options)===null||x===void 0)&&x.captchaToken?{gotrue_meta_security:{captcha_token:(w=t.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:da});if(C)throw C;if(!_||!_.session||!_.user){const T=new rs;return this._returnResult({data:{user:null,session:null},error:T})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:C})}catch(_){if(Ae(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async _exchangeCodeForSession(t){const a=await Qr(this.storage,`${this.storageKey}-code-verifier`),[i,l]=(a??"").split("/");try{if(!i&&this.flowType==="pkce")throw new uF;const{data:o,error:u}=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:i},xform:da});if(await dn(this.storage,`${this.storageKey}-code-verifier`),u)throw u;if(!o||!o.session||!o.user){const h=new rs;return this._returnResult({data:{user:null,session:null,redirectType:null},error:h})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:l??null}),error:u})}catch(o){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:a,provider:i,token:l,access_token:o,nonce:u}=t,h=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:l,access_token:o,nonce:u,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:da}),{data:f,error:p}=h;if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!f||!f.session||!f.user){const y=new rs;return this._returnResult({data:{user:null,session:null},error:y})}return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",f.session)),this._returnResult({data:f,error:p})}catch(a){if(Ae(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithOtp(t){var a,i,l,o,u;try{if("email"in t){const{email:h,options:f}=t;let p=null,y=null;this.flowType==="pkce"&&([p,y]=await is(this.storage,this.storageKey));const{error:b}=await Oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:h,data:(a=f==null?void 0:f.data)!==null&&a!==void 0?a:{},create_user:(i=f==null?void 0:f.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:y},redirectTo:f==null?void 0:f.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:b})}if("phone"in t){const{phone:h,options:f}=t,{data:p,error:y}=await Oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:h,data:(l=f==null?void 0:f.data)!==null&&l!==void 0?l:{},create_user:(o=f==null?void 0:f.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},channel:(u=f==null?void 0:f.channel)!==null&&u!==void 0?u:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:p==null?void 0:p.message_id},error:y})}throw new xc("You must provide either an email or phone number.")}catch(h){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(h))return this._returnResult({data:{user:null,session:null},error:h});throw h}}async verifyOtp(t){var a,i;try{let l,o;"options"in t&&(l=(a=t.options)===null||a===void 0?void 0:a.redirectTo,o=(i=t.options)===null||i===void 0?void 0:i.captchaToken);const{data:u,error:h}=await Oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:l,xform:da});if(h)throw h;if(!u)throw new Error("An error occurred on token verification.");const f=u.session,p=u.user;return f!=null&&f.access_token&&(await this._saveSession(f),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",f)),this._returnResult({data:{user:p,session:f},error:null})}catch(l){if(Ae(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(t){var a,i,l,o,u;try{let h=null,f=null;this.flowType==="pkce"&&([h,f]=await is(this.storage,this.storageKey));const p=await Oe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(i=(a=t.options)===null||a===void 0?void 0:a.redirectTo)!==null&&i!==void 0?i:void 0}),!((l=t==null?void 0:t.options)===null||l===void 0)&&l.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:h,code_challenge_method:f}),headers:this.headers,xform:LF});return!((o=p.data)===null||o===void 0)&&o.url&&hn()&&!(!((u=t.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(p.data.url),this._returnResult(p)}catch(h){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(h))return this._returnResult({data:null,error:h});throw h}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:a},error:i}=t;if(i)throw i;if(!a)throw new Vn;const{error:l}=await Oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:a.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(t){if(Ae(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const a=`${this.url}/resend`;if("email"in t){const{email:i,type:l,options:o}=t,{error:u}=await Oe(this.fetch,"POST",a,{headers:this.headers,body:{email:i,type:l,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in t){const{phone:i,type:l,options:o}=t,{data:u,error:h}=await Oe(this.fetch,"POST",a,{headers:this.headers,body:{phone:i,type:l,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h})}throw new xc("You must provide either an email or phone number and a type")}catch(a){if(Ae(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async a=>a))}async _acquireLock(t,a){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await i,await a()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=a();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const a=await this.__loadSession();return await t(a)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const a=await Qr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",a),a!==null&&(this._isValidSession(a)?t=a:(this._debug("#getSession()","session from storage is not val
455id"),await this._removeSession())),!t)return{data:{session:null},error:null};const i=t.expires_at?t.expires_at*1e3-Date.now()<Hh:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",t.expires_at),!i){if(this.userStorage){const u=await Qr(this.userStorage,this.storageKey+"-user");u!=null&&u.user?t.user=u.user:t.user=qh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const u={value:this.suppressGetSessionWarning};t.user=FF(t.user,u),u.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:l,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const a=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return a.data.user&&(this.suppressGetSessionWarning=!0),a}async _getUser(t){try{return t?await Oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:kr}):await this._useSession(async a=>{var i,l,o;const{data:u,error:h}=a;if(h)throw h;return!(!((i=u.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Vn}:await Oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(l=u.session)===null||l===void 0?void 0:l.access_token)!==null&&o!==void 0?o:void 0,xform:kr})})}catch(a){if(Ae(a))return oF(a)&&(await this._removeSession(),await dn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:a});throw a}}async updateUser(t,a={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,a))}async _updateUser(t,a={}){try{return await this._useSession(async i=>{const{data:l,error:o}=i;if(o)throw o;if(!l.session)throw new Vn;const u=l.session;let h=null,f=null;this.flowType==="pkce"&&t.email!=null&&([h,f]=await is(this.storage,this.storageKey));const{data:p,error:y}=await Oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:a==null?void 0:a.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:h,code_challenge_method:f}),jwt:u.access_token,xform:kr});if(y)throw y;return u.user=p.user,await this._saveSession(u),await this._notifyAllSubscribers("USER_UPDATED",u),this._returnResult({data:{user:u.user},error:null})})}catch(i){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(i))return this._returnResult({data:{user:null},error:i});throw i}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Vn;const a=Date.now()/1e3;let i=a,l=!0,o=null;const{payload:u}=Gh(t.access_token);if(u.exp&&(i=u.exp,l=i<=a),l){const{data:h,error:f}=await this._callRefreshToken(t.refresh_token);if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!h)return{data:{user:null,session:null},error:null};o=h}else{const{data:h,error:f}=await this._getUser(t.access_token);if(f)throw f;o={access_token:t.access_token,refresh_token:t.refresh_token,user:h.user,token_type:"bearer",expires_in:i-a,expires_at:i},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(a){if(Ae(a))return this._returnResult({data:{session:null,user:null},error:a});throw a}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async a=>{var i;if(!t){const{data:u,error:h}=a;if(h)throw h;t=(i=u.session)!==null&&i!==void 0?i:void 0}if(!(t!=null&&t.refresh_token))throw new Vn;const{data:l,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(a){if(Ae(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async _getSessionFromURL(t,a){try{if(!hn())throw new wc("No browser detected.");
455if(t.error||t.error_description||t.error_code)throw new wc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(a){case"implicit":if(this.flowType==="pkce")throw new Jb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new wc("Not a valid implicit grant flow url.");break;default:}if(a==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Jb("No code detected.");const{data:T,error:j}=await this._exchangeCodeForSession(t.code);if(j)throw j;const B=new URL(window.location.href);return B.searchParams.delete("code"),window.history.replaceState(window.history.state,"",B.toString()),{data:{session:T.session,redirectType:null},error:null}}const{provider_token:i,provider_refresh_token:l,access_token:o,refresh_token:u,expires_in:h,expires_at:f,token_type:p}=t;if(!o||!h||!u||!p)throw new wc("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(h);let x=y+b;f&&(x=parseInt(f));const w=x-y;w*1e3<=us&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${b}s`);const N=x-b;y-N>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",N,x,y):y-N<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",N,x,y);const{data:A,error:_}=await this._getUser(o);if(_)throw _;const C={provider_token:i,provider_refresh_token:l,access_token:o,expires_in:b,expires_at:x,refresh_token:u,token_type:p,user:A.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:C,redirectType:t.type},error:null})}catch(i){if(Ae(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const a=await Qr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&a)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async a=>{var i;const{data:l,error:o}=a;if(o)return this._returnResult({error:o});const u=(i=l.session)===null||i===void 0?void 0:i.access_token;if(u){const{error:h}=await this.admin.signOut(u,t);if(h&&!(lF(h)&&(h.status===404||h.status===401||h.status===403)))return this._returnResult({error:h})}return t!=="others"&&(await this._removeSession(),await dn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const a=yF(),i={id:a,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",a),this.stateChangeEmitters.delete(a)}};return this._debug("#onAuthStateChange()","registered callback with id",a),this.stateChangeEmitters.set(a,i),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(a)})))(),{data:{subscription:i}}}async _emitInitialSession(t){return await this._useSession(async a=>{var i,l;try{const{data:{session:o},error:u}=a;if(u)throw u;await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((l=this.stateChangeEmitters.get(t))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,a={}){let i=null,l=null;this.flowType==="pkce"&&([i,l]=await is(this.storage,this.storageKey,!0));try{return await Oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:i,code_challenge_method:l,gotrue_meta_security:{captcha_token:a.captchaToken}},headers:this.headers,redirectTo:a.redirectTo})}catch(o){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:a,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(t=a.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var a;try{const{data:i,error:l}=await this._useSession(async o=>{var u,h,f,p,y;const{data:b,error:x}=o;if(x)throw x;const w=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(u=t.options)===null||u===void 0?void 0:u.redirectTo,scopes:(h=t.options)===null||h===void 0?void 0:h.scopes,queryParams:(f=t.options)===null||f===void 0?void 0:f.queryParams,skipBrowserRedirect:!0});return await Oe(this.fetch,"GET",w,{headers:this.headers,jwt:(y=(p=b.session)===null||p===void 0?void 0:p.access_token)!==null&&y!==void 0?y:void 0})});if(l)throw l;return hn()&&!(!((a=t.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(i==null?void 0:i.url),this._returnResult({data:{provider:t.provider,url:i==null?void 0:i.url},error:null})}catch(i){if(Ae(i))return this._returnResult({data:{provider:t.provider,url:null},error:i});throw i}}async linkIdentityIdToken(t){return await this._useSession(async a=>{var i;try{const{error:l,data:{session:o}}=a;if(l)throw l;const{options:u,provider:h,token:f,access_token:p,nonce:y}=t,b=await Oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=o==null?void 0:o.access_token)!==null&&i!==void 0?i:void 0,body:{provider:h,id_token:f,access_token:p,nonce:y,link_identity:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:da}),{data:x,error:w}=b;return w?this._returnResult({data:{user:null,session:null},error:w}):!x||!x.session||!x.user?this._returnResult({data:{user:null,session:null},error:new rs}):(x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("USER_UPDATED",x.session)),this._returnResult({data:x,error:w}))}catch(l){if(await dn(this.storage,`${this.storageKey}-code-verifier`),Ae(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(t){try{return await this._useSession(async a=>{var i,l;const{data:o,error:u}=a;if(u)throw u;
455return await Oe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(l=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0})})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async _refreshAccessToken(t){const a=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(a,"begin");try{const i=Date.now();return await vF(async l=>(l>0&&await wF(200*Math.pow(2,l-1)),this._debug(a,"refreshing attempt",l),await Oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:da})),(l,o)=>{const u=200*Math.pow(2,l);return o&&Vh(o)&&Date.now()+u-i<us})}catch(i){if(this._debug(a,"error",i),Ae(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(a,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,a){const i=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:a.redirectTo,scopes:a.scopes,queryParams:a.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",a,"url",i),hn()&&!a.skipBrowserRedirect&&window.location.assign(i),{data:{provider:t,url:i},error:null}}async _recoverAndRefresh(){var t,a;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const l=await Qr(this.storage,this.storageKey);if(l&&this.userStorage){let u=await Qr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!u&&(u={user:l.user},await ds(this.userStorage,this.storageKey+"-user",u)),l.user=(t=u==null?void 0:u.user)!==null&&t!==void 0?t:qh()}else if(l&&!l.user&&!l.user){const u=await Qr(this.storage,this.storageKey+"-user");u&&(u!=null&&u.user)?(l.user=u.user,await dn(this.storage,this.storageKey+"-user"),await ds(this.storage,this.storageKey,l)):l.user=qh()}if(this._debug(i,"session from storage",l),!this._isValidSession(l)){this._debug(i,"session is not valid"),l!==null&&await this._removeSession();return}const o=((a=l.expires_at)!==null&&a!==void 0?a:1/0)*1e3-Date.now()<Hh;if(this._debug(i,`session has${o?"":" not"} expired with margin of ${Hh}s`),o){if(this.autoRefreshToken&&l.refresh_token){const{error:u}=await this._callRefreshToken(l.refresh_token);u&&(console.error(u),Vh(u)||(this._debug(i,"refresh failed with a non-retryable error, removing the session",u),await this._removeSession()))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:u,error:h}=await this._getUser(l.access_token);!h&&(u!=null&&u.user)?(l.user=u.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(u){console.error("Error getting user data:",u),this._debug(i,"error getting user data, skipping SIGNED_IN notification",u)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(i,"error",l),console.error(l);return}finally{this._debug(i,"end")}}async _callRefreshToken(t){var a,i;if(!t)throw new Vn;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const l=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(l,"begin");try{this.refreshingDeferred=new ru;const{data:o,error:u}=await this._refreshAccessToken(t);if(u)throw u;if(!o.session)throw new Vn;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const h={data:o.session,error:null};return this.refreshingDeferred.resolve(h),h}catch(o){if(this._debug(l,"error",o),Ae(o)){const u={data:null,error:o};return Vh(o)||await this._removeSession(),(a=this.refreshingDeferred)===null||a===void 0||a.resolve(u),u}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(o),o}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(t,a,i=!0){const l=`#_notifyAllSubscribers(${t})`;this._debug(l,"begin",a,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:t,session:a});const o=[],u=Array.from(this.stateChangeEmitters.values()).map(async h=>{try{await h.callback(t,a)}catch(f){o.push(f)}});if(await Promise.all(u),o.length>0){for(let h=0;h<o.length;h+=1)console.error(o[h]);throw o[0]}}finally{this._debug(l,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await dn(this.storage,`${this.storageKey}-code-verifier`);const a=Object.assign({},t),i=a.user&&a.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&a.user&&await ds(this.userStorage,this.storageKey+"-user",{user:a.user});const l=Object.assign({},a);delete l.user;const o=tx(l);await ds(this.storage,this.storageKey,o)}else{const l=tx(a);await ds(this.storage,this.storageKey,l)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await dn(this.storage,this.storageKey),await dn(this.storage,this.storageKey+"-code-verifier"),await dn(this.storage,this.storageKey+"-user"),this.userStorage&&await dn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&hn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
455catch(a){console.error("removing visibilitychange callback failed",a)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),us);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const a=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=a,a&&typeof a=="object"&&typeof a.unref=="function"?a.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(a)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const a=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,a&&clearTimeout(a)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async a=>{const{data:{session:i}}=a;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((i.expires_at*1e3-t)/us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${us}ms, refresh threshold is ${Ef} ticks`),l<=Ef&&await this._callRefreshToken(i.refresh_token)})}catch(a){console.error("Auto refresh tick failed with error. This is likely a transient error.",a)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof w1)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!hn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const a=`#_onVisibilityChanged(${t})`;this._debug(a,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(a,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,a,i){const l=[`provider=${encodeURIComponent(a)}`];if(i!=null&&i.redirectTo&&l.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i!=null&&i.scopes&&l.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[o,u]=await is(this.storage,this.storageKey),h=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(u)}`});l.push(h.toString())}if(i!=null&&i.queryParams){const o=new URLSearchParams(i.queryParams);l.push(o.toString())}return i!=null&&i.skipBrowserRedirect&&l.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${t}?${l.join("&")}`}async _unenroll(t){try{return await this._useSession(async a=>{var i;const{data:l,error:o}=a;return o?this._returnResult({data:null,error:o}):await Oe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(i=l==null?void 0:l.session)===null||i===void 0?void 0:i.access_token})})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async _enroll(t){try{return await this._useSession(async a=>{var i,l;const{data:o,error:u}=a;if(u)return this._returnResult({data:null,error:u});const h=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:f,error:p}=await Oe(this.fetch,"POST",`${this.url}/factors`,{body:h,headers:this.headers,jwt:(i=o==null?void 0:o.session)===null||i===void 0?void 0:i.access_token});return p?this._returnResult({data:null,error:p}):(t.factorType==="totp"&&f.type==="totp"&&(!((l=f==null?void 0:f.totp)===null||l===void 0)&&l.qr_code)&&(f.totp.qr_code=`data:image/svg+xml;utf-8,${f.totp.qr_code}`),this._returnResult({data:f,error:null}))})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async a=>{var i;const{data:l,error:o}=a;if(o)return this._returnResult({data:null,error:o});const u=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?XF(t.webauthn.credential_response):QF(t.webauthn.credential_response)})}:{code:t.code}),{data:h,error:f}=await Oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:u,headers:this.headers,jwt:(i=l==null?void 0:l.session)===null||i===void 0?void 0:i.access_token});return f?this._returnResult({data:null,error:f}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+h.expires_in},h)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",h),this._returnResult({data:h,error:f}))})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async a=>{var i;const{data:l,error:o}=a;if(o)return this._returnResult({data:null,error:o});const u=await Oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(i=l==null?void 0:l.session)===null||i===void 0?void 0:i.access_token});if(u.error)return u;const{data:h}=u;if(h.type!=="webauthn")return{data:h,error:null};switch(h.webauthn.type){case"create":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:KF(h.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},h),{webauthn:Object.assign(Object.assign({},h.webauthn),{credential_options:Object.assign(Object.assign({},h.webauthn.credential_options),{publicKey:JF(h.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}})}async _challengeAndVerify(t){const{data:a,error:i}=await this._challenge({factorId:t.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:t.factorId,challengeId:a.id,code:t.code})}async _listFactors(){var t;const{data:{user:a},error:i}=await this.getUser();if(i)return{data:null,error:i};const l={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=a==null?void 0:a.factors)!==null&&t!==void 0?t:[])l.all.push(o),o.status==="verified"&&l[o.factor_type].push(o);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(){var t,a;const{data:{session:i},error:l}
455=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Gh(i.access_token);let u=null;o.aal&&(u=o.aal);let h=u;((a=(t=i.user.factors)===null||t===void 0?void 0:t.filter(y=>y.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(h="aal2");const p=o.amr||[];return{data:{currentLevel:u,nextLevel:h,currentAuthenticationMethods:p},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async a=>{const{data:{session:i},error:l}=a;return l?this._returnResult({data:null,error:l}):i?await Oe(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:i.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Vn})})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async _approveAuthorization(t,a){try{return await this._useSession(async i=>{const{data:{session:l},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!l)return this._returnResult({data:null,error:new Vn});const u=await Oe(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&hn()&&!(a!=null&&a.skipBrowserRedirect)&&window.location.assign(u.data.redirect_url),u})}catch(i){if(Ae(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(t,a){try{return await this._useSession(async i=>{const{data:{session:l},error:o}=i;if(o)return this._returnResult({data:null,error:o});if(!l)return this._returnResult({data:null,error:new Vn});const u=await Oe(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:h=>({data:h,error:null})});return u.data&&u.data.redirect_url&&hn()&&!(a!=null&&a.skipBrowserRedirect)&&window.location.assign(u.data.redirect_url),u})}catch(i){if(Ae(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:a},error:i}=t;return i?this._returnResult({data:null,error:i}):a?await Oe(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:a.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new Vn})})}catch(t){if(Ae(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async a=>{const{data:{session:i},error:l}=a;return l?this._returnResult({data:null,error:l}):i?(await Oe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Vn})})}catch(a){if(Ae(a))return this._returnResult({data:null,error:a});throw a}}async fetchJwk(t,a={keys:[]}){let i=a.keys.find(h=>h.kid===t);if(i)return i;const l=Date.now();if(i=this.jwks.keys.find(h=>h.kid===t),i&&this.jwks_cached_at+iF>l)return i;const{data:o,error:u}=await Oe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(u)throw u;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=l,i=o.keys.find(h=>h.kid===t),!i)?null:i}async getClaims(t,a={}){try{let i=t;if(!i){const{data:w,error:N}
455=await this.getSession();if(N||!w.session)return this._returnResult({data:null,error:N});i=w.session.access_token}const{header:l,payload:o,signature:u,raw:{header:h,payload:f}}=Gh(i);a!=null&&a.allowExpired||TF(o.exp);const p=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,a!=null&&a.keys?{keys:a.keys}:a==null?void 0:a.jwks);if(!p){const{error:w}=await this.getUser(i);if(w)throw w;return{data:{claims:o,header:l,signature:u},error:null}}const y=CF(l.alg),b=await crypto.subtle.importKey("jwk",p,y,!0,["verify"]);if(!await crypto.subtle.verify(y,b,u,pF(`${h}.${f}`)))throw new Af("Invalid JWT signature");return{data:{claims:o,header:l,signature:u},error:null}}catch(i){if(Ae(i))return this._returnResult({data:null,error:i});throw i}}}ql.nextInstanceID={};class l4 extends ql{constructor(t){super(t)}}var o4=function(e,t,a,i){function l(o){return o instanceof a?o:new a(function(u){u(o)})}return new(a||(a=Promise))(function(o,u){function h(y){try{p(i.next(y))}catch(b){u(b)}}function f(y){try{p(i.throw(y))}catch(b){u(b)}}function p(y){y.done?o(y.value):l(y.value).then(h,f)}p((i=i.apply(e,t||[])).next())})};const c4={headers:W5},u4={schema:"public"},d4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},h4={};class f4{constructor(t,a,i){var l,o,u,h,f,p,y,b;if(this.supabaseUrl=t,this.supabaseKey=a,!t)throw new Error("supabaseUrl is required.");if(!a)throw new Error("supabaseKey is required.");const x=Z5(t);this.realtimeUrl=`${x}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${x}/auth/v1`,this.storageUrl=`${x}/storage/v1`,this.functionsUrl=`${x}/functions/v1`;const w=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,N={db:u4,realtime:h4,auth:Object.assign(Object.assign({},d4),{storageKey:w}),global:c4},A=eF(i??{},N);this.storageKey=(o=(l=A.auth)===null||l===void 0?void 0:l.storageKey)!==null&&o!==void 0?o:"",this.headers=(h=(u=A.global)===null||u===void 0?void 0:u.headers)!==null&&h!==void 0?h:{},this.auth=this._initSupabaseAuthClient((f=A.auth)!==null&&f!==void 0?f:{},this.headers,(p=A.global)===null||p===void 0?void 0:p.fetch),this.fetch=Q5(a,this._getAccessToken.bind(this),(y=A.global)===null||y===void 0?void 0:y.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},A.realtime)),this.rest=new K3(`${x}/rest/v1`,{headers:this.headers,schema:(b=A.db)===null||b===void 0?void 0:b.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new U3(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new $5(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,a={},i){return this.rest.rpc(t,a,i)}channel(t,a={config:{}}){return this.realtime.channel(t,a)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,a;return o4(this,void 0,void 0,function*(){const{data:i}=yield this.auth.getSession();return(a=(t=i.session)===null||t===void 0?void 0:t.access_token)!==null&&a!==void 0?a:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:a,detectSessionInUrl:i,storage:l,storageKey:o,flowType:u,debug:h},f,p){const y={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new l4({url:this.authUrl,headers:Object.assign(Object.assign({},y),f),storageKey:o,autoRefreshToken:t,persistSession:a,detectSessionInUrl:i,storage:l,flowType:u,debug:h,fetch:p})}_initRealtimeClient(t){return new h5(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((a,i)=>{this._handleTokenChanged(a,"CLIENT",i==null?void 0:i.access_token)})}_handleTokenChanged(t,a,i){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==i?(this.realtime.setAuth(i??null),this.changedAccessToken=i):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),a=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const m4=(e,t,a)=>new f4(e,t,a),Yh={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ADMIN_EMAIL:"[email protected]",VITE_MAILERLITE_API_KEY:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI0IiwianRpIjoiMTJkZDU2NDZmMmQ5ZTFlM2NlODUzZTRjNTAxNjA1NjhkNmVmM2E3ZDE0ZDE5MTcxOTQ5MWQwMzJhNTliOTNmYzEwYTMzNzIxZjYxYTU5MzEiLCJpYXQiOjE3NjU3MjAxNzYuMjIyMzcyLCJuYmYiOjE3NjU3MjAxNzYuMjIyMzc1LCJleHAiOjQ5MjEzOTM3NzYuMjE1MDc5LCJzdWIiOiIxNTQ4ODI1Iiwic2NvcGVzIjpbXX0.XZ3-izA4dq38SJNkwaJ4Ww8JuxsZmNLD8Rmmiryx1YckzY9Hvrmd8b8la8dAYWD6_pBVIiCgukBHvfi72zF5fS6Si6REVtsuylzYU9Y_NQ8rfD9c-poJRxjMxoDeh5Q1GmrEKnRPnE2scahJwJgoaY5Aq9FJ_xB8Hg2S9KD2B1SbS3VPJLBrrBQO4TPQkmL_hxrHl8MaC0M-SCC0IAjax71hwduck0Tq2GsYRWRfHf2BEdQlTvmI3E7aE01TqqEenT0ysFRnTljSqxIijv2BA5LkIps4VxCIh52CFmP2bzHFtbv9huleEfVEFfhhhs2VxoHGaBZTUOJzeUW-X38eSsZToFLwBfORSkno7MmZfdkytMjKqu9A8p9PN_lZkUMRwPTyzVgzy_5h0NrFb8UQfJ77LCOHnxEsSN7GFKsMWSqqLrEkCyTu6NJHW5awGRTY3BOcYx5_eBVgKw3qDvqFWveGnMPww6v2XdRSLfWum8qVO2qUOhzwEWfrycRKivYkVY9BKeH6Yhfrk9XQfIX6YKCWEu50-5Hmnp0ZGL_UXsaODpHVU4XyNt1822YNu8VHbHl4hPPfhplt5GSFsTMMtRYgJxEtuJQSAaUUV205o19cd5c6SuOmyGwYuUBaV3r4-W86LV87govG1uQ5gxZO-poRXptnjcgCGeptclrLqIE",VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56bm5ldGV3emNvZW9xbWV4Z2hmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU2Nzg1NTQsImV4cCI6MjA4MTI1NDU1NH0.IMHtmGsikxBUOGq9oO35pdhzIRlpZ9l3jBBKRfX3-10",VITE_SUPABASE_URL:"https://api.matchups.ai",VITE_VERCEL_BRANCH_URL:"matchups-git-main-dribgibs-projects.vercel.app",VITE_VERCEL_DEPLOYMENT_ID:"dpl_CAhUyzE2qQ4MAf4Yy6ByDr2fX5rk",VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"dribgib",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Colton Joseph",VITE_VERCEL_GIT_COMMIT_MESSAGE:"Hide shutdown banner on homepage",VITE_VERCEL_GIT_COMMIT_REF:"main",VITE_VERCEL_GIT_COMMIT_SHA:"c4ea747a871d521e5537dd5df5563f9dde4c0b14",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"1115999812",VITE_VERCEL_GIT_REPO_OWNER:"dribgib",VITE_VERCEL_GIT_REPO_SLUG:"matchups",VITE_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"6598e8659ebe799a/script.
455js","viewEndpoint":"6598e8659ebe799a/view","eventEndpoint":"6598e8659ebe799a/event","sessionEndpoint":"6598e8659ebe799a/session"},"speedInsights":{"scriptSrc":"f4838483436b0aa7/script.js","endpoint":"f4838483436b0aa7/vitals"}}',VITE_VERCEL_PROJECT_ID:"prj_pzCYAWqwNm39ymlFlsbDx8MiAlrO",VITE_VERCEL_PROJECT_PRODUCTION_URL:"matchups.ai",VITE_VERCEL_TARGET_ENV:"production",VITE_VERCEL_URL:"matchups-5yr5ybuna-dribgibs-projects.vercel.app"};var Wh={};const E1=e=>{try{if(typeof import.meta<"u"&&Yh&&Yh[e])return Yh[e]}catch{}try{if(typeof process<"u"&&Wh&&Wh[e])return Wh[e]}catch{}return""},p4="https://api.matchups.ai",g4=E1("VITE_SUPABASE_URL")||p4,y4="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56bm5ldGV3emNvZW9xbWV4Z2hmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU2Nzg1NTQsImV4cCI6MjA4MTI1NDU1NH0.IMHtmGsikxBUOGq9oO35pdhzIRlpZ9l3jBBKRfX3-10",b4=E1("VITE_SUPABASE_ANON_KEY")||y4,De=m4(g4,b4,{auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0,storageKey:"matchups-auth-token",storage:typeof window<"u"?window.localStorage:void 0}}),dm=(e,t)=>Date.now(),ai={},ox=100,Cr={games:60*1e3,predictions:120*1e3,stats:3600*1e3},jr=(e,t)=>{const a=ai[e];return a&&Date.now()-a.timestamp<t?a.data:(a&&delete ai[e],null)},Fr=(e,t)=>{const a=Object.keys(ai);a.length>=ox&&a.sort((o,u)=>ai[o].timestamp-ai[u].timestamp).slice(0,Math.ceil(ox/4)).forEach(o=>delete ai[o]),ai[e]={data:t,timestamp:Date.now()}},x4=async()=>{try{const{count:e,error:t}=await De.from("games").select("*",{count:"exact",head:!0});return!t}catch{return!1}},w4=async()=>{const{data:e,error:t}=await De.from("stats").select("val").eq("id","global").maybeSingle();return t||!e?0:e.val.lastCalculated||0},v4=async e=>{const t=await Dl();t.lastCalculated=e,await C4(t)},S4=async e=>{const t=e.map(a=>({id:a.id,val:a}));await De.from("games").upsert(t)},E4=async e=>{await De.from("games").delete().eq("id",e)},Rl=async(e=!1)=>{const t="games_schedule";if(!e){const f=jr(t,Cr.games);if(f)return f}const a=new Date;a.setDate(a.getDate()-1);const i=a.toISOString(),l=new Date;l.setDate(l.getDate()+8);const o=l.toISOString(),{data:u}=await De.from("games").select("val").gte("val->>date",i).lte("val->>date",o).order("val->>date",{ascending:!0}).limit(2e3),h=u?u.map(f=>f.val).filter(f=>{var p;return!((p=f.id)!=null&&p.startsWith("mm"))}):[];return dm(`getGames DB query (${h.length} games)`),Fr(t,h),h},KO=async e=>{if(e.length===0)return[];const t=200;let a=[];for(let i=0;i<e.length;i+=t){const l=e.slice(i,i+t),{data:o}=await De.from("games").select("val").in("id",l);o&&(a=[...a,...o.map(u=>u.val)])}return a},N4=async e=>{const t={id:e.idTeam||e.id,name:e.strTeam||e.name,league_id:e.idLeague||"0",badge_url:e.strBadge||e.logoUrl||e.strTeamBadge,val:e};await De.from("teams").upsert(t)},k4=async()=>{const{data:e}=await De.from("teams").select("*"),t={},a={};return e&&e.forEach(i=>{const l=i.val||{},o={id:i.id,name:i.name||l.strTeam,logoUrl:i.badge_url||l.strBadge||l.strTeamBadge||"",primaryColor:l.strColour1||"#333333",abbreviation:l.strTeamShort||(i.name?Ct(i.name):"UNK")};if(o.id&&(t[o.id]=o),o.name){const u=o.name.toLowerCase(),h=a[u];(!h||!h.logoUrl&&o.logoUrl)&&(a[u]=o)}}),{byId:t,byName:a}},_f=async e=>{await De.from("predictions").upsert({id:e.id,game_id:e.gameId,user_id:e.userId,type:"game",val:e})},JO=async e=>{await De.from("predictions").delete().eq("id",e)},A4=async(e=!1)=>{const t="predictions_game";if(!e){const o=jr(t,Cr.predictions);if(o)return o}const a=Date.now()-10080*60*1e3,{data:i}=await De.from("predictions").select("val").eq("type","game").or(`val->>startTime.gte.${a},val->>lastUpdated.gte.${a}`).limit(500),l=i?i.map(o=>o.val):[];return dm(`getAllGamePredictions DB query (${l.length} items)`),Fr(t,l),l},XO=async e=>{const t=Date.now()-e*24*60*60*1e3;let a=[],i=0;const l=1e3;let o=!0;for(;o;){const{data:u,error:h}=await De.from("predictions").select("val").eq("type","game").gte("val->>startTime",t).order("val->>startTime",{ascending:!1}).range(i*l,(i+1)*l-1);if(h){console.error("History fetch error:",h),o=!1;break}if(u&&u.length>0?(a=a.concat(u.map(f=>f.val)),u.length<l?o=!1:i++):o=!1,i>10)break}return a},QO=async e=>{new Date(Date.now()-e*24*60*60*1e3).toISOString();const{data:t,error:a}=await De.from("props_predictions").select("id, game_id, val").or("val->>status.eq.graded,val->>status.eq.completed").gte("val->>startTime",Date.now()-e*24*60*60*1e3).order("val->>startTime",{ascending:!1}).limit(500);return a?(console.error("Props history fetch error:",a),[]):t||[]},ZO=async e=>{const{count:t}=await De.from("props_predictions").select("*",{count:"exact",head:!0}),a=t||0,l=[["Date","Sport","Player","Team","Opponent","Prop Type","Line","Pick","Odds","Confidence","Result","Actual Value"].join(",")+`
456`];let o=0;const u=1e3;let h=0,f=!0;const p=y=>`"${(y||"").replace(/"/g,'""')}"`;for(;f;){const{data:y}=await De.from("props_predictions").select("val").or("val->>status.eq.graded,val->>status.eq.completed").order("val->>startTime",{ascending:!1}).range(h*u,(h+1)*u-1);if(!y||y.length===0){f=!1;break}const b=y.map(x=>{var O,V,ee,q,E,G,D;const w=x.val;if(!w)return null;const N=w.startTime?Wt(new Date(w.startTime),"yyyy-MM-dd HH:mm"):"",A=((O=w.prop)==null?void 0:O.displayName)||((V=w.prop)==null?void 0:V.type)||"",_=((q=(ee=w.prop)==null?void 0:ee.line)==null?void 0:q.toString())||"",C=((E=w.prop)==null?void 0:E.position)||"",T=((D=(G=w.prop)==null?void 0:G.odds)==null?void 0:D.toString())||"",j=w.confidence?`${Math.round(w.confidence)}%`:"";let B="PENDING",Q="";return w.result&&(B=w.result.hit?"HIT":"MISS",w.result.actualValue!==void 0&&(Q=w.result.actualValue.toString())),[p(N),p(w.sport||""),p(w.playerName||""),p(w.team||""),p(w.opponent||""),p(A),p(_),p(C),p(T),p(j),p(B),p(Q)].join(",")}
456).filter(Boolean);l.push(b.join(`
457`)+`
458`),o+=y.length,e&&e(o,a),y.length<u&&(f=!1),h++,await new Promise(x=>setTimeout(x,5))}return new Blob(l,{type:"text/csv;charset=utf-8;"})},eR=async e=>{const{count:t}=await De.from("predictions").select("*",{count:"exact",head:!0}).eq("type","game"),a=t||0,l=[["Date","Sport","Away Team","Home Team","Pick","Confidence","Result","Score","Updates"].join(",")+`
459`];let o=0;const u=1e3;let h=0,f=!0;const p=y=>`"${(y||"").replace(/"/g,'""')}"`;for(;f;){const{data:y}=await De.from("predictions").select("val").eq("type","game").order("val->>startTime",{ascending:!1}).range(h*u,(h+1)*u-1);if(!y||y.length===0){f=!1;break}const b=y.map(A=>A.val),x=Array.from(new Set(b.map(A=>A.gameId))),w=new Map;for(let A=0;A<x.length;A+=200){const _=x.slice(A,A+200),{data:C}=await De.from("games").select("val").in("id",_);C&&C.forEach(T=>w.set(T.val.id,T.val))}const N=b.map(A=>{var ee;const _=w.get(A.gameId);if(!_||!A.result)return null;let C=A.result.winnerId;const T=Number(A.result.homeScorePrediction),j=Number(A.result.awayScorePrediction);!isNaN(T)&&!isNaN(j)&&(T>j?C=_.homeTeam.id:j>T&&(C=_.awayTeam.id));const B=C===_.homeTeam.id?_.homeTeam.name:C===_.awayTeam.id?_.awayTeam.name:"Unknown";let Q="PENDING";if(_.completed&&_.homeScore!==void 0&&_.awayScore!==void 0)if(Number(_.homeScore)===Number(_.awayScore))Q="PUSH";else{const q=_.homeScore>_.awayScore?_.homeTeam.id:_.awayTeam.id;Q=C===q?"HIT":"MISS"}const O=_.homeScore!==void 0&&_.awayScore!==void 0?`${_.awayScore}-${_.homeScore}`:"",V=((ee=A.result.updates)==null?void 0:ee.length)||0;return[p(Wt(new Date(_.date),"yyyy-MM-dd")),p(_.sport),p(_.awayTeam.name),p(_.homeTeam.name),p(B),p(Math.round(A.result.confidence*(A.result.confidence<=1?100:1)).toString()+"%"),p(Q),p(O?`="${O}"`:""),p(V.toString())].join(",")}).filter(Boolean);l.push(N.join(`
460`)+`
461`),o+=b.length,e&&e(o,a),b.length<u&&(f=!1),h++,await new Promise(A=>setTimeout(A,5))}return new Blob(l,{type:"text/csv;charset=utf-8;"})},Tf=async e=>{await De.from("predictions").upsert({id:e.id,game_id:e.gameId,user_id:e.userId,type:"props",val:e})},_4=async(e=!1)=>{const t="predictions_props";if(!e){const o=jr(t,Cr.predictions);if(o)return o}const a=Date.now()-7200*60*1e3,{data:i}=await De.from("predictions").select("val").eq("type","props").gte("val->>startTime",a).limit(500),l=i?i.map(o=>o.val):[];return dm(`getAllPropsPredictions DB query (${l.length} items)`),Fr(t,l),l},Hc=async e=>await De.from("users").upsert({id:e.id,email:e.email,val:e}),T4=async e=>{const{data:t}=await De.from("users").select("val").eq("email",e).maybeSingle();return t?t.val:void 0},va=async e=>{const{data:t}=await De.from("users").select("val").eq("id",e).maybeSingle();return t?t.val:void 0},Dl=async(e=!1)=>{const t="global_stats";if(!e){const i=jr(t,Cr.stats);if(i)return i}try{const{data:i,error:l}=await De.from("stats").select("val").eq("id","global").maybeSingle();if(l&&console.error("[Storage] Supabase stats fetch error:",l.message),i&&i.val){const o=i.val;return Fr(t,o),o}}catch(i){console.error("[Storage] Supabase stats fetch failed:",i)}return{id:"global",totalPredictions:0,correctPredictions:0,lastCalculated:0}},C4=async e=>{await De.from("stats").upsert({id:"global",val:e})},j4=async e=>{},tR=async(e=!1)=>{const t="golf_tournaments";if(!e){const u=jr(t,Cr.games);if(u)return u}const a=new Date;a.setDate(a.getDate()-30);const i=new Date;i.setDate(i.getDate()+60);const{data:l}=await De.from("tournaments").select("id, val").gte("val->>date",a.toISOString()).lte("val->>date",i.toISOString()).order("val->>date",{ascending:!0}).limit(100),o=l?l.map(u=>({id:u.id,...u.val})):[];return Fr(t,o),o},F4=async e=>{await De.from("golf_predictions").upsert({id:e.id,tournament_id:e.tournamentId,val:e})},nR=async(e=!1)=>{const t="predictions_golf";if(!e){const o=jr(t,Cr.predictions);if(o)return o}const{data:a,error:i}=await De.from("golf_predictions").select("id, tournament_id, val").limit(100);if(i)return console.error("Error fetching golf predictions:",i),[];const l=a?a.map(o=>{var u;return{id:o.id,tournamentId:((u=o.val)==null?void 0:u.tournamentId)||o.tournament_id,...o.val}}):[];return Fr(t,l),l},aR=async(e,t=!1)=>{const a=`bracket_${e}`;if(!t){const o=jr(a,Cr.games);if(o)return o}const{data:i,error:l}=await De.from("march_madness").select("val").eq("id",`bracket_${e}`).maybeSingle();return l?(console.error("Error fetching bracket data:",l),null):i!=null&&i.val?(Fr(a,i.val),i.val):null},rR=async(e,t=!1)=>{const a=`bracket_predictions_${e}`;if(!t){const u=jr(a,Cr.predictions);if(u)return u}const{data:i,error:l}=await De.from("march_madness").select("id, val").like("id",`predictions_${e}_v%`).order("id",{ascending:!0});if(l)return console.error("Error fetching bracket predictions:",l),[];const o=i?i.map(u=>u.val):[];return Fr(a,o),o},O4=async()=>{try{const{data:e}
461=await De.from("app_config").select("val").eq("id","min_version").maybeSingle();return(e==null?void 0:e.val)||"0.0.0"}catch{return"0.0.0"}},Kh={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ADMIN_EMAIL:"[email protected]",VITE_MAILERLITE_API_KEY:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI0IiwianRpIjoiMTJkZDU2NDZmMmQ5ZTFlM2NlODUzZTRjNTAxNjA1NjhkNmVmM2E3ZDE0ZDE5MTcxOTQ5MWQwMzJhNTliOTNmYzEwYTMzNzIxZjYxYTU5MzEiLCJpYXQiOjE3NjU3MjAxNzYuMjIyMzcyLCJuYmYiOjE3NjU3MjAxNzYuMjIyMzc1LCJleHAiOjQ5MjEzOTM3NzYuMjE1MDc5LCJzdWIiOiIxNTQ4ODI1Iiwic2NvcGVzIjpbXX0.XZ3-izA4dq38SJNkwaJ4Ww8JuxsZmNLD8Rmmiryx1YckzY9Hvrmd8b8la8dAYWD6_pBVIiCgukBHvfi72zF5fS6Si6REVtsuylzYU9Y_NQ8rfD9c-poJRxjMxoDeh5Q1GmrEKnRPnE2scahJwJgoaY5Aq9FJ_xB8Hg2S9KD2B1SbS3VPJLBrrBQO4TPQkmL_hxrHl8MaC0M-SCC0IAjax71hwduck0Tq2GsYRWRfHf2BEdQlTvmI3E7aE01TqqEenT0ysFRnTljSqxIijv2BA5LkIps4VxCIh52CFmP2bzHFtbv9huleEfVEFfhhhs2VxoHGaBZTUOJzeUW-X38eSsZToFLwBfORSkno7MmZfdkytMjKqu9A8p9PN_lZkUMRwPTyzVgzy_5h0NrFb8UQfJ77LCOHnxEsSN7GFKsMWSqqLrEkCyTu6NJHW5awGRTY3BOcYx5_eBVgKw3qDvqFWveGnMPww6v2XdRSLfWum8qVO2qUOhzwEWfrycRKivYkVY9BKeH6Yhfrk9XQfIX6YKCWEu50-5Hmnp0ZGL_UXsaODpHVU4XyNt1822YNu8VHbHl4hPPfhplt5GSFsTMMtRYgJxEtuJQSAaUUV205o19cd5c6SuOmyGwYuUBaV3r4-W86LV87govG1uQ5gxZO-poRXptnjcgCGeptclrLqIE",VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56bm5ldGV3emNvZW9xbWV4Z2hmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU2Nzg1NTQsImV4cCI6MjA4MTI1NDU1NH0.IMHtmGsikxBUOGq9oO35pdhzIRlpZ9l3jBBKRfX3-10",VITE_SUPABASE_URL:"https://api.matchups.ai",VITE_VERCEL_BRANCH_URL:"matchups-git-main-dribgibs-projects.vercel.app",VITE_VERCEL_DEPLOYMENT_ID:"dpl_CAhUyzE2qQ4MAf4Yy6ByDr2fX5rk",VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"dribgib",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Colton Joseph",VITE_VERCEL_GIT_COMMIT_MESSAGE:"Hide shutdown banner on homepage",VITE_VERCEL_GIT_COMMIT_REF:"main",VITE_VERCEL_GIT_COMMIT_SHA:"c4ea747a871d521e5537dd5df5563f9dde4c0b14",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"1115999812",VITE_VERCEL_GIT_REPO_OWNER:"dribgib",VITE_VERCEL_GIT_REPO_SLUG:"matchups",VITE_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"6598e8659ebe799a/script.js","viewEndpoint":"6598e8659ebe799a/view","eventEndpoint":"6598e8659ebe799a/event","sessionEndpoint":"6598e8659ebe799a/session"},"speedInsights":{"scriptSrc":"f4838483436b0aa7/script.js","endpoint":"f4838483436b0aa7/vitals"}}',VITE_VERCEL_PROJECT_ID:"prj_pzCYAWqwNm39ymlFlsbDx8MiAlrO",VITE_VERCEL_PROJECT_PRODUCTION_URL:"matchups.ai",VITE_VERCEL_TARGET_ENV:"production",VITE_VERCEL_URL:"matchups-5yr5ybuna-dribgibs-projects.vercel.app"};var Jh={};const vc=(e,t)=>Date.now(),R4=e=>{try{if(typeof import.meta<"u"&&Kh&&Kh[e])return Kh[e]}catch{}try{if(typeof process<"u"&&Jh&&Jh[e])return Jh[e]}catch{}return""},Sc=R4("VITE_ADMIN_EMAIL")||"",D4=async e=>{try{await fetch(qa("/api/mailerlite_sync"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})})}catch{}},hm=async e=>{var a,i,l,o,u;let t=await va(e.id);if(!t&&e.email&&await T4(e.email))try{const f=vc("heal_user API call"),{data:{session:p}}=await De.auth.getSession(),y={"Content-Type":"application/json"};p!=null&&p.access_token&&(y.Authorization=`Bearer ${p.access_token}`);const b=await fetch(qa("/api/heal_user"),{method:"POST",headers:y,body:JSON.stringify({email:e.email,newUserId:e.id})});vc("heal_user API call",f),b.ok?t=await va(e.id):console.error("Heal failed:",await b.text())}catch{}if(t){let h=!1;Sc&&((i=e.email)==null?void 0:i.toLowerCase())===Sc.toLowerCase()&&!t.isAdmin&&(t.isAdmin=!0,h=!0),t.subscription||(t.subscription={plan:"none",status:"canceled",expiryDate:0},h=!0),t.transactions||(t.transactions=[],h=!0),t.lastLogin=Date.now(),h=!0,h&&await Hc(t);const p=!!t.stripeSubscriptionId,y=It.isNativePlatform(),b=((l=t.subscription)==null?void 0:l.expiryDate)&&t.subscription.expiryDate<Date.now(),x=((o=t.subscription)==null?void 0:o.expiryDate)&&t.subscription.expiryDate>0;if((p||y||b||x&&((u=t.subscription)==null?void 0:u.status)!=="active")&&!t.isAdmin&&!t.grantedByAdmin)try{const{data:{session:N}}=await De.auth.getSession(),A=N==null?void 0:N.access_token;if(A){const _=await fetch(qa("/api/verify_subscription"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${A}`}});if(_.ok){const C=await _.json();C.updated&&C.subscription&&(t.subscription=C.subscription,C.stripeSubscriptionId&&(t.stripeSubscriptionId=C.stripeSubscriptionId),C.str
461ipeCustomerId&&(t.stripeCustomerId=C.stripeCustomerId))}}}catch{}}else{const h=localStorage.getItem("matchups_initial_source")||sessionStorage.getItem("matchups_source")||"Direct",f=e.user_metadata||{};let p=f.first_name||f.given_name||"",y=f.last_name||f.family_name||"";if(!p&&f.full_name){const w=f.full_name.trim().split(" ");p=w[0]||"",y=w.slice(1).join(" ")||""}if(!p&&f.name){const w=f.name.trim().split(" ");p=w[0]||"",y=w.slice(1).join(" ")||""}t={id:e.id,email:e.email||"",firstName:p||void 0,lastName:y||void 0,isAdmin:Sc&&((a=e.email)==null?void 0:a.toLowerCase())===Sc.toLowerCase(),joinedDate:Date.now(),source:h,subscription:{plan:"none",status:"canceled",expiryDate:0},transactions:[]};const{error:b,status:x}=await Hc(t);if(b&&(b.code==="23505"||x===409)&&e.email)try{const w=vc("heal_user API (conflict recovery)"),{data:{session:N}}=await De.auth.getSession(),A={"Content-Type":"application/json"};N!=null&&N.access_token&&(A.Authorization=`Bearer ${N.access_token}`);const _=await fetch(qa("/api/heal_user"),{method:"POST",headers:A,body:JSON.stringify({email:e.email,newUserId:e.id})});vc("heal_user API (conflict recovery)",w),_.ok&&(t=await va(e.id))}catch{}e.email&&D4(e.email).catch(()=>{})}if(!t)throw new Error("User profile creation failed.");return t},L4=async(e,t,a,i)=>{if(!t)throw new Error("Password required for signup");const{data:l,error:o}=await De.auth.signUp({email:e,password:t,options:{emailRedirectTo:window.location.origin,data:{first_name:a||"",last_name:i||""}}});if(o)throw o;if(!l.user)throw new Error("Signup failed - no user returned");return hm(l.user)},M4=async(e,t)=>{if(!t)throw new Error("Password required for login");const{data:a,error:i}=await De.auth.signInWithPassword({email:e,password:t});if(i)throw i;if(!a.user)throw new Error("Login failed - no user returned");return hm(a.user)},I4=async()=>{const e=It.isNativePlatform(),t=e?"ai.matchups.app://auth/callback":window.location.origin,{data:a,error:i}=await De.auth.signInWithOAuth({provider:"google",options:{redirectTo:t,skipBrowserRedirect:e,queryParams:{access_type:"offline",prompt:"consent"}}});if(i)throw i;if(e&&a.url){const{Browser:l}=await tn(async()=>{const{Browser:o}=await Promise.resolve().then(()=>am);return{Browser:o}},void 0);await l.open({url:a.url,presentationStyle:"popover",toolbarColor:"#050505"})}return a},U4=async()=>{const e=It.isNativePlatform(),t=e?"ai.matchups.app://auth/callback":window.location.origin,{data:a,error:i}=await De.auth.signInWithOAuth({provider:"apple",options:{redirectTo:t,skipBrowserRedirect:e}});if(i)throw i;if(e&&a.url){const{Browser:l}=await tn(async()=>{const{Browser:o}=await Promise.resolve().then(()=>am);return{Browser:o}},void 0);await l.open({url:a.url,presentationStyle:"popover",toolbarColor:"#050505"})}return a},B4=async()=>{await De.auth.signOut()},Xh=async()=>{const{data:{session:e}}=await De.auth.getSession();return e!=null&&e.user?hm(e.user):null},iR=async(e,t)=>{const a=await va(e);if(!a)throw new Error("User not found");return a.subscription.status="canceled",await Hc(a),a},z4=async e=>{const{error:t}=await De.auth.resetPasswordForEmail(e,{redirectTo:window.location.origin});if(t)throw t;return!0},Cf=(e,t={})=>{typeof window<"u"&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e,...t}))},sR=(e,t,a,i)=>{const l=sessionStorage.getItem("matchups_source")||"direct",o={event:e,ecommerce:{currency:"USD",value:a,items:[{item_id:t,item_name:`${t.charAt(0).toUpperCase()+t.slice(1)} Subscription`,price:a,quantity:1}]},traffic_source:l};i&&(o.ecommerce.transaction_id=i),typeof window<"u"&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({ecommerce:null}),window.dataLayer.push(o))},cx=(e,t,a="email")=>{const i=sessionStorage.getItem("matchups_source")||"direct";Cf(e,{user_id:t,method:a,traffic_source:i})},N1=({isOpen:e,type:t,title:a,message:i,onClose:l,onConfirm:o})=>e?d.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm animate-in fade-in duration-200",onClick:l,children:d.jsxs("div",{className:"w-full max-w-md bg-dark-900 border border-white/10 rounded-xl shadow-2xl flex flex-col relative overflow-hidden",onClick:u=>u.stopPropagation(),children:[d.jsx("div",{className:`h-1 w-full ${t==="error"?"bg-red-500":"bg-brand"}`}),d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"flex items-start gap-4",children:[d.jsx("div",{className:`p-3 rounded-full border ${t==="error"?"bg-red-500/10 border-red-500/20 text-red-500":t==="success"?"bg-brand/10 border-brand/20 text-brand":"bg-dark-800 border-white/10 text-white"}`,children:t==="error"?d.jsx(Bx,{className:"w-6 h-6"}):t==="success"?d.jsx(Zt,{className:"w-6 h-6"}):t==="confirm"?d.jsx(VE,{className:"w-6 h-6"}):d.jsx(iN,{className:"w-6 h-6"})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h3",{className:"font-teko font-light text-3xl text-white uppercase tracking-wide leading-none mb-2 mt-1",children:a}),d.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:i})]})]})}),d.jsx("div",{className:"p-4 bg-black/20 border-t border-white/5 flex justify-end gap-3",children:t==="confirm"?d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:l,className:"px-4 py-2 rounded text-xs font-medium uppercase tracking-wider text-gray-400 hover:text-white transition-colors",children:"Cancel"}),d.jsx("button",{onClick:o,className:"px-6 py-2 rounded bg-brand text-black text-xs font-bold uppercase tracking-wider hover:bg-white transition-colors shadow-[0_0_15px_rgba(51,214,82,0.3)]",children:"Confirm"})]}):d.jsx("button",{onClick:l,className:"px-6 py-2 rounded bg-white/10 text-white text-xs font-bold uppercase tracking-wider hover:bg-white/20 transition-colors border border-white/5",children:"Acknowledge"})})]})}):null,P4=[{sport:"NFL",away:"49ERS",home:"RAMS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:72,score:"24-21",status:"SOLID",winner:"49ERS"},{sport:"NBA",away:"SUNS",home:"MAVS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:68,score:"112-115",status:"NEUTRAL",winner:"MAVERICKS"},{sport:"NHL",away:"STARS",home:"KNIGHTS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:81,score:"4-2",status:"ELITE",winner:"STARS"},{sport:"MLB",away:"SOX",home:"ORIOLES",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:64,score:"5-3",status:"NEUTRAL",winner:"RED SOX"},{sport:"NFL",away:"LIONS",home:"PACKERS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/lions.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/packers.png",conf:92,score:"31-24",status:"ELITE",winner:"LIONS"},{sport:"NFL",away:"CHIEFS",home:"BILLS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/chiefs.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/bills.png",conf:84,score:"27-24",status:"ELITE",winner:"CHIEFS"},{sport:"NBA",away:"LAKERS",home:"CELTICS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/lakers.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/celtics.png",conf:74,score:"112-108",status:"SOLID",winner:"LA
461KERS"},{sport:"MLB",away:"DODGERS",home:"YANKEES",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/dodgers.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/yankees.png",conf:81,score:"5-4",status:"ELITE",winner:"DODGERS"},{sport:"NCAAF",away:"COLO",home:"TEXAS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/cu.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/texas.png",conf:88,score:"24-38",status:"ELITE",winner:"TEXAS"},{sport:"NCAAF",away:"FLA",home:"UGA",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/florida.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/georgia.png",conf:85,score:"17-31",status:"ELITE",winner:"GEORGIA"},{sport:"CBB",away:"MIA",home:"AUB",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/miami.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/auburn.png",conf:78,score:"68-76",status:"SOLID",winner:"AUBURN"},{sport:"NCAAF",away:"USC",home:"BYU",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/usc.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/byu.png",conf:82,score:"42-35",status:"ELITE",winner:"USC"},{sport:"NHL",away:"BRUINS",home:"AVS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/bruins.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/avs.png",conf:71,score:"3-2",status:"SOLID",winner:"BRUINS"},{sport:"NHL",away:"OILERS",home:"PANTHERS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/oilers.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/panthers.png",conf:85,score:"4-2",status:"ELITE",winner:"OILERS"},{sport:"NBA",away:"TWOLVES",home:"PISTONS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/twolves.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/pistons.png",conf:68,score:"108-95",status:"NEUTRAL",winner:"TIMBERWOLVES"},{sport:"NBA",away:"BULLS",home:"NUGGETS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/bulls.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/nuggets.png",conf:79,score:"101-114",status:"SOLID",winner:"NUGGETS"},{sport:"NFL",away:"EAGLES",home:"COWBOYS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:77,score:"28-24",status:"SOLID",winner:"EAGLES"},{sport:"NBA",away:"HEAT",home:"KNICKS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:62,score:"104-109",status:"NEUTRAL",winner:"KNICKS"},{sport:"NHL",away:"LEAFS",home:"HABS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:88,score:"5-2",status:"ELITE",winner:"LEAFS"},{sport:"NFL",away:"RAVENS",home:"BENGALS",awayLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",homeLogo:"https://api.matchups.ai/storage/v1/object/public/images/default.png",conf:80,score:"31-28",status:"ELITE",winner:"RAVENS"}],H4=({game:e})=>d.jsxs("div",{className:"bg-dark-800 border border-white/5 rounded-xl flex flex-col h-full shadow-2xl overflow-hidden ring-1 ring-white/5",children:[d.jsxs("div",{className:"px-5 py-3 flex justify-between items-center border-b border-white/5 bg-dark-900/30",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Wc,{className:"w-3 h-3 text-gray-500"}),d.jsxs("span",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-widest leading-none pt-0.5",children:[e.sport," | WED, DEC 17 • 1:00 PM"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(si,{className:"w-3 h-3 text-gray-600"}),e.status==="ELITE"&&d.jsx(Nr,{className:"w-3.5 h-3.5 text-amber-500"})]})]}),d.jsx("div",{className:"flex w-full border-b border-white/5",children:d.jsx("div",{className:"flex-1 py-3 text-[10px] font-mono uppercase tracking-widest text-white/80 flex justify-center items-center bg-white/5 cursor-default",children:"GAME ANALYSIS"})}),d.jsxs("div",{className:"p-6 flex flex-col items-center",children:[d.jsxs("div",{className:"flex justify-between items-center w-full mb-8 relative",children:[d.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[d.jsx("img",{src:e.awayLogo,className:"w-14 h-14 object-contain filter drop-shadow-xl mb-1",alt:""}),d.jsx("span",{className:"font-teko font-light text-3xl text-white uppercase leading-none tracking-tight",children:e.away}),d.jsx("span",{className:"font-mono text-3xl text-white/90 leading-none",children:e.score.split("-")[0]})]}),d.jsx("div",{className:"font-mono text-2xl text-white/10 px-2 pb-14",children:"@"}),d.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[d.jsx("img",{src:e.homeLogo,className:"w-14 h-14 object-contain filter drop-shadow-xl mb-1",alt:""}),d.jsx("span",{className:"font-teko font-light text-3xl text-white uppercase leading-none tracking-tight",children:e.home}),d.jsx("span",{className:"font-mono text-3xl text-white/90 leading-none",children:e.score.split("-")[1]})]})]}),d.jsxs("div",{className:"w-full grid grid-cols-2 gap-4 pt-4 border-t border-white/5",children:[d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-[9px] text-gray-500 uppercase font-mono tracking-widest",children:"PROJECTED WINNER"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("img",{src:e.winner===e.away||e.sport==="NCAAF"&&e.winner.includes(e.away)?e.awayLogo:e.homeLogo,className:"w-4 h-4 object-contain opacity-60",alt:""}),d.jsx("span",{className:"font-teko font-light text-xl text-white/90 uppercase truncate max-w-[100px] pt-0.5",children:e.winner})]})]}),d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsx("span",{className:"text-[9px] text-gray-500 uppercase font-mono tracking-widest",children:"CONFIDENCE"}),d.jsxs("div",{className:ae("font-teko font-light text-2xl leading-none px-3 py-1 rounded border",e.conf>=80?"text-amber-500 bg-amber-500/5 border-amber-500/30":"text-brand bg-brand/5 border-brand/30"),children:[e.conf,"%"]})]})]}),d.jsx("p",{className:"text-[11px] text-gray-500 font-light mt-5 line-clamp-2 leading-relaxed opacity-50",children:"Proprietary agents analyzed roster health, historical form, and simulation consensus to derive high-probability outcomes..."}),d.jsx("div",{className:"w-full mt-6",children:d.jsxs("div",{className:"w-full py-2.5 bg-white/5 border border-white/5 rounded flex items-center justify-center gap-2",children:[d.jsx(bs,{className:"w-3.5 h-3.5 text-brand/50"}),d.jsx("span",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest",children:"VIEW GAME REPORT"})]})})]})]}),ux=({onLogin:e})=>{const[t,a]=J.useState("login"),[i,l]=J.useState(""),[o,u]=J.useState(""),[h,f]=J.useState(""),[p,y]=J.useState(""),[b,x]=J.useState(!1),[w,N]=J.useState(!1),[A,_]=J.useState(!1),[C,T]=J.useState(""),[j,B]=J.useState("idle"),[Q,O]=J.useState({isOpen:!1,type:"alert",title:"",message:"",onClose:()=>{}});J.useEffect(()=>{const D=localStorage.getItem("matchups_saved_email");D&&(l(D),N(!0))},[]);const V=(D,U,z)=>
461{O({isOpen:!0,type:D,title:U,message:z,onClose:()=>O($=>({...$,isOpen:!1}))})},ee=async D=>{D.preventDefault(),_(!0),w?localStorage.setItem("matchups_saved_email",i):localStorage.removeItem("matchups_saved_email");try{let U;t==="signup"?(U=await L4(i,o,h,p),V("success","Account Created","Welcome to Matchups.ai. Redirecting to plans..."),e(U,!0),cx("sign_up",U.id,"email")):(U=await M4(i,o),e(U,!1),cx("login",U.id,"email"))}catch(U){V("error","Sign In Failed",U.message||"Invalid email or password.")}finally{_(!1)}},q=async()=>{try{await I4(),Cf("click_google_login")}catch(D){V("error","Google Auth Error",D.message)}},E=async()=>{try{await U4(),Cf("click_apple_login")}catch(D){V("error","Apple Auth Error",D.message)}},G=async D=>{D.preventDefault(),B("sending");try{await z4(C),B("sent")}catch{V("error","Reset Failed","Could not send recovery email. Please check the address."),B("idle")}};return d.jsxs("div",{className:"flex flex-col items-center justify-start px-4 pt-2 pb-4 w-full min-h-0 relative bg-[#050505]",children:[d.jsxs("div",{className:"absolute inset-0 z-0 hidden md:flex flex-col items-center justify-center pointer-events-none select-none overflow-hidden",children:[d.jsx("div",{className:"w-full max-w-7xl px-10 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 transition-all duration-1000 animate-in fade-in zoom-in-95 py-20 relative opacity-40",children:P4.map((D,U)=>d.jsx(H4,{game:D},U))}),d.jsx("div",{className:"absolute inset-0 z-10 bg-gradient-to-b from-dark-950 via-trans
461parent via-80% to-dark-950"}),d.jsx("div",{className:"absolute inset-0 z-10 bg-[radial-gradient(circle_at_center,_transparent_10%,_#050505_98%)]"}),d.jsx("div",{className:"absolute inset-0 z-10 bg-dark-950/60"})]}),d.jsx(N1,{...Q}),d.jsxs("div",{className:"w-full max-w-md p-5 md:p-10 bg-dark-900/95 backdrop-blur-3xl border border-white/10 rounded-xl shadow-[0_60px_150px_rgba(0,0,0,0.95)] relative overflow-y-auto max-h-[calc(100vh-12rem)] transition-all z-20 ring-1 ring-white/5",children:[d.jsx("div",{className:"absolute top-0 left-0 w-full h-[1px] bg-gradient-to-r from-transparent via-brand to-transparent opacity-80"}),d.jsxs("div",{className:"text-center mb-4 md:mb-6",children:[d.jsxs("h1",{className:"text-5xl md:text-7xl font-teko font-light text-white tracking-tight uppercase leading-none mb-3 md:mb-4",children:["MATCHUPS",d.jsx("span",{className:"text-brand font-light",children:".AI"})]}),d.jsx("div",{className:"inline-flex flex-col items-center gap-1 mb-4 md:mb-6",children:d.jsxs("div",{className:"inline-flex items-center gap-2 bg-brand/10 border border-brand/30 px-4 py-1.5 rounded-full shadow-[0_0_15px_rgba(51,214,82,0.15)]",children:[d.jsx(xs,{className:"w-3.5 h-3.5 text-brand fill-brand"}),d.jsx("span",{className:"text-brand text-[11px] font-bold uppercase tracking-[0.15em]",children:"5 Free Picks Daily"})]})})]}),t==="forgot"?d.jsx("form",{onSubmit:G,className:"space-y-6 animate-in fade-in slide-in-from-left-4 duration-300",children:j==="sent"?d.jsxs("div",{className:"text-center py-10",children:[d.jsx("div",{className:"w-16 h-16 bg-brand/10 rounded-full flex items-center justify-center mx-auto mb-6 border border-brand/20 shadow-xl shadow-brand/5",children:d.jsx(nf,{className:"w-8 h-8 text-brand"})}),d.jsx("h3",{className:"text-white font-teko font-light text-4xl mb-3 tracking-wide uppercase",children:"Email Sent"}),d.jsxs("p",{className:"text-gray-400 text-sm mb-8 font-light leading-relaxed",children:["We've sent a recovery link to ",d.jsx("strong",{children:C}),"."]}),d.jsx("button",{type:"button",onClick:()=>{a("login"),B("idle"),T("")},className:"text-brand hover:text-white text-xs uppercase tracking-[0.2em] font-bold transition-all",children:"Return to Sign In"})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"block text-[11px] text-gray-500 uppercase tracking-widest font-mono ml-1",children:"Email Address"}),d.jsx("input",{type:"email",required:!0,value:C,onChange:D=>T(D.target.value),className:"w-full bg-black/40 border border-white/10 rounded-xl p-3 md:p-4 text-white focus:border-brand/50 focus:outline-none focus:ring-1 focus:ring-brand/10 transition-all font-light",placeholder:"[email protected]"})]}),d.jsx("button",{type:"submit",disabled:j==="sending",className:"w-full py-3 md:py-4 bg-brand text-black font-teko font-light text-2xl tracking-wide uppercase hover:bg-white transition-all rounded-xl flex items-center justify-center gap-2 shadow-lg shadow-brand/20 active:scale-[0.98]",children:j==="sending"?"Sending...":"Reset Password"}),d.jsxs("button",{type:"button",onClick:()=>a("login"),className:"w-full flex items-center justify-center gap-2 text-gray-500 hover:text-white text-[10px] uppercase tracking-[0.2em] transition-colors mt-8 font-bold",children:[d.jsx(EE,{className:"w-3 h-3"})," Back to Sign In"]})]})}):d.jsxs("div",{className:"animate-in fade-in slide-in-from-right-4 duration-300",children:[d.jsxs("div",{className:"flex w-full mb-4 md:mb-6 border-b border-white/10 relative",children:[d.jsxs("button",{onClick:()=>a("login"),className:ae("flex-1 pb-3 text-center font-teko font-light text-2xl tracking-wide transition-colors relative outline-none",t==="login"?"text-white":"text-gray-500 hover:text-gray-300"),children:["SIGN IN",t==="login"&&d.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-brand shadow-[0_0_15px_#33D652]"})]}),d.jsxs("button",{onClick:()=>a("signup"),className:ae("flex-1 pb-3 text-center font-teko font-light text-2xl tracking-wide transition-colors relative outline-none",t==="signup"?"text-white":"text-gray-500 hover:text-gray-300"),children:["CREATE ACCOUNT",t==="signup"&&d.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-brand shadow-[0_0_15px_#33D652]"})]})]}),d.jsxs("form",{onSubmit:ee,className:"space-y-3 md:space-y-6",children:[t==="signup"&&d.jsxs("div",{className:"flex gap-3",children:[d.jsxs("div",{className:"flex-1 space-y-1.5 md:space-y-2",children:[d.jsx("label",{className:"block text-[11px] text-gray-500 uppercase tracking-widest font-mono ml-1",children:"First Name"}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:"text",required:!0,value:h,onChange:D=>f(D.target.value),className:"w-full bg-black/40 border border-white/10 rounded-xl p-2.5 md:p-4 pr-10 text-white focus:border-brand/50 focus:outline-none focus:ring-1 focus:ring-brand/10 transition-all font-light",placeholder:"John"}),h&&d.jsx("button",{type:"button",onClick:()=>f(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-600 hover:text-white transition-colors p-1",children:d.jsx(Sa,{className:"w-4 h-4"})})]})]}),d.jsxs("div",{className:"flex-1 space-y-1.5 md:space-y-2",children:[d.jsx("label",{className:"block text-[11px] text-gray-500 uppercase tracking-widest font-mono ml-1",children:"Last Name"}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:"text",required:!0,value:p,onChange:D=>y(D.target.value),className:"w-full bg-black/40 border border-white/10 rounded-xl p-2.5 md:p-4 pr-10 text-white focus:border-brand/50 focus:outline-none focus:ring-1 focus:ring-brand/10 transition-all font-light",placeholder:"Doe"}),p&&d.jsx("button",{type:"button",onClick:()=>y(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-600 hover:text-white transition-colors p-1",children:d.jsx(Sa,{className:"w-4 h-4"})})]})]})]}),d.jsxs("div",{className:"space-y-1.5 md:space-y-2",children:[d.jsx("label",{className:"block text-[11px] text-gray-500 uppercase tracking-widest font-mono ml-1",children:"Email Address"}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:"email",required:!0,value:i,onChange:D=>l(D.target.value),className:"w-full bg-black/40 border border-white/10 rounded-xl p-2.5 md:p-4 pr-10 text-white focus:border-brand/50 focus:outline-none focus:ring-1 focus:ring-brand/10 transition-all font-light",placeholder:"[email protected]"}),i&&d.jsx("button",{type:"button",onClick:()=>l(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-600 hover:text-white transition-colors p-1",children:d.jsx(Sa,{className:"w-4 h-4"})})]})]}),d.jsxs("div",{className:"space-y-1.5 md:space-y-2",children:[d.jsxs("div",{className:"flex justify-between items-center ml-1",children:[d.jsx("label",{className:"block text-[11px] text-gray-500 uppercase tracking-widest font-mono",children:"Password"}),t==="login"&&d.jsx("button",{type:"button",onClick:()=>a("forgot"),className:"text-[10px] text-brand hover:text-white uppercase tracking-widest transition-colors font-bold",children:"Forgot?"})]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:b?"text":"password",required:!0,value:o,onChange:D=>u(D.target.value),className:"w-full bg-black/40 border border-white/10 rounded-xl p-2.5 md:p-4 pr-20 text-white focus:border-brand/50 focus:outline-none focus:ring-1 focus:ring-brand/10 transition-all font-light",placeholder:"••••••••"}),d.jsxs("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[o&&d.jsx("button",{type:"button",onClick:()=>u(""),className:"text-gray-600 hover:text-white transition-colors p-1",children:d.jsx(Sa,{className:"w-4 h-4"})}),d.jsx("button",{type:"button",onClick:()=>x(!b),className:"text-gray-600 hover:text-white transition-colors p-1",children:b?d.jsx(XE,{className:"w-5 h-5"}):d.jsx(ZE,{className:"w-5 h-5"})})]})]})]}),t==="login"&&d.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[d.jsx("button",{type:"button",onClick:()=>N(!w),className:"text-gray-600 hover:text-brand transition-colors",children:w?d.jsx(_N,{className:"w-4 h-4 text-brand"}):d.jsx(CN,{className:"w-4 h-4"})}),d.jsx("button",{type:"button",onClick:()=>N(!w),className:"text-[10px] md:text-[11px] text-gray-500 uppercase tracking-widest hover:text-white transition-colors font-mono",children:"Keep me signed in"})]}),d.jsx("button",{type:"submit",disabled:A,className:"w-full py-2.5 md:py-4 bg-brand hover:bg-white text-black font-teko font-normal text-xl md:text-2xl tracking-wide uppercase transition-all rounded-xl flex items-center justify-center gap-2 shadow-xl hover:shadow-brand/20 active:scale-[0.98]",children:A?"Processing...":t==="login"?"Sign In":"Create Account"})]}),d.jsxs("div",{className:"relative my-4 md:my-8",children:[d.jsx("div",{className:"absolute inset-0 flex items-center",children:d.jsx("div",{className:"w-full border-t border-white/5"})}),d.jsx("div",{className:"relative flex justify-center text-[10px] uppercase font-mono tracking-[0.3em]",children:d.jsx("span",{className:"bg-dark-900 px-4 text-gray-600 font-bold",children:"OR"})})]}),d.jsxs("button",{type:"button",onClick:q,className:"w-full py-2.5 md:py-4 bg-dark-950 border border-white/5 hover:border-white/20 text-white font-teko font-light text-xl md:text-2xl tracking-wide uppercase transition-all rounded-xl flex items-center justify-center gap-2 md:gap-3 group active:scale-[0.98] shadow-lg",children:[d.jsxs("svg",{className:"w-5 h-5 md:w-6 md:h-6 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",children:[d.jsx("path",{fill:"#EA4335",d:"M24 12.276c0-.816-.066-1.636-.213-2.436H12.273v4.608h6.614c-.29 1.49-1.127 2.754-2.386 3.59v2.986h3.869c2.26-2.09 3.565-5.166 3.565-8.748z"}),d.jsx("path",{fill:"#34A853",d:"M12.273 24c3.3 0 6.065-1.091 8.087-2.954l-3.869-2.986c-1.094.736-2.493 1.173-4.218 1.173-3.196 0-5.904-2.155-6.87-5.053H1.436v3.179C3.475 21.284 7.584 24 12.273 24z"}),d.jsx("path",{fill:"#4A90E2",d:"M5.403 14.18c-.244-.736-.382-1.527-.382-2.345 0-.818.138-1.609.382-2.345V6.311H1.436C.518 8.136 0 10.191 0 12.273c0 2.082.518 4.136 1.436 5.961l3.967-3.179v-.875z"}),d.jsx("path",{fill:"#FBBC05",d:"M12.273 4.773c1.794 0 3.409.618 4.672 1.827l3.5-3.5C18.333 1.055 15.568 0 12.273 0 7.584 0 3.475 2.716 1.436 6.311l3.967 3.179c.966-2.898 3.674-5.053 6.87-5.053z"})]}),"Continue with Google"]}),d.jsxs("button",{type:"button",onClick:E,className:"w-full py-2.5 md:py-4 bg-white hover:bg-gray-100 text-black font-teko font-light text-xl md:text-2xl tracking-wide uppercase transition-all rounded-xl flex items-center justify-center gap-2 md:gap-3 group active:scale-[0.98] shadow-lg mt-3",children:[d.jsx("svg",{className:"w-5 h-5 md:w-6 md:h-6 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"
461currentColor",children:d.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),"Continue with Apple"]})]})]})]})},V4=({game:e,onNavigateShop:t})=>{if(!e||!e.awayTeam||!e.homeTeam)return null;let a="Upcoming";try{const i=new Date(e.date);isNaN(i.getTime())||(a=Wt(i,"EEE, MMM d • h:mm a"))}catch(i){console.warn("LockedGameCard date error:",i)}return d.jsxs("div",{onClick:t,className:"group relative bg-[#0A0A0A] border border-white/5 rounded-xl overflow-hidden flex flex-col h-full hover:border-brand/30 hover:shadow-lg transition-all duration-300 cursor-pointer",children:[d.jsx("div",{className:"px-5 py-3 flex justify-between items-center border-b border-white/5 bg-[#050505]/60 opacity-60",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:"text-[10px] text-gray-500 font-mono uppercase tracking-[0.15em] flex items-center gap-1.5",children:[d.jsx(Wc,{className:"w-3.5 h-3.5"}),e.sport||"GAME"]}),d.jsx("span",{className:"w-px h-2 bg-white/10"}),d.jsx("span",{className:"text-[10px] text-gray-600 font-mono uppercase tracking-widest",children:a})]})}),d.jsx("div",{className:"flex w-full border-b border-white/5 opacity-50",children:d.jsx("div",{className:"flex-1 py-3 bg-white/[0.02]"})}),d.jsx("div",{className:"p-6 flex-1 flex flex-col items-center justify-center relative min-h-[220px]",children:d.jsxs("div",{className:"absolute inset-0 flex flex-col justify-center items-center blur-[3px] opacity-30 pointer-events-none grayscale transition-all duration-500 group-hover:grayscale-0 group-hover:opacity-40 group-hover:blur-[2px]",children:[d.jsxs("div",{className:"flex justify-between items-center w-full px-8",children:[d.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.awayTeam.logoUrl&&d.jsx("img",{src:e.awayTeam.logoUrl,className:"w-16 h-16 object-contain opacity-80",alt:""}),d.jsx("div",{className:"font-teko font-light text-4xl text-white/50 uppercase",children:e.awayTeam.abbreviation||Ct(e.awayTeam.name)})]}),d.jsx("div",{className:"text-2xl text-white/20 font-bold pb-8",children:"AT"}),d.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.homeTeam.logoUrl&&d.jsx("img",{src:e.homeTeam.logoUrl,className:"w-16 h-16 object-contain opacity-80",alt:""}),d.jsx("div",{className:"font-teko font-light text-4xl text-white/50 uppercase",children:e.homeTeam.abbreviation||Ct(e.homeTeam.name)})]})]}),d.jsx("div",{className:"mt-8 w-3/4 h-2 bg-white/10 rounded"}),d.jsx("div",{className:"mt-2 w-1/2 h-2 bg-white/10 rounded"})]})}),d.jsxs("div",{className:"absolute inset-0 z-20 flex flex-col items-center justify-center text-center gap-6 p-4",children:[d.jsx("div",{className:"p-4 bg-[#0A0A0A] rounded-full border border-white/10 shadow-xl group-hover:border-brand/40 group-hover:shadow-[0_0_20px_rgba(51,214,82,0.15)] transition-all transform group-hover:scale-110 duration-300",children:d.jsx(ii,{className:"w-6 h-6 text-gray-400 group-hover:text-brand transition-colors"})}),d.jsxs("div",{className:"max-w-[220px] bg-[#0A0A0A]/90 p-3 rounded-lg backdrop-blur-md border border-white/5",children:[d.jsx("h4",{className:"text-white font-teko font-light text-2xl uppercase tracking-wide mb-1 leading-none",children:"Premium Matchup"}),d.jsx("p",{className:"text-[9px] text-gray-500 uppercase tracking-widest leading-relaxed",children:"Deep research report reserved for active subscribers"})]})]})]})},Er=({content:e,children:t,position:a="bottom",className:i=""})=>{const[l,o]=J.useState(!1);return d.jsxs("div",{className:ae("relative",i),onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[t,l&&d.jsxs("div",{className:ae("absolute left-1/2 -translate-x-1/2 px-3 py-2 bg-dark-950/95 backdrop-blur-md border border-white/10 text-white text-[10px] font-mono uppercase tracking-widest rounded-md shadow-2xl z-[100] animate-in fade-in zoom-in-95 duration-200 pointer-events-none w-max max-w-[200px] text-center whitespace-normal leading-relaxed",a==="bottom"?"top-full mt-3":"bottom-full mb-3"),children:[e,d.jsx("div",{className:ae("absolute left-1/2 -translate-x-1/2 border-4 border-transparent",a==="bottom"?"bottom-full border-b-white/10":"top-full border-t-white/10")})]})]})},Ec=({isNativeApp:e=!1})=>{const[t,a]=J.useState(!1),[i,l]=J.useState({top:0,left:0}),o=sn.useRef(null),u=()=>{if(o.current){const f=o.current.getBoundingClientRect(),p=150;l({top:f.bottom+8,left:Math.max(10,Math.min(window.innerWidth-p-10,f.left+f.width/2-p/2))})}};sn.useEffect(()=>{if(!t)return;const f=y=>{o.current&&!o.current.contains(y.target)&&a(!1)},p=setTimeout(()=>{document.addEventListener("touchstart",f),document.addEventListener("mousedown",f)},10);return()=>{clearTimeout(p),document.removeEventListener("touchstart",f),document.removeEventListener("mousedown",f)}},[t]);const h=f=>{f.preventDefault(),f.stopPropagation(),u(),a(p=>!p)};return d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:o,className:"absolute z-20 -top-1 -right-1",onTouchEnd:h,onClick:h,children:d.jsx("div",{className:"bg-amber-500 rounded-full p-0.5 shadow-lg shadow-amber-500/30 cursor-help",children:d.jsx(xs,{className:"w-2 h-2 text-black",strokeWidth:3})})}),t&&Yx.createPortal(d.jsx("div",{className:"fixed z-[9999] animate-in fade-in zoom-in-95 duration-150 pointer-events-none",style:{to
461p:i.top,left:i.left},children:d.jsxs("div",{className:"bg-dark-950 border border-amber-500/40 rounded-lg px-2.5 py-1.5 shadow-xl shadow-black/50 whitespace-nowrap",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(xs,{className:"w-3 h-3 text-amber-500"}),d.jsx("span",{className:"text-[10px] md:text-[11px] font-mono text-white uppercase tracking-wide",children:"Upset Pick"})]}),d.jsx("p",{className:"text-[9px] md:text-[10px] text-gray-400 mt-0.5 max-w-[140px] leading-tight",children:"AI predicts underdog wins"})]})}),document.body)]})},fs=(e,t=!1)=>{if(e===null)return null;const a=e>=0?`+${e}`:`${e}`;return t?`(${a})`:a},dx=(e,t)=>{const a=e!=null,i=t!=null;return!a&&!i?null:d.jsxs("div",{className:"flex flex-col gap-1",children:[a&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-5 flex items-center justify-center",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/DKNG.svg",alt:"DK",className:"w-3 h-3"})}),d.jsx("span",{className:"font-teko text-base text-gray-400 leading-none",children:fs(e)})]}),i&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-5 flex items-center justify-center",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/Fanduel_Shield_2016.svg",alt:"FD",className:"w-2.5 h-2.5"})}),d.jsx("span",{className:"font-teko text-base text-gray-400 leading-none",children:fs(t)})]})]})},hx=(e,t)=>{if(t!=null){const a=t<0?Math.abs(t)/(Math.abs(t)+100)*100:100/(t+100)*100,i=e-a;return i>=20?{stars:3,edge:i}:i>=12?{stars:2,edge:i}:i>=5?{stars:1,edge:i}:{stars:0,edge:i}}return e>=80?{stars:3,edge:null}:e>=70?{stars:2,edge:null}:e>=60?{stars:1,edge:null}:{stars:0,edge:null}},G4=J.memo(({games:e,predictions:t,propsPredictions:a,user:i,isAdmin:l,hasFullAccess:o,onNavigateShop:u,onAdminInit:h,isNativeApp:f=!1,isAndroid:p=!1})=>{const[y,b]=J.useState({key:"date",direction:"asc"}),[x,w]=J.useState({isOpen:!1,type:"game",report:"",title:"",debug:void 0,propsData:void 0,updates:void 0,game:void 0,prediction:void 0}),[N,A]=J.useState(null),{togglePick:_,isInSlip:C}=rm(),{getOddsForGame:T}=tu(),j=J.useCallback((E,G)=>{const D=`${E.id}-${G.id}`;_({type:"game",game:E,selectedTeamId:G.id,selectedTeamName:G.name,label:`${G.name} ML`,sport:E.sport||"NFL"}).action==="added"&&(A(D),setTimeout(()=>A(null),300))},[_]),B=E=>{o&&b(G=>({key:E,direction:G.key===E&&G.direction==="asc"?"desc":"asc"}))},Q=(E,G)=>{if(!(E!=null&&E.result))return null;const D=E.result;let U=D.winnerId;const z=Number(D.homeScorePrediction),$=Number(D.awayScorePrediction);return!isNaN(z)&&!isNaN($)&&(z>$?U=G.homeTeam.id:$>z&&(U=G.awayTeam.id)),U===G.homeTeam.id?G.homeTeam:G.awayTeam},O=J.useMemo(()=>{const E=[...e];return E.sort((G,D)=>{var $,P,te,fe,ce,R;let U="",z="";switch(y.key){case"date":U=new Date(G.date).getTime(),z=new Date(D.date).getTime();break;case"confidence":U=((P=($=t[G.id])==null?void 0:$.result)==null?void 0:P.confidence)||0,z=((fe=(te=t[D.id])==null?void 0:te.result)==null?void 0:fe.confidence)||0;break;case"spread":{const L=(ce=t[G.id])==null?void 0:ce.result,F=(R=t[D.id])==null?void 0:R.result;U=L?Math.abs((L.homeScorePrediction||0)-(L.awayScorePrediction||0)):0,z=F?Math.abs((F.homeScorePrediction||0)-(F.awayScorePrediction||0)):0;break}case"rating":{const L=(F,S)=>{var st;const de=t[F];let oe=((st=de==null?void 0:de.result)==null?void 0:st.confidence)||0;oe>0&&oe<=1&&(oe=Math.round(oe*100));const pe=Q(de,S),ge=T(S.homeTeam.fullName||S.homeTeam.name,S.awayTeam.fullName||S.awayTeam.name),xe=(pe==null?void 0:pe.id)===S.awayTeam.id,we=pe?xe?(ge==null?void 0:ge.awayOdds)??(ge==null?void 0:ge.dkAwayOdds)??null:(ge==null?void 0:ge.homeOdds)??(ge==null?void 0:ge.dkHomeOdds)??null:null,{stars:Ie,edge:jt}=hx(oe,we);return Ie*1e3+oe};U=L(G.id,G),z=L(D.id,D);break}}return U<z?y.direction==="asc"?-1:1:U>z?y.direction==="asc"?1:-1:0}),E},[e,y,t,T,Q]),V=(E,G)=>{const D=t[E.id];!D||!D.result||w({isOpen:!0,type:G,title:"Game Prediction Report",report:D.result.fullReport||"No report available.",debug:i!=null&&i.isAdmin?D.result:void 0,propsData:void 0,updates:D.result.updates,game:E,prediction:D.result})},ee=({sport:E,size:G})=>{const D={NFL:"https://api.matchups.ai/storage/v1/object/public/images/nfl.svg",NCAAF:"https://api.matchups.ai/storage/v1/object/public/images/ncaaf.svg",NBA:"https://api.matchups.ai/storage/v1/object/public/images/nba.svg",CBB:"https://api.matchups.ai/storage/v1/object/public/images/cbb.svg",
461NHL:"https://api.matchups.ai/storage/v1/object/public/images/nhl.svg",MLB:"https://api.matchups.ai/storage/v1/object/public/images/mlb.svg"},U=(E||"NFL").toUpperCase(),z=G==="xs"?"w-3 h-3":"w-4 h-4 md:w-5 md:h-5";return D[U]?d.jsx("div",{className:ae(z,"bg-white"),style:{maskImage:`url(${D[U]})`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:`url(${D[U]})`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):d.jsx(Wc,{className:ae(z,"text-white")})},q=({column:E})=>o?y.key!==E?d.jsx(AE,{className:"w-3 h-3 opacity-20 ml-1 hidden md:inline"}):y.direction==="asc"?d.jsx(Al,{className:"w-3 h-3 text-brand ml-1 hidden md:inline"}):d.jsx(kl,{className:"w-3 h-3 text-brand ml-1 hidden md:inline"}):null;return d.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-white/10 bg-dark-900/50 shadow-xl backdrop-blur-sm relative",children:[d.jsxs("div",{className:ae("touch-pan-y custom-scrollbar",f?"overflow-hidden":"overflow-x-auto md:overflow-hidden"),children:[d.jsxs("table",{className:"w-full text-left border-collapse table-fixed",children:[d.jsx("thead",{className:"bg-white/5 text-[11px] md:text-xs uppercase tracking-wider font-teko text-gray-400",children:d.jsxs("tr",{children:[d.jsx("th",{className:ae("py-2 px-1 md:p-4 text-center md:text-left whitespace-nowrap hidden md:table-cell","
461w-[50px]"),children:d.jsx("div",{className:"flex items-center justify-start"})}),d.jsx("th",{className:ae("py-2 px-1 md:p-4 text-left whitespace-nowrap hidden md:table-cell w-[80px]",o?"cursor-pointer hover:text-white":"cursor-default opacity-50"),onClick:()=>B("date"),children:d.jsxs("div",{className:"flex items-center justify-start",children:["Date ",d.jsx(q,{column:"date"})]})}),d.jsx("th",{className:"py-2 px-2 md:p-4 text-left",children:d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{className:"md:hidden",children:"Matchup"}),d.jsx("span",{className:"hidden md:inline",children:"Away"})]})}),d.jsx("th",{className:"py-2 px-1 md:p-4 text-left hidden md:table-cell",children:d.jsx("div",{className:"flex items-center justify-start",children:"Home"})}),d.jsx("th",{className:ae("py-2 px-1 md:p-4 text-center md:text-left whitespace-nowrap hidden md:table-cell","w-[80px]",o?"cursor-pointer hover:text-white":"cursor-default opacity-50"),onClick:()=>B("rating"),children:d.jsxs("div",{className:"flex items-center justify-start",children:["Rating",d.jsx(q,{column:"rating"})]})}),d.jsx("th",{className:ae("py-2 px-0 md:p-4 text-left whitespace-nowrap hidden md:table-cell w-[70px]",o?"cursor-pointer hover:text-white":"cursor-default opacity-50"),onClick:()=>B("confidence"),children:d.jsxs("div",{className:"flex items-center justify-start",children:["Conf ",d.jsx(q,{column:"confidence"})]})}),d.jsx("th",{className:ae("py-2 px-0 md:p-4 text-left whitespace-nowrap hidden md:table-cell w-[70px]",o?"cursor-pointer hover:text-white":"cursor-default opacity-50"),onClick:()=>B("spread"),children:d.jsxs("div",{className:"flex items-center justify-start",children:["Spread ",d.jsx(q,{column:"spread"})]})}),!f&&d.jsx("th",{className:"py-2 px-1.5 md:p-4 text-left hidden sm:table-cell",children:d.jsx("div",{className:"flex items-center justify-start",children:"Analysis"})}),d.jsx("th",{className:ae("py-2 px-0 md:p-4 md:pr-8 text-left whitespace-nowrap hidden md:table-cell","
461w-[120px]"),children:"Report"})]})}),d.jsx("tbody",{className:"divide-y divide-white/[0.07] text-sm font-light",children:O.map((E,G)=>{var Pt,at,gt,Ft;const D=!o&&G>=5,U=t[E.id];a[E.id];const z=Q(U,E);let $=((Pt=U==null?void 0:U.result)==null?void 0:Pt.confidence)||0;$>0&&$<=1&&($=Math.round($*100));const P=$>=80,te=((at=U==null?void 0:U.result)==null?void 0:at.summary)||"",fe=((Ft=(gt=U==null?void 0:U.result)==null?void 0:gt.updates)==null?void 0:Ft.length)||0,ce=T(E.homeTeam.fullName||E.homeTeam.name,E.awayTeam.fullName||E.awayTeam.name),R=(ce==null?void 0:ce.dkHomeBetLink)||(ce==null?void 0:ce.dkAwayBetLink),L=(ce==null?void 0:ce.fdHomeBetLink)||(ce==null?void 0:ce.fdAwayBetLink),F=ce&&(R||L)&&(ce.homeOdds!==null||ce.awayOdds!==null),S=(z==null?void 0:z.id)===E.awayTeam.id&&ce&&((ce==null?void 0:ce.dkAwayOdds)>0||(ce==null?void 0:ce.fdAwayOdds)>0),de=(z==null?void 0:z.id)===E.homeTeam.id&&ce&&((ce==null?void 0:ce.dkHomeOdds)>0||(ce==null?void 0:ce.fdHomeOdds)>0),oe=E.awayTeam.abbreviation||Ct(E.awayTeam.name),pe=E.homeTeam.abbreviation||Ct(E.homeTeam.name),[ge]=Ga(Ct(E.awayTeam.name)||oe,E.sport),[xe]=Ga(Ct(E.homeTeam.name)||pe,E.sport),we=(z==null?void 0:z.id)===E.awayTeam.id,Ie=(z==null?void 0:z.id)===E.homeTeam.id,jt=be=>{const Ze=be.fullName||"",Ke=be.name||"",sa=be.city||"";if(!Ze&&!Ke)return be.abbreviation||"";if(Ze&&Ke&&Ze.length>Ke.length&&Ze.toLowerCase().startsWith(Ke.toLowerCase())){const wn=Ze.slice(Ke.length).trim();if(wn)return wn}if(sa&&Ke.toLowerCase().startsWith(sa.toLowerCase()+" ")&&Ke.length>sa.length+1){const wn=Ke.slice(sa.length+1).trim();if(wn)return wn}return Ke},st=jt(E.awayTeam),fn=jt(E.homeTeam);let pt=new Date(E.date);Il(pt)||(pt=new Date);const Et=pt.getTime()<Date.now()&&!E.completed,At=U==null?void 0:U.result,Kt=At?Number(At.homeScorePrediction):NaN,nt=At?Number(At.awayScorePrediction):NaN,Ut=!isNaN(Kt)&&!isNaN(nt)?Math.abs(Kt-nt):0,Jt=(ce==null?void 0:ce.dkAwayOdds)??null,Bt=(ce==null?void 0:ce.fdAwayOdds)??null,zt=(ce==null?void 0:ce.dkHomeOdds)??null,xn=(ce==null?void 0:ce.fdHomeOdds)??null,lt=z?we?(ce==null?void 0:ce.awayOdds)??Jt??Bt:(ce==null?void 0:ce.homeOdds)??zt??xn:null,{stars:kn,edge:ne}=hx($,lt),he=At==null?void 0:At.updates;let ke=null;if(he&&he.length>0){const be=he[he.length-1];be.oldConfidence!==void 0&&be.newConfidence!==void 0&&(be.newConfidence>be.oldConfidence?ke="up":be.newConfidence<be.oldConfidence&&(ke="down"))}let je=null;if(he&&he.length>0){const be=he[he.length-1];if(be.oldHomeScore!==void 0&&be.newHomeScore!==void 0){const Ze=Math.abs((be.oldHomeScore||0)-(be.oldAwayScore||0)),Ke=Math.abs((be.newHomeScore||0)-(be.newAwayScore||0));Ke>Ze?je="up":Ke<Ze?je="down":je="same"}}const He=P?"text-amber-500":$>=70?"text-brand":"text-gray-400",_t=kn>=3?"text-amber-400":kn>=2?"text-brand":"text-gray-400";return d.jsxs("tr",{className:ae("transition-colors group",D?"bg-white/[0.01]":"hover:bg-white/[0.02]",Et&&"opacity-75"),children:[d.jsx("td",{className:ae("p-1 md:p-4 text-left hidden md:table-cell",D&&"opacity-30 blur-[1px]"),children:d.jsx("div",{className:"flex items-center justify-start",children:d.jsx(ee,{sport:E.sport})})}),d.jsx("td",{className:ae("hidden md:table-cell px-2 py-2 md:p-4 text-left whitespace-nowrap",D&&"opacity-30 blur-[1px]"),children:d.jsxs("div",{className:"flex flex-col items-start leading-none gap-0.5",children:[Et?d.jsxs("span",{className:"font-mono font-bold text-red-400 flex items-center gap-1 text-sm",children:[d.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-red-500"})]}),"LIVE"]}):d.jsx("span",{className:"font-mono font-semibold text-xs text-white",children:Wt(pt,"h:mma").toLowerCase()}),d.jsx("span",{className:"text-gray-500 font-medium text-[9px]",children:Wt(pt,"MMM d")})]})}),d.jsxs("td",{className:ae("py-3 px-2 md:p-1 md:px-4 text-left",D&&"md:opacity-30 md:blur-[1px]"),children:[d.jsx("div",{className:ae("md:hidden",D&&"opacity-40 blur-[1px]"),children:D?d.jsxs("div",{className:"cursor-pointer",onClick:u,children:[d.jsxs("div",{className:"grid grid-cols-5 items-center text-center text-[10px] text-gray-600 mb-1 px-1",children:[d.jsxs("div",{className:"flex items-center justify-center gap-1",children:[d.jsx(ee,{sport:E.sport,size:"xs"}),d.jsx("span",{className:"font-mono",children:Wt(pt,"h:mma").toLowerCase()})]}),d.jsx("div",{}),d.jsx("div",{}),d.jsx("div",{}),d.jsx("div",{})]}),d.jsxs("div",{className:"flex items-center",children:[d.jsxs("div",{className:"flex-1 flex items-center gap-1.5 px-2 py-1.5 rounded-lg",children:[d.jsx("img",{src:E.awayTeam.logoUrl,className:"w-5 h-5 object-contain opacity-50",alt:""}),d.jsx("span",{className:"font-teko text-lg uppercase text-gray-500",children:oe})]}),d.jsx("span",{className:"text-white/[0.08] text-xl font-light px-1 flex-shrink-0",children:"@"}),d.jsxs("div",{className:"flex-1 flex items-center gap-1.5 px-2 py-1.5 rounded-lg justify-end flex-row-reverse",children:[d.jsx("img",{src:E.homeTeam.logoUrl,className:"w-5 h-5 object-contain opacity-50",alt:""}),d.jsx("span",{className:"font-teko text-lg uppercase text-gray-500",children:pe})]})]})]}):d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center divide-x divide-white/10 bg-white/[0.03] rounded-lg mb-1.5 py-1.5",children:[d.jsxs("div",{className:"flex-1 flex items-center justify-center gap-1.5 px-1",children:[d.jsx(ee,{sport:E.sport,size:"xs"}),Et?d.jsxs("span",{className:"font-mono font-bold text-red-400 flex items-center gap-1 text-[10px]",children:[d.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-red-500"})]}),"LIVE"]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-mono font-semibold text-white text-[10px] leading-none",children:Wt(pt,"h:mma").toLowerCase()}),d.jsx("span",{className:"text-gray-600 text-[9px] leading-none",children:Wt(pt,"M/d")})]})]}),d.jsx("div",{className:"flex-1 flex justify-center px-1",children:$>0?[1,2,3].map(be=>d.jsx(jy,{className:ae("w-2.5 h-2.5",be<=kn?"text-yellow-400 fill-yellow-400":"text-gray-700")},be)):d.jsx("span",{className:"text-gray-700 text-[10px]",children:"—"})}),d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-1",children:[d.jsx("span",{className:"text-[7px] text-gray-600 uppercase tracking-widest leading-none mb-0.5",children:"Conf"}),$>0?d.jsxs("div",{className:"flex items-center gap-0.5",children:[d.jsx("span",{className:ae("font-teko text-base leading-none",He),children:$}),P&&d.jsx(Nr,{className:"w-2.5 h-2.5 text-amber-500 animate-pulse"}),ke==="up"&&d.jsx(Al,{className:"w-2 h-2 text-emerald-400",strokeWidth:3}),ke==="down"&&d.jsx(kl,{className:"w-2 h-2 text-red-400",strokeWidth:3})]}):d.jsx("span",{className:"text-gray-700 text-[10px]",children:"—"})]}),d.jsx("div",{className:"flex-1 flex justify-center px-1",children:d.jsxs("button",{onClick:be=>{be.stopPropagation(),U!=null&&U.result?V(E,"game"):h(E.id,"game")},disabled:!(i!=null&&i.isAdmin)&&!(U!=null&&U.result),className:ae("relative p-1 rounded transition-all",U!=null&&U.result?"text-gray-500 active:text-brand":"text-gray-700 cursor-not-allowed"),children:[d.jsx(bs,{className:"w-3.5 h-3.5"}),fe>0&&d.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex items-center justify-center rounded-full bg-brand text-black h-2 w-2 text-[5px] font-extrabold",children:fe})]})})]}),d.jsxs("div",{className:"flex items-stretch",children:[(()=>{const be=C(E.id,E.awayTeam.id),Ze=N===`${E.id}-${E.awayTeam.id}`,Ke=d.jsxs("div",{className:ae("flex-1 flex items-center gap-2.5 px-3 py-2.5 rounded-lg transition-all relative overflow-hidden min-w-0",F&&"active:scale-[0.98]",be||Ze?"bg-brand/10 border border-brand shadow-sm shadow-brand/20":we?"border border-white/[0.06]":"border border-transparent"),style:we&&!be&&!Ze?{background:Xi(ge)}:void 0,children:[!!S&&d.jsx(Ec,{isNativeApp:f}),d.jsx("img",{src:E.awayTeam.logoUrl,className:ae("w-8 h-8 object-contain flex-shrink-0",z&&!we&&"opacity-40"),alt:""}),d.jsxs("div",{className:"flex flex-col items-start min-w-0 flex-1 overflow-hidden",children:[d.jsx("span",{className:ae("font-teko text-xl uppercase leading-none tracking-wide truncate w-full block",we?"text-white":z?"text-gray-500 opacity-60":"text-gray-300"),children:st}),(Jt!==null||Bt!==null)&&d.jsxs("div",{className:"flex gap-1",children:[Jt!==null&&d.jsx("span",{className:"text-[8px] font-mono text-[#53d337] leading-none",children:fs(Jt)}),Bt!==null&&d.jsx("span",{className:"text-[8px] font-mono text-[#1493ff] leading-none",children:fs(Bt)})]})]}),!isNaN(nt)&&d.jsx("span",{className:ae("ml-auto font-teko text-3xl leading-none flex-shrink-0",we?"text-white":"text-gray-600"),children:Math.round(nt)})]});return F?d.jsx("button",{onClick:()=>j(E,E.awayTeam),className:"flex-1 text-left min-w-0",children:Ke}):Ke})(),d.jsx("div",{className:"flex items-center justify-center w-5 flex-shrink-0",children:d.jsx("span",{className:"text-white/[0.08] text-sm font-light leading-none",children:"@"})}),(()=>{const be=C(E.id,E.homeTeam.id),Ze=N===`${E.id}-${E.homeTeam.id}`,Ke=d.jsxs("div",{className:ae("flex-1 flex items-center gap-2.5 px-3 py-2.5 rounded-lg transition-all relative flex-row-reverse overflow-hidden min-w-0",F&&"active:scale-[0.98]",be||Ze?"bg-brand/10 border border-brand shadow-sm shadow-brand/20":Ie?"border border-white/[0.06]":"border border-transparent"),style:Ie&&!be&&!Ze?{background:Xi(xe)}:void 0,children:[!!de&&d.jsx(Ec,{isNativeApp:f}),d.jsx("img",{src:E.homeTeam.logoUrl,className:ae("w-8 h-8 object-contain flex-shrink-0",z&&!Ie&&"opacity-40"),alt:""}),d.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1 overflow-hidden",children:[d.jsx("span",{className:ae("font-teko text-xl uppercase leading-none tracking-wide truncate w-full block text-right",Ie?"text-white":z?"text-gray-500 opacity-60":"text-gray-300"),children:fn}),(zt!==null||xn!==null)&&d.jsxs("div",{className:"flex gap-1",children:[zt!==null&&d.jsx("span",{className:"text-[8px] font-mono text-[#53d337] leading-none",children:fs(zt)}),xn!==null&&d.jsx("span",{className:"text-[8px] font-mono text-[#1493ff] leading-none",children:fs(xn)})]})]}),!isNaN(Kt)&&d.jsx("span",{className:ae("font-teko text-3xl leading-none flex-shrink-0",Ie?"text-white":"text-gray-600"),children:Math.round(Kt)})]});return F?d.jsx("button",{onClick:()=>j(E,E.homeTeam),className:"flex-1 text-right min-w-0",children:Ke}):Ke})()]})]})}),d.jsx("div",{className:ae("hidden md:block",D&&"opacity-30 blur-[1px]"),children:F?d.jsxs("button",{onClick:()=>j(E,E.awayTeam),className:ae("relative flex items-center gap-1.5 w-full px-3 py-2 rounded-lg border transition-[background-color,border-color,box-shadow] duration-300 ease-out cursor-pointer","justify-start",C(E.id,E.awayTeam.id)||N===`${E.id}-${E.awayTeam.id}`?"bg-brand/10 border-brand shadow-lg shadow-brand/20":!D&&we?"border-white/[0.06] hover:border-white/15 active:border-brand/30":"bg-white/[0.02] border-transparent hover:bg-white/[0.04] hover:border-white/10 active:border-brand/30"),style:!D&&we&&!(C(E.id,E.awayTeam.id)||N===`${E.id}-${E.awayTeam.id}`)?{background:Xi(ge)}:void 0,children:[S&&!D&&d.jsx(Ec,{isNativeApp:f}),d.jsx("img",{src:E.awayTeam.logoUrl,className:ae("w-6 h-6 object-contain flex-shrink-0 transition-opacity",!D&&z&&z.id!==E.awayTeam.id&&"opacity-40"),alt:""}),d.jsx("span",{className:ae("font-teko text-xl uppercase tracking-wide truncate",!D&&(z==null?void 0:z.id)===E.awayTeam.id?"text-white":!D&&z?"text-gray-500 opacity-60":"text-gray-300"),children:(E.sport==="CBB"||E.sport==="NCAAF")&&E.awayTeam.fullName?E.awayTeam.fullName:E.awayTeam.name}),d.jsx("span",{className:"opacity-0 group-hover:opacity-100 font-teko text-base ml-auto text-gray-500 transition-opacity",children:dx(Jt,Bt)})]}):d.jsxs("div",{className:ae("flex items-center justify-start gap-1.5 w-full px-3 py-2 rounded-lg",!D&&we&&"border border-white/[0.06]"),style:!D&&we?{background:Xi(ge)}:void 0,children:[d.jsx("img",{src:E.awayTeam.logoUrl,className:ae("w-6 h-6 object-contain flex-shrink-0 transition-opacity",!D&&z&&z.id!==E.awayTeam.id&&"opacity-40"),alt:""}),d.jsx("span",{className:ae("font-teko text-xl uppercase tracking-wide truncate",!D&&(z==null?void 0:z.id)===E.awayTeam.id?"text-white":!D&&z?"text-gray-500 opacity-60":"text-gray-300"),children:(E.sport==="CBB"||E.sport==="NCAAF")&&E.awayTeam.fullName?E.awayTeam.fullName:E.awayTeam.name}),!D&&d.jsx("span",{className:"ml-auto text-gray-500/60 italic shrink-0 text-[10px]",children:"No lines"})]})})]}),d.jsx("td",{className:ae("hidden md:table-cell p-1 md:p-4 text-left whitespace-nowrap",D&&"opacity-30 blur-[1px]"),children:F?d.jsxs("button",{onClick:()=>j(E,E.homeTeam),className:ae("relative flex items-center gap-1.5 w-full px-3 py-2 rounded-lg border transition-[background-color,border-color,box-shadow] duration-300 ease-out cursor-pointer","justify-start",C(E.id,E.homeTeam.id)||N===`${E.id}-${E.homeTeam.id}`?"bg-brand/10 border-brand shadow-lg shadow-brand/20":!D&&Ie?"border-white/[0.06] hover:border-white/15 active:border-brand/30":"bg-white/[0.02] border-transparent hover:bg-white/[0.04] hover:border-white/10 active:border-brand/30"),style:!D&&Ie&&!(C(E.id,E.homeTeam.id)||N===`${E.id}-${E.homeTeam.id}`)?{background:Xi(xe)}:void 0,children:[de&&!D&&d.jsx(Ec,{isNativeApp:f}),d.jsx("img",{src:E.homeTeam.logoUrl,className:ae("w-6 h-6 object-contain flex-shrink-0 transition-opacity",!D&&z&&z.id!==E.homeTeam.id&&"opacity-40"),alt:""}),d.jsx("span",{className:ae("font-teko text-xl uppercase tracking-wide truncate",!D&&(z==null?void 0:z.id)===E.homeTeam.id?"text-white":!D&&z?"text-gray-500 opacity-60":"text-gray-300"),children:(E.sport==="CBB"||E.sport==="NCAAF")&&E.homeTeam.fullName?E.homeTeam.fullName:E.homeTeam.name}),d.jsx("span",{className:"opacity-0 group-hover:opacity-100 font-teko text-base ml-auto text-gray-500 transition-opacity",children:dx(zt,xn)})]}):d.jsxs("div",{className:ae("flex items-center justify-start gap-1.5 w-full px-3 py-2 rounded-lg",!D&&Ie&&"border border-white/[0.06]"),style:!D&&Ie?{background:Xi(xe)}:void 0,children:[d.jsx("img",{src:E.homeTeam.logoUrl,className:ae("w-6 h-6 object-contain flex-shrink-0 transition-opacity",!D&&z&&z.id!==E.homeTeam.id&&"opacity-40"),alt:""}),d.jsx("span",{className:ae("font-teko text-xl uppercase tracking-wide truncate",!D&&(z==null?void 0:z.id)===E.homeTeam.id?"text-white":!D&&z?"text-gray-500 opacity-60":"text-gray-300"),children:(E.sport==="CBB"||E.sport==="NCAAF")&&E.homeTeam.fullName?E.homeTeam.fullName:E.homeTeam.name}),!D&&d.jsx("span",{className:"ml-auto text-gray-500/60 italic shrink-0 text-[10px]",children:"No lines"})]})}),d.jsx("td",{className:"hidden md:table-cell p-4",children:D?d.jsx("div",{className:"flex justify-start opacity-30",children:d.jsx(ii,{className:"w-4 h-4 text-gray-500"})}):$<=0?d.jsx("span",{className:"text-gray-600 text-xs",children:"-"}):d.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[d.jsx("div",{className:"flex",children:[1,2,3].map(be=>d.jsx(jy,{className:ae("w-3 h-3",be<=kn?"text-yellow-400 fill-yellow-400":"text-gray-700")},be))}),ne!==null&&d.jsxs("span",{className:ae("font-teko text-sm leading-tight",_t),children:[ne.toFixed(1),"%"]})]})}),d.jsx("td",{className:"hidden md:table-cell px-3 py-1 md:p-4 text-left",children:D?d.jsx("div",{className:"flex justify-start opacity-30",children:d.jsx(ii,{className:"w-4 h-4 text-gray-500"})}):$<=0?d.jsx("span",{className:"text-gray-600 text-xs",children:"-"}):d.jsxs("div",{className:"flex items-center justify-start gap-0.5",children:[d.jsx(Er,{content:"Confidence %",position:"top",children:d.jsxs("div",{className:"flex items-center cursor-help",children:[d.jsx("span",{className:ae("font-teko text-2xl pt-0.5",He),children:$}),ke==="up"&&d.jsx(Er,{content:"Confidence increased since last update",position:"top",children:d.jsx(Al,{className:"ml-1 w-2.5 h-2.5 text-emerald-400 cursor-help",strokeWidth:3})}),ke==="down"&&d.jsx(Er,{content:"Confidence decreased since last update",position:"top",children:d.jsx(kl,{className:"ml-1 w-2.5 h-2.5 text-red-400 cursor-help",strokeWidth:3})}
461)]})}),P&&d.jsx(Nr,{className:"text-amber-500 ml-0.5 shrink-0 w-3.5 h-3.5 animate-pulse"})]})}),d.jsx("td",{className:"hidden md:table-cell p-1 md:p-4 text-left",children:(()=>{if(D)return d.jsx("span",{className:"text-gray-600 text-xs opacity-30",children:"-"});if(isNaN(Kt)||isNaN(nt))return d.jsx("span",{className:"text-gray-600 text-xs",children:"-"});const be=({t:Ze})=>Ze?Ze==="up"?d.jsx(Er,{content:"Spread widened since last update",position:"top",children:d.jsx(Al,{className:"ml-1 w-2.5 h-2.5 text-emerald-400 cursor-help",strokeWidth:3})}):Ze==="down"?d.jsx(Er,{content:"Spread tightened since last update",position:"top",children:d.jsx(kl,{className:"ml-1 w-2.5 h-2.5 text-red-400 cursor-help",strokeWidth:3})}):d.jsx(Er,{content:"Spread unchanged since last update",position:"top",children:d.jsx("span",{className:"ml-1 w-2.5 h-2.5 rounded-full bg-gray-800 flex items-center justify-center cursor-help",children:d.jsx(bN,{className:"w-1.5 h-1.5 text-gray-400",strokeWidth:3})})}):null;return Ut===0?d.jsxs("div",{className:"flex items-center",children:[d.jsx("span",{className:"text-gray-400 font-teko text-2xl pt-0.5",children:"PK"}),d.jsx(be,{t:je})]}):d.jsxs("div",{className:"flex items-center",children:[d.jsxs("span",{className:"font-teko text-white text-2xl pt-0.5",children:["-",Ut]}),d.jsx(be,{t:je})]})})()}),!f&&d.jsx("td",{className:"p-1.5 md:p-4 text-left max-w-[200px] md:max-w-[400px] hidden sm:table-cell",children:D?d.jsxs("div",{className:"flex items-center gap-2 opacity-30 select-none",children:[d.jsx("div",{className:"h-1.5 w-16 bg-gray-500 rounded"}),d.jsx("div",{className:"h-1.5 w-8 bg-gray-500 rounded"}),d.jsx("div",{className:"h-1.5 w-12 bg-gray-500 rounded"})]}):d.jsx("div",{className:"line-clamp-2 text-[10px] md:text-xs text-gray-300 font-light leading-relaxed",title:te,children:te||"-"})}),d.jsx("td",{className:ae("hidden md:table-cell text-center md:text-left",f?"px-0 py-3":"px-0 py-3 md:p-4 md:pr-10"),children:d.jsx("div",{className:"flex items-center justify-center md:justify-start gap-1",children:D?d.jsxs("button",{onClick:u,className:ae("rounded flex items-center gap-1 transition-all whitespace-nowrap",p||f?"p-1.5":"p-1.5 md:px-3 md:py-1.5 text-[9px] md:text-[10px]","text-gray-600 md:bg-white/5 md:hover:bg-white/10 md:border md:border-white/10 md:text-gray-400 md:uppercase md:tracking-wider"),children:[d.jsx(ii,{className:"w-3 h-3"})," ",!f&&d.jsx("span",{className:"hidden md:inline",children:"Unlock"})]}):d.jsxs("button",{onClick:()=>U!=null&&U.result?V(E,"game"):h(E.id,"game"),disabled:!(i!=null&&i.isAdmin)&&!(U!=null&&U.result),className:ae("rounded flex items-center gap-1 transition-all relative",p||f?"p-1.5":"p-1.5 md:px-3 md:py-1.5 text-[9px] md:text-[10px]",U!=null&&U.result?"text-gray-500 active:text-brand md:bg-brand/10 md:text-brand md:border md:border-brand/20 md:hover:bg-brand/20 md:font-bold md:uppercase md:tracking-wider":"text-gray-700 md:bg-white/5 md:text-gray-500 md:border md:border-white/5 cursor-not-allowed"),title:fe>0?`${fe} updates available`:"Game Report",children:[d.jsx(bs,{className:"w-3.5 h-3.5 md:w-3 md:h-3"}),!f&&d.jsx("span",{className:"hidden md:inline",children:"Report"}),fe>0&&d.jsx("span",{className:"absolute -top-1 -right-1 flex items-center justify-center rounded-full bg-brand text-black h-2.5 w-2.5 md:h-3 md:w-3 text-[6px] md:text-[7px] font-extrabold",children:fe})]})})})]},E.id)})})]}),e.length===0&&d.jsx("div",{className:"p-12 text-center text-gray-500 uppercase tracking-widest font-mono text-xs",children:"No games found"})]}),d.jsx(Zw,{isOpen:x.isOpen,onClose:()=>w(E=>({...E,isOpen:!1})),title:x.title,report:x.report,debugData:x.debug,propsData:x.propsData,updates:x.updates,game:x.game,prediction:x.prediction})]})}),Qh=(e,t=2e3,a=0)=>{const[i,l]=J.useState(null),[o,u]=J.useState(null),h=J.useRef(null);return J.useEffect(()=>{if(e===null){l(null),u(null);return}if(e===0){l(0),u(0);return}if(o!==null&&Math.abs(e-o)<.5)return;const p=i??0;let y=null,b=0;const x=N=>{y===null&&(y=N);const A=Math.min((N-y)/t,1),_=1-Math.pow(1-A,3),C=p+(e-p)*_;l(C),A<1?b=requestAnimationFrame(x):(l(e),u(e))};b=requestAnimationFrame(x);const w=setTimeout(()=>{l(e),u(e)},t+100);return()=>{cancelAnimationFrame(b),clearTimeout(w)}},[e,t]),{count:i===null?"...":a>
4610?i.toFixed(a):Math.round(i).toLocaleString(),ref:h,isLoading:i===null}},q4=({globalStats:e,user:t,onNavigate:a})=>{const[i,l]=J.useState(null),[o,u]=J.useState(0);J.useEffect(()=>{e&&(e.totalPredictions>0||e.overallWinRate>0)||Dl().then(A=>{A&&(A.totalPredictions>0||A.overallWinRate>0||A.eliteWinRate>0)&&l(A)}).catch(()=>{})},[e]),J.useEffect(()=>{const A=setInterval(()=>{u(_=>(_+1)%3)},3e3);return()=>clearInterval(A)},[]);const h=e&&(e.totalPredictions>0||e.overallWinRate>0)?e:i,f=h!==null&&((h.totalPredictions??0)>0||(h.overallWinRate??0)>0||(h.eliteWinRate??0)>0),p=J.useMemo(()=>{const A=h||{};return{overallWinRate:A.overallWinRate||67,eliteWinRate:A.eliteWinRate||95.8,roi:A.overallROI||26.4,eliteRoi:A.eliteROI||82.6,totalPredictions:A.totalPredictions||1231,highConfidenceTotal:A.highConfidenceTotal||167,highConfidenceCorrect:A.highConfidenceCorrect||160}},[h,f]),y=Qh(p.roi,1500,1),b=Qh(p.eliteWinRate,1500,1),x=Qh(p.totalPredictions,1200,0),w=[sn.useRef(null),sn.useRef(null),sn.useRef(null)];J.useEffect(()=>{w.forEach((A,_)=>{A.current&&(_===o?(A.current.currentTime=[0,3,6.5][_],A.current.play()):A.current.pause())})},[o]);const N=()=>a("dashboard");return d.jsxs("div",{className:"relative w-full",children:[d.jsxs("section",{className:"relative min-h-[70vh] sm:min-h-0 flex flex-col justify-center overflow-hidden bg-gradient-to-b from-dark-950 via-dark-900 to-dark-950",children:[d.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[d.jsx("div",{className:"absolute top-1/4 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[900px] h-[600px] bg-brand/8 rounded-full blur-[180px] animate-pulse",style:{animationDuration:"8s"}}),d.jsx("div",{className:"absolute -top-20 -right-20 w-[500px] h-[500px] bg-emerald-600/6 rounded-full blur-[140px] animate-pulse",style:{animationDuration:"6s",animationDelay:"1s"}}),d.jsx("div",{className:"absolute bottom-0 -left-20 w-[400px] h-[400px] bg-brand/6 rounded-full blur-[100px] animate-pulse",style:{animationDuration:"7s",animationDelay:"2s"}}),d.jsx("div",{className:"absolute inset-0 bg-[repeating-linear-gradient(135deg,transparent,transparent_60px,rgba(51,214,82,0.015)_60px,rgba(51,214,82,0.015)_61px)] [mask-image:radial-gradient(ellipse_100%_80%_at_50%_20%,#000_40%,transparent_100%)]"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(rgba(51,214,82,0.08)_1px,transparent_1px)] bg-[size:32px_32px] [mask-image:radial-gradient(ellipse_70%_50%_at_50%_30%,#000_50%,transparent_100%)]"}),d.jsx("div",{className:"absolute top-[40%] left-0 right-0 h-px bg-gradient-to-r from-transparent via-brand/30 to-transparent"}),d.jsx("div",{className:"absolute top-[60%] left-0 right-0 h-px bg-gradient-to-r from-transparent via-brand/15 to-transparent"}),d.jsx("div",{className:"absolute top-[25%] left-0 right-0 h-px bg-gradient-to-r from-transparent via-emerald-400/20 to-transparent"}),d.jsx("div",{className:"absolute top-0 bottom-0 left-[20%] w-px bg-gradient-to-b from-transparent via-brand/10 to-transparent"}),d.jsx("div",{className:"absolute top-0 bottom-0 right-[25%] w-px bg-gradient-to-b from-transparent via-brand/10 to-transparent"}),d.jsx("div",{className:"absolute inset-0 bg-[repeating-linear-gradient(0deg,transparent,transparent_2px,rgba(51,214,82,0.02)_2px,rgba(51,214,82,0.02)_4px)]"}),d.jsx("div",{className:"absolute top-0 left-0 w-32 h-32 border-l-2 border-t-2 border-brand/20"}),d.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 border-r-2 border-t-2 border-brand/20"}),d.jsx("div",{className:"absolute bottom-0 left-0 w-32 h-32 border-l-2 border-b-2 border-brand/20"}),d.jsx("div",{className:"absolute bottom-0 right-0 w-32 h-32 border-r-2 border-b-2 border-brand/20"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_60%_50%_at_50%_40%,transparent_0%,rgba(0,0,0,0.6)_100%)]"})]}),d.jsxs("div",{className:"relative z-10 w-full max-w-5xl mx-auto text-center px-7 sm:px-6 pb-8 sm:py-20 mt-4 sm:mt-0",children:[d.jsxs("h1",{className:"font-teko font-light text-[4.5rem] sm:text-7xl md:text-8xl lg:text-9xl text-white !leading-[0.85] tracking-tight uppercase animate-in fade-in slide-in-from-bottom-6 duration-700 delay-100",style:{textShadow:"0 4px 20px rgba(0,0,0,0.8)"},children:[d.jsx("span",{className:"text-white/90",children:"GAIN AN"}),d.jsx("br",{}),d.jsx("span",{className:"text-brand",children:"UNFAIR ADVANTAGE"})]}),d.jsx("p",{className:"text-sm sm:text-lg md:text-xl text-white max-w-2xl mx-auto mb-10 sm:mb-14 font-light animate-in fade-in slide-in-from-bottom-8 duration-700 delay-200 leading-relaxed",style:{textShadow:"0 2px 12px rgba(0,0,0,0.7)"},children:"AI-powered game picks, player props, and parlays with transparent, verified results."}),d.jsxs("div",{ref:y.ref,className:"grid grid-cols-3 gap-2 sm:gap-6 md:gap-10 max-w-4xl mx-auto mb-10 sm:mb-12 animate-in fade-in slide-in-from-bottom-10 duration-700 delay-300",children:[d.jsxs("div",{className:`bg-gradient-to-b from-dark-800/80 to-dark-900/80 backdrop-blur-sm border rounded-xl sm:rounded-2xl p-4 sm:p-5 md:p-8 relative overflow-hidden transition-all duration-500 ${o===0?"border-brand/40 shadow-[0_0_30px_rgba(51,214,82,0.2)]":"border-brand/20"}`,children:[d.jsx("video",{ref:w[0],src:"https://api.matchups.ai/storage/v1/object/public/images/bg.mp4",muted:!0,loop:!0,playsInl
461ine:!0,"webkit-playsinline":"true",className:`hidden md:block absolute inset-0 w-full h-full object-cover transition-opacity duration-500 pointer-events-none ${o===0?"opacity-[0.15]":"opacity-0"}`}),d.jsx("div",{className:"absolute top-0 left-0 w-full h-0.5 sm:h-1 bg-gradient-to-r from-transparent via-brand to-transparent"}),d.jsx("div",{className:`absolute bottom-0 left-0 w-full h-16 bg-gradient-to-t from-brand/20 to-transparent transition-opacity duration-500 ${o===0?"opacity-100":"opacity-0"}`}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs md:text-sm text-gray-400 uppercase tracking-wider mb-1 sm:mb-2",children:"Overall ROI"}),d.jsx("div",{className:`relative z-10 font-teko text-4xl sm:text-5xl md:text-6xl lg:text-7xl text-brand font-normal leading-none ${y.isLoading?"animate-pulse":""}`,children:y.isLoading?d.jsx("span",{className:"opacity-50",children:"--.-"}):d.jsxs(d.Fragment,{children:["+",y.count,"%"]})}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs text-gray-400 mt-0.5 sm:mt-1",children:"VERIFIED"})]}),d.jsxs("div",{ref:b.ref,className:`bg-gradient-to-b from-dark-800/80 to-dark-900/80 backdrop-blur-sm border rounded-xl sm:rounded-2xl p-4 sm:p-5 md:p-8 relative overflow-hidden transition-all duration-500 ${o===1?"border-amber-500/40 shadow-[0_0_30px_rgba(245,158,11,0.2)]":"border-amber-500/20"}`,children:[d.jsx("video",{ref:w[1],src:"https://api.matchups.ai/storage/v1/object/public/images/bg.mp4",muted:!0,loop:!0,playsInline:!0,"webkit-playsinline":"true",className:`hidden md:block absolute inset-0 w-full h-full object-cover transition-opacity duration-500 pointer-events-none ${o===1?"opacity-[0.15]":"opacity-0"}`}),d.jsx("div",{className:"absolute top-0 left-0 w-full h-0.5 sm:h-1 bg-gradient-to-r from-transparent via-amber-500 to-transparent"}),d.jsx("div",{className:`absolute bottom-0 left-0 w-full h-16 bg-gradient-to-t from-amber-500/20 to-transparent transition-opacity duration-500 ${o===1?"opacity-100":"opacity-0"}`}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs md:text-sm text-gray-400 uppercase tracking-wider mb-1 sm:mb-2",children:"Elite Picks"}),d.jsx("div",{className:`relative z-10 font-teko text-4xl sm:text-5xl md:text-6xl lg:text-7xl text-amber-500 font-normal leading-none ${b.isLoading?"animate-pulse":""}`,children:b.isLoading?d.jsx("span",{className:"opacity-50",children:"--.-"}):d.jsxs(d.Fragment,{children:[b.count,"%"]})}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs text-gray-400 mt-0.5 sm:mt-1",children:"WIN RATE"})]}),d.jsxs("div",{ref:x.ref,className:`bg-gradient-to-b from-dark-800/80 to-dark-900/80 backdrop-blur-sm border rounded-xl sm:rounded-2xl p-4 sm:p-5 md:p-8 relative overflow-hidden transition-all duration-500 ${o===2?"border-white/20 shadow-[0_0_30px_rgba(255,255,255,0.15)]":"border-white/10"}`,children:[d.jsx("video",{ref:w[2],src:"https://api.matchups.ai/storage/v1/object/public/images/bg.mp4",muted:!0,loop:!0,playsInline:!0,"webkit-playsinline":"true",className:`hidden md:block absolute inset-0 w-full h-full object-cover transition-opacity duration-500 pointer-events-none ${o===2?"opacity-[0.15]":"opacity-0"}`}),d.jsx("div",{className:"absolute top-0 left-0 w-full h-0.5 sm:h-1 bg-gradient-to-r from-transparent via-white/30 to-transparent"}),d.jsx("div",{className:`absolute bottom-0 left-0 w-full h-16 bg-gradient-to-t from-white/15 to-transparent transition-opacity duration-500 ${o===2?"opacity-100":"opacity-0"}`}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs md:text-sm text-gray-400 uppercase tracking-wider mb-1 sm:mb-2",children:"Graded Picks"}),d.jsx("div",{className:`relative z-10 font-teko text-4xl sm:text-5xl md:text-6xl lg:text-7xl text-white font-normal leading-none ${x.isLoading?"animate-pulse":""}`,children:x.isLoading?d.jsx("span",{className:"opacity-50",children:"---"}):d.jsx(d.Fragment,{children:x.count})}),d.jsx("div",{className:"relative z-10 text-[9px] sm:text-xs text-gray-400 mt-0.5 sm:mt-1",children:"& COUNTING"})]})]}),d.jsx("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-5 justify-center animate-in fade-in slide-in-from-bottom-12 duration-700 delay-400",children:d.jsxs("button",{onClick:N,className:"px-8 sm:px-10 py-3 sm:py-4 bg-brand text-black font-teko text-xl sm:text-2xl uppercase tracking-wide rounded-xl hover:bg-white transition-all shadow-[0_0_40px_rgba(51,214,82,0.3)] hover:shadow-[0_0_60px_rgba(255,255,255,0.3)] flex items-center justify-center gap-3 group",children:[d.jsx(xs,{className:"w-5 h-5 fill-current"}),"Get Today's Picks Free",d.jsx(Ey,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]})})]})]}),d.jsxs("section",{className:"relative bg-dark-950 border-y border-white/5 overflow-hidden",children:[d.jsx("div",{className:"hidden md:block",children:d.jsxs("div",{className:"relative min-h-[750px]",children:[d.jsxs("div",{className:"absolute inset-y-0 right-0 w-[70%]",children:[d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/games.png",alt:"Matchups.AI game picks dashboard showing AI-powered sports predictions with confidence scores",className:"w-full h-full object-cover object-top"}),d.jsx("div",{className:"absolute inset-y-0 left-0 w-2/3 bg-gradient-to-r from-dark-950 via-dark-950/60 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-dark-950 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-dark-950 to-transparent"})]}),d.jsx("div",{className:"absolute inset-y-0 left-0 w-[30%] bg-dark-950"}),d.jsx("div",{className:"relative z-10 w-full max-w-6xl mx-auto px-6 py-24 flex items-center min-h-[750px]",children:d.jsxs("div",{className:"max-w-md",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-brand/10 border border-brand/20 mb-5 backdrop-blur-sm",children:[d.jsx(Ll,{className:"w-4 h-4 text-brand"}),d.jsx("span",{className:"text-brand text-xs uppercase tracking-widest",children:"Game Picks"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["EVERY GAME.",d.jsx("br",{}),d.jsx("span",{className:"text-brand",children:"EVERY EDGE."})]}),d.jsx("p",{className:"text-gray-300 text-base sm:text-lg mb-8 leading-relaxed",children:"Moneylines and spreads across 6 sports — each pick backed by AI confidence scores and full research reports."}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Confidence-rated picks for every matchup"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Detailed AI reports explaining the edge"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"NFL, NBA, MLB, NHL, NCAAF & CBB"})]})]})]})})]})}),d.jsx("div",{className:"md:hidden py-10 px-7",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-brand/10 border border-brand/20 mb-5",children:[d.jsx(Ll,{className:"w-4 h-4 text-brand"}),d.jsx("span",{className:"text-brand text-[10px] uppercase tracking-widest",children:"Game Picks"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["EVERY GAME.",d.jsx("br",{}),d.jsx("span",{className:"text-brand",children:"EVERY EDGE."})]}),d.jsx("p",{className:"text-gray-300 text-sm mb-8 leading-relaxed",children:"Moneylines and spreads across 6 sports — each pick backed by AI confidence scores and full research reports."}),d.jsxs("div",{className:"space-y-3 text-left max-w-sm mx-auto",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Confidence-rated picks for every matchup"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Detailed AI reports explaining the edge"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"NFL, NBA, MLB, NHL, NCAAF & CBB"})]})]})]}),d.jsx("div",{className:"relative -mx-7",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/games.png",alt:"AI Game Picks Dashboard",className:"relative w-full"})})]})})]}),d.jsxs("section",{className:"relative bg-dark-800 border-y border-white/5 overflow-hidden",children:[d.jsx("div",{className:"hidden md:block",children:d.jsxs("div",{className:"relative min-h-[750px]",children:[d.jsxs("div",{className:"absolute inset-y-0 left-0 w-[60%]",children:[d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/props.png",alt:"Matchups.AI player props analysis with AI predictions for DraftKings and FanDuel",className:"w-full h-full object-cover object-top"}),d.jsx("div",{className:"absolute inset-y-0 right-0 w-1/2 bg-gradient-to-l from-dark-800 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-dark-800 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-dark-800 to-transparent"})]}),d.jsx("div",{className:"absolute inset-y-0 right-0 w-[40%] bg-dark-800"}),d.jsx("div",{className:"relative z-10 w-full max-w-6xl mx-auto px-6 py-24 flex items-center justify-end min-h-[750px]",children:d.jsxs("div",{className:"max-w-md text-left",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-cyan-500/10 border border-cyan-500/20 mb-5 backdrop-blur-sm",children:[d.jsx(Fy,{className:"w-4 h-4 text-cyan-400"}),d.jsx("span",{className:"text-cyan-400 text-xs uppercase tracking-widest",children:"Player Props"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["PLAYER-LEVEL",d.jsx("br",{}),d.jsx("span",{className:"text-cyan-400",children:"INTELLIGENCE"})]}),d.jsx("p",{className:"text-gray-300 text-base sm:text-lg mb-8 leading-relaxed",children:"Over/under analysis on individual performances with edge percentages, scout intel, and season stats."}),d.jsxs("div",{className:"space-y-3 text-left",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"AI confidence + edge % on every prop"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Scout intel with narrative context"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Season stats & matchup breakdown"})]})]})]})})]})}),d.jsx("div",{className:"md:hidden pt-10 pb-0 px-7",children:d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-cyan-500/10 border border-cyan-500/20 mb-5",children:[d.jsx(Fy,{className:"w-4 h-4 text-cyan-400"}),d.jsx("span",{className:"text-cyan-400 text-[10px] uppercase tracking-widest",children:"Player Props"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["PLAYER-LEVEL",d.jsx("br",{}),d.jsx("span",{className:"text-cyan-400",children:"INTELLIGENCE"})]}),d.jsx("p",{className:"text-gray-300 text-sm mb-8 leading-relaxed",children:"Over/under analysis on individual performances with edge percentages, scout intel, and season stats."}),d.jsxs("div",{className:"space-y-3 text-left max-w-sm mx-auto",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"AI confidence + edge % on every prop"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Scout intel with narrative context"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-cyan-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Season stats & matchup breakdown"})]})]})]}),d.jsx("div",{className:"relative -mx-7 -mb-0",children:d.jsx("img",{src:"https://api.matchups.ai/storage/v1/object/public/images/props.png",alt:"Player Props Analysis",className:"relative w-full"})})]})})]}),d.jsx("section",{className:"py-10 sm:py-24 bg-dark-950 border-y border-white/5 overflow-hidden",children:d.jsx("div",{className:"w-full max-w-6xl mx-auto px-7 sm:px-6",children:d.jsxs("div",{className:"grid md:grid-cols-5 ga
461p-10 md:gap-12 items-center",children:[d.jsxs("div",{className:"text-center md:text-left md:col-span-2",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-purple-500/10 border border-purple-500/20 mb-5",children:[d.jsx(Fc,{className:"w-4 h-4 text-purple-400"}),d.jsx("span",{className:"text-purple-400 text-[10px] sm:text-xs uppercase tracking-widest",children:"Bet Slip"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl sm:text-5xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["ONE TAP TO",d.jsx("br",{}),d.jsx("span",{className:"text-purple-400",children:"SPORTSBOOK"})]}),d.jsx("p",{className:"text-gray-300 text-sm sm:text-lg mb-8 leading-relaxed max-w-md mx-auto md:mx-0",children:"Research picks and track live odds, then open pre-filled bet slips directly in DraftKings or FanDuel."}),d.jsxs("div",{className:"space-y-3 text-left max-w-sm mx-auto md:mx-0",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-purple-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Instant sync to DraftKings & FanDuel"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-purple-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Live odds from both sportsbooks"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Zt,{className:"w-5 h-5 text-purple-400 flex-shrink-0"}),d.jsx("span",{className:"text-white text-sm",children:"Build multi-sport parlays automatically"})]})]})]}),d.jsx("div",{className:"flex justify-center md:col-span-3",children:d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute -inset-8 blur-[60px] bg-purple-500/10 rounded-[4rem]"}),d.jsxs("div",{className:"relative w-[65vw] sm:w-[400px] mx-auto",children:[d.jsxs("div",{className:"relative bg-black rounded-[3rem] p-3 shadow-2xl border border-gray-800",children:[d.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[120px] h-[35px] bg-black rounded-b-3xl z-20"}),d.jsx("div",{className:"relative bg-dark-950 rounded-[2.3rem] overflow-hidden aspect-[9/19.5]",children:d.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,"webkit-playsinline":"true",disablePictureInPicture:!0,disableRemotePlayback:!0,"x-webkit-airplay":"deny",className:"w-full h-full object-cover pointer-events-none",src:"https://api.matchups.ai/storage/v1/object/public/images/betslip.mp4"})})]}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-white/5 via-transparent to-white/10 rounded-[3rem] pointer-events-none"})]})]})})]})})}),d.jsxs("section",{className:"py-10 sm:py-24 bg-dark-800 border-y border-white/5 relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(rgba(51,214,82,0.02)_1px,transparent_1px),linear-gradient(90deg,rgba(51,214,82,0.02)_1px,transparent_1px)] bg-[size:40px_40px]"}),d.jsxs("div",{className:"w-full max-w-5xl mx-auto px-7 sm:px-6 relative z-10",children:[d.jsxs("div",{className:"text-center mb-12 sm:mb-16",children:[d.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-brand/10 border border-brand/20 mb-6",children:[d.jsx(OE,{className:"w-4 h-4 text-brand"}),d.jsx("span",{className:"text-brand text-[10px] sm:text-xs uppercase tracking-widest",children:"100% Transparent"})]}),d.jsxs("h2",{className:"font-teko font-light text-6xl sm:text-5xl md:text-8xl text-white uppercase tracking-tight mb-4 !leading-[0.85]",children:["PROVEN ",d.jsx("span",{className:"text-brand",children:"TRACK RECORD"})]}),d.jsxs("p",{className:"text-gray-400 text-sm sm:text-base max-w-2xl mx-auto",children:["Every pick published with timestamps. Every result tracked. ",d.jsx("span",{className:"text-white font-medium",children:"Download our full CSV and verify yourself."})]})]}),d.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 sm:gap-4 mb-14 sm:mb-16",children:[d.jsxs("div",{className:"bg-dark-800 border border-brand/20 rounded-xl p-4 sm:p-6 text-center",children:[d.jsxs("div",{className:"font-teko text-3xl sm:text-5xl text-brand",children:[p.totalPredictions.toLocaleStr
461ing(),"+"]}),d.jsx("div",{className:"text-[10px] sm:text-xs text-gray-400 uppercase tracking-wider mt-1",children:"Graded Picks"})]}),d.jsxs("div",{className:"bg-dark-800 border border-brand/20 rounded-xl p-4 sm:p-6 text-center",children:[d.jsxs("div",{className:"font-teko text-3xl sm:text-5xl text-brand",children:[p.overallWinRate,"%"]}),d.jsx("div",{className:"text-[10px] sm:text-xs text-gray-400 uppercase tracking-wider mt-1",children:"Win Rate"})]}),d.jsxs("div",{className:"bg-dark-800 border border-amber-500/20 rounded-xl p-4 sm:p-6 text-center",children:[d.jsxs("div",{className:"font-teko text-3xl sm:text-5xl text-amber-500",children:[p.eliteWinRate,"%"]}),d.jsx("div",{className:"text-[10px] sm:text-xs text-gray-400 uppercase tracking-wider mt-1",children:"Elite Win Rate"})]}),d.jsxs("div",{className:"bg-dark-800 border border-brand/20 rounded-xl p-4 sm:p-6 text-center",children:[d.jsxs("div",{className:"font-teko text-3xl sm:text-5xl text-brand",children:["+",p.roi,"%"]}),d.jsx("div",{className:"text-[10px] sm:text-xs text-gray-400 uppercase tracking-wider mt-1",children:"Overall ROI"})]})]}),d.jsxs("h3",{className:"font-teko text-2xl sm:text-3xl text-white uppercase text-center mb-6 sm:mb-8",children:["Higher Confidence = ",d.jsx("span",{className:"text-amber-500",children:"Higher Accuracy"})]}),d.jsx("div",{className:"grid grid-cols-3 md:grid-cols-5 gap-2 sm:gap-4 mb-4",children:[{range:"50-60%",winRate:"48.5%",color:"gray",count:33},{range:"60-70%",winRate:"53.7%",color:"gray",count:214},{range:"70-80%",winRate:"59.5%",color:"blue",count:378},{range:"80-90%",winRate:"70.6%",color:"amber",count:439},{range:"90-100%",winRate:"95.8%",color:"brand",count:167}].map((A,_)=>d.jsxs("div",{className:ae("bg-dark-800 border rounded-lg sm:rounded-xl p-3 sm:p-5 text-center transition-all hover:scale-105",A.color==="brand"?"border-brand/30 bg-brand/5":A.color==="amber"?"border-amber-500/30 bg-amber-500/5":A.color==="blue"?"border-blue-500/20":"border-white/10",_<2?"hidden sm:block":""),children:[d.jsx("div",{className:"text-[8px] sm:text-[10px] text-gray-500 uppercase tracking-wider mb-1 sm:mb-2",children:"Confidence"}),d.jsx("div",{className:ae("font-teko text-lg sm:text-2xl mb-2 sm:mb-3",A.color==="brand"?"text-brand":A.color==="amber"?"text-amber-500":A.color==="blue"?"text-blue-400":"text-gray-400"),children:A.range}),d.jsx("div",{className:"h-14 sm:h-20 bg-dark-900 rounded relative mb-2 sm:mb-3 overflow-hidden",children:d.jsx("div",{className:ae("absolute bottom-0 left-0 right-0 rounded transition-all",A.color==="brand"?"bg-brand":A.color==="amber"?"bg-amber-500":A.color==="blue"?"bg-blue-500":"bg-gray-600"),style:{height:`${parseFloat(A.winRate)}%`}})}),d.jsx("div",{className:ae("font-teko text-xl sm:text-3xl",A.color==="brand"?"text-brand":A.color==="amber"?"text-amber-500":A.color==="blue"?"text-blue-400":"text-white"),children:A.winRate}),d.jsxs("div",{className:"text-[8px] sm:text-[10px] text-gray-500 uppercase mt-1",children:[A.count," picks"]})]},_))}),d.jsx("p",{className:"text-center text-gray-600 text-xs mt-2 mb-10 sm:hidden",children:"Lower confidence tiers (50-70%) shown on larger screens"}),d.jsx("div",{className:"text-center",children:d.jsxs("button",{onClick:()=>a("history"),className:"px-8 sm:px-10 py-3 sm:py-4 bg-transparent border-2 border-white/20 text-white font-teko text-xl sm:text-2xl uppercase tracking-wide rounded-xl hover:bg-white/5 hover:border-white/40 transition-all inline-flex items-center gap-3",children:[d.jsx(af,{className:"w-5 h-5"}),"Download Full History (CSV)"]})})]})]}),d.jsxs("section",{className:"py-10 sm:py-24 bg-dark-950 relative overflow-hidden",children:[d.jsxs("div",{className:"absolute inset-0",children:[d.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-dark-950 via-dark-900 to-dark-950"}),d.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-brand/12 rounded-full blur-[180px]"}),d.jsx("div",{className:"absolute top-0 left-0 w-[500px] h-[500px] bg-brand/8 rounded-full blur-[120px]"}),d.jsx("div",{className:"absolute bottom-0 right-0 w-[500px] h-[500px] bg-emerald-400/8 rounded-full blur-[120px]"}),d.jsx("div",{className:"absolute inset-0 bg-[repeating-linear-gradient(45deg,transparent,transparent_80px,rgba(51,214,82,0.03)_8
4610px,rgba(51,214,82,0.03)_82px)]"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(rgba(51,214,82,0.08)_1px,transparent_1px)] bg-[size:40px_40px] [mask-image:radial-gradient(ellipse_80%_60%_at_50%_50%,#000_40%,transparent_100%)]"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_70%_60%_at_50%_50%,transparent_0%,rgba(0,0,0,0.5)_100%)]"})]}),d.jsxs("div",{className:"w-full max-w-3xl mx-auto text-center px-7 sm:px-6 relative z-10",children:[d.jsxs("h2",{className:"font-teko font-light text-6xl sm:text-5xl md:text-8xl text-white uppercase tracking-tight mb-4 sm:mb-6 !leading-[0.85]",children:["STOP GUESSING.",d.jsx("br",{}),d.jsx("span",{className:"text-brand",children:"START WINNING."})]}),d.jsx("p",{className:"text-gray-400 text-xs sm:text-base mb-8 sm:mb-10 max-w-xl mx-auto leading-relaxed",children:"Today's picks are live. Get AI-powered analysis on every game, every prop, every edge."}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center mb-8",children:[d.jsxs("button",{onClick:N,className:"px-8 sm:px-10 py-4 sm:py-5 bg-brand text-black font-teko text-xl sm:text-2xl uppercase tracking-wide rounded-xl hover:bg-white transition-all shadow-[0_0_40px_rgba(51,214,82,0.3)] flex items-center justify-center gap-3 group",children:[d.jsx(xs,{className:"w-5 h-5 fill-current"}),t?"See Today's Picks":"Get Your Free Picks",d.jsx(Ey,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]}),!t&&d.jsx("button",{onClick:()=>a("login"),className:"px-8 sm:px-10 py-3 sm:py-4 bg-transparent border-2 border-white/20 text-white font-teko text-xl sm:text-2xl uppercase tracking-wide rounded-xl hover:bg-white/5 hover:border-white/40 transition-all",children:"Sign In"})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap items-center justify-center gap-3 sm:gap-6 text-gray-500 text-sm",children:[d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(Zt,{className:"w-3.5 h-3.5 text-brand"})," No Credit Card"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(Zt,{className:"w-3.5 h-3.5 text-brand"})," 5 Free Picks Daily"]}),d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx(Zt,{className:"w-3.5 h-3.5 text-brand"})," Cancel Anytime"]})]})]})]})]})},Rn={draftkings:{icon:"https://api.matchups.ai/storage/v1/object/public/images/DKNG.svg",color:"#53d337",bgColor:"rgba(83, 211, 55, 0.15)"},fanduel:{icon:"https://api.matchups.ai/storage/v1/object/public/images/Fanduel_Shield_2016.svg",color:"#1493ff",bgColor:"rgba(20, 147, 255, 0.15)"}},Vc=e=>e===null?"--":e>0?`+${e}`:`${e}`;function $4({pick:e,legOdds:t,dkEventUrl:a,fdEventUrl:i,dkOdds:l,fdOdds:o,commenceTime:u,onRemove:h}){const[f,p]=J.useState({draftkings:!1,fanduel:!1}),y=u?new Date(u).getTime()<Date.now():!1,b=!zl()&&/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),x=(A,_)=>{p(C=>({...C,[A]:!0})),zl()?v3(_,{inAppBrowser:!1}):b?window.location.href=_:window.open(_,`${A}_betslip`)},w=!!a,N=!!i;return d.jsx("div",{className:"bg-dark-800/50 hover:bg-dark-800 rounded-lg px-2.5 py-2 group transition-colors",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx("button",{onClick:h,className:"p-1 text-gray-600 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors shrink-0 mt-0.5",title:"Remove pick",children:d.jsx(Sa,{className:"w-3.5 h-3.5"})}),d.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[d.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[d.jsx("span",{className:"text-white font-medium text-sm truncate",children:e.label}),y&&d.jsxs("span",{className:"flex items-center gap-0.5 px-1.5 py-0.5 bg-red-500/15 border border-red-500/30 rounded text-red-400 text-[9px] font-medium shrink-0",children:[d.jsxs("span",{className:"relative flex h-1 w-1",children:[d.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),d.jsx("span",{className:"relative inline-flex rounded-full h-1 w-1 bg-red-500"})]}),"Live"]})]}),e.game&&d.jsxs("p",{className:"text-gray-500 text-[10px] truncate",children:[e.game.awayTeam.abbreviation," @ ",e.game.homeTeam.abbreviation]}),e.prop&&d.jsxs("p",{className:"text-gray-500 text-[10px] truncate",children:[e.prop.opponent," @ ",e.prop.team]})]}),d.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[w&&d.jsx("button",{onClick:()=>x("draftkings",a),disabled:f.draftkings,className:ae("min-w-[52px] h-11 rounded-lg flex flex-col items-center justify-center transition-all px-1.5",f.draftkings?"bg-gray-700/50 opacity-50":"hover:scale-105"),style:f.draftkings?{}:{backgroundColor:Rn.draftkings.bgColor,border:`1px solid ${Rn.draftkings.color}40`},title:f.draftkings?"Added":"Add to DraftKings",children:f.draftkings?d.jsx(nf,{className:"w-5 h-5 text-gray-500"}):d.jsxs(d.Fragment,{children:[d.jsx("img",{src:Rn.draftkings.icon,alt:"DK",className:"w-5 h-5"}),l!=null&&d.jsx("span",{className:"text-[10px] font-mono text-gray-300 leading-none mt-0.5",children:Vc(l)})]})}),N&&d.jsx("button",{onClick:()=>x("fanduel",i),disabled:f.fanduel,className:ae("min-w-[52px] h-11 rounded-lg flex flex-col items-center justify-center transition-all px-1.5",f.fanduel?"bg-gray-700/50 opacity-50":"hover:scale-105"),style:f.fanduel?{}:{backgroundColor:Rn.fanduel.bgColor,border:`1px solid ${Rn.fanduel.color}40`},title:f.fanduel?"Added":"Add to FanDuel",children:f.fanduel?d.jsx(nf,{className:"w-5 h-5 text-gray-500"}):d.jsxs(d.Fragment,{children:[d.jsx("img",{src:Rn.fanduel.icon,alt:"FD",className:"w-4 h-4"}),o!=null&&d.jsx("span",{className:"text-[10px] font-mono text-gray-300 leading-none mt-0.5",children:Vc(o)})]})}),!w&&!N&&d.jsx("span",{className:"text-gray-600 text-[10px]",children:"No links"})]})]})})}function Y4({user:e,onNavigateShop:t,isAndroid:a=!1}){const[i,l]=J.useState(!1),{picks:o,removePick:u,clearSlip:h,parlayOdds:f,isExpanded:p,setIsExpanded:y,isFetchingLinks:b,lastNotification:x,clearNotification:w,hasStaleOdds:N,fetchParlayOdds:A}=rm();return d.jsxs(d.Fragment,{children:[p&&d.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300",onClick:()=>y(!1)}),x&&d.jsx("div",{className:ae("fixed bottom-20 right-4 md:right-20 z-[60] px-4 py-2 rounded-lg shadow-lg animate-in slide-in-from-right fade-in duration-300",x.type==="info"&&"bg-brand text-black",x.type==="warning"&&"bg-amber-500 text-black",x.type==="success"&&"bg-brand text-black"),children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-medium",children:x.message}),d.jsx("button",{onClick:w,className:"p-0.5 hover:bg-black/20 rounded",children:d.jsx(Sa,{className:"w-3.5 h-3.5"})})]})}),d.jsxs("div",{className:ae("fixed z-50",a?"":"transition-all duration-300 ease-in-out",a?"":"inset-x-0 bottom-0","md:inset-x-auto md:bottom-auto md:top-1/2 md:-translate-y-1/2 md:right-0","md:flex md:flex-row md:items-center",p?"":"md:translate-x-96"),style:a?p?{bottom:0,left:0,right:0}:{bottom:"64px",left:"50%",transform:"translateX(-50%)"}
461:void 0,children:[!p&&!a&&d.jsx("div",{className:"md:hidden absolute -top-1 left-1/2 -translate-x-1/2 w-32 h-3 bg-gray-500 rounded-t-xl pointer-events-none z-0 shadow-[0_-2px_8px_rgba(0,0,0,0.3)]","aria-hidden":"true"}),d.jsxs("button",{onClick:()=>y(!p),className:ae("transition-all duration-300 flex items-center justify-center relative z-10","focus:outline-none flex-shrink-0",a&&!p?"px-3 py-2 gap-2 bg-transparent":["w-full md:w-auto","rounded-none md:rounded-l-xl md:rounded-r-none","py-5 px-4 gap-3 md:py-4 md:px-3 md:gap-2",p&&"max-md:hidden","md:flex md:flex-col","md:bg-[#1a1a1a] md:hover:bg-[#222] md:border md:border-r-0 md:border-white/10 md:shadow-xl","bg-gradient-to-r from-[#1a1a1a] via-[#252525] to-[#1a1a1a] border-t border-white/10 shadow-[0_-4px_20px_rgba(0,0,0,0.5)]"]),title:p?"Collapse bet slip":"Open bet slip",children:[d.jsxs("div",{className:"flex items-center gap-2 md:flex-col md:gap-2",children:[d.jsx("img",{src:Rn.draftkings.icon,className:"w-8 h-8 md:w-6 md:h-6 object-contain flex-shrink-0",alt:"DK"}),d.jsx("img",{src:Rn.fanduel.icon,className:"w-7 h-7 md:w-5 md:h-5 object-contain flex-shrink-0",alt:"FD"})]}),d.jsx("span",{className:ae("font-teko text-white uppercase tracking-wide md:hidden",a&&!p?"text-base":"text-xl"),children:"Bet Slip"}),o.length>0&&!p&&d.jsx("span",{className:"bg-brand text-black font-teko text-base font-bold rounded-full w-6 h-6 flex items-center justify-center shadow-lg md:-top-1.5 md:-left-1.5 md:absolute md:w-5 md:h-5 md:text-[10px]",children:o.length})]}),d.jsxs("div",{className:ae("bg-dark-900 shadow-2xl overflow-hidden flex flex-col","transition-all duration-300","absolute bottom-full left-0 right-0 md:relative md:bottom-auto md:left-auto md:right-auto","w-full md:w-96",p?"h-[70vh] max-h-[600px]":"h-0","md:h-[70vh] md:max-h-[600px]","border-t border-x md:border-l md:border-y md:border-r-0 border-dark-700 rounded-t-xl md:rounded-l-xl md:rounded-r-none",p?"opacity-100 translate-y-0":"opacity-0 translate-y-full pointer-events-none md:translate-y-0 md:opacity-100 md:pointer-events-auto"),style:a?{paddingBottom:"56px"}:void 0,children:[d.jsxs("div",{className:"px-4 py-3 bg-dark-800 border-b border-dark-700 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("img",{src:Rn.draftkings.icon,alt:"DK",className:"w-5 h-5"}),d.jsx("img",{src:Rn.fanduel.icon,alt:"FD",className:"w-4 h-4"})]}),d.jsx("span",{className:"font-teko text-xl text-white uppercase tracking-wide pt-0.5",children:"Bet Slip"}),o.length>0&&d.jsx("span",{className:"bg-brand text-black font-teko text-base font-bold rounded-full w-6 h-6 flex items-center justify-center pt-0.5",children:o.length})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[o.length>0&&d.jsx("button",{onClick:()=>l(!0),className:"p-2 text-gray-500 hover:text-red-400 transition-colors",title:"Clear all picks",children:d.jsx(MN,{className:"w-5 h-5 md:w-4 md:h-4"})}),d.jsx("button",{onClick:()=>y(!1),className:"p-2 text-gray-500 hover:text-white transition-colors",children:d.jsx(Sa,{className:"w-6 h-6 md:w-5 md:h-5"})})]})]}),i&&d.jsx("div",{className:"absolute inset-0 z-50 bg-black/80 flex items-center justify-center p-4",children:d.jsxs("div",{className:"bg-dark-800 rounded-xl border border-dark-700 p-5 max-w-[280px] w-full",children:[d.jsx("p",{className:"text-white text-center font-medium mb-4",children:"Clear all picks?"}),d.jsxs("div",{className:"flex gap-3",children:[d.jsx("button",{onClick:()=>l(!1),className:"flex-1 py-2.5 px-4 rounded-lg bg-dark-700 text-gray-300 hover:bg-dark-600 transition-colors font-medium",children:"Cancel"}),d.jsx("button",{onClick:()=>{h(),l(!1)},className:"flex-1 py-2.5 px-4 rounded-lg bg-red-500/20 text-red-400 hover:bg-red-500/30 border border-red-500/30 transition-colors font-medium",children:"Clear"})]})]})}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:o.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center",children:[d.jsxs("div",{className:"w-16 h-16 rounded-full bg-dark-800 flex items-center justify-center mb-4 gap-2",children:[d.jsx("img",{src:Rn.draftkings.icon,className:"w-6 h-6 object-contain opacity-40",alt:"DK"}),d.jsx("img",{src:Rn.fanduel.icon,className:"w-6 h-6 object-contain opacity-40",alt:"FD"})]}),d.jsx("p",{className:"text-gray-400 font-medium mb-1",children:"Your slip is empty"}),d.jsx("p",{className:"text-gray-600 text-sm",children:"Click the team rows to add picks"})]}):d.jsxs("div",{className:"p-2 space-y-1",children:[N&&!b&&d.jsxs("button",{onClick:()=>A(),className:"w-full flex items-center justify-center gap-2 py-2 px-3 mb-2 bg-amber-500/10 border border-amber-500/30 rounded-lg text-amber-400 text-xs hover:bg-amber-500/20 transition-colors",children:[d.jsx(si,{className:"w-3.5 h-3.5"}),d.jsx("span",{children:"Odds may have changed • Tap to refresh"})]}),o.map((_,C)=>{var q;const T=(q=f==null?void 0:f.legLinks)==null?void 0:q[C],j=T==null?void 0:T.odds,B=T==null?void 0:T.dkEventLink,Q=T==null?void 0:T.fdEventLink,O=T==null?void 0:T.dkOdds,V=T==null?void 0:T.fdOdds,ee=T==null?void 0:T.commenceTime;return d.jsx($4,{pick:_,legOdds:j,dkEventUrl:B,fdEventUrl:Q,dkOdds:O,fdOdds:V,commenceTime:ee,onRemove:()=>u(_.id)},_.id)})]})}),o.length>0&&d.jsxs("div",{className:"border-t border-dark-700 p-3 space-y-3 bg-dark-800/50",children:[o.length>=1&&d.jsxs("div",{className:"bg-dark-950 rounded-lg p-3 border border-dark-700",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("span",{className:"text-gray-400 text-xs uppercase font-mono tracking-wide",children:["Est. ",o.length>1?"Parlay":"Odds"]}),b&&d.jsx(jc,{className:"w-3 h-3 text-brand animate-spin"})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"flex flex-col items-center p-2 rounded-lg bg-[rgba(83,211,55,0.08)] border border-[rgba(83,211,55,0.15)]",children:[d.jsx("img",{src:Rn.draftkings.icon,alt:"DK",className:"w-5 h-5 mb-1"}),d.jsx("span",{className:"text-xl font-teko text-white leading-none",children:(f==null?void 0:f.dkAmerican)!==null?Vc((f==null?void 0:f.dkAmerican)??null):"--"}),(f==null?void 0:f.dkDecimal)&&f.dkDecimal>1&&d.jsxs("span",{className:"text-[10px] text-gray-500",children:[f.dkDecimal.toFixed(2),"x"]})]}),d.jsxs("div",{className:"flex flex-col items-center p-2 rounded-lg bg-[rgba(20,147,255,0.08)] border border-[rgba(20,147,255,0.15)]",children:[d.jsx("img",{src:Rn.fanduel.icon,alt:"FD",className:"w-5 h-5 mb-1"}),d.jsx("span",{className:"text-xl font-teko text-white leading-none",children:(f==null?void 0:f.fdAmerican)!==null?Vc((f==null?void 0:f.fdAmerican)??null):"--"}),(f==null?void 0:f.fdDecimal)&&f.fdDecimal>1&&d.jsxs("span",{className:"text-[10px] text-gray-500",children:[f.fdDecimal.toFixed(2),"x"]})]})]}),f&&!b&&f.matchedCount<o.length&&d.jsxs("div",{className:"flex items-center justify-center gap-1 mt-2 text-amber-500 text-[10px]",children:[d.jsx(Ix,{className:"w-3 h-3"}),d.jsx("span",{children:"Some games not found"})]})]}),d.jsxs("p",{className:"text-[10px] text-gray-500 text-center leading-relaxed",children:["Tap the sportsbook icons to add each pick, then combine into a parlay on their site.",d.jsx("br",{}),d.jsx("span",{className:"text-gray-600",children:"Odds shown are estimates and may differ from final lines."})]})]})]})]})]})}const W4="matchups_view_";function K4(e,t,a="table"){const i=`${W4}${e}`,[l,o]=J.useState(()=>{if(t&&typeof window<"u"){const h=localStorage.getItem(i);if(h)return h}return a});J.useEffect(()=>{if(t&&typeof window<"u"){const h=localStorage.getItem(i);h&&o(h)}else o(a)},[t,i,a]);const u=J.useCallback(h=>{o(h),t&&typeof window<"u"&&localStorage.setItem(i,h)},[t,i]);return[l,u]}const J4={2025:"2025-03-27",2026:"2026-03-26"};function X4(e){return J4[e]||`${e}-03-27`}function jf(e){if(!(e instanceof Date)||isNaN(e.getTime()))return!1;
461const t=e.toLocaleDateString("en-CA",{timeZone:"America/New_York"}),a=parseInt(t.slice(0,4),10);if(Number.isNaN(a))return!1;const i=X4(a),l=`${a}-02-01`;return t>=l&&t<i}const Q4={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_ADMIN_EMAIL:"[email protected]",VITE_MAILERLITE_API_KEY:"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI0IiwianRpIjoiMTJkZDU2NDZmMmQ5ZTFlM2NlODUzZTRjNTAxNjA1NjhkNmVmM2E3ZDE0ZDE5MTcxOTQ5MWQwMzJhNTliOTNmYzEwYTMzNzIxZjYxYTU5MzEiLCJpYXQiOjE3NjU3MjAxNzYuMjIyMzcyLCJuYmYiOjE3NjU3MjAxNzYuMjIyMzc1LCJleHAiOjQ5MjEzOTM3NzYuMjE1MDc5LCJzdWIiOiIxNTQ4ODI1Iiwic2NvcGVzIjpbXX0.XZ3-izA4dq38SJNkwaJ4Ww8JuxsZmNLD8Rmmiryx1YckzY9Hvrmd8b8la8dAYWD6_pBVIiCgukBHvfi72zF5fS6Si6REVtsuylzYU9Y_NQ8rfD9c-poJRxjMxoDeh5Q1GmrEKnRPnE2scahJwJgoaY5Aq9FJ_xB8Hg2S9KD2B1SbS3VPJLBrrBQO4TPQkmL_hxrHl8MaC0M-SCC0IAjax71hwduck0Tq2GsYRWRfHf2BEdQlTvmI3E7aE01TqqEenT0ysFRnTljSqxIijv2BA5LkIps4VxCIh52CFmP2bzHFtbv9huleEfVEFfhhhs2VxoHGaBZTUOJzeUW-X38eSsZToFLwBfORSkno7MmZfdkytMjKqu9A8p9PN_lZkUMRwPTyzVgzy_5h0NrFb8UQfJ77LCOHnxEsSN7GFKsMWSqqLrEkCyTu6NJHW5awGRTY3BOcYx5_eBVgKw3qDvqFWveGnMPww6v2XdRSLfWum8qVO2qUOhzwEWfrycRKivYkVY9BKeH6Yhfrk9XQfIX6YKCWEu50-5Hmnp0ZGL_UXsaODpHVU4XyNt1822YNu8VHbHl4hPPfhplt5GSFsTMMtRYgJxEtuJQSAaUUV205o19cd5c6SuOmyGwYuUBaV3r4-W86LV87govG1uQ5gxZO-poRXptnjcgCGeptclrLqIE",VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im56bm5ldGV3emNvZW9xbWV4Z2hmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU2Nzg1NTQsImV4cCI6MjA4MTI1NDU1NH0.IMHtmGsikxBUOGq9oO35pdhzIRlpZ9l3jBBKRfX3-10",VITE_SUPABASE_URL:"https://api.matchups.ai",VITE_VERCEL_BRANCH_URL:"matchups-git-main-dribgibs-projects.vercel.app",VITE_VERCEL_DEPLOYMENT_ID:"dpl_CAhUyzE2qQ4MAf4Yy6ByDr2fX5rk",VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"dribgib",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Colton Joseph",VITE_VERCEL_GIT_COMMIT_MESSAGE:"Hide shutdown banner on homepage",VITE_VERCEL_GIT_COMMIT_REF:"main",VITE_VERCEL_GIT_COMMIT_SHA:"c4ea747a871d521e5537dd5df5563f9dde4c0b14",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"1115999812",VITE_VERCEL_GIT_REPO_OWNER:"dribgib",VITE_VERCEL_GIT_REPO_SLUG:"matchups",VITE_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"6598e8659ebe799a/script.js","viewEndpoint":"6598e8659ebe799a/view","eventEndpoint":"6598e8659ebe799a/event","sessionEndpoint":"6598e8659ebe799a/session"},"speedInsights":{"scriptSrc":"f4838483436b0aa7/script.js","endpoint":"f4838483436b0aa7/vitals"}}',VITE_VERCEL_PROJECT_ID:"prj_pzCYAWqwNm39ymlFlsbDx8MiAlrO",VITE_VERCEL_PROJECT_PRODUCTION_URL:"matchups.ai",VITE_VERCEL_TARGET_ENV:"production",VITE_VERCEL_URL:"matchups-5yr5ybuna-dribgibs-projects.vercel.app"};var Zh={};const Z4="https://www.thesportsdb.com/images/media/team/badge/default.png",ms="https://api.matchups.ai/storage/v1/object/public/images/default.png",eO={alabama:"Alabama Crimson Tide",arkansas:"Arkansas Razorbacks",auburn:"Auburn Tigers",florida:"Florida Gators",georgia:"Georgia Bulldogs",kentucky:"Kentucky Wildcats",lsu:"LSU Tigers",mississippi:"Ole Miss Rebels","ole miss":"Ole Miss Rebels","mississippi state":"Mississippi State Bulldogs",missouri:"Missouri Tigers","south carolina":"South Carolina Gamecocks",tennessee:"Tennessee Volunteers",texas:"Texas Longhorns","texas a&m":"Texas A&M Aggies","texas a and m":"Texas A&M Aggies",vanderbilt:"Vanderbilt Commodores",illinois:"Illinois Fighting Illini",indiana:"Indiana Hoosiers",iowa:"Iowa Hawkeyes",maryland:"Maryland Terrapins",michigan:"Michigan Wolverines","michigan state":"Michigan State Spartans",minnesota:"Minnesota Golden Gophers",nebraska:"Nebraska Cornhuskers",northwestern:"Northwestern Wildcats","ohio state":"Ohio State Buckeyes","penn state":"Penn State Nittany Lions",purdue:"Purdue Boilermakers",rutgers:"Rutgers Scarlet Knights",wisconsin:"Wisconsin Badgers",oregon:"Oregon Ducks",ucla:"UCLA Bruins",usc:"USC Trojans",washington:"Washington Huskies",baylor:"Baylor Bears",byu:"BYU Cougars",cincinnati:"Cincinnati Bearcats",colorado:"Colorado Buffaloes",houston:"Houston Cougars","iowa state":"Iowa State Cyclone
461s",kansas:"Kansas Jayhawks","kansas state":"Kansas State Wildcats","oklahoma state":"Oklahoma State Cowboys",tcu:"TCU Horned Frogs","texas tech":"Texas Tech Red Raiders",ucf:"UCF Knights","west virginia":"West Virginia Mountaineers","boston college":"Boston College Eagles",clemson:"Clemson Tigers",duke:"Duke Blue Devils","florida state":"Florida State Seminoles","georgia tech":"Georgia Tech Yellow Jackets",louisville:"Louisville Cardinals",miami:"Miami Hurricanes","north carolina":"North Carolina Tar Heels","nc state":"NC State Wolfpack","notre dame":"Notre Dame Fighting Irish",pittsburgh:"Pittsburgh Panthers",syracuse:"Syracuse Orange",virginia:"Virginia Cavaliers","virginia tech":"Virginia Tech Hokies","wake forest":"Wake Forest Demon Deacons",butler:"Butler Bulldogs",creighton:"Creighton Bluejays",depaul:"DePaul Blue Demons",georgetown:"Georgetown Hoyas",marquette:"Marquette Golden Eagles",providence:"Providence Friars","seton hall":"Seton Hall Pirates","st. john's":"St. John's Red Storm",villanova:"Villanova Wildcats",xavier:"Xavier Musketeers",connecticut:"Connecticut Huskies",uconn:"Connecticut Huskies",arizona:"Arizona Wildcats","arizona state":"Arizona State Sun Devils",california:"California Golden Bears",stanford:"Stanford Cardinal",utah:"Utah Utes","air force":"Air Force Falcons","boise state":"Boise State Broncos","colorado state":"Colorado State Rams","fresno state":"Fresno State Bulldogs",nevada:"Nevada Wolf Pack","new mexico":"New Mexico Lobos","san diego state":"San Diego State Aztecs","san jose state":"San Jose State Spartans",unlv:"UNLV Rebels","utah state":"Utah State Aggies",wyoming:"Wyoming Cowboys","east carolina":"East Carolina Pirates",memphis:"Memphis Tigers",smu:"SMU Mustangs",temple:"Temple Owls",tulane:"Tulane Green Wave",tulsa:"Tulsa Golden Hurricane",usf:"USF Bulls","wichita state":"Wichita State Shockers",gonzaga:"Gonzaga Bulldogs","saint mary's":"Saint Mary's Gaels","san francisco":"San Francisco Dons","santa clara":"Santa Clara Broncos",davidson:"Davidson Wildcats",dayton:"Dayton Flyers",duquesne:"Duquesne Dukes",fordham:"Fordham Rams","george mason":"George Mason Patriots","george washington":"George Washington Colonials","la salle":"La Salle Explorers","loyola chicago":"Loyola Chicago Ramblers",massachusetts:"UMass Minutemen","rhode island":"Rhode Island Rams",richmond:"Richmond Spiders","st. bonaventure":"St. Bonaventure Bonnies","saint louis":"Saint Louis Billikens",vcu:"VCU Rams",bellarmine:"Bellarmine Knights",mercer:"Mercer Bears",wofford:"Wofford Terriers",american:"American Eagles","holy cross":"Holy Cross Crusaders",brown:"Brown Bears",princeton:"Princeton Tigers",monmouth:"Monmouth Hawks",campbell:"Campbell Fighting Camels",elon:"Elon Phoenix","unc wilmington":"UNC Wilmington Seahawks",hampton:"Hampton Pirates",hofstra:"Hofstra Pride","william & mary":"William & Mary Tribe",bucknell:"Bucknell Bison","eastern kentucky":"Eastern Kentucky Colonels","western kentucky":"Western Kentucky Hilltoppers",oklahoma:"Oklahoma Sooners","florida international":"FIU Panthers",fiu:"FIU Panthers","jacksonville state":"Jacksonville State Gamecocks","kennesaw state":"Kennesaw State Owls",liberty:"Liberty Flames","louisiana tech":"Louisiana Tech Bulldogs","middle tennessee":"Middle Tennessee Blue Raiders",mtsu:"Middle Tennessee Blue Raiders","new mexico state":"New Mexico State Aggies","sam houston":"Sam Houston Bearkats",utep:"UTEP Miners",akron:"Akron Zips","ball state":"Ball State Cardinals","bowling green":"Bowling Green Falcons",buffalo:"Buffalo Bulls","central michigan":"Central Michigan Chippewas","eastern michigan":"Eastern Michigan Eagles","kent state":"Kent State Golden Flashes","miami ohio":"Miami RedHawks","miami (oh)":"Miami RedHawks","northern illinois":"Northern Illinois Huskies",ohio:"Ohio Bobcats",toledo:"Toledo Rockets","western michigan":"Western Michigan Broncos","appalachian state":"Appalachian State Mountaineers","arkansas state":"Arkansas State Red Wolves","coastal carolina":"Coastal Carolina Chanticleers","georgia southern":"Georgia Southern Eagles","georgia state":"Georgia State Panthers","james madison":"James Madison Dukes",jmu:"James Madison Dukes",marshall:"Marshall Thundering Herd","old dominion":"Old Dominion Monarchs","southern miss":"Southern Miss Golden Eagles","south alabama":"South Alabama Jaguars","texas state":"Texas State Bobcats",troy:"Troy Trojans",louisiana:"Louisiana Ragin' Cajuns","ul monroe":"ULM Warhawks",belmont:"Belmont Bruins",bradley:"Bradley Braves",drake:"Drake Bulldogs",evansville:"Evansville Purple Aces","illinois state":"Illinois State Redbirds","indiana state":"Indiana State Sycamores","missouri state":"Missouri State Bears","murray state":"Murray State Racers","northern iowa":"Northern Iowa Panthers","southern illinois":"Southern Illinois Salukis",valparaiso:"V
461alparaiso Beacons",columbia:"Columbia Lions",cornell:"Cornell Big Red",dartmouth:"Dartmouth Big Green",harvard:"Harvard Crimson",penn:"Penn Quakers",pennsylvania:"Penn Quakers",yale:"Yale Bulldogs",charleston:"Charleston Cougars",chattanooga:"Chattanooga Mocs","the citadel":"The Citadel Bulldogs",citadel:"The Citadel Bulldogs","east tennessee state":"ETSU Buccaneers",etsu:"ETSU Buccaneers",furman:"Furman Paladins",samford:"Samford Bulldogs","unc greensboro":"UNC Greensboro Spartans",vmi:"VMI Keydets","western carolina":"Western Carolina Catamounts",army:"Army Black Knights","boston university":"Boston University Terriers",colgate:"Colgate Raiders",lafayette:"Lafayette Leopards",lehigh:"Lehigh Mountain Hawks","loyola md":"Loyola Maryland Greyhounds","loyola maryland":"Loyola Maryland Greyhounds","cleveland state":"Cleveland State Vikings",detroit:"Detroit Mercy Titans","detroit mercy":"Detroit Mercy Titans","green bay":"Green Bay Phoenix",iupui:"IUPUI Jaguars",milwaukee:"Milwaukee Panthers","northern kentucky":"Northern Kentucky Norse",oakland:"Oakland Golden Grizzlies","purdue fort wayne":"Purdue Fort Wayne Mastodons","robert morris":"Robert Morris Colonials","wright state":"Wright State Raiders","youngstown state":"Youngstown State Penguins",delaware:"Delaware Fightin' Blue Hens",drexel:"Drexel Dragons",northeastern:"Northeastern Huskies","stony brook":"Stony Brook Seawolves",towson:"Towson Tigers","austin peay":"Austin Peay Governors","central arkansas":"Central Arkansas Bears","florida gulf coast":"FGCU Eagles",fgcu:"FGCU Eagles",jacksonville:"Jacksonville Dolphins",lipscomb:"Lipscomb Bisons","north alabama":"North Alabama Lions","north florida":"North Florida Ospreys",queens:"Queens Royals",stetson:"Stetson Hatters","charleston southern":"Charleston Southern Buccaneers","gardner-webb":"Gardner-Webb Runnin' Bulldogs","high point":"High Point Panthers",longwood:"Longwood Lancers",presbyterian:"Presbyterian Blue Hose",radford:"Radford Highlanders","sc upstate":"USC Upstate Spartans","usc upstate":"USC Upstate Spartans",winthrop:"Winthrop Eagles",denver:"Denver Pioneers","kansas city":"Kansas City Roos",umkc:"Kansas City Roos","north dakota":"North Dakota Fighting Hawks","north dakota state":"North Dakota State Bison",ndsu:"North Dakota State Bison",omaha:"Omaha Mavericks","oral roberts":"Oral Roberts Golden Eagles","south dakota":"South Dakota Coyotes","south dakota state":"South Dakota State Jackrabbits","st. thomas":"St. Thomas Tommies","western illinois":"Western Illinois Leathernecks","eastern washington":"Eastern Washington Eagles",idaho:"Idaho Vandals","idaho state":"Idaho State Bengals",montana:"Montana Grizzlies","montana state":"Montana State Bobcats","northern arizona":"Northern Arizona Lumberjacks","northern colorado":"Northern Colorado Bears","portland state":"Portland State Vikings","sacramento state":"Sacramento State Hornets","southern utah":"Southern Utah Thunderbirds","weber state":"Weber State Wildcats","abilene christian":"Abilene Christian Wildcats",acu:"Abilene Christian Wildcats","california baptist":"California Baptist Lancers",cbu:"California Baptist Lancers","grand canyon":"Grand Canyon Antelopes",gcu:"Grand Canyon Antelopes",seattle:"Seattle Redhawks","seattle u":"Seattle Redhawks","stephen f. austin":"Stephen F. Austin Lumberjacks",sfa:"Stephen F. Austin Lumberjacks","tarleton state":"Tarleton State Texans","utah tech":"Utah Tech Trailblazers","utah valley":"Utah Valley Wolverines",canisius:"Canisius Golden Griffins",fairfield:"Fairfield Stags",iona:"Iona Gaels",manhattan:"Manhattan Jaspers",marist:"Marist Red Foxes","mount st. mary's":"Mount St. Mary's Mountaineers",niagara:"Niagara Purple Eagles",quinnipiac:"Quinnipiac Bobcats",rider:"Rider Broncs","saint peter's":"Saint Peter's Peacocks",siena:"Siena Saints","central connecticut":"Central Connecticut Blue Devils",ccsu:"Central Connecticut Blue Devils","fairleigh dickinson":"Fairleigh Dickinson Knights",fdu:"Fairleigh Dickinson Knights","le moyne":"Le Moyne Dolphins",liu:"LIU Sharks",merrimack:"Merrimack Warriors","sacred heart":"Sacred Heart Pioneers","saint francis":"Saint Francis Red Flash",stonehill:"Stonehill Skyhawks",wagner:"Wagner Seahawks","houston christian":"Houston Christian Huskies",hcu:"Houston Christian Huskies","incarnate word":"Incarnate Word Cardinals",lamar:"Lamar Cardinals",mcneese:"McNeese Cowboys","mcneese state":"McNeese Cowboys","
461new orleans":"New Orleans Privateers",uno:"New Orleans Privateers",nicholls:"Nicholls Colonels","nicholls state":"Nicholls Colonels","northwestern state":"Northwestern State Demons","southeastern louisiana":"Southeastern Louisiana Lions","texas a&m-corpus christi":"Texas A&M-Corpus Christi Islanders","alabama a&m":"Alabama A&M Bulldogs","alabama state":"Alabama State Hornets","alcorn state":"Alcorn State Braves","arkansas-pine bluff":"Arkansas-Pine Bluff Golden Lions",uapb:"Arkansas-Pine Bluff Golden Lions","bethune-cookman":"Bethune-Cookman Wildcats","florida a&m":"Florida A&M Rattlers",famu:"Florida A&M Rattlers",grambling:"Grambling Tigers","grambling state":"Grambling Tigers","jackson state":"Jackson State Tigers","mississippi valley state":"Mississippi Valley State Delta Devils",mvsu:"Mississippi Valley State Delta Devils","prairie view a&m":"Prairie View A&M Panthers",southern:"Southern Jaguars","texas southern":"Texas Southern Tigers","coppin state":"Coppin State Eagles","delaware state":"Delaware State Hornets",howard:"Howard Bison","maryland eastern shore":"Maryland Eastern Shore Hawks",umes:"Maryland Eastern Shore Hawks","morgan state":"Morgan State Bears","norfolk state":"Norfolk State Spartans","north carolina a&t":"North Carolina A&T Aggies","nc a&t":"North Carolina A&T Aggies","north carolina central":"North Carolina Central Eagles",nccu:"North Carolina Central Eagles","south carolina state":"South Carolina State Bulldogs",albany:"Albany Great Danes",binghamton:"Binghamton Bearcats",bryant:"Bryant Bulldogs",maine:"Maine Black Bears","mass lowell":"UMass Lowell River Hawks","umass lowell":"UMass Lowell River Hawks","new hampshire":"New Hampshire Wildcats",unh:"New Hampshire Wildcats",njit:"NJIT Highlanders",umbc:"UMBC Retrievers",vermont:"Vermont Catamounts","eastern illinois":"Eastern Illinois Panthers",lindenwood:"Lindenwood Lions","little rock":"Little Rock Trojans","morehead state":"Morehead State Eagles",semo:"Southeast Missouri State Redhawks","southeast missouri state":"Southeast Missouri State Redhawks","siu edwardsville":"SIU Edwardsville Cougars",siue:"SIU Edwardsville Cougars","tennessee state":"Tennessee State Tigers","tennessee tech":"Tennessee Tech Golden Eagles","ut martin":"UT Martin Skyhawks"},tO=e=>{const t=e.toLowerCase().trim();return eO[t]||e},k1={"purdue fort wayne":{name:"Purdue",logoUrl:"https://r2.thesportsdb.com/images/media/team/badge/0hni6w1641184662.png"},"purdue fort wayne mastodons":{name:"Purdue",logoUrl:"https://r2.thesportsdb.com/images/media/team/badge/0hni6w1641184662.png"}},Gc={138772:{name:"Purdue",logoUrl:"https://r2.thesportsdb.com/images/media/team/badge/0hni6w1641184662.png"}},Ff=(e,t,a)=>{if(t==="CBB"){if(a&&Gc[a])return Gc[a].name;if(e){const i=k1[e.toLowerCase()];if(i)return i.name}}return e},Of=(e,t,a,i)=>{if(t==="CBB"){if(i&&Gc[i])return Gc[i].logoUrl;if(e){const l=k1[e.toLowerCase()];if(l)return l.logoUrl}}return a},nO="https://api.matchups.ai/storage/v1",aO="images",rO="teams",iO=(e,t)=>{const a=e.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").substring(0,50);return`${t.toLowerCase()}/${a}.png`},Rf=(e,t,a)=>{if(a!=null&&a.includes("api.matchups.ai/storage"))return a;if(a&&(a.includes("thesportsdb.com")||a.includes("r2.thesportsdb.com"))){const i=iO(e,t);return`${nO}/object/public/${aO}/${rO}/${i}`}return a||ms},sO=()=>{try{typeof import.meta<"u"}catch{}try{if(typeof process<"u"&&Zh&&Zh.VITE_SPORTSDB_KEY)return Zh.VITE_SPORTSDB_KEY}catch{}return"627430"};sO();let qc={},$c={};const A1=[{appSport:"NFL",tsdbSport:"American Football",idLeague:"4391",seasonFormat:"single",isCollege:!1,targetLeagues:["NFL","National Football League"]},{appSport:"NCAAF",tsdbSport:"American Football",idLeague:"4479",seasonFormat:"single",isCollege:!0,targetLeagues:["NCAA","College Football","NCAA Division 1","NCAA Division I"]},{appSport:"NBA",tsdbSport:"Basketball",idLeague:"4387",seasonFormat:"dual",isCollege:!1,targetLeagues:["NBA","National Basketball Association"]},{appSport:"CBB",tsdbSport:"Basketball",idLeague:"4607",seasonFormat:"dual",isCollege:!0,targetLeagues:["NCAA Division I Basketball","NCAA Division I Basketball Mens","College Basketball","NCAA Men's Basketball"]},{appSport:"NHL",tsdbSport:"Ice Hockey",idLeague:"4380",seasonFormat:"dual",isCollege:!1,targetLeagues:["NHL","National Hockey League"]},{appSport:"MLB",tsdbSport:"Baseball",idLeague:"4424",seasonFormat:"single",isCollege:!1,targetLeagues:["MLB","Major League Baseball"]}],_1=e=>
461new Promise(t=>setTimeout(t,e)),_c=async(e,t=!1)=>{const a=e.startsWith("/")?e.substring(1):e;let i=`/api/sports_proxy?endpoint=${encodeURIComponent(a)}`;t&&(i+=`&t=${Date.now()}`);const l=await fetch(i);return l.ok?await l.json():(console.error(`[SportsService] Proxy failed ${l.status} for ${a}`),null)},fm=async()=>{const{byId:e,byName:t}=await k4();qc=e,$c=t},lO=e=>{const t=new Date,a=t.getFullYear(),i=t.getMonth()+1;return e.appSport==="MLB"?i>11?`${a+1}`:`${a}`:e.seasonFormat==="single"?i<8?`${a-1}`:`${a}`:i>=8?`${a}-${a+1}`:`${a-1}-${a}`},oO=(e,t)=>{if(t==="single")return`${parseInt(e)+1}`;{const a=parseInt(e.split("-")[0]);return`${a+1}-${a+2}`}},Yc=(e,t,a,i,l)=>{let o;t&&qc[t]?o=qc[t]:!o&&e&&$c[e.toLowerCase()]&&(o=$c[e.toLowerCase()]);let u=(o==null?void 0:o.name)||e||"Unknown Team";i&&(u=Ff(u,i,t));let h=a||(o==null?void 0:o.logoUrl);if(i){const f=Of(e,i,h,t);f&&(h=f)}return h&&i&&(h.includes("thesportsdb.com")||h.includes("r2.thesportsdb.com"))&&(h=Rf(u,i,h)),(!h||h===Z4)&&(h=ms),{id:(o==null?void 0:o.id)||t||`gen-${e.replace(/\s+/g,"-")}`,name:u,fullName:tO(l||e),abbreviation:(o==null?void 0:o.abbreviation)||Ct(u||e)||"UNK",city:"",wins:0,losses:0,ties:0,logoUrl:h,primaryColor:(o==null?void 0:o.primaryColor)||"#333333"}},cO=(e,t)=>{const a=(e.strStatus||"").toLowerCase();let i=!1,l="Scheduled";const o=e.intHomeScore!==null&&e.intHomeScore!==void 0&&e.intHomeScore!==""&&e.intAwayScore!==null&&e.intAwayScore!==void 0&&e.intAwayScore!=="";["match finished","ft","aot","final"].includes(a)?o?(i=!0,l="Final"):(i=!1,l="Final (Processing)"):["ns","not started"].includes(a)?(i=!1,l="Scheduled"):["ppd","postponed"].includes(a)?(i=!1,l="Postponed"):["cncl","cancelled","canceled"].includes(a)?(i=!1,l="Canceled"):["live","in progress","1h","2h","q1","q2","q3","q4","ht","ot"].some(C=>a.includes(C))?(i=!1,l="Live"):l=e.strStatus||"Scheduled";let u=new Date().toISOString();if(e.strTimestamp)u=e.strTimestamp.replace(" ","T")+"Z";else if(e.dateEvent&&e.strTime){const C=e.strTime.split("+")[0].trim();u=`${e.dateEvent}T${C}Z`}else e.dateEvent&&(u=new Date(e.dateEvent).toISOString());let h=e.strHomeTeam,f=e.strAwayTeam;if(!h||!f)if(e.strEvent&&e.strEvent.includes(" vs ")){const C=e.strEvent.split(" vs ");h=C[0],f=C[1]}else h=e.strEvent||"Unknown",f="Opponent";const p=h,y=f,b=e.idHomeTeam||"",x=e.idAwayTeam||"";h=Ff(p,t,b),f=Ff(y,t,x);const w=Of(p,t,e.strHomeTeamBadge,b),N=Of(y,t,e.strAwayTeamBadge,x),A=Rf(h,t,w),_=Rf(f,t,N);return{id:`tsdb-${e.idEvent}`,sport:t,homeTeam:Yc(h,e.idHomeTeam,A,t,p),awayTeam:Yc(f,e.idAwayTeam,_,t,y),date:u,venue:"TBD",spread:"TBD",overUnder:"TBD",completed:i,status:l,homeScore:e.intHomeScore?parseInt(e.intHomeScore):void 0,awayScore:e.intAwayScore?parseInt(e.intAwayScore):void 0}},uO=async e=>{var l,o;const t=new Set;if(e.forEach(u=>{u.homeTeam.logoUrl===ms&&t.add(u.homeTeam.name),u.awayTeam.logoUrl===ms&&t.add(u.awayTeam.name)}),t.size===0)return e;const a=Array.from(t),i=5;for(let u=0;u<a.length;u+=i){const h=a.slice(u,u+i),f=await Promise.allSettled(h.map(p=>_c(`search/team/${encodeURIComponent(p)}`,!0)));for(let p=0;p<f.length;p++){const y=f[p],b=h[p];if(y.status==="fulfilled"&&((o=(l=y.value)==null?void 0:l.teams)==null?void 0:o.length)>0){const x=y.value.teams[0];N4(x).catch(()=>{});const w={id:x.idTeam,name:x.strTeam,logoUrl:x.strBadge||x.strTeamBadge||"",primaryColor:x.strColour1||"#333",abbreviation:x.strTeamShort||Ct(b)};w.id&&(qc[w.id]=w),w.name&&($c[w.name.toLowerCase()]=w)}}u+i<a.length&&await _1(200)}return e.map(u=>({...u,homeTeam:Yc(u.homeTeam.name,u.homeTeam.id,u.homeTeam.logoUrl===ms?void 0:u.homeTeam.logoUrl,u.sport,u.homeTeam.fullName),awayTeam:Yc(u.awayTeam.name,u.awayTeam.id,u.awayTeam.logoUrl===ms?void 0:u.awayTeam.logoUrl,u.sport,u.awayTeam.fullName)}))},dO=()=>{const e=new Date().getMonth()+1;return[1,3,4,5,6,10].includes(e)?2:6},hO=async()=>{await fm();const e=await w4(),a=dO()*60*60*1e3;if(Date.now()-e<a){const i=await Rl();if(i.length>0)return i}return await T1()},fO=async e=>{var T,j;await fm();const t=A1.find(B=>B.appSport===e);if(!t)return`Invalid Sport: ${e}`;let a=[];const i=lO(t),l=oO(i,t.seasonFormat),u=[i,l].map(B=>_c(`eventsseason.php?id=${t.idLeague}&s=${B}`,!0));
461(await Promise.all(u)).forEach((B,Q)=>{const O=(B==null?void 0:B.events)||[];a=[...a,...O]});const[f,p]=await Promise.all([_c(`eventsnextleague.php?id=${t.idLeague}`,!0),_c(`eventspastleague.php?id=${t.idLeague}`,!0)]);if(((T=f==null?void 0:f.events)==null?void 0:T.length)>0&&(a=[...a,...f.events]),((j=p==null?void 0:p.events)==null?void 0:j.length)>0&&(a=[...a,...p.events]),a.length===0)return`No events found for ${e}`;const y=new Map;a.forEach(B=>y.set(B.idEvent,B));const b=Date.now(),x=4320*60*1e3,w=336*60*60*1e3,_=Array.from(y.values()).filter(B=>{const Q=new Date(B.strTimestamp||B.dateEvent||"").getTime();return Q>=b-x&&Q<=b+w}).filter(B=>{const Q=(B.strEvent||"").toLowerCase(),O=(B.strDescriptionEN||"").toLowerCase(),V=(B.strLeague||"").toLowerCase();if(Q.includes("preseason")||Q.includes("pre-season")||Q.includes("spring training")||Q.includes("exhibition")||Q.includes("all-star")||Q.includes("all star")||O.includes("preseason")||O.includes("spring training")||V.includes("preseason"))return!1;if(t.appSport==="MLB"){const ee=new Date(B.strTimestamp||B.dateEvent||"");if(jf(ee))return!1}return!0}).map(B=>cO(B,t.appSport)),C=await uO(_);return await S4(C),await v4(Date.now()),await j4(),`Synced ${C.length} games for ${e}`},T1=async()=>{await fm();for(const e of A1){try{await fO(e.appSport)}catch{}await _1(2e3)}return await Rl()},C1=e=>{const a=Date.now()-e;return Math.min(95,a/$x*100)},mO=e=>{const t=Dc.length;return e>=100?t-1:Math.floor(e/100*t)};async function mm(e){try{const{data:{session:t}}=await De.auth.getSession(),a={"Content-Type":"application/json"};t!=null&&t.access_token&&(a.Authorization=`Bearer ${t.access_token}`);const i=await fetch(qa("/api/research_action"),{method:"POST",headers:a,body:JSON.stringify(e)}),l=i.headers.get("content-type");if(l&&l.includes("application/json")){const o=await i.json();if(!i.ok)throw new Error(o.error||"Server Action Failed");return o}else{const o=await i.text();throw new Error(`Server Timeout (${i.status}). Please try again.`)}}catch(t){throw t}}const pO=async(e,t,a=!1)=>{const l={id:`pred_${e}_game`,gameId:e,userId:t,type:"game",status:"researching",startTime:Date.now(),lastUpdated:Date.now(),progress:0,currentStepIndex:0};try{const o=await mm({action:"start",gameId:e,userId:t,type:"game",force:a}),u={...l,interactionId:o.interactionId,startTime:o.startTime||Date.now(),lastUpdated:Date.now()};return await _f(u),u}catch(o){console.error("Init failed:",o);const u={...l,status:"failed",result:{winnerId:"",confidence:0,summary:"System Error",keyFactors:[],scorePrediction:"",homeScorePrediction:0,awayScorePrediction:0,fullReport:`Failed to initiate research: ${o.message}`}};return await _f(u),u}},gO=async(e,t,a=!1)=>{const l={id:`pred_${e}_props`,gameId:e,userId:t,type:"props",status:"researching",startTime:Date.now(),lastUpdated:Date.now(),progress:0,currentStepIndex:0};try{const o=await mm({action:"start",gameId:e,userId:t,type:"props",force:a}),u={...l,interactionId:o.interactionId,startTime:o.startTime||Date.now(),lastUpdated:Date.now()};return await Tf(u),u}catch(o){console.error("Props Init failed:",o);const u={...l,status:"failed",result:{summary:"System Error",bestBets:[],fullReport:`Failed to initiate props: ${o.message}`}};return await Tf(u),u}},yO=async(e,t)=>!e||e.status==="completed"||e.status==="failed"?e||null:await j1(e,t,"game"),bO=async(e,t)=>!e||e.status==="completed"||e.status==="failed"?e||null:await j1(e,t,"props");async function j1(e,t,a){const i=C1(e.startTime);let l={...e,progress:i,currentStepIndex:mO(i)},o=!1;if(e.interactionId)try{const u=await mm({action:"poll",interactionId:e.interactionId,gameId:e.gameId,type:a});u.status==="completed"?(l={...l,status:"completed",progress:100,currentStepIndex:Dc.length-1,result:u.result,lastUpdated:Date.now()},o=!0):u.status==="failed"&&(l={...l,status:"failed",result:{fullReport:u.error||"Analysis failed."},lastUpdated:Date.now()},o=!0)}catch(u){console.warn("Polling transient error:",u)}return o&&(a==="game"?await _f(l):await Tf(l)),l}async function xO(e){try{const t=await fetch(qa("/api/golf_research"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=t.headers.get("content-type");if(a&&a.includes("application/json")){const i=await t.json();if(!t.ok)throw new Error(i.error||"Golf Research Failed");return i}else{const i=await t.text();throw new Error(`Server Timeout (${t.status}). Please try again.`)}}catch(t){throw t}}const lR=async(e,t)=>{if(!e||e.status==="completed"||e.status==="failed")return e||null;const a=C1(e.startTime),i=eA.length;let l={...e,progress:a,currentStepIndex:Math.floor(a/100*i)},o=!1;try{const u=await xO({action:"poll",tournamentId:e.tournamentId});u.status==="completed"?(l={...l,status:"completed",progress:100,currentStepIndex:i-1,result:u.result,lastUpdated:Date.now()},o=!0):u.status==="failed"&&(l={...l,status:"failed",result:{fullReport:u.error||"Analysis failed."},lastUpdated:Date.now()},o=!0)}catch(u){console.warn("Golf polling transient error:",u)}
461return o&&await F4(l),l};var F1=(function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(i[o]=l[o])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function i(){this.constructor=t}t.prototype=a===null?Object.create(a):(i.prototype=a.prototype,new i)}})(),Df;(function(e){e.UNKNOWN_ERROR="0",e.PURCHASE_CANCELLED_ERROR="1",e.STORE_PROBLEM_ERROR="2",e.PURCHASE_NOT_ALLOWED_ERROR="3",e.PURCHASE_INVALID_ERROR="4",e.PRODUCT_NOT_AVAILABLE_FOR_PURCHASE_ERROR="5",e.PRODUCT_ALREADY_PURCHASED_ERROR="6",e.RECEIPT_ALREADY_IN_USE_ERROR="7",e.INVALID_RECEIPT_ERROR="8",e.MISSING_RECEIPT_FILE_ERROR="9",e.NETWORK_ERROR="10",e.INVALID_CREDENTIALS_ERROR="11",e.UNEXPECTED_BACKEND_RESPONSE_ERROR="12",e.RECEIPT_IN_USE_BY_OTHER_SUBSCRIBER_ERROR="13",e.INVALID_APP_USER_ID_ERROR="14",e.OPERATION_ALREADY_IN_PROGRESS_ERROR="15",e.UNKNOWN_BACKEND_ERROR="16",e.INVALID_APPLE_SUBSCRIPTION_KEY_ERROR="17",e.INELIGIBLE_ERROR="18",e.INSUFFICIENT_PERMISSIONS_ERROR="19",e.PAYMENT_PENDING_ERROR="20",e.INVALID_SUBSCRIBER_ATTRIBUTES_ERROR="21",e.LOG_OUT_ANONYMOUS_USER_ERROR="22",e.CONFIGURATION_ERROR="23",e.UNSUPPORTED_ERROR="24",e.EMPTY_SUBSCRIBER_ATTRIBUTES_ERROR="25",e.PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR="26",e.PRODUCT_DISCOUNT_MISSING_SUBSCRIPTION_GROUP_IDENTIFIER_ERROR="28",e.CUSTOMER_INFO_ERROR="29",e.SYSTEM_INFO_ERROR="30",e.BEGIN_REFUND_REQUEST_ERROR="31",e.PRODUCT_REQUEST_TIMED_OUT_ERROR="32",e.API_ENDPOINT_BLOCKED="33",e.INVALID_PROMOTIONAL_OFFER_ERROR="34",e.OFFLINE_CONNECTION_ERROR="35",e.TEST_STORE_SIMULATED_PURCHASE_ERROR="42"})(Df||(Df={}));(function(e){F1(t,e);function t(){var a=e.call(this,"There is no singleton instance. Make sure you configure Purchases before trying to get the default instance. More info here: https://errors.rev.cat/configuring-sdk")||this;return Object.setPrototypeOf(a,t.prototype),a}return t})(Error);(function(e){F1(t,e);function t(){var a=e.call(this,"This method is not available in the current platform.")||this;return Object.setPrototypeOf(a,t.prototype),a}return t})(Error);var fx;(function(e){e.UNKNOWN="UNKNOWN",e.CUSTOM="CUSTOM",e.LIFETIME="LIFETIME",e.ANNUAL="ANNUAL",e.SIX_MONTH="SIX_MONTH",e.THREE_MONTH="THREE_MONTH",e.TWO_MONTH="TWO_MONTH",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY"})(fx||(fx={}));var mx;(function(e){e[e.INTRO_ELIGIBILITY_STATUS_UNKNOWN=0]="INTRO_ELIGIBILITY_STATUS_UNKNOWN",e[e.INTRO_ELIGIBILITY_STATUS_INELIGIBLE=1]="INTRO_ELIGIBILITY_STATUS_INELIGIBLE",e[e.INTRO_ELIGIBILITY_STATUS_ELIGIBLE=2]="INTRO_ELIGIBILITY_STATUS_ELIGIBLE",e[e.INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS=3]="INTRO_ELIGIBILITY_STATUS_NO_INTRO_OFFER_EXISTS"})(mx||(mx={}));var px;(function(e){e.NON_SUBSCRIPTION="NON_SUBSCRIPTION",e.SUBSCRIPTION="SUBSCRIPTION",e.UNKNOWN="UNKNOWN"})(px||(px={}));var gx;(function(e){e.CONSUMABLE="CONSUMABLE",e.NON_CONSUMABLE="NON_CONSUMABLE",e.NON_RENEWABLE_SUBSCRIPTION="NON_RENEWABLE_SUBSCRIPTION",e.AUTO_RENEWABLE_SUBSCRIPTION="AUTO_RENEWABLE_SUBSCRIPTION",e.PREPAID_SUBSCRIPTION="PREPAID_SUBSCRIPTION",e.UNKNOWN="UNKNOWN"})(gx||(gx={}));var yx;(function(e){e[e.UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY=0]="UNKNOWN_SUBSCRIPTION_UPGRADE_DOWNGRADE_POLICY",e[e.IMMEDIATE_WITH_TIME_PRORATION=1]="IMMEDIATE_WITH_TIME_PRORATION",e[e.IMMEDIATE_AND_CHARGE_PRORATED_PRICE=2]="IMMEDIATE_AND_CHARGE_PRORATED_PRICE",e[e.IMMEDIATE_WITHOUT_PRORATION=3]="IMMEDIATE_WITHOUT_PRORATION",e[e.DEFERRED=6]="DEFERRED",e[e.IMMEDIATE_AND_CHARGE_FULL_PRICE=5]="IMMEDIATE_AND_CHARGE_FULL_PRICE"})(yx||(yx={}));var bx;(function(e){e[e.INFINITE_RECURRING=1]="INFINITE_RECURRING",e[e.FINITE_RECURRING=2]="FINITE_RECURRING",e[e.NON_RECURRING=3]="NON_RECURRING"})(bx||(bx={}));var xx;(function(e){e.FREE_TRIAL="FREE_TRIAL",e.SINGLE_PAYMENT="SINGLE_PAYMENT",e.DISCOUNTED_RECURRING_PAYMENT="DISCOUNTED_RECURRING_PAYMENT"})(xx||(xx={}));var wx;(function(e){e.DAY="DAY",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR",e.UNKNOWN="UNKNOWN"})(wx||(wx={}));var vx;(function(e){e.INAPP="inapp",e.SUBS="subs"})(vx||(vx={}));var Sx;(function(e){e[e.SUBSCRIPTIONS=0]="SUBSCRIPTIONS",e[e.SUBSCRIPTIONS_UPDATE=1]="SUBSCRIPTIONS_UPDATE",e[e.IN_APP_ITEMS_ON_VR=2]="IN_APP_ITEMS_ON_VR",e[e.SUBSCRIPTIONS_ON_VR=3]="SUBSCRIPTIONS_ON_VR",e[e.PRICE_CHANGE_CONFIRMATION=4]="PRICE_CHANGE_CONFIRMATION"})(Sx||(Sx={}));var Ex;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.USER_CANCELLED=1]="USER_CANCELLED",e[e.ERROR=2]="ERROR"})(Ex||(Ex={}));var Lf;(function(e){e.VERBOSE="VERBOSE",e.DEBUG="DEBUG",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"})(Lf||(Lf={}));var Nx;(function(e){e[e.BILLING_ISSUE=0]="BILLING_ISSUE",e[e.PRICE_INCREASE_CONSENT=1]="PRICE_INCREASE_CONSENT",e[e.GENERIC=2]="GENER
461IC",e[e.WIN_BACK_OFFER=3]="WIN_BACK_OFFER"})(Nx||(Nx={}));var kx;(function(e){e.DISABLED="DISABLED",e.INFORMATIONAL="INFORMATIONAL"})(kx||(kx={}));var Ax;(function(e){e.NOT_REQUESTED="NOT_REQUESTED",e.VERIFIED="VERIFIED",e.FAILED="FAILED",e.VERIFIED_ON_DEVICE="VERIFIED_ON_DEVICE"})(Ax||(Ax={}));var _x;(function(e){e.NOT_PRESENTED="NOT_PRESENTED",e.ERROR="ERROR",e.CANCELLED="CANCELLED",e.PURCHASED="PURCHASED",e.RESTORED="RESTORED"})(_x||(_x={}));var Tx;(function(e){e.STOREKIT_1="STOREKIT_1",e.STOREKIT_2="STOREKIT_2",e.DEFAULT="DEFAULT"})(Tx||(Tx={}));var Cx;(function(e){e.MY_APP="MY_APP",e.REVENUECAT="REVENUECAT"})(Cx||(Cx={}));var jx;(function(e){e.SUCCESS="SUCCESS",e.ERROR="ERROR",e.PURCHASE_BELONGS_TO_OTHER_USER="PURCHASE_BELONGS_TO_OTHER_USER",e.INVALID_TOKEN="INVALID_TOKEN",e.EXPIRED="EXPIRED"})(jx||(jx={}));const Ar=oi("Purchases",{web:()=>tn(()=>import("./web-CfE2KFZ8.js"),[]).then(e=>new e.PurchasesWeb)}),O1="appl_nVNBoMbUiwezUNXdwNTyordaTLu",R1="goog_YOUR_ANDROID_KEY_HERE",pm="premium";let _r=!1;const wO=async e=>{if(It.isNativePlatform()&&!_r)try{const a=It.getPlatform()==="ios"?O1:R1;if(a.includes("YOUR_"))return;await Ar.setLogLevel({level:Lf.WARN}),e||await Ar.configure({apiKey:a}),_r=!0}catch{}},Nc=async e=>{if(!It.isNativePlatform()||!_r)return null;try{const{customerInfo:t}=await Ar.logIn({appUserID:e});return t}catch{return null}},vO=async()=>{if(!(!It.isNativePlatform()||!_r))try{await Ar.logOut()}catch{}},ef=async()=>{if(!It.isNativePlatform()||!_r)return!1;try{const{customerInfo:e}=await Ar.getCustomerInfo(),t=e.entitlements.active[pm];return(t==null?void 0:t.isActive)===!0}catch{return!1}},oR=async()=>{var e;if(!It.isNativePlatform()||!_r)return[];try{return((e=(await Ar.getOfferings()).current)==null?void 0:e.availablePackages)||[]}catch{return[]}},cR=async e=>{var t;if(!It.isNativePlatform()||!_r)return{success:!1,error:"RevenueCat not initialized"};try{const{customerInfo:a}=await Ar.purchasePackage({aPackage:e});return((t=a.entitlements.active[pm])==null?void 0:t.isActive)?{success:!0,customerInfo:a}:{success:!1,error:"Purchase completed but subscription not activated",customerInfo:a}}catch(a){return a.code===Df.PURCHASE_CANCELLED_ERROR?{success:!1,cancelled:!0,errorCode:a.code}:{success:!1,error:a.message||"Purchase failed",errorCode:a.code}}},uR=async()=>{var e;if(!It.isNativePlatform()||!_r)return{success:!1,error:"RevenueCat not initialized"};try{const{customerInfo:t}=await Ar.restorePurchases();return((e=t.entitlements.active[pm])==null?void 0:e.isActive)?{success:!0,customerInfo:t}:{success:!1,error:"No active subscription found",customerInfo:t}}catch(t){return{success:!1,error:t.message||"Restore failed",errorCode:t.code}}},dR=()=>!(It.getPlatform()==="ios"?O1:R1).includes("YOUR_"),hR=e=>e.product.priceString||`$${e.product.price}`,gn=It.isNativePlatform(),kc=gn&&It.getPlatform()==="android",Yn=(e,t)=>J.lazy(()=>e().then(a=>t?{default:a[t]}:a).catch(a=>{var i,l,o;if((i=a.message)!=null&&i.includes("Failed to fetch dynamically imported module")||(l=a.message)!=null&&l.includes("Failed to load module script")||(o=a.message)!=null&&o.includes("MIME type")){const u=sessionStorage.getItem("chunk_reload"),h=Date.now();(!u||h-parseInt(u)>1e4)&&(sessionStorage.setItem("chunk_reload",h.toString()),window.location.reload())}throw a})),SO=Yn(()=>tn(()=>import("./SubscriptionShop-D6r8vGYG.js"),__vite__mapDeps([0,1,2,3,4])),"SubscriptionShop"),EO=Yn(()=>tn(()=>import("./History-Bi873EcP.js"),__vite__mapDeps([5,6,7,8])),"History"),NO=Yn(()=>tn(()=>import("./AdminPanel-O5LabOsd.js"),__vite__mapDeps([9,10,11,7,4,6,12,8,13,14])),"AdminPanel"),kO=Yn(()=>tn(()=>import("./PrivacyPolicy-cMiSyphd.js"),[]),"PrivacyPolicy"),AO=Yn(()=>tn(()=>import("./TermsOfService-ChGIX9n1.js"),[]),"TermsOfService"),_O=Yn(()=>tn(()=>import("./FAQ-CY1ijkSF.js"),__vite__mapDeps([15,10,2,16,12])),"FAQ"),TO=Yn(()=>tn(()=>import("./Account-Bo3EWMCA.js"),__vite__mapDeps([17,3,12,1,16,14])),"Account"),CO=Yn(()=>tn(()=>import("./Support-Bd2nyydK.js"),__vite__mapDeps([18,1,6])),"Supp
461ort"),jO=Yn(()=>tn(()=>import("./NotFound-UO_lsn9H.js"),[]),"NotFound"),FO=Yn(()=>tn(()=>import("./MediaAssets-DvzTzmrC.js"),__vite__mapDeps([19,8])),"MediaAssets"),OO=Yn(()=>tn(()=>import("./GolfPage-BVRNeteQ.js"),__vite__mapDeps([20,8])),"GolfPage"),RO=Yn(()=>tn(()=>import("./PropsPage-BjUq0dWH.js"),__vite__mapDeps([21,13,8])),"PropsPage"),DO=Yn(()=>tn(()=>import("./TwitterAds-W3-SPTLO.js"),__vite__mapDeps([22,11])),"TwitterAds"),Fx=["ALL","NFL","NCAAF","NBA","CBB","NHL","MLB"],Ox=["home","dashboard","golf","props","shop","history","admin","privacy","terms","faq","support","login","media","twitter-ads","account"],Qt=(e,t)=>Date.now();function LO(e,t){const a=e.split(".").map(Number),i=t.split(".").map(Number);for(let l=0;l<3;l++){if((a[l]||0)<(i[l]||0))return!0;if((a[l]||0)>(i[l]||0))return!1}return!1}const MO="https://apps.apple.com/app/matchups-ai/id6743123813",IO="https://play.google.com/store/apps/details?id=ai.matchups.app",UO=()=>{var mn,vn,Or,Ka;const[e,t]=J.useState([]),[a,i]=J.useState(null),[l,o]=J.useState(!1),[u,h]=J.useState(!0),[f,p]=J.useState({}),[y,b]=J.useState({}),[x,w]=J.useState(null),[N,A]=J.useState(!0),[_,C]=J.useState(!1),[T,j]=J.useState(!1),[B,Q]=J.useState(!1),O=sn.useRef(null);sn.useEffect(()=>{O.current=(a==null?void 0:a.id)||null},[a]);const[V,ee]=J.useState(!0),[q,E]=J.useState(()=>{if(typeof window<"u"){const{pathname:Z,search:ue}=window.location,le=new URLSearchParams(ue);if(le.get("session_id"))return"shop";const ye=le.get("view");if(ye)return Ox.includes(ye)?ye:"404";if(Z!=="/"&&Z!=="/index.html"){const ve=Z.replace(/^\//,"").replace(/\/$/,"");return Ox.includes(ve)?ve:"404"}if(gn)return"dashboard"}return"home"}),[G,D]=K4("games",a==null?void 0:a.id,"table"),[U,z]=J.useState(!1),$=20,P=30,[te,fe]=J.useState($),[ce,R]=J.useState(!1),[L,F]=J.useState(null),[S,de]=J.useState({isOpen:!1,type:"alert",title:"",message:"",onClose:()=>{}}),oe=(Z,ue,le,ye)=>{de({isOpen:!0,type:Z,title:ue,message:le,onClose:()=>de(ve=>({...ve,isOpen:!1})),onConfirm:ye?()=>{ye(),de(ve=>({...ve,isOpen:!1}))}:void 0})},[pe,ge]=J.useState("ALL"),[xe,we]=J.useState(new Date),[Ie,jt]=J.useState(""),[st,fn]=J.useState(!1),[pt,Et]=J.useState(!1);J.useEffect(()=>{Et(!1)},[xe]);const At=Array.from({length:6},(Z,ue)=>Ry(new Date,ue));J.useEffect(()=>{const Z=()=>{if(document.visibilityState==="visible"){const ue=vr(new Date),le=vr(xe);ue!==le&&we(new Date),nt()}};return document.addEventListener("visibilitychange",Z),()=>document.removeEventListener("visibilitychange",Z)},[xe]),J.useEffect(()=>{const Z={home:"#1 AI Sports Predictions | Matchups.AI",dashboard:"Daily Moneylines | Matchups.AI",golf:"Golf Tournaments | Matchups.AI",shop:"Subscription | Matchups.AI",history:"System Logs | Matchups.AI",admin:"Admin Controls | Matchups.AI",privacy:"Privacy Policy | Matchups.AI",terms:"Terms of Service | Matchups.AI",faq:"FAQ | Matchups.AI",support:"Contact Support | Matchups.AI",login:"Login | Matchups.AI",404:"Page Not Found | Matchups.AI"};document.title=Z[q]||"Matchups.AI"},[q]),J.useEffect(()=>{gn&&(Cc.setStyle({style:Tc.Dark}).catch(()=>{}),Cc.setBackgroundColor({color:"#050505"}).catch(()=>{}));const Z=async()=>{try{await Promise.race([document.fonts.ready,new Promise(ue=>setTimeout(ue,3e3))]),C(!0)}catch{C(!0)}};"fonts"in document?Z():C(!0);try{const le=new URLSearchParams(window.location.search).get("utm_source"),ye=document.referrer;let ve="Direct";if(le)ve=le;else if(ye)try{const Pe=new URL(ye);Pe.hostname!==window.location.hostname&&(ve=Pe.hostname.replace("www.",""))}catch{ve="External"}sessionStorage.getItem("matchups_source")||sessionStorage.setItem("matchups_source",ve),localStorage.getItem("matchups_initial_source")||localStorage.setItem("matchups_initial_source",ve)}catch{}},[]);const Kt=async(Z=!1)=>{try{const ue=await A4(Z),le={};ue.forEach(Pe=>le[Pe.gameId]=Pe),p(le);const ye=await _4(Z),ve={};ye.forEach(Pe=>ve[Pe.gameId]=Pe),b(ve)}catch{}},nt=async()=>{const Z=await Rl(!0);t(Z);const ue=await Dl(!0);w(ue),await Kt(!0)};J.useEffect(()=>{if(!gn)return;const Z=Nl.addListener("appStateChange",async({isActive:ue})=>{ue&&(we(new Date),await nt())});return()=>{Z.then(ue=>ue.remove())}},[]);const Ut=async Z=>{let ue=Z;if(Z.includes("?")){const[ye,ve]=Z.split("?"),$e=new URLSearchParams(ve).get("sport");$e&&Fx.includes($e)&&ge($e),ue=ye==="games"?"dashboard":ye}const le=ue==="home"&&a?"dashboard":ue;if(E(le),typeof window<"u")try{if(window.location.protocol!=="blob:"&&window.history&&typeof window.history.pushState=="function"){const ye=le==="home"?"/":`/?view=${le}`;window.history.pushState({},"",ye)}}catch{}if((le==="history"||le==="dashboard"||le==="home")&&(nt(),a)){const ye=await va(a.id);ye&&(ye.subscription.plan!==a.subscription.plan||ye.subscription.status!==a.subscription.status)&&i(ye)}window.scrollTo({top:0,behavior:"smooth"})};J.useEffect(()=>{(async()=>{const le=Qt();A(!0);try{if(gn)try{const[Le,Qe]=await Promise.all([Nl.getInfo(),O4()]);if(Qe!=="0.0.0"&&LO(Le.version,Qe)){Q(!0),A(!1);return}}catch{}const ye=Qt("getSession"),ve=De.auth.getSession(),Pe=new Promise(Le=>setTimeout(()=>{Le({data:{session:null}})},1e4)),{data:{session:$e}}=await Promise.race([ve,Pe]);if(Qt("getSession",ye),gn){await wO();const Le=await ef();j(Le)}if($e!=null&&$e.user)try{const Le=Qt("loadProfile");let Qe=await va($e.user.id);
461if(Qt("Storage.getUser",Le),!Qe){const Sn=Qt("getCurrentSessionUser (new user)");Qe=await Xh(),Qt("getCurrentSessionUser",Sn)}i(Qe),Qe&&gn&&await Nc(Qe.id),Qt("loadProfile complete",Le)}catch{}o(!0),Qt("Auth phase complete",le);const Nt=Qt("DB connection check"),ot=x4(),Dt=new Promise(Le=>setTimeout(()=>Le(!1),5e3)),rt=await Promise.race([ot,Dt]);h(rt),Qt("DB connection check",Nt);try{const Le=Qt("Storage.getGlobalStats"),Qe=await Dl();Qt("Storage.getGlobalStats",Le),Qe&&w(Qe)}catch(Le){console.warn("Failed to load global stats:",Le)}if(rt){const Le=Qt("Data loading (games, predictions)");await Promise.all([(async()=>{const Qe=Qt("Storage.getGames"),Sn=await Rl();Qt("Storage.getGames",Qe),Sn&&Sn.length>0&&t(Sn),hO().then(pa=>{pa&&pa.length>0&&t(pa)}).catch(()=>{})})(),(async()=>{const Qe=Qt("fetchPredictions");await Kt(),Qt("fetchPredictions",Qe)})()]),Qt("Data loading complete",Le)}}catch(ye){console.error("Initialization error:",ye),o(!0)}finally{A(!1)}})();const{data:{subscription:ue}}=De.auth.onAuthStateChange((le,ye)=>{if(le==="SIGNED_IN"&&(ye!=null&&ye.user)){if(O.current===ye.user.id)return;va(ye.user.id).then(ve=>{ve?i(ve):Xh().then(i)})}else le==="SIGNED_OUT"&&(i(null),E("dashboard"))});return()=>ue.unsubscribe()},[]),J.useEffect(()=>{if(!a)return;const ue=setInterval(async()=>{const le=await va(a.id);le&&(le.grantedByAdmin!==a.grantedByAdmin||le.subscription.plan!==a.subscription.plan||le.subscription.status!==a.subscription.status||le.subscription.expiryDate!==a.subscription.expiryDate)&&i(le)},120*1e3);return()=>clearInterval(ue)},[a==null?void 0:a.id,a==null?void 0:a.grantedByAdmin,a==null?void 0:a.subscription.plan,a==null?void 0:a.subscription.status,a==null?void 0:a.subscription.expiryDate]),J.useEffect(()=>{if(!gn)return;const Z=async ue=>{const le=ue.url;if(le.includes("auth/callback")||le.includes("access_token")||le.includes("refresh_token")){try{const{Browser:ye}=await tn(async()=>{const{Browser:ve}=await Promise.resolve().then(()=>am);return{Browser:ve}},void 0);await ye.close()}catch{}try{const ye=new URLSearchParams(le.split("#")[1]||le.split("?")[1]||""),ve=ye.get("access_token"),Pe=ye.get("refresh_token");if(ve&&Pe){const{data:$e,error:Nt}=await De.auth.setSession({access_token:ve,refresh_token:Pe});if(Nt)console.error("OAuth session error:",Nt);else if($e.user){const ot=await Xh();ot&&(i(ot),await Nc(ot.id),j(!1),E("dashboard"))}}}catch{}}};return Nl.addListener("appUrlOpen",Z),()=>{Nl.removeAllListeners()}},[]),J.useEffect(()=>{q==="login"&&a&&E("dashboard")},[q,a,l]),J.useEffect(()=>{V&&a&&q==="home"?(E("dashboard"),ee(!1),typeof window<"u"&&window.history&&window.history.replaceState({},"","/?view=dashboard")):V&&ee(!1)},[a,V,q]);const Jt=sn.useRef(f),Bt=sn.useRef(y),zt=sn.useRef(e),xn=sn.useRef(a);sn.useEffect(()=>{Jt.current=f},[f]),sn.useEffect(()=>{Bt.current=y},[y]),sn.useEffect(()=>{zt.current=e},[e]),sn.useEffect(()=>{xn.current=a},[a]),J.useEffect(()=>{if(!(a!=null&&a.id))return;const Z=300*1e3,ue=async()=>{const ve=xn.current;ve!=null&&ve.id&&(ve.lastActive&&Date.now()-ve.lastActive<Z-1e4||(ve.lastActive=Date.now(),await Hc(ve)))};ue();const le=setInterval(ue,Z),ye=()=>{document.visibilityState==="visible"&&ue()};return document.addEventListener("visibilitychange",ye),()=>{clearInterval(le),document.removeEventListener("visibilitychange",ye)}},[a==null?void 0:a.id]),J.useEffect(()=>{if(!u)return;const Z=window.setInterval(async()=>{const ue=Jt.current,le=Bt.current,ye=zt.current,ve=xn.current,Pe=ot=>ot.status!=="researching"?!1:!!((ot.userId==="system"||ot.userId==="admin")&&(ve!=null&&ve.isAdmin)||ot.userId===(ve==null?void 0:ve.id)||ot.userId==="system"),$e=Object.values(ue).filter(Pe),Nt=Object.values(le).filter(Pe);if(!($e.length===0&&Nt.length===0)){for(const ot of $e){const Dt=ye.find(rt=>rt.id===ot.gameId);if(Dt){const rt=await yO(ot,Dt);rt&&rt.lastUpdated!==ot.lastUpdated&&p(Le=>({...Le,[rt.gameId]:rt}))}}for(const ot of Nt){const Dt=ye.find(rt=>rt.id===ot.gameId);if(Dt){const rt=await bO(ot,Dt);rt&&rt.lastUpdated!==ot.lastUpdated&&b(Le=>({...Le,[rt.gameId]:rt}))}}}},5e3);return()=>clearInterval(Z)},[u]),J.useEffect(()=>{if(!u)return;const Z=setInterval(async()=>{const ue=await Rl();t(le=>ue.length!==le.length?ue:le),Kt().catch(()=>{}),Dl().then(le=>w(le)).catch(()=>{})},3e5);return()=>clearInterval(Z)},[u]);const lt=async()=>
461{if(await B4(),await vO(),i(null),gn){const Z=await ef();j(Z)}},kn=async(Z,ue)=>{if(a!=null&&a.isAdmin)try{if(ue==="game"){const le=await pO(Z,"admin",!0);p(ye=>({...ye,[Z]:le}))}else{const le=await gO(Z,"admin",!0);b(ye=>({...ye,[Z]:le}))}}catch{oe("error","Init Failed","Could not initiate research task.")}},ne=async Z=>{if(a!=null&&a.isAdmin)try{const le=await(await fetch("/api/admin_games",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"fix_prediction",gameId:Z})})).json();if(le.success&&le.prediction){const ye=le.prediction;p(ve=>({...ve,[ye.gameId]:ye})),oe("success","Smart Fix Applied","Winner ID synchronized with scores. Teams normalized.")}else oe("alert","No Fix Needed","Data appears consistent.")}catch(ue){oe("error","Fix Failed",ue.message)}},he=async Z=>{a!=null&&a.isAdmin&&oe("confirm","Delete Game","Are you sure you want to remove this game?",async()=>{try{await E4(Z),t(ue=>ue.filter(le=>le.id!==Z)),oe("success","Deleted","Game removed successfully.")}catch{oe("error","Error","Failed to delete game.")}})},ke=async()=>{a!=null&&a.isAdmin&&oe("confirm","Force Refresh Schedule","This consumes API credits. Continue?",async()=>{A(!0);try{const Z=await T1();t(Z),oe("success","Refresh Complete",`Found ${Z.length} games.`)}catch{oe("error","Refresh Failed","Check console.")}finally{A(!1)}})},je=J.useMemo(()=>{const Z=vr(xe);return e.filter(ue=>{if(!ue||!ue.date||ue.completed)return!1;const le=new Date(ue.date);return isNaN(le.getTime())||ue.sport==="MLB"&&jf(le)?!1:vr(le)===Z})},[e,xe]),He=J.useMemo(()=>je.filter(Z=>{const ue=f[Z.id];if(!ue||!ue.result)return!1;let le=ue.result.confidence;return le<=1&&(le=le*100),le>=80}).length,[je,f]),_t=J.useMemo(()=>{const Z={};return je.forEach(ue=>{const le=ue.sport||"NFL";Z[le]=(Z[le]||0)+1}),Object.entries(Z).sort((ue,le)=>le[1]-ue[1])},[je]),Pt=J.useMemo(()=>{const Z=vr(xe);return e.filter(ue=>{if(!ue||!ue.date||!ue.completed)return!1;const le=new Date(ue.date);return isNaN(le.getTime())?!1:vr(le)===Z}).length},[e,xe]),at=J.useMemo(()=>{const Z=vr(xe);let ue=e;if(pe!=="ALL"&&(ue=ue.filter(le=>(le.sport||"NFL")===pe)),ue=ue.filter(le=>{var $e,Nt;if(!le||!le.date||!(($e=le.homeTeam)!=null&&$e.name)||!((Nt=le.awayTeam)!=null&&Nt.name)||le.completed)return!1;const ye=new Date(le.date);if(isNaN(ye.getTime())||le.sport==="MLB"&&jf(ye))return!1;const Pe=Date.now()-2.5*60*60*1e3;return ye.getTime()<Pe?!1:vr(ye)===Z}),Ie){const le=Ie.toLowerCase();ue=ue.filter(ye=>{var ve,Pe,$e,Nt,ot,Dt,rt,Le;return((Pe=(ve=ye.homeTeam)==null?void 0:ve.name)==null?void 0:Pe.toLowerCase().includes(le))||((Nt=($e=ye.homeTeam)==null?void 0:$e.city)==null?void 0:Nt.toLowerCase().includes(le))||((Dt=(ot=ye.awayTeam)==null?void 0:ot.name)==null?void 0:Dt.toLowerCase().includes(le))||((Le=(rt=ye.awayTeam)==null?void 0:rt.city)==null?void 0:Le.toLowerCase().includes(le))})}return st&&(ue=ue.filter(le=>{const ye=f[le.id];if(!ye||!ye.result)return!1;let ve=ye.result.confidence;return ve<=1&&(ve=ve*100),ve>=80})),ue.sort((le,ye)=>new Date(le.date).getTime()-new Date(ye.date).getTime()),ue},[e,pe,xe,Ie,f,st]);J.useEffect(()=>{fe($)},[pe,xe,Ie,st]),J.useEffect(()=>{if(te>=at.length){R(!1);return}R(!0);const Z=setTimeout(()=>{fe(ue=>Math.min(ue+P,at.length))},100);return()=>clearTimeout(Z)},[te,at.length]);const gt=async()=>{if(!(a!=null&&a.isAdmin))return;const Z=at.filter(ue=>{const le=f[ue.id];return!le||le.status==="idle"||le.status==="failed"});if(Z.length===0){oe("alert","Batch Info","All games in current view are analyzed.");return}oe("confirm","Start Batch",`Analyze ${Z.length} games?`,async()=>{F(`Processing ${Z.length} games...`),F(null)})},Ft=()=>{const Z=[];Z.push(["Date","Time","Sport","Away Team","Home Team","Predicted Winner","Confidence","Spread","Elite Pick"]),at.forEach(Pe=>{const $e=f[Pe.id],Nt=$e==null?void 0:$e.result;let ot="",Dt=0,rt=0;if(Nt){const Sn=Number(Nt.homeScorePrediction)||0,pa=Number(Nt.awayScorePrediction)||0;ot=Sn>pa?Pe.homeTeam.name:Pe.awayTeam.name,Dt=Nt.confidence||0,Dt>0&&Dt<=1&&(Dt=Math.round(Dt*100)),rt=Math.abs(Sn-pa)}const Le=Dt>=80,Qe=new Date(Pe.date);Z.push([Wt(Qe,"yyyy-MM-dd"),Wt(Qe,"h:mm a"),Pe.sport||"NFL",Pe.awayTeam.name,Pe.homeTeam.name,ot,Dt.toString(),rt.toString(),Le?"Yes":"No"])});const ue=Z.map(Pe=>Pe.map($e=>`"${$e.replace(/"/g,'""')}"`).join(",")).join(`
462`),le=new Blob([ue],{type:"text/csv;charset=utf-8;"}),ye=URL.createObjectURL(le),ve=document.createElement("a");ve.href=ye,ve.download=`matchups-picks-${Wt(xe,"yyyy-MM-dd")}.csv`,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),URL.revokeObjectURL(ye)},be=()=>{const Z=x||{totalPredictions:0,correctPredictions:0,highConfidenceTotal:0,highConfidenceCorrect:0},ue=Z.totalPredictions>0?Math.round(Z.correctPredictions/Z.totalPredictions*100):0,le=(Z.highConfidenceTotal||0)>0?Math.round((Z.highConfidenceCorrect||0)/(Z.highConfidenceTotal||1)*100):0;return d.jsxs("div",{className:"grid grid-cols-2 gap-4 h-full w-full md:w-auto",children:[d.jsx(Er,{className:"h-full",content:`Total Record: ${Z.correctPredictions}-${Z.totalPredictions-Z.correctPredictions}`,children:d.jsxs("div",{className:"relative group overflow-hidden rounded-lg bg-dark-800 border border-white/10 p-4 min-w-[140px] flex flex-col justify-between hover:border-brand/30 transition-all shadow-lg h-full",children:[d.jsx("div",{className:"absolute top-0 left-0 w-1 h-full bg-brand"}),d.jsxs("div",{className:"text-[9px] text-gray-400 font-mono uppercase tracking-widest flex justify-between items-center relative mb-1",children:["RECORD ",d.jsx(tf,{className:"w-3 h-3 text-brand"})]}),d.jsxs("div",{className:"flex flex-col relative",children:[d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsxs("span",{className:"font-teko font-light text-4xl text-white leading-none",children:[ue,"%"]}),d.jsx("span",{className:"font-teko font-light text-xl text-gray-500 leading-none",children:"ACCURACY"})]}),d.jsxs("span",{className:"text-gray-500 font-mono text-[10px] uppercase tracking-wider",children:["(",Z.totalPredictions," GAMES)"]})]})]})}),d.jsx(Er,{className:"h-full",content:`Elite Record: ${Z.highConfidenceCorrect||0}-${(Z.highConfidenceTotal||0)-(Z.highConfidenceCorrect||0)}`,children:d.jsxs("div",{className:"relative group overflow-hidden rounded-lg bg-dark-800 border border-white/10 min-w-[140px] hover:border-brand/30 transition-all shadow-lg h-full",children:[d.jsx("div",{className:"absolute top-0 left-0 w-1 h-full bg-amber-500"}),d.jsxs("div",{className:"relative p-4 h-full flex flex-col justify-between",children:[d.jsxs("div",{className:"text-[9px] text-gray-400 font-mono uppercase tracking-widest flex justify-between items-center mb-1",children:["ELITE (",">","80%) ",d.jsx(Ll,{className:"w-3 h-3 text-amber-500"})]}),d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-baseline gap-1",children:[d.jsxs("span",{className:"font-teko font-light text-4xl text-white leading-none",children:[le,"%"]}),d.jsx("span",{className:"font-teko font-light text-xl text-gray-500 leading-none",children:"ACCURACY"})]}),d.jsxs("span",{className:"text-gray-500 font-mono text-[10px] uppercase tracking-wider",children:["(",Z.highConfidenceTotal||0," GAMES)"]})]})]})]})}),(a==null?void 0:a.isAdmin)&&d.jsxs("div",{className:"col-span-2 md:col-span-2 flex flex-row gap-2 h-auto",children:[d.jsx("button",{onClick:ke,disabled:!u,className:"flex-1 bg-dark-900 border border-white/20 text-gray-300 hover:bg-white/10 hover:text-white px-2 py-2 rounded-lg text-[10px] font-mono uppercase tracking-wider transition-all flex items-center justify-center gap-2",children:d.jsx(si,{className:"w-4 h-4"})}),d.jsx("button",{onClick:gt,disabled:!u,className:"flex-1 bg-dark-900 border border-brand/50 text-brand hover:bg-brand hover:text-black px-2 py-2 rounded-lg text-[10px] font-mono uppercase tracking-wider transition-all flex items-center justify-center gap-2",children:d.jsx(Ux,{className:"w-4 h-4"})})]})]})},Ze=["faq","privacy","terms","login","support","404","home"].includes(q),Ke=(N||!l)&&!Ze;if(B){const Z=kc?IO:MO;return d.jsx("div",{className:"fixed inset-0 bg-dark-950 z-[100] flex flex-col items-center justify-center px-6",children:d.jsxs("div",{className:"flex flex-col items-center gap-6 max-w-sm text-center",children:[d.jsxs("div",{className:"font-teko font-light text-5xl text-white tracking-tight uppercase select-none",children:["MATCHUPS",d.jsx("span",{className:"text-brand font-light",children:".AI"})]}),d.jsx("div",{className:"w-16 h-16 rounded-2xl bg-brand/10 border border-brand/20 flex items-center justify-center",children:d.jsx(si,{className:"w-8 h-8 text-brand"})}),d.jsxs("div",{children:[d.jsx("h2",{className:"font-teko text-2xl text-white uppercase tracking-wide mb-2",children:"Update Required"}),d.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:"A new version of Matchups AI is available with important improvements. Please update to continue."})]}),d.jsx("a",{href:Z,target:"_blank",rel:"noopener noreferrer",className:"w-full py-3 bg-brand text-black font-teko text-xl uppercase tracking-wide rounded-xl hover:bg-white transition-colors shadow-lg shadow-brand/20 text-center",children:"Update Now"})]})})}if(!_||Ke)return d.jsx("div",{className:"fixed inset-0 bg-dark-950 z-[100] flex flex-col items-center justify-center",children:d.jsxs("div",{className:ae("flex flex-col items-center gap-8 transition-opacity duration-700 ease-out",_?"opacity-100":"opacity-0"),children:[d.jsxs("div",{className:"font-teko font-light text-6xl md:text-8xl text-white tracking-tight uppercase select-none drop-shadow-[0_0_15px_rgba(51,214,82,0.2)]",children:["MATCHUPS",d.jsx("span",{className:"text-brand font-light",children:".AI"})]}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-0 rounded-full border-4 border-brand/20"}),d.jsx("div",{className:"w-16 h-16 rounded-full border-4 border-t-brand border-r-transparent border-b-transparent border-l-transparent animate-spin"})]}),d.jsx("div",{className:"text-brand/60 font-mono text-[10px] uppercase tracking-[0.3em] animate-pulse",children:"Initializing System"})]})});const sa=!!(a!=null&&a.stripeSubscriptionId)&&((mn=a==null?void 0:a.subscription)==null?void 0:mn.status)==="active",wn=((vn=a==null?void 0:a.subscription)==null?void 0:vn.status)==="canceled"&&((Or=a==null?void 0:a.subscription)==null?void 0:Or.plan)!=="none"&&(((Ka=a==null?void 0:a.subscription)==null?void 0:Ka.expiryDate)||0)>Date.now(),Na=a&&(a.grantedByAdmin||a.subscription.plan!=="none"&&(a.subscription.status==="active"&&(a.subscription.expiryDate>Date.now()||sa)||wn)),la=a==null?void 0:a.isAdmin,Ee=Na||la||T;return d.jsx(S3,{children:d.jsx(O3,{children:d.jsxs(WN,{user:a,currentView:q,onNavigate:Ut,onLogout:lt,dbConnected:u,isNativeApp:gn,isAndroid:kc,onRefresh:nt,children:[d.jsx(N1,{...S}),L&&d.jsxs("div",{className:"fixed top-[80px] left-0 right-0 bg-brand text-black font-teko text-xl py-1 px-4 z-[60] flex items-center justify-center gap-2 shadow-lg animate-in slide-in-from-top",children:[d.jsx(jc,{className:"w-5 h-5 animate-spin"})," ",L]}),!u&&d.jsxs("div",{className:"fixed top-[80px] left-0 right-0 bg-red-900/90 text-white font-teko text-xl py-2 px-4 z-[50] flex justify-center gap-2 border-b border-red-500/30",children:[d.jsx($E,{className:"w-5 h-5"})," DATABASE DISCONNECTED"]}),q==="home"&&d.jsx(q4,{globalStats:x,user:a,onNavigate:Ut}),d.jsxs(J.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center min-h-[80vh]",children:d.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-t-brand border-r-transparent border-b-transparent border-l-transparent animate-spin"})}),children:[q==="privacy"&&d.jsx(kO,{}),q==="terms"&&d.jsx(AO,{}),q==="faq"&&d.jsx(_O,{}),q==="support"&&d.jsx(CO,{}),q==="404"&&d.jsx(jO,{onNavigate:Ut}),q==="media"&&d.jsx(FO,{}),q==="twitter-ads"&&d.jsx(DO,{})]}),q==="login"&&!a&&d.jsx(ux,{onLogin:async Z=>{O.current=Z.id,i(Z),gn&&(await Nc(Z.id),j(!1)),E("dashboard")}}),q==="dashboard"&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"mb-8 flex flex-col lg:flex-row justify-between items-start gap-8 md:border-b md:border-white/5 md:pb-4",children:[d.jsxs("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[d.jsx("div",{className:"h-px w-8 bg-brand"}),d.jsx("span",{className:"text-brand font-mono text-[10px] uppercase tracking-[0.2em] font-bold",children:Wt(xe,"EEEE, MMMM do").toUpperCase()})]}),d.jsxs("h1",{className:"font-teko font-light text-4xl md:text-5xl text-white leading-none tracking-tight uppercase",children:["DAILY ",d.jsx("span",{className:"text-brand font-light",children:"INTELLIGENCE"})]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-6 md:gap-10",children:[d.jsxs("div",{className:"flex items-center gap-3 group cursor-default",children:[d.jsx("div",{className:"font-teko font-normal text-5xl md:text-6xl text-white leading-none group-hover:text-brand transition-colors",children:je.length}),d.jsxs("div",{className:"flex flex-col justify-center",children:[d.jsx("span",{className:"text-white/40 font-mono text-[9px] uppercase tracking-widest leading-tight group-hover:text-white transition-colors",children:"Total"}),d.jsx("span",{className:"text-white/60 font-bold text-[10px] uppercase tracking-widest leading-tight group-hover:text-brand transition-colors",children:"Matchups"})]})]}),d.jsx("div",{className:"h-10 w-px bg-white/10 hidden sm:block"}),d.jsxs("div",{className:"flex items-center gap-3 group cursor-default",children:[d.jsx("div",{className:"font-teko font-normal text-5xl md:text-6xl text-amber-500 leading-none group-hover:text-amber-400 transition-colors",children:He}),d.jsxs("div",{className:"flex flex-col justify-center",children:[d.jsx("span",{className:"text-amber-500/60 font-mono text-[9px] uppercase tracking-widest leading-tight group-hover:text-amber-400/60 transition-colors",children:"High Conf"}),d.jsxs("span",{className:"text-amber-500 font-bold text-[10px] uppercase tracking-widest leading-tight flex items-center gap-1 group-hover:text-amber-400 transition-colors",children:["Elite ",d.jsx(Nr,{className:"w-2.5 h-2.5"})]})]})]}),_t.length>0&&d.jsxs("div",{className:"hidden md:flex items-center gap-6 md:gap-10",children:[d.jsx("div",{className:"h-10 w-px bg-white/10"}),d.jsx("div",{className:"flex flex-wrap gap-2 max-w-[280px]",children:(Ee?_t:[["NFL",3],["NBA",5],["NHL",2]]).map(([Z,ue])=>d.jsxs("button",{onClick:()=>Ee&&ge(Z),className:ae("px-2.5 py-1 rounded border flex items-center gap-1.5 transition-all",pe===Z?"bg-brand/10 border-brand/30 text-white":"bg-white/[0.03] border-white/5 text-gray-400",Ee?"hover:bg-white/10 hover:text-white cursor-pointer":"cursor-default opacity-60"),children:[d.jsx("span",{className:"font-teko text-lg leading-none pt-0.5",children:ue}),d.jsx("span",{className:"text-[9px] font-mono uppercase tracking-wider opacity-80",children:Z})]},Z))})]})]})]}),d.jsx("div",{className:"hidden md:block w-full lg:w-auto flex-shrink-0 pt-2",children:be()})]}),a&&!Ee&&(gn?d.jsxs("div",{className:"mb-6 bg-gradient-to-r from-brand/10 via-brand/5 to-transparent border border-brand/20 rounded-xl px-4 py-3 flex items-center justify-between gap-3 shadow-lg relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_left,_rgba(51,214,82,0.1)_0%,_transparent_60%)]"}),d.jsxs("div",{className:"flex items-center gap-2.5 relative z-10 min-w-0",children:[d.jsx(Nr,{className:"w-5 h-5 text-brand flex-shrink-0"}),d.jsxs("p",{className:"text-white text-sm truncate",children:[d.jsx("span",{className:"text-brand font-bold",children:"5 free"})," daily — ",d.jsx("span",{className:"text-gray-400",children:"$15/mo for all"})]})]}),d.jsxs("button",{onClick:()=>E("shop"),className:"relative z-10 px-4 py-2 bg-brand text-black font-teko text-base uppercase tracking-wide rounded-lg flex items-center gap-1.5 whitespace-nowrap flex-shrink-0",children:[d.jsx(Fc,{className:"w-3.5 h-3.5"}),"Upgrade"]})]}):d.jsxs("div",{className:"mb-4 bg-gradient-to-r from-brand/10 via-brand/5 to-transparent border border-brand/20 rounded-xl p-4 flex items-center justify-between gap-4 shadow-lg relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-[radial-grad
462ient(circle_at_left,_rgba(51,214,82,0.1)_0%,_transparent_60%)]"}),d.jsxs("div",{className:"flex items-center gap-3 relative z-10",children:[d.jsx("div",{className:"p-2 bg-brand/20 rounded-lg",children:d.jsx(Nr,{className:"w-5 h-5 text-brand"})}),d.jsxs("div",{children:[d.jsxs("p",{className:"text-white font-medium text-sm md:text-base",children:["You get ",d.jsx("span",{className:"text-brand font-bold",children:"5 free picks"})," daily"]}),d.jsx("p",{className:"text-gray-400 text-xs md:text-sm",children:"Unlock all matchups & elite picks for just $15/mo"})]})]}),d.jsxs("button",{onClick:()=>E("shop"),className:"relative z-10 px-4 md:px-6 py-2 md:py-2.5 bg-brand text-black font-teko text-lg md:text-xl uppercase tracking-wide rounded-lg hover:bg-white transition-colors shadow-lg shadow-brand/20 flex items-center gap-2 whitespace-nowrap",children:[d.jsx(Fc,{className:"w-4 h-4"}),d.jsx("span",{className:"hidden sm:inline",children:"Upgrade Now"}),d.jsx("span",{className:"sm:hidden",children:"Upgrade"})]})]})),d.jsxs("div",{className:"md:hidden sticky top-20 z-40 mb-4 flex gap-3",children:[d.jsxs("button",{onClick:()=>z(!U),className:"flex-1 bg-dark-900 border border-white/10 rounded-xl p-3 flex items-center justify-between shadow-xl active:scale-[0.98] transition-all",children:[d.jsxs("div",{className:"flex items-center gap-2 text-white",children:[d.jsx(nN,{className:"w-4 h-4 text-brand"}),d.jsx("span",{className:"font-teko uppercase text-2xl tracking-wide leading-none pt-1",children:"FILTERS"})]}),U?d.jsx(Mx,{className:"w-4 h-4 text-gray-400"}):d.jsx(Lx,{className:"w-4 h-4 text-gray-400"})]}),Ee&&d.jsxs("button",{onClick:()=>fn(!st),className:ae("px-6 rounded-xl border flex items-center gap-2 shadow-xl active:scale-[0.98] transition-all",st?"bg-amber-500 border-amber-500 text-black":"bg-dark-900 border-white/10 text-gray-400"),children:[d.jsx(Nr,{className:ae("w-4 h-4",st&&"fill-black/20")}),d.jsx("span",{className:"font-teko text-2xl uppercase tracking-wide leading-none pt-1",children:"ELITE"})]}),d.jsx("button",{onClick:()=>D(G==="grid"?"table":"grid"),className:"px-4 bg-dark-900 border border-white/10 rounded-xl flex items-center justify-center text-gray-400 active:scale-[0.98] transition-all",children:G==="grid"?d.jsx(_y,{className:"w-5 h-5"}):d.jsx(Ay,{className:"w-5 h-5"})})]}),d.jsxs("div",{className:ae("bg-dark-900 border border-white/5 rounded-xl p-3 md:p-2 mb-8 sticky top-36 md:top-20 z-30 shadow-xl backdrop-blur-md ring-1 ring-white/5 transition-all relative",!Ee&&"overflow-hidden",U?"block":"hidden md:block"),children:[!Ee&&d.jsx("div",{className:"absolute inset-0 z-50 bg-dark-900/60 backdrop-blur-[2px] flex items-center justify-center cursor-not-allowed",children:d.jsx(ii,{className:"w-4 h-4 text-white/50"})}),d.jsx("div",{className:ae(!Ee&&"blur-[2px] opacity-60 pointer-events-none select-none"),children:d.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center gap-3 md:gap-4 w-full",children:[d.jsxs("div",{className:"relative flex-shrink-0",children:[d.jsx(vN,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-500"}),d.jsx("input",{type:"text",placeholder:"SEARCH...",value:Ie,onChange:Z=>jt(Z.target.value),className:"w-full md:w-44 h-12 bg-black/20 border border-white/5 rounded-lg pl-8 pr-8 text-xs text-white placeholder-gray-500 focus:outline-none focus:border-brand/50 transition-all font-mono uppercase"}),Ie&&d.jsx("button",{onClick:()=>jt(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-white transition-colors",children:d.jsx(Sa,{className:"w-3.5 h-3.5"})})]}),Ee&&d.jsxs("button",{onClick:()=>fn(!st),className:ae("hidden md:flex px-3 md:px-4 h-12 rounded-lg items-center gap-2 transition-all border whitespace-nowrap",st?"bg-amber-500/10 border-amber-500 text-amber-500 shadow-[0_0_10px_rgba(245,158,11,0.2)]":"bg-white/5 border-transparent text-gray-500 hover:text-gray-300 hover:bg-white/10"),children:[d.jsx(Nr,{className:ae("w-3.5 h-3.5",st&&"fill-amber-500/20")}),d.jsx("span",{className:"font-teko text-lg md:text-xl uppercase tracking-wide leading-none pt-0.5",children:"Elite Picks"})]}),d.jsx("div",{className:"flex items-center gap-1 w-full md:w-auto overflow-x-auto md:overflow-visible pb-2 md:pb-0 no-scrollbar md:border-l md:border-white/10 md:pl-3",children:(Ee?Fx:["ALL","NFL","NBA","NHL"]).map(Z=>d.jsx("button",{onClick:()=>Ee&&ge(Z),className:ae("px-3 h-12 rounded-lg font-teko font-light text-xl tracking-wide transition-all uppercase whitespace-nowrap flex-shrink-0 flex items-center justify-center",pe===Z?"bg-brand text-black shadow-[0_0_15px_rgba(51,214,82,0.3)] font-normal":"text-gray-400 hover:text-white hover:bg-white/5",!Ee&&"opacity-60 cursor-not-allowed"),children:Z},Z))}),d.jsx("div",{className:"flex-1"}),d.jsx("div",{className:"flex gap-1 overflow-hidden md:border-l md:border-white/10 md:pl-3",children:(Ee?At:Array.from({length:6},(Z,ue)=>Ry(new Date,ue))).map((Z,ue)=>{const le=ZN(Z,xe);return d.jsxs("button",{onClick:()=>Ee&&we(Z),className:ae("px-1.5 md:px-2 h-12 rounded-lg flex flex-col items-center justify-center min-w-[35px] md:min-w-[45px] transition-all border flex-shrink-0",le?"bg-brand text-black shadow-[0_0_15px_rgba(51,214,82,0.3)] border-transparent":"border-transparent text-gray-500 hover:bg-white/5 hover:text-gray-300",!Ee&&"opacity-60 cursor-not-allowed"),children:[d.jsx("span",{className:ae("text-[8px] md:text-[9px] uppercase font-bold tracking-wider mb-[-2px]",le?"text-black":""),children:Wt(Z,"EEE")}),d.jsx("span",{className:ae("font-teko font-light text-lg md:text-xl leading-[0.8]",le?"text-black":""),children:Wt(Z,"d")})]},ue)})}),d.jsxs("div",{className:"hidden md:flex items-center gap-1 border border-white/10 rounded-lg p-1",children:[d.jsx("button",{onClick:()=>D("grid"),className:ae("p-2 rounded transition-all",G==="grid"?"bg-brand text-black":"text-gray-400 hover:text-white"),title:"Grid View",children:d.jsx(Ay,{className:"w-5 h-5"})}),d.jsx("button",{onClick:()=>D("table"),className:ae("p-2 rounded transition-all",G==="table"?"bg-brand text-black":"text-gray-400 hover:text-white"),title:"Table View",children:d.jsx(_y,{className:"w-5 h-5"})})]}),Ee?d.jsx("button",{onClick:Ft,className:"hidden md:flex px-3 h-12 rounded-lg items-center gap-2 transition-all border bg-white/5 border-transparent text-gray-500 hover:text-gray-300 hover:bg-white/10",title:"Download CSV",children:d.jsx(af,{className:"w-4 h-4"})}):d.jsxs("button",{onClick:()=>E("shop"),className:"hidden md:flex px-3 h-12 rounded-lg items-center gap-2 transition-all border bg-white/5 border-transparent text-gray-600 hover:text-gray-400 hover:bg-white/5 cursor-not-allowed",title:"Upgrade to download CSV",children:[d.jsx(ii,{className:"w-3 h-3"}),d.jsx(af,{className:"w-4 h-4"})]})]})})]}),(()=>{if(at.length===0)return d.jsxs("div",{className:"text-center py-20 border border-dashed border-white/10 rounded-xl bg-dark-900/50",children:[d.jsx(Ny,{className:"w-12 h-12 text-gray-600 mx-auto mb-4"}),d.jsx("h3",{className:"font-teko font-light text-3xl uppercase tracking-tight text-gray-400",children:"NO GAMES FOUND"}),d.jsx("p",{className:"text-gray-500 text-sm",children:st?`No ELITE picks available for ${Wt(xe,"MMM d")}.`:`No active games scheduled for ${Wt(xe,"MMM d")}.`}),Pt>0&&d.jsxs("p",{className:"text-gray-400 text-sm mt-4",children:[d.jsxs("a",{href:"/history",className:"text-blue-400 hover:text-blue-300 underline",children:[Pt," completed game",Pt===1?"":"s"," today"]})," ","— view results"]})]});const Z=at.slice(0,te),ue=at.length>te,le=at.length-te,ye=Ee?0:Math.max(0,at.length-5),ve=()=>ue?d.jsxs("div",{className:"w-full mt-4 py-3 flex items-center justify-center gap-2 text-gray-500",children:[d.jsx(jc,{className:"w-4 h-4 animate-spin"}),d.jsxs("span",{className:"font-mono text-xs uppercase tracking-wider",children:["Loading ",le," more..."]})]}):null,Pe=()=>Pt>0&&!pt?d.jsxs("div",{className:"mt-6 bg-brand/10 border border-brand/20 rounded-lg p-4 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-full bg-brand/20 flex items-center justify-center flex-shrink-0",children:d.jsx(Ny,{className:"w-4 h-4 text-brand"})}),d.jsxs("p",{className:"text-sm text-gray-300",children:[d.jsxs("a",{href:"/history",className:"text-brand hover:text-white underline font-medium",children:[Pt," game",Pt===1?"":"s"," completed today"]})," ","— view results in history"]})]}),d.jsx("button",{onClick:()=>Et(!0),className:"text-gray-400 hover:text-white transition-colors p-1","aria-label":"Dismiss",children:d.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):null;return G==="table"?d.jsxs(d.Fragment,{children:[d.jsx(G4,{games:Z,predictions:f,propsPredictions:y,user:a,isAdmin:la,hasFullAccess:Ee||!1,onNavigateShop:()=>E("shop"),onAdminInit:kn,isNativeApp:gn,isAndroid:kc}),d.jsx(ve,{}),d.jsx(Pe,{}),ye>0&&!ue&&d.jsxs("div",{className:"mt-6 bg-gradient-to-r from-dark-900 to-dark-800 border border-white/10 rounded-xl p-6 text-center flex flex-col items-center justify-center gap-4 shadow-xl",children:[d.jsxs("h3",{className:"font-teko font-light text-3xl text-white uppercase tracking-wide",children:["Unlock ",ye," more matchups today"]}),d.jsx("button",{onClick:()=>E("shop"),className:"px-8 py-3 bg-brand text-black font-teko text-xl uppercase rounded hover:bg-white transition-colors shadow-lg shadow-brand/10",children:"Upgrade Plan"})]})]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Z.map(($e,Nt)=>!Ee&&Nt>=5?d.jsx(V4,{game:$e,onNavigateShop:()=>E("shop")},$e.id):d.jsx(D3,{game:$e,prediction:f[$e.id],propsPrediction:y[$e.id],user:a,isAdmin:la,hasFullAccess:Ee||!1,onAdminInit:kn,onAdminFix:ne,onDelete:he,onNavigateShop:()=>E("shop")},$e.id))}),d.jsx(ve,{}),d.jsx(Pe,{}),ye>0&&!ue&&d.jsxs("div",{className:"mt-6 bg-gradient-to-r from-dark-900 to-dark-800 border border-white/10 rounded-xl p-6 text-center flex flex-col items-center justify-center gap-4 shadow-xl",children:[d.jsxs("h3",{className:"font-teko font-light text-3xl text-white uppercase tracking-wide",children:["Unlock ",ye," more matchups today"]}),d.jsx("button",{onClick:()=>E("shop"),className:"px-8 py-3 bg-brand text-black font-teko text-xl uppercase rounded hover:bg-white transition-colors shadow-lg shadow-brand/10",children:"Upgrade Plan"})]})]})})(),d.jsxs("div",{className:"md:hidden mt-8 mb-8 pt-8 border-t border-white/5 w-full",children:[_t.length>0&&d.jsxs("div",{className:"mb-6",children:[d.jsxs("h3",{className:"text-gray-500 font-mono text-xs uppercase tracking-widest mb-3 flex items-center gap-2",children:[d.jsx(lN,{className:"w-3 h-3 text-brand"})," Active Slate Breakdown"]}),d.jsx("div",{className:"flex flex-wrap gap-2",children:(Ee?_t:[["NFL",3],["NBA",5],["NHL",2]]).map(([Z,ue])=>d.jsxs("button",{onClick:()=>Ee&&ge(Z),className:ae("px-2.5 py-1 rounded border flex items-center gap-1.5 transition-all",pe===Z?"bg-brand/10 border-brand/30 text-white":"bg-white/[0.03] border-white/5 text-gray-400",!Ee&&"opacity-60 cursor-not-allowed"),children:[d.jsx("span",{className:"font-teko text-lg leading-none pt-0.5",children:ue}),d.jsx("span",{className:"text-[9px] font-mono uppercase tracking-wider opacity-80",children:Z})]},Z))})]}),d.jsxs("h3",{className:"text-gray-500 font-mono text-xs uppercase tracking-widest mb-4 flex items-center gap-2",children:[d.jsx(tf,{className:"w-3 h-3 text-brand"})," System Performance Stats"]}),be()]})]}),d.jsxs(J.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center min-h-[80vh]",children:d.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-t-brand border-r-transparent border-b-transparent border-l-transparent animate-spin"})}),children:[q==="golf"&&d.jsx(OO,{user:a,onNavigateShop:()=>E("shop"),hasFullAccess:Ee||!1}),q==="props"&&d.jsx(RO,{user:a,onNavigateShop:()=>E("shop"),hasFullAccess:Ee||!1}),q==="shop"&&d.jsx(SO,{user:a,onUpdate:async()=>
462{if(a){const Z=await va(a.id);Z&&i(Z)}if(gn){const Z=await ef();j(Z)}},onNavigateLogin:()=>E("login"),onPostPurchaseLogin:Z=>{i(Z),j(!1),E("dashboard")},onNavigate:Ut}),q==="account"&&a&&d.jsx(TO,{user:a,onUpdate:async()=>{const Z=await va(a.id);Z&&i(Z)},onLogout:lt,onNavigate:Ut}),q==="account"&&!a&&d.jsx(ux,{onLogin:async Z=>{i(Z),gn&&(await Nc(Z.id),j(!1)),E("account")}}),q==="history"&&d.jsx(EO,{currentUser:a||{isAdmin:!1},games:e,globalStats:x,isNativeApp:gn,hasFullAccess:Ee||!1,onNavigateShop:()=>E("shop")}),q==="admin"&&(a==null?void 0:a.isAdmin)&&d.jsx(NO,{currentUser:a})]}),(q==="dashboard"||q==="props")&&d.jsx(Y4,{user:a,onNavigateShop:()=>E("shop"),isAndroid:kc})]})})})},BO=async()=>{if(It.isNativePlatform())try{await Cc.setStyle({style:Tc.Dark}),await Cc.setBackgroundColor({color:"#050505"})}catch(e){console.error("StatusBar error:",e)}};BO();It.isNativePlatform()&&(document.body.classList.add("native-app"),It.getPlatform()==="android"&&document.body.classList.add("android-app"));const D1=document.getElementById("root");if(!D1)throw new Error("Could not find root element to mount to");const zO=nE.createRoot(D1);zO.render(d.jsx(sn.StrictMode,{children:d.jsx(UO,{})}));export{eR as $,EE as A,KO as B,nf as C,af as D,ii as E,bs as F,tf as G,Ll as H,iN as I,UN as J,Lx as K,jc as L,Nr as M,vN as N,_y as O,AE as P,ZN as Q,sn as R,N1 as S,Wc as T,nN as U,Ny as V,si as W,Sa as X,MN as Y,xs as Z,ZO as _,VO as a,JO as a0,ia as a1,$a as a2,Vx as a3,Kc as a4,Dk as a5,Dy as a6,HO as a7,PO as a8,Dc as a9,tA as aA,K4 as aB,lR as aC,Ay as aD,rm as aE,Ct as aF,Er as aG,Al as aH,kl as aI,Ga as aJ,BE as aK,vr as aL,Nl as aM,Ix as aN,Rc as aO,A4 as aP,If as aQ,Ax as aR,jx as aS,Ex as aT,HN as aa,$E as ab,Fy as ac,Cy as ad,Ux as ae,Fc as af,Zt as ag,A1 as ah,Ty as ai,Bx as aj,ky as ak,vb as al,Rl as am,k4 as an,tR as ao,nR as ap,aR as aq,rR as ar,OE as as,VE as at,Mx as au,GN as av,Dl as aw,Yx as ax,jy as ay,Cb as az,dR as b,_e as c,qa as d,ae as e,hR as f,oR as g,fN as h,zl as i,d as j,Wt as k,Nc as l,I4 as m,U4 as n,De as o,v3 as p,uR as q,J as r,L4 as s,sR as t,cR as u,iR as v,Ry as w,Il as x,QO as y,XO as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.