PageSourceSearch

https://www.virae.ai/_next/static/chunks/4b1d0c78b7b4c4d8.js?dpl=dpl_PKoK7wvgMjFDVeikmQzLWyxwYXF3

js virae.ai collected 2026-10-05 13:15:04 UTC 50,571 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,634012,e=>{"use strict";let t=new Intl.DateTimeFormat("en-US",{timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),r={bitcoin:"btc",btc:"btc",doge:"doge",dogecoin:"doge",ethereum:"eth",eth:"eth",solana:"sol",sol:"sol",ripple:"xrp",xrp:"xrp",bnb:"bnb",binancecoin:"bnb"};function n(e){let t=String(e||"").trim().toLowerCase();return t?r[t]??t:""}function o(e){switch(e){case"5m":return 300;case"15m":return 900;case"1h":return 3600;case"4h":return 14400;case"daily":return 86400}}function i(e){let r=t.formatToParts(new Date(e)),n=e=>{let t=Number(r.find(t=>t.type===e)?.value);if(!Number.isFinite(t))throw Error(`Failed to read ET ${e} for recurring crypto round alignment`);return t};return{year:n("year"),month:n("month"),day:n("day"),hour:n("hour"),minute:n("minute")}}function a(e,t=Math.floor(Date.now()/1e3)){let r=Math.floor(t),n=o(e);if("daily"!==e)return Math.floor(r/n)*n;let s=function(e){let t=Date.UTC(e.year,e.month-1,e.day,16,0,0);for(let r=-2;r<=2;r+=1){let n=t+60*r*6e4,o=i(n);if(o.year===e.year&&o.month===e.month&&o.day===e.day&&12===o.hour&&0===o.minute)return Math.floor(n/1e3)}throw Error(`Failed to resolve ET noon boundary for ${e.year}-${e.month}-${e.day}`)}(i(1e3*r));return r<s?s-n:s}function s(e){let t=n(e.asset),r=Math.floor(e.roundStartSec);return t&&Number.isFinite(r)&&!(r<=0)&&"daily"!==e.interval&&"1h"!==e.interval?`${t}-updown-${e.interval}-${r}`:null}function l(e){let t=n(e.asset),r=Math.floor(e.roundStartSec);return t&&Number.isFinite(r)&&!(r<=0)&&"daily"!==e.interval?`${t}-updown-${e.interval}-${r}`:null}function u(e){if("daily"===e.interval)return[];let t=o(e.interval),r=Math.floor(e.anchorRoundStartSec);if(!Number.isFinite(r)||r<=0)return[];let n=[];for(let o=-Math.max(0,e.pastCount);o<=Math.max(0,e.futureCount);o+=1){let i=r+o*t,a=l({asset:e.asset,interval:e.interval,roundStartSec:i});a&&n.push({slug:a,roundStartSec:i})}return n}function c(e){switch(e){case"5m":return[{key:"1s",label:"Live"},{key:"5m",label:"Round"},{key:"15m",label:"15m"},{key:"1h",label:"1h"},{key:"4h",label:"4h"},{key:"1d",label:"D"}];case"15m":return[{key:"1m",label:"Live"},{key:"15m",label:"Round"},{key:"1h",label:"1h"},{key:"4h",label:"4h"},{key:"1d",label:"D"}];case"1h":return[{key:"5m",label:"Live"},{key:"1h",label:"Round"},{key:"4h",label:"4h"},{key:"1d",label:"D"}];case"4h":return[{key:"15m",label:"Live"},{key:"4h",label:"Round"},{key:"1d",label:"D"}];case"daily":return[{key:"1h",label:"Live"},{key:"4h",label:"4h"},{key:"1d",label:"Round"}]}}function d(e,t="oracle"){let r=c(e);return"oracle"===t?r:"5m"===e?[{key:"1m",label:"1m"},{key:"5m",label:"5m"},{key:"15m",label:"15m"},{key:"1h",label:"1h"},{key:"4h",label:"4h"},{key:"1d",label:"D"}]:c(e).map(e=>({key:e.key,label:function(e){switch(e){case"1s":return"1s";case"1m":return"1m";case"5m":return"5m";case"15m":return"15m";case"1h":return"1h";case"4h":return"4h";case"1d":return"D"}}(e.key)}))}function p(e,t){let r=d(e,t);return r[1]?.key??r[0].key}function f(e){return d(e)[0]?.key??p(e,"oracle")}function m(e,t,r=Math.floor(Date.now()/1e3)){if(!Array.isArray(e)||0===e.length)return null;let n=o(t),i=Math.floor(r),a=e.filter(e=>Number.isFinite(e.roundStartSec)&&e.roundStartSec>0);if(!a.length)return null;let s=(e,t)=>(Number(t.volume)||0)-(Number(e.volume)||0),l=a.filter(e=>e.roundStartSec<=i&&i<e.roundStartSec+n).sort((e,t)=>t.roundStartSec!==e.roundStartSec?t.roundStartSec-e.roundStartSec:s(e,t));if(l.length)return l[0];let u=a.filter(e=>e.roundStartSec<=i).sort((e,t)=>t.roundStartSec!==e.roundStartSec?t.roundStartSec-e.roundStartSec:s(e,t));return u.length?u[0]:a.filter(e=>e.roundStartSec>i).sort((e,t)=>e.roundStartSec!==t.roundStartSec?e.roundStartSec-t.roundStartSec:s(e,t))[0]??null}function y(e){return n(e).toUpperCase()}function h(e){let t=n(e);switch(t){case"btc":return"Bitcoin";case"doge":return"Dogecoin";case"eth":return"Ethereum";case"sol":return"Solana";case"xrp":return"XRP";case"bnb":return"BNB";default:return t.toUpperCase()}}function g(e,t){let r=decodeURIComponent(String(e||"")).trim().toLowerCase();if(!r)return null;let o=r.match(/^([a-z0-9]+)-updown-(5m|15m|1h|4h|daily)-(\d+)$/i);if(o){let e=n(String(o[1]||"")),t=String(o[2]||"").toLowerCase(),i=Number(o[3]);return e&&Number.isFinite(i)&&!(i<=0)?{slug:r,asset:e,interval:t,roundStartSec:i}:null}let i=r.match(/^([a-z0-9]+)-up-or-down-[a-z]+-\d{1,2}(?:-\d{4})?-\d{1,2}(?:am|pm)-et$/i);if(i){let e=n(String(i[1]||"")),o=Date.parse(String(t?.endDate||"")),a=Number.isFinite(o)?Math.floor(o/1e3)-3600:null;return e?{slug:r,asset:e,interval:"1h",roundStartSec:a}:null}let a=r.match(/^([a-z0-9]+)-up-or-down-(?:on-)?[a-z]+-\d{1,2}(?:-\d{4})?$/i);if(a){let e=n(String(a[1]||"")),o=Date.parse(String(t?.endDate||"")),i=Number.isFinite(o)?Math.floor(o/1e3)-86400:null;return e?{slug:r,asset:e,interval:"daily",roundStartSec:i}:null}return null}e.s(["buildRecurringCryptoAliasSlug",()=>l,"buildRecurringCryptoAliasWindow",()=>u,"buildRecurringCryptoDirectSlug",()=>s,"getDefaultRecurringCryptoChartRangeForMode",()=>p,"getLiveRecurringCryptoChartRange",()=>f,"getRecurringCryptoChartRangeTabs",()=>d,"getRecurringCryptoCurrentRoundStartSec",()=>a,"getRecurringCryptoDisplayName",()=>h,"getRecurringCryptoDisplaySymbol",()=>y,"getRecurringCryptoIntervalDurationSec",()=>o,"normalizeRecurringCryptoAsset",()=>n,"parseRecurringCryptoSlug",()=>g,"pickPreferredRecurringRound",()=>m])},519455,5166,e=>{"use strict";var t=e.i(86604),r=e.i(333334),n=e.i(950888),o=Symbol.for("react.lazy"),i=r[" use ".trim().toString()];function a(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===o&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function s(e){var o;let s,l=(o=e,(s=r.forwardRef((e,t)=>
1{let{children:o,...s}=e;if(a(o)&&"function"==typeof i&&(o=i(o._payload)),r.isValidElement(o)){var l;let e,i,a=(l=o,(i=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(i=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),u=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(s,o.props);return o.type!==r.Fragment&&(u.ref=t?(0,n.composeRefs)(t,a):a),r.cloneElement(o,u)}return r.Children.count(o)>1?r.Children.only(null):null})).displayName=`${o}.SlotClone`,s),u=r.forwardRef((e,n)=>{let{children:o,...s}=e;a(o)&&"function"==typeof i&&(o=i(o._payload));let u=r.Children.toArray(o),d=u.find(c);if(d){let e=d.props.children,o=u.map(t=>t!==d?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,t.jsx)(l,{...s,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,o):null})}return(0,t.jsx)(l,{...s,ref:n,children:o})});return u.displayName=`${e}.Slot`,u}var l=s("Slot"),u=Symbol("radix.slottable");function c(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}e.s(["Slot",()=>l,"createSlot",()=>s],5166);var d=e.i(294237),p=e.i(975157);let f=(0,d.cva)("inline-flex cursor-pointer items-center justify-center whitespace-nowrap rounded-lg text-sm font-semibold ring-offset-background transition-[color,background-color,border-color,box-shadow,transform] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-45 motion-reduce:transition-none",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-[0_12px_28px_-18px_hsl(var(--primary)/0.8)] hover:-translate-y-px hover:bg-primary/92 hover:shadow-[0_16px_34px_-18px_hsl(var(--primary)/0.85)] active:translate-y-0 motion-reduce:hover:translate-y-0",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-ui-border-default bg-ui-surface-base text-ui-text-secondary hover:border-ui-border-strong hover:bg-ui-surface-raised hover:text-ui-text-primary",secondary:"border border-ui-border-subtle bg-secondary/80 text-secondary-foreground hover:border-ui-border-default hover:bg-secondary",ghost:"text-ui-text-secondary hover:bg-accent/80 hover:text-ui-text-primary",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),m=r.forwardRef(({className:e,variant:r,size:n,asChild:o=!1,...i},a)=>(0,t.jsx)(o?l:"button",{className:(0,p.cn)(f({variant:r,size:n,className:e})),ref:a,...i}));m.displayName="Button",e.s(["Button",()=>m],519455)},7284,e=>{"use strict";function t(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n}e.s(["clsx",()=>t,"default",0,t])},204311,e=>{"use strict";var t=e.i(333334);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var o={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"};let i=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...o,width:n,height:n,stroke:e,strokeWidth:a?24*Number(i)/Number(n):i,className:r("lucide",s),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),a=(e,o)=>{let a=(0,t.forwardRef)(({className:a,...s},l)=>(0,t.createElement)(i,{ref:l,iconNode:o,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...s}));return a.displayName=n(e),a};e.s(["default",()=>a],204311)},950888,e=>{"use strict";var t=e.i(333334);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let n=!1,o=e.map(e=>
1{let o=r(e,t);return n||"function"!=typeof o||(n=!0),o});if(n)return()=>{for(let t=0;t<o.length;t++){let n=o[t];"function"==typeof n?n():r(e[t],null)}}}}function o(...e){return t.useCallback(n(...e),e)}e.s(["composeRefs",()=>n,"useComposedRefs",()=>o])},294237,e=>{"use strict";var t=e.i(7284);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.clsx;e.s(["cva",0,(e,t)=>o=>{var i;if((null==t?void 0:t.variants)==null)return n(e,null==o?void 0:o.class,null==o?void 0:o.className);let{variants:a,defaultVariants:s}=t,l=Object.keys(a).map(e=>{let t=null==o?void 0:o[e],n=null==s?void 0:s[e];if(null===t)return null;let i=r(t)||r(n);return a[e][i]}),u=o&&Object.entries(o).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return n(e,l,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...s,...u}[t]):({...s,...u})[t]===r})?[...e,r,n]:e},[]),null==o?void 0:o.class,null==o?void 0:o.className)}])},733152,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},468510,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(333334);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=i(e,n)),t&&(o.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},667024,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},124410,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(744066)._(e.r(667024)),a=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${o}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},461528,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return P},MissingStaticPage:function(){return S},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return y},ST:function(){return h},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return m}
1,normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return k}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,h=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class S extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class P extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},847469,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(461528),o=e.r(765891);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},818389,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},286770,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(744066),a=e.r(86604),s=i._(e.r(333334)),l=e.r(124410),u=e.r(362428),c=e.r(468510),d=e.r(461528),p=e.r(220927);e.r(733152);let f=e.r(252489),m=e.r(847469),y=e.r(69207);function h(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function g(t){var r;let n,o,i,[l,g]=(0,s.useOptimistic)(f.IDLE_LINK_STATUS),v=(0,s.useRef)(null),{href:S,as:P,children:k,prefetch:w=null,passHref:A,replace:C,shallow:R,scroll:E,onClick:x,onMouseEnter:N,onTouchStart:T,legacyBehavior:$=!1,onNavigate:I,ref:O,unstable_dynamicOnHover:L,...M}=t;n=k,$&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let F=s.default.useContext(u.AppRouterContext),_=!1!==w,U=!1!==w?null===(r=w)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:j,as:D}=s.default.useMemo(()=>{let e=h(S);return{href:e,as:P?h(P):e}},[S,P]);if($){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=s.default.Children.only(n)}let z=$?o&&"object"==typeof o&&o.ref:O,B=s.default.useCallback(e=>(null!==F&&(v.current=(0,f.mountLinkInstance)(e,j,F,U,_,g)),()=>{v.current&&((0,f.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,f.unmountPrefetchableInstance)(e)}),[_,j,F,U,g]),V={ref:(0,c.useMergedRef)(B,z),onClick(t){$||"function"!=typeof x||x(t),$&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!F||t.defaultPrevented||function(t,r,n,o,i,a,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;
1if(!(0,m.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(323891);s.default.startTransition(()=>{d(n||r,i?"replace":"push",a??!0,o.current)})}}(t,j,D,v,C,E,I)},onMouseEnter(e){$||"function"!=typeof N||N(e),$&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),F&&_&&(0,f.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){$||"function"!=typeof T||T(e),$&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),F&&_&&(0,f.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(D)?V.href=D:$&&!A&&("a"!==o.type||"href"in o.props)||(V.href=(0,p.addBasePath)(D)),i=$?s.default.cloneElement(o,V):(0,a.jsx)("a",{...M,...V,children:n}),(0,a.jsx)(b.Provider,{value:l,children:i})}e.r(818389);let b=(0,s.createContext)(f.IDLE_LINK_STATUS),v=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},116309,e=>{"use strict";var t=e.i(634012);function r(e){let t=String(e||"").trim().toLowerCase();return"polymarket"===t?"polymarket":"predictfun"===t?"predictfun":null}function n(e){let r=decodeURIComponent(String(e||"")).trim().toLowerCase();return r?(0,t.parseRecurringCryptoSlug)(r)||/^([a-z0-9]+)-up-or-down-[a-z]+-\d{1,2}(?:-\d{4})?-\d{1,2}(?:am|pm)-et$/i.test(r)||/^([a-z0-9]+)-up-or-down-(?:on-)?[a-z]+-\d{1,2}(?:-\d{4})?$/i.test(r)?"crypto-recurring":r.startsWith("nba-")?"sports-nba":r.startsWith("soccer-")?"sports-soccer":"event":null}function o(e){let t=String(e.slug||"").trim(),o=encodeURIComponent(t);if("predictfun"===r(e.venue))return`/event/predictfun/${o}`;let i=n(t);return"crypto-recurring"===i?`/crypto/${o}`:"sports-nba"===i?`/sports/nba/${o}`:"sports-soccer"===i?`/sports/soccer/${o}`:`/event/${o}`}function i(e){let t=encodeURIComponent(String(e.slug||"").trim());return"predictfun"===r(e.venue)?`https://predict.fun/market/${t}`:`https://polymarket.com/event/${t}`}function a(e){let t=r(e.venue),o=String(e.marketSlug||"").trim(),i=String(e.eventSlug||"").trim();if("predictfun"===t)return i||o||null;let a=n(i);if(a&&"event"!==a)return i;let s=n(o);return s&&"event"!==s?o:o||i||null}e.s(["buildVenueEventHref",()=>o,"buildVenueExternalEventHref",()=>i,"normalizeTradingVenue",()=>r,"resolveVenueEventRouteSlug",()=>a])},469655,e=>{"use strict";let t="predictdog.deepLinkIntentCode";function r(e){let t=String(e??"").trim();return/^[A-Za-z0-9_-]{8,64}$/.test(t)?t:""}function n(e){let n=r(e);n&&window.localStorage.setItem(t,n)}function o(){return r(window.localStorage.getItem(t))}function i(){window.localStorage.removeItem(t)}e.s(["clearStoredDeepLinkIntentCode",()=>i,"getStoredDeepLinkIntentCode",()=>o,"storeDeepLinkIntentCode",()=>n])},228426,878820,e=>{"use strict";var t=e.i(333334),r=e.i(927828),n=e.i(311492),o=e.i(215804),i=class extends n.Removable{#e;#t;#r;#n;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||a(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#o({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,o.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,i=!this.#n.canStart();try{if(n)t();else{this.#o({type:"pending",variables:e,isPaused:i}),this.#r.config.onMutate&&await this.#r.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:i})}let o=await this.#n.start();return await this.#r.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#r.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#o({type:"success",data:o}),o}catch(t){try{await this.#r.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#o({type:"error",error:t}),t}finally{this.#r.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",()=>i,"getDefaultState",()=>a],878820);var s=e.i(66081),l=e.i(320184),u=class extends s.Subscribable{#e;#i=void 0;#a;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.hashKey)(t.mutationKey)!==(0,l.hashKey)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#u(e)}getCurrentResult(){return this.#i}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#u()}mutate(e,t){return this.#s=t,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(e)}#l(){let e=this.#a?.state??a();this.#i={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#u(e){r.notifyManager.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#i.variables,r=this.#i.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,r,n)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(e.data,null,t,r,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,r,n)}catch(e){Promise.reject(e)}try{this.#s.onSettled?.(void 0,e.error,t,r,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#i)})})}},c=e.i(629930);function d(e,n){let o=(0,c.useQueryClient)(n),[i]=t.useState(()=>new u(o,e));t.useEffect(()=>{i.setOptions(e)},[i,e]);let a=t.useSyncExternalStore(t.useCallback(e=>i.subscribe(r.notifyManager.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=t.useCallback((e,t)=>{i.mutate(e,t).catch(l.noop)},[i]);if(a.error&&(0,l.shouldThrowError)(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}e.s(["useMutation",()=>d],228426)},225784,e=>{"use strict";e.s(["PORTFOLIO_ANALYTICS_REFRESH_MS",0,6e4,"PORTFOLIO_VALUE_REFRESH_MS",0,15e3,"portfolioQueryKeys",0,{all:["portfolio"],balances:(e,t="polymarket")=>["portfolio",t,"balances",e.toLowerCase()],positions:(e,t="polymarket")=>["portfolio",t,"positions",e.toLowerCase()],claimable:(e,t="polymarket")=>["portfolio",t,"claimable",e.toLowerCase()],analytics:e=>["portfolio","analytics",e.toLowerCase()],feeAnalytics:(e,t,r,n)=>["portfolio","fee-analytics",e.toLowerCase(),t,r,n],pnlHistory:e=>["portfolio","pnl-history",e.toLowerCase()],openOrders:(e="polymarket")=>["portfolio",e,"open-orders"],summary:(e,t="polymarket")=>["portfolio",t,"summary",e.toLowerCase()]}])},18343,e=>{"use strict";function t(e){if(e?.redeemable!==!0)return 0;let t="number"==typeof e?.payoutValue&&Number.isFinite(e.payoutValue)?e.payoutValue:null;if(null!=t)return t>0?t:0;if(e?.resolutionStatus==="LOST")return 0;let r="number"==typeof e?.size&&Number.isFinite(e.size)?e.size:0;return r<=0?0:r}function r(e){if(e?.redeemable!==!0)return!1;if(e?.venue==="predict")return!!(("string"==typeof e.conditionId?e.conditionId.trim():"")&&(1===e.indexSet||2===e.indexSet)&&t(e)>0);let r="string"==typeof e?.marketId?e.marketId.trim():"",n="string"==typeof e?.outcome?e.outcome.trim():"";return!!r&&!!n&&t(e)>0}function n(e){let t="number"==typeof e?.totalBought&&Number.isFinite(e.totalBought)?e.totalBought:null;if(null!=t)return t;
1let r="number"==typeof e?.size&&Number.isFinite(e.size)?e.size:null,n="number"==typeof e?.avgPrice&&Number.isFinite(e.avgPrice)?e.avgPrice:null;return null==r||null==n?null:r*n}function o(e){let r="number"==typeof e?.cashPnl&&Number.isFinite(e.cashPnl)?e.cashPnl:null;if(e?.resolutionStatus==="WON"&&null!=r||e?.resolutionStatus!=="WON"&&e?.resolutionStatus!=="LOST"&&null!=r)return r;let o=t(e),i=n(e);return(e?.resolutionStatus==="WON"||e?.resolutionStatus==="LOST")&&null!=i||null!=i?o-i:null}function i(e){return e.reduce((e,r)=>e+t(r),0)}e.s(["getClaimableCostBasis",()=>n,"getClaimableNetValue",()=>o,"getClaimablePayoutValue",()=>t,"getClaimablePayoutsTotal",()=>i,"isClaimablePositionActionable",()=>r])},530574,e=>{"use strict";function t(e,t){return Math.abs(e).toLocaleString("en-US",{minimumFractionDigits:t,maximumFractionDigits:t})}function r(e){if(null==e||!Number.isFinite(e))return"$0.00";let r=Number(e.toFixed(2)),n=r>0?"+":r<0?"-":"";return`${n}$${t(r,2)}`}function n(e){return null!=e&&Number.isFinite(e)?`$${t(e,2)}`:"$0.00"}function o(e){if(null==e||!Number.isFinite(e))return"—";let r=Math.abs(e);return 0===r?"$0.00":r>=.01?`$${t(r,2)}`:r>=.001?`$${r.toFixed(4).replace(/0+$/,"").replace(/\.$/,"")}`:r>=1e-4?`$${r.toFixed(5).replace(/0+$/,"").replace(/\.$/,"")}`:`$${r.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`}function i(e,t){return Number.isFinite(e)&&Number.isFinite(t)&&!(t<=0)?Math.floor(e/t)*t:e}function a(e){let t=String(e.venue||"unknown").toLowerCase(),r=String(e.walletAddress||"unknown").toLowerCase(),n=String(e.marketId||"").trim().toLowerCase(),o=String(e.outcome||"").trim().toLowerCase();if(n&&o)return`${t}:${r}:${n}:${o}`;let i=String(e.asset||"").trim().toLowerCase();if(i)return`${t}:${r}:${i}`;let a=String(e.title||"").trim().toLowerCase();return a&&o?`${t}:${r}:t:${a}:${o}`:`${t}:${r}:unknown-position`}function s(e){let t=String(e.venue||"polymarket").trim().toLowerCase(),r=String(e.marketId||"").trim().toLowerCase(),n=String(e.outcome||"").trim().toLowerCase(),o=String(e.asset||"").trim().toLowerCase();if(r&&n&&o)return`${t}:${r}:${n}:${o}`;if(r&&n)return`${t}:${r}:${n}`;if(o)return`${t}:${o}`;let i=String(e.title||"").trim().toLowerCase();return i&&n?`${t}:t:${i}:${n}`:`${t}:unknown-claimable`}e.s(["floorToStep",()=>i,"formatUsd",()=>r,"formatUsdUnsigned",()=>n,"formatUsdUnsignedAdaptive",()=>o,"getClaimableRowKey",()=>s,"getPositionRowKey",()=>a])},78245,562957,126717,482041,e=>{"use strict";var t=e.i(652238);function r(e){return!!e&&"object"==typeof e}function n(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"==typeof e){if(0===e.trim().length)return null;let t=Number(e);return Number.isFinite(t)?t:null}return null}function o(e,t){let n=r(e)?e:{};return{status:"ok"===n.status||"stale"===n.status||"unavailable"===n.status?n.status:t,updatedAt:"string"==typeof n.updatedAt?n.updatedAt:null}}function i(e){if(!r(e)||"ARMED"!==e.status&&"TRIGGERED"!==e.status)return null;let t="number"==typeof e.takeProfitPrice?e.takeProfitPrice:void 0,n="number"==typeof e.stopLossPrice?e.stopLossPrice:void 0;return null==t&&null==n?null:{strategyExitPlanId:"number"==typeof e.strategyExitPlanId?e.strategyExitPlanId:void 0,status:e.status,takeProfitPrice:t,stopLossPrice:n,armedAt:"string"==typeof e.armedAt?e.armedAt:void 0,filledSharesSnapshot:"number"==typeof e.filledSharesSnapshot?e.filledSharesSnapshot:void 0,childOrderStatus:"string"==typeof e.childOrderStatus?e.childOrderStatus:void 0,errorMessage:"string"==typeof e.errorMessage?e.errorMessage:void 0,retryAttemptCount:"number"==typeof e.retryAttemptCount?e.retryAttemptCount:void 0,retryNotBefore:"string"==typeof e.retryNotBefore?e.retryNotBefore:void 0}}function a(e){return r(e)&&("EXPIRED"===e.status||"FAILED"===e.status||"FILLED"===e.status||"CANCELED"===e.status)?{strategyExitPlanId:"number"==typeof e.strategyExitPlanId?e.strategyExitPlanId:void 0,status:e.status,childOrderStatus:"string"==typeof e.childOrderStatus?e.childOrderStatus:void 0,errorMessage:"string"==typeof e.errorMessage?e.errorMessage:void 0,completedAt:"string"==typeof e.completedAt?e.completedAt:void 0,armedAt:"string"==typeof e.armedAt?e.armedAt:void 0,takeProfitPrice:"number"==typeof e.takeProfitPrice?e.takeProfitPrice:void 0,stopLossPrice:"number"==typeof e.stopLossPrice?e.stopLossPrice:void 0,filledSharesSnapshot:"number"==typeof e.filledSharesSnapshot?e.filledSharesSnapshot:void 0}:null}function s(e){if(!r(e))return null;let t="number"==typeof e.strategyExecutionId?e.strategyExecutionId:null,n="string"==typeof e.lotId?e.lotId:null,o="string"==typeof e.tokenId?e.tokenId:null,
1s="number"==typeof e.filledShares?e.filledShares:null,l="number"==typeof e.remainingShares?e.remainingShares:null;return n&&o&&t&&null!=s&&null!=l?{lotId:n,strategyExecutionId:t,entryTradeOrderId:"number"==typeof e.entryTradeOrderId?e.entryTradeOrderId:void 0,entryOrderId:"string"==typeof e.entryOrderId?e.entryOrderId:void 0,tokenId:o,marketId:"string"==typeof e.marketId?e.marketId:void 0,outcomeLabel:"string"==typeof e.outcomeLabel?e.outcomeLabel:void 0,origin:"MANUAL_POSITION"===e.origin?"MANUAL_POSITION":"AUTO_ORDER"===e.origin?"AUTO_ORDER":void 0,status:"ACTIVE"===e.status||"INACTIVE"===e.status||"DELETED"===e.status||"FILLED"===e.status?e.status:void 0,filledShares:s,allocatedShares:"number"==typeof e.allocatedShares?e.allocatedShares:void 0,remainingShares:l,entryAvgPrice:"number"==typeof e.entryAvgPrice?e.entryAvgPrice:void 0,entryCost:"number"==typeof e.entryCost?e.entryCost:void 0,entryIntentUsd:"number"==typeof e.entryIntentUsd?e.entryIntentUsd:void 0,entryExecutionUsd:"number"==typeof e.entryExecutionUsd?e.entryExecutionUsd:void 0,createdAt:"string"==typeof e.createdAt?e.createdAt:void 0,activeExitPlan:i(e.activeExitPlan)??void 0,latestTerminalExitPlan:a(e.latestTerminalExitPlan)??void 0}:null}function l(e){if(!r(e))return null;let t="BUY"===e.side||"SELL"===e.side?e.side:void 0;return{venue:"predict"===e.venue?"predict":"polymarket",cancelActionType:"pm-cancel"===e.cancelActionType?"pm-cancel":"predict-cancel"===e.cancelActionType?"predict-cancel":"none",canCancel:!0===e.canCancel,orderId:"string"==typeof e.orderId?e.orderId:void 0,makerAddress:"string"==typeof e.makerAddress?e.makerAddress:void 0,marketId:"string"==typeof e.marketId?e.marketId:void 0,tokenId:"string"==typeof e.tokenId?e.tokenId:void 0,marketSlug:"string"==typeof e.marketSlug?e.marketSlug:void 0,eventSlug:"string"==typeof e.eventSlug?e.eventSlug:void 0,marketQuestion:"string"==typeof e.marketQuestion?e.marketQuestion:void 0,outcomeLabel:"string"==typeof e.outcomeLabel?e.outcomeLabel:void 0,outcomeIndex:"number"==typeof e.outcomeIndex?e.outcomeIndex:null,side:t,price:null==e.price?null:Number(e.price),originalSize:null==e.originalSize?null:Number(e.originalSize),remainingSize:null==e.remainingSize?null:Number(e.remainingSize),takeProfitPrice:null==e.takeProfitPrice?null:Number(e.takeProfitPrice),stopLossPrice:null==e.stopLossPrice?null:Number(e.stopLossPrice),strategyIntentStatus:"string"==typeof e.strategyIntentStatus?e.strategyIntentStatus:void 0,createdAt:"string"==typeof e.createdAt?e.createdAt:void 0,expiresAt:"string"==typeof e.expiresAt?e.expiresAt:void 0}}function u(e){return r(e)?{venue:"predict"===e.venue?"predict":"polymarket",asset:"string"==typeof e.asset?e.asset:void 0,marketId:"string"==typeof e.marketId?e.marketId:void 0,title:"string"==typeof e.title?e.title:void 0,outcome:"string"==typeof e.outcome?e.outcome:void 0,size:"number"==typeof e.size?e.size:void 0,avgPrice:"number"==typeof e.avgPrice?e.avgPrice:void 0,currentPrice:"number"==typeof e.currentPrice?e.currentPrice:void 0,cashPnl:"number"==typeof e.cashPnl?e.cashPnl:void 0,totalBought:"number"==typeof e.totalBought?e.totalBought:void 0,marketSlug:"string"==typeof e.marketSlug?e.marketSlug:void 0,redeemable:!0===e.redeemable,resolutionStatus:"WON"===e.resolutionStatus||"LOST"===e.resolutionStatus?e.resolutionStatus:null,resolutionLabel:"string"==typeof e.resolutionLabel?e.resolutionLabel:null,payoutValue:"number"==typeof e.payoutValue?e.payoutValue:null,conditionId:"string"==typeof e.conditionId?e.conditionId:void 0,indexSet:1===e.indexSet||2===e.indexSet?e.indexSet:void 0,isNegRisk:"boolean"==typeof e.isNegRisk?e.isNegRisk:void 0,isYieldBearing:"boolean"==typeof e.isYieldBearing?e.isYieldBearing:void 0,redeemAmountRaw:"string"==typeof e.redeemAmountRaw?e.redeemAmountRaw:void 0,autoRedeemJobId:"number"==typeof e.autoRedeemJobId?e.autoRedeemJobId:null,autoRedeemStatus:"string"==typeof e.autoRedeemStatus?e.autoRedeemStatus:null,autoRedeemLastError:"string"==typeof e.autoRedeemLastError?e.autoRedeemLastError:null,autoRedeemAttemptCount:"number"==typeof e.autoRedeemAttemptCount?e.autoRedeemAttemptCount:null,autoRedeemMaxAttempts:"number"==typeof e.autoRedeemMaxAttempts?e.autoRedeemMaxAttempts:null,autoRedeemNextAttemptAt:"string"==typeof e.autoRedeemNextAttemptAt?e.autoRedeemNextAttemptAt:null}:null}let c=new Map;function d(e,t){let r=e.includes("?")?"&":"?";return`${e}${r}venue=${encodeURIComponent(t)}`}async function p(e,l="all"){let u=String(e||"").trim();if(!u)return{walletAddress:"",positions:[],summary:{totalPositions:0,totalPnl:0,winningPositions:0,losingPositions:0},sources:{polymarket:{status:"ok",updatedAt:null},predict:{status:"ok",updatedAt:null}}};let f=await fetch((0,t.polybotApiPath)(d("/trade/open-positions",l)),{method:"GET",cac
1he:"no-store"});if(!f.ok)throw Error(await f.text().catch(()=>"")||`HTTP ${f.status}`);let m=await f.json().catch(()=>({})),y=r(m)?m:{};if(!1===y.ok)throw Error("string"==typeof y.error?y.error:`HTTP ${f.status}`);let h=(Array.isArray(y.positions)?y.positions:[]).map(e=>(function(e,t){if(!r(e))return null;let o=(Array.isArray(e.activeExitPlans)?e.activeExitPlans:[]).map(i).filter(e=>null!==e),l=a(e.latestTerminalExitPlan),u=(Array.isArray(e.entryLots)?e.entryLots:[]).map(s).filter(e=>null!==e);return{venue:"predict"===e.venue?"predict":"polymarket",closeActionType:"pm-sell"===e.closeActionType?"pm-sell":"predict-sell"===e.closeActionType?"predict-sell":"none",canSell:!0===e.canSell,positionStatus:"SETTLED_PENDING_REDEEM"===e.positionStatus?"SETTLED_PENDING_REDEEM":"OPEN",sellBlockedReason:"string"==typeof e.sellBlockedReason?e.sellBlockedReason:void 0,resolutionStatus:"WON"===e.resolutionStatus||"LOST"===e.resolutionStatus?e.resolutionStatus:null,resolutionLabel:"string"==typeof e.resolutionLabel?e.resolutionLabel:null,asset:"string"==typeof e.asset?e.asset:void 0,marketId:"string"==typeof e.marketId?e.marketId:void 0,title:"string"==typeof e.title?e.title:"",outcome:"string"==typeof e.outcome?e.outcome:"",size:Number(e.size??0),avgPrice:n(e.avgPrice),currentPrice:n(e.currentPrice),cashPnl:n(e.cashPnl),percentPnl:n(e.percentPnl),initialValue:"number"==typeof e.initialValue?e.initialValue:void 0,intentUsd:"number"==typeof e.intentUsd?e.intentUsd:void 0,executionUsd:"number"==typeof e.executionUsd?e.executionUsd:void 0,currentValue:"number"==typeof e.currentValue?e.currentValue:void 0,totalBought:"number"==typeof e.totalBought?e.totalBought:void 0,realizedPnl:"number"==typeof e.realizedPnl?e.realizedPnl:void 0,imageUrl:"string"==typeof e.imageUrl?e.imageUrl:void 0,marketSlug:"string"==typeof e.marketSlug?e.marketSlug:void 0,eventSlug:"string"==typeof e.eventSlug?e.eventSlug:void 0,walletAddress:"string"==typeof e.walletAddress?e.walletAddress:t,activeExitPlans:o.length>0?o:void 0,latestTerminalExitPlan:l??void 0,unallocatedShares:"number"==typeof e.unallocatedShares?e.unallocatedShares:void 0,entryLots:u.length>0?u:void 0}})(e,u)).filter(e=>null!==e),g=r(y.sources)?y.sources:{},b={polymarket:o(g.polymarket,"ok"),predict:o(g.predict,"ok")},v=h.filter(e=>"predict"===e.venue);"polymarket"!==l&&("ok"===b.predict.status||"stale"===b.predict.status)&&c.set(u.toLowerCase(),v);let S="polymarket"!==l&&"unavailable"===b.predict.status?c.get(u.toLowerCase())??[]:[],P="polymarket"!==l&&"unavailable"===b.predict.status&&S.length>0?[...h.filter(e=>"predict"!==e.venue),...S]:"polymarket"===l?h.filter(e=>"predict"!==e.venue):h,k=P.map(e=>e.cashPnl).filter(e=>"number"==typeof e&&Number.isFinite(e)),w=P.some(e=>null==e.cashPnl),A=r(y.summary)?y.summary:{};return{walletAddress:u,positions:P,summary:{totalPositions:"number"==typeof A.totalPositions?A.totalPositions:P.length,totalPnl:"number"==typeof A.totalPnl?A.totalPnl:null===A.totalPnl||w?null:Number(k.reduce((e,t)=>e+t,0).toFixed(2)),winningPositions:"number"==typeof A.winningPositions?A.winningPositions:k.filter(e=>e>0).length,losingPositions:"number"==typeof A.losingPositions?A.losingPositions:k.filter(e=>e<0).length},sources:b}}async function f(e){let t=String(e||"").trim();if(!t)return{address:"",pol:0,pUsd:0,usdcNative:0,wcol:0};let n=await fetch(`/api/analytics/user/${encodeURIComponent(t)}/balances`,{method:"GET",cache:"no-store"}),o=await n.json().catch(()=>void 0),i=r(o)?o:void 0;if(!n.ok||!i)throw Error((i&&"error"in i?String(i.error||""):"")||`Failed to load balances (HTTP ${n.status})`);let a=r(i.balances)?i.balances:{},s=a.pol,l=a.pUsd,u=a.usdc,c=a.wcol,d="string"==typeof s||"number"==typeof s?Number(s):0,p="string"==typeof l||"number"==typeof l?Number(l):0,f="string"==typeof u||"number"==typeof u?Number(u):0,m="string"==typeof c||"number"==typeof c?Number(c):0;if(!Number.isFinite(d)||d<0)throw Error("Invalid POL balance");if(!Number.isFinite(p)||p<0)throw Error("Invalid pUSD balance");if(!Number.isFinite(f)||f<0)throw Error("Invalid native USDC balance");if(!Number.isFinite(m)||m<0)throw Error("Invalid WCOL balance");return{address:t,pol:d,pUsd:p,usdcNative:f,wcol:m}}async function m(e="all"){let n=await fetch((0,t.polybotApiPath)(d("/trade/open-orders",e)),{method:"GET",cac
1he:"no-store"}),o=await n.json().catch(()=>void 0),i=r(o)?o:void 0,a=i?.ok===!0;if(!n.ok||!a||!i)throw Error((i&&"error"in i?String(i.error||""):"")||`Failed to load open orders (HTTP ${n.status})`);let s=(Array.isArray(i.orders)?i.orders:[]).map(l).filter(e=>null!==e),u=(Array.isArray(i.warnings)?i.warnings:[]).map(e=>{if("string"==typeof e){let t=e.trim();return t?{message:t}:null}if(!e||"object"!=typeof e)return null;let t="message"in e&&"string"==typeof e.message?e.message.trim():"";if(!t)return null;let r={message:t};return"venue"in e&&"string"==typeof e.venue&&(r.venue=e.venue),"code"in e&&"string"==typeof e.code&&(r.code=e.code.trim()),"retryAfterMs"in e&&"number"==typeof e.retryAfterMs&&Number.isFinite(e.retryAfterMs)&&(r.retryAfterMs=e.retryAfterMs),"upstreamStatus"in e&&"number"==typeof e.upstreamStatus&&Number.isFinite(e.upstreamStatus)&&(r.upstreamStatus=e.upstreamStatus),r}).filter(e=>null!==e);return{ok:!0,makerAddress:"string"==typeof i.makerAddress?i.makerAddress:"",orders:s,warnings:u}}async function y(){let e=await fetch((0,t.polybotApiPath)("/trade/open-orders/bootstrap"),{method:"POST",cache:"no-store"}),n=await e.json().catch(()=>void 0),o=r(n)?n:void 0,i=o?.ok===!0;if(!e.ok||!i||!o)throw Error((o&&"error"in o?String(o.error||""):"")||`Failed to initialize open orders access (HTTP ${e.status})`);return{ok:!0,makerAddress:"string"==typeof o.makerAddress?o.makerAddress:"",alreadyInitialized:!0===o.alreadyInitialized}}async function h(e,n="all"){let o=String(e||"").trim();if(!o)return{ok:!0,makerAddress:"",positions:[]};let i=await fetch((0,t.polybotApiPath)(d("/trade/claimable-positions",n)),{method:"GET",cache:"no-store"}),a=await i.json().catch(()=>void 0),s=r(a)?a:void 0,l=s?.ok===!0;if(!i.ok||!l||!s)throw Error((s&&"error"in s?String(s.error||""):"")||`Failed to load claimable positions (HTTP ${i.status})`);let c=(Array.isArray(s.positions)?s.positions:[]).map(u).filter(e=>null!==e);return{ok:!0,makerAddress:"string"==typeof s.makerAddress?s.makerAddress:o,positions:c}}async function g(e){var t;let n,o,i=String(e||"").trim();if(!i)return{walletAddress:"",currentPnl:0,realizedPnlAllTime:null,realizedPnlPercent:null,totalBoughtAllTime:null,cumulativeExecutedVolumeAllTimeUsd:null,historicalWinRate:null,wins:0,losses:0,closedPositionsCount:0,marketsTradedAllTime:null,source:"pm-data-api",computedAt:""};let a=await fetch(`/api/analytics/user/${encodeURIComponent(i)}/portfolio-analytics`,{method:"GET",cache:"no-store"}),s=await a.json().catch(()=>void 0),l=r(s)?s:void 0,u=l?.ok===!0;if(!a.ok||!u||!l)throw Error((l&&"error"in l?String(l.error||""):"")||`Failed to load portfolio analytics (HTTP ${a.status})`);return t=l.analytics,o="mixed"===(n=r(t)?t:{}).source?"mixed":"pm-data-api",{walletAddress:i,currentPnl:"number"==typeof n.currentPnl?n.currentPnl:0,realizedPnlAllTime:"number"==typeof n.realizedPnlAllTime?n.realizedPnlAllTime:null,realizedPnlPercent:"number"==typeof n.realizedPnlPercent?n.realizedPnlPercent:null,totalBoughtAllTime:"number"==typeof n.totalBoughtAllTime?n.totalBoughtAllTime:null,cumulativeExecutedVolumeAllTimeUsd:"number"==typeof n.cumulativeExecutedVolumeAllTimeUsd?n.cumulativeExecutedVolumeAllTimeUsd:null,historicalWinRate:"number"==typeof n.historicalWinRate?n.historicalWinRate:null,wins:"number"==typeof n.wins?n.wins:0,losses:"number"==typeof n.losses?n.losses:0,closedPositionsCount:"number"==typeof n.closedPositionsCount?n.closedPositionsCount:0,marketsTradedAllTime:"number"==typeof n.marketsTradedAllTime?n.marketsTradedAllTime:null,source:o,computedAt:"string"==typeof n.computedAt?n.computedAt:""}}e.s(["fetchPortfolioAnalytics",()=>g,"fetchPortfolioBalances",()=>f,"fetchPortfolioClaimablePositions",()=>h,"fetchPortfolioOpenOrders",()=>m,"fetchPortfolioOpenOrdersBootstrap",()=>y,"fetchPortfolioPositions",()=>p],562957);var b=e.i(18343),v=e.i(530574);function S(e){return"predictfun"===e?{scope:"prediction",account:"predict"}:"memecoin"===e?{scope:"memecoins",account:"solana"}:{scope:"prediction",account:"proxy"}}function P(e){return"positions"===e||"claimable"===e||"orders"===e||"holdings"===e||"activity"===e}function k(e,t){return"prediction"===t?e:"proxy"===t?e.filter(e=>"predict"!==e.venue):"predict"===t?e.filter(e=>"predict"===e.venue):[]}function w(e){return"string"==typeof e?e.trim().toLowerCase():""}function A(e){let t=w(e);return t?"yes"===t||t.endsWith("· yes")?"yes":"no"===t||t.endsWith("· no")?"no":"up"===t||t.endsWith("· up")?"up":"down"===t||t.endsWith("· down")?"down":t:""}function C(e){return w(e).replace(/\s+/g," ")}function R(e,t){if(!t.length)return e;let r=new Set(t.flatMap(e=>{let t,r,n,o,i;return t=w(e.asset),r=A(e.outcome),n=w(e.marketId),o=C(e.title),i=[],t&&i.push(`asset:${t}`),n&&r&&i.push(`market:${n}:${r}`),o&&r&&i.push(`title:${o}:${r}`),i}));return 0===r.size?e:e.filter(e=>{let t,n,o,i,a,s=(t=w(e.asset),n=A(e.outcome),o=w(e.marketId),i=C(e.title),a=[],t&&a.push(`asset:${t}`),o&&n&&a.push(`market:${o}:${n}`),i&&n&&a.push(`title:${i}:${n}`),a);return 0===s.length||!s.some(e=>r.has(e))})}function E(e,t,r=Date.now()){return e.length&&0!==Object.keys(t).length?e.filter(e=>{let n=t[(0,v.getPositionRowKey)(e)];return!("number"==typeof n&&n>r)}):e}function x(e){return Math.max(1,Math.ceil(e/20))}function N(e,t,r){let n=(t-1)*r;return e.slice(n,n+r)}function T(e,t){return"memecoins"===e?"memecoin":"predict"===t?"predict":"proxy"===t?"polymarket":"prediction"}function $(e){return"prediction"===e}function I(e){let{primaryScope:t,scopedPositionsCount:r,scopedOpenOrdersCount:n,scopedClaimablePositionsCount:o,showClaimableTab:i}=e;if("memecoins"===t)return[{key:"holdings",label:"Holdings"},{key:"activity",label:"Activity"}];let a=[{key:"positions",label:"Positions",count:r},{key:"orders",label:"Open Orders",count:n},{key:"activity",label:"Activity"}];return i&&a.splice(1,0,{key:"claimable",label:"Redeem",count:o}),a}function O(e){let t=0,r=!1;for(let n of e){let e=Number(n.size??0),o=n.currentPrice;if(Number.isFinite(e)){if("number"!=typeof o||!Number.isFinite(o)){r=!0;continue}t+=e*o}}return r?null:t}function L(e){let{address:t,balances:r,positions:n,claimable:o}=e,i=Number.isFinite(r.pol)?r.pol:0,a=Number.isFinite(r.pUsd)?r.pUsd:0,s=Number.isFinite(r.usdcNative)?r.usdcNative:0,l=Number.isFinite(r.wcol)?r.wcol:0,u=a+s,c=R(n.positions,o.positions),d=c.filter(e=>"polymarket"===e.venue),p=o.positions.filter(e=>"predict"!==e.venue),f=O(c),m=(0,b.getClaimablePayoutsTotal)(o.positions),y=O(d),h=(0,b.getClaimablePayoutsTotal)(p),g=null==f?null:f+m;return{address:t,proxyPol:i,proxyPUsd:a,proxyUsdcNative:s,proxyWcol:l,totalCash:u,openPositionsValue:f,claimableValue:m,proxyOpenPositionsValue:y,proxyClaimableValue:h,proxyPositionsValue:null==y?null:y+h,positionsValue:g,netWorth:null==g?null:u+g}}e.s(["buildPortfolioTabs",()=>I,"dedupePositionsAgainstClaimable",()=>R,"filterOptimisticallyHiddenPositions",()=>E,"getActivityScope",()=>T,"getPortfolioScopeForVenue",()=>S,"getTotalPages",()=>x,"isPortfolioTab",()=>
1P,"matchesVenue",()=>k,"paginateItems",()=>N,"shouldShowClaimableTab",()=>$],126717),e.s(["buildPortfolioSummary",()=>L,"computePositionsValue",()=>O],482041),e.s([],78245)}]);

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.