https://app.hotstuff.trade/_next/static/chunks/1337c-z7js34k.js?dpl=dpl_2UkkgYJtZRL8qYawe9FfkxiApWHv
1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="52cfd78e-905e-3e4e-2711-7c21b858eff8")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,294231,e=>{"use strict";var t=e.i(912678);e.s(["default",0,function(e){let{theme:r,name:n,props:i}=e;return r&&r.components&&r.components[n]&&r.components[n].defaultProps?(0,t.default)(r.components[n].defaultProps,i):i}])},163010,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(107558),n=e.i(294231),n=n,i=e.i(486931);let a={...t}.useSyncExternalStore;function o(e={}){let{themeId:s}=e;return function(e,o={}){let A=(0,i.default)();A&&s&&(A=A[s]||A);let l="u">typeof window&&void 0!==window.matchMedia,{defaultMatches:c=!1,matchMedia:d=l?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:h=!1}=(0,n.default)({name:"MuiUseMediaQuery",props:o,theme:A}),p="function"==typeof e?e(A):e;return(p=p.replace(/^@media( ?)/m,"")).includes("print")&&console.warn("MUI: You have provided a `print` query to the `useMediaQuery` hook.\nUsing the print media query to modify print styles can lead to unexpected results.\nConsider using the `displayPrint` field in the `sx` prop instead.\nMore information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."),(void 0!==a?function(e,r,n,i,o){let s=t.useCallback(()=>r,[r]),A=t.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(null!==i){let{matches:t}=i(e);return()=>t}return s},[s,e,i,o,n]),[l,c]=t.useMemo(()=>{if(null===n)return[s,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[s,n,e]);return a(c,l,A)}:function(e,n,i,a,o){let[s,A]=t.useState(()=>o&&i?i(e).matches:a?a(e).matches:n);return(0,r.default)(()=>{if(!i)return;let t=i(e),r=()=>{A(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,i]),s})(p,c,d,u,h)}}o();let s=o({themeId:e.i(892420).default});e.s(["useMediaQuery",0,s],163010)},166107,731007,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(207670),n=e.i(519130),i=e.i(667239),a=e.i(390290),o=e.i(806531),s=e.i(261722),A=e.i(516e3),l=e.i(332567),c=e.i(520103),d=e.i(540672),u=e.i(319727);function h(e){return(0,u.default)("PrivateSwitchBase",e)}(0,d.default)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var p=e.i(854072),m=e.i(474076);let f=(0,s.styled)(c.default,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),g=(0,s.styled)("input",{name:"MuiSwitchBase",shouldForwardProp:o.default})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=t.forwardRef(function(e,t){let{autoFocus:r,checked:i,checkedIcon:o,defaultChecked:s,disabled:c,disableFocusRipple:d=!1,edge:u=!1,icon:y,id:b,inputProps:x,inputRef:w,name:v,onBlur:C,onChange:B,onFocus:S,readOnly:k,required:E=!1,tabIndex:F,type:T,value:U,slots:I={},slotProps:Q={},...j}=e,[L,_]=(0,A.default)({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),P=(0,l.default)(),D=c;P&&void 0===D&&(D=P.disabled);let R="checkbox"===T||"radio"===T,M={...e,checked:L,disabled:D,disableFocusRipple:d,edge:u},O=(e=>{let{classes:t,checked:r,disabled:i,edge:o}=e,s={root:["root",r&&"checked",i&&"disabled",o&&`edge${(0,a.default)(o)}`],input:["input"]};return(0,n.default)(s,h,t)})(M),N={slots:I,slotProps:{input:x,...Q}},[H,V]=(0,p.default)("root",{ref:t,elementType:f,className:O.root,shouldForwardComponentProp:!0,externalForwardedProps:{...N,component:"span",...j},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),S&&S(t),P&&P.onFocus&&P.onFocus(t)},onBlur:t=>{e.onBlur?.(t),C&&C(t),P&&P.onBlur&&P.onBlur(t)}}),ownerState:M,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:D,role:void 0,tabIndex:null}}),[K,G]=(0,p.default)("input",{ref:w,elementType:g,className:O.input,externalForwardedProps:N,getSlotProps:e=>
2({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;let t=e.target.checked;_(t),B&&B(e,t)})(t)}}),ownerState:M,additionalProps:{autoFocus:r,checked:i,defaultChecked:s,disabled:D,id:R?b:void 0,name:v,readOnly:k,required:E,tabIndex:F,type:T,..."checkbox"===T&&void 0===U?{}:{value:U}}});return(0,m.jsxs)(H,{...V,children:[(0,m.jsx)(K,{...G}),L?o:y]})});e.s(["default",0,y],731007);var b=e.i(259173);let x=(0,b.default)((0,m.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),w=(0,b.default)((0,m.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),v=(0,b.default)((0,m.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var C=e.i(480405),B=e.i(50915),S=e.i(549728),k=e.i(699844),E=e.i(635740);let F=(0,s.styled)(y,{shouldForwardProp:e=>(0,o.default)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,a.default)(r.size)}`],"default"!==r.color&&t[`color${(0,a.default)(r.color)}`]]}})((0,B.default)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.alpha)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,S.default)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,i.alpha)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,S.default)()).map(([t])=>({props:{color:t},style:{[`&.${C.default.checked}, &.${C.default.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${C.default.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),T=(0,m.jsx)(w,{}),U=(0,m.jsx)(x,{}),I=(0,m.jsx)(v,{}),Q=t.forwardRef(function(e,i){let o=(0,k.useDefaultProps)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=T,color:A="primary",icon:l=U,indeterminate:c=!1,indeterminateIcon:d=I,inputProps:u,size:h="medium",disableRipple:f=!1,className:g,slots:y={},slotProps:b={},...x}=o,w=c?d:l,v=c?d:s,B={...o,disableRipple:f,color:A,indeterminate:c,size:h},S=(e=>{let{classes:t,indeterminate:r,color:i,size:o}=e,s={root:["root",r&&"indeterminate",`color${(0,a.default)(i)}`,`size${(0,a.default)(o)}`]},A=(0,n.default)(s,C.getCheckboxUtilityClass,t);return{...t,...A}})(B),Q=b.input??u,[j,L]=(0,p.default)("root",{ref:i,elementType:F,className:(0,r.default)(S.root,g),shouldForwardComponentProp:!0,externalForwardedProps:{slots:y,slotProps:b,...x},ownerState:B,additionalProps:{type:"checkbox",icon:t.cloneElement(w,{fontSize:w.props.fontSize??h}),checkedIcon:t.cloneElement(v,{fontSize:v.props.fontSize??h}),disableRipple:f,slots:y,slotProps:{input:(0,E.mergeSlotProps)("function"==typeof Q?Q(B):Q,{"data-indeterminate":c})}}});return(0,m.jsx)(j,{...L,classes:S})});e.s(["Checkbox",0,Q],166107)},302682,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(207670),n=e.i(519130),i=e.i(332567),i=i,a=e.i(261722),o=e.i(50915),s=e.i(699844),A=e.i(689820),l=e.i(390290),c=e.i(277529),d=e.i(994271),u=e.i(854072),h=e.i(474
2076);let p=(0,a.styled)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${c.default.label}`]:t.label},t.root,t[`labelPlacement${(0,l.default)(r.labelPlacement)}`]]}})((0,o.default)(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${c.default.disabled}`]:{cursor:"default"},[`& .${c.default.label}`]:{[`&.${c.default.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]}))),m=(0,a.styled)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,o.default)(({theme:e})=>({[`&.${c.default.error}`]:{color:(e.vars||e).palette.error.main}}))),f=t.forwardRef(function(e,a){let o=(0,s.useDefaultProps)({props:e,name:"MuiFormControlLabel"}),{checked:f,className:g,componentsProps:y={},control:b,disabled:x,disableTypography:w,inputRef:v,label:C,labelPlacement:B="end",name:S,onChange:k,required:E,slots:F={},slotProps:T={},value:U,...I}=o,Q=(0,i.default)(),j=x??b.props.disabled??Q?.disabled,L=E??b.props.required,_={disabled:j,required:L};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===b.props[e]&&void 0!==o[e]&&(_[e]=o[e])});let P=(0,d.default)({props:o,muiFormControl:Q,states:["error"]}),D={...o,disabled:j,labelPlacement:B,required:L,error:P.error},R=(e=>{let{classes:t,disabled:r,labelPlacement:i,error:a,required:o}=e,s={root:["root",r&&"disabled",`labelPlacement${(0,l.default)(i)}`,a&&"error",o&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",a&&"error"]};return(0,n.default)(s,c.getFormControlLabelUtilityClasses,t)})(D),M={slots:F,slotProps:{...y,...T}},[O,N]=(0,u.default)("typography",{elementType:A.default,externalForwardedProps:M,ownerState:D}),H=C;return null==H||H.type===A.default||w||(H=(0,h.jsx)(O,{component:"span",...N,className:(0,r.default)(R.label,N?.className),children:H})),(0,h.jsxs)(p,{className:(0,r.default)(R.root,g),ownerState:D,ref:a,...I,children:[t.cloneElement(b,_),L?(0,h.jsxs)("div",{children:[H,(0,h.jsxs)(m,{ownerState:D,"aria-hidden":!0,className:R.asterisk,children:["â","*"]})]}):H]})});e.s(["FormControlLabel",0,f],302682)},548251,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(207670),n=e.i(519130),i=e.i(868308),a=e.i(925652),o=e.i(606586),s=e.i(552174),A=e.i(803923),l=e.i(566352),c=e.i(954512),d=e.i(327001),u=e.i(281811),h=e.i(474076);function p(e,t,r){let n=function(e,t,r){let n,i=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),o=(0,u.ownerWindow)(t);if(t.fakeTransform)n=t.fakeTransform;else{let e=o.getComputedStyle(t);n=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,A=0;if(n&&"none"!==n&&"string"==typeof n){let e=n.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),A=parseInt(e[5],10)}return"left"===e?a?`translateX(${a.right+s-i.left}px)`:`translateX(${o.innerWidth+s-i.left}px)`:"right"===e?a?`translateX(-${i.right-a.left-s}px)`:`translateX(-${i.left+i.width-s}px)`:"up"===e?a?`translateY(${a.bottom+A-i.top}px)`:`translateY(${o.innerHeight+A-i.top}px)`:a?`translateY(-${i.top-a.top+i.height-A}px)`:`translateY(-${i.top+i.height-A}px)`}(e,t,"function"==typeof r?r():r);t.style.webkitTransform=n,t.style.transform=n}let m=t.forwardRef(function(e,r){let n=(0,c.useTheme)(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},a={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:m,appear:f=!0,children:g,container:y,direction:b="down",easing:x=i,in:w,onEnter:v,onEntered:C,onEntering:B,onExit:S,onExited:k,onExiting:E,style:F,timeout:T=a,TransitionComponent:U=o.Transition,...I}=e,Q=t.useRef(null),j=(0,l.default)((0,s.default)(g),Q,r),L=e=>t=>{e&&(void 0===t?e(Q.current):e(Q.current,t))},_=L((e,t)=>{p(b,e,y),(0,d.reflow)(e),v&&v(e,t)}),P=L((e,t)=>{let r=(0,d.getTransitionProps)({timeout:T,style:F,easing:x},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",B&&B(e,t)}),D=L(C),R=L(E),M=L(e=>{let t=(0,d.getTransitionProps)({timeout:T,style:F,easing:x},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),p(b,e,y),S&&S(e)}),O=L(e=>{e.style.webkitTransition="",e.style.transition="",k&&k(e)}),N=t.useCallback(()=>{Q.current&&p(b,Q.current,y)},[b,y]);return t.useEffect(()=>{if(w||"down"===b||"right"===b)return;let e=(0,A.default)(()=>{Q.current&&p(b,Q.current,y)}),t=(0,u.ownerWindow)(Q.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[b,w,y]),t.useEffect(()=>{w||N()},[w,N]),(0,h.jsx)(U,{nodeRef:Q,onEnter:_,onEntered:D,onEntering:P,onExit:M,onExited:O,onExiting:R,addEndListener:e=>{m&&m(Q.current,e)},appear:f,in:w,timeout:T,...I,children:(e,{ownerState:r,...n})=>t.cloneElement(g,{ref:j,style:{visibility:"exited"!==e||w?void 0:"hidden",...F,...g.props.style},...n})})});var f=e.i(374429),g=e.i(390290),y=e.i(806531),b=e.i(261722),x=e.i(50915),w=e.i(699844),v=e.i(540672),C=e.i(319727);function B(e){return(0,C.default)("MuiDrawer",e)}(0,v.default)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var S=e.i(854072),k=e.i(635740);let E=(e,t)=>{let{ownerState:r}=e;return[t.root,("permanent"===r.variant||"persistent"===r.variant)&&t.docked,t.modal]},F=(0,b.styled)(a.default,{name:"MuiDrawer",slot:"Root",overridesResolver:E})((0,x.default)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),T=(0,b.styled)("div",{shouldForwardProp:y.default,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:E})({flex:"0 0 auto"}),U=(0,b.styled)(f.default,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t[`paperAnchor${(0,g.default)(r.anchor)}`],"temporary"!==r.variant&&t[`paperAnchorDocked${(0,g.default)(r.anchor)}`]]}})((0,x.default)(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"}
2,style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),I={left:"right",right:"left",top:"down",bottom:"up"};function Q(e){return["left","right"].includes(e)}function j({direction:e},t){return"rtl"===e&&Q(t)?I[t]:t}let L=t.forwardRef(function(e,a){let o=(0,w.useDefaultProps)({props:e,name:"MuiDrawer"}),s=(0,c.useTheme)(),A=(0,i.useRtl)(),l={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:u,children:p,className:f,elevation:y=16,hideBackdrop:b=!1,ModalProps:{BackdropProps:x,...v}={},onClose:C,open:E=!1,PaperProps:Q={},SlideProps:L,TransitionComponent:_,transitionDuration:P=l,variant:D="temporary",slots:R={},slotProps:M={},...O}=o,N=t.useRef(!1);t.useEffect(()=>{N.current=!0},[]);let H=j({direction:A?"rtl":"ltr"},d),V={...o,anchor:d,elevation:y,open:E,variant:D,...O},K=(e=>{let{classes:t,anchor:r,variant:i}=e,a={root:["root",`anchor${(0,g.default)(r)}`],docked:[("permanent"===i||"persistent"===i)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,g.default)(r)}`,"temporary"!==i&&`paperAnchorDocked${(0,g.default)(r)}`]};return(0,n.default)(a,B,t)})(V),G={slots:{transition:_,...R},slotProps:{paper:Q,transition:L,...M,backdrop:(0,k.mergeSlotProps)(M.backdrop||{...u,...x},{transitionDuration:P})}},[W,z]=(0,S.default)("root",{ref:a,elementType:F,className:(0,r.default)(K.root,K.modal,f),shouldForwardComponentProp:!0,ownerState:V,externalForwardedProps:{...G,...O,...v},additionalProps:{open:E,onClose:C,hideBackdrop:b,slots:{backdrop:G.slots.backdrop},slotProps:{backdrop:G.slotProps.backdrop}}}),[$,q]=(0,S.default)("paper",{elementType:U,shouldForwardComponentProp:!0,className:(0,r.default)(K.paper,Q.className),ownerState:V,externalForwardedProps:G,additionalProps:{elevation:"temporary"===D?y:0,square:!0}}),[X,Y]=(0,S.default)("docked",{elementType:T,ref:a,className:(0,r.default)(K.root,K.docked,f),ownerState:V,externalForwardedProps:G,additionalProps:O}),[J,Z]=(0,S.default)("transition",{elementType:m,ownerState:V,externalForwardedProps:G,additionalProps:{in:E,direction:I[H],timeout:P,appear:N.current}}),ee=(0,h.jsx)($,{...q,children:p});if("permanent"===D)return(0,h.jsx)(X,{...Y,children:ee});let et=(0,h.jsx)(J,{...Z,children:ee});return"persistent"===D?(0,h.jsx)(X,{...Y,children:et}):(0,h.jsx)(W,{...z,children:et})});e.s(["default",0,L,"getAnchor",0,j,"isHorizontal",0,Q],548251)},756080,e=>{"use strict";var t=e.i(500932);e.i(164485);var r=e.i(925450),n=e.i(268407),i=e.i(68043),a=e.i(279582);function o(e){return e?.is_whitelisted===!0}function s(e){return e?.is_spot_whitelisted===!0}e.s(["useCanAccessPlatform",0,()=>{let e,A,l=(0,t.c)(9),{isActive:c}=(0,r.useCountdownStatus)(),{userMetadata:d,address:u,isUserMetadataLoading:h}=(0,n.useAuthStore)(),{isFullyReady:p,isConnected:m}=(0,a.useAuthController)(),f=d?.[u],g=f?.is_whitelisted===!0;f?.is_spot_whitelisted;let y=Object.values(d).some(o);Object.values(d).some(s),l[0]===Symbol.for("react.memo_cache_sentinel")?(e={invest:!0},l[0]=e):e=l[0];let b=e;if(!i.isMainnet){let e;return l[1]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!0,isLoading:!1,featureFlags:b},l[1]=e):e=l[1],e}if(!p){let e;return l[2]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!1,isLoading:!0,featureFlags:b},l[2]=e):e=l[2],e}if(y&&!c){let e;return l[3]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!0,isLoading:!1,featureFlags:b},l[3]=e):e=l[3],e}if(u&&"0x0000000000000000000000000000000000000000"!==u&&!m){let e;return l[4]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!1,isLoading:!0,featureFlags:b},l[4]=e):e=l[4],e}if(m&&h){let e;return l[5]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!1,isLoading:!0,featureFlags:b}
2,l[5]=e):e=l[5],e}if(!m){let e;return l[6]===Symbol.for("react.memo_cache_sentinel")?(e={canAccess:!1,isLoading:!1,featureFlags:b},l[6]=e):e=l[6],e}let x=!c&&g;return l[7]!==x?(A={canAccess:x,isLoading:!1,featureFlags:b},l[7]=x,l[8]=A):A=l[8],A}])},499800,581949,994661,314035,211786,419954,190025,e=>{"use strict";let t,r,n,i,a;var o,s,A,l,c,d,u=e.i(474076),h=e.i(271645),p=e.i(321960),m=e.i(488003);(c=d||(d={}))[c.Verbose=4]="Verbose",c[c.Info=3]="Info",c[c.Warn=2]="Warn",c[c.Error=1]="Error",c[c.None=0]="None";let f=(e,t,r)=>{if(r>=t){let r=e.reduce((e,t,r)=>((r+1)%2&&e.push("\n"),e.push(t),e),[]);switch(t){case d.Info:console.info(...r);break;case d.Error:console.error(...r);break;case d.Warn:console.warn(...r);break;default:console.log(...r)}}};e.s(["claimAppFees",()=>ra,"execute",()=>t8,"fastFill",()=>ro,"getAppFees",()=>ri,"getQuote",()=>rn],411616),e.s([],440026),e.i(440026),e.s(["execute",()=>t8],202899);var g=e.i(189643),y=e.i(247167);function b(e,t){return function(){return e.apply(t,arguments)}}let{toString:x}=Object.prototype,{getPrototypeOf:w}=Object,{iterator:v,toStringTag:C}=Symbol,B=(r=Object.create(null),e=>{let t=x.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())}),S=e=>(e=e.toLowerCase(),t=>B(t)===e),k=e=>t=>typeof t===e,{isArray:E}=Array,F=k("undefined");function T(e){return null!==e&&!F(e)&&null!==e.constructor&&!F(e.constructor)&&Q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let U=S("ArrayBuffer"),I=k("string"),Q=k("function"),j=k("number"),L=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==B(e))return!1;let t=w(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(C in e)&&!(v in e)},P=S("Date"),D=S("File"),R=S("Blob"),M=S("FileList"),O="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,N=void 0!==O.FormData?O.FormData:void 0,H=S("URLSearchParams"),[V,K,G,W]=["ReadableStream","Request","Response","Headers"].map(S);function z(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),E(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(T(e))return;let a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;for(n=0;n<o;n++)i=a[n],t.call(null,e[i],i,e)}}function $(e,t){let r;if(T(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let q="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,X=e=>!F(e)&&e!==q,Y=(n="u">typeof Uint8Array&&w(Uint8Array),e=>n&&e instanceof n),J=S("HTMLFormElement"),Z=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),ee=S("RegExp"),et=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};z(r,(r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)}),Object.defineProperties(e,n)},er=S("AsyncFunction"),en=(o="function"==typeof setImmediate,s=Q(q.postMessage),o?setImmediate:s?(A=`axios@${Math.random()}`,l=[],q.addEventListener("message",({source:e,data:t})=>{e===q&&t===A&&l.length&&l.shift()()},!1),e=>{l.push(e),q.postMessage(A,"*")}):e=>setTimeout(e)),ei="u">typeof queueMicrotask?queueMicrotask.bind(q):void 0!==y.default&&y.default.nextTick||en,ea={isArray:E,isArrayBuffer:U,isBuffer:T,isFormData:e=>{let t;return e&&(N&&e instanceof N||Q(e.append)&&("formdata"===(t=B(e))||"object"===t&&Q(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&U(e.buffer)},isString:I,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:L,isPlainObject:_,isEmptyObject:e=>{if(!L(e)||T(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:V,isRequest:K,isResponse:G,isHeaders:W,isUndefined:F,isDate:P,isFile:D,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:R,isRegExp:ee,isFunction:Q,isStream:e=>L(e)&&Q(e.pipe),isURLSearchParams:H,isTypedArray:Y,isFileList:M,forEach:z,merge:function e(){let{caseless:t,skipUndefined:r}=X(this)&&this||{},n={},i=(i,a)=>
2{if("__proto__"===a||"constructor"===a||"prototype"===a)return;let o=t&&$(n,a)||a;_(n[o])&&_(i)?n[o]=e(n[o],i):_(i)?n[o]=e({},i):E(i)?n[o]=i.slice():r&&F(i)||(n[o]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&z(arguments[e],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(z(t,(t,n)=>{r&&Q(t)?Object.defineProperty(e,n,{value:b(t,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,a,o,s={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=!1!==r&&w(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:B,kindOfTest:S,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(E(e))return e;let t=e.length;if(!j(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[v]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:J,hasOwnProperty:Z,hasOwnProp:Z,reduceDescriptors:et,freezeMethods:e=>{et(e,(t,r)=>{if(Q(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(Q(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(E(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:$,global:q,isContextDefined:X,isSpecCompliantForm:function(e){return!!(e&&Q(e.append)&&"FormData"===e[C]&&e[v])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(L(e)){if(t.indexOf(e)>=0)return;if(T(e))return e;if(!("toJSON"in e)){t[n]=e;let i=E(e)?[]:{};return z(e,(e,t)=>{let a=r(e,n+1);F(a)||(i[t]=a)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:er,isThenable:e=>e&&(L(e)||Q(e))&&Q(e.then)&&Q(e.catch),setImmediate:en,asap:ei,isIterable:e=>null!=e&&Q(e[v])};var eo=e.i(467034);class es extends Error{static from(e,t,r,n,i,a){let o=new es(e.message,t||e.code,r,n,i);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),a&&Object.assign(o,a),o}constructor(e,t,r,n,i){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ea.toJSONObject(this.config),code:this.code,status:this.status}}}es.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",es.ERR_BAD_OPTION="ERR_BAD_OPTION",es.ECONNABORTED="ECONNABORTED",es.ETIMEDOUT="ETIMEDOUT",es.ERR_NETWORK="ERR_NETWORK",es.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",es.ERR_DEPRECATED="ERR_DEPRECATED",es.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",es.ERR_BAD_REQUEST="ERR_BAD_REQUEST",es.ERR_CANCELED="ERR_CANCELED",es.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",es.ERR_INVALID_URL="ERR_INVALID_URL";let eA=es;function el(e){return ea.isPlainObject(e)||ea.isArray(e)}function ec(e){return ea.endsWith(e,"[]")?e.slice(0,-2):e}function ed(e,t,r){return e?e.concat(t).map(function(e,t){return e=ec(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let eu=ea.toFlatObject(ea,{},null,function(e){return/^is[A-Z]/.test(e)}),eh=function(e,t,r){if(!ea.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=ea.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ea.isUndefined(t[e])})).metaTokens,i=r.visitor||l,a=r.dots,o=r.indexes,s=(r.Blob||"u">typeof Blob&&Blob)&&ea.isSpecCompliantForm(t);if(!ea.isFunction(i))throw TypeError("visitor must be a function");function A(e){if(null===e)return"";if(ea.isDate(e))return e.toISOString();if(ea.isBoolean(e))return e.toString();if(!s&&ea.isBlob(e))throw new eA("Blob is not supported. Use a Buffer instead.");
2return ea.isArrayBuffer(e)||ea.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):eo.Buffer.from(e):e}function l(e,r,i){let s=e;if(ea.isReactNative(t)&&ea.isReactNativeBlob(e))return t.append(ed(i,r,a),A(e)),!1;if(e&&!i&&"object"==typeof e)if(ea.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var l;if(ea.isArray(e)&&(l=e,ea.isArray(l)&&!l.some(el))||(ea.isFileList(e)||ea.endsWith(r,"[]"))&&(s=ea.toArray(e)))return r=ec(r),s.forEach(function(e,n){ea.isUndefined(e)||null===e||t.append(!0===o?ed([r],n,a):null===o?r:r+"[]",A(e))}),!1}return!!el(e)||(t.append(ed(i,r,a),A(e)),!1)}let c=[],d=Object.assign(eu,{defaultVisitor:l,convertValue:A,isVisitable:el});if(!ea.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!ea.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),ea.forEach(r,function(r,a){!0===(!(ea.isUndefined(r)||null===r)&&i.call(t,r,ea.isString(a)?a.trim():a,n,d))&&e(r,n?n.concat(a):[a])}),c.pop()}}(e),t};function ep(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function em(e,t){this._pairs=[],e&&eh(e,this,t)}let ef=em.prototype;function eg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ey(e,t,r){let n;if(!t)return e;let i=r&&r.encode||eg,a=ea.isFunction(r)?{serialize:r}:r,o=a&&a.serialize;if(n=o?o(t,a):ea.isURLSearchParams(t)?t.toString():new em(t,a).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ef.append=function(e,t){this._pairs.push([e,t])},ef.toString=function(e){let t=e?function(t){return e.call(this,t,ep)}:ep;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let eb=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ea.forEach(this.handlers,function(t){null!==t&&e(t)})}},ex={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ew="u">typeof URLSearchParams?URLSearchParams:em,ev="u">typeof FormData?FormData:null,eC="u">typeof Blob?Blob:null,eB="u">typeof window&&"u">typeof document,eS="object"==typeof navigator&&navigator||void 0,ek=eB&&(!eS||0>["ReactNative","NativeScript","NS"].indexOf(eS.product)),eE="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eF=eB&&window.location.href||"http://localhost";e.s(["hasBrowserEnv",0,eB,"hasStandardBrowserEnv",0,ek,"hasStandardBrowserWebWorkerEnv",0,eE,"navigator",0,eS,"origin",0,eF],557536);let eT={...e.i(557536),isBrowser:!0,classes:{URLSearchParams:ew,FormData:ev,Blob:eC},protocols:["http","https","file","blob","url","data"]},eU=function(e){if(ea.isFormData(e)&&ea.isFunction(e.entries)){let t={};return ea.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let a=t[i++];if("__proto__"===a)return!0;let o=Number.isFinite(+a),s=i>=t.length;return(a=!a&&ea.isArray(n)?n.length:a,s)?ea.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r:(n[a]&&ea.isObject(n[a])||(n[a]=[]),e(t,r,n[a],i)&&ea.isArray(n[a])&&(n[a]=function(e){let t,r,n={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)n[r=i[t]]=e[r];return n}(n[a]))),!o}(ea.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null},eI={transitional:ex,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=ea.isObject(e);if(a&&ea.isHTMLForm(e)&&(e=new FormData(e)),ea.isFormData(e))return i?JSON.stringify(eU(e)):e;if(ea.isArrayBuffer(e)||ea.isBuffer(e)||ea.isStream(e)||ea.isFile(e)||ea.isBlob(e)||ea.isReadableStream(e))return e;if(ea.isArrayBufferView(e))return e.buffer;if(ea.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1){var o,s;
2return(o=e,s=this.formSerializer,eh(o,new eT.classes.URLSearchParams,{visitor:function(e,t,r,n){return eT.isNode&&ea.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...s})).toString()}if((r=ea.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eh(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",!1);var A=e;if(ea.isString(A))try{return(0,JSON.parse)(A),ea.trim(A)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(A)}return e}],transformResponse:[function(e){let t=this.transitional||eI.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ea.isResponse(e)||ea.isReadableStream(e))return e;if(e&&ea.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw eA.from(e,eA.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eT.classes.FormData,Blob:eT.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ea.forEach(["delete","get","head","post","put","patch"],e=>{eI.headers[e]={}});let eQ=ea.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ej=Symbol("internals");function eL(e){return e&&String(e).trim().toLowerCase()}function e_(e){return!1===e||null==e?e:ea.isArray(e)?e.map(e_):String(e)}function eP(e,t,r,n,i){if(ea.isFunction(n))return n.call(this,t,r);if(i&&(t=r),ea.isString(t)){if(ea.isString(n))return -1!==t.indexOf(n);if(ea.isRegExp(n))return n.test(t)}}class eD{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=eL(t);if(!i)throw Error("header name must be a non-empty string");let a=ea.findKey(n,i);a&&void 0!==n[a]&&!0!==r&&(void 0!==r||!1===n[a])||(n[a||t]=e_(e))}let a=(e,t)=>ea.forEach(e,(e,r)=>i(e,r,t));if(ea.isPlainObject(e)||e instanceof this.constructor)a(e,t);else{let n;if(ea.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var o;let r,n,i,s;a((s={},(o=e)&&o.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||s[r]&&eQ[r]||("set-cookie"===r?s[r]?s[r].push(n):s[r]=[n]:s[r]=s[r]?s[r]+", "+n:n)}),s),t)}else if(ea.isObject(e)&&ea.isIterable(e)){let r={},n,i;for(let t of e){if(!ea.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?ea.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=eL(e)){let r=ea.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(ea.isFunction(t))return t.call(this,e,r);if(ea.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eL(e)){let r=ea.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eP(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=eL(e)){let i=ea.findKey(r,e);i&&(!t||eP(r,r[i],i,t))&&(delete r[i],n=!0)}}return ea.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eP(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return ea.forEach(this,(n,i)=>{let a=ea.findKey(r,i);if(a){t[a]=e_(n),delete t[i];return}let o=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();o!==i&&delete t[i],t[o]=e_(n),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ea.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ea.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[ej]=this[ej]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eL(e);if(!t[n]){let i;i=ea.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return ea.isArray(e)?e.forEach(n):n(e),this}}function eR(e,t){let r=this||eI,n=t||r,i=eD.from(n.headers),a=n.data;return ea.forEach(e,function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function eM(e){return!!(e&&e.__CANCEL__)}eD.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ea.reduceDescriptors(eD.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),ea.freezeMethods(eD);let eO=class extends eA{constructor(e,t,r){super(null==e?"canceled":e,eA.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function eN(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new eA("Request failed with status code "+r.status,[eA.ERR_BAD_REQUEST,eA.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}let eH=function(e,t){let r,n=Array(e=e||10),i=Array(e),a=0,o=0;return t=void 0!==t?t:1e3,function(s){let A=Date.now(),l=i[o];r||(r=A),n[a]=s,i[a]=A;let c=o,d=0;for(;c!==a;)d+=n[c++],c%=e;if((a=(a+1)%e)===o&&(o=(o+1)%e),A-r<t)return;let u=l&&A-l;return u?Math.round(1e3*d/u):void 0}},eV=function(e,t){let r,n,i=0,a=1e3/t,o=(t,a=Date.now())=>{i=a,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-i;s>=a?o(e,t):(r=e,n||(n=setTimeout(()=>{n=null,o(r)},a-s)))},()=>r&&o(r)]},eK=(e,t,r=3)=>{let n=0,i=eH(50,250);return eV(r=>{let a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-n,A=i(s);n=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:A||void 0,estimated:A&&o&&a<=o?(o-a)/A:void 0,event:r,lengthComputable:null!=o,[t?"download":"upload"]:!0})},r)},eG=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eW=e=>(...t)=>ea.asap(()=>e(...t)),ez=eT.hasStandardBrowserEnv?(i=new URL(eT.origin),a=eT.navigator&&/(msie|trident)/i.test(eT.navigator.userAgent),e=>(e=new URL(e,eT.origin),i.protocol===e.protocol&&i.host===e.host&&(a||i.port===e.port))):()=>!0,e$=eT.hasStandardBrowserEnv?{write(e,t,r,n,i,a,o){if("u"<typeof document)return;let s=[`${e}=${encodeURIComponent(t)}`];ea.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),ea.isString(n)&&s.push(`path=${n}`),ea.isString(i)&&s.push(`domain=${i}`),!0===a&&s.push("secure"),ea.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function eq(e,t,r){let n=!("string"==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t));return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let eX=e=>e instanceof eD?{...e}:e;function eY(e,t){t=t||{};let r={};function n(e,t,r,n){return ea.isPlainObject(e)&&ea.isPlainObject(t)?ea.merge.call({caseless:n},e,t):ea.isPlainObject(t)?ea.merge({},t):ea.isArray(t)?t.slice():t}function i(e,t,r,i){return ea.isUndefined(t)?ea.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function a(e,t){if(!ea.isUndefined(t))return n(void 0,t)}function o(e,t){return ea.isUndefined(t)?ea.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}let A={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
2dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,r)=>i(eX(e),eX(t),r,!0)};return ea.forEach(Object.keys({...e,...t}),function(n){if("__proto__"===n||"constructor"===n||"prototype"===n)return;let a=ea.hasOwnProp(A,n)?A[n]:i,o=a(e[n],t[n],n);ea.isUndefined(o)&&a!==s||(r[n]=o)}),r}let eJ=e=>{let t=eY({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=eD.from(o),t.url=ey(eq(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),ea.isFormData(r)){if(eT.hasStandardBrowserEnv||eT.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ea.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&o.set(e,r)})}}if(eT.hasStandardBrowserEnv&&(n&&ea.isFunction(n)&&(n=n(t)),n||!1!==n&&ez(t.url))){let e=i&&a&&e$.read(a);e&&o.set(i,e)}return t},eZ="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let i,a,o,s,A,l,c=eJ(e),d=c.data,u=eD.from(c.headers).normalize(),{responseType:h,onUploadProgress:p,onDownloadProgress:m}=c;function f(){s&&s(),A&&A(),c.cancelToken&&c.cancelToken.unsubscribe(i),c.signal&&c.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function y(){if(!g)return;let n=eD.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());eN(function(e){t(e),f()},function(e){r(e),f()},{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(c.method.toUpperCase(),c.url,!0),g.timeout=c.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||4!==g.readyState||(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(r(new eA("Request aborted",eA.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){let n=new eA(t&&t.message?t.message:"Network Error",eA.ERR_NETWORK,e,g);n.event=t||null,r(n),g=null},g.ontimeout=function(){let t=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded",n=c.transitional||ex;c.timeoutErrorMessage&&(t=c.timeoutErrorMessage),r(new eA(t,n.clarifyTimeoutError?eA.ETIMEDOUT:eA.ECONNABORTED,e,g)),g=null},void 0===d&&u.setContentType(null),"setRequestHeader"in g&&ea.forEach(u.toJSON(),function(e,t){g.setRequestHeader(t,e)}),ea.isUndefined(c.withCredentials)||(g.withCredentials=!!c.withCredentials),h&&"json"!==h&&(g.responseType=c.responseType),m&&([o,A]=eK(m,!0),g.addEventListener("progress",o)),p&&g.upload&&([a,s]=eK(p),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",s)),(c.cancelToken||c.signal)&&(i=t=>{g&&(r(!t||t.type?new eO(null,e,g):t),g.abort(),g=null)},c.cancelToken&&c.cancelToken.subscribe(i),c.signal&&(c.signal.aborted?i():c.signal.addEventListener("abort",i)));let b=(n=c.url,(l=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&l[1]||"");b&&-1===eT.protocols.indexOf(b)?r(new eA("Unsupported protocol "+b+":",eA.ERR_BAD_REQUEST,e)):g.send(d||null)})},e0=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},e1=async function*(e,t){for await(let r of e2(e))yield*e0(r,t)},e2=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},e4=(e,t,r,n)=>{let i,a=e1(e,t),o=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await a.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},{isFunction:e3}=ea,e5=(({Request:e,Response:t})=>({Request:e,Response:t}))(ea.global),{ReadableStream:e6,TextEncoder:e8}=ea.global,e7=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},e9=e=>{let t,{fetch:r,Request:n,Response:i}=e=ea.merge.call({skipUndefined:!0},e5,e),a=r?e3(r):"function"==typeof fetch,o=e3(n),s=e3(i);if(!a)return!1;let A=a&&e3(e6),l=a&&("function"==typeof e8?(t=new e8,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=o&&A&&e7(()=>{let e=!1,t=new n(eT.origin,{body:new e6,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&A&&e7(()=>
2ea.isReadableStream(new i("").body)),u={stream:d&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{u[e]||(u[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new eA(`Response type '${e}' is not supported`,eA.ERR_NOT_SUPPORT,r)})});let h=async e=>{if(null==e)return 0;if(ea.isBlob(e))return e.size;if(ea.isSpecCompliantForm(e)){let t=new n(eT.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ea.isArrayBufferView(e)||ea.isArrayBuffer(e)?e.byteLength:(ea.isURLSearchParams(e)&&(e+=""),ea.isString(e))?(await l(e)).byteLength:void 0},p=async(e,t)=>{let r=ea.toFiniteNumber(e.getContentLength());return null==r?h(t):r};return async e=>{let t,{url:a,method:s,data:A,signal:l,cancelToken:h,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:y,headers:b,withCredentials:x="same-origin",fetchOptions:w}=eJ(e),v=r||fetch;y=y?(y+"").toLowerCase():"text";let C=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof eA?t:new eO(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new eA(`timeout of ${t}ms exceeded`,eA.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:s}=n;return s.unsubscribe=()=>ea.asap(o),s}})([l,h&&h.toAbortSignal()],m),B=null,S=C&&C.unsubscribe&&(()=>{C.unsubscribe()});try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(t=await p(b,A))){let e,r=new n(a,{method:"POST",body:A,duplex:"half"});if(ea.isFormData(A)&&(e=r.headers.get("content-type"))&&b.setContentType(e),r.body){let[e,n]=eG(t,eK(eW(g)));A=e4(r.body,65536,e,n)}}ea.isString(x)||(x=x?"include":"omit");let r=o&&"credentials"in n.prototype,l={...w,signal:C,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:A,duplex:"half",credentials:r?x:void 0};B=o&&new n(a,l);let h=await (o?v(B,w):v(a,l)),m=d&&("stream"===y||"response"===y);if(d&&(f||m&&S)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});let t=ea.toFiniteNumber(h.headers.get("content-length")),[r,n]=f&&eG(t,eK(eW(f),!0))||[];h=new i(e4(h.body,65536,r,()=>{n&&n(),S&&S()}),e)}y=y||"text";let k=await u[ea.findKey(u,y)||"text"](h,e);return!m&&S&&S(),await new Promise((t,r)=>{eN(t,r,{data:k,headers:eD.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:B})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new eA("Network Error",eA.ERR_NETWORK,e,B,t&&t.response),{cause:t.cause||t});throw eA.from(t,t&&t.code,e,B,t&&t.response)}}},te=new Map,tt=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,a=[n,i,r],o=a.length,s,A,l=te;for(;o--;)s=a[o],void 0===(A=l.get(s))&&l.set(s,A=o?new Map:e9(t)),l=A;return A};tt();let tr={http:null,xhr:eZ,fetch:{get:tt}};ea.forEach(tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let tn=e=>`- ${e}`,ti=e=>ea.isFunction(e)||null===e||!1===e,ta=function(e,t){let r,n,{length:i}=e=ea.isArray(e)?e:[e],a={};for(let o=0;o<i;o++){let i;if(n=r=e[o],!ti(r)&&void 0===(n=tr[(i=String(r)).toLowerCase()]))throw new eA(`Unknown adapter '${i}'`);if(n&&(ea.isFunction(n)||(n=n.get(t))))break;a[i||"#"+o]=n}if(!n){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new eA("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(tn).join("\n"):" "+tn(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function to(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eO(null,e)}function ts(e){return to(e),e.headers=eD.from(e.headers),e.data=eR.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ta(e.adapter||eI.adapter,e)(e).then(function(t){return to(e),t.data=eR.call(e,e.transformResponse,t),t.headers=eD.from(t.headers),t},function(t){return!eM(t)&&(to(e),t&&t.response&&(t.response.data=eR.call(e,e.transformResponse,t.response),t.response.headers=eD.from(t.response.headers))),Promise.reject(t)})}let tA="1.13.6",tl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tc={};tl.transitional=function(e,t,r){function n(e,t){return"[Axios v"+tA+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>
2{if(!1===e)throw new eA(n(i," has been removed"+(t?" in "+t:"")),eA.ERR_DEPRECATED);return t&&!tc[i]&&(tc[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}},tl.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let td=function(e,t,r){if("object"!=typeof e)throw new eA("options must be an object",eA.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let a=n[i],o=t[a];if(o){let t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new eA("option "+a+" must be "+r,eA.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new eA("Unknown option "+a,eA.ERR_BAD_OPTION)}};class tu{constructor(e){this.defaults=e||{},this.interceptors={request:new eb,response:new eb}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:a,headers:o}=t=eY(this.defaults,t);void 0!==i&&td(i,{silentJSONParsing:tl.transitional(tl.boolean),forcedJSONParsing:tl.transitional(tl.boolean),clarifyTimeoutError:tl.transitional(tl.boolean),legacyInterceptorReqResOrdering:tl.transitional(tl.boolean)},!1),null!=a&&(ea.isFunction(a)?t.paramsSerializer={serialize:a}:td(a,{encode:tl.function,serialize:tl.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),td(t,{baseUrl:tl.spelling("baseURL"),withXsrfToken:tl.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&ea.merge(o.common,o[t.method]);o&&ea.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=eD.concat(s,o);let A=[],l=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;l=l&&e.synchronous;let r=t.transitional||ex;r&&r.legacyInterceptorReqResOrdering?A.unshift(e.fulfilled,e.rejected):A.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let d=0;if(!l){let e=[ts.bind(this),void 0];for(e.unshift(...A),e.push(...c),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=A.length;let u=t;for(;d<n;){let e=A[d++],t=A[d++];try{u=e(u)}catch(e){t.call(this,e);break}}try{r=ts.call(this,u)}catch(e){return Promise.reject(e)}for(d=0,n=c.length;d<n;)r=r.then(c[d++],c[d++]);return r}getUri(e){return ey(eq((e=eY(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}ea.forEach(["delete","get","head","options"],function(e){tu.prototype[e]=function(t,r){return this.request(eY(r||{},{method:e,url:t,data:(r||{}).data}))}}),ea.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(eY(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tu.prototype[e]=t(),tu.prototype[e+"Form"]=t(!0)});class th{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eO(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new th(function(t){e=t}),cancel:e}}}let tp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
2setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tp).forEach(([e,t])=>{tp[t]=e});let tm=function e(t){let r=new tu(t),n=b(tu.prototype.request,r);return ea.extend(n,tu.prototype,r,{allOwnKeys:!0}),ea.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eY(t,r))},n}(eI);async function tf(e,t,r){e.log(["Execute Steps: Sending signature to Hyperliquid",t],d.Verbose);let{r:n,s:i,v:a}=(0,g.parseSignature)(t),o=r?.data?.sign?.value,s=o?.nonce??o?.time,A=await tm.post("https://api.hyperliquid.xyz/exchange",{signature:{r:n,s:i,v:Number(a??0n)},nonce:s,action:o});if(!A||!A.data||A&&200!==A.status||"ok"!=A.data.status)throw"Failed to send signature to HyperLiquid";return e.log(["Execute Steps: Signature sent to Hyperliquid",A.data],d.Verbose),A.data}function tg(e,t){return e.map(e=>{if("hyperliquid-signature"===e.id)return e;if("signature"===e.kind)return{...e,items:e.items?.map(e=>({...e,data:{...e.data,sign:{...e.data.sign,domain:{...e.data.sign.domain,chainId:t}},...e.data.post&&{post:{...e.data.post,body:{...e.data.post.body,signatureChainId:t}}}}}))};if("transaction"===e.kind){let r,n,i,a;return r=e?.items?.[0],n=r?.data?.action,i=r?.data?.eip712Types,a=r?.data?.eip712PrimaryType,{id:"hyperliquid-signature",action:"Confirm transaction in your wallet",description:"Sign a message to confirm the transaction",kind:"signature",items:[{status:"incomplete",data:{sign:{signatureKind:"eip712",domain:{name:"HyperliquidSignTransaction",version:"1",chainId:t,verifyingContract:"0x0000000000000000000000000000000000000000"},types:{...i,EIP712Domain:[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}]},primaryType:a,value:{...n.parameters,type:n.type,signatureChainId:`0x${t.toString(16)}`}}},check:{endpoint:`/intents/status?requestId=${e?.requestId}`,method:"GET"}}],requestId:e?.requestId,depositAddress:e?.depositAddress}}return e})}function ty(e={}){return tw.request(e)}function tb(e){return e&&"APIError"===e.cause}tm.Axios=tu,tm.CanceledError=eO,tm.CancelToken=th,tm.isCancel=eM,tm.VERSION=tA,tm.toFormData=eh,tm.AxiosError=eA,tm.Cancel=tm.CanceledError,tm.all=function(e){return Promise.all(e)},tm.spread=function(e){return function(t){return e.apply(null,t)}},tm.isAxiosError=function(e){return ea.isObject(e)&&!0===e.isAxiosError},tm.mergeConfig=eY,tm.AxiosHeaders=eD,tm.formToJSON=e=>eU(ea.isHTMLForm(e)?new FormData(e):e),tm.getAdapter=ta,tm.HttpStatusCode=tp,tm.default=tm,e.s(["default",0,tm],581949);class tx extends Error{constructor(e="Unknown Reason",t,r,n="APIError",i={}){super(e,{...i,cause:"APIError"}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"rawError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endpoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="APIError",this.type=n,this.statusCode=t,this.endpoint=r?.endpoint,this.rawError=r}}let tw=tm.create();tw.interceptors.response.use(e=>("true"===e.headers.Deprecation&&console.warn(`Warning: API ${e.config.url} is deprecated. Stability and performance may be affected.`),e),e=>Promise.reject(new tx(e.response?.data?.message||e.response?.data?.error,e.response?.data?.statusCode||500,{...e.response?.data,endpoint:e.config?.url})));let tv="https://api.relay.link",tC="https://api.testnets.relay.link",tB="https://assets.relay.link",tS="wss://ws.relay.link";e.s(["ASSETS_RELAY_API",0,tB,"MAINNET_RELAY_API",0,tv,"MAINNET_RELAY_WS",0,tS,"TESTNET_RELAY_API",0,tC],994661);let tk=[tv,tC];function tE(e){return tk.some(t=>e.startsWith(t))}function tF(e,t){return e?.apiKey&&tE(t??e.baseApiUrl)?{"x-api-key":e.apiKey}:{}}async function tT({stepItem:e,step:t,wallet:r,setState:n,request:i,
2client:a,json:o,maximumAttempts:s,pollingInterval:A,chain:l,onWebsocketFailed:c}){let u;if(!e.data)throw"Step item is missing data";let h=e.data.sign,p=e.data.post;if(a.log(["Execute Steps: Begin signature step"],d.Verbose),h&&(e.progressState="signing",n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details}),(u=await r.handleSignMessageStep(e,t))&&(i.params={...i.params,signature:u})),1337===l.id&&u&&t?.id==="hyperliquid-signature"&&await tf(a,u,e),p){a.log(["Execute Steps: Posting order"],d.Verbose),e.progressState="posting",n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details});let t=new URL(`${i.baseURL}${p.endpoint}`),r={"Content-Type":"application/json",...tF(a,i.baseURL),"relay-sdk-version":a.version??"unknown"};p.body&&!p.body.referrer&&(p.body.referrer=a.source);try{let s=await tw.request({url:t.href,data:p.body?JSON.stringify(p.body):void 0,method:p.method,params:i.params,headers:r});if(s.data&&s.data.steps&&Array.isArray(s.data.steps)){o.steps=[...o.steps,...s.data.steps],n({steps:[...o.steps,...s.data.steps],fees:{...o.fees},breakdown:o.breakdown,details:o.details}),a.log([`Execute Steps: New steps appended from ${p.endpoint}`,s.data.steps],d.Verbose);return}if(s.status>299||s.status<200)throw s.data;s.data.results?e.orderData=s.data.results:s.data&&s.data.orderId&&(e.orderData=[{orderId:s.data.orderId,crossPostingOrderId:s.data.crossPostingOrderId,orderIndex:s.data.orderIndex||0}]),n({steps:[...o?.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})}catch(e){throw e}}if(e?.check){e.progressState="validating",e.isValidatingSignature=!0,n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details});let t={"Content-Type":"application/json",...tF(a,i.baseURL),"relay-sdk-version":a.version??"unknown"};if(c){a.log(["Waiting for WebSocket to fail before starting signature validation polling"],d.Verbose);try{await c(),a.log(["WebSocket failed, starting signature polling"],d.Verbose)}catch(e){a.log(["WebSocket failed promise rejected, skipping signature polling"],d.Verbose);return}}let r=async()=>{let r=()=>{n({steps:[...o?.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})},c=(t,r)=>{e.internalTxHashes=t.map(e=>({txHash:e,chainId:r??l?.id}))},u=(t,r)=>{e.txHashes=t.map(e=>({txHash:e,chainId:r??l?.id}))},h=0;for(;h<s;)try{let n=e?.check?.endpoint||"";n.includes("/intents/status")&&!n.includes("/v3")&&(n=n.replace("/intents/status","/intents/status/v3"));let o=await tw.request({url:`${i.baseURL}${n}`,method:e?.check?.method,headers:t,validateStatus:e=>e<500});if(o?.data?.status==="pending")o?.data?.inTxHashes&&o.data.inTxHashes.length>0&&c(o.data.inTxHashes,o.data.originChainId),e.checkStatus="pending",e.progressState=void 0,e.isValidatingSignature=!1,r(),a.log(["Origin tx confirmed, backend processing"],d.Verbose);else if(o?.data?.status==="submitted")o?.data?.txHashes&&o.data.txHashes.length>0&&u(o.data.txHashes,o.data.destinationChainId),o?.data?.inTxHashes&&o.data.inTxHashes.length>0&&c(o.data.inTxHashes,o.data.originChainId),e.checkStatus="submitted",e.progressState=void 0,e.isValidatingSignature=!1,r(),a.log(["Destination tx submitted, continuing validation"],d.Verbose);else if(o?.data?.status==="success"&&o?.data?.txHashes){u(o.data.txHashes,o.data.destinationChainId),o?.data?.inTxHashes&&(e.internalTxHashes=o.data.inTxHashes.map(e=>({txHash:e,chainId:l?.id??o.data.originChainId}))),e.checkStatus="success",e.status="complete",e.progressState="complete",r(),a.log(["Transaction completed successfully"],d.Verbose);return}else if(o?.data?.status==="failure")throw Error(o?.data?.details||"Transaction failed");else if(o.status>=400)throw Error(o?.data?.details||o?.data?.message||"Failed to check");h++,await new Promise(e=>setTimeout(e,A))}catch(e){if(e.message&&(e.message.includes("Transaction failed")||e.message.includes("Failed to check")||"Failed to check"===e.message))throw e;a.log(["Check request failed, retrying...",e],d.Verbose),h++,await new Promise(e=>setTimeout(e,A))}throw Error(`Failed to get an ok response after ${h} attempt(s), aborting`)};await r()}}
2class tU extends Error{constructor(e,t,r){super(`Deposit transaction with hash '${e}' and request id '${t}' is pending after ${r} attempt(s).`),Object.defineProperty(this,"txHash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="DepositTransactionTimeoutError",this.txHash=e,this.requestId=t}}class tI extends Error{constructor(e,t,r){super(`Failed to receive a successful response for solver status check with hash '${e}' and request id '${t}' after ${r} attempt(s).`),Object.defineProperty(this,"txHash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="SolverStatusTimeoutError",this.txHash=e,this.requestId=t}}class tQ extends Error{constructor(e,t,r){super(e),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tenderlyError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TransactionConfirmationError",this.receipt=t,this.tenderlyError=r??void 0}}async function tj(e,t=15,r=0,n=5e3){if(r>=t)throw`Failed to get an ok response after ${r} attempt(s), aborting`;if(await e())return!0;await new Promise(e=>setTimeout(e,n)),r++,await tj(e,t,r,n)}async function tL(e,r,n,i,a,o,s,A,l,c,u,h,p,m,f){let g,y,b=t;try{await tj(async()=>await i.getChainId()===e,10,void 0,250)}catch(r){let t=await i.getChainId();throw`Current chain id: ${t} does not match expected chain id: ${e} `}let x=!1,w=!1,v=b.pollingInterval??5e3,C=b.maxPollingAttemptsBeforeTimeout??15e4/v,B=!0,S=0,k=!!(Array.isArray(r)&&r.length>1&&i.handleBatchTransactionStep);if("null"===(y=k?await i.handleBatchTransactionStep?.(e,r,n):await i.handleSendTransactionStep(e,Array.isArray(r)?r[0]:r,n)))throw"User rejected the request";let E=Array.isArray(r)?r.find(e=>e.check)?.check:r.check;if(tP({txHash:y,chainId:e,step:n,request:A,headers:l,source:b.source}),!y||k||Array.isArray(r)||e!==h?.currencyOut?.currency?.chainId||t_({calldata:JSON.stringify({...r.data,txHash:y}),chainId:e,step:n,request:A,headers:l,source:b.source}),!y)throw Error("Transaction hash not returned from handleSendTransactionStep method");a([{txHash:y,chainId:e,isBatchTx:k}]);let F=r=>{if(t?.log(["Execute Steps: Polling for confirmation",JSON.stringify(r.data,null,2)],d.Verbose),m?.(r.data?.status),200===r.status&&r.data&&"failure"===r.data.status)throw Error("Transaction failed");if(200===r.status&&r.data&&"fallback"===r.data.status||200===r.status&&r.data&&"refund"===r.data.status)throw Error("Transaction failed: Refunded");return 200===r.status&&r.data&&"pending"===r.data.status?(r.data.inTxHashes&&r.data.inTxHashes.length>0&&o(r.data.inTxHashes.map(t=>({txHash:t,chainId:r.data.originChainId??e,isBatchTx:k}))),!1):200===r.status&&r.data&&"submitted"===r.data.status?(r.data.txHashes&&r.data.txHashes.length>0&&a(r.data.txHashes.map(e=>({txHash:e,chainId:r.data.destinationChainId??c}))),r.data.inTxHashes&&r.data.inTxHashes.length>0&&o(r.data.inTxHashes.map(t=>({txHash:t,chainId:r.data.originChainId??e,isBatchTx:k}))),h?.currencyOut?.currency?.chainId===8253038):200===r.status&&!!r.data&&"success"===r.data.status&&(y?o([{txHash:y,chainId:e,isBatchTx:k}]):r?.data?.inTxHashes&&o(r.data?.inTxHashes?.map(t=>({txHash:t,chainId:r?.data?.originChainId??e,isBatchTx:k}))),r.data?.txHashes&&r.data.txHashes.length>0&&a(r.data.txHashes.map(e=>({txHash:e,chainId:r?.data?.destinationChainId??c}))),m?.("success"),!0)},T=async e=>{if(u?.(),s)try{await s(),b.log(["WebSocket failed, starting polling"],d.Verbose)}catch(e){b.log(["WebSocket failed promise rejected, skipping polling"],d.Verbose);return}for(;B&&S<C&&!x&&!w;){let r;if(b.log(["Polling for confirmation"],d.Verbose),E?.endpoint&&!A?.data?.useExternalLiquidity){let e=E?.endpoint;e.includes("/intents/status")&&!e.includes("/v3")&&(e=e.replace("/intents/status","/intents/status/v3")),b.source&&!e.includes("referrer")&&E?.method==="GET"&&(e=e.includes("?")?`${e}&referrer=${b.source}`:`${e}?referrer=${b.source}`);try{r=await tw.request({url:`${A.baseURL}${e}`,method:E?.method,headers:{...tF(b,A.baseURL),...l}})}catch(e){t?.log(["Execute Steps: Polling for confirmation api error",e],d.Verbose),r={data:{},status:200,statusText:"OK",headers:{},config:{headers:{}}}}}r?.data?.status==="pending"&&B&&e?.abort(),!r||F(r)?B=!1:r&&("pending"!==r.data.status&&(u?.(r),S++),await new Promise(e=>setTimeout(e,v)))}if(S>=C)if(g)throw new tI(y,n.requestId??"",S);else throw new tU(y,n.requestId??"",S);if(x)throw Error("Transaction was cancelled");return!0},U=()=>{let o=new AbortController,s=o.signal;return{promise:i.handleConfirmTransactionStep(y,e,i=>{!s.aborted&&(a([{txHash:i,chainId:e}]),y=i,S=0,t?.log(["Transaction replaced",i],d.Verbose),tP({txHash:i,chainId:e,step:n,request:A,headers:l,source:b.source}),k||Array.isArray(r)||e!==h?.currencyOut?.currency?.chainId||t_({calldata:JSON.stringify({...r.data,replacementTxHash:i}),chainId:e,step:n,request:A,headers:l,source:b.source}))},()=>{s.aborted||(x=!0,t?.log(["Transaction cancelled"],d.Verbose))}).then(e=>{if(!s.aborted){if(g=e,p?.(g),g&&"object"==typeof g&&"status"in g&&"reverted"===g.status)throw"Transaction Reverted";t?.log(["Transaction Receipt obtained",g],d.Verbose)}}).catch(async r=>{let n;if(s.aborted)return;let i=null;if(g&&g.transactionHash&&(i=await (n=g.transactionHash,new Promise(t=>{tw.get(`https://api.tenderly.co/api/v1/public-contract/${e}/trace/${n}`,{timeout:5e3}).then(e=>{if(e&&e.data){if(e.data.stack_trace&&e.data.stack_trace.length>0){let r=e.data.stack_trace.find(e=>e.error_message);if(r)return void t({error_message:r.error_message,error:r.error})}if(e.data.call_trace){if(e.data.call_trace.error_message)return void t({error_message:e.data.call_trace.error_message,error:e.data.call_trace.error});if(e.data.call_trace.calls&&Array.isArray(e.data.call_trace.calls)){let r=e.data.call_trace.calls.find(e=>e&&e.error_message);if(r)return void t({error_message:r.error_message,error:r.error})}if(e.data.call_trace.error)return void t({error:e.data.call_trace.error})}}t(null)}
2).catch(e=>{console.warn(`Tenderly api failed: ${e}`),t(null)})}))),t?.log(["Error in handleConfirmTransactionStep",r],d.Error),"Transaction cancelled"===r.message)x=!0;else throw w=!0,new tQ(r,g,i)}),controller:o}};if(8253038===e)return!0;if(k)await T();else if("approve"===n.id||h?.currencyOut?.currency?.chainId===8253038||A?.data?.useExternalLiquidity)await U().promise,A?.data?.useExternalLiquidity||await T();else{let{promise:t,controller:r}=U(),n=T(r);await Promise.race([t,n]);let i=h?.currencyOut?.currency?.chainId===e;B&&(i?(B=!1,f&&(f.lastKnownStatus="success")):await n),g||(E?r.abort():await t)}return!0}let t_=async({calldata:e,chainId:r,request:n,headers:i,step:a,source:o})=>{if(e&&a.requestId&&r){t?.log(["Posting same chain transaction to notify the solver"],d.Verbose);try{let s={tx:e,chainId:r.toString(),requestId:a.requestId,referrer:o};tw.request({url:`${n.baseURL}/transactions/single`,method:"POST",headers:{...tF(t,n.baseURL),...i},data:s}).then(()=>{t?.log(["Same chain transaction notified to the solver"],d.Verbose)})}catch(e){t?.log(["Failed to post same chain transaction to solver",e],d.Warn)}}},tP=async({txHash:e,chainId:r,request:n,headers:i,step:a,source:o})=>{if("deposit"===a.id&&e){t?.log(["Posting transaction to notify the solver"],d.Verbose);try{let a={txHash:e,chainId:r.toString(),referrer:o};tw.request({url:`${n.baseURL}/transactions/index`,method:"POST",headers:{...tF(t,n.baseURL),...i},data:a}).then(()=>{t?.log(["Transaction notified to the solver"],d.Verbose)})}catch(e){t?.log(["Failed to post transaction to solver",e],d.Warn)}}};async function tD({stepItem:e,step:t,wallet:r,setState:n,request:i,client:a,json:o,chainId:s,isAtomicBatchSupported:A,incompleteStepItemIndex:l,stepItems:c,onWebsocketFailed:u,statusControl:h}){if(!e.data)throw"Step item is missing data";a.log(["Execute Steps: Begin transaction step for, sending transaction"],d.Verbose);let p=e.data?.chainId??s;e.progressState="confirming",n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details});let m=A&&0===l?c:e;await tL(p,m,t,r,t=>{a.log(["Execute Steps: Transaction step, got transactions",t],d.Verbose),e.txHashes=t,n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})},t=>{e.internalTxHashes=t,n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})},u,i,{"relay-sdk-version":a.version??"unknown"},s,()=>{e.progressState="validating",n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})},o?.details,t=>{e.receipt=t,n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details})},t=>{t!=e.checkStatus&&(e.checkStatus=t,("pending"===t||"submitted"===t||"success"===t)&&(e.progressState=void 0),n({steps:[...o.steps],fees:{...o?.fees},breakdown:o?.breakdown,details:o?.details}))},h)}function tR(e,t){e.forEach(e=>{"incomplete"===e.status&&t(e)})}function tM(e,t,r){e.websocketFailureTimeoutId&&(clearTimeout(e.websocketFailureTimeoutId),e.websocketFailureTimeoutId=null,t.log([`Cleared failure timeout: ${r}`],d.Verbose))}async function tO(e,r={},n,i,a,o,s){let A=t;A?.baseApiUrl&&(r.baseURL=A.baseApiUrl),r.headers?r.headers["relay-sdk-version"]=A.version??"unknown":r.headers={"relay-sdk-version":A.version??"unknown"};let l=A.pollingInterval??5e3,c=A.maxPollingAttemptsBeforeTimeout??15e4/l,u=A.chains.find(t=>t.id===e);if(!u)throw`Unable to find chain: Chain id ${e}`;let h=a,p=!1,m=s||{websocketActive:!1,websocketConnected:!1,closeWebSocket:void 0,lastKnownStatus:void 0,websocketFailureTimeoutId:null},f=null,g=null,y=null,b=null,x=()=>(y||(y=new Promise(e=>{b=e})),y);try{var w,v,C;let t,a,s,B;if(h.error||!h.steps)throw h;if(t=(w=h.steps)[0],a=w[1],s=t?.items?.some(e=>"incomplete"===e.status),B=a?.items?.some(e=>"incomplete"===e.status),t?.id==="approve"&&(a?.id==="deposit"||a?.id==="swap")&&s&&B&&(p=!!(n?.supportsAtomicBatch&&await n?.supportsAtomicBatch(e)))){let e,t=(v=h.steps,e=v[1]?.id,{id:`approve-and-${e}`,action:"Confirm transaction in your wallet",description:`Batching approval and ${e} transactions`,kind:"transaction",items:[...v[0].items||[],...(v[1].items||[]).map(e=>(e.status="complete",e.progressState="complete",e))],requestId:v[1].requestId??v[0].requestId});h.steps=[t]}if(1337===e){let e=await n?.getChainId();h.steps=tg(h.steps,e)}i({steps:[...h?.steps],fees:{...h?.fees},breakdown:h?.breakdown,details:h?.details});let S=-1,k=-1;if(h.steps.find((e,t)=>!!e.items&&((k=e.items.findIndex(e=>"incomplete"==e.status),-1!==k)?(S=t,!0):void 0)),-1===S)return A.log(["Execute Steps: all steps complete"],d.Verbose),m.closeWebSocket?.(),tN(m,A),h;let E=h.steps[S];if(o&&o[E.id]){let e=o[E.id];E.items?.forEach(t=>
2{e.gasLimit&&(t.data.gas=e.gasLimit)})}let F=h.steps[S].items;if(!F)return A.log(["Execute Steps: skipping step, no items in step"],d.Verbose),h;let T=S===h.steps.length-1,U=F.some(e=>"incomplete"===e.status),I=(C=h.steps,C?.length&&C.find(e=>e.requestId)?.requestId||null);A.websocketEnabled&&I&&T&&U&&!m.websocketActive&&8253038!==e&&(m.websocketActive=!0,y=new Promise(e=>{b=e}),f=new Promise((e,t)=>{g=t}),m.closeWebSocket=function({event:e,requestId:t,onOpen:r,onUpdate:n,onError:i,onClose:a,url:o,enabled:s=!1}){if(!s||"u"<typeof window||void 0===window.WebSocket)return{close:()=>{}};let A=new WebSocket(o||tS),l=setTimeout(()=>{A.readyState===WebSocket.CONNECTING&&(A.close(),i?.(Error("WebSocket connection timeout")))},2e3);return A.onopen=()=>{clearTimeout(l),r&&r(),A.send(JSON.stringify({type:"subscribe",event:e,filters:{id:t}}))},A.onmessage=async t=>{try{let r;r=t.data instanceof Blob?await t.data.text():t.data;let i=JSON.parse(r);"connection"===i.type||"subscribe"===i.type||(i.event===e&&i.data?n(i.data):i.data?.event===e&&i.data?.data&&n(i.data.data))}catch(e){i?.(e)}},A.onerror=e=>{clearTimeout(l),i?.(e)},A.onclose=()=>{clearTimeout(l),a?.()},{close:()=>{clearTimeout(l),A.close()}}}({event:"request.status.updated",requestId:I,enabled:!0,url:A.websocketUrl,onOpen:()=>{A.log(["Websocket open"],d.Verbose),m.websocketConnected=!0},onUpdate:t=>{!function({data:e,stepItems:t,chainId:r,setState:n,json:i,client:a,statusControl:o,onTerminalError:s}){if(o.lastKnownStatus=e.status,"failure"!==e.status&&tM(o,a,`status changed to ${e.status}`),A=e.status,["success","refund"].includes(A))switch(a.log(["WebSocket received terminal status: ",e.status],d.Verbose),o.closeWebSocket?.(),e.status){case"success":var A,l,c,u,h,p,m,f,g=e,y=t,b=r,x=n,w=i,v=a;if(g.txHashes&&g.txHashes.length>0){let e=g.txHashes.map(e=>({txHash:e,chainId:g.destinationChainId??b}));tR(y,t=>{t.txHashes=e})}if(g.inTxHashes&&g.inTxHashes.length>0){let e=g.inTxHashes.map(e=>({txHash:e,chainId:g.originChainId??b}));tR(y,t=>{t.internalTxHashes=e})}tR(y,e=>{e.status="complete",e.progressState="complete",e.checkStatus="success"}),x({steps:[...w.steps],fees:{...w?.fees},breakdown:w?.breakdown,details:w?.details}),v.log(["WebSocket: Step completed successfully",g],d.Verbose);break;case"refund":let C;
2l=a,c=t,u=s,l.log(["WebSocket: transaction refunded"],d.Verbose),tR(c,e=>{e.checkStatus="refund"}),C=Error("Transaction failed: Refunded"),u?.(C)}else{"pending"===e.status?(a.log(["WebSocket received pending status"],d.Verbose),function(e,t,r,n,i){if(e.inTxHashes&&e.inTxHashes.length>0){let r=e.inTxHashes.map(t=>({txHash:t,chainId:e.originChainId??e.destinationChainId}));tR(t,e=>{e.internalTxHashes=r})}tR(t,e=>{e.checkStatus="pending",e.progressState=void 0,e.isValidatingSignature=!1}),r({steps:[...n.steps],fees:{...n?.fees},breakdown:n?.breakdown,details:n?.details}),i.log(["WebSocket: Origin tx confirmed, backend processing",e],d.Verbose)}(e,t,n,i,a)):"submitted"===e.status?(a.log(["WebSocket received submitted status"],d.Verbose),function(e,t,r,n,i){if(e.txHashes&&e.txHashes.length>0){let r=e.txHashes.map(t=>({txHash:t,chainId:e.destinationChainId??e.originChainId}));tR(t,e=>{e.txHashes=r})}if(e.inTxHashes&&e.inTxHashes.length>0){let r=e.inTxHashes.map(t=>({txHash:t,chainId:e.originChainId??e.destinationChainId}));tR(t,e=>{e.internalTxHashes=r})}tR(t,e=>{e.checkStatus="submitted",e.progressState=void 0,e.isValidatingSignature=!1}),r({steps:[...n.steps],fees:{...n?.fees},breakdown:n?.breakdown,details:n?.details}),i.log(["WebSocket: Step submitted to relay, waiting for completion",e],d.Verbose)}(e,t,n,i,a)):"failure"===e.status&&(h=t,p=a,m=o,f=s,tM(m,p,"new failure status received"),p.log(["WebSocket received failure status, waiting 2 seconds for potential status change"],d.Verbose),m.websocketFailureTimeoutId=setTimeout(()=>{if(m.websocketFailureTimeoutId&&"failure"===m.lastKnownStatus){let e;p.log(["WebSocket: 2-second timeout expired, treating failure as terminal"],d.Error),m.websocketFailureTimeoutId=null,p.log(["WebSocket: transaction failed"],d.Error),tR(h,e=>{e.checkStatus="failure"}),e=Error("Transaction failed"),f?.(e)}else p.log(["WebSocket: Failure timeout cancelled due to status change"],d.Verbose)},2e3))}}({data:t,stepItems:F,chainId:e,setState:i,json:h,client:A,statusControl:m,onTerminalError:e=>{g?.(e)}})},onError:e=>{["success","refund"].includes(m.lastKnownStatus||"")||(A.log(["Websocket connection error, falling back to polling",e],d.Verbose),m.websocketActive=!1,m.websocketConnected=!1,tN(m,A),b?.())},onClose:()=>{A.log(["Websocket closed"],d.Verbose),tN(m,A),["success","refund"].includes(m.lastKnownStatus||"")||F[0].error||(A.log(["Re-enabling polling due to unexpected WebSocket closure"],d.Verbose),b?.())}}).close);let{kind:Q}=E;A.log([`Execute Steps: Begin processing step items for: ${E.action}`],d.Verbose);let j=F.filter(e=>"incomplete"===e.status).map(t=>new Promise(async(a,o)=>{try{let o=(async()=>{switch(Q){case"transaction":await tD({stepItem:t,step:E,wallet:n,setState:i,request:r,client:A,json:h,chainId:e,isAtomicBatchSupported:p,incompleteStepItemIndex:k,stepItems:F,onWebsocketFailed:m.websocketActive?x:null,statusControl:m});break;case"signature":await tT({stepItem:t,step:E,wallet:n,setState:i,request:r,client:A,json:h,maximumAttempts:c,pollingInterval:l,chain:u,onWebsocketFailed:m.websocketActive?x:null});break;default:throw Error(`Unknown step kind: ${Q}. Expected 'signature' or 'transaction'`)}})();m.websocketActive&&f?await Promise.race([o,f]):await o,t.status="complete",t.progressState="complete",t.isValidatingSignature=!1,i({steps:[...h?.steps],fees:{...h?.fees},breakdown:h?.breakdown,details:h?.details}),a(t)}catch(r){let e=r?r.message:"Error: something went wrong";r&&h?.steps&&(h.steps[S].error=e,t.error=e,t.errorData=r?.response?.data||r,t.isValidatingSignature=!1,i({steps:[...h?.steps],fees:{...h?.fees},breakdown:h?.breakdown,details:h?.details})),o(r)}}));await Promise.all(j);let L=await tO(e,r,n,i,h,o,m);return m.closeWebSocket?.(),tN(m,A),L}catch(r){A.log(["Execute Steps: An error occurred",r],d.Error),m.closeWebSocket?.(),tN(m,A);let e=r&&r?.response?.data?r.response.data:r,t=!1;throw e&&e.message?t=e.message.includes("Refunded"):e&&e.includes&&(t=e.includes("Refunded")),h?(h.error=e,i({steps:h.steps?[...h.steps]:[{}],fees:{...h?.fees},breakdown:h?.breakdown,details:h?.details,refunded:t,error:e})):i(h={error:e,steps:[],refunded:t}),r}}function tN(e,t){e.websocketFailureTimeoutId&&(clearTimeout(e.websocketFailureTimeoutId),e.websocketFailureTimeoutId=null,t.log(["Cleared failure timeout during cleanup"],d.Verbose))}e.s(["adaptViemWallet",()=>tX,"isViemWalletClient",()=>tq],314035);var tH=e.i(309682),tV=e.i(57159),tK=e.i(911347),tG=e.i(307075),tW=e.i(450323),tz=e.i(110163);let t$=new Map;function tq(e){return void 0!==e.extend&&void 0!==e.getPermissions}let tX=e=>({vmType:"evm",getChainId:async()=>e.getChainId(),transport:(0,tK.custom)(e.transport),address:async()=>{let t=e.account?.address;return t||([t]=await e.getAddresses()),t},handleSignMessageStep:async r=>{let n,i=t,a=r.data?.sign;if(a){if("eip191"===a.signatureKind)i.log(["Execute Steps: Signing with eip191"],d.Verbose),n=a.message.match(/0x[0-9a-fA-F]{64}/)?await e.signMessage({account:e.account,message:{raw:a.message}}):await e.signMessage({account:e.account,message:a.message});else if("eip712"===a.signatureKind){let t={account:e.account,domain:a.domain,types:a.types,primaryType:a.primaryType,message:a.value};i.log(["Execute Steps: Signing with eip712",t],d.Verbose),n=await e.signTypedData(t)}}return n},handleSendTransactionStep:async(r,n)=>{let i=n.data,a=t,o=t.chains.find(e=>e.id===r)?.viemChain;if(!o)throw"Chain not found when sending transaction";let s=(0,tV.createWalletClient)({account:e.account??i.from,chain:o,transport:(0,tK.custom)(e.transport,{retryCount:10,retryDelay:200})});return await s.sendTransaction({chain:o,data:i.data,account:e.account??i.from,to:i.to,value:(0,tW.hexToBigInt)(i.value||0),...i.maxFeePerGas&&a.useGasFeeEstimations&&{maxFeePerGas:(0,tW.hexToBigInt)(i.maxFeePerGas)},...i.maxPriorityFeePerGas&&a.useGasFeeEstimations&&{maxPriorityFeePerGas:(0,tW.hexToBigInt)(i.maxPriorityFeePerGas)},...i.gas&&a.useGasFeeEstimations&&{gas:(0,tW.hexToBigInt)(i.gas)}})},handleConfirmTransactionStep:async(r,n,i,a)=>{let o=t,s=o.chains.find(e=>e.id===n),A=s?.httpRpcUrl,l=(0,tH.createPublicClient)({chain:s?.viemChain,transport:e.transport?(0,tG.fallback)(A?[(0,tz.http)(A),(0,tK.custom)(e.transport),(0,tz.http)()]:[(0,tK.custom)(e.transport),(0,tz.http)()]):(0,tG.fallback)([(0,tz.http)(A),(0,tz.http)()]),pollingInterval:o.confirmationPollingInterval});return await l.waitForTransactionReceipt({hash:r,onReplaced:e=>{if("cancelled"===e.reason)throw a(),Error("Transaction cancelled");i(e.transaction.hash)}})},switchChain:async r=>{try{await e.switchChain({id:r});return}catch(i){if(i&&i?.message){if(i.message.includes("does not support the requested chain"))throw Error("Wallet does not support chain");else if(i.message.includes("rejected"))throw i;else if(i.message.includes("already pending"))return}let n=t.chains.find(e=>e.id===r);if(!n)throw"Chain missing from Relay Client";try{await e.addChain({chain:n?.viemChain})}catch(e){if(e instanceof Error&&e.name&&"InternalRpcError"===e.name&&e.message.includes("is not a function"))return void t?.log(["Execute Steps: Detected internal RPC Error when adding a chain to the wallet",e],d.Verbose);throw e}return}}
2,supportsAtomicBatch:async t=>{if(!e.account)return!1;try{let r=await e.getCapabilities({account:e.account,chainId:t});return r?.atomicBatch?.supported??(r.atomic?.status&&"supported"===r.atomic.status)}catch{return!1}},handleBatchTransactionStep:async(r,n)=>{let i=n.map(e=>({to:e.data.to,data:e.data.data,value:(0,tW.hexToBigInt)(e.data.value||0),...e.data.maxFeePerGas&&{maxFeePerGas:(0,tW.hexToBigInt)(e.data.maxFeePerGas)},...e.data.maxPriorityFeePerGas&&{maxPriorityFeePerGas:(0,tW.hexToBigInt)(e.data.maxPriorityFeePerGas)},...e.data.gas&&{gas:(0,tW.hexToBigInt)(e.data.gas)}})),a=t,o=a.chains.find(e=>e.id===r)?.viemChain;if(!o)throw"Chain not found when sending transaction";let{id:s}=await e.sendCalls({chain:o,account:e.account,calls:i});return s},isEOA:async r=>{if(!e.account)return{isEOA:!1,isEIP7702Delegated:!1};try{let n=e.account.address,i=`${n}-${r}`,a=Date.now(),o=t$.get(i);o||(o={},t$.set(i,o));let s=async()=>{let t=!1;try{let n=await e.getCapabilities({account:e.account,chainId:r});t=!!(n?.atomicBatch?.supported||n?.paymasterService?.supported||n?.auxiliaryFunds?.supported||n?.sessionKeys?.supported)}catch(e){}return t},A=async()=>{if(console.log("CHECKING CODE CACHE"),o&&o?.code&&a-o?.code.timestamp<12e4){console.log("CODE CACHE HIT");let e=o.code.value,t=!!(e&&"0x"!==e),r=!!(e&&e.toLowerCase().startsWith("0xef01"));return{hasCode:t,isEIP7702Delegated:r}}console.log("FETCHING CODE FROM RPC");let e=t.chains.find(e=>e.id===r),i=e?.httpRpcUrl;if(!e)throw Error(`Chain ${r} not found in relay client`);let s=(0,tH.createPublicClient)({chain:e?.viemChain,transport:i?(0,tz.http)(i):(0,tz.http)()});try{let e=await s.getCode({address:n});o.code={value:e,timestamp:a};let t=!!(e&&"0x"!==e),r=!!(e&&e.toLowerCase().startsWith("0xef01"));return{hasCode:t,isEIP7702Delegated:r}}catch(e){throw e}},l=async()=>{if(console.log("CHECKING BALANCE CACHE"),o&&o?.balance&&a-o?.balance.timestamp<12e4)return console.log("BALANCE CACHE HIT"),o?.balance.value;console.log("FETCHING BALANCE FROM RPC");let e=t.chains.find(e=>e.id===r),i=e?.httpRpcUrl;if(!e)return BigInt(0);let s=(0,tH.createPublicClient)({chain:e?.viemChain,transport:i?(0,tz.http)(i):(0,tz.http)()});try{console.log("FETCHING BALANCE FROM RPC");let e=await s.getBalance({address:n});return console.log("BALANCE FETCHED FROM RPC"),o.balance={value:e,timestamp:a},e}catch(e){return BigInt(0)}},c=async()=>{if(console.log("CHECKING TRANSACTION COUNT CACHE"),o&&o?.txCount&&a-o?.txCount.timestamp<12e4)return console.log("TRANSACTION COUNT CACHE HIT"),o?.txCount.value;console.log("FETCHING TRANSACTION COUNT FROM RPC");let e=t.chains.find(e=>e.id===r),i=e?.httpRpcUrl;if(!e)return 0;let s=(0,tH.createPublicClient)({chain:e?.viemChain,transport:i?(0,tz.http)(i):(0,tz.http)()});try{let e=await s.getTransactionCount({address:n});return o.txCount={value:e,timestamp:a},e}catch(e){return 0}},[d,u,h,p]=await Promise.allSettled([s(),A(),l(),c()]),m="fulfilled"===d.status&&d.value,{hasCode:f,isEIP7702Delegated:g}="fulfilled"===u.status?u.value:{hasCode:!1,isEIP7702Delegated:!1},y="fulfilled"===h.status?h.value:BigInt(0),b="fulfilled"===p.status?p.value:0,x=m||f||g;return(y===BigInt(0)||b<=1)&&(x=!0),{isEOA:!x,isEIP7702Delegated:g}}catch(e){return{isEOA:!1,isEIP7702Delegated:!1}}}}),tY=e=>{let t,r=null,n=[];for(let i of e){for(let e of i.items||[])if(e.txHashes&&e.txHashes.length>0&&(n=e.txHashes.concat([...n])),e.internalTxHashes&&e.internalTxHashes.length>0&&(n=e.internalTxHashes.concat([...n])),"incomplete"===e.status){r=i,t=e;break}if(r&&t)break}return{currentStep:r,currentStepItem:t,txHashes:n}};function tJ(e){return"function"==typeof structuredClone?structuredClone(e):JSON.parse(JSON.stringify(e))}let tZ="0x000000000000000000000000000000000000dead",t0="CbKGgVKLJFb8bBrf58DnAkdryX6ubewVytn7X957YwNr",t1="CrfbABN2sSvmoZLu9eDDfXpaC2nHg42R7AXbHs9eg4S9",t2="bc1q4vxn43l44h30nkluqfxd9eckf45vr2awz38lwa",t4="THa7BwoPfacfiELa63pbmm3g5PGKYmtJyt",t3="0x000000000000000000000000000000000000000000000000000000000000dead",t5=(e,t)=>{if("svm"===e)return 9286185===t?t1:t0;if("bvm"===e)return t2;if(543210===t)return"0x00000000000000000000000000000000000dead0";if("tvm"===e)return t4;if("suivm"===e)return t3;else return tZ},t6=e=>!!e&&(e===t1||e===t0||e===t2||e===tZ||e===t3);function t8(e){let r,{quote:n,wallet:i,depositGasLimit:a,onProgress:o}=e,s=t;if(!s.baseApiUrl||!s.baseApiUrl.length)throw ReferenceError("RelayClient missing api url configuration");i&&(r=tq(i)?tX(i):i);try{if(!r)throw Error("AdaptedWallet is required to execute steps");let e=new AbortController,t=n.details?.currencyIn?.currency?.chainId;if(void 0===t)throw Error("Missing chainId from quote");if(t6(n?.details?.recipient))throw Error("Recipient should never be burn address");if(t6(n?.details?.sender))throw Error("Sender should never be burn address");let{request:i,...s}=n,A=tJ(s),l=new Promise((n,s)=>{tO(t,i,r,({steps:t,fees:r,breakdown:n,details:i,refunded:a,error:s})=>{if(e.signal.aborted)return void console.log("Relay SDK: Execution aborted, skipping progress callback");let{currentStep:A,currentStepItem:l,txHashes:c}=tY(t);o?.({steps:t,fees:r,breakdown:n,details:i,currentStep:A,currentStepItem:l,txHashes:c,refunded:a,error:s})},A,a?{deposit:{gasLimit:a}}:void 0).then(t=>{n({data:t,abortController:e})}).catch(s)});return l.abortController=e,l}catch(e){throw console.error(e),e}}e.s(["bitcoinDeadAddress",0,t2,"evmDeadAddress",0,tZ,"getDeadAddress",0,t5,"isDeadAddress",0,t6,"solDeadAddress",0,t0,"tronDeadAddress",0,t4],211786),e.i(202899),e.s(["getQuote",()=>rn],865264);var t7=e.i(914146),t9=e.i(656679);function re(e){let{abi:t,functionName:r,args:n}=e,i=(0,t9.encodeFunctionData)({abi:t,functionName:r,args:n});return{to:e.address,value:e?.value?.toString()??"0",data:i}}function rt(e){return void 0!==e.abi}let rr=async(e,t,r,n,i)=>{let a,o=e.chains.find(e=>e.id===r),s=e.chains.find(e=>e.id===t),A=o?t5(o.vmType,o.id):void 0,l=s?t5(s.vmType,s.id):void 0;return i&&(a=await i.address()),{user:a||A||t7.zeroAddress,recipient:n||a||l||t7.zeroAddress}};async function rn(e,r,n){let i,a,o,{toChainId:s,toCurrency:A,wallet:l,chainId:c,currency:d,tradeType:u,amount:h="0",recipient:p,options:m,txs:f,user:g}=e,y=t;if(!y.baseApiUrl||!y.baseApiUrl.length)throw ReferenceError("RelayClient missing api url configuration");if(l&&(i=tq(l)?tX(l):l),f&&f.length>0&&(a=f.map(e=>rt(e)?re(e):e)),r&&(o=await rr(y,s,c,p,i)),!g&&!o?.user)throw Error("User is required");if(!p&&!o?.recipient)throw Error("Recipient is required");let b={user:r?o?.user:g,destinationCurrency:A,destinationChainId:s,originCurrency:d,originChainId:c,amount:h,recipient:r?o?.recipient:p,tradeType:u,referrer:y.source||void 0,txs:a,...m},x={url:`${y.baseApiUrl}/quote/v2`,method:"post",data:b,headers:{...tF(y),"relay-sdk-version":y?.version??"unknown",...n}},w=await tw.request(x);if(200!==w.status)throw new tx(w?.data?.message,w.status,w.data);return{...w.data,request:x}}async function ri(e){let{wallet:r}=e,n=t;if(!n.baseApiUrl||!n.baseApiUrl.length)throw ReferenceError("RelayClient missing api url configuration");let i={url:`${n.baseApiUrl}/app-fees/${r}/balances`,method:"get",headers:tF(n)},a=await tw.request(i);if(200!==a.status)throw new tx(a?.data?.message,a.status,a.data);return a.data.balances||[]}async function ra(e){let r,{wallet:n,chainId:i,currency:a,recipient:o,amount:s,onProgress:A}=e,l=t;if(!l.baseApiUrl||!l.baseApiUrl.length)throw ReferenceError("RelayClient missing api url configuration");if(n&&(r=tq(n)?tX(n):n),!r)throw Error("AdaptedWallet is required to execute claim steps");let c=await r.address(),d=new AbortController,u={url:`${l.baseApiUrl}/app-fees/${c}/claim`,method:"post",data:{chainId:i,currency:a,recipient:o||c,amount:s},signal:d.signal,headers:tF(l)};try{let e=await l.utils.axios.request(u);
2if(200!==e.status)throw new tx(e?.data?.message,e.status,e.data);let t=e.data.steps||[],n=tJ({steps:t});return{data:await tO(i,u,r,e=>{d.signal.aborted||A?.(e)},n),abortController:d}}catch(e){throw console.error(e),e}}async function ro(e){let r=t;if(!r.baseApiUrl||!r.baseApiUrl.length)throw ReferenceError("RelayClient missing api url configuration");let n={url:`${r.baseApiUrl}/fast-fill`,method:"post",data:e,headers:tF(r)};try{return(await tw.request(n)).data}catch(e){throw new tx(e?.message||"Fast fill failed",e?.statusCode||500,e)}}e.i(865264),e.s(["getAppFees",()=>ri],648480),e.i(648480),e.s(["claimAppFees",()=>ra],420716),e.i(420716),e.s(["fastFill",()=>ro],724309),e.i(724309);var rs=e.i(411616);function rA(e,t){Object.keys(t).map(r=>{let n=t[r];return void 0!==n&&(Array.isArray(n)?n.forEach(t=>{e.searchParams.append(r,t)}):e.searchParams.append(r,t[r]?.toString())),e})}async function rl(e,t,r=15,n=0){if(n>=r)throw`Failed to get data after ${n} attempt(s), aborting`;async function i(){return(await tw.request(e)).data}let a=await i();if(t(a))return a;await new Promise(e=>setTimeout(e,5e3)),n++,await rl(e,t,r,n)}async function rc(e,t,r=15,n=0,i=5e3){if(n>=r)throw`Failed to get an ok response after ${n} attempt(s), aborting`;let a=await tw.request(e);if(t||(t=e=>200===e.status),t(a))return!0;await new Promise(e=>setTimeout(e,i)),n++,await rc(e,t,r,n,i)}e.s(["APIError",()=>tx,"LogLevel",()=>d,"adaptViemWallet",()=>tX,"axios",()=>tw,"convertViemChainToRelayChain",()=>rd,"executeSteps",()=>tO,"getApiKeyHeader",()=>tF,"getCurrentStepData",()=>tY,"isAPIError",()=>tb,"isRelayApiUrl",()=>tE,"isSimulateContractRequest",()=>rt,"isViemWalletClient",()=>tq,"log",()=>f,"pollUntilHasData",()=>rl,"pollUntilOk",()=>rc,"prepareCallTransaction",()=>re,"prepareHyperliquidSteps",()=>tg,"repeatUntilOk",()=>tj,"request",()=>ty,"safeStructuredClone",()=>tJ,"setParams",()=>rA],701872),e.s([],373791),e.i(373791),e.s(["setParams",0,rA],419954);let rd=e=>({id:e.id,name:e.name.replace(" ","-"),displayName:e.name,httpRpcUrl:e.rpcUrls.default&&e.rpcUrls.default&&e.rpcUrls.default?e.rpcUrls.default.http[0]??"":"",wsRpcUrl:e.rpcUrls&&e.rpcUrls.default.webSocket?e.rpcUrls.default.webSocket[0]??"":"",icon:{dark:`${tB}/icons/${e.id}/dark.png`,light:`${tB}/icons/${e.id}/light.png`,squaredDark:`${tB}/icons/square/${e.id}/dark.png`,squaredLight:`${tB}/icons/square/${e.id}/light.png`},currency:{address:t7.zeroAddress,...e.nativeCurrency},explorerUrl:e.blockExplorers?.default.url??"",vmType:"evm",depositEnabled:!0,viemChain:e});e.s(["convertViemChainToRelayChain",0,rd],190025);var ru=e.i(701872);let rh=ru.convertViemChainToRelayChain(p.mainnet),rp=ru.convertViemChainToRelayChain(m.sepolia);class rm{log(e,t=d.Info){return f(e,t,this.logLevel)}constructor(e){if(Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"uiVersion",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"baseApiUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"source",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"apiKey",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pollingInterval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"confirmationPollingInterval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxPollingAttemptsBeforeTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"useGasFeeEstimations",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"websocketEnabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"websocketUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"utils",{enumerable:!0,configurable:!0,writable:!0,value:{...ru}}),Object.defineProperty(this,"actions",{enumerable:!0,configurable:!0,writable:!0,value:rs}),this.version="5.1.0",this.uiVersion=e.uiVersion,this.baseApiUrl=e.baseApiUrl??tv,this.apiKey=e.apiKey,this.logLevel=void 0!==e.logLevel?e.logLevel:d.None,this.pollingInterval=e.pollingInterval,this.maxPollingAttemptsBeforeTimeout=e.maxPollingAttemptsBeforeTimeout,this.useGasFeeEstimations=e.useGasFeeEstimations??!0,this.websocketEnabled=e.websocket?.enabled??!1,this.websocketUrl=e.websocket?.url??tS,e.chains?this.chains=e.chains:e.baseApiUrl?.includes("testnets")?this.chains=[rp]:this.chains=[rh],e.source)this.source=e.source;else if("u">typeof window){let e=location.hostname;0===e.indexOf("www.")&&(e=e.replace("www.","")),this.source=e,console.warn("RelaySDK automatically generated a source based on the url, we recommend providing a source when initializing the sdk. Refer to our docs for steps on how to do this: https://docs.relay.link/references/sdk/getting-started#configuration")}e.logger&&(this.log=e.logger)}configure(e){this.baseApiUrl=e.baseApiUrl?e.baseApiUrl:this.baseApiUrl,this.source=e.source?e.source:this.source,this.apiKey=void 0!==e.apiKey?e.apiKey:this.apiKey,this.logLevel=void 0!==e.logLevel?e.logLevel:d.None,this.pollingInterval=e.pollingInterval?e.pollingInterval:this.pollingInterval,this.confirmationPollingInterval=e.confirmationPollingInterval?e.confirmationPollingInterval:this.confirmationPollingInterval,this.maxPollingAttemptsBeforeTimeout=e.maxPollingAttemptsBeforeTimeout?e.maxPollingAttemptsBeforeTimeout:this.maxPollingAttemptsBeforeTimeout,this.useGasFeeEstimations=void 0!==e.useGasFeeEstimations?e.useGasFeeEstimations:this.useGasFeeEstimations,this.websocketEnabled=e.websocket?.enabled!==void 0?e.websocket.enabled:this.websocketEnabled,this.websocketUrl=e.websocket?.url||this.websocketUrl,e.logger?this.log=e.logger:this.log=(e,t=d.Info)=>{f(e,t,this.logLevel)},e.chains&&(this.chains=e.chains)}}let rf=(0,h.createContext)(null);e.s(["RelayClientContext",0,rf,"RelayClientProvider",0,function({children:e,options:r}){var n;let[i]=(0,h.useState)((n={...r,uiVersion:"7.1.0"},t?t.configure(n):t=new rm({...n}),t));return(0,u.jsx)(rf.Provider,{value:i,children:e})}],499800)},30757,e=>{"use strict";var t=e.i(474076),r=e.i(271645),n=e.i(499800);let i=(0,r.createContext)({}),a={font:"--relay-fonts-body",fontHeading:"--relay-fonts-heading",primaryColor:"--relay-colors-primary-color",focusColor:"--relay-colors-focus-color",subtleBackgroun
2dColor:"--relay-colors-subtle-background-color",subtleBorderColor:"--relay-colors-subtle-border-color",text:{default:"--relay-colors-text-default",subtle:"--relay-colors-text-subtle",error:"--relay-colors-text-error",success:"--relay-colors-text-success"},buttons:{primary:{color:"--relay-colors-primary-button-color",background:"--relay-colors-primary-button-background",hover:{color:"--relay-colors-primary-button-hover-color",background:"--relay-colors-primary-button-hover-background"}},secondary:{color:"--relay-colors-secondary-button-color",background:"--relay-colors-secondary-button-background",hover:{color:"--relay-colors-secondary-button-hover-color",background:"--relay-colors-secondary-button-hover-background"}},white:{color:"--relay-colors-primary-button-color",background:"--relay-colors-primary-button-background",hover:{color:"--relay-colors-primary-button-hover-color",background:"--relay-colors-primary-button-hover-background"}},disabled:{color:"--relay-colors-button-disabled-color",background:"--relay-colors-button-disabled-background"},cta:{fontStyle:"--relay-fonts-button-cta-font-style"}},input:{background:"--relay-colors-input-background",borderRadius:"--relay-radii-input-border-radius",color:"--relay-colors-input-color"},skeleton:{background:"--relay-colors-skeleton-background"},anchor:{color:"--relay-colors-anchor-color",hover:{color:"--relay-colors-anchor-hover-color"}},dropdown:{background:"--relay-colors-dropdown-background",borderRadius:"--relay-radii-dropdown-border-radius",border:"--relay-borders-dropdown-border"},widget:{background:"--relay-colors-widget-background",borderRadius:"--relay-radii-widget-border-radius",border:"--relay-borders-widget-border",boxShadow:"--relay-shadows-widget-box-shadow",card:{background:"--relay-colors-widget-card-background",borderRadius:"--relay-radii-widget-card-border-radius",border:"--relay-borders-widget-card-border",gutter:"--relay-spacing-widget-card-section-gutter"},selector:{background:"--relay-colors-widget-selector-background",hover:{background:"--relay-colors-widget-selector-hover-background"}},swapCurrencyButtonBorderColor:"--relay-colors-widget-swap-currency-button-border-color",swapCurrencyButtonBorderWidth:"--relay-borders-widget-swap-currency-button-border-width",swapCurrencyButtonBorderRadius:"--relay-radii-widget-swap-currency-button-border-radius"},modal:{background:"--relay-colors-modal-background",borderRadius:"--relay-radii-modal-border-radius",border:"--relay-borders-modal-border"}};e.s(["ProviderOptionsContext",0,i,"RelayKitProvider",0,function({children:e,options:o,theme:s}){let A=(0,r.useMemo)(()=>({appName:o.appName,appFees:o.appFees,duneConfig:o.duneConfig,vmConnectorKeyOverrides:o.vmConnectorKeyOverrides,privateChainIds:o.privateChainIds,themeScheme:o.themeScheme,loader:o.loader,secureBaseUrl:o.secureBaseUrl}
2),[o]),l=(0,r.useMemo)(()=>((e,t)=>{let r="";if(!e||!t)return r;let n=(e,i="")=>{for(let a in e)if(e.hasOwnProperty(a)){let o=e[a],s=i+a,A=function(e,t){let r=t.split("."),n=e;for(let e of r)if(void 0===(n=n?.[e]))break;return n}(t,s);"object"==typeof o&&null!==o?n(o,s+"."):A&&o&&(r+=`${A}:${o}; 3`)}};return n(e),r})(s,a),[s]);return(0,t.jsx)(i.Provider,{value:A,children:(0,t.jsxs)(n.RelayClientProvider,{options:o,children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:`.relay-kit-reset { 4 ${l} 5 }`}}),e]})})}],30757)},58345,346974,e=>{"use strict";var t=e.i(619273),r=e.i(286491),n=e.i(540143),i=e.i(915823),a=class extends i.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,i){let a=n.queryKey,o=n.queryHash??(0,t.hashQueryKeyByOptions)(a,n),s=this.get(o);return s||(s=new r.Query({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){n.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let r={exact:!0,...e};return this.getAll().find(e=>(0,t.matchQuery)(r,e))}findAll(e={}){let r=this.getAll();return Object.keys(e).length>0?r.filter(r=>(0,t.matchQuery)(e,r)):r}notify(e){n.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){n.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){n.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};e.s(["QueryCache",0,a],58345);var o=e.i(114272),s=i,A=class extends s.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#n=0}#t;#r;#n;build(e,t,r){let n=new o.Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#t.add(e);let t=l(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=l(e);if("string"==typeof t){let r=this.#r.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=l(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=l(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>
5t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){n.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let r={exact:!0,...e};return this.getAll().find(e=>(0,t.matchMutation)(r,e))}findAll(e={}){return this.getAll().filter(r=>(0,t.matchMutation)(e,r))}notify(e){n.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return n.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(t.noop))))}};function l(e){return e.options.scope?.id}e.s(["MutationCache",0,A],346974)},992571,e=>{"use strict";var t=e.i(619273);function r(e,{pages:t,pageParams:n}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function n(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=r(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=n(e,t)},"infiniteQueryBehavior",0,function(e){return{onFetch:(i,a)=>{let o=i.options,s=i.fetchOptions?.meta?.fetchMore?.direction,A=i.state.data?.pages||[],l=i.state.data?.pageParams||[],c={pages:[],pageParams:[]},d=0,u=async()=>{let a=!1,u=(0,t.ensureQueryFn)(i.options,i.fetchOptions),h=async(e,r,n)=>{let o;if(a)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let s=(Object.defineProperty(o={client:i.client,queryKey:i.queryKey,pageParam:r,direction:n?"backward":"forward",meta:i.options.meta},"signal",{enumerable:!0,get:()=>(i.signal.aborted?a=!0:i.signal.addEventListener("abort",()=>{a=!0}),i.signal)}),o),A=await u(s),{maxPages:l}=i.options,c=n?t.addToStart:t.addToEnd;return{pages:c(e.pages,A,l),pageParams:c(e.pageParams,r,l)}};if(s&&A.length){let e="backward"===s,t={pages:A,pageParams:l},i=(e?n:r)(o,t);c=await h(t,i,e)}else{let t=e??A.length;do{let e=0===d?l[0]??o.initialPageParam:r(o,c);if(d>0&&null==e)break;c=await h(c,e),d++}while(d<t)}return c};i.options.persister?i.fetchFn=()=>i.options.persister?.(u,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},a):i.fetchFn=u}}}])},928376,962265,525672,e=>{"use strict";e.i(247167);var t=e.i(474076),r=e.i(500932),n=e.i(30757);e.i(842917);var i=e.i(103439),a=e.i(619273),o=e.i(58345),s=e.i(346974),A=e.i(175555),l=e.i(814448),c=e.i(540143),d=e.i(992571),u=class{#i;#a;#o;#s;#A;#l;#c;#d;constructor(e={}){this.#i=e.queryCache||new o.QueryCache,this.#a=e.mutationCache||new s.MutationCache,this.#o=e.defaultOptions||{},this.#s=new Map,this.#A=new Map,this.#l=0}mount(){this.#l++,1===this.#l&&(this.#c=A.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onFocus())}),this.#d=l.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onOnline())}))}unmount(){this.#l--,0===this.#l&&(this.#c?.(),this.#c=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#i.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#a.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#i.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#i.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),i=this.#i.get(n.queryHash),o=i?.state.data,s=(0,a.functionalUpdate)(t,o);if(void 0!==s)return this.#i.build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return c.notifyManager.batch(()=>this.#i.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state}removeQueries(e){let t=this.#i;c.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#i;return c.notifyManager.batch(()=>
5(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(c.notifyManager.batch(()=>this.#i.findAll(e).map(e=>e.cancel(r)))).then(a.noop).catch(a.noop)}invalidateQueries(e,t={}){return c.notifyManager.batch(()=>(this.#i.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(c.notifyManager.batch(()=>this.#i.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(a.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(a.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#i.build(this,t);return r.isStaleByTime((0,a.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a.noop).catch(a.noop)}fetchInfiniteQuery(e){return e.behavior=(0,d.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a.noop).catch(a.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,d.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return l.onlineManager.isOnline()?this.#a.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#i}getMutationCache(){return this.#a}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#s.set((0,a.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#s.values()],r={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#A.set((0,a.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#A.values()],r={};return t.forEach(t=>{(0,a.partialMatchKey)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,a.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===a.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#i.clear(),this.#a.clear()}},h=e.i(912598),p=e.i(574983),m=e.i(982615),f=e.i(338456),f=f,g=e.i(120785),y=e.i(321960),b=e.i(488003),x=e.i(236983),w=e.i(316383),v=e.i(792890),C=e.i(297197),B=e.i(746256),S=e.i(140080),k=e.i(217237),E=e.i(10413),F=e.i(568333),T=e.i(271645),U=e.i(190025);let I={font:"Poppins, sans-serif",fontHeading:"Poppins, sans-serif",primaryColor:"#93EA5D",focusColor:"#ACF47F",subtleBackgroun
5dColor:"#191919",subtleBorderColor:"#303030",text:{default:"#FFFFFF",subtle:"#ADADAD",error:"#ED8071",success:"#ACF47F"},buttons:{primary:{color:"#0F0F0F",background:"#93EA5D",hover:{color:"#0F0F0F",background:"#ACF47F"}},cta:{fontStyle:"normal"},secondary:{color:"#FFFFFF",background:"#303030",hover:{color:"#FFFFFF",background:"#1e1d1d"}},disabled:{color:"#747474",background:"#191919"}},input:{background:"#191919",borderRadius:"10px",color:"#FFFFFF"},skeleton:{background:"#303030"},anchor:{color:"#93EA5D",hover:{color:"#ACF47F"}},dropdown:{background:"#191919",borderRadius:"10px",border:"1px solid #303030"},widget:{background:"#191919",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.6)",card:{background:"#191919",borderRadius:"12px",border:"1px solid #191919",gutter:"14px"},selector:{background:"#303030",hover:{background:"#454545"}},swapCurrencyButtonBorderColor:"#303030",swapCurrencyButtonBorderWidth:"1px",swapCurrencyButtonBorderRadius:"4px"},modal:{background:"#0F0F0F",border:"1px solid #303030",borderRadius:"16px"}};function Q(e){let a,o,s,A,l,c=(0,r.c)(8),{children:d}=e;c[0]===Symbol.for("react.memo_cache_sentinel")?(a=new u,c[0]=a):a=c[0];let[m]=(0,T.useState)(a);c[1]===Symbol.for("react.memo_cache_sentinel")?(o=[(0,U.convertViemChainToRelayChain)(y.mainnet),(0,U.convertViemChainToRelayChain)(b.sepolia),(0,U.convertViemChainToRelayChain)(x.arbitrum),(0,U.convertViemChainToRelayChain)(w.optimism),(0,U.convertViemChainToRelayChain)(v.polygon),(0,U.convertViemChainToRelayChain)(C.base),(0,U.convertViemChainToRelayChain)(B.bsc),(0,U.convertViemChainToRelayChain)(S.avalanche),(0,U.convertViemChainToRelayChain)(k.linea),(0,U.convertViemChainToRelayChain)(E.scroll),(0,U.convertViemChainToRelayChain)(F.zksync)],c[1]=o):o=c[1];let f=o;return c[2]===Symbol.for("react.memo_cache_sentinel")?(s={chains:f},c[2]=s):s=c[2],c[3]!==d?(A=(0,t.jsx)(n.RelayKitProvider,{options:s,theme:I,children:(0,t.jsx)(p.WagmiProvider,{config:i.wagmiConfig,children:(0,t.jsx)(L,{children:d})})}),c[3]=d,c[4]=A):A=c[4],c[5]!==m||c[6]!==A?(l=(0,t.jsx)(h.QueryClientProvider,{client:m,children:A}),c[5]=m,c[6]=A,c[7]=l):l=c[7],l}let j=(0,T.createContext)({isWagmiReady:!1,isPrivyReady:!1,isFullyHydrated:!1});function L(e){let n,i,a,o,s,A,l=(0,r.c)(12),{children:c}=e,{isReconnecting:d}=(0,m.useAccount)(),{ready:u}=(0,g.usePrivy)(),h=(0,T.useRef)(!1),[p,f]=(0,T.useState)(!1);l[0]!==d?(n=()=>{d||(h.current=!0,f(!0))},i=[d],l[0]=d,l[1]=n,l[2]=i):(n=l[1],i=l[2]),(0,T.useEffect)(n,i),l[3]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{let e=setTimeout(()=>{h.current||(console.warn("Wagmi hydration timeout - forcing ready state"),f(!0))},3e3);return()=>clearTimeout(e)},o=[],l[3]=a,l[4]=o):(a=l[3],o=l[4]),(0,T.useEffect)(a,o);let y=p&&u;l[5]!==p||l[6]!==u||l[7]!==y?(s={isWagmiReady:p,isPrivyReady:u,isFullyHydrated:y},l[5]=p,l[6]=u,l[7]=y,l[8]=s):s=l[8];let b=s;return l[9]!==c||l[10]!==b?(A=(0,t.jsx)(j.Provider,{value:b,children:c}),l[9]=c,l[10]=b,l[11]=A):A=l[11],A}e.s(["WalletProvider",0,function(e){let n,i,a=(0,r.c)(3),{children:o}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(n={supportedChains:[y.mainnet,b.sepolia],embeddedWallets:{ethereum:{createOnLogin:"users-without-wallets"},showWalletUIs:!1},appearance:{theme:"dark"}},a[0]=n):n=a[0],a[1]!==o?(i=(0,t.jsx)(f.O,{appId:"cmk6o1e6i003vky0ck7b1ymh4",clientId:"client-WY6Ux8XjHXdG5tnJRsbJWiBVmBCRz8VvPXoXGcewssbKf",config:n,children:(0,t.jsx)(Q,{children:o})}),a[1]=o,a[2]=i):i=a[2],i}],928376);var _=e.i(4977),P=e.i(377010);let D=(e,t)=>{let r=(0,_.getMarketInstrumentFromProfiles)(e,t)??(0,_.getMarketInstrument)(e);return r?.marketCap??r?.netAssets??0},R=(e,t,r)=>(0,P.getPreferredInvestInstruments)(e,r).sort((e,r)=>{let n=D(r.name,t)-D(e.name,t);return 0!==n?n:e.name.localeCompare(r.name)});e.s(["getSortedSpotInstrumentNamesByMarketCap",0,(e,t,r)=>R(Object.values(e).filter(e=>"spot"===e.kind&&!e.delisted),t,r).map(e=>e.name),"sortSpotInstrumentsByMarketCap",0,R],962265),e.s(["getInstrumentFromParams",0,e=>"string"==typeof e?e:Array.isArray(e)?e.join("/"):""],525672)},980004,e=>{"use strict";var t=e.i(500932),r=e.i(266027),n=e.i(4977);e.s(["useMarketInstrumentSummaries",0,()=>{let e,i=(0,t.c)(1);return i[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:["market-instrument-summaries"],queryFn:n.refreshMarketInstrumentSummaries,staleTime:3e5,gcTime:18e5,retry:!1},i[0]=e):e=i[0],(0,r.useQuery)(e)}])},15696,481470,e=>{"use strict";var t=e.i(500932),r=e.i(266027);let n=async()=>{let e=await fetch("https://cdn.hotstuff.trade/xstocks/inactive.json");if(!e.ok)throw Error(`Failed to fetch inactive xStocks: ${e.status}`);let t=await e.json();return Array.isArray(t.inactive)?t.inactive.filter(e=>"string"==typeof e):[]};e.s(["useInactiveXStockInstruments",0,e=>{let i,a,o=(0,t.c)(3);o[0]===Symbol.for("react.memo_cache_sentinel")?(i=["inactive-xstocks"],o[0]=i):i=o[0];let s=e?.enabled??!0;return o[1]!==s?(a={queryKey:i,queryFn:n,staleTime:3e5,gcTime:18e5,retry:!1,enabled:s},o[1]=s,o[2]=a):a=o[2],(0,r.useQuery)(a)}],15696);var i=e.i(377010);let a=async()=>{let e=await fetch("https://cdn.hotstuff.trade/preview-sparklines/24h.json");if(!e.ok)throw Error(`Failed to fetch preview sparklines: ${e.status}`);return e.json()};e.s(["getPreviewSparklinePoints",0,(e,t)=>{if(e)for(let r of(0,i.getMarketDataInstrumentCandidates)(t)){let t=e[r];if(void 0!==t)return t}},"usePreviewSparklines",0,e=>{let n,i,o=(0,t.c)(3);o[0]===Symbol.for("react.memo_cache_sentinel")?(n=["preview-sparklines","24h"],o[0]=n):n=o[0];let s=e?.enabled??!0;return o[1]!==s?(i={queryKey:n,queryFn:a,staleTime:3e5,gcTime:18e5,retry:!1,enabled:s},o[1]=s,o[2]=i):i=o[2],(0,r.useQuery)(i)}],481470)},428319,e=>{"use strict";var t=e.i(500932),r=e.i(266027),n=e.i(4977);e.s(["useInstrumentPageMarketData",0,e=>{let i,a,o,s,A=(0,t.c)(9);A[0]!==e?(i=e?.trim()??"",A[0]=e,A[1]=i):i=A[1];let l=i;A[2]!==l?(a=["instrument-page-market-data",l],o=()=>(0,n.getInstrumentPageMarketData)(l),A[2]=l,A[3]=a,A[4]=o):(a=A[3],o=A[4]);let c=l.length>0;return A[5]!==a||A[6]!==o||A[7]!==c?(s={queryKey:a,queryFn:o,enabled:c,staleTime:3e5,gcTime:18e5,retry:!1},A[5]=a,A[6]=o,A[7]=c,A[8]=s):s=A[8],(0,r.useQuery)(s)}])},837119,e=>{"use strict";var t=e.i(500932),r=e.i(266027);let n=async()=>{let e=await fetch("/api/ondo-market-status",{cache:"no-store"});if(!e.ok)throw Error(`Failed to fetch Ondo market status: ${e.status}`);return e.json()};e.s(["useOndoMarketStatus",0,e=>{let i,a,o=(0,t.c)(3);o[0]===Symbol.for("react.memo_cache_sentinel")?(i=["ondo-market-status"],o[0]=i):i=o[0];let s=e?.enabled??!0;return o[1]!==s?(a={queryKey:i,queryFn:n,enabled:s,staleTime:3e4,gcTime:6e5,refetchInterval:6e4,retry:!1},o[1]=s,o[2]=a):a=o[2],(0,r.useQuery)(a)}])},513417,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(953694),a=e.i(838456),o=e.i(562483),s=e.i(962265),A=e.i(268407),l=e.i(618566),c=e.i(756080);e.i(263546);var d=e.i(525672),u=e.i(421241),h=e.i(980004),p=e.i(15696),m=e.i(481470),f=e.i(428319),g=e.i(837119),y=e.i(377010);let b=e=>{let c,b,w,v,C,B,S,k,E,F,T,U,I,Q=(0,r.c)(40),{children:j,featureFlags:L}=e;Q[0]!==L?(c={featureFlags:L},Q[0]=L,Q[1]=c):c=Q[1];let{isLoading:_,error:P}=(0,i.useTradingData)(c);(0,o.useOrderbookData)();let{data:D,isLoading:R}=(0,h.useMarketInstrumentSummaries)(),{instruments:M,tickers:O,setSelectedInstrument:N,selectedInstrument:H,setSelectedInvestInstrument:V,selectedInvestInstrument:K}=(0,A.useTradingDataStore)(),G=(0,l.usePathname)();Q[2]!==G?(b="/trade"===G||G.startsWith("/trade/"),Q[2]=G,Q[3]=b):b=Q[3];let W=b;Q[4]!==G?(w="/invest"===G||G.startsWith("/invest/"),Q[4]=G,Q[5]=w):w=Q[5];let z=w;Q[6]!==z?(v={enabled:z},Q[6]=z,Q[7]=v):v=Q[7];let{isLoading:$}=(0,m.usePreviewSparklines)(v);Q[8]!==z?(C={enabled:z},Q[8]=z,Q[9]=C):C=Q[9];let{isLoading:q}=(0,p.useInactiveXStockInstruments)(C);Q[10]!==z?(B={enabled:z},Q[10]=z,Q[11]=B):B=Q[11];let{data:X}=(0,g.useOndoMarketStatus)(B),{instrument:Y}=(0,l.useParams)(),J=(0,l.useRouter)();Q[12]!==Y||Q[13]!==z?(S=z?(0,y.getInvestInstrumentFromRouteParam
5s)(Y):(0,d.getInstrumentFromParams)(Y),Q[12]=Y,Q[13]=z,Q[14]=S):S=Q[14];let Z=S,ee=z&&!G.startsWith("/invest/holdings")&&!G.startsWith("/invest/watchlist"),{isLoading:et}=(0,f.useInstrumentPageMarketData)(ee?Z:void 0),er=z&&(R||$||q||et),en=(0,n.useRef)(null),ei=(0,n.useRef)(null),ea=Z?M[Z]?.kind??"perps":"perps";e:{if(!M||_||H){k=!1;break e}let e=Object.values(M);if(0===e.length||Z){k=!1;break e}k=!e.filter(e=>e.kind===ea).every(e=>{let t=O[e.name];return t&&(t.mark_price||t.index_price)})}let eo=k;if(Q[15]!==Z||Q[16]!==M||Q[17]!==W||Q[18]!==G||Q[19]!==J||Q[20]!==H||Q[21]!==N||Q[22]!==O?(F=()=>{if(!M||0===Object.keys(M).length||!W)return;let e=en.current;if(en.current=G,e===G&&H)return;let t=Object.values(M);if(Z){let e=t.find(e=>e.name===Z);if(!e)return void J.push("/trade");N(e?.name||"")}else{let e=t.filter(x);if(!e.every(e=>{let t=O[e.name];return t&&(t.mark_price||t.index_price)}))return;let r=[...e].sort((e,t)=>{let r=O[e.name],n=O[t.name],i=r?.volume_24h??0;return(n?.volume_24h??0)-i})[0]||e[0]||t[0];N(H||r?.name||"")}},E=[M,O,N,G,Z,H,J,W],Q[15]=Z,Q[16]=M,Q[17]=W,Q[18]=G,Q[19]=J,Q[20]=H,Q[21]=N,Q[22]=O,Q[23]=E,Q[24]=F):(E=Q[23],F=Q[24]),(0,n.useEffect)(F,E),Q[25]!==Z||Q[26]!==M||Q[27]!==z||Q[28]!==R||Q[29]!==D||Q[30]!==X||Q[31]!==G||Q[32]!==J||Q[33]!==K||Q[34]!==V?(T=()=>{if(!M||0===Object.keys(M).length||!z||R)return;let e=ei.current;if(ei.current=G,e===G&&K)return;let t=(0,s.getSortedSpotInstrumentNamesByMarketCap)(M,D,X);if(!Z)return void V(t[0]??"");let r=M[Z];!r||"spot"!==r.kind||r.delisted?J.replace("/invest"):V(Z)},U=[M,D,X,R,G,Z,J,K,V,z],Q[25]=Z,Q[26]=M,Q[27]=z,Q[28]=R,Q[29]=D,Q[30]=X,Q[31]=G,Q[32]=J,Q[33]=K,Q[34]=V,Q[35]=T,Q[36]=U):(T=Q[35],U=Q[36]),(0,n.useEffect)(T,U),P)throw P;if(_||W&&!H||eo||er){let e;return Q[37]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(a.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",gap:2,children:(0,t.jsx)(u.default,{})}),Q[37]=e):e=Q[37],e}return Q[38]!==j?(I=(0,t.jsx)(t.Fragment,{children:j}),Q[38]=j,Q[39]=I):I=Q[39],I};function x(e){return"perps"===e.kind}e.s(["TradingDataProvider",0,e=>{let n,i=(0,r.c)(5),{children:a}=e,{isLoading:o,featureFlags:s}=(0,c.useCanAccessPlatform)(),A=(0,l.usePathname)();if(o||"/join-waitlist"===A){let e;return i[0]!==a?(e=(0,t.jsx)(t.Fragment,{children:a}),i[0]=a,i[1]=e):e=i[1],e}return i[2]!==a||i[3]!==s?(n=(0,t.jsx)(b,{featureFlags:s,children:a}),i[2]=a,i[3]=s,i[4]=n):n=i[4],n}])},802260,740661,411725,479589,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(373237),i=e.i(863665),a=e.i(315134),o=e.i(920814);let s={width:"100%","& .MuiOutlinedInput-root":{height:40,paddingLeft:"14px",borderRadius:"4px",bgcolor:"background.neutral",cursor:"pointer",color:"text.secondary","&:hover":{bgcolor:"action.hover"},"& fieldset":{border:"none"},"&.Mui-focused fieldset":{border:"none"}},"& .MuiInputBase-input":{py:0,fontSize:"0.75rem",paddingRight:"26px !important",color:"text.primary"}},A={placement:"bottom"};function l(e){return[e.option,e.searchText]}e.s(["IconAutocomplete",0,function(e){let c,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E,F,T,U,I,Q,j=(0,r.c)(55);j[0]!==e?({options:h,value:b,onChange:u,getOptionLabel:c,isOptionEqualToValue:d,renderIcon:p,sx:g,disableClearable:y,slotProps:f,...m}=e,j[0]=e,j[1]=c,j[2]=d,j[3]=u,j[4]=h,j[5]=p,j[6]=m,j[7]=f,j[8]=g,j[9]=y,j[10]=b):(c=j[1],d=j[2],u=j[3],h=j[4],p=j[5],m=j[6],f=j[7],g=j[8],y=j[9],b=j[10]);let L=void 0===y||y;if(j[11]!==c||j[12]!==h){let e;j[14]!==c?(e=e=>({option:e,searchText:(0,o.getSearchableOptionText)(e,c(e))}),j[14]=c,j[15]=e):e=j[15],x=h.map(e),j[11]=c,j[12]=h,j[13]=x}else x=j[13];let _=x;j[16]!==_?(w=new Map(_.map(l)),j[16]=_,j[17]=w):w=j[17];let P=w,D=f?.popper&&"object"==typeof f.popper&&!Array.isArray(f.popper)?f.popper:void 0;j[18]!==D?(v=D??{},j[18]=D,j[19]=v):v=j[19],j[20]!==v?({sx:B,...C}=v,j[20]=v,j[21]=C,j[22]=B):(C=j[21],B=j[22]),j[23]!==f||j[24]!==C||j[25]!==B?(S="function"==typeof f?.popper?f.popper:{...A,...C,sx:[{minWidth:0,boxSizing:"border-box"},...null!=B?Array.isArray(B)?B:[B]:[]]},j[23]=f,j[24]=C,j[25]=B,j[26]=S):S=j[26];let R=S;return j[27]!==h?(k=[...h],j[27]=h,j[28]=k):k=j[28],j[29]!==u?(E=(e,t)=>u(t),j[29]=u,j[30]=E):E=j[30],j[31]!==P?(F=(e,t)=>t.inputValue?e.filter(e=>(0,o.optionMatchesSearchText)(P.get(e)??"",t.inputValue)):e,j[31]=P,j[32]=F):F=j[32],j[33]!==R||j[34]!==f?(T={...f,popper:R},j[33]=R,j[34]=f,j[35]=T):T=j[35],j[36]!==c||j[37]!==p?(U=(e,r)=>(0,t.jsx)("li",{...e,children:(0,t.jsxs)(i.default,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",minWidth:0},children:[p?.(r),(0,t.jsx)(i.default,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c(r)}
5)]})}),j[36]=c,j[37]=p,j[38]=U):U=j[38],j[39]!==p||j[40]!==b?(I=e=>(0,t.jsx)(a.default,{...e,variant:"outlined",sx:s,inputProps:{...e.inputProps,autoComplete:"off"},InputProps:{...e.InputProps,startAdornment:(0,t.jsxs)(t.Fragment,{children:[b&&p?(0,t.jsx)(i.default,{component:"span",sx:{display:"inline-flex",alignItems:"center",ml:.2,mr:0},children:p(b)}):null,e.InputProps.startAdornment]})}}),j[39]=p,j[40]=b,j[41]=I):I=j[41],j[42]!==L||j[43]!==c||j[44]!==d||j[45]!==m||j[46]!==g||j[47]!==U||j[48]!==I||j[49]!==k||j[50]!==E||j[51]!==F||j[52]!==T||j[53]!==b?(Q=(0,t.jsx)(n.default,{...m,options:k,value:b,onChange:E,getOptionLabel:c,filterOptions:F,isOptionEqualToValue:d,disableClearable:L,multiple:!1,freeSolo:!1,fullWidth:!0,size:"small",slotProps:T,sx:g,renderOption:U,renderInput:I}),j[42]=L,j[43]=c,j[44]=d,j[45]=m,j[46]=g,j[47]=U,j[48]=I,j[49]=k,j[50]=E,j[51]=F,j[52]=T,j[53]=b,j[54]=Q):Q=j[54],Q}],802260),e.i(247167);var c=e.i(271645),d=e.i(207670),u=e.i(519130),h=e.i(357242),p=e.i(390290),m=e.i(925652),f=e.i(941134),g=e.i(374429),y=e.i(540672),b=e.i(319727);function x(e){return(0,b.default)("MuiDialog",e)}let w=(0,y.default)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),v=c.createContext({});var C=e.i(626933),B=e.i(261722),S=e.i(954512),k=e.i(50915),E=e.i(699844),F=e.i(854072);let T=(0,B.styled)(C.default,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),U=(0,B.styled)(m.default,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),I=(0,B.styled)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.container,t[`scroll${(0,p.default)(r.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Q=(0,B.styled)(g.default,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.paper,t[`scrollPaper${(0,p.default)(r.scroll)}`],t[`paperWidth${(0,p.default)(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})((0,k.default)(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${w.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${w.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${w.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),j=c.forwardRef(function(e,r){let n=(0,E.useDefaultProps)({props:e,name:"MuiDialog"}),i=(0,S.useTheme)(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":s,"aria-modal":A=!0,BackdropComponent:l,BackdropProps:m,children:y,className:b,disableEscapeKeyDown:w=!1,fullScreen:C=!1,fullWidth:B=!1,maxWidth:k="sm",onBackdropClick:j,onClick:L,onClose:_,open:P,PaperComponent:D=g.default,PaperProps:R={},scroll:M="paper",slots:O={},slotProps:N={},TransitionComponent:H=f.default,transitionDuration:V=a,TransitionProps:K,...G}=n,W={...n,disableEscapeKeyDown:w,fullScreen:C,fullWidth:B,maxWidth:k,scroll:M},z=(e=>{let{classes:t,scroll:r,maxWidth:n,fullWidth:i,fullScreen:a}
5=e,o={root:["root"],container:["container",`scroll${(0,p.default)(r)}`],paper:["paper",`paperScroll${(0,p.default)(r)}`,`paperWidth${(0,p.default)(String(n))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return(0,u.default)(o,x,t)})(W),$=c.useRef(),q=(0,h.default)(s),X=c.useMemo(()=>({titleId:q}),[q]),Y={slots:{transition:H,...O},slotProps:{transition:K,paper:R,backdrop:m,...N}},[J,Z]=(0,F.default)("root",{elementType:U,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:W,className:(0,d.default)(z.root,b),ref:r}),[ee,et]=(0,F.default)("backdrop",{elementType:T,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:W}),[er,en]=(0,F.default)("paper",{elementType:Q,shouldForwardComponentProp:!0,externalForwardedProps:Y,ownerState:W,className:(0,d.default)(z.paper,R.className)}),[ei,ea]=(0,F.default)("container",{elementType:I,externalForwardedProps:Y,ownerState:W,className:(0,d.default)(z.container)}),[eo,es]=(0,F.default)("transition",{elementType:f.default,externalForwardedProps:Y,ownerState:W,additionalProps:{appear:!0,in:P,timeout:V,role:"presentation"}});return(0,t.jsx)(J,{closeAfterTransition:!0,slots:{backdrop:ee},slotProps:{backdrop:{transitionDuration:V,as:l,...et}},disableEscapeKeyDown:w,onClose:_,open:P,onClick:e=>{L&&L(e),$.current&&($.current=null,j&&j(e),_&&_(e,"backdropClick"))},...Z,...G,children:(0,t.jsx)(eo,{...es,children:(0,t.jsx)(ei,{onMouseDown:e=>{$.current=e.target===e.currentTarget},...ea,children:(0,t.jsx)(er,{as:D,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":q,"aria-modal":A,...en,children:(0,t.jsx)(v.Provider,{value:X,children:y})})})})})});function L(e){return(0,b.default)("MuiDialogContent",e)}function _(e){return(0,b.default)("MuiDialogTitle",e)}e.s(["Dialog",0,j],740661),(0,y.default)("MuiDialogContent",["root","dividers"]);let P=(0,y.default)("MuiDialogTitle",["root"]),D=(0,B.styled)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})((0,k.default)(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${P.root} + &`]:{paddingTop:0}}}]}))),R=c.forwardRef(function(e,r){let n=(0,E.useDefaultProps)({props:e,name:"MuiDialogContent"}),{className:i,dividers:a=!1,...o}=n,s={...n,dividers:a},A=(e=>{let{classes:t,dividers:r}=e;return(0,u.default)({root:["root",r&&"dividers"]},L,t)})(s);return(0,t.jsx)(D,{className:(0,d.default)(A.root,i),ownerState:s,ref:r,...o})});e.s(["DialogContent",0,R],411725);var M=e.i(689820);let O=(0,B.styled)(M.default,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),N=c.forwardRef(function(e,r){let n=(0,E.useDefaultProps)({props:e,name:"MuiDialogTitle"}),{className:i,id:a,...o}=n,s=(e=>{let{classes:t}=e;return(0,u.default)({root:["root"]},_,t)})(n),{titleId:A=a}=c.useContext(v);return(0,t.jsx)(O,{component:"h2",className:(0,d.default)(s.root,i),ownerState:n,ref:r,variant:"h6",id:a??A,...o})});e.s(["DialogTitle",0,N],479589)},131731,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(174080),n=e.i(677776),i=e.i(548251),a=e.i(566352),o=e.i(484263),s=e.i(54281),A=e.i(839282),l=e.i(266932),c=e.i(954512),d=e.i(699844),u=e.i(327001),h=e.i(635740),p=e.i(854072),m=e.i(207670),f=e.i(261722),g=e.i(50915),y=e.i(806531),b=e.i(390290),x=e.i(474076);let w=(0,f.styled)("div",{name:"MuiSwipeArea",shouldForwardProp:y.default})((0,g.default)(({theme:e})=>({position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1,variants:[{props:{anchor:"left"},style:{right:"auto"}},{props:{anchor:"right"},style:{left:"auto",right:0}},{props:{anchor:"top"},style:{bottom:"auto",right:0}},{props:{anchor:"bottom"},style:{top:"auto",bottom:0,right:0}}]}))),v=t.forwardRef(function(e,t){let{anchor:r,classes:n={},className:a,width:o,style:s,...A}=e;return(0,x.jsx)(w,{className:(0,m.default)("PrivateSwipeArea-root",n.root,n[`anchor${(0,b.default)(r)}`],a),ref:t,style:{[(0,i.isHorizontal)(r)?"width":"height"]:o,...s},ownerState:e,...A})}),C=null;function B(e,t,r){return"right"===e?r.body.offsetWidth-t[0].pageX:t[0].pageX}
5function S(e,t,r){return"bottom"===e?r.innerHeight-t[0].clientY:t[0].clientY}function k(e,t){return e?t.clientWidth:t.clientHeight}function E(e,t,r,n){return Math.min(Math.max(r?t-e:n+t-e,0),n)}let F="u">typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),T=t.forwardRef(function(e,m){let f=(0,d.useDefaultProps)({name:"MuiSwipeableDrawer",props:e}),g=(0,c.useTheme)(),y={enter:g.transitions.duration.enteringScreen,exit:g.transitions.duration.leavingScreen},{anchor:b="left",disableBackdropTransition:w=!1,disableDiscovery:T=!1,disableSwipeToOpen:U=F,hideBackdrop:I,hysteresis:Q=.52,allowSwipeInChildren:j=!1,minFlingVelocity:L=450,ModalProps:{BackdropProps:_,...P}={},onClose:D,onOpen:R,open:M=!1,PaperProps:O={},SwipeAreaProps:N,swipeAreaWidth:H=20,transitionDuration:V=y,variant:K="temporary",slots:G={},slotProps:W={},...z}=f,[$,q]=t.useState(!1),X=t.useRef({isSwiping:null}),Y=t.useRef(),J=t.useRef(),Z=t.useRef(),ee=(0,a.default)(O.ref,Z),et=t.useRef(!1),er=t.useRef();(0,l.default)(()=>{er.current=null},[M]);let en=t.useCallback((e,t={})=>{let{mode:r=null,changeTransition:n=!0}=t,a=["right","bottom"].includes((0,i.getAnchor)(g,b))?1:-1,o=(0,i.isHorizontal)(b),s=o?`translate(${a*e}px, 0)`:`translate(0, ${a*e}px)`,A=Z.current.style;A.webkitTransform=s,A.transform=s;let l="";if(r&&(l=g.transitions.create("all",(0,u.getTransitionProps)({easing:void 0,style:void 0,timeout:V},{mode:r}))),n&&(A.webkitTransition=l,A.transition=l),!w&&!I){let t=J.current.style;t.opacity=1-e/k(o,Z.current),n&&(t.webkitTransition=l,t.transition=l)}},[b,w,I,g,V]),ei=(0,A.default)(e=>{let t;if(!et.current)return;if(C=null,et.current=!1,r.flushSync(()=>{q(!1)}),!X.current.isSwiping){X.current.isSwiping=null;return}X.current.isSwiping=null;let n=(0,i.getAnchor)(g,b),a=(0,i.isHorizontal)(b);t=a?B(n,e.changedTouches,(0,o.default)(e.currentTarget)):S(n,e.changedTouches,(0,s.default)(e.currentTarget));let A=a?X.current.startX:X.current.startY,l=k(a,Z.current),c=E(t,A,M,l),d=c/l;(Math.abs(X.current.velocity)>L&&(er.current=1e3*Math.abs((l-c)/X.current.velocity)),M)?X.current.velocity>L||d>Q?D():en(0,{mode:"exit"}):X.current.velocity<-L||1-d>Q?R():en(k(a,Z.current),{mode:"enter"})}),ea=(e=!1)=>{if(!$){(e||!(T&&j))&&r.flushSync(()=>{q(!0)});let t=(0,i.isHorizontal)(b);!M&&Z.current&&en(k(t,Z.current)+(T?15:-20),{changeTransition:!1}),X.current.velocity=0,X.current.lastTime=null,X.current.lastTranslate=null,X.current.paperHit=!1,et.current=!0}},eo=(0,A.default)(e=>{if(!Z.current||!et.current||null!==C&&C!==X.current)return;ea(!0);let t=(0,i.getAnchor)(g,b),r=(0,i.isHorizontal)(b),n=B(t,e.touches,(0,o.default)(e.currentTarget)),a=S(t,e.touches,(0,s.default)(e.currentTarget));if(M&&Z.current.contains(e.target)&&null===C){if(function({domTreeShapes:e,start:t,current:r,anchor:n}){let i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},o={x:"clientWidth",y:"clientHeight"};return e.some(e=>{let s=r>=t;("top"===n||"left"===n)&&(s=!s);let A="left"===n||"right"===n?"x":"y",l=Math.round(e[i[A]]),c=l+e[o[A]]<e[a[A]];return!!s&&!!c||!s&&!!(l>0)})}({domTreeShapes:function(e,t){let r=[];for(;e&&e!==t.parentElement;){let n=(0,s.default)(t).getComputedStyle(e);"absolute"===n.getPropertyValue("position")||"hidden"===n.getPropertyValue("overflow-x")||(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&r.push(e),e=e.parentElement}return r}(e.target,Z.current),start:r?X.current.startX:X.current.startY,current:r?n:a,anchor:b})){C=!0;return}C=X.current}if(null==X.current.isSwiping){let t=Math.abs(n-X.current.startX),i=Math.abs(a-X.current.startY),o=r?t>i&&t>3:i>t&&i>3;if(o&&e.cancelable&&e.preventDefault(),!0===o||(r?i>3:t>3)){if(X.current.isSwiping=o,!o)return void ei(e);X.current.startX=n,X.current.startY=a,T||M||(r?X.current.startX-=20:X.current.startY-=20)}}if(!X.current.isSwiping)return;let A=k(r,Z.current),l=r?X.current.startX:X.current.startY;M&&!X.current.paperHit&&(l=Math.min(l,A));let c=E(r?n:a,l,M,A);if(M)if(X.current.paperHit)0===c&&(X.current.startX=n,X.current.startY=a);else{if(!(r?n<A:a<A))return;X.current.paperHit=!0,X.current.startX=n,X.current.startY=a}null===X.current.lastTranslate&&(X.current.lastTranslate=c,X.current.lastTime=performance.now()+1);let d=(c-X.current.lastTranslate)/(performance.now()-X.current.lastTime)*1e3;X.current.velocity=.4*X.current.velocity+.6*d,X.current.lastTranslate=c,X.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),en(c)}),es=(0,A.default)(e=>{if(e.defaultPrevented||e.defaultMuiPrevented||M&&(I||!J.current.contains(e.target))&&!Z.current.contains(e.target))return;let t=(0,i.getAnchor)(g,b),r=(0,i.isHorizontal)(b),n=B(t,e.touches,(0,o.default)(e.currentTarget)),a=S(t,e.touches,(0,s.default)(e.currentTarget));if(!M){if(U||!(e.target===Y.current||Z.current?.contains(e.target)&&("function"==typeof j?j(e,Y.current,Z.current):j)))return;if(r){if(n>H)return}else if(a>H)return}e.defaultMuiPrevented=!0,C=null,X.current.startX=n,X.current.startY=a,ea()});t.useEffect(()=>{if("temporary"===K){let e=(0,o.default)(Z.current);return e.addEventListener("touchstart",es),e.addEventListener("touchmove",eo,{passive:!M}),e.addEventListener("touchend",ei),()=>{e.removeEventListener("touchstart",es),e.removeEventListener("touchmove",eo,{passive:!M}),e.removeEventListener("touchend",ei)}}},[K,M,es,eo,ei]),t.useEffect(()=>()=>{C===X.current&&(C=null)},[]),t.useEffect(()=>{M||q(!1)},[M]);let[eA,el]=(0,p.default)("swipeArea",{ref:Y,elementType:v,ownerState:f,externalForwardedProps:{slots:G,slotProps:{swipeArea:N,...W}},additionalProps:{width:H,anchor:b}});return(0,x.jsxs)(t.Fragment,{children:[(0,x.jsx)(i.default,{open:"temporary"===K&&!!$||M,variant:K,ModalProps:{BackdropProps:{..._,ref:J},..."temporary"===K&&{keepMounted:!0},...P},hideBackdrop:I,anchor:b,transitionDuration:er.current||V,onClose:D,ref:m,slots:G,slotProps:{...W,backdrop:(0,h.mergeSlotProps)(W.backdrop??_,{ref:J}),paper:(0,h.mergeSlotProps)(W.paper??O,{style:{pointerEvents:"temporary"!==K||M||j?"":"none"},ref:ee})},...z}),!U&&"temporary"===K&&(0,x.jsx)(n.default,{children:(0,x.jsx)(eA,{...el})})]})});e.s(["SwipeableDrawer",0,T],131731)},242405,e=>{"use strict";var t=e.i(500932),r=e.i(271645);e.s(["default",0,e=>{let n,i,a=(0,t.c)(4),[o,s]=(0,r.useState)(!1);return a[0]!==o||a[1]!==e?(n=()=>{let t=window.matchMedia(e);t.matches!==o&&s(t.matches);let r=()=>s(t.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)},i=[o,e],a[0]=o,a[1]=e,a[2]=n,a[3]=i):(n=a[2],i=a[3]),(0,r.useEffect)(n,i),o}])},826734,849850,565306,160518,230103,e=>{"use strict";var t=e.i(474076),r=e.i(525836);e.i(992550);var n=e.i(407585),i=e.i(797986);e.i(816790);var a=e.i(603184),o=e.i(497624),s=e.i(802260),A=e.i(838456),l=e.i(397837),c=e.i(917098),d=e.i(206242),u=e.i(75581),h=e.i(18214),p=e.i(782904),m=e.i(632418),f=e.i(271645),g=e.i(500932),y=e.i(740661),b=e.i(411725),x=e.i(479589),w=e.i(183282),v=e.i(131731),C=e.i(268407),B=e.i(242405);let S=["xs","sm","md","lg","xl"],k=e=>"string"==typeof e&&S.includes(e),E={position:"absolute",width:1,height:1,padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0},F=e=>{let r,i,a,o,s,l,c,d,u,h,m,f,S,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V=(0,g.c)(92),{active:K,title:G,children:W,disableClose:z,maxWidth:$,titleLeftPadding:q,sx:X,mobileBottomSheet:Y,open:J,onClose:Z,hideTitleBar:ee,contentSx:et,paperSx:er,n
5oPaddingTop:en,titleSx:ei,onBack:ea}=e,eo=void 0!==z&&z,es=void 0===$?"xs":$,eA=void 0!==q&&q,el=void 0!==ee&&ee,ec=void 0!==en&&en;V[0]!==ei?(r=void 0===ei?{}:ei,V[0]=ei,V[1]=r):r=V[1];let ed=r,{modal:eu,setModal:eh}=(0,C.useActionStore)();(0,C.useAuthStore)();let ep=(0,B.default)("(max-width: 1000px)"),em=!!("string"==typeof es&&k(es))&&es,ef="string"==typeof es&&k(es)?void 0:"number"==typeof es?`${es}px`:!1===es?void 0:"string"==typeof es?es:void 0,eg=void 0!==J?J:eu===K;V[2]!==eo||V[3]!==Z||V[4]!==eh?(i=()=>{eo||(Z?Z():eh(null))},V[2]=eo,V[3]=Z,V[4]=eh,V[5]=i):i=V[5];let ey=i;V[6]!==el||V[7]!==ec?(a=el&&!ec?{paddingTop:"24px !important"}:void 0,V[6]=el,V[7]=ec,V[8]=a):a=V[8];let eb=a;V[9]!==ea?(o=ea?(0,t.jsx)(n.Iconify,{icon:"mingcute:arrow-left-line",width:"18",height:"18",onClick:ea,sx:{color:"action.active",cursor:"pointer",flexShrink:0,"&:hover":{color:"#fff",transition:"color 0.3s ease"}}}):null,V[9]=ea,V[10]=o):o=V[10];let ex=o;V[11]!==eo||V[12]!==ey?(s=e=>t=>{!e&&(eo||ey())},V[11]=eo,V[12]=ey,V[13]=s):s=V[13];let ew=s;V[14]!==ex||V[15]!==eo||V[16]!==ey||V[17]!==el||V[18]!==G?(l=el?(0,t.jsx)(x.DialogTitle,{component:"h2",sx:E,children:G}):(0,t.jsxs)(x.DialogTitle,{sx:{width:"100%",position:"relative",padding:"16px",pr:"44px",fontSize:"16px"},children:[(0,t.jsxs)(A.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[ex,(0,t.jsx)(p.Typography,{variant:"h6",children:(0,w.capitalize)(G)})]}),(0,t.jsx)(n.Iconify,{icon:"mingcute:close-line",width:"18",height:"18",onClick:ey,sx:{color:eo?"action.disabled":"action.active",cursor:eo?"not-allowed":"pointer",opacity:eo?.5:1,position:"absolute",top:"16px",right:"16px"}})]}),V[14]=ex,V[15]=eo,V[16]=ey,V[17]=el,V[18]=G,V[19]=l):l=V[19];let ev=l;V[20]===Symbol.for("react.memo_cache_sentinel")?(c={width:"100%",display:"flex",flexDirection:"column",height:"100%"},V[20]=c):c=V[20],V[21]===Symbol.for("react.memo_cache_sentinel")?(d={display:"flex",gap:2,flexDirection:"column",p:"16px",flex:1,overflow:"auto"},V[21]=d):d=V[21],V[22]!==eb?(u=eb?[eb]:[],V[22]=eb,V[23]=u):u=V[23],V[24]!==et?(h=et?[et]:[],V[24]=et,V[25]=h):h=V[25],V[26]!==u||V[27]!==h?(m=[d,...u,...h],V[26]=u,V[27]=h,V[28]=m):m=V[28];let eC=m;V[29]===Symbol.for("react.memo_cache_sentinel")?(f={display:"flex",flexDirection:"column",gap:2},V[29]=f):f=V[29],V[30]!==W?(S=(0,t.jsx)(A.Box,{sx:f,children:W}),V[30]=W,V[31]=S):S=V[31],V[32]!==eC||V[33]!==S?(F=(0,t.jsx)(b.DialogContent,{sx:eC,children:S}),V[32]=eC,V[33]=S,V[34]=F):F=V[34],V[35]!==ev||V[36]!==F?(T=(0,t.jsxs)(A.Box,{sx:c,role:"presentation",children:[ev,F]}),V[35]=ev,V[36]=F,V[37]=T):T=V[37];let eB=T;if("boolean"==typeof Y?Y:ep){let e,r,n,i,a,o;V[38]!==ew?(e=ew(!1),r=ew(!0),V[38]=ew,V[39]=e,V[40]=r):(e=V[39],r=V[40]),V[41]===Symbol.for("react.memo_cache_sentinel")?(n={borderTopLeftRadius:12,borderTopRightRadius:12,borderBottomLeftRadius:0,borderBottomRightRadius:0,maxHeight:"90vh"},V[41]=n):n=V[41],V[42]!==er?(i=[n,...er?[er]:[]],V[42]=er,V[43]=i):i=V[43];let s=i;return V[44]!==s?(a={sx:s},V[44]=s,V[45]=a):a=V[45],V[46]!==eB||V[47]!==eg||V[48]!==e||V[49]!==r||V[50]!==a?(o=(0,t.jsx)(v.SwipeableDrawer,{anchor:"bottom",open:eg,onClose:e,onOpen:r,PaperProps:a,children:eB}),V[46]=eB,V[47]=eg,V[48]=e,V[49]=r,V[50]=a,V[51]=o):o=V[51],o}V[52]!==ef?(U=ef?{maxWidth:ef}:{},V[52]=ef,V[53]=U):U=V[53],V[54]!==er?(I=er?[er]:[],V[54]=er,V[55]=I):I=V[55],V[56]!==U||V[57]!==I?(Q=[U,...I],V[56]=U,V[57]=I,V[58]=Q):Q=V[58];let eS=Q;V[59]!==eS?(j={sx:eS},V[59]=eS,V[60]=j):j=V[60],V[61]!==ex||V[62]!==eo||V[63]!==ey||V[64]!==el||V[65]!==G||V[66]!==eA||V[67]!==ed?(L=el?(0,t.jsx)(x.DialogTitle,{component:"h2",sx:E,children:G}):(0,t.jsxs)(x.DialogTitle,{sx:{position:"relative",padding:eA?"20px 24px 24px 26px":"20px 24px 24px 24px",pr:"52px",fontSize:"16px",...ed||{}},children:[(0,t.jsxs)(A.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[ex,(0,w.capitalize)(G)]}),(0,t.jsx)(n.Iconify,{icon:"mingcute:close-line",width:"18",height:"18",onClick:ey,sx:{color:eo?"action.disabled":"action.active",cursor:eo?"not-allowed":"pointer",opacity:eo?.5:1,position:"absolute",top:"20px",right:"24px","&:hover":{color:"#fff",transition:"color 0.3s ease"}}})]}
5),V[61]=ex,V[62]=eo,V[63]=ey,V[64]=el,V[65]=G,V[66]=eA,V[67]=ed,V[68]=L):L=V[68],V[69]===Symbol.for("react.memo_cache_sentinel")?(_={display:"flex",gap:2,flexDirection:"column",p:"24px"},V[69]=_):_=V[69],V[70]!==et?(P=et?[et]:[],V[70]=et,V[71]=P):P=V[71],V[72]!==eb?(D=eb?[eb]:[],V[72]=eb,V[73]=D):D=V[73],V[74]!==P||V[75]!==D?(R=[_,...P,...D],V[74]=P,V[75]=D,V[76]=R):R=V[76];let ek=R;return V[77]===Symbol.for("react.memo_cache_sentinel")?(M={display:"flex",flexDirection:"column",gap:2},V[77]=M):M=V[77],V[78]!==W?(O=(0,t.jsx)(A.Box,{sx:M,children:W}),V[78]=W,V[79]=O):O=V[79],V[80]!==ek||V[81]!==O?(N=(0,t.jsx)(b.DialogContent,{sx:ek,children:O}),V[80]=ek,V[81]=O,V[82]=N):N=V[82],V[83]!==em||V[84]!==eo||V[85]!==ey||V[86]!==eg||V[87]!==X||V[88]!==j||V[89]!==L||V[90]!==N?(H=(0,t.jsxs)(y.Dialog,{open:eg,onClose:ey,maxWidth:em,fullWidth:!0,disableEscapeKeyDown:eo,sx:X,PaperProps:j,children:[L,N]}),V[83]=em,V[84]=eo,V[85]=ey,V[86]=eg,V[87]=X,V[88]=j,V[89]=L,V[90]=N,V[91]=H):H=V[91],H};e.s(["ModalBox",0,F],849850),e.s([],565306),e.i(164485);var T=e.i(913849),U=e.i(858532),I=e.i(461342),Q=e.i(954512),j=e.i(120785),L=e.i(338456),L=L,_=e.i(982615),P=e.i(270910),D=e.i(789408),R=e.i(348396),M=e.i(170778),O=e.i(210920);function N(e={}){let{address:t,query:r={}}=e,n=(0,O.useConfig)(e),i=(0,M.useChainId)({config:n}),a=function(e,t={}){return{async queryFn({queryKey:t}){let{address:r,scopeKey:n,...i}=t[1];if(!r)throw Error("address is required");return await (0,P.getBalance)(e,{...i,address:r})??null},queryKey:function(e={}){return["balance",(0,D.filterQueryOptions)(e)]}(t)}}(n,{...e,chainId:e.chainId??i}),o=!!(t&&(r.enabled??!0));return(0,R.useQuery)({...r,...a,enabled:o})}e.s(["useBalance",0,N],160518);var H=e.i(942290),V=e.i(709643);e.i(842917);var K=e.i(536387);let G={Ethereum:{icon:"ETH",name:"Ethereum",chainId:1}},W=e=>{let t=e.toLowerCase();return t.includes("cannot destructure property 'externaltransactionid'")||t.includes("externaltransactionid")};e.s(["DepositModal",0,()=>{let e=(0,V.useTranslations)(),{payload:g,isLoading:y,setLoading:b,setModal:x}=(0,C.useActionStore)(),{getBalance:w,deposit:v,isCorrectNetwork:B,checkAndSwitchNetwork:S,isMainnet:k,selectedChain:E}=(0,T.useDepositActions)(),P=(0,C.useTradingDataStore)(e=>e.supportedCollateral),[D,R]=(0,f.useState)(g?.token||P.USDC?.symbol||"USDC"),M=(0,f.useMemo)(()=>Object.values(P),[P]),O=(0,f.useMemo)(()=>M.find(e=>e.symbol===D)??null,[M,D]),z=(0,Q.useTheme)(),[$,q]=(0,f.useState)(""),[X,Y]=(0,f.useState)(0),[J,Z]=(0,f.useState)("Ethereum"),[ee,et]=(0,f.useState)(!1),{authenticated:er}=(0,j.usePrivy)(),{fund:en}=(0,L.a6)(),{isConnected:ei}=(0,_.useAccount)(),{address:ea}=(0,C.useAuthStore)(),{data:eo}=N({address:ea}),es=er&&!ei,eA=(0,f.useMemo)(()=>(0,a.getMinAmountForAssetSymbol)(D),[D]),el=async e=>{Z(e.target.value)},ec=async()=>{b(!0);try{await S(),et(!1)}catch(n){let t=(0,H.getErrorMessage)(n),r=(0,H.getErrorOverride)(t??"");U.showToast.error({message:e("modals.failedToSwitchNetwork"),...r?{description:r}:{}})}finally{b(!1)}},ed=async()=>{b(!0);try{await v(D,Number($)??0),x(null)}catch(e){console.error("Deposit failed:",e)}finally{b(!1)}},[eu,eh]=(0,f.useState)(!1),ep=(0,f.useRef)(!0);(0,f.useEffect)(()=>()=>{ep.current=!1},[]);let em=async()=>{let t;if(!ea)return;let r=()=>{U.showToast.error({message:"Funding flow was cancelled.",description:"No transfer was completed. You can try again anytime."})},n=e=>{var t;let n;W((t=e.reason,(n=(0,H.getErrorMessage)(t))||(t instanceof Error?t.message:"string"==typeof t?t:"")))&&(e.preventDefault(),r())};window.addEventListener("unhandledrejection",n),t=window.setTimeout(()=>{window.removeEventListener("unhandledrejection",n)},3e5),eh(!0);try{x(null),await en({source:{assets:["usd","eur","gbp","mxn","brl","cny","jpy","inr","cad","krw","aud","idr","sar","try","chf","twd","sek","ngn","pln","ars","aed","thb","zar","dkk","egp","myr","sgd","cop","php","clp","bdt","vnd","czk","ils","hkd","nzd","pkr","ron","kzt","nok","huf","uah","kwd","qar","etb","mad","bgn","kes","npr"],defaultAsset:"usd"},destination:{asset:"0xA0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",chain:"eip155:1",address:ea},environment:"production",defaultAmount:"50"})}catch(o){let t=(0,H.getErrorMessage)(o),n=(t??"").toLowerCase(),i="string"==typeof o?.privyErrorCode?o.privyErrorCode.toLowerCase():"";
5if(W(n))return void r();if(n.includes("wallet funding not enabled")||n.includes("funding not enabled"))return void U.showToast.error({message:"Wallet funding is not enabled for this app.",description:"Enable Account Funding in Privy Dashboard, or deposit manually to this address."});if(n.includes("cancelled")||n.includes("user exited")||n.includes("exited funding flow")||"user_exited_funding_flow"===i)return void r();let a=(0,H.getErrorOverride)(t??"");U.showToast.error({message:e("common.somethingWentWrong"),...a?{description:a}:{}})}finally{window.removeEventListener("unhandledrejection",n),void 0!==t&&window.clearTimeout(t),ep.current&&eh(!1)}},[ef,eg]=(0,f.useState)(null),ey=!es&&!!eo&&eo.value<BigInt(4e14);return(0,f.useEffect)(()=>{""===$?eg(null):Number($)<eA?eg(e("modals.minimumDeposit",{min:eA,token:D})):Number($)>X?eg(e("common.insufficientBalance")):eg(null)},[$,D,X,eA,e]),(0,f.useEffect)(()=>{let e=async()=>{Y(await w(D))};es||e()},[D,w]),(0,f.useEffect)(()=>{et(!B())},[B,k]),(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(F,{title:"Deposit",active:"deposit-direct",disableClose:y,onBack:y?void 0:()=>x("deposit"),children:es?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.network")}),(0,t.jsx)(h.Select,{value:J,onChange:el,sx:()=>({color:"red",width:"100%",height:40,gap:2,backgroundColor:"background.neutral"}),MenuProps:(0,I.getMenuProps)(z,{vertical:"bottom",horizontal:"right"}),children:Object.values(G).filter(e=>"Ethereum"===e.name).map(e=>(0,t.jsxs)(u.MenuItem,{value:e.name,disableRipple:!0,children:[(0,t.jsx)(o.CryptoIcon,{symbol:e.icon,alt:e.name,width:20,height:20,style:{marginRight:8}}),(0,t.jsx)("p",{children:e.name})]},`network-${e.name}`))})]}),(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.asset")}),(0,t.jsx)(s.IconAutocomplete,{options:M,value:O,onChange:e=>{e&&R(e.symbol)},getOptionLabel:e=>e.symbol,isOptionEqualToValue:(e,t)=>e.symbol===t.symbol,renderIcon:e=>(0,t.jsx)(o.CryptoIcon,{symbol:e.symbol,alt:e.symbol,width:20,height:20})})]}),(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("modals.yourDepositAddress")}),(0,t.jsxs)(A.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.grey["500Channel"],.08),borderRadius:1,px:2,py:1.5,gap:1},children:[(0,t.jsx)(p.Typography,{variant:"body2",sx:{fontFamily:"monospace",letterSpacing:"0.05em",color:"text.primary",wordBreak:"break-all"},children:ea}),ea&&(0,t.jsx)(i.CopyIconButton,{value:ea,toastMessage:"Address copied!",iconSize:20,sx:{p:.5,transition:"all 0.2s ease-in-out",flexShrink:0,"&:hover":{color:"primary.main",backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.primary.mainChannel,.08)}},iconSx:{color:"text.secondary"}})]})]}),(0,t.jsxs)(A.Box,{px:1.5,py:1,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.warning.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"flex-start",gap:1},children:[(0,t.jsx)(n.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"warning.main",mt:.25,flexShrink:0}}),(0,t.jsx)(p.Typography,{variant:"body1",color:"warning.light",children:e("modals.depositAddressWarning",{token:D,networkName:k?"Ethereum mainnet":"Ethereum Sepolia",min:eA})})]}),(0,t.jsx)(l.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:()=>x(null),disableRipple:!0,children:e("common.done")}),(0,t.jsx)(A.Box,{sx:{textAlign:"center",display:"flex",alignItems:"center"},children:(0,t.jsx)(c.Divider,{sx:{borderStyle:"dashed",flex:1}})}),(0,t.jsx)(l.Button,{fullWidth:!0,variant:"contained",color:"inherit",size:"large",onClick:em,disableRipple:!0,loading:eu,disabled:eu||!ea,children:eu?e("common.loading"):"Fund Wallet"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.network")}),(0,t.jsx)(h.Select,{value:J,onChange:el,sx:()=>({color:"red",width:"100%",height:40,gap:2,backgroundColor:"background.neutral"}),MenuProps:(0,I.getMenuProps)(z,{vertical:"bottom",horizontal:"right"}),children:Object.values(G).filter(e=>"Ethereum"===e.name).map(e=>(0,t.jsxs)(u.MenuItem,{value:e.name,disableRipple:!0,children:[(0,t.jsx)(o.CryptoIcon,{symbol:e.icon,alt:e.name,width:20,height:20,style:{marginRight:8}}),(0,t.jsx)("p",{children:e.name})]},`network-${e.name}`))})]}),(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.asset")}),(0,t.jsx)(s.IconAutocomplete,{options:M,value:O,onChange:e=>{e&&R(e.symbol)},getOptionLabel:e=>e.symbol,isOptionEqualToValue:(e,t)=>
5e.symbol===t.symbol,renderIcon:e=>(0,t.jsx)(o.CryptoIcon,{symbol:e.symbol,alt:e.symbol,width:20,height:20})})]}),(0,t.jsxs)(A.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsxs)(A.Box,{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:"Amount"}),(0,t.jsxs)(p.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",X?`${X.toFixed(2)} ${D}`:`0 ${D}`]})]}),(0,t.jsx)(r.default,{fullWidth:!0,endAdornment:(0,t.jsx)(d.InputAdornment,{position:"end",children:(0,t.jsx)(l.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{q(X.toString())},disabled:y,children:"MAX"})}),placeholder:"0",value:$,onChange:e=>{q(e.target.value)},type:"number"})]}),ey&&!ef&&!!$&&(0,t.jsxs)(A.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.warning.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsxs)(A.Box,{component:"svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",sx:{color:"warning.dark",flexShrink:0},children:[(0,t.jsx)("path",{d:"M8.57465 3.21635L1.51632 14.9997C1.37079 15.2517 1.29379 15.5374 1.29298 15.8284C1.29216 16.1195 1.36756 16.4056 1.51167 16.6585C1.65579 16.9113 1.86359 17.122 2.11441 17.2696C2.36523 17.4171 2.65032 17.4965 2.94132 17.4997H17.058C17.349 17.4965 17.6341 17.4171 17.8849 17.2696C18.1357 17.122 18.3435 16.9113 18.4876 16.6585C18.6317 16.4056 18.7071 16.1195 18.7063 15.8284C18.7055 15.5374 18.6285 15.2517 18.483 14.9997L11.4247 3.21635C11.2761 2.97144 11.0669 2.76895 10.8173 2.62842C10.5677 2.48789 10.2861 2.41406 9.99965 2.41406C9.71321 2.41406 9.43159 2.48789 9.18199 2.62842C8.93238 2.76895 8.72321 2.97144 8.57465 3.21635Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M10 7.5V10.8333",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M10 14.167H10.0083",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,t.jsx)(p.Typography,{variant:"body1",color:"warning.light",children:"You appear to be running low on gas fees."})]}),ef&&(0,t.jsxs)(A.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(n.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(p.Typography,{variant:"body1",color:"secondary.light",children:ef})]}),ee?(0,t.jsx)(A.Box,{children:(0,t.jsx)(l.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:ec,disableRipple:!0,loading:y,disabled:y,children:y?e("common.switching"):e("modals.switchToChain",{chainName:E.name})})}):(0,t.jsx)(l.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:ed,disableRipple:!0,loading:y,disabled:!K.DEPOSITS_ENABLED||null!==ef||y||!$,children:y?"Confirming...":"Deposit"}),(0,t.jsxs)(A.Box,{sx:{textAlign:"center",display:"flex",alignItems:"center"},children:[(0,t.jsx)(c.Divider,{sx:{borderStyle:"dashed",flex:1}}),(0,t.jsx)(p.Typography,{variant:"caption",color:"text.disabled",mx:1.5,children:"OR"}),(0,t.jsx)(c.Divider,{sx:{borderStyle:"dashed",flex:1}})]}),(0,t.jsx)(l.Button,{fullWidth:!0,variant:"contained",color:"inherit",size:"large",onClick:()=>x("bridge"),disableRipple:!0,children:e("modals.bridgeFromOtherChains")})]})})})}],826734);var z=e.i(693380);let $=e=>{let r,n,i,a,o,s,l,c,d=(0,g.c)(16),{title:u,description:h,badge:m,onClick:f}=e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(r={width:"100%",display:"flex",flexDirection:"column",alignItems:"stretch",textAlign:"left",gap:.5,p:2,borderRadius:1,backgroundColor:q,border:"1px solid transparent",transition:"border-color 0.2s ease-in-out","&:hover":{borderColor:"grey.500"}},d[0]=r):r=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},d[1]=n):n=d[1],d[2]!==u?(i=(0,t.jsx)(p.Typography,{variant:"subtitle1",children:u}),d[2]=u,d[3]=i):i=d[3],d[4]!==m?(a=m&&(0,t.jsx)(p.Typography,{variant:"caption",sx:{color:"primary.main",backgroundColor:X,borderRadius:.75,px:1,py:.25,flexShrink:0},children:m}),d[4]=m,d[5]=a):a=d[5],d[6]!==i||d[7]!==a?(o=(0,t.jsxs)(A.Box,{sx:n,children:[i,a]}),d[6]=i,d[7]=a,d[8]=o):o=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(s={fontSize:"12px !important",marginTop:"6px"},d[9]=s):s=d[9],d[10]!==h?(l=(0,t.jsx)(p.Typography,{variant:"body2",color:"text.secondary",sx:s,children:h}),d[10]=h,d[11]=l):l=d[11],d[12]!==f||d[13]!==o||d[14]!==l?(c=(0,t.jsxs)(z.ButtonBase,{disabled:!K.DEPOSITS_ENABLED,onClick:f,disableRipple:!0,sx:r,children:[o,l]}),d[12]=f,d[13]=o,d[14]=l,d[15]=c):c=d[15],c};function q(e){return(0,m.varAlpha)(e.vars.palette.grey["500Channel"],.08)}function X(e){return(0,m.varAlpha)(e.vars.palette.primary.mainChannel,.12)}e.s(["DepositSelectModal",0,()=>{let e,r,n,i,a,o,s,A,l,c,d,u=(0,g.c)(29),h=(0,V.useTranslations)(),{setModal:p}=(0,C.useActionStore)();return u[0]!==h?(e=h("modals.depositTitle"),u[0]=h,u[1]=e):e=u[1],u[2]!==h?(r=h("modals.depositDirectTitle"),u[2]=h,u[3]=r):r=u[3],u[4]!==h?(n=h("modals.depositDirectDesc"),u[4]=h,u[5]=n):n=u[5],u[6]!==h?(i=h("modals.depositDirectBadge"),u[6]=h,u[7]=i):i=u[7],u[8]!==p?(a=()=>p("deposit-direct"),u[8]=p,u[9]=a):a=u[9],u[10]!==r||u[11]!==n||u[12]!==i||u[13]!==a?(o=(0,t.jsx)($,{title:r,de
5scription:n,badge:i,onClick:a}),u[10]=r,u[11]=n,u[12]=i,u[13]=a,u[14]=o):o=u[14],u[15]!==h?(s=h("modals.depositSwapperTitle"),u[15]=h,u[16]=s):s=u[16],u[17]!==h?(A=h("modals.depositSwapperDesc"),u[17]=h,u[18]=A):A=u[18],u[19]!==p?(l=()=>p("deposit-swapper"),u[19]=p,u[20]=l):l=u[20],u[21]!==s||u[22]!==A||u[23]!==l?(c=(0,t.jsx)($,{title:s,description:A,onClick:l}),u[21]=s,u[22]=A,u[23]=l,u[24]=c):c=u[24],u[25]!==e||u[26]!==o||u[27]!==c?(d=(0,t.jsxs)(F,{title:e,active:"deposit",children:[o,c]}),u[25]=e,u[26]=o,u[27]=c,u[28]=d):d=u[28],d}],230103)},179493,77744,493094,205797,306613,e=>{"use strict";let t;var r=e.i(474076),n=e.i(500932),i=e.i(271645),a=e.i(397837),o=e.i(838456),s=e.i(782904),A=e.i(693655),l=e.i(166107),c=e.i(268407);e.i(565306);var d=e.i(849850);e.i(849387);var u=e.i(727726),h=e.i(39900),p=e.i(709643);let m=e=>{let t,i,a,c,d,u,h,p,m,f,g=(0,n.c)(24),{title:y,description:b,selected:x,disabled:w,onClick:v}=e,C=void 0!==w&&w,B=x?"rgba(2, 154, 99, 0.08)":"#191919",S=C?"not-allowed":"pointer",k=C?.5:1,E=C||x?void 0:"rgba(2, 154, 99, 0.08)";g[0]!==E?(t={bgcolor:E},g[0]=E,g[1]=t):t=g[1],g[2]!==B||g[3]!==S||g[4]!==k||g[5]!==t?(i={display:"flex",gap:1.5,p:2,borderRadius:1,bgcolor:B,cursor:S,opacity:k,transition:"background-color 0.2s ease","&:hover":t},g[2]=B,g[3]=S,g[4]=k,g[5]=t,g[6]=i):i=g[6];let F=C?void 0:v;return g[7]!==x?(a=(0,r.jsx)(l.Checkbox,{checked:x}),g[7]=x,g[8]=a):a=g[8],g[9]===Symbol.for("react.memo_cache_sentinel")?(c={display:"flex",flexDirection:"column",gap:.5,flex:1},g[9]=c):c=g[9],g[10]===Symbol.for("react.memo_cache_sentinel")?(d={color:"white",fontSize:"12px !important",lineHeight:"16px"},g[10]=d):d=g[10],g[11]!==y?(u=(0,r.jsx)(s.Typography,{variant:"body2",sx:d,children:y}),g[11]=y,g[12]=u):u=g[12],g[13]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#c2c2c2",fontSize:"12px !important",lineHeight:"16px"},g[13]=h):h=g[13],g[14]!==b?(p=(0,r.jsx)(s.Typography,{variant:"body2",sx:h,children:b}),g[14]=b,g[15]=p):p=g[15],g[16]!==u||g[17]!==p?(m=(0,r.jsxs)(o.Box,{sx:c,children:[u,p]}),g[16]=u,g[17]=p,g[18]=m):m=g[18],g[19]!==m||g[20]!==i||g[21]!==F||g[22]!==a?(f=(0,r.jsxs)(A.Paper,{elevation:0,sx:i,onClick:F,children:[a,m]}),g[19]=m,g[20]=i,g[21]=F,g[22]=a,g[23]=f):f=g[23],f};e.s(["MarginModal",0,()=>{let e=(0,c.useTradingDataStore)(e=>e.selectedInstrument),t=(0,p.useTranslations)(),n=(0,c.useTradingDataStore)(t=>e?t.instruments[e]:void 0),o=(0,c.useUserTradingDataStore)(e=>e.leverage),s=e?o[e]?.margin_mode??"cross":"cross",{setModal:A}=(0,c.useActionStore)(),{updateMarginMode:l}=(0,u.useAccountActions)(),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(s),{fetchInstrumentLeverage:x}=(0,h.useInstrumentLeverage)(),w=async()=>{if(n){g(!0);try{"cross"===y?await l(n.id,"cross"):"isolated"===y&&await l(n.id,"isolated")}catch(e){console.error("Error updating margin mode:",e)}finally{g(!1),A(null),setTimeout(()=>{x(e)},1500)}g(!1),A(null)}};return(0,r.jsx)(d.ModalBox,{title:"Margin Mode Selection",active:"margin",disableClose:f,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{title:t("modals.standardCrossMargin"),description:t("modals.crossMarginDesc"),selected:"cross"===y,onClick:()=>b("cross")}),(0,r.jsx)(m,{title:t("modals.isolatedMargin"),description:t("modals.isolatedMarginDesc"),selected:"isolated"===y,onClick:()=>b("isolated")}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:w,disableRipple:!0,disabled:f,children:f?"Confirming...":"Confirm"})]})})}],179493);var f=e.i(73441),f=f;e.i(247167);var g=e.i(207670),y=e.i(519130),b=e.i(667239),x=e.i(868308),w=e.i(705538),v=e.i(300867),C=e.i(99922),B=e.i(629123),S=e.i(597985),k=e.i(986472),E=e.i(952761),E=E;let F={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var T=e.i(213635),T=T,U=e.i(777539);function I(e,t,r,n,i){return 1===r?Math.min(e+t,i):Math.max(e-t,n)}function Q(e,t){return e-t}function j(e,t){let{index:r}=e.reduce((e,r,n)=>{let i=Math.abs(t-r);return null===e||i<e.distance||i===e.distance?{distance:i,index:n}:e},null)??{};return r}function L(e,t){if(void 0!==t.current&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){let n=e.changedTouches[r];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}
5function _({values:e,newValue:t,index:r}){let n=e.slice();return n[r]=t,n.sort(Q)}function P({sliderRef:e,activeIndex:t,setActive:r}){let n=(0,v.unstable_ownerDocument)(e.current);e.current?.contains(n.activeElement)&&Number(n?.activeElement?.getAttribute("data-index"))===t||e.current?.querySelector(`[type="range"][data-index="${t}"]`).focus(),r&&r(t)}function D(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&function(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}(e,t)}let R={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},M=e=>e;function O(){return void 0===t&&(t=!("u">typeof CSS)||"function"!=typeof CSS.supports||CSS.supports("touch-action","none")),t}var N=e.i(437424),H=e.i(261722),V=e.i(50915),K=e.i(699844),G=e.i(172682),W=e.i(390290),z=e.i(549728),$=e.i(871321);function q(e){return e}let X=(0,H.styled)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[`color${(0,W.default)(r.color)}`],"medium"!==r.size&&t[`size${(0,W.default)(r.size)}`],r.marked&&t.marked,"vertical"===r.orientation&&t.vertical,"inverted"===r.track&&t.trackInverted,!1===r.track&&t.trackFalse]}})((0,V.default)(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${$.default.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${$.default.dragging}`]:{[`& .${$.default.thumb}, & .${$.default.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter((0,z.default)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Y=(0,H.styled)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),J=(0,H.styled)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((0,V.default)(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter((0,z.default)()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:(0,b.lighten)(e.palette[t].main,.62),borderColor:(0,b.lighten)(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:(0,b.darken)(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:(0,b.darken)(e.palette[t].main,.5)})}}}))]}))),Z=(0,H.styled)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.thumb,t[`thumbColor${(0,W.default)(r.color)}`],"medium"!==r.size&&t[`thumbSize${(0,W.default)(r.size)}`]]}})((0,V.default)(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,he
5ight:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${$.default.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter((0,z.default)()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${$.default.focusVisible}`]:{...e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${(0,b.alpha)(e.palette[t].main,.16)}`},"@media (hover: none)":{boxShadow:"none"}},[`&.${$.default.active}`]:{...e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[t].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${(0,b.alpha)(e.palette[t].main,.16)}`}}}}))]}))),ee=(0,H.styled)(function(e){let{children:t,className:n,value:a}=e,o=(e=>{let{open:t}=e;return{offset:(0,g.default)(t&&$.default.valueLabelOpen),circle:$.default.valueLabelCircle,label:$.default.valueLabelLabel}})(e);return t?i.cloneElement(t,{className:(0,g.default)(t.props.className)},(0,r.jsxs)(i.Fragment,{children:[t.props.children,(0,r.jsx)("span",{className:(0,g.default)(o.offset,n),"aria-hidden":!0,children:(0,r.jsx)("span",{className:o.circle,children:(0,r.jsx)("span",{className:o.label,children:a})})})]})):null},{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((0,V.default)(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${$.default.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${$.default.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),et=(0,H.styled)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,G.default)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{let{markActive:r}=e;return[t.mark,r&&t.markActive]}})((0,V.default)(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),er=(0,H.styled)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,G.default)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((0,V.default)(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),en=({children:e})=>e,ei=i.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiSlider"}),a=(0,x.useRtl)(),{"aria-label":o,"aria-valuetext":s,"aria-labelledby":A,component:l="span",components:c={},componentsProps:d={},color:u="primary",classes:h,className:p,disableSwap:m=!1,disabled:f=!1,getAriaLabel:b,getAriaValueText:H,marks:V=!1,max:G=100,min:z=0,name:ei,onChange:ea,onChangeCommitted:eo,orientation:es="horizontal",shiftStep:eA=10,size:el="medium",step:ec=1,scale:ed=q,slotProps:eu,slots:eh,tabIndex:ep,track:em="normal",value:ef,valueLabelDisplay:eg="off",valueLabelFormat:ey=q,...eb}=n,ex={...n,isRtl:a,max:G,min:z,classes:h,disabled:f,disableSwap:m,orientation:es,marks:V,color:u,size:el,step:ec,shiftStep:eA,scale:ed,track:em,valueLabelDisplay:eg,valueLabelFormat:ey},{axisProps:ew,getRootProps:ev,getHiddenInputProps:eC,getThumbProps:eB,open:eS,active:ek,axis:eE,focusedThumbIndex:eF,range:eT,dragging:eU,marks:eI,values:eQ,trackOffset:ej,trackLeap:eL,getThumbStyle:e_}=function(e){let t,{"aria-labelledby":r,defaultValue:n,disabled:a=!1,disableSwap:o=!1,isRtl:s=!1,marks:A=!1,max:l=100,min:c=0,name:d,onChange:u,onChangeCommitted:h,orientation:p="horizontal",rootRef:m,scale:f=M,step:g=1,shiftStep:y=10,tabIndex:b,value:x}=e,w=i.useRef(void 0),[N,H]=i.useState(-1),[V,K]=i.useState(-1),[G,W]=i.useState(!1),z=i.useRef(0),$=i.useRef(null),[q,X]=(0,C.unstable_useControlled)({controlled:x,default:n??c,name:"Slider"}),Y=u&&((e,t,r)=>{let n=e.nativeEvent||e,i=new n.constructor(n.type,n);Object.defineProperty(i,"target",{writable:!0,value:{value:t,name:d}}),$.current=t,u(i,t,r)}),J=Array.isArray(q),Z=J?q.slice().sort(Q):[q];Z=Z.map(e=>null==e?c:(0,T.default)(e,c,l));let ee=!0===A&&null!==g?[...Array(Math.floor((l-c)/g)+1)].map((e,t)=>({value:c+g*t})):A||[],et=ee.map(e=>e.value),[er,en]=i.useState(-1),ei=i.useRef(null),ea=(0,k.unstable_useForkRef)(m,ei),eo=(e,t)=>{let r=Number(e.currentTarget.getAttribute("data-index")),n=Z[r],i=et.indexOf(n),a=t;if(ee&&null==g){let e=et[et.length-1];a=a>=e?e:a<=et[0]?et[0]:a<n?et[i-1]:et[i+1]}if(a=(0,T.default)(a,c,l),J){o&&(a=(0,T.default)(a,Z[r-1]||-1/0,Z[r+1]||1/0));let e=a;a=_({values:Z,newValue:a,index:r});let t=r;o||(t=a.indexOf(e)),P({sliderRef:ei,activeIndex:t})}X(a),en(r),Y&&!D(a,q)&&Y(e,a,r),h&&h(e,$.current??a)};(0,B.unstable_useEnhancedEffect)(()=>{a&&ei.current.contains(document.activeElement)&&document.activeElement?.blur()},[a]),a&&-1!==N&&H(-1),a&&-1!==er&&en(-1);let es=i.useRef(void 0),eA=p;s&&"horizontal"===p&&(eA+="-reverse");let el=({finger:e,move:t=!1})=>{let r,n,{current:i}=ei,{width:a,height:s,bottom:A,left:d}=i.getBoundingClientRect();if(r=eA.startsWith("vertical")?(A-e.y)/s:(e.x-d)/a,eA.includes("-reverse")&&(r=1-r),n=(l-c)*r+c,g)n=Number((Math.round((n-c)/g)*g+c).toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(g)));else{let e=j(et,n);n=et[e]}n=(0,T.default)(n,c,l);let u=0;if(J){u=t?es.current:j(Z,n),o&&(n=(0,T.default)(n,Z[u-1]||-1/0,Z[u+1]||1/0));let e=n;n=_({values:Z,newValue:n,index:u}),o&&t||(es.current=u=n.indexOf(e))}return{newValue:n,activeIndex:u}},ec=(0,S.unstable_useEventCallback)(e=>{let t=L(e,w);if(!t)return;if(z.current+=1,"mousemove"===e.type&&0===e.buttons)return void ed(e);let{newValue:r,activeIndex:n}=el({finger:t,move:!0});P({sliderRef:ei,activeIndex:n,setActive:H}),X(r),!G&&z.current>2&&W(!0),Y&&!D(r,q)&&Y(e,r,n)}),ed=(0,S.unstable_useEventCallback)(e=>{let t=L(e,w);if(W(!1),!t)return;let{newValue:r}=el({finger:t,move:!0});H(-1),"touchend"===e.type&&K(-1),h&&h(e,$.current??r),w.current=void 0,eh()}),eu=(0,S.unstable_useEventCallback)(e=>{if(a)return;O()||e.preventDefault();let t=e.changedTouches[0];null!=t&&(w.current=t.identifier);let r=L(e,w);if(!1!==r){let{newValue:t,activeIndex:n}=el({finger:r});P({sliderRef:ei,activeIndex:n,setActive:H}),X(t),Y&&!D(t,q)&&Y(e,t,n)}z.current=0;let n=(0,v.unstable_ownerDocument)(ei.current);n.addEventListener("touchmove",ec,{passive:!0}),n.addEventListener("touchend",ed,{passive:!0})}),eh=i.useCallback(()=>{let e=(0,v.unstable_ownerDocument)(ei.current);e.removeEventListener("mousemove",ec),e.removeEventListener("mouseup",ed),e.removeEventListener("touchmove",ec),e.removeEventListener("touchend",ed)},[ed,ec]);i.useEffect(()=>{let{current:e}=ei;return e.addEventListener("touchstart",eu,{passive:O()}),()=>{e.removeEventListener("touchstart",eu),eh()}},[eh,eu]),i.useEffect(()=>{a&&eh()},[a,eh]);let ep=((J?Z[0]:c)-c)*100/(l-c),em=(Z[Z.length-1]-c)*100/(l-c)-ep;return"vertical"===p&&(t=s?"vertical-rl":"vertical-lr"),{active:N,axis:eA,axisProps:R,dragging:G,focusedThumbIndex:er,getHiddenInputProps:(n={})=>{let i,o,A,u,h=(0,U.default)(n),m={onChange:(i=h||{},e=>{i.onChange?.(e),eo(e,e.target.valueAsNumber)}),onFocus:(o=h||{},e=>{let t=Number(e.currentTarget.getAttribute("data-index"));(0,E.default)(e.target)&&en(t),K(t),o?.onFocus?.(e)}),onBlur:(A=h||{},e=>{(0,E.default)(e.target)||en(-1),K(-1),A?.onBlur?.(e)}),onKeyDown:(u=h||{},e=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(e.ke
5y)){e.preventDefault();let t=Z[Number(e.currentTarget.getAttribute("data-index"))],r=null;if(null!=g){let n=e.shiftKey?y:g;switch(e.key){case"ArrowUp":r=I(t,n,1,c,l);break;case"ArrowRight":r=I(t,n,s?-1:1,c,l);break;case"ArrowDown":r=I(t,n,-1,c,l);break;case"ArrowLeft":r=I(t,n,s?1:-1,c,l);break;case"PageUp":r=I(t,y,1,c,l);break;case"PageDown":r=I(t,y,-1,c,l);break;case"Home":r=c;break;case"End":r=l}}else if(ee){let n=et[et.length-1],i=et.indexOf(t);[s?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(e.key)?r=0===i?et[0]:et[i-1]:[s?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"].includes(e.key)&&(r=i===et.length-1?n:et[i+1])}null!=r&&eo(e,r)}u?.onKeyDown?.(e)})},x={...h,...m};return{tabIndex:b,"aria-labelledby":r,"aria-orientation":p,"aria-valuemax":f(l),"aria-valuemin":f(c),name:d,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":e.step??void 0,disabled:a,...n,...x,style:{...F,direction:s?"rtl":"ltr",width:"100%",height:"100%",writingMode:t}}},getRootProps:(e={})=>{let t,r=(0,U.default)(e),n={onMouseDown:(t=r||{},e=>{if(t.onMouseDown?.(e),a||e.defaultPrevented||0!==e.button)return;e.preventDefault();let r=L(e,w);if(!1!==r){let{newValue:t,activeIndex:n}=el({finger:r});P({sliderRef:ei,activeIndex:n,setActive:H}),X(t),Y&&!D(t,q)&&Y(e,t,n)}z.current=0;let n=(0,v.unstable_ownerDocument)(ei.current);n.addEventListener("mousemove",ec,{passive:!0}),n.addEventListener("mouseup",ed)})},i={...r,...n};return{...e,ref:ea,...i}},getThumbProps:(e={})=>{let t,r,n=(0,U.default)(e),i={onMouseOver:(t=n||{},e=>{t.onMouseOver?.(e),K(Number(e.currentTarget.getAttribute("data-index")))}),onMouseLeave:(r=n||{},e=>{r.onMouseLeave?.(e),K(-1)})};return{...e,...n,...i}},marks:ee,open:V,range:J,rootRef:ea,trackLeap:em,trackOffset:ep,values:Z,getThumbStyle:e=>({pointerEvents:-1!==N&&N!==e?"none":void 0})}}({...ex,rootRef:t});ex.marked=eI.length>0&&eI.some(e=>e.label),ex.dragging=eU,ex.focusedThumbIndex=eF;let eP=(e=>{let{disabled:t,dragging:r,marked:n,orientation:i,track:a,classes:o,color:s,size:A}=e,l={root:["root",t&&"disabled",r&&"dragging",n&&"marked","vertical"===i&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",s&&`color${(0,W.default)(s)}`,A&&`size${(0,W.default)(A)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",A&&`thumbSize${(0,W.default)(A)}`,s&&`thumbColor${(0,W.default)(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,y.default)(l,$.getSliderUtilityClass,o)})(ex),eD=eh?.root??c.Root??X,eR=eh?.rail??c.Rail??Y,eM=eh?.track??c.Track??J,eO=eh?.thumb??c.Thumb??Z,eN=eh?.valueLabel??c.ValueLabel??ee,eH=eh?.mark??c.Mark??et,eV=eh?.markLabel??c.MarkLabel??er,eK=eh?.input??c.Input??"input",eG=eu?.root??d.root,eW=eu?.rail??d.rail,ez=eu?.track??d.track,e$=eu?.thumb??d.thumb,eq=eu?.valueLabel??d.valueLabel,eX=eu?.mark??d.mark,eY=eu?.markLabel??d.markLabel,eJ=eu?.input??d.input,eZ=(0,w.default)({elementType:eD,getSlotProps:ev,externalSlotProps:eG,externalForwardedProps:eb,additionalProps:{...(!eD||!(0,N.default)(eD))&&{as:l}},ownerState:{...ex,...eG?.ownerState},className:[eP.root,p]}),e0=(0,w.default)({elementType:eR,externalSlotProps:eW,ownerState:ex,className:eP.rail}),e1=(0,w.default)({elementType:eM,externalSlotProps:ez,additionalProps:{style:{...ew[eE].offset(ej),...ew[eE].leap(eL)}},ownerState:{...ex,...ez?.ownerState},className:eP.track}),e2=(0,w.default)({elementType:eO,getSlotProps:eB,externalSlotProps:e$,ownerState:{...ex,...e$?.ownerState},className:eP.thumb}),e4=(0,w.default)({elementType:eN,externalSlotProps:eq,ownerState:{...ex,...eq?.ownerState},className:eP.valueLabel}),e3=(0,w.default)({elementType:eH,externalSlotProps:eX,ownerState:ex,className:eP.mark}),e5=(0,w.default)({elementType:eV,externalSlotProps:eY,ownerState:ex,className:eP.markLabel}),e6=(0,w.default)({elementType:eK,getSlotProps:eC,externalSlotProps:eJ,ownerState:ex});return(0,r.jsxs)(eD,{...eZ,children:[(0,r.jsx)(eR,{...e0}),(0,r.jsx)(eM,{...e1}),eI.filter(e=>e.value>=z&&e.value<=G).map((e,t)=>{let n,a=(e.value-z)*100/(G-z),o=ew[eE].offset(a);return n=!1===em?eQ.includes(e.value):"normal"===em&&(eT?e.value>=eQ[0]&&e.value<=eQ[eQ.length-1]:e.value<=eQ[0])||"inverted"===em&&(eT?e.value<=eQ[0]||e.value>=eQ[eQ.length-1]:e.value>=eQ[0]),(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(eH,{"data-index":t,...e3,...!(0,N.default)(eH)&&{markActive:n},style:{...o,...e3.style},className:(0,g.default)(e3.className,n&&eP.markActive)}),null!=e.label?(0,r.jsx)(eV,{"aria-hidden":!0,"data-index":t,...e5,...!(0,N.default)(eV)&&{markLabelActive:n},style:{...o,...e5.style},className:(0,g.default)(eP.markLabel,e5.className,n&&eP.markLabelActive),children:e.label}):null]},t)}),eQ.map((e,t)=>
5{let n=(e-z)*100/(G-z),i=ew[eE].offset(n),a="off"===eg?en:eN;return(0,r.jsx)(a,{...!(0,N.default)(a)&&{valueLabelFormat:ey,valueLabelDisplay:eg,value:"function"==typeof ey?ey(ed(e),t):ey,index:t,open:eS===t||ek===t||"on"===eg,disabled:f},...e4,children:(0,r.jsx)(eO,{"data-index":t,...e2,className:(0,g.default)(eP.thumb,e2.className,ek===t&&eP.active,eF===t&&eP.focusVisible),style:{...i,...e_(t),...e2.style},children:(0,r.jsx)(eK,{"data-index":t,"aria-label":b?b(t):o,"aria-valuenow":ed(e),"aria-labelledby":A,"aria-valuetext":H?H(ed(e),t):s,value:eQ[t],...e6})})},t)})]})});e.s(["Slider",0,ei],77744);let ea=(0,H.styled)(f.default)(({theme:e})=>({background:e.palette.grey[800],padding:e.spacing(.5),borderRadius:Number(e.shape.borderRadius)/2,width:42,display:"flex",alignItems:"center",justifyContent:"center",gap:2,"& input":{textAlign:"center",padding:0,fontSize:e.typography.body1.fontSize,flex:1}})),eo=({value:e,onChange:t,min:n=0,max:a=100,step:A=1,marks:l=[,,,,,].fill(0).map((e,t)=>({value:25*t})),unit:c="%",label:d,color:u="primary.main",sx:h})=>{let[p,m]=(0,i.useState)(e.toString()),[f,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{f||m(e.toString())},[e,f]);let y=()=>{g(!1);let r=parseInt(p,10);m((r=isNaN(r)||""===p?e:Math.max(n,Math.min(a,r))).toString()),r!==e&&t(r)};return(0,r.jsxs)(o.Box,{sx:h,children:[d&&(0,r.jsx)(s.Typography,{variant:"body1",color:"textSecondary",mb:1,children:d}),(0,r.jsxs)(o.Box,{sx:{display:"flex",gap:2,alignItems:"center",ml:.7},children:[(0,r.jsx)(ei,{value:e,onChange:(e,r)=>{t(Array.isArray(r)?r[0]:r)},"aria-label":"slider",valueLabelDisplay:"auto",size:"small",marks:l,step:A,sx:{"& .MuiSlider-track":{backgroundColor:u},"& .MuiSlider-markActive":{backgroundColor:u}},max:a,min:n}),(0,r.jsx)(ea,{value:p,onChange:e=>{let r=e.target.value.replace(/[^0-9]/g,"");if(m(r),""===r)return;let i=parseInt(r,10);isNaN(i)||t(Math.max(n,Math.min(a,i)))},onFocus:()=>g(!0),onBlur:y,onKeyDown:e=>{"Enter"===e.key&&y()},inputProps:{"aria-label":"slider value",min:n,max:a,width:"35px"},sx:{minWidth:"55px"},endAdornment:c&&(0,r.jsx)(s.Typography,{variant:"body1",color:"textSecondary",sx:{fontSize:"inherit"},children:c})})]})]})};e.s(["default",0,eo],493094);var es=e.i(632418);e.i(992550);var eA=e.i(407585);e.i(929009),e.s(["LeverageModal",0,()=>{let e=(0,p.useTranslations)(),t=(0,c.useTradingDataStore)(e=>e.selectedInstrument),n=(0,c.useTradingDataStore)(e=>t?e.instruments[t]:void 0),A=(0,c.useUserTradingDataStore)(e=>e.leverage),l=t?A[t]?.leverage??1:1,{updatePerpInstrumentLeverage:m}=(0,u.useAccountActions)(),{fetchInstrumentLeverage:f}=(0,h.useInstrumentLeverage)(),{setModal:g}=(0,c.useActionStore)(),[y,b]=(0,i.useState)(l),[x,w]=(0,i.useState)(!1);(0,i.useEffect)(()=>{b(l)},[l]);let v=(0,i.useMemo)(()=>{if(!n?.margin_tiers||0===n.margin_tiers.length)return null;let e=n.margin_tiers.find(e=>e.max_leverage===y);if(e)return Number(e.notional_usd_threshold);let t=n.margin_tiers.filter(e=>e.max_leverage>=y).sort((e,t)=>e.max_leverage-t.max_leverage)[0];return y<Math.min(...n.margin_tiers.map(e=>e.max_leverage))?null:t?Number(t.notional_usd_threshold):null},[n,y]),C=async()=>{if(!n?.id)return void console.error("Instrument ID is missing");w(!0);try{await m(n.id,y.toString())}catch(e){console.error("Error setting leverage:",e)}finally{w(!1),g(null),setTimeout(()=>{f(t)},1500)}};return(0,r.jsx)(d.ModalBox,{title:e("modals.adjustLeverage"),active:"leverage",disableClose:x,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.Typography,{variant:"body1",color:"textSecondary",mb:.5,children:[e("modals.leverageDescription")," ",t,". ",e("modals.maxLeverageIs")," ",Number(n?.max_leverage),"x."]}),n?.margin_tiers&&n.margin_tiers.length>0&&(0,r.jsx)(s.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e(v?"modals.maxPositionDecreasesLong":"modals.maxPositionDecreasesShort")}),(0,r.jsx)(eo,{value:y,onChange:e=>b(Number(e)),max:Number(n?.max_leverage),min:1,step:1,unit:"x",marks:[,,,,,].fill(0).map((e,t)=>({value:Math.round((t+1)*(Number(n?.max_leverage)||100)/4)}))}),(0,r.jsx)(a.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:C,disabled:x,children:e("common.confirm")}),(0,r.jsxs)(o.Box,{p:1,sx:{backgroundColor:e=>
5(0,es.varAlpha)(e.vars.palette.info.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,r.jsx)(eA.Iconify,{icon:"mingcute:information-fill",width:24,height:24,sx:{color:"info.main"}}),(0,r.jsx)(s.Typography,{variant:"body1",color:"info.light",children:e("modals.leverageRiskNote")})]})]})})}],205797),e.s(["OneWayModal",0,()=>{let e,t,i,o,A,l,u,h,m=(0,n.c)(19),f=(0,p.useTranslations)(),{setModal:g}=(0,c.useActionStore)();return m[0]!==f?(e=f("modals.positionMode"),m[0]=f,m[1]=e):e=m[1],m[2]!==f?(t=f("modals.oneWayDescription"),m[2]=f,m[3]=t):t=m[3],m[4]!==t?(i=(0,r.jsx)(s.Typography,{variant:"body1",color:"textSecondary",mb:1,children:t}),m[4]=t,m[5]=i):i=m[5],m[6]!==g?(o=()=>g(null),m[6]=g,m[7]=o):o=m[7],m[8]!==f?(A=f("modals.understood"),m[8]=f,m[9]=A):A=m[9],m[10]!==o||m[11]!==A?(l=(0,r.jsx)(a.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:o,children:A}),m[10]=o,m[11]=A,m[12]=l):l=m[12],m[13]!==i||m[14]!==l?(u=(0,r.jsxs)(r.Fragment,{children:[i,l]}),m[13]=i,m[14]=l,m[15]=u):u=m[15],m[16]!==e||m[17]!==u?(h=(0,r.jsx)(d.ModalBox,{title:e,active:"one-way",children:u}),m[16]=e,m[17]=u,m[18]=h):h=m[18],h}],306613)},501434,e=>{"use strict";let t=(0,e.i(916506).default)();e.s(["default",0,t])},984429,e=>{"use strict";var t=e.i(294231),r=e.i(61801);e.s(["default",0,function({props:e,name:n,defaultTheme:i,themeId:a}){let o=(0,r.default)(i);return a&&(o=o[a]||o),(0,t.default)({theme:o,name:n,props:e})}])},290765,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(207670),n=e.i(576423),i=e.i(319727),a=e.i(519130),o=e.i(501434),s=e.i(984429),A=e.i(139416),l=e.i(817494),c=e.i(643982),d=e.i(110900),u=e.i(474076);let h=(0,l.default)(),p=(0,o.default)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function m(e){return(0,s.default)({props:e,name:"MuiStack",defaultTheme:h})}let f=({ownerState:e,theme:t})=>{let r={display:"flex",flexDirection:"column",...(0,c.handleBreakpoints)({theme:t},(0,c.resolveBreakpointValues)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let i=(0,d.createUnarySpacing)(t),a=Object.keys(t.breakpoints.values).reduce((t,r)=>(("object"==typeof e.spacing&&null!=e.spacing[r]||"object"==typeof e.direction&&null!=e.direction[r])&&(t[r]=!0),t),{}),o=(0,c.resolveBreakpointValues)({values:e.direction,base:a}),s=(0,c.resolveBreakpointValues)({values:e.spacing,base:a});"object"==typeof o&&Object.keys(o).forEach((e,t,r)=>{if(!o[e]){let n=t>0?o[r[t-1]]:"column";o[e]=n}}),r=(0,n.default)(r,(0,c.handleBreakpoints)({theme:t},s,(t,r)=>e.useFlexGap?{gap:(0,d.getValue)(i,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[r?o[r]:e.direction]}`]:(0,d.getValue)(i,t)}}))}return(0,c.mergeBreakpointsInOrder)(t.breakpoints,r)};var g=e.i(190059),y=e.i(699844);let b=function(e={}){let{createStyledComponent:n=p,useThemeProps:o=m,componentName:s="MuiStack"}=e,l=n(f);return t.forwardRef(function(e,n){let c,d=o(e),{component:h="div",direction:p="column",spacing:m=0,divider:f,children:g,className:y,useFlexGap:b=!1,...x}=(0,A.extendSxProp)(d),w=(0,a.default)({root:["root"]},e=>(0,i.default)(s,e),{});return(0,u.jsx)(l,{as:h,ownerState:{direction:p,spacing:m,useFlexGap:b},ref:n,className:(0,r.default)(w.root,y),...x,children:f?(c=t.Children.toArray(g).filter(Boolean)).reduce((e,r,n)=>(e.push(r),n<c.length-1&&e.push(t.cloneElement(f,{key:`separator-${n}`})),e),[]):g})})}({createStyledComponent:(0,g.default)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,y.useDefaultProps)({props:e,name:"MuiStack"})});e.s(["Stack",0,b],290765)},437202,155219,741931,711273,296860,823952,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(838456),i=e.i(397837),a=e.i(166107),o=e.i(302682),s=e.i(290765),A=e.i(782904);e.i(565306);var l=e.i(849850),c=e.i(268407),d=e.i(709643);e.s(["ConfirmationModal",0,e=>{let u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E,F,T=(0,r.c)(42),{orderType:U,orderSize:I,limitPrice:Q,orderSizeDenomination:j,handlePlaceOrder:L,action:_,handleClose:P,kind:D,hideSkipConfirmation:R}=e,M=void 0!==R&&R,O=(0,d.useTranslations)(),{skipOpenOrderConfirmation:N,setSkipOpenOrderConfirmation:H}=(0,c.useGlobalStore)();T[0]===Symbol.for("react.memo_cache_sentinel")?(u={display:"flex",justifyContent:"space-between",padding:"6px 0"},h=(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",children:"Action"}),T[0]=u,T[1]=h):(u=T[0],h=T[1]);let V="b"===_?"primary":"secondary",K="b"===_?`${"perps"===D?"Long":"Buy"}`:`${"perps"===D?"Short":"Sell"}`;T[2]!==V||T[3]!==K?(p=(0,t.jsxs)("div",{style:u,children:[h,(0,t.jsx)(A.Typography,{variant:"body1",color:V,children:K})]}),T[2]=V,T[3]=K,T[4]=p):p=T[4],T[5]===Symbol.for("react.memo_cache_sentinel")?(m={display:"flex",justifyContent:"space-between",padding:"6px 0"},f=(0,t.jsx)(A.Typography,{variant:"body1",color:"text.secondary",children:"Size"}),T[5]=m,T[6]=f):(m=T[5],f=T[6]);let G="b"===_?"primary":"secondary";T[7]!==I||T[8]!==j||T[9]!==G?(g=(0,t.jsxs)("div",{style:m,children:[f,(0,t.jsxs)(A.Typography,{variant:"body1",color:G,children:[I," ",j]})]}),T[7]=I,T[8]=j,T[9]=G,T[10]=g):g=T[10],T[11]===Symbol.for("react.memo_cache_sentinel")?(y={display:"flex",justifyContent:"space-between",padding:"6px 0"},b=(0,t.jsx)(A.Typography,{variant:"body1",color:"text.secondary",children:"Price"}),T[11]=y,T[12]=b):(y=T[11],b=T[12]);let W="limit"===U?`${Q}`:"Market";T[13]!==W?(x=(0,t.jsxs)("div",{style:y,children:[b,(0,t.jsx)(A.Typography,{variant:"body1",color:"text.primary",children:W})]}),T[13]=W,T[14]=x):x=T[14],T[15]!==D||T[16]!==O?(w="perps"===D&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",padding:"6px 0"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"text.secondary",children:O("modals.estLiquidationPrice")}),(0,t.jsx)(A.Typography,{variant:"body1",color:"text.primary",children:"--"})]}),T[15]=D,T[16]=O,T[17]=w):w=T[17],T[18]!==g||T[19]!==x||T[20]!==w||T[21]!==p?(v=(0,t.jsxs)("div",{children:[p,g,x,w]}),T[18]=g,T[19]=x,T[20]=w,T[21]=p,T[22]=v):v=T[22],T[23]===Symbol.for("react.memo_cache_sentinel")?(C=(0,t.jsx)(A.Typography,{variant:"body1",children:"You pay no gas fees. The order will be confirmed instantly."}),T[23]=C):C=T[23],T[24]!==M||T[25]!==H||T[26]!==N?(B=!M&&(0,t.jsx)(o.FormControl
5Label,{control:(0,t.jsx)(a.Checkbox,{checked:N,onChange:()=>{H(!N)}}),label:"Don't show this confirmation again",sx:{color:"text.secondary"}}),T[24]=M,T[25]=H,T[26]=N,T[27]=B):B=T[27];let z="b"===_?"primary":"secondary";T[28]!==_||T[29]!==P||T[30]!==L||T[31]!==U?(S=()=>{L(_,U),P()},T[28]=_,T[29]=P,T[30]=L,T[31]=U,T[32]=S):S=T[32],T[33]===Symbol.for("react.memo_cache_sentinel")?(k={"&:active":{transform:"none"}},T[33]=k):k=T[33];let $="b"===_?`${"perps"===D?"Long":"Buy"}`:`${"perps"===D?"Short":"Sell"}`;return T[34]!==z||T[35]!==S||T[36]!==$?(E=(0,t.jsx)(i.Button,{variant:"contained",color:z,size:"large",onClick:S,disabled:!1,disableRipple:!0,disableElevation:!0,sx:k,children:$}),T[34]=z,T[35]=S,T[36]=$,T[37]=E):E=T[37],T[38]!==v||T[39]!==B||T[40]!==E?(F=(0,t.jsx)(l.ModalBox,{title:"Confirm Order",active:"confirmation",children:(0,t.jsx)(n.Box,{children:(0,t.jsxs)(s.Stack,{spacing:2,children:[v,C,B,E]})})}),T[38]=v,T[39]=B,T[40]=E,T[41]=F):F=T[41],F}],437202);var u=e.i(525836);e.i(992550);var h=e.i(407585),p=e.i(206242),m=e.i(632418),f=e.i(271645);e.i(849387);var g=e.i(191182),y=e.i(497624),b=e.i(802260);let x=e=>{let i,a,o,s,l,c,d=(0,r.c)(10),{title:u,option:h}=e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(i={width:"100%"},d[0]=i):i=d[0],d[1]!==u?(a=(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:u}),d[1]=u,d[2]=a):a=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(o={backgroundColor:"background.neutral",padding:1,borderRadius:.5,height:40,display:"flex",alignItems:"center"},d[3]=o):o=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(s={fontSize:12,fontWeight:400,lineHeight:1},d[4]=s):s=d[4],d[5]!==h?(l=(0,t.jsx)(n.Box,{sx:o,children:(0,t.jsx)(A.Typography,{sx:s,children:h})}),d[5]=h,d[6]=l):l=d[6],d[7]!==a||d[8]!==l?(c=(0,t.jsxs)("div",{style:i,children:[a,l]}),d[7]=a,d[8]=l,d[9]=c):c=d[9],c};e.s(["InternalTransferModal",0,()=>{let e=(0,d.useTranslations)(),[r,a]=(0,f.useState)(!1),[o,s]=(0,f.useState)(null),{setModal:w,payload:v}=(0,c.useActionStore)(),{accountInternalBalanceTransferRequest:C}=(0,g.useTransferActions)(),B=(0,c.useTradingDataStore)(e=>e.supportedCollateral),[S,k]=(0,f.useState)(v?.token||B.USDC?.symbol||"USDC"),E=(0,f.useMemo)(()=>Object.values(B),[B]),F=(0,f.useMemo)(()=>E.find(e=>e.symbol===S)??null,[E,S]),T=(0,c.useTradingPreferencesStore)(e=>e.modalTabs.internalTransfer),U=(0,c.useTradingPreferencesStore)(e=>e.setModalTab),[I,Q]=(0,f.useState)(()=>v?.direction==="spot"||v?.direction==="derivative"?v.direction:T),{accountSummary:j}=(0,c.useUserTradingDataStore)(),[L,_]=(0,f.useState)(""),[P,D]=(0,f.useState)(0),R=async()=>{a(!0);try{await C(B[S]?.id??1,L,"spot"===I),w(null)}catch(e){console.error("Internal transfer failed:",e)}finally{a(!1)}};return(0,f.useEffect)(()=>{""===L?s(null):0>=Number(L)?s(e("common.enterValidAmount")):Number(L)>P?s(e("common.insufficientBalance")):s(null)},[L,S,P]),(0,f.useEffect)(()=>{(async()=>{"spot"===I?D(j?.spot_collateral[S]?.withdrawable_balance||0):D(j?.collateral[S]?.withdrawable_balance||0)})()},[S,j,I]),(0,t.jsxs)(l.ModalBox,{title:e("modals.internalTransferTitle",{token:S}),active:"internal-transfer",disableClose:r,children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,t.jsx)(x,{title:e("common.from"),option:"spot"===I?e("common.spot"):e("common.derivatives")}),(0,t.jsx)(i.Button,{variant:"soft",color:"primary",size:"small",sx:{padding:0,height:40,width:40},onClick:()=>{let e="spot"===I?"derivative":"spot";Q(e),U("internalTransfer",e)},children:(0,t.jsx)(h.Iconify,{icon:"mingcute:transfer-line",width:24,height:24})}),(0,t.jsx)(x,{title:e("common.to"),option:"spot"===I?e("common.derivatives"):e("common.spot")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.asset")}),(0,t.jsx)(b.IconAutocomplete,{options:E,value:F,onChange:e=>{e&&k(e.symbol)},getOptionLabel:e=>e.symbol,isOptionEqualToValue:(e,t)=>e.symbol===t.symbol,renderIcon:e=>(0,t.jsx)(y.CryptoIcon,{symbol:e.symbol,alt:e.symbol,width:20,height:20})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.amount")}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",P?`${P.toFixed(2)} ${S}`:`0 ${S}`]})]}),(0,t.jsx)(u.default,{fullWidth:!0,endAdornment:(0,t.jsx)(p.InputAdornment,{position:"end",children:(0,t.jsx)(i.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{_(P.toString())},disabled:r,children:e("common.max")}
5)}),value:L,onChange:e=>{_(e.target.value)},type:"number"})]}),o&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"secondary.light",children:o})]}),(0,t.jsx)(i.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:R,disableRipple:!0,loading:r,disabled:null!==o||r||!L,children:r?e("common.confirming"):e("common.confirm")})]})}],155219);var w=e.i(485683);e.s(["SendModal",0,()=>{let e=(0,d.useTranslations)(),{payload:r,setModal:a}=(0,c.useActionStore)(),{accountSummary:o}=(0,c.useUserTradingDataStore)(),[s,y]=(0,f.useState)(!1),{accountDerivativeBalanceTransferRequest:b,accountSpotBalanceTransferRequest:x}=(0,g.useTransferActions)(),v=(0,c.useTradingDataStore)(e=>e.supportedCollateral),C=r?.token||v.USDC?.symbol||"USDC",[B,S]=(0,f.useState)(""),[k,E]=(0,f.useState)(""),[F,T]=(0,f.useState)(0),U=(0,c.useTradingPreferencesStore)(e=>e.modalTabs.send),I=(0,c.useTradingPreferencesStore)(e=>e.setModalTab),Q=async()=>{y(!0);try{let e={amount:k,token:C,recipient:B};"spot"===U?await x(v[C]?.id??1,k,B,e):await b(v[C]?.id??1,k,B,e),a(null)}catch(e){console.error("Internal transfer failed:",e)}finally{y(!1)}},[j,L]=(0,f.useState)(null);return(0,f.useEffect)(()=>{""===k?L(null):0>=Number(k)?L(e("common.enterValidAmount")):Number(k)>F?L(e("common.insufficientBalance")):L(null)},[k,C,F]),(0,f.useEffect)(()=>{(async()=>{"spot"===U?T(o?.spot_collateral[C]?.withdrawable_balance||0):T(o?.collateral[C]?.withdrawable_balance||0)})()},[C,o,U]),(0,t.jsxs)(l.ModalBox,{title:e("modals.sendTitle"),active:"send",disableClose:s,children:[(0,t.jsx)(w.default,{options:[{label:e("common.spot"),value:"spot"},{label:e("common.derivatives"),value:"derivatives"}],value:U,onChange:e=>I("send","derivatives"===e?"derivatives":"spot"),sx:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},width:"49%"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.recipient")})}),(0,t.jsx)(u.default,{fullWidth:!0,placeholder:e("modals.enterRecipientAddress"),value:B,onChange:e=>{S(e.target.value)},type:"text"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.amount")}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",F?`${F.toFixed(2)} ${C}`:`0 ${C}`]})]}),(0,t.jsx)(u.default,{fullWidth:!0,endAdornment:(0,t.jsx)(p.InputAdornment,{position:"end",children:(0,t.jsx)(i.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{E(F.toString())},disabled:s,children:e("common.max")})}),value:k,onChange:e=>{E(e.target.value)},type:"number"})]}),j&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"secondary.light",children:j})]}),(0,t.jsx)(i.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:Q,disableRipple:!0,loading:s,disabled:null!==j||s||!k,children:s?e("common.confirming"):e("common.send")})]})}],741931);var v=e.i(68043),C=e.i(120785),B=e.i(982615),S=e.i(796516),k=e.i(344873);e.s(["WithdrawModal",0,()=>{let e=(0,d.useTranslations)(),{payload:r,setModal:a}=(0,c.useActionStore)(),{accountSummary:o}=(0,c.useUserTradingDataStore)(),{accountSpotWithdrawRequest:s,accountDerivativeWithdrawRequest:x,accountSpotWithdrawRequestAction1:E,accountDerivativeWithdrawRequestAction1:F}=(0,g.useTransferActions)(),{authenticated:T}=(0,C.usePrivy)(),{isConnected:U}=(0,B.useAccount)(),I=T&&!U,Q=(0,c.useTradingDataStore)(e=>e.supportedCollateral),[j,L]=(0,f.useState)(r?.token||Q.USDC?.symbol||"USDC"),_=(0,f.useMemo)(()=>Object.values(Q),[Q]),P=(0,f.useMemo)(()=>_.find(e=>e.symbol===j)??null,[_,j]),[D,R]=(0,f.useState)(""),[M,O]=(0,f.useState)(0),N=(0,c.useTradingPreferencesStore)(e=>e.modalTabs.withdraw),H=(0,c.useTradingPreferencesStore)(e=>e.setModalTab),[V,K]=(0,f.useState)(!1),[G,W]=(0,f.useState)(""),z=async()=>{K(!0);try{I?"spot"===N?await E(Q[j]?.id??1,(0,k.normalizeAddress)(G),D,v.isMainnet?1:0xaa36a7):await F(Q[j]?.id??1,(0,k.normalizeAddress)(G),D,v.isMainnet?1:0xaa36a7):"spot"===N?await s(Q[j]?.id??1,D,v.isMainnet?1:0xaa36a7):await x(Q[j]?.id??1,D,v.isMainnet?1:0xaa36a7),a(null)}catch(e){console.error("Withdraw failed:",e)}finally{K(!1)}},[$,q]=(0,f.useState)(null);return(0,f.useEffect)(()=>{""===D?q(null):Number(D)>M?q(e("common.insufficientBalance")):I&&G&&!(0,S.isAddress)(G)?q(e("modals.invalidDestinationAddress")):q(null)},[D,j,M,I,G,e]),(0,f.useEffect)(()=>{(async()=>{"spot"===N?O(o?.spot_collateral[j]?.withdrawable_balance||0):O(o?.collateral[j]?.withdrawable_balance||0)})()},[j,o,N]),(0,t.jsx)(l.ModalBox,{title:"Withdraw",active:"withdraw",disableClose:V,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.default,{options:[{label:e("common.spot"),value:"spot"},{label:e("common.derivatives"),value:"derivatives"}],value:N,onChange:e=>H("withdraw","derivatives"===e?"derivatives":"spot"),sx:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},width:"49%"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.asset")}),(0,t.jsx)(b.IconAutocomplete,{options:_,value:P,onChange:e=>{e&&L(e.symbol)},getOptionLabel:e=>e.symbol,isOptionEqualToValue:(e,t)=>
5e.symbol===t.symbol,renderIcon:e=>(0,t.jsx)(y.CryptoIcon,{symbol:e.symbol,alt:e.symbol,width:20,height:20})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:"Amount"}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",M?`${M.toFixed(2)} ${j}`:`0 ${j}`]})]}),(0,t.jsx)(u.default,{fullWidth:!0,endAdornment:(0,t.jsx)(p.InputAdornment,{position:"end",children:(0,t.jsx)(i.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{R(M.toFixed(2).toString())},disabled:V,children:"MAX"})}),placeholder:"0",value:D,onChange:e=>{R(e.target.value)},type:"number"})]}),I&&(0,t.jsxs)("div",{children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("modals.destinationAddress")}),(0,t.jsx)(u.default,{fullWidth:!0,placeholder:"0x...",value:G,onChange:e=>{W(e.target.value)},type:"text"})]}),$&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"secondary.light",children:$})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(n.Box,{style:{display:"flex",justifyContent:"space-between"},px:1,py:.75,children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",children:e("modals.estimatedWithdrawalTime")}),(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",children:e("modals.estimatedWithdrawalDuration")})]}),(0,t.jsxs)(n.Box,{style:{display:"flex",justifyContent:"space-between"},px:1,py:.75,children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",children:e("modals.withdrawalFees")}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",children:[Q[j]?.withdrawal_fee," ",j]})]})]}),(0,t.jsx)(i.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:()=>z(),disableRipple:!0,loading:V,disabled:!D||0>=Number(D)||null!==$||V||I&&!(0,S.isAddress)(G),children:V?"Confirming...":"Withdraw"})]})})}],711273);var E=e.i(423028);e.i(842917);var F=e.i(536387);e.s(["VaultDepositModal",0,()=>
5{let e=(0,d.useTranslations)(),{payload:r,isLoading:a,setLoading:o,setModal:s}=(0,c.useActionStore)(),{depositToVault:g}=(0,E.useVaultActions)(),{accountSummary:y}=(0,c.useUserTradingDataStore)(),{supportedCollateral:b}=(0,c.useTradingDataStore)(),{vaultAddress:x,assetId:w}=r,v=b[w-1]?.symbol||"USDC",[C,B]=(0,f.useState)(""),[S,k]=(0,f.useState)(0),T=async()=>{o(!0);try{await g(x,C),s(null)}catch(e){console.error("Deposit failed:",e)}finally{o(!1)}},[U,I]=(0,f.useState)(null);return(0,f.useEffect)(()=>{0===S?I(e("vaults.addFundsToDeposit")):""===C?I(null):10>Number(C)?I(e("vaults.minimumVaultDeposit",{min:10,token:v})):Number(C)>S?I(e("common.insufficientBalance")):I(null)},[C,v,S]),(0,f.useEffect)(()=>{(async()=>{k(y?.collateral[v]?.withdrawable_balance||0)})()},[v,y]),(0,t.jsxs)(l.ModalBox,{title:e("vaults.vaultDeposit"),active:"vault-deposit",disableClose:a,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.amount")}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",S?`${S.toFixed(2)} ${v}`:`0 ${v}`]})]}),(0,t.jsx)(u.default,{fullWidth:!0,endAdornment:(0,t.jsx)(p.InputAdornment,{position:"end",children:(0,t.jsx)(i.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{B(S.toString())},disabled:a,children:e("common.max")})}),value:C,onChange:e=>{B(e.target.value)},type:"number"})]}),U&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"secondary.light",children:U})]}),(0,t.jsx)(i.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:T,disableRipple:!0,loading:a,disabled:!F.DEPOSITS_ENABLED||null!==U||a||!C,children:a?e("common.confirming"):e("common.deposit")}),(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.info.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"solar:info-circle-linear",width:20,height:20,sx:{color:"info.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"info.light",children:e("vaults.lockInNotice")})]})]})}],296860);var T=e.i(816790);e.s(["VaultRedeemModal",0,()=>
5{let e=(0,d.useTranslations)(),{payload:r,isLoading:a,setLoading:o,setModal:s}=(0,c.useActionStore)(),{redeemFromVault:g}=(0,E.useVaultActions)(),y=(0,c.useVaultsStore)(e=>e.vaults),{getUserVaultShares:b}=(0,c.useUserTradingDataStore)(),x=(0,c.useUserTradingDataStore)(e=>e.accountSummary),{supportedCollateral:w}=(0,c.useTradingDataStore)(),{vaultAddress:v,assetId:C}=r,B=w[C-1]?.symbol||"USDC",[S,k]=(0,f.useState)(""),[F,U]=(0,f.useState)(0),I=async()=>{o(!0);try{let e=v?y[v]:void 0,t=e?.account_summary?.vault_summary,r=Number(S)*Number(t?.shares??0)/Number(e?.account_summary?.total_account_equity??0);await g(v,r.toString()),s(null)}catch(e){console.error("Redeem failed:",e)}finally{o(!1)}},[Q,j]=(0,f.useState)(null);return(0,f.useEffect)(()=>{0===F?j(e("vaults.noWithdrawableBalance")):""===S?j(null):Number(S)<T.DEFAULT_MIN_AMOUNT?j(e("vaults.minimumRedeem",{min:T.DEFAULT_MIN_AMOUNT,token:B})):Number(S)>F?j(e("common.insufficientBalance")):j(null)},[S,B,F]),(0,f.useEffect)(()=>{(async()=>{let e=v?y[v]:void 0;U(Number(Number(b(v,x)?.withdrawable_shares)/Number(e?.account_summary?.vault_summary?.shares??0)*Number(e?.account_summary?.total_account_equity??0))??0)})()},[B,b,v,y,x]),(0,t.jsxs)(l.ModalBox,{title:e("vaults.redeem"),active:"vault-redeem",disableClose:a,children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,t.jsx)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.amount")}),(0,t.jsxs)(A.Typography,{variant:"body1",color:"textSecondary",mb:1,children:[e("common.balance"),": ",F?`${F.toFixed(2)} ${B}`:`0 ${B}`]})]}),(0,t.jsx)(u.default,{fullWidth:!0,endAdornment:(0,t.jsx)(p.InputAdornment,{position:"end",children:(0,t.jsx)(i.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{k(F.toString())},disabled:a,children:e("common.max")})}),value:S,onChange:e=>{k(e.target.value)},type:"number"})]}),Q&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,m.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(A.Typography,{variant:"body1",color:"secondary.light",children:Q})]}),(0,t.jsx)(i.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:I,disableRipple:!0,loading:a,disabled:null!==Q||a||!S,children:a?e("common.confirming"):e("vaults.redeem")})]})}],823952)},485653,322351,508561,271165,914290,459615,57144,424475,501238,986882,624321,139349,368920,840437,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(709643),i=e.i(485683),a=e.i(268407),o=e.i(344873),s=e.i(838456),A=e.i(290765),l=e.i(782904),c=e.i(163010),d=e.i(143813);e.i(929009);var u=e.i(39900),h=e.i(632418),p=e.i(954512),m=e.i(772475),f=e.i(68043);e.i(164485);var g=e.i(392953);function y(e){return e.selectedInstrument}function b(e){return e.address}function x(e){return e.pendingAgents}function w(e){return e.leverage}function v(e){return e.instruments}function C(e){return e.status}function B(e){return e.status}function S(e){return e.pendingAgents}function k(e){return e.address}e.s(["AccountInfo",0,e=>{let B,S,k,E,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V,K,G=(0,r.c)(109),{leverage:W,kind:z,tab:$,setTab:q}=e;(0,u.useInstrumentLeverage)();let X=(0,n.useTranslations)(),{setModal:Y}=(0,a.useActionStore)(),J=(0,g.useEasterEgg)(g.BUTTON.MARGIN_MODE),Z=(0,g.useEasterEgg)(g.BUTTON.LEVERAGE),ee=(0,a.useTradingDataStore)(y),et=(0,a.useAuthStore)(b),er=(0,a.useAuthStore)(x);G[0]!==ee?(B=e=>ee?e.instruments[ee]:void 0,G[0]=ee,G[1]=B):B=G[1];let en=(0,a.useTradingDataStore)(B),ei=(0,p.useTheme)(),{positions:ea}=(0,a.useUserTradingDataStore)(),{accountSummary:eo}=(0,a.useUserTradingDataStore)(),es=(0,a.useUserTradingDataStore)(w),eA=(0,a.useTradingDataStore)(v),el=(0,a.useAuthStore)(C),ec=(0,c.useMediaQuery)("(max-width: 640px)"),ed=ea[`${en?.id}:BOTH`],eu=ee?es[ee]?.margin_mode??"cross":"cross",eh=eA[ee];if(G[2]!==eo||G[3]!==et||G[4]!==ec||G[5]!==z||G[6]!==W||G[7]!==eu||G[8]!==er||G[9]!==ee||G[10]!==eh||G[11]!==Y||G[12]!==q||G[13]!==el||G[14]!==X||G[15]!==$||G[16]!==ei.vars.palette.error||G[17]!==ei.vars.palette.success||G[18]!==Z||G[19]!==J){var ep,em;let e,r,n,a,c,u,p,g,y,b,x,w=(0,d.getBalance)(z,eh?.price_index,"buy"===$?"b":"s",eo);F=s.Box,G[35]===Symbol.for("react.memo_cache_sentinel")?(T={gap:1,display:"flex",flexDirection:"column",p:0,pb:1},G[35]=T):T=G[35],G[36]!==et||G[37]!==ec||G[38]!==z||G[39]!==W||G[40]!==eu||G[41]!==er||G[42]!==Y||G[43]!==el||G[44]!==X||G[45]!==Z||G[46]!==J?(U="perps"===z&&(0,t.jsxs)(A.Stack,{direction:"row",spacing:ec?.5:1,justifyContent:"space-between",marginBottom:0,children:[(0,t.jsx)(m.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"medium",sx:{width:"100%",textTransform:"capitalize"},onClick:J(()=>Y("margin")),children:X("cross"===eu?"trade.cross":"trade.isolated")}),(0,t.jsxs)(m.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"medium",onClick:Z(()=>{"trading-enabled"!==el?"disconnected"!==el?et&&er[et]?Y(f.isMainnet?"deposit":"faucet"):Y("enable-trading"):Y("connect-wallet"):Y("leverage")}),sx:{width:"100%"},children:[W,"x"]}),(0,t.jsx)(m.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"medium",sx:{width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},onClick:()=>Y("one-way"),children:X("trade.oneWay")})]}),G[36]=et,G[37]=ec,G[38]=z,G[39]=W,G[40]=eu,G[41]=er,G[42]=Y,G[43]=el,G[44]=X,G[45]=Z,G[46]=J,G[47]=U):U=G[47],G[48]!==z||G[49]!==X?(e=X("perps"===z?"common.long":"common.buy"),G[48]=z,G[49]=X,G[50]=e):e
5=G[50],G[51]!==e?(r={label:e,value:"buy"},G[51]=e,G[52]=r):r=G[52],G[53]!==z||G[54]!==X?(n=X("perps"===z?"common.short":"common.sell"),G[53]=z,G[54]=X,G[55]=n):n=G[55],G[56]!==n?(a={label:n,value:"sell"},G[56]=n,G[57]=a):a=G[57],G[58]!==r||G[59]!==a?(c=[r,a],G[58]=r,G[59]=a,G[60]=c):c=G[60],G[61]!==q?(u=e=>q(e),G[61]=q,G[62]=u):u=G[62],G[63]!==$||G[64]!==ei.vars.palette.error||G[65]!==ei.vars.palette.success?(p="buy"===$?(0,h.varAlpha)(ei.vars.palette.success.mainChannel,.2):(0,h.varAlpha)(ei.vars.palette.error.mainChannel,.2),G[63]=$,G[64]=ei.vars.palette.error,G[65]=ei.vars.palette.success,G[66]=p):p=G[66],G[67]!==p?(g={width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:1.2,"& .MuiTabs-indicator":{backgroundColor:p}},G[67]=p,G[68]=g):g=G[68];let v="buy"===$?"success.main":"error.main";G[69]!==v?(y={fontSize:"0.8rem !important","&.Mui-selected":{color:v},py:"7px !important"},G[69]=v,G[70]=y):y=G[70],G[71]!==c||G[72]!==u||G[73]!==g||G[74]!==y||G[75]!==$?(I=(0,t.jsx)(i.default,{options:c,value:$,onChange:u,sx:g,tabSx:y,width:"49%"}),G[71]=c,G[72]=u,G[73]=g,G[74]=y,G[75]=$,G[76]=I):I=G[76],E=s.Box,k=A.Stack,_="row",P=1,D="space-between",R="perps"===z?"8px":1,G[77]!==X?(b=X("trade.availableToTrade"),G[77]=X,G[78]=b):b=G[78],G[79]!==b?(M=(0,t.jsx)(l.Typography,{variant:"body1",color:"text.secondary",children:b}),G[79]=b,G[80]=M):M=G[80],S=l.Typography,Q="body1",j="white",L="spot"===z?(ep=eh.price_index,em="buy"===$?"b":"s",x=(0,d.getBalanceKey)(ep,em),(0,o.formatAssetQuantity)(x,w)+" "+x):(0,o.formatNumber)(w,{instrument_name:ee,useContractSize:!0,fallback:"0"}),G[2]=eo,G[3]=et,G[4]=ec,G[5]=z,G[6]=W,G[7]=eu,G[8]=er,G[9]=ee,G[10]=eh,G[11]=Y,G[12]=q,G[13]=el,G[14]=X,G[15]=$,G[16]=ei.vars.palette.error,G[17]=ei.vars.palette.success,G[18]=Z,G[19]=J,G[20]=S,G[21]=k,G[22]=E,G[23]=F,G[24]=T,G[25]=U,G[26]=I,G[27]=Q,G[28]=j,G[29]=L,G[30]=_,G[31]=P,G[32]=D,G[33]=R,G[34]=M}else S=G[20],k=G[21],E=G[22],F=G[23],T=G[24],U=G[25],I=G[26],Q=G[27],j=G[28],L=G[29],_=G[30],P=G[31],D=G[32],R=G[33],M=G[34];return G[81]!==S||G[82]!==Q||G[83]!==j||G[84]!==L?(O=(0,t.jsx)(S,{variant:Q,color:j,children:L}),G[81]=S,G[82]=Q,G[83]=j,G[84]=L,G[85]=O):O=G[85],G[86]!==k||G[87]!==O||G[88]!==_||G[89]!==P||G[90]!==D||G[91]!==R||G[92]!==M?(N=(0,t.jsxs)(k,{direction:_,spacing:P,justifyContent:D,marginBottom:R,children:[M,O]}),G[86]=k,G[87]=O,G[88]=_,G[89]=P,G[90]=D,G[91]=R,G[92]=M,G[93]=N):N=G[93],G[94]!==z||G[95]!==ed?.instrument||G[96]!==ed?.size||G[97]!==X?(H="perps"===z&&(0,t.jsxs)(A.Stack,{direction:"row",spacing:1,justifyContent:"space-between",marginBottom:1,children:[(0,t.jsx)(l.Typography,{variant:"body1",color:"text.secondary",children:X("trade.currentPosition")}),(0,t.jsx)(l.Typography,{variant:"body1",color:0===Number(ed?.size??0)?"text.main":Number(ed?.size??0)>0?"success":"error",children:(0,o.formatNumber)(Math.abs(Number(ed?.size??0)),{useContractSize:!0,instrument_name:ed?.instrument,fallback:"0"})+" "+(ed?.instrument.split("-")[0]??"")})]}),G[94]=z,G[95]=ed?.instrument,G[96]=ed?.size,G[97]=X,G[98]=H):H=G[98],G[99]!==E||G[100]!==N||G[101]!==H?(V=(0,t.jsxs)(E,{children:[N,H]}),G[99]=E,G[100]=N,G[101]=H,G[102]=V):V=G[102],G[103]!==F||G[104]!==T||G[105]!==U||G[106]!==I||G[107]!==V?(K=(0,t.jsxs)(F,{sx:T,children:[U,I,V]}),G[103]=F,G[104]=T,G[105]=U,G[106]=I,G[107]=V,G[108]=K):K=G[108],K}],485653),e.s(["OrderButtons",0,e=>{let i,o,A,l,c,d=(0,r.c)(31),{handleBuy:u,handleSell:h,tab:p,error:g,placingOrder:y,orderSize:b,isBuyDisabled:x,isSellDisabled:w,isExceedingMaxSize:v,showInsufficientMarginLabel:C,customLabel:E}=e,F=void 0===C||C,T=(0,n.useTranslations)(),U=(0,a.useAuthStore)(B),I=(0,a.useAuthStore)(S),Q=(0,a.useAuthStore)(k),{setModal:j}=(0,a.useActionStore)(),L=Number(b)>0;if("trading-enabled"!==U){let e,r,n;return d[0]!==Q||d[1]!==I||d[2]!==j||d[3]!==U||d[4]!==T?(e="disconnected"!==U&&(0,t.jsx)(m.ActionButton,{actionType:"connected",color:"primary",variant:"contained",sx:{mt:"0px"},size:"large",fullWidth:!0,onClick:()=>{Q&&I[Q]?j(f.isMainnet?"deposit":"faucet"):j("enable-trading")},children:T("common.enableTrading")}),d[0]=Q,d[1]=I,d[2]=j,d[3]=U,d[4]=T,d[5]=e):e=d[5],d[6]!==j||d[7]!==U||d[8]!==T?(r="disconnected"===U&&(0,t.jsx)(m.ActionButton,{color:"primary",variant:"contained",sx:{mt:"0px"},size:"large",fullWidth:!0,onClick:()=>{j("connect-wallet")},children:T("common.connectWallet")}),d[6]=j,d[7]=U,d[8]=T,d[9]=r):r=d[9],d[10]!==e||d[11]!==r?(n=(0,t.jsxs)(t.Fragment,{children:[e,r]}),d[10]=e,d[11]=r,d[12]=n):n=d[12],n}let _="buy"===p?x:w;d[13]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",gap:2},d[13]=i):i=d[13];let P="buy"===p?"primary":"secondary";d[14]===Symbol.for("react.memo_cache_sentinel")?(o={mt:"0px"},d[14]=o):o=d[14];let D=!!g||!!y||!L||_||v||!!E,R=!!y;return d[15]!==u||d[16]!==h||d[17]!==p?(A=()=>{"buy"===p?u():h()},d[15]=u,d[16]=h,d[17]=p,d[18]=A):A=d[18],d[19]!==E||d[20]!==v||d[21]!==y||d[22]!==F||d[23]!==T?(l=y?"":E||T(v&&F?"trade.notEnoughMargin":"trade.placeOrder"),d[19]=E,d[20]=v,d[21]=y,d[22]=F,d[23]=T,d[24]=l):l=d[24],d[25]!==P||d[26]!==D||d[27]!==R||d[28]!==A||d[29]!==l?(c=(0,t.jsx)(s.Box,{sx:i,children:(0,t.jsx)(m.ActionButton,{actionType:"trading-enabled",color:P,variant:"contained",sx:o,size:"large",fullWidth:!0,disabled:D,loading:R,loadingPosition:"center",onClick:A,children:l})}),d[25]=P,d[26]=D,d[27]=R,d[28]=A,d[29]=l,d[30]=c):c=d[30],c}],322351);var E=e.i(75581),F=e.i(206242),T=e.i(18214),U=e.i(271645),I=e.i(81121),Q=e.i(525836);let j=(0,U.forwardRef)(({title:e,compact:r=!1,startAdornment:n,titleTooltip:i,...a},o)=>
5{if(!r)return(0,t.jsxs)(s.Box,{children:[e&&(0,t.jsx)(l.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e}),(0,t.jsx)(Q.default,{ref:o,startAdornment:n,...a})]});let A=e?(0,t.jsx)(F.InputAdornment,{position:"start",disablePointerEvents:!i,children:i?(0,t.jsx)(I.Tooltip,{title:i,arrow:!0,placement:"top",children:(0,t.jsx)(s.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center"},children:(0,t.jsx)(l.Typography,{variant:"body1",color:"textSecondary",sx:{whiteSpace:"nowrap"},children:e})})}):(0,t.jsx)(l.Typography,{variant:"body1",color:"textSecondary",sx:{whiteSpace:"nowrap"},children:e})}):null,c=A||n?(0,t.jsxs)(t.Fragment,{children:[A,n]}):void 0;return(0,t.jsx)(Q.default,{ref:o,startAdornment:c,...a,sx:{...a.sx,paddingLeft:1,"& .MuiOutlinedInput-input":{textAlign:"right"}}})});j.displayName="CompactInput",e.s(["default",0,j],508561);var L=e.i(493094),_=e.i(461342);function P(e){return(0,t.jsx)(E.MenuItem,{value:e,disableRipple:!0,children:e},e)}function D(e,t){return{value:20*t}}e.s(["OrderSize",0,e=>{let i,a,o,s,A,l,c,d,u,h,m,f,g,y=(0,r.c)(32),{compact:b,orderSizeDenomination:x,orderSizeDenominations:w,handleOrderSizeDenominationChange:v,orderSize:C,handleOrderSizeChange:B,orderSizeSliderValue:S,handleOrderSizeSliderChange:k}=e,E=(0,p.useTheme)(),U=(0,n.useTranslations)();y[0]!==U?(i=U("common.size"),y[0]=U,y[1]=i):i=y[1],y[2]!==B?(a=e=>B(e.target.value),y[2]=B,y[3]=a):a=y[3];let I=x||"";return y[4]!==v?(o=e=>v(e.target.value),y[4]=v,y[5]=o):o=y[5],y[6]!==E?(s=(0,_.getMenuProps)(E,{vertical:"bottom",horizontal:"right"}),y[6]=E,y[7]=s):s=y[7],y[8]===Symbol.for("react.memo_cache_sentinel")?(A={cursor:"pointer",minWidth:0},y[8]=A):A=y[8],y[9]!==w?(l=w.map(P),y[9]=w,y[10]=l):l=y[10],y[11]!==I||y[12]!==o||y[13]!==s||y[14]!==l?(c=(0,t.jsx)(F.InputAdornment,{position:"end",children:(0,t.jsx)(T.Select,{value:I,onChange:o,MenuProps:s,sx:A,children:l})}),y[11]=I,y[12]=o,y[13]=s,y[14]=l,y[15]=c):c=y[15],y[16]!==b||y[17]!==C||y[18]!==i||y[19]!==a||y[20]!==c?(d=(0,t.jsx)(j,{compact:b,fullWidth:!0,title:i,value:C,onChange:a,endAdornment:c}),y[16]=b,y[17]=C,y[18]=i,y[19]=a,y[20]=c,y[21]=d):d=y[21],y[22]!==k?(u=e=>k(Number(e)),y[22]=k,y[23]=u):u=y[23],y[24]===Symbol.for("react.memo_cache_sentinel")?(h={my:1},m=Array(6).fill(0).map(D),y[24]=h,y[25]=m):(h=y[24],m=y[25]),y[26]!==S||y[27]!==u?(f=(0,t.jsx)(L.default,{value:S,onChange:u,max:100,color:"primary.main",step:1,sx:h,marks:m}),y[26]=S,y[27]=u,y[28]=f):f=y[28],y[29]!==f||y[30]!==d?(g=(0,t.jsxs)(t.Fragment,{children:[d,f]}),y[29]=f,y[30]=d,y[31]=g):g=y[31],g}],271165);var R=e.i(397837);e.s(["LimitPrice",0,e=>{let i,a,o,s,A,l,c=(0,r.c)(16),{limitPrice:d,handleLimitPriceChange:u,handleGetMidPrice:h,compact:p}=e,m=(0,n.useTranslations)();return c[0]!==m?(i=m("common.price"),c[0]=m,c[1]=i):i=c[1],c[2]!==u?(a=e=>u(e.target.value),c[2]=u,c[3]=a):a=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(o={width:58,"&:active":{transform:"none"}},c[4]=o):o=c[4],c[5]!==m?(s=m("trade.mid"),c[5]=m,c[6]=s):s=c[6],c[7]!==h||c[8]!==s?(A=(0,t.jsx)(F.InputAdornment,{position:"end",children:(0,t.jsx)(R.Button,{variant:"contained",size:"small",sx:o,onClick:h,disableElevation:!0,disableRipple:!0,children:s})}),c[7]=h,c[8]=s,c[9]=A):A=c[9],c[10]!==p||c[11]!==d||c[12]!==i||c[13]!==a||c[14]!==A?(l=(0,t.jsx)(j,{compact:p,fullWidth:!0,title:i,value:d,onChange:a,endAdornment:A}),c[10]=p,c[11]=d,c[12]=i,c[13]=a,c[14]=A,c[15]=l):l=c[15],l}],914290),e.s(["getEstSlippage",0,function(e,t,r,n){if(!e||!e.asks||!e.bids)return null;let i=Number(t);if(!Number.isFinite(i)||i<=0||!Number.isFinite(n)||n<=0)return null;let a="b"===r?e.asks:e.bids;if(0===a.length)return null;let o=i,s=0;for(let e of a){if(o<=0)break;let t=parseFloat(e.price),r=parseFloat(e.size);if(!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0)continue;let n=Math.min(o,r);s+=t*n,o-=n}if(o>0)return null;let A=s/i;return{avgPrice:A,slippagePercent:"b"===r?(A-n)/n*100:(n-A)/n*100}}],459615);let M=12,O=e=>{if(!e||!Number.isFinite(e)||e<=0)return 0;let t=String(e).toLowerCase(),[r,n]=t.split("e-");if(void 0!==n)return Number(n)+(r.split(".")[1]??"").length;let i=t.split(".")[1];return i?i.length:0},N=(e,t,r)=>{if(!Number.isFinite(e))return"0";if("quote"===t){let t=((e,t)=>{if(t<=0)return Math.floor(e);let r=10**t;return Math.floor(e*r)/r})(e,2);return(0,o.formatNumber)(t,{decimals:2,maxDecimals:2,useGrouping:!1,trimTrailingZeros:!0})}return(0,o.formatNumber)(e,{useContractSize:!0,instrument_name:r,useGrouping:!1,floor:!0})},H=({value:e,maxDecimals:t,step:r,stripCommas:n=!1,maxDigits:i=M})=>{var a;let o,s,A,l=n?e.replaceAll(",",""):e;if(!(""===(o=l)||"."===o||/^-?\d*\.?\d*$/.test(o)))return null;
5let c=-1===(A=(s=(a=l=(e=>{let t=e.startsWith("-")?"-":"",r=t?e.slice(1):e;if(!r.startsWith("0")||r.length<=1||"."===r[1])return e;let n=r.replace(/^0+/,"")||"0";return n.startsWith(".")&&(n=`0${n}`),`${t}${n}`})(l)).startsWith("-")?a.slice(1):a).indexOf("."))?0:s.length-A-1;if(c>t)return null;let d=O(r);if(0===d&&("."===l||l.endsWith("."))||(l.match(/\d/g)??[]).length>i)return null;if(""===l||"."===l)return l;if(!l.endsWith(".")&&!isNaN(Number(l))&&""!==l.trim()&&(0===d||c>=d)&&!((e,t)=>{if(!t||!Number.isFinite(t)||t<=0||!Number.isFinite(e))return!0;let r=Math.round(e/t)*t;return Math.abs(e-r)<=Math.max(1e-8*t,10*Number.EPSILON)})(Number(l),r))return null;return l};e.s(["QUOTE_MODE_MAX_DECIMALS",0,2,"formatOrderSizeForMode",0,N,"getStepDecimalCount",0,O,"getValidatedStepInput",0,H],57144);let V=(e,t)=>{if(!e)return;let r=(0,d.getValidPrice)(e.mid_price);if(void 0!==r)return r;let n=(0,d.getReferencePrice)(e,t);return n>0?String(n):void 0};e.s(["useLimitPrice",0,function(e){let t,n,i,s,A,l,c,u,h,p,m,f,g=(0,r.c)(37),{instrumentName:y,ticker:b,localLimitState:x}=e,{orderTypePersist:w}=(0,a.useTradingPreferencesStore)();g[0]!==y?(t=e=>e.instruments[y]?.kind,g[0]=y,g[1]=t):t=g[1];let v=(0,a.useTradingDataStore)(t);g[2]!==y?(n=e=>e.instruments[y]?.tick_size,g[2]=y,g[3]=n):n=g[3];let C=(0,a.useTradingDataStore)(n);g[4]!==v||g[5]!==b?(i=V(b,v)??"0",g[4]=v,g[5]=b,g[6]=i):i=g[6];let B=i,[S,k]=(0,U.useState)(B),{limitPrice:E,setLimitPrice:F}=(0,a.useTradingDataStore)(),T=(0,U.useRef)(b),I=(0,U.useRef)(!1),Q=x?S:E,j=x?k:F;g[7]!==b?(s=()=>{T.current=b},A=[b],g[7]=b,g[8]=s,g[9]=A):(s=g[8],A=g[9]),(0,U.useEffect)(s,A),g[10]!==C||g[11]!==j?(l=e=>{let t=H({value:e,maxDecimals:O(C),step:C,stripCommas:!0});null!==t&&j(t)},g[10]=C,g[11]=j,g[12]=l):l=g[12];let L=l;g[13]!==L||g[14]!==v||g[15]!==y||g[16]!==b?(c=()=>{if(!b)return;let e=V(b,v)??"0";L((0,o.formatNumber)(e,{useTickSize:!0,instrument_name:y,useGrouping:!1}))},g[13]=L,g[14]=v,g[15]=y,g[16]=b,g[17]=c):c=g[17];let _=c;g[18]!==v||g[19]!==y||g[20]!==j?(u=()=>{if(!y)return;let e=T.current;if(I.current=!0,e){let t=V(e,v);t&&j((0,o.formatNumber)(t,{useTickSize:!0,instrument_name:y,useGrouping:!1})),I.current=!1}},h=[y,v,j],g[18]=v,g[19]=y,g[20]=j,g[21]=u,g[22]=h):(u=g[21],h=g[22]),(0,U.useEffect)(u,h),g[23]!==v||g[24]!==y||g[25]!==j?(p=()=>
5{if(!I.current)return;let e=T.current;if(!e)return;let t=V(e,v);t&&j((0,o.formatNumber)(t,{useTickSize:!0,instrument_name:y,useGrouping:!1})),I.current=!1},g[23]=v,g[24]=y,g[25]=j,g[26]=p):p=g[26],g[27]!==v||g[28]!==y||g[29]!==j||g[30]!==b?(m=[b,y,v,j],g[27]=v,g[28]=y,g[29]=j,g[30]=b,g[31]=m):m=g[31],(0,U.useEffect)(p,m);e:if("limit"===w){let e=Q?String(Q).replaceAll(",",""):"";if(!e||"."===e||isNaN(Number(e))||0>=(0,d.getReferencePrice)(b,v))break e}return g[32]!==_||g[33]!==L||g[34]!==Q||g[35]!==j?(f={limitPrice:Q,error:null,setLimitPrice:j,handleLimitPriceChange:L,handleGetMidPrice:_},g[32]=_,g[33]=L,g[34]=Q,g[35]=j,g[36]=f):f=g[36],f}],424475),e.s(["useOrderSize",0,function({instrumentName:e,maxSize:t,price:r,isPositionClose:n,tab:i,orderSizeMode:o,preserveSizeOnModeChange:s=!0,clipSizeToMax:A=!0}){let l=(0,a.useTradingPreferencesStore)(e=>e.orderSizeMode),c=o??l,d=(0,a.useTradingDataStore)(t=>t.instruments[e]?.lot_size),u=O(d),h="quote"===c?2:u,p="quote"===c?.01:d,m=N(100*!!n*t/100,c,e??""),[f,g]=(0,U.useState)(m.toString()),y=(0,U.useRef)(c),b=(0,U.useRef)(t),x=Number.isFinite(Number(f))?Number(f):0,w=!Number.isFinite(t)||t<=0?0:Math.min(100,Math.max(0,Math.round(x/t*100)));(0,U.useEffect)(()=>{n||g("0"),y.current=c},[e]),(0,U.useEffect)(()=>{n||g("0")},[i,n]),(0,U.useEffect)(()=>{let r=y.current;if(r===c){y.current=c,b.current=t,A&&Number(f)>Number(t)&&g(N(t,c,e??""));return}if(s&&r!==c&&x>0&&b.current>0){let e=x/b.current*100;e>0&&t>0&&v(e)}y.current=c,b.current=t},[c,t,s,A]);let v=r=>{let n=Math.min(100,Math.max(0,r));!Number.isFinite(t)||t<=0?g("0"):n>=99.9?g(N(t,c,e??"")):g(N(n/100*t,c,e??""))};return{orderSize:f,handleOrderSizeChange:e=>{let t=H({value:e,maxDecimals:h,step:p});null!==t&&g(t)},orderSizeSlider:w,handleOrderSizeSliderChange:v}}],501238);let K=(e,t,r,n,i,a,o,s)=>{if(!t.includes("PERP"))return{longLiquidationPrice:0,shortLiquidationPrice:0};let A=0,l=0,c=e.perp_positions?.[t]||null,d=Math.max(0,e.available_balance),u=r*i;if(c){let e=c.legs,t=0;for(let r of e)t+=r.size;let o=Math.abs(t)*n,m=0,f=0;d+=o/a,t>0?(m=o+u,f=r<t?0:Math.abs(o-u)):(f=o+u,m=r<Math.abs(t)?0:Math.abs(o-u));let g=m/a,y=f/a,{margin_rate:b,deduction:x}=G(m,s);var h=m*b-x;h+=25e-5*m*2;let{margin_rate:w,deduction:v}=G(f,s);var p=f*w-v;p+=25e-5*f*2;let C=W(d,g,h,r);A=m>0?Math.max(0,i-C):0;let B=W(d,y,p,r);l=f>0?i+B:0}else{let{margin_rate:e,deduction:t}=G(u,s);var m=u*e-t;m+=25e-5*u*2;let n=W(d,u/a,m,r);A=Math.max(0,i-n),l=i+n}return{longLiquidationPrice:A,shortLiquidationPrice:l}},G=(e,t)=>{let r=t.find(t=>e<Number(t.notional_usd_threshold));return r?{margin_rate:r.mmr,deduction:r.mmd}:{margin_rate:t[t.length-1].mmr,deduction:t[t.length-1].mmd}},W=(e,t,r,n)=>{if(!Number.isFinite(e)||!Number.isFinite(r)||!Number.isFinite(n)||0===n||1e-10>Math.abs(n))return NaN;let i=e-r;if(!Number.isFinite(i))return NaN;let a=i/n;return Number.isFinite(a)?a:NaN};e.s(["getLiquidationPrice",0,K,"getMaxValidSizeForLiquidation",0,(e,t,r,n,i,a,o,s,A,l)=>{if(!t.includes("PERP")||A<=0||r<=0)return A;let c=A=>{if(A<=0)return!0;let c=l?l(A,"b"):n,d=l?l(A,"s"):i,{longLiquidationPrice:u}=K(e,t,A,r,c,a,o,s),{shortLiquidationPrice:h}=K(e,t,A,r,d,a,o,s),p=u>0&&u>=r,m=h>0&&h<=r;return!(p&&m)};if(c(A))return A;let d=0,u=A,h=1e-4*A;for(;u-d>h;){let e=(d+u)/2;c(e)?d=e:u=e}return d}],986882);var z=e.i(210457);let $="America/New_York",q=[{key:"pre",label:"PRE MARKET",startMinute:240,endMinute:570},{key:"regular",label:"REGULAR",startMinute:570,endMinute:960},{key:"post",label:"POST MARKET",startMinute:960,endMinute:1200},{key:"overnight",label:"OVERNIGHT",startMinute:1200,endMinute:240}],X=new Map,Y=(e,t)=>{let r=(e=>{let t=X.get(e);if(t)return t;let r=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",weekday:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"});return X.set(e,r),r})(t).formatToParts(e),n=e=>r.find(t=>t.type===e)?.value??"";return{year:Number(n("year")),month:Number(n("month")),day:Number(n("day")),hour:Number(n("hour")),minute:Number(n("minute")),second:Number(n("second")),weekday:n("weekday")}},J=(e,t)=>
5{let r=Y(e,t);return Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second)-e.getTime()},Z=(e,t,r)=>{let n=Math.floor(t/60),i=Date.UTC(e.year,e.month-1,e.day,n,t%60,0),a=J(new Date(i),r),o=J(new Date(i-a),r);return new Date(i-o)},ee=(e,t)=>new Date(e.getTime()+864e5*t),et=e=>"Sat"!==e.weekday&&"Sun"!==e.weekday,er=e=>"closed"===e?"CLOSED":q.find(t=>t.key===e)?.label??"CLOSED",en={pre:"modals.sessionPreMarket",regular:"modals.sessionRegular",post:"modals.sessionPostMarket",overnight:"modals.sessionOvernight",closed:"modals.sessionClosed"},ei=(e=new Date)=>{let t=Y(e,$),r=60*t.hour+t.minute;if(!et(t)){let t=(e=>{let t=e;for(let r=0;r<8;r+=1){let r=Y(t,$);if(et(r)){let t=Z(r,q[0].startMinute,$);if(t>e)return t}t=ee(Z(r,0,$),1)}return ee(e,1)})(e);return{key:"closed",label:er("closed"),endsAt:t,endsInMs:Math.max(0,t.getTime()-e.getTime()),schedule:q}}let n="overnight",i=q[0].startMinute,a=t;r>=240&&r<570?(n="pre",i=570):r>=570&&r<960?(n="regular",i=960):r>=960&&r<1200?(n="post",i=1200):r>=1200&&(n="overnight",a=Y(ee(Z(t,0,$),1),$));let o=new Date(Z(a,i,$).getTime()-6e4);return{key:n,label:er(n),endsAt:o,endsInMs:Math.max(0,o.getTime()-e.getTime()),schedule:q}};e.s(["formatSessionCountdown",0,e=>{let t=Math.max(0,Math.floor(e/1e3));return[Math.floor(t/3600),Math.floor(t%3600/60),t%60].map(e=>e.toString().padStart(2,"0")).join(":")},"formatUsEquityScheduleRange",0,(e,t=new Date)=>{let r=Y(t,$),n=Z(r,e.startMinute,$),i=e.endMinute<=e.startMinute?Y(ee(Z(r,0,$),1),$):r,a=new Date(Z(i,e.endMinute,$).getTime()-6e4),o=new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",hourCycle:"h23"});return`${o.format(n)}-${o.format(a)} ${((e=new Date)=>new Intl.DateTimeFormat("en-US",{timeZoneName:"longOffset"}).formatToParts(e).find(e=>"timeZoneName"===e.type)?.value?.replace(/GMT([+-])0(\d:)/,"GMT$1$2")??"")(n)}`},"getMarketSessionLabel",0,(e,t)=>{if(t){let r=t(en[e]);if(r&&r!==en[e])return r}return er(e)},"getUsEquityMarketSession",0,ei],624321);let ea=()=>{let e,t,n=(0,r.c)(2),[i,a]=(0,U.useState)(eo);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=window.setInterval(()=>{a(ei())},1e3);return()=>{window.clearInterval(e)}},t=[],n[0]=e,n[1]=t):(e=n[0],t=n[1]),(0,U.useEffect)(e,t),i};function eo(){return ei()}e.s(["useUsEquityMarketSession",0,ea],139349);let es={regular:.5,pre:2,overnight:3,post:5};e.s(["SPOT_DEFAULT_SLIPPAGE",0,.5,"SPOT_MANUAL_SLIPPAGE_MAX",0,50,"SPOT_MANUAL_SLIPPAGE_MIN",0,.5,"SPOT_SESSION_SLIPPAGE",0,es],368920);let eA=(e,t)=>e?"closed"===t?es.overnight:es[t]:.5;function el(e){return e.spotSlippageMode}function ec(e){return e.spotManualSlippage}function ed(e){return e.setSpotSlippageMode}function eu(e){return e.setSpotManualSlippage}e.s(["useSpotSlippage",0,e=>{let t,n,i,o,s=(0,r.c)(18),A=(0,a.useTradingPreferencesStore)(el),l=(0,a.useTradingPreferencesStore)(ec),c=(0,a.useTradingPreferencesStore)(ed),d=(0,a.useTradingPreferencesStore)(eu),u=ea();s[0]!==e?(t=""!==e&&"US_EQUITY"===(0,z.getInstrumentMetadata)(e).marketCalendar,s[0]=e,s[1]=t):t=s[1];let h=t;s[2]!==h||s[3]!==u.key?(n=eA(h,u.key),s[2]=h,s[3]=u.key,s[4]=n):n=s[4];let p=n;s[5]!==h||s[6]!==u.key||s[7]!==l||s[8]!==A?(i=(({mode:e,manualSlippage:t,hasMarketSession:r,sessionKey:n})=>"manual"===e?Math.min(Math.max(t,.5),50):eA(r,n))({mode:A,manualSlippage:l,hasMarketSession:h,sessionKey:u.key}),s[5]=h,s[6]=u.key,s[7]=l,s[8]=A,s[9]=i):i=s[9];let m=i;return s[10]!==p||s[11]!==m||s[12]!==h||s[13]!==d||s[14]!==c||s[15]!==l||s[16]!==A?(o={mode:A,manualSlippage:l,autoSlippage:p,effectiveSlippage:m,hasMarketSession:h,setMode:c,setManualSlippage:d},s[10]=p,s[11]=m,s[12]=h,s[13]=d,s[14]=c,s[15]=l,s[16]=A,s[17]=o):o=s[17],o}],840437)},70916,(e,t,r)=>{t.exports=JSON.parse('{"AAPLx/USDC":{"instrumentName":"AAPLx/USDC","slug":"apple-xstock","backedUrl":"https://assets.backed.fi/products/apple-xstock","symbol":"AAPLx","title":"Apple xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Apple xStock (AAPLx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. AAPLx tracks the price of Apple Inc. (the underlying). AAPLx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Apple Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide. The company also sells related services. â View AAPLx on CoinGecko","links":[{"label":"View AAPLx on CoinGecko","url":"https://www.coingecko.com/en/coins/apple-xstock"},{"label":"View AAPL on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-AAPL/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219187","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Apple Inc., One Apple Park Way, Cupertino, CA 95014, USA. LEI: HWUPKR0MPOU8FGXBT394.","isin":"US0378331005","symbol":"AAPL","name":"Apple Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-AAPL/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/apple-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:57.253Z"},"ABBVx/USDC":{"instrumentName":"ABBVx/USDC","slug":"abbvie-xstock","backedUrl":"https://assets.backed.fi/products/abbvie-xstock","symbol":"ABBVx","title":"AbbVie xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"AbbVie xStock (ABBVx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. ABBVx tracks the price of AbbVie Inc. (the underlying). ABBVx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of AbbVie Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"AbbVie Inc. (ABBV) is a global biopharmaceutical company focused on developing and delivering innovative therapies in areas such as immunology, oncology, neuroscience, and eye care. It generates substantial revenue from both established products like Humira and newer treatments across its diversified pipeline. â View ABBVx on CoinGecko","links":[{"label":"View ABBVx on CoinGecko","url":"https://www.coingecko.com/en/coins/abbvie-xstock"},{"label":"View ABBV on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-ABBV/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219393","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is AbbVie Inc., 1 North Waukegan Road, North Chicago, IL 60064, USA. LEI: FR5LCKFTG8054YNNRU85.","isin":"US00287Y1091","symbol":"ABBV","name":"AbbVie Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-ABBV/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/abbvie-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:57.579Z"},"ABTx/USDC":{"instrumentName":"ABTx/USDC","slug":"abbott-xstock","backedUrl":"https://assets.backed.fi/products/abbott-xstock","symbol":"ABTx","title":"Abbott xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Abbott xStock (ABTx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. ABTx tracks the price of Abbott Laboratories (the underlying). ABTx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Abbott Laboratories, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Abbott is a global healthcare company focused on developing and delivering life-changing technologies in areas like diagnostics, medical devices, nutritional products, and branded generic pharmaceuticals. â View ABTx on CoinGecko","links":[{"label":"View ABTx on CoinGecko","url":"https://www.coingecko.com/en/coins/abbott-xstock"},{"label":"View ABT on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-ABT/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219518","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Abbott Laboratories, 100 Abbott Park Road, Abbott Park, IL 60064, USA. LEI: HQD377W2YR662HK5JX27.","isin":"US0028241000","symbol":"ABT","name":"Abbott Laboratories","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-ABT/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/abbott-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:57.907Z"},"ACNx/USDC":{"instrumentName":"ACNx/USDC","slug":"accenture-xstock","backedUrl":"https://assets.backed.fi/products/accenture-xstock","symbol":"ACNx","title":"Accenture xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Accenture xStock (ACNx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. ACNx tracks the price of Accenture plc Class A (the underlying). ACNx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Accenture plc Class A, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Accenture is a global professional services company that helps businesses, governments, and other organizations build their digital core, optimize their operations, and accelerate revenue growth. They offer services and solutions in strategy & consulting, technology, operations, and industry-specific areas. â View ACNx on CoinGecko","links":[{"label":"View ACNx on CoinGecko","url":"https://www.coingecko.com/en/coins/accenture-xstock"},{"label":"View ACN on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-ACN/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219617","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"}
5,"underlying":{"issuer":"The issuer of the Underlying is Accenture plc Class A, 1 Grand Canal Square, Grand Canal Harbour, Dublin 2, D02 P820, Ireland. LEI: 549300L3KWKK8XWF9421.","isin":"IE00B4BNMY34","symbol":"ACN","name":"Accenture plc Class A","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-ACN/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/accenture-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:58.225Z"},"AMZNx/USDC":{"instrumentName":"AMZNx/USDC","slug":"amazon-xstock","backedUrl":"https://assets.backed.fi/products/amazon-xstock","symbol":"AMZNx","title":"Amazon xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Amazon xStocks (AMZNx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. AMZNx tracks the price of Amazon.com, Inc. (the underlying) AMZNx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Amazon.com, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Amazon.com, Inc. is a global technology company known for its extensive e-commerce operations, cloud computing services, digital streaming platforms, and a wide array of other related services and products. â View AMZNx on CoinGecko","links":[{"label":"View AMZNx on CoinGecko","url":"https://www.coingecko.com/en/coins/amazon-xstock"},{"label":"View AMZN on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-AMZN/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219211","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Amazon.com, Inc., 410 Terry Avenue North, Seattle, WA 98109, USA. LEI: ZXTILKJKG63JELOEG630.","isin":"US0231351067","symbol":"AMZN","name":"Amazon.com, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-AMZN/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/amazon-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:58.544Z"},"APPx/USDC":{"instrumentName":"APPx/USDC","slug":"applovin-xstock","backedUrl":"https://assets.backed.fi/products/applovin-xstock","symbol":"APPx","title":"AppLovin xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"AppLovin xStock (APPx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. APPx tracks the price of AppLovin Corporation (the underlying). APPx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of AppLovin Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"AppLovin is a global mobile technology company that provides businesses with solutions to connect with their target audience, market, monetize, and grow their apps and content. They offer a range of tools, including in-app connections, mobile devices, Connected TV, and multi-channel solutions. â View APPx on CoinGecko","links":[{"label":"View APPx on CoinGecko","url":"https://www.coingecko.com/en/coins/applovin-xstock"},{"label":"View APP on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-APP/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219641","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is AppLovin Corporation, 33 Thomas Street, Palo Alto, CA 94301, USA. LEI: 549300LLVXMUAOL3SQ07.","isin":"US03831W1080","symbol":"APP","name":"AppLovin Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-APP/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/applovin-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:58.861Z"},"AVGOx/USDC":{"instrumentName":"AVGOx/USDC","slug":"broadcom-xstock","backedUrl":"https://assets.backed.fi/products/broadcom-xstock","symbol":"AVGOx","title":"Broadcom xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Broadcom xStock (AVGOx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. AVGOx tracks the price of Broadcom Inc. (the underlying). AVGOx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Broadcom Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Broadcom Inc. is a global technology company that designs, develops, and supplies semiconductors and infrastru
5cture software solutions, operating through two segments: Semiconductor Solutions and Infrastructure Software. â View AVGOx on CoinGecko","links":[{"label":"View AVGOx on CoinGecko","url":"https://www.coingecko.com/en/coins/broadcom-xstock"},{"label":"View AVGO on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-AVGO/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219245","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Broadcom Inc., 1320 Ridder Park Drive, San Jose, CA 95131, USA. LEI: 549300WV6GIDOZJTV909.","isin":"US11135F1012","symbol":"AVGO","name":"Broadcom Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-AVGO/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/broadcom-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:59.174Z"},"BACx/USDC":{"instrumentName":"BACx/USDC","slug":"bank-of-america-xstock","backedUrl":"https://assets.backed.fi/products/bank-of-america-xstock","symbol":"BACx","title":"Bank of America xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Bank of America xStock (BACx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. BACx tracks the price of Bank of America Corporation (the underlying). BACx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Bank of America Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Bank of America is a leading global financial institution that offers a wide range of banking, investing, asset management, and financial risk management products and services. It serves individuals, small to large businesses, corporations, governments, and institutional investors, both domestically and internationally. â View BACx on CoinGecko","links":[{"label":"View BACx on CoinGecko","url":"https://www.coingecko.com/en/coins/bank-of-america-xstock"},{"label":"View BAC on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-BAC/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219500","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Bank of America Corporation, 100 North Tryon Street, Charlotte, NC 28255, USA. LEI: 9DJT3UXIJIZJI4WXO774.","isin":"US0605051046","symbol":"BAC","name":"Bank of America Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-BAC/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/bank-of-america-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:46:59.515Z"},"CMCSAx/USDC":{"instrumentName":"CMCSAx/USDC","slug":"comcast-xstock","backedUrl":"https://assets.backed.fi/products/comcast-xstock","symbol":"CMCSAx","title":"Comcast xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Comcast xStock (CMCSAx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CMCSAx tracks the price of International Comcast Corporation Class A (the underlying). CMCSAx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Comcast Corporation Class A, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Comcast Corporation is a global media and tech company that provides connectivity, content, and entertainment to millions of customers worldwide. It operates through various segments, including Xfinity for residential services, Comcast Business for commercial services, and NBCUniversal for media and entertainment. â View CMCSAx on CoinGecko","links":[{"label":"View CMCSAx on CoinGecko","url":"https://www.coingecko.com/en/coins/comcast-xstock"},{"label":"View CMCSA on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-CMCSA/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219567","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Comcast Corporation Class A, C
5omcast Center, 1701 JFK Boulevard, Philadelphia, PA 19103, USA. LEI: 549300GH79BNJQ047817.","isin":"US20030N1019","symbol":"CMCSA","name":"Comcast Corporation Class A","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-CMCSA/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/comcast-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:00.339Z"},"COINx/USDC":{"instrumentName":"COINx/USDC","slug":"coinbase-xstock","backedUrl":"https://assets.backed.fi/products/coinbase-xstock","symbol":"COINx","title":"Coinbase xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Coinbase xStock (COINx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. COINx tracks the price of Coinbase Global, Inc. (the underlying). COINx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Coinbase Global, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Coinbase Global, Inc. is a cryptocurrency exchange platform that offers services for buying, selling, storing, and managing cryptocurrencies. It operates as a decentralized, remote-first company with no physical headquarters, serving both individual and institutional clients. â View COINx on CoinGecko","links":[{"label":"View COINx on CoinGecko","url":"https://www.coingecko.com/en/coins/coinbase-xstock"},{"label":"View COIN on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-COIN/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219708","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Coinbase Global, Inc., 100 Pine Street, San Francisco, CA 94111, USA. LEI: 5493004G3J2SC154DU06.","isin":"US19260Q1076","symbol":"COIN","name":"Coinbase global","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-COIN/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/coinbase-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:00.663Z"},"CRCLx/USDC":{"instrumentName":"CRCLx/USDC","slug":"circle-xstock","backedUrl":"https://assets.backed.fi/products/circle-xstock","symbol":"CRCLx","title":"Circle xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Circle xStock (CRCLx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CRCLx tracks the price of Circle Internet Group (the underlying). CRCLx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Circle Internet Group, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Circle Internet Group (CRCL) is a digital financial technology f
5irm best known as the issuer of USD Coin (USDC), a regulated, fully backed stablecoin pegged to the U.S. dollar. It provides infrastructure for payments, treasury, and Web3 development across the crypto ecosystem. View CRCLx on CoinGecko","links":[{"label":"View CRCLx on CoinGecko","url":"https://www.coingecko.com/en/coins/circle-xstock"},{"label":"View CRCL on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-CRCL/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219773","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Circle Internet Group, Inc., One World Trade Center, New York, NY 10007, USA.","isin":"US1725731079","symbol":"CRCL","name":"Circle Internet Group","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-CRCL/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/circle-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:00.690Z"},"CRMx/USDC":{"instrumentName":"CRMx/USDC","slug":"salesforce-xstock","backedUrl":"https://assets.backed.fi/products/salesforce-xstock","symbol":"CRMx","title":"Salesforce xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Salesforce xStock (CRMx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CRMx tracks the price of Salesforce, Inc. (the underlying). CRMx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Salesforce, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Salesforce is a technology company that pioneered cloud-based customer relationship management (CRM) and now offers a broad suite of AI-powered platforms for various business functions, including sales, service, marketing, and commerce. â View CRMx on CoinGecko","links":[{"label":"View CRMx on CoinGecko","url":"https://www.coingecko.com/en/coins/salesforce-xstock"},{"label":"View CRM on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-CRM/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219476","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Salesforce, Inc., 415 Mission Street, San Francisco, CA 94105, USA. LEI: RCGZFPDMRW58VJ54VR07.","isin":"US79466L3024","symbol":"CRM","name":"Salesforce, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-CRM/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/salesforce-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:01.013Z"},"CRWDx/USDC":{"instrumentName":"CRWDx/USDC","slug":"crowdstrike-xstock","backedUrl":"https://assets.backed.fi/products/crowdstrike-xstock","symbol":"CRWDx","title":"CrowdStrike xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"CrowdStrike xStock (CRWDx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CRWDx tracks the price of CrowdStrike Holdings, Inc. (the underlying). CRWDx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of CrowdStrike Holdings, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"CrowdStrike is a cybersecurity company specializing in cloud-delivered security solutions, particularly for endpoint and cloud workload protection. It offers a unified platform, the CrowdStrike Falcon, that leverages AI and threat intelligence to detect and stop breaches. CH1436219674 View CRWDx on CoinGecko","links":[{"label":"View CRWDx on CoinGecko","url":"https://www.coingecko.com/en/coins/crowdstrike-xstock"},{"label":"View CRWD on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-CRWD/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219674","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is CrowdStrike Holdings, Inc., 2341 Washington Avenue, San Francisco, CA 94109, USA. LEI: 549300YBY08K9KM4HX32.","isin":"US22788C1053","symbol":"CRWD","name":"CrowdStrike Holdings, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-CRWD/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/crowdstrike-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:01.343Z"},"CSCOx/USDC":{"instrumentName":"CSCOx/USDC","slug":"cisco-xstock","backedUrl":"https://assets.backed.fi/products/cisco-xstock","symbol":"CSCOx","title":"Cisco xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Cisco xStock (CSCOx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CSCOx tracks the price of Cisco Systems, Inc. (the underlying). CSCOx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Cisco Systems, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Cisco is a leading global technology company that focuses on networking, security, collaboration, and cloud solutions. They provide a wide range of products and services, including networking hardware (routers, switches, wireless access points), software, and cloud services, helping businesses connect and protect their networks in the AI era. â View CSCOx on CoinGecko","links":[{"label":"View CSCOx on CoinGecko","url":"https://www.coingecko.com/en/coins/cisco-xstock"},{"label":"View CSCO on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-CSCO/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219435","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Cisco Systems, Inc., 170 West Tasman Drive, San Jose, CA 95134, USA. LEI: 549300LKFJ962MZ46593.","isin":"US17275R1023","symbol":"CSCO","name":"Cisco Systems, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-CSCO/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/cisco-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:02.247Z"},"CVXx/USDC":{"instrumentName":"CVXx/USDC","slug":"chevron-xstock","backedUrl":"https://assets.backed.fi/products/chevron-xstock","symbol":"CVXx","title":"Chevron xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Chevron xStock (CVXx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. CVXx tracks the price of Chevron Corporation (the underlying). CVXx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Chevron Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Chevron Corporation is a major American multinational energy corporation, a leading global oil and gas company known for its vertically integrated operations, spanning exploration, production, refining, marketing, and transportation. â View CVXx on CoinGecko","links":[{"label":"View CVXx on CoinGecko","url":"https://www.coingecko.com/en/coins/chevron-xstock"},{"label":"View CVX on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-CVX/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219369","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Chevron Corporation, 1400 Smith Street, Houston, TX 77002, USA. LEI: 549300LCLFBFN1GUY529.","isin":"US1667641005","symbol":"CVX","name":"Chevron Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-CVX/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/chevron-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:02.574Z"},"DHRx/USDC":{"instrumentName":"DHRx/USDC","slug":"danaher-xstock","backedUrl":"https://assets.backed.fi/products/danaher-xstock","symbol":"DHRx","title":"Danaher xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Danaher xStock (DHRx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. DHRx tracks the price of Danaher Corporation (the underlying). DHRx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Danaher Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Danaher Corporation is a global science and technology innovator operating in biotechnology, life sciences, and diagnostics. It focuses on accelerating the power of science and technology to improve human health. The company provides a wide range of tools, services, and solutions to customers across these fields, with a particular emphasis on developing and commercializing therapies, creating tools for precise diagnoses, and supporting research in various aspects of life sciences. â View DHRx on CoinGecko","links":[{"label":"View DHRx on CoinGecko","url":"https://www.coingecko.com/en/coins/danaher-xstock"},{"label":"View DHR on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-DHR/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219542","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Danaher Corporation, 2200 Pennsylvania Avenue NW, Suite 800W, Washington, DC 20037, USA. LEI: 549300JJ75JNZ01ZK538.","isin":"US2358511028","symbol":"DHR","name":"Danaher Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-DHR/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/danaher-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:02.894Z"},"GLDx/USDC":{"instrumentName":"GLDx/USDC","slug":"gold-xstock","backedUrl":"https://assets.backed.fi/products/gold-xstock","symbol":"GLDx","title":"Gold xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Gold xStock (GLDx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. GLDx tracks the price of SPDR Gold Shares (the underlying). GLDx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the ETF price of SPDR Gold Shares, whilst maintaining th
5e benefits of blockchain technology.","keyBenefits":"SPDR Gold Shares (GLD) is an exchange-traded fund that aims to reflect the performance of the price of gold bullion. It provides investors with a cost-effective and liquid way to gain exposure to gold without needing to physically own the metal. â View GLDx on CoinGecko","links":[{"label":"View GLDx on CoinGecko","url":"https://www.coingecko.com/en/coins/gold-xstock"},{"label":"View GLD on TradingView.com","url":"https://www.tradingview.com/symbols/AMEX-GLD/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219740","managementFee":"0.40% per year, reflects the actual ongoing costs charged by the manager of the underlying fund, and is based on costs incurred over the past year.","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is SPDR Gold Trust, c/o World Gold Trust Services, LLC, 685 Third Avenue, 27th Floor, New York, NY 10017, USA.","isin":"US78463V1070","symbol":"GLD","name":"SPDR Gold Shares","moreInfoUrl":"https://www.tradingview.com/symbols/AMEX-GLD/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/gold-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:03.212Z"},"GOOGLx/USDC":{"instrumentName":"GOOGLx/USDC","slug":"alphabet-xstock","backedUrl":"https://assets.backed.fi/products/alphabet-xstock","symbol":"GOOGLx","title":"Alphabet xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Alphabet xStock (GOOGLx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. GOOGLx tracks the price of Alphabet Inc. Class A (the underlying). GOOGLx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Alphabet Inc. Class A, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Alphabet Inc. is a multinational conglomerate holding company It functions as the parent company for various subsidiaries, including Google, YouTube, and Android, as well as other ventures like life sciences, autonomous vehicles, and more â View GOOGLx on CoinGecko","links":[{"label":"View GOOGLx on CoinGecko","url":"https://www.coingecko.com/en/coins/alphabet-xstock"},{"label":"View GOOGL on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-GOOGL/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219237","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Alphabet Inc. Class A, 1600 Amphitheatre Parkway, Mountain Vie
5w, CA 94043, USA. LEI: 5493006MHB84DD0ZWV18.","isin":"US02079K3059","symbol":"GOOGL","name":"Alphabet Inc. Class A","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-GOOGL/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/alphabet-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:04.208Z"},"GSx/USDC":{"instrumentName":"GSx/USDC","slug":"goldman-sachs-xstock","backedUrl":"https://assets.backed.fi/products/goldman-sachs-xstock","symbol":"GSx","title":"Goldman Sachs xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Goldman Sachs xStock (GSx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. GSx tracks the price of The Goldman Sachs Group, Inc. (the underlying). GSx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of The Goldman Sachs Group, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Goldman Sachs is a leading global investment bank and wealth management firm. It provides a wide range of financial services to a diverse client base, including corporations, financial institutions, governments, and individuals. The firm operates globally through its four main divisions: investment banking, global markets, asset management, and consumer and wealth management. â View GSx on CoinGecko","links":[{"label":"View GSx on CoinGecko","url":"https://www.coingecko.com/en/coins/goldman-sachs-xstock"},{"label":"View GS on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-GS/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219682","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is The Goldman Sachs Group, Inc., 200 West Street, New York, NY 10282, USA. LEI: 784F5XWPLTWKTBV3E584.","isin":"US38141G1040","symbol":"GS","name":"The Goldman Sachs Group, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-GS/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/goldman-sachs-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:04.500Z"},"HDx/USDC":{"instrumentName":"HDx/USDC","slug":"home-depot-xstock","backedUrl":"https://assets.backed.fi/products/home-depot-xstock","symbol":"HDx","title":"Home Depot xStock","category":"Tokenized Equities","lastUpdated":"Last updated on December 22, 2025","description":"Home Depot xStock (HDx
5) is a tracker certificate issued as Solana SPL and ERC-20 tokens. HDx tracks the price of The Home Depot, Inc. (the underlying). HDx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of The Home Depot, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"The Home Depot is a publicly traded home improvement retailer that operates over 2,300 stores across the United States, Canada, and Mexico. It\'s the largest DIY and home improvement retailer globally, offering a vast array of products and services, including tools, construction materials, appliances, and home services. â View HDx on CoinGecko","links":[{"label":"View HDx on CoinGecko","url":"https://www.coingecko.com/en/coins/home-depot-xstock"},{"label":"View HD on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-HD/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219351","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The Home Depot, Inc., 2455 Paces Ferry Road NW, Atlanta, GA 30339, USA","isin":"US4370761029","symbol":"HD","name":"The Home Depot, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-HD/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/home-depot-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:04.823Z"},"HONx/USDC":{"instrumentName":"HONx/USDC","slug":"honeywell-xstock","backedUrl":"https://assets.backed.fi/products/honeywell-xstock","symbol":"HONx","title":"Honeywell xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Honeywell xStock (HONx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. HONx tracks the price of Honeywell International Inc. (the underlying). HONx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Honeywell International Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Honeywell International Inc. is an American technology and manufacturing company that operates in four core areas: Aerospace, Building Automation, Industrial Automation, and Energy and Sustainability Solutions. The company develops and manufactures technologies to address challenges related to safety, security, and energy, with a focus on quality, delivery, value, and technology. â View HONx on CoinGecko","links":[{"label":"View HONx on CoinGecko","url":"https://www.coingecko.com/en/coins/honeywell-xstock"},{"label":"View HON on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-HON/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219583","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Honeywell International Inc., 855 S. Mint Street, Charlotte, NC 28202, USA. LEI: 549300DQ5QDLKV4BXJ20.","isin":"US4385161066","
5symbol":"HON","name":"Honeywell International Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-HON/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/honeywell-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:05.158Z"},"HOODx/USDC":{"instrumentName":"HOODx/USDC","slug":"robinhood-xstock","backedUrl":"https://assets.backed.fi/products/robinhood-xstock","symbol":"HOODx","title":"Robinhood xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Robinhood xStock (HOODx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. HOODx tracks the price of Robinhood Markets, Inc. (the underlying). HOODx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Robinhood Markets, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Robinhood is a publicly traded financial technology company specializing in online brokerage and investment solutions. The company offers a platform for users to buy and sell stocks, options, ETFs, and cryptocurrencies with zero trading commissions. â View HOODx on CoinGecko","links":[{"label":"View HOODx on CoinGecko","url":"https://www.coingecko.com/en/coins/robinhood-xstock"},{"label":"View HOOD on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-HOOD/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219666","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Robinhood Markets, Inc., 85 Willow Road, Menlo Park, CA 94025, USA. LEI: 213800FS5AO3YWIE6F63.","isin":"US7707001027","symbol":"HOOD","name":"Robinhood Markets, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-HOOD/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/robinhood-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:05.477Z"},"INTCx/USDC":{"instrumentName":"INTCx/USDC","slug":"intel-xstock","backedUrl":"https://assets.backed.fi/products/intel-xstock","symbol":"INTCx","title":"Intel xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Intel xStock (INTCx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. INTCx tracks the price of Intel Corporation (the underlying). INTCx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Intel Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Intel Corporation is a multinational technology company primarily focused on designing, manufacturing, and selling computer components like CPUs and related products. They are a major player in the semiconductor industry. Intel designs and develops technologies for a
5wide range of applications, including personal computers, data centers, and other devices. â View INTCx on CoinGecko","links":[{"label":"View INTCx on CoinGecko","url":"https://www.coingecko.com/en/coins/intel-xstock"},{"label":"View INTC on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-INTC/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219609","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Intel Corporation, 2200 Mission College Blvd, Santa Clara, CA 95054, USA. LEI: 549300JKU567Q7J0AZ50.","isin":"US4581401001","symbol":"INTC","name":"Intel Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-INTC/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/intel-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:06.438Z"},"JNJx/USDC":{"instrumentName":"JNJx/USDC","slug":"johnson-johnson-xstock","backedUrl":"https://assets.backed.fi/products/johnson-johnson-xstock","symbol":"JNJx","title":"Johnson & Johnson xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Johnson & Johnson xStock (JNJx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. JNJx tracks the price of Johnson & Johnson (the underlying). JNJx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Johnson & Johnson, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Johnson & Johnson (J&J) is a global healthcare company focused on research, development, manufacturing, and sale of pharmaceuticals, medical devices, and consumer products. It operates through three segments: Consumer Health, Pharmaceutical, and Medical Devices. J&J has a diverse product portfolio spanning various therapeutic areas and market segments. â View JNJx on CoinGecko","links":[{"label":"View JNJx on CoinGecko","url":"https://www.coingecko.com/en/coins/johnson-johnson-xstock"},{"label":"View JNJ on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-JNJ/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219294","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Johnson & Johnson, One Johnson & Johnson Plaza, New Brunswick, NJ 08933, USA. LEI: 549300G0CFPGEF6X2043.","isin":"US478160104
56","symbol":"JNJ","name":"Johnson & Johnson","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-JNJ/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/johnson-johnson-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:06.761Z"},"KOx/USDC":{"instrumentName":"KOx/USDC","slug":"coca-cola-xstock","backedUrl":"https://assets.backed.fi/products/coca-cola-xstock","symbol":"KOx","title":"Coca-Cola xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Coca-Cola xStock (KOx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. KOx tracks the price of The Coca-Cola Company (the underlying). KOx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of The Coca-Cola Company, whilst maintaining the benefits of blockchain technology.","keyBenefits":"The Coca-Cola Company is a multinational corporation that primarily manufactures, sells, and markets non-alcoholic beverages. It is known for its iconic Coca-Cola brand, but its portfolio extends to numerous other beverages like Sprite and Fanta. â View KOx on CoinGecko","links":[{"label":"View KOx on CoinGecko","url":"https://www.coingecko.com/en/coins/coca-cola-xstock"},{"label":"View KO on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-KO/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219419","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is The Coca-Cola Company, One Coca-Cola Plaza, Atlanta, GA 30313, USA. LEI: UWJKFUJFZ02DKWI3RY53.","isin":"US1912161007","symbol":"KO","name":"The Coca-Cola Company","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-KO/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/coca-cola-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:08.206Z"},"LINx/USDC":{"instrumentName":"LINx/USDC","slug":"linde-xstock","backedUrl":"https://assets.backed.fi/products/linde-xstock","symbol":"LINx","title":"Linde xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Linde xStock (LINx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. LINx tracks the price of Linde plc (the underlying). LINx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Linde plc, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Linde is a global leader in industrial gases and engineering, offering a wide range of solutions, te
5chnologies, and services to various industries. â View LINx on CoinGecko","links":[{"label":"View LINx on CoinGecko","url":"https://www.coingecko.com/en/coins/linde-xstock"},{"label":"View LIN on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-LIN/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219468","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Linde plc, Ten Earlsfort Terrace, Dublin 2, Ireland. LEI: 5299003QR1WT0EF88V51.","isin":"IE00BZ12WP82","symbol":"LIN","name":"Linde plc","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-LIN/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/linde-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:08.501Z"},"LLYx/USDC":{"instrumentName":"LLYx/USDC","slug":"eli-lilly-xstock","backedUrl":"https://assets.backed.fi/products/eli-lilly-xstock","symbol":"LLYx","title":"Eli Lilly xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Eli Lilly xStock (LLYx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. LLYx tracks the price of Eli Lilly and Company (the underlying). LLYx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Eli Lilly and Company, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Eli Lilly and Company is a global pharmaceutical company based in Indianapolis, Indiana, that discovers, develops, manufactures, and markets human healthcare products. They are known for a wide range of prescription medications, including those for cardiometabolic health, oncology, immunology, and neuroscience. â View LLYx on CoinGecko","links":[{"label":"View LLYx on CoinGecko","url":"https://www.coingecko.com/en/coins/eli-lilly-xstock"},{"label":"View LLY on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-LLY/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219328","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Eli Lilly and Company, Lilly Corporate Center, Indianapolis, IN 46285, USA. LEI: FRDRIPF3EKNDJ2CQJL29.","isin":"US5324571083","symbol":"LLY","name":"Eli Lilly and Company","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-LLY/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/eli-lilly-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:08.784Z"},"MAx/USDC":{"instrumentName":"MAx/USDC","slug":"mastercard-xstock","backedUrl":"https://assets.backed.fi/products/mastercard-xstock","symbol":"MAx","title":"Mastercard xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Mastercard xStock (MAx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MAx tracks the price of Mastercard Inc. (the underlying). MAx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Mastercard Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Mastercard Inc. is a global payments and technology company that facilitates electronic payments by connecting consumers, financial institutions, merchants, governments, and businesses worldwide. They do not issue cards, but instead develop and manage payment solutions and systems, processing billions of transactions annually. â View MAx on CoinGecko","links":[{"label":"View MAx on CoinGecko","url":"https://www.coingecko.com/en/coins/mastercard-xstock"},{"label":"View MA on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-MA/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219336","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Mastercard Incorporated Class A, 2000 Purchase Street, Purchase, NY 10577, USA. LEI: AR5L2ODV9HN37376R084.","isin":"US57636Q1040","symbol":"MA","name":"Mastercard Incorporated Class A","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-MA/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/mastercard-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:09.112Z"},"METAx/USDC":{"instrumentName":"METAx/USDC","slug":"meta-xstock","backedUrl":"https://assets.backed.fi/products/meta-xstock","symbol":"METAx","title":"Meta xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Meta xStock (METAx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. METAx tracks the price of Meta Platforms, Inc (the underlying). METAx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Meta Platforms, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Meta Platforms, Inc. is a social media and technology company that focuses on connecting people and developing the metaverse. It owns and operates several popular social media platforms like Facebook, Instagram, Threads, and WhatsApp, as well as developing VR and AR technologies through its Reality Labs â View METAx on CoinGecko","links":[{"label":"View METAx on CoinGecko","url":"https://www.coingecko.com/en/coins/meta-xstock"},{"label":"View META on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-META/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219229","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Meta Platforms, Inc., 1 Hacker Way, Menlo Park, CA 94025, USA. LEI: BQ4BKCS1HXDV9HN80Z93.","isin":"US30303M1027","symbol":"META","name":"Meta Platforms, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-META/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/meta-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:10.047Z"},"MRKx/USDC":{"instrumentName":"MRKx/USDC","slug":"merck-xstock","backedUrl":"https://assets.backed.fi/products/merck-xstock","symbol":"MRKx","title":"Merck xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Merck xStock (MRKx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MRKx tracks the price of Merck & Co., Inc. (the underlying). MRKx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Merck & Co., Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Merck, is a global biopharmaceutical company focused on developing and delivering innovative health solutions. It operates in the healthcare and life science industries, with a broad portfolio of prescription medicines, vaccines, biologic therapies, and animal health products. â View MRKx on CoinGecko","links":[{"label":"View MRKx on CoinGecko","url":"https://www.coingecko.com/en/coins/merck-xstock"},{"label":"View MRK on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-MRK/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219385","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Merck & Co., Inc., 2000 Galloping Hill Road, Kenilworth, NJ 07033, USA. LEI: 4YV9Y5M8S0BRK1RP0397.","
5isin":"US58933Y1055","symbol":"MRK","name":"Merck & Co., Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-MRK/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/merck-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:10.372Z"},"MRVLx/USDC":{"instrumentName":"MRVLx/USDC","slug":"marvell-xstock","backedUrl":"https://assets.backed.fi/products/marvell-xstock","symbol":"MRVLx","title":"Marvell xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Marvell xStock (MRVLx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MRVLx tracks the price of Marvell Technology, Inc. (the underlying). MRVLx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Marvell Technology, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Marvell Technology, Inc. is an American semiconductor company that designs and develops integrated circuits, primarily focused on data infrastructure. They are known for their silicon solutions that enable data movement, storage, processing, and security, impacting areas like data centers, automotive, enterprise, and carrier networks. â View MRVLx on CoinGecko","links":[{"label":"View MRVLx on CoinGecko","url":"https://www.coingecko.com/en/coins/marvell-xstock"},{"label":"View MRVL on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-MRVL/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219658","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Marvell Technology, Inc., 5488 Marvell Lane, Santa Clara, CA 95054, USA. LEI: 549300M501IVJM50FG12.","isin":"US5738741041","symbol":"MRVL","name":"Marvell Technology, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-MRVL/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/marvell-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:10.692Z"},"MSFTx/USDC":{"instrumentName":"MSFTx/USDC","slug":"microsoft-xstock","backedUrl":"https://assets.backed.fi/products/microsoft-xstock","symbol":"MSFTx","title":"Microsoft xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Microsoft xStock (MSFTx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MSFTx tracks the price of Microsoft Corporation (the underlying). MSFTx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Microsoft Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Microsoft is the world\'s largest vendor of computer softw
5are and a leading provider of cloud computing services, video games, computer and gaming hardware, search, and other online services. â View MSFTx on CoinGecko","links":[{"label":"View MSFTx on CoinGecko","url":"https://www.coingecko.com/en/coins/microsoft-xstock"},{"label":"View MSFT on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-MSFT/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219203","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Microsoft Corporation, One Microsoft Way, Redmond, WA 98052, USA. LEI: INR2EJN1ERAN0W5ZP974.","isin":"US5949181045","symbol":"MSFT","name":"Microsoft Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-MSFT/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/microsoft-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:11.022Z"},"MSTRx/USDC":{"instrumentName":"MSTRx/USDC","slug":"microstrategy-xstock","backedUrl":"https://assets.backed.fi/products/microstrategy-xstock","symbol":"MSTRx","title":"MicroStrategy xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"MicroStrategy xStock (MSTRx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MSTRx tracks the price of MicroStrategy Inc. (the underlying). MSTRx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of MicroStrategy Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"MicroStrategy is a company that provides enterprise analytics and mobility software, as well as business intelligence solutions. They also engage in Bitcoin development and are known for their Bitcoin treasury strategy. â View MSTRx on CoinGecko","links":[{"label":"View MSTRx on CoinGecko","url":"https://www.coingecko.com/en/coins/microstrategy-xstock"},{"label":"View MSTR on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-MSTR/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219633","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is MicroStrategy Incorporated, 1000 Nicollet Mall, Suite 400, Minneapolis, MN 55403, USA. LEI: 549300WQTWEJUEHXQX21.","isin":"US5949724083","symbol":"MSTR","name":"MicroStrategy Incorporated","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-MSTR/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/microstrategy-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:11.345Z"},"NFLXx/USDC":{"instrumentName":"NFLXx/USDC","slug":"netflix-xstock","backedUrl":"https://assets.backed.fi/products/netflix-xstock","symbol":"NFLXx","title":"Netflix xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Netflix xStock (NFLXx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. NFLXx tracks the price of Netflix, Inc. (the underlying). NFLXx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Netflix, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Netflix is a media company that provides entertainment services, including streaming movies, TV shows, and games, through a subscription-based model. It also produces its own original content and licenses content from other companies. â View NFLXx on CoinGecko","links":[{"label":"View NFLXx on CoinGecko","url":"https://www.coingecko.com/en/coins/netflix-xstock"},{"label":"View NFLX on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-NFLX/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219526","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Netflix, Inc., 121 Albright Way, Los Gatos, CA 95032, USA. LEI: 549300OFZPDCSL2KSP45.","isin":"US64110L1061","symbol":"NFLX","name":"Netflix, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-NFLX/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/netflix-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:11.677Z"},"NVDAx/USDC":{"instrumentName":"NVDAx/USDC","slug":"nvidia-xstock","backedUrl":"https://assets.backed.fi/products/nvidia-xstock","symbol":"NVDAx","title":"NVIDIA xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"NVI
5DIA xStock (NVDAx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. NVDAx tracks the price of NVIDIA Corp (the underlying). NVDAx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of NVIDIA Corp, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Nvidia is building the AI-powered future - a more intelligent, automated, and efficient technological landscape driven by artificial intelligence. The company started in 1993 with the radical idea that graphics processing units (GPUs) could revolutionize computing. Today, Nvidia offers a trusted and powerful platform for accessing the broader AI ecosystem, empowering businesses and individuals to harness the transformative power of artificial intelligence. â View NVDAx on CoinGecko","links":[{"label":"View NVDAx on CoinGecko","url":"https://www.coingecko.com/en/coins/nvidia-xstock"},{"label":"View NVDA on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-NVDA/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219195","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is NVIDIA Corporation, 251 Little Falls Drive, Wilmington, DE 19808, USA. LEI: 549300S4KLFTLO7GSQ80.","isin":"US67066G1040","symbol":"NVDA","name":"NVIDIA Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-NVDA/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/nvidia-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:12.003Z"},"ORCLx/USDC":{"instrumentName":"ORCLx/USDC","slug":"oracle-xstock","backedUrl":"https://assets.backed.fi/products/oracle-xstock","symbol":"ORCLx","title":"Oracle xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Oracle xStock (ORCLx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. ORCLx tracks the price of Oracle Corporation (the underlying). ORCLx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Oracle Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Oracle Corporation is a large, publicly-held multinational company headquartered in Austin, Texas, offering enterprise applications and cloud infrastructure. It is known for its database software, Oracle Database, and has expanded into cloud-based services, including ERP, CRM, and HCM applications. â View ORCLx on CoinGecko","links":[{"label":"View ORCLx on CoinGecko","url":"https://www.coingecko.com/en/coins/oracle-xstock"},{"label":"View ORCL on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-ORCL/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219450","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Oracle Corporation, 500 Oracle Parkway, Redwood Shores, CA 94065, USA. LEI: 1Z4GXXU7ZHVWFCD8TV52.","isin":"US68389X1054","symbol":"ORCL","name":"Oracle Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-ORCL/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/oracle-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:12.309Z"},"PLTRx/USDC":{"instrumentName":"PLTRx/USDC","slug":"palantir-xstock","backedUrl":"https://assets.backed.fi/products/palantir-xstock","symbol":"PLTRx","title":"Palantir xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Palantir xStock (PLTRx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. PLTRx tracks the price of Palantir Technologies Inc. (the underlying). PLTRx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Palantir Technologies Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Palantir is a software company that specializes in data analytics and decision-making platforms. They offer platforms like Palantir Foundry and Gotham, used by both commercial and government clients, to help organizations manage, analyze, and make data-driven decisions. The company is known for its work in areas like national security, defense, and healthcare. â View PLTRx on CoinGecko","links":[{"label":"View PLTRx on CoinGecko","url":"https://www.coingecko.com/en/coins/palantir-xstock"},{"label":"View PLTR on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-PLTR/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219625","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Palantir Technologies Inc., 1555 Blake Street, Denver, CO 80202, USA. LEI: 549300UVN46B3BBDHO85.","isin":"US69608A1088","symbol":"PLTR","name":"Palantir Technologies Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-PLTR/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/palantir-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:12.616Z"},"QQQx/USDC":{"instrumentName":"QQQx/USDC","slug":"nasdaq-xstock","backedUrl":"https://assets.backed.fi/products/nasdaq-xstock","symbol":"QQQx","title":"Nasdaq xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Nasdaq xStock (QQQx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. QQQx tracks the price of Invesco QQQ Trust (the underlying). QQQx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the ETF price of Invesco QQQ Trust, whilst maintaining the benefits of blockchain technology.","keyBenefits":"Invesco QQQ Trust (QQQ) is an exchange-traded fund that aims to track the performance of the Nasdaq-100 Index, which includes 100 of the largest non-financial companies listed on the Nasdaq Stock Market. It offers concentrated exposure to major technology and growth-oriented companies. â View QQQx on CoinGecko","links":[{"label":"View QQQx on CoinGecko","url":"https://www.coingecko.com/en/coins/nasdaq-xstock"},{"label":"View QQQ on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-QQQ/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219724","managementFee":"0.20% per year, reflects the actual ongoing costs charged by the manager of the underlying fund, and is based on costs incurred over the past year.","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Invesco QQQ TrustSM, Series 1, c/o Invesco Capital Management LLC, 3500 Lacey Road, Suite 700, Downers Grove, IL 60515, USA.","isin":"US46090E1038","symbol":"QQQ","name":"Invesco QQQ Trust","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-QQQ/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/nasdaq-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}
5],"generatedAt":"2026-05-12T11:47:12.901Z"},"SPYx/USDC":{"instrumentName":"SPYx/USDC","slug":"sp500-xstock","backedUrl":"https://assets.backed.fi/products/sp500-xstock","symbol":"SPYx","title":"SP500 xStock","category":"Tokenized Equities","lastUpdated":"Last updated on July 3, 2025","description":"SP500 xStock (SPYx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. SPYx tracks the price of SPDR S&P 500 ETF Trust (the underlying). SPYx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the ETF price of SPDR S&P 500 ETF Trust, whilst maintaining the benefits of blockchain technology.","keyBenefits":"SPDR S&P 500 ETF Trust (SPY) is an exchange-traded fund that seeks to track the performance of the S&P 500 Index, representing 500 of the largest publicly traded companies in the U.S. It offers broad exposure to the U.S. equity market and is one of the most widely traded ETFs globally. â View SPYx on CoinGecko","links":[{"label":"View SPYx on CoinGecko","url":"https://www.coingecko.com/en/coins/sp500-xstock"},{"label":"View SPY on TradingView.com","url":"https://www.tradingview.com/symbols/AMEX-SPY/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219716","managementFee":"0.0945% per year, reflects the actual ongoing costs charged by the manager of the underlying fund, and is based on costs incurred over the past year.","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is SPDR S&P 500 ETF TRUST, c/o State Street Global Advisors, One Iron Street, Boston MA 02210, USA.","isin":"US78462F1030","symbol":"SPY","name":"SPDR S&P 500 ETF Trust","moreInfoUrl":"https://www.tradingview.com/symbols/AMEX-SPY/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/sp500-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:13.227Z"},"TSLAx/USDC":{"instrumentName":"TSLAx/USDC","slug":"tesla-xstock","backedUrl":"https://assets.backed.fi/products/tesla-xstock","symbol":"TSLAx","title":"Tesla xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Tesla xStock (TSLAx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. TSLAx tracks the price of Tesla, Inc. (the underlying). TSLAx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of Tesla, Inc., whilst maintaining the benefits of blockchain technology.","keyBenefits":"Tesla, Inc. is an American company focused on designing, developing, manufacturing, and selling electric vehicles, as well as energy generation and storage systems. â View TSLAx on CoinGecko","links":[{"label":"View TSLAx on CoinGecko","url":"https://www.coingecko.com/en/coins/tesla-xstock"},{"label":"View TSLA on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-TSLA/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219252","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is Tesla, Inc., 1209 Orange Street, Wilmington, New Castle, Delaware 19801, USA. LEI: 54930043XZGB27CTOV49.","isin":"US88160R1014","symbol":"TSLA","name":"Tesla, Inc.","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-TSLA/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/tesla-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:13.576Z"},"UNHx/USDC":{"instrumentName":"UNHx/USDC","slug":"unitedhealth-xstock","backedUrl":"https://assets.backed.fi/products/unitedhealth-xstock","symbol":"UNHx","title":"UnitedHealth xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"UnitedHealth xStock (UNHx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. UNHx tracks the price of UnitedHealth Group Incorporated (the underlying). UNHx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of UnitedHealth Group Incorporated, whilst maintaining the benefits of blockchain technology.","keyBenefits":"UnitedHealth Group is a global healthcare and well-being company that operates through two main divisions: UnitedHealthcare and Optum. UnitedHealthcare focuses on providing health insurance plans and benefits, while Optum leverages technology and data to improve healthcare delivery, access, and outcomes. â View UNHx on CoinGecko","links":[{"label":"View UNHx on CoinGecko","url":"https://www.coingecko.com/en/coins/unitedhealth-xstock"},{"label":"View UNH on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-UNH/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219278","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is UnitedHealth Group Incorporated, 9900 Bren Road East, Minnetonka, MN 55343, USA. LEI: 549300GHBMY8T5GXDE41.","isin":"US91324P1021","symbol":"UNH","name":"UnitedHealth Group Incorporated","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-UNH/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC InCore Bank AG Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Products","url":"https://assets.backed.fi/products"},{"label":"Legal Documentation","url":"https://assets.backed.fi/legal-documentation"},{"label":"Onboarding","url":"https://assets.backed.fi/onboarding"},{"label":"Contact","url":"https://assets.backed.fi/contact"},{"label":"Key Information Document","url":"https://assets.backed.fi/products/unitedhealth-xstock"},{"label":"Cookie Preferences","url":"https://assets.backed.fi/"},{"label":"Terms of Service","url":"https://assets.backed.fi/terms-of-service"},{"label":"Privacy Notice","url":"https://assets.backed.fi/privacy-notice"}],"generatedAt":"2026-05-12T11:47:13.902Z"},"GMEx/USDC":{"instrumentName":"GMEx/USDC","slug":"gamestop-xstock","backedUrl":"https://assets.backed.fi/products/gamestop-xstock","symbol":"GMEx","title":"Gamestop xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"Gamestop xStock (GMEx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. GMEx tracks the price of GameStop Corp. (the underlying). GMEx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of GameStop Corp., whilst maintaining the benefits of blockchain technology.","keyBenefits":"GameStop Corporation is a specialty retailer primarily focused on video games and related products. They sell new and pre-owned video game hardware, softw
5are, accessories, and collectibles through stores and e-commerce platforms in the US, Canada, Australia, and Europe. The company also offers services like repairs, sanitation, and redistribution of defective products, as well as retail services.","links":[{"label":"View GMEx on CoinGecko","url":"https://www.coingecko.com/en/coins/gamestop-xstock"},{"label":"View GME on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-GME/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219690","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is GameStop Corp., 625 West 57th Street, New York, NY 10019, USA. LEI: 549300505KLOET039L77.","isin":"US36467W1099","symbol":"GME","name":"GameStop Corp.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-GME/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Key Information Document","url":"https://assets.backed.fi/products/gamestop-xstock"}],"generatedAt":"2026-05-12T15:03:01.367Z"},"IBMx/USDC":{"instrumentName":"IBMx/USDC","slug":"international-business-machines-xstock","backedUrl":"https://assets.backed.fi/products/international-business-machines-xstock","symbol":"IBMx","title":"International Business Machines xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"International Business Machines xStock (IBMx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. IBMx tracks the price of International Business Machines Corporation (the underlying). IBMx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of International Business Machines Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"International Business Machines Corporation is an American multinational technology corporation headquartered in Armonk, New York. Founded in 1911 as the Computing-Tabulating-Recording Company, IBM became a leader in hardware, software, and services, offering a range of technologies and solutions across various industries.","links":[{"label":"View IBMx on CoinGecko","url":"https://www.coingecko.com/en/coins/international-business-machines-xstock"},{"label":"View IBM on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-IBM/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219559","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is International Business Machines Corporation, 1 New Orchard Road, Armonk, NY 10504-1722, USA. LEI: 549300LVNQ3X4D7Q0Z67.","isin":"US4592001014","symbol":"IBM","name":"International Business Machines Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-IBM/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Key Information Document","url":"https://assets.backed.fi/products/international-business-machines-xstock"}],"generatedAt":"2026-05-12T15:03:01.403Z"},"JPMx/USDC":{"instrumentName":"JPMx/USDC","slug":"jpmorgan-chase-xstock","backedUrl":"https://assets.backed.fi/products/jpmorgan-chase-xstock","symbol":"JPMx","title":"JPMorgan Chase xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"JPMorgan Chase xStock (JPMx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. JPMx tracks the price of JPMorgan Chase & Co. (the underlying). JPMx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of JPMorgan Chase & Co., whilst maintaining the benefits of blockchain technology.","keyBenefits":"JPMorgan Chase & Co. is a multinational financial services firm headquartered in New York City. It\'s a leading provider of financial services to individuals, businesses, and institutions worldwide. The company operates in various segments, including Consumer and Community Banking, Corporate and Investment Bank, Commercial Banking, and Asset and Wealth Management.","links":[{"label":"View JPMx on CoinGecko","url":"https://www.coingecko.com/en/coins/jpmorgan-chase-xstock"},{"label":"View JPM on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-JPM/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219302","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is JPMorgan Chase & Co., 383 Madison Avenue, New York, NY 10179, USA. LEI: 8I5DZWZKVSZI1NUHU748.","isin":"US46625H1005","symbol":"JPM","name":"JPMorgan Chase & Co.","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-JPM/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Key Information Document","url":"https://assets.backed.fi/products/jpmorgan-chase-xstock"}],"generatedAt":"2026-05-12T15:03:02.329Z"},"MCDx/USDC":{"instrumentName":"MCDx/USDC","slug":"mcdonalds-xstock","backedUrl":"https://assets.backed.fi/products/mcdonalds-xstock","symbol":"MCDx","title":"McDonald\'s xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 30, 2025","description":"McDonaldâs xStock (MCDx) is a tracker certificate issued as Solana SPL and ERC-20 tokens. MCDx tracks the price of McDonald\'s Corporation (the underlying). MCDx is designed to give eligible cryptocurrency market participants regulatory-compliant access to the stock price of McDonald\'s Corporation, whilst maintaining the benefits of blockchain technology.","keyBenefits":"McDonald\'s Corporation is a global foodservice retail chain operator that owns, operates, and franchises restaurants worldwide. They serve a locally relevant menu of food and beverages, with a primary focus on serving quality food and beverages. The company operates through a network of franchised and company-owned restaurants.","links":[{"label":"View MCDx on CoinGecko","url":"https://www.coingecko.com/en/coins/mcdonald-s-xstock"},{"label":"View MCD on TradingView.com","url":"https://www.tradingview.com/symbols/NYSE-MCD/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1436219534","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per year may be introduced in the future","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"The issuer of the Underlying is McDonaldâs Corporation, 110 N. Carpenter St, Chicago, IL 60607, USA. LEI: 6ZY54WVKHCXN8D5ZP132.","isin":"US5801351017","symbol":"MCD","name":"McDonald\'s Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NYSE-MCD/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Key Information Document","url":"https://assets.backed.fi/products/mcdonalds-xstock"}],"generatedAt":"2026-05-12T15:03:02.364Z"},"IMX/USDC":{"skipped":true,"reason":"Backed responded with 404 Not Found","recordedAt":"2026-05-13T11:17:55.156Z"},"SPCXx/USDC":{"instrumentName":"SPCXx/USDC","slug":"spacex-xstock","backedUrl":"https://assets.backed.fi/products/spacex-xstock","symbol":"SPCXx","title":"SpaceX xStock","category":"Tokenized Equities","lastUpdated":"Last updated on June 10, 2026","description":"SpaceX xStock (SPCXx) is a tracker certificate issued as a freely transferable token on selected blockchains. SPCXx tracks the price of Space Exploration Technologies Corporation. SPCXx is designed to give eligible investors regulatory-compliant access to the stock price of Space Exploration Technologies Corporation, whilst maintaining the benefits of blockchain technology.","links":[{"label":"View SPCX on TradingView.com","url":"https://www.tradingview.com/symbols/NASDAQ-SPCX/"}],"productDetails":{"issuer":"Backed Assets (JE) Limited","isin":"CH1564487366","managementFee":"The tracker charges no management fee at present. A fee of up to 0.25% per annum may be introduced in the future.","issuanceRedemptionFee":"Up to 0.50% of your investment\'s value when entering and exiting the investment","networkChain":"Ethereum & EVM Compatible (ERC-20) Ethereum (ERC-20) & Solana (SPL)"},"underlying":{"issuer":"Space Exploration Technologies Corp., 1 Rocket Road, Starbase, TX 78521, US","isin":"US84615Q1031","symbol":"SPCX","
5name":"Space Exploration Technologies Corporation","moreInfoUrl":"https://www.tradingview.com/symbols/NASDAQ-SPCX/"},"serviceProviders":{"tokenizer":"Backed Finance AG","broker":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"custodian":["Alpaca Securities LLC","InCore Bank AG","Maerki Baumann & Co. AG"],"securityAgent":"Security Agent Services AG"},"downloads":[{"label":"Key Information Document","url":"https://assets.backed.fi/products/spacex-xstock"}],"generatedAt":"2026-06-16T12:40:54.292Z"}}')},621725,25690,e=>{"use strict";var t=e.i(210457);e.i(4977);let r=e.i(70916).default;e.s(["STATIC_XSTOCK_PRODUCT_DETAILS",0,r,"getStaticXStockProductDetails",0,e=>{if(!e)return null;let t=r[e];return!t||t&&"object"==typeof t&&"skipped"in t&&!0===t.skipped?null:t}],25690);var n=e.i(377010);let i=/[-/_]/,a={},o={aal:"American Airlines",adbe:"Adobe",agg:"iShares Core U.S. Bond ETF",amat:"Applied Materials",amc:"AMC Entertainment",amd:"Advanced Micro Devices",apld:"Applied Digital",apo:"Apollo Global Management",arm:"Arm Holdings",axp:"American Express",baba:"Alibaba",bbai:"BigBear.ai",binc:"iShares Flexible Income ETF",bmnr:"BitMine",bno:"U.S. Brent Oil Fund",crcl:"Circle",ibit:"iShares Bitcoin Trust",mrvl:"Marvell Technology",msft:"Microsoft",mu:"Micron Technology",pltr:"Palantir",spcx:"SpaceX",spy:"SPDR S&P 500 ETF",tsm:"TSMC"},s=e=>{let t=e?.split(i)[0]?.trim()??"";return(0,n.getProviderNeutralAssetSymbol)(t)},A=(e,r)=>{let n=s(e).toLowerCase();return o[n]??r?.trim()??(e=>{if(!e)return"";let r=o[e];if(r)return r;let n=t.INSTRUMENT_BASE_SEARCH_ALIASES[e]?.[0];return n?n.charAt(0).toUpperCase()+n.slice(1):e.toUpperCase()})(n)},l=e=>{let r=s(e),n=r.toLowerCase(),i=e?(0,t.getInstrumentMetadata)(e):void 0,o=r?a[n]??r:e?.trim()??"";return{assetSymbol:e?.trim()??"",normalizedSymbol:n,shortName:o,friendlyName:A(e,i?.friendlyName)}};e.s(["getAssetDisplayInfo",0,l,"getInstrumentDisplayInfo",0,(e,r)=>{let i=e?(0,t.getInstrumentMetadata)(e):void 0,a=l(e),o=r?(0,n.getProviderNeutralAssetSymbol)(r):void 0;return{instrumentName:e?.trim()??"",baseSymbol:a.shortName,shortName:o||i?.displayName||a.short
5Name||e||"",friendlyName:a.friendlyName}},"getInstrumentFriendlyName",0,A],621725)},744048,432940,591647,458397,449343,63951,306158,987812,567225,53151,794406,e=>{"use strict";var t=e.i(474076),r=e.i(500932);e.i(485653);var n=e.i(322351),i=e.i(271165),a=e.i(914290),o=e.i(709643),s=e.i(75581),A=e.i(838456),l=e.i(18214),c=e.i(782904),d=e.i(954512),u=e.i(302682),h=e.i(166107),p=e.i(81121);e.i(992550);var m=e.i(407585);e.i(614271);var f=e.i(901358),g=e.i(206242),y=e.i(77744),b=e.i(508561),x=e.i(344873),w=e.i(271645),v=e.i(346944),C=e.i(268407),B=e.i(459615),S=e.i(126996),k=e.i(424475),E=e.i(618566),F=e.i(143813),T=e.i(501238),U=e.i(986882),I=e.i(210457),Q=e.i(840437),j=e.i(621725);let L=e=>Number(e.replaceAll(",","")),_=(e,t)=>(0,x.formatNumber)(e,{useTickSize:!0,instrument_name:t,useGrouping:!1}),P=(e,t)=>(0,x.formatNumber)(e,{useContractSize:!0,instrument_name:t,useGrouping:!1,floor:!0});e.i(842917);var D=e.i(536387),R=e.i(57144);let M=["$","%"],O=(e,t)=>Number.isFinite(e)?(0,x.formatNumber)(e,{useTickSize:!0,instrument_name:t,useGrouping:!1}):"",N=(e,t)=>{if(!Number.isFinite(e))return NaN;let r=Number(O(e,t));return Number.isFinite(r)?r:e},H=e=>{if(!Number.isFinite(e))return"";let t=e.toFixed(2);return"-0.00"===t?"0.00":t},V=(e,t)=>e?"price":t?"gain":null;e.s(["TPSL_BASE_UNITS",0,M,"useTPSL",0,e=>{let t,n,i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,v,B,S,k,E,T,U,I,Q,j,L,_,P,D,M,K,G,W,z,$,q,X,Y,J,Z,ee,et,er,en,ei,ea,eo,es,eA=(0,r.c)(215),{side:el,basePrice:ec,leverage:ed,orderSize:eu,instrumentName:eh,tpOrderPlacedPrice:ep,slOrderPlacedPrice:em,initialTpPrice:ef,initialTpGain:eg,initialSlPrice:ey,initialSlGain:eb,initialBaseUnit:ex,initialConfigureAmount:ew,initialConfiguredAmount:ev,initialConfiguredAmountSlider:eC,initialUseLimitPrice:eB,initialTpLimitPrice:eS,initialSlLimitPrice:ek,onCancelTPOrder:eE,onCancelSLOrder:eF}=e,eT=void 0===ef?"":ef,eU=void 0===eg?"":eg,eI=void 0===ey?"":ey,eQ=void 0===eb?"":eb,[ej,eL]=(0,w.useState)(eT),[e_,eP]=(0,w.useState)(eU),[eD,eR]=(0,w.useState)(eI),[eM,eO]=(0,w.useState)(eQ);eA[0]!==eU||eA[1]!==eT?(t=V(eT,eU),eA[0]=eU,eA[1]=eT,eA[2]=t):t=eA[2];let[eN,eH]=(0,w.useState)(t);eA[3]!==eQ||eA[4]!==eI?(n=V(eI,eQ),eA[3]=eQ,eA[4]=eI,eA[5]=n):n=eA[5];let[eV,eK]=(0,w.useState)(n),[eG,eW]=(0,w.useState)(void 0===ex?"%":ex),[ez,e$]=(0,w.useState)(void 0!==ew&&ew),[eq,eX]=(0,w.useState)(void 0===ev?"":ev),[eY,eJ]=(0,w.useState)(void 0===eC?0:eC),[eZ,e0]=(0,w.useState)(void 0!==eB&&eB),[e1,e2]=(0,w.useState)(void 0===eS?"":eS),[e4,e3]=(0,w.useState)(void 0===ek?"":ek),e5=el?"b"===el:(0,F.safeFloat)(eu??0)>0,e6=Math.abs((0,F.safeFloat)(eu??0)*ec);eA[6]!==eu?(i=Math.abs((0,F.safeFloat)(eu??0)),eA[6]=eu,eA[7]=i):i=eA[7];let e8=i;eA[8]!==eh?(a=eh?.split("-")[0]??"",eA[8]=eh,eA[9]=a):a=eA[9];let e7=a;eA[10]!==eh?(o=e=>eh?e.instruments[eh]?.tick_size:void 0,eA[10]=eh,eA[11]=o):o=eA[11];let e9=(0,C.useTradingDataStore)(o);eA[12]!==eh?(s=e=>eh?e.instruments[eh]?.lot_size:void 0,eA[12]=eh,eA[13]=s):s=eA[13];let te=(0,C.useTradingDataStore)(s);eA[14]!==e9?(A=(0,R.getStepDecimalCount)(e9),eA[14]=e9,eA[15]=A):A=eA[15];let tt=A;eA[16]!==te?(l=(0,R.getStepDecimalCount)(te),eA[16]=te,eA[17]=l):l=eA[17];let tr=l,tn="$"===eG?1:1/10**R.QUOTE_MODE_MAX_DECIMALS,ti="$"===eG?0:R.QUOTE_MODE_MAX_DECIMALS;eA[18]!==ec||eA[19]!==e5||eA[20]!==e6?(c=e=>{if(!ec)return 0;let t=e-ec;if(e6&&e6>0){let e=t/ec*e6;return e5?e:-e}return t*(e5?1:-1)},eA[18]=ec,eA[19]=e5,eA[20]=e6,eA[21]=c):c=eA[21];let ta=c;eA[22]!==ec||eA[23]!==e5||eA[24]!==ed?(d=e=>ec&&ed?(e-ec)/ec*100*ed*(e5?1:-1):0,eA[22]=ec,eA[23]=e5,eA[24]=ed,eA[25]=d):d=eA[25];let to=d;eA[26]!==ec||eA[27]!==e5||eA[28]!==e6?(u=e=>{if(!ec)return ec;if(e6&&e6>0){let t=e/e6*ec*(e5?1:-1);return ec+t}return ec+e*(e5?1:-1)},eA[26]=ec,eA[27]=e5,eA[28]=e6,eA[29]=u):u=eA[29];let ts=u;eA[30]!==ec||eA[31]!==e5||eA[32]!==ed?(h=e=>ec&&ed?ec*(1+e/ed*(e5?1:-1)/100):ec,eA[30]=ec,eA[31]=e5,eA[32]=ed,eA[33]=h):h=eA[33];let tA=h;eA[34]!==ec||eA[35]!==ta||eA[36]!==to||eA[37]!==eh?(p=(e,t,r)=>{let n=(0,F.safeFloat)(r??0);if(!ec||!n)return"";let i=N(n,eh);if(!Number.isFinite(i)||!i)return"";let a="sl"===e?-1:1;return"$"===t?H(ta(i)*a):H(to(i)*a)},eA[34]=ec,eA[35]=ta,eA[36]=to,eA[37]=eh,eA[38]=p):p=eA[38];let tl=p;eA[39]!==ec||eA[40]!==eG||eA[41]!==ta||eA[42]!==to||eA[43]!==e9||eA[44]!==tt?(m=(e,t)=>{let r=(0,R.getValidatedStepInput)({value:t,maxDecimals:tt,step:e9,stripCommas:!0});if(null===r)return;let n="tp"===e?eL:eR,i="tp"===e?eP:eO;if(("tp"===e?eH:eK)("price"),""===r||"."===r||r.endsWith(".")){n(r),i("");return}let a=(0,F.safeFloat)(r);if(!ec||!a){n(r),i("");return}let o="sl"===e?-1:1;if("$"===eG){let e=ta(a);n(r),i(H(e*o));return}let s=to(a);n(r),i(H(s*o))},eA[39]=ec,eA[40]=eG,eA[41]=ta,eA[42]=to,eA[43]=e9,eA[44]=tt,eA[45]=m):m=eA[45];let tc=m;eA[46]!==ec||eA[47]!==eG||eA[48]!==ts||eA[49]!==tA||eA[50]!==ti||eA[51]!==tn||eA[52]!==eh?(f=(e,t)=>
5{let r=(0,R.getValidatedStepInput)({value:t,maxDecimals:ti,step:tn,stripCommas:!0});if(null===r)return;let n="tp"===e?eL:eR,i="tp"===e?eP:eO;if(("tp"===e?eH:eK)("gain"),""===r||"."===r||r.endsWith(".")){i(r),n("");return}let a=(0,F.safeFloat)(r);if(!ec||null==a){i(r),n("");return}let o=a*("sl"===e?-1:1),s=O("$"===eG?ts(o):tA(o),eh);i(r),n(s)},eA[46]=ec,eA[47]=eG,eA[48]=ts,eA[49]=tA,eA[50]=ti,eA[51]=tn,eA[52]=eh,eA[53]=f):f=eA[53];let td=f;eA[54]!==tl||eA[55]!==eD||eA[56]!==ej?(g=e=>{eW(e),eP(tl("tp",e,ej)),eO(tl("sl",e,eD)),eH("price"),eK("price")},eA[54]=tl,eA[55]=eD,eA[56]=ej,eA[57]=g):g=eA[57];let tu=g;eA[58]===Symbol.for("react.memo_cache_sentinel")?(y=e=>{"tp"===e?eH("price"):eK("price")},eA[58]=y):y=eA[58];let th=y;eA[59]===Symbol.for("react.memo_cache_sentinel")?(b=e=>{"tp"===e?eH("gain"):eK("gain")},eA[59]=b):b=eA[59];let tp=b;eA[60]!==ec||eA[61]!==ts||eA[62]!==tA||eA[63]!==eh?(v=(e,t,r)=>{if(""===r||"."===r||r.endsWith("."))return"";let n=(0,F.safeFloat)(r);if(!ec||null==n)return"";let i=n*("sl"===e?-1:1);return O("$"===t?ts(i):tA(i),eh)},eA[60]=ec,eA[61]=ts,eA[62]=tA,eA[63]=eh,eA[64]=v):v=eA[64];let tm=v;if(eA[65]!==eG||eA[66]!==tl||eA[67]!==tm||eA[68]!==eM||eA[69]!==eV||eA[70]!==eD||eA[71]!==e_||eA[72]!==eN||eA[73]!==ej?(B=()=>{let e=(e,t,r,n,i,a)=>{if(!t)return;if("price"===t){let t=tl(e,eG,r);n!==t&&a(t);return}let o=tm(e,eG,n);r!==o&&i(o)};e("tp",eN,ej,e_,eL,eP),e("sl",eV,eD,eM,eR,eO)},eA[65]=eG,eA[66]=tl,eA[67]=tm,eA[68]=eM,eA[69]=eV,eA[70]=eD,eA[71]=e_,eA[72]=eN,eA[73]=ej,eA[74]=B):B=eA[74],eA[75]!==ec||eA[76]!==eG||eA[77]!==e5||eA[78]!==ed||eA[79]!==tl||eA[80]!==tm||eA[81]!==eM||eA[82]!==eV||eA[83]!==eD||eA[84]!==e_||eA[85]!==eN||eA[86]!==ej?(S=[ec,ed,e5,eG,ej,e_,eD,eM,eN,eV,tl,tm],eA[75]=ec,eA[76]=eG,eA[77]=e5,eA[78]=ed,eA[79]=tl,eA[80]=tm,eA[81]=eM,eA[82]=eV,eA[83]=eD,eA[84]=e_,eA[85]=eN,eA[86]=ej,eA[87]=S):S=eA[87],(0,w.useEffect)(B,S),eA[88]!==ec||eA[89]!==eG||eA[90]!==ta||eA[91]!==to||eA[92]!==eh||eA[93]!==ep||eA[94]!==ej){e:{let e=(0,F.safeFloat)(ep??ej);if(!ec||!e){k=void 0;break e}let t=N(e,eh);if(!Number.isFinite(t)||!t){k=void 0;break e}if("$"===eG){let e=ta(t);k=(0,x.formatNumber)(e,{currency:"$",decimals:0,useGrouping:!0});break e}let r=to(t);k=(0,x.formatNumber)(r,{isPercentage:!0,decimals:0,useGrouping:!1})}eA[88]=ec,eA[89]=eG,eA[90]=ta,eA[91]=to,eA[92]=eh,eA[93]=ep,eA[94]=ej,eA[95]=k}else k=eA[95];let tf=k;if(eA[96]!==ec||eA[97]!==eG||eA[98]!==ta||eA[99]!==to||eA[100]!==eh||eA[101]!==em||eA[102]!==eD){t:{let e=(0,F.safeFloat)(em??eD);if(!ec||!e){E=void 0;break t}let t=N(e,eh);if(!Number.isFinite(t)||!t){E=void 0;break t}if("$"===eG){let e=ta(t);E=(0,x.formatNumber)(e,{currency:"$",decimals:0,useGrouping:!0});break t}let r=to(t);E=(0,x.formatNumber)(r,{isPercentage:!0,decimals:0,useGrouping:!1})}eA[96]=ec,eA[97]=eG,eA[98]=ta,eA[99]=to,eA[100]=eh,eA[101]=em,eA[102]=eD,eA[103]=E}else E=eA[103];let tg=E,ty=e8>0?e8/100:1e-4;eA[104]!==e8?(T=e8>0?Array.from({length:6},(e,t)=>({value:t/5*e8})):[],eA[104]=e8,eA[105]=T):T=eA[105];let tb=T;eA[106]!==tb||eA[107]!==e8||eA[108]!==ty?(U={min:0,max:e8,step:ty,marks:tb},eA[106]=tb,eA[107]=e8,eA[108]=ty,eA[109]=U):U=eA[109];let tx=U;eA[110]!==eh||eA[111]!==e8?(I=e=>{let t=Math.min(e8,Math.max(0,e));eJ(t),eX((0,x.formatNumber)(t,{useContractSize:!0,instrument_name:eh,preserveDecimalString:!0}))},eA[110]=eh,eA[111]=e8,eA[112]=I):I=eA[112];let tw=I;eA[113]!==tr||eA[114]!==te||eA[115]!==e8?(Q=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:tr,step:te});if(null===t)return;eX(t);let r=(0,F.safeFloat)(t);r>=0&&eJ(Math.min(e8,Math.max(0,r)))},eA[113]=tr,eA[114]=te,eA[115]=e8,eA[116]=Q):Q=eA[116];let tv=Q;eA[117]===Symbol.for("react.memo_cache_sentinel")?(j=e=>{e$(e),e||(eX(""),eJ(0))},eA[117]=j):j=eA[117];let tC=j;eA[118]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{e0(e),e||(e2(""),e3(""))},eA[118]=L):L=eA[118];let tB=L;eA[119]!==e9||eA[120]!==tt?(_=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:tt,step:e9,stripCommas:!0});null!==t&&e2(t)},eA[119]=e9,eA[120]=tt,eA[121]=_):_=eA[121];let tS=_;eA[122]!==e9||eA[123]!==tt?(P=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:tt,step:e9,stripCommas:!0});null!==t&&e3(t)},eA[122]=e9,eA[123]=tt,eA[124]=P):P=eA[124];let tk=P;eA[125]!==eh||eA[126]!==e5?(D=(e,t)=>{let r=void 0===t?.06:t,n=Number(e);if(!Number.isFinite(n)||n<=0)return e;let i=e5?1-r:1+r;return(0,x.formatNumber)(n*i,{useTickSize:!0,instrument_name:eh,useGrouping:!1,preserveDecimalString:!0})},eA[125]=eh,eA[126]=e5,eA[127]=D):D=eA[127];let tE=D;eA[128]!==ez||eA[129]!==eq||eA[130]!==eh?(M=e=>ez&&eq?(0,x.formatNumber)(eq,{useContractSize:!0,instrument_name:eh,useGrouping:!1,preserveDecimalString:!0}):"string"==typeof e?String(Math.abs(Number(e))):String(Math.abs(e)),eA[128]=ez,eA[129]=eq,eA[130]=eh,eA[131]=M):M=eA[131];let tF=M;eA[132]!==tc?(K=e=>tc("tp",e),eA[132]=tc,eA[133]=K):K=eA[133],eA[134]!==td?(G=e=>td("tp",e),eA[134]=td,eA[135]=G):G=eA[135],eA[136]===Symbol.for("react.memo_cache_sentinel")?(W=()=>th("tp"),z=()=>tp("tp"),eA[136]=W,eA[137]=z):(W=eA[136],z=eA[137]),eA[138]!==eG||eA[139]!==tf||eA[140]!==tu||eA[141]!==eE||eA[142]!==K||eA[143]!==G||eA[144]!==e_||eA[145]!==ep||eA[146]!==ej?($={title:"Take Profit Price",price:ej,gain:e_,baseUnit:eG,pricePlaceholder:"TP Price",gainPlaceholder:"Profit",isStopLoss:!1,placedPrice:ep,expectedGain:tf,onPriceChange:K,onGainChange:G,onPriceFocus:W,onGainFocus:z,onUnitChange:tu,cancelOrder:eE},eA[138]=eG,eA[139]=tf,eA[140]=tu,eA[141]=eE,eA[142]=K,eA[143]=G,eA[144]=e_,eA[145
5]=ep,eA[146]=ej,eA[147]=$):$=eA[147];let tT=$;eA[148]!==tc?(q=e=>tc("sl",e),eA[148]=tc,eA[149]=q):q=eA[149],eA[150]!==td?(X=e=>td("sl",e),eA[150]=td,eA[151]=X):X=eA[151],eA[152]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>th("sl"),J=()=>tp("sl"),eA[152]=Y,eA[153]=J):(Y=eA[152],J=eA[153]),eA[154]!==eG||eA[155]!==tg||eA[156]!==tu||eA[157]!==eF||eA[158]!==eM||eA[159]!==em||eA[160]!==eD||eA[161]!==q||eA[162]!==X?(Z={title:"Stop Loss Price",price:eD,gain:eM,baseUnit:eG,pricePlaceholder:"SL Price",gainPlaceholder:"Loss",isStopLoss:!0,placedPrice:em,expectedGain:tg,onPriceChange:q,onGainChange:X,onPriceFocus:Y,onGainFocus:J,onUnitChange:tu,cancelOrder:eF},eA[154]=eG,eA[155]=tg,eA[156]=tu,eA[157]=eF,eA[158]=eM,eA[159]=em,eA[160]=eD,eA[161]=q,eA[162]=X,eA[163]=Z):Z=eA[163];let tU=Z;eA[164]!==eY||eA[165]!==tw||eA[166]!==tx.marks||eA[167]!==tx.max||eA[168]!==tx.min||eA[169]!==tx.step?(ee={value:eY,min:tx.min,max:tx.max,step:tx.step,marks:tx.marks,onChange:tw},eA[164]=eY,eA[165]=tw,eA[166]=tx.marks,eA[167]=tx.max,eA[168]=tx.min,eA[169]=tx.step,eA[170]=ee):ee=eA[170],eA[171]!==e7||eA[172]!==ez||eA[173]!==eq||eA[174]!==tv||eA[175]!==ee?(et={enabled:ez,onToggle:tC,slider:ee,amount:eq,onAmountChange:tv,baseCurrency:e7},eA[171]=e7,eA[172]=ez,eA[173]=eq,eA[174]=tv,eA[175]=ee,eA[176]=et):et=eA[176];let tI=et;eA[177]!==tk||eA[178]!==tS||eA[179]!==e4||eA[180]!==e1||eA[181]!==eZ?(er={enabled:eZ,onToggle:tB,tpLimitPrice:e1,onTpLimitPriceChange:tS,slLimitPrice:e4,onSlLimitPriceChange:tk},eA[177]=tk,eA[178]=tS,eA[179]=e4,eA[180]=e1,eA[181]=eZ,eA[182]=er):er=eA[182];let tQ=er;return eA[183]!==tI||eA[184]!==tQ||eA[185]!==tU||eA[186]!==tT?(en={tpInput:tT,slInput:tU,configureAmount:tI,limitPrice:tQ},eA[183]=tI,eA[184]=tQ,eA[185]=tU,eA[186]=tT,eA[187]=en):en=eA[187],eA[188]!==e7||eA[189]!==eG||eA[190]!==ez||eA[191]!==eq||eA[192]!==eY||eA[193]!==eM||eA[194]!==e4||eA[195]!==em||eA[196]!==eD||eA[197]!==e_||eA[198]!==e1||eA[199]!==ep||eA[200]!==ej||eA[201]!==eZ?(ei={tpPrice:ej,tpGain:e_,slPrice:eD,slGain:eM,baseUnit:eG,configureAmount:ez,configuredAmount:eq,configuredAmountSlider:eY,useLimitPrice:eZ,tpLimitPrice:e1,slLimitPrice:e4,baseCurrency:e7,tpOrderPlacedPrice:ep,slOrderPlacedPrice:em},eA[188]=e7,eA[189]=eG,eA[190]=ez,eA[191]=eq,eA[192]=eY,eA[193]=eM,eA[194]=e4,eA[195]=em,eA[196]=eD,eA[197]=e_,eA[198]=e1,eA[199]=ep,eA[200]=ej,eA[201]=eZ,eA[202]=ei):ei=eA[202],eA[203]!==tg||eA[204]!==tf||eA[205]!==e8?(ea={expectedProfit:tf,expectedLoss:tg,maxPositionSize:e8},eA[203]=tg,eA[204]=tf,eA[205]=e8,eA[206]=ea):ea=eA[206],eA[207]!==tE||eA[208]!==tF?(eo={calculateOrderPriceFromTrigger:tE,getOrderSizeForPlacement:tF},eA[207]=tE,eA[208]=tF,eA[209]=eo):eo=eA[209],eA[210]!==en||eA[211]!==ei||eA[212]!==ea||eA[213]!==eo?(es={ui:en,state:ei,derived:ea,helpers:eo},eA[210]=en,eA[211]=ei,eA[212]=ea,eA[213]=eo,eA[214]=es):es=eA[214],es}],432940);let K="Only reduce-only orders are available during the wind-down.",G=(e,t,r,n,i)=>{let a=(0,I.getInstrumentMetadata)(t);"spot"!==i&&("SILVER-PERP"===t||"GOLD-PERP"===t?n=Math.min(n,2):("Commodities"===a.category||"FX"===a.category||"Stocks"===a.category||"Pre-IPO"===a.category||"Metals"===a.category)&&(n=Math.min(n,2.8)));let o=(0,F.getReferencePrice)(e,i),s=Math.min(n,99)/100*o,A=(0,x.formatNumber)(o+s,{useTickSize:!0,instrument_name:t,useGrouping:!1}),l=(0,x.formatNumber)(Math.max(o-s,.01*o),{useTickSize:!0,instrument_name:t,useGrouping:!1});return"b"===r?A:l},W=(e,{defaultReduceOnly:t=!1,localLimitState:r=!1,defaultSide:n="b",orderSizeMode:i,setOrderSizeMode:a,preserveSizeOnModeChange:o=!0,clipSizeToMax:s=!0,isMarketClose:A=!1,isPositionClose:l=!1}={})=>{let{orderTypePersist:c,setorderTypePersist:d,reduceOnlyPersist:u,postOnlyPersist:h,timeInForcePersist:p,setreduceOnlyPersist:m,setpostOnlyPersist:f,settimeInForcePersist:g,orderSizeMode:y,setOrderSizeMode:b,maxSlippage:I}=(0,C.useTradingPreferencesStore)(),R=i??y,M=a??b,[O,N]=(0,w.useState)("b"===n?"buy":"sell"),{selectedInstrument:H,tickers:V,instruments:W}=(0,C.useTradingDataStore)((0,v.useShallow)(e=>({selectedInstrument:e.selectedInstrument,tickers:e.tickers,instruments:e.instruments})));e||(e=H);let{accountSummary:z,leverage:$,positions:q,userFees:X,getFeeRatesRaw:Y}=(0,C.useUserTradingDataStore)((0,v.useShallow)(e=>({accountSummary:e.accountSummary,leverage:e.leverage,positions:e.positions,userFees:e.userFees,getFeeRatesRaw:e.getFeeRatesRaw}))),{updatePendingStatusOrders:J}=(0,C.useUserTradingDataStore)((0,v.useShallow)(e=>({updatePendingStatusOrders:e.updatePendingStatusOrders}))),Z=(0,E.usePathname)(),ee=e?V[e]:void 0,et=e?W[e]:void 0,er=Object.values(q).find(t=>t.instrument===e),en=$[e]?.leverage??1,[ei,ea]=et?.price_index?.split("/")??[],eo=et?.kind,es=ea??"USDC",eA=ei??"BTC",el="spot"===eo?(0,j.getAssetDisplayInfo)(es).shortName:es,ec="spot"===eo?(0,j.getAssetDisplayInfo)(eA).short
5Name:eA,ed="quote"===R?el:ec,eu=(0,w.useMemo)(()=>[el,ec],[ec,el]),eh=er?Number(er.leverage):en,ep=et?(0,F.getBalance)(eo,et.price_index,"buy"===O?"b":"s",z):0,em=(0,F.getReferencePrice)(ee,eo),ef=(0,C.useOrderbookDataStore)(t=>e?t.orderbooks[e]:void 0),[eg,ey]=(0,w.useState)(t||u||D.PERPS_REDUCE_ONLY_MODE&&"perps"===eo),[eb,ex]=(0,w.useState)(h),[ew,ev]=(0,w.useState)(l?"GTC":p),[eC,eB]=(0,w.useState)(!1),[eS,ek]=(0,w.useState)(null),[eE,eF]=(0,w.useState)(""),[eT,eU]=(0,w.useState)(""),[eI,eQ]=(0,w.useState)(""),[ej,eL]=(0,w.useState)(""),[e_,eP]=(0,w.useState)("%"),{effectiveSlippage:eD}=(0,Q.useSpotSlippage)(e??""),eR="spot"===eo?eD:I,eM=(0,w.useCallback)((e,t)=>eR,[ef,ee,eR]),eO=(0,w.useCallback)((t,r)=>{let n=r?eM(t,r):eR;return G(ee,e,t,n,eo)},[ee,e,eR,eM,eo]),eN=Number(er?.size??0),eH=eN>0&&"sell"===O||eN<0&&"buy"===O,eV=(eg&&eH||l)&&er?Math.abs(eN):0,eK=(eg||l)&&eN>=0,eG=(eg||l)&&eN<=0,{placeOrder:eW,placeOrders:ez,placeTWAPOrder:e$}=(0,S.useTradeActions)(),{limitPrice:eq,error:eX,handleLimitPriceChange:eY,handleGetMidPrice:eJ}=(0,k.useLimitPrice)({instrumentName:e,ticker:ee,localLimitState:r}),eZ="market"===c?Number(eO("buy"===O?"b":"s")):Number(String(eq)?.replaceAll(",","")??0),e0=("spot"===eo&&et?.stable_pair)??!1,e1=Y("perps"===eo?"perps":"spot",X,e0,et?.growth_mode??!1),e2="market"===c?e1.takerRate:e1.makerRate,e4="market"===c?em:eZ,e3="spot"===eo&&"market"===c?eZ:e4,e5=(eg||l)&&et?.kind!=="spot"?"quote"===R?eV*e4:eV:((e,t,r,n,i,a,o,s)=>{let A=0,l="spot"===a&&"s"===o,c=A="quote"===n?l?t*e*r:t*r:l?t*r:t/e*r;if(void 0!==s){let e=A*Math.abs(s)/100;c=A-e}return Number((0,x.formatNumber)(c,{useContractSize:!0,instrument_name:i??"",useGrouping:!1,floor:!0}))})(e3,ep,eh,R,e,eo,"buy"===O?"b":"s",e2),e6=(0,w.useMemo)(()=>{if("spot"===eo||eg||l)return e5;let t="market"===c,r="quote"===R?e5/eZ:e5,n=em||eZ,i=t?n:eZ,a=t?n:eZ,o=+(0,U.getMaxValidSizeForLiquidation)(z,e,em,i,a,eh,t,et?.margin_tiers??[],r,(e,r)=>t&&em||eZ);return"quote"===R?o*eZ:o},[eo,eg,l,e5,c,eZ,R,z,e,em,eh,et?.margin_tiers,eO]),{orderSize:e8,orderSizeSlider:e7,handleOrderSizeChange:e9,handleOrderSizeSliderChange:te}=(0,T.useOrderSize)({instrumentName:e,maxSize:e6??0,price:eZ,isPositionClose:l,tab:"buy"===O?"b":"s",orderSizeMode:R,preserveSizeOnModeChange:o,clipSizeToMax:s}),tt=Number(e8)>0&&Number(e8)>(e6??0),tr="base"===R?(0,x.formatNumber)(Number(e8),{useContractSize:!0,instrument_name:e,useGrouping:!1,preserveDecimalString:!0,floor:!0}):(0,x.formatNumber)(Number(e8)/e3,{useContractSize:!0,instrument_name:e,useGrouping:!1,preserveDecimalString:!0,floor:!0}),tn="base"===R?tr:em>0?(0,x.formatNumber)(Number(e8)/em,{useContractSize:!0,instrument_name:e,useGrouping:!1,preserveDecimalString:!0,floor:!0}):"0",ti="market"===c?em:eZ,{longLiquidationPrice:ta}="spot"===eo?{longLiquidationPrice:0}:(0,U.getLiquidationPrice)(z,e,Number(tr),em,ti,eh,!1,et?.margin_tiers??[]),{shortLiquidationPrice:to}="spot"===eo?{shortLiquidationPrice:0}:(0,U.getLiquidationPrice)(z,e,Number(tr),em,ti,eh,!1,et?.margin_tiers??[]),ts=(0,w.useMemo)(()=>A?er?null:"Position no longer exists":null,[A,er]),tA=(0,w.useMemo)(()=>et?null:"Instrument not found",[et]),tl=D.PERPS_REDUCE_ONLY_MODE&&"perps"===eo&&!eg?K:null,tc={liquidationPriceLong:ta.toString(),liquidationPriceShort:to.toString(),orderValue:"quote"===R?(0,x.formatNumber)(Number(e8),{decimals:2}):(0,x.formatNumber)(Number(e8)*e3,{decimals:2}),marginRequired:"quote"===R?(0,x.formatNumber)(Number(e8)/Number(eh),{decimals:2}):(0,x.formatNumber)(Number(e8)/Number(eh)*e3,{decimals:2}),baseDenomination:ec,baseOrderSize:tr},td=(0,w.useMemo)(()=>{let e=Number(tr);return!e||e<=0||em<=0?null:(0,B.getEstSlippage)(ef,e,eN>0?"s":"b",em)},[tr,em,ef,eN,I]),tu=(0,w.useCallback)((t,r)=>{if(!r)return{baseSize:"0",error:"Position no longer exists"};let n=Math.abs(Number(r.size??0));return{baseSize:(0,x.formatNumber)(t/100*n,{useContractSize:!0,instrument_name:e??"",useGrouping:!1,preserveDecimalString:!0}),error:null}},[e]),th=(0,w.useCallback)(async(t,r,n)=>{let i;if(D.PERPS_REDUCE_ONLY_MODE&&"perps"===eo&&!eg)return;if(A){let{baseSize:t,error:r}=tu(e7,Object.values(C.useUserTradingDataStore.getState().positions).find(t=>t.instrument===e));if(r)return;i=t}else i=l&&er?(0,x.formatNumber)(Math.abs(Number(er.size))*(e7/100),{useContractSize:!0,instrument_name:e,useGrouping:!1,floor:e7<99.9}):tc.baseOrderSize;if(!Number.isFinite(eZ="market"===r?A?Number(G(ee,e,t,eR,eo)):Number(eO(t,i)):Number(String(eq)?.replaceAll(",","")??0))||eZ<=0)return;let a={timeInForce:"limit"===r?ew:"IOC",reduceOnly:"perps"===eo&&eg,postOnly:"limit"===r&&eb},o=(0,x.formatNumber)(eZ,{useTickSize:!0,instrument_name:e,useGrouping:!1});if(!et)return;ek(t);let s=crypto.randomUUID();J(s),await eW(et.id,t,"BOTH",o,i,"spot"===eo?"GTC":a.timeInForce,a.reduceOnly,a.postOnly,"spot"===eo||"market"===r,s,n,"spot"===eo),ek(null)},[eW,Z,eq,tc.baseOrderSize,ew,et?.id??0,eg,eb,eO,A,l,er?.size,e7,tu,e]),tp=(0,w.useCallback)(async(t,{startPrice
5:r,endPrice:n,totalOrders:i,sizeSkew:a})=>{let o;if(!et||!e)return"Instrument not found";if(D.PERPS_REDUCE_ONLY_MODE&&"perps"===eo&&!eg)return K;let s=Number(String(e8).replaceAll(",","")),A=(r+n)/2,l=ed===ec?s:s/A,c=Number((0,x.formatNumber)(l,{useContractSize:!0,instrument_name:e,useGrouping:!1,floor:!0}));if(!Number.isFinite(c)||c<=0)return"Enter a valid size";try{o=(({instrumentId:e,instrumentName:t,side:r,totalBaseSize:n,startPrice:i,endPrice:a,totalOrders:o,sizeSkew:s,timeInForce:A,reduceOnly:l,postOnly:c=!1,cloidFactory:d})=>{if(!Number.isFinite(n)||n<=0)throw Error("Scale order total size must be greater than 0");if(!Number.isFinite(i)||i<=0)throw Error("Scale order start price must be greater than 0");if(!Number.isFinite(a)||a<=0)throw Error("Scale order end price must be greater than 0");if(!Number.isInteger(o))throw Error("Scale order count must be an integer");if(o<2||o>50)throw Error("Scale order count must be between 2 and 50");if(!Number.isFinite(s)||s<=0)throw Error("Scale order size skew must be greater than 0");let u=((e,t)=>{if(e<=1)return[1];if(1e-12>Math.abs(t-1))return Array.from({length:e},()=>1);let r=t**(1/(e-1));return Array.from({length:e},(e,t)=>r**t)})(o,s),h=u.reduce((e,t)=>e+t,0),p=u.map(e=>n*e/h),m=((e,t,r)=>{if(r<=1)return[e];let n=t-e;return Array.from({length:r},(t,i)=>e+i/(r-1)*n)})(i,a,o),f=[],g=0,y=d??(()=>`scale-${Date.now()}-${Math.random().toString(36).slice(2,12)}`);for(let i=0;i<o;i+=1){let a=Math.max(n-g,0),s=P(i===o-1?a:p[i],t),d=L(s);if(!Number.isFinite(d)||d<=0)throw Error("Scale order size is too small for instrument lot size");let u=_(m[i],t),h=L(u)*d;if(!Number.isFinite(h)||h<10)throw Error("Each scale order must be at least 10 USDC notional");g+=d,f.push({instrumentId:e,side:r,positionSide:"BOTH",price:u,size:s,tif:A,ro:l,po:c,cloid:y(),triggerPx:"",isMarket:!1,tpsl:"",grouping:""})}return f})({instrumentId:et.id,instrumentName:e,side:t,totalBaseSize:c,startPrice:r,endPrice:n,totalOrders:i,sizeSkew:a,timeInForce:"spot"===eo?"GTC":ew,reduceOnly:"perps"===eo&&eg,postOnly:!1,cloidFactory:()=>"u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`cloid-${Date.now()}-${Math.random().toString(36).slice(2,12)}`})}catch(e){return e instanceof Error?e.message:"Failed to generate scale orders"}if(!o.length)return"Failed to generate scale orders";ek(t);try{J(o.map(e=>e.cloid));let e=await ez(o);if(!e.success)return e.error||"Failed to place scale orders";return null}finally{ek(null)}},[et,e,e8,ed,ec,eo,ew,eg,J,ez]);return{orderType:c,setOrderType:d,handleOrderTypeChange:e=>{d(e)},orderSizeDenomination:ed,orderSizeDenominations:eu,handleOrderSizeDenominationChange:e=>{e===el?M("quote"):M("base")},limitPrice:eq,handleLimitPriceChange:eY,handleGetMidPrice:eJ,leverage:eh,orderSize:e8,handleOrderSizeChange:e9,orderSizeSliderValue:e7,handleOrderSizeSliderChange:te,maxSize:e6,handlePlaceOrder:th,handlePlaceScaleOrder:tp,handlePlaceTWAPOrder:(0,w.useCallback)(async(t,{hour:r,minute:n})=>{if(!et||!e)return"Instrument not found";if(D.PERPS_REDUCE_ONLY_MODE&&"perps"===eo&&!eg)return K;let i=3600*r+60*n;if(i>86400||i<300)return"Invalid Duration";if(!Number.isFinite(Number(tn))||0>=Number(tn))return"Enter a valid size";ek(t);try{let e=await e$(et.id,t,"BOTH",tn,"perps"===eo&&eg,i);if(!e.success)return e.error||"Failed to place TWAP order";return null}finally{ek(null)}},[et,e,eo,e$,eg,tn]),reduceOnly:eg,toggleReduceOnlyChange:()=>{let e=!eg;ey(e),m(e)},postOnly:eb,togglePostOnlyChange:()=>{let e=!eb;ex(e),f(e)},timeInForce:ew,handleTimeInForceChange:e=>{let t=e.target.value;ev(t),g(t)},error:tl||eX||ts||tA,orderInfo:tc,twapBaseOrderSize:tn,spotConversionPrice:"spot"===eo?e3:e4,tpSl:eC,toggleTpSlChange:()=>{eB(!eC)},placingOrder:eS,tpPrice:eE,setTpPrice:eF,tpGain:eT,setTpGain:eU,slPrice:eI,setSlPrice:eQ,slGain:ej,setSlGain:eL,baseUnit:e_,setBaseUnit:eP,isBuyDisabled:eK,isSellDisabled:eG,tab:O,setTab:N,maxSlippage:eR,isExceedingMaxSize:tt,estSlippage:td}};e.s(["default",0,W,"getLimitPriceMarket",0,G,"usePlacementOrder",0,W],591647);var z=e.i(632418);let $=e=>{let n,i,a,s,u,h,m,f,y,w,v,C,B,S,k,E,F,T,U,I,Q,j,L=(0,r.c)(105),{title:_,price:P,gain:D,baseUnit:R,pricePlaceholder:O,gainPlaceholder:N,isStopLoss:H,placedPrice:V,expectedGain:K,onPriceChange:G,onGainChange:W,onPriceFocus:$,onGainFocus:q,onUnitChange:Y,cancelOrder:J,minimal:Z,compact:ee,priceError:et}=e,er=void 0!==Z&&Z,en=void 0!==ee&&ee,ei=void 0===et?null:et,ea=(0,d.useTheme)(),eo=(0,o.useTranslations)();if(V){let e,r,n,i,a,o,s,l,d,u,h,p,m,f,g,y,b,w;L[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",justifyContent:"space-between"},L[0]=e):e=L[0],L[1]!==_?(r=(0,t.jsx)(c.Typography,{variant:"body1",color:"textSecondary",children:_}),L[1]=_,L[2]=r):r=L[2],L[3]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",gap:1},L[3]=n):n=L[3],L[4]!==H||L[5]!==eo?(i=H?`${eo("trade.priceBelow")} `:`${eo("trade.priceAbove")} `,L[4]=H,L[5]=eo,L[6]=i):i=L[6],L[7]!==V?(a=(0,x.formatNumber)(V,{useTickSize:!0}),L[7]=V,L[8]=a):a=L[8],L[9]!==i||L[10]!==a?(o=(0,t.jsxs)(c.Typography,{variant:"body1",color:"white",children:[i,a]}),L[9]=i,L[10]=a,L[11]=o):o=L[11],L[12]===Symbol.for("react.memo_cache_sentinel")?(s={cursor:"pointer",transition:"all 0.2s ease","&:hover":{textDecoration:"underline",opacity:.8}},L[12]=s):s=L[12],L[13]!==eo?(l=eo("common.cancel"),L[13]=eo,L[14]=l):l=L[14],L[15]!==J||L[16]!==l?(d=(0,t.jsx)(c.Typography,{onClick:J,variant:"body1",color:"primary",sx:s,children:l}),L[15]=J,L[16]=l,L[17]=d):d=L[17],L[18]!==d||L[19]!==o?(u=(0,t.jsxs)(A.Box,{sx:n,children:[o,d]}),L[18]=d,L[19]=o,L[20]=u):u=L[20],L[21]!==u||L[22]!==r?(h=(0,t.jsxs)(A.Box,{style:e,children:[r,u]}),L[21]=u,L[22]=r,L[23]=h):h=L[23],L[24]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",justifyContent:"flex-end",gap:4},L[24]=p):p=L[24],L[25]!==H||L[26]!==eo?(m=eo(H?"trade.expectedLoss":"trade.expectedProfit"),L[25]=H,L[26]=eo,L[27]=m):m=L[27],L[28]!==m?(f=(0,t.jsxs)(c.Typography,{variant:"body1",color:"textSecondary",children:[m,":"]}
5),L[28]=m,L[29]=f):f=L[29];let v=H?"error.main":"success.main";return L[30]!==v?(g={color:v,fontWeight:500},L[30]=v,L[31]=g):g=L[31],L[32]!==K||L[33]!==g?(y=(0,t.jsx)(c.Typography,{variant:"body1",sx:g,children:K}),L[32]=K,L[33]=g,L[34]=y):y=L[34],L[35]!==f||L[36]!==y?(b=(0,t.jsxs)(A.Box,{style:p,children:[f,y]}),L[35]=f,L[36]=y,L[37]=b):b=L[37],L[38]!==h||L[39]!==b?(w=(0,t.jsxs)(A.Box,{py:.75,display:"flex",flexDirection:"column",gap:1,children:[h,b]}),L[38]=h,L[39]=b,L[40]=w):w=L[40],w}let es=null!=K&&""!==K;L[41]!==ei||L[42]!==ea.vars?(n=ei?{borderColor:"error.main",boxShadow:`0 0 0 1px ${(0,z.varAlpha)(ea.vars.palette.error.mainChannel,.5)}`,"&:hover":{borderColor:"error.main",boxShadow:`0 0 0 1px ${(0,z.varAlpha)(ea.vars.palette.error.mainChannel,.5)}`},"&.Mui-focused":{borderColor:"error.main",boxShadow:`0 0 0 1px ${(0,z.varAlpha)(ea.vars.palette.error.mainChannel,.5)}`}}:void 0,L[41]=ei,L[42]=ea.vars,L[43]=n):n=L[43];let eA=n;L[44]!==en||L[45]!==_?(i=!en&&(0,t.jsx)(c.Typography,{variant:"body1",color:"textSecondary",mb:1,children:_}),L[44]=en,L[45]=_,L[46]=i):i=L[46],L[47]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",gap:1},L[47]=a):a=L[47],L[48]===Symbol.for("react.memo_cache_sentinel")?(s={flex:1,minWidth:0},L[48]=s):s=L[48];let el=ei??"",ec=H?"bottom":"top",ed=!!ei,eu=en?O:void 0,eh=en?void 0:O;L[49]!==G?(u=e=>G(e.target.value),L[49]=G,L[50]=u):u=L[50];let ep=!!ei;L[51]!==en||L[52]!==eA?(h=en?{paddingLeft:0,paddingRight:0,"& .MuiInputAdornment-positionStart":{marginLeft:0,marginRight:0},"& .MuiOutlinedInput-input":{paddingLeft:0,paddingRight:"4px !important"},...eA}:eA,L[51]=en,L[52]=eA,L[53]=h):h=L[53],L[54]!==en||L[55]!==$||L[56]!==P||L[57]!==eu||L[58]!==eh||L[59]!==u||L[60]!==ep||L[61]!==h?(m=(0,t.jsx)(A.Box,{children:(0,t.jsx)(b.default,{fullWidth:!0,compact:en,title:eu,placeholder:eh,value:P,onChange:u,onFocus:$,error:ep,sx:h})}),L[54]=en,L[55]=$,L[56]=P,L[57]=eu,L[58]=eh,L[59]=u,L[60]=ep,L[61]=h,L[62]=m):m=L[62],L[63]!==ed||L[64]!==m||L[65]!==el||L[66]!==ec?(f=(0,t.jsx)(A.Box,{sx:s,children:(0,t.jsx)(p.Tooltip,{title:el,placement:ec,open:ed,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,children:m})}),L[63]=ed,L[64]=m,L[65]=el,L[66]=ec,L[67]=f):f=L[67],L[68]===Symbol.for("react.memo_cache_sentinel")?(y={flex:1,minWidth:0},L[68]=y):y=L[68];let em=en?N:void 0,ef=en?void 0:N;L[69]!==W?(w=e=>W(e.target.value),L[69]=W,L[70]=w):w=L[70],L[71]===Symbol.for("react.memo_cache_sentinel")?(v={"& .MuiInputAdornment-positionStart":{marginLeft:0,marginRight:0},"& .MuiInputAdornment-positionEnd":{marginLeft:0},"& .MuiOutlinedInput-input.MuiInputBase-inputAdornedEnd":{paddingRight:"5px !important"}},L[71]=v):v=L[71];let eg=R||"";L[72]!==Y?(C=e=>Y(e.target.value),L[72]=Y,L[73]=C):C=L[73];let ey=ea.components?.MuiSelect?.defaultProps?.MenuProps;return L[74]===Symbol.for("react.memo_cache_sentinel")?(B={vertical:"bottom",horizontal:"right"},S={vertical:"top",horizontal:"right"},L[74]=B,L[75]=S):(B=L[74],S=L[75]),L[76]!==ey?(k={...ey,anchorOrigin:B,transformOrigin:S},L[76]=ey,L[77]=k):k=L[77],L[78]===Symbol.for("react.memo_cache_sentinel")?(E={cursor:"pointer",paddingLeft:"0px !important","& .MuiSelect-select":{paddingRight:"8px !important"},"& .MuiSelect-icon":{width:12,height:12,top:"calc(50% - 6px)"}},F=M.map(X),L[78]=E,L[79]=F):(E=L[78],F=L[79]),L[80]!==eg||L[81]!==C||L[82]!==k?(T=(0,t.jsx)(g.InputAdornment,{position:"end",children:(0,t.jsx)(l.Select,{value:eg,onChange:C,autoWidth:!0,MenuProps:k,sx:E,children:F})}),L[80]=eg,L[81]=C,L[82]=k,L[83]=T):T=L[83],L[84]!==en||L[85]!==D||L[86]!==q||L[87]!==em||L[88]!==ef||L[89]!==w||L[90]!==T?(U=(0,t.jsx)(A.Box,{sx:y,children:(0,t.jsx)(b.default,{fullWidth:!0,compact:en,title:em,placeholder:ef,value:D,onChange:w,onFocus:q,sx:v,endAdornment:T})}),L[84]=en,L[85]=D,L[86]=q,L[87]=em,L[88]=ef,L[89]=w,L[90]=T,L[91]=U):U=L[91],L[92]!==f||L[93]!==U?(I=(0,t.jsxs)(A.Box,{sx:a,children:[f,U]}),L[92]=f,L[93]=U,L[94]=I):I=L[94],L[95]!==K||L[96]!==H||L[97]!==er||L[98]!==es||L[99]!==eo?(Q=!er&&es&&(0,t.jsxs)(A.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,mt:1},children:[(0,t.jsxs)(c.Typography,{variant:"body1",color:"textSecondary",children:[eo(H?"trade.expectedLoss":"trade.expectedProfit"),":"]}),(0,t.jsx)(c.Typography,{variant:"body1",sx:{color:H?"error.main":"success.main",fontWeight:500},children:K})]}),L[95]=K,L[96]=H,L[97]=er,L[98]=es,L[99]=eo,L[100]=Q):Q=L[100],L[101]!==I||L[102]!==Q||L[103]!==i?(j=(0,t.jsxs)(A.Box,{children:[i,I,Q]}),L[101]=I,L[102]=Q,L[103]=i,L[104]=j):j=L[104],j},q=e=>
5{let n,i,a,s,l=(0,r.c)(19),{tpInput:d,slInput:p,configureAmount:m,limitPrice:f,minimal:x,compact:w,tpError:v,slError:C}=e,B=void 0!==x&&x,S=void 0!==w&&w,k=void 0===v?null:v,E=void 0===C?null:C,F=(0,o.useTranslations)();return l[0]!==S||l[1]!==B||l[2]!==k||l[3]!==d?(n=(0,t.jsx)($,{...d,minimal:B,compact:S,priceError:k}),l[0]=S,l[1]=B,l[2]=k,l[3]=d,l[4]=n):n=l[4],l[5]!==S||l[6]!==B||l[7]!==E||l[8]!==p?(i=(0,t.jsx)($,{...p,minimal:B,compact:S,priceError:E}),l[5]=S,l[6]=B,l[7]=E,l[8]=p,l[9]=i):i=l[9],l[10]!==m||l[11]!==f||l[12]!==B||l[13]!==F?(a=!B&&(0,t.jsxs)(A.Box,{style:{display:"flex",gap:1,flexDirection:"column"},children:[(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(u.FormControlLabel,{control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:m.enabled,onChange:e=>m.onToggle(e.target.checked)}),label:F("trade.configureAmount"),sx:{color:"text.secondary",mb:+!!m.enabled}}),m.enabled&&(0,t.jsxs)(A.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,t.jsx)(y.Slider,{value:m.slider.value,onChange:(e,t)=>m.slider.onChange(Array.isArray(t)?Number(t[0]):Number(t)),max:m.slider.max,min:m.slider.min,step:m.slider.step,marks:m.slider.marks,sx:{flex:1,ml:.8,"& .MuiSlider-track":{backgroundColor:"primary.main"},"& .MuiSlider-markActive":{backgroundColor:"primary.main"}}}),(0,t.jsx)(b.default,{placeholder:F("common.amount"),value:m.amount,onChange:e=>m.onAmountChange(e.target.value),sx:{width:"93px","& .MuiOutlinedInput-input":{paddingRight:0}},endAdornment:(0,t.jsx)(g.InputAdornment,{position:"end",children:(0,t.jsx)(c.Typography,{variant:"body1",color:"textSecondary",children:m.baseCurrency})})})]})]}),(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(u.FormControlLabel,{control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:f.enabled,onChange:e=>f.onToggle(e.target.checked)}),label:F("trade.limitPrice"),sx:{color:"text.secondary",mb:+!!f.enabled}}),f.enabled&&(0,t.jsxs)(A.Box,{sx:{display:"flex",gap:1},children:[(0,t.jsx)(b.default,{placeholder:F("trade.tpLimitPrice"),value:f.tpLimitPrice,onChange:e=>f.onTpLimitPriceChange(e.target.value),sx:{flex:1}}),(0,t.jsx)(b.default,{placeholder:F("trade.slLimitPrice"),value:f.slLimitPrice,onChange:e=>f.onSlLimitPriceChange(e.target.value),sx:{flex:1}})]})]})]}),l[10]=m,l[11]=f,l[12]=B,l[13]=F,l[14]=a):a=l[14],l[15]!==n||l[16]!==i||l[17]!==a?(s=(0,t.jsxs)(t.Fragment,{children:[n,i,a]}),l[15]=n,l[16]=i,l[17]=a,l[18]=s):s=l[18],s};function X(e){return(0,t.jsx)(s.MenuItem,{value:e,disableRipple:!0,children:e},e)}e.s(["TpSl",0,q],458397);var Y=e.i(461342);e.s(["OrderConfig",0,e=>{let n,i,a,g,y,b,x,w,v,C,B,S=(0,r.c)(42),{orderType:k,reduceOnly:E,toggleReduceOnlyChange:F,postOnly:T,togglePostOnlyChange:U,kind:I,timeInForce:Q,handleTimeInForceChange:j,error:L,tpSl:_,toggleTpSlChange:P,tpSlUIBindings:D,tpError:R,slError:M}=e,O=(0,d.useTheme)(),N=(0,o.useTranslations)(),H="limit"===k,V="limit"===k,K="perps"===I,G="perps"===I;return S[0]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",justifyContent:"space-between",alignItems:"center"},S[0]=n):n=S[0],S[1]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",flexDirection:"row",alignItems:"center"},S[1]=i):i=S[1],S[2]!==E||S[3]!==K||S[4]!==N||S[5]!==F?(a=K&&(0,t.jsx)(u.FormControlLabel,{label:N("trade.reduce"),control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:E,onChange:()=>F()}),sx:{color:"text.secondary",my:0}}),S[2]=E,S[3]=K,S[4]=N,S[5]=F,S[6]=a):a=S[6],S[7]!==T||S[8]!==V||S[9]!==N||S[10]!==U?(g=V&&(0,t.jsx)(u.FormControlLabel,{label:N("trade.post"),control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:T,onChange:()=>U()}),sx:{color:"text.secondary",my:0}}),S[7]=T,S[8]=V,S[9]=N,S[10]=U,S[11]=g):g=S[11],S[12]!==a||S[13]!==g?(y=(0,t.jsxs)(A.Box,{sx:i,children:[a,g]}),S[12]=a,S[13]=g,S[14]=y):y=S[14],S[15]!==j||S[16]!==H||S[17]!==N||S[18]!==O||S[19]!==Q?(b=H&&(0,t.jsxs)(l.Select,{value:Q,onChange:j,sx:{},MenuProps:(0,Y.getMenuProps)(O,{vertical:"bottom",horizontal:"right"}),startAdornment:(0,t.jsx)(p.Tooltip,{placement:"left",arrow:!0,title:(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,t.jsx)(c.Typography,{variant:"body1",children:N("GTC"===Q?"trade.goodTillCancel":"trade.immediateOrCancel")}),(0,t.jsx)(c.Typography,{variant:"body1",color:"textSecondary",children:N("GTC"===Q?"trade.gtcDescription":"trade.i
5ocDescription")})]}),children:(0,t.jsx)(m.Iconify,{icon:"eva:info-outline",width:"12",height:"12",sx:{color:"text.secondary",ml:1,mr:-.4,mt:-.125}})}),children:[(0,t.jsx)(s.MenuItem,{value:"GTC",disableRipple:!0,children:"GTC"}),(0,t.jsx)(s.MenuItem,{value:"IOC",disableRipple:!0,children:"IOC"})]}),S[15]=j,S[16]=H,S[17]=N,S[18]=O,S[19]=Q,S[20]=b):b=S[20],S[21]!==y||S[22]!==b?(x=(0,t.jsxs)(A.Box,{sx:n,children:[y,b]}),S[21]=y,S[22]=b,S[23]=x):x=S[23],S[24]!==G||S[25]!==N||S[26]!==P||S[27]!==_?(w=G&&(0,t.jsx)(u.FormControlLabel,{label:N("trade.tpsl"),control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:_,onChange:()=>P(),sx:{xs:.5,md:0}}),sx:{color:"text.secondary",my:0}}),S[24]=G,S[25]=N,S[26]=P,S[27]=_,S[28]=w):w=S[28],S[29]!==G||S[30]!==M||S[31]!==R||S[32]!==_||S[33]!==D?(v=G&&_&&(0,t.jsx)(A.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:(0,t.jsx)(q,{...D,minimal:!0,compact:!0,tpError:R,slError:M})}),S[29]=G,S[30]=M,S[31]=R,S[32]=_,S[33]=D,S[34]=v):v=S[34],S[35]!==L?(C=L&&(0,t.jsx)(f.Error,{error:L}),S[35]=L,S[36]=C):C=S[36],S[37]!==C||S[38]!==x||S[39]!==w||S[40]!==v?(B=(0,t.jsxs)(A.Box,{children:[x,w,v,C]}),S[37]=C,S[38]=x,S[39]=w,S[40]=v,S[41]=B):B=S[41],B}],449343);var J=e.i(304974),Z=e.i(110204);let ee=e=>{let n,i,a,s,l,u,h,p,f,g,y,b,w,v,B,S,k,E=(0,r.c)(37),{instrumentName:F}=e,T=(0,d.useTheme)(),U=(0,o.useTranslations)(),{setModal:I,setPayload:j}=(0,C.useActionStore)(),{mode:L,manualSlippage:_,autoSlippage:P}=(0,Q.useSpotSlippage)(F),D="auto"===L,R=D?P:_;if(E[0]!==R)n=(0,x.formatNumber)(R,{decimals:4,useGrouping:!1,trimTrailingZeros:!0}),E[0]=R,E[1]=n;else n=E[1];let M=n;E[2]!==D||E[3]!==U?(i=D?U("trade.spotSlippageAuto"):"Custom",E[2]=D,E[3]=U,E[4]=i):i=E[4];let O=i;
5E[5]!==F||E[6]!==I||E[7]!==j?(a=()=>{j({instrumentName:F}),I("spot-slippage")},E[5]=F,E[6]=I,E[7]=j,E[8]=a):a=E[8];let N=a;E[9]===Symbol.for("react.memo_cache_sentinel")?(s={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:.5},E[9]=s):s=E[9],E[10]!==U?(l=U("trade.maxSlippage"),E[10]=U,E[11]=l):l=E[11],E[12]!==O?(u=(0,t.jsxs)(c.Typography,{component:"span",variant:"body1",color:"text.primary",children:["(",O,")"]}),E[12]=O,E[13]=u):u=E[13],E[14]!==l||E[15]!==u?(h=(0,t.jsx)(A.Box,{sx:s,children:(0,t.jsxs)(c.Typography,{variant:"body1",color:"textSecondary",children:[l," ",u]})}),E[14]=l,E[15]=u,E[16]=h):h=E[16];let H=h;E[17]!==T.transitions?(p=T.transitions.create(["color"],{duration:150}),E[17]=T.transitions,E[18]=p):p=E[18],E[19]===Symbol.for("react.memo_cache_sentinel")?(f={color:"primary.lighter"},E[19]=f):f=E[19],E[20]!==p?(g={display:"inline-flex",alignItems:"center",gap:.5,cursor:"pointer",color:"text.primary",transition:p,"&:hover":f},E[20]=p,E[21]=g):g=E[21],E[22]===Symbol.for("react.memo_cache_sentinel")?(y={fontVariantNumeric:"tabular-nums",lineHeight:1},E[22]=y):y=E[22],E[23]!==M?(b=(0,t.jsxs)(c.Typography,{variant:"body1",sx:y,children:[M,"%"]}),E[23]=M,E[24]=b):b=E[24],E[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)(m.Iconify,{icon:"material-symbols-light:edit-outline-sharp",width:16,height:16,sx:{color:"inherit"}}),E[25]=w):w=E[25],E[26]!==g||E[27]!==b?(v=(0,t.jsxs)(A.Box,{sx:g,children:[b,w]}),E[26]=g,E[27]=b,E[28]=v):v=E[28];let V=v;return E[29]!==U?(B=U("trade.clickToAdjust"),E[29]=U,E[30]=B):B=E[30],E[31]===Symbol.for("react.memo_cache_sentinel")?(S={display:"flex",alignItems:"center"},E[31]=S):S=E[31],E[32]!==H||E[33]!==N||E[34]!==B||E[35]!==V?(k=(0,t.jsx)(Z.Label,{label:H,value:V,onLabelClick:N,onValueClick:N,tooltip:B,sx:S}),E[32]=H,E[33]=N,E[34]=B,E[35]=V,E[36]=k):k=E[36],k};var et=e.i(772475),er=e.i(139349),en=e.i(624321);function ei(e){return e.userFees}function ea(e){return e.maxSlippage}function eo(e){return e.selectedInstrument}function es(e){return e.orderTypePersist}function eA(e,r){let{label:n,value:i,onValueClick:a,tooltip:o}=e;return(0,t.jsx)(Z.Label,{label:n,value:i,onValueClick:a,tooltip:o},`${n}-${r}`)}e.s(["OrderInfo",0,e=>{let n,i,a,s,l,d,u,h,p,f,g,y,b,w,v,S,k,E,T,U=(0,r.c)(135),{orderInfo:Q,instrument:j,tab:L,invest:_}=e,P=void 0===L?"buy":L,D=(0,o.useTranslations)(),{getFeeRates:R}=(0,C.useUserTradingDataStore)(),{setModal:M}=(0,C.useActionStore)(),O=(0,C.useUserTradingDataStore)(ei),N=(0,C.useTradingPreferencesStore)(ea),H=(0,C.useTradingDataStore)(eo),V=void 0!==_&&_?j?.name??"":H??"";U[0]!==V?(n=e=>V?e.orderbooks[V]:void 0,U[0]=V,U[1]=n):n=U[1];let K=(0,C.useOrderbookDataStore)(n);U[2]!==V?(i=e=>V?e.tickers[V]:void 0,U[2]=V,U[3]=i):i=U[3];let G=(0,C.useTradingDataStore)(i);
5U[4]!==D?(a=D("trade.orderValue"),U[4]=D,U[5]=a):a=U[5],U[6]!==Q.orderValue||U[7]!==a?(s={label:a,value:Q.orderValue},U[6]=Q.orderValue,U[7]=a,U[8]=s):s=U[8];let W=s;U[9]!==D?(l=D("trade.marginRequired"),U[9]=D,U[10]=l):l=U[10],U[11]!==Q.marginRequired||U[12]!==l?(d={label:l,value:Q.marginRequired},U[11]=Q.marginRequired,U[12]=l,U[13]=d):d=U[13];let z=d,$=(0,C.useTradingPreferencesStore)(es),q=(0,et.useActionDisabled)("trading-enabled"),X=(0,er.useUsEquityMarketSession)(),Y=j?.kind;if(!j||!G)return null;if(U[14]!==R||U[15]!==j?.growth_mode||U[16]!==V||U[17]!==q||U[18]!==Y||U[19]!==N||U[20]!==Q.baseOrderSize||U[21]!==Q.liquidationPriceLong||U[22]!==Q.liquidationPriceShort||U[23]!==K||U[24]!==M||U[25]!==D||U[26]!==P||U[27]!==G||U[28]!==O){let e,r,n,i,a,o,s,l,d,w,v,C,S,k,E,T,L,_,H,W,z,$,X,Z,ee,et,er=(0,F.getReferencePrice)(G,Y),en=K?(0,B.getEstSlippage)(K,Q.baseOrderSize,"b",er):null,ei=K?(0,B.getEstSlippage)(K,Q.baseOrderSize,"s",er):null,ea=j?.growth_mode??!1;U[36]!==R||U[37]!==ea||U[38]!==O?(e=R("perps",O,!1,ea),U[36]=R,U[37]=ea,U[38]=O,U[39]=e):e=U[39];let eo=e;U[40]!==R||U[41]!==O?(r=R("perps",O,!1,!1),U[40]=R,U[41]=O,U[42]=r):r=U[42];let es=r;U[43]!==D?(n=D("common.fees"),U[43]=D,U[44]=n):n=U[44],U[45]!==n?(i={label:n,value:"0.1%"},U[45]=n,U[46]=i):i=U[46],g=i,U[47]!==D?(a=D("common.fees"),U[47]=D,U[48]=a):a=U[48],U[49]!==ea||U[50]!==eo||U[51]!==es?(o=ea?(0,t.jsxs)(A.Box,{sx:{display:"inline-flex",flexDirection:"column",alignItems:"flex-end",gap:.5},children:[(0,t.jsx)(c.Typography,{variant:"body1",component:"span",color:"text.secondary",sx:{textDecoration:"line-through"},children:es}),(0,t.jsxs)(A.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,color:"primary.light","&:hover":{color:"primary.lighter"}},children:[(0,t.jsx)(c.Typography,{variant:"body1",component:"span",children:eo}),(0,t.jsx)(J.GrowthModeIndicator,{})]})]}):eo,U[49]=ea,U[50]=eo,U[51]=es,U[52]=o):o=U[52],U[53]!==M?(s=()=>{M("fee-tiers")},U[53]=M,U[54]=s):s=U[54],U[55]!==D?(l=D("trade.clickToViewFeeTiers"),U[55]=D,U[56]=l):l=U[56],U[57]!==a||U[58]!==o||U[59]!==s||U[60]!==l?(d={label:a,value:o,onValueClick:s,tooltip:l},U[57]=a,U[58]=o,U[59]=s,U[60]=l,U[61]=d):d=U[61],h=d;let eA="buy"===P?Q.liquidationPriceLong:Q.liquidationPriceShort;if(U[62]!==V||U[63]!==D||U[64]!==eA){var el;el=D("common.na"),w=!eA||0>=Number(eA)||Number.isNaN(Number(eA))||!Number.isFinite(Number(eA))?el:(0,x.formatNumber)(Number(eA),{instrument_name:V,useTickSize:!0,useGrouping:!1}),U[62]=V,U[63]=D,U[64]=eA,U[65]=w}else w=U[65];let ec=w;U[66]!==D?(v=D("trade.liqPrice"),U[66]=D,U[67]=v):v=U[67],U[68]!==ec||U[69]!==v?(C={label:v,value:ec},U[68]=ec,U[69]=v,U[70]=C):C=U[70],u=C;let ed="buy"===P?en:ei,eu=ed?.slippagePercent?(0,x.formatNumber)(ed.slippagePercent,{decimals:4,useGrouping:!1}):null,eh="spot"===Y;U[71]!==V||U[72]!==eh?(S=eh&&"US_EQUITY"===(0,I.getInstrumentMetadata)(V).marketCalendar,U[71]=V,U[72]=eh,U[73]=S):S=U[73],p=S,U[74]!==N?(k=N?(0,x.formatNumber)(N,{decimals:4,useGrouping:!1}):null,U[74]=N,U[75]=k):k=U[75];let ep=k;U[76]!==D?(E=D("trade.slippage"),U[76]=D,U[77]=E):E=U[77],U[78]!==q?(T=q&&{opacity:.5},U[78]=q,U[79]=T):T=U[79],U[80]===Symbol.for("react.memo_cache_sentinel")?(L={color:"primary.lighter"},U[80]=L):L=U[80],U[81]!==T?(_={display:"flex",alignItems:"center",gap:.5,color:"primary.light",...T,"&:hover":L},U[81]=T,U[82]=_):_=U[82],U[83]!==D?(H=D("trade.est"),U[83]=D,U[84]=H):H=U[84],U[85]!==ep||U[86]!==D?(W=ep?`${ep}%`:D("common.na"),U[85]=ep,U[86]=D,U[87]=W):W=U[87];let em=`${H} ${eu?`${eu}%`:D("common.na")} / Max: ${W}`;U[88]!==em?(z=(0,t.jsx)(c.Typography,{variant:"body1",component:"span",children:em}),U[88]=em,U[89]=z):z=U[89];let ef=q?.5:1;U[90]!==ef?($=(0,t.jsx)(m.Iconify,{icon:"material-symbols-light:edit-outline-sharp",width:16,height:16,sx:{color:"primary.light",opacity:ef}}),U[90]=ef,U[91]=$):$=U[91],U[92]!==_||U[93]!==z||U[94]!==$?(X=(0,t.jsxs)(A.Box,{sx:_,children:[z,$]}),U[92]=_,U[93]=z,U[94]=$,U[95]=X):X=U[95],U[96]!==q||U[97]!==M?(Z=q?void 0:()=>M("slippage"),U[96]=q,U[97]=M,U[98]=Z):Z=U[98],U[99]!==D?(ee=D("trade.clickToAdjust"),U[99]=D,U[100]=ee):ee=U[100],U[101]!==E||U[102]!==X||U[103]!==Z||U[104]!==ee?(et={label:E,value:X,onValueClick:Z,tooltip:ee},U[101]=E,U[102]=X,U[103]=Z,U[104]=ee,U[105]=et):et=U[105],f=et,U[106]!==D?(b=D("trade.estExecutionPrice"),U[106]=D,U[107]=b):b=U[107],y=ed?.avgPrice?(0,x.formatNumber)(ed.avgPrice,{instrument_name:V,useTickSize:!0,useGrouping:!0}):D("common.na"),U[14]=R,U[15]=j?.growth_mode,U[16]=V,U[17]=q,U[18]=Y,U[19]=N,U[20]=Q.baseOrderSize,U[21]=Q.liquidationPriceLong,U[22]=Q.liquidationPriceShort,U[23]=K,U[24]=M,U[25]=D,U[26]=P,U[27]=G,U[28]=O,U[29]=u,U[30]=h,U[31]=p,U[32]=f,U[33]=g,U[34]=y,U[35]=b}else u=U[29],h=U[30],p=U[31],f=U[32],g=U[33],y=U[34],b=U[35];
5U[108]!==y||U[109]!==b?(w={label:b,value:y},U[108]=y,U[109]=b,U[110]=w):w=U[110];let ec=w;U[111]!==ec||U[112]!==u||U[113]!==z||U[114]!==$||U[115]!==W||U[116]!==h||U[117]!==f||U[118]!==g?(S=[W],(v=[W,z]).push(u),"market"===$&&v.push(ec,f),S.push(g),v.push(h),U[111]=ec,U[112]=u,U[113]=z,U[114]=$,U[115]=W,U[116]=h,U[117]=f,U[118]=g,U[119]=v,U[120]=S):(v=U[119],S=U[120]);let ed="perps"===Y?v:S;return U[121]!==ed||U[122]!==V||U[123]!==Y||U[124]!==W||U[125]!==g?(k="spot"===Y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Z.Label,{label:W.label,value:W.value}),(0,t.jsx)(Z.Label,{label:g.label,value:g.value}),(0,t.jsx)(ee,{instrumentName:V})]}):ed.map(eA),U[121]=ed,U[122]=V,U[123]=Y,U[124]=W,U[125]=g,U[126]=k):k=U[126],U[127]!==X||U[128]!==M||U[129]!==p||U[130]!==D?(E=p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Box,{sx:{mt:1,mb:1.3,borderTop:"1px solid rgba(116, 116, 116, 0.16)"}}),(0,t.jsx)(Z.Label,{label:D("trade.marketSession"),value:(0,t.jsx)(c.Typography,{variant:"body1",component:"span",sx:{color:"closed"===X.key?"warning.light":"primary.light"},children:(0,en.getMarketSessionLabel)(X.key,D)}),onValueClick:()=>M("market-session"),tooltip:D("trade.viewMarketSessionSchedule")}),(0,t.jsx)(Z.Label,{label:D("trade.marketSessionEndsIn"),value:(0,t.jsx)(c.Typography,{variant:"body1",component:"span",sx:{fontVariantNumeric:"tabular-nums"},suppressHydrationWarning:!0,children:(0,en.formatSessionCountdown)(X.endsInMs)}),onValueClick:()=>M("market-session"),tooltip:D("trade.viewMarketSessionSchedule")})]}),U[127]=X,U[128]=M,U[129]=p,U[130]=D,U[131]=E):E=U[131],U[132]!==k||U[133]!==E?(T=(0,t.jsxs)(A.Box,{children:[k,E]}),U[132]=k,U[133]=E,U[134]=T):T=U[134],T}],63951);var el=e.i(858532);let ec="1.00";function ed(e){return e.userFees}function eu(e){return e.getFeeRates}function eh(e){return e.setModal}function ep(e){return e.selectedInstrument}function em(e){let t=e.selectedInstrument;return t?e.instruments[t]?.tick_size:void 0}function ef(e){let t=e.selectedInstrument;return!!t&&!!e.instruments[t]?.growth_mode}function eg(e){return Number(e.replaceAll(",","").trim())}function ey(e){e?el.showToast.error({message:e}):el.showToast.success({message:"Scale order placed successfully"})}function eb(e){e?el.showToast.error({message:e}):el.showToast.success({message:"TWAP order placed successfully"})}function ex(e){return(0,t.jsx)(Z.Label,{label:e.label,value:e.value,onValueClick:e.onValueClick,tooltip:e.tooltip},e.label)}e.s(["PRO_ORDER_OPTIONS",0,["scaleOrder","twapOrder"],"ProOrder",0,e=>{let a,p,m,g,y,v,B,S,k,E,F,T,U,I,Q,j,L,_,P,D,M,O,N,H,V,K,G,W,z,$,q,X,J,Z,ee,et,er,en,ei,ea,eo,es,eA,ew,ev,eC,eB,eS,ek,eE,eF,eT=(0,r.c)(216),{proOrderType:eU,tab:eI,kind:eQ,orderSizeDenomination:ej,orderSizeDenominations:eL,handleOrderSizeDenominationChange:e_,orderSize:eP,handleOrderSizeChange:eD,orderSizeSliderValue:eR,handleOrderSizeSliderChange:eM,reduceOnly:eO,toggleReduceOnlyChange:eN,timeInForce:eH,handleTimeInForceChange:eV,handlePlaceScaleOrder:eK,handlePlaceTWAPOrder:eG,skipOpenOrderConfirmation:eW,onRequestScaleOrderConfirmation:ez,onRequestTWAPOrderConfirmation:e$,baseOrderSize:eq,baseDenomination:eX,placingOrder:eY,error:eJ,isBuyDisabled:eZ,isSellDisabled:e0,isExceedingMaxSize:e1}=e,e2=(0,d.useTheme)(),e4=(0,o.useTranslations)(),e3=(0,C.useUserTradingDataStore)(ed),e5=(0,C.useUserTradingDataStore)(eu),e6=(0,C.useActionStore)(eh),e8=(0,C.useTradingDataStore)(ep),e7=(0,C.useTradingDataStore)(em),e9=(0,C.useTradingDataStore)(ef),[te,tt]=(0,w.useState)(""),[tr,tn]=(0,w.useState)(""),[ti,ta]=(0,w.useState)(""),[to,ts]=(0,w.useState)(""),[tA,tl]=(0,w.useState)(""),[tc,td]=(0,w.useState)(ec),tu="scaleOrder"===eU,th="twapOrder"===eU,tp=eL[0]??ej;if(eT[0]!==tr||eT[1]!==ti||eT[2]!==e7||eT[3]!==to||eT[4]!==eP||eT[5]!==tc||eT[6]!==te||eT[7]!==tA){let e,t,r,n,i,o,s,A;v=eg(te),a=eg(tr),g=eg(eP),eT[20]!==tA?(e=tA.trim(),eT[20]=tA,eT[21]=e):e=eT[21],B=Number(e),eT[22]!==tc?(t=tc.trim(),eT[22]=tc,eT[23]=t):t=eT[23],y=Number(t),eT[24]!==ti?(r=""===ti.trim()?0:Number(ti.trim()),eT[24]=ti,eT[25]=r):r=eT[25],p=r,eT[26]!==to?(n=""===to.trim()?0:Number(to.trim()),eT[26]=to,eT[27]=n):n=eT[27],m=n,eT[28]!==p||eT[29]!==m?(i=Number.isFinite(p)&&Number.isFinite(m)?3600*p+60*m:NaN,eT[28]=p,eT[29]=m,eT[30]=i):i=eT[30],F=i,eT[31]!==F?(o=Number.isFinite(F)&&F>=0?Math.floor(F/30):0,eT[31]=F,eT[32]=o):o=eT[32],T=o,eT[33]!==e7?(s=(0,R.getStepDecimalCount)(e7),eT[33]=e7,eT[34]=s):s=eT[34],S=s,eT[35]===Symbol.for("react.memo_cache_sentinel")?(A=(0,R.getStepDecimalCount)(.01),eT[35]=A):A=eT[35],k=A,E=Number.isFinite(v)&&v>0&&Number.isFinite(a)&&a>0?(v+a)/2:null,eT[0]=tr,eT[1]=ti,eT[2]=e7,eT[3]=to,eT[4]=eP,eT[5]=tc,eT[6]=te,eT[7]=tA,eT[8]=a,eT[9]=p,eT[10]=m,eT[11]=g,eT[12]=y,eT[13]=v,eT[14]=B,eT[15]=S,eT[16]=k,eT[17]=E,eT[18]=F,eT[19]=T}else a=eT[8],p=eT[9],m=eT[10],g=eT[11],y=eT[12],v=eT[13],B=eT[14],S=eT[15],k=eT[16],E=eT[17],F=eT[18],T=eT[19];let tm=E;e:{if(!Number.isFinite(g)||g<=0){U=null;break e}if(ej===tp){U=g;break e}if(!tm||!Number.isFinite(tm)||tm<=0){U=null;break e}U=g*tm}let tf=U;t:{let e;if(null===tf||!Number.isFinite(tf)){let e;eT[36]!==e4?(e=e4("common.na"),eT[36]=e4,eT[37]=e):e=eT[37],I=e;break t}eT[38]!==tf?(e=(0,x.formatNumber)(tf,{decimals:2}),eT[38]=tf,eT[39]=e):e=eT[39],I=`${e} ${tp}`}let tg=I;r:{let e;if("spot"===eQ){Q="0.1%";break r}let t="perps"===eQ?"perps":"spot";eT[40]!==e5||eT[41]!==e9||eT[42]!==t||eT[43]!==e3?(e=e5(t,e3,!1,e9),eT[40]=e5,eT[41]=e9,eT[42]=t,eT[43]=e3,eT[44]=e):e=eT[44],Q=e}let ty=Q;n:{let e;if(!Number.isFinite(F)||F<=0){let e;eT[45]!==e4?(e=e4("common.na"),eT[45]=e4,eT[46]=e):e=eT[46],j=e;break n}
5let t=Math.floor(F/3600),r=Math.floor(F%3600/60);eT[47]!==t||eT[48]!==r?(e=[],t>0&&e.push(`${t} ${1===t?"hour":"hours"}`),r>0&&e.push(`${r} ${1===r?"minute":"minutes"}`),eT[47]=t,eT[48]=r,eT[49]=e):e=eT[49],j=e.join(" ")||`${F} seconds`}let tb=j;i:{let e=Number(eq);if(!Number.isFinite(e)||e<=0||!Number.isFinite(T)||T<=0){L=null;break i}L=e/T}let tx=L;a:{let e;if(null===tx){let e;eT[50]!==e4?(e=e4("common.na"),eT[50]=e4,eT[51]=e):e=eT[51],_=e;break a}eT[52]!==tx?(e=(0,x.formatNumber)(tx,{decimals:5,maxDecimals:8,useGrouping:!1}),eT[52]=tx,eT[53]=e):e=eT[53],_=`${e} ${eX}`}let tw=_;eT[54]!==e6?(P=()=>{e6("fee-tiers")},eT[54]=e6,eT[55]=P):P=eT[55];let tv=P;o:{if(!tu){let e;eT[56]!==e4?(e=e4("common.comingSoon"),eT[56]=e4,eT[57]=e):e=eT[57],D=e;break o}if(!Number.isFinite(v)||v<=0){let e;eT[58]!==e4?(e=e4("trade.enterValidStartPrice"),eT[58]=e4,eT[59]=e):e=eT[59],D=e;break o}if(!Number.isFinite(a)||a<=0){let e;eT[60]!==e4?(e=e4("trade.enterValidEndPrice"),eT[60]=e4,eT[61]=e):e=eT[61],D=e;break o}if(!Number.isInteger(B)){let e;eT[62]!==e4?(e=e4("trade.enterValidTotalOrders"),eT[62]=e4,eT[63]=e):e=eT[63],D=e;break o}if(B<2||B>50){let e;eT[64]!==e4?(e=e4("trade.scaleTotalOrdersRange",{min:2,max:50}),eT[64]=e4,eT[65]=e):e=eT[65],D=e;break o}if(!Number.isFinite(y)||y<=0){let e;eT[66]!==e4?(e=e4("trade.enterValidSizeSkew"),eT[66]=e4,eT[67]=e):e=eT[67],D=e;break o}D=null}let tC=D;s:{if(!th){let e;eT[68]!==e4?(e=e4("common.comingSoon"),eT[68]=e4,eT[69]=e):e=eT[69],M=e;break s}if(!Number.isFinite(g)||g<=0){M="Enter a valid size";break s}if(!Number.isInteger(p)||p<0){M="Enter a valid hour value";break s}if(!Number.isInteger(m)||m<0||m>=60){M="Enter a valid minute value";break s}if(!Number.isFinite(F)||F<300||F>86400){M="Runtime must be between 5 minutes and 24 hours";break s}M=null}let tB=M;eT[70]!==tu||eT[71]!==th||eT[72]!==e4?(O=tu||th?null:e4("common.comingSoon"),eT[70]=tu,eT[71]=th,eT[72]=e4,eT[73]=O):O=eT[73];let tS=O;eT[74]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{tt(""),tn(""),ta(""),ts(""),tl(""),td(ec)},eT[74]=N):N=eT[74],eT[75]!==e8?(H=[e8],eT[75]=e8,eT[76]=H):H=eT[76],(0,w.useEffect)(N,H),eT[77]!==e7||eT[78]!==S?(V=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:S,step:e7,stripCommas:!0});null!==t&&tt(t)},eT[77]=e7,eT[78]=S,eT[79]=V):V=eT[79];let tk=V;eT[80]!==e7||eT[81]!==S?(K=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:S,step:e7,stripCommas:!0});null!==t&&tn(t)},eT[80]=e7,eT[81]=S,eT[82]=K):K=eT[82];let tE=K;eT[83]===Symbol.for("react.memo_cache_sentinel")?(G=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:0,step:1,stripCommas:!0});null!==t&&ta(t)},eT[83]=G):G=eT[83];let tF=G;eT[84]===Symbol.for("react.memo_cache_sentinel")?(W=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:0,step:1,stripCommas:!0});null!==t&&ts(t)},eT[84]=W):W=eT[84];let tT=W;eT[85]===Symbol.for("react.memo_cache_sentinel")?(z=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:0,step:1,stripCommas:!0});null!==t&&tl(t)},eT[85]=z):z=eT[85];let tU=z;eT[86]!==k?($=e=>{let t=(0,R.getValidatedStepInput)({value:e,maxDecimals:k,step:.01,stripCommas:!0});null!==t&&td(t)},eT[86]=k,eT[87]=$):$=eT[87];let tI=$;eT[88]!==eK||eT[89]!==e4?(q=(e,t)=>{eK(e,t).then(ey).catch(()=>{el.showToast.error({message:e4("common.somethingWentWrong")})})},eT[88]=eK,eT[89]=e4,eT[90]=q):q=eT[90];let tQ=q;eT[91]!==tu||eT[92]!==ez||eT[93]!==eP||eT[94]!==ej||eT[95]!==a||eT[96]!==y||eT[97]!==v||eT[98]!==B||eT[99]!==tQ||eT[100]!==tC||eT[101]!==eW?(X=e=>{if(!tu||tC){tC&&el.showToast.error({message:tC});return}let t={startPrice:v,endPrice:a,totalOrders:B,sizeSkew:y};eW?tQ(e,t):ez({side:e,params:t,totalSize:eP,totalSizeDenomination:ej})},eT[91]=tu,eT[92]=ez,eT[93]=eP,eT[94]=ej,eT[95]=a,eT[96]=y,eT[97]=v,eT[98]=B,eT[99]=tQ,eT[100]=tC,eT[101]=eW,eT[102]=X):X=eT[102];let tj=X;eT[103]!==tj?(J=()=>{tj("b")},eT[103]=tj,eT[104]=J):J=eT[104];let tL=J;eT[105]!==tj?(Z=()=>{tj("s")},eT[105]=tj,eT[106]=Z):Z=eT[106];let t_=Z;eT[107]!==eG||eT[108]!==e4?(ee=(e,t)=>{eG(e,t).then(eb).catch(()=>{el.showToast.error({message:e4("common.somethingWentWrong")})})},eT[107]=eG,eT[108]=e4,eT[109]=ee):ee=eT[109];let tP=ee;eT[110]!==eX||eT[111]!==eq||eT[112]!==th||eT[113]!==e$||eT[114]!==eP||eT[115]!==ej||eT[116]!==
5p||eT[117]!==m||eT[118]!==tP||eT[119]!==tw||eT[120]!==eW||eT[121]!==F||eT[122]!==T||eT[123]!==tB?(et=e=>{if(!th||tB){tB&&el.showToast.error({message:tB});return}let t={hour:p,minute:m};eW?tP(e,t):e$({side:e,params:t,totalSize:eP,totalSizeDenomination:ej,baseOrderSize:eq,baseDenomination:eX,frequencySeconds:30,runtimeSeconds:F,totalOrders:T,sizePerSuborder:tw})},eT[110]=eX,eT[111]=eq,eT[112]=th,eT[113]=e$,eT[114]=eP,eT[115]=ej,eT[116]=p,eT[117]=m,eT[118]=tP,eT[119]=tw,eT[120]=eW,eT[121]=F,eT[122]=T,eT[123]=tB,eT[124]=et):et=eT[124];let tD=et;eT[125]!==tD?(er=()=>{tD("b")},eT[125]=tD,eT[126]=er):er=eT[126];let tR=er;eT[127]!==tD?(en=()=>{tD("s")},eT[127]=tD,eT[128]=en):en=eT[128];let tM=en,tO=th?tR:tL,tN=th?tM:t_;eT[129]!==tr||eT[130]!==ty||eT[131]!==tv||eT[132]!==th||eT[133]!==eQ||eT[134]!==tg||eT[135]!==tb||eT[136]!==tw||eT[137]!==te||eT[138]!==e4||eT[139]!==T||eT[140]!==tB?(ei=th?[{label:"Frequency",value:"30 seconds"},{label:"Runtime",value:tb},{label:"Number of Orders",value:tB?e4("common.na"):String(T)},{label:"Size per Suborder",value:tw},{label:e4("common.fees"),value:ty,onValueClick:"perps"===eQ?tv:void 0,tooltip:"perps"===eQ?e4("trade.clickToViewFeeTiers"):void 0}]:[{label:e4("trade.startPrice"),value:te||e4("common.na")},{label:e4("trade.endPrice"),value:tr||e4("common.na")},{label:e4("trade.orderValue"),value:tg},{label:e4("common.fees"),value:ty,onValueClick:"perps"===eQ?tv:void 0,tooltip:"perps"===eQ?e4("trade.clickToViewFeeTiers"):void 0}],eT[129]=tr,eT[130]=ty,eT[131]=tv,eT[132]=th,eT[133]=eQ,eT[134]=tg,eT[135]=tb,eT[136]=tw,eT[137]=te,eT[138]=e4,eT[139]=T,eT[140]=tB,eT[141]=ei):ei=eT[141];let tH=ei;return eT[142]===Symbol.for("react.memo_cache_sentinel")?(ea={display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",gap:1},eT[142]=ea):ea=eT[142],eT[143]===Symbol.for("react.memo_cache_sentinel")?(eo={display:"flex",flexDirection:"column",gap:1},eT[143]=eo):eo=eT[143],eT[144]!==tr||eT[145]!==tE||eT[146]!==eD||eT[147]!==e_||eT[148]!==eM||eT[149]!==tI||eT[150]!==tk||eT[151]!==eV||eT[152]!==tu||eT[153]!==eQ||eT[154]!==eP||eT[155]!==ej||eT[156]!==eL||eT[157]!==eR||eT[158]!==eO||eT[159]!==tc||eT[160]!==te||eT[161]!==e4||eT[162]!==eI||eT[163]!==e2||eT[164]!==eH||eT[165]!==eN||eT[166]!==tA?(es=tu&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.OrderSize,{compact:!0,side:eI,kind:eQ,orderSizeDenomination:ej,orderSizeDenominations:eL,handleOrderSizeDenominationChange:e_,orderSize:eP,handleOrderSizeChange:eD,orderSizeSliderValue:eR,handleOrderSizeSliderChange:eM}),(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:`${e4("trade.startPrice")}`,value:te,onChange:e=>tk(e.target.value)}),(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:`${e4("trade.endPrice")}`,value:tr,onChange:e=>tE(e.target.value)}),(0,t.jsxs)(A.Box,{sx:{display:"flex",gap:1},children:[(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:e4("trade.totalOrders"),value:tA,onChange:e=>tU(e.target.value)}),(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:e4("trade.sizeSkew"),titleTooltip:"Ratio between end and start prices. For example, if size skew is 2.0, then a limit order for end price will be placed with twice the size of start price. A size skew of 1.0 creates equally sized orders.",value:tc,onChange:e=>tI(e.target.value)})]}),(0,t.jsxs)(A.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)(u.FormControlLabel,{label:e4("trade.reduceOnly"),control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:eO,onChange:eN}),sx:{color:"text.secondary",my:0}}),(0,t.jsxs)(A.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:e4("trade.tif")}),(0,t.jsxs)(l.Select,{value:eH,onChange:eV,MenuProps:(0,Y.getMenuProps)(e2,{vertical:"bottom",horizontal:"right"}),sx:{minWidth:86},children:[(0,t.jsx)(s.MenuItem,{value:"GTC",disableRipple:!0,children:"GTC"}),(0,t.jsx)(s.MenuItem,{value:"IOC",disableRipple:!0,children:"IOC"})]})]})]})]}),eT[144]=tr,eT[145]=tE,eT[146]=eD,eT[147]=e_,eT[148]=eM,eT[149]=tI,eT[150]=tk,eT[151]=eV,eT[152]=tu,eT[153]=eQ,eT[154]=eP,eT[155]=ej,eT[156]=eL,eT[157]=eR,eT[158]=eO,eT[159]=tc,eT[160]=te,eT[161]=e4,eT[162]=eI,eT[163]=e2,eT[164]=eH,eT[165]=eN,eT[166]=tA,eT[167]=es):es=eT[167],eT[168]!==eD||eT[169]!==e_||eT[170]!==eM||eT[171]!==ti||eT[172]!==th||eT[173]!==eQ||eT[174]!==to||eT[175]!==eP||eT[176]!==ej||eT[177]!==eL||eT[178]!==eR||eT[179]!==eO||eT[180]!==e4||eT[181]!==eI||eT[182]!==eN?(eA=th&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.OrderSize,{compact:!0,side:eI,kind:eQ,orderSizeDenomination:ej,orderSizeDenominations:eL,handleOrderSizeDenominationChange:e_,orderSize:eP,handleOrderSizeChange:eD,orderSizeSliderValue:eR,handleOrderSizeSliderChange:eM}),(0,t.jsxs)(A.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,color:"text.secondary"},children:[(0,t.jsx)(c.Typography,{children:e4("trade.runningTime")}),(0,t.jsxs)(A.Box,{sx:{display:"flex",gap:1},children:[(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:`${e4("trade.hour")}`,value:ti,onChange:e=>tF(e.target.value)}),(0,t.jsx)(b.default,{compact:!0,fullWidth:!0,title:`${e4("trade.minute")}`,value:to,onChange:e=>tT(e.target.value)})]})]}
5),(0,t.jsx)(u.FormControlLabel,{label:e4("trade.reduceOnly"),control:(0,t.jsx)(h.Checkbox,{color:"default",size:"small",checked:eO,onChange:eN}),sx:{color:"text.secondary",my:0}})]}),eT[168]=eD,eT[169]=e_,eT[170]=eM,eT[171]=ti,eT[172]=th,eT[173]=eQ,eT[174]=to,eT[175]=eP,eT[176]=ej,eT[177]=eL,eT[178]=eR,eT[179]=eO,eT[180]=e4,eT[181]=eI,eT[182]=eN,eT[183]=eA):eA=eT[183],eT[184]!==tu||eT[185]!==th||eT[186]!==e4?(ew=!th&&!tu&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",sx:{py:.5},children:e4("trade.proOrderComingSoon")})}),eT[184]=tu,eT[185]=th,eT[186]=e4,eT[187]=ew):ew=eT[187],eT[188]!==es||eT[189]!==eA||eT[190]!==ew?(ev=(0,t.jsxs)(A.Box,{sx:eo,children:[es,eA,ew]}),eT[188]=es,eT[189]=eA,eT[190]=ew,eT[191]=ev):ev=eT[191],eT[192]===Symbol.for("react.memo_cache_sentinel")?(eC={display:"flex",flexDirection:"column",gap:1},eT[192]=eC):eC=eT[192],eT[193]!==eJ?(eB=eJ&&(0,t.jsx)(f.Error,{error:eJ}),eT[193]=eJ,eT[194]=eB):eB=eT[194],eT[195]!==tS||eT[196]!==eJ||eT[197]!==tO||eT[198]!==tN||eT[199]!==eZ||eT[200]!==e1||eT[201]!==e0||eT[202]!==eQ||eT[203]!==eP||eT[204]!==eY||eT[205]!==eI?(eS=(0,t.jsx)(n.OrderButtons,{handleBuy:tO,handleSell:tN,kind:eQ,tab:eI,error:eJ,placingOrder:eY,orderSize:eP,isBuyDisabled:eZ,isSellDisabled:e0,isExceedingMaxSize:e1,customLabel:tS}),eT[195]=tS,eT[196]=eJ,eT[197]=tO,eT[198]=tN,eT[199]=eZ,eT[200]=e1,eT[201]=e0,eT[202]=eQ,eT[203]=eP,eT[204]=eY,eT[205]=eI,eT[206]=eS):eS=eT[206],eT[207]!==tH?(ek=(0,t.jsx)(A.Box,{children:tH.map(ex)}),eT[207]=tH,eT[208]=ek):ek=eT[208],eT[209]!==eB||eT[210]!==eS||eT[211]!==ek?(eE=(0,t.jsxs)(A.Box,{sx:eC,children:[eB,eS,ek]}),eT[209]=eB,eT[210]=eS,eT[211]=ek,eT[212]=eE):eE=eT[212],eT[213]!==ev||eT[214]!==eE?(eF=(0,t.jsxs)(A.Box,{sx:ea,children:[ev,eE]}),eT[213]=ev,eT[214]=eE,eT[215]=eF):eF=eT[215],eF}],306158);var ew=e.i(397837),ev=e.i(290765);e.i(565306);var eC=e.i(849850);let eB=e=>(0,x.formatNumber)(e,{decimals:8,maxDecimals:8});e.s(["ScaleOrderConfirmationModal",0,e=>{let n,i,a,s,l,d,p,m,f,g,y,b,w,v,B,S,k,E,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V,K,G,W,z,$,q,X,Y,J,Z,ee=(0,r.c)(100),{open:et,action:er,kind:en,totalSize:ei,totalSizeDenomination:ea,totalOrders:eo,startPrice:es,endPrice:eA,sizeSkew:el,placingOrder:ec,onConfirm:ed,onClose:eu}=e,eh=(0,o.useTranslations)(),{skipOpenOrderConfirmation:ep,setSkipOpenOrderConfirmation:em}=(0,C.useGlobalStore)();e:{if("b"===er){n="perps"===en?"Buy / Long":"Buy";break e}n="perps"===en?"Sell / Short":"Sell"}let ef=n;ee[0]!==eh?(i=eh("modals.confirmOrder"),ee[0]=eh,ee[1]=i):i=ee[1],ee[2]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",justifyContent:"space-between",padding:"6px 0"},ee[2]=a):a=ee[2],ee[3]!==eh?(s=eh("modals.confirmAction"),ee[3]=eh,ee[4]=s):s=ee[4],ee[5]!==s?(l=(0,t.jsx)(c.Typography,{variant:"body1",color:"textSecondary",children:s}),ee[5]=s,ee[6]=l):l=ee[6];let eg="b"===er?"primary":"secondary",ey="b"===er?"perps"===en?"Long":"Buy":"perps"===en?"Short":"Sell";ee[7]!==eg||ee[8]!==ey?(d=(0,t.jsx)(c.Typography,{variant:"body1",color:eg,children:ey}),ee[7]=eg,ee[8]=ey,ee[9]=d):d=ee[9],ee[10]!==l||ee[11]!==d?(p=(0,t.jsxs)("div",{style:a,children:[l,d]}),ee[10]=l,ee[11]=d,ee[12]=p):p=ee[12],ee[13]===Symbol.for("react.memo_cache_sentinel")?(m={display:"flex",justifyContent:"space-between",padding:"6px 0"},f=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:"Total Size"}),ee[13]=m,ee[14]=f):(m=ee[13],f=ee[14]);let eb="b"===er?"primary":"secondary";ee[15]!==eb||ee[16]!==ei||ee[17]!==ea?(g=(0,t.jsxs)("div",{style:m,children:[f,(0,t.jsxs)(c.Typography,{variant:"body1",color:eb,children:[ei," ",ea]})]}),ee[15]=eb,ee[16]=ei,ee[17]=ea,ee[18]=g):g=ee[18],ee[19]===Symbol.for("react.memo_cache_sentinel")?(y={display:"flex",justifyContent:"space-between",padding:"6px 0"},ee[19]=y):y=ee[19],ee[20]!==eh?(b=eh("trade.totalOrders"),ee[20]=eh,ee[21]=b):b=ee[21],ee[22]!==b?(w=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:b}),ee[22]=b,ee[23]=w):w=ee[23],ee[24]!==eo?(v=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.primary",children:eo}),ee[24]=eo,ee[25]=v):v=ee[25],ee[26]!==w||ee[27]!==v?(B=(0,t.jsxs)("div",{style:y,children:[w,v]}),ee[26]=w,ee[27]=v,ee[28]=B):B=ee[28],ee[29]===Symbol.for("react.memo_cache_sentinel")?(S={display:"flex",justifyContent:"space-between",padding:"6px 0"},ee[29]=S):S=ee[29],ee[30]!==eh?(k=eh("trade.startPrice"),ee[30]=eh,ee[31]=k):k=ee[31],ee[32]!==k?(E=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:k}),ee[32]=k,ee[33]=E):E=ee[33],ee[34]!==es?(F=eB(es),ee[34]=es,ee[35]=F):F=ee[35],ee[36]!==F?(T=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.primary",children:F}),ee[36]=F,ee[37]=T):T=ee[37],ee[38]!==E||ee[39]!==T?(U=(0,t.jsxs)("div",{style:S,children:[E,T]}),ee[38]=E,ee[39]=T,ee[40]=U):U=ee[40],ee[41]===Symbol.for("react.memo_cache_sentinel")?(I={display:"flex",justifyContent:"space-between",padding:"6px 0"},ee[41]=I):I=ee[41],ee[42]!==eh?(Q=eh("trade.endPrice"),ee[42]=eh,ee[43]=Q):Q=ee[43],ee[44]!==Q?(j=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:Q}),ee[44]=Q,ee[45]=j):j=ee[45],ee[46]!==eA?(L=eB(eA),ee[46]=eA,ee[47]=L):L=ee[47],ee[48]!==L?(_=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.primary",children:L}),ee[48]=L,ee[49]=_):_=ee[49],ee[50]!==j||ee[51]!==_?(P=(0,t.jsxs)("div",{style:I,children:[j,_]}),ee[50]=j,ee[51]=_,ee[52]=P):P=ee[52],ee[53]===Symbol.for("react.memo_cache_sentinel")?(D={display:"flex",justifyContent:"space-between",padding:"6px 0"},ee[53]=D):D=ee[53],ee[54]!==eh?(R=eh("trade.sizeSkew"),ee[54]=eh,ee[55]=R):R=ee[55],ee[56]!==R?(M=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:R}),ee[56]=R,ee[57]=M):M=ee[57],ee[58]!==el?(O=(0,x.formatNumber)(el,{maxDecimals:6,decimals:6}),ee[58]=el,ee[59]=O):O=ee[59],ee[60]!==O?(N=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.primary",children:O}
5),ee[60]=O,ee[61]=N):N=ee[61],ee[62]!==M||ee[63]!==N?(H=(0,t.jsxs)("div",{style:D,children:[M,N]}),ee[62]=M,ee[63]=N,ee[64]=H):H=ee[64],ee[65]!==g||ee[66]!==B||ee[67]!==U||ee[68]!==P||ee[69]!==H||ee[70]!==p?(V=(0,t.jsxs)("div",{children:[p,g,B,U,P,H]}),ee[65]=g,ee[66]=B,ee[67]=U,ee[68]=P,ee[69]=H,ee[70]=p,ee[71]=V):V=ee[71],ee[72]===Symbol.for("react.memo_cache_sentinel")?(K=(0,t.jsx)(c.Typography,{variant:"body1",children:"You pay no gas fees. The order will be confirmed within a few seconds."}),ee[72]=K):K=ee[72],ee[73]!==em||ee[74]!==ep?(G=()=>{em(!ep)},ee[73]=em,ee[74]=ep,ee[75]=G):G=ee[75],ee[76]!==ep||ee[77]!==G?(W=(0,t.jsx)(h.Checkbox,{checked:ep,onChange:G}),ee[76]=ep,ee[77]=G,ee[78]=W):W=ee[78],ee[79]!==eh?(z=eh("modals.dontShowAgain"),ee[79]=eh,ee[80]=z):z=ee[80],ee[81]===Symbol.for("react.memo_cache_sentinel")?($={color:"text.secondary"},ee[81]=$):$=ee[81],ee[82]!==W||ee[83]!==z?(q=(0,t.jsx)(u.FormControlLabel,{control:W,label:z,sx:$}),ee[82]=W,ee[83]=z,ee[84]=q):q=ee[84];let ex="b"===er?"primary":"secondary";ee[85]===Symbol.for("react.memo_cache_sentinel")?(X={"&:active":{transform:"none"}},ee[85]=X):X=ee[85];let eS=ec?"Placing...":ef;return ee[86]!==ed||ee[87]!==ec||ee[88]!==ex||ee[89]!==eS?(Y=(0,t.jsx)(ew.Button,{variant:"contained",color:ex,size:"large",onClick:ed,disabled:ec,disableRipple:!0,disableElevation:!0,sx:X,children:eS}),ee[86]=ed,ee[87]=ec,ee[88]=ex,ee[89]=eS,ee[90]=Y):Y=ee[90],ee[91]!==V||ee[92]!==q||ee[93]!==Y?(J=(0,t.jsx)(A.Box,{children:(0,t.jsxs)(ev.Stack,{spacing:2,children:[V,K,q,Y]})}),ee[91]=V,ee[92]=q,ee[93]=Y,ee[94]=J):J=ee[94],ee[95]!==eu||ee[96]!==et||ee[97]!==i||ee[98]!==J?(Z=(0,t.jsx)(eC.ModalBox,{title:i,open:et,onClose:eu,children:J}),ee[95]=eu,ee[96]=et,ee[97]=i,ee[98]=J,ee[99]=Z):Z=ee[99],Z}],987812),e.s(["TWAPOrderConfirmationModal",0,e=>{let n,i,a,s,l,d,p,m,f,g,y,b,x,w,v,B,S,k,E,F,T,U,I=(0,r.c)(57),{open:Q,action:j,kind:L,totalSize:_,totalSizeDenomination:P,frequencySeconds:D,runtimeSeconds:R,totalOrders:M,sizePerSuborder:O,placingOrder:N,onConfirm:H,onClose:V}=e,K=(0,o.useTranslations)(),{skipOpenOrderConfirmation:G,setSkipOpenOrderConfirmation:W}=(0,C.useGlobalStore)();e:{if("b"===j){n="perps"===L?"Buy / Long":"Buy";break e}n="perps"===L?"Sell / Short":"Sell"}let z=n;I[0]!==K?(i=K("modals.confirmAction"),I[0]=K,I[1]=i):i=I[1];let $="b"===j?"perps"===L?"Long":"Buy":"perps"===L?"Short":"Sell";I[2]!==i||I[3]!==$?(a={label:i,value:$,highlight:!0},I[2]=i,I[3]=$,I[4]=a):a=I[4];let q=`${_} ${P}`;I[5]!==q?(s={label:"Total Size",value:q,highlight:!0},I[5]=q,I[6]=s):s=I[6];let X=`${D} seconds`;if(I[7]!==X?(l={label:"Frequency",value:X},I[7]=X,I[8]=l):l=I[8],I[9]!==R){let e,t,r;e=Math.floor(R/3600),t=Math.floor(R%3600/60),r=[],e>0&&r.push(`${e} ${1===e?"hour":"hours"}`),t>0&&r.push(`${t} ${1===t?"minute":"minutes"}`),d=r.join(" ")||`${R} seconds`,I[9]=R,I[10]=d}else d=I[10];I[11]!==d?(p={label:"Runtime",value:d},I[11]=d,I[12]=p):p=I[12];let Y=String(M);I[13]!==Y?(m={label:"Number of Orders",value:Y},I[13]=Y,I[14]=m):m=I[14],I[15]!==O?(f={label:"Size per Suborder",value:O},I[15]=O,I[16]=f):f=I[16],I[17]!==p||I[18]!==m||I[19]!==f||I[20]!==a||I[21]!==s||I[22]!==l?(g=[a,s,l,p,m,f],I[17]=p,I[18]=m,I[19]=f,I[20]=a,I[21]=s,I[22]=l,I[23]=g):g=I[23];let J=g;I[24]!==K?(y=K("modals.confirmOrder"),I[24]=K,I[25]=y):y=I[25],I[26]!==j||I[27]!==J?(b=(0,t.jsx)("div",{children:J.map(e=>(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",padding:"6px 0"},children:[(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:e.label}),(0,t.jsx)(c.Typography,{variant:"body1",color:e.highlight?"b"===j?"primary":"secondary":"text.primary",children:e.value})]},e.label))}),I[26]=j,I[27]=J,I[28]=b):b=I[28],I[29]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(c.Typography,{variant:"body1",children:"You pay no gas fees. The order will be confirmed within a few seconds."}),I[29]=x):x=I[29],I[30]!==W||I[31]!==G?(w=()=>{W(!G)},I[30]=W,I[31]=G,I[32]=w):w=I[32],I[33]!==G||I[34]!==w?(v=(0,t.jsx)(h.Checkbox,{checked:G,onChange:w}),I[33]=G,I[34]=w,I[35]=v):v=I[35],I[36]!==K?(B=K("modals.dontShowAgain"),I[36]=K,I[37]=B):B=I[37],I[38]===Symbol.for("react.memo_cache_sentinel")?(S={color:"text.secondary"},I[38]=S):S=I[38],I[39]!==v||I[40]!==B?(k=(0,t.jsx)(u.FormControl
5Label,{control:v,label:B,sx:S}),I[39]=v,I[40]=B,I[41]=k):k=I[41];let Z="b"===j?"primary":"secondary";I[42]===Symbol.for("react.memo_cache_sentinel")?(E={"&:active":{transform:"none"}},I[42]=E):E=I[42];let ee=N?"Placing...":z;return I[43]!==H||I[44]!==N||I[45]!==Z||I[46]!==ee?(F=(0,t.jsx)(ew.Button,{variant:"contained",color:Z,size:"large",onClick:H,disabled:N,disableRipple:!0,disableElevation:!0,sx:E,children:ee}),I[43]=H,I[44]=N,I[45]=Z,I[46]=ee,I[47]=F):F=I[47],I[48]!==b||I[49]!==k||I[50]!==F?(T=(0,t.jsx)(A.Box,{children:(0,t.jsxs)(ev.Stack,{spacing:2,children:[b,x,k,F]})}),I[48]=b,I[49]=k,I[50]=F,I[51]=T):T=I[51],I[52]!==V||I[53]!==Q||I[54]!==y||I[55]!==T?(U=(0,t.jsx)(eC.ModalBox,{title:y,open:Q,onClose:V,children:T}),I[52]=V,I[53]=Q,I[54]=y,I[55]=T,I[56]=U):U=I[56],U}],567225),e.s([],53151),e.s(["LimitCloseModal",0,e=>{let n,s,l,d,u,h,p,m,f,g,y=(0,r.c)(38),{open:b,onClose:x,position:w}=e,v=(0,o.useTranslations)();parseFloat(w.size),y[0]===Symbol.for("react.memo_cache_sentinel")?(n={defaultReduceOnly:!0,localLimitState:!0,isPositionClose:!0},y[0]=n):n=y[0];let{limitPrice:C,handleLimitPriceChange:B,handleGetMidPrice:S,orderSize:k,handleOrderSizeChange:E,orderSizeSliderValue:F,handleOrderSizeSliderChange:T,orderSizeDenomination:U,orderSizeDenominations:I,handleOrderSizeDenominationChange:Q,handlePlaceOrder:j}=W(w.instrument,n),L=I[1],_=parseFloat(w.entry_price),P=parseFloat(C)||0,D=parseFloat(k)||0,R=parseFloat(w.size),M=U!==L&&P>0?D/P:D,O=R>0?(P-_)*M:(_-P)*M;y[1]!==v?(s=v("modals.closePosition"),y[1]=v,y[2]=s):s=y[2],y[3]!==S||y[4]!==B||y[5]!==C?(l=(0,t.jsx)(a.LimitPrice,{limitPrice:C,handleLimitPriceChange:B,handleGetMidPrice:S}),y[3]=S,y[4]=B,y[5]=C,y[6]=l):l=y[6];let N=U||"";y[7]!==E||y[8]!==Q||y[9]!==T||y[10]!==k||y[11]!==I||y[12]!==F||y[13]!==N?(d=(0,t.jsx)(i.OrderSize,{orderSizeDenomination:N,orderSizeDenominations:I,handleOrderSizeDenominationChange:Q,orderSize:k,handleOrderSizeChange:E,orderSizeSliderValue:F,handleOrderSizeSliderChange:T}),y[7]=E,y[8]=Q,y[9]=T,y[10]=k,y[11]=I,y[12]=F,y[13]=N,y[14]=d):d=y[14],y[15]!==O||y[16]!==k||y[17]!==v?(u="0"!==k&&parseFloat(k)>0&&(0,t.jsxs)(c.Typography,{variant:"body1",textAlign:"center",color:"text.secondary",children:[v("modals.estimatedClosedPnl"),"Â ",(0,t.jsx)(A.Box,{component:"span",sx:{color:O>=0?"primary.main":"secondary.light"},children:O.toLocaleString("en-US",{style:"currency",currency:"USD"})})]}),y[15]=O,y[16]=k,y[17]=v,y[18]=u):u=y[18],y[19]!==j||y[20]!==x||y[21]!==w.size?(h=()=>{j(parseFloat(w.size)>0?"s":"b","limit"),x()},y[19]=j,y[20]=x,y[21]=w.size,y[22]=h):h=y[22];let H="0"===k;return y[23]===Symbol.for("react.memo_cache_sentinel")?(p={"&:active":{transform:"none"}},y[23]=p):p=y[23],y[24]!==v?(m=v("common.confirm"),y[24]=v,y[25]=m):m=y[25],y[26]!==m||y[27]!==h||y[28]!==H?(f=(0,t.jsx)(ew.Button,{color:"primary",variant:"contained",size:"large",fullWidth:!0,onClick:h,disabled:H,disableRipple:!0,disableElevation:!0,sx:p,children:m}),y[26]=m,y[27]=h,y[28]=H,y[29]=f):f=y[29],y[30]!==x||y[31]!==b||y[32]!==f||y[33]!==s||y[34]!==l||y[35]!==d||y[36]!==u?(g=(0,t.jsxs)(eC.ModalBox,{title:s,open:b,onClose:x,maxWidth:"xs",children:[l,d,u,f]}),y[30]=x,y[31]=b,y[32]=f,y[33]=s,y[34]=l,y[35]=d,y[36]=u,y[37]=g):g=y[37],g}],744048);var eS=e.i(562483);function ek(e){return e.selectedInstrument}function eE(e){return e.maxSlippage}e.s(["MarketCloseModal",0,e=>{let n,a,s,l,d,u,h,p,f,g,y,b,w,v=(0,r.c)(43),{open:B,onClose:S,position:k}=e,E=(0,C.useTradingDataStore)(ek),{setModal:F}=(0,C.useActionStore)(),T=(0,C.useTradingPreferencesStore)(eE),U=(0,et.useActionDisabled)("trading-enabled");(0,eS.useOrderbookData)(k.instrument,B&&k.instrument!==E);let I=(0,o.useTranslations)();v[0]===Symbol.for("react.memo_cache_sentinel")?(n={defaultReduceOnly:!0,isMarketClose:!0,isPositionClose:!0,localLimitState:!0},v[0]=n):n=v[0];let{orderSize:Q,handleOrderSizeChange:j,orderSizeSliderValue:L,handleOrderSizeSliderChange:_,orderSizeDenomination:P,orderSizeDenominations:D,handleOrderSizeDenominationChange:R,handlePlaceOrder:M,orderInfo:O,estSlippage:N}
5=W(k.instrument,n),H=parseFloat(k.size),V=parseFloat(k.entry_price);e:{if(!N){a=null;break e}let e=Number(O.baseOrderSize)||0;if(e<=0){a=null;break e}a=H>0?(N.avgPrice-V)*e:(V-N.avgPrice)*e}let K=a;t:{if(null===K||!N){s=null;break t}let e=Number(O.baseOrderSize)||0;if(e<=0||V<=0){s=null;break t}s=K/(V*e)*100}let G=s,z=parseFloat(Q)>0;v[1]!==N?(l=N?(0,x.formatNumber)(N.slippagePercent,{decimals:4,useGrouping:!1}):null,v[1]=N,v[2]=l):l=v[2];let $=l;v[3]!==T?(d=T?(0,x.formatNumber)(T,{decimals:4,useGrouping:!1}):null,v[3]=T,v[4]=d):d=v[4];let q=d;v[5]!==I?(u=I("modals.closePosition"),v[5]=I,v[6]=u):u=v[6];let X=P||"";v[7]!==j||v[8]!==R||v[9]!==_||v[10]!==Q||v[11]!==D||v[12]!==L||v[13]!==X?(h=(0,t.jsx)(i.OrderSize,{orderSizeDenomination:X,orderSizeDenominations:D,handleOrderSizeDenominationChange:R,orderSize:Q,handleOrderSizeChange:j,orderSizeSliderValue:L,handleOrderSizeSliderChange:_}),v[7]=j,v[8]=R,v[9]=_,v[10]=Q,v[11]=D,v[12]=L,v[13]=X,v[14]=h):h=v[14],v[15]!==N||v[16]!==$||v[17]!==K||v[18]!==U||v[19]!==q||v[20]!==G||v[21]!==F||v[22]!==z||v[23]!==I?(p=z&&(0,t.jsxs)(A.Box,{children:[(0,t.jsx)(Z.Label,{label:"Estimated PnL (Without Fees)",value:null!==K&&null!==G?(0,t.jsxs)(c.Typography,{variant:"body1",sx:{color:K>=0?"primary.main":"secondary.light"},children:[K.toLocaleString("en-US",{style:"currency",currency:"USD"})," (",(0,x.formatNumber)(G,{decimals:1,useGrouping:!1}),"%)"]}):"--"}),(0,t.jsx)(Z.Label,{label:"Est. Close Price",value:N?N.avgPrice.toLocaleString("en-US",{style:"currency",currency:"USD"}):"--"}),(0,t.jsx)(Z.Label,{label:I("trade.slippage"),value:(0,t.jsxs)(A.Box,{sx:{display:"flex",alignItems:"center",gap:.5,color:N?.slippagePercent&&N.slippagePercent>=.3?"secondary.light":"primary.light",...U&&{opacity:.5},cursor:U?"default":"pointer","&:hover":{".slippage-text":{textDecoration:"underline"}}},children:[(0,t.jsxs)(c.Typography,{variant:"body1",component:"span",className:"slippage-text",children:[I("trade.est")," ",$?`${$}%`:"--"," / Max:"," ",q?`${q}%`:"--"]}),(0,t.jsx)(m.Iconify,{icon:"material-symbols-light:edit-outline-sharp",width:16,height:16,sx:{color:N?.slippagePercent&&N.slippagePercent>=.3?"secondary.light":"primary.light",opacity:U?.5:1}})]}),onValueClick:U?void 0:()=>F("slippage"),tooltip:I("trade.clickToAdjust")}),(0,t.jsx)(c.Typography,{variant:"caption",color:"text.secondary",sx:{mt:.5,display:"block",fontSize:12},children:"*Estimates based on current orderbook. Actual results may vary."})]}),v[15]=N,v[16]=$,v[17]=K,v[18]=U,v[19]=q,v[20]=G,v[21]=F,v[22]=z,v[23]=I,v[24]=p):p=v[24],v[25]!==M||v[26]!==S||v[27]!==H?(f=()=>{M(H>0?"s":"b","market"),S()},v[25]=M,v[26]=S,v[27]=H,v[28]=f):f=v[28];let Y="0"===Q;return v[29]===Symbol.for("react.memo_cache_sentinel")?(g={"&:active":{transform:"none"}},v[29]=g):g=v[29],v[30]!==I?(y=I("modals.marketClose"),v[30]=I,v[31]=y):y=v[31],v[32]!==f||v[33]!==Y||v[34]!==y?(b=(0,t.jsx)(ew.Button,{color:"primary",variant:"contained",size:"large",fullWidth:!0,onClick:f,disabled:Y,disableRipple:!0,disableElevation:!0,sx:g,children:y}),v[32]=f,v[33]=Y,v[34]=y,v[35]=b):b=v[35],v[36]!==S||v[37]!==B||v[38]!==b||v[39]!==u||v[40]!==h||v[41]!==p?(w=(0,t.jsxs)(eC.ModalBox,{title:u,open:B,onClose:S,maxWidth:"xs",children:[h,p,b]}),v[36]=S,v[37]=B,v[38]=b,v[39]=u,v[40]=h,v[41]=p,v[42]=w):w=v[42],w}],794406)},805395,836872,919007,770981,641883,774804,112486,619260,461008,214440,208085,153973,244337,240570,736325,312027,456284,809249,5910,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(838456),i=e.i(405858);e.s(["DataTable",0,function(e){let a,o,s,A,l=(0,r.c)(14),{config:c,data:d,containerSx:u,tableContainerSx:h,controlledFilterValues:p,onFilterChange:m,breakpoints:f}=e;l[0]!==c||l[1]!==d?(a={...c,data:d},l[0]=c,l[1]=d,l[2]=a):a=l[2];let g=a;return l[3]!==u?(o={display:"flex",gap:2,flexDirection:"column",...u},l[3]=u,l[4]=o):o=l[4],l[5]!==f||l[6]!==p||l[7]!==g||l[8]!==m||l[9]!==h?(s=(0,t.jsx)(i.default,{config:g,controlledFilterValues:p,onFilterChange:m,breakpoints:f,tableContainerSx:h}),l[5]=f,l[6]=p,l[7]=g,l[8]=m,l[9]=h,l[10]=s):s=l[10],l[11]!==o||l[12]!==s?(A=(0,t.jsx)(n.Box,{sx:o,children:s}),l[11]=o,l[12]=s,l[13]=A):A=l[13],A}],805395),e.s(["createDirectionMap",()=>er,"getDirectionV2",()=>en,"useTradeHistoryConfig",()=>ea,"useTradeHistoryTableConfig",()=>ei],736325);var a=e.i(271645),o=e.i(463983);let s=e=>e.split(/[-/]/)[0]?.trim().toUpperCase()??"",A=()=>({type:"tabs",options:[{label:"All",value:"all"},{label:"Long",value:"long",color:"primary.light"},{label:"Short",value:"short",color:"secondary.light"}],defaultValue:"all",filterFn:(e,t)=>{if("all"===t)return!0;
5if("side"in e&&void 0!==e.side)return"long"===t?"b"===e.side:"s"===e.side;if("size"in e&&void 0!==e.size){let r=parseFloat(e.size);return"long"===t?r>0:r<0}return!0}}),l=e=>({type:"tabs",options:[{label:"All",value:"all"},{label:"ETH",value:"eth",logo:"/imgs/svg/crypto/ETH.svg"},{label:"BTC",value:"btc",logo:"/imgs/svg/crypto/BTC.svg"},...e?[{label:"Current Market",value:"current"}]:[]],defaultValue:"all",filterFn:(t,r)=>{if("all"===r)return!0;let n=("current"===r&&e?s(e):r).split(",").map(e=>e.trim().toUpperCase()).filter(Boolean);return 0===n.length||n.includes(s(t.instrument))}}),c=(e,t)=>({side:A(),asset:l(t),type:{type:"tabs",options:[{label:"All",value:"all"},{label:"Perps",value:"perps"},{label:"Spot",value:"spot"}],defaultValue:"all",filterFn:(t,r)=>"all"===r||e[t.instrument]?.kind===r}});e.s(["createSideAssetTypeFilters",0,c,"createSideAssetTypeFiltersWithOptions",0,(e,t)=>({side:A(),asset:l(t),type:{type:"tabs",options:[{label:"All",value:"all"},{label:"Perps",value:"perps"},{label:"Options",value:"option"}],defaultValue:"all",filterFn:(t,r)=>"all"===r||e[t.instrument]?.kind===r}})],836872);var d=e.i(782904),u=e.i(657688);let h=e=>{let i,o,s,A,l,c,d,h=(0,r.c)(17),{src:p,title:m,onClick:f}=e,[g,y]=(0,a.useState)("loading");if(h[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{y("loading")},h[0]=i):i=h[0],h[1]!==p?(o=[p],h[1]=p,h[2]=o):o=h[2],(0,a.useEffect)(i,o),h[3]!==m){let e;(e=(m||"").toUpperCase()).includes("-")&&(e=e.split("-")[0]),e.includes("/")&&(e=e.split("/")[0]),s=e.slice(0,Math.min(3,e.length||2))||"?",h[3]=m,h[4]=s}else s=h[4];let b=s,x=b.length>2?5:7;h[5]===Symbol.for("react.memo_cache_sentinel")?(A={bgcolor:"action.selected",color:"text.secondary"},h[5]=A):A=h[5];let w=`${x}px`;return h[6]!==w?(l={position:"relative",width:16,height:16,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:w,fontWeight:600,lineHeight:1,flexShrink:0,userSelect:"none",overflow:"hidden"},h[6]=w,h[7]=l):l=h[7],h[8]!==f||h[9]!==p||h[10]!==g||h[11]!==m?(c="error"!==g&&(0,t.jsx)(u.default,{src:p,alt:m,width:16,height:16,onLoad:()=>y("loaded"),onError:()=>y("error"),onClick:f,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",opacity:+("loaded"===g),transition:"opacity 120ms ease-out"}}),h[8]=f,h[9]=p,h[10]=g,h[11]=m,h[12]=c):c=h[12],h[13]!==b||h[14]!==l||h[15]!==c?(d=(0,t.jsxs)(n.Box,{sx:A,style:l,children:[b,c]}),h[13]=b,h[14]=l,h[15]=c,h[16]=d):d=h[16],d},p=e=>{let i,a,o,s,A,l=(0,r.c)(14),{title:c,leadingIcon:u,trailingIcon:p,onIconClick:m}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",alignItems:"center",width:"100%",color:"text.primary",gap:"4px","&:hover":{color:"text.primary"}},l[0]=i):i=l[0],l[1]!==u||l[2]!==c?(a=u&&(0,t.jsx)(h,{src:u,title:c}),l[1]=u,l[2]=c,l[3]=a):a=l[3],l[4]!==c?(o=(0,t.jsx)(d.Typography,{variant:"body1",children:c}),l[4]=c,l[5]=o):o=l[5],l[6]!==m||l[7]!==c||l[8]!==p?(s=p&&(0,t.jsx)(h,{src:p,title:c,onClick:m}),l[6]=m,l[7]=c,l[8]=p,l[9]=s):s=l[9],l[10]!==a||l[11]!==o||l[12]!==s?(A=(0,t.jsxs)(n.Box,{sx:i,children:[a,o,s]}),l[10]=a,l[11]=o,l[12]=s,l[13]=A):A=l[13],A};e.s(["TableCellIcon",0,p],919007);var m=e.i(954512),f=e.i(632418);e.s(["default",0,e=>{let i,a,o,s,A=(0,r.c)(9),{title:l,label:c}=e,u=(0,m.useTheme)();return A[0]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",alignItems:"center",width:"100%"},A[0]=i):i=A[0],A[1]!==l?(a=(0,t.jsx)(d.Typography,{variant:"body1",children:l}),A[1]=l,A[2]=a):a=A[2],A[3]!==c||A[4]!==u?(o=!!c&&"-"!==c&&(0,t.jsx)(d.Typography,{ml:1,variant:"body1",color:"primary.contrastText",sx:{backgroundColor:(0,f.varAlpha)(u.vars.palette.primary.mainChannel,.16),color:"success.main",display:"inline",paddingX:"6px",paddingY:"2px",borderRadius:"4px"},children:c}),A[3]=c,A[4]=u,A[5]=o):o=A[5],A[6]!==a||A[7]!==o?(s=(0,t.jsxs)(n.Box,{sx:i,children:[a,o]}),A[6]=a,A[7]=o,A[8]=s):s=A[8],s}],770981);var g=e.i(497624),y=e.i(618566),b=e.i(268407);function x(e,t){let r=t[e]?.kind;return"spot"===r?`/trade/${e}`:`/trade/${encodeURIComponent(e)}`}function w(e){return e.instruments}e.s(["getTradePathFromInstrumentsMap",0,x],641883);let v=e=>{let i,a,o,s,A,l,c,u,h,p,v,C,B,S,k,E=(0,r.c)(23),{value:F,label:T,leverage:U,size:I,onClick:Q}=e,j=void 0===I?.1:I,L=(0,m.useTheme)(),{navigateToInstrument:_}
5=(C=(0,r.c)(5),B=(0,y.useRouter)(),S=(0,b.useTradingDataStore)(w),C[0]!==S||C[1]!==B?(p=(e,t)=>{let r=x(e,S);t?.replace?B.replace(r):B.push(r)},C[0]=S,C[1]=B,C[2]=p):p=C[2],k=p,C[3]!==k?(v={navigateToInstrument:k},C[3]=k,C[4]=v):v=C[4],v);E[0]!==_||E[1]!==Q||E[2]!==F?(i=Q??(()=>_(F)),E[0]=_,E[1]=Q,E[2]=F,E[3]=i):i=E[3];let P=i;E[4]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",alignItems:"center",gap:.5,cursor:"pointer"},E[4]=a):a=E[4];let D=`${F}-logo`;E[5]===Symbol.for("react.memo_cache_sentinel")?(o={objectFit:"cover",objectPosition:"center"},E[5]=o):o=E[5],E[6]!==D||E[7]!==F?(s=(0,t.jsx)(g.CryptoIcon,{alt:D,symbol:F,width:16,height:16,style:o}),E[6]=D,E[7]=F,E[8]=s):s=E[8],E[9]===Symbol.for("react.memo_cache_sentinel")?(A={display:"flex",gap:1,alignItems:"center"},E[9]=A):A=E[9];let R=T??F;return E[10]!==R?(l=(0,t.jsx)(d.Typography,{variant:"body1",children:R}),E[10]=R,E[11]=l):l=E[11],E[12]!==U||E[13]!==j||E[14]!==L?(c=U&&(0,t.jsxs)(d.Typography,{ml:1,variant:"caption",sx:{backgroundColor:j>=0?(0,f.varAlpha)(L.vars.palette.primary.mainChannel,.16):(0,f.varAlpha)(L.vars.palette.secondary.mainChannel,.15),color:j>=0?"primary.main":"secondary.light",display:"inline",paddingX:"6px",paddingY:"2px",borderRadius:"4px"},children:[U,"x"]}),E[12]=U,E[13]=j,E[14]=L,E[15]=c):c=E[15],E[16]!==c||E[17]!==l?(u=(0,t.jsxs)(n.Box,{sx:A,children:[l,c]}),E[16]=c,E[17]=l,E[18]=u):u=E[18],E[19]!==P||E[20]!==u||E[21]!==s?(h=(0,t.jsxs)(n.Box,{sx:a,onClick:P,children:[s,u]}),E[19]=P,E[20]=u,E[21]=s,E[22]=h):h=E[22],h};e.s(["InstrumentCell",0,v],774804),e.s([],112486);var C=e.i(344873),B=e.i(143813);function S(e={}){let{id:r="instrument",header:n="Instrument",key:i="instrument",leverageKey:a,sizeKey:o,sortable:s=!0,onInstrumentClick:A}=e;return{id:r,header:n,accessorKey:i,cell:({getValue:e,row:r})=>{let n=String(e());return(0,t.jsx)(v,{value:n,leverage:a?String(r.original[a]??""):void 0,size:o?parseFloat(String(r.original[o]??0)):void 0,onClick:A?()=>A(n):void 0})},sortable:s}}function k(e,r,n={}){let{useTickSize:i=!0,currency:a="$",decimals:o,instrumentKey:s="instrument",sortable:A=!0,suffix:l,fallback:c}=n;return{id:e,header:r,accessorKey:e,cell:({getValue:e,row:r})=>{let n=e();return c&&(null==n||""===n||"--"===n)?(0,t.jsx)(d.Typography,{variant:"body1",children:c}):(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(parseFloat(String(n??0)),{useTickSize:i,instrument_name:String(r.original[s]??""),currency:a,decimals:o,suffix:l})})},sortable:A,sortType:"number"}}function E(e,r,n={}){let{useContractSize:i=!0,decimals:a,instrumentKey:o="instrument",sortable:s=!0,fallback:A}=n;return{id:e,header:r,accessorKey:e,cell:({getValue:e,row:r})=>(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(parseFloat(String(e()??0)),{useContractSize:i,instrument_name:String(r.original[o]??""),decimals:a,fallback:A})}),sortable:s,sortType:"number"}}function F(e,r="Time",n={}){let{sortable:i=!0}=n;return{id:e,header:r,accessorKey:e,accessorFn:t=>{let r=t[e];return"number"==typeof r?r<1e12?1e3*r:r:new Date(String(r)).getTime()},cell:({getValue:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatTableDateTime)(e())}),sortable:i,sortType:"number"}}function T(e="side",r="Side",n={}){let{getDirection:i,sortable:a=!0}=n;return{id:e,header:r,accessorKey:e,cell:({getValue:e,row:r})=>{if(i){let{direction:e,color:n}=i(r.original);return(0,t.jsx)(d.Typography,{variant:"body1",color:n,children:e})}let n=String(e()),a="b"===n||"long"===n||"buy"===n;return(0,t.jsx)(d.Typography,{variant:"body1",color:a?"primary.light":"secondary.light",children:a?"Long":"Short"})},sortable:a}}function U(e,r,n,i={}){let{sortable:a=!1,sortType:o,transform:s}=i;return{id:e,header:r,accessorKey:n,cell:({getValue:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:s?s(e()):String(e()??"")}),sortable:a,...o&&{sortType:o}}}function I(e,r,n,i={}){let{trueText:a="Yes",falseText:o="No",sortable:s=!0}=i;return{id:e,header:r,accessorKey:n,cell:({getValue:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:e()?a:o}),sortable:s}}function Q(e,r,n={}){let{currency:i="$",decimals:a=2,sortable:o=!1}=n;return{id:e,header:r,accessorKey:e,cell:({getValue:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(Number(e()),{currency:i,decimals:a})}),sortable:o,...o&&{sortType:"number"}}}function j(e,r){return{id:e,header:r,cell:()=>(0,t.jsx)(d.Typography,{variant:"body1",children:"--"}),sortable:!1}}function L(e,r="Size",n={}){let{sortable:i=!0}=n;return{id:e,header:r,accessorKey:e,cell:({getValue:e})=>{let r=parseFloat(String(e()??0)),n=r>=0?`+${r}`:String(r);return(0,t.jsx)(d.Typography,{variant:"body1",color:r>=0?"primary.main":"secondary.light",children:n})},sortable:i,sortType:"number"}}function _(){return{instrument:e=>S(e),price:(e,t,r)=>k(e,t,r),size:(e,t,r)=>E(e,t,r),signedSize:(e,t,r)=>L(e,t,r),timestamp:(e,t,r)=>F(e,t,r),side:(e,t,r)=>T(e,t,r),text:(e,t,r,n)=>U(e,t,r,n),boolean:(e,t,r,n)=>I(e,t,r,n),currency:(e,t,r)=>Q(e,t,r),placeholder:(e,t)=>j(e,t),custom:e=>e}}let P={instrument:e=>_().instrument(e),price:(e,t="Price")=>_().price(e,t),size:(e,t="Size")=>_().size(e,t),time:(e,t="Time")=>_().timestamp(e,t),side:(e="side")=>_().side(e,"Side"),fee:(e="fee")=>_().currency(e,"Fee"),yesNo:(e,t,r)=>_().boolean(e,t,r),txt:(e,t,r)=>_().text(e,t,r),empty:(e,t)=>_().placeholder(e,t),asset:(e,r,n="Asset")=>({id:e,header:n,accessorKey:e,cell:({row:e})=>(0,t.jsx)(p,{title:r(e.original),leadingIcon:(0,B.getCryptoIcon)(r(e.original).toLowerCase())}),sortable:!0}),value:(e,r,n,i="instrument")=>({id:e,header:r,accessorFn:n,cell:({getValue:e,row:r})=>(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(e(),{useTickSize:!0,instrument_name:String(r.original[i]??""),currency:"$"})}),sortable:!0,sortType:"number"}),filled:()=>[{id:"filled_amount",header:"Filled",accessorKey:"unfilled",cell:({row:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(parseFloat(e.original.size)-parseFloat(e.original.unfilled),{useContractSize:!0,instrument_name:e.original.instrument})}),sortable:!0,sortType:"number"},_().size("unfilled","Unfilled")]};function D(e){return e.is_market||"IOC"===e.tif}function R(e){let t;if(!e.tpsl)return"N/A";let r=e.trigger_px||e.trigger_price||"";if(!r)return"--";let n="tp"===e.tpsl&&"s"===e.side||"sl"===e.tpsl&&"b"===e.side;return`Price ${n?"above":"below"} ${Number.isFinite(t=Number(r))?String(t):r}`}e.s(["col",0,{instrument:S,price:k,size:E,signedSize:L,timestamp:F,side:T,text:U,boolean:I,currency:Q,placeholder:j,custom:function(e){return e}},"createColumns",0,_,"q",0,P],619260),e.s(["getBaseAsset",0,function(e){return e.split("-")[0]||e},"getOrderTypeLabel",0,function(e){return"tp"===e.tpsl?e.is_market?"Take Profit Market":"Take Profit Limit":"sl"===e.tpsl?e.is_market?"Stop Market":"Stop Limit":e.is_market||"IOC"===e.tif?"Market":"GTC"===e.tif?"Limit":String(e.tif??"")},"getPriceLabel",0,function(e){return D(e)?"Market":(0,C.formatNumber)(Number(e.limit_price),{useTickSize:!0,instrument_name:e.instrument,currency:"$"})},"getSideLabel",0,function(e){return"b"===e.side?{label:"Long",color:"primary.light"}:{label:"Short",color:"secondary.light"}}
5,"getTriggerConditionLabel",0,R,"getTriggerLabel",0,function(e){if(!e.tpsl)return"N/A";let t=Number(e.trigger_px||e.trigger_price||"");return!Number.isFinite(t)||t<=0?"N/A":(0,C.formatNumber)(t,{useTickSize:!0,instrument_name:e.instrument,currency:"$"})},"getValueLabel",0,function(e){return D(e)?"Market":(0,C.formatNumber)(parseFloat(e.limit_price)*parseFloat(e.size),{useTickSize:!0,instrument_name:e.instrument,currency:"$"})}],461008);let M=e=>{let t=String(e??"");return t.includes(",")||t.includes('"')||t.includes("\n")?`"${t.replace(/"/g,'""')}"`:t},O=e=>{let t={openLong:"Open Long",openShort:"Open Short",closeLong:"Close Long",closeShort:"Close Short",flipToShort:"Long > Short",flipToLong:"Short > Long"};if(e.liquidation_info){let r=e.liquidation_info.method,n="market"===r?"Book Liquidation":"backstop"===r?"Backstop Liquidation":"Auto De-leveraging";return e.direction in t&&(n+=` (${t[e.direction]})`),n}return t[e.direction]??("b"===e.side?"Buy":"Sell")},N=e=>"number"==typeof e?e<1e12?1e3*e:e:new Date(String(e)).getTime(),H=e=>R({instrument_id:e.instrument_id,instrument:e.instrument,side:e.side,position_side:e.position_side??"",limit_price:e.limit_price,size:e.size,cloid:e.cloid,tif:e.tif,post_only:e.post_only,reduce_only:e.reduce_only,trigger_px:e.trigger_px??"",trigger_price:e.trigger_price,is_market:e.is_market??"IOC"===e.tif,tpsl:"tp"===e.tpsl||"sl"===e.tpsl?e.tpsl:"",grouping:e.grouping??"",spot_order_info:e.spot_order_info}),V=e=>{let t=b.useTradingDataStore.getState().instruments,r=Object.values(t).find(t=>t.id===e),n=Object.values(t)[0];return r?.name??n?.name??String(e)};function K(e){let t={};for(let r of e)t[r.id]=!0;return{responsive:{columnVisibility:{lg:t},columnCellRenderers:{}}}}function G(e,t={}){let{showIndicator:r=!0,mdGridColumns:n=2,smGridColumns:i=3,detailsOrder:a,footerComponent:o,customCardRenderer:s}=t;return{collapsible:{enabled:!0,showIndicator:r,breakpoints:{md:{primaryFields:e,gridColumns:n,...a&&{detailsOrder:a}},sm:{primaryFields:e,gridColumns:i,...a&&{detailsOrder:a}}},...o&&{footerComponent:o},...s&&{customCardRenderer:s}}}}function W(e,t={}){let{multiSort:r=!0,maxMultiSortColCount:n=3,desc:i=!0}=t;return{sorting:{multiSort:r,maxMultiSortColCount:n,defaultSort:[{id:e,desc:i}]}}}e.s(["createFetchAllFundingHistory",0,(e,t)=>async()=>{if(!t)return[];let r=new Map,n=0,i=!0;for(;i&&n<100;)try{let a=await e.fundingHistory({user:t,limit:100,page:n}),o=a?.data??[];o.forEach(e=>{r.set(`${e.timestamp}-${e.instrument_id}-${e.size}-${e.funding_payment}-${e.funding_rate}`,e)}),o.length<100?i=!1:n+=1}catch{break}return Array.from(r.values())},"createFetchAllOrderHistory",0,(e,t)=>async()=>{if(!t)return[];let r=new Map,n=0,i=!0;for(;i&&n<100;)try{let a=await e.orderHistory({user:t,limit:100,page:n}),o=a?.data??[];o.forEach(e=>r.set(e.order_id,e)),o.length<100?i=!1:n+=1}catch{break}return Array.from(r.values())},"createFetchAllTradeHistory",0,(e,t)=>async()=>{if(!t)return[];let r=new Map,n=0,i=!0;for(;i&&n<100;)try{let a=await e.tradeHistory({user:t,limit:100,page:n}),o=a?.data??[];o.forEach(e=>r.set(e.trade_id,e)),o.length<100?i=!1:n+=1}catch{break}return Array.from(r.values())},"fundingPaymentToCsv",0,e=>{let t=["Time,Asset,Size,Position Side,Payment,Funding Rate"];for(let r of Array.from(new Map(e.map(e=>[`${e.timestamp}-${e.instrument_id}-${e.size}-${e.funding_payment}-${e.funding_rate}`,e])).values()).sort((e,t)=>N(t.timestamp)-N(e.timestamp))){let e=V(r.instrument_id),n=parseFloat(r.size),i=N(r.timestamp);t.push([M(Number.isNaN(i)?"":(0,C.formatTableDateTime)(i)),M(e.split("-")[0]),M((0,C.formatNumber)(n,{decimals:2,useContractSize:!0,instrument_name:e,fallback:"--"})),M(n>0?"Long":"Short"),M(r.funding_payment),M(r.funding_rate)].join(","))}return t.join("\n")},"orderHistoryToCsv",0,e=>{let t=["Instrument,Side,Time,Filled,Unfilled,Original Size,Order Value,Price,Reduce Only,Status,Order ID,TP/SL,Trigger C
5onditions"];for(let r of Array.from(new Map(e.map(e=>[e.order_id,e])).values()).sort((e,t)=>N(t.timestamp)-N(e.timestamp))){let e=N(r.timestamp),n=parseFloat(r.size)-parseFloat(r.unfilled),i=parseFloat(r.limit_price)*parseFloat(r.size);t.push([M(r.instrument),M("b"===r.side?"Long":"Short"),M(Number.isNaN(e)?"":(0,C.formatTableDateTime)(e)),M((0,C.formatNumber)(n,{useContractSize:!0,instrument_name:r.instrument})),M((0,C.formatNumber)(parseFloat(r.unfilled),{useContractSize:!0,instrument_name:r.instrument})),M((0,C.formatNumber)(parseFloat(r.size),{useContractSize:!0,instrument_name:r.instrument})),M((0,C.formatNumber)(i,{useTickSize:!0,instrument_name:r.instrument,currency:"$"})),M("IOC"===r.tif?"Market":(0,C.formatNumber)(parseFloat(r.limit_price),{useTickSize:!0,instrument_name:r.instrument,currency:"$"})),M(r.reduce_only?"Yes":"No"),M(String(r.state).charAt(0).toUpperCase()+String(r.state).slice(1)),M(r.order_id),M(r.tpsl?.trim()?r.tpsl.toUpperCase():"--"),M(H(r))].join(","))}return t.join("\n")},"tradeHistoryToCsv",0,e=>{let t=["Instrument,Direction,Time,Price,Size,Trade Value,Fee,PnL (ROI%)"];for(let r of Array.from(new Map(e.map(e=>[e.trade_id,e])).values()).sort((e,t)=>N(t.block_timestamp)-N(e.block_timestamp))){let e=N(r.block_timestamp),n=parseFloat(r.price)*parseFloat(r.size);t.push([M(r.instrument),M(O(r)),M(Number.isNaN(e)?"":(0,C.formatTableDateTime)(e)),M((0,C.formatNumber)(parseFloat(r.price),{useTickSize:!0,instrument_name:r.instrument,currency:"$"})),M((0,C.formatNumber)(parseFloat(r.size),{useContractSize:!0,instrument_name:r.instrument})),M((0,C.formatNumber)(n,{useTickSize:!0,instrument_name:r.instrument,currency:"$"})),M((0,C.formatNumber)(parseFloat(r.fee),{currency:"$",decimals:2})),M(r.instrument.includes("-")?(0,C.formatNumber)(Number(r.closed_pnl),{currency:"$",maxDecimals:2}):"--")].join(","))}return t.join("\n")}],214440),e.s([],208085);let z={responsive:K,responsiveCustom:function(e){let t={};for(let[r,n]of Object.entries(e))for(let e of(t[r]={},n))t[r][e]=!0;return{responsive:{columnVisibility:t,columnCellRenderers:{}}}},collapsible:G,sorting:W,standard:function(e,t,r,n={}){return{...K(e),...G(t,n.collapsible),...W(r,n.sorting)}}};function $(e,t={}){return{name:e,iconPath:t.icon,isLoading:t.loading??!1,isError:t.error??!1,maxRows:t.maxRows,noDataMessage:t.noDataMessage??`No ${e.toLowerCase()} yet`,getRowIndicator:t.getRowIndicator,backgroundImage:t.backgroundImage}}e.s(["presets",0,z],153973);let q=e=>"b"===e.side?"long":"short";e.s(["sideIndicator",0,q,"tableConfig",0,$],244337),e.s(["ClosedPnlCellWithShare",()=>ee],240570);var X=e.i(162282);e.i(992550);var Y=e.i(407585);e.i(164485);var J=e.i(392953),Z=e.i(709643);let ee=e=>{let i,a,o=(0,r.c)(11),{closedPnl:s,trade:A,isVault:l}=e,c=void 0!==l&&l,u=(0,Z.useTranslations)(),{setModal:h,setPayload:p}=(0,b.useActionStore)(),m=(0,b.useUserTradingDataStore)(e=>e.leverage[A.instrument]?.leverage)??1;o[0]===Symbol.for("react.memo_cache_sentinel")?(i={passthrough:!0},o[0]=i):i=o[0];let f=(0,J.useEasterEgg)(J.BUTTON.TRADE_HISTORY_SHARE,i);if(en(A,u),o[1]!==s||o[2]!==c||o[3]!==m||o[4]!==h||o[5]!==p||o[6]!==u||o[7]!==A||o[8]!==f){let e,r=er(u)[A.direction]?.tradeType,i="closeLong"===A.direction||"flipToShort"===A.direction,l="closeShort"===A.direction||"flipToLong"===A.direction,g=parseFloat(A.price||"0"),y=parseFloat(A.start_price||"0"),b=0;0!==y&&(i||l)&&(b=(i?g-y:y-g)/y*100*m),o[10]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.5},o[10]=e):e=o[10],a=(0,t.jsx)(n.Box,{sx:e,children:A.instrument.includes("-")?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Typography,{variant:"body1",color:s>=0?"primary.main":"secondary.light",component:"span",sx:{display:"inline"},children:(0,C.formatNumber)(s,{currency:"$",maxDecimals:2})}),(i||l)&&!c&&(0,t.jsx)(X.IconButton,{size:"small",onClick:f(()=>{let e=parseFloat(A.price||"0");p({trade:A,closedPnl:s,roi:b,instrumentName:A.instrument,direction:r,price:e,leverage:m}),h("trade-history-share-card")}),sx:{padding:"6px",margin:"-4px",color:"text.secondary","&:hover, &:active":{color:"#ffffff"}},children:(0,t.jsx)(Y.Iconify,{icon:"eva:external-link-outline",width:16,height:16})})]}):(0,t.jsx)(d.Typography,{variant:"body1",color:"text.secondary",children:"--"})}),o[1]=s,o[2]=c,o[3]=m,o[4]=h,o[5]=p,o[6]=u,o[7]=A,o[8]=f,o[9]=a}else a=o[9];return a};var et=e.i(717931);let er=e=>({openLong:{direction:e("trade.openLong"),tradeType:e("common.long"),color:"primary.light"},openShort:{direction:e("trade.openShort"),tradeType:e("common.short"),color:"secondary.light"},closeLong:{direction:e("trade.closeLong"),tradeType:e("common.long"),color:"secondary.light"},closeShort:{direction:e("trade.closeShort"),tradeType:e("common.short"),color:"primary.light"},flipToShort:{direction:e("trade.longToShort"),tradeType:e("common.long"),color:"secondary.light"},flipToLong:{direction:e("trade.shortToLong"),tradeType:e("common.short"),color:"primary.light"}}),en=(e,t)=>{let r=er(t);if(e?.liquidation_info){let n=e.liquidation_info.method,i=t("market"===n?"trade.bookLiquidation":"backstop"===n?"trade.backstopLiquidation":"trade.autoDeleveraging");return e.direction in r&&(i+=` (${r[e.direction].direction})`),{direction:i,color:"secondary.light"}}return e.direction in r?r[e.direction]:{direction:t("b"===e.side?"common.buy":"common.sell"),color:"b"===e.side?"primary.main":"secondary.light"}};function ei({isLoading:e,isError:r,showFilters:n=!0,maxRows:i,isVault:s=!1,rowsPerPage:A,currentInstrument:l}){let d=(0,Z.useTranslations)(),u=_(),h=(0,a.useMemo)(()=>[u.instrument(),u.side("side",d("tables.tradeDirection"),{getDirection:e=>en(e,d)}),u.timestamp("block_timestamp",d("tables.tradeTime")),u.price("price",d("tables.tradePrice")),u.size("size",d("tables.tradeSize")),P.value("trade_value",d("tables.tradeValue"),e=>parseFloat(e.price)*parseFloat(e.size)),u.currency("fee",d("tables.tradeFee")),u.custom({id:"closed_pnl",header:d("tables.pnlRoi"),accessorKey:"closed_pnl",cell:({getValue:e,row:r})=>(0,t.jsx)(ee,{closedPnl:Number(e()),trade:r.original,isVault:s}),sortable:!0,sortType:"number"})],[u,s,d]),p=(0,b.useTradingDataStore)(e=>e.instruments),m=(0,a.useMemo)(()=>c(p,l),[p,l]),f=(0,a.useCallback)(q,[]);return(0,a.useMemo)(()=>({config:{...$(d("tables.tradeHistory"),{icon:o.tableIcons.history,loading:e,error:r,maxRows:i,getRowIndicator:f}),...null!=A&&{pagination:{rowsPerPage:A}}},columns:h,filters:m,filterUI:{show:n},...z.standard(h,["instrument"],"timestamp")}),[h,m,e,r,i,n,f,A,d])}function ea(e){let t,n,i,a,o,s=(0,r.c)(19),{vaultAddress:A,enabled:l,maxRows:c,showFilters:d}=e,u=void 0===l||l,h=void 0===c?10:c,p=void 0===d||d;s[0]!==u||s[1]!==A?(t={vaultAddress:A,enabled:u}
5,s[0]=u,s[1]=A,s[2]=t):t=s[2];let{isLoading:m,error:f}=(0,et.useTradeHistory)(t),g=(0,b.useUserTradingDataStore)(eA);s[3]!==A?(n=e=>A?e.vaults[A]:null,s[3]=A,s[4]=n):n=s[4];let y=(0,b.useVaultsStore)(n),x=(0,b.useTradingDataStore)(es),w=!!A;s[5]!==g||s[6]!==y?.trade_history||s[7]!==A?(i=(A?Object.values(y?.trade_history??{}):Object.values(g)).map(e=>({...e,block_timestamp:function(e){if("number"==typeof e)return e;let t=Date.parse(e);return isNaN(t)?Number(e):t}(e.block_timestamp)})).sort(eo),s[5]=g,s[6]=y?.trade_history,s[7]=A,s[8]=i):i=s[8];let v=i,C=!!f;s[9]!==m||s[10]!==w||s[11]!==h||s[12]!==x||s[13]!==p||s[14]!==C?(a={isLoading:m,isError:C,showFilters:p,maxRows:h,isVault:w,currentInstrument:x},s[9]=m,s[10]=w,s[11]=h,s[12]=x,s[13]=p,s[14]=C,s[15]=a):a=s[15];let B=ei(a);return s[16]!==B||s[17]!==v?(o={config:B,data:v},s[16]=B,s[17]=v,s[18]=o):o=s[18],o}function eo(e,t){return t.block_timestamp-e.block_timestamp}function es(e){return e.selectedInstrument}function eA(e){return e.tradeHistory}e.i(842917);var el=e.i(858532),ec=e.i(914289);function ed(e){return e.tpsl?.trim()?e.tpsl:null}function eu(e){return R({instrument_id:e.instrument_id,instrument:e.instrument,side:e.side,position_side:e.position_side??"",limit_price:e.limit_price,size:e.size,cloid:e.cloid,tif:e.tif,post_only:e.post_only,reduce_only:e.reduce_only,trigger_px:e.trigger_px??"",trigger_price:e.trigger_price,is_market:e.is_market??"IOC"===e.tif,tpsl:e.tpsl??"",grouping:e.grouping??"",spot_order_info:e.spot_order_info})}e.s(["useOrderHistoryConfig",0,function({vaultAddress:e,enabled:r=!0,maxRows:i=4,showFilters:s=!0}){let A=(0,Z.useTranslations)(),{isLoading:l,error:u}=(0,ec.useOrderHistory)({vaultAddress:e,refetch:!0,enabled:r}),h=(0,b.useUserTradingDataStore)(e=>e.orderHistory),p=(0,b.useVaultsStore)(t=>e?t.vaults[e]:null),m=(0,a.useMemo)(()=>e?p?.order_history??[]:Object.values(h),[e,p,h]),f=_(),g=(0,a.useMemo)(()=>[f.instrument(),f.side("side",A("tables.side")),f.timestamp("timestamp",A("common.time")),...P.filled(),f.size("size",A("tables.orderOriginalSize")),P.value("total_value",A("tables.orderOrderValue"),e=>parseFloat(e.limit_price)*parseFloat(e.size)),f.custom({id:"limit_price",header:A("tables.orderPrice"),accessorKey:"limit_price",cell:({getValue:e,row:r})=>"IOC"===r.original.tif?(0,t.jsx)(d.Typography,{variant:"body1",children:A("trade.market")}):(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(parseFloat(String(e()??0)),{useTickSize:!0,instrument_name:r.original.instrument,currency:"$"})}),sortable:!0,sortType:"number"}),f.boolean("reduce_only",A("tables.orderReduceOnly"),"reduce_only"),f.text("order_state",A("tables.orderStatus"),"state",{sortable:!0,transform:e=>String(e).charAt(0).toUpperCase()+String(e).slice(1)}),f.custom({id:"order_id",header:A("tables.orderOrderId"),accessorKey:"order_id",cell:({getValue:e})=>(0,t.jsxs)(n.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,t.jsx)(d.Typography,{variant:"body1",children:String(e()).slice(0,3)+"..."+String(e()).slice(-1)}),(0,t.jsx)(X.IconButton,{size:"small",onClick:()=>{navigator.clipboard.writeText(String(e())),el.showToast.success({message:A("common.copiedToClipboard")})},sx:{p:.5,color:"text.secondary","&:hover, &:active":{color:"#ffffff"}},children:(0,t.jsx)(Y.Iconify,{width:16,height:16,icon:"solar:copy-outline"})})]})}),f.custom({id:"tp_sl",header:A("trade.tpsl"),accessorFn:e=>ed(e),cell:({row:e})=>{let r=ed(e.original);return r?(0,t.jsx)(d.Typography,{variant:"body1",sx:{textTransform:"uppercase"},children:r}):(0,t.jsx)(d.Typography,{variant:"body1",children:"--"})},sortable:!1}),f.custom({id:"trigger_condition",header:A("tables.triggerConditions"),accessorFn:e=>eu(e),cell:({row:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:eu(e.original)}),sortable:!0,sortType:"string"})],[f,A]),y=(0,b.useTradingDataStore)(e=>e.selectedInstrument),x=(0,b.useTradingDataStore)(e=>e.instruments),w=(0,a.useMemo)(()=>c(x,y),[x,y]),v=(0,a.useCallback)(q,[]);return{config:(0,a.useMemo)(()=>({config:$(A("tables.orderHistory"),{icon:o.tableIcons.orders,loading:l,error:!!u,maxRows:i,getRowIndicator:v}),columns:g,filters:w,filterUI:{show:s},...z.standard(g,["instrument"],"timestamp")}),[g,w,l,u,i,s,v,A]),data:m}},"useOrderHistoryTableConfig",0,function({isLoading:e,isError:r,showFilters:i=!0,maxRows:s,rowsPerPage:A}){let l=(0,Z.useTranslations)(),u=_(),h=(0,a.useMemo)(()=>[u.instrument(),u.side("side",l("tables.side")),u.timestamp("timestamp",l("common.time")),...P.filled(),u.size("size",l("tables.orderOriginalSize")),P.value("total_value",l("tables.orderOrderValue"),e=>parseFloat(e.limit_price)*parseFloat(e.size)),u.custom({id:"limit_price",header:l("tables.orderPrice"),accessorKey:"limit_price",cell:({getValue:e,row:r})=>"IOC"===r.original.tif?(0,t.jsx)(d.Typography,{variant:"body1",children:l("trade.market")}):(0,t.jsx)(d.Typography,{variant:"body1",children:(0,C.formatNumber)(parseFloat(String(e()??0)),{useTickSize:!0,instrument_name:r.original.instrument,currency:"$"})}),sortable:!0,sortType:"number"}),u.boolean("reduce_only",l("tables.orderReduceOnly"),"reduce_only"),u.text("order_state",l("tables.orderStatus"),"state",{sortable:!0,transform:e=>String(e).charAt(0).toUpperCase()+String(e).slice(1)}),u.custom({id:"order_id",header:l("tables.orderOrderId"),accessorKey:"order_id",cell:({getValue:e})=>(0,t.jsxs)(n.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,t.jsx)(d.Typography,{variant:"body1",children:String(e()).slice(0,3)+"..."+String(e()).slice(-1)}),(0,t.jsx)(X.IconButton,{size:"small",onClick:()=>{navigator.clipboard.writeText(String(e())),el.showToast.success({message:l("common.copiedToClipboard")})},sx:{p:.5,color:"text.secondary"},children:(0,t.jsx)(Y.Iconify,{width:16,height:16,icon:"solar:copy-outline"})})]})}),u.custom({id:"tp_sl",header:l("trade.tpsl"),accessorKey:"tpsl",cell:({getValue:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:String(e())}),sortable:!1}),u.custom({id:"trigger_condition",header:l("tables.triggerConditions"),accessorFn:e=>
5eu(e),cell:({row:e})=>(0,t.jsx)(d.Typography,{variant:"body1",children:eu(e.original)}),sortable:!0,sortType:"string"})],[u,l]),p=(0,b.useTradingDataStore)(e=>e.instruments),m=(0,a.useMemo)(()=>c(p),[p]),f=(0,a.useCallback)(q,[]);return(0,a.useMemo)(()=>({config:{...$(l("tables.orderHistory"),{icon:o.tableIcons.orders,loading:e,error:r,maxRows:s,getRowIndicator:f}),...null!=A&&{pagination:{rowsPerPage:A}}},columns:h,filters:m,filterUI:{show:i},...z.standard(h,["instrument"],"timestamp")}),[h,m,e,r,s,i,f,A,l])}],312027);var eh=e.i(473361);e.s(["CollapsibleCardFooter",0,e=>{let n,i,a=(0,r.c)(4),{children:o,className:s}=e,A=s?`${eh.default.footer} ${s}`:eh.default.footer;return a[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)("div",{className:eh.default.divider}),a[0]=n):n=a[0],a[1]!==o||a[2]!==A?(i=(0,t.jsxs)(t.Fragment,{children:[n,(0,t.jsx)("div",{className:A,children:o})]}),a[1]=o,a[2]=A,a[3]=i):i=a[3],i}],456284);let ep=e=>{let i,a,o,s,A,l,c=(0,r.c)(19),{pnl:u,roi:h,trailing:p,sx:m}=e,f=void 0===h?null:h;if(null==u){let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(d.Typography,{variant:"body1",children:"--"}),c[0]=e):e=c[0],e}let g=1e-10>Math.abs(u)?0:u,y=null!=f,b=y&&Math.abs(f)>=1e-10?f:0,x=g>0?"primary.light":"secondary.light",w=b>=0?"+":"";return c[1]!==m?(i={display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"nowrap",gap:.5,whiteSpace:"nowrap",...m},c[1]=m,c[2]=i):i=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(a={display:"inline"},c[3]=a):a=c[3],c[4]!==g?(o=(0,C.formatNumber)(g,{currency:"$",maxDecimals:2}),c[4]=g,c[5]=o):o=c[5],c[6]!==x||c[7]!==o?(s=(0,t.jsx)(d.Typography,{variant:"body1",color:x,component:"span",sx:a,children:o}),c[6]=x,c[7]=o,c[8]=s):s=c[8],c[9]!==x||c[10]!==y||c[11]!==b||c[12]!==w?(A=y&&(0,t.jsxs)(d.Typography,{variant:"body1",color:x,component:"span",sx:{whiteSpace:"nowrap"},children:["(",`${w}${(0,C.formatNumber)(b,{maxDecimals:1,suffix:"%"})}`,")"]}),c[9]=x,c[10]=y,c[11]=b,c[12]=w,c[13]=A):A=c[13],c[14]!==i||c[15]!==s||c[16]!==A||c[17]!==p?(l=(0,t.jsxs)(n.Box,{sx:i,children:[s,A,p]}),c[14]=i,c[15]=s,c[16]=A,c[17]=p,c[18]=l):l=c[18],l};e.s(["PnlRoiDisplay",0,ep],809249),e.s(["PnlCellWithShare",0,e=>{let n,i,a,o=(0,r.c)(15),{pnl:s,roi:A,position:l,instrumentName:c,isVault:d,isSpot:u}=e,h=void 0!==d&&d,p=void 0!==u&&u,{setModal:m,setPayload:f}=(0,b.useActionStore)();o[0]!==c||o[1]!==p||o[2]!==s||o[3]!==l||o[4]!==A||o[5]!==m||o[6]!==f?(n=e=>{e.stopPropagation();let t=parseFloat(l.entry_price||"0"),r=l.leverage||"1x",n=parseFloat(l.size||"0"),i=t;0!==n&&t>0&&(i=t+s/n),f({position:l,pnl:s,roi:A,instrumentName:c,entryPrice:t,markPrice:i,leverage:r,isSpot:p}),m("share-card")},o[0]=c,o[1]=p,o[2]=s,o[3]=l,o[4]=A,o[5]=m,o[6]=f,o[7]=n):n=o[7];let g=n;return o[8]!==g||o[9]!==h?(i=!h&&(0,t.jsx)(X.IconButton,{size:"small",onClick:g,sx:{padding:.5,"&:hover":{backgroundColor:"action.hover"}},children:(0,t.jsx)(Y.Iconify,{icon:"eva:external-link-outline",width:16,height:16,sx:{color:"text.secondary"}})}),o[8]=g,o[9]=h,o[10]=i):i=o[10],o[11]!==s||o[12]!==A||o[13]!==i?(a=(0,t.jsx)(ep,{pnl:s,roi:A,trailing:i}),o[11]=s,o[12]=A,o[13]=i,o[14]=a):a=o[14],a}],5910)},314116,753868,955265,199304,642409,194130,e=>{"use strict";e.s(["usePositionsConfig",()=>v],314116);var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(838456),a=e.i(782904),o=e.i(772475),s=e.i(463983);e.i(405858);var A=e.i(836872);e.i(208085);var l=e.i(619260),c=e.i(153973),d=e.i(456284),u=e.i(344873);e.i(992550);var h=e.i(407585),p=e.i(5910);e.i(102970);var m=e.i(744048),f=e.i(794406),g=e.i(268407),y=e.i(346944),b=e.i(17596),x=e.i(709643);let w=e=>{let n,i,a,s=(0,r.c)(9),{icon:A,onClick:l}=e,c=(0,o.useActionDisabled)("trading-enabled"),d=c?void 0:l;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={color:"white"},s[0]=n):n=s[0];let u=c?.5:1,p=c?"not-allowed":"pointer",m=c?"none":"auto";return s[1]!==u||s[2]!==p||s[3]!==m?(i={color:"text.secondary","&:hover":n,opacity:u,cursor:p,pointerEvents:m},s[1]=u,s[2]=p,s[3]=m,s[4]=i):i=s[4],s[5]!==A||s[6]!==d||s[7]!==i?(a=(0,t.jsx)(h.Iconify,{icon:A,width:16,height:16,onClick:d,sx:i}
5),s[5]=A,s[6]=d,s[7]=i,s[8]=a):a=s[8],a};function v({vaultAddress:e,enabled:r=!0,maxRows:h=4,showFilters:C=!0}){let B=(0,x.useTranslations)(),[S,k]=(0,n.useState)(null),[E,F]=(0,n.useState)(!1),[T,U]=(0,n.useState)("market"),I=(0,g.useUserTradingDataStore)((0,y.useShallow)(e=>e.positions)),Q=(0,g.useUserTradingDataStore)((0,y.useShallow)(e=>e.openOrders)),j=(0,g.useUserTradingDataStore)((0,y.useShallow)(e=>e.accountSummary)),L=(0,g.useTradingDataStore)((0,y.useShallow)(e=>e.tickers)),_=(0,g.useVaultsStore)((0,y.useShallow)(t=>e?t.vaults[e]:null)),P=(0,g.useVaultsStore)((0,y.useShallow)(e=>e.subVaultAccountSummaries)),{setModal:D,setPayload:R}=(0,g.useActionStore)(),M=(0,g.useVaultsStore)(),O=e?M.getTableLoading(e).positions:(0,g.useUserTradingDataStore)(e=>e.loadingTable.positions),N=e?M.getTableSuccess(e).positions:(0,g.useUserTradingDataStore)(e=>e.successTable.positions),H=!e&&null!==(0,g.useUserTradingDataStore)(e=>e.error);(0,b.usePositions)({vaultAddress:e,enabled:N&&r});let V=(0,n.useCallback)((e,t)=>{k(`${e.instrument_id}:${e.position_side}`),U(t),F(!0)},[]),K=(0,n.useCallback)(e=>{R(e.instrument_id),D("tp-sl")},[R,D]),G=(0,n.useCallback)(e=>{R(e.instrument_id),D("isolated-margin-update")},[R,D]),W=(0,n.useCallback)(()=>D("close-all-positions"),[D]),z=(0,n.useCallback)(()=>{F(!1),k(null)},[]),$=(0,n.useMemo)(()=>{let t=e?Object.values(_?.positions||{}):Object.values(I);if(!t||!Array.isArray(t))return[];let r=Object.values(Q).filter(e=>""!==e.tpsl);return t.map(t=>{let n=r.filter(e=>e.instrument_id===t.instrument_id),i=n.find(e=>"tp"===e.tpsl),a=n.find(e=>"sl"===e.tpsl),o=L[t.instrument],s=o?parseFloat(o.mark_price):0,A=parseFloat(t.entry_price),l=parseFloat(t.size),c=t.liquidation_price,d=t.margin,u=0,h=0;if(e){let e=P[t.user],r=e?.perp_positions?Object.values(e.perp_positions).find(e=>e.legs.some(e=>e.instrument_id===t.instrument_id)):void 0;r&&(c=r.liquidation_price.toString(),d=r.im.toString(),u=r.cum_funding,h=r.rpnl??0)}else{let e=j?.perp_positions?Object.values(j.perp_positions).find(e=>e.legs.some(e=>e.instrument_id===t.instrument_id)):void 0;e&&(c=e.liquidation_price.toString(),d=e.im.toString(),u=e.cum_funding,h=e.rpnl??0)}return{...t,liquidation_price:c??"--",margin:d??"--",mark_price:o?.mark_price??"0",unrealized_pnl:((s-A)*l).toString(),rpnl:h.toString(),position_value:Math.abs(l*s).toString(),cum_funding:u.toString(),tpPrice:i?.trigger_px??"",slPrice:a?.trigger_px??"",tpSize:i?.size??"",slSize:a?.size??""}})},[e,_,I,Q,L,j,P]),q=(0,n.useMemo)(()=>S?e?_?.positions?.[S]??null:I[S]??null:null,[S,e,_,I]),X=!!e,Y=(0,g.useTradingDataStore)(e=>e.selectedInstrument),J=(0,n.useMemo)(()=>(function({isVault:e,t:r}){let n=(0,l.createColumns)(),s=n.custom({id:"pnl",header:r("tables.pnlRoi"),accessorFn:e=>parseFloat(e.unrealized_pnl),cell:({row:e,table:r})=>{let{mark_price:n,entry_price:i,size:a,margin:o,instrument:s}=e.original,A=(parseFloat(n)-parseFloat(i))*parseFloat(a),l=0!==parseFloat(o)?A/parseFloat(o)*100:0;return(0,t.jsx)(p.PnlCellWithShare,{pnl:A,roi:l,position:e.original,instrumentName:s,isVault:r?.options?.meta?.isVault??!1})},sortable:!0,sortType:"number"}),A=[n.instrument({leverageKey:"leverage",sizeKey:"size"}),n.signedSize("size",r("common.size")),n.price("position_value",r("tables.positionValue"),{suffix:" USDC",currency:""}),n.price("entry_price",r("tables.entryPrice"),{currency:""}),n.price("mark_price",r("tables.markPrice"),{currency:""}),n.price("liquidation_price",r("trade.liqPrice"),{currency:"",fallback:"--"})];return e?[...A,s]:[...A,n.custom({id:"margin",header:r("tables.margin"),cell:({row:e,table:n})=>{let o=n?.options?.meta?.openIsolatedMarginModal;return(0,t.jsxs)(i.Box,{sx:{display:"flex",gap:.5,alignItems:"flex-start"},children:[(0,t.jsx)(a.Typography,{variant:"body1",children:`${(0,u.formatNumber)(parseFloat(e.original.margin??"0"),{useTickSize:!0,instrument_name:e.original.instrument})} ${"isolated"===e.original.margin_mode?"("+r("tables.isolated")+")":""}`}),"isolated"===e.original.margin_mode&&(0,t.jsx)(w,{icon:"material-symbols-light:edit-outline-sharp",onClick:()=>o?.(e.original)})]})},sortable:!1}),s,n.custom({id:"tpSl",header:Object.assign(()=>(0,t.jsx)("span",{style:{display:"block",textAlign:"right",width:"100%"},children:r("trade.tpsl")}),{toString:()=>r("trade.tpsl")}),cell:({row:e,table:r})=>{let n=r?.options?.meta?.openTpSlModal;return(0,t.jsxs)(i.Box,{sx:{display:"flex",gap:.5,alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:.2},children:[(0,t.jsx)(a.Typography,{variant:"body1",children:e.original.tpPrice?(0,u.formatNumber)(parseFloat(e.original.tpPrice||"0"),{useTickSize:!0,instrument_name:e.original.instrument}):"--"}),(0,t.jsx)(a.Typography,{variant:"body1",children:" / "}),(0,t.jsx)(a.Typography,{variant:"body1",children:e.original.slPrice?(0,u.formatNumber)(parseFloat(e.original.slPrice||"0"),{useTickSize:!0,instrument_name:e.original.instrument}):"--"})]}),(0,t.jsx)(w,{icon:"material-symbols-light:edit-outline-sharp",onClick:()=>n?.(e.original)})]})},sortable:!1}),n.custom({id:"cum_funding",header:r("trade.funding"),accessorKey:"cum_funding",cell:({row:e})=>{let r=parseFloat(e.original.cum_funding),n=1e-10>Math.abs(r);return(0,t.jsxs)(a.Typography,{variant:"body1",color:n?void 0:r>0?"primary.main":"secondary.light",children:["$",Number(r).toFixed(2)]})},sortable:!0,sortType:"number"}),n.custom({id:"actions",header:({table:e})=>{let n=e?.options?.meta?.onCloseAll;return(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"soft",size:"small",color:"secondary",onClick:e=>{e.stopPropagation(),n()},children:r("tables.closeAll")})},cell:({row:e,table:n})=>{let a=n?.options?.meta?.onOpenCloseDialog;return(0,t.jsxs)(i.Box,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"small",onClick:()=>a?.(e.original,"limit"),children:r("trade.limit")}),(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"small",onClick:()=>a?.(e.original,"market"),children:r("trade.market")})]})},sortable:!1})]})({isVault:X,t:B}),[X,B]),Z=(0,g.useTradingDataStore)(e=>e.instruments),ee=(0,n.useMemo)(()=>(0,A.createSideAssetTypeFiltersWithOptions)(Z,Y),[Z,Y]),et=(0,n.useMemo)(()=>({onOpenCloseDialog:V,openTpSlModal:K,openIsolatedMarginModal:G,onCloseAll:W,isVault:X}),[V,K,G,W,X]),er=(0,n.useCallback)(e=>{let t=parseFloat(e.size);return 0===t?null:t>0?"long":"short"},[]),en=(0,n.useMemo)(()=>
5{if(!X)return({row:e,table:r})=>(0,t.jsx)(d.CollapsibleCardFooter,{children:(0,t.jsxs)(i.Box,{sx:{display:"flex",gap:1,flexDirection:"row"},children:[(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"medium",fullWidth:!0,onClick:t=>{t.stopPropagation(),r?.options?.meta?.onOpenCloseDialog?.(e,"limit")},children:B("trade.limit")}),(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"medium",fullWidth:!0,onClick:t=>{t.stopPropagation(),r?.options?.meta?.onOpenCloseDialog?.(e,"market")},children:B("trade.market")})]})})},[X,B]);return{config:(0,n.useMemo)(()=>({config:{name:B("tables.positions"),iconPath:s.tableIcons.positions,noDataMessage:B("tables.noOpenPositions"),isLoading:O,isError:H,maxRows:h,getRowIndicator:er},columns:J,filters:ee,filterUI:{show:C},meta:et,...c.presets.responsive(J),...c.presets.collapsible(["instrument"],{detailsOrder:["size","position_value","entry_price","mark_price","liquidation_price","margin","pnl","cum_funding",...X?[]:["tpSl"]],mdGridColumns:3,smGridColumns:3,footerComponent:en}),...c.presets.sorting("unrealized_pnl")}),[J,ee,C,et,O,H,h,er,X,en,B]),data:$,modals:(0,n.useMemo)(()=>(0,t.jsxs)(t.Fragment,{children:[q&&"limit"===T&&(0,t.jsx)(m.LimitCloseModal,{open:E,onClose:z,position:q}),q&&"market"===T&&(0,t.jsx)(f.MarketCloseModal,{open:E,onClose:z,position:q})]}),[q,T,E,z]),onCloseAll:W}}var C=e.i(81121),B=e.i(461008);function S(e){return e?.spot_order_info?.spot_routing==="rfq"}function k(e){if(!e||!S(e))return null;if("filled"===e.state)return"filled";if("cancelled"===e.state)return"cancelled";let t=e.spot_order_info;return t?t.rfq_swaps>=1&&0===t.rfq_unfilled?"settling":"requesting_quote":null}let E={requesting_quote:"Fetching Quote",settling:"Settling Order",filled:"Order Filled",cancelled:"Order Cancelled"};function F(e){return e?E[e]:"-"}function T(e,t){let r=[],n=[],i=new Set;for(let a of Object.values(e)){if(!S(a))continue;let e=a.instrument?t[a.instrument]:void 0;if(!e||"spot"!==e.kind||e.delisted)continue;let o=k(a);"requesting_quote"===o?(r.push(a),i.add(a.order_id)):"settling"===o&&(n.push(a),i.add(a.order_id))}return{requestingQuote:r,settling:n,allActiveIds:i}}e.s(["classifyRfqSpotOrders",0,T,"describeRfqOrder",0,function(e,t){let r=t?.tense??"present",n=function(e){let t=g.useTradingDataStore.getState().getInstrument(e.instrument);if(!t?.price_index)return"";let[r]=t.price_index.split("/");return r??""}(e),i="past"===r?"b"===e.side?"Bought":"Sold":"b"===e.side?"Buying":"Selling",a=t?.size??e.size,o=n?`${i} ${a} ${n}`:`${i} ${a}`;if(t?.priceUsd!==void 0&&t?.priceUsd!==null&&Number.isFinite(t.priceUsd)&&t.priceUsd>0){let e=(0,u.formatNumber)(t.priceUsd,{currency:"$",maxDecimals:4});return`${o} @ ${e}`}return o},"getRfqStatus",0,k,"getRfqStatusLabel",0,F,"isRfqOrder",0,S],753868);var U=e.i(678844);e.i(849387);var I=e.i(126996);function Q(e){if(!e.length)return e;let t=new Set;for(let r of e)for(let e of r.children??[]){let r=e.id??e.order_id;r&&t.add(r)}return e.filter(e=>!t.has(e.order_id)).reduce((e,t)=>{let r=(t.children??[]).map((e,r)=>{let n=e.id??e.order_id;return{...t,...e,order_id:n,parent_order_id:e.parent_order_id??t.order_id,child_index:e.child_index??r,user:t.user,unfilled:e.size,state:t.state,timestamp:t.timestamp,children:void 0}});return e.push(...r,t),e},[])}function j(e){return"number"==typeof e.parent_order_id||"number"==typeof e.child_index}function L(e){return Array.isArray(e.children)&&e.children.length>0?"View":"--"}function _(e){let{setPayload:t,setModal:r}=g.useActionStore.getState();t(e),r("tp-sl-view")}function P(e){return e.instruments}function D(e){return e.selectedInstrument}function R(e){return"b"===e.side?"long":"short"}function M(e){return L(e)}function O(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getTriggerConditionLabel)(r.original)})}function N(e){return(0,B.getTriggerConditionLabel)(e)}function H(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getPriceLabel)(r.original)})}function V(e){return(0,B.getPriceLabel)(e)}function K(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getValueLabel)(r.original)})}function G(e){return(0,B.getValueLabel)(e)}function W(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",color:k(r.original)?"warning.light":"white",children:F(k(r.original))})}function z(e){return F(k(e))}function $(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getOrderTypeLabel)(r.original)})}function q(e){return(0,B.getOrderTypeLabel)(e)}function X(e){return""===e.tpsl}function Y(e){return e.openOrders}function J(e){return"b"===e.side?"long":"short"}function Z(e){return e.instruments}function ee(e){return L(e)}function et(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getTriggerConditionLabel)(r.original)})}function er(e){return(0,B.getTriggerConditionLabel)(e)}function en(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getPriceLabel)(r.original)})}function ei(e){return(0,B.getPriceLabel)(e)}function ea(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getValueLabel)(r.original)})}function eo(e){return(0,B.getValueLabel)(e)}function es(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:F(k(r.original))})}function eA(e){return F(k(e))}function el(e){let{row:r}=e;return(0,t.jsx)(a.Typography,{variant:"body1",children:(0,B.getOrderTypeLabel)(r.original)})}function ec(e){return(0,B.getOrderTypeLabel)(e)}e.s(["expandOrdersForDisplay",0,Q,"useOpenOrdersConfig",0,function(e){let n,u,h,p,m,f,b,w,v,B,S,k,E,F,T,J,Z,ee,et=(0,r.c)(57),{vaultAddress:er,enabled:en,maxRows:ei,showFilters:ea}=e,eo=void 0===en||en,es=void 0===ei?4:ei,eA=void 0===ea||ea,el=(0,x.useTranslations)();et[0]!==eo||et[1]!==er?(n={vaultAddress:er,enabled:eo},et[0]=eo,et[1]=er,et[2]=n):n=et[2];let{isLoading:ec,error:ed}=(0,U.useOpenOrders)(n),eu=(0,g.useUserTradingDataStore)((0,y.useShallow)(Y));et[3]!==er?(u=e=>er?e.vaults[er]:null,et[3]=er,et[4]=u):u=et[4];let eh=(0,g.useVaultsStore)((0,y.useShallow)(u)),{cancelByOrderId:ep,cancelAll:em}=(0,I.useTradeActions)();et[5]!==ep?(h=(e,t)=>{ep(Number(e),Number(t))},et[5]=ep,et[6]=h):h=et[6];let ef=h;et[7]!==em?(p=()=>{em()},et[7]=em,et[8]=p):p=et[8];let eg=p;et[9]!==eu||et[10]!==eh?.open_orders||et[11]!==er?(m=Q(er?eh?.open_orders?.filter(X)||[]:Object.values(eu)),et[9]=eu,et[10]=eh?.open_orders,et[11]=er,et[12]=m):m=et[12];let ey=m,eb=ey.length>0;if(et[13]!==el){let e,r,n,i=(0,l.createColumns)();et[15]===Symbol.for("react.memo_cache_sentinel")?(e=l.q.instrument(),r=l.q.side("side"),n=l.q.time("timestamp"),et[15]=e,et[16]=r,et[17]=n):(e=et[15],r=et[16],n=et[17]),f=[e,r,n,i.custom({id:"orderType",header:el("tables.type"),accessorFn:q,cell:$,sortable:!0,sortType:"string"}),i.custom({id:"status",header:el("tables.status"),accessorFn:z,cell:W,sortable:!0,sortType:"string"}),...l.q.filled(),l.q.size("size",el("tables.originalSize")),i.custom({id:"value",header:el("tables.value"),accessorFn:G,cell:K,sortable:!0,sortType:"number"}),i.custom({id:"limit_price",header:el("common.price"),accessorFn:V,cell:H,sortable:!0,sortType:"number"}),l.q.yesNo("reduceOnly",el("tables.reduceOnly"),"reduce_only"),i.custom({id:"triggerCondition",header:el("tables.triggerConditions"),accessorFn:N,cell:O,sortable:!0,sortType:"string"}),i.custom({id:"tpSl",header:el("trade.tpsl"),accessorFn:M,cell:e=>{let{row:r}=e;return"View"===L(r.original)?(0,t.jsx)(a.Typography,{variant:"body1",color:"primary.light",sx:{cursor:"pointer",textDecorationLine:"underline",textDecorationStyle:"dotted"},onClick:e=>{e.stopPropagation(),_(r.original)},children:el("tables.view")}):(0,t.jsx)(a.Typography,{variant:"body1",children:"--"})},sortable:!1}),i.custom({id:"actions",header:e=>{let{table:r}=e,n=r?.options?.meta,i=n?.hasOpenOrders??!1,a=n?.onCancelAll;return(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"soft",size:"small",color:"secondary",disabled:!i,onClick:e=>{e.stopPropagation(),a?.()},children:el("tables.closeAll")})},cell:e=>{let{row:r,table:n}=e,i=n?.options?.meta?.onCancelOrder,a=j(r.original);return(0,t.jsx)(C.Tooltip,{title:a?el("tables.childOrderCancelTooltip"):"",disableHoverListener:!a,placement:"top",arrow:!0,children:(0,t.jsx)("span",{style:{cursor:a?"not-allowed":"inherit"},children:(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"small",color:"inherit",disabled:a,sx:a?{"&.Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"}}:void 0,onClick:e=>{e.stopPropagation(),a||i?.(r.original.order_id.toString(),Number(r.original.instrument_id))},children:el("common.cancel")})})})}})],et[13]=el,et[14]=f}else f=et[14];let ex=f;et[18]!==ef||et[19]!==el?(b=e=>{let{row:r}=e,n=j(r);
5return(0,t.jsx)(d.CollapsibleCardFooter,{children:(0,t.jsx)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:(0,t.jsx)(C.Tooltip,{title:n?el("tables.childOrderCancelTooltip"):"",disableHoverListener:!n,placement:"top",arrow:!0,children:(0,t.jsx)("span",{style:{cursor:n?"not-allowed":"inherit"},children:(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"medium",color:"inherit",fullWidth:!0,disabled:n,sx:n?{"&.Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"}}:void 0,onClick:e=>{e.stopPropagation(),n||ef(r.order_id.toString(),Number(r.instrument_id))},children:el("common.cancel")})})})})})},et[18]=ef,et[19]=el,et[20]=b):b=et[20];let ew=b,ev=(0,g.useTradingDataStore)(D),eC=(0,g.useTradingDataStore)(P);et[21]!==eC||et[22]!==ev?(w=(0,A.createSideAssetTypeFilters)(eC,ev),et[21]=eC,et[22]=ev,et[23]=w):w=et[23];let eB=w;et[24]!==el?(v=el("tables.openOrders"),et[24]=el,et[25]=v):v=et[25],et[26]!==el?(B=el("tables.noOrdersFound"),et[26]=el,et[27]=B):B=et[27];let eS=!!ed;et[28]!==ec||et[29]!==es||et[30]!==v||et[31]!==B||et[32]!==eS?(S={name:v,iconPath:s.tableIcons.orders,noDataMessage:B,isLoading:ec,isError:eS,maxRows:es,getRowIndicator:R,virtualize:!0},et[28]=ec,et[29]=es,et[30]=v,et[31]=B,et[32]=eS,et[33]=S):S=et[33],et[34]!==eA?(k={show:eA},et[34]=eA,et[35]=k):k=et[35],et[36]!==eg||et[37]!==ef||et[38]!==eb?(E={hasOpenOrders:eb,onCancelOrder:ef,onCancelAll:eg},et[36]=eg,et[37]=ef,et[38]=eb,et[39]=E):E=et[39],et[40]!==ex?(F=c.presets.responsive(ex),et[40]=ex,et[41]=F):F=et[41],et[42]!==ew?(T=c.presets.collapsible(["instrument"],{footerComponent:ew,detailsOrder:["side","timestamp","orderType","status","size","value","limit_price","reduceOnly","triggerCondition","tpSl"]}),et[42]=ew,et[43]=T):T=et[43],et[44]===Symbol.for("react.memo_cache_sentinel")?(J=c.presets.sorting("timestamp"),et[44]=J):J=et[44],et[45]!==ex||et[46]!==eB||et[47]!==S||et[48]!==k||et[49]!==E||et[50]!==F||et[51]!==T?(Z={config:S,columns:ex,filters:eB,filterUI:k,meta:E,...F,...T,...J},et[45]=ex,et[46]=eB,et[47]=S,et[48]=k,et[49]=E,et[50]=F,et[51]=T,et[52]=Z):Z=et[52];let ek=Z;return et[53]!==ek||et[54]!==ey||et[55]!==eg?(ee={config:ek,data:ey,onCancelAll:eg},et[53]=ek,et[54]=ey,et[55]=eg,et[56]=ee):ee=et[56],ee},"useOpenOrdersTableConfig",0,function(e){let n,i,d,u,h,p,m,f,y,b,w,v=(0,r.c)(36),{isLoading:B,isError:S,showFilters:k,maxRows:E,rowsPerPage:F,onCancelOrder:T,onCancelAll:U,hasOpenOrders:I}=e,Q=void 0===k||k,P=void 0!==I&&I,D=(0,x.useTranslations)();if(v[0]!==D){let e,r,i,s=(0,l.createColumns)();v[2]===Symbol.for("react.memo_cache_sentinel")?(e=l.q.instrument(),r=l.q.side("side"),i=l.q.time("timestamp"),v[2]=e,v[3]=r,v[4]=i):(e=v[2],r=v[3],i=v[4]),n=[e,r,i,s.custom({id:"orderType",header:D("tables.type"),accessorFn:ec,cell:el,sortable:!0,sortType:"string"}),s.custom({id:"status",header:D("tables.status"),accessorFn:eA,cell:es,sortable:!0,sortType:"string"}),...l.q.filled(),l.q.size("size",D("tables.originalSize")),s.custom({id:"value",header:D("tables.value"),accessorFn:eo,cell:ea,sortable:!0,sortType:"number"}),s.custom({id:"limit_price",header:D("common.price"),accessorFn:ei,cell:en,sortable:!0,sortType:"number"}),l.q.yesNo("reduceOnly",D("tables.reduceOnly"),"reduce_only"),s.custom({id:"triggerCondition",header:D("tables.triggerConditions"),accessorFn:er,cell:et,sortable:!0,sortType:"string"}),s.custom({id:"tpSl",header:D("trade.tpsl"),accessorFn:ee,cell:e=>{let{row:r}=e;return"View"===L(r.original)?(0,t.jsx)(a.Typography,{variant:"body1",color:"primary.light",sx:{cursor:"pointer",textDecorationLine:"underline",textDecorationStyle:"dotted"},onClick:e=>{e.stopPropagation(),_(r.original)},children:D("tables.view")}):(0,t.jsx)(a.Typography,{variant:"body1",children:"--"})},sortable:!1}),s.custom({id:"actions",header:e=>{let{table:r}=e,n=r?.options?.meta,i=n?.hasOpenOrders??!1,a=n?.onCancelAll;return a?(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"soft",size:"small",color:"secondary",disabled:!i,onClick:e=>{e.stopPropagation(),a()},children:D("tables.closeAll")}):D("common.actions")},cell:e=>{let{row:r,table:n}=e,i=n?.options?.meta?.onCancelOrder,a=j(r.original);return i?(0,t.jsx)(C.Tooltip,{title:a?D("tables.childOrderCancelTooltip"):"",disableHoverListener:!a,placement:"top",arrow:!0,children:(0,t.jsx)("span",{style:{cursor:a?"not-allowed":"inherit"},children:(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"small",color:"inherit",disabled:a,sx:a?{"&.Mui-disabled":{cursor:"not-allowed",pointerEvents:"auto"}}:void 0,onClick:e=>{e.stopPropagation(),a||i(r.original.order_id.toString(),Number(r.original.instrument_id))},children:D("common.cancel")})})}):null}})],v[0]=D,v[1]=n}else n=v[1];let R=n,M=(0,g.useTradingDataStore)(Z);v[5]!==M?(i=(0,A.createSideAssetTypeFilters)(M),v[5]=M,v[6]=i):i=v[6];let O=i;return v[7]!==D?(d=D("tables.openOrders"),v[7]=D,v[8]=d):d=v[8],v[9]!==D?(u=D("tables.noOpenOrders"),v[9]=D,v[10]=u):u=v[10],v[11]!==F?(h=null!=F&&{pagination:{rowsPerPage:F}},v[11]=F,v[12]=h):h=v[12],v[13]!==S||v[14]!==B||v[15]!==E||v[16]!==d||v[17]!==u||v[18]!==h?(p={name:d,iconPath:s.tableIcons.orders,noDataMessage:u,isLoading:B,isError:S,maxRows:E,getRowIndicator:J,...h},v[13]=S,v[14]=B,v[15]=E,v[16]=d,v[17]=u,v[18]=h,v[19]=p):p=v[19],v[20]!==Q?(m={show:Q},v[20]=Q,v[21]=m):m=v[21],v[22]!==P||v[23]!==U||v[24]!==T?(f={hasOpenOrders:P,onCancelOrder:T,onCancelAll:U},v[22]=P,v[23]=U,v[24]=T,v[25]=f):f=v[25],v[26]!==R?(y=c.presets.responsive(R),v[26]=R,v[27]=y):y=v[27],v[28]===Symbol.for("react.memo_cache_sentinel")?(b=c.presets.sorting("timestamp"),v[28]=b):b=v[28],v[29]!==R||v[30]!==O||v[31]!==f||v[32]!==y||v[33]!==p||v[34]!==m?(w={config:p,columns:R,filters:O,filterUI:m,meta:f,...y,...b},v[29]=R,v[30]=O,v[31]=f,v[32]=y,v[33]=p,v[34]=m,v[35]=w):w=v[35],w}],955265);var ed=e.i(485683),eu=e.i(244337),eh=e.i(805395);e.i(929009);var ep=e.i(534979),em=e.i(681621);let ef=e=>
5e.timestamp?new Date(e.timestamp).getTime():e.block_timestamp??0,eg=e=>{if(!Number.isFinite(e)||e<=0)return"--";let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),i=[];return t>0&&i.push(`${t}h`),r>0&&i.push(`${r}m`),(n>0||0===i.length)&&i.push(`${n}s`),i.join(" ")};e.s(["TwapOrdersTable",0,function(e){let o,A,d,h,p,m,f,y,b,w,v,C=(0,r.c)(28),{enabled:B,maxRows:S,activeConfig:k,activeData:E}=e,F=void 0===B||B,T=void 0===S?7:S,U=(0,x.useTranslations)(),[I,Q]=(0,n.useState)("active");C[0]!==F||C[1]!==T?(o={enabled:F,maxRows:T},C[0]=F,C[1]=T,C[2]=o):o=C[2];let{config:j,data:L}=function({enabled:e=!0,maxRows:r=7}={}){let i=(0,x.useTranslations)(),{isLoading:o,error:A}=(0,ep.useTwapOrderHistory)({refetch:!0,enabled:e}),d=(0,g.useUserTradingDataStore)(e=>e.twapOrderHistory),h=(0,l.createColumns)(),p=(0,n.useMemo)(()=>Object.values(d),[d]),m=(0,n.useMemo)(()=>[h.instrument({header:i("tables.instrument")}),h.size("size",i("tables.size")),h.size("size_filled",i("tables.executedSize")),h.custom({id:"average_price",header:i("tables.averagePrice"),accessorKey:"average_price",cell:({getValue:e,row:r})=>(0,t.jsx)(a.Typography,{variant:"body1",children:(0,u.formatNumber)(parseFloat(String(e()??0)),{useTickSize:!0,instrument_name:r.original.instrument,currency:"$"})}),sortable:!0,sortType:"number"}),h.custom({id:"duration",header:i("tables.duration"),accessorFn:e=>e.duration,cell:({row:e})=>(0,t.jsx)(a.Typography,{variant:"body1",children:eg(e.original.duration)}),sortable:!0,sortType:"number"}),h.boolean("reduceOnly",i("tables.reduceOnly"),"reduce_only"),h.custom({id:"creationTime",header:i("tables.creationTime"),accessorFn:ef,cell:({row:e})=>(0,t.jsx)(a.Typography,{variant:"body1",children:(0,u.formatTableDateTime)(ef(e.original))}),sortable:!0,sortType:"number"}),h.custom({id:"status",header:i("tables.status"),accessorKey:"status",cell:({getValue:e})=>{var r;return(0,t.jsx)(a.Typography,{variant:"body1",children:(r=String(e()))?r.charAt(0).toUpperCase()+r.slice(1):"--"})},sortable:!0,sortType:"string"})],[h,i]),f=(0,n.useCallback)(eu.sideIndicator,[]);return{config:(0,n.useMemo)(()=>({config:(0,eu.tableConfig)(i("tables.twapOrderHistory"),{icon:s.tableIcons.orders,loading:o,error:!!A,maxRows:r,noDataMessage:i("tables.noOrdersFound"),getRowIndicator:f}),columns:m,filterUI:{show:!1},...c.presets.standard(m,["instrument"],"creationTime",{collapsible:{detailsOrder:["size","size_filled","average_price","duration","reduceOnly","creationTime","status"]}})}),[m,A,f,o,r,i]),data:p}}(o);return C[3]===Symbol.for("react.memo_cache_sentinel")?(A={display:"flex",flexDirection:"column",gap:2},C[3]=A):A=C[3],C[4]!==U?(d=U("common.active"),C[4]=U,C[5]=d):d=C[5],C[6]!==d?(h={label:d,value:"active"},C[6]=d,C[7]=h):h=C[7],C[8]!==U?(p=U("common.history"),C[8]=U,C[9]=p):p=C[9],C[10]!==p?(m={label:p,value:"history"},C[10]=p,C[11]=m):m=C[11],C[12]!==h||C[13]!==m?(f=[h,m],C[12]=h,C[13]=m,C[14]=f):f=C[14],C[15]===Symbol.for("react.memo_cache_sentinel")?(y=e=>Q(e),C[15]=y):y=C[15],C[16]!==f||C[17]!==I?(b=(0,t.jsx)(ed.default,{options:f,value:I,onChange:y}),C[16]=f,C[17]=I,C[18]=b):b=C[18],C[19]!==k||C[20]!==E||C[21]!==j||C[22]!==L||C[23]!==I?(w="active"===I?(0,t.jsx)(eh.DataTable,{config:k,data:E}):(0,t.jsx)(eh.DataTable,{config:j,data:L}),C[19]=k,C[20]=E,C[21]=j,C[22]=L,C[23]=I,C[24]=w):w=C[24],C[25]!==b||C[26]!==w?(v=(0,t.jsxs)(i.Box,{sx:A,children:[b,w]}),C[25]=b,C[26]=w,C[27]=v):v=C[27],v},"useTwapActiveOrdersConfig",0,function({enabled:e=!0,maxRows:r=7}={}){let i=(0,x.useTranslations)(),{isLoading:A,error:d}=(0,em.useTwapOrders)({enabled:e}),h=(0,g.useUserTradingDataStore)(e=>e.twapOrders),{cancelTWAPOrder:p}=(0,I.useTradeActions)(),m=(0,l.createColumns)(),f=(0,n.useMemo)(()=>Object.values(h),[h]),y=(0,n.useCallback)(e=>{p(e)},[p]),b=(0,n.useMemo)(()=>[m.instrument({header:i("tables.instrument")}),m.size("size",i("tables.size")),m.size("size_filled",i("tables.executedSize")),m.price("average_price",i("tables.averagePrice")),m.custom({id:"duration",header:i("tables.duration"),accessorFn:e=>e.duration,cell:({row:e})=>(0,t.jsx)(a.Typography,{variant:"body1",children:eg(e.original.duration)}),sortable:!0,sortType:"number"}),m.boolean("reduceOnly",i("tables.reduceOnly"),"reduce_only"),m.custom({id:"creationTime",header:i("tables.creationTime"),accessorFn:ef,cell:({row:e})=>(0,t.jsx)(a.Typography,{variant:"body1",children:(0,u.formatTableDateTime)(ef(e.original))}),sortable:!0,sortType:"number"}),m.custom({id:"terminate",header:i("tables.terminateHere"),accessorFn:e=>e.order_id,cell:({row:e})=>(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"small",color:"inherit",onClick:t=>{t.stopPropagation(),y(e.original.order_id)},children:i("common.cancel")}),sortable:!1})],[m,y,i]),w=(0,n.useCallback)(eu.sideIndicator,[]);return{config:(0,n.useMemo)(()=>({config:(0,eu.tableConfig)(i("tables.twapActiveOrders"),{icon:s.tableIcons.orders,loading:A,error:!!d,maxRows:r,noDataMessage:i("tables.noOrdersFound"),getRowIndicator:w}),columns:b,filterUI:{show:!1},...c.presets.standard(b,["instrument"],"creationTime",{collapsible:{footerComponent:({row:e})=>(0,t.jsx)(o.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"medium",color:"inherit",fullWidth:!0,onClick:t=>{t.stopPropagation(),y(e.order_id)},children:i("common.cancel")}),detailsOrder:["size","size_filled","average_price","duration","reduceOnly","creationTime"]}})}),[b,d,w,y,A,r,i]),data:f}}],199304);var ey=e.i(166107),eb=e.i(302682),ex=e.i(162282),ew=e.i(809249);e.i(112486);var ev=e.i(919007),eC=e.i(143813),eB=e.i(621725);e.i(842917);var eS=e.i(536387);let ek=new Set(["USDC"]),eE=new Set(["USDC"]),eF="USDC";function eT(e){return e.collateralName.toUpperCase()===eF||e.displayAsset.toUpperCase()===eF||e.asset.toUpperCase()===eF}function eU(e){return[...e].sort((e,t)=>
5Number(eT(t))-Number(eT(e)))}function eI(){let e,n,i,o,s,A,l,c=(0,r.c)(14),d=(0,x.useTranslations)(),u=(0,g.useTradingPreferencesStore)(ej),h=(0,g.useTradingPreferencesStore)(eQ),p=!u;return c[0]!==h?(e=(e,t)=>h(!t),c[0]=h,c[1]=e):e=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(n={px:0},c[2]=n):n=c[2],c[3]!==p||c[4]!==e?(i=(0,t.jsx)(ey.Checkbox,{checked:p,onChange:e,size:"small",sx:n}),c[3]=p,c[4]=e,c[5]=i):i=c[5],c[6]!==d?(o=d("tables.showSmallBalances"),c[6]=d,c[7]=o):o=c[7],c[8]!==o?(s=(0,t.jsx)(a.Typography,{variant:"body1",color:"text.primary",children:o}),c[8]=o,c[9]=s):s=c[9],c[10]===Symbol.for("react.memo_cache_sentinel")?(A={m:0,mr:0,userSelect:"none"},c[10]=A):A=c[10],c[11]!==i||c[12]!==s?(l=(0,t.jsx)(eb.FormControlLabel,{control:i,label:s,sx:A}),c[11]=i,c[12]=s,c[13]=l):l=c[13],l}function eQ(e){return e.setHideSmallBalances}function ej(e){return e.hideSmallBalances}function eL(e,t,r){return eU(r(e,t))}function e_(e,t){return e.balanceType===t}function eP(e){let{row:r}=e;return(0,t.jsx)(ew.PnlRoiDisplay,{pnl:r.original.pnl,roi:r.original.roi})}function eD(e){return e.pnl??0}function eR(e){let{row:t}=e;return t.original.usdcValue}function eM(e){return e.usdcValueNumeric}function eO(e){let{row:t}=e;return t.original.indexPrice}function eN(e){return e.indexPriceNumeric}function eH(e){let{row:t}=e;return t.original.withdrawableBalance}function eV(e){return e.withdrawableBalanceNumeric}function eK(e){let{row:t}=e;return t.original.totalBalance}function eG(e){return e.totalBalanceNumeric}function eW(e){let{row:r}=e;return(0,t.jsx)(ev.TableCellIcon,{title:r.original.displayAsset,leadingIcon:(0,eC.getCryptoIcon)(r.original.collateralName.toLowerCase())})}function ez(e){return e.displayAsset}function e$(e){return!(e.usdcValueNumeric<1)}function eq(e){let{label:r,icon:n,onClick:i,size:a,disabled:o}=e,s=void 0===a?14:a;return(0,t.jsx)(C.Tooltip,{title:r,arrow:!0,placement:"top",children:(0,t.jsx)(ex.IconButton,{size:"small",disabled:void 0!==o&&o,onClick:e=>{e.stopPropagation(),i()},sx:{width:24,height:24,borderRadius:.5,color:"white",backgroundColor:"action.selected","&:hover":{color:"text.primary",backgroundColor:"action.hover"}},children:(0,t.jsx)(h.Iconify,{icon:n,width:s,height:s})})})}function eX(e){return e.hideSmallBalances}function eY(e){return e.instruments}function eJ(e){return e.tickers}function eZ(e){return e.accountSummary}e.s(["useBalancesConfig",0,function(e){let n,a,o,A,h,p,m,f,y,b,w,v,C,B,S,k,E,F,T,U,I,Q,j,L,_=(0,r.c)(73),{vaultAddress:P,maxRows:D}=e,R=void 0===D?4:D,M=(0,x.useTranslations)(),O=(0,g.useUserTradingDataStore)(eZ);_[0]!==P?(n=e=>P?e.vaults[P]:null,_[0]=P,_[1]=n):n=_[1];let N=(0,g.useVaultsStore)(n),H=(0,g.useTradingDataStore)(eJ),V=(0,g.useTradingDataStore)(eY),{setModal:K,setPayload:G}=(0,g.useActionStore)(),W=(0,g.useTradingPreferencesStore)(eX),z=!!P;_[2]!==K||_[3]!==G?(a=e=>{K("deposit"),G({token:e})},_[2]=K,_[3]=G,_[4]=a):a=_[4];let $=a;_[5]!==K||_[6]!==G?(o=e=>{K("withdraw"),G({token:e})},_[5]=K,_[6]=G,_[7]=o):o=_[7];let q=o;_[8]!==K||_[9]!==G?(A=e=>{K("send"),G({token:e})},_[8]=K,_[9]=G,_[10]=A):A=_[10];let X=A;_[11]!==K||_[12]!==G?(h=e=>{K("internal-transfer"),G({token:e})},_[11]=K,_[12]=G,_[13]=h):h=_[13];let Y=h;_[14]!==V?(p=(e,t)=>{let r=V[`${e}/${eF}`];if(r&&!r.delisted)return r.name;let n=V[t];if(n&&!n.delisted)return n.name;let i=e.toUpperCase();return Object.values(V).find(e=>!e.delisted&&e.name.split("-")[0].split("/")[0].toUpperCase()===i)?.name},_[14]=V,_[15]=p):p=_[15];let J=p,Z=P?N?.account_summary:O;if(_[16]!==Z?.collateral||_[17]!==Z?.spot_collateral||_[18]!==J||_[19]!==W||_[20]!==H){let e,t=Z?.collateral||{},r=Z?.spot_collateral||{};_[22]!==J||_[23]!==H?(e=(e,t)=>{let r=[];for(let n of Object.keys(e)){let i=Number(e[n].balance??0);if(i<=0)continue;let a=n.split("/")[0],o=a===eF?1:Number(H[`${a}/${eF}`]?.index_price??0),s=e[n].average_price,A=Number(e[n].withdrawable_balance??0),l=o*i,c=J(a,n),d=!ek.has(a)&&null!=s,h=d?(o-Number(s))*i:null,p=d?Number(s)*i:0,m=d&&0!==p?h/p*100:null;r.push({asset:a,displayAsset:(0,eB.getAssetDisplayInfo)(a).shortName,totalBalance:(0,u.formatAssetQuantity)(a,i),totalBalanceNumeric:i,withdrawableBalance:(0,u.formatAssetQuantity)(a,A),withdrawableBalanceNumeric:A,indexPrice:(0,u.formatNumber)(o,{currency:"$",useTickSize:!0,instrument_name:c,trimTrailingZeros:!1,defaultTickSize:.01}),indexPriceNumeric:o,usdcValue:(0,u.formatNumber)(l,{currency:"$",useTickSize:!0,floor:!0,defaultTickSize:.01}),usdcValueNumeric:l,pnl:h,roi:m,collateralName:a,collateral:n,balanceType:t})}return r},_[22]=J,_[23]=H,_[24]=e):e=_[24];let n=e,i=[...n(t,"derivatives"),...n(r,"spot")];m=eU(W?i.filter(e$):i),_[16]=Z?.collateral,_[17]=Z?.spot_collateral,_[18]=J,_[19]=W,_[20]=H,_[21]=m}else m=_[21];let ee=m;_[25]!==$||_[26]!==X||_[27]!==Y||_[28]!==q||_[29]!==M?(f=e=>{let r=eE.has(e.collateralName);return(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[eq({label:M("common.deposit"),icon:"tabler:arrow-down-left",disabled:!eS.DEPOSITS_ENABLED,onClick:()=>$(e.collateralName)}),eq({label:M("common.withdraw"),icon:"tabler:arrow-up-right",onClick:()=>q(e.collateralName)}),r?eq({label:M("common.transfer"),icon:"mingcute:transfer-line",onClick:()=>Y(e.collateralName)}):null,eq({label:M("common.send"),icon:"solar:plain-2-linear",size:12,onClick:()=>X(e.collateralName)})]})},_[25]=$,_[26]=X,_[27]=Y,_[28]=q,_[29]=M,_[30]=f):f=_[30];let et=f;if(_[31]!==z||_[32]!==et||_[33]!==M){let e=(0,l.createColumns)();if(y=[e.custom({id:"asset",header:M("tables.asset"),accessorFn:ez,cell:eW,sortable:!0,sortType:"string"}),e.custom({id:"totalBalance",header:M("tables.totalBalance"),accessorFn:eG,cell:eK,sortable:!0,sortType:"number"}),e.custom({id:"withdrawableBalance",header:M("tables.withdrawableBalance"),accessorFn:eV,cell:eH,sortable:!0,sortType:"number"}),e.custom({id:"indexPrice",header:M("tables.indexPrice"),accessorFn:eN,cell:eO,sortable:!0,sortType:"number"}),e.custom({id:"usdcValue",header:M("tables.usdcValue"),accessorFn:eM,cell:eR,sortable:!0,sortType:"number"}),e.custom({id:"pnl",header:M("tables.pnlRoi"),accessorFn:eD,cell:eP,sortable:!0,sortType:"number"})],!z){let t;_[35]!==et?(t=e=>{let{row:t}=e;return et(t.original)},_[35]=et,_[36]=t):t=_[36],y.push(e.custom({id:"actions",header:M("common.actions"),cell:t,sortable:!1}))}_[31]=z,_[32]=et,_[33]=M,_[34]=y}else y=_[34];let er=y;e:{let e;if(z){b=void 0;break e}_[37]!==et?(e=e=>{let{row:r}=e;
5return(0,t.jsx)(d.CollapsibleCardFooter,{children:(0,t.jsx)(i.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:et(r)})})},_[37]=et,_[38]=e):e=_[38],b=e}let en=b;_[39]!==M?(w=M("tables.balances"),_[39]=M,_[40]=w):w=_[40],_[41]!==M?(v=M("tables.noBalancesFound"),_[41]=M,_[42]=v):v=_[42],_[43]!==R||_[44]!==w||_[45]!==v?(C={name:w,iconPath:s.tableIcons.balances,noDataMessage:v,isLoading:!1,isError:!1,maxRows:R,backgroundImage:"/imgs/png/tables/bg.png"},_[43]=R,_[44]=w,_[45]=v,_[46]=C):C=_[46],_[47]!==M?(B=M("common.spot"),_[47]=M,_[48]=B):B=_[48],_[49]!==B?(S={label:B,value:"spot"},_[49]=B,_[50]=S):S=_[50],_[51]!==M?(k=M("tables.derivatives"),_[51]=M,_[52]=k):k=_[52],_[53]!==k?(E={label:k,value:"derivatives"},_[53]=k,_[54]=E):E=_[54],_[55]!==S||_[56]!==E?(F={balanceType:{type:"tabs",options:[S,E],defaultValue:"derivatives",filterFn:e_,persist:!0}},_[55]=S,_[56]=E,_[57]=F):F=_[57],_[58]===Symbol.for("react.memo_cache_sentinel")?(T={show:!0,trailing:(0,t.jsx)(eI,{})},_[58]=T):T=_[58],_[59]!==er?(U=c.presets.responsive(er),_[59]=er,_[60]=U):U=_[60],_[61]!==en?(I=c.presets.collapsible(["asset"],{showIndicator:!1,detailsOrder:["totalBalance","withdrawableBalance","indexPrice","usdcValue","pnl"],footerComponent:en}),_[61]=en,_[62]=I):I=_[62],_[63]===Symbol.for("react.memo_cache_sentinel")?(Q={multiSort:!0,maxMultiSortColCount:3,customSortFn:eL},_[63]=Q):Q=_[63],_[64]!==er||_[65]!==C||_[66]!==F||_[67]!==U||_[68]!==I?(j={config:C,columns:er,filters:F,filterUI:T,...U,...I,sorting:Q},_[64]=er,_[65]=C,_[66]=F,_[67]=U,_[68]=I,_[69]=j):j=_[69];let ei=j;return _[70]!==ei||_[71]!==ee?(L={config:ei,data:ee},_[70]=ei,_[71]=ee,_[72]=L):L=_[72],L}],642409),e.s(["useSettlingSpotDeltas",0,function(){let e=(0,g.useUserTradingDataStore)(e=>e.openOrders),t=(0,g.useTradingDataStore)(e=>e.instruments);return(0,n.useMemo)(()=>{let{settling:r}=T(e,t);if(0===r.length)return{};let n={};for(let e of r){let r=t[e.instrument];if(!r?.price_index)continue;let[i,a]=r.price_index.split("/");if(!i||!a)continue;let o=Number(e.size);if(!Number.isFinite(o)||o<=0)continue;let s=Number(e.spot_order_info?.rfq_price??0);if(!Number.isFinite(s)||s<=0)continue;let A={orderId:e.order_id,side:e.side,sizeBase:o,priceEstimate:s,instrument:e.instrument,baseAsset:i,quoteAsset:a},l="b"===e.side?o:-o,c=n[i]??={delta:0,orders:[]};c.delta+=l,c.orders.push(A)}return n},[e,t])}],194130)},826140,e=>{"use strict";var t=e.i(210457),r=e.i(4977);e.s(["INSTRUMENT_PANEL_CATEGORIES",0,["crypto","equities","etfs"],"resolveInstrumentPanelCategory",0,e=>{let n=(0,r.getMarketInstrument)(e);return n?.category==="crypto"||n?.exchange?.toUpperCase()==="CRYPTO"?"crypto":n?.category==="etf"||n?.quoteType?.toUpperCase()==="ETF"||(n?.typeDisplay?.toUpperCase()??"").includes("ETF")||"ETFs/Indices"===(0,t.getInstrumentMetadata)(e).category?"etfs":"equities"}])},343803,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(838456);e.s(["PreviewSparkline",0,e=>{let a,o,s,A,l,c,d,u,h=(0,r.c)(46),{points:p,scale:m,width:f,height:g,viewBoxWidth:y,viewBoxHeight:b,color:x,strokeWidth:w,horizontalPadding:v,verticalPadding:C,verticalPaddingTop:B,verticalPaddingBottom:S,preserveSpace:k,animateOnMount:E,animationDurationMs:F,animationDelayMs:T,animationEasing:U,sx:I}=e,Q=void 0===m?255:m,j=void 0===f?90:f,L=void 0===g?32:g,_=void 0===y?90:y,P=void 0===b?32:b,D=void 0===x?"currentColor":x,R=void 0===w?1.5:w,M=void 0===v?0:v,O=void 0===C?2:C,N=void 0===E||E,H=void 0===F?1500:F,V=void 0===T?80:T,K=void 0===U?"ease":U,G=(0,n.useId)(),[W,z]=(0,n.useState)(!N);h[0]!==N||h[1]!==V||h[2]!==H?(a=()=>{if(!N)return void z(!0);z(!1);let e=window.setTimeout(()=>z(!0),V+H);return()=>window.clearTimeout(e)},o=[N,V,H],h[0]=N,h[1]=V,h[2]=H,h[3]=a,h[4]=o):(a=h[3],o=h[4]),(0,n.useEffect)(a,o);e:{let e;if(!p||p.length<2||Q<=0){s="";break e}let t=B??O,r=Math.max(1,_-2*M),n=Math.max(1,P-t-(S??O));if(h[5]!==n||h[6]!==r||h[7]!==M||h[8]!==p||h[9]!==Q||h[10]!==t){let i;h[12]!==n||h[13]!==r||h[14]!==M||h[15]!==p.length||h[16]!==Q||h[17]!==t?(i=(e,i)=>{let a=Number.isFinite(e)?e:0,o=M+(p.length<=1?0:i/(p.length-1)*r),s=t+(1-Math.min(Math.max(a/Q,0),1))*n;return`${0===i?"M":"L"} ${o.toFixed(2)} ${s.toFixed(2)}`},h[12]=n,h[13]=r,h[14]=M,h[15]=p.length,h[16]=Q,h[17]=t,h[18]=i):i=h[18],e=p.map(i).join(" "),h[5]=n,h[6]=r,h[7]=M,h[8]=
5p,h[9]=Q,h[10]=t,h[11]=e}else e=h[11];s=e}let $=s;if(!$){let e;return void 0===k||k?(h[19]!==L||h[20]!==I||h[21]!==j?(e=(0,t.jsx)(i.Box,{"aria-hidden":!0,sx:{width:j,height:L,flexShrink:0,...I}}),h[19]=L,h[20]=I,h[21]=j,h[22]=e):e=h[22],e):null}let q=N&&!W,X=`0 0 ${_} ${P}`;h[23]===Symbol.for("react.memo_cache_sentinel")?(A={from:{transform:"scaleX(0)"},to:{transform:"scaleX(1)"}},h[23]=A):A=h[23],h[24]!==D||h[25]!==L||h[26]!==I||h[27]!==j?(l={width:j,height:L,flexShrink:0,display:"block",overflow:"visible",color:D,"@keyframes preview-sparkline-reveal":A,...I},h[24]=D,h[25]=L,h[26]=I,h[27]=j,h[28]=l):l=h[28],h[29]!==V||h[30]!==H||h[31]!==K||h[32]!==G||h[33]!==q||h[34]!==P||h[35]!==_?(c=q?(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:G,children:(0,t.jsx)("rect",{x:0,y:0,width:_,height:P,style:{transform:"scaleX(0)",transformOrigin:"left center",animation:`preview-sparkline-reveal ${H}ms ${K} ${V}ms forwards`}})})}):null,h[29]=V,h[30]=H,h[31]=K,h[32]=G,h[33]=q,h[34]=P,h[35]=_,h[36]=c):c=h[36];let Y=q?`url(#${G})`:void 0;return h[37]!==$||h[38]!==R||h[39]!==Y?(d=(0,t.jsx)("path",{d:$,clipPath:Y,fill:"none",stroke:"currentColor",strokeWidth:R,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),h[37]=$,h[38]=R,h[39]=Y,h[40]=d):d=h[40],h[41]!==X||h[42]!==l||h[43]!==c||h[44]!==d?(u=(0,t.jsxs)(i.Box,{component:"svg","aria-hidden":!0,viewBox:X,preserveAspectRatio:"none",sx:l,children:[c,d]}),h[41]=X,h[42]=l,h[43]=c,h[44]=d,h[45]=u):u=h[45],u}])},562058,211049,707484,630629,908294,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(838456),a=e.i(693380),o=e.i(166107),s=e.i(302682),A=e.i(162282),l=e.i(81121),c=e.i(782904),d=e.i(618566),u=e.i(463983);e.i(208085);var h=e.i(619260),p=e.i(153973);e.i(992550);var m=e.i(407585),f=e.i(497624),g=e.i(344873),y=e.i(268407),b=e.i(709643),x=e.i(194130),w=e.i(621725),v=e.i(641883),C=e.i(377010),B=e.i(4977);e.i(842917);var S=e.i(536387),k=e.i(826140),E=e.i(343803),F=e.i(481470);let T=new Set(["USDC"]),U=new Set(["USDC"]),I="USDC";function Q(e){return e.collateralName.toUpperCase()===I||e.displayAsset.toUpperCase()===I||e.asset.toUpperCase()===I}function j(e){return[...e].sort((e,t)=>Number(Q(t))-Number(Q(e)))}let L=e=>e.split("-")[0].split("/")[0].toUpperCase();function _(e){return e.setHideSmallBalances}function P(e){return e.hideSmallBalances}e.s(["HideSmallBalancesTableToggle",0,function(e){let n,i,a,A,l,d,u,h,p=(0,r.c)(17);p[0]!==e?(n=void 0===e?{}:e,p[0]=e,p[1]=n):n=p[1];let{label:m}=n,f=(0,b.useTranslations)(),g=(0,y.useTradingPreferencesStore)(P),x=(0,y.useTradingPreferencesStore)(_),w=!g;return p[2]!==x?(i=(e,t)=>x(!t),p[2]=x,p[3]=i):i=p[3],p[4]===Symbol.for("react.memo_cache_sentinel")?(a={px:0},p[4]=a):a=p[4],p[5]!==w||p[6]!==i?(A=(0,t.jsx)(o.Checkbox,{checked:w,onChange:i,size:"small",sx:a}),p[5]=w,p[6]=i,p[7]=A):A=p[7],p[8]!==m||p[9]!==f?(l=m??f("tables.showSmallBalances"),p[8]=m,p[9]=f,p[10]=l):l=p[10],p[11]!==l?(d=(0,t.jsx)(c.Typography,{variant:"body1",color:"text.primary",children:l}),p[11]=l,p[12]=d):d=p[12],p[13]===Symbol.for("react.memo_cache_sentinel")?(u={m:0,mr:0,userSelect:"none"},p[13]=u):u=p[13],p[14]!==A||p[15]!==d?(h=(0,t.jsx)(s.FormControlLabel,{control:A,label:d,sx:u}),p[14]=A,p[15]=d,p[16]=h):h=p[16],h},"useHoldingsConfig",0,function({vaultAddress:e,maxRows:r=4,onHoldingRowClick:o,getHoldingRowCanClick:s,mobileMetric:_="current"}){let P=(0,b.useTranslations)(),D=(0,d.useRouter)(),R=(0,d.usePathname)(),M=(0,y.useUserTradingDataStore)(e=>e.accountSummary),O=(0,y.useVaultsStore)(t=>e?t.vaults[e]:null),N=(0,y.useTradingDataStore)(e=>e.tickers),H=(0,y.useTradingDataStore)(e=>e.instruments),V=(0,y.useTradingDataStore)(e=>e.setSelectedInstrument),K=(0,y.useTradingDataStore)(e=>e.setSelectedInvestInstrument),{setModal:G,setPayload:W}=(0,y.useActionStore)(),z=(0,y.useTradingPreferencesStore)(e=>e.hideSmallBalances),{data:$}=(0,F.usePreviewSparklines)(),q=!!e,X="/trade"===R||R.startsWith("/trade/"),Y=(0,x.useSettlingSpotDeltas)(),J=q?{}:Y,Z=(0,n.useCallback)(e=>{G("deposit"),W({token:e})},[G,W]),ee=(0,n.useCallback)(e=>{G("withdraw"),W({token:e})},[G,W]),et=(0,n.useCallback)(e=>{G("send"),W({token:e})},[G,W]),er=(0,n.useCallback)(e=>{G("internal-transfer"),W({token:e})},[G,W]),en=(0,n.useCallback)((e,t)=>{let r=H[e.collateral];if(r&&r.kind===t&&!r.delisted)return r;let n=H[`${e.collateralName}/${I}`];if("spot"===t&&n&&!n.delisted)return n;let i=e.collateralName.toUpperCase();return Object.values(H).find(e=>e.kind===t&&!e.delisted&&L(e.name)===i)},[H]),ei=(0,n.useCallback)(e=>{if(o)return void o(e);let t=X?"spot"===e.balanceType?"spot":"perps":"spot",r=en(e,t);if(r){if(X){V(r.name),D.replace((0,v.getTradePathFromInstrumentsMap)(r.name,H));return}K(r.name),D.replace((0,C.getInvestInstrumentPath)(r.name))}},[en,H,X,D,o,V,K]),ea=(0,n.useCallback)(e=>{let t=X?"spot"===e.balanceType?"spot":"perps":"spot";return!!en(e,t)},[en,X]),eo=(0,n.useCallback)(e=>{if((0,B.getMarketInstrument)(e.collateral))return e.collateral;let t=H[`${e.collateralName}/${I}`];if(t&&!t.delisted)return t.name;let r=H[e.collateral];if(r&&!r.delisted)return r.name;let n=e.collateralName.toUpperCase();return Object.values(H).find(e=>!e.delisted&&L(e.name)===n)?.name??e.collateral},[H]),es=(0,n.useCallback)((e,t)=>{let r=H[`${e}/${I}`];if(r&&!r.delisted)return r.name;let n=H[t];
5if(n&&!n.delisted)return n.name;let i=e.toUpperCase();return Object.values(H).find(e=>!e.delisted&&L(e.name)===i)?.name},[H]),eA=(0,n.useCallback)(({label:e,icon:r,onClick:n,size:i=14,disabled:a=!1})=>(0,t.jsx)(l.Tooltip,{title:e,arrow:!0,placement:"top",children:(0,t.jsx)(A.IconButton,{size:"small",disabled:a,onClick:e=>{e.stopPropagation(),n()},sx:{width:24,height:24,borderRadius:.5,color:"white",backgroundColor:"action.selected","&:hover":{color:"text.primary",backgroundColor:"action.hover"}},children:(0,t.jsx)(m.Iconify,{icon:r,width:i,height:i})})}),[]),el=(0,n.useMemo)(()=>{let t=e?O?.account_summary:M,r=t?.collateral||{},n=t?.spot_collateral||{},i=(e,t)=>{let r=[];for(let n of Object.keys(e)){let i=n.split("/")[0],a=i===I?1:Number(N[`${i}/${I}`]?.index_price??0),o=Number(e[n].balance??0),s=e[n].average_price,A="spot"===t?J[i]:void 0,l=A?.delta??0,c=A?.orders??[],d=o+l;if(d<=0)continue;let u=s??null;if("spot"===t&&c.length>0&&d>0){let e=o*(s??0),t=o;for(let r of c)r.baseAsset===i&&"b"===r.side&&(e+=r.sizeBase*r.priceEstimate,t+=r.sizeBase);t>0&&e>0&&(u=e/t)}let h=!T.has(i)&&null!==u&&d>0,p=h?(a-Number(u))*d:null,m=h?Number(u)*d:0,f=h&&0!==m?p/m*100:null,y=es(i,n),b=a*d;r.push({asset:i,displayAsset:(0,w.getAssetDisplayInfo)(i).shortName,totalBalance:(0,g.formatAssetQuantity)(i,d),totalBalanceNumeric:d,confirmedBalance:o,settlingBaseDelta:l,settlingOrdersForAsset:c,withdrawableBalance:(0,g.formatAssetQuantity)(i,e[n].withdrawable_balance),indexPrice:(0,g.formatNumber)(a,{currency:"$",useTickSize:!0,instrument_name:y,trimTrailingZeros:!1,defaultTickSize:.01}),averagePrice:u,averagePriceLabel:null!==u?(0,g.formatNumber)(u,{currency:"$",useTickSize:!0,instrument_name:y,trimTrailingZeros:!1,defaultTickSize:.01}):"--",usdcValue:(0,g.formatNumber)(b,{currency:"$",useTickSize:!0,floor:!0,defaultTickSize:.01}),usdcValueNumeric:b,pnl:p,roi:f,collateralName:i,collateral:n,balanceType:t})}return r},a=j(i(r,"derivatives")),o=i(n,"spot"),s=new Set(o.map(e=>e.collateralName)),A=[];for(let[e,t]of Object.entries(J)){if(s.has(e)||t.delta<=0||0===t.orders.length)continue;let r=Number(N[`${e}/${I}`]?.index_price??0),n=0,i=0;for(let e of t.orders)"b"===e.side&&(n+=e.sizeBase*e.priceEstimate,i+=e.sizeBase);let a=i>0?n/i:null,o=t.orders[0].instrument,l=es(e,o),c=!T.has(e)&&null!==a&&r>0,d=c?(r-Number(a))*t.delta:null,u=c?Number(a)*t.delta:0,h=c&&0!==u?d/u*100:null,p=r*t.delta;A.push({asset:e,displayAsset:(0,w.getAssetDisplayInfo)(e).shortName,totalBalance:(0,g.formatAssetQuantity)(e,t.delta),totalBalanceNumeric:t.delta,confirmedBalance:0,settlingBaseDelta:t.delta,settlingOrdersForAsset:t.orders,withdrawableBalance:(0,g.formatAssetQuantity)(e,0),indexPrice:(0,g.formatNumber)(r,{currency:"$",useTickSize:!0,instrument_name:l,trimTrailingZeros:!1,defaultTickSize:.01}),averagePrice:a,averagePriceLabel:null!==a?(0,g.formatNumber)(a,{currency:"$",useTickSize:!0,instrument_name:l,trimTrailingZeros:!1,defaultTickSize:.01}):"--",usdcValue:(0,g.formatNumber)(p,{currency:"$",useTickSize:!0,floor:!0,defaultTickSize:.01}),usdcValueNumeric:p,pnl:d,roi:h,collateralName:e,collateral:o,balanceType:"spot"})}let l=[...a,...j([...o,...A])];return j(z?l.filter(e=>Q(e)||!(e.usdcValueNumeric<1)):l)},[e,O,M,N,J,es,z]);(0,n.useCallback)(e=>{let r=U.has(e.collateralName);return(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[eA({label:P("common.deposit"),icon:"tabler:arrow-down-left",disabled:!S.DEPOSITS_ENABLED,onClick:()=>Z(e.collateralName)}),eA({label:P("common.withdraw"),icon:"tabler:arrow-up-right",onClick:()=>ee(e.collateralName)}),eA({label:P("common.send"),icon:"solar:plain-2-linear",size:12,onClick:()=>et(e.collateralName)}),r?eA({label:P("common.transfer"),icon:"mingcute:transfer-line",onClick:()=>er(e.collateralName)}):null]})},[eA,Z,ee,et,er,P]);let ec=(0,h.createColumns)(),ed=(0,n.useMemo)(()=>[ec.custom({id:"asset",header:P("tables.asset"),accessorFn:e=>e.displayAsset,cell:({row:e})=>{let r=eo(e.original),n=H[r],{friendlyName:a,shortName:o}=(0,w.getInstrumentDisplayInfo)(r,n?.metadata?.displayName);return(0,t.jsxs)(i.Box,{onClick:t=>{t.stopPropagation(),ei(e.original)},sx:{display:"flex",alignItems:"center",gap:1.25,minWidth:0,cursor:ea(e.original)?"pointer":"default"},children:[(0,t.jsx)(f.CryptoIcon,{symbol:r,width:28,height:28}),(0,t.jsxs)(i.Box,{sx:{minWidth:0,display:"flex",flexDirection:"column"},children:[(0,t.jsx)(c.Typography,{variant:"subtitle1",sx:{lineHeight:1.15},noWrap:!0,children:a}),(0,t.jsx)(c.Typography,{variant:"caption",color:"text.secondary",sx:{lineHeight:1.1,fontSize:12,mt:.5},noWrap:!0,children:o})]})]})},sortable:!0,sortType:"string"}),ec.custom({id:"sparkline",header:"",accessorFn:e=>e.collateral,cell:({row:e})=>{let r=eo(e.original),n=(0,F.getPreviewSparklinePoints)($?.points,r),i=n?.[0]??0,a=n?.[n.length-1]??i;return(0,t.jsx)(E.PreviewSparkline,{points:n,scale:$?.scale??255,width:78,height:28,color:a>
5=i?"primary.light":"secondary.light",preserveSpace:!0,animateOnMount:!1})},sortable:!1}),ec.custom({id:"current",header:"Current",accessorFn:e=>e.usdcValueNumeric,cell:({row:e})=>(0,t.jsx)(c.Typography,{variant:"body1",children:e.original.usdcValue}),sortable:!0,sortType:"number"}),ec.custom({id:"invested",header:"Invested",accessorFn:e=>null===e.averagePrice?0:e.averagePrice*e.totalBalanceNumeric,cell:({row:e})=>{let r=null===e.original.averagePrice?null:e.original.averagePrice*e.original.totalBalanceNumeric;return(0,t.jsx)(c.Typography,{variant:"body1",children:null===r?"--":(0,g.formatNumber)(r,{currency:"$",decimals:2})})},sortable:!0,sortType:"number"}),ec.custom({id:"returns",header:"Returns (%)",accessorFn:e=>e.pnl??0,cell:({row:e})=>{if(null===e.original.pnl||null===e.original.roi)return(0,t.jsx)(c.Typography,{variant:"body1",children:"--"});let r=e.original.pnl>=0;return(0,t.jsxs)(i.Box,{children:[(0,t.jsxs)(c.Typography,{variant:"body1",children:[r?"+":"-",(0,g.formatNumber)(Math.abs(e.original.pnl),{currency:"$",decimals:2})]}),(0,t.jsxs)(c.Typography,{variant:"caption",color:r?"primary.light":"secondary.light",children:[r?"+":"-",Math.abs(e.original.roi).toFixed(2),"%"]})]})},sortable:!0,sortType:"number"}),ec.custom({id:"fiftyTwoWeekPerformance",header:"52W Performance",accessorFn:e=>{let t=eo(e),r=(0,B.getMarketInstrument)(t),n=r?.fiftyTwoWeekLow,i=r?.fiftyTwoWeekHigh,a=e.totalBalanceNumeric>0?e.usdcValueNumeric/e.totalBalanceNumeric:0;return n&&i&&!(i<=n)?(a-n)/(i-n):0},cell:({row:e})=>{let r=eo(e.original),n=(0,B.getMarketInstrument)(r),a=n?.fiftyTwoWeekLow,o=n?.fiftyTwoWeekHigh,s=e.original.totalBalanceNumeric>0?e.original.usdcValueNumeric/e.original.totalBalanceNumeric:0,A=a&&o&&o>a?Math.min(1,Math.max(0,(s-a)/(o-a))):.5;return(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:120},children:[(0,t.jsx)(c.Typography,{variant:"caption",color:"text.primary",children:"L"}),(0,t.jsxs)(i.Box,{sx:{position:"relative",flex:1,height:16},children:[(0,t.jsx)(i.Box,{sx:{position:"absolute",left:0,right:0,top:7,height:4,borderRadius:"2px",background:"linear-gradient(90deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.56) 100%)"}}),(0,t.jsx)(i.Box,{sx:{position:"absolute",left:`${100*A}%`,top:0,width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"8px solid",borderTopColor:"common.white",transform:"translateX(-50%)"}})]}),(0,t.jsx)(c.Typography,{variant:"caption",color:"text.primary",children:"H"})]})},sortable:!0,sortType:"number"})],[ec,$,eo,ei,ea,P]),eu=(0,n.useCallback)(e=>{let r=eo(e),{friendlyName:n,shortName:o}=(0,w.getInstrumentDisplayInfo)(r,(0,B.getMarketInstrument)(r)?.name),s=null===e.averagePrice?null:e.averagePrice*e.totalBalanceNumeric,A=null!==e.pnl&&null!==e.roi,l=(e.pnl??0)>=0,d=A?l?"success.light":"error.light":"text.secondary";return(0,t.jsxs)(a.ButtonBase,{sx:{width:"100%",display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(92px, auto)",alignItems:"center",gap:1.5,py:1.5,px:1,borderBottom:"1px dashed rgba(255,255,255,0.08)",textAlign:"left","&:last-of-type":{borderBottomColor:"transparent"}},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:1.25,minWidth:0},children:[(0,t.jsx)(f.CryptoIcon,{symbol:r,width:30,height:30}),(0,t.jsxs)(i.Box,{sx:{minWidth:0},children:[(0,t.jsx)(c.Typography,{variant:"subtitle2",noWrap:!0,children:n||e.displayAsset}),(0,t.jsx)(c.Typography,{variant:"caption",color:"text.secondary",sx:{fontSize:10},noWrap:!0,children:o||e.collateralName})]})]}),"current"===_?(0,t.jsxs)(i.Box,{sx:{minWidth:92,textAlign:"right"},children:[(0,t.jsx)(c.Typography,{variant:"body2",sx:{fontWeight:600,fontVariantNumeric:"tabular-nums"},children:e.usdcValue}),(0,t.jsx)(c.Typography,{variant:"caption",color:"text.secondary",sx:{fontVariantNumeric:"tabular-nums"},children:null===s?"--":`(${(0,g.formatNumber)(s,{currency:"$",decimals:2})})`})]}):(0,t.jsxs)(i.Box,{sx:{minWidth:92,textAlign:"right"},children:[(0,t.jsx)(c.Typography,{variant:"body2",sx:{color:d,fontWeight:600,fontVariantNumeric:"tabular-nums"},children:A?`${l?"+":"-"}${(0,g.formatNumber)(Math.abs(e.pnl??0),{currency:"$",decimals:2})}`:"--"}),(0,t.jsx)(c.Typography,{variant:"caption",sx:{color:d,fontVariantNumeric:"tabular-nums"},children:A?`(${l?"+":"-"}${Math.abs(e.roi??0).toFixed(2)}%)`:"(--)"})]})]})},[eo,_]),eh;return{config:(0,n.useMemo)(()=>({config:{name:P("invest.holdings"),iconPath:u.tableIcons.balances,noDataMessage:P("tables.noBalancesFound"),isLoading:!1,isError:!1,maxRows:r,onRowClick:o?ei:void 0,getRowCanClick:o?s:void 0,backgroundImage:"/imgs/png/tables/bg.png"},columns:ed,filters:{search:{type:"search",placeholder:"Search Holdings",defaultValue:"",debounce:150,persist:!1,filterFn:(e,t)=>{let r=t.trim().toLowerCase();if(!r)return!0;let n=eo(e),i=(0,B.getMarketInstrument)(n);return[e.asset,e.displayAsset,e.collateralName,n,i?.symbol,i?.name].filter(
5Boolean).some(e=>String(e).toLowerCase().includes(r))}},category:{type:"tabs",options:[{label:"Crypto",value:"crypto"},{label:"Equities",value:"equities"},{label:"ETFs",value:"etfs"}],defaultValue:"all",persist:!1,filterFn:(e,t)=>{if(!t||"all"===t)return!0;let r=new Set(t.split(",").filter(Boolean));return 0===r.size||r.has((0,k.resolveInstrumentPanelCategory)(eo(e)))}}},filterUI:{show:!1},...p.presets.responsive(ed),...p.presets.collapsible(["asset"],{showIndicator:!1,detailsOrder:["current","invested","returns"],footerComponent:eh,customCardRenderer:e=>eu(e)}),sorting:{multiSort:!0,maxMultiSortColCount:3,defaultSort:[{id:"current",desc:!0}],customSortFn:(e,t,r)=>j(r(e,t))}}),[ed,r,o,s,eh,ei,eo,eu,P]),data:el}}],562058);var D=e.i(806378),R=e.i(774804);function M(e){let t=parseFloat(e.funding_payment);return 0===t?null:t>0?"long":"short"}function O(e){return e.instruments}function N(e){return e.fundingPayments}function H(e){let t=parseFloat(e.funding_payment);return 0===t?null:t>0?"long":"short"}function V(e){return e.instruments}e.s(["useFundingPaymentConfig",0,function(e){let n,i,a,o,s,A,l,d,m,f,x,w,v,C,B,S=(0,r.c)(48),{enabled:k,maxRows:E}=e,F=void 0===k||k,T=void 0===E?4:E,U=(0,b.useTranslations)();S[0]!==F?(n={refetch:!0,enabled:F},S[0]=F,S[1]=n):n=S[1];let{isLoading:I,error:Q}=(0,D.useFundingPayments)(n),j=(0,y.useUserTradingDataStore)(N),L=(0,y.useTradingDataStore)(O);S[2]!==L?(i=e=>Object.values(L).find(t=>t.id===e)||Object.values(L)[0],S[2]=L,S[3]=i):i=S[3];let _=i;if(S[4]!==U?(a=h.col.timestamp("timestamp",U("tables.fundingTime")),S[4]=U,S[5]=a):a=S[5],S[6]!==_||S[7]!==U){let e;S[9]!==_?(e=e=>{let{getValue:r}=e,n=_(r()).name;return(0,t.jsx)(R.InstrumentCell,{value:n,label:n.split("-")[0]})},S[9]=_,S[10]=e):e=S[10],o=h.col.custom({id:"instrument",header:U("tables.fundingAsset"),accessorKey:"instrument_id",cell:e,sortable:!0}),S[6]=_,S[7]=U,S[8]=o}else o=S[8];if(S[11]!==_||S[12]!==U){let e;S[14]!==_?(e=e=>{let{row:r}=e,n=_(r.original.instrument_id).name;return(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatNumber)(parseFloat(r.original.size),{decimals:2,useContractSize:!0,instrument_name:n,fallback:"--"})})},S[14]=_,S[15]=e):e=S[15],s=h.col.custom({id:"size",header:U("tables.fundingSize"),accessorKey:"size",cell:e,sortable:!0,sortType:"number"}),S[11]=_,S[12]=U,S[13]=s}else s=S[13];S[16]!==U?(A=h.col.custom({id:"side",header:U("tables.fundingPositionSide"),accessorKey:"size",cell:e=>{let{getValue:r}=e,n=parseFloat(r()),i=n>0?U("common.long"):U("common.short");return(0,t.jsx)(c.Typography,{variant:"body1",sx:{color:n>0?"primary.light":"secondary.light",textTransform:"capitalize"},children:i})},sortable:!1}),S[16]=U,S[17]=A):A=S[17],S[18]!==U?(l=h.col.text("funding_payment",U("tables.fundingPayment"),"funding_payment"),S[18]=U,S[19]=l):l=S[19],S[20]!==U?(d=h.col.text("funding_rate",U("tables.fundingFundingRate"),"funding_rate"),S[20]=U,S[21]=d):d=S[21],S[22]!==d||S[23]!==a||S[24]!==o||S[25]!==s||S[26]!==A||S[27]!==l?(m=[a,o,s,A,l,d],S[22]=d,S[23]=a,S[24]=o,S[25]=s,S[26]=A,S[27]=l,S[28]=m):m=S[28];let P=m;S[29]!==U?(f=U("tables.fundingPayments"),S[29]=U,S[30]=f):f=S[30],S[31]!==U?(x=U("tables.noFundingPayments"),S[31]=U,S[32]=x):x=S[32];let H=!!Q;S[33]!==I||S[34]!==T||S[35]!==f||S[36]!==x||S[37]!==H?(w={name:f,iconPath:u.tableIcons.positions,noDataMessage:x,isLoading:I,isError:H,maxRows:T,getRowIndicator:M},S[33]=I,S[34]=T,S[35]=f,S[36]=x,S[37]=H,S[38]=w):w=S[38],S[39]!==P?(v=p.presets.standard(P,["instrument_id"],"timestamp"),S[39]=P,S[40]=v):v=S[40],S[41]!==P||S[42]!==w||S[43]!==v?(C={config:w,columns:P,...v},S[41]=P,S[42]=w,S[43]=v,S[44]=C):C=S[44];let V=C;return S[45]!==V||S[46]!==j?(B={config:V,data:j},S[45]=V,S[46]=j,S[47]=B):B=S[47],B},"useFundingPaymentTableConfig",0,function(e){let n,i,a,o,s,A,l,d,m,f,x,w,v,C,B=(0,r.c)(46),{isLoading:S,isError:k,maxRows:E,rowsPerPage:F}=e,T=(0,b.useTranslations)(),U=(0,y.useTradingDataStore)(V);B[0]!==U?(n=e=>{let t=Object.values(U).find(t=>t.id===e),r=Object.values(U)[0];return t||r||{id:e,name:String(e)}},B[0]=U,B[1]=n):n=B[1];let I=n;if(B[2]!==T?(i=h.col.timestamp("timestamp",T("tables.fundingTime")),B[2]=T,B[3]=i):i=B[3],B[4]!==I||B[5]!==T){let e;B[7]!==I?(e=e=>{let{getValue:r}=e,n=I(r()).name;return(0,t.jsx)(R.InstrumentCell,{value:n,label:n.split("-")[0]})},B[7]=I,B[8]=e):e=B[8],a=h.col.custom({id:"instrument",header:T("tables.fundingAsset"),accessorKey:"instrument_id",cell:e,sortable:!0}),B[4]=I,B[5]=T,B[6]=a}else a=B[6];if(B[9]!==I||B[10]!==T){let e;B[12]!==I?(e=e=>{let{row:r}=e,n=I(r.original.instrument_id).name;return(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatNumber)(parseFloat(r.original.size),{decimals:2,useContractSize:!0,instrument_name:n,fallback:"--"})})},B[12]=I,B[13]=e):e=B[13],o=h.col.custom({id:"size",header:T("tables.fundingSize"),accessorKey:"size",cell:e,sortable:!0,sortType:"number"}),B[9]=I,B[10]=T,B[11]=o}else o=B[11];B[14]!==T?(s=h.col.custom({id:"side",header:T("tables.fundingPositionSide"),accessorKey:"size",cell:e=>{let{getValue:r}
5=e,n=parseFloat(r()),i=n>0?T("common.long"):T("common.short");return(0,t.jsx)(c.Typography,{variant:"body1",sx:{color:n>0?"primary.light":"secondary.light",textTransform:"capitalize"},children:i})},sortable:!1}),B[14]=T,B[15]=s):s=B[15],B[16]!==T?(A=h.col.text("funding_payment",T("tables.fundingPayment"),"funding_payment"),B[16]=T,B[17]=A):A=B[17],B[18]!==T?(l=h.col.text("funding_rate",T("tables.fundingFundingRate"),"funding_rate"),B[18]=T,B[19]=l):l=B[19],B[20]!==i||B[21]!==a||B[22]!==o||B[23]!==s||B[24]!==A||B[25]!==l?(d=[i,a,o,s,A,l],B[20]=i,B[21]=a,B[22]=o,B[23]=s,B[24]=A,B[25]=l,B[26]=d):d=B[26];let Q=d;return B[27]!==T?(m=T("tables.fundingRate"),B[27]=T,B[28]=m):m=B[28],B[29]!==T?(f=T("tables.noFundingPayments"),B[29]=T,B[30]=f):f=B[30],B[31]!==F?(x=null!=F&&{pagination:{rowsPerPage:F}},B[31]=F,B[32]=x):x=B[32],B[33]!==k||B[34]!==S||B[35]!==E||B[36]!==f||B[37]!==x||B[38]!==m?(w={name:m,iconPath:u.tableIcons.positions,noDataMessage:f,isLoading:S,isError:k,maxRows:E,getRowIndicator:H,...x},B[33]=k,B[34]=S,B[35]=E,B[36]=f,B[37]=x,B[38]=m,B[39]=w):w=B[39],B[40]!==Q?(v=p.presets.standard(Q,["instrument_id"],"timestamp"),B[40]=Q,B[41]=v):v=B[41],B[42]!==Q||B[43]!==w||B[44]!==v?(C={config:w,columns:Q,...v},B[42]=Q,B[43]=w,B[44]=v,B[45]=C):C=B[45],C}],211049);var K=e.i(990577);e.i(112486);var G=e.i(919007),W=e.i(201034),z=e.i(68043);let $={deposit:"Deposit",vault_deposit:"Vault Deposit",vault_withdraw:"Vault Withdraw",spot_withdraw:"Withdraw",derivative_withdraw:"Withdraw"};function q(e,t){return"all"===t||("deposit"===t?"deposit"===e.type:"spot_withdraw"===e.type||"derivative_withdraw"===e.type)}function X(e){let{row:r}=e,n=r.original.type.endsWith("derivative_withdraw"),i=Number(r.original.timestamp),a=Number.isFinite(i)?i>1e12?Math.floor(i/1e3):i:Math.floor(Date.parse(r.original.timestamp)/1e3);return(0,t.jsx)(c.Typography,{variant:"body1",children:n?a>0x69be8d38?"$1.50":"$3.00":"--"})}function Y(e){let{getValue:r}=e;return(0,t.jsx)(K.Link,{href:`/explorer/tx/${r()}`,target:"_blank",children:(0,t.jsx)(G.TableCellIcon,{title:(0,g.formatWalletAddress)(r())})})}function J(e){return e.address}function Z(e){return e.supportedCollateral}function ee(e){return e.collateralTransactions}e.s(["useCollateralTransactionsConfig",0,function(e){let n,a,o,s,A,l,d,m,x,w,v,C,B,S,k,E,F,T,U,I,Q,j,L,_,P=(0,r.c)(69),{enabled:D,maxRows:R,showFilters:M}=e,O=void 0===D||D,N=void 0===R?4:R,H=void 0===M||M,V=(0,b.useTranslations)();P[0]!==O?(n={refetch:O,enabled:O},P[0]=O,P[1]=n):n=P[1];let{isLoading:et,error:er}=(0,W.useCollateralTransactions)(n),en=(0,y.useUserTradingDataStore)(ee)??[],ei=(0,y.useTradingDataStore)(Z),ea=(0,y.useAuthStore)(J);if(P[2]!==ea||P[3]!==ei||P[4]!==V){let e,r,n,u=(0,h.createColumns)();P[12]!==ei?(e=e=>{let{getValue:r}=e,n=Object.keys(ei).find(e=>ei[e].id===r())||"USDT";return(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,t.jsx)(f.CryptoIcon,{alt:`${n}-logo`,symbol:n,width:16,height:16}),(0,t.jsx)(c.Typography,{variant:"body1",children:n.toUpperCase()})]})},P[12]=ei,P[13]=e):e=P[13],s=u.custom({id:"collateral_id",header:V("tables.asset"),accessorKey:"collateral_id",cell:e,sortable:!0}),P[14]!==ea?(r=e=>{let{row:r}=e;return(0,t.jsx)(c.Typography,{variant:"body1",color:r.original.to===ea?"success.main":"error.main",children:function(e,t){let{type:r}=e;return"spot_balance_transfer"===r||"derivative_balance_transfer"===r?e.to===t?"Received":"Sent":$[r]??r.split("_").join(" ")}(r.original,ea)})},P[14]=ea,P[15]=r):r=P[15],A=u.custom({id:"type",header:V("tables.type"),accessorKey:"type",cell:r,sortable:!0}),l=u.custom({id:"counterparty",header:V("tables.counterparty"),accessorKey:"to",cell:e=>{let{row:r}=e,n=r.original.to===ea?r.original.from:r.original.to,i=Object.values(ei).find(e=>e.id===r.original.collateral_id)?.bridge_by_chain[0].bridgeContractAddress;return"0x0000000000000000000000000000000000000000"!==n?(0,t.jsx)(K.Link,{href:`/explorer/address/${n}`,target:"_blank",children:(0,t.jsx)(G.TableCellIcon,{title:(0,g.formatWalletAddress)(n)})}):(0,t.jsx)(K.Link,{href:`https://${z.isMainnet?"etherscan.io":"sepolia.etherscan.io"}/address/${i}`,target:"_blank",children:(0,t.jsx)(G.TableCellIcon,{title:V("tables.bridge")})})},sortable:!0}),P[16]===Symbol.for("react.memo_cache_sentinel")?(d=h.q.time("timestamp"),P[16]=d):d=P[16],P[17]!==ea?(n=e=>{let{getValue:r,row:n}=e;return(0,t.jsx)(c.Typography,{variant:"body1",color:n.original.to===ea?"success.main":"error.main",children:(0,g.formatNumber)(parseFloat(r(
5)),{decimals:2,currency:"$"})})},P[17]=ea,P[18]=n):n=P[18],m=u.custom({id:"amount",header:V("common.amount"),accessorKey:"amount",cell:n,sortable:!0,sortType:"number"}),a=u.custom({id:"txHash",header:V("tables.txHash"),accessorKey:"tx_hash",cell:Y,sortable:!1}),o=u.custom({id:"fees",header:V("common.fees"),accessorKey:"type",cell:X,sortable:!1}),P[2]=ea,P[3]=ei,P[4]=V,P[5]=a,P[6]=o,P[7]=s,P[8]=A,P[9]=l,P[10]=d,P[11]=m}else a=P[5],o=P[6],s=P[7],A=P[8],l=P[9],d=P[10],m=P[11];P[19]!==a||P[20]!==o||P[21]!==s||P[22]!==A||P[23]!==l||P[24]!==d||P[25]!==m?(x=[s,A,l,d,m,a,o],P[19]=a,P[20]=o,P[21]=s,P[22]=A,P[23]=l,P[24]=d,P[25]=m,P[26]=x):x=P[26];let eo=x;P[27]!==ea?(w=e=>{let t=parseFloat(e.to===ea?"1":"-1");return 0===t?null:t>0?"long":"short"},P[27]=ea,P[28]=w):w=P[28];let es=w;P[29]!==V?(v=V("tables.collateralTransactions"),P[29]=V,P[30]=v):v=P[30],P[31]!==V?(C=V("tables.noCollateralTransactions"),P[31]=V,P[32]=C):C=P[32];let eA=!!er;P[33]!==es||P[34]!==et||P[35]!==N||P[36]!==v||P[37]!==C||P[38]!==eA?(B={name:v,iconPath:u.tableIcons.positions,noDataMessage:C,isLoading:et,isError:eA,maxRows:N,getRowIndicator:es},P[33]=es,P[34]=et,P[35]=N,P[36]=v,P[37]=C,P[38]=eA,P[39]=B):B=P[39],P[40]!==V?(S=V("common.all"),P[40]=V,P[41]=S):S=P[41],P[42]!==S?(k={label:S,value:"all"},P[42]=S,P[43]=k):k=P[43],P[44]!==V?(E=V("tables.deposit"),P[44]=V,P[45]=E):E=P[45],P[46]!==E?(F={label:E,value:"deposit"},P[46]=E,P[47]=F):F=P[47],P[48]!==V?(T=V("tables.withdrawal"),P[48]=V,P[49]=T):T=P[49],P[50]!==T?(U={label:T,value:"withdrawal"},P[50]=T,P[51]=U):U=P[51],P[52]!==k||P[53]!==F||P[54]!==U?(I={transactionType:{type:"tabs",options:[k,F,U],defaultValue:"all",filterFn:q,persist:!1}},P[52]=k,P[53]=F,P[54]=U,P[55]=I):I=P[55],P[56]!==H?(Q={show:H},P[56]=H,P[57]=Q):Q=P[57],P[58]!==eo?(j=p.presets.standard(eo,["collateral_id"],"timestamp"),P[58]=eo,P[59]=j):j=P[59],P[60]!==eo||P[61]!==B||P[62]!==I||P[63]!==Q||P[64]!==j?(L={config:B,columns:eo,filters:I,filterUI:Q,...j},P[60]=eo,P[61]=B,P[62]=I,P[63]=Q,P[64]=j,P[65]=L):L=P[65];let el=L;return P[66]!==el||P[67]!==en?(_={config:el,data:en},P[66]=el,P[67]=en,P[68]=_):_=P[68],_}],707484),e.i(929009);var et=e.i(844890),er=e.i(727726),en=e.i(797986),ei=e.i(772475),ea=e.i(816790);e.s(["useAgentWalletsConfig",0,function({maxRows:e}={}){let{isLoading:r,error:a,fetchAgentWallets:o}=(0,et.useAgentWallets)(),{agentWallets:s,setAgentWallets:A}=(0,y.useUserTradingDataStore)(),{address:l,agents:d,clearAgent:m,setStatus:f,activeVault:g}=(0,y.useAuthStore)(),{revokeAgent:b}=(0,er.useAccountActions)(),x=(0,n.useMemo)(()=>s.filter(e=>"default"!==e.agent_name),[s]),w=(0,n.useCallback)(async e=>{try{let t=g===ea.ZERO_ADDRESS?"":g;if((await b(e.agent_address,t)).success){let t=l?d[l]:null;t&&t.address.toLowerCase()===e.agent_address.toLowerCase()&&t.name===e.agent_name&&(m(l),f("connected"));let r=s.filter(t=>t.agent_address.toLowerCase()!==e.agent_address.toLowerCase()||t.agent_name!==e.agent_name);A(r),setTimeout(()=>o(),1e3)}}catch(e){console.error("Failed to revoke agent:",e)}},[b,s,A,o,l,d,m,f]),v=(0,n.useMemo)(()=>[h.col.text("name","Agent Wallet Name","agent_name",{sortable:!0}),h.col.custom({id:"agent_address",header:"Agent Wallet Address",accessorKey:"agent_address",sortable:!0,cell:({getValue:e})=>{let r=String(e()??"");return(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,t.jsx)(c.Typography,{variant:"body1",children:r}),(0,t.jsx)(en.CopyIconButton,{value:r,toastMessage:"Address copied!",iconSize:14,sx:{"&:hover":{color:"primary.main"}}})]})}}),h.col.timestamp("valid_until_timestamp","Valid Until"),h.col.custom({id:"actions",header:"Actions",cell:({row:e,table:r})=>{let n=r?.options?.meta?.onRevoke;return n?(0,t.jsx)(ei.ActionButton,{actionType:"connected",variant:"soft",size:"small",color:"error",onClick:t=>{t.stopPropagation(),n(e.original)},children:"Revoke"}):null}})],[]);return{config:(0,n.useMemo)(()=>({config:{name:"Agent Wallets",iconPath:u.tableIcons.history,noDataMessage:"No agent wallets yet",isLoading:r,isError:!!a,maxRows:e,backgroundImage:"/imgs/png/tables/bg-extended.png"},columns:v,meta:{onRevoke:w},...p.presets.responsive(v),...p.presets.collapsible(["agent_name"],{mdGridColumns:1,smGridColumns:1}),...p.presets.sorting("valid_until_timestamp")}),[v,r,a,e,w]),data:x}}],630629),e.s(["useReferralConfig",0,function({maxRows:e=4}={}){let r=(0,b.useTranslations)(),i=(0,y.useAuthStore)(e=>e.address),a=(0,y.useUserTradingDataStore)(e=>e.referralSummary[i]),o=(0,n.useMemo)(()=>Object.entries(a?.referred_users||{}).map(([e,t])=>({address:e,...t})),[a]),s=(0,n.useMemo)(()=>[h.col.custom({id:"address",header:r("common.address"),accessorKey:"address",cell:({getValue:e})=>(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatWalletAddress)(e(),8,5)}),sortable:!0}),h.col.custom({id:"joined_at",header:r("referrals.joinedAt"),accessorKey:"joined_at",accessorFn:e=>new Date(e.joined_at).getTime(),cell:({getValue:e})=>(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatTableDateTime)(e())}),sortable:!0}),h.col.custom({id:"referred_volume",header:r("referrals.referredVolume"),accessorKey:"referred_volume",accessorFn:e=>e.referred_volume,cell:({getValue:e})=>(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatNumber)(e())}),sortable:!0,sortType:"number"}),h.col.custom({id:"referred_rewards",header:r("referrals.referredRewards"),cell:({row:e})=>{let r=e.original.referred_perp_rewards+e.original.referred_spot_rewards;return(0,t.jsx)(c.Typography,{variant:"body1",children:(0,g.formatNumber)(r)})},sortable:!0,sortType:"number"})],[r]);return{config:(0,n.useMemo)(()=>({config:{name:r("referrals.title"),iconPath:u.tableIcons.orders,noDataMessage:r("referrals.noReferralsFound"),isLoading:!1,isError:!1,maxRows:e},columns:s,...p.presets.standard(s,["address"],"joined_at")}),[s,e]),data:o}}],908294)},100451,e=>{"use strict";
5var t=e.i(474076),r=e.i(838456),n=e.i(782904),i=e.i(657688);e.s(["createReferralTiersConfig",0,()=>({config:{name:"Referral Tiers",noDataMessage:"No referral tiers available",isLoading:!1,isError:!1,maxRows:10},columns:[{id:"tier",header:"Tier",accessorKey:"tier",cell:({getValue:e,row:a})=>{let o=e(),s=a.original.icon;return(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[s&&(0,t.jsx)(i.default,{src:s,alt:o,width:14.5,height:14.5}),(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:o})]})},sortable:!1},{id:"totalVolume",header:"Referred volume",accessorKey:"totalVolume",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1},{id:"feeDiscount",header:"Fee discount",accessorKey:"feeDiscount",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1},{id:"commission",header:"Commission",accessorKey:"commission",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1}],data:[{tier:"Standard",icon:"imgs/svg/referral/icons/standard.svg",totalVolume:"0-500K",feeDiscount:"5%",commission:"10%"},{tier:"Silver",icon:"imgs/svg/referral/icons/silver.svg",totalVolume:">500K",feeDiscount:"5%",commission:"15%"},{tier:"Gold",icon:"imgs/svg/referral/icons/gold.svg",totalVolume:">1M",feeDiscount:"5%",commission:"20%"},{tier:"Platinum",icon:"imgs/svg/referral/icons/platinum.svg",totalVolume:">3M",feeDiscount:"5%",commission:"25%"}],responsive:{columnVisibility:{lg:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0},md:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0},sm:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0}},columnCellRenderers:{}}})])},680919,e=>{"use strict";var t=e.i(474076),r=e.i(838456),n=e.i(782904);e.s(["createFeeTiersConfig",0,(e=e=>e)=>({config:{name:e("modals.feeTiers"),noDataMessage:e("modals.noFeeTiersAvailable"),isLoading:!1,isError:!1,maxRows:10},columns:[{id:"tier",header:e("modals.tiers"),accessorKey:"tier",cell:({getValue:e,row:i})=>{let a=e();return(0,t.jsx)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:a})})},sortable:!0},{id:"totalVolume",header:e("tables.totalVolume"),accessorKey:"totalVolume",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0},{id:"perpsTaker",header:e("tables.perpsTaker"),accessorKey:"perpsTaker",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0,sortType:"number"},{id:"perpsMaker",header:e("modals.perpsMaker"),accessorKey:"perpsMaker",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0,sortType:"number"}],data:[{tier:"Regular",totalVolume:"0M-1M",perpsTaker:"0.025%",perpsMaker:"-0.002%",spotTaker:"0.03%",spotMaker:"0%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 1",totalVolume:"1M-5M",perpsTaker:"0.024%",perpsMaker:"-0.0025%",spotTaker:"0.0275%",spotMaker:"-0.0025%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 2",totalVolume:"5M-20M",perpsTaker:"0.023%",perpsMaker:"-0.003%",spotTaker:"0.025%",spotMaker:"-0.005%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 3",totalVolume:"20M-100M",perpsTaker:"0.022%",perpsMaker:"-0.0035%",spotTaker:"0.0225%",spotMaker:"-0.001%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 4",totalVolume:"100M-250M",perpsTaker:"0.021%",perpsMaker:"-0.005%",spotTaker:"0.02%",spotMaker:"-0.011%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 5",totalVolume:"250M-500M",perpsTaker:"0.02%",perpsMaker:"-0.007%",spotTaker:"0.0175%",spotMaker:"-0.0125%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"},{tier:"VIP 6",totalVolume:"500M+",perpsTaker:"0.02%",perpsMaker:"-0.014%",spotTaker:"0.015%",spotMaker:"-0.014%",spotStableMaker:"-0.005%",spotStableTaker:"0.01%"}],responsive:{columnVisibility:{lg:{tier:!0,totalVolume:!0,perpsTaker:!0,perpsMaker:!0},md:{tier:!0,totalVolume:!0,perpsTaker:!0,perpsMaker:!0},sm:{tier:!0,totalVolume:!0,perpsTaker:!0,perpsMaker:!1}},columnCellRenderers:{}},sorting:{multiSort:!1,defaultSort:[{id:"tier",desc:!1}]}})])},788363,e=>{"use strict";var t=e.i(474076),r=e.i(838456),n=e.i(782904),i=e.i(397837),a=e.i(344873);let o=e=>({1:e("points.diamond"),2:e("points.platinum"),3:e("points.gold"),4
5:e("points.silver"),5:e("points.bronze"),6:e("points.copper")});e.s(["createPointsConfig",0,(e=[],s=!1,A,l=e=>e)=>{let c=o(l);return{config:{name:l("points.title"),noDataMessage:l("points.noPointsHistory"),isLoading:s,isError:!1,maxRows:10},columns:[{id:"epoch",header:l("points.epoch"),accessorKey:"epoch",cell:({getValue:e})=>{let i=e();return(0,t.jsx)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:i})})},sortable:!0,sortType:"number"},{id:"rank",header:l("points.epochRank"),accessorKey:"rank",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0,sortType:"number"},{id:"own_points",header:l("points.ownPoints"),accessorKey:"own_points",cell:({getValue:e})=>{let r=e();return(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:0===r?"-":(0,a.formatNumber)(r)})},sortable:!0,sortType:"number"},{id:"referral_points",header:l("points.referralGains"),accessorKey:"referral_points",cell:({getValue:e})=>{let r=e();return(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:0===r?"-":(0,a.formatNumber)(r)})},sortable:!0,sortType:"number"},{id:"creator_points",header:l("points.creatorPoints"),accessorKey:"creator_points",cell:({getValue:e})=>{let r=e()??0;return(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:0===r?"-":(0,a.formatNumber)(r)})},sortable:!0,sortType:"number"},{id:"points",header:l("points.totalPoints"),accessorKey:"points",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:(0,a.formatNumber)(e())}),sortable:!0,sortType:"number"},{id:"league",header:l("points.league"),accessorKey:"league",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:c[e()]}),sortable:!0,sortType:"number"},{id:"actions",header:l("points.shareCard"),cell:({row:e})=>(0,t.jsx)(r.Box,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,t.jsx)(i.Button,{variant:"contained",color:"inherit",size:"small",onClick:t=>{t.stopPropagation(),A?.(e.original)},children:l("common.share")})}),sortable:!1}],data:e,responsive:{columnVisibility:{lg:{epoch:!0,rank:!0,points:!0,own_points:!0,referral_points:!0,creator_points:!0,league:!0,actions:!0},md:{epoch:!0,rank:!0,points:!0,own_points:!0,referral_points:!0,creator_points:!0,league:!0,actions:!0},sm:{epoch:!0,rank:!0,points:!0,own_points:!0,referral_points:!0,creator_points:!0,league:!0,actions:!0}},columnCellRenderers:{}},collapsible:{enabled:!0,breakpoints:{sm:{primaryFields:["epoch","points"],detailsOrder:["rank","own_points","referral_points","creator_points","league","actions"],gridColumns:1}}},sorting:{multiSort:!1,defaultSort:[{id:"epoch",desc:!0}]}}},"getLeagueNames",0,o])},358866,e=>{"use strict";var t=e.i(474076),r=e.i(838456),n=e.i(782904),i=e.i(657688);e.s(["createAffiliateTiersConfig",0,()=>({config:{name:"Affiliate Tiers",noDataMessage:"No affiliate tiers available",isLoading:!1,isError:!1,maxRows:10},columns:[{id:"tier",header:"Tier",accessorKey:"tier",cell:({getValue:e,row:a})=>{let o=e(),s=a.original.icon;return(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[s&&(0,t.jsx)(i.default,{src:s,alt:o,width:14.5,height:14.5}),(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:o})]})},sortable:!1},{id:"totalVolume",header:"Referred volume",accessorKey:"totalVolume",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1},{id:"feeDiscount",header:"Fee discount",accessorKey:"feeDiscount",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1},{id:"commission",header:"Commission",accessorKey:"commission",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!1}],data:[{tier:"Scout",icon:"imgs/svg/affiliate/icons/scout.svg",totalVolume:"0-5M",feeDiscount:"5%",commission:"35%"},{tier:"Pro",icon:"imgs/svg/affiliate/icons/pro.svg",totalVolume:">5M",feeDiscount:"5%",commission:"40%"},{tier:"Elite",icon:"imgs/svg/affiliate/icons/elite.svg",totalVolume:">20M",feeDiscount:"5%",commission:"45%"},{tier:"Titan",icon:"imgs/svg/affiliate/icons/titan.svg",totalVolume:">100M",feeDiscount:"5%",commission:"50%"}],responsive:{columnVisibility:{lg:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0},md:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0},sm:{tier:!0,totalVolume:!0,feeDiscount:!0,commission:!0}},columnCellRenderers:{}}})])},900102,326979,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(346944),a=e.i(463983);e.i(208085);var o=e.i(619260),s=e.i(153973),A=e.i(268407);e.i(929009);var l=e.i(444714),c=e.i(727726),d=e.i(838456),u=e.i(782904),h=e.i(797986),p=e.i(772475);function m(e){let{row:r,table:n}=e,i=n?.options?.meta?.onRevoke;return i?(0,t.jsx)(p.ActionButton,{actionType:"connected",variant:"soft",size:"small",color:"error",onClick:e=>{e.stopPropagation(),i(r.original)},children:"Revoke"}):null}function f(e){let{getValue:r}
5=e,n=(100*parseFloat(r())).toFixed(3);return(0,t.jsxs)(u.Typography,{variant:"body2",children:[n,"%"]})}function g(e){let{getValue:r}=e,n=r();return(0,t.jsxs)(d.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsxs)(u.Typography,{variant:"body2",children:[n.slice(0,6),"...",n.slice(-4)]}),(0,t.jsx)(h.CopyIconButton,{value:n,toastMessage:"Address copied!",iconSize:14,sx:{"&:hover":{color:"primary.main"}}})]})}function y(e){return parseFloat(e.max_fee_rate)>0}e.s(["useBrokersConfig",0,function(e){let t,d,u,h,p,b,x,w,v,C,B,S,k,E,F,T,U=(0,r.c)(42);U[0]!==e?(t=void 0===e?{}:e,U[0]=e,U[1]=t):t=U[1];let{maxRows:I,rowsPerPage:Q}=t,j=void 0===Q?10:Q,[L,_]=(0,n.useState)(1),[P]=(0,n.useState)(j);U[2]!==P||U[3]!==L?(d={page:L,limit:P},U[2]=P,U[3]=L,U[4]=d):d=U[4];let{isLoading:D,error:R,fetchBrokers:M,pagination_meta:O}=(0,l.useBrokers)(d),{approveBrokerFee:N}=(0,c.useAccountActions)(),{address:H}=(0,A.useAuthStore)();U[5]!==H?(u=e=>H&&e.brokers[H]||[],U[5]=H,U[6]=u):u=U[6];let V=(0,A.useUserTradingDataStore)((0,i.useShallow)(u));U[7]!==V?(h=V.filter(y),U[7]=V,U[8]=h):h=U[8];let K=h;U[9]!==N||U[10]!==M||U[11]!==P||U[12]!==L?(p=async e=>{try{await N(e.broker,"0"),setTimeout(()=>M(L,P),1e3)}catch(e){console.error("Failed to revoke broker:",e)}},U[9]=N,U[10]=M,U[11]=P,U[12]=L,U[13]=p):p=U[13];let G=p;U[14]===Symbol.for("react.memo_cache_sentinel")?(b=[o.col.custom({id:"broker",header:"Builder Address",accessorKey:"broker",cell:g,sortable:!0}),o.col.custom({id:"max_fee_rate",header:"Max Fee Rate",accessorKey:"max_fee_rate",cell:f,sortable:!0}),o.col.timestamp("updated_at","Updated At"),o.col.custom({id:"actions",header:"Actions",cell:m})],U[14]=b):b=U[14];let W=b,z=!!R;U[15]!==j?(x={rowsPerPage:j},U[15]=j,U[16]=x):x=U[16],U[17]!==D||U[18]!==I||U[19]!==z||U[20]!==x?(w={name:"Builders",iconPath:a.tableIcons.history,noDataMessage:"No builders yet",isLoading:D,isError:z,maxRows:I,backgroundImage:"/imgs/png/tables/bg-extended.png",pagination:x},U[17]=D,U[18]=I,U[19]=z,U[20]=x,U[21]=w):w=U[21];let $=O.page-1;U[22]!==M||U[23]!==P?(v=(e,t)=>{let r=t+1;_(r),M(r,P)},U[22]=M,U[23]=P,U[24]=v):v=U[24],U[25]!==O.limit||U[26]!==O.total_count||U[27]!==$||U[28]!==v?(C={page:$,count:O.total_count,rowsPerPage:O.limit,onPageChange:v},U[25]=O.limit,U[26]=O.total_count,U[27]=$,U[28]=v,U[29]=C):C=U[29],U[30]!==G||U[31]!==C?(B={onRevoke:G,serverPagination:C},U[30]=G,U[31]=C,U[32]=B):B=U[32],U[33]===Symbol.for("react.memo_cache_sentinel")?(S=s.presets.responsive(W),k=s.presets.collapsible(["broker"],{mdGridColumns:1,smGridColumns:1}),E=s.presets.sorting("updated_at"),U[33]=S,U[34]=k,U[35]=E):(S=U[33],k=U[34],E=U[35]),U[36]!==w||U[37]!==B?(F={config:w,columns:W,meta:B,...S,...k,...E},U[36]=w,U[37]=B,U[38]=F):F=U[38];let q=F;return U[39]!==q||U[40]!==K?(T={config:q,data:K},U[39]=q,U[40]=K,U[41]=T):T=U[41],T}],900102);var b=e.i(954512),x=e.i(344873),w=e.i(957195),v=e.i(960343),C=e.i(632418);let B=e=>e.split("_").map(e=>e?e[0].toUpperCase()+e.slice(1).toLowerCase():e).join(" "),S=e=>{let t=e.status.toLowerCase();return t.includes("pending")||t.includes("queue")?"warning":!e.success||e.error_message?"error":"success"};e.s(["useVaultTransactionsConfig",0,function({vaultAddress:e,enabled:r=!0,maxRows:i=10,showFilters:l=!0}){let{isLoading:c,error:d,fetchVaultQueue:h}=function(){let{vaultQueue:e,setVaultQueue:t,clearVaultQueue:r}=(0,A.useUserTradingDataStore)(),{subscriptionClient:i}=(0,v.useSubscriptionClient)(),{infoClient:a}=(0,w.useInfoClient)(),{address:o,status:s}
5=(0,A.useAuthStore)(),[l,c]=(0,n.useState)(!1),[d,u]=(0,n.useState)(null),h=(0,n.useRef)(null),p=(0,n.useCallback)(async()=>{try{if(c(!0),u(null),!o||"disconnected"===s)return;let e=await a.getVaultQueue({user:o});t(o,e),h.current&&(h.current.unsubscribe(),h.current=null),h.current=await i.vaultQueue({user:o},e=>{t(o,[e.detail])})}catch(e){console.error("Error fetching vault queue:",e),u(e instanceof Error?e.message:String(e))}finally{c(!1)}},[o,s,a,t,i]);return(0,n.useEffect)(()=>()=>{if(h.current)try{h.current.unsubscribe()}catch(e){console.error("Failed to unsubscribe from vault queue updates:",e)}finally{h.current=null}},[]),{isLoading:l,error:d,fetchVaultQueue:p}}(),p=(0,A.useAuthStore)(e=>e.address),m=(0,A.useUserTradingDataStore)(e=>e.vaultQueue),f=(0,b.useTheme)();(0,n.useEffect)(()=>{r&&h()},[r,h]);let g=(0,n.useMemo)(()=>p?Object.values(m[p]??{}).filter(t=>t.vault_address.toLowerCase()===e.toLowerCase()).sort((e,t)=>t.updated_at-e.updated_at):[],[p,m,e]),y=(0,o.createColumns)(),k=(0,n.useMemo)(()=>[y.text("type","Type","type",{sortable:!0,transform:e=>B(String(e))}),y.custom({id:"status",header:"Status",accessorKey:"status",cell:({row:e})=>(0,t.jsx)(u.Typography,{ml:1,variant:"body1",color:"primary.contrastText",sx:{backgroundColor:"success"===S(e.original)?(0,C.varAlpha)(f.vars.palette.primary.mainChannel,.16):"warning"===S(e.original)?(0,C.varAlpha)(f.vars.palette.warning.mainChannel,.16):(0,C.varAlpha)(f.vars.palette.error.mainChannel,.16),color:"success"===S(e.original)?"primary.main":"warning"===S(e.original)?"warning.main":"error.main",display:"inline-flex",alignItems:"center",gap:.5,paddingX:"6px",paddingY:"2px",borderRadius:"4px"},children:B(e.original.status)}),sortable:!0}),y.custom({id:"amount",header:"Amount",accessorKey:"amount",cell:({getValue:e})=>(0,t.jsx)(u.Typography,{variant:"body1",children:(0,x.formatNumber)(e(),{currency:"$",fallback:"--"})}),sortable:!0,sortType:"number"}),y.custom({id:"shares",header:"Shares",accessorKey:"shares",cell:({getValue:e})=>(0,t.jsx)(u.Typography,{variant:"body1",children:(0,x.formatNumber)(e(),{fallback:"--"})}),sortable:!0,sortType:"number"}),o.q.time("updated_at","Time")],[]);return{config:(0,n.useMemo)(()=>({config:{name:"Vault Transactions",iconPath:a.tableIcons.history,noDataMessage:"No vault transactions yet",isLoading:c,isError:!!d,maxRows:i},columns:k,filters:{type:{type:"tabs",options:[{label:"All",value:"all"},{label:"Deposit",value:"deposit"},{label:"Withdraw",value:"withdraw"}],defaultValue:"all",filterFn:(e,t)=>"all"===t||e.type.toLowerCase().includes(t),persist:!1},status:{type:"tabs",options:[{label:"All",value:"all"},{label:"Pending",value:"pending"},{label:"Completed",value:"completed"},{label:"Failed",value:"failed"}],defaultValue:"all",filterFn:(e,t)=>"all"===t||("failed"===t?!e.success||!!e.error_message:e.status.toLowerCase().includes(t)),persist:!1}},filterUI:{show:l},...s.presets.standard(k,["type"],"updated_at")}),[k,c,d,i,l]),data:g}}],326979)},686083,e=>{"use strict";var t=e.i(474076),r=e.i(838456),n=e.i(782904);e.s(["createMakerRebateTiersConfig",0,(e=e=>e)=>({config:{name:e("modals.makerRebateTiers"),noDataMessage:e("modals.noMakerRebateTiersAvailable"),isLoading:!1,isError:!1,maxRows:10},columns:[{id:"tier",header:e("common.tier"),accessorKey:"tier",cell:({getValue:e,row:i})=>{let a=e();return(0,t.jsx)(r.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:a})})},sortable:!0},{id:"volumeShare",header:e("modals.makerVolumeShare14d"),accessorKey:"volumeShare",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0},{id:"maker",header:e("tables.maker"),accessorKey:"maker",cell:({getValue:e})=>(0,t.jsx)(n.Typography,{variant:"body1",sx:{color:"#ffffff",fontSize:"12px"},children:e()}),sortable:!0,sortType:"string"}],data:[{tier:"0",volumeShare:">2.5%",maker:"-0.010%"},{tier:"1",volumeShare:"> 5%",maker:"-0.011%"},{tier:"2",volumeShare:"> 7.5%",maker:"-0.012%"},{tier:"3",volumeShare:"> 10%",maker:"-0.013%"}],responsive:{columnVisibility:{lg:{tier:!0,volumeShare:!0,maker:!0},md:{tier:!0,volumeShare:!0,maker:!0},sm:{tier:!0,volumeShare:!0,maker:!0}},columnCellRenderers:{}},sorting:{multiSort:!1,defaultSort:[{id:"tier",desc:!1}]}})])},859912,e=>{"use strict";e.s([],859912),e.i(805395),e.i(736325),e.i(312027),e.i(314116),e.i(955265),e.i(199304),e.i(642409),e.i(562058),e.i(211049),e.i(707484),e.i(630629),e.i(908294),e.i(100451),e.i(680919),e.i(788363),e.i(358866),e.i(900102),e.i(326979),e.i(686083),e.i(208085),e.i(5910),e.i(240570);var t=e.i(474076),r=e.i(838456),n=e.i(271645),i=e.i(772475);(0,n.memo)(({position:e,onLimitClick:a,onMarketClick:o})=>{let s=(0,n.useCallback)(()=>{a(e)},[e,a]),A=(0,n.useCallback)(()=>{o(e)},[e,o]);return(0,t.jsxs)(r.Box,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[(0,t.jsx)(i.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"small",onClick:s,children:"Limit"}),(0,t.jsx)(i.ActionButton,{actionType:"trading-enabled",variant:"contained",color:"inherit",size:"small",onClick:A,children:"Market"})]})},(e,t)=>
5e.position.instrument_id===t.position.instrument_id&&e.onLimitClick===t.onLimitClick&&e.onMarketClick===t.onMarketClick).displayName="ActionsCell",(0,n.memo)(({order:e,onCancelOrder:r})=>{let a=(0,n.useCallback)(t=>{t.stopPropagation(),r(e.order_id.toString(),Number(e.instrument_id))},[e,r]);return(0,t.jsx)(i.ActionButton,{actionType:"trading-enabled",variant:"contained",size:"small",color:"inherit",onClick:a,children:"Cancel"})},(e,t)=>e.order.order_id===t.order.order_id&&e.onCancelOrder===t.onCancelOrder).displayName="CancelButtonCell";var a=e.i(782904);e.i(992550);var o=e.i(407585),s=e.i(344873);(0,n.memo)(({position:e,onEditClick:i})=>{let A=(0,n.useCallback)(()=>{i(e)},[e,i]);return(0,t.jsxs)(r.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[(0,t.jsxs)(r.Box,{sx:{display:"flex",alignItems:"center",gap:.2},children:[(0,t.jsx)(a.Typography,{variant:"body1",children:e.tpPrice?(0,s.formatNumber)(parseFloat(e.tpPrice||"0"),{useTickSize:!0,instrument_name:e.instrument}):"--"}),(0,t.jsx)(a.Typography,{variant:"body1",children:" / "}),(0,t.jsx)(a.Typography,{variant:"body1",children:e.slPrice?(0,s.formatNumber)(parseFloat(e.slPrice||"0"),{useTickSize:!0,instrument_name:e.instrument}):"--"})]}),(0,t.jsx)(o.Iconify,{icon:"material-symbols-light:edit-outline-sharp",width:16,height:16,onClick:A})]})},(e,t)=>e.position.instrument_id===t.position.instrument_id&&e.position.tpPrice===t.position.tpPrice&&e.position.slPrice===t.position.slPrice&&e.onEditClick===t.onEditClick).displayName="TpSlCell",(0,n.memo)(({onCancelAll:e,fullWidth:r})=>{let a=(0,n.useCallback)(t=>{t.stopPropagation(),e()},[e]);return(0,t.jsx)(i.ActionButton,{actionType:"trading-enabled",variant:"soft",size:"small",color:"secondary",fullWidth:r,onClick:a,children:"Close All"})},(e,t)=>e.onCancelAll===t.onCancelAll&&e.fullWidth===t.fullWidth).displayName="CloseAllButton"},941603,13877,278095,423086,635719,769840,642376,302957,107305,48578,e=>{"use strict";e.s(["FeeTiersModal",()=>d],941603);var t=e.i(474076),r=e.i(500932),n=e.i(838456),i=e.i(782904),a=e.i(917098);e.i(565306);var o=e.i(849850),s=e.i(405858);e.i(859912);var A=e.i(680919),l=e.i(686083),c=e.i(709643);let d=()=>{let e,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E,F=(0,r.c)(36),T=(0,c.useTranslations)();F[0]!==T?(e=(0,A.createFeeTiersConfig)(T),F[0]=T,F[1]=e):e=F[1];let U=e;F[2]!==T?(d=(0,l.createMakerRebateTiersConfig)(T),F[2]=T,F[3]=d):d=F[3];let I=d;return F[4]!==T?(u=T("modals.feeSchedule"),F[4]=T,F[5]=u):u=F[5],F[6]===Symbol.for("react.memo_cache_sentinel")?(h={width:"100%"},F[6]=h):h=F[6],F[7]===Symbol.for("react.memo_cache_sentinel")?(p={mb:"16px"},F[7]=p):p=F[7],F[8]!==T?(m=T("modals.feeTiers"),F[8]=T,F[9]=m):m=F[9],F[10]!==m?(f=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",sx:p,children:m}),F[10]=m,F[11]=f):f=F[11],F[12]!==U?(g=(0,t.jsx)(s.default,{config:U}),F[12]=U,F[13]=g):g=F[13],F[14]===Symbol.for("react.memo_cache_sentinel")?(y={mb:"16px",mt:"32px"},F[14]=y):y=F[14],F[15]!==T?(b=T("modals.makerRebateTiers"),F[15]=T,F[16]=b):b=F[16],F[17]!==b?(x=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",sx:y,children:b}),F[17]=b,F[18]=x):x=F[18],F[19]!==I?(w=(0,t.jsx)(s.default,{config:I}),F[19]=I,F[20]=w):w=F[20],F[21]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(a.Divider,{sx:{borderStyle:"dashed"},orientation:"horizontal",flexItem:!0}),F[21]=v):v=F[21],F[22]===Symbol.for("react.memo_cache_sentinel")?(C={mt:"24px"},F[22]=C):C=F[22],F[23]!==T?(B=T("modals.feeTierDescription"),F[23]=T,F[24]=B):B=F[24],F[25]!==B?(S=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",sx:C,children:B}),F[25]=B,F[26]=S):S=F[26],F[27]!==x||F[28]!==w||F[29]!==S||F[30]!==f||F[31]!==g?(k=(0,t.jsxs)(n.Box,{sx:h,children:[f,g,x,w,v,S]}),F[27]=x,F[28]=w,F[29]=S,F[30]=f,F[31]=g,F[32]=k):k=F[32],F[33]!==k||F[34]!==u?(E=(0,t.jsx)(o.ModalBox,{title:u,active:"fee-tiers",maxWidth:"lg",children:k}),F[33]=k,F[34]=u,F[35]=E):E=F[35],E};e.i(842917);var u=e.i(103439),h=e.i(268407),p=e.i(397837),m=e.i(700756),f=e.i(261722),g=e.i(657688),y=e.i(954616),b=e.i(618859),x=e.i(271645),w=e.i(210920);let v=[];function C(e){let t=e.connectors;return v.length===t.length&&v.every((e,r)=>e===t[r])?v:(v=t,t)}var B=e.i(314588);function S(e={}){let t=(0,w.useConfig)(e);return(0,x.useSyncExternalStore)(e=>(0,B.watchConnectors)(t,{onChange:e}),()=>C(t),()=>C(t))}e.i(992550);var k=e.i(407585),E=e.i(120785);let F=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile Safari/i,T=(0,f.styled)(p.Button)(({theme:e})=>({padding:16,borderRadius:6,height:56,backgroundColor:`${e.vars.palette.background.neutral} !important`,border:"none",fontWeight:400,justifyContent:"flex-start",ga
5p:12,lineHeight:"18px",fontSize:"14px","&:hover":{backgroundColor:`${e.vars.palette.action.active} !important`}}));e.s(["ConnectWalletModal",0,()=>{let e=(0,c.useTranslations)(),{setModal:r}=(0,h.useActionStore)(),{connectAsync:s}=function(e={}){let{mutation:t}=e,r=(0,w.useConfig)(e),n={mutationFn:e=>(0,b.connect)(r,e),mutationKey:["connect"]},{mutate:i,mutateAsync:a,...o}=(0,y.useMutation)({...t,...n});return(0,x.useEffect)(()=>r.subscribe(({status:e})=>e,(e,t)=>{"connected"===t&&"disconnected"===e&&o.reset()}),[r,o.reset]),{...o,connect:i,connectAsync:a,connectors:S({config:r})}}(),A=S(),{login:l}=(0,E.usePrivy)(),[d,p]=(0,x.useState)(null),f=(0,x.useMemo)(()=>(function(){let{navigator:e}=window;if(e.userAgentData?.mobile)return!0;let t=e.userAgent||"";if(F.test(t))return!0;let r=e.maxTouchPoints??0,n="function"==typeof window.matchMedia&&window.matchMedia("(pointer:coarse)").matches,i=/Macintosh|Windows NT|X11|Linux x86_64/i.test(t);return(r>1||n)&&!i})(),[]),v=(0,x.useMemo)(()=>{let e;return!!(e=window.ethereum)&&(Array.isArray(e.providers)?e.providers:[e]).some(e=>e?.isMetaMask||e?.isRabby||e?.isBraveWallet||e?.isCoinbaseWallet||e?.isFrame||e?.isTaho||e?.isTrust||e?.isOkxWallet)||A.some(e=>"injected"===e.type)},[A]),C=(0,x.useMemo)(()=>{let e=!!window.phantom?.ethereum?.isPhantom,t=!!window.ethereum?.isRabby,r=Object.values(u.WalletConnectors).map(r=>"io.phantom"===r.id?{...r,isInstalled:e}:"io.rabby"===r.id?{...r,isInstalled:t}:{...r,isInstalled:A.some(e=>e.id===r.id)});if(f){let e=["com.mpcvault.console"];return r.filter(t=>!e.includes(t.id))}return r},[A,v,f]),B=async e=>{if(!e.isInstalled&&!f)return void window.open(e.link,"_blank");if(f&&"io.metamask"===e.id){r(null),u.appKit?.open({view:"Connect"});return}let t=!!window.phantom?.ethereum?.isPhantom;if(f&&"io.phantom"===e.id&&!t){let e=new URL(window.location.href);e.searchParams.set("autoconnect","phantom");let t=`https://phantom.app/ul/browse/${encodeURIComponent(e.toString())}`;window.location.href=t;return}let n=!!window.ethereum?.isRabby;if(f&&"io.rabby"===e.id&&!n){p(null),r("rabby-mobile-guide");return}try{let t=A.find(t=>t.id===e.id)||("io.phantom"===e.id?A.find(e=>e.name?.toLowerCase()==="phantom"):void 0)||e.connector;await s({connector:t}),p(null),r(null)}catch(e){console.error(e),p(null)}};return(0,t.jsxs)(o.ModalBox,{maxWidth:"sm",title:e("common.connectWallet"),titleLeftPadding:!0,active:"connect-wallet",disableClose:!1,children:[(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>{r(null),l({loginMethods:["google"]})},children:[(0,t.jsx)(k.Iconify,{icon:"logos:google-icon",width:"24",height:"24",style:{color:"var(--text-secondary)"}}),e("modals.google")]},"connector-google"),(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>{r(null),l({loginMethods:["sms"]})},children:[(0,t.jsx)(k.Iconify,{icon:"logos:whatsapp-icon",width:"24",height:"24"}),e("modals.whatsapp")]},"connector-whatsapp"),(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>{r(null),l({loginMethods:["email"]})},children:[(0,t.jsx)(k.Iconify,{icon:"fluent:mail-32-filled",width:"24",height:"24",sx:{color:"text.white"}}),e("modals.email")]},"connector-email"),(0,t.jsxs)(n.Box,{sx:{textAlign:"center",display:"flex",alignItems:"center"},children:[(0,t.jsx)(a.Divider,{sx:{borderStyle:"dashed",flex:1}}),(0,t.jsx)(i.Typography,{variant:"caption",color:"text.disabled",mx:1.5,children:e("common.or")}),(0,t.jsx)(a.Divider,{sx:{borderStyle:"dashed",flex:1}})]}),C.map(r=>{let n=d===r.id;return(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>B(r),disabled:n,children:[n?(0,t.jsx)(m.CircularProgress,{size:24,sx:{color:"var(--text-secondary)"}}):(0,t.jsx)(g.default,{alt:`${r.walletName}-icon`,src:r.icon,width:24,height:24,style:{objectFit:"cover"}}),r.walletName,n&&(0,t.jsx)(i.Typography,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:e("modals.connecting")}),!r.isInstalled&&!f&&!n&&(0,t.jsx)(i.Typography,{variant:"caption",color:"text.secondary",sx:{ml:"auto"},children:e("modals.notInstalled")})]},`connector-${r.walletName}`)}),(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>{r(null),u.appKit?.open()},children:[(0,t.jsx)(k.Iconify,{width:24,height:24,icon:"solar:wallet-bold",sx:{color:"text.disabled"}}),e("modals.moreWallets")]},"connector-more-wallets"),f&&(0,t.jsxs)(T,{variant:"outlined",fullWidth:!0,onClick:()=>r("qr-scan"),children:[(0,t.jsx)(k.Iconify,{width:24,height:24,icon:"material-symbols:computer-outline",sx:{color:"text.disabled"}}),e("modals.linkDesktopWallet")]},"connector-link-desktop")]})}],13877);var U=e.i(166107),I=e.i(302682);e.i(849387);var Q=e.i(727726),j=e.i(337575),L=e.i(675107);function _(){return(0,L.toHex)(j.secp256k1.utils.randomPrivateKey())}e.s(["generatePrivateKey",0,_],278095);var P=e.i(736837),D=e.i(832550),R=e.i(68043);e.s(["EnableTradingModal",0,()=>{let e=(0,c.useTranslations)(),{setModal:r}=(0,h.useActionStore)(),[n,a]=(0,x.useState)(!1),{addAgent:s}=(0,Q.useAccountActions)(),{setAgent:A,setStatus:l,address:d,master:u,status:m,setPendingAgent:f,activeVault:g}=(0,h.useAuthStore)(),{toggleTradingPersistence:y}=(0,D.useAuthActions)(),{persistTradingConnection:b}=(0,h.useGlobalStore)(),w=async()=>{a(!0);try{let e=_(),t=(0,P.privateKeyToAccount)(e),n="default",i=Date.now()+15552e6,a="0x0000000000000000000000000000000000000000"===g?"":g;if("user-not-found"===m){let o=await s(n,t.address,e,a,i,u,!1,{context:{source:"enable-trading"}});if(!o.success)return void console.error("Enable trading failed:",o.error);f(d,{...o.data,privateKey:e}),r(R.isMainnet?"deposit":"faucet");return}{let o=await s(n,t.address,e,a,i,u,!0,{context:{source:"enable-trading"}});if(!o.success)return void console.error("Enable trading failed:",o.error);let c={name:n,address:t.address,privateKey:e};A(d,c),l("trading-enabled"),r(null)}}catch(e){console.error("Enable trading failed:",e)}finally{a(!1)}};return(0,t.jsx)(o.ModalBox,{title:e("modals.enableTradingTitle"),active:"enable-trading",disableClose:n,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,lineHeight:"16px",children:[e("modals.enableTradingBody"),(0,t.jsx)("br",{}),(0,t.jsx)("br",{}),e("modals.enableTradingFree")]}
5),(0,t.jsx)(I.FormControlLabel,{control:(0,t.jsx)(U.Checkbox,{checked:b,onChange:()=>{y()}}),label:e("modals.rememberMe"),sx:{color:"text.secondary"}}),(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:w,loading:n,disabled:n,loadingPosition:"center",children:n?"":e("common.confirm")})]})})}],423086);var M=e.i(206242),O=e.i(797986),N=e.i(525836),H=e.i(632418);e.i(929009);var V=e.i(844890);let K=e=>{let a,o,s,A,l,d,u,h,m,f,g,y,b,x,w,v,C,B=(0,r.c)(45),{name:S,agentAddress:E,handleOnChangeName:F,handleGenerateAddress:T,handleOnChangeAddress:U,setStep:I,isLoading:Q,validationErrors:j}=e,L=(0,c.useTranslations)(),_=j.length>0;B[0]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",justifyContent:"space-between"},B[0]=a):a=B[0],B[1]!==L?(o=L("modals.nameForApiWallet"),B[1]=L,B[2]=o):o=B[2],B[3]!==o?(s=(0,t.jsx)("div",{style:a,children:(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:o})}),B[3]=o,B[4]=s):s=B[4],B[5]!==F||B[6]!==S?(A=(0,t.jsx)(N.default,{fullWidth:!0,value:S,onChange:F,type:"text"}),B[5]=F,B[6]=S,B[7]=A):A=B[7],B[8]!==s||B[9]!==A?(l=(0,t.jsxs)("div",{children:[s,A]}),B[8]=s,B[9]=A,B[10]=l):l=B[10],B[11]!==L?(d=L("modals.addressForApiWallet"),B[11]=L,B[12]=d):d=B[12],B[13]!==d?(u=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:d}),B[13]=d,B[14]=u):u=B[14],B[15]===Symbol.for("react.memo_cache_sentinel")?(h={width:72},B[15]=h):h=B[15],B[16]!==L?(m=L("modals.generate"),B[16]=L,B[17]=m):m=B[17],B[18]!==T||B[19]!==Q||B[20]!==m?(f=(0,t.jsx)(M.InputAdornment,{position:"end",children:(0,t.jsx)(p.Button,{variant:"contained",size:"small",sx:h,onClick:T,disabled:Q,children:m})}),B[18]=T,B[19]=Q,B[20]=m,B[21]=f):f=B[21],B[22]!==E||B[23]!==U||B[24]!==f?(g=(0,t.jsx)(N.default,{fullWidth:!0,endAdornment:f,value:E,onChange:U,type:"text"}),B[22]=E,B[23]=U,B[24]=f,B[25]=g):g=B[25],B[26]!==g||B[27]!==u?(y=(0,t.jsxs)("div",{children:[u,g]}),B[26]=g,B[27]=u,B[28]=y):y=B[28],B[29]!==_||B[30]!==j?(b=_&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:z,display:"flex",borderRadius:.75,alignItems:"flex-start",gap:1},children:[(0,t.jsx)(k.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"error.main"}}),(0,t.jsx)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:j.map($)})]}),B[29]=_,B[30]=j,B[31]=b):b=B[31],B[32]!==I?(x=()=>{I(1)},B[32]=I,B[33]=x):x=B[33];let P=_||Q;return B[34]!==L?(w=L("modals.createAgentWallet"),B[34]=L,B[35]=w):w=B[35],B[36]!==x||B[37]!==P||B[38]!==w?(v=(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:x,disabled:P,children:w}),B[36]=x,B[37]=P,B[38]=w,B[39]=v):v=B[39],B[40]!==y||B[41]!==b||B[42]!==v||B[43]!==l?(C=(0,t.jsxs)(t.Fragment,{children:[" ",l,y,b,v]}),B[40]=y,B[41]=b,B[42]=v,B[43]=l,B[44]=C):C=B[44],C},G=e=>{let a,o,s,A,l,d,u,h,m,f,g,y,b,x,w,v,C,B,S,E,F,T,U,I,Q,j,L,_,P,D,R,H=(0,r.c)(74),{name:V,agentAddress:K,validUntil:G,handleOnChangeValidUntil:z,handleMaxValidUntil:$,privateKey:X,isLoading:Y,handleAuthorizeAgentWallet:J}=e,Z=(0,c.useTranslations)();H[0]!==Z?(a=Z("modals.confirmCreateApiWallet"),H[0]=Z,H[1]=a):a=H[1],H[2]!==a?(o=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:a}),H[2]=a,H[3]=o):o=H[3],H[4]!==Z?(s=Z("modals.name"),H[4]=Z,H[5]=s):s=H[5],H[6]!==V||H[7]!==s?(A=(0,t.jsx)(W,{title:s,description:V}),H[6]=V,H[7]=s,H[8]=A):A=H[8],H[9]!==Z?(l=Z("common.address"),H[9]=Z,H[10]=l):l=H[10],H[11]!==K||H[12]!==l?(d=(0,t.jsx)(W,{title:l,description:K}),H[11]=K,H[12]=l,H[13]=d):d=H[13],H[14]!==Z?(u=Z("modals.daysValidUntil"),H[14]=Z,H[15]=u):u=H[15],H[16]!==u?(h=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:u}),H[16]=u,H[17]=h):h=H[17],H[18]===Symbol.for("react.memo_cache_sentinel")?(m={width:58},H[18]=m):m=H[18],H[19]!==Z?(f=Z("common.max"),H[19]=Z,H[20]=f):f=H[20],H[21]!==$||H[22]!==Y||H[23]!==f?(g=(0,t.jsx)(M.InputAdornment,{position:"end",children:(0,t.jsx)(p.Button,{variant:"contained",size:"small",sx:m,onClick:$,disabled:Y,children:f})}),H[21]=$,H[22]=Y,H[23]=f,H[24]=g):g=H[24],H[25]!==z||H[26]!==g||H[27]!==G?(y=(0,t.jsx)(N.default,{fullWidth:!0,endAdornment:g,value:G,onChange:z,type:"number"}),H[25]=z,H[26]=g,H[27]=G,H[28]=y):y=H[28],H[29]!==y||H[30]!==h?(b=(0,t.jsxs)(n.Box,{children:[h,y]}),H[29]=y,H[30]=h,H[31]=b):b=H[31],H[32]===Symbol.for("react.memo_cache_sentinel")?(x={backgroundColor:q,dis
5play:"flex",borderRadius:.75,alignItems:"flex-start",gap:1},H[32]=x):x=H[32],H[33]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)(k.Iconify,{icon:"solar:info-circle-linear",width:20,height:20,sx:{color:"info.main",mt:.25}}),H[33]=w):w=H[33],H[34]===Symbol.for("react.memo_cache_sentinel")?(v={display:"flex",flexDirection:"column",gap:1,flex:1,minWidth:0},H[34]=v):v=H[34],H[35]!==Z?(C=Z("modals.savePrivateKeyWarning"),H[35]=Z,H[36]=C):C=H[36],H[37]!==C?(B=(0,t.jsx)(i.Typography,{variant:"body1",color:"info.light",children:C}),H[37]=C,H[38]=B):B=H[38],H[39]!==Z?(S=Z("modals.privateKeyLabel"),H[39]=Z,H[40]=S):S=H[40],H[41]!==S?(E=(0,t.jsx)(i.Typography,{variant:"body1",color:"info.light",children:S}),H[41]=S,H[42]=E):E=H[42],H[43]===Symbol.for("react.memo_cache_sentinel")?(F={display:"flex",alignItems:"center",gap:.5,minWidth:0},H[43]=F):F=H[43],H[44]===Symbol.for("react.memo_cache_sentinel")?(T={flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},H[44]=T):T=H[44];let ee=`${X}`;return H[45]!==ee?(U=(0,t.jsx)(i.Typography,{variant:"body1",color:"info.light",sx:T,children:ee}),H[45]=ee,H[46]=U):U=H[46],H[47]!==Z?(I=Z("modals.privateKeyCopied"),H[47]=Z,H[48]=I):I=H[48],H[49]===Symbol.for("react.memo_cache_sentinel")?(Q={color:"text.primary","&:hover":{color:"primary.main"}},H[49]=Q):Q=H[49],H[50]!==X||H[51]!==I?(j=(0,t.jsx)(O.CopyIconButton,{value:X,toastMessage:I,iconSize:14,sx:Q}),H[50]=X,H[51]=I,H[52]=j):j=H[52],H[53]!==U||H[54]!==j?(L=(0,t.jsxs)(n.Box,{sx:F,children:[U,j]}),H[53]=U,H[54]=j,H[55]=L):L=H[55],H[56]!==B||H[57]!==E||H[58]!==L?(_=(0,t.jsxs)(n.Box,{px:1,py:.75,sx:x,children:[w,(0,t.jsxs)(n.Box,{sx:v,children:[B,E,L]})]}),H[56]=B,H[57]=E,H[58]=L,H[59]=_):_=H[59],H[60]!==Y||H[61]!==Z?(P=Z(Y?"common.confirming":"modals.authorizeApiWallet"),H[60]=Y,H[61]=Z,H[62]=P):P=H[62],H[63]!==J||H[64]!==Y||H[65]!==P?(D=(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:J,disableRipple:!0,loading:Y,disabled:Y,children:P}),H[63]=J,H[64]=Y,H[65]=P,H[66]=D):D=H[66],H[67]!==b||H[68]!==o||H[69]!==_||H[70]!==D||H[71]!==A||H[72]!==d?(R=(0,t.jsxs)(t.Fragment,{children:[o,A,d,b,_,D]}),H[67]=b,H[68]=o,H[69]=_,H[70]=D,H[71]=A,H[72]=d,H[73]=R):R=H[73],R},W=e=>{let a,o,s,A,l=(0,r.c)(8),{title:c,description:d}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",justifyContent:"space-between"},l[0]=a):a=l[0],l[1]!==c?(o=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:c}),l[1]=c,l[2]=o):o=l[2],l[3]!==d?(s=(0,t.jsx)(i.Typography,{variant:"body1",color:"textPrimary",mb:1,children:d}),l[3]=d,l[4]=s):s=l[4],l[5]!==o||l[6]!==s?(A=(0,t.jsxs)(n.Box,{sx:a,children:[o,s]}),l[5]=o,l[6]=s,l[7]=A):A=l[7],A};function z(e){return(0,H.varAlpha)(e.vars.palette.error.mainChannel,.12)}function $(e,r){return(0,t.jsx)(i.Typography,{variant:"body1",color:"secondary.light",children:e},r)}function q(e){return(0,H.varAlpha)(e.vars.palette.info.mainChannel,.12)}e.s(["CreateAgentWalletModal",0,()=>{let e=(0,c.useTranslations)(),[r,n]=(0,x.useState)(!1),{setModal:i}=(0,h.useActionStore)(),[a,s]=(0,x.useState)(0),[A,l]=(0,x.useState)(""),[d,u]=(0,x.useState)(""),[p,m]=(0,x.useState)(5),[f,g]=(0,x.useState)(""),[y,b]=(0,x.useState)([]),{addAgent:w}=(0,Q.useAccountActions)(),{fetchAgentWallets:v}=(0,V.useAgentWallets)(),{master:C,activeVault:B}=(0,h.useAuthStore)();(0,x.useEffect)(()=>{let t=[];A.trim()&&"default"!==A.toLowerCase()||t.push(e("modals.nameCannotBeEmpty")),f||t.push(e("modals.privateKeyRequired")),p<1&&t.push(e("modals.validUntilMinDays")),b(t)},[A,f,p]);let S=(0,x.useCallback)(async()=>{n(!0);let e="0x0000000000000000000000000000000000000000"===B?"":B;try{let t=await w(A,d,f,e,24*p*36e5+Date.now(),C,!0,{context:{source:"api-agent"}});if(!t.success)throw Error(t.error)}catch(e){console.error("Authorize agent wallet failed:",e)}finally{n(!1),i(null)}},[A,d,p,f,w,i,n,v,C,B]);return(0,x.useEffect)(()=>{2===a&&S()},[a,S]),(0,t.jsxs)(o.ModalBox,{title:e("modals.createAgentWallet"),active:"create-agent-wallet",disableClose:r,children:[0===a&&(0,t.jsx)(K,{name:A,setName:l,agentAddress:d,setAddress:u,handleOnChangeName:e=>{l(e.target.value)},handleGenerateAddress:()=>{let e=_();u((0,P.privateKeyToAccount)(e).address),g(e)},handleOnChangeAddress:e=>{u(e.target.value)},setStep:s,isLoading:r,validationErrors:y}),1===a&&(0,t.jsx)(G,{name:A,agentAddress:d,validUntil:p,setValidUntil:m,handleOnChangeValidUntil:e=>{m(Number(e.target.value))},handleMaxValidUntil:()=>{m(180)},privateKey:f,handleAuthorizeAgentWallet:S,isLoading:r})]})}],635719);var X=e.i(497624),Y=e.i(75581),J=e.i(18214),Z=e.i(858532),ee=e.i(957195),et=e.i(461342),er
5=e.i(954512),en=e.i(942290);e.s(["FaucetModal",0,()=>{let{payload:e,isLoading:r,setLoading:n,setModal:a}=(0,h.useActionStore)(),{infoClient:s}=(0,ee.useInfoClient)(),A=(0,er.useTheme)(),l=(0,c.useTranslations)(),d=(0,h.useTradingDataStore)(e=>e.supportedCollateral),{address:u}=(0,h.useAuthStore)(),[m,f]=(0,x.useState)(e?.token||d.USDC?.symbol||"USDC"),g=async e=>{f(e.target.value)},y=async()=>{n(!0);try{await s.faucet({collateral_id:d[m]?.id??1,address:u,amount:"1000",is_spot:"USDT"===m}),Z.showToast.success({message:l("modals.faucetSuccessful"),description:l("modals.receivedTokens",{amount:1e3,token:m})})}catch(r){let e=(0,en.getErrorMessage)(r),t=(0,en.getErrorOverride)(e??"");Z.showToast.error({message:"Faucet failed",...t?{description:t}:{}})}finally{n(!1),a(null)}};return(0,t.jsxs)(o.ModalBox,{title:"Claim Funds",active:"faucet",disableClose:r,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:"Obtain testnet funds for trading"}),(0,t.jsx)(J.Select,{value:m,onChange:g,sx:()=>({color:"red",width:"100%",height:40,gap:2,backgroundColor:"background.neutral"}),MenuProps:(0,et.getMenuProps)(A,{vertical:"bottom",horizontal:"right"}),children:Object.values(d).map(e=>(0,t.jsxs)(Y.MenuItem,{value:e.symbol,disableRipple:!0,children:[(0,t.jsx)(X.CryptoIcon,{symbol:e.symbol,alt:e.symbol,width:20,height:20,style:{marginRight:8}}),(0,t.jsx)("p",{children:e.symbol})]},`asset-${e.symbol}`))})]}),(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:y,disableRipple:!0,loading:r,disabled:r,children:r?"Confirming...":"Claim Testnet Tokens"})]})}],769840),e.i(53151);var ei=e.i(458397),ea=e.i(344873),eo=e.i(126996),es=e.i(143813);e.i(591647);var eA=e.i(432940);let el=({side:e,referencePrice:t,tpPrice:r,slPrice:n,referenceLabel:i="reference price"})=>{let a=(0,es.safeFloat)(t??0);if(a<=0)return{tpError:null,slError:null,error:null};let o=n&&(0,es.safeFloat)(n)>a&&"b"===e?`SL Price cannot be higher than the ${i}`:n&&(0,es.safeFloat)(n)<a&&"s"===e?`SL Price cannot be lower than the ${i}`:null,s=r&&(0,es.safeFloat)(r)<a&&"b"===e?`TP Price cannot be lower than the ${i}`:r&&(0,es.safeFloat)(r)>a&&"s"===e?`TP Price cannot be higher than the ${i}`:null;return{tpError:s,slError:o,error:s||o}},ec=({side:e,markPrice:t,tpPrice:r,slPrice:n})=>el({side:e,referencePrice:t,tpPrice:r,slPrice:n,referenceLabel:"mark price"});function ed(e){return e.positions}function eu(e){return e.tickers}function eh(e){return e.openOrders}function ep(e){return""!==e.tpsl}e.s(["getTpSlMarkPriceValidation",0,ec,"getTpSlReferencePriceValidation",0,el],642376),e.s(["TpSlModal",0,()=>{let e,a,s,A,l,d,u,m,f,g,y,b,x,w,v,C,B,S,k,E=(0,r.c)(46),F=(0,c.useTranslations)(),{payload:T,setModal:U}=(0,h.useActionStore)();E[0]===Symbol.for("react.memo_cache_sentinel")?(e=[!1],E[0]=e):e=E[0];let[I]=e,{placeTpSlOrder:Q,cancelByOrderId:j}=(0,eo.useTradeActions)(),L=(0,h.useUserTradingDataStore)(ed),_=(0,h.useTradingDataStore)(eu),P=(0,h.useUserTradingDataStore)(eh),D=Object.values(L).find(e=>e.instrument_id===T),R=D?.instrument?_[D.instrument]:void 0,M=Object.values(P).filter(ep),O=M.find(e=>e.instrument_id===T&&"tp"===e.tpsl),N=M.find(e=>e.instrument_id===T&&"sl"===e.tpsl),H=(0,eA.useTPSL)({basePrice:(0,es.safeFloat)(D?.entry_price??0),leverage:Number(D?.leverage??1),orderSize:D?.size??0,instrumentName:D?.instrument,tpOrderPlacedPrice:O?.trigger_px,slOrderPlacedPrice:N?.trigger_px,initialBaseUnit:"$",onCancelTPOrder:()=>j(Number(O?.order_id??0),T),onCancelSLOrder:()=>j(Number(N?.order_id??0),T)});if(!D)return null;let V=(0,es.safeFloat)(D.size)>0?"b":"s",K=()=>{let e=H.state.useLimitPrice&&H.state.tpLimitPrice?(0,ea.formatNumber)(H.state.tpLimitPrice,{useTickSize:!0,instrument_name:D.instrument,useGrouping:!1,preserveDecimalString:!0}):H.state.tpPrice?H.helpers.calculateOrderPriceFromTrigger(H.state.tpPrice):"",t=!H.state.useLimitPrice||!H.state.tpLimitPrice,r=H.state.useLimitPrice&&H.state.slLimitPrice?(0,ea.formatNumber)(H.state.slLimitPrice,{useTickSize:!0,instrument_name:D.instrument,useGrouping:!1,preserveDecimalString:!0}):H.state.slPrice?H.helpers.calculateOrderPriceFromTrigger(H.state.slPrice):"",n=!H.state.useLimitPrice||!H.state.slLimitPrice,i=H.helpers.getOrderSizeForPlacement(D.size);Q(T,V,D.position_side,i,H.state.tpPrice,e,t,H.state.slPrice,r,n),U(null)},G=R?.mark_price;E[1]!==V||E[2]!==G||E[3]!==H.state.slPrice||E[4]!==H.state.tpPrice?(a=ec({side:V,markPrice:G,tpPrice:H.state.tpPrice,slPrice:H.state.slPrice}),E[1]=V,E[2]=G,E[3]=H.state.slPrice,E[4]=H.state.tpPrice,E[5]=a):a=E[5];let W=a,z=W.error;E[6]!==F?(s=F("modals.tpslForPosition"),E[6]=F,E[7]=s):s=E[7],E[8]!==W.slError||E[9]!==W.tpError||E[10]!==H.ui?(A=(0,t.jsx)(ei.TpSl,{...H.ui,tpError:W.tpError,slError:W.slError}),E[8]=W.slError,E[9]=W.tpError,E[10]=H.ui,E[11]=A):A=E[11],E[12]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex",justifyContent:"space-between"},E[12]=l):l=E[12],E[13]!==F?(d=F("tables.instrument"),E[13]=F,E[14]=d):d=E[14],E[15]!==d?(u=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:d}),E[15]=d,E[16]=u):u=E[16],E[17]===Symbol.for("react.memo_cache_sentinel")?(m={display:"flex",justifyContent:"space-between"},E[17]=m):m=E[17],E[18]!==F?(f=F("modals.position"),E[18]=F,E[19]=f):f=E[19],E[20]!==f?(g=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:f}),E[20]=f,E[21]=g):g=E[21],E[22]===Symbol.for("react.memo_cache_sentinel")?(y={display:"flex",justifyContent:"space-between"},E[22]=y):y=E[22],E[23]!==F?(b=F("tables.entryPrice"),E[23]=F,E[24]=b):b=E[24],E[25]!==b?(x=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:b}),E[25]=b,E[26]=x):x=E[26];let $=n.Box;E[27]===Symbol.for("react.memo_cache_sentinel")?(w={display:"flex",justifyContent:"space-between"},E[27]=w):w=E[27],E[28]!==F?(v=F("tables.markPrice"),E[28]=F,E[29]=v):v=E[29],E[30]!==v?(C=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:v}),E[30]=v,E[31]=C):C=E[31];let q=i.Typography,X=(0,ea.formatNumber)(R?.mark_price??0,{instrument_name:D.instrument,useTickSize:!0,currency:"$"});return E[32]!==q||E[33]!==X?(B=(0,t.jsx)(q,{variant:"body1",color:"textSecondary",children:X}),E[32]=q,E[33]=X,E[34]=B):B=E[34],E[35]!==$||E[36]!==w||E[37]!==C||E[38]!==B?(S=(0,t.jsxs)($,{style:w,py:.75,children:[C,B]}),E[35]=$,E[36]=w,E[37]=C,E[38]=B,E[39]=S):S=E[39],E[40]!==z||E[41]!==K||E[42]!==N||E[43]!==F||E[44]!==O?(k=(!O||!N)&&(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:K,disableRipple:!0,loading:I,disabled:I||null!==z,children:F(I?"common.confirming":"common.confirm")}),E[40]=z,E[41]=K,E[42]=N,E[43]=F,E[44]=O,E[45]=k):k=E[45],(0,t.jsx)(o.ModalBox,{title:s,active:"tp-sl",disableClose:I,children:(0,t.jsxs)(t.Fragment,{children:[A,(0,t.jsxs)("div",{children:[(0,t.jsxs)(n.Box,{style:l,py:.75,children:[u,(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:D.instrument})]}),(0,t.jsxs)(n.Box,{style:m,py:.75,children:[g,(0,t.jsxs)(i.Typography,{variant:"body1",color:(0,es.safeFloat)(D.size)>0?"primary":"error",children:[D.size," ",D.instrument.split("-")[0]]})]}),(0,t.jsxs)(n.Box,{style:y,py:.75,children:[x,(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:(0,ea.formatNumber)(D.entry_price,{instrument_name:D.instrument,useTickSize:!0,currency:"$"})})]}),S]}),k]})})}],302957);var em=e.i(461008);function ef(e){let a,o,s,A,l,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E=(0,r.c)(51),{title:F,order:T}=e,U=(0,c.useTranslations)();E[0]!==T?(a=(0,em.getSideLabel)(T),E[0]=T,E[1]=a):a=E[1];let I=a;E[2]!==U?(o=U("tables.type"),E[2]=U,E[3]=o):o=E[3],E[4]!==T?(s=(0,em.getOrderTypeLabel)(T),E[4]=T,E[5]=s):s=E[5],E[6]!==o||E[7]!==s?(A={key:o,value:s},E[6]=o,E[7]=s,E[8]=A):A=E[8],E[9]!==U?(l=U("tables.side"),E[9]=U,E[10]=l):l=E[10],E[11]!==I.color||E[12]!==I.label||E[13]!==l?(d={key:l,value:I.label,color:I.color},E[11]=I.color,E[12]=I.label,E[13]=l,E[14]=d):d=E[14],E[15]!==U?(u=U("common.amount"),E[15]=U,E[16]=u):u=E[16];let Q=T.size;E[17]!==T.instrument?(h=(0,em.getBaseAsset)(T.instrument),E[17]=T.instrument,E[18]=h):h=E[18];let j=`${Q} ${h}`;E[19]!==j||E[20]!==u?(p={key:u,value:j},E[19]=j,E[20]=u,E[21]=p):p=E[21],E[22]!==U?(m=U("modals.trigger"),E[22]=U,E[23]=m):m=E[23],E[24]!==T?(f=(0,em.getTriggerLabel)(T),E[24]=T,E[25]=f):f=E[25],E[26]!==m||E[27]!==f?(g={key:m,value:f},E[26]=m,E[27]=f,E[28]=g):g=E[28],E[29]!==U?(y=U("common.price"),E[29]=U,E[30]=y):y=E[30],E[31]!==T?(b=(0,em.getPriceLabel)(T),E[31]=T,E[32]=b):b=E[32],E[33]!==y||E[34]!==b?(x={key:y,value:b},E[33]=y,E[34]=b,E[35]=x):x=E[35],E[36]!==p||E[37]!==g||E[38]!==x||E[39]!==A||E[40]!==d?(w=[A,d,p,g,x],E[36]=p,E[37]=g,E[38]=x,E[39]=A,E[40]=d,E[41]=w):w=E[41];let L=w;return E[42]===Symbol.for("react.memo_cache_sentinel")?(v={borderRadius:"10px",backgroundColor:"background.neutral",px:1.5,py:1.5},E[42]=v):v=E[42],E[43]===Symbol.for("react.memo_cache_sentinel")?(C={mb:2},E[43]=C):C=E[43],E[44]!==F?(B=(0,t.jsx)(i.Typography,{variant:"subtitle2",sx:C,children:F}),E[44]=F,E[45]=B):B=E[45],E[46]!==L?(S=L.map(eg),E[46]=L,E[47]=S):S=E[47],E[48]!==B||E[49]!==S?(k=(0,t.jsxs)(n.Box,{sx:v,children:[B,S]}),E[48]=B,E[49]=S,E[50]=k):k=E[50],k}function eg(e){return(0,t.jsxs)(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",py:.75},children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",children:e.key}),(0,t.jsx)(i.Typography,{variant:"body1",color:e.color||"text.primary",children:e.value})]},e.key)}e.s(["TpSlViewModal",0,()=>{let e,a,s,A,l,d,u,p,m,f,g=(0,r.c)(30),y=(0,c.useTranslations)(),{payload:b}=(0,h.useActionStore)();if(!b)return null;g[0]!==b.children?(e=b.children??[],g[0]=b.children,g[1]=e):e=g[1];let x=e,w=x[0],v=x[1];return g[2]!==y?(a=y("modals.takeProfitStopLoss"),g[2]=y,g[3]=a):a=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(s={"& .MuiBox-root":{rowGap:0}},g[4]=s):s=g[4],g[5]!==x.length||g[6]!==y?(A=y(x.length>=2?"modals.tpslIfOrderAFilledBC":"modals.tpslIfOrderAFilledB"),g[5]=x.length,g[6]=y,g[7]=A):A=g[7],g[8]!==A?(l=(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",mb:1,children:A}),g[8]=A,g[9]=l):l=g[9],g[10]!==y?(d=y("modals.orderA"),g[10]=y,g[11]=d):d=g[11],g[12]!==b||g[13]!==d?(u=(0,t.jsx)(ef,{title:d,order:b}
5),g[12]=b,g[13]=d,g[14]=u):u=g[14],g[15]!==x.length||g[16]!==w||g[17]!==v||g[18]!==y?(p=x.length>=2&&w&&v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"1fr 1fr"},gap:1.5,mt:2},children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",children:y("modals.tpslIfBCancelC")}),(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",children:y("modals.tpslIfCCancelB")})]}),(0,t.jsxs)(n.Box,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"1fr 1fr"},gap:1.5,mt:1},children:[(0,t.jsx)(ef,{title:y("modals.orderB"),order:w}),(0,t.jsx)(ef,{title:y("modals.orderC"),order:v})]})]}),g[15]=x.length,g[16]=w,g[17]=v,g[18]=y,g[19]=p):p=g[19],g[20]!==x.length||g[21]!==w||g[22]!==y?(m=1===x.length&&w&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(n.Box,{sx:{display:"flex",justifyContent:"center",mt:2},children:(0,t.jsx)(n.Box,{sx:{width:{xs:"100%",md:"58%"}},children:(0,t.jsx)(ef,{title:y("modals.orderB"),order:w})})})}),g[20]=x.length,g[21]=w,g[22]=y,g[23]=m):m=g[23],g[24]!==a||g[25]!==l||g[26]!==u||g[27]!==p||g[28]!==m?(f=(0,t.jsxs)(o.ModalBox,{title:a,active:"tp-sl-view",maxWidth:"sm",mobileBottomSheet:!1,sx:s,children:[l,u,p,m]}),g[24]=a,g[25]=l,g[26]=u,g[27]=p,g[28]=m,g[29]=f):f=g[29],f}],107305);var ey=e.i(485683),eb=e.i(816790),ex=e.i(423028);e.s(["VaultLeaderModal",0,()=>{let e=(0,c.useTranslations)(),{payload:r,setModal:a}=(0,h.useActionStore)(),{subVaults:s}=(0,h.useUserTradingDataStore)(),[A,l]=(0,x.useState)(!1),{sendToSubVault:d,withdrawFromSubVault:u}=(0,ex.useVaultActions)(),[m,f]=(0,x.useState)(Object.values(s)[0]?.sub_vault_address||""),[g,y]=(0,x.useState)(""),[b,w]=(0,x.useState)("send-to-subvault"),v=async e=>{f(e.target.value)},C=async()=>{l(!0);try{"send-to-subvault"===b?await d(r.vaultAddress,m,g):await u(r.vaultAddress,m,g),a(null)}catch(e){console.error("Internal transfer failed:",e)}finally{l(!1)}},[B,S]=(0,x.useState)(null);return(0,x.useEffect)(()=>{""===g?S(null):Number(g)<eb.DEFAULT_MIN_AMOUNT?S(e("modals.minimumTransferAmount",{min:eb.DEFAULT_MIN_AMOUNT})):S(null)},[g]),(0,t.jsxs)(o.ModalBox,{title:e("modals.vaultLeaderActions"),active:"vault-leader",disableClose:A,children:[(0,t.jsx)(ey.default,{options:[{label:e("modals.sendToSubVault"),value:"send-to-subvault"},{label:e("modals.withdrawFromSubVault"),value:"withdraw-from-subvault"}],value:b,onChange:e=>w(e),sx:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},width:"49%"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("modals.subVaultAddress")})}),(0,t.jsx)(J.Select,{value:m,onChange:v,sx:()=>({color:"red",width:"100%",height:40,gap:2,backgroundColor:"background.neutral"}),children:Object.values(s).map(e=>(0,t.jsx)(Y.MenuItem,{style:{display:"flex",alignItems:"center",gap:2,padding:"4px 8px",width:"100%",cursor:"pointer"},value:e.sub_vault_address,disableRipple:!0,children:(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:e.sub_vault_address})},`subvault-${e.sub_vault_address}`))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("common.amount")})}),(0,t.jsx)(N.default,{fullWidth:!0,value:g,onChange:e=>{y(e.target.value)},type:"number"})]}),B&&(0,t.jsxs)(n.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,H.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(k.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(i.Typography,{variant:"body1",color:"secondary.light",children:B})]}),(0,t.jsx)(p.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:C,disableRipple:!0,loading:A,disabled:null!==B||A||!g,children:A?e("common.confirming"):e("common.send")})]})}],48578)},943487,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(207670),n=e.i(46051),i=e.i(319727),a=e.i(519130),o=e.i(501434),s=e.i(984429),A=e.i(61801),l=e.i(139416),c=e.i(817494);let d=(e,t,r)=>{let n=e.keys[0];if(Array.isArray(t))t.forEach((t,n)=>{r((t,r)=>
5{n<=e.keys.length-1&&(0===n?Object.assign(t,r):t[e.up(e.keys[n])]=r)},t)});else if(t&&"object"==typeof t){let i,a;(Object.keys(t).length>e.keys.length?e.keys:(i=e.keys,a=Object.keys(t),i.filter(e=>a.includes(e)))).forEach(i=>{if(e.keys.includes(i)){let a=t[i];void 0!==a&&r((t,r)=>{n===i?Object.assign(t,r):t[e.up(i)]=r},a)}})}else("number"==typeof t||"string"==typeof t)&&r((e,t)=>{Object.assign(e,t)},t)};function u(e){return`--Grid-${e}Spacing`}function h(e){return`--Grid-parent-${e}Spacing`}let p="--Grid-columns",m="--Grid-parent-columns",f=({theme:e,ownerState:t})=>{let r={};return d(e.breakpoints,t.size,(e,t)=>{let n={};"grow"===t&&(n={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(n={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(n={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${m}) - (var(${m}) - ${t}) * (var(${h("column")}) / var(${m})))`}),e(r,n)}),r},g=({theme:e,ownerState:t})=>{let r={};return d(e.breakpoints,t.offset,(e,t)=>{let n={};"auto"===t&&(n={marginLeft:"auto"}),"number"==typeof t&&(n={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${m}) + var(${h("column")}) * ${t} / var(${m}))`}),e(r,n)}),r},y=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={[p]:12};return d(e.breakpoints,t.columns,(e,t)=>{let n=t??12;e(r,{[p]:n,"> *":{[m]:n}})}),r},b=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={};return d(e.breakpoints,t.rowSpacing,(t,n)=>{let i="string"==typeof n?n:e.spacing?.(n);t(r,{[u("row")]:i,"> *":{[h("row")]:i}})}),r},x=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={};return d(e.breakpoints,t.columnSpacing,(t,n)=>{let i="string"==typeof n?n:e.spacing?.(n);t(r,{[u("column")]:i,"> *":{[h("column")]:i}})}),r},w=({theme:e,ownerState:t})=>{if(!t.container)return{};let r={};return d(e.breakpoints,t.direction,(e,t)=>{e(r,{flexDirection:t})}),r},v=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${u("row")}) var(${u("column")})`}});var C=e.i(474076);let B=(0,c.default)(),S=(0,o.default)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function k(e){return(0,s.default)({props:e,name:"MuiGrid",defaultTheme:B})}var E=e.i(261722),F=e.i(699844),T=e.i(813378);let U=function(e={}){let{createStyledComponent:o=S,useThemeProps:s=k,useTheme:c=A.default,componentName:d="MuiGrid"}=e;function u(e,t,r=()=>!0){let n={};return null===e||(Array.isArray(e)?e.forEach((e,i)=>{null!==e&&r(e)&&t.keys[i]&&(n[t.keys[i]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let i=e[t];null!=i&&r(i)&&(n[t]=i)}):n[t.keys[0]]=e),n}let h=o(y,x,b,f,w,v,g),p=t.forwardRef(function(e,o){var A;let p,m=c(),f=s(e),g=(0,l.extendSxProp)(f);A=m.breakpoints,p=[],void 0!==g.item&&(delete g.item,p.push("item")),void 0!==g.zeroMinWidth&&(delete g.zeroMinWidth,p.push("zeroMinWidth")),A.keys.forEach(e=>{void 0!==g[e]&&(p.push(e),delete g[e])});let{className:y,children:b,columns:x=12,container:w=!1,component:v="div",direction:B="row",wrap:S="wrap",size:k={},offset:E={},spacing:F=0,rowSpacing:T=F,columnSpacing:U=F,unstable_level:I=0,...Q}=g,j=u(k,m.breakpoints,e=>!1!==e),L=u(E,m.breakpoints),_=e.columns??(I?void 0:x),P=e.spacing??(I?void 0:F),D=e.rowSpacing??e.spacing??(I?void 0:T),R=e.columnSpacing??e.spacing??(I?void 0:U),M={...g,level:I,columns:_,container:w,direction:B,wrap:S,spacing:P,rowSpacing:D,columnSpacing:R,size:j,offset:L},O=((e,t)=>{let r,{container:n,direction:o,spacing:s,wrap:A,size:l}=e,c={root:["root",n&&"container","wrap"!==A&&`wrap-xs-${String(A)}`,...void 0===o?[]:"object"==typeof o?Object.entries(o).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(o)}`],...(r=[],Object.entries(l).forEach(([e,t])=>{!1!==t&&void 0!==t&&r.push(`grid-${e}-${String(t)}`)}),r),...n?((e,t="xs")=>{function r(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(r(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,n])=>{r(n)&&t.push(`spacing-${e}-${String(n)}`)}),t}return[]})(s,t.breakpoints.keys[0]):[]]};return(0,a.default)(c,e=>(0,i.default)(d,e),{})})(M,m);return(0,C.jsx)(h,{ref:o,as:v,ownerState:M,className:(0,r.default)(O.root,y),...Q,children:t.Children.map(b,e=>t.isValidElement(e)&&(0,n.default)(e,["Grid"])&&w&&e.props.container?t.cloneElement(e,{unstable_level:e.props?.unstable_level??I+1}):e)})});return p.muiName="Grid",p}({createStyledComponent:(0,E.styled)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,r.container&&t.container]}}
5),componentName:"MuiGrid2",useThemeProps:e=>(0,F.useDefaultProps)({props:e,name:"MuiGrid2"}),useTheme:T.default});e.s(["default",0,U],943487)},915833,(e,t,r)=>{e.e,t.exports=function(){"use strict";var e,t,r,n,i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v=function(e,t){return(v=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function C(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var B=function(){return(B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function S(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{A(n.next(e))}catch(e){a(e)}}function s(e){try{A(n.throw(e))}catch(e){a(e)}}function A(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}A((n=n.apply(e,t||[])).next())})}function k(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var A=[a,s];if(r)throw TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&A[0]?n.return:A[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,A[1])).done)return i;switch(n=0,i&&(A=[2&A[0],i.value]),A[0]){case 0:case 1:i=A;break;case 4:return o.label++,{value:A[1],done:!1};case 5:o.label++,n=A[1],A=[0];continue;case 7:A=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===A[0]||2===A[0])){o=0;continue}if(3===A[0]&&(!i||A[1]>i[0]&&A[1]<i[3])){o.label=A[1];break}if(6===A[0]&&o.label<i[1]){o.label=i[1],i=A;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(A);break}i[2]&&o.ops.pop(),o.trys.pop();continue}A=t.call(e,o)}catch(e){A=[6,e],n=0}finally{r=i=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}}}function E(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||t)}for(var F=function(){function e(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n}return e.prototype.add=function(t,r,n,i){return new e(this.left+t,this.top+r,this.width+n,this.height+i)},e.fromClientRect=function(t,r){return new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height)},e.fromDOMRectList=function(t,r){var n=Array.from(r).find(function(e){return 0!==e.width});return n?new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),T=function(e,t){return F.fromClientRect(e,t.getBoundingClientRect())},U=function(e){var t=e.body,r=e.documentElement;if(!t||!r)throw Error("Unable to get document size");return new F(0,0,Math.max(Math.max(t.scrollWidth,r.scrollWidth),Math.max(t.offsetWidth,r.offsetWidth),Math.max(t.clientWidth,r.clientWidth)),Math.max(Math.max(t.scrollHeight,r.scrollHeight),Math.max(t.offsetHeight,r.offsetHeight),Math.max(t.clientHeight,r.clientHeight)))},I=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);(64512&a)==56320?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t},Q=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var n=[],i=-1,a="";++i<r;){var o=e[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===r||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L="u"<typeof Uint8Array?[]:new Uint8Array(256),_=0;_<j.length;_++)L[j.charCodeAt(_)]=_;for(var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
5+/",D="u"<typeof Uint8Array?[]:new Uint8Array(256),R=0;R<P.length;R++)D[P.charCodeAt(R)]=R;for(var M=2112,O=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},N=function(){function e(e,t,r,n,i,a){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=M-32+(e>>11),t=this.index[t]+(e>>5&63),t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V="u"<typeof Uint8Array?[]:new Uint8Array(256),K=0;K<H.length;K++)V[H.charCodeAt(K)]=K;var G=[9001,65288],W=(t=Array.isArray(e=function(e){var t,r,n,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="u">typeof ArrayBuffer&&"u">typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)r=D[e.charCodeAt(t)],n=D[e.charCodeAt(t+1)],i=D[e.charCodeAt(t+2)],a=D[e.charCodeAt(t+3)],c[A++]=r<<2|n>>4,c[A++]=(15&n)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}(
vendor: 52,890 bytes, line 5
5"KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="
5))?function(e){for(var t=e.length,r=[],n=0;n<t;n+=4)r.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return r}(e):new Uint32Array(e),n=O(r=Array.isArray(e)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r.push(e[n+1]<<8|e[n]);return r}(e):new Uint16Array(e),12,t[4]/2),a=2===t[5]?O(r,(24+t[4])/2):(i=Math.ceil((24+t[4])/4),t.slice?t.slice(i,void 0):new Uint32Array(Array.prototype.slice.call(t,i,void 0))),new N(t[0],t[1],t[2],t[3],n,a)),z=[30,36],$=[1,2,3,5],q=[10,8],X=[27,26],Y=$.concat(q),J=[38,39,40,34,35],Z=[15,13],ee=function(e,t){void 0===t&&(t="strict");var r=[],n=[],i=[];return e.forEach(function(e,a){var o=W.get(e);if(o>50?(i.push(!0),o-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return n.push(a),r.push(16);if(4===o||11===o){if(0===a)return n.push(a),r.push(30);var s=r[a-1];return -1===Y.indexOf(s)?(n.push(n[a-1]),r.push(s)):(n.push(a),r.push(30))}if(n.push(a),31===o)return r.push("strict"===t?21:37);if(42===o||29===o)return r.push(30);if(43===o)if(e>=131072&&e<=196605||e>=196608&&e<=262141)return r.push(37);else return r.push(30);r.push(o)}),[n,r,i]},et=function(e,t,r,n){var i=n[r];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var a=r;a<=n.length;){var o=n[++a];if(o===t)return!0;if(10!==o)break}if(10===i)for(var a=r;a>0;){var s=n[--a];if(Array.isArray(e)?-1!==e.indexOf(s):e===s)for(var A=r;A<=n.length;){var o=n[++A];if(o===t)return!0;if(10!==o)break}if(10!==s)break}return!1},er=function(e,t){for(var r=e;r>=0;){var n=t[r];if(10!==n)return n;r--}return 0},en=function(e,t,r,n,i){if(0===r[n])return"Ã";var a=n-1;if(Array.isArray(i)&&!0===i[a])return"Ã";var o=a-1,s=a+1,A=t[a],l=o>=0?t[o]:0,c=t[s];if(2===A&&3===c)return"Ã";if(-1!==$.indexOf(A))return"!";if(-1!==$.indexOf(c)||-1!==q.indexOf(c))return"Ã";if(8===er(a,t))return"÷";if(11===W.get(e[a])||(32===A||33===A)&&11===W.get(e[s])||7===A||7===c||9===A||-1===[10,13,15].indexOf(A)&&9===c||-1!==[17,18,19,24,28].indexOf(c)||22===er(a,t)||et(23,22,a,t)||et([17,18],21,a,t)||et(12,12,a,t))return"Ã";if(10===A)return"÷";if(23===A||23===c)return"Ã";if(16===c||16===A)return"÷";if(-1!==[13,15,21].indexOf(c)||14===A||36===l&&-1!==Z.indexOf(A)||28===A&&36===c||20===c||-1!==z.indexOf(c)&&25===A||-1!==z.indexOf(A)&&25===c||27===A&&-1!==[37,32,33].indexOf(c)||-1!==[37,32,33].indexOf(A)&&26===c||-1!==z.indexOf(A)&&-1!==X.indexOf(c)||-1!==X.indexOf(A)&&-1!==z.indexOf(c)||-1!==[27,26].indexOf(A)&&(25===c||-1!==[22,15].indexOf(c)&&25===t[s+1])||-1!==[22,15].indexOf(A)&&25===c||25===A&&-1!==[25,28,24].indexOf(c))return"Ã";if(-1!==[25,28,24,17,18].indexOf(c))for(var d=a;d>=0;){var u=t[d];if(25===u)return"Ã";if(-1!==[28,24].indexOf(u))d--;else break}if(-1!==[27,26].indexOf(c))for(var d=-1!==[17,18].indexOf(A)?o:a;d>=0;){var u=t[d];if(25===u)return"Ã";if(-1!==[28,24].indexOf(u))d--;else break}if(38===A&&-1!==[38,39,34,35].indexOf(c)||-1!==[39,34].indexOf(A)&&-1!==[39,40].indexOf(c)||-1!==[40,35].indexOf(A)&&40===c||-1!==J.indexOf(A)&&-1!==[20,26].indexOf(c)||-1!==J.indexOf(c)&&27===A||-1!==z.indexOf(A)&&-1!==z.indexOf(c)||24===A&&-1!==z.indexOf(c)||-1!==z.concat(25).indexOf(A)&&22===c&&-1===G.indexOf(e[s])||-1!==z.concat(25).indexOf(c)&&18===A)return"Ã";if(41===A&&41===c){for(var h=r[a],p=1;h>0;)if(41===t[--h])p++;else break;if(p%2!=0)return"Ã"}return 32===A&&33===c?"Ã":"÷"},ei=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var r=ee(e,t.lineBreak),n=r[0],i=r[1],a=r[2];return("break-all"===t.wordBreak||"break-word"===t.wordBreak)&&(i=i.map(function(e){return -1!==[25,30,42].indexOf(e)?37:e})),[n,i,"keep-all"===t.wordBreak?a.map(function(t,r){return t&&e[r]>=19968&&e[r]<=40959}):void 0]}
5,ea=function(){function e(e,t,r,n){this.codePoints=e,this.required="!"===t,this.start=r,this.end=n}return e.prototype.slice=function(){return Q.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),eo=function(e,t){var r=I(e),n=ei(r,t),i=n[0],a=n[1],o=n[2],s=r.length,A=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e="Ã";l<s&&"Ã"===(e=en(r,a,i,++l,o)););if("Ã"!==e||l===s){var t=new ea(r,e,A,l);return A=l,{value:t,done:!1}}return{done:!0,value:null}}}},es=function(e){return e>=48&&e<=57},eA=function(e){return es(e)||e>=65&&e<=70||e>=97&&e<=102},el=function(e){return e>=97&&e<=122||e>=65&&e<=90},ec=function(e){return 10===e||9===e||32===e},ed=function(e){return el(e)||e>=128||95===e},eu=function(e){return ed(e)||es(e)||45===e},eh=function(e,t){return 92===e&&10!==t},ep=function(e,t,r){return 45===e?ed(t)||eh(t,r):!!(ed(e)||92===e&&eh(e,t))||!1},em=function(e,t,r){return 43===e||45===e?!!es(t)||46===t&&es(r):46===e?es(t):es(e)},ef=function(e){var t=0,r=1;(43===e[0]||45===e[t])&&(45===e[t]&&(r=-1),t++);for(var n=[];es(e[t]);)n.push(e[t++]);var i=n.length?parseInt(Q.apply(void 0,n),10):0;46===e[t]&&t++;for(var a=[];es(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(Q.apply(void 0,a),10):0;(69===e[t]||101===e[t])&&t++;var A=1;(43===e[t]||45===e[t])&&(45===e[t]&&(A=-1),t++);for(var l=[];es(e[t]);)l.push(e[t++]);return r*(i+s*Math.pow(10,-o))*Math.pow(10,A*(l.length?parseInt(Q.apply(void 0,l),10):0))},eg={type:2},ey={type:3},eb={type:4},ex={type:13},ew={type:8},ev={type:21},eC={type:9},eB={type:10},eS={type:11},ek={type:12},eE={type:14},eF={type:23},eT={type:1},eU={type:25},eI={type:24},eQ={type:26},ej={type:27},eL={type:28},e_={type:29},eP={type:31},eD={type:32},eR=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(I(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==eD;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),r=this.peekCodePoint(1),n=this.peekCodePoint(2);if(eu(t)||eh(r,n)){var i=ep(t,r,n)?2:1,a=this.consumeName();return{type:5,value:a,flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ex;break;case 39:return this.consumeStringToken(39);case 40:return eg;case 41:return ey;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),eE;break;case 43:case 46:if(em(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return eb;case 45:var o=this.peekCodePoint(0),s=this.peekCodePoint(1);if(em(e,o,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(ep(e,o,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===o&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),eI;break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var A=this.consumeCodePoint();if(42===A&&47===(A=this.consumeCodePoint())||-1===A)return this.consumeToken()}break;case 58:return eQ;case 59:return ej;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),eU;break;case 64:if(ep(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var a=this.consumeName();return{type:7,value:a}}break;case 91:return eL;case 92:if(eh(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return e_;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ew;break;case 123:return eS;case 125:return ek;case 117:case 85:var l=this.peekCodePoint(0),c=this.peekCodePoint(1);return 43===l&&(eA(c)||63===c)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),eC;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),ev;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),eB;break;case -1:return eD}return ec(e)?(this.consumeWhiteSpace(),eP):es(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):ed(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Q(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();eA(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var r=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),r=!0;if(r){var n=parseInt(Q.apply(void 0,e.map(function(e){return 63===e?48:e})),16),i=parseInt(Q.apply(void 0,e.map(function(e){return 63===e?70:e})),16);return{type:30,start:n,end:i}}var a=parseInt(Q.apply(void 0,e),16);if(!(45===this.peekCodePoint(0)&&eA(this.peekCodePoint(1))))return{type:30,start:a,end:a};this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];eA(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();var i=parseInt(Q.apply(void 0,o),16);return{type:30,start:a,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];
5if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var r=this.consumeStringToken(this.consumeCodePoint());return 0===r.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),eF)}for(;;){var n,i=this.consumeCodePoint();if(-1===i||41===i)return{type:22,value:Q.apply(void 0,e)};if(ec(i)){if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))return this.consumeCodePoint(),{type:22,value:Q.apply(void 0,e)};return this.consumeBadUrlRemnants(),eF}if(34===i||39===i||40===i||(n=i)>=0&&n<=8||11===n||n>=14&&n<=31||127===n)return this.consumeBadUrlRemnants(),eF;if(92===i)if(!eh(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),eF;else e.push(this.consumeEscapedCodePoint());else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;ec(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||-1===e)return;eh(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var r=Math.min(5e4,e);t+=Q.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",r=0;;){var n=this._value[r];if(-1===n||void 0===n||n===e)return{type:0,value:t+=this.consumeStringSlice(r)};if(10===n)return this._value.splice(0,r),eT;if(92===n){var i=this._value[r+1];-1!==i&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(r),r=-1,this._value.shift()):eh(n,i)&&(t+=this.consumeStringSlice(r),t+=Q(this.consumeEscapedCodePoint()),r=-1))}r++}},e.prototype.consumeNumber=function(){var e=[],t=4,r=this.peekCodePoint(0);for((43===r||45===r)&&e.push(this.consumeCodePoint());es(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===r&&es(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;es(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0),n=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===r||101===r)&&((43===n||45===n)&&es(i)||es(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;es(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[ef(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],r=e[1],n=this.peekCodePoint(0);return ep(n,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:t,flags:r,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:t,flags:r}):{type:17,number:t,flags:r}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(eA(e)){for(var t=Q(e);eA(this.peekCodePoint(0))&&t.length<6;)t+=Q(this.consumeCodePoint());ec(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(t,16);return 0===r||r>=55296&&r<=57343||r>1114111?65533:r}return -1===e?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(eu(t))e+=Q(t);else{if(!eh(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=Q(this.consumeEscapedCodePoint())}}},e}(),eM=function(){function e(e){this._tokens=e}return e.create=function(t){var r=new eR;return r.write(t),new e(r.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(31===e.type)if(32===e.type)return t;throw SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},r=this.consumeToken();;){if(32===r.type||e$(r,e))return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue()),r=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var r=this.consumeToken();if(32===r.type||3===r.type)return t;this.reconsumeToken(r),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?eD:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),eO=function(e){return 15===e.type},eN=function(e){return 17===e.type},eH=function(e){return 20===e.type},eV=function(e){return 0===e.type},eK=function(e,t){return eH(e)&&e.value===t}
vendor: 7,005 bytes, line 5
5,eG=function(e){return 31!==e.type},eW=function(e){return 31!==e.type&&4!==e.type},ez=function(e){var t=[],r=[];return e.forEach(function(e){if(4===e.type){if(0===r.length)throw Error("Error parsing function args, zero tokens for arg");t.push(r),r=[];return}31!==e.type&&r.push(e)}),r.length&&t.push(r),t},e$=function(e,t){return 11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type},eq=function(e){return 17===e.type||15===e.type},eX=function(e){return 16===e.type||eq(e)},eY=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},eJ={type:17,number:0,flags:4},eZ={type:16,number:50,flags:4},e0={type:16,number:100,flags:4},e1=function(e,t,r){var n=e[0],i=e[1];return[e2(n,t),e2(void 0!==i?i:n,r)]},e2=function(e,t){if(16===e.type)return e.number/100*t;if(eO(e))switch(e.unit){case"rem":case"em":return 16*e.number}return e.number},e4="grad",e3="turn",e5=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case e4:return Math.PI/200*t.number;case"rad":return t.number;case e3:return 2*Math.PI*t.number}throw Error("Unsupported angle type")},e6=function(e){return 15===e.type&&("deg"===e.unit||e.unit===e4||"rad"===e.unit||e.unit===e3)},e8=function(e){switch(e.filter(eH).map(function(e){return e.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[eJ,eJ];case"to top":case"bottom":return e7(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[eJ,e0];case"to right":case"left":return e7(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[e0,e0];case"to bottom":case"top":return e7(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[e0,eJ];case"to left":case"right":return e7(270)}return 0},e7=function(e){return Math.PI*e/180},e9=function(e,t){if(18===t.type){var r=ts[t.name];if(void 0===r)throw Error('Attempting to parse an unsupported color function "'+t.name+'"');return r(e,t.values)}if(5===t.type){if(3===t.value.length){var n=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return tr(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(4===t.value.length){var n=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3),o=t.value.substring(3,4);return tr(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(6===t.value.length){var n=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return tr(parseInt(n,16),parseInt(i,16),parseInt(a,16),1)}if(8===t.value.length){var n=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return tr(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(20===t.type){var s=tl[t.value.toUpperCase()];if(void 0!==s)return s}return tl.TRANSPARENT},te=function(e){return(255&e)==0},tt=function(e){var t=255&e,r=255&e>>8,n=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+n+","+r+","+t/255+")":"rgb("+i+","+n+","+r+")"},tr=function(e,t,r,n){return(e<<24|t<<16|r<<8|(0|Math.round(255*n)))>>>0},tn=function(e,t){if(17===e.type)return e.number;if(16===e.type){var r=3===t?1:255;return 3===t?e.number/100*r:Math.round(e.number/100*r)}return 0},ti=function(e,t){var r=t.filter(eW);if(3===r.length){var n=r.map(tn),i=n[0],a=n[1],o=n[2];return tr(i,a,o,1)}if(4===r.length){var s=r.map(tn),i=s[0],a=s[1],o=s[2];return tr(i,a,o,s[3])}return 0};function ta(e,t,r){return(r<0&&(r+=1),r>=1&&(r-=1),r<1/6)?(t-e)*r*6+e:r<.5?t:r<2/3?(t-e)*6*(2/3-r)+e:e}var to=function(e,t){var r=t.filter(eW),n=r[0],i=r[1],a=r[2],o=r[3],s=(17===n.type?e7(n.number):e5(e,n))/(2*Math.PI),A=eX(i)?i.number/100:0,l=eX(a)?a.number/100:0,c=void 0!==o&&eX(o)?e2(o,1):1;if(0===A)return tr(255*l,255*l,255*l,1);var d=l<=.5?l*(A+1):l+A-l*A,u=2*l-d;return tr(255*ta(u,d,s+1/3),255*ta(u,d,s),255*ta(u,d,s-1/3),c)},ts={hsl:to,hsla:to,rgb:ti,rgba:ti},tA=function(e,t){return e9(e,eM.create(t).parseComponentValue())},tl={ALICEBLUE:0xf0f8ffff,ANTIQUEWHITE:0xfaebd7ff,AQUA:0xffffff,AQUAMARINE:0x7fffd4ff,AZURE:0xf0ffffff,BEIGE:0xf5f5dcff,BISQUE:0xffe4c4ff,BLACK:255,BLANCHEDALMOND:0xffebcdff,BLUE:65535,BLUEVIOLET:0x8a2be2ff,BROWN:0xa52a2aff,BURLYWOOD:0xdeb887ff,CADETBLUE:0x5f9ea0ff,CHARTREUSE:0x7fff00ff,CHOCOLATE:0xd2691eff,CORAL:0xff7f50ff,CORNFLOWERBLUE:0x6495edff,CORNSILK:0xfff8dcff,CRIMSON:0xdc143cff,CYAN:0xffffff,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:0xb886bbff,DARKGRAY:0xa9a9a9ff,DARKGREEN:6553855,DARKGREY:0xa9a9a9ff,DARKKHAKI:0xbdb76bff,DARKMAGENTA:0x8b008bff,DARKOLIVEGREEN:0x556b2fff,DARKORANGE:0xff8c00ff,DARKORCHID:0x9932ccff,DARKRED:0x8b0000ff,DARKSALMON:0xe9967aff,DARKSEAGREEN:0x8fbc8fff,DARKSLATEBLUE:0x483d8bff,DARKSLATEGRAY:0x2f4f4fff,DARKSLATEGREY:0x2f4f4fff,DARKTURQUOISE:0xced1ff,DARKVIOLET:0x9400d3ff,DEEPPINK:0xff1493ff,DEEPSKYBLUE:0xbfffff,DIMGRAY:0x696969ff,DIMGREY:0x696969ff,DODGERBLUE:0x1e90ffff,FIREBRICK:0xb22222ff,FLORALWHITE:0xfffaf0ff,FORESTGREEN:0x228b22ff,FUCHSIA:0xff00ffff,GAINSBORO:0xdcdcdcff,GHOSTWHITE:0xf8f8ffff,GOLD:0xffd700ff,GOLDENROD:0xdaa520ff,GRAY:0x808080ff,GREEN:8388863,GREENYELLOW:0xadff2fff,GREY:0x808080ff,HONEYDEW:0xf0fff0ff,HOTPINK:0xff69b4ff,INDIANRED:0xcd5c5cff,INDIGO:0x4b0082ff,IVORY:0xfffff0ff,KHAKI:0xf0e68cff,LAVENDER:0xe6e6faff,LAVENDERBLUSH:0xfff0f5ff,LAWNGREEN:0x7cfc00ff,LEMONCHIFFON:0xfffacdff,LIGHTBLUE:0xadd8e6ff,LIGHTCORAL:0xf08080ff,LIGHTCYAN:0xe0ffffff,LIGHTGOLDENRODYELLOW:0xfafad2ff,LIGHTGRAY:0xd3d3d3ff,LIGHTGREEN:0x90ee90ff,LIGHTGREY:0xd3d3d3ff,LIGHTPINK:0xffb6c1ff,LIGHTSALMON:0xffa07aff,LIGHTSEAGREEN:0x20b2aaff,LIGHTSKYBLUE:0x87cefaff,LIGHTSLATEGRAY:0x778899ff,LIGHTSLATEGREY:0x778899ff,LIGHTSTEELBLUE:0xb0c4deff,LIGHTYELLOW:0xffffe0ff,LIME:0xff00ff,LIMEGREEN:0x32cd32ff,LINEN:0xfaf0e6ff,MAGENTA:0xff00ffff,MAROON:0x800000ff,MEDIUMAQUAMARINE:0x66cdaaff,MEDIUMBLUE:52735,MEDIUMORCHID:0xba55d3ff,MEDIUMPURPLE:0x9370dbff,MEDIUMSEAGREEN:0x3cb371ff,MEDIUMSLATEBLUE:0x7b68eeff,MEDIUMSPRINGGREEN:0xfa9aff,MEDIUMTURQUOISE:0x48d1ccff,MEDIUMVIOLETRED:0xc71585ff,MIDNIGHTBLUE:0x191970ff,MINTCREAM:0xf5fffaff,MISTYROSE:0xffe4e1ff,MOCCASIN:0xffe4b5ff,NAVAJOWHITE:0xffdeadff,NAVY:33023,OLDLACE:0xfdf5e6ff,OLIVE:0x808000ff,OLIVEDRAB:0x6b8e23ff,ORANGE:0xffa500ff,ORANGERED:0xff4500ff,ORCHID:0xda70d6ff,PALEGOLDENROD:0xeee8aaff,PALEGREEN:0x98fb98ff,PALETURQUOISE:0xafeeeeff,PALEVIOLETRED:0xdb7093ff,PAPAYAWHIP:0xffefd5ff,PEACHPUFF:0xffdab9ff,PERU:0xcd853fff,PINK:0xffc0cbff,PLUM:0xdda0ddff,POWDERBLUE:0xb0e0e6ff,PURPLE:0x800080ff,REBECCAPURPLE:0x663399ff,RED:0xff0000ff,ROSYBROWN:0xbc8f8fff,ROYALBLUE:0x4169e1ff,SADDLEBROWN:0x8b4513ff,SALMON:0xfa8072ff,SANDYBROWN:0xf4a460ff,SEAGREEN:0x2e8b57ff,SEASHELL:0xfff5eeff,SIENNA:0xa0522dff,SILVER:0xc0c0c0ff,SKYBLUE:0x87ceebff,SLATEBLUE:0x6a5acdff,SLATEGRAY:0x708090ff,SLATEGREY:0x708090ff,SNOW:0xfffafaff,SPRINGGREEN:0xff7fff,STEELBLUE:0x4682b4ff,TAN:0xd2b48cff,TEAL:8421631,THISTLE:0xd8bfd8ff,TOMATO:0xff6347ff,TRANSPARENT:0,TURQUOISE:0x40e0d0ff,VIOLET:0xee82eeff,WHEAT:0xf5deb3ff,WHITE:0xffffffff,WHITESMOKE:0xf5f5f5ff,YELLOW:0xffff00ff,YELLOWGREEN:0x9acd32ff}
vendor: 1,469 bytes, line 5
5,tc={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(eH(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},td={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},tu=function(e,t){var r=e9(e,t[0]),n=t[1];return n&&eX(n)?{color:r,stop:n}:{color:r,stop:null}},th=function(e,t){var r=e[0],n=e[e.length-1];null===r.stop&&(r.stop=eJ),null===n.stop&&(n.stop=e0);for(var i=[],a=0,o=0;o<e.length;o++){var s=e[o].stop;if(null!==s){var A=e2(s,t);A>a?i.push(A):i.push(a),a=A}else i.push(null)}for(var l=null,o=0;o<i.length;o++){var c=i[o];if(null===c)null===l&&(l=o);else if(null!==l){for(var d=o-l,u=(c-i[l-1])/(d+1),h=1;h<=d;h++)i[l+h-1]=u*h;l=null}}return e.map(function(e,r){return{color:e.color,stop:Math.max(Math.min(1,i[r]/t),0)}})},tp=function(e,t,r){var n=t/2,i=r/2,a=e2(e[0],t)-n;return(Math.atan2(i-e2(e[1],r),a)+2*Math.PI)%(2*Math.PI)},tm=function(e,t,r){var n="number"==typeof e?e:tp(e,t,r),i=Math.abs(t*Math.sin(n))+Math.abs(r*Math.cos(n)),a=t/2,o=r/2,s=i/2,A=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[i,a-l,a+l,o-A,o+A]},tf=function(e,t){return Math.sqrt(e*e+t*t)},tg=function(e,t,r,n,i){return[[0,0],[0,t],[e,0],[e,t]].reduce(function(e,t){var a=tf(r-t[0],n-t[1]);return(i?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner}
5,ty=function(e,t,r,n,i){var a=0,o=0;switch(e.size){case 0:0===e.shape?a=o=Math.min(Math.abs(t),Math.abs(t-n),Math.abs(r),Math.abs(r-i)):1===e.shape&&(a=Math.min(Math.abs(t),Math.abs(t-n)),o=Math.min(Math.abs(r),Math.abs(r-i)));break;case 2:if(0===e.shape)a=o=Math.min(tf(t,r),tf(t,r-i),tf(t-n,r),tf(t-n,r-i));else if(1===e.shape){var s=Math.min(Math.abs(r),Math.abs(r-i))/Math.min(Math.abs(t),Math.abs(t-n)),A=tg(n,i,t,r,!0),l=A[0],c=A[1];a=tf(l-t,(c-r)/s),o=s*a}break;case 1:0===e.shape?a=o=Math.max(Math.abs(t),Math.abs(t-n),Math.abs(r),Math.abs(r-i)):1===e.shape&&(a=Math.max(Math.abs(t),Math.abs(t-n)),o=Math.max(Math.abs(r),Math.abs(r-i)));break;case 3:if(0===e.shape)a=o=Math.max(tf(t,r),tf(t,r-i),tf(t-n,r),tf(t-n,r-i));else if(1===e.shape){var s=Math.max(Math.abs(r),Math.abs(r-i))/Math.max(Math.abs(t),Math.abs(t-n)),d=tg(n,i,t,r,!1),l=d[0],c=d[1];a=tf(l-t,(c-r)/s),o=s*a}}return Array.isArray(e.size)&&(a=e2(e.size[0],n),o=2===e.size.length?e2(e.size[1],i):a),[a,o]},tb=function(e,t){var r=e7(180),n=[];return ez(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value)){r=e8(t);return}if(e6(a)){r=(e5(e,a)+e7(270))%e7(360);return}}var o=tu(e,t);n.push(o)}),{angle:r,stops:n,type:1}},tx="closest-side",tw="farthest-side",tv="closest-corner",tC="farthest-corner",tB="circle",tS="ellipse",tk="cover",tE="c
5ontain",tF=function(e,t){var r=0,n=3,i=[],a=[];return ez(t).forEach(function(t,o){var s=!0;if(0===o?s=t.reduce(function(e,t){if(eH(t))switch(t.value){case"center":return a.push(eZ),!1;case"top":case"left":return a.push(eJ),!1;case"right":case"bottom":return a.push(e0),!1}else if(eX(t)||eq(t))return a.push(t),!1;return e},s):1===o&&(s=t.reduce(function(e,t){if(eH(t))switch(t.value){case tB:return r=0,!1;case tS:return r=1,!1;case tE:case tx:return n=0,!1;case tw:return n=1,!1;case tv:return n=2,!1;case tk:case tC:return n=3,!1}else if(eq(t)||eX(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)),s){var A=tu(e,t);i.push(A)}}),{size:n,shape:r,stops:i,position:a,type:2}},tT=function(e,t){if(22===t.type){var r={url:t.value,type:0};return e.cache.addImage(t.value),r}if(18===t.type){var n=tU[t.name];if(void 0===n)throw Error('Attempting to parse an unsupported image function "'+t.name+'"');return n(e,t.values)}throw Error("Unsupported image type "+t.type)},tU={"linear-gradient":function(e,t){var r=e7(180),n=[];return ez(t).forEach(function(t,i){if(0===i){var a=t[0];if(20===a.type&&"to"===a.value){r=e8(t);return}if(e6(a)){r=e5(e,a);return}}var o=tu(e,t);n.push(o)}),{angle:r,stops:n,type:1}},"-moz-linear-gradient":tb,"-ms-linear-gradient":tb,"-o-linear-gradient":tb,"-webkit-linear-gradient":tb,"radial-gradient":function(e,t){var r=0,n=3,i=[],a=[];return ez(t).forEach(function(t,o){var s=!0;if(0===o){var A=!1;s=t.reduce(function(e,t){if(A)if(eH(t))switch(t.value){case"center":a.push(eZ);break;case"top":case"left":a.push(eJ);break;case"right":case"bottom":a.push(e0)}else(eX(t)||eq(t))&&a.push(t);else if(eH(t))switch(t.value){case tB:return r=0,!1;case tS:return r=1,!1;case"at":return A=!0,!1;case tx:return n=0,!1;case tk:case tw:return n=1,!1;case tE:case tv:return n=2,!1;case tC:return n=3,!1}else if(eq(t)||eX(t))return Array.isArray(n)||(n=[]),n.push(t),!1;return e},s)}if(s){var l=tu(e,t);i.push(l)}}),{size:n,shape:r,stops:i,position:a,type:2}},"-moz-radial-gradient":tF,"-ms-radial-gradient":tF,"-o-radial-gradient":tF,"-webkit-radial-gradient":tF,"-webkit-gradient":function(e,t){var r=e7(180),n=[],i=1;return ez(t).forEach(function(t,r){var a=t[0];if(0===r){if(eH(a)&&"linear"===a.value){i=1;return}else if(eH(a)&&"radial"===a.value){i=2;return}}if(18===a.type){if("from"===a.name){var o=e9(e,a.values[0]);n.push({stop:eJ,color:o})}else if("to"===a.name){var o=e9(e,a.values[0]);n.push({stop:e0,color:o})}else if("color-stop"===a.name){var s=a.values.filter(eW);if(2===s.length){var o=e9(e,s[1]),A=s[0];eN(A)&&n.push({stop:{type:16,number:100*A.number,flags:A.flags},color:o})}}}}),1===i?{angle:(r+e7(180))%e7(360),stops:n,type:i}:{size:3,shape:0,stops:n,position:[],type:i}}},tI={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t.filter(function(e){var t;return eW(e)&&(20!==(t=e).type||"none"!==t.value)&&(18!==t.type||!!tU[t.name])}).map(function(t){return tT(e,t)})}},tQ={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(eH(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},tj={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return ez(t).map(function(e){return e.filter(eX)}).map(eY)}},tL={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return ez(t).map(function(e){return e.filter(eH).map(function(e){return e.value}).join(" ")}).map(t_)}},t_=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};(o=g||(g={})).AUTO="auto",o.CONTAIN="contain",o.COVER="cover";var tP={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return ez(t).map(function(e){return e.filter(tD)})}},tD=function(e){return eH(e)||eX(e)},tR=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},tM=tR("top"),tO=tR("right"),tN=tR("bottom"),tH=tR("left"),tV=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return eY(t.filter(eX))}}},tK=tV("top-left"),tG=tV("top-right"),tW=tV("bottom-right"),tz=tV("bottom-left"),t$=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},tq=t$("top"),tX=t$("right"),tY=t$("bottom"),tJ=t$("left"),tZ=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return eO(t)?t.number:0}}},t0=tZ("top"),t1=tZ("right"),t2=tZ("bottom"),t4=tZ("left"),t3={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},t5={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return+("rtl"===t)}}
vendor: 5,882 bytes, line 5
5,t6={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(eH).reduce(function(e,t){return e|t8(t.value)},0)}},t8=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 0x1000000;case"inline-block":return 0x2000000;case"inline-list-item":return 0x4000000;case"inline-table":return 0x8000000;case"inline-flex":return 0x10000000;case"inline-grid":return 0x20000000}return 0},t7={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},t9={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};(s=y||(y={})).NORMAL="normal",s.STRICT="strict";var re={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?y.STRICT:y.NORMAL}},rt={name:"line-height",initialValue:"normal",prefix:!1,type:4},rr=function(e,t){return eH(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:eX(e)?e2(e,t):t},rn={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:tT(e,t)}},ri={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return+("inside"!==t)}},ra={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return -1}}},ro=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},rs=ro("top"),rA=ro("right"),rl=ro("bottom"),rc=ro("left"),rd={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(eH).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},ru={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},rh=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},rp=rh("top"),rm=rh("right"),rf=rh("bottom"),rg=rh("left"),ry={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},rb={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},rx={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&eK(t[0],"none")?[]:ez(t).map(function(t){for(var r={color:tl.TRANSPARENT,offsetX:eJ,offsetY:eJ,blur:eJ},n=0,i=0;i<t.length;i++){var a=t[i];eq(a)?(0===n?r.offsetX=a:1===n?r.offsetY=a:r.blur=a,n++):r.color=e9(e,a)}return r})}},rw={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},rv={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var r=rC[t.name];if(void 0===r)throw Error('Attempting to parse an unsupported transform function "'+t.name+'"');return r(t.values)}return null}},rC={matrix:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number});return 6===t.length?t:null},matrix3d:function(e){var t=e.filter(function(e){return 17===e.type}).map(function(e){return e.number}),r=t[0],n=t[1];t[2],t[3];var i=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],s=t[13];return t[14],t[15],16===t.length?[r,n,i,a,o,s]:null}},rB={type:16,number:50,flags:4}
vendor: 9,667 bytes, line 5
5,rS=[rB,rB],rk={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var r=t.filter(eX);return 2!==r.length?rS:[r[0],r[1]]}},rE={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};(A=b||(b={})).NORMAL="normal",A.BREAK_ALL="break-all",A.KEEP_ALL="keep-all";for(var rF={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return b.BREAK_ALL;case"keep-all":return b.KEEP_ALL;default:return b.NORMAL}}},rT={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(eN(t))return{auto:!1,order:t.number};throw Error("Invalid z-index number parsed")}},rU=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw Error("Unsupported time type")},rI={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return eN(t)?t.number:1}},rQ={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},rj={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(eH).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return 0!==e})}},rL={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var r=[],n=[];return t.forEach(function(e){switch(e.type){case 20:case 0:r.push(e.value);break;case 17:r.push(e.number.toString());break;case 4:n.push(r.join(" ")),r.length=0}}),r.length&&n.push(r.join(" ")),n.map(function(e){return -1===e.indexOf(" ")?e:"'"+e+"'"})}},r_={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},rP={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return eN(t)?t.number:eH(t)&&"bold"===t.value?700:400}},rD={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(eH).map(function(e){return e.value})}},rR={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},rM=function(e,t){return(e&t)!=0},rO={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var r=t[0];return 20===r.type&&"none"===r.value?[]:t}},rN={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;for(var n=[],i=t.filter(eG),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(20===o.type){var A=s&&eN(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},rH={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var r=[],n=t.filter(eG),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(eH(a)&&"none"!==a.value){var s=o&&eN(o)?o.number:0;r.push({counter:a.value,reset:s})}}return r}},rV={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(eO).map(function(t){return rU(e,t)})}},rK={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var r=t[0];if(20===r.type&&"none"===r.value)return null;var n=[],i=t.filter(eV);if(i.length%2!=0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;n.push({open:o,close:s})}return n}},rG=function(e,t,r){if(!e)return"";var n=e[Math.min(t,e.length-1)];return n?r?n.open:n.close:""},rW={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&eK(t[0],"none")?[]:ez(t).map(function(t){for(var r={color:255,offsetX:eJ,offsetY:eJ,blur:eJ,spread:eJ,inset:!1},n=0,i=0;i<t.length;i++){var a=t[i];eK(a,"inset")?r.inset=!0:eq(a)?(0===n?r.offsetX=a:1===n?r.offsetY=a:2===n?r.blur=a:r.spread=a,n++):r.color=e9(e,a)}return r})}},rz={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var r=[];return t.filter(eH).forEach(function(e){switch(e.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2)}}),[0,1,2].forEach(function(e){-1===r.indexOf(e)&&r.push(e)}),r}},r$={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},rq={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return eO(t)?t.number:0}},rX=function(){function e(e,t){this.animationDuration=rZ(e,rV,t.animationDuration),this.backgroundClip=rZ(e,tc,t.backgroundClip),this.backgroundColor=rZ(e,td,t.backgroundColor),this.backgroundImage=rZ(e,tI,t.backgroundImage),this.backgroundOrigin=rZ(e,tQ,t.backgroundOrigin),this.backgroundPosition=rZ(e,tj,t.backgroundPosition),this.backgroundRepeat=rZ(e,tL,t.backgroundRepeat),this.backgroundSize=rZ(e,tP,t.backgroundSize),this.borderTopColor=rZ(e,tM,t.borderTopColor),this.borderRightColor=rZ(e,tO,t.borderRightColor),this.borderBottomColor=rZ(e,tN,t.borderBottomColor),this.borderLeftColor=rZ(e,tH,t.borderLeftColor),this.borderTopLeftRadius=rZ(e,tK,t.borderTopLeftRadius),this.borderTopRightRadius=rZ(e,tG,t.borderTopRightRadius),this.borderBottomRightRadius=rZ(e,tW,t.borderBottomRightRadius),this.borderBottomLeftRadius=rZ(e,tz,t.borderBottomLeftRadius),this.borderTopStyle=rZ(e,tq,t.borderTopStyle),this.borderRightStyle=rZ(e,tX,t.borderRightStyle),this.borderBottomStyle=rZ(e,tY,t.borderBottomStyle),this.borderLeftStyle=rZ(e,tJ,t.borderLeftStyle),this.borderTopWidth=rZ(e,t0,t.borderTopWidth),this.borderRightWidth=rZ(e,t1,t.borderRightWidth),this.borderBottomWidth=rZ(e,t2,t.borderBottomWidth),this.borderLeftWidth=rZ(e,t4,t.borderLeftWidth),this.boxShadow=rZ(e,rW,t.boxShadow),this.color=rZ(e,t3,t.color),this.direction=rZ(e,t5,t.direction),this.display=rZ(e,t6,t.display),this.float=rZ(e,t7,t.cssFloat),this.fontFamily=rZ(e,rL,t.fontFamily),this.fontSize=rZ(e,r_,t.fontSize),this.fontStyle=rZ(e,rR,t.fontStyle),this.fontVariant=rZ(e,rD,t.fontVariant),this.fontWeight=rZ(e,rP,t.fontWeight),this.letterSpacing=rZ(e,t9,t.letterSpacing),this.lineBreak=rZ(e,re,t.lineBreak),this.lineHeight=rZ(e,rt,t.lineHeight),this.listStyleImage=rZ(e,rn,t.listStyleImage),this.listStylePosition=rZ(e,ri,t.listStylePosition),this.listStyleType=rZ(e,ra,t.listStyleType),this.marginTop=rZ(e,rs,t.marginTop),this.marginRight=rZ(e,rA,t.marginRight),this.marginBottom=rZ(e,rl,t.marginBottom),this.marginLeft=rZ(e,rc,t.marginLeft),this.opacity=rZ(e,rI,t.opacity);var r,n,i=rZ(e,rd,t.overflow);this.overflowX=i[0],this.overflowY=i[+(i.length>1)],this.overflowWrap=rZ(e,ru,t.overflowWrap),this.paddingTop=rZ(e,rp,t.paddingTop),this.paddingRight=rZ(e,rm,t.paddingRight),this.paddingBottom=rZ(e,rf,t.paddingBottom),this.paddingLeft=rZ(e,rg,t.paddingLeft),this.paintOrder=rZ(e,rz,t.paintOrder),this.position=rZ(e,rb,t.position),this.textAlign=rZ(e,ry,t.textAlign),this.textDecorationColor=rZ(e,rQ,null!=(r=t.textDecorationColor)?r:t.color),this.textDecorationLine=rZ(e,rj,null!=(n=t.textDecorationLine)?n:t.textDecoration),this.textShadow=rZ(e,rx,t.textShadow),this.textTransform=rZ(e,rw,t.textTransform),this.transform=rZ(e,rv,t.transform),this.transformOrigin=rZ(e,rk,t.transformOrigin),this.visibility=rZ(e,rE,t.visibility),this.webkitTextStrokeColor=rZ(e,r$,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=rZ(e,rq,t.webkitTextStrokeWidth),this.wordBreak=rZ(e,rF,t.wordBreak),this.zIndex=rZ(e,rT,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return te(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return rM(this.display,4)||rM(this.display,0x2000000)||rM(this.display,0x10000000)||rM(this.display,0x20000000)||rM(this.display,0x4000000)||rM(this.display,0x8000000)},e}(),rY=function(e,t){this.content=rZ(e,rO,t.content),this.quotes=rZ(e,rK,t.quotes)},rJ=function(e,t){this.counterIncrement=rZ(e,rN,t.counterIncrement),this.counterReset=rZ(e,rH,t.counterReset)},rZ=function(e,t,r){var n=new eR,i=null!=r?r.toString():t.initialValue;n.write(i);var a=new eM(n.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,eH(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case"angle":return e5(e,a.parseComponentValue());case"color":return e9(e,a.parseComponentValue());case"image":return tT(e,a.parseComponentValue());case"length":var s=a.parseComponentValue();return eq(s)?s:eJ;case"length-percentage":var A=a.parseComponentValue();return eX(A)?A:eJ;case"time":return rU(e,a.parseComponentValue())}}},r0=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},r1=function(e,t){var r=r0(e);return 1===r||t===r},r2=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,r1(t,3),this.styles=new rX(e,window.getComputedStyle(t,null)),n6(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=T(this.context,t),r1(t,4)&&(this.flags|=16)},r4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
5+/",r3="u"<typeof Uint8Array?[]:new Uint8Array(256),r5=0;r5<r4.length;r5++)r3[r4.charCodeAt(r5)]=r5;for(var r6=2112,r8=function(e,t,r){return e.slice?e.slice(t,r):new Uint16Array(Array.prototype.slice.call(e,t,r))},r7=function(){function e(e,t,r,n,i,a){this.initialValue=e,this.errorValue=t,this.highStart=r,this.highValueIndex=n,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=r6-32+(e>>11),t=this.index[t]+(e>>5&63),t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),r9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne="u"<typeof Uint8Array?[]:new Uint8Array(256),nt=0;nt<r9.length;nt++)ne[r9.charCodeAt(nt)]=nt;var nr=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);(64512&a)==56320?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t},nn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var r=e.length;if(!r)return"";for(var n=[],i=-1,a="";++i<r;){var o=e[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===r||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},ni=(c=Array.isArray(l=function(e){var t,r,n,i,a,o=.75*e.length,s=e.length,A=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="u">typeof ArrayBuffer&&"u">typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):Array(o),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)r=r3[e.charCodeAt(t)],n=r3[e.charCodeAt(t+1)],i=r3[e.charCodeAt(t+2)],a=r3[e.charCodeAt(t+3)],c[A++]=r<<2|n>>4,c[A++]=(15&n)<<4|i>>2,c[A++]=(3&i)<<6|63&a;return l}(
vendor: 26,158 bytes, line 5
5"AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="
5))?function(e){for(var t=e.length,r=[],n=0;n<t;n+=4)r.push(e[n+3]<<24|e[n+2]<<16|e[n+1]<<8|e[n]);return r}(l):new Uint32Array(l),u=r8(d=Array.isArray(l)?function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r.push(e[n+1]<<8|e[n]);return r}(l):new Uint16Array(l),12,c[4]/2),p=2===c[5]?r8(d,(24+c[4])/2):(h=Math.ceil((24+c[4])/4),c.slice?c.slice(h,void 0):new Uint32Array(Array.prototype.slice.call(c,h,void 0))),new r7(c[0],c[1],c[2],c[3],u,p)),na=function(e){return ni.get(e)},no=function(e,t,r){var n=r-2,i=t[n],a=t[r-1],o=t[r];if(2===a&&3===o)return"Ã";if(2===a||3===a||4===a||2===o||3===o||4===o)return"÷";if(8===a&&-1!==[8,9,11,12].indexOf(o)||(11===a||9===a)&&(9===o||10===o)||(12===a||10===a)&&10===o||13===o||5===o||7===o||1===a)return"Ã";if(13===a&&14===o){for(;5===i;)i=t[--n];if(14===i)return"Ã"}if(15===a&&15===o){for(var s=0;15===i;)s++,i=t[--n];if(s%2==0)return"Ã"}return"÷"},ns=function(e){var t=nr(e),r=t.length,n=0,i=0,a=t.map(na);return{next:function(){if(n>=r)return{done:!0,value:null};for(var e="Ã";n<r&&"Ã"===(e=no(t,a,++n)););if("Ã"!==e||n===r){var o=nn.apply(null,t.slice(i,n));return i=n,{value:o,done:!1}}return{done:!0,value:null}}}},nA=function(e){for(var t,r=ns(e),n=[];!(t=r.next()).done;)t.value&&n.push(t.value.slice());return n},nl=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var r=e.createElement("boundtest");r.style.height="123px",r.style.display="block",e.body.appendChild(r),t.selectNode(r);var n=Math.round(t.getBoundingClientRect().height);if(e.body.removeChild(r),123===n)return!0}}return!1},nc=function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var r=e.createRange();t.innerHTML="function"==typeof"".repeat?"👨".repeat(10):"";var n=t.firstChild,i=I(n.data).map(function(e){return Q(e)}),a=0,o={},s=i.every(function(e,t){r.setStart(n,a),r.setEnd(n,a+e.length);var i=r.getBoundingClientRect();a+=e.length;var s=i.x>o.x||i.y>o.y;return o=i,0===t||s});return e.body.removeChild(t),s},nd=function(e){var t=new Image,r=e.createElement("canvas"),n=r.getContext("2d");if(!n)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),r.toDataURL()}catch(e){return!1}return!0},nu=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},nh=function(e){var t=e.createElement("canvas");t.width=100,t.height=100;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,100,100);var n=new Image,i=t.toDataURL();n.src=i;var a=np(100,100,0,0,n);return r.fillStyle="red",r.fillRect(0,0,100,100),nm(a).then(function(t){r.drawImage(t,0,0);var n=r.getImageData(0,0,100,100).data;r.fillStyle="red",r.fillRect(0,0,100,100);var a=e.createElement("div");return a.style.backgroundImage="url("+i+")",a.style.height="100px",nu(n)?nm(np(100,100,0,0,a)):Promise.reject(!1)}).then(function(e){return r.drawImage(e,0,0),nu(r.getImageData(0,0,100,100).data)}).catch(function(){return!1})},np=function(e,t,r,n,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",r.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},nm=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){return t(n)},n.onerror=r,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})}
vendor: 6,699 bytes, line 5
5,nf={get SUPPORT_RANGE_BOUNDS(){var ng=nl(document);return Object.defineProperty(nf,"SUPPORT_RANGE_BOUNDS",{value:ng}),ng},get SUPPORT_WORD_BREAKING(){var ny=nf.SUPPORT_RANGE_BOUNDS&&nc(document);return Object.defineProperty(nf,"SUPPORT_WORD_BREAKING",{value:ny}),ny},get SUPPORT_SVG_DRAWING(){var nb=nd(document);return Object.defineProperty(nf,"SUPPORT_SVG_DRAWING",{value:nb}),nb},get SUPPORT_FOREIGNOBJECT_DRAWING(){var nx="function"==typeof Array.from&&"function"==typeof window.fetch?nh(document):Promise.resolve(!1);return Object.defineProperty(nf,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:nx}),nx},get SUPPORT_CORS_IMAGES(){var nw=void 0!==new Image().crossOrigin;return Object.defineProperty(nf,"SUPPORT_CORS_IMAGES",{value:nw}),nw},get SUPPORT_RESPONSE_TYPE(){var nv="string"==typeof new XMLHttpRequest().responseType;return Object.defineProperty(nf,"SUPPORT_RESPONSE_TYPE",{value:nv}),nv},get SUPPORT_CORS_XHR(){var nC="withCredentials"in new XMLHttpRequest;return Object.defineProperty(nf,"SUPPORT_CORS_XHR",{value:nC}),nC},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var nB=!!("u">typeof Intl&&Intl.Segmenter);return Object.defineProperty(nf,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:nB}),nB}},nS=function(e,t){this.text=e,this.bounds=t},nk=function(e,t,r,n){var i=nU(t,r),a=[],o=0;return i.forEach(function(t){if(r.textDecorationLine.length||t.trim().length>0)if(nf.SUPPORT_RANGE_BOUNDS){var i=nF(n,o,t.length).getClientRects();if(i.length>1){var s=nT(t),A=0;s.forEach(function(t){a.push(new nS(t,F.fromDOMRectList(e,nF(n,A+o,t.length).getClientRects()))),A+=t.length})}else a.push(new nS(t,F.fromDOMRectList(e,i)))}else{var l=n.splitText(t.length);a.push(new nS(t,nE(e,n))),n=l}else nf.SUPPORT_RANGE_BOUNDS||(n=n.splitText(t.length));o+=t.length}),a},nE=function(e,t){var r=t.ownerDocument;if(r){var n=r.createElement("html2canvaswrapper");n.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(n,t);var a=T(e,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return F.EMPTY},nF=function(e,t,r){var n=e.ownerDocument;if(!n)throw Error("Node has no owner document");var i=n.createRange();return i.setStart(e,t),i.setEnd(e,t+r),i},nT=function(e){return nf.SUPPORT_NATIVE_TEXT_SEGMENTATION?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(e)).map(function(e){return e.segment}):nA(e)},nU=function(e,t){return 0!==t.letterSpacing?nT(e):nf.SUPPORT_NATIVE_TEXT_SEGMENTATION?Array.from(new Intl.Segmenter(void 0,{granularity:"word"}).segment(e)).map(function(e){return e.segment}):nQ(e,t)},nI=[32,160,4961,65792,65793,4153,4241],nQ=function(e,t){for(var r,n=eo(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[];!(r=n.next()).done;)!function(){if(r.value){var e=I(r.value.slice()),t="";e.forEach(function(e){-1===nI.indexOf(e)?t+=Q(e):(t.length&&i.push(t),i.push(Q(e)),t="")}),t.length&&i.push(t)}}();return i},nj=function(e,t,r){this.text=nL(t.data,r.textTransform),this.textBounds=nk(e,this.text,r,t)},nL=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(n_,nP);case 2:return e.toUpperCase();default:return e}},n_=/(^|\s|:|-|\(|\))([a-z])/g,nP=function(e,t,r){return e.length>0?t+r.toUpperCase():e},nD=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.src=r.currentSrc||r.src,n.intrinsicWidth=r.naturalWidth,n.intrinsicHeight=r.naturalHeight,n.context.cache.addImage(n.src),n}return C(t,e),t}(r2),nR=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.canvas=r,n.intrinsicWidth=r.width,n.intrinsicHeight=r.height,n}return C(t,e),t}(r2),nM=function(e){function t(t,r){var n=e.call(this,t,r)||this,i=new XMLSerializer,a=T(t,r);return r.setAttribute("width",a.width+"px"),r.setAttribute("height",a.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(r)),n.intrinsicWidth=r.width.baseVal.value,n.intrinsicHeight=r.height.baseVal.value,n.context.cache.addImage(n.svg),n}return C(t,e),t}(r2),nO=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.value=r.value,n}return C(t,e),t}(r2),nN=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.start=r.start,n.reversed="boolean"==typeof r.reversed&&!0===r.reversed,n}return C(t,e),t}(r2),nH=[{type:15,flags:0,unit:"px",number:3}],nV=[{type:16,flags:0,number:50}],nK=function(e){var t=e.type===nz?Array(e.value.length+1).join("â¢"):e.value;return 0===t.length?e.placeholder||"":t},nG="checkbox",nW="radio",nz="password",n$=function(e){function t(t,r){var n,i=e.call(this,t,r)||this;switch(i.type=r.type.toLowerCase(),i.checked=r.checked,i.value=nK(r),(i.type===nG||i.type===nW)&&(i.styles.backgroundColor=0xdededeff,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=0xa5a5a5ff,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=(n=i.bounds).width>n.height?new F(n.left+(n.width-n.height)/2,n.top,n.height,n.height):n.width<n.height?new F(n.left,n.top+(n.height-n.width)/2,n.width,n.width):n),i.type){case nG:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=nH;break;case nW:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=nV}return i}return C(t,e),t}(r2),nq=function(e){function t(t,r){var n=e.call(this,t,r)||this,i=r.options[r.selectedIndex||0];return n.value=i&&i.text||"",n}return C(t,e),t}(r2),nX=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.value=r.value,n}return C(t,e),t}(r2),nY=function(e){function t(t,r){var n=e.call(this,t,r)||this;n.src=r.src,n.width=parseInt(r.width,10)||0,n.height=parseInt(r.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){n.tree=n1(t,r.contentWindow.document.documentElement);var i=r.contentWindow.document.documentElement?tA(t,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):tl.TRANSPARENT,a=r.contentWindow.document.body?tA(t,getComputedStyle(r.contentWindow.document.body).backgroundColor):tl.TRANSPARENT;n.backgroundColor=te(i)?te(a)?n.styles.backgroundColor:a:i}}catch(e){}return n}return C(t,e),t}(r2),nJ=["OL","UL","MENU"],nZ=function(e,t,r,n){for(var i=t.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,n3(i)&&i.data.trim().length>0)r.textNodes.push(new nj(e,i,r.styles));else if(n5(i))if(id(i)&&i.assignedNodes)i.assignedNodes().forEac
vendor: 7,651 bytes, line 5
5h(function(t){return nZ(e,t,r,n)});else{var o=n0(e,i);o.styles.isVisible()&&(n2(i,o,n)?o.flags|=4:n4(o.styles)&&(o.flags|=2),-1!==nJ.indexOf(i.tagName)&&(o.flags|=8),r.elements.push(o),i.slot,i.shadowRoot?nZ(e,i.shadowRoot,o,n):il(i)||it(i)||ic(i)||nZ(e,i,o,n))}},n0=function(e,t){return io(t)?new nD(e,t):ii(t)?new nR(e,t):it(t)?new nM(e,t):n7(t)?new nO(e,t):n9(t)?new nN(e,t):ie(t)?new n$(e,t):ic(t)?new nq(e,t):il(t)?new nX(e,t):is(t)?new nY(e,t):new r2(e,t)},n1=function(e,t){var r=n0(e,t);return r.flags|=4,nZ(e,t,r,r),r},n2=function(e,t,r){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||ir(e)&&r.styles.isTransparent()},n4=function(e){return e.isPositioned()||e.isFloating()},n3=function(e){return e.nodeType===Node.TEXT_NODE},n5=function(e){return e.nodeType===Node.ELEMENT_NODE},n6=function(e){return n5(e)&&void 0!==e.style&&!n8(e)},n8=function(e){return"object"==typeof e.className},n7=function(e){return"LI"===e.tagName},n9=function(e){return"OL"===e.tagName},ie=function(e){return"INPUT"===e.tagName},it=function(e){return"svg"===e.tagName},ir=function(e){return"BODY"===e.tagName},ii=function(e){return"CANVAS"===e.tagName},ia=function(e){return"VIDEO"===e.tagName},io=function(e){return"IMG"===e.tagName},is=function(e){return"IFRAME"===e.tagName},iA=function(e){return"STYLE"===e.tagName},il=function(e){return"TEXTAREA"===e.tagName},ic=function(e){return"SELECT"===e.tagName},id=function(e){return"SLOT"===e.tagName},iu=function(e){return e.tagName.indexOf("-")>0},ih=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){return this.counters[e]||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,r=e.counterIncrement,n=e.counterReset,i=!0;null!==r&&r.forEach(function(e){var r=t.counters[e.counter];r&&0!==e.increment&&(i=!1,r.length||r.push(1),r[Math.max(0,r.length-1)]+=e.increment)});var a=[];return i&&n.forEach(function(e){var r=t.counters[e.counter];a.push(e.counter),r||(r=t.counters[e.counter]=[]),r.push(e.reset)}),a},e}(),ip={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},im={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ","Õ
","Õ","Õ","Õ","Õ","Õ","Ô¿","Ô¾","Ô½","Ô¼","Ô»","Ôº","Ô¹","Ô¸","Ô·","Ô¶","Ôµ","Ô´","Ô³","Ô²","Ô±"]},ig={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["×׳","×׳","×׳","×׳","×׳","×׳","×׳","×׳","×׳","×׳","ת","ש","ר","×§","צ","פ","×¢","ס","× ","×","×","×","××","××","××","××","××","×","×","×","×","×","×","×","×","×","×"]},iy={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["áµ","á°","á¯","á´","á®","á","á¬","á«","áª","á©","á¨","á§","á¦","á¥","á¤","á³","á¢","á¡","á ","á","á","á","á²","á","á","á","á","á","á","á±","á","á","á","á","á","á","á"]},ib=function(e,t,r,n,i,a){return e<t||e>r?iF(e,i,a.length>0):n.integers.reduce(function(t,r,i){for(;e>=r;)e-=r,t+=n.values[i];return t},"")+a},ix=function(e,t,r,n){var i="";do!r&&e--,i=n(e)+i,e/=t;while(e*t>=t)return i},iw=function(e,t,r,n,i){var a=r-t+1;return(e<0?"-":"")+(ix(Math.abs(e),a,n,function(e){return Q(Math.floor(e%a)+t)})+i)},iv=function(e,t,r){void 0===r&&(r=". ");var n=t.length;return ix(Math.abs(e),n,!1,function(e){return t[Math.floor(e%n)]})+r},iC=function(e,t,r,n,i,a){if(e<-9999||e>9999)return iF(e,4,i.length>0);var o=Math.abs(e),s=i;if(0===o)return t[0]+s;for(var A=0;o>0&&A<=4;A++){var l=o%10;0===l&&rM(a,1)&&""!==s?s=t[l]+s:l>1||1===l&&0===A||1===l&&1===A&&rM(a,2)||1===l&&1===A&&rM(a,4)&&e>100||1===l&&A>1&&rM(a,8)?s=t[l]+(A>0?r[A-1]:"")+s:1===l&&A>0&&(s=r[A-1]+s),o=Math.floor(o/10)}return(e<0?n:"")+s},iB="åç¾åè¬",iS="æ¾ä½°ä»è¬",ik="ãã¤ãã¹",iE="ë§ì´ëì¤",iF=function(e,t,r){var n=r?". ":"",i=r?"ã":"",a=r?", ":"",o=r?" ":"";switch(t){case 0:return"â¢"+o;case 1:return"â¦"+o;case 2:return"â¾"+o;case 5:var s=iw(e,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return iv(e,"ãä¸äºä¸åäºå
ä¸å
«ä¹",i);case 6:return ib(e,1,3999,ip,3,n).toLowerCase();case 7:return ib(e,1,3999,ip,3,n);case 8:return iw(e,945,969,!1,n);case 9:return iw(e,97,122,!1,n);case 10:return iw(e,65,90,!1,n);case 11:return iw(e,1632,1641,!0,n);case 12:case 49:return ib(e,1,9999,im,3,n);case 35:return ib(e,1,9999,im,3,n).toLowerCase();case 13:return iw(e,2534,2543,!0,n);case 14:case 30:return iw(e,6112,6121,!0,n);case 15:return iv(e,"åä¸å¯
å¯è¾°å·³åæªç³é
æäº¥",i);case 16:return iv(e,"ç²ä¹ä¸ä¸æå·±åºè¾å£¬ç¸",i);case 17:case 48:return iC(e,"é¶ä¸äºä¸åäºå
ä¸å
«ä¹",iB,"è² ",i,14);case 47:return iC(e,"é¶å£¹è²³åèä¼é¸ææç",iS,"è² ",i,15);case 42:return iC(e,"é¶ä¸äºä¸åäºå
ä¸å
«ä¹",iB,"è´",i,14);case 41:return iC(e,"é¶å£¹è´°åèä¼éææç",iS,"è´",i,15);case 26:return iC(e,"ãä¸äºä¸åäºå
ä¸å
«ä¹","åç¾åä¸",ik,i,0);case 25:return iC(e,"é¶å£±å¼ååä¼å
ä¸å
«ä¹","æ¾ç¾åä¸",ik,i,7);case 31:return iC(e,"ìì¼ì´ì¼ì¬ì¤ì¡ì¹ í구","ìë°±ì²ë§",iE,a,7);case 33:return iC(e,"é¶ä¸äºä¸åäºå
ä¸å
«ä¹","åç¾åè¬",iE,a,0);case 32:return iC(e,"é¶å£¹è²³ååäºå
ä¸å
«ä¹","æ¾ç¾å",iE,a,7);case 18:return iw(e,2406,2415,!0,n);case 20:return ib(e,1,19999,iy,3,n);case 21:return iw(e,2790,2799,!0,n);case 22:return iw(e,2662,2671,!0,n);case 22:return ib(e,1,10999,ig,3,n);case 23:return iv(e,"ããããããããããããããããã¡ã¤ã¦ã¨ãªã«ã¬ãã®ã¯ã²ãµã¸ã»ã¾ã¿ãããããããããããããããã");case 24:return iv(e,"ããã¯ã«ã»ã¸ã¨ã¡ãã¬ããããããããã¤ããªããããã®ãããã¾ããµããã¦ãããããã¿ããã²ããã");case 27:return iw(e,3302,3311,!0,n);case 28:return iv(e,"ã¢ã¤ã¦ã¨ãªã«ãã¯ã±ã³ãµã·ã¹ã»ã½ã¿ããããããããããããããããã ã¡ã¢ã¤ã¦ã¨ã©ãªã«ã¬ãã¯ã°ã±ã²ã³",i);case 29:return iv(e,"ã¤ããããããããªãã«ã²ã¯ã«ã¨ã¿ã¬ã½ãããã©ã ã¦ã°ããªã¯ã¤ãã±ãã³ã¨ãã¢ãµãã¦ã¡ãã·ã±ãã¢ã»ã¹",i);case 34:return iw(e,3792,3801,!0,n);case 37:return iw(e,6160,6169,!0,n);case 38:return iw(e,4160,4169,!0,n);case 39:return iw(e,2918,2927,!0,n);case 40:return iw(e,1776,1785,!0,n);case 43:return iw(e,3046,3055,!0,n);case 44:return iw(e,3174,3183,!0,n);case 45:return iw(e,3664,3673,!0,n);case 46:return iw(e,3872,3881,!0,n);default:return iw(e,48,57,!0,n)}},iT="data-html2canvas-ignore",iU=function(){function e(e,t,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=t,this.counters=new ih,this.quoteDepth=0,!t.ownerDocument)throw Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var r=this,n=iI(e,t);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,a=e.defaultView.pageYOffset,o=n.contentWindow,s=o.document,A=iL(n).then(function(){return S(r,void 0,void 0,function(){var e,r;return k(this,function(i){switch(i.label){case 0:if(this.scrolledElements.forEac
5h(iM),o&&(o.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==t.top||o.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(r=this.clonedReferenceElement))return[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")];if(!(s.fonts&&s.fonts.ready))return[3,2];return[4,s.fonts.ready];case 1:i.sent(),i.label=2;case 2:if(!/(AppleWebKit)/g.test(navigator.userAgent))return[3,4];return[4,ij(s)];case 3:i.sent(),i.label=4;case 4:if("function"==typeof e)return[2,Promise.resolve().then(function(){return e(s,r)}).then(function(){return n})];return[2,n]}})})});return s.open(),s.write(iD(document.doctype)+"<html></html>"),iR(this.referenceElement.ownerDocument,i,a),s.replaceChild(s.adoptNode(this.documentElement),s.documentElement),s.close(),A},e.prototype.createElementClone=function(e){if(r1(e,2),ii(e))return this.createCanvasClone(e);if(ia(e))return this.createVideoClone(e);if(iA(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return(io(t)&&(io(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),iu(t))?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return iP(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var r=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e},""),n=e.cloneNode(!1);return n.textContent=r,n}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)}
vendor: 4,333 bytes, line 5
5,e.prototype.createCanvasClone=function(e){if(this.options.inlineImages&&e.ownerDocument){var t,r=e.ownerDocument.createElement("img");try{return r.src=e.toDataURL(),r}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var i=e.getContext("2d"),a=n.getContext("2d");if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var o=null!=(t=e.getContext("webgl2"))?t:e.getContext("webgl");if(o){var s=o.getContextAttributes();(null==s?void 0:s.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var r=t.getContext("2d");try{return r&&(r.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||r.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},e.prototype.appendChildNode=function(e,t,r){n5(t)&&("SCRIPT"===t.tagName||t.hasAttribute(iT)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&n5(t)&&iA(t)||e.appendChild(this.cloneNode(t,r))},e.prototype.cloneChildNodes=function(e,t,r){for(var n=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(n5(i)&&id(i)&&"function"==typeof i.assignedNodes){var a=i.assignedNodes();a.length&&a.forEach(function(e){return n.appendChildNode(t,e,r)})}else this.appendChildNode(t,i,r)},e.prototype.cloneNode=function(e,t){if(n3(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var r=e.ownerDocument.defaultView;if(r&&n5(e)&&(n6(e)||n8(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var i=r.getComputedStyle(e),a=r.getComputedStyle(e,":before"),o=r.getComputedStyle(e,":after");this.referenceElement===e&&n6(n)&&(this.clonedReferenceElement=n),ir(n)&&iV(n);var s=this.counters.parse(new rJ(this.context,i)),A=this.resolvePseudoContent(e,n,a,x.BEFORE);iu(e)&&(t=!0),ia(e)||this.cloneChildNodes(e,n,t),A&&n.insertBefore(A,n.firstChild);var l=this.resolvePseudoContent(e,n,o,x.AFTER);return l&&n.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||n8(e))&&!is(e)||t)&&iP(i,n),(0!==e.scrollTop||0!==e.scrollLeft)&&this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(il(e)||ic(e))&&(il(n)||ic(n))&&(n.value=e.value),n}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,r,n){var i=this;if(r){var a=r.content,o=t.ownerDocument;if(o&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==r.display){this.counters.parse(new rJ(this.context,r));var s=new rY(this.context,r),A=o.createElement("html2canvaspseudoelement");iP(r,A),s.content.forEach(function(t){if(0===t.type)A.appendChild(o.createTextNode(t.value));else if(22===t.type){var r=o.createElement("img");r.src=t.value,r.style.opacity="1",A.appendChild(r)}else if(18===t.type){if("attr"===t.name){var n=t.values.filter(eH);n.length&&A.appendChild(o.createTextNode(e.getAttribute(n[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(eW),l=a[0],c=a[1];if(l&&eH(l)){var d=i.counters.getCounterValue(l.value),u=c&&eH(c)?ra.parse(i.context,c.value):3;A.appendChild(o.createTextNode(iF(d,u,!1)))}}else if("counters"===t.name){var h=t.values.filter(eW),l=h[0],p=h[1],c=h[2];if(l&&eH(l)){var m=i.counters.getCounterValues(l.value),f=c&&eH(c)?ra.parse(i.context,c.value):3,g=p&&0===p.type?p.value:"",y=m.map(function(e){return iF(e,f,!1)}).join(g);A.appendChild(o.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":A.appendChild(o.createTextNode(rG(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":A.appendChild(o.createTextNode(rG(s.quotes,--i.quoteDepth,!1)));break;default:A.appendChild(o.createTextNode(t.value))}}),A.className=iO+" "+iN;var l=n===x.BEFORE?" "+iO:" "+iN;return n8(t)?t.className.baseValue+=l:t.className+=l,A}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();
vendor: 5,809 bytes, line 5
5(m=x||(x={}))[m.BEFORE=0]="BEFORE",m[m.AFTER=1]="AFTER";var iI=function(e,t){var r=e.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=t.width.toString(),r.height=t.height.toString(),r.scrolling="no",r.setAttribute(iT,"true"),e.body.appendChild(r),r},iQ=function(e){return new Promise(function(t){e.complete||!e.src?t():(e.onload=t,e.onerror=t)})},ij=function(e){return Promise.all([].slice.call(e.images,0).map(iQ))},iL=function(e){return new Promise(function(t,r){var n=e.contentWindow;if(!n)return r("No window assigned for iframe");var i=n.document;n.onload=e.onload=function(){n.onload=e.onload=null;var r=setInterval(function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(r),t(e))},50)}})},i_=["all","d","content"],iP=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e.item(r);-1===i_.indexOf(n)&&t.style.setProperty(n,e.getPropertyValue(n))}return t},iD=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},iR=function(e,t,r){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||r!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,r)},iM=function(e){var t=e[0],r=e[1],n=e[2];t.scrollLeft=r,t.scrollTop=n},iO="___html2canvas___pseudoelement_before",iN="___html2canvas___pseudoelement_after",iH='{\n content: "" !important;\n display: none !important;\n}',iV=function(e){iK(e,"."+iO+":before"+iH+"\n ."+iN+":after"+iH)},iK=function(e,t){var r=e.ownerDocument;if(r){var n=r.createElement("style");n.textContent=t,e.appendChild(n)}},iG=function(){function e(){}return e.getOrigin=function(t){var r=e._link;return r?(r.href=t,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),iW=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(iZ(e)||iX(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return S(this,void 0,void 0,function(){var t,r,n,i,a=this;return k(this,function(o){switch(o.label){case 0:if(t=iG.isSameOrigin(e),r=!iY(e)&&!0===this._options.useCORS&&nf.SUPPORT_CORS_IMAGES&&!t,n=!iY(e)&&!t&&!iZ(e)&&"string"==typeof this._options.proxy&&nf.SUPPORT_CORS_XHR&&!r,!t&&!1===this._options.allowTaint&&!iY(e)&&!iZ(e)&&!n&&!r)return[2];if(i=e,!n)return[3,2];return[4,this.proxy(i)];case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,(iJ(i)||r)&&(n.crossOrigin="anonymous"),n.src=i,!0===n.complete&&setTimeout(function(){return e(n)},500),a._options.imageTimeout>0&&setTimeout(function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")},a._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(i,a){var o=nf.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var e=new FileReader;e.addEventListener("load",function(){return i(e.result)},!1),e.addEventListener("error",function(e){return a(e)},!1),e.readAsDataURL(s.response)}else a("Failed to proxy resource "+n+" with status code "+s.status)},s.onerror=a;var A=r.indexOf("?")>-1?"&":"?";if(s.open("GET",""+r+A+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+n)}}s.send()})},e}(),iz=/^data:image\/svg\+xml/i,i$=/^data:image\/.*;base64,/i,iq=/^data:image\/.*/i,iX=function(e){return nf.SUPPORT_SVG_DRAWING||!i0(e)},iY=function(e){return iq.test(e)},iJ=function(e){return i$.test(e)},iZ=function(e){return"blob"===e.substr(0,4)},i0=function(e){return"svg"===e.substr(-3).toLowerCase()||iz.test(e)},i1=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,r){return new e(this.x+t,this.y+r)},e}(),i2=function(e,t,r){return new i1(e.x+(t.x-e.x)*r,e.y+(t.y-e.y)*r)},i4=function(){function e(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return e.prototype.subdivide=function(t,r){var n=i2(this.start,this.startControl,t),i=i2(this.startControl,this.endControl,t),a=i2(this.endControl,this.end,t),o=i2(n,i,t),s=i2(i,a,t),A=i2(o,s,t);return r?new e(this.start,n,o,A):new e(A,s,a,this.end)},e.prototype.add=function(t,r){return new e(this.start.add(t,r),this.startControl.add(t,r),this.endControl.add(t,r),this.end.add(t,r))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),i3=function(e){return 1===e.type},i5=function(e){var t=e.styles,r=e.bounds,n=e1(t.borderTopLeftRadius,r.width,r.height),i=n[0],a=n[1],o=e1(t.borderTopRightRadius,r.width,r.height),s=o[0],A=o[1],l=e1(t.borderBottomRightRadius,r.width,r.height),c=l[0],d=l[1],u=e1(t.borderBottomLeftRadius,r.width,r.height),h=u[0],p=u[1],m=[];m.push((i+s)/r.width),m.push((h+c)/r.width),m.push((a+p)/r.height),m.push((A+d
vendor: 2,199 bytes, line 5
5)/r.height);var f=Math.max.apply(Math,m);f>1&&(i/=f,a/=f,s/=f,A/=f,c/=f,d/=f,h/=f,p/=f);var g=r.width-s,y=r.height-d,b=r.width-c,x=r.height-p,v=t.borderTopWidth,C=t.borderRightWidth,B=t.borderBottomWidth,S=t.borderLeftWidth,k=e2(t.paddingTop,e.bounds.width),E=e2(t.paddingRight,e.bounds.width),F=e2(t.paddingBottom,e.bounds.width),T=e2(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?i6(r.left+S/3,r.top+v/3,i-S/3,a-v/3,w.TOP_LEFT):new i1(r.left+S/3,r.top+v/3),this.topRightBorderDoubleOuterBox=i>0||a>0?i6(r.left+g,r.top+v/3,s-C/3,A-v/3,w.TOP_RIGHT):new i1(r.left+r.width-C/3,r.top+v/3),this.bottomRightBorderDoubleOuterBox=c>0||d>0?i6(r.left+b,r.top+y,c-C/3,d-B/3,w.BOTTOM_RIGHT):new i1(r.left+r.width-C/3,r.top+r.height-B/3),this.bottomLeftBorderDoubleOuterBox=h>0||p>0?i6(r.left+S/3,r.top+x,h-S/3,p-B/3,w.BOTTOM_LEFT):new i1(r.left+S/3,r.top+r.height-B/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?i6(r.left+2*S/3,r.top+2*v/3,i-2*S/3,a-2*v/3,w.TOP_LEFT):new i1(r.left+2*S/3,r.top+2*v/3),this.topRightBorderDoubleInnerBox=i>0||a>0?i6(r.left+g,r.top+2*v/3,s-2*C/3,A-2*v/3,w.TOP_RIGHT):new i1(r.left+r.width-2*C/3,r.top+2*v/3),this.bottomRightBorderDoubleInnerBox=c>0||d>0?i6(r.left+b,r.top+y,c-2*C/3,d-2*B/3,w.BOTTOM_RIGHT):new i1(r.left+r.width-2*C/3,r.top+r.height-2*B/3),this.bottomLeftBorderDoubleInnerBox=h>0||p>0?i6(r.left+2*S/3,r.top+x,h-2*S/3,p-2*B/3,w.BOTTOM_LEFT):new i1(r.left+2*S/3,r.top+r.height-2*B/3),this.topLeftBorderStroke=i>0||a>0?i6(r.left+S/2,r.top+v/2,i-S/2,a-v/2,w.TOP_LEFT):new i1(r.left+S/2,r.top+v/2),this.topRightBorderStroke=i>0||a>0?i6(r.left+g,r.top+v/2,s-C/2,A-v/2,w.TOP_RIGHT):new i1(r.left+r.width-C/2,r.top+v/2),this.bottomRightBorderStroke=c>0||d>0?i6(r.left+b,r.top+y,c-C/2,d-B/2,w.BOTTOM_RIGHT):new i1(r.left+r.width-C/2,r.top+r.height-B/2),this.bottomLeftBorderStroke=h>0||p>0?i6(r.left+S/2,r.top+x,h-S/2,p-B/2,w.BOTTOM_LEFT):new i1(r.left+S/2,r.top+r.height-B/2),this.topLeftBorderBox=i>0||a>0?i6(r.left,r.top,i,a,w.TOP_LEFT):new i1(r.left,r.top),this.topRightBorderBox=s>0||A>0?i6(r.left+g,r.top,s,A,w.TOP_RIGHT):new i1(r.left+r.width,r.top),this.bottomRightBorderBox=c>0||d>0?i6(r.left+b,r.top+y,c,d,w.BOTTOM_RIGHT):new i1(r.left+r.
vendor: 1,212 bytes, line 5
5width,r.top+r.height),this.bottomLeftBorderBox=h>0||p>0?i6(r.left,r.top+x,h,p,w.BOTTOM_LEFT):new i1(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||a>0?i6(r.left+S,r.top+v,Math.max(0,i-S),Math.max(0,a-v),w.TOP_LEFT):new i1(r.left+S,r.top+v),this.topRightPaddingBox=s>0||A>0?i6(r.left+Math.min(g,r.width-C),r.top+v,g>r.width+C?0:Math.max(0,s-C),Math.max(0,A-v),w.TOP_RIGHT):new i1(r.left+r.width-C,r.top+v),this.bottomRightPaddingBox=c>0||d>0?i6(r.left+Math.min(b,r.width-S),r.top+Math.min(y,r.height-B),Math.max(0,c-C),Math.max(0,d-B),w.BOTTOM_RIGHT):new i1(r.left+r.width-C,r.top+r.height-B),this.bottomLeftPaddingBox=h>0||p>0?i6(r.left+S,r.top+Math.min(x,r.height-B),Math.max(0,h-S),Math.max(0,p-B),w.BOTTOM_LEFT):new i1(r.left+S,r.top+r.height-B),this.topLeftContentBox=i>0||a>0?i6(r.left+S+T,r.top+v+k,Math.max(0,i-(S+T)),Math.max(0,a-(v+k)),w.TOP_LEFT):new i1(r.left+S+T,r.top+v+k),this.topRightContentBox=s>0||A>0?i6(r.left+Math.min(g,r.width+S+T),r.top+v+k,g>r.width+S+T?0:s-S+T,A-(v+k),w.TOP_RIGHT):new i1(r.left+r.width-(C+E),r.top+v+k),this.bottomRightContentBox=c>0||d>0?i6(r.left+Math.min(b,r.width-(S+T)),r.top+Math.min(y,r.height+v+k),Math.max(0,c-(C+E)),d-(B+F),w.BOTTOM_RIGHT):new i1(r.left+r.
vendor: 4,552 bytes, line 5
5width-(C+E),r.top+r.height-(B+F)),this.bottomLeftContentBox=h>0||p>0?i6(r.left+S+T,r.top+x,Math.max(0,h-(S+T)),p-(B+F),w.BOTTOM_LEFT):new i1(r.left+S+T,r.top+r.height-(B+F))};(f=w||(w={}))[f.TOP_LEFT=0]="TOP_LEFT",f[f.TOP_RIGHT=1]="TOP_RIGHT",f[f.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",f[f.BOTTOM_LEFT=3]="BOTTOM_LEFT";var i6=function(e,t,r,n,i){var a=(Math.sqrt(2)-1)/3*4,o=r*a,s=n*a,A=e+r,l=t+n;switch(i){case w.TOP_LEFT:return new i4(new i1(e,l),new i1(e,l-s),new i1(A-o,t),new i1(A,t));case w.TOP_RIGHT:return new i4(new i1(e,t),new i1(e+o,t),new i1(A,l-s),new i1(A,l));case w.BOTTOM_RIGHT:return new i4(new i1(A,t),new i1(A,t+s),new i1(e+o,l),new i1(e,l));case w.BOTTOM_LEFT:default:return new i4(new i1(A,l),new i1(A-o,l),new i1(e,t+s),new i1(e,t))}},i8=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},i7=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},i9=function(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6},ae=function(e,t){this.path=e,this.target=t,this.type=1},at=function(e){this.opacity=e,this.type=2,this.target=6},ar=function(e){return 1===e.type},an=function(e,t){return e.length===t.length&&e.some(function(e,r){return e===t[r]})},ai=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},aa=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new i5(this.container),this.container.styles.opacity<1&&this.effects.push(new at(this.container.styles.opacity)),null!==this.container.styles.transform){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new i9(r,n,i))}if(0!==this.container.styles.overflowX){var a=i8(this.curves),o=i7(this.curves);an(a,o)?this.effects.push(new ae(a,6)):(this.effects.push(new ae(a,2)),this.effects.push(new ae(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),r=this.parent,n=this.effects.slice(0);r;){var i=r.effects.filter(function(e){return!ar(e)});if(t||0!==r.container.styles.position||!r.parent){if(n.unshift.apply(n,i),t=-1===[2,3].indexOf(r.container.styles.position),0!==r.container.styles.overflowX){var a=i8(r.curves),o=i7(r.curves);an(a,o)||n.unshift(new ae(o,6))}}else n.unshift.apply(n,i);r=r.parent}return n.filter(function(t){return rM(t.target,e)})},e}(),ao=function(e,t,r,n){e.container.elements.forEach(function(i){var a=rM(i.flags,4),o=rM(i.flags,2),s=new aa(i,e);rM(i.styles.display,2048)&&n.push(s);var A=rM(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?r:t,c=new ai(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var u=0;l.negativeZIndex.some(function(e,t){if(d>e.element.container.styles.zIndex.order)u=t;else if(u>0)return!0;return!1}),l.negativeZIndex.splice(u,0,c)}else if(d>0){var h=0;l.positiveZIndex.some(function(e,t){if(d>=e.element.container.styles.zIndex.order)h=t+1;else if(h>0)return!0;return!1}),l.positiveZIndex.splice(h,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else i.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);ao(s,c,a?c:r,A)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),ao(s,t,r,A);rM(i.flags,8)&&as(i,A)})},as=function(e,t){for(var r=e instanceof nN?e.start:1,n=e instanceof nN&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof nO&&"number"==typeof a.container.value&&0!==a.container.value&&(r=a.container.value),a.listValue=iF(r,a.container.styles.listStyleType,!0),r+=n?-1:1}},aA=function(e){var t=new aa(e,null),r=new ai(t),n=[];return ao(t,r,r,n),as(t.container,n),r},al=function(e,t){switch(t){case 0:return ap(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return ap(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return ap(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return ap(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},ac=function(e,t){switch(t){case 0:return ap(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBo
vendor: 6,770 bytes, line 5
5x,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return ap(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return ap(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return ap(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},ad=function(e,t){switch(t){case 0:return ap(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return ap(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return ap(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return ap(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},au=function(e,t){switch(t){case 0:return ah(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return ah(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return ah(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return ah(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},ah=function(e,t){var r=[];return i3(e)?r.push(e.subdivide(.5,!1)):r.push(e),i3(t)?r.push(t.subdivide(.5,!0)):r.push(t),r},ap=function(e,t,r,n){var i=[];return i3(e)?i.push(e.subdivide(.5,!1)):i.push(e),i3(r)?i.push(r.subdivide(.5,!0)):i.push(r),i3(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),i3(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},am=function(e){var t=e.bounds,r=e.styles;return t.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},af=function(e){var t=e.styles,r=e.bounds,n=e2(t.paddingLeft,r.width),i=e2(t.paddingRight,r.width),a=e2(t.paddingTop,r.width),o=e2(t.paddingBottom,r.width);return r.add(n+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+n+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},ag=function(e,t,r){var n,i,a=(n=aw(e.styles.backgroundOrigin,t),0===n?e.bounds:2===n?af(e):am(e)),o=(i=aw(e.styles.backgroundClip,t),0===i?e.bounds:2===i?af(e):am(e)),s=ax(aw(e.styles.backgroundSize,t),r,a),A=s[0],l=s[1],c=e1(aw(e.styles.backgroundPosition,t),a.width-A,a.height-l);return[av(aw(e.styles.backgroundRepeat,t),c,s,a,o),Math.round(a.left+c[0]),Math.round(a.top+c[1]),A,l]},ay=function(e){return eH(e)&&e.value===g.AUTO},ab=function(e){return"number"==typeof e},ax=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if(eX(o)&&s&&eX(s))return[e2(o,r.width),e2(s,r.height)];var A=ab(a);if(eH(o)&&(o.value===g.CONTAIN||o.value===g.COVER))return ab(a)?r.width/r.height<a!=(o.value===g.COVER)?[r.width,r.width/a]:[r.height*a,r.height]:[r.width,r.height];var l=ab(n),c=ab(i),d=l||c;if(ay(o)&&(!s||ay(s)))return l&&c?[n,i]:A||d?d&&A?[l?n:i*a,c?i:n/a]:[l?n:r.width,c?i:r.height]:[r.width,r.height];if(A){var u=0,h=0;return eX(o)?u=e2(o,r.width):eX(s)&&(h=e2(s,r.height)),ay(o)?u=h*a:(!s||ay(s))&&(h=u/a),[u,h]}var p=null,m=null;if(eX(o)?p=e2(o,r.width):s&&eX(s)&&(m=e2(s,r.height)),null!==p&&(!s||ay(s))&&(m=l&&c?p/n*i:r.height),null!==m&&ay(o)&&(p=l&&c?m/i*n:r.width),null!==p&&null!==m)return[p,m];throw Error("Unable to calculate background-size for element")},aw=function(e,t){var r=e[t];return void 0===r?e[0]:r},av=function(e,t,r,n,i){var a=t[0],o=t[1],s=r[0],A=r[1];switch(e){case 2:return[new i1(Math.round(n.left),Math.round(n.top+o)),new i1(Math.round(n.left+n.width),Math.round(n.top+o)),new i1(Math.round(n.left+n.width),Math.round(A+n.top+o)),new i1(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new i1(Math.round(n.left+a),Math.round(n.top)),new i1(Math.round(n.left+a+s),Math.round(n.top)),new i1(Math.round(n.left+a+s),Math.round(n.height+n.top)),new i1(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new i1(Math.round(n.left+a),Math.round(n.top+o)),new i1(Math.round(n.left+a+s),Math.round(n.top+o)),new i1(Math.round(n.left+a+s),Math.round(n.top+o+A)),new i1(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new i1(Math.round(i.left),Math.round(i.top)),new i1(Math.round(i.left+i.width),Math.round(i.top)),new i1(Math.round(i.left+i.width),Math.round(i.height+i.top)),new i1(Math.round(i.left),Math.round(i.height+i.top))]}},aC="Hidden Text",aB=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),i=this._document.createElement("span"),a=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",a.appendChild(r),n.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(aC)),r.appendChild(i),r.appendChild(n);var o=n.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(aC)),r.style.lineHeight="normal",n.style.verticalAlign="super";var s=n.offsetTop-r.offsetTop+2;return a.removeChild(r),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var r=e+" "+t;return void 0===this._data[r]&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},e}(),aS=function(e,t){this.context=e,this.options=t},ak=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new aB(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return C(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),2===e.type&&(this.ctx.globalAlpha=e.opacity),0===e.type&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),ar(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore(
vendor: 9,432 bytes, line 5
5)},t.prototype.renderStack=function(e){return S(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(!e.element.container.styles.isVisible())return[3,2];return[4,this.renderStackContent(e)];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return S(this,void 0,void 0,function(){return k(this,function(t){switch(t.label){case 0:if(rM(e.container.flags,16),!e.container.styles.isVisible())return[3,3];return[4,this.renderNodeBackgroundAndBorders(e)];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,r){var n=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r):nT(e.text).reduce(function(t,i){return n.ctx.fillText(i,t,e.bounds.top+r),t+n.ctx.measureText(i).width},e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),r=aI(e.fontFamily).join(", "),n=eO(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,n,r].join(" "),r,n]},t.prototype.renderTextNode=function(e,t){return S(this,void 0,void 0,function(){var r,n,i,a,o,s,A,l,c=this;return k(this,function(d){return n=(r=this.createFontStyle(t))[0],i=r[1],a=r[2],this.ctx.font=n,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=(o=this.fontMetrics.getMetrics(i,a)).baseline,A=o.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(r){switch(r){case 0:c.ctx.fillStyle=tt(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,s);var n=t.textShadow;n.length&&e.text.trim().length&&(n.slice(0).reverse().forEach(function(r){c.ctx.shadowColor=tt(r.color),c.ctx.shadowOffsetX=r.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=r.offsetY.number*c.options.scale,c.ctx.shadowBlur=r.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,s)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=tt(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+s),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+A),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=tt(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+s)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var n=af(e),i=i7(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return S(this,void 0,void 0,function(){var r,n,i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b;return k(this,function(x){switch(x.label){case 0:this.applyEffects(e.getEffects(4)),r=e.container,n=e.curves,i=r.styles,a=0,o=r.textNodes,x.label=1;case 1:if(!(a<o.length))return[3,4];return s=o[a],[4,this.renderTextNode(s,i)];case 2:x.sent(),x.label=3;case 3:return a++,[3,1];case 4:if(!(r instanceof nD))return[3,8];x.label=5;case 5:return x.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return A=x.sent(),this.renderReplacedElement(r,n,A),[3,8];case 7:return x.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof nR&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof nM))return[3,12];x.label=9;case 9:return x.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return A=x.sent(),this.renderReplacedElement(r,n,A),[3,12];case 11:return x.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:if(!(r instanceof nY&&r.tree))return[3,14];return[4,new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}).render(r.tree)];case 13:l=x.sent(),r.width&&r.height&&this.ctx.drawImage(l,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),x.label=14;case 14:if(r instanceof n$&&(c=Math.min(r.bounds.width,r.bounds.height),r.type===nG?r.checked&&(this.ctx.save(),this.path([new i1(r.bounds.left+.39363*c,r.bounds.top+.79*c),new i1(r.bounds.left+.16*c,r.bounds.top+.5549*c),new i1(r.bounds.left+.27347*c,r.bounds.top+.44071*c),new i1(r.bounds.left+.39694*c,r.bounds.top+.5649*c),new i1(r.bounds.left+.72983*c,r.bounds.top+.23*c),new i1(r.bounds.left+.84*c,r.bounds.top+.34085*c),new i1(r.bounds.left+.39363*c,r.bounds.top+.79*c)]),this.ctx.fillStyle=tt(0x2a2a2aff),this.ctx.fill(),this.ctx.restore()):r.type===nW&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+c/2,r.bounds.top+c/2,c/4,0,2*Math.PI,!0),this.ctx.fillStyle=tt(0x2a2a2aff),this.ctx.fill(),this.ctx.restore())),aE(r)&&r.value.length){switch(u=(d=this.createFontStyle(i))[0],h=d[1],p=this.fontMetrics.getMetrics(u,h).baseline,this.ctx.font=u,this.ctx.fillStyle=tt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=aT(r.styles.textAlign),m=af(r),f=0,r.styles.textAlign){case 1:f+=m.width/2;break;case 2:f+=m.width}g=m.add(f,0,0,-m.height/2+1),this.ctx.save(),this.path([new i1(m.left,m.top),new i1(m.left+m.width,m.top),new i1(m.left+m.width,m.top+m.height),new i1(m.left,m.top+m.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new nS(r.value,g),i.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!rM(r.styles.display,2048))return[3,20];if(null===r.styles.listStyleImage)return[3,19];if(0!==(y=r.styles.listStyleImage).type)return[3,18];A=void 0,b=y.url,x.label=15;case 15:return x.trys.push([15,17,,18]),[4,this.context.cache.match(b)];case 16:return A=x.sent(),this.ctx.drawImage(A,r.bounds.left-(A.width+10),r.bounds.top),[3,18];case 17:return x.sent(),this.context.logger.error("Error loading list-style-image "+b),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==r.styles.listStyleType&&(u=this.createFontStyle(i)[0],this.ctx.font=u,this.ctx.fillStyle=tt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",m=new F(r.bounds.left,r.bounds.top+e2(r.styles.paddingTop,r.bounds.width),r.bounds.width,rr(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new nS(e.listValue,m),i.letterSpacing,rr(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),x.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return S(this,void 0,void 0,function(){var t,r,n,i,a,o,s,A,l,c,d,u,h,p,m;return k(this,function(f){switch(f.label){case 0:return rM(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:f.sent(),t=0,r=e.negativeZIndex,f.label=2;case 2:if(!(t<r.length))return[3,5];return n=r[t],[4,this.renderStack(n)];case 3:f.sent(),f.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:f.sent(),i=0,a=e.nonInlineLevel,f.label=7;case 7:if(!(i<a.length))return[3,10];return n=a[i],[4,this.renderNode(n)];case 8:f.sent(),f.label=9;case 9:return i++,[3,7];case 10:o=0,s=e.nonPositionedFloats,f.label=11;case 11:if(!(o<s.length))return[3,14];return n=s[o],[4,this.renderStack(n)];case 12:f.sent(),f.label=13;case 13:return o++,[3,11];case 14:A=0,l=e.nonPositionedInlineLevel,f.label=15;case 15:if(!(A<l.length))return[3,18];return n=l[A],[4,this.renderStack(n)];case 16:f.sent(),f.label=17;case 17:return A++,[3,15];case 18:c=0,d=e.inlineLevel,f.label=19;case 19:if(!(c<d.length))return[3,22];return n=d[c],[4,this.renderNode(n)];case 20:f.sent(),f.label=21;case 21:return c++,[3,19];case 22:u=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,f.label=23;case 23:if(!(u<h.length))return[3,26];return n=h[u],[4,this.renderStack(n)];case 24:f.sent(),f.label=25;case 25:return u++,[3,23];case 26:p=0,m=e.positiveZIndex,f.label=27;case 27:if(!(p<m.length))return[3,30];return n=m[p],[4,this.renderStack(n)];case 28:f.sent(),f.label=29;case 29:return p++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,r){var n=i3(e)?e.start:e;0===r?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),i3(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,r,n){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(r,n),this.ctx.fill(),this.ctx.translate(-r,-n)},t.prototype.resizeImage=function(e,t,r){if(e.width===t&&e.height===r)return e;var n,i=(null!=(n=this.canvas.ownerDocument)?n:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,r),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,r),i}
5,t.prototype.renderBackgroundImage=function(e){return S(this,void 0,void 0,function(){var t,r,n,i,a,o;return k(this,function(s){switch(s.label){case 0:t=e.styles.backgroundImage.length-1,r=function(r){var i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,E,F,T,U,I,Q,j,L,_;return k(this,function(k){switch(k.label){case 0:if(0!==r.type)return[3,5];i=void 0,a=r.url,k.label=1;case 1:return k.trys.push([1,3,,4]),[4,n.context.cache.match(a)];case 2:return i=k.sent(),[3,4];case 3:return k.sent(),n.context.logger.error("Error loading background-image "+a),[3,4];case 4:return i&&(s=(o=ag(e,t,[i.width,i.height,i.width/i.height]))[0],A=o[1],l=o[2],c=o[3],d=o[4],u=n.ctx.createPattern(n.resizeImage(i,c,d),"repeat"),n.renderRepeat(s,u,A,l)),[3,6];case 5:1===r.type?(s=(h=ag(e,t,[null,null,null]))[0],A=h[1],l=h[2],c=h[3],d=h[4],m=(p=tm(r.angle,c,d))[0],f=p[1],g=p[2],y=p[3],b=p[4],(x=document.createElement("canvas")).width=c,x.height=d,v=(w=x.getContext("2d")).createLinearGradient(f,y,g,b),th(r.stops,m).forEach(function(e){return v.addColorStop(e.stop,tt(e.color))}),w.fillStyle=v,w.fillRect(0,0,c,d),c>0&&d>0&&(u=n.ctx.createPattern(x,"repeat"),n.renderRepeat(s,u,A,l))):2===r.type&&(s=(C=ag(e,t,[null,null,null]))[0],B=C[1],S=C[2],c=C[3],d=C[4],A=e2((E=0===r.position.length?[eZ]:r.position)[0],c),l=e2(E[E.length-1],d),T=(F=ty(r,A,l,c,d))[0],U=F[1],T>0&&U>0&&(I=n.ctx.createRadialGradient(B+A,S+l,0,B+A,S+l,T),th(r.stops,2*T).forEach(function(e){return I.addColorStop(e.stop,tt(e.color))}),n.path(s),n.ctx.fillStyle=I,T!==U?(Q=e.bounds.left+.5*e.bounds.width,j=e.bounds.top+.5*e.bounds.height,_=1/(L=U/T),n.ctx.save(),n.ctx.translate(Q,j),n.ctx.transform(1,0,0,L,0,0),n.ctx.translate(-Q,-j),n.ctx.fillRect(B,_*(S-j)+j,c,d*_),n.ctx.restore()):n.ctx.fill())),k.label=6;case 6:return t--,[2]}})},n=this,i=0,a=e.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:if(!(i<a.length))return[3,4];return o=a[i],[5,r(o)];case 2:s.sent(),s.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,r){return S(this,void 0,void 0,function(){return k(this,function(n){return this.path(al(r,t)),this.ctx.fillStyle=tt(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,r,n){return S(this,void 0,void 0,function(){var i,a;return k(this,function(o){switch(o.label){case 0:if(!(t<3))return[3,2];return[4,this.renderSolidBorder(e,r,n)];case 1:return o.sent(),[2];case 2:return i=ac(n,r),this.path(i),this.ctx.fillStyle=tt(e),this.ctx.fill(),a=ad(n,r),this.path(a),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return S(this,void 0,void 0,function(){var t,r,n,i,a,o,s,A,l=this;return k(this,function(c){switch(c.label){case 0:if(this.applyEffects(e.getEffects(2)),r=!te((t=e.container.styles).backgroundColor)||t.backgroundImage.length,n=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],i=aF(aw(t.backgroundClip,0),e.curves),!(r||t.boxShadow.length))return[3,2];return this.ctx.save(),this.path(i),this.ctx.clip(),te(t.backgroundColor)||(this.ctx.fillStyle=tt(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var r,n,i,a,o=i8(e.curves),s=1e4*!t.inset,A=(r=-s+(t.inset?1:-1)*t.spread.number,n=(t.inset?1:-1)*t.spread.number,i=t.spread.number*(t.inset?-2:2),a=t.spread.number*(t.inset?-2:2),o.map(function(e,t){switch(t){case 0:return e.add(r,n);case 1:return e.add(r+i,n);case 2:return e.add(r+i,n+a);case 3:return e.add(r,n+a)}return e}));t.inset?(l.path(o),l.ctx.clip(),l.mask(A)):(l.mask(o),l.ctx.clip(),l.path(A)),l.ctx.shadowOffsetX=t.offsetX.number+s,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=tt(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?tt(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore(
vendor: 5,818 bytes, line 5
5)}),c.label=2;case 2:a=0,o=0,s=n,c.label=3;case 3:if(!(o<s.length))return[3,13];if(!(0!==(A=s[o]).style&&!te(A.color)&&A.width>0))return[3,11];if(2!==A.style)return[3,5];return[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,2)];case 4:case 6:case 8:return c.sent(),[3,11];case 5:if(3!==A.style)return[3,7];return[4,this.renderDashedDottedBorder(A.color,A.width,a,e.curves,3)];case 7:if(4!==A.style)return[3,9];return[4,this.renderDoubleBorder(A.color,A.width,a,e.curves)];case 9:return[4,this.renderSolidBorder(A.color,a,e.curves)];case 10:c.sent(),c.label=11;case 11:a++,c.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,r,n,i){return S(this,void 0,void 0,function(){var a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,x;return k(this,function(w){return this.ctx.save(),a=au(n,r),o=al(n,r),2===i&&(this.path(o),this.ctx.clip()),i3(o[0])?(s=o[0].start.x,A=o[0].start.y):(s=o[0].x,A=o[0].y),i3(o[1])?(l=o[1].end.x,c=o[1].end.y):(l=o[1].x,c=o[1].y),d=0===r||2===r?Math.abs(s-l):Math.abs(A-c),this.ctx.beginPath(),3===i?this.formatPath(a):this.formatPath(o.slice(0,2)),u=t<3?3*t:2*t,h=t<3?2*t:t,3===i&&(u=t,h=t),p=!0,d<=2*u?p=!1:d<=2*u+h?(m=d/(2*u+h),u*=m,h*=m):(f=Math.floor((d+h)/(u+h)),g=(d-f*u)/(f-1),h=(y=(d-(f+1)*u)/f)<=0||Math.abs(h-g)<Math.abs(h-y)?g:y),p&&(3===i?this.ctx.setLineDash([0,u+h]):this.ctx.setLineDash([u,h])),3===i?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=tt(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===i&&(i3(o[0])&&(b=o[3],x=o[0],this.ctx.beginPath(),this.formatPath([new i1(b.end.x,b.end.y),new i1(x.start.x,x.start.y)]),this.ctx.stroke()),i3(o[1])&&(b=o[1],x=o[2],this.ctx.beginPath(),this.formatPath([new i1(b.end.x,b.end.y),new i1(x.start.x,x.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return S(this,void 0,void 0,function(){var t;return k(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=tt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=aA(e),[4,this.renderStack(t)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(aS),aE=function(e){return e instanceof nX||e instanceof nq||e instanceof n$&&e.type!==nW&&e.type!==nG||!1},aF=function(e,t){switch(e){case 0:return i8(t);case 2:return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox];default:return i7(t)}},aT=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},aU=["-apple-system","system-ui"],aI=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return -1===aU.indexOf(e)}):e},aQ=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return C(t,e),t.prototype.render=function(e){return S(this,void 0,void 0,function(){var t;return k(this,function(r){switch(r.label){case 0:return[4,aj(np(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e))];case 1:return t=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=tt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(aS),aj=function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},aL=function(){function e(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("u">typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,E([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"u">typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,E([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("u">typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,E([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("u">typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,E([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),a_=function(){function e(t,r){var n;this.windowBounds=r,this.instanceName="#"+e.instanceCount++,this.logger=new aL({id:this.instanceName,enabled:t.logging}),this.cache=null!=(n=t.cache)?n:new iW(this,t)}return e.instanceCount=1,e}();"u">typeof window&&iG.setContext(window);var aP=function(e,t,r){var n=t.ownerDocument,i=n.documentElement?tA(e,getComputedStyle(n.documentElement).backgroundColor):tl.TRANSPARENT,a=n.body?tA(e,getComputedStyle(n.body).backgroundColor):tl.TRANSPARENT,o="str
5ing"==typeof r?tA(e,r):null===r?tl.TRANSPARENT:0xffffffff;return t===n.documentElement?te(i)?te(a)?o:a:i:o};return function(e,t){var r,n;return void 0===t&&(t={}),r=e,n=t,S(void 0,void 0,void 0,function(){var e,t,i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v,C,S,E,I,Q,j,L,_,P,D,R,M,O,N,H,V;return k(this,function(k){switch(k.label){case 0:if(!r||"object"!=typeof r)return[2,Promise.reject("Invalid element provided as first argument")];if(!(e=r.ownerDocument))throw Error("Element is not attached to a Document");if(!(t=e.defaultView))throw Error("Document is not attached to a Window");if(i={allowTaint:null!=(v=n.allowTaint)&&v,imageTimeout:null!=(C=n.imageTimeout)?C:15e3,proxy:n.proxy,useCORS:null!=(S=n.useCORS)&&S},s=new a_(B({logging:null==(E=n.logging)||E,cache:n.cache},i),o=new F((a={windowWidth:null!=(I=n.windowWidth)?I:t.innerWidth,windowHeight:null!=(Q=n.windowHeight)?Q:t.innerHeight,scrollX:null!=(j=n.scrollX)?j:t.pageXOffset,scrollY:null!=(L=n.scrollY)?L:t.pageYOffset}).scrollX,a.scrollY,a.windowWidth,a.windowHeight)),A=null!=(_=n.foreignObjectRendering)&&_,l={allowTaint:null!=(P=n.allowTaint)&&P,onclone:n.onclone,ignoreElements:n.ignoreElements,inlineImages:A,copyStyles:A},s.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),!(d=(c=new iU(s,r,l)).clonedReferenceElement))return[2,Promise.reject("Unable to find element in cloned iframe")];return[4,c.toIFrame(e,o)];case 1:if(u=k.sent(),p=(h=ir(d)||"HTML"===d.tagName?U(d.ownerDocument):T(s,d)).width,m=h.height,f=h.left,g=h.top,y=aP(s,d,n.backgroundColor),b={canvas:n.canvas,backgroundColor:y,scale:null!=(R=null!=(D=n.scale)?D:t.devicePixelRatio)?R:1,x:(null!=(M=n.x)?M:0)+f,y:(null!=(O=n.y)?O:0)+g,width:null!=(N=n.width)?N:Math.ceil(p),height:null!=(H=n.height)?H:Math.ceil(m)},!A)return[3,3];return s.logger.debug("Document cloned, using foreign object rendering"),[4,new aQ(s,b).render(d)];case 2:return x=k.sent(),[3,5];case 3:return s.logger.debug("Document cloned, element located at "+f+","+g+" with size "+p+"x"+m+" using computed rendering"),s.logger.debug("Starting DOM parsing"),w=n1(s,d),y===w.styles.backgroundColor&&(w.styles.backgroundColor=tl.TRANSPARENT),s.logger.debug("Starting renderer for element at "+b.x+","+b.y+" with size "+b.width+"x"+b.height),[4,new ak(s,b).render(w)];case 4:x=k.sent(),k.label=5;case 5:return(null==(V=n.removeContainer)||V)&&!iU.destroy(u)&&s.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore"),s.logger.debug("Finished rendering"),[2,x]}})})}}()},759940,170466,650599,501024,187847,494999,956799,447540,266805,884181,869952,823369,126877,310335,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(268407),i=e.i(271645),a=e.i(838456),o=e.i(782904),s=e.i(456757),A=e.i(163010),l=e.i(162282),c=e.i(943487);e.i(565306);var d=e.i(849850),u=e.i(344873);e.i(992550);var h=e.i(407585),p=e.i(497624),m=e.i(772475),f=e.i(632418),g=e.i(657688);function y(){return window.location.hostname.replace(/^www\./,"")}e.s(["getSubdomainHostname",0,y],170466);var b=e.i(858532),x=e.i(915833),w=e.i(709643);let v=[{value:"none",label:"None",type:"none",imagePath:null},{value:"green",label:"Green",type:"green",imagePath:"/imgs/png/share-card/green.png"},{value:"green1",label:"Green 1",type:"green",imagePath:"/imgs/png/share-card/green1.png"},{value:"green2",label:"Green 2",type:"green",imagePath:"/imgs/png/share-card/green2.png"},{value:"green3",label:"Green 3",type:"green",imagePath:"/imgs/png/share-card/green3.png"},{value:"red",label:"Red",type:"red",imagePath:"/imgs/png/share-card/red.png"},{value:"red1",label:"Red 1",type:"red",imagePath:"/imgs/png/share-card/red1.png"},{value:"red2",label:"Red 2",type:"red",imagePath:"/imgs/png/share-card/red2.png"},{value:"red3",label:"Red 3",type:"red",imagePath:"/imgs/png/share-card/red3.png"}],C={color:"text.secondary",fontWeight:400,fontSize:{xs:"10px",sm:"16px"},lineHeight:{xs:"14px",sm:"20px"}};function B(e){return{fontSize:{xs:"10px",sm:"12px"},lineHeight:{xs:1.2,sm:1.43},backgroundColor:t=>e?(0,f.varAlpha)(t.vars.palette.primary.mainChannel,.16):(0,f.varAlpha)(t.vars.palette.secondary.mainChannel,.15),color:e?"primary.main":"secondary.light",display:"inline",px:{xs:.5,sm:.75},py:.25,borderRadius:1}}function S(e){let n,i,o,s,A=(0,r.c)(7),{overlayKey:l}=e;if(null==l||""===l)return null;if(A[0]!==l)n=l?v.find(e=>e.value===l):v.find(e=>"none"===e.value),A[0]=l,A[1]=n;else n=A[1];let c=n;if(!c?.imagePath)return null;A[2]===Symbol.for("react.memo_cache_sentinel")?(i={position:"absolute",top:0,right:0,transform:{xs:"translateX(4px)",sm:"translateX(15px)"},width:{xs:"45%",sm:"60%"},height:"100%",zIndex:2,pointerEvents:"none",overflow:"hidden",display:"flex",alignItems:"flex-end",justifyContent:"center"},A[2]=i):i=A[2];let d=`${c.label} overlay`;return A[3]===Symbol.for("react.memo_cache_sentinel")?(o={width:"100%",height:"95%",objectFit:"contain",objectPosition:"right bottom"},A[3]=o):o=A[3],A[4]!==c.imagePath||A[5]!==d?(s=(0,t.jsx)(a.Box,{sx:i,children:(0,t.jsx)(a.Box,{component:"img",src:c.imagePath,alt:d,sx:o})}),A[4]=c.imagePath,A[5]=d,A[6]=s):s=A[6],s}let k=(0,i.forwardRef)((e,n)=>{let i,s,A,l,c,d,h,m,f,g,y,b,x,v,k,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V,K,G,W,z,$,q,X=(0,r.c)(127),{data:Y}=e,J=(0,w.useTranslations)();if(Y.blankCard){let e,r;return X[0]===Symbol.for("react.memo_cache_sentinel")?(e={position:"relative",width:{xs:"100%",sm:600},maxWidth:"100%",aspectRatio:"3 / 2",borderRadius:"16px",overflow:"hidden",backgroundColor:"#0F0F0F",border:"1px solid rgba(255,255,255,0.08)",boxSizing:"border-box"},X[0]=e):e=X[0],X[1]!==n?(r=(0,t.jsx)(a.Box,{ref:n,"data-share-card-export":!0,sx:e}),X[1]=n,X[2]=r):r=X[2],r}let{type:Z,competitionShare:ee,competitionTitle:et,rank:er,volume:en,rankDisplay:ei,volumeDisplay:ea,rankLabel:eo,metricLabel:es,instrumentName:eA,pnl:el,isPositive:ec,referralLink:ed,overlay:eu,isSpot:eh,roi:ep,entryPrice:em,markPrice:ef,leverage:eg,direction:ey,price:eb}=Y,ex="position"===Z,ew=Math.max(0,Number(er??0));X[3]===Symbol.for("react.memo_cache_sentinel")?(i=["/imgs/png/competitions/share-card/rank1.png","/imgs/png/competitions/share-card/rank2.png","/imgs/png/competitions/share-card/rank3.png"],X[3]=i):i=X[3];let ev=i[ew-1]??"/imgs/png/competitions/share-card/rankgeneral.png";X[4]!==ee||X[5]!==ei||X[6]!==ew?(s=ee?ei??"-":ei??(ew>0?`#${(0,u.formatNumber)(ew,{decimals:0,useGrouping:!0})}`:"-"),X[4]=ee,X[5]=ei,X[6]=ew,X[7]=s):s=X[7];let eC=s;X[8]!==ee||X[9]!==en||X[10]!==ea?(A=ee?ea??"$0":ea??(0,u.formatNumber)(Number(en??0),{currency:"$",decimals:0}),X[8]=ee,X[9]=en,X[10]=ea,X[11]=A):A=X[11];let eB=A;X[12]===Symbol.for("react.memo_cache_sentinel")?(l={xs:"44px",sm:"64px",lhXs:"46px",lhSm:"58px"},X[12]=l):l=X[12];let eS=l;X[13]===Symbol.for("react.memo_cache_sentinel")?(c={xs:"22px",sm:"34px",lhXs:"26px",lhSm:"34px"},X[13]=c):c=X[13];let ek=c;if(ee){let e,r,i,s,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E,F,T,U;X[14]===Symbol.for("react.memo_cache_sentinel")?(e={position:"relative",width:{xs:"100%",sm:600},maxWidth:"100%",aspectRatio:"3 / 2",borderRadius:"16px",overflow:"hidden",boxSizing:"border-box"},X[14]=e):e=X[14],X[15]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(a.Box,{component:"img",src:"/imgs/png/competitions/share-card/background.png",alt:"Competition share background",sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0,objectFit:"cover"}}
5),X[15]=r):r=X[15],X[16]===Symbol.for("react.memo_cache_sentinel")?(i={position:"absolute",right:0,bottom:0,width:{xs:"62%",sm:"64%"},maxWidth:"64%",height:"100%",zIndex:1,objectFit:"contain",objectPosition:"right bottom",pointerEvents:"none"},X[16]=i):i=X[16],X[17]!==ev?(s=(0,t.jsx)(a.Box,{component:"img",src:ev,alt:"Rank visual",sx:i}),X[17]=ev,X[18]=s):s=X[18],X[19]===Symbol.for("react.memo_cache_sentinel")?(A={position:"absolute",zIndex:2,top:"6%",left:"4%",width:"36.8333%",height:"88%",display:"flex",flexDirection:"column",justifyContent:"space-between"},X[19]=A):A=X[19],X[20]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(a.Box,{component:"img",src:"/assets/hero-logo.svg",alt:"Hotstuff",sx:{width:"auto",maxWidth:{xs:72,sm:101},height:{xs:14,sm:20},display:"block",objectFit:"contain",objectPosition:"left"}}),X[20]=l):l=X[20],X[21]===Symbol.for("react.memo_cache_sentinel")?(c={xs:.75,sm:1},X[21]=c):c=X[21],X[22]===Symbol.for("react.memo_cache_sentinel")?(d={mt:c,color:"#fff",fontWeight:600,fontSize:{xs:"10px",sm:"15px"},lineHeight:{xs:"14px",sm:"19px"},whiteSpace:"nowrap",overflow:"visible",textOverflow:"unset"},X[22]=d):d=X[22];let I=et||"Hotstuff Volume Championship";return X[23]!==I?(u=(0,t.jsxs)(a.Box,{children:[l,(0,t.jsx)(o.Typography,{sx:d,children:I})]}),X[23]=I,X[24]=u):u=X[24],X[25]===Symbol.for("react.memo_cache_sentinel")?(h={width:"100%"},X[25]=h):h=X[25],X[26]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#B8B8B8",fontSize:{xs:"11px",sm:"18px"}},X[26]=p):p=X[26],X[27]!==eo||X[28]!==J?(m=eo||J("modals.myRank"),X[27]=eo,X[28]=J,X[29]=m):m=X[29],X[30]!==m?(f=(0,t.jsx)(o.Typography,{sx:p,children:m}),X[30]=m,X[31]=f):f=X[31],X[32]===Symbol.for("react.memo_cache_sentinel")?(g={xs:.3,sm:1.5},X[32]=g):g=X[32],X[33]===Symbol.for("react.memo_cache_sentinel")?(y={mt:g,color:"#93EA5D",fontWeight:700,fontSize:{xs:eS.xs,sm:eS.sm},lineHeight:{xs:eS.lhXs,sm:eS.lhSm},width:"66.5%",minHeight:"16.5%",whiteSpace:"nowrap"},X[33]=y):y=X[33],X[34]!==eC?(b=(0,t.jsx)(o.Typography,{sx:y,children:eC}),X[34]=eC,X[35]=b):b=X[35],X[36]===Symbol.for("react.memo_cache_sentinel")?(x={xs:1.15,sm:4},X[36]=x):x=X[36],X[37]===Symbol.for("react.memo_cache_sentinel")?(w={mt:x,color:"#B8B8B8",fontSize:{xs:"11px",sm:"18px"}},X[37]=w):w=X[37],X[38]!==es||X[39]!==J?(v=es||J("modals.myVolume"),X[38]=es,X[39]=J,X[40]=v):v=X[40],X[41]!==v?(C=(0,t.jsx)(o.Typography,{sx:w,children:v}),X[41]=v,X[42]=C):C=X[42],X[43]===Symbol.for("react.memo_cache_sentinel")?(B={xs:.25,sm:1},X[43]=B):B=X[43],X[44]===Symbol.for("react.memo_cache_sentinel")?(S={mt:B,color:"#fff",fontWeight:700,fontSize:{xs:ek.xs,sm:ek.sm},lineHeight:{xs:ek.lhXs,sm:ek.lhSm},width:"85.5%",minHeight:"9.7%",whiteSpace:"nowrap"},X[44]=S):S=X[44],X[45]!==eB?(k=(0,t.jsx)(o.Typography,{sx:S,children:eB}),X[45]=eB,X[46]=k):k=X[46],X[47]!==f||X[48]!==b||X[49]!==C||X[50]!==k?(E=(0,t.jsxs)(a.Box,{sx:h,children:[f,b,C,k]}),X[47]=f,X[48]=b,X[49]=C,X[50]=k,X[51]=E):E=X[51],X[52]===Symbol.for("react.memo_cache_sentinel")?(F=(0,t.jsx)(o.Typography,{sx:{color:"#fff",fontSize:{xs:"11px",sm:"14px"}},children:"hotstuff.trade"}),X[52]=F):F=X[52],X[53]!==u||X[54]!==E?(T=(0,t.jsxs)(a.Box,{sx:A,children:[u,E,F]}),X[53]=u,X[54]=E,X[55]=T):T=X[55],X[56]!==n||X[57]!==T||X[58]!==s?(U=(0,t.jsxs)(a.Box,{ref:n,"data-share-card-export":!0,sx:e,children:[r,s,T]}),X[56]=n,X[57]=T,X[58]=s,X[59]=U):U=X[59],U}X[60]===Symbol.for("react.memo_cache_sentinel")?(d={position:"relative",width:{xs:"100%",sm:600},maxWidth:"100%",aspectRatio:"3 / 2",borderRadius:"16px",overflow:"hidden",backgroundColor:"transparent",margin:0,display:"block",boxSizing:"border-box"},X[60]=d):d=X[60];let eE=ec?"/imgs/png/share-card/green-bg.png":"/imgs/png/share-card/red-bg.png";X[61]===Symbol.for("react.memo_cache_sentinel")?(h={position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0,objectFit:"cover"},X[61]=h):h=X[61],X[62]!==eE?(m=(0,t.jsx)(a.Box,{component:"img",src:eE,alt:"Background",sx:h}),X[62]=eE,X[63]=m):m=X[63],X[64]===Symbol.for("react.memo_cache_sentinel")?(f={position:"relative",zIndex:1,p:{xs:"16px",sm:"40px"},height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},X[64]=f):f=X[64],X[65]===Symbol.for("react.memo_cache_sentinel")?(g={display:"flex",alignItems:"center"},X[65]=g):g=X[65],X[66]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(a.Box,{children:(0,t.jsx)(a.Box,{sx:g,children:(0,t.jsx)(a.Box,{component:"img",src:"/assets/hero-logo.svg",alt:"Hotstuff",sx:{width:{xs:72,sm:120},height:{xs:14,sm:24},objectFit:"contain",objectPosition:"left"}})})}),X[66]=y):y=X[66],X[67]===Symbol.for("react.memo_cache_sentinel")?(b={display:"flex",flexDirection:"column",flex:1,justifyContent:"center",maxWidth:{xs:"56%",sm:"none"}},X[67]=b):b=X[67],X[68]!==ec||X[69]!==eh?(x=!eh&&(0,t.jsx)(o.Typography,{sx:{color:ec?"primary.main":"secondary.main",mb:{xs:.5,sm:1},fontSize:{xs:"8px",sm:"16px"},fontWeight:400,lineHeight:{xs:"12px",sm:"24px"}},children:"Perpetuals"}),X[68]=ec,X[69]=eh,X[70]=x):x=X[70],X[71]===Symbol.for("react.memo_cache_sentinel")?(v={display:"flex",alignItems:"center",gap:{xs:.5,sm:1},mb:{xs:1,sm:2}},X[71]=v):v=X[71],X[72]!==eA?(k=(0,t.jsx)(p.CryptoIcon,{symbol:eA,alt:eA,size:32}),X[72]=eA,X[73]=k):k=X[73],X[74]===Symbol.for("react.memo_cache_sentinel")?(F={xs:"12px",sm:"16px"},X[74]=F):F=X[74],X[75]===Symbol.for("react.memo_cache_sentinel")?(T={color:"text.primary",fontSize:F,fontWeight:400,lineHeight:{xs:"16px",sm:"24px"}},X[75]=T):T=X[75],X[76]!==eA?(U=(0,t.jsx)(o.Typography,{sx:T,children:eA}),X[76]=eA,X[77]=U):U=X[77],X[78]!==ey||X[79]!==ex||X[80]!==ec||X[81]!==eh||X[82]!==eg?(I=eh?(0,t.jsx)(o.Typography,{variant:"caption",sx:B(ec),children:"spot"}):ex&&eg?(0,t.jsxs)(o.Typography,{variant:"caption",sx:B(ec),children:[eg,"x"]}):!ex&&ey&&(0,t.jsx)(o.Typography,{variant:"caption",sx:B(ec),children:ey}),X[78]=ey,X[79]=ex,X[80]=ec,X[81]=eh,X[82]=eg,X[83]=I):I=X[83],X[84]!==k||X[85]!==U||X[86]!==I?(Q=(0,t.jsxs)(a.Box,{sx:v,children:[k,U,I]}),X[84]=k,X[85]=U,X[86]=I,X[87]=Q):Q=X[87],X[88]===Symbol.for("react.memo_cache_sentinel")?(j={mb:{xs:2,sm:4}},X[88]=j):j=X[88];let eF=ec?"primary.main":"secondary.main";return X[89]===Symbol.for("react.memo_cache_sentinel")?(L={xs:"30px",sm:"64px"},_={xs:"38px",sm:1},P={xs:"8px",sm:"4px"},X[89]=L,X[90]=_,X[91]=P):(L=X[89],_=X[90],P=X[91]),X[92]!==eF?(D={color:eF,fontWeight:700,fontSize:L,lineHeight:_,pt:P,letterSpacing:"-0.02em"},X[92]=eF,X[93]=D):D=X[93],X[94]!==el||X[95]!==ep?(R=void 0!==ep?(0,t.jsxs)(t.Fragment,{children:[ep>=0?"+":"",(0,u.formatNumber)(ep,{decimals:2,suffix:"%",useGrouping:!0})]}):(0,u.formatNumber)(Math.abs(el),{decimals:2,useGrouping:!0}),X[94]=el,X[95]=ep,X[96]=R):R=X[96],X[97]!==D||X[98]!==R?(M=(0,t.jsx)(a.Box,{sx:j,children:(0,t.jsx)(o.Typography,{sx:D,children:R})}),X[97]=D,X[98]=R,X[99]=M):M=X[99],X[100]!==em||X[101]!==ex||X[102]!==ef||X[103]!==eb?(O=(0,t.jsx)(a.Box,{children:ex?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.Typography,{sx:{...C,mb:1},children:["Entry Price"," ",(0,t.jsx)(a.Box,{component:"span",sx:{color:"common.white",ml:{xs:1,sm:1.5}},children:(0,u.formatNumber)(em??0,{decimals:2,useGrouping:!0})})]}),(0,t.jsxs)(o.Typography,{sx:C,children:["Mark Price"," ",(0,t.jsx)(a.Box,{component:"span",sx:{color:"common.white",ml:{xs:1,sm:1.5}},children:(0,u.formatNumber)(ef??0,{decimals:2,useGrouping:!0})})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(o.Typography,{sx:{...C,mb:1},children:["Entry Price"," ",(0,t.jsx)(a.Box,{component:"span",sx:{color:"common.white",ml:{xs:1,sm:1.5}},children:(0,u.formatNumber)(em??0,{decimals:2,useGrouping:!0})})]}),(0,t.jsxs)(o.Typography,{sx:C,children:["Close Price"," ",(0,t.jsx)(a.Box,{component:"span",sx:{color:"common.white",ml:{xs:1,sm:1.5}},children:(0,u.formatNumber)(eb??0,{decimals:2,useGrouping:!0})})]})]})}),X[100]=em,X[101]=ex,X[102]=ef,X[103]=eb,X[104]=O):O=X[104],X[105]!==x||X[106]!==Q||X[107]!==M||X[108]!==O?(N=(0,t.jsxs)(a.Box,{sx:b,children:[x,Q,M,O]}),X[105]=x,X[106]=Q,X[107]=M,X[108]=O,X[109]=N):N=X[109],X[110]===Symbol.for("react.memo_cache_sentinel")?(H={position:"relative",zIndex:3},X[110]=H):H=X[110],X[111]===Symbol.for("react.memo_cache_sentinel")?(V={xs:"9px",sm:"12px"},X[111]=V):V=X[111],X[112]===Symbol.for("react.memo_cache_sentinel")?(K={color:"text.secondary",fontSize:V,fontWeight:400,lineHeight:{xs:"11px",sm:"16px"}},X[112]=K):K=X[112],X[113]!==ed?(G=ed||E(),X[113]=ed,X[114]=G):G=X[114],X[115]!==G?(W=(0,t.jsx)(a.Box,{sx:H,children:(0,t.jsx)(o.Typography,{sx:K,children:G})}),X[115]=G,X[116]=W):W=X[116],X[117]!==eu?(z=(0,t.jsx)(S,{overlayKey:eu}
5),X[117]=eu,X[118]=z):z=X[118],X[119]!==N||X[120]!==W||X[121]!==z?($=(0,t.jsxs)(a.Box,{sx:f,children:[y,N,W,z]}),X[119]=N,X[120]=W,X[121]=z,X[122]=$):$=X[122],X[123]!==n||X[124]!==$||X[125]!==m?(q=(0,t.jsxs)(a.Box,{ref:n,"data-share-card-export":!0,sx:d,children:[m,$]}),X[123]=n,X[124]=$,X[125]=m,X[126]=q):q=X[126],q});k.displayName="ShareCard";let E=e=>{let t=y();return e?`https://${t}/join/${e}`:`https://${t}/join`},F=({modalKey:e,title:r,generateShareText:p,extractData:y})=>{let C,B=(0,w.useTranslations)(),S=r??B("competitions.shareCardTitle"),{payload:F}=(0,n.useActionStore)(),{address:T}=(0,n.useAuthStore)(),U=(0,n.useUserTradingDataStore)(e=>e.referralSummary[T]),I=E(U?.codes?.filter(Boolean)?.[0]||""),[Q,j]=(0,i.useState)(""),[L,_]=(0,i.useState)(null),P=(0,i.useRef)(null),D=(0,A.useMediaQuery)("(max-width: 1000px)"),R=y(F),M=e=>{if(e.competitionShare){let t=p(e,I).trim();if(t)return t;let r=e.rankDisplay??(Number(e.rank??0)>0?`#${(0,u.formatNumber)(Number(e.rank),{decimals:0,useGrouping:!0})}`:"-"),n=e.volumeDisplay??(0,u.formatNumber)(Number(e.volume??0),{currency:"$",decimals:0});return`Check my rank ${r} in the Hotstuff Volume Championship. 6I just pushed ${n} in volume. 7 8Can you beat me? @tradehotstuff`}return p(e,I)};if((0,i.useEffect)(()=>{R&&!Q.trim()&&j(M(R))},[R]),!R)return(0,t.jsx)(d.ModalBox,{title:S,active:e,maxWidth:"lg",children:(0,t.jsx)(a.Box,{children:(0,t.jsx)(o.Typography,{variant:"body1",color:"text.secondary",children:B("common.noData")})})});let O=async()=>{let e=P.current;if(!e)return;let t=R.instrumentName.replace(/[^a-zA-Z0-9\s-]/g,"").trim().replace(/\s+/g,"-").toLowerCase(),r=`hotstuff-share-${t||"instrument"}-${Date.now()}.png`,n=new Map;try{document.fonts?.ready&&await document.fonts.ready,await Promise.all(Array.from(e.querySelectorAll("img")).map(async e=>{e.complete||await new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()});try{let t=await fetch(e.src).then(e=>e.blob()),r=await new Promise(e=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.readAsDataURL(t)});n.set(e,e.src),e.src=r}catch{}})),await new Promise(e=>setTimeout(e,100));let t=e.getBoundingClientRect(),i=window.innerWidth>=600,a=i?1300:Math.round(t.width),o=i?800:Math.round(t.height),s=a,A=o;i&&(A=o,(s=Math.round(3*A/2))>a&&(s=a,A=Math.round(2*s/3)));let l=Math.max(window.innerWidth,s),c=Math.max(window.innerHeight,A),d=Math.min(window.devicePixelRatio||1,2),u=await (0,x.default)(e,{backgroundColor:null,scale:d,logging:!1,useCORS:!0,allowTaint:!1,imageTimeout:15e3,width:s,height:A,scrollX:0,scrollY:0,windowWidth:l,windowHeight:c,onclone:e=>{let t=e.querySelector("[data-share-card-export]");t instanceof HTMLElement&&Object.assign(t.style,{borderRadius:"0",boxSizing:"border-box",width:`${s}px`,minWidth:`${s}px`,maxWidth:`${s}px`,height:`${A}px`,aspectRatio:"unset"})}}),h=u;if(i){let e=document.createElement("canvas");e.width=Math.round(a*d),e.height=Math.round(o*d);let t=e.getContext("2d");if(t){let r=e.width,n=e.height,i=u.width,a=u.height,o=Math.max(r/i,n/a),s=Math.round(i*o),A=Math.round(a*o),l=Math.round((r-s)/2),c=Math.round((n-A)/2);t.drawImage(u,l,c,s,A),h=e}}let p=e=>{let t=document.createElement("a");t.download=r,t.href=e,t.rel="noopener",document.body.appendChild(t),t.click(),document.body.removeChild(t)},m=await new Promise(e=>{h.toBlob(t=>e(t),"image/png",1)});if(m){let e=URL.createObjectURL(m);p(e),URL.revokeObjectURL(e)}else{let e=h.toDataURL("image/png",1);if(!e||"data:,"===e)throw Error("Canvas export failed");p(e)}b.showToast.success({message:B("modals.imageSavedSuccess")})}catch(e){console.error("handleSaveImage:",e),b.showToast.error({message:B("modals.failedToSaveImage")})}finally{n.forEach((e,t)=>{t.src=e})}},N={...R,referralLink:I,overlay:R.blankCard||R.competitionShare?null:L};return(0,t.jsx)(d.ModalBox,{title:S,active:e,maxWidth:"md",sx:{"& .MuiDialog-paper":{maxWidth:D?"650px":"md"}},children:(0,t.jsxs)(c.default,{container:!0,spacing:3,children:[(0,t.jsx)(c.default,{size:{xs:12,md:8},children:(0,t.jsx)(k,{ref:P,data:N})}),(0,t.jsx)(c.default,{size:{xs:12,md:4},children:(0,t.jsxs)(a.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",
8justifyContent:"space-between",gap:3},children:[(0,t.jsxs)(a.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,t.jsxs)(a.Box,{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:B("referrals.referralLink")}),(0,t.jsxs)(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.grey["500Channel"],.08),borderRadius:1,p:"8px 12px",gap:1},children:[(0,t.jsx)(o.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:I}),(0,t.jsx)(l.IconButton,{size:"small",onClick:()=>{navigator.clipboard.writeText(I),b.showToast.success({message:B("referrals.referralLinkCopied")})},sx:{p:.5,flexShrink:0,transition:"all 0.2s ease-in-out","&:hover":{color:"primary.main"}},children:(0,t.jsx)(h.Iconify,{width:16,height:16,icon:"solar:copy-outline",sx:{color:"text.secondary"}})})]})]}),(0,t.jsxs)(a.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,t.jsxs)(a.Box,{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:B("modals.editYourText")}),(0,t.jsx)(s.TextField,{fullWidth:!0,multiline:!0,rows:5,size:"medium",slotProps:{htmlInput:{spellCheck:"false"}},value:Q,onChange:e=>j(e.target.value),sx:{"& .MuiOutlinedInput-root":{padding:0,paddingBottom:"8px",backgroundColor:"grey.800",fontSize:"12px","& fieldset":{borderColor:"transparent"}},"& .MuiInputBase-input":{fontSize:"12px"}}})]}),!R.blankCard&&!R.competitionShare&&(0,t.jsxs)(a.Box,{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:B("modals.overlay")}),(0,t.jsx)(a.Box,{sx:{display:"flex",gap:1,flexWrap:"wrap",justifyContent:"left"},children:(C=R.isPositive,v.filter(e=>"none"===e.value||(C?"green"===e.type:"red"===e.type))).map(e=>{let r=L===e.value||"none"===e.value&&!L;return(0,t.jsxs)(a.Box,{onClick:()=>_("none"===e.value?null:e.value),sx:{width:40,height:40,borderRadius:1,backgroundColor:"grey.800",border:r?"2px solid":"1px solid",borderColor:r?"grey.600":"grey.800",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},title:e.label,children:["none"===e.value&&(0,t.jsx)(h.Iconify,{icon:"tabler:cancel",width:20,height:20,sx:{color:"text.secondary"}}),e.imagePath&&(0,t.jsx)(a.Box,{sx:{position:"relative",width:"100%",height:"100%"},children:(0,t.jsx)(g.default,{src:e.imagePath,alt:`${e.label} overlay preview`,fill:!0,style:{objectFit:"cover"}})})]},e.value)})})]})]})]}),(0,t.jsxs)(a.Box,{sx:{display:"flex",flexDirection:"row",gap:"8px",mt:"auto"},children:[(0,t.jsx)(m.ActionButton,{fullWidth:!0,variant:"contained",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",lineHeight:1,"& .MuiButton-startIcon":{margin:0,display:"inline-flex",alignItems:"center"}},startIcon:(0,t.jsx)(h.Iconify,{icon:"eva:download-outline",width:16,height:16}),color:"inherit",size:"medium",onClick:O,children:B("modals.saveImage")}),(0,t.jsx)(m.ActionButton,{fullWidth:!0,variant:"contained",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",lineHeight:1,"& .MuiButton-startIcon":{margin:0,display:"inline-flex",alignItems:"center"}},startIcon:(0,t.jsx)(h.Iconify,{icon:"eva:external-link-outline",width:16,height:16}),color:"inherit",size:"medium",onClick:e=>{e?.preventDefault(),e?.stopPropagation();try{let e=Q.trim()||M(R);e.length>280&&(e=e.substring(0,277)+"...");let t=new URLSearchParams;t.append("text",e);let r=`https://x.com/intent/tweet?${t.toString()}`;window.open(r,"_blank","noopener,noreferrer")||console.error("Failed to open Twitter/X window. Popup may be blocked.")}catch(e){console.error("Error sharing on X:",e)}},children:B("modals.shareOnX")})]})]})})]})})};function T(e){if(!e||!e.position)return null;let t=e.position,r=e.pnl??0,n=e.roi??0,i=e.instrumentName||t.instrument||"",a=e.entryPrice??parseFloat(t.entry_price||"0")??0,o=e.markPrice??0,s=e.leverage||t.leverage||"1x",A=e.isSpot??!1,l=o;if(0===l&&a>0&&t){let e=parseFloat(t.size||"0");l=0!==e?a+r/e:a}return{type:"position",instrumentName:i,pnl:r,isPositive:r>=0,roi:n,entryPrice:a,markPrice:l,leverage:s,isSpot:A}}
8function U(e){return e?.competitionShare?{type:"position",competitionShare:!0,competitionTitle:e.competitionTitle,rank:Number(e.rank??0),volume:e.volume??"0",rankDisplay:e.rankDisplay,volumeDisplay:e.volumeDisplay,instrumentName:"",pnl:0,isPositive:!0,roi:0,entryPrice:0,markPrice:0,leverage:"1x"}:null}function I(){return""}function Q(e){if(!e||!e.trade)return null;let t=e.trade,r=e.closedPnl??parseFloat(t.closed_pnl||"0")??0,n=e.instrumentName||t.instrument||"",i=e.direction||("b"===t.side?"Long":"Short"),a=e.leverage??1,o=a>1?`${i} ⢠${a}x`:i,s=e.price??parseFloat(t.price||"0")??0,A=parseFloat(t.start_price||"0");return{type:"trade-history",instrumentName:n,pnl:r,isPositive:r>=0,direction:o,price:s,roi:e.roi,entryPrice:A,markPrice:s}}function j(e,t){let r=e.instrumentName;e.instrumentName?.includes("-")&&(r=e.instrumentName.split("-")[0]),e.instrumentName?.includes("/")&&(r=e.instrumentName.split("/")[0]);let n=(0,u.formatNumber)(e.entryPrice??0,{decimals:2,useGrouping:!0}),i=(0,u.formatNumber)(e.roi??0,{decimals:2,suffix:"%",useGrouping:!1});return`${e.direction||"Long"} $${r} perp 9 10Entry: ${n} 11PnL: ${e.roi&&e.roi>=0?"+":""}${i} 12 13Trade $${r} perps on @tradehotstuff 14 15${t}`}e.s(["ShareCardModal",0,F],650599),e.s(["ShareCardModal",0,()=>{let e,i,a,o=(0,r.c)(7),s=(0,w.useTranslations)(),{payload:A}=(0,n.useActionStore)();o[0]!==A?(e=(e,t)=>{let r=e.instrumentName;e.instrumentName?.includes("-")&&(r=e.instrumentName.split("-")[0]),e.instrumentName?.includes("/")&&(r=e.instrumentName.split("/")[0]);let n=(0,u.formatNumber)(e.entryPrice??0,{decimals:2,useGrouping:!0}),i=(0,u.formatNumber)(e.roi??0,{decimals:2,suffix:"%",useGrouping:!1}),a=`PnL: ${e.roi&&e.roi>=0?"+":""}${i}`;if(e.isSpot)return`$${r} 16 17Entry: ${n} 18${a} 19 20Trade $${r} on @tradehotstuff 21 22${t}`;let o=A?.position,s=o?.position_side?.toUpperCase(),l="LONG"===("LONG"===s||"SHORT"===s?s:parseFloat(o?.size||"0")>=0?"LONG":"SHORT")?"Long":"Short";return`${l} $${r} perp 23 24Entry: ${n} 25${a} 26 27Trade $${r} perps on @tradehotstuff 28 29${t}`},o[0]=A,o[1]=e):e=o[1];let l=e;return o[2]!==s?(i=s("competitions.shareCardTitle"),o[2]=s,o[3]=i):i=o[3],o[4]!==l||o[5]!==i?(a=(0,t.jsx)(F,{modalKey:"share-card",title:i,extractData:T,generateShareText:l}),o[4]=l,o[5]=i,o[6]=a):a=o[6],a}],759940),e.s(["CompetitionShareCardModal",0,()=>{let e,i,a=(0,r.c)(4),o=(0,w.useTranslations)();return(0,n.useActionStore)(),a[0]!==o?(e=o("competitions.shareCardTitle"),a[0]=o,a[1]=e):e=a[1],a[2]!==e?(i=(0,t.jsx)(F,{modalKey:"competition-share-card",title:e,extractData:U,generateShareText:I}),a[2]=e,a[3]=i):i=a[3],i}],501024),e.s(["TradeHistoryShareCardModal",0,()=>{let e,n,i=(0,r.c)(4),a=(0,w.useTranslations)();return i[0]!==a?(e=a("competitions.shareCardTitle"),i[0]=a,i[1]=e):e=i[1],i[2]!==e?(n=(0,t.jsx)(F,{modalKey:"trade-history-share-card",title:e,extractData:Q,generateShareText:j}),i[2]=e,i[3]=n):n=i[3],n}],187847);var L=e.i(397837),_=e.i(285317);e.s(["WhitelistModal",0,()=>{let e,i,s,A,l,c,u,h,p,m,f,g,y,b,x,v,C,B=(0,r.c)(36),S=(0,w.useTranslations)(),{setModal:k}=(0,n.useActionStore)();B[0]===Symbol.for("react.memo_cache_sentinel")?(e={src:"/assets/loader.riv",autoplay:!0},B[0]=e):e=B[0];let{RiveComponent:E}=(0,_.useRive)(e);return B[1]!==S?(i=S("modals.accessRestricted"),B[1]=S,B[2]=i):i=B[2],B[3]===Symbol.for("react.memo_cache_sentinel")?(s={width:"96px",height:"96px",alignSelf:"center",mb:"-8px",mt:"-8px"},B[3]=s):s=B[3],B[4]===Symbol.for("react.memo_cache_sentinel")?(A={width:"100%",height:"100%"},B[4]=A):A=B[4],B[5]!==E?(l=(0,t.jsx)(a.Box,{sx:s,children:(0,t.jsx)(E,{style:A})}),B[5]=E,B[6]=l):l=B[6],B[7]!==S?(c=S("modals.walletNotWhitelisted"),B[7]=S,B[8]=c):c=B[8],B[9]!==c?(u=(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",lineHeight:"16px",children:c}),B[9]=c,B[10]=u):u=B[10],B[11]===Symbol.for("react.memo_cache_sentinel")?(h={display:"flex",gap:"8px"},B[11]=h):h=B[11],B[12]!==k?(p=()=>k("connect-wallet"),B[12]=k,B[13]=p):p=B[13],B[14]!==S?(m=S("modals.connectNewWallet"),B[14]=S,B[15]=m):m=B[15],B[16]!==p||B[17]!==m?(f=(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",size:"large",onClick:p,children:m}),B[16]=p,B[17]=m,B[18]=f):f=B[18],B[19]!==k?(g=()=>{k(null),window.open("https://discord.com/invite/tradehotstuff","_blank")},B[19]=k,B[20]=g):g=B[20],B[21]!==S?(y=S("modals.joinWaitlist"),B[21]=S,B[22]=y):y=B[22],B[23]!==g||B[24]!==y?(b=(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:g,children:y}),B[23]=g,B[24]=y,B[25]=b):b=B[25],B[26]!==f||B[27]!==b?(x=(0,t.jsxs)(a.Box,{sx:h,children:[f,b]}),B[26]=f,B[27]=b,B[28]=x):x=B[28],B[29]!==x||B[30]!==l||B[31]!==u?(v=(0,t.jsxs)(t.Fragment,{children:[l,u,x]}),B[29]=x,B[30]=l,B[31]=u,B[32]=v):v=B[32],B[33]!==i||B[34]!==v?(C=(0,t.jsx)(d.ModalBox,{title:i,active:"whitelist",children:v}),B[33]=i,B[34]=v,B[35]=C):C=B[35],C}],494999);var P=e.i(302682),D=e.i(166107),R=e.i(126996),M=e.i(346944),O=e.i(591647),N=e.i(942290),H=e.i(143813);e.s(["CloseAllPositionsModal",0,()=>{let e=(0,w.useTranslations)(),[r,s]=(0,i.useState)("market"),[A,l]=(0,i.useState)(!1),{placeOrders:c}=(0,R.useTradeActions)(),{setModal:h}=(0,n.useActionStore)(),{updatePendingStatusOrders:p}=(0,n.useUserTradingDataStore)((0,M.useShallow)(e=>({updatePendingStatusOrders:e.updatePendingStatusOrders}))),m=(0,n.useUserTradingDataStore)(e=>e.positions),f=(0,n.useTradingPreferencesStore)(e=>e.maxSlippage),{tickers:g,instruments:y}=(0,n.useTradingDataStore)((0,M.useShallow)(e=>({tickers:e.tickers,instruments:e.instruments}))),x=async()=>
29{if(A)return;let t=Object.values(m);if(0===t.length)return void b.showToast.error({message:"No positions to close"});l(!0);try{let n=t.map(e=>{let t,n=y[e.instrument],i=g[e.instrument];if(!n||!i)return null;let a=parseFloat(e.size);if(0===a)return null;let o=a>0?"s":"b",s=Math.abs(a),A=(0,u.formatNumber)(s,{useContractSize:!0,instrument_name:e.instrument,useGrouping:!1,preserveDecimalString:!0});if("market"===r)t=(0,O.getLimitPriceMarket)(i,e.instrument,o,f,n.kind);else{let e=(0,H.getReferencePrice)(i,n.kind);t=i.mid_price||(i.best_bid_price&&i.best_ask_price?((parseFloat(i.best_bid_price)+parseFloat(i.best_ask_price))/2).toString():e>0?String(e):"0")}let l=(0,u.formatNumber)(t,{useTickSize:!0,instrument_name:e.instrument,useGrouping:!1,preserveDecimalString:!0}),c=crypto.randomUUID();return{instrumentId:n.id,side:o,positionSide:"BOTH",price:l,size:A,tif:"market"===r?"IOC":"GTC",ro:!0,po:!1,cloid:c,triggerPx:"",isMarket:"market"===r,tpsl:"",grouping:""}}).filter(e=>null!==e);if(0===n.length){b.showToast.error({message:"No valid positions to close"}),l(!1);return}p(n.map(e=>e.cloid));let i=await c(n);if(l(!1),i.success)b.showToast.success({message:"market"===r?e("modals.closedAllAtMarket"):e("modals.closedAllAtMid")}),h(null);else{let e=(0,N.getErrorMessage)(i.error),t=(0,N.getErrorOverride)(e??"");b.showToast.error({message:"Failed to close all positions",...t?{description:t}:{}});return}}catch(r){let e=(0,N.getErrorMessage)(r),t=(0,N.getErrorOverride)(e??"");b.showToast.error({message:"Failed to close all positions",...t?{description:t}:{}})}finally{l(!1)}};return(0,t.jsxs)(d.ModalBox,{title:"Confirm Close All",active:"close-all-positions",maxWidth:"sm",sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",lineHeight:"16px",children:"This will close all your positions and cancel their associated TP/SL orders."}),(0,t.jsxs)(a.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[(0,t.jsx)(P.FormControlLabel,{control:(0,t.jsx)(D.Checkbox,{color:"default",size:"small",checked:"market"===r,onChange:()=>s("market")}),label:"Market Close",sx:{color:"white"}}),(0,t.jsx)(P.FormControlLabel,{control:(0,t.jsx)(D.Checkbox,{color:"default",size:"small",checked:"limit"===r,onChange:()=>s("limit")}),label:"Limit Close at Mid Price",sx:{color:"white"}})]}),(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:x,disabled:A,children:A?"Closing...":"market"===r?"Confirm Market Close":"Confirm Limit Close at Mid"})]})}],956799);var V=e.i(982615),K=e.i(973134),G=e.i(278095),W=e.i(736837);e.i(849387);var z=e.i(727726),$=e.i(700756);let q=e=>{let n,i,s,A,l,c,d,u,p,m,f=(0,r.c)(23),{qrDataUrl:g,showQr:b,holdProgress:x,onHoldStart:v,onHoldEnd:C,isHolding:B}=e,S=(0,w.useTranslations)();return f[0]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",flexDirection:"column",gap:2,alignItems:"center"},f[0]=n):n=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(i={marginBottom:"16px"},f[1]=i):i=f[1],f[2]!==S?(s=S("modals.qrInstructions",{host:y()}),f[2]=S,f[3]=s):s=f[3],f[4]!==s?(A=(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",textAlign:"center",sx:i,children:s}),f[4]=s,f[5]=A):A=f[5],f[6]!==x||f[7]!==B||f[8]!==C||f[9]!==v||f[10]!==g||f[11]!==b?(l=b&&x>=100?(0,t.jsx)(Y,{qrDataUrl:g}):(0,t.jsx)(X,{holdProgress:x,onHoldStart:v,onHoldEnd:C,isHolding:B}),f[6]=x,f[7]=B,f[8]=C,f[9]=v,f[10]=g,f[11]=b,f[12]=l):l=f[12],f[13]===Symbol.for("react.memo_cache_sentinel")?(c={backgroundColor:J,display:"flex",borderRadius:.75,alignItems:"center",gap:1},f[13]=c):c=f[13],f[14]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),f[14]=d):d=f[14],f[15]!==S?(u=S("modals.qrSecurityWarning"),f[15]=S,f[16]=u):u=f[16],f[17]!==u?(p=(0,t.jsxs)(a.Box,{px:1,py:.75,sx:c,children:[d,(0,t.jsx)(o.Typography,{variant:"body1",color:"secondary.light",children:u})]}),f[17]=u,f[18]=p):p=f[18],f[19]!==A||f[20]!==l||f[21]!==p?(m=(0,t.jsxs)(a.Box,{sx:n,children:[A,l,p]}),f[19]=A,f[20]=l,f[21]=p,f[22]=m):m=f[22],m},X=e=>{let n,i,o,s,A,l,c,d=(0,r.c)(15),{holdProgress:u,onHoldStart:h,onHoldEnd:p,isHolding:m}=e,f=(0,w.useTranslations)();d[0]===Symbol.for("react.memo_cache_sentinel")?(n={position:"relative",alignSelf:"center",height:"20px",width:"20px"},d[0]=n):n=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)($.CircularProgress,{variant:"determinate",value:100,size:20,thickness:6,sx:{color:"common.white",position:"absolute",top:0,left:0}}),d[1]=i):i=d[1];let g=m?"primary.darker":"primary.light";return d[2]===Symbol.for("react.memo_cache_sentinel")?(o={transition:"stroke-dashoffset 60ms linear"},d[2]=o):o=d[2],d[3]!==g?(s={color:g,position:"absolute",top:0,left:0,"& .MuiCircularProgress-circle":o},d[3]=g,d[4]=s):s=d[4],d[5]!==u||d[6]!==s?(A=(0,t.jsxs)(a.Box,{sx:n,children:[i,(0,t.jsx)($.CircularProgress,{variant:"determinate",value:u,size:20,thickness:6,sx:s})]}),d[5]=u,d[6]=s,d[7]=A):A=d[7],d[8]!==f?(l=f("modals.holdToReveal"),d[8]=f,d[9]=l):l=d[9],d[10]!==p||d[11]!==h||d[12]!==A||d[13]!==l?(c=(0,t.jsx)(L.Button,{variant:"contained",color:"primary",size:"large",fullWidth:!0,onMouseDown:h,onMouseUp:p,onMouseLeave:p,onTouchStart:h,onTouchEnd:p,startIcon:A,children:l}),d[10]=p,d[11]=h,d[12]=A,d[13]=l,d[14]=c):c=d[14],c},Y=e=>{let n,i,o,s=(0,r.c)(6),{qrDataUrl:A}=e,l=(0,w.useTranslations)();return s[0]!==l?(n=l("modals.scanQrToLink"),s[0]=l,s[1]=n):n=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i={width:240,height:240,alignSelf:"center",borderRadius:2,backgroundColor:"common.white"},s[2]=i):i=s[2],s[3]!==A||s[4]!==n?(o=(0,t.jsx)(a.Box,{component:"img",src:A,alt:n,sx:i}),s[3]=A,s[4]=n,s[5]=o):o=s[5],o};function J(e){return(0,f.varAlpha)(e.vars.palette.error.mainChannel,.12)}let Z=e=>{let n,i,s,A,l,c,d,u=(0,r.c)(12),{RiveComponent:h}=e,p=(0,w.useTranslations)();return u[0]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",flexDirection:"column",gap:1,alignItems:"center"},u[0]=n):n=u[0],u[1]===Symbol.for("react.memo_cache_sentinel")?(i={width:96,height:96,alignSelf:"center",mb:"-8px",mt:"-8px"},u[1]=i):i=u[1],u[2]===Symbol.for("react.memo_cache_sentinel")?(s={width:"100%",height:"100%"},u[2]=s):s=u[2],u[3]!==h?(A=(0,t.jsx)(a.Box,{sx:i,children:(0,t.jsx)(h,{style:s})}),u[3]=h,u[4]=A):A=u[4],u[5]!==p?(l=p("modals.qrApproveLoading"),u[5]=p,u[6]=l):l=u[6],u[7]!==l?(c=(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",textAlign:"center",children:l}),u[7]=l,u[8]=c):c=u[8],u[9]!==A||u[10]!==c?(d=(0,t.jsxs)(a.Box,{sx:n,children:[A,c]}),u[9]=A,u[10]=c,u[11]=d):d=u[11],d};var ee=e.i(120785);e.s(["QRWalletModal",0,()=>{let e=(0,w.useTranslations)(),{address:r,isConnected:a}=(0,V.useAccount)(),{authenticated:o}=(0,ee.usePrivy)(),{master:s,activeVault:A}=(0,n.useAuthStore)(),{addAgent:l}=(0,z.useAccountActions)(),c=(0,i.useRef)(!1),u=(0,i.useRef)(null),h=(0,i.useRef)(0),[p,m]=(0,i.useState)(null),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(0),[x,v]=(0,i.useState)(!1),{setModal:C}=(0,n.useActionStore)(),{RiveComponent:B}=(0,_.useRive)({src:"/assets/loader.riv",autoplay:!0});return(0,i.useEffect)(()=>{c.current||(c.current=!0,(async()=>{try{if((!a||!r)&&!o)return void console.warn("QR wallet signing skipped: no connected wallet detected.");let e=(0,G.generatePrivateKey)(),t=(0,W.privateKeyToAccount)(e),n="qr-code",i=Date.now()+15552e6;try{let a=await l(n,t.address,e,"0x0000000000000000000000000000000000000000"===A?"":A,i,s||r,!0,{skipToast:!0,context:{source:"qr"}});if(!a.success){console.error("QR agent creation failed:",a.error),C(null);return}}catch(e){console.error("QR agent creation failed:",e),C(null)}let c={signer:r,agent:{name:n,address:t.address,privateKey:e}},d=JSON.stringify(c),u=window.btoa(unescape(encodeURIComponent(d))),h=`${window.location.origin}?link=${encodeURIComponent(u)}`,p=await (0,K.toDataURL)(h);m(p)}catch(e){c.current=!1,console.error("QR wallet signature failed",e)}})())},[r,a]),(0,i.useEffect)(()=>()=>{u.current&&clearInterval(u.current)},[]),(0,t.jsx)(d.ModalBox,{title:e("modals.linkMobileDevice"),active:"qr-wallet",children:p?(0,t.jsx)(q,{qrDataUrl:p,showQr:f,holdProgress:y,onHoldStart:()=>{p&&!f&&(h.current=Date.now(),v(!0),b(0),u.current=setInterval(()=>{let e=Math.min(100,(Date.now()-h.current)/2e3*100);if(b(e),e>=100&&u.current){clearInterval(u.current),u.current=null,g(!0),b(100),v(!1);return}},30))},onHoldEnd:()=>{u.current&&(clearInterval(u.current),u.current=null),v(!1),f||b(0)},isHolding:x}):(0,t.jsx)(Z,{RiveComponent:B})})}],447540);var et=e.i(131731),er=e.i(542328);class en{constructor(e,t,r,n,i){this._legacyCanvasSize=en.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),r&&"object"==typeof r?this._onDecode=t:(r||n||i?console.warn("You're using a deprecated version of the QrScanner constructor which will be removed in the future"):console.warn("Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=t),t="object"==typeof r?r:{},this._onDecodeError=t.onDecodeError||("function"==typeof r?r:this._onDecodeError),this._calculateScanRegion=t.calculateScanRegion||("function"==typeof n?n:this._calculateScanRegion),this._preferredCamera=t.preferredCamera||i||this._preferredCamera,this._legacyCanvasSize="number"==typeof r?r:"number"==typeof n?n:this._legacyCanvasSize,this._maxScansPerSecond=t.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInl
29ine=!0,e.muted=!0;let a=!1;if(e.hidden&&(e.hidden=!1,a=!0),document.body.contains(e)||(document.body.appendChild(e),a=!0),r=e.parentElement,t.highlightScanRegion||t.highlightCodeOutline){if(n=!!t.overlay,this.$overlay=t.overlay||document.createElement("div"),(i=this.$overlay.style).position="absolute",i.display="none",i.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!n&&t.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch(e){}r.insertBefore(this.$overlay,this.$video.nextSibling)}t.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let t=window.getComputedStyle(e);"none"===t.display&&(e.style.setProperty("display","block","important"),a=!0),"visible"!==t.visibility&&(e.style.setProperty("visibility","visible","important"),a=!0),a&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=en.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await en.listCameras(!1)).length}catch(e){return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let t=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(e=>"videoinput"===e.kind),r;try{e&&(await t()).every(e=>!e.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch(e){}try{return(await t()).map((e,t)=>({id:e.deviceId,label:e.label||(0===t?"Default Camera":`Camera ${t+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),en._stopVideoStream(r))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch(e){return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),en._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),en._postWorkerMessage(this._qrEnginePromise,"close")}
29async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&("https:"!==window.location.protocol&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:t}=await this._getCameraStream();!this._active||this._paused?en._stopVideoStream(e):(this._setVideoMirror(t),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let t=()=>{this.$video.srcObject instanceof MediaStream&&(en._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(t(),!0):(await new Promise(e=>setTimeout(e,300)),!!this._paused&&(t(),!0))}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,t,r,n,i=!1,a=!1){let o,s=!1;t&&("scanRegion"in t||"qrEngine"in t||"canvas"in t||"disallowCanvasResizing"in t||"alsoTryWithoutScanRegion"in t||"returnDetailedScanResult"in t)?(o=t.scanRegion,r=t.qrEngine,n=t.canvas,i=t.disallowCanvasResizing||!1,a=t.alsoTryWithoutScanRegion||!1,s=!0):t||r||n||i||a?console.warn("You're using a deprecated api for scanImage which will be removed in the future."):console.warn("Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),t=!!r;try{let A,l,c;if([r,A]=await Promise.all([r||en.createQrEngine(),en._loadImage(e)]),[n,l]=en._drawToCanvas(A,o,n,i),r instanceof Worker){let e=r;t||en._postWorkerMessageSync(e,"inversionMode","both"),c=await new Promise((t,r)=>{let i,a,s,A=-1;a=n=>{n.data.id===A&&(e.removeEventListener("message",a),e.removeEventListener("error",s),clearTimeout(i),null!==n.data.data?t({data:n.data.data,cornerPoints:en._convertPoints(n.data.cornerPoints,o)}):r(en.NO_QR_CODE_FOUND))},s=t=>{e.removeEventListener("message",a),e.removeEventListener("error",s),clearTimeout(i),r("Scanner error: "+(t?t.message||t:"Unknown Error"))},e.addEventListener("message",a),e.addEventListener("error",s),i=setTimeout(()=>s("timeout"),1e4);let c=l.getImageData(0,0,n.width,n.height);A=en._postWorkerMessageSync(e,"decode",c,[c.data.buffer])})}else c=await Promise.race([new Promise((e,t)=>window.setTimeout(()=>t("Scanner error: timeout"),1e4)),(async()=>{try{var[t]=await r.detect(n);if(!t)throw en.NO_QR_CODE_FOUND;return{data:t.rawValue,cornerPoints:en._convertPoints(t.cornerPoints,o)}}catch(r){if(t=r.message||r,/not implemented|service unavailable/.test(t))return en._disableBarcodeDetector=!0,en.scanImage(e,{scanRegion:o,canvas:n,disallowCanvasResizing:i,alsoTryWithoutScanRegion:a});throw`Scanner error: ${t}`}})()]);return s?c:c.data}catch(A){if(!o||!a)throw A;let t=await en.scanImage(e,{qrEngine:r,canvas:n,disallowCanvasResizing:i});return s?t:t.data}finally{t||en._postWorkerMessage(r,"close")}}setGrayscaleWeights(e,t,r,n=!0){en._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:t,blue:r,useIntegerApproximation:n})}setInversionMode(e){en._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(t){if(t&&console.warn("Specifying a worker path is not required and not supported anymore."),t=()=>e.A(618302).then(e=>e.createWorker()),!(!en._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return t();let r=navigator.userAgentData;return r&&r.brands.some(({brand:e})=>/Chromium/i.test(e))&&/mac ?OS/i.test(r.platform)&&await r.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:e,platformVersion:t})=>/arm/i.test(e||"arm")&&13<=parseInt(t||"13")).catch(()=>!0)?t():new BarcodeDetector({formats:["qr_code"]}
29)}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let t=Math.round(2/3*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-t)/2),y:Math.round((e.videoHeight-t)/2),width:t,height:t,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,t=e.videoWidth,r=e.videoHeight,n=e.offsetWidth,i=e.offsetHeight,a=e.offsetLeft,o=e.offsetTop,s=window.getComputedStyle(e),A=s.objectFit,l=t/r,c=n/i;switch(A){case"none":var d=t,u=r;break;case"fill":d=n,u=i;break;default:("cover"===A?l>c:l<c)?d=(u=i)*l:u=(d=n)/l,"scale-down"===A&&(d=Math.min(d,t),u=Math.min(u,r))}var[h,p]=s.objectPosition.split(" ").map((e,t)=>{let r=parseFloat(e);return e.endsWith("%")?(t?i-u:n-d)*r/100:r});s=this._scanRegion.width||t,c=this._scanRegion.height||r,A=this._scanRegion.x||0;var m=this._scanRegion.y||0;(l=this.$overlay.style).width=`${s/t*d}px`,l.height=`${c/r*u}px`,l.top=`${o+p+m/r*u}px`,r=/scaleX\(-1\)/.test(e.style.transform),l.left=`${a+(r?n-h-d:h)+(r?t-A-s:A)/t*d}px`,l.transform=e.style.transform}})}static _convertPoints(e,t){if(!t)return e;let r=t.x||0,n=t.y||0,i=t.width&&t.downScaledWidth?t.width/t.downScaledWidth:1;for(let a of(t=t.height&&t.downScaledHeight?t.height/t.downScaledHeight:1,e))a.x=a.x*i+r,a.y=a.y*t+n;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,t=1e3/this._maxScansPerSecond;e<t&&await new Promise(r=>setTimeout(r,t-e)),this._lastScanTimestamp=Date.now();try{var r=await en.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(e){if(!this._active)return;this._onDecodeError(e)}!en._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=en.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:e,y:t})=>`${e},${t}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==en.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",t=[{width:{min:1024}},{width:{min:768}},{}];for(let r of[...t.map(t=>Object.assign({},t,{[e]:{exact:this._preferredCamera}})),...t])try{let e=await navigator.mediaDevices.getUserMedia({video:r,audio:!1}),t=this._getFacingMode(e)||(r.facingMode?this._preferredCamera:"environment"===this._preferredCamera?"user":"environment");return{stream:e,facingMode:t}}catch(e){}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let t of e.getTracks())t.stop(),e.removeTrack(t)}_setVideoMirror(e){this.$video.style.transform="scaleX("+("user"===e?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,t,r,n=!1){r=r||document.createElement("canvas");let i=t&&t.x?t.x:0,a=t&&t.y?t.y:0,o=t&&t.width?t.width:e.videoWidth||e.width,s=t&&t.height?t.height:e.videoHeight||e.height;return n||(n=t&&t.downScaledWidth?t.downScaledWidth:o,t=t&&t.downScaledHeight?t.downScaledHeight:s,r.width!==n&&(r.width=n),r.height!==t&&(r.height=t)),(t=r.getContext("2d",{alpha:!1})).imageSmoothingEnabled=!1,t.drawImage(e,i,a,o,s,0,0,r.width,r.height),[r,t]}static async _loadImage(e){if(e instanceof Image)return await en._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||"string"==typeof e){let t=new Image;t.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await en._awaitImageLoad(t),t}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(t.src)}}throw"Unsupported image type."}
29static async _awaitImageLoad(e){e.complete&&0!==e.naturalWidth||await new Promise((t,r)=>{let n=i=>{e.removeEventListener("load",n),e.removeEventListener("error",n),i instanceof ErrorEvent?r("Image load error"):t()};e.addEventListener("load",n),e.addEventListener("error",n)})}static async _postWorkerMessage(e,t,r,n){return en._postWorkerMessageSync(await e,t,r,n)}static _postWorkerMessageSync(e,t,r,n){if(!(e instanceof Worker))return -1;let i=en._workerMessageId++;return e.postMessage({id:i,type:t,data:r},n),i}}en.DEFAULT_CANVAS_SIZE=400,en.NO_QR_CODE_FOUND="No QR code found",en._disableBarcodeDetector=!1,en._workerMessageId=0,e.s(["QrScanModal",0,()=>{let e=(0,w.useTranslations)(),{modal:r,setModal:s}=(0,n.useActionStore)(),{setAddress:A,setMaster:c,setAgent:d,setStatus:u}=(0,n.useAuthStore)(),{RiveComponent:h}=(0,_.useRive)({src:"/assets/loader.riv",autoplay:!0}),p=(0,i.useRef)(null),m=(0,i.useRef)(null),[f,g]=(0,i.useState)(null),[y,b]=(0,i.useState)(!1),x=(0,i.useCallback)(()=>{m.current&&(m.current.stop(),m.current.destroy(),m.current=null),p.current&&(p.current.srcObject=null),b(!1)},[]),v=(0,i.useCallback)(async t=>{x();let r=(0,er.extractLinkParam)(t),{success:n,error:i}=await (0,er.recoverFromQrPayload)(r,{setAddress:A,setMaster:c,setAgent:d,setStatus:u,setModal:s});n||g(e("modals.qrScan.qrError"))},[A,d,c,s,u,x]),C=(0,i.useCallback)(async()=>{if(g(null),b(!1),p.current)try{m.current&&(await m.current.stop(),m.current.destroy(),m.current=null),p.current&&(p.current.srcObject=null),m.current=function({videoEl:e,onResult:t,onError:r,onDetectingChange:n}){if(void 0!==window.BarcodeDetector){let{BarcodeDetector:r}=window,i=new r({formats:["qr_code"]}),a=null,o=null,s=async()=>{o&&(cancelAnimationFrame(o),o=null),a&&(a.getTracks().forEach(e=>e.stop()),a=null),n(!1)};return{start:async()=>{i||(i=new r({formats:["qr_code"]}));try{e.srcObject=a=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"},audio:!1}),await e.play(),n(!0);let r=async()=>{if(i){try{let r=(await i.detect(e)).find(e=>e.rawValue);if(r?.rawValue){await s(),t(r.rawValue);return}}catch(e){console.error("Native QR detect error",e)}o=requestAnimationFrame(r)}};o=requestAnimationFrame(r)}catch(e){throw console.error("Native QR start failed",e),await s(),e}},stop:s,destroy:()=>{i=null}}}let i=null,a=async()=>{i&&await i.stop(),n(!1)};return{start:async()=>{try{i=new en(e,e=>{e?.data&&a().finally(()=>t(e.data))},{preferredCamera:"environment",returnDetailedScanResult:!0}),await i.start(),n(!0)}catch(e){throw console.error("QR scan start failed",e),await a(),e}},stop:a,destroy:()=>{i&&(i.destroy(),i=null)}}}({videoEl:p.current,onResult:v,onError:()=>{},onDetectingChange:e=>b(e)}),b(!0),await m.current.start()}catch(t){console.error("QR scan start failed",t),g(e("modals.qrScan.cameraError")),m.current&&(await m.current.stop(),m.current.destroy(),m.current=null),p.current&&(p.current.srcObject=null),b(!1)}},[v]);return(0,i.useEffect)(()=>("qr-scan"===r&&setTimeout(()=>{C()},0),()=>{x()}),[r,C,x]),(0,t.jsxs)(et.SwipeableDrawer,{anchor:"bottom",open:"qr-scan"===r,onOpen:()=>C(),onClose:()=>{x(),s(null)},disableDiscovery:!0,PaperProps:{sx:{borderTopLeftRadius:16,borderTopRightRadius:16,backgroundColor:"background.default",pb:3}},children:[(0,t.jsxs)(a.Box,{sx:{p:2,pb:1,display:"flex",alignItems:"center"},children:[(0,t.jsx)(o.Typography,{variant:"h6",sx:{flex:1},children:e("modals.qrScan.title")}),(0,t.jsx)(l.IconButton,{onClick:()=>{x(),s(null)},size:"small"})]}),(0,t.jsx)(a.Box,{sx:{px:2,pb:2},children:(0,t.jsx)(o.Typography,{variant:"body2",color:"textSecondary",children:e("modals.qrScan.description")})}),(0,t.jsx)(a.Box,{sx:{px:2,pb:2},children:(0,t.jsxs)(a.Box,{sx:{position:"relative",width:"100%",overflow:"hidden",borderRadius:12,backgroundColor:"black",aspectRatio:"3 / 4"},children:[(0,t.jsx)("video",{ref:p,style:{width:"100%",height:"100%",objectFit:"cover"},muted:!0,playsInline:!0}),!y&&(0,t.jsx)(a.Box,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(180deg, rgba(0,0,0,0.6), rgba(0,0,0,0.8))"},children:(0,t.jsx)(a.Box,{sx:{width:96,height:96},children:(0,t.jsx)(h,{style:{width:"100%",height:"100%"}})})})]})}),f&&(0,t.jsx)(a.Box,{sx:{px:2,pb:1},children:(0,t.jsx)(o.Typography,{variant:"body2",color:"error",children:f})})]})}],266805);var ei=e.i(525836),ea=e.i(990577),eo=e.i(816790);e.i(929009);var es=e.i(487251),eA=e.i(818279);e.s(["SetReferrerModal",0,()=>{let e=(0,w.useTranslations)(),{isLoading:r,setLoading:s,setModal:A}=(0,n.useActionStore)(),{address:l,userMetadata:c,setUserMetadata:u}=(0,n.useAuthStore)(),p=(0,n.useUserTradingDataStore)(e=>e.accountSummary),m=(0,n.useUserTradingDataStore)(e=>e.referralSummary[l]),{fetchReferralSummary:g}=(0,es.useReferralSummary)(),{modal:y}=(0,n.useActionStore)(),[b,x]=(0,i.useState)(""),v=b.trim(),C=c?.[l],B=C?.is_whitelisted===!0,{setReferrer:S}=(0,z.useAccountActions)(),k=l&&m?.referrer_code,E=(0,i.useRef)(null);(0,i.useEffect)(()=>{"set-referrer"===y&&E.current&&E.current.focus()},[y,E]);let F=async()=>{s(!0);try{let e=await (0,eA.submitReferralCode)(l,v,"","","","");u(l,e),e.is_whitelisted&&((e,t)=>{if(t&&e)try{let r=JSON.parse(localStorage.getItem("pendingReferralCodes")||"{}");r[e]=t,localStorage.setItem("pendingReferralCodes",JSON.stringify(r))}catch(e){console.error("Error saving pending referral code:",e)}})(l,v),A(null)}catch(e){console.error("Whitelist user failed:",e)}finally{s(!1)}},T=async()=>
29{if(!B)return void F();s(!0);try{await S(v),A(null)}catch(e){console.error("Set referrer failed:",e)}finally{s(!1),setTimeout(()=>{g(l)},1500)}},[U,I]=(0,i.useState)(null),[Q,j]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{""!==k?I(e("referrals.cannotChangeCode")):Q&&""===v?I(e("modals.referrerIsRequired")):p.total_volume>eo.SET_REFERRER_THRESHOLD?I(e("referrals.volumeTooHigh")):I(null)},[b,Q,p.total_volume,k]),(0,t.jsx)(d.ModalBox,{title:B?""!==k?e("modals.usingReferralCode"):e("modals.useReferralCode"):"Join Hotstuff",active:"set-referrer",disableClose:r,children:""!==k?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("referrals.usingCode")}),(0,t.jsx)(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.grey["500Channel"],.08),borderRadius:1,px:1,py:1,gap:1},children:(0,t.jsx)(o.Typography,{variant:"h5",sx:{fontFamily:"monospace",letterSpacing:"0.05em",color:"primary.main",fontWeight:600},children:k})})]}),(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:()=>A(null),disableRipple:!0,children:e("common.close")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Box,{children:[B?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"Enter a referral code to link your account. This cannot be changed later."}),(0,t.jsx)(o.Typography,{variant:"body2",color:"text.secondary",mb:1,component:"div",children:"Referral code"})]}):(0,t.jsx)(o.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"A referral code is required to access Hotstuff."}),(0,t.jsx)(ei.default,{ref:E,fullWidth:!0,placeholder:"Referral code",value:b,onChange:e=>{x(e.target.value)},onBlur:()=>j(!0),type:"text",inputProps:{"aria-label":"Referral code"}})]}),U&&(0,t.jsxs)(a.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(o.Typography,{variant:"body1",color:"secondary.light",children:U})]}),(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",sx:{mt:.5},color:"primary",size:"large",onClick:T,disableRipple:!0,loading:r,disabled:null!==U||r||!v,children:r?e("common.confirming"):B?e("modals.setReferrer"):"Continue"}),B?null:(0,t.jsxs)(o.Typography,{variant:"caption",component:"div",color:"text.secondary",sx:{mt:-1,textAlign:"center",display:"block",lineHeight:1.5,opacity:.85},children:["Don't have a code? ",(0,t.jsx)(ea.Link,{href:"https://discord.gg/tradehotstuff",target:"_blank",rel:"noopener noreferrer",underline:"hover",color:"primary.light",children:"Join Discord"})," to get one."]})]})})}],884181),e.s(["CreateReferralCodeModal",0,()=>{let e=(0,w.useTranslations)(),{isLoading:r,setLoading:s,setModal:A}=(0,n.useActionStore)(),{address:c}=(0,n.useAuthStore)(),u=(0,n.useUserTradingDataStore)(e=>e.referralSummary[c]),p=(0,n.useUserTradingDataStore)(e=>e.accountSummary),{fetchReferralSummary:m}=(0,es.useReferralSummary)(),[g,y]=(0,i.useState)(""),{createReferralCode:x}=(0,z.useAccountActions)(),v=c&&u?.codes?.[0],C=()=>{v&&(navigator.clipboard.writeText(v),b.showToast.success({message:e("referrals.referralCodeCopied")}))},B=async()=>{if(!u?.is_affiliate&&p.total_volume<=1e4)return void k(e("referrals.volumeRequired"));s(!0);try{await x(g),A(null)}catch(e){console.error("Create referral code failed:",e)}finally{s(!1),setTimeout(()=>{m(c)},1500)}},[S,k]=(0,i.useState)(null),[E,F]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{v?k(null):E&&""===g?k(e("referrals.codeRequired")):!u?.is_affiliate&&p.total_volume<=eo.REFERRAL_THRESHOLD?k(e("referrals.volumeRequired")):k(null)},[g,E,p.total_volume,v]),(0,t.jsx)(d.ModalBox,{title:v?e("referrals.yourReferralCode"):e("referrals.createReferralCode"),active:"create-referral-code",disableClose:r,children:v?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("referrals.yourCode")}),(0,t.jsxs)(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.grey["500Channel"],.08),borderRadius:1,px:2,py:1.5,gap:1},children:[(0,t.jsx)(o.Typography,{variant:"h6",sx:{fontFamily:"monospace",letterSpacing:"0.05em",color:"text.primary"},children:v}),(0,t.jsx)(l.IconButton,{size:"small",onClick:C,sx:{p:.5,transition:"all 0.2s ease-in-out","&:hover":{color:"primary.main",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.primary.mainChannel,.08)}},children:(0,t.jsx)(h.Iconify,{width:20,height:20,icon:"solar:copy-outline",sx:{color:"text.secondary"}})})]})]}),(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:C,disableRipple:!0,children:e("referrals.copyReferralCode")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{style:{display:"flex",justifyContent:"space-between"},children:(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:e("modals.enterCode")})}),(0,t.jsx)(ei.default,{fullWidth:!0,value:g,onChange:e=>{y(e.target.value)},onBlur:()=>F(!0),type:"text"})]}),S&&(0,t.jsxs)(a.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(o.Typography,{variant:"body1",color:"secondary.light",children:S})]}),(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:B,disableRipple:!0,loading:r,disabled:null!==S||r||!g,children:r?e("common.confirming"):e("referrals.createReferralCode")})]})})}],869952);var el=e.i(917098),ec=e.i(111635),ed=e.i(485683),eu=e.i(242405);e.i(842917);var eh=e.i(68043),ep=e.i(465914),em=e.i(112985);let ef=({card:e})=>{let r=(0,w.useTranslations)(),n=(0,eu.default)("(max-width: 600px)"),i=(0,em.getTierName)(r,e.tier),s=-1===e.tier.id?n?"/imgs/svg/expedition/mainnet/testnet_og_sm.png":"/imgs/svg/expedition/mainnet/testnet_og_lg.png":e.tier.badgeIcon;return(0,t.jsx)(a.Box,{sx:{position:"relative",width:"100%",borderRadius:1.5,padding:"2px",background:e.tier.borderGradient},children:(0,t.jsxs)(a.Box,{sx:{position:"relative",width:"100%",height:"100%",borderRadius:1.5,overflow:"hidden",display:"flex",flexDirection:"column",padding:2},children:[(0,t.jsx)(a.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0}
29,children:(0,t.jsx)(g.default,{src:e.tier.badgeBackground,alt:"card background",fill:!0,style:{objectFit:"cover"},priority:!0})}),(0,t.jsx)(a.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0}}),(0,t.jsxs)(a.Box,{sx:{position:"relative",zIndex:1,display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[(0,t.jsx)(g.default,{src:"/assets/hero-logo-dark.svg",alt:"hotstuff",width:64,height:20}),!eh.isMainnet&&(0,t.jsx)(o.Typography,{sx:{fontFamily:"Poppins, sans-serif",fontWeight:500,fontSize:"12px",lineHeight:"14px",letterSpacing:"0px",color:"#000000"},children:r("nav.testnet")})]}),(0,t.jsx)(a.Box,{sx:{position:"relative",zIndex:1,flex:1,display:"flex",alignItems:"center",justifyContent:"center",my:1},children:(0,t.jsx)(a.Box,{sx:{position:"relative",width:{xs:190.11,sm:212.35},height:{xs:180,sm:200}},children:(0,t.jsx)(g.default,{src:s,alt:"gem",fill:!0,style:{objectFit:"contain"},priority:!0})})}),(0,t.jsxs)(a.Box,{sx:{position:"relative",zIndex:1,textAlign:"center",display:"flex",flexDirection:"column",gap:.5},children:[(0,t.jsx)(o.Typography,{variant:"body1",sx:{color:"var(--text-secondary)"},children:r("common.tier")}),(0,t.jsxs)(o.Typography,{variant:"h5",children:[" ",i," "]})]}),(0,t.jsx)(el.Divider,{sx:{border:"1px dashed #74747433",width:"100%",my:2,zIndex:1}}),(0,t.jsxs)(a.Box,{sx:{position:"relative",zIndex:1,display:"flex",gap:1,mt:"auto"},children:[(0,t.jsx)(L.Button,{variant:"contained",size:"medium",onClick:e=>{e?.preventDefault(),e?.stopPropagation();try{let e=eh.isMainnet?"app.hotstuff.trade":"testnet.hotstuff.trade",t=r("expeditions.shareUnlockedTier",{tier:i,link:e});t.length>280&&(t=t.substring(0,277)+"...");let n=new URLSearchParams;n.append("text",t);let a=`https://x.com/intent/tweet?${n.toString()}`;window.open(a,"_blank","noopener,noreferrer")||console.error("Failed to open Twitter/X window. Popup may be blocked.")}catch(e){console.error("Error sharing on X:",e)}},sx:{color:"var(--text-primary)",padding:2,textTransform:"none"},children:(0,t.jsxs)(a.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"eva:external-link-outline",width:14,height:14,sx:{color:"var(--text-secondary)","&:hover":{color:"inherit !important"}}}),(0,t.jsx)(o.Typography,{variant:"body1",children:r("referrals.shareCode")})]})}),(0,t.jsx)(L.Button,{variant:"contained",size:"medium",onClick:()=>{let t=i.replace(/[^a-zA-Z0-9\s-]/g,"").replace(/\s+/g,"-").toLowerCase(),r=document.createElement("a");r.download=`hotstuff-card-${t}.png`,r.href=e.tier.cardImage,r.click()},sx:{color:"var(--text-primary)",textTransform:"none",padding:2},children:(0,t.jsxs)(a.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"eva:download-outline",width:14,height:14,sx:{color:"var(--text-secondary)","&:hover":{color:"inherit !important"}}}),(0,t.jsx)(o.Typography,{variant:"body1",children:r("modals.saveImage")})]})})]})]})})};function eg(e){return e.isTestnetOg}function ey(e){return{tier:e}}
29function eb(e){return e.maxSlippage}function ex(e){return e.setMaxSlippage}e.s(["CollectedCardsModal",0,()=>{let e,s,A,l,c,u,h,p,m,f,g,y,b,x,v,C,B,S,k,E,F,T,U,I,Q,j=(0,r.c)(60),L=(0,w.useTranslations)(),{activeTier:_}=(0,n.useExpeditionDataStore)(),P=(0,n.useAuthStore)(eg),[D,R]=(0,i.useState)("all"),M=(0,eu.default)("(max-width: 1000px)"),O=(0,i.useRef)(null);j[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],j[0]=e):e=j[0];let N=(0,i.useRef)(e),[H,V]=(0,i.useState)(0);j[1]!==_?(s=()=>_?ec.EXPEDITION_TIERS.filter(e=>e.id<_.id):[],j[1]=_,j[2]=s):s=j[2];let K=s;if(j[3]!==D||j[4]!==K||j[5]!==P){let e=K(),t=e.length>0?e[e.length-1]:null,r="recent"===D?t?[{tier:t}]:[]:e.map(ey);A=P?[{tier:ep.TESTNET_OG},...r]:r,j[3]=D,j[4]=K,j[5]=P,j[6]=A}else A=j[6];let G=A;j[7]!==G.length||j[8]!==M?(l=()=>{if(!M||!O.current||0===G.length)return;let e=O.current,t=()=>{let t=e.getBoundingClientRect(),r=t.left+t.width/2,n=0,i=1/0;N.current.forEach((e,t)=>{if(!e)return;let a=e.getBoundingClientRect(),o=Math.abs(r-(a.left+a.width/2));o<i&&(i=o,n=t)}),V(n)};return e.addEventListener("scroll",t),t(),()=>{e.removeEventListener("scroll",t)}},c=[M,G.length],j[7]=G.length,j[8]=M,j[9]=l,j[10]=c):(l=j[9],c=j[10]),(0,i.useEffect)(l,c),j[11]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{V(0),O.current&&O.current.scrollTo({left:0,behavior:"smooth"})},j[11]=u):u=j[11],j[12]!==D?(h=[D],j[12]=D,j[13]=h):h=j[13],(0,i.useEffect)(u,h),j[14]!==L?(p=L("expeditions.collectedCards"),j[14]=L,j[15]=p):p=j[15],j[16]===Symbol.for("react.memo_cache_sentinel")?(m={"& .MuiDialog-paper":{maxWidth:"1320px",width:"90%"}},j[16]=m):m=j[16],j[17]===Symbol.for("react.memo_cache_sentinel")?(f={display:"flex",flexDirection:"column",gap:3,px:{xs:0,sm:0,md:5},pb:{xs:0,sm:0,md:5}},j[17]=f):f=j[17],j[18]===Symbol.for("react.memo_cache_sentinel")?(g={display:"flex",gap:1},j[18]=g):g=j[18],j[19]!==L?(y=L("common.all"),j[19]=L,j[20]=y):y=j[20],j[21]!==y?(b={label:y,value:"all"},j[21]=y,j[22]=b):b=j[22],j[23]!==L?(x=L("modals.recentlyAdded"),j[23]=L,j[24]=x):x=j[24],j[25]!==x?(v={label:x,value:"recent"},j[25]=x,j[26]=v):v=j[26],j[27]!==b||j[28]!==v?(C=[b,v],j[27]=b,j[28]=v,j[29]=C):C=j[29],j[30]===Symbol.for("react.memo_cache_sentinel")?(B=e=>R(e),j[30]=B):B=j[30],j[31]!==D||j[32]!==C?(S=(0,t.jsx)(a.Box,{sx:g,children:(0,t.jsx)(ed.default,{options:C,value:D,onChange:B})}),j[31]=D,j[32]=C,j[33]=S):S=j[33];let W=M?"nowrap":"wrap",z=M?"auto":"visible",$=M?"x mandatory":"none";return j[34]===Symbol.for("react.memo_cache_sentinel")?(k={display:"none"},j[34]=k):k=j[34],j[35]!==W||2!==j[36]||j[37]!==z||j[38]!==$||0!==j[39]?(E={display:"flex",flexWrap:W,gap:2,overflowX:z,overflowY:"hidden",scrollSnapType:$,scrollBehavior:"smooth","&::-webkit-scrollbar":k,scrollbarWidth:"none",msOverflowStyle:"none",pb:0,WebkitOverflowScrolling:"touch"},j[35]=W,j[36]=2,j[37]=z,j[38]=$,j[39]=0,j[40]=E):E=j[40],j[41]!==G||j[42]!==D||j[43]!==M||j[44]!==L?(F=G.length>0?G.map((e,r)=>(0,t.jsx)(a.Box,{ref:e=>{N.current[r]=e},sx:{width:M?"243px":"280px",minWidth:M?"243px":"280px",flexShrink:0,scrollSnapAlign:M?"center":"none"},children:(0,t.jsx)(ef,{card:e})},e.tier.id)):(0,t.jsx)(a.Box,{sx:{width:"100%",textAlign:"center",py:4},children:(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",children:L("recent"===D?"modals.noRecentCards":"modals.noCardsCollected")})}),j[41]=G,j[42]=D,j[43]=M,j[44]=L,j[45]=F):F=j[45],j[46]!==E||j[47]!==F?(T=(0,t.jsx)(a.Box,{ref:O,sx:E,children:F}),j[46]=E,j[47]=F,j[48]=T):T=j[48],j[49]!==H||j[50]!==G||j[51]!==M?(U=M&&G.length>1&&(0,t.jsx)(a.Box,{sx:{display:"flex",justifyContent:"center",gap:.75,pt:2,pb:1},children:G.map((e,r)=>(0,t.jsx)(a.Box,{sx:{width:6,height:6,borderRadius:"50%",backgroundColor:"#ffffff",opacity:H===r?1:.3,transition:"opacity 0.3s ease"}},r))}),j[49]=H,j[50]=G,j[51]=M,j[52]=U):U=j[52],j[53]!==S||j[54]!==T||j[55]!==U?(I=(0,t.jsxs)(a.Box,{sx:f,children:[S,T,U]}),j[53]=S,j[54]=T,j[55]=U,j[56]=I):I=j[56],j[57]!==I||j[58]!==p?(Q=(0,t.jsx)(d.ModalBox,{title:p,active:"collected-cards",sx:m,children:I}),j[57]=I,j[58]=p,j[59]=Q):Q=j[59],Q}],823369),e.s(["SlippageModal",0,()=>{let e,a,s,A,l,c,h,p,m,f,g,y,b,x,v,C,B=(0,r.c)(35),S=(0,w.useTranslations)(),{setModal:k}=(0,n.useActionStore)(),E=(0,n.useTradingPreferencesStore)(eb),F=(0,n.useTradingPreferencesStore)(ex);B[0]!==E?(e=(0,u.formatNumber)(E,{decimals:2,useGrouping:!1,preserveDecimalString:!0,trimTrailingZeros:!1}),B[0]=E,B[1]=e):e=B[1];let[T,U]=(0,i.useState)(e);B[2]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{if(""===e)return void U("");let t=Math.min(Math.max(Number(e),0),100),r=(0,u.formatNumber)(t,{decimals:2,useGrouping:!1,preserveDecimalString:!1,trimTrailingZeros:!1});Number(r)!==Number(e)?U(r):U(e)},B[2]=a):a=B[2];let I=a;B[3]!==F||B[4]!==k||B[5]!==T?(s=()=>{F(Number(T)),k(null)},B[3]=F,B[4]=k,B[5]=T,B[6]=s):s=B[6];let Q=s;B[7]!==S?(A=S("modals.adjustSlippage"),B[7]=S,B[8]=A):A=B[8],B[9]!==S?(l=S("modals.slippageExplanation"),B[9]=S,B[10]=l):l=B[10],B[11]!==l?(c=(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:l}),B[11]=l,B[12]=c):c=B[12],B[13]===Symbol.for("react.memo_cache_sentinel")?(h=e=>I(e.target.value),B[13]=h):h=B[13],B[14]!==S?(p=S("modals.maxSlippage"),B[14]=S,B[15]=p):p=B[15],B[16]===Symbol.for("react.memo_cache_sentinel")?(m={"aria-label":"slider value",min:.01,max:100},B[16]=m):m=B[16],B[17]===Symbol.for("react.memo_cache_sentinel")?(f={width:"100%",p:"0 ","& input":{textAlign:"left",width:"100%"}},B[17]=f):f=B[17],B[18]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",sx:{fontSize:"inherit",mr:1},children:"%"}),B[18]=g):g=B[18],B[19]!==T||B[20]!==p?(y=(0,t.jsx)(ei.default,{value:T,onChange:h,placeholder:p,inputProps:m,sx:f,endAdornment:g}),B[19]=T,B[20]=p,B[21]=y):y=B[21];let j=""===T||0===Number(T);return B[22]!==S?(b=S("common.confirm"),B[22]=S,B[23]=b):b=B[23],B[24]!==Q||B[25]!==j||B[26]!==b?(x=(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:Q,disabled:j,children:b}),B[24]=Q,B[25]=j,B[26]=b,B[27]=x):x=B[27],B[28]!==y||B[29]!==x||B[30]!==c?(v=(0,t.jsxs)(t.Fragment,{children:[c,y,x]}),B[28]=y,B[29]=x,B[30]=c,B[31]=v):v=B[31],B[32]!==v||B[33]!==A?(C=(0,t.jsx)(d.ModalBox,{title:A,active:"slippage",children:v}),B[32]=v,B[33]=A,B[34]=C):C=B[34],C}],126877);var ew=e.i(368920),ev=e.i(840437);let eC=e=>(0,u.formatNumber)(e,{decimals:2,useGrouping:!1,preserveDecimalString:!0,trimTrailingZeros:!1}),eB=e=>(0,u.formatNumber)(e,{decimals:4,useGrouping:!1,trimTrailingZeros:!0});e.s(["SpotSlippageModal",0,()=>{let e,s,A,l,c,u,h,p,m,f,g,y,b,x,v,C,B,S,k,E,F=(0,r.c)(53),T=(0,w.useTranslations)(),{payload:U,setModal:I}=(0,n.useActionStore)(),Q="object"==typeof U&&null!==U&&"instrumentName"in U&&"string"==typeof U.instrumentName?U.instrumentName:"",{mode:j,manualSlippage:_,autoSlippage:P,setMode:D,setManualSlippage:R}=(0,ev.useSpotSlippage)(Q),[M,O]=(0,i.useState)(j);F[0]!==_?(e=()=>eC(_),F[0]=_,F[1]=e):e=F[1];let[N,H]=(0,i.useState)(e);F[2]!==_||F[3]!==j?(s=()=>{O(j),H(eC(_))},A=[j,_],F[2]=_,F[3]=j,F[4]=s,F[5]=A):(s=F[4],A=F[5]),(0,i.useEffect)(s,A);let V=Number(N);F[6]!==V||F[7]!==N?(l=""!==N&&"."!==N&&!N.endsWith(".")&&Number.isFinite(V),F[6]=V,F[7]=N,F[8]=l):l=F[8];let K=l;F[9]!==K||F[10]!==V?(c=K?V<ew.SPOT_MANUAL_SLIPPAGE_MIN?`Minimum max slippage is ${eB(ew.SPOT_MANUAL_SLIPPAGE_MIN)}%.`:V>ew.SPOT_MANUAL_SLIPPAGE_MAX?`Maximum max slippage is ${eB(ew.SPOT_MANUAL_SLIPPAGE_MAX)}%.`:null:null,F[9]=K,F[10]=V,F[11]=c):c=F[11];let G=c,W=K&&V>=ew.SPOT_MANUAL_SLIPPAGE_MIN&&V<=ew.SPOT_MANUAL_SLIPPAGE_MAX;F[12]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{(""===e||/^\d*(\.\d*)?$/.test(e))&&H(e)},F[12]=u):u=F[12];let z=u;F[13]!==M||F[14]!==W||F[15]!==V||F[16]!==R||F[17]!==I||F[18]!==D?(h=()=>
29{if("auto"===M){D("auto"),I(null);return}W&&(R(V),D("manual"),I(null))},F[13]=M,F[14]=W,F[15]=V,F[16]=R,F[17]=I,F[18]=D,F[19]=h):h=F[19];let $=h;F[20]!==T?(p=T("modals.adjustSlippage"),F[20]=T,F[21]=p):p=F[21],F[22]!==T?(m=T("trade.spotSlippageAuto"),F[22]=T,F[23]=m):m=F[23],F[24]!==m?(f={label:m,value:"auto"},F[24]=m,F[25]=f):f=F[25],F[26]===Symbol.for("react.memo_cache_sentinel")?(g={label:"Custom",value:"manual"},F[26]=g):g=F[26],F[27]!==f?(y=[f,g],F[27]=f,F[28]=y):y=F[28],F[29]===Symbol.for("react.memo_cache_sentinel")?(b=e=>O(e),x={width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},F[29]=b,F[30]=x):(b=F[29],x=F[30]),F[31]!==M||F[32]!==y?(v=(0,t.jsx)(ed.default,{options:y,value:M,onChange:b,sx:x,width:"49%"}),F[31]=M,F[32]=y,F[33]=v):v=F[33],F[34]!==P||F[35]!==M||F[36]!==N||F[37]!==T||F[38]!==G?(C="auto"===M?(0,t.jsxs)(a.Box,{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:"Auto selects the best max slippage for this order based on current trading conditions."}),(0,t.jsxs)(o.Typography,{variant:"body1",color:"text.primary",children:["Current Max Slippage: ",eB(P),"%"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",mb:1,children:T("modals.slippageExplanation")}),(0,t.jsx)(ei.default,{value:N,error:!!G,onChange:e=>z(e.target.value),placeholder:T("modals.maxSlippage"),inputProps:{"aria-label":"slider value",min:ew.SPOT_MANUAL_SLIPPAGE_MIN,max:ew.SPOT_MANUAL_SLIPPAGE_MAX},sx:{width:"100%",p:"0 ","& input":{textAlign:"left",width:"100%"}},endAdornment:(0,t.jsx)(o.Typography,{variant:"body1",color:"textSecondary",sx:{fontSize:"inherit",mr:1},children:"%"})}),G&&(0,t.jsx)(o.Typography,{variant:"caption",color:"error.main",sx:{mt:.75,display:"block"},children:G})]}),F[34]=P,F[35]=M,F[36]=N,F[37]=T,F[38]=G,F[39]=C):C=F[39];
29let q="manual"===M&&!W;return F[40]!==T?(B=T("common.confirm"),F[40]=T,F[41]=B):B=F[41],F[42]!==$||F[43]!==q||F[44]!==B?(S=(0,t.jsx)(L.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:$,disabled:q,children:B}),F[42]=$,F[43]=q,F[44]=B,F[45]=S):S=F[45],F[46]!==v||F[47]!==C||F[48]!==S?(k=(0,t.jsxs)(t.Fragment,{children:[v,C,S]}),F[46]=v,F[47]=C,F[48]=S,F[49]=k):k=F[49],F[50]!==k||F[51]!==p?(E=(0,t.jsx)(d.ModalBox,{title:p,active:"spot-slippage",children:k}),F[50]=k,F[51]=p,F[52]=E):E=F[52],E}],310335)},817847,6316,767097,401998,641331,94318,200583,849145,457600,406185,830553,309833,613213,528539,310479,403275,446999,e=>{"use strict";e.s(["ReferralTiersModal",()=>c],817847);var t=e.i(474076),r=e.i(500932),n=e.i(838456),i=e.i(782904),a=e.i(917098);e.i(565306);var o=e.i(849850),s=e.i(405858);e.i(859912);var A=e.i(100451),l=e.i(709643);let c=()=>{let e,c,d,u,h,p,m,f,g,y=(0,r.c)(14),b=(0,l.useTranslations)();y[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,A.createReferralTiersConfig)(),y[0]=e):e=y[0];let x=e;return y[1]!==b?(c=b("referrals.referralTiers"),y[1]=b,y[2]=c):c=y[2],y[3]===Symbol.for("react.memo_cache_sentinel")?(d={width:"100%",display:"flex",flexDirection:"column"},u=(0,t.jsx)(s.default,{config:x}),y[3]=d,y[4]=u):(d=y[3],u=y[4]),y[5]===Symbol.for("react.memo_cache_sentinel")?(h=(0,t.jsx)(a.Divider,{sx:{borderStyle:"dashed"},orientation:"horizontal",flexItem:!0}),y[5]=h):h=y[5],y[6]===Symbol.for("react.memo_cache_sentinel")?(p={mt:"24px"},y[6]=p):p=y[6],y[7]!==b?(m=b("referrals.referralTiersDisclaimer"),y[7]=b,y[8]=m):m=y[8],y[9]!==m?(f=(0,t.jsxs)(n.Box,{sx:d,children:[u,h,(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",sx:p,children:m})]}),y[9]=m,y[10]=f):f=y[10],y[11]!==c||y[12]!==f?(g=(0,t.jsx)(o.ModalBox,{title:c,active:"referral-tiers",maxWidth:"lg",children:f}),y[11]=c,y[12]=f,y[13]=g):g=y[13],g};e.i(992550);var d=e.i(407585),u=e.i(397837),h=e.i(700756),p=e.i(632418),m=e.i(268407),f=e.i(271645),g=e.i(818279),y=e.i(618566);e.s(["ReferralInviteCodeModal",0,()=>{let e=(0,l.useTranslations)(),r=(0,y.useRouter)(),{setModal:a,payload:s,modal:A,setPayload:c}=(0,m.useActionStore)(),{status:b,address:x,setUserMetadata:w,userMetadata:v}=(0,m.useAuthStore)(),{referralSummary:C}=(0,m.useUserTradingDataStore)(),B=(0,f.useRef)(!1),S=(0,f.useRef)(!1),[k,E]=(0,f.useState)(!1),[F,T]=(0,f.useState)(null),U=s?.inviteCode,I=v?.[x],Q=I?.is_whitelisted===!0,j=(0,f.useMemo)(()=>"disconnected"!==b&&"0x0000000000000000000000000000000000000000"!==x,[b,x]),L=(0,f.useMemo)(()=>{if(!x)return null;let e=C[x]?.referrer_code;if(e&&""!==e)return e;try{let e=JSON.parse(localStorage.getItem("pendingReferralCodes")||"{}")[x];if(e&&""!==e)return e}catch(e){console.error("Error reading pending referral codes:",e)}return null},[x,C]);(0,f.useEffect)(()=>{"connect-wallet"===A&&U&&(B.current=!0)},[A,U]),(0,f.useEffect)(()=>{if(B.current&&j&&null===A&&U&&!L){let e=setTimeout(()=>{B.current=!1,a("referral-invite-code")},100);return()=>clearTimeout(e)}},[j,A,U,a,L]);let _=(0,f.useCallback)(()=>{a("connect-wallet")},[a]),P=(0,f.useCallback)(()=>{if(U&&x)try{let e=JSON.parse(localStorage.getItem("pendingReferralCodes")||"{}");e[x]=U,localStorage.setItem("pendingReferralCodes",JSON.stringify(e))}catch(e){console.error("Error saving pending referral code:",e)}},[U,x]),D=(0,f.useCallback)(async()=>{if(U&&x&&!S.current){if(S.current=!0,B.current=!1,T(null),Q){P(),c(null),a(null),r.push("/trade");return}E(!0);try{let e=await (0,g.submitReferralCode)(x,U,"","","","");w(x,e),e.is_whitelisted&&P()}catch(n){let t=n instanceof Error?n.message:e("referrals.submitError");"no referral bypass slots available"===t?(c(null),a(null),r.push("/join-waitlist")):T(t),E(!1),S.current=!1;return}E(!1),c(null),a(null),r.push("/trade")}},[U,x,Q,a,c,w,P,r]),R=(0,f.useCallback)(()=>{c(null),a(null),r.push("/trade")},[a,c,r]);return L?(0,t.jsxs)(o.ModalBox,{title:e("referrals.alreadyUsingTitle"),active:"referral-invite-code",maxWidth:"xs",children:[(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",mb:3},children:[(0,t.jsx)(n.Box,{sx:{width:64,height:64,borderRadius:"50%",backgroundColor:e=>(0,p.varAlpha)(e.vars.palette.warning.mainChannel,.12),display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:(0,t.jsx)(d.Iconify,{icon:"solar:shield-check-bold",width:32,height:32,sx:{color:"warning.main"}})}),(0,t.jsx)(i.Typography,{variant:"h4",component:"h2",sx:{fontWeight:600,textAlign:"center"},children:e("referrals.alreadyHaveReferrer")})]}),(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",sx:{textAlign:"center",mb:2},children:e("referrals.cannotChangeCode")}),(0,t.jsxs)(n.Box,{sx:{mb:3,p:2,borderRadius:1,backgroundColor:e=>(0,p.varAlpha)(e.vars.palette.grey["500Channel"],.08),display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[(0,t.jsx)(i.Typography,{variant:"body2",color:"text.secondary",children:e("referrals.currentCodeLabel")}),(0,t.jsx)(i.Typography,{variant:"h5",sx:{fontFamily:"monospace",letterSpacing:"0.05em",color:"primary.main",fontWeight:600},children:L})]}),(0,t.jsx)(u.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:R,children:e("referrals.continueToTrading")}),(0,t.jsxs)(n.Box,{sx:{mt:2,p:2,borderRadius:1,backgroundColor:e=>
29(0,p.varAlpha)(e.vars.palette.info.mainChannel,.08),display:"flex",gap:1.5},children:[(0,t.jsx)(d.Iconify,{icon:"solar:info-circle-bold",width:20,height:20,sx:{color:"info.main",flexShrink:0,mt:.25}}),(0,t.jsx)(i.Typography,{variant:"body2",color:"text.secondary",children:e("referrals.permanentNotice")})]})]}):(0,t.jsxs)(o.ModalBox,{title:e("referrals.enterReferralCode"),active:"referral-invite-code",maxWidth:"xs",children:[(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",mb:3},children:[(0,t.jsx)(n.Box,{sx:{width:64,height:64,borderRadius:"50%",backgroundColor:e=>(0,p.varAlpha)(e.vars.palette.primary.mainChannel,.12),display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:(0,t.jsx)(d.Iconify,{icon:"solar:gift-bold",width:32,height:32,sx:{color:"primary.main"}})}),(0,t.jsx)(i.Typography,{variant:"h4",component:"h2",sx:{fontWeight:600,textAlign:"center"},children:e("referrals.youreInvited")})]}),(0,t.jsx)(i.Typography,{variant:"body1",color:"text.secondary",sx:{textAlign:"center",mb:3},children:j?e("referrals.joinWithCode",{code:U}):e("referrals.connectPrompt")}),F&&(0,t.jsxs)(n.Box,{sx:{mb:2,p:2,borderRadius:1,backgroundColor:e=>(0,p.varAlpha)(e.vars.palette.error.mainChannel,.08),display:"flex",gap:1.5},children:[(0,t.jsx)(d.Iconify,{icon:"solar:danger-triangle-bold",width:20,height:20,sx:{color:"error.main",flexShrink:0,mt:.25}}),(0,t.jsx)(i.Typography,{variant:"body2",color:"error.main",children:F})]}),j?(0,t.jsx)(u.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:D,disabled:k,sx:{mb:1,minHeight:48},children:k?(0,t.jsx)(h.CircularProgress,{size:24,color:"inherit"}):e("referrals.joinWithCodeButton")}):(0,t.jsx)(u.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:_,sx:{mb:1},children:e("common.connectWallet")}),(0,t.jsxs)(n.Box,{sx:{mt:2,p:2,borderRadius:1,backgroundColor:e=>(0,p.varAlpha)(e.vars.palette.info.mainChannel,.08),display:"flex",gap:1.5},children:[(0,t.jsx)(d.Iconify,{icon:"solar:info-circle-bold",width:20,height:20,sx:{color:"info.main",flexShrink:0,mt:.25}}),(0,t.jsx)(i.Typography,{variant:"body2",color:"text.secondary",children:e("referrals.footerInfo")})]})]})}],6316);var b=e.i(162282),x=e.i(81121),w=e.i(657688),v=e.i(858532);let C=e=>{let i,a,o,s=(0,r.c)(7),{icon:A,onClick:l}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",height:"30px",padding:"4px",justifyContent:"center",alignItems:"center",gap:"10px",width:"100%",flex:1,borderRadius:"4px",border:"1px solid #303030",background:"#303030","&:hover":{background:S,color:"#FFFFFF",cursor:"pointer"}},s[0]=i):i=s[0];let c=`/imgs/svg/social/${A}.svg`;return s[1]!==A||s[2]!==c?(a=(0,t.jsx)(w.default,{src:c,alt:A,width:16,height:16}),s[1]=A,s[2]=c,s[3]=a):a=s[3],s[4]!==l||s[5]!==a?(o=(0,t.jsx)(n.Box,{onClick:l,sx:i,children:a}),s[4]=l,s[5]=a,s[6]=o):o=s[6],o};function B(e){return(0,p.varAlpha)(e.vars.palette.grey["500Channel"],.08)}function S(e){return(0,p.varAlpha)(e.vars.palette.grey["500Channel"],.8)}e.s(["ShareReferralCodeModal",0,()=>{let e,a,s,A,c,u,h,p,g,y,S,k,E,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V,K,G,W,z,$,q,X,Y,J,Z,ee,et,er,en,ei=(0,r.c)(106),ea=(0,l.useTranslations)(),{address:eo,userMetadata:es}=(0,m.useAuthStore)();ei[0]!==eo?(e=e=>e.referralSummary[eo],ei[0]=eo,ei[1]=e):e=ei[1];let eA=(0,m.useUserTradingDataStore)(e),el=es?.[eo];ei[2]!==el?.invite_codes?(a=el?.invite_codes??[],ei[2]=el?.invite_codes,ei[3]=a):a=ei[3];let ec=a,ed=eA?.codes[0]||eA?.codes[1],eu=`${window.location.origin}/join/${eo&&ed}`,[,eh]=(0,f.useState)(null);ei[4]!==eu?(s=e=>`${eu}?invite=${e}`,ei[4]=eu,ei[5]=s):s=ei[5];let ep=s;ei[6]!==ep?(A=e=>{let t=ep(e);return`Join me on Hotstuff! Sign up using my referral link and let's earn USDC rewards together! ${t}`},ei[6]=ep,ei[7]=A):A=ei[7];let em=A;ei[8]!==em?(c=async e=>{await navigator.clipboard.writeText(em(e)),eh(e),setTimeout(()=>eh(null),2e3)},ei[8]=em,ei[9]=c):c=ei[9];let ef=c,eg=`Join me on Hotstuff! Sign up using my referral link and let's earn USDC rewards together! ${eu}`;ei[10]!==eu||ei[11]!==ea?(u=()=>{navigator.clipboard.writeText(eu),v.showToast.success({message:ea("referrals.referralLinkCopied")})},ei[10]=eu,ei[11]=ea,ei[12]=u):u=ei[12];let ey=u;ei[13]!==eg||ei[14]!==em||ei[15]!==ec[0]||ei[16]!==ec.length?(h=()=>{let e=ec.length>
290?em(ec[0].code):eg,t=`https://api.whatsapp.com/send?text=${encodeURIComponent(e)}`;window.open(t,"_blank")},ei[13]=eg,ei[14]=em,ei[15]=ec[0],ei[16]=ec.length,ei[17]=h):h=ei[17];let eb=h;ei[18]!==eu||ei[19]!==ep||ei[20]!==em||ei[21]!==ec[0]||ei[22]!==ec.length?(p=()=>{let e=ec.length>0?ep(ec[0].code):eu,t=em(ec[0]?.code??""),r=`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`;window.open(r,"_blank")},ei[18]=eu,ei[19]=ep,ei[20]=em,ei[21]=ec[0],ei[22]=ec.length,ei[23]=p):p=ei[23];let ex=p;ei[24]!==eu||ei[25]!==ep||ei[26]!==em||ei[27]!==ec[0]||ei[28]!==ec.length?(g=()=>{let e=ec.length>0?ep(ec[0].code):eu,t=em(ec[0]?.code??""),r=`https://twitter.com/intent/tweet?text=${encodeURIComponent(t)}&url=${encodeURIComponent(e)}`;window.open(r,"_blank")},ei[24]=eu,ei[25]=ep,ei[26]=em,ei[27]=ec[0],ei[28]=ec.length,ei[29]=g):g=ei[29];let ew=g;ei[30]!==eg||ei[31]!==em||ei[32]!==ec[0]||ei[33]!==ec.length||ei[34]!==ea?(y=()=>{let e=ec.length>0?em(ec[0].code):eg;navigator.clipboard.writeText(e),v.showToast.success({message:ea("referrals.discordPaste")})},ei[30]=eg,ei[31]=em,ei[32]=ec[0],ei[33]=ec.length,ei[34]=ea,ei[35]=y):y=ei[35];let ev=y;ei[36]!==ea?(S=ea("referrals.shareCode"),ei[36]=ea,ei[37]=S):S=ei[37],ei[38]===Symbol.for("react.memo_cache_sentinel")?(k={width:"100%",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},ei[38]=k):k=ei[38],ei[39]!==ea?(E=ea("referrals.shareCode"),ei[39]=ea,ei[40]=E):E=ei[40],ei[41]!==E?(F=(0,t.jsx)(w.default,{src:"/imgs/svg/referral/share_card.svg",alt:E,width:315,height:237}),ei[41]=E,ei[42]=F):F=ei[42],ei[43]===Symbol.for("react.memo_cache_sentinel")?(T={width:"100%",display:"flex",flexDirection:"column"},ei[43]=T):T=ei[43],ei[44]===Symbol.for("react.memo_cache_sentinel")?(U={display:"flex",alignItems:"center",gap:"4px",mb:1},ei[44]=U):U=ei[44],ei[45]!==ea?(I=ea("referrals.referralLink"),ei[45]=ea,ei[46]=I):I=ei[46],ei[47]!==I?(Q=(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:I}),ei[47]=I,ei[48]=Q):Q=ei[48],ei[49]!==ea?(j=ea("referrals.inviteLinkTooltip"),ei[49]=ea,ei[50]=j):j=ei[50],ei[51]===Symbol.for("react.memo_cache_sentinel")?(L={display:"flex",alignItems:"center",cursor:"pointer"},ei[51]=L):L=ei[51],ei[52]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(n.Box,{sx:L,children:(0,t.jsx)(d.Iconify,{width:16,height:16,icon:"mingcute:information-line",sx:{color:"text.secondary"}})}),ei[52]=_):_=ei[52],ei[53]!==j?(P=(0,t.jsx)(x.Tooltip,{title:j,arrow:!0,children:_}),ei[53]=j,ei[54]=P):P=ei[54],ei[55]!==Q||ei[56]!==P?(D=(0,t.jsxs)(n.Box,{sx:U,children:[Q,P]}),ei[55]=Q,ei[56]=P,ei[57]=D):D=ei[57],ei[58]===Symbol.for("react.memo_cache_sentinel")?(R={display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:B,borderRadius:1,p:"8px",gap:1},ei[58]=R):R=ei[58],ei[59]===Symbol.for("react.memo_cache_sentinel")?(M={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},ei[59]=M):M=ei[59],ei[60]!==eu?(O=(0,t.jsx)(i.Typography,{variant:"body1",sx:M,children:eu}),ei[60]=eu,ei[61]=O):O=ei[61],ei[62]===Symbol.for("react.memo_cache_sentinel")?(N={p:.5,flexShrink:0,transition:"all 0.2s ease-in-out","&:hover":{color:"primary.main"}},ei[62]=N):N=ei[62],ei[63]===Symbol.for("react.memo_cache_sentinel")?(H=(0,t.jsx)(d.Iconify,{width:20,height:20,icon:"solar:copy-outline",sx:{color:"text.secondary"}}),ei[63]=H):H=ei[63],ei[64]!==ey?(V=(0,t.jsx)(b.IconButton,{size:"small",onClick:ey,sx:N,children:H}),ei[64]=ey,ei[65]=V):V=ei[65],ei[66]!==O||ei[67]!==V?(K=(0,t.jsxs)(n.Box,{sx:R,children:[O,V]}),ei[66]=O,ei[67]=V,ei[68]=K):K=ei[68],ei[69]===Symbol.for("react.memo_cache_sentinel")?(G={mt:"8px"},ei[69]=G):G=ei[69];let eC=eA?.referral_bypass_slots?.users_allowed??0;return ei[70]!==ea||ei[71]!==eC?(W=ea("referrals.remainingCodes",{count:eC}),ei[70]=ea,ei[71]=eC,ei[72]=W):W=ei[72],ei[73]!==W?(z=(0,t.jsx)(i.Typography,{variant:"caption",color:"primary.light",sx:G,children:W}),ei[73]=W,ei[74]=z):z=ei[74],ei[75]!==D||ei[76]!==K||ei[77]!==z?($=(0,t.jsxs)(n.Box,{sx:T,children:[D,K,z]}),ei[75]=D,ei[76]=K,ei[77]=z,ei[78]=$):$=ei[78],ei[79]===Symbol.for("react.memo_cache_sentinel")?(q={width:"100%",display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},ei[79]=q):q=ei[79],ei[80]!==ew?(X=(0,t.jsx)(C,{icon:"x",onClick:ew}),ei[80]=ew,ei[81]=X):X=ei[81],ei[82]!==ex?(Y=(0,t.jsx)(C,{icon:"telegram",onClick:ex}),ei[82]=ex,ei[83]=Y):Y=ei[83],ei[84]!==ev?(J=(0,t.jsx)(C,{icon:"discord",onClick:ev}),ei[84]=ev,ei[85]=J):J=ei[85],ei[86]!==eb?(Z=(0,t.jsx)(C,{icon:"whatsapp",onClick:eb}),ei[86]=eb,ei[87]=Z):Z=ei[87],ei[88]!==ey||ei[89]!==ef||ei[90]!==ec[0]||ei[91]!==ec.length?(ee=(0,t.jsx)(C,{icon:"link",onClick:ec.length>0?()=>ef(ec[0].code):ey}),ei[88]=ey,ei[89]=ef,ei[90]=ec[0],ei[91]=ec.length,ei[92]=ee):ee=ei[92],ei[93]!==X||ei[94]!==Y||ei[95]!==J||ei[96]!==Z||ei[97]!==ee?(et=(0,t.jsxs)(n.Box,{sx:q,children:[X,Y,J,Z,ee]}),ei[93]=X,ei[94]=Y,ei[95]=J,ei[96]=Z,ei[97]=ee,ei[98]=et):et=ei[98],ei[99]!==F||ei[100]!==$||ei[101]!==et?(er=(0,t.jsxs)(n.Box,{sx:k,children:[F,$,et]}),ei[99]=F,ei[100]=$,ei[101]=et,ei[102]=er):er=ei[102],ei[103]!==S||ei[104]!==er?(en=(0,t.jsx)(o.ModalBox,{title:S,active:"share-referral-code",children:er}),ei[103]=S,ei[104]=er,ei[105]=en):en=ei[105],en}],767097);var k=e.i(563662),E=e.i(643531);let F=e=>{let i,a,o,s=(0,r.c)(7),{icon:A,onClick:l,copied:c}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",height:"30px",padding:"4px",justifyContent:"center",alignItems:"center",gap:"10px",width:"100%",flex:1,borderRadius:"4px",border:"1px solid #303030",background:"#303030","&:hover":{background:"#555",color:"#FFFFFF",cursor:"pointer"}},s[0]=i):i=s[0],s[1]!==c||s[2]!==A?(a=c?(0,t.jsx)(E.Check,{size:16,color:"var(--text-primary)"}):(0,t.jsx)(w.default,{src:`/imgs/svg/social/${A}.svg`,alt:A,width:16,height:16}),s[1]=c,s[2]=A,s[3]=a):a=s[3],s[4]!==l||s[5]!==a?(o=(0,t.jsx)(n.Box,{onClick:l,sx:i,children:a}),s[4]=l,s[5]=a,s[6]=o):o=s[6],o};function T(e){return`Enter Hotstuff 30 31Get early access to @tradehotstuff, a purpose-built Defi-native L1 32 33Invite code: ${e} 34 35Pre-deposits for Hotstuff Liquidity Vault (HLV) are live at app.hotstuff.trade`}
35function U(){let e=`https://api.whatsapp.com/send?text=${encodeURIComponent("Enter Hotstuff\n\nGet early access to @tradehotstuff, a purpose-built Defi-native L1\n\nPre-deposits for Hotstuff Liquidity Vault (HLV) are live at app.hotstuff.trade")}`;window.open(e,"_blank")}function I(){let e=`https://t.me/share/url?text=${encodeURIComponent("Enter Hotstuff\n\nGet early access to @tradehotstuff, a purpose-built Defi-native L1\n\nPre-deposits for Hotstuff Liquidity Vault (HLV) are live at app.hotstuff.trade")}`;window.open(e,"_blank")}function Q(){let e=`https://twitter.com/intent/tweet?text=${encodeURIComponent("Enter Hotstuff\n\nGet early access to @tradehotstuff, a purpose-built Defi-native L1\n\nPre-deposits for Hotstuff Liquidity Vault (HLV) are live at app.hotstuff.trade")}`;window.open(e,"_blank")}async function j(){let e=await fetch("/assets/share-card.png"),t=await e.blob(),r=window.URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download="share-card.png",n.click()}e.s(["EligibileModal",0,()=>{let e,a,s,A,c,d,u,h,p,g,y,b,v,C,B,S,E,L,_,P,D,R,M=(0,r.c)(39),O=(0,l.useTranslations)(),{userMetadata:N,address:H}=(0,m.useAuthStore)(),[V,K]=(0,f.useState)(null),[G,W]=(0,f.useState)(!1),[z,$]=(0,f.useState)(!1),q=N?.[H];M[0]===Symbol.for("react.memo_cache_sentinel")?(e=async e=>{await navigator.clipboard.writeText(T(e)),K(e),setTimeout(()=>K(null),2e3)},M[0]=e):e=M[0];let X=e;M[1]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{let t=encodeURIComponent(T(e));window.open(`https://twitter.com/intent/tweet?text=${t}`,"_blank")},M[1]=a):a=M[1];let Y=a;M[2]===Symbol.for("react.memo_cache_sentinel")?(s=async()=>{try{let e=await fetch("/assets/share-card.png"),t=await e.blob();await navigator.clipboard.write([new ClipboardItem({[t.type]:t})]),W(!0),setTimeout(()=>W(!1),2e3)}catch(e){console.error("Failed to copy image:",e)}},M[2]=s):s=M[2];let J=s;M[3]===Symbol.for("react.memo_cache_sentinel")?(A=async()=>{try{let e=await fetch("/assets/share-card.png"),t=await e.blob();await navigator.clipboard.write([new ClipboardItem({[t.type]:t})]),$(!0),setTimeout(()=>$(!1),2e3)}catch(e){console.error("Failed to copy image:",e)}},M[3]=A):A=M[3];let Z=A;M[4]!==O?(c=O("modals.eligibility"),M[4]=O,M[5]=c):c=M[5],M[6]===Symbol.for("react.memo_cache_sentinel")?(d={display:"flex",alignItems:"center",gap:"4px"},u=(0,t.jsx)(w.default,{src:"/assets/check-green.svg",alt:"check",width:14,height:14}),M[6]=d,M[7]=u):(d=M[6],u=M[7]),M[8]===Symbol.for("react.memo_cache_sentinel")?(h={color:"#ACF47F"},M[8]=h):h=M[8],M[9]!==O?(p=O("modals.youAreEligible"),M[9]=O,M[10]=p):p=M[10],M[11]!==p?(g=(0,t.jsxs)(n.Box,{sx:d,children:[u,(0,t.jsx)(i.Typography,{variant:"subtitle1",sx:h,children:p})]}),M[11]=p,M[12]=g):g=M[12],M[13]===Symbol.for("react.memo_cache_sentinel")?(y={display:"flex",justifyContent:"center",position:"relative"},M[13]=y):y=M[13],M[14]===Symbol.for("react.memo_cache_sentinel")?(b={position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:{xs:"360px",md:"512px"},height:{xs:"192px",md:"264px"}},M[14]=b):b=M[14],M[15]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(n.Box,{sx:b,children:(0,t.jsx)(w.default,{src:"/assets/share-card.png",alt:"hotstuff",fill:!0,style:{objectFit:"contain"}})}),M[15]=v):v=M[15],M[16]===Symbol.for("react.memo_cache_sentinel")?(C={position:"absolute",bottom:16,right:24,display:"flex",gap:"8px"},M[16]=C):C=M[16],M[17]!==G||M[18]!==O?(B=G?O("modals.copied"):O("modals.copyImage"),M[17]=G,M[18]=O,M[19]=B):B=M[19],M[20]===Symbol.for("react.memo_cache_sentinel")?(S={padding:"4px 8px",cursor:"pointer",backgroundColor:"var(--background-quaternary)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#303030"}},M[20]=S):S=M[20];let ee=G?"mingcute:check-line":"mingcute:copy-2-line";return M[21]!==ee?(E=(0,t.jsx)(n.Box,{onClick:J,sx:S,children:(0,t.jsx)(k.Icon,{icon:ee,width:12,height:12})}),M[21]=ee,M[22]=E):E=M[22],M[23]!==B||M[24]!==E?(L=(0,t.jsx)(x.Tooltip,{title:B,children:E}),M[23]=B,M[24]=E,M[25]=L):L=M[25],M[26]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(n.Box,{component:"a",href:"/assets/share-card.png",download:"share-card.png",sx:{padding:"4px 8px",cursor:"pointer",backgroundColor:"var(--background-quaternary)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"#303030"}},children:(0,t.jsx)(w.default,{src:"/assets/download.svg",alt:"download",width:12,height:12})}),M[26]=_):_=M[26],M[27]!==L?(P=(0,t.jsxs)(n.Box,{sx:y,children:[v,(0,t.jsxs)(n.Box,{sx:C,
35children:[L,_]})]}),M[27]=L,M[28]=P):P=M[28],M[29]!==V||M[30]!==z||M[31]!==O||M[32]!==q?(D=q?.invite_codes&&q.invite_codes.length>0?(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsx)(i.Typography,{variant:"body1",sx:{color:"var(--text-secondary)"},children:O("modals.yourInviteCodes")}),q.invite_codes.map((e,r)=>(0,t.jsxs)(n.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"var(--background-secondary)",borderRadius:"4px",padding:"8px"},children:[(0,t.jsx)(i.Typography,{variant:"body1",sx:{color:"var(--text-primary)"},children:e.code}),(0,t.jsxs)(n.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.is_used&&(0,t.jsx)(i.Typography,{variant:"caption",sx:{color:"var(--text-secondary)"},children:O("modals.alreadyUsed")}),(0,t.jsx)(x.Tooltip,{title:V===e.code?O("modals.copied"):O("modals.copyShareText"),children:(0,t.jsx)(n.Box,{onClick:()=>X(e.code),sx:{p:"8px",borderRadius:"4px",backgroundColor:"var(--background-quaternary)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s","&:hover":{backgroundColor:"var(--background-secondary)"}},children:(0,t.jsx)(k.Icon,{icon:V===e.code?"mingcute:check-line":"mingcute:copy-2-line",width:12,height:12})})}),(0,t.jsx)(x.Tooltip,{title:O("modals.shareOnX"),children:(0,t.jsx)(n.Box,{onClick:()=>Y(e.code),sx:{p:"8px",borderRadius:"4px",backgroundColor:"var(--background-quaternary)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s","&:hover":{backgroundColor:"var(--background-secondary)"}},children:(0,t.jsx)(k.Icon,{icon:"ri:twitter-x-fill",width:12,height:12})})})]})]},r))]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:(0,t.jsx)(i.Typography,{variant:"body1",sx:{color:"var(--text-secondary)"},children:O("modals.noInviteCodes")})}),(0,t.jsxs)(n.Box,{sx:{width:"100%",display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},children:[(0,t.jsx)(F,{icon:"x",onClick:Q}),(0,t.jsx)(F,{icon:"telegram",onClick:I}),(0,t.jsx)(F,{icon:"download",onClick:j}),(0,t.jsx)(F,{icon:"whatsapp",onClick:U}),(0,t.jsx)(F,{icon:"link",onClick:Z,copied:z})]})]}),M[29]=V,M[30]=z,M[31]=O,M[32]=q,M[33]=D):D=M[33],M[34]!==P||M[35]!==D||M[36]!==c||M[37]!==g?(R=(0,t.jsxs)(o.ModalBox,{maxWidth:"sm",title:c,titleLeftPadding:!0,active:"eligible",disableClose:!1,children:[g,P,D]}),M[34]=P,M[35]=D,M[36]=c,M[37]=g,M[38]=R):R=M[38],R}],401998);var L=e.i(18214),_=e.i(75581),P=e.i(525836);e.i(220037);var D=e.i(511958);let R=["$0-$1000","$1000-$5000","$5000-$10000","$10000-$50000","$50000+"];e.s(["RequestFormModal",0,()=>{let e=(0,l.useTranslations)(),{address:r,setUserMetadata:a}=(0,m.useAuthStore)(),{setModal:s}=(0,m.useActionStore)(),[A,c]=(0,f.useState)("after-update"),[d,y]=(0,f.useState)(""),[b,x]=(0,f.useState)(""),[w,v]=(0,f.useState)("$5000-$10000"),[C,B]=(0,f.useState)(!1),[S,k]=(0,f.useState)(null),[E,F]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(E){let e=setTimeout(()=>{s(null)},1500);return()=>clearTimeout(e)}},[E,s]);let[T,U]=(0,f.useState)({about:!1,telegramUsername:!1,twitterUsername:!1}),I=e=>{U(t=>({...t,[e]:!0}))},Q=(t,r)=>{let n=r.trim();switch(t){case"about":if(!n)return e("modals.tellUsAboutYourself");if(n.length>500)return"About must be 500 characters or less";return;case"telegramUsername":if(!n)return e("modals.telegramUsernameRequired");if(n.length<1)return e("modals.telegramUsernameTooShort");if(n.length>64)return"Telegram username must be 64 characters or less";return;case"twitterUsername":if(!n)return e("modals.xTwitterUsernameRequired");if(n.length<1)return e("modals.xTwitterUsernameTooShort");if(n.length>64)return"X/Twitter username must be 64 characters or less";return;default:return}},j={about:Q("about",A),telegramUsername:Q("telegramUsername",d),twitterUsername:Q("twitterUsername",b)},M=!j.about&&!j.telegramUsername&&!j.twitterUsername,O=async()=>{if(U({about:!0,telegramUsername:!0,twitterUsername:!0}),M){k(null),B(!0);try{let e=await (0,g.submitReferralCode)(r,"",b.trim(),d.trim(),A.trim(),w);a(r,e),F(!0)}catch(t){k(t instanceof Error?t.message:e("common.somethingWentWrong"))}finally{B(!1)}}},N=e=>e?{backgroundColor:(0,p.varAlpha)(D.error.mainChannel,.08),border:`1px solid ${(0,p.varAlpha)(D.error.mainChannel,.4)}`,"&:focus-within":{borderColor:D.error.main}}:{};return(0,t.jsxs)(o.ModalBox,{maxWidth:"sm",title:e("modals.requestInviteCode"),titleLeftPadding:!0,active:"request-form",disableClose:!1,children:[(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:e("modals.telegramUsername")}),(0,t.jsx)(P.default,{fullWidth:!0,value:d,onChange:e=>y(e.target.value),onBlur:()=>I("telegramUsername"),placeholder:e("modals.enterTelegramUsername"),sx:N(T.telegramUsername&&!!j.telegramUsername)}
35),T.telegramUsername&&j.telegramUsername&&(0,t.jsx)(i.Typography,{sx:{color:D.error.light,fontSize:"0.75rem",fontFamily:"var(--font-poppins)",fontWeight:500,mt:-.5},children:j.telegramUsername})]}),(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:e("modals.xTwitterUsername")}),(0,t.jsx)(P.default,{fullWidth:!0,value:b,onChange:e=>x(e.target.value),onBlur:()=>I("twitterUsername"),placeholder:"@username",sx:N(T.twitterUsername&&!!j.twitterUsername)}),T.twitterUsername&&j.twitterUsername&&(0,t.jsx)(i.Typography,{sx:{color:D.error.light,fontSize:"0.75rem",fontFamily:"var(--font-poppins)",fontWeight:500,mt:-.5},children:j.twitterUsername})]}),(0,t.jsxs)(n.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsx)(i.Typography,{variant:"body1",color:"textSecondary",children:e("modals.commitment")}),(0,t.jsx)(L.Select,{value:w,onChange:e=>v(e.target.value),sx:()=>({color:"red",width:"100%",height:40,gap:2,backgroundColor:"var(--background-quaternary)"}),children:R.map(e=>(0,t.jsx)(_.MenuItem,{value:e,disableRipple:!0,children:(0,t.jsx)("p",{children:e})},`commitment-${e}`))})]}),S&&(0,t.jsxs)(i.Typography,{sx:{color:D.error.light,fontSize:"0.75rem",fontFamily:"var(--font-poppins)",textAlign:"left",fontWeight:500},children:["Failed: ",S]}),E&&(0,t.jsx)(i.Typography,{sx:{color:D.primary.main,fontSize:"0.75rem",fontFamily:"var(--font-poppins)",textAlign:"left",fontWeight:500},children:e("modals.requestSubmitted")}),(0,t.jsx)(u.Button,{onClick:O,disabled:C||E,variant:"contained",color:"primary",size:"large",children:C?(0,t.jsx)(h.CircularProgress,{size:20,sx:{color:"#000"}}):E?(0,t.jsx)(i.Typography,{sx:{color:"#000",fontSize:"0.875rem",fontWeight:600,fontFamily:"var(--font-poppins)"},children:e("modals.submitted")}):(0,t.jsx)(i.Typography,{sx:{color:"#000",fontSize:"0.875rem",fontWeight:600,fontFamily:"var(--font-poppins)"},children:e("modals.submit")})})]})}],641331);var M=e.i(209754);function O(e){return""!==e}e.s(["InviteCodeModal",0,()=>{let e,a,s,A,c,d,p,y,b,x,w,v,C,B,S,k=(0,r.c)(44),E=(0,l.useTranslations)(),{address:F,setUserMetadata:T,userMetadata:U}=(0,m.useAuthStore)(),{setModal:I}=(0,m.useActionStore)(),Q=U?.[F],j=Q?.is_whitelisted!=null;k[0]===Symbol.for("react.memo_cache_sentinel")?(e=Array(6).fill(""),k[0]=e):e=k[0];let[L,_]=(0,f.useState)(e),[P,D]=(0,f.useState)("idle"),[R,N]=(0,f.useState)(null);k[1]!==I||k[2]!==P?(a=()=>{if("success"===P){let e=setTimeout(()=>{I(null)},1500);return()=>clearTimeout(e)}},s=[P,I],k[1]=I,k[2]=P,k[3]=a,k[4]=s):(a=k[3],s=k[4]),(0,f.useEffect)(a,s),k[5]===Symbol.for("react.memo_cache_sentinel")?(A=e=>{_(e),D("idle"),N(null)},k[5]=A):A=k[5];let H=A;k[6]!==F||k[7]!==L||k[8]!==T||k[9]!==E?(c=async()=>{let e=L.join("");if(6!==e.length){D("error"),N(E("modals.pleaseEnterCompleteCode"));return}D("loading"),N(null);try{let t=await (0,g.submitReferralCode)(F,e,"","","","");T(F,t),D("success")}catch(t){let e=t instanceof Error?t.message:E("common.somethingWentWrong");D("error"),N(e)}},k[6]=F,k[7]=L,k[8]=T,k[9]=E,k[10]=c):c=k[10];let V=c;k[11]!==L?(d=L.every(O),k[11]=L,k[12]=d):d=k[12];let K=d,G="loading"===P,W="success"===P;k[13]!==E?(p=E("modals.enterInviteCode"),k[13]=E,k[14]=p):p=k[14],k[15]===Symbol.for("react.memo_cache_sentinel")?(y={"& .MuiDialog-paper":{width:{xs:376,sm:444},maxWidth:{xs:376,sm:444}}},k[15]=y):y=k[15],k[16]!==E?(b=E("modals.inviteCodeAccepted"),k[16]=E,k[17]=b):b=k[17],k[18]!==L||k[19]!==R||k[20]!==V||k[21]!==P||k[22]!==b?(x=(0,t.jsx)(M.OtpInput,{value:L,onChange:H,length:6,status:P,errorMessage:R,successMessage:b,onSubmit:V}),k[18]=L,k[19]=R,k[20]=V,k[21]=P,k[22]=b,k[23]=x):x=k[23];let z=!K||G||W;return k[24]===Symbol.for("react.memo_cache_sentinel")?(w={minHeight:48},k[24]=w):w=k[24],k[25]!==G||k[26]!==W||k[27]!==E?(v=G?(0,t.jsx)(h.CircularProgress,{size:24,color:"inherit"}):W?E("common.success"):E("referrals.useCode"),k[25]=G,k[26]=W,k[27]=E,k[28]=v):v=k[28],k[29]!==V||k[30]!==z||k[31]!==v?(C=(0,t.jsx)(u.Button,{onClick:V,disabled:z,variant:"contained",color:"primary",size:"large",sx:w,children:v}),k[29]=V,k[30]=z,k[31]=v,k[32]=C):C=k[32],k[33]!==j||k[34]!==W||k[35]!==I||k[36]!==E?(B=!W&&(0,t.jsxs)(i.Typography,{variant:"body1",color:"textSecondary",children:[E("modals.joinOur")," ",(0,t.jsx)(n.Box,{component:"a",href:"https://discord.com/invite/tradehotstuff",target:"_blank",rel:"noopener noreferrer",sx:{color:"var(--primary-green)",textDecoration:"none",fontWeight:500,"&:hover":{textDecoration:"underline"}},children:"discord"})," ",E("modals.toRequestOne"),!j&&(0,t.jsxs)(t.Fragment,{children:[", or fill out the"," ",(0,t.jsx)(n.Box,{component:"span",onClick:()=>I("request-form"),sx:{color:"var(--primary-green)",fontWeight:500,cursor:"pointer","&:hover":{textDecoration:"underline"}}
35,children:E("modals.accessForm")})]}),"."]}),k[33]=j,k[34]=W,k[35]=I,k[36]=E,k[37]=B):B=k[37],k[38]!==G||k[39]!==C||k[40]!==B||k[41]!==p||k[42]!==x?(S=(0,t.jsxs)(o.ModalBox,{maxWidth:"xs",title:p,titleLeftPadding:!1,active:"invite-code",disableClose:G,sx:y,children:[x,C,B]}),k[38]=G,k[39]=C,k[40]=B,k[41]=p,k[42]=x,k[43]=S):S=k[43],S}],94318);var N=e.i(261722);let H=(0,N.styled)(n.Box)({display:"flex",alignItems:"center",gap:12,marginBottom:12}),V=(0,N.styled)(n.Box)({width:24,height:24,borderRadius:4,backgroundColor:"#303030",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:600,color:"#fff",flexShrink:0});function K(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function G(e){return Object.fromEntries(Object.entries(e??{}).filter(([e,t])=>void 0!==t))}function W(e){return String.fromCharCode(e+(e>25?39:97))}function z(e){var t=function(e,t){let r=t.length;for(;r;)e=33*e^t.charCodeAt(--r);return e}(5381,e)>>>0;let r,n="";for(r=Math.abs(t);r>52;r=r/52|0)n=W(r%52)+n;return W(r%52)+n}(0,N.styled)(u.Button)({flex:1,padding:"14px 16px",borderRadius:6,height:48,backgroundColor:"#191919",border:"none",fontWeight:400,color:"var(--text-primary)",fontFamily:"var(--font-poppins)",justifyContent:"center",gap:8,lineHeight:"18px",fontSize:"14px",textTransform:"none","&:hover":{backgroundColor:"#303030"}}),e.s(["RabbyMobileGuideModal",0,()=>{let e,a,s,A,c,d,h,p,g,y,b,x,v,C,B,S,E,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,K,G,W,z,$,q,X=(0,r.c)(67),Y=(0,l.useTranslations)(),{setModal:J}=(0,m.useActionStore)(),[Z,ee]=(0,f.useState)(!1);X[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{navigator.clipboard.writeText(window.location.href),ee(!0),setTimeout(()=>ee(!1),2e3)},X[0]=e):e=X[0];let et=e;return X[1]!==Y?(a=Y("modals.connectWithRabby"),X[1]=Y,X[2]=a):a=X[2],X[3]===Symbol.for("react.memo_cache_sentinel")?(s={py:1},X[3]=s):s=X[3],X[4]===Symbol.for("react.memo_cache_sentinel")?(A={textAlign:"center",mb:2},X[4]=A):A=X[4],X[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(n.Box,{sx:A,children:(0,t.jsx)(w.default,{alt:"Rabby Wallet",src:"/imgs/png/wallet-icons/rabby.png",width:64,height:64,style:{objectFit:"cover",borderRadius:12}})}),X[5]=c):c=X[5],X[6]===Symbol.for("react.memo_cache_sentinel")?(d={backgroundColor:"#191919",borderRadius:2,p:2,textAlign:"left",mb:3},X[6]=d):d=X[6],X[7]===Symbol.for("react.memo_cache_sentinel")?(h={mb:1.5},X[7]=h):h=X[7],X[8]!==Y?(p=Y("modals.rabbyMobileGuide"),X[8]=Y,X[9]=p):p=X[9],X[10]!==p?(g=(0,t.jsx)(i.Typography,{variant:"body2",color:"text.secondary",sx:h,children:p}),X[10]=p,X[11]=g):g=X[11],X[12]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(V,{children:"1"}),X[12]=y):y=X[12],X[13]!==Y?(b=Y("modals.openRabbyApp"),X[13]=Y,X[14]=b):b=X[14],X[15]!==b?(x=(0,t.jsxs)(H,{children:[y,(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:b})]}),X[15]=b,X[16]=x):x=X[16],X[17]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(V,{children:"2"}),X[17]=v):v=X[17],X[18]!==Y?(C=Y("modals.tapDapps"),X[18]=Y,X[19]=C):C=X[19],X[20]!==C?(B=(0,t.jsxs)(H,{children:[v,(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:C})]}),X[20]=C,X[21]=B):B=X[21],X[22]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(V,{children:"3"}),X[22]=S):S=X[22],X[23]!==Y?(E=Y("modals.enterSiteUrl"),X[23]=Y,X[24]=E):E=X[24],X[25]!==E?(F=(0,t.jsxs)(H,{children:[S,(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:E})]}),X[25]=E,X[26]=F):F=X[26],X[27]===Symbol.for("react.memo_cache_sentinel")?(T={mb:0},U=(0,t.jsx)(V,{children:"4"}),X[27]=T,X[28]=U):(T=X[27],U=X[28]),X[29]!==Y?(I=Y("modals.connectFromRabby"),X[29]=Y,X[30]=I):I=X[30],X[31]!==I?(Q=(0,t.jsxs)(H,{sx:T,children:[U,(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:I})]}),X[31]=I,X[32]=Q):Q=X[32],X[33]!==x||X[34]!==B||X[35]!==F||X[36]!==Q||X[37]!==g?(j=(0,t.jsxs)(n.Box,{sx:d,children:[g,x,B,F,Q]}),X[33]=x,X[34]=B,X[35]=F,X[36]=Q,X[37]=g,X[38]=j):j=X[38],X[39]===Symbol.for("react.memo_cache_sentinel")?(L={display:"flex",gap:1.5},X[39]=L):L=X[39],X[40]!==J?(_=()=>J("connect-wallet"),X[40]=J,X[41]=_):_=X[41],X[42]===Symbol.for("react.memo_cache_sentinel")?(P={flex:1,gap:1},D=(0,t.jsx)(k.Icon,{icon:"mdi:arrow-left",width:18,height:18}),X[42]=P,X[43]=D):(P=X[42],D=X[43]),X[44]!==Y?(R=Y("common.back"),X[44]=Y,X[45]=R):R=X[45],X[46]!==R?(M=(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:R}),X[46]=R,X[47]=M):M=X[47],X[48]!==_||X[49]!==M?(O=(0,t.jsxs)(u.Button,{variant:"outlined",color:"inherit",size:"large",onClick:_,sx:P,children:[D,M]}),X[48]=_,X[49]=M,X[50]=O):O=X[50],X[51]===Symbol.for("react.memo_cache_sentinel")?(N={flex:1,gap:1},K=(0,t.jsx)(k.Icon,{icon:"mdi:content-copy",width:18,height:18}),X[51]=N,X[52]=K):(N=X[51],K=X[52]),X[53]!==Z||X[54]!==Y?(G=Y(Z?"modals.copied":"modals.copyUrl"),X[53]=Z,X[54]=Y,X[55]=G):G=X[55],X[56]!==G?(W=(0,t.jsxs)(u.Button,{variant:"contained",color:"inherit",size:"large",onClick:et,sx:N,children:[K,(0,t.jsx)(i.Typography,{variant:"body2",color:"text.primary",children:G})]}),X[56]=G,X[57]=W):W=X[57],X[58]!==O||X[59]!==W?(z=(0,t.jsxs)(n.Box,{sx:L,children:[O,W]}
35),X[58]=O,X[59]=W,X[60]=z):z=X[60],X[61]!==j||X[62]!==z?($=(0,t.jsxs)(n.Box,{sx:s,children:[c,j,z]}),X[61]=j,X[62]=z,X[63]=$):$=X[63],X[64]!==a||X[65]!==$?(q=(0,t.jsx)(o.ModalBox,{maxWidth:"sm",title:a,titleLeftPadding:!0,active:"rabby-mobile-guide",disableClose:!1,children:$}),X[64]=a,X[65]=$,X[66]=q):q=X[66],q}],200583);var $=/\s*!(important)?/i;function q(e){return"string"==typeof e?e.replaceAll(" ","_"):e}var X=e=>{let t=new Map;return(...r)=>{let n=JSON.stringify(r);if(t.has(n))return t.get(n);let i=e(...r);return t.set(n,i),i}};function Y(...e){return e.filter(Boolean).reduce((e,t)=>(Object.keys(t).forEach(r=>{let n=e[r],i=t[r];K(n)&&K(i)?e[r]=Y(n,i):e[r]=i}),e),{})}var J=e=>null!=e;function Z(e,t,r={}){let{stop:n,getKey:i}=r;return function e(r,a=[]){if(K(r)||Array.isArray(r)){let o={};for(let[s,A]of Object.entries(r)){let l=i?.(s,A)??s,c=[...a,l];if(n?.(r,c))return t(r,a);let d=e(A,c);J(d)&&(o[l]=d)}return o}return t(r,a)}(e)}function ee(e,t,r=!0){let{utility:n,conditions:i}=t,{hasShorthand:a,resolveShorthand:o}=n;return Z(e,e=>{var t;return Array.isArray(e)?(t=i.breakpoints.keys,e.reduce((e,r,n)=>{let i=t[n];return null!=r&&(e[i]=r),e},{})):e},{stop:e=>Array.isArray(e),getKey:r?e=>a?o(e):e:void 0})}var et={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},er=/([A-Z])/g,en=/^ms-/,ei=X(e=>e.startsWith("--")?e:e.replace(er,"-$1").replace(en,"-ms-").toLowerCase()),ea=(RegExp("^(min|max|clamp|calc)\\(.*\\)"),`(?:${"cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%".split(",").join("|")})`);RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${ea}$`);let eo=new Set("_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_typeNumber,_placeholder_parent,_spinButtons,_data_state_active,_data_state_open,_data_state_open_child,_data_state_closed,_data_swipe_move,_data_swipe_cancel,_data_swipe_end,_data_state_checked,_p3,_srgb,_rec2020,bp300,bp300Only,bp300Down,bp400,bp400Only,bp400Down,bp500,bp500Only,bp500Down,sm,smOnly,smDown,bp600,bp600Only,bp600Down,bp700,bp700Only,bp700Down,bp800,bp800Only,bp800Down,md,mdOnly,mdDown,bp900,bp900Only,bp900Down,bp1000,bp1000Only,bp1000Down,bp1100,bp1100Only,bp1100Down,lg,lgOnly,lgDown,bp1200,bp1200Only,bp1200Down,bp1300,bp1300Only,bp1300Down,xl,xlOnly,xlDown,bp1400,bp1400Only,bp1400Down,bp1500,bp1500Only,bp1500Down,2xl,2xlOnly,2xlDown,bp300ToBp400,bp300ToBp500,bp300ToSm,bp300ToBp600,bp300ToBp700,bp300ToBp800,bp300ToMd,bp300ToBp900,bp300ToBp1000,bp300ToBp1100,bp300ToLg,bp300ToBp1200,bp300ToBp1300,bp300ToXl,bp300ToBp1400,bp300ToBp1500,bp300To2xl,bp400ToBp500,bp400ToSm,bp400ToBp600,bp400ToBp700,bp400ToBp800,bp400ToMd,bp400ToBp900,bp400ToBp1000,bp400ToBp1100,bp400ToLg,bp400ToBp1200,bp400ToBp1300,bp400ToXl,bp400ToBp1400,bp400ToBp1500,bp400To2xl,bp500ToSm,bp500ToBp600,bp500ToBp700,bp500ToBp800,bp500ToMd,bp500ToBp900,bp500ToBp1000,bp500ToBp1100,bp500ToLg,bp500ToBp1200,bp500ToBp1300,bp500ToXl,bp500ToBp1400,bp500ToBp1500,bp500To2xl,smToBp600,smToBp700,smToBp800,smToMd,smToBp900,smToBp1000,smToBp1100,smToLg,smToBp1200,smToBp1300,smToXl,smToBp1400,smToBp1500,smTo2xl,bp600ToBp700,bp600ToBp800,bp600ToMd,bp600ToBp900,bp600ToBp1000,bp600ToBp1100,bp600ToLg,bp600ToBp1200,bp600ToBp1300,bp600ToXl,bp600ToBp1400,bp600ToBp1500,bp600To2xl,bp700ToBp800,bp700ToMd,bp700ToBp900,bp700ToBp1000,bp700ToBp1100,bp700ToLg,bp700ToBp1200,bp700ToBp1300,bp700ToXl,bp700ToBp1400,bp700ToBp1500,bp700To2xl,bp800ToMd,bp800ToBp900,bp800ToBp1000,bp800ToBp1100,bp800ToLg,bp800ToBp1200,bp800ToBp1300,bp800ToXl,bp800ToBp1400,bp800ToBp1500,bp800To2xl,mdToBp900,mdToBp1000,mdToBp1100,mdToLg,mdToBp1200,mdToBp1300,mdToXl,mdToBp1400,mdToBp1500,mdTo2xl,bp900ToBp1000,bp900ToBp1100,bp900ToLg,bp900ToBp1200,bp900ToBp1300,bp900ToXl,bp900ToBp1400,bp900ToBp1500,bp900To2xl,bp1000ToBp1100,bp1000ToLg,bp1000ToBp1200,bp1000ToBp1300,bp1000ToXl,bp1000ToBp1400,bp1000ToBp1500,bp1000To2xl,bp1100ToLg,bp1100ToBp1200,bp1100ToBp1300,bp1100ToXl,bp1100ToBp1400,bp1100ToBp1500,bp1100To2xl,lgToBp1200,lgToBp1300,lgToXl,lgToBp1400,lgToBp1500,lgTo2xl,bp1200ToBp1300,bp1200ToXl,bp1200ToBp1400,bp1200ToBp1500,bp1200To2xl,bp1300ToXl,bp1300ToBp1400,bp1300ToBp1500,bp1300To2xl,xlToBp1400,xlToBp1500,xlTo2xl,bp1400ToBp1500,bp1400To2xl,bp1500To2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base".split(","));function es(e){return eo.has(e)||/^@|&|&$/.test(e)}let eA=/^_/,el=/&|@/,ec=new Map,ed=new Map;"aspectRatio:aspect,boxDecorationBreak:decoration,zIndex:z,boxSizing:box,objectPosition:obj-pos,objectFit:obj-fit,overscrollBehavior:overscroll,overscrollBehaviorX:overscroll-x,overscrollBehaviorY:overscroll-y,position:pos/1,top:top,left:left,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,inset:inset,insetBlockEnd:inset-b,insetBlockStart:inset-t,insetInlineEnd:end/insetEnd/1,insetInlineStart:start/insetStart/1,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:basis,flex:flex,flexDirection:flex/flexDir,flexGrow:grow,flexShrink:shrink,gridTemplateColumns:grid-cols,gridTemplateRows:grid-rows,gridColumn:col-span,gridRow:row-span,gridColumnStart:col-start,gridColumnEnd:col-end,gridAutoFlow:grid-flow,gridAutoColumns:auto-cols,gridAutoRows:auto-rows,gap:gap,gridGap:gap,gridRowGap:gap-x,gridColumnGap:gap-y,rowGap:gap-x,columnGap:gap-y,justifyContent:justify,alignContent:content,alignItems:items,alignSelf:self,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pb,paddingBlockStart:pt,paddingInline:px/pad
35dingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mb,marginBlockStart:mt,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:space-x,spaceY:space-y,outlineWidth:ring-width/ringWidth,outlineColor:ring-color/ringColor,outline:ring/1,outlineOffset:ring-offset/ringOffset,divideX:divide-x,divideY:divide-y,divideColor:divide-color,divideStyle:divide-style,width:w/1,inlineSize:w,minWidth:min-w/minW,minInlineSize:min-w,maxWidth:max-w/maxW,maxInlineSize:max-w,height:h/1,blockSize:h,minHeight:min-h/minH,minBlockSize:min-h,maxHeight:max-h/maxH,maxBlockSize:max-b,color:text,fontFamily:font,fontSize:fs,fontWeight:fw,fontSmoothing:smoothing,fontVariantNumeric:numeric,letterSpacing:tracking,lineHeight:leading,textAlign:text-align,textDecoration:text-decor,textDecorationColor:text-decor-color,textEmphasisColor:text-emphasis-color,textDecorationStyle:decoration-style,textDecorationThickness:decoration-thickness,textUnderlineOffset:underline-offset,textTransform:text-transform,textIndent:indent,textShadow:text-shadow,textShadowColor:text-shadow/textShadowColor,textOverflow:text-overflow,verticalAlign:v-align,wordBreak:break,textWrap:text-wrap,truncate:truncate,lineClamp:clamp,listStyleType:list-type,listStylePosition:list-pos,listStyleImage:list-img,backgroundPosition:bg-pos/bgPosition,backgroundPositionX:bg-pos-x/bgPositionX,backgroundPositionY:bg-pos-y/bgPositionY,backgroundAttachment:bg-attach/bgAttachment,backgroundClip:bg-clip/bgClip,background:bg/1,backgroundColor:bg/bgColor,backgroundOrigin:bg-origin/bgOrigin,backgroundImage:bg-img/bgImage,backgroundRepeat:bg-repeat/bgRepeat,backgroundBlendMode:bg-blend/bgBlendMode,backgroundSize:bg-size/bgSize,backgroundGradient:bg-gradient/bgGradient,textGradient:text-gradient,gradientFromPosition:gradient-from-pos,gradientToPosition:gradient-to-pos,gradientFrom:gradient-from,gradientTo:gradient-to,gradientVia:gradient-via,gradientViaPosition:gradient-via-pos,borderRadius:rounded/1,borderTopLeftRadius:rounded-tl/roundedTopLeft,borderTopRightRadius:rounded-tr/roundedTopRight,borderBottomRightRadius:rounded-br/roundedBottomRight,borderBottomLeftRadius:rounded-bl/roundedBottomLeft,borderTopRadius:rounded-t/roundedTop,borderRightRadius:rounded-r/roundedRight,borderBottomRadius:rounded-b/roundedBottom,borderLeftRadius:rounded-l/roundedLeft,borderStartStartRadius:rounded-ss/roundedStartStart,borderStartEndRadius:rounded-se/roundedStartEnd,borderStartRadius:rounded-s/roundedStart,borderEndStartRadius:rounded-es/roundedEndStart,borderEndEndRadius:rounded-ee/roundedEndEnd,borderEndRadius:rounded-e/roundedEnd,border:border,borderWidth:border-w,borderTopWidth:border-tw,borderLeftWidth:border-lw,borderRightWidth:border-rw,borderBottomWidth:border-bw,borderColor:border,borderInline:border-x/borderX,borderInlineWidth:border-x/borderXWidth,borderInlineColor:border-x/borderXColor,borderBlock:border-y/borderY,borderBlockWidth:border-y/borderYWidth,borderBlockColor:border-y/borderYColor,borderLeft:border-l,borderLeftColor:border-l,borderInlineStart:border-s/borderStart,borderInlineStartWidth:border-s/borderStartWidth,borderInlineStartColor:border-s/borderStartColor,borderRight:border-r,borderRightColor:border-r,borderInlineEnd:border-e/borderEnd,borderInlineEndWidth:border-e/borderEndWidth,borderInlineEndColor:border-e/borderEndColor,borderTop:border-t,borderTopColor:border-t,borderBottom:border-b,borderBottomColor:border-b,borderBlockEnd:border-be,borderBlockEndColor:border-be,borderBlockStart:border-bs,borderBlockStartColor:border-bs,boxShadow:shadow/1,boxShadowColor:shadow-color/shadowColor,mixBlendMode:mix-blend,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:backdrop,backdropBlur:backdrop-blur,backdropBrightness:backdrop-brightness,backdropContrast:backdrop-contrast,backdropGrayscale:backdrop-grayscale,backdropHueRotate:backdrop-hue-rotate,backdropInvert:backdrop-invert,backdropOpacity:backdrop-opacity,backdropSaturate:backdrop-saturate,backdropSepia:backdrop-sepia,borderCollapse:border,borderSpacing:border-spacing,borderSpacingX:border-spacing-x,borderSpacingY:border-spacing-y,tableLayout:table,transitionTimingFunction:ease,transitionDelay:delay,transitionDuration:duration,transitionProperty:transition-prop,transition:transition,animation:animation,animationName:animation-name,animationTimingFunction:animation-ease,animationDuration:animation-duration,animationDelay:animation-delay,transformOrigin:origin,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:accent,caretColor:caret,scrollBehavior:scroll,scrollbar:scrollbar,scrollMargin:scroll-m,scrollMarginLeft:scroll-ml,scrollMarginRight:scroll-mr,scrollMarginTop:scroll-mt,scrollMarginBottom:scroll-mb,scrollMarginBlock:scroll-my/scrollMarginY,scrollMarginBlockEnd:scroll-mb,scrollMarginBlockStart:scroll-mt,scrollMarginInline:scroll-mx/scrollMarginX,scrollMarginInlineEnd:scroll-me,scrollMarginInlineStart:scroll-ms,scrollPadding:scroll-p,scrollPaddingBlock:scroll-pb/scrollPaddingY,scrollPaddingBlockStart:scroll-pt,scrollPaddingBlockEnd:scroll-pb,scrollPaddingInline:scroll-px/scrollPaddingX,scrollPaddingInlineEnd:scroll-pe,scrollPaddingInlineStart:scroll-ps,scrollPaddingLeft:scroll-pl,scrollPaddingRight:scroll-pr,scrollPaddingTop:scroll-pt,scrollPaddingBottom:scroll-pb,scrollSnapAlign:snap-align,scrollSnapStop:snap-stop,scrollSnapType:snap-type,scrollSnapStrictness:snap-strictness,scrollSnapMargin:snap-m,scrollSnapMarginTop:snap-mt,scrollSnapMarginBottom:snap-mb,scrollSnapMarginLeft:snap-ml,scrollSnapMarginRight:snap-mr,touchAction:touch,userSelect:select,fill:fill,stroke:stroke,strokeWidth:stroke-w,srOnly:sr,debug:debug,appearance:appearance,backfaceVisibility:backface,clipPath:clip-path,hyphens:hyphens,mask:mask,maskImage:mask-image,maskSize:mask-size,textSizeAdjust:text-adjust,container:cq,containerName:cq-name,containerType:cq-type,textStyle:textStyle".split(",").forEach(e
35=>{let[t,r]=e.split(":"),[n,...i]=r.split("/");ec.set(t,n),i.length&&i.forEach(e=>{ed.set("1"===e?n:e,t)})});let eu=e=>ed.get(e)||e,eh={conditions:{shift:function(e){return e.sort((e,t)=>{let r=es(e),n=es(t);return r&&!n?1:!r&&n?-1:0})},finalize:function(e){return e.map(e=>eo.has(e)?e.replace(eA,""):el.test(e)?`[${q(e.trim())}]`:e)},breakpoints:{keys:["base","bp300","bp400","bp500","sm","bp600","bp700","bp800","md","bp900","bp1000","bp1100","lg","bp1200","bp1300","xl","bp1400","bp1500","2xl"]}},utility:{prefix:"relay",transform:(e,t)=>{let r=eu(e),n=ec.get(r)||ei(r);return{className:`${n}_${q(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(":")),resolveShorthand:eu}},ep=function(e){let{utility:t,hash:r,conditions:n=et}=e,i=e=>[t.prefix,e].filter(Boolean).join("-");return X(({base:a,...o}={})=>{let s=ee(Object.assign(o,a),e),A=new Set;return Z(s,(e,a)=>{var o;let s="string"==typeof e&&$.test(e);if(null==e)return;let[l,...c]=n.shift(a),d=((e,a)=>{let o;if(r){let r=[...n.finalize(e),a];o=i(t.toHash(r,z))}else o=[...n.finalize(e),i(a)].join(":");return o})(c.slice().filter(e=>"base"!==e),t.transform(l,"string"==typeof(o="string"==typeof e?e.replaceAll(/[\n\s]+/g," "):e)?o.replace($,"").trim():o).className);s&&(d=`${d}!`),A.add(d)}),Array.from(A).join(" ")})}(eh),em=(...e)=>ep(ef(...e));em.raw=(...e)=>ef(...e);let{mergeCss:ef,assignCss:eg}=function(e){function t(t){let r=function(...e){return e.flat().filter(e=>K(e)&&Object.keys(G(e)).length>0)}(...t);return 1===r.length?r:r.map(t=>ee(t,e))}return{mergeCss:X(function(...e){return Y(...t(e))}),assignCss:function(...e){return Object.assign({},...t(e))}}}(eh);e.s(["css",0,em,"mergeCss",0,ef],849145);let ey=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function eb(e){let{base:t,variants:r,defaultVariants:n,compoundVariants:i}=ey(e),a=e=>({...n,...G(e)});function o(e={}){var n,s;let A,l=a(e),c={...t};for(let[e,t]of Object.entries(l))r[e]?.[t]&&(c=ef(c,r[e][t]));return ef(c,(n=i,s=l,A={},n.forEach(e=>{Object.entries(e).every(([e,t])=>"css"===e||(Array.isArray(t)?t:[t]).some(t=>s[e]===t))&&(A=ef(A,e.css))}),A))}let s=Object.keys(r),A=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,Object.keys(t)]));return Object.assign(X(function(e){return em(o(e))}),{__cva__:!0,variantMap:A,variantKeys:s,raw:o,config:e,merge:function(e){let a=ey(e.config),o=((...e)=>e.filter(Boolean).reduce((e,t)=>Array.from(new Set([...e,...t])),[]))(e.variantKeys,Object.keys(r));
35return eb({base:ef(t,a.base),variants:Object.fromEntries(o.map(e=>[e,ef(r[e],a.variants[e])])),defaultVariants:Y(n,a.defaultVariants),compoundVariants:[...i,...a.compoundVariants]})},splitVariantProps:function(e){return function(e,...t){let r=Object.getOwnPropertyDescriptors(e),n=Object.keys(r),i=e=>{let t={};for(let n=0;n<e.length;n++){let i=e[n];r[i]&&(Object.defineProperty(t,i,r[i]),delete r[i])}return t};return t.map(e=>i(Array.isArray(e)?e:n.filter(e))).concat(i(n))}(e,s)},getVariantProps:a})}e.s(["cva",0,eb],457600),e.s([],406185);let ex=eb({base:{display:"flex"},variants:{align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},stretch:{alignItems:"stretch"},baseline:{alignItems:"baseline"},normal:{alignItems:"normal"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},between:{justifyContent:"space-between"}},direction:{row:{flexDirection:"row"},column:{flexDirection:"column"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"}},wrap:{noWrap:{flexWrap:"nowrap"},wrap:{flexWrap:"wrap"},wrapReverse:{flexWrap:"wrap-reverse"}}}}),ew=({css:e,style:r,children:n,id:i,align:a,justify:o,direction:s,wrap:A,...l})=>(0,t.jsx)("div",{className:em(ex.raw({align:a,justify:o,direction:s,wrap:A}),em.raw(e)),style:r,id:i,...l,children:n});e.s(["default",0,ew],830553),e.s(["Flex",0,ew],309833);let ev=eb({base:{cursor:"pointer",outline:"none",fontFamily:"body",fontWeight:700,fontSize:16,transition:"background-color 250ms linear",gap:"2",display:"inline-flex",alignItems:"center",lineHeight:"20px","--focusColor":"colors.focus-color",_focusVisible:{boxShadow:"0 0 0 2px var(--focusColor)"},_disabled:{cursor:"not-allowed",backgroundColor:"button-disabled-background",color:"button-disabled-color",_hover:{backgroundColor:"button-disabled-background",color:"button-disabled-color"}}},variants:{color:{primary:{backgroundColor:"primary-button-background",color:"primary-button-color","&:hover":{backgroundColor:"primary-button-hover-background",color:"primary-button-hover-color"}},secondary:{backgroundColor:"primary4",color:"primary12","&:hover":{backgroundColor:"secondary-button-hover-background",color:"secondary-button-hover-color"}},ghost:{color:"text-default",backgroundColor:"transparent"},white:{"--borderColor":"colors.subtle-border-color",backgroundColor:"widget-background",transition:"filter 250ms linear","&:hover":{filter:"brightness(97%)"},border:"1px solid var(--borderColor)"},error:{backgroundColor:"red9",color:"white","&:hover":{backgroundColor:"red10"}},warning:{backgroundColor:"amber3",color:"amber11","&:hover":{backgroundColor:"amber4",color:"amber11"}},grey:{backgroundColor:"gray3",color:"gray11","&:hover":{backgroundColor:"gray4"}}},corners:{square:{borderRadius:0},rounded:{borderRadius:12},pill:{borderRadius:99999},circle:{borderRadius:"99999px",alignItems:"center",justifyContent:"center"}},size:{none:{},xs:{p:"3",lineHeight:"16px",minHeight:40},small:{px:"3",py:"2",lineHeight:"12px",minHeight:40},medium:{px:"5",py:"3",minHeight:44},large:{px:"5",py:"4",minHeight:52}},cta:{true:{"&:not(:disabled)":{fontFamily:"heading",fontWeight:700,textTransform:"uppercase",fontStyle:"var(--relay-fonts-button-cta-font-style, italic)"}}}},defaultVariants:{color:"primary",corners:"rounded",size:"medium"}}),eC=(0,f.forwardRef)(({css:e,children:r,...n},i)=>{let{color:a,size:o,corners:s,cta:A,...l}={...n};return(0,t.jsx)("button",{...l,ref:i,className:em(ev.raw({color:a,size:o,corners:s,cta:A}),em.raw(e)),children:r})});e.s(["Button",0,eC],613213);let eB=eb({base:{color:"text-default",fontFamily:"body"},variants:{style:{h1:{fontWeight:800,fontSize:"64px",fontFamily:"heading"},h2:{fontWeight:700,fontSize:"48px"},h3:{fontWeight:700,fontSize:"32px"},h4:{fontWeight:700,fontSize:"24px"},h5:{fontWeight:700,fontSize:"20px"},h6:{fontWeight:700,fontSize:"16px"},subtitle1:{fontWeight:500,fontSize:"16px"},subtitle2:{fontWeight:500,fontSize:"14px"},subtitle3:{fontWeight:500,fontSize:"12px"},body1:{fontWeight:400,fontSize:"16px"},body2:{fontWeight:400,fontSize:"14px"},body3:{fontWeight:400,fontSize:"12px"}
35,tiny:{fontWeight:500,fontSize:10,color:"gray11"}},color:{subtle:{color:"text-subtle"},subtleSecondary:{color:"text-subtle-secondary"},error:{color:"text-error"},red:{color:"red11"},blue:{color:"blue12"},success:{color:"text-success"},warning:{color:"amber12"},warningSecondary:{color:"amber11"}},italic:{true:{fontStyle:"italic"}},ellipsify:{true:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}}}}),eS=({css:e,children:r,...n})=>(0,t.jsx)("div",{className:em(eB.raw(n),em.raw(e)),children:r});e.s(["default",0,eS],528539),e.s(["Text",0,eS],310479);let ek=eb({}),eE=({css:e,children:r,id:n,...i})=>(0,t.jsx)("div",{className:em(ek.raw(i),em.raw(e)),id:n,children:r});e.s(["default",0,eE],403275),e.s(["Box",0,eE],446999)},232189,(e,t,r)=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},865156,(e,t,r)=>{"use strict";var n=e.r(232189);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i}
35;return r.PropTypes=r,r}},745009,(e,t,r)=>{t.exports=e.r(865156)()},308727,(e,t,r)=>{t.exports={description:"The iconic font, CSS, and SVG framework",keywords:["font","awesome","fontawesome","icon","svg","bootstrap"],homepage:"https://fontawesome.com",bugs:{url:"https://github.com/FortAwesome/Font-Awesome/issues"},author:"The Font Awesome Team (https://github.com/orgs/FortAwesome/people)",repository:{type:"git",url:"https://github.com/FortAwesome/Font-Awesome"},engines:{node:">=6"},dependencies:{"@fortawesome/fontawesome-common-types":"6.7.2"},version:"6.7.2",name:"@fortawesome/fontawesome-svg-core",main:"index.js",module:"index.mjs","jsnext:main":"index.mjs",style:"styles.css",license:"MIT",types:"./index.d.ts",exports:{".":{types:"./index.d.ts",module:"./index.mjs",import:"./index.mjs",require:"./index.js",style:"./styles.css",default:"./index.js"},"./index":{types:"./index.d.ts",module:"./index.mjs",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./index.js":{types:"./index.d.ts",module:"./index.mjs",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./plugins":{types:"./index.d.ts",module:"./plugins.mjs",import:"./plugins.mjs",default:"./plugins.mjs"},"./import.macro":"./import.macro.js","./import.macro.js":"./import.macro.js","./styles":"./styles.css","./styles.css":"./styles.css","./package.json":"./package.json"},sideEffects:["./index.js","./index.mjs","./styles.css"]}},902282,156720,700510,285311,282084,329805,811488,747727,642691,e=>{"use strict";var t,r=e.i(271645),n=e.i(499800);function i(){return(0,r.useContext)(n.RelayClientContext)}e.s(["default",0,i],156720),e.s(["useRelayClient",0,i],902282);var a=e.i(24335);function o(e,t={}){let r=function(e,t={}){try{return e.getClient(t)}catch{return}}(e,t);return r?.extend(a.publicActions)}var s=e.i(451797),A=e.i(210920);e.s(["usePublicClient",0,function(e={}){let t=(0,A.useConfig)(e);return(0,s.useSyncExternalStoreWithSelector)(e=>(function(e,t){let{onChange:r}=t;return e.subscribe(()=>o(e),r,{equalityFn:(e,t)=>e?.uid===t?.uid})})(t,{onChange:e}),()=>o(t,e),()=>o(t,e),e=>e,(e,t)=>e?.uid===t?.uid)}],700510);var l=e.i(644616);let{format:c}=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),d=(e,t)=>e.map(({type:e,value:r})=>{if("fraction"!==e||!r||r.length<t)return r;let n="";for(let e=0;e<r.length&&e<t;e++)n+=r[e];return n}).reduce((e,t)=>e+t);e.s(["formatBN",0,function(e,t,r=18,n=!0,i={}){if(null==e)return"-";let a="number"==typeof e?e:+(0,l.formatUnits)(BigInt(e),r??18);if(0===a)return`${a}`;let o=`${e}`.split(".")[1],s="u">typeof window&&navigator.userAgent.indexOf("Safari")>-1&&-1>=navigator.userAgent.indexOf("Chrome"),A={minimumFractionDigits:0,maximumFractionDigits:20,useGrouping:!0,notation:n?"compact":"standard",compactDisplay:"short",...i};s&&(A.roundingPriority="lessPrecision");let c=new Intl.NumberFormat("en-US",A).formatToParts(a);if(s){let t=c.map(e=>e.type),r=t.includes("fraction"),n=t.includes("compact");if(o){if(!r&&!n){let e=c.findIndex(e=>"integer"===e.type);c.splice(e+1,0,{type:"decimal",value:"."},{type:"fraction",value:o})}}else if(!r&&n){let t=c.find(e=>"compact"===e.type),r=c.findIndex(e=>"integer"===e.type),n=c[r];if(t?.value==="K"&&n){let t=`${e}`.replace(n.value,"")[0];t&&Number(t)>0&&c.splice(r+1,0,{type:"decimal",value:"."},{type:"fraction",value:t})}}}if(!c||!(c.length>0))return"string"==typeof e||"number"==typeof e?`${e}`:"";{let e=Number(`0.${Array(t).join("0")}1`);return a>1e3?d(c,1):a<1&&a<e?`< ${e}`:d(c,t)}},"formatDollar",0,function(e){if(null==e||0===e)return"-";if(Math.abs(e)>=1e9)return">$1B";let t=c(e);return"$0.00"===t&&e&&e>0?"< $0.01":t},"formatFixedLength",0,function(e,t){if(!/^[-+]?\d*\.?\d*$/.test(e))return"Invalid number";let r=e.startsWith("-"),n=e.replace(/^-/,"");if(n.includes(".")){let e=n.split("."),r=e[0],i=e[1]||"",a=t-r.length;n=r.length>=t?r:r+"."+i.substring(0,a)}return n=n.replace(/\.0+$/,"").replace(/\.(\d*[^0])0+$/,".$1").replace(/\.$/,""),r&&(n="-"+n),n},"formatNumber",0,function(e,t=2,r){let{format:n}=new Intl.NumberFormat("en-US",{maximumFractionDigits:t,notation:r?"compact":"standard"});if(!e)return"-";let i=Number(e);if(i>=1e9)return">1B";if(i>0){let e=Math.pow(10,-t);if(i<e){let r=e.toFixed(t);return`< ${r}`}}return n(i).replace(/\.?0+$/,"")},"formatSignificantDigits",0,function(e,t=18){let r,n;if(null==e)return"-";if("bigint"==typeof e)r=+(0,l.formatUnits)(e,t);else if("string"==typeof e)try{r=+(0,l.formatUnits)(BigInt(e),t)}catch{r=parseFloat(e)}else r=e;if(isNaN(r)||0===r)return"0";let i=Math.abs(r),a=r<0;if(i>=1)(n=i.toPrecision(6)).includes("e")||(n=n.replace(/(\.\d*?[1-9])0+$/,"$1").replace(/\.0+$/,""));else if(i<1e-5)n="< 0.00001";else{let[,e]=i.toString().split(".");("0."===(n=(n="0."+e.substring(0,5)).replace(/0+$/,""))||"0"===n)&&(n="< 0.00001")}return a?"-"+n:n}],285311);var u=e.i(474076),h=e.i(830553);e.i(406185);var p=e.i(457600),m=e.i(849145),f=e.i(403275);let g=(0,p.cva)({base:{px:16,py:12,borderRadius:"input-border-radius",fontFamily:"body",fontSize:16,color:"input-color",backgroundColor:"input-background",_placeholder:{color:"gray10"},"--focusColor":"colors.focus-color",_focus:{boxShadow:"inset 0 0 0 2px var(--focusColor)",outline:"none"},_disabled:{cursor:"not-allowed"},_spinButtons:{WebkitAppearance:"none"}},variants:{size:{large:{fontSize:32,lineHeight:"42px"}}
35,ellipsify:{true:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}}}}),y=(0,r.forwardRef)(({children:e,icon:t,iconPosition:r,iconCss:n,containerCss:i,inputStyle:a,css:o,...s},A)=>{let{size:l,ellipsify:c,style:d,...p}=s;return(0,u.jsxs)(h.default,{css:{...i},style:{...d},children:[t&&(0,u.jsx)(h.default,{css:{position:"relative"},children:(0,u.jsx)(f.default,{css:{position:"absolute",top:12,left:"right"===r?"unset":16,right:"right"===r?16:"unset",zIndex:0,...n},children:t})}),(0,u.jsx)("input",{...p,type:"text",ref:A,style:{paddingLeft:t&&"right"!==r?42:16,paddingRight:t&&"right"===r?42:16,...a},className:(0,m.css)(g.raw({size:l,ellipsify:c}),m.css.raw({...o}))})]})});y.displayName="Input",e.s(["Input",0,y],282084),e.s(["default",0,({value:e,setValue:t,prefixSymbol:r,...n})=>(0,u.jsx)(y,{...n,type:"text",inputMode:"decimal",autoComplete:"off",autoCorrect:"off",pattern:"^[0-9]+(\\.[0-9]*)?$",ellipsify:!0,size:"large",className:"ph-no-capture",css:{width:"100%",background:"none",backgroundColor:"transparent",fontWeight:"600",fontSize:32,px:"0 !important",py:"1",_focus:{boxShadow:"none",outline:"none"},_placeholder:{color:"gray12"},...n.css},placeholder:n.placeholder??"0",value:r?`${r}${e}`:e,onChange:n.onChange?n.onChange:e=>{let n=e.target.value;r&&n.startsWith(r)&&(n=n.substring(r.length)),"."===n||n.includes(",")?t("0."):(/^[0-9]+(\.[0-9]*)?$/.test(n)||""===n)&&t(n)}})],329805);var b=e.i(247167);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let v=()=>{},C={},B={},S=null,k={mark:v,measure:v};try{"u">typeof window&&(C=window),"u">typeof document&&(B=document),"u">typeof MutationObserver&&(S=MutationObserver),"u">typeof performance&&(k=performance)}catch(e){}let{userAgent:E=""}=C.navigator||{},F=C,T=B,U=S,I=k;F.document;let Q=!!T.documentElement&&!!T.head&&"function"==typeof T.addEventListener&&"function"==typeof T.createElement,j=~E.indexOf("MSIE")||~E.indexOf("Trident/");var L={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},_=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],P="classic",D="duotone",R=[P,D,"sharp","sharp-duotone"],M=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),O=["fak","fa-kit","fakd","fa-kit-duotone"],N=["fak","fakd"],H=["fak","fa-kit","fakd","fa-kit-duotone"],V={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},K=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],G=[1,2,3,4,5,6,7,8,9,10],W=G.concat([11,12,13,14,15,16,17,18,19,20]),z=["classic","duotone","sharp","sharp-duotone","solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vert
35ical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","duotone-group","swap-opacity","primary","secondary"].concat(G.map(e=>"".concat(e,"x"))).concat(W.map(e=>"w-".concat(e)));let $="___FONT_AWESOME___",q="svg-inline--fa",X="data-fa-i2svg",Y="data-fa-pseudo-element",J="data-prefix",Z="data-icon",ee="fontawesome-i2svg",et=["HTML","HEAD","STYLE","SCRIPT"],er=(()=>{try{return!0}catch(e){return!1}})();function en(e){return new Proxy(e,{get:(e,t)=>t in e?e[t]:e[P]})}let ei=w({},L);ei[P]=w(w(w(w({},{"fa-duotone":"duotone"}),L[P]),{fak:"kit","fa-kit":"kit"}),{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"});let ea=en(ei),eo=w({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}});eo[P]=w(w(w(w({},{duotone:"fad"}),eo[P]),{kit:"fak"}),{"kit-duotone":"fakd"});let es=en(eo),eA=w({},V);eA[P]=w(w({},eA[P]),{fak:"fa-kit"});let el=en(eA),ec=w({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}});ec[P]=w(w({},ec[P]),{"fa-kit":"fak"}),en(ec);let ed=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,eu="fa-layers-text",eh=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;en(w({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}}));let ep=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],em=["kit",...z],ef=F.FontAwesomeConfig||{};T&&"function"==typeof T.querySelector&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(e=>{var t;let[r,n]=e,i=""===(t=function(e){var t=T.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(r))||"false"!==t&&("true"===t||t);null!=i&&(ef[n]=i)});let eg={styleDefault:"solid",familyDefault:P,cssPrefix:"fa",replacementClass:q,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};ef.familyPrefix&&(ef.cssPrefix=ef.familyPrefix);let ey=w(w({},eg),ef);ey.autoReplaceSvg||(ey.observeMutations=!1);let eb={};Object.keys(eg).forEach(e=>{Object.defineProperty(eb,e,{enumerable:!0,set:function(t){ey[e]=t,ex.forEach(e=>e(eb))},get:function(){return ey[e]}})}),Object.defineProperty(eb,"familyPrefix",{enumerable:!0,set:function(e){ey.cssPrefix=e,ex.forEach(e=>e(eb))},get:function(){return ey.cssPrefix}}),F.FontAwesomeConfig=eb;let ex=[],ew={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function ev(){let e=12,t="";for(;e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function eC(e){let t=[];for(let r=(e||[]).length>>>0;r--;)t[r]=e[r];return t}function eB(e){return e.classList?eC(e.classList):(e.getAttribute("class")||"").split(" ").filter(e=>e)}function eS(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ek(e){return Object.keys(e||{}).reduce((t,r)=>t+"".concat(r,": ").concat(e[r].trim(),";"),"")}function eE(e){return e.size!==ew.size||e.x!==ew.x||e.y!==ew.y||e.rotate!==ew.rotate||e.flipX||e.flipY}function eF(){let e=eb.cssPrefix,t=eb.replacementClass,r
vendor: 12,892 bytes, line 35
35=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}';if(
35"fa"!==e||t!==q){let n=RegExp("\\.".concat("fa","\\-"),"g"),i=RegExp("\\--".concat("fa","\\-"),"g"),a=RegExp("\\.".concat(q),"g");r=r.replace(n,".".concat(e,"-")).replace(i,"--".concat(e,"-")).replace(a,".".concat(t))}return r}let eT=!1;function eU(){eb.autoAddCss&&!eT&&(!function(e){if(!e||!Q)return;let t=T.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;let r=T.head.childNodes,n=null;for(let e=r.length-1;e>-1;e--){let t=r[e];["STYLE","LINK"].indexOf((t.tagName||"").toUpperCase())>-1&&(n=t)}T.head.insertBefore(t,n)}(eF()),eT=!0)}let eI=F||{};eI[$]||(eI[$]={}),eI[$].styles||(eI[$].styles={}),eI[$].hooks||(eI[$].hooks={}),eI[$].shims||(eI[$].shims=[]);var eQ=eI[$];let ej=[],eL=function(){T.removeEventListener("DOMContentLoaded",eL),e_=1,ej.map(e=>e())},e_=!1;function eP(e){let{tag:t,attributes:r={},children:n=[]}=e;return"string"==typeof e?eS(e):"<".concat(t," ").concat(Object.keys(r||{}).reduce((e,t)=>e+"".concat(t,'="').concat(eS(r[t]),'" '),"").trim(),">").concat(n.map(eP).join(""),"</").concat(t,">")}function eD(e,t,r){if(e&&e[t]&&e[t][r])return{prefix:t,iconName:r,icon:e[t][r]}}Q&&((e_=(T.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(T.readyState))||T.addEventListener("DOMContentLoaded",eL));var eR=function(e,t,r,n){var i,a,o,s=Object.keys(e),A=s.length,l=void 0!==n?function(e,r,i,a){return t.call(n,e,r,i,a)}:t;for(void 0===r?(i=1,o=e[s[0]]):(i=0,o=r);i<A;i++)o=l(o,e[a=s[i]],a,e);return o};function eM(e){let t=function(e){let t=[],r=0,n=e.length;for(;r<n;){let i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){let n=e.charCodeAt(r++);(64512&n)==56320?t.push(((1023&i)<<10)+(1023&n)+65536):(t.push(i),r--)}else t.push(i)}return t}(e);return 1===t.length?t[0].toString(16):null}function eO(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return n.icon?t[n.iconName]=n.icon:t[r]=n,t},{})}function eN(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{skipHooks:n=!1}=r,i=eO(t);"function"!=typeof eQ.hooks.addPack||n?eQ.styles[e]=w(w({},eQ.styles[e]||{}),i):eQ.hooks.addPack(e,eO(t)),"fas"===e&&eN("fa",t)}let{styles:eH,shims:eV}=eQ,eK=Object.keys(el),eG=eK.reduce((e,t)=>(e[t]=Object.keys(el[t]),e),{}),eW=null,ez={},e$={},eq={},eX={},eY={},eJ=()=>{let e=e=>eR(eH,(t,r,n)=>(t[n]=eR(r,e,{}),t),{});ez=e((e,t,r)=>(t[3]&&(e[t[3]]=r),t[2]&&t[2].filter(e=>"number"==typeof e).forEach(t=>{e[t.toString(16)]=r}),e)),e$=e((e,t,r)=>(e[r]=r,t[2]&&t[2].filter(e=>"string"==typeof e).forEach(t=>{e[t]=r}),e)),eY=e((e,t,r)=>{let n=t[2];
35return e[r]=r,n.forEach(t=>{e[t]=r}),e});let t="far"in eH||eb.autoFetchSvg,r=eR(eV,(e,r)=>{let n=r[0],i=r[1],a=r[2];return"far"!==i||t||(i="fas"),"string"==typeof n&&(e.names[n]={prefix:i,iconName:a}),"number"==typeof n&&(e.unicodes[n.toString(16)]={prefix:i,iconName:a}),e},{names:{},unicodes:{}});eq=r.names,eX=r.unicodes,eW=e4(eb.styleDefault,{family:eb.familyDefault})};function eZ(e,t){return(ez[e]||{})[t]}function e0(e,t){return(eY[e]||{})[t]}function e1(e){return eq[e]||{prefix:null,iconName:null}}ex.push(e=>{eW=e4(e.styleDefault,{family:eb.familyDefault})}),eJ();let e2=()=>({prefix:null,iconName:null,rest:[]});function e4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{family:r=P}=t,n=ea[r][e];if(r===D&&!e)return"fad";let i=es[r][e]||es[r][n],a=e in eQ.styles?e:null;return i||a||null}function e3(e){return e.sort().filter((e,t,r)=>r.indexOf(e)===t)}function e5(e){let t,r,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{skipLookups:o=!1}=a,s=null,A=K.concat(H),l=e3(e.filter(e=>A.includes(e))),c=e3(e.filter(e=>!K.includes(e))),[d=null]=l.filter(e=>(s=e,!_.includes(e))),u=(t=P,r=eK.reduce((e,t)=>(e[t]="".concat(eb.cssPrefix,"-").concat(t),e),{}),R.forEach(e=>{(l.includes(r[e])||l.some(t=>eG[e].includes(t)))&&(t=e)}),t),h=w(w({},(n=[],i=null,c.forEach(e=>{var t;let r,a,o,s=(t=eb.cssPrefix,a=(r=e.split("-"))[0],o=r.slice(1).join("-"),a!==t||""===o||~em.indexOf(o)?null:o);s?i=s:e&&n.push(e)}),{iconName:i,rest:n})),{},{prefix:e4(d,{family:u})});return w(w(w({},h),function(e){let{values:t,family:r,canonical:n,givenPrefix:i="",styles:a={},config:o={}}=e,s=r===D,A=t.includes("fa-duotone")||t.includes("fad"),l="duotone"===o.familyDefault,c="fad"===n.prefix||"fa-duotone"===n.prefix;return!s&&(A||l||c)&&(n.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(n.prefix="fab"),!n.prefix&&e6.includes(r)&&(Object.keys(a).find(e=>e8.includes(e))||o.autoFetchSvg)&&(n.prefix=M.get(r).defaultShortPrefixId,n.iconName=e0(n.prefix,n.iconName)||n.iconName),("fa"===n.prefix||"fa"===i)&&(n.prefix=eW||"fas"),n}({values:e,family:u,styles:eH,config:eb,canonical:h,givenPrefix:s})),function(e,t,r){let{prefix:n,iconName:i}=r;if(e||!n||!i)return{prefix:n,iconName:i};let a="fa"===t?e1(i):{},o=e0(n,i);return i=a.iconName||o||i,"far"!==(n=a.prefix||n)||eH.far||!eH.fas||eb.autoFetchSvg||(n="fas"),{prefix:n,iconName:i}}(o,s,h))}let e6=R.filter(e=>e!==P||e!==D),e8=Object.keys(V).filter(e=>e!==P).map(e=>Object.keys(V[e])).flat(),e7=[],e9={},te={},tt=Object.keys(te);function tr(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return(e9[e]||[]).forEach(e=>{t=e.apply(null,[t,...n])}),t}function tn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(e9[e]||[]).forEach(e=>{e.apply(null,r)})}function ti(){let e=arguments[0],t=Array.prototype.slice.call(arguments,1);return te[e]?te[e].apply(null,t):void 0}function ta(e){"fa"===e.prefix&&(e.prefix="fas");let{iconName:t}=e,r=e.prefix||eW;if(t)return t=e0(r,t)||t,eD(to.definitions,r,t)||eD(eQ.styles,r,t)}let to=new class{constructor(){this.definitions={}}add(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=t.reduce(this._pullDefinitions,{});Object.keys(n).forEach(e=>{this.definitions[e]=w(w({},this.definitions[e]||{}),n[e]),eN(e,n[e]);let t=el[P][e];t&&eN(t,n[e]),eJ()})}reset(){this.definitions={}}_pullDefinitions(e,t){let r=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(r).map(t=>{let{prefix:n,iconName:i,icon:a}=r[t],o=a[2];e[n]||(e[n]={}),o.length>0&&o.forEach(t=>{"string"==typeof t&&(e[n][t]=a)}),e[n][i]=a}),e}},ts={noAuto:()=>{eb.autoReplaceSvg=!1,eb.observeMutations=!1,tn("noAuto")},config:eb,dom:{i2svg:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Q?(tn("beforeI2svg",e),ti("pseudoElements2svg",e),ti("i2svg",e)):Promise.reject(Error("Operation requires a DOM of some kind."))},watch:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{autoReplaceSvgRoot:r}=t;!1===eb.autoReplaceSvg&&(eb.autoReplaceSvg=!0),eb.observeMutations=!0,e=()=>{tA({autoReplaceSvgRoot:r}),tn("watch",t)},Q&&(e_?setTimeout(e,0):ej.push(e))}},parse:{icon:e=>{if(null===e)return null;if("object"==typeof e&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:e0(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){let t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],r=e4(e[0]);return{prefix:r,iconName:e0(r,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(eb.cssPrefix,"-"))>-1||e.match(ed))){let t=e5(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||eW,iconName:e0(t.prefix,t.iconName)||t.iconName}}if("string"==typeof e){let t=eW;return{prefix:t,iconName:e0(t,e)||e}}}},library:to,findIconDefinition:ta,toHtml:eP},tA=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{autoReplaceSvgRoot:t=T}=e;
35(Object.keys(eQ.styles).length>0||eb.autoFetchSvg)&&Q&&eb.autoReplaceSvg&&ts.dom.i2svg({node:t})};function tl(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(e=>eP(e))}}),Object.defineProperty(e,"node",{get:function(){if(!Q)return;let t=T.createElement("div");return t.innerHTML=e.html,t.children}}),e}function tc(e){let{icons:{main:t,mask:r},prefix:n,iconName:i,transform:a,symbol:o,title:s,maskId:A,titleId:l,extra:c,watchable:d=!1}=e,{width:u,height:h}=r.found?r:t,p=N.includes(n),m=[eb.replacementClass,i?"".concat(eb.cssPrefix,"-").concat(i):""].filter(e=>-1===c.classes.indexOf(e)).filter(e=>""!==e||!!e).concat(c.classes).join(" "),f={children:[],attributes:w(w({},c.attributes),{},{"data-prefix":n,"data-icon":i,class:m,role:c.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(u," ").concat(h)})},g=p&&!~c.classes.indexOf("fa-fw")?{width:"".concat(u/h*1,"em")}:{};d&&(f.attributes[X]=""),s&&(f.children.push({tag:"title",attributes:{id:f.attributes["aria-labelledby"]||"title-".concat(l||ev())},children:[s]}),delete f.attributes.title);let y=w(w({},f),{},{prefix:n,iconName:i,main:t,mask:r,maskId:A,transform:a,symbol:o,styles:w(w({},g),c.styles)}),{children:b,attributes:x}=r.found&&t.found?ti("generateAbstractMask",y)||{children:[],attributes:{}}:ti("generateAbstractIcon",y)||{children:[],attributes:{}};return(y.children=b,y.attributes=x,o)?function(e){let{prefix:t,iconName:r,children:n,attributes:i,symbol:a}=e,o=!0===a?"".concat(t,"-").concat(eb.cssPrefix,"-").concat(r):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:w(w({},i),{},{id:o}),children:n}]}]}(y):function(e){let{children:t,main:r,mask:n,attributes:i,styles:a,transform:o}=e;if(eE(o)&&r.found&&!n.found){let{width:e,height:t}=r,n={x:e/t/2,y:.5};i.style=ek(w(w({},a),{},{"transform-origin":"".concat(n.x+o.x/16,"em ").concat(n.y+o.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(y)}function td(e){let{content:t,width:r,height:n,transform:i,title:a,extra:o,watchable:s=!1}=e,A=w(w(w({},o.attributes),a?{title:a}:{}),{},{class:o.classes.join(" ")});s&&(A[X]="");let l=w({},o.styles);eE(i)&&(l.transform=function(e){let{transform:t,width:r=16,height:n=16,startCentered:i=!1}=e,a="";return i&&j?a+="translate(".concat(t.x/16-r/2,"em, ").concat(t.y/16-n/2,"em) "):i?a+="translate(calc(-50% + ".concat(t.x/16,"em), calc(-50% + ").concat(t.y/16,"em)) "):a+="translate(".concat(t.x/16,"em, ").concat(t.y/16,"em) "),a+="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a+="rotate(".concat(t.rotate,"deg) ")}({transform:i,startCentered:!0,width:r,height:n}),l["-webkit-transform"]=l.transform);let c=ek(l);c.length>0&&(A.style=c);let d=[];return d.push({tag:"span",attributes:A,children:[t]}),a&&d.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),d}let{styles:tu}=eQ;function th(e){let t=e[0],r=e[1],[n]=e.slice(4);return{found:!0,width:t,height:r,icon:Array.isArray(n)?{tag:"g",attributes:{class:"".concat(eb.cssPrefix,"-").concat("duotone-group")},children:[{tag:"path",attributes:{class:"".concat(eb.cssPrefix,"-").concat("secondary"),fill:"currentColor",d:n[0]}},{tag:"path",attributes:{class:"".concat(eb.cssPrefix,"-").concat("primary"),fill:"currentColor",d:n[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:n}}}}let tp={found:!1,width:512,height:512};function tm(e,t){let r=t;return"fa"===t&&null!==eb.styleDefault&&(t=eW),new Promise((n,i)=>{var a,o;if("fa"===r){let r=e1(e)||{};e=r.iconName||e,t=r.prefix||t}if(e&&t&&tu[t]&&tu[t][e])return n(th(tu[t][e]));a=e,o=t,er||eb.showMissingIcons||!a||console.error('Icon with name "'.concat(a,'" and prefix "').concat(o,'" is missing.')),n(w(w({},tp),{},{icon:eb.showMissingIcons&&e&&ti("missingIconAbstract")||{}}))})}let tf=()=>{},tg=eb.measurePerformance&&I&&I.mark&&I.measure?I:{mark:tf,measure:tf},ty='FA "6.7.2"';var tb=e=>(tg.mark("".concat(ty," ").concat(e," begins")),()=>{var t;return t=e,void(tg.mark("".concat(ty," ").concat(t," ends")),tg.measure("".concat(ty," ").concat(t),"".concat(ty," ").concat(t," begins"),"".concat(ty," ").concat(t," ends")))});let tx=()=>{};function tw(e){return"string"==typeof(e.getAttribute?e.getAttribute(X):null)}function tv(e){return T.createElementNS("http://www.w3.org/2000/svg",e)}function tC(e){return T.createElement(e)}let tB={replace:function(e){let t=e[0];
35if(t.parentNode)if(e[1].forEach(e=>{t.parentNode.insertBefore(function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{ceFn:n="svg"===t.tag?tv:tC}=r;if("string"==typeof t)return T.createTextNode(t);let i=n(t.tag);return Object.keys(t.attributes||[]).forEach(function(e){i.setAttribute(e,t.attributes[e])}),(t.children||[]).forEach(function(t){i.appendChild(e(t,{ceFn:n}))}),i}(e),t)}),null===t.getAttribute(X)&&eb.keepOriginalSource){let e,r=T.createComment((e=" ".concat(t.outerHTML," "),e="".concat(e,"Font Awesome fontawesome.com ")));t.parentNode.replaceChild(r,t)}else t.remove()},nest:function(e){let t=e[0],r=e[1];if(~eB(t).indexOf(eb.replacementClass))return tB.replace(e);let n=new RegExp("".concat(eb.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){let e=r[0].attributes.class.split(" ").reduce((e,t)=>(t===eb.replacementClass||t.match(n)?e.toSvg.push(t):e.toNode.push(t),e),{toNode:[],toSvg:[]});r[0].attributes.class=e.toSvg.join(" "),0===e.toNode.length?t.removeAttribute("class"):t.setAttribute("class",e.toNode.join(" "))}let i=r.map(e=>eP(e)).join("\n");t.setAttribute(X,""),t.innerHTML=i}};function tS(e){e()}function tk(e,t){let r="function"==typeof t?t:tx;if(0===e.length)r();else{let t=tS;"async"===eb.mutateApproach&&(t=F.requestAnimationFrame||tS),t(()=>{let t=!0===eb.autoReplaceSvg?tB.replace:tB[eb.autoReplaceSvg]||tB.replace,n=tb("mutate");e.map(t),n(),r()})}}let tE=!1,tF=null;function tT(e){if(!U||!eb.observeMutations)return;let{treeCallback:t=tx,nodeCallback:r=tx,pseudoElementsCallback:n=tx,observeMutationsRoot:i=T}=e;tF=new U(e=>{if(tE)return;let i=eW;eC(e).forEach(e=>{if("childList"===e.type&&e.addedNodes.length>0&&!tw(e.addedNodes[0])&&(eb.searchPseudoElements&&n(e.target),t(e.target)),"attributes"===e.type&&e.target.parentNode&&eb.searchPseudoElements&&n(e.target.parentNode),"attributes"===e.type&&tw(e.target)&&~ep.indexOf(e.attributeName)){var a,o;let t,n;if("class"===e.attributeName&&(t=(a=e.target).getAttribute?a.getAttribute(J):null,n=a.getAttribute?a.getAttribute(Z):null,t&&n)){let{prefix:t,iconName:r}=e5(eB(e.target));e.target.setAttribute(J,t||i),r&&e.target.setAttribute(Z,r)}else(o=e.target)&&o.classList&&o.classList.contains&&o.classList.contains(eb.replacementClass)&&r(e.target)}})}),Q&&tF.observe(i,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function tU(e){var t,r,n;let i,a,o,s,A,l,c,d,u,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},{iconName:p,prefix:m,rest:f}=(i=(t=e).getAttribute("data-prefix"),a=t.getAttribute("data-icon"),o=void 0!==t.innerText?t.innerText.trim():"",((s=e5(eB(t))).prefix||(s.prefix=eW),i&&a&&(s.prefix=i,s.iconName=a),s.iconName&&s.prefix)?s:(s.prefix&&o.length>0&&(r=s.prefix,n=t.innerText,s.iconName=(e$[r]||{})[n]||eZ(s.prefix,eM(t.innerText))),!s.iconName&&eb.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(s.iconName=t.firstChild.data),s)),g=(A=eC(e.attributes).reduce((e,t)=>("class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e),{}),l=e.getAttribute("title"),c=e.getAttribute("data-fa-title-id"),eb.autoA11y&&(l?A["aria-labelledby"]="".concat(eb.replacementClass,"-title-").concat(c||ev()):(A["aria-hidden"]="true",A.focusable="false")),A),y=tr("parseNodeAttributes",{},e),b=h.styleParser?(d=e.getAttribute("style"),u=[],d&&(u=d.split(";").reduce((e,t)=>{let r=t.split(":"),n=r[0],i=r.slice(1);return n&&i.length>0&&(e[n]=i.join(":").trim()),e},{})),u):[];return w({iconName:p,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:m,transform:ew,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:f,styles:b,attributes:g}},y)}let{styles:tI}=eQ;function tQ(e){let t="nest"===eb.autoReplaceSvg?tU(e,{styleParser:!1}):tU(e);return~t.extra.classes.indexOf(eu)?ti("generateLayersText",e,t):ti("generateSvgReplacementMutation",e,t)}function tj(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Q)return Promise.resolve();let r=T.documentElement.classList,n=e=>r.add("".concat(ee,"-").concat(e)),i=e=>r.remove("".concat(ee,"-").concat(e)),a=eb.autoFetchSvg?[...O,...K]:_.concat(Object.keys(tI));a.includes("fa")||a.push("fa");let o=[".".concat(eu,":not([").concat(X,"])")].concat(a.map(e=>".".concat(e,":not([").concat(X,"])"))).join(", ");
35if(0===o.length)return Promise.resolve();let s=[];try{s=eC(e.querySelectorAll(o))}catch(e){}if(!(s.length>0))return Promise.resolve();n("pending"),i("complete");let A=tb("onTree"),l=s.reduce((e,t)=>{try{let r=tQ(t);r&&e.push(r)}catch(e){er||"MissingIcon"!==e.name||console.error(e)}return e},[]);return new Promise((e,r)=>{Promise.all(l).then(r=>{tk(r,()=>{n("active"),n("complete"),i("pending"),"function"==typeof t&&t(),A(),e()})}).catch(e=>{A(),r(e)})})}function tL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;tQ(e).then(e=>{e&&tk([e],t)})}let t_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{transform:r=ew,symbol:n=!1,mask:i=null,maskId:a=null,title:o=null,titleId:s=null,classes:A=[],attributes:l={},styles:c={}}=t;if(!e)return;let{prefix:d,iconName:u,icon:h}=e;return tl(w({type:"icon"},e),()=>(tn("beforeDOMElementCreation",{iconDefinition:e,params:t}),eb.autoA11y&&(o?l["aria-labelledby"]="".concat(eb.replacementClass,"-title-").concat(s||ev()):(l["aria-hidden"]="true",l.focusable="false")),tc({icons:{main:th(h),mask:i?th(i.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:u,transform:w(w({},ew),r),symbol:n,title:o,maskId:a,titleId:s,extra:{attributes:l,styles:c,classes:A}})))},tP=RegExp('"',"ug"),tD=w(w(w(w({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),tR=Object.keys(tD).reduce((e,t)=>(e[t.toLowerCase()]=tD[t],e),{}),tM=Object.keys(tR).reduce((e,t)=>{let r=tR[t];return e[t]=r[900]||[...Object.entries(r)][0][1],e},{});function tO(e,t){let r="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise((n,i)=>{if(null!==e.getAttribute(r))return n();let a=eC(e.children).filter(e=>e.getAttribute(Y)===t)[0],o=F.getComputedStyle(e,t),s=o.getPropertyValue("font-family"),A=s.match(eh),l=o.getPropertyValue("font-weight"),c=o.getPropertyValue("content");if(a&&!A)return e.removeChild(a),n();if(A&&"none"!==c&&""!==c){var d;let c,u,h,p,m,f,g,y,b,x,v=o.getPropertyValue("content"),C=(p=s.replace(/^['"]|['"]$/g,"").toLowerCase(),f=isNaN(m=parseInt(l))?"normal":m,(tR[p]||{})[f]||tM[p]),{value:B,isSecondary:S}=(u=(d=g=v.replace(tP,"")).length,b=(y=(h=d.charCodeAt(0))>=55296&&h<=56319&&u>1&&(c=d.charCodeAt(1))>=56320&&c<=57343?(h-55296)*1024+c-56320+65536:h)>=1105920&&y<=1112319,{value:(x=2===g.length&&g[0]===g[1])?eM(g[0]):eM(g),isSecondary:b||x}),k=A[0].startsWith("FontAwesome"),E=eZ(C,B),F=E;if(k){let e,t,r=(e=eX[B],t=eZ("fas",B),e||(t?{prefix:"fas",iconName:t}:null)||{prefix:null,iconName:null});r.iconName&&r.prefix&&(E=r.iconName,C=r.prefix)}if(!E||S||a&&a.getAttribute(J)===C&&a.getAttribute(Z)===F)n();else{e.setAttribute(r,F),a&&e.removeChild(a);let o={iconName:null,title:null,titleId:null,prefix:null,transform:ew,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},{extra:s}=o;s.attributes[Y]=t,tm(E,C).then(i=>{let a=tc(w(w({},o),{},{icons:{main:i,mask:e2()},prefix:C,iconName:F,extra:s,watchable:!0})),A=T.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(A,e.firstChild):e.appendChild(A),A.outerHTML=a.map(e=>eP(e)).join("\n"),e.removeAttribute(r),n()}).catch(i)}}else n()})}function tN(e){return Promise.all([tO(e,"::before"),tO(e,"::after")])}function tH(e){return e.parentNode!==document.head&&!~et.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Y)&&(!e.parentNode||"svg"!==e.parentNode.tagName)}function tV(e){if(Q)return new Promise((t,r)=>{let n=eC(e.querySelectorAll("*")).filter(tH).map(tN),i=tb("searchPseudoElements");tE=!0,Promise.all(n).then(()=>{i(),tE=!1,t()}).catch(()=>{i(),tE=!1,r()})})}let tK=!1,tG=e=>e.toLowerCase().split(" ").reduce((e,t)=>
35{let r=t.toLowerCase().split("-"),n=r[0],i=r.slice(1).join("-");if(n&&"h"===i)return e.flipX=!0,e;if(n&&"v"===i)return e.flipY=!0,e;if(isNaN(i=parseFloat(i)))return e;switch(n){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0}),tW={x:0,y:0,width:"100%",height:"100%"};function tz(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}!function(e,t){let{mixoutsTo:r}=t;e7=e,e9={},Object.keys(te).forEach(e=>{-1===tt.indexOf(e)&&delete te[e]}),e7.forEach(e=>{let t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(e=>{"function"==typeof t[e]&&(r[e]=t[e]),"object"==typeof t[e]&&Object.keys(t[e]).forEach(n=>{r[e]||(r[e]={}),r[e][n]=t[e][n]})}),e.hooks){let t=e.hooks();Object.keys(t).forEach(e=>{e9[e]||(e9[e]=[]),e9[e].push(t[e])})}e.provides&&e.provides(te)})}([{mixout:()=>({dom:{css:eF,insertCss:eU}}),hooks:()=>({beforeDOMElementCreation(){eU()},beforeI2svg(){eU()}})},{mixout:()=>({icon:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(e||{}).icon?e:ta(e||{}),{mask:n}=t;return n&&(n=(n||{}).icon?n:ta(n||{})),t_(r,w(w({},t),{},{mask:n}))}}),hooks:()=>({mutationObserverCallbacks:e=>(e.treeCallback=tj,e.nodeCallback=tL,e)}),provides(e){e.i2svg=function(e){let{node:t=T,callback:r=()=>{}}=e;return tj(t,r)},e.generateSvgReplacementMutation=function(e,t){let{iconName:r,title:n,titleId:i,prefix:a,transform:o,symbol:s,mask:A,maskId:l,extra:c}=t;return new Promise((t,d)=>{Promise.all([tm(r,a),A.iconName?tm(A.iconName,A.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(A=>{let[d,u]=A;t([e,tc({icons:{main:d,mask:u},prefix:a,iconName:r,transform:o,symbol:s,maskId:l,title:n,titleId:i,extra:c,watchable:!0})])}).catch(d)})},e.generateAbstractIcon=function(e){let t,{children:r,attributes:n,main:i,transform:a,styles:o}=e,s=ek(o);return s.length>0&&(n.style=s),eE(a)&&(t=ti("generateAbstractTransformGrouping",{main:i,transform:a,containerWidth:i.width,iconWidth:i.width})),r.push(t||i.icon),{children:r,attributes:n}}}},{mixout:()=>({layer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{classes:r=[]}=t;return tl({type:"layer"},()=>{tn("beforeDOMElementCreation",{assembler:e,params:t});let n=[];return e(e=>{Array.isArray(e)?e.map(e=>{n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(eb.cssPrefix,"-layers"),...r].join(" ")},children:n}]})}})},{mixout:()=>({counter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{title:r=null,classes:n=[],attributes:i={},styles:a={}}=t;return tl({type:"counter",content:e},()=>(tn("beforeDOMElementCreation",{content:e,params:t}),function(e){let{content:t,title:r,extra:n}=e,i=w(w(w({},n.attributes),r?{title:r}:{}),{},{class:n.classes.join(" ")}),a=ek(n.styles);a.length>0&&(i.style=a);let o=[];return o.push({tag:"span",attributes:i,children:[t]}),r&&o.push({tag:"span",attributes:{class:"sr-only"},children:[r]}),o}({content:e.toString(),title:r,extra:{attributes:i,styles:a,classes:["".concat(eb.cssPrefix,"-layers-counter"),...n]}})))}})},{mixout:()=>({text(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{transform:r=ew,title:n=null,classes:i=[],attributes:a={},styles:o={}}=t;return tl({type:"text",content:e},()=>(tn("beforeDOMElementCreation",{content:e,params:t}),td({content:e,transform:w(w({},ew),r),title:n,extra:{attributes:a,styles:o,classes:["".concat(eb.cssPrefix,"-layers-text"),...i]}})))}}),provides(e){e.generateLayersText=function(e,t){let{title:r,transform:n,extra:i}=t,a=null,o=null;if(j){let t=parseInt(getComputedStyle(e).fontSize,10),r=e.getBoundingClientRect();a=r.width/t,o=r.height/t}return eb.autoA11y&&!r&&(i.attributes["aria-hidden"]="true"),Promise.resolve([e,td({content:e.innerHTML,width:a,height:o,transform:n,title:r,extra:i,watchable:!0})])}}},{hooks:()=>({mutationObserverCallbacks:e=>(e.pseudoElementsCallback=tV,e)}),provides(e){e.pseudoElements2svg=function(e){let{node:t=T}=e;eb.searchPseudoElements&&tV(t)}}},{mixout:()=>({dom:{unwatch(){tE=!0,tK=!0}}}),hooks:()=>({bootstrap(){tT(tr("mutationObserverCallbacks",{}))},noAuto(){tF&&tF.disconnect()},watch(e){let{observeMutationsRoot:t}=e;tK?tE=!1:tT(tr("mutationObserverCallbacks",{observeMutationsRoot:t}))}})},{mixout:()=>({parse:{transform:e=>tG(e)}}),hooks:()=>({parseNodeAttributes(e,t){let r=t.getAttribute("data-fa-transform");return r&&(e.transform=tG(r)),e}}),provides(e){e.generateAbstractTransformGrouping=function(e){let{main:t,transform:r,containerWidth:n,iconWidth:i}=e,a="translate(".concat(32*r.x,", ").concat(32*r.y,") "),o="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),s="rotate(".concat(r.rotate," 0 0)"),A={transform:"".concat(a," ").concat(o," ").concat(s)};return{tag:"g",attributes:w({},{transform:"translate(".concat(n/2," 256)")}),children:[{tag:"g",attributes:w({},A),children:[{tag:t.icon.tag,children:t.icon.children,attributes:w(w({},t.icon.attributes),{transform:"translate(".concat(-(i/2*1)," -256)")})}]}]}}}},{hooks:()=>({parseNodeAttributes(e,t){let r=t.getAttribute("data-fa-mask"),n=r?e5(r.split(" ").map(e=>e.trim())):e2();return n.prefix||(n.prefix=eW),e.mask=n,e.maskId=t.getAttribute("data-fa-mask-id"),e}}),provides(e){e.generateAbstractMask=function(e){let{children:t,attributes:r,main:n,mask:i,maskId:a,transform:o}=e,{width:s,icon:A}=n,{width:l,icon:c}=i,d=function(e){let{transform:t,containerWidth:r,iconWidth:n}=e,i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),o="rotate(".concat(t.rotate," 0 0)"),s={transform:"".concat(i," ").concat(a," ").concat(o)};return{outer:{transform:"translate(".concat(r/2," 256)")},inner:s,path:{transform:"translate(".concat(-(n/2*1)," -256)")}}}({transform:o,containerWidth:l,iconWidth:s}),u={tag:"rect",attributes:w(w({},tW),{},{fill:"white"})},h=A.children?{children:A.children.map(tz)}:{},p={tag:"g",attributes:w({},d.inner),children:[tz(w({tag:A.tag,attributes:w(w({},A.attributes),d.path)},h))]},m={tag:"g",attributes:w({},d.outer),children:[p]},f="mask-".concat(a||ev()),g="clip-".concat(a||ev()),y={tag:"mask",attributes:w(w({},tW),{},{id:f,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[u,m]},b={tag:"defs",children:[{tag:"clipPath",attributes:{id:g},children:"g"===c.tag?c.children:[c]},y]};
35return t.push(b,{tag:"rect",attributes:w({fill:"currentColor","clip-path":"url(#".concat(g,")"),mask:"url(#".concat(f,")")},tW)}),{children:t,attributes:r}}}},{provides(e){let t=!1;F.matchMedia&&(t=F.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){let e=[],r={fill:"currentColor"},n={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:w(w({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});let i=w(w({},n),{},{attributeName:"opacity"}),a={tag:"circle",attributes:w(w({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||a.children.push({tag:"animate",attributes:w(w({},n),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:w(w({},i),{},{values:"1;0;1;1;0;1;"})}),e.push(a),e.push({tag:"path",attributes:w(w({},r),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:w(w({},i),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:w(w({},r),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:w(w({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:()=>({parseNodeAttributes(e,t){let r=t.getAttribute("data-fa-symbol");return e.symbol=null!==r&&(""===r||r),e}})}],{mixoutsTo:ts}),ts.noAuto,ts.config,ts.library,ts.dom;let t$=ts.parse;ts.findIconDefinition,ts.toHtml;let tq=ts.icon;ts.layer,ts.text,ts.counter;var tX=e.i(745009);function tY(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tJ(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t0(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tZ(Object(r),!0).forEach(function(t){tJ(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tZ(Object(r)).forEac
35h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function t1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],A=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;A=!1}else for(;!(A=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);A=!0);}catch(e){l=!0,i=e}finally{try{if(!A&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||t3(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t2(e){return function(e){if(Array.isArray(e))return tY(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||t3(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t4(e){return(t4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t3(e,t){if(e){if("string"==typeof e)return tY(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tY(e,t):void 0}}try{t=e.r(308727).version}catch(e){t=void 0!==b.default&&b.default.env.FA_VERSION||"7.0.0"}function t5(e){var t;return(t=e-0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1)}var t6=["style"],t8=!1;try{t8=!0}catch(e){}function t7(e){return e&&"object"===t4(e)&&e.prefix&&e.iconName&&e.icon?e:t$.icon?t$.icon(e):null===e?null:e&&"object"===t4(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function t9(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?tJ({},e,t):{}}var re={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,rotateBy:!1,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1,widthAuto:!1},rt=r.default.forwardRef(function(e,r){var n,i,a,o,s,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k=t0(t0({},re),e),E=k.icon,F=k.mask,T=k.symbol,U=k.className,I=k.title,Q=k.titleId,j=k.maskId,L=t7(E),_=t9("classes",[].concat(t2((n=k.beat,i=k.fade,a=k.beatFade,o=k.bounce,s=k.shake,A=k.flash,l=k.spin,c=k.spinPulse,d=k.spinReverse,u=k.pulse,h=k.fixedWidth,p=k.inverse,m=k.border,f=k.listItem,g=k.flip,y=k.size,b=k.rotation,x=k.pull,w=k.swapOpacity,v=k.rotateBy,C=k.widthAuto,B=function(e,t){for(var r=t1(e.split("-"),2),n=r[0],i=r[1],a=t1(t.split("-"),2),o=a[0],s=a[1],A=n.split("."),l=o.split("."),c=0;c<Math.max(A.length,l.length);c++){var d=A[c]||"0",u=l[c]||"0",h=parseInt(d,10),p=parseInt(u,10);if(h!==p)return h>p}for(var m=0;m<Math.max(A.length,l.length);m++){var f=A[m]||"0",g=l[m]||"0";if(f!==g&&f.length!==g.length)return f.length<g.length}return!i||!!s}(t,"7.0.0"),Object.keys(S=tJ(tJ(tJ(tJ(tJ(tJ({"fa-beat":n,"fa-fade":i,"fa-beat-fade":a,"fa-bounce":o,"fa-shake":s,"fa-flash":A,"fa-spin":l,"fa-spin-reverse":d,"fa-spin-pulse":c,"fa-pulse":u,"fa-fw":h,"fa-inverse":p,"fa-border":m,"fa-li":f,"fa-flip":!0===g,"fa-flip-horizontal":"horizontal"===g||"both"===g,"fa-flip-vertical":"vertical"===g||"both"===g},"fa-".concat(y),null!=y),"fa-rotate-".concat(b),null!=b&&0!==b),"fa-pull-".concat(x),null!=x),"fa-swap-opacity",w),"fa-rotate-by",B&&v),"fa-width-auto",B&&C)).map(function(e){return S[e]?e:null}).filter(function(e){return e}))),t2((U||"").split(" ")))),P=t9("transform","string"==typeof k.transform?t$.transform(k.transform):k.transform),D=t9("mask",t7(F)),R=tq(L,t0(t0(t0(t0({},_),P),D),{},{symbol:T,title:I,titleId:Q,maskId:j}));if(!R)return!function(){if(!t8&&console&&"function"==typeof console.error){var e;(e=console).error.apply(e,arguments)}}("Could not find icon",L),null;var M=R.abstract,O={ref:r};
35return Object.keys(k).forEach(function(e){re.hasOwnProperty(e)||(O[e]=k[e])}),rr(M[0],O)});rt.displayName="FontAwesomeIcon",rt.propTypes={beat:tX.default.bool,border:tX.default.bool,beatFade:tX.default.bool,bounce:tX.default.bool,className:tX.default.string,fade:tX.default.bool,flash:tX.default.bool,mask:tX.default.oneOfType([tX.default.object,tX.default.array,tX.default.string]),maskId:tX.default.string,fixedWidth:tX.default.bool,inverse:tX.default.bool,flip:tX.default.oneOf([!0,!1,"horizontal","vertical","both"]),icon:tX.default.oneOfType([tX.default.object,tX.default.array,tX.default.string]),listItem:tX.default.bool,pull:tX.default.oneOf(["right","left"]),pulse:tX.default.bool,rotation:tX.default.oneOf([0,90,180,270]),rotateBy:tX.default.bool,shake:tX.default.bool,size:tX.default.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:tX.default.bool,spinPulse:tX.default.bool,spinReverse:tX.default.bool,symbol:tX.default.oneOfType([tX.default.bool,tX.default.string]),title:tX.default.string,titleId:tX.default.string,transform:tX.default.oneOfType([tX.default.string,tX.default.object]),swapOpacity:tX.default.bool,widthAuto:tX.default.bool};var rr=(function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof r)return r;var i=(r.children||[]).map(function(r){return e(t,r)}),a=Object.keys(r.attributes||{}).reduce(function(e,t){var n=r.attributes[t];switch(t){case"class":e.attrs.className=n,delete r.attributes.class;break;case"style":e.attrs.style=n.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var r=t.indexOf(":"),n=t5(t.slice(0,r)),i=t.slice(r+1).trim();return n.startsWith("webkit")?e[n.charAt(0).toUpperCase()+n.slice(1)]=i:e[n]=i,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=n:e.attrs[t5(t)]=n}return e},{attrs:{}}),o=n.style,s=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(n,t6);return a.attrs.style=t0(t0({},a.attrs.style),void 0===o?{}:o),t.apply(void 0,[r.tag,t0(t0({},a.attrs),s)].concat(t2(i)))}).bind(null,r.default.createElement);e.s(["FontAwesomeIcon",0,rt],811488),e.s(["SwitchIcon",0,({width:e=10,height:t=10,fill:r="currentColor",...n})=>(0,u.jsx)("svg",{width:e,height:t,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,u.jsx)("path",{d:"M9.70703 7.11328L7.83203 8.98828C7.63672 9.18359 7.34375 9.18359 7.16797 8.98828L5.29297 7.11328C5.09766 6.9375 5.09766 6.64453 5.29297 6.46875C5.46875 6.27344 5.76172 6.27344 5.95703 6.46875L7.03125 7.54297V0.84375C7.03125 0.589844 7.22656 0.375 7.5 0.375C7.75391 0.375 7.96875 0.589844 7.96875 0.84375V7.54297L9.04297 6.46875C9.21875 6.27344 9.51172 6.27344 9.70703 6.46875C9.88281 6.64453 9.88281 6.9375 9.70703 7.11328ZM2.83203 0.511719L4.6875 2.38672C4.88281 2.58203 4.88281 2.875 4.6875 3.05078C4.51172 3.24609 4.21875 3.24609 4.04297 3.05078L2.96875 1.97656V8.65625C2.96875 8.92969 2.75391 9.125 2.5 9.125C2.22656 9.125 2.03125 8.92969 2.03125 8.65625L2.01172 1.97656L0.9375 3.05078C0.761719 3.24609 0.46875 3.24609 0.292969 3.05078C0.0976562 2.875 0.0976562 2.58203 0.292969 2.38672L2.16797 0.511719C2.34375 0.335938 2.63672 0.335938 2.83203 0.511719Z",fill:r})})],747727),e.s(["ECLIPSE_DEFAULT_FEE_WEI",0,50000000000000n,"ECLIPSE_FEE_BUFFER_MULTIPLIER",0,200n,"EVM_DEFAULT_FEE_WEI",0,5000000000000000n,"EVM_GAS_BUFFER_MULTIPLIER",0,2n,"MINIMUM_GAS_PRICE_WEI",0,100000000n,"SOLANA_DEFAULT_FEE_LAMPORTS",0,1000000n,"SOLANA_FEE_BUFFER_MULTIPLIER",0,5n],642691)},388340,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="circle-exclamation",i=["exclamation-circle"],a="f06a",o="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z";r.definition={prefix:"fas",iconName:n,icon:[512,512,i,a,o]},r.faCircleExclamation=r.definition,r.prefix="fas",r.iconName=n,r.width=512,r.height=512,r.ligatures=i,r.unicode=
35a,r.svgPathData=o,r.aliases=i},138459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(388340);r.definition={prefix:n.prefix,iconName:n.iconName,icon:[n.width,n.height,n.aliases,n.unicode,n.svgPathData]},r.faExclamationCircle=r.definition,r.prefix=n.prefix,r.iconName=n.iconName,r.width=n.width,r.height=n.height,r.ligatures=n.aliases,r.unicode=n.unicode,r.svgPathData=n.svgPathData,r.aliases=n.aliases},78333,(e,t,r)=>{var n=0/0,i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,A=parseInt,l=e.g&&e.g.Object===Object&&e.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=l||c||Function("return this")(),u=Object.prototype.toString,h=Math.max,p=Math.min,m=function(){return d.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==u.call(t))return n;if(f(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=f(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var l=o.test(e);return l||s.test(e)?A(e.slice(2),l?2:8):a.test(e)?n:+e}t.exports=function(e,t,r){var n,i,a,o,s,A,l=0,c=!1,d=!1,u=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=n,a=i;return n=i=void 0,l=t,o=e.apply(a,r)}function b(e){var r=e-A,n=e-l;return void 0===A||r>=t||r<0||d&&n>=a}function x(){var e,r,n,i=m();if(b(i))return w(i);s=setTimeout(x,(e=i-A,r=i-l,n=t-e,d?p(n,a-r):n))}function w(e){return(s=void 0,u&&n)?y(e):(n=i=void 0,o)}function v(){var e,r=m(),a=b(r);if(n=arguments,i=this,A=r,a){if(void 0===s)return l=e=A,s=setTimeout(x,t),c?y(e):o;if(d)return s=setTimeout(x,t),y(A)}return void 0===s&&(s=setTimeout(x,t)),o}return t=g(t)||0,f(r)&&(c=!!r.leading,a=(d="maxWait"in r)?h(g(r.maxWait)||0,t):a,u="trailing"in r?!!r.trailing:u),v.cancel=function(){void 0!==s&&clearTimeout(s),l=0,n=A=i=s=void 0},v.flush=function(){return void 0===s?o:w(m())},v}},57844,801782,83114,422083,981140,820783,30030,991918,248425,30207,726330,934620,610772,853660,774606,296626,369340,303536,765491,186312,985369,178761,39839,281752,468757,527255,514476,772222,133253,214288,896137,e=>{"use strict";let t;var r,n,i,a,o,s,A,l,c=e.i(642691),d=e.i(994661),u=e.i(419954),h=e.i(271645),p=e.i(869230),m=e.i(992571),f=class extends p.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,m.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,m.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=n,A=r.fetchMeta?.fetchMore?.direction,l=o&&"forward"===A,c=i&&"forward"===A,d=o&&"backward"===A,u=i&&"backward"===A;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,m.hasNextPage)(t,r.data),hasPreviousPage:(0,m.hasPreviousPage)(t,r.data),isFetchNextPageError:l,isFetchingNextPage:c,isFetchPreviousPageError:d,isFetchingPreviousPage:u,isRefetchError:s&&!l&&!d,isRefetching:a&&!c&&!u}}},g=e.i(469637),y=e.i(581949);let b=async(e,t)=>{let r=await fetch(e,{headers:t});if(!r.ok)throw Error((await r.json()).message||"Network error");return r.json()},x=async(e,t,r)=>{let{data:n}=await y.default.post(e,t,r);return n};e.s(["axiosPostFetcher",0,x,"default",0,b],801782);let w=function(e=d.MAINNET_RELAY_API,t,r,n){let i=new URL(`${e}/requests/v2`,"u">typeof window?window.location.origin:void 0),a={...t};return r&&(a.continuation=r),(0,u.setParams)(i,a),b(i.href,n)};e.s(["default",0,function(e,t,r){var n;let i=(n={queryKey:["useUserTransactions",e],enabled:void 0!==e,queryFn:r=>w(t,e,r.pageParam),getNextPageParam:e=>e.continuation,initialPageParam:null,retry:!1,...r},(0,g.useBaseQuery)(n,f,void 0)),a=(0,h.useMemo)(()=>i.data?.pages?.flatMap(e=>e?.requests||[])??[],[i.data]);return{...i,data:a}},"queryRequests",0,w],83114);let v="relayUiKitData";function C(){if("u"<typeof window)return{acceptedUnverifiedTokens:[],recentCustomAddresses:[],genericCache:{}};let e={acceptedUnverifiedTokens:[],recentCustomAddresses:[],genericCache:{}};try{let t=localStorage.getItem(v);(e=t?JSON.parse(t):e).genericCache||(e.genericCache={}),e.recentCustomAddresses||(e.recentCustomAddresses=[])}catch(e){console.warn("Failed to get RelayKitUIData",e)}return e}function B(e){if("u"<typeof window)return;let t=C(),r={...t.genericCache||{},...e.genericCache||{}},n={...t,...e,genericCache:r};try{if(n.genericCache){let e=Date.now();Object.keys(n.genericCache).forEach(t=>{n.genericCache[t].expiresAt<=e&&delete n.genericCache[t]}
35)}localStorage.setItem(v,JSON.stringify(n))}catch(e){console.warn("Failed to update RelayKitUIData",e)}}function S(e){let t=C(),r=t.genericCache?.[e];if(r&&r.expiresAt>Date.now())return r.value;if(r){let r=t.genericCache||{};delete r[e],B({genericCache:r})}return null}function k(e,t,r=5){let n=C().genericCache||{};n[e]={value:t.toString(),expiresAt:Date.now()+60*r*1e3},B({genericCache:n})}function E(){return C().starredChainIds}function F(e){let t=E();return!!t&&t.includes(e)}e.s(["addCustomAddress",0,function(e){B({recentCustomAddresses:[...(C().recentCustomAddresses||[]).filter(t=>t!==e),e].slice(-3)})},"alreadyAcceptedToken",0,e=>{let t=`${e.chainId}:${e.address}`,r=C();return r.acceptedUnverifiedTokens?.includes(t)??!1},"getCacheEntry",0,S,"getCustomAddresses",0,function(){return C().recentCustomAddresses||[]},"getRelayUiKitData",0,C,"getStarredChainIds",0,E,"isChainStarred",0,F,"setCacheEntry",0,k,"setRelayUiKitData",0,B,"toggleStarredChain",0,function(e){if(F(e))B({starredChainIds:(C().starredChainIds||[]).filter(t=>t!==e)});else{let t;(t=C().starredChainIds||[]).includes(e)||B({starredChainIds:[...t,e]})}}],422083);let T={},U=async(e,t,r=400000n)=>{if(!t||t<=0n)return 0n;let n=c.EVM_DEFAULT_FEE_WEI;try{let t;try{t=await e.estimateFeesPerGas()}catch(r){try{let r=await e.getGasPrice();t={maxFeePerGas:r,gasPrice:r}}catch(e){return console.error("Failed to estimate gas price:",e),n}}let i=t.maxFeePerGas??t.gasPrice;if(!i||i<=0n)return console.error("Invalid gas price data received:",t),n;return i<c.MINIMUM_GAS_PRICE_WEI&&(i=c.MINIMUM_GAS_PRICE_WEI),i*r*c.EVM_GAS_BUFFER_MULTIPLIER}catch(e){return console.error("Error calculating EVM native gas buffer:",e),n}},I=async e=>{let t=9286185===e,r=t?c.ECLIPSE_FEE_BUFFER_MULTIPLIER:c.SOLANA_FEE_BUFFER_MULTIPLIER,n=t?c.ECLIPSE_DEFAULT_FEE_WEI*c.ECLIPSE_FEE_BUFFER_MULTIPLIER:c.SOLANA_DEFAULT_FEE_LAMPORTS*c.SOLANA_FEE_BUFFER_MULTIPLIER;try{let t=await w(d.MAINNET_RELAY_API,{limit:20,originChainId:e});if(!t||!Array.isArray(t.requests)||0===t.requests.length)return console.warn("No valid fees found in response. Using fallback buffer."),n;let i=t.requests.map(e=>{let t=e?.data?.inTxs?.[0]?.fee;try{return BigInt(t)}catch{return null}}).filter(e=>null!==e);if(0===i.length)return n;return i.reduce((e,t)=>t>e?t:e,0n)*r}catch(e){return console.error("Error calculating SVM native fee buffer:",e),n}},Q=async(e,t,r,n)=>{let i,a=`${e}FeeBuffer:${t}`,o=S(a);if(o)return BigInt(o);if(Object.prototype.hasOwnProperty.call(T,a))return T[a];if("evm"===e){if(!n)return console.error("PublicClient is required for EVM fee buffer calculation."),c.EVM_DEFAULT_FEE_WEI*c.EVM_GAS_BUFFER_MULTIPLIER;i=U(n,r)}else{if("svm"!==e)return console.warn(`Unsupported VM type encountered: ${e}. Returning default EVM buffer.`),c.EVM_DEFAULT_FEE_WEI*c.EVM_GAS_BUFFER_MULTIPLIER;let r=9286185===t?c.ECLIPSE_DEFAULT_FEE_WEI*c.ECLIPSE_FEE_BUFFER_MULTIPLIER:c.SOLANA_DEFAULT_FEE_LAMPORTS*c.SOLANA_FEE_BUFFER_MULTIPLIER;i=I(t).catch(e=>(console.error(`Failed to calculate SVM fee buffer for chain ${t}:`,e),r))}return T[a]=i,i.then(e=>{k(a,e,5)}).catch(e=>{console.error(`Error processing fee buffer for ${a}:`,e)}).finally(()=>{delete T[a]}),i};e.s(["getFeeBufferAmount",0,Q],57844);var j=e.i(474076),L=e.i(211786),_=e.i(446999),P=e.i(309833),D=e.i(310479),R=e.i(811488),M=e.i(138459);function O(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function N(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function H(...e){return t=>{let r=!1,n=e.map(e=>{let n=N(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():N(e[t],null)}}}}function V(...e){return h.useCallback(H(...e),e)}function K(e,t=[]){let r=[],n=()=>{let t=r.map(e=>h.createContext(e));return function(r){let n=r?.[e]||t;return h.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){let i=h.createContext(n),a=r.length;r=[...r,n];let o=t=>{let{scope:r,children:n,...o}=t,s=r?.[e]?.[a]||i,A=h.useMemo(()=>o,Object.values(o));return(0,j.jsx)(s.Provider,{value:A,children:n})};return o.displayName=t+"Provider",[o,function(r,o){let s=o?.[e]?.[a]||i,A=h.useContext(s);if(A)return A;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}(n,...t)]}"u">typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",0,O],981140),e.s(["composeRefs",0,H,"useComposedRefs",0,V],820783),e.s(["createContext",0,function(e,t){let r=h.createContext(t),n=e=>{let{children:t,...n}=e,i=h.useMemo(()=>n,Object.values(n));return(0,j.jsx)(r.Provider,{value:i,children:t})};return n.displayName=e+"Provider",[n,function(n){let i=h.useContext(r);if(i)return i;if(void 0!==t)return t;throw Error(`\`${n}\` must be used within \`${e}\``)}]},"createContextScope",0,K],30030);var G=e.i(174080);function W(e){var t;let r,n=(t=e,(r=h.forwardRef((e,t)=>
35{let{children:r,...n}=e;if(h.isValidElement(r)){var i;let e,a,o=(i=r,(a=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(a=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),s=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==h.Fragment&&(s.ref=t?H(t,o):o),h.cloneElement(r,s)}return h.Children.count(r)>1?h.Children.only(null):null})).displayName=`${t}.SlotClone`,r),i=h.forwardRef((e,t)=>{let{children:r,...i}=e,a=h.Children.toArray(r),o=a.find(q);if(o){let e=o.props.children,r=a.map(t=>t!==o?t:h.Children.count(e)>1?h.Children.only(null):h.isValidElement(e)?e.props.children:null);return(0,j.jsx)(n,{...i,ref:t,children:h.isValidElement(e)?h.cloneElement(e,void 0,r):null})}return(0,j.jsx)(n,{...i,ref:t,children:r})});return i.displayName=`${e}.Slot`,i}var z=Symbol("radix.slottable");function $(e){let t=({children:e})=>(0,j.jsx)(j.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=z,t}function q(e){return h.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===z}e.s(["createSlot",0,W,"createSlottable",0,$],991918);var X=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=W(`Primitive.${t}`),n=h.forwardRef((e,n)=>{let{asChild:i,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,j.jsx)(i?r:t,{...a,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Y(e,t){e&&G.flushSync(()=>e.dispatchEvent(t))}function J(e){let t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...e)=>t.current?.(...e),[])}e.s(["Primitive",0,X,"dispatchDiscreteCustomEvent",0,Y],248425),e.s(["useCallbackRef",0,J],30207);var Z="dismissableLayer.update",ee=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),et=h.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=h.useContext(ee),[d,u]=h.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=h.useState({}),f=V(t,e=>u(e)),g=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),x=d?g.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,v=x>=b,C=function(e,t=globalThis?.document){let r=J(e),n=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{let e=e=>{if(e.target&&!n.current){let n=function(){en("dismissableLayer.pointerDownOutside",r,a,{discrete:!0})},a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,r=[...c.branches].some(e=>e.contains(t));v&&!r&&(i?.(e),o?.(e),e.defaultPrevented||s?.())},p),B=function(e,t=globalThis?.document){let r=J(e),n=h.useRef(!1);return h.useEffect(()=>{let e=e=>{e.target&&!n.current&&en("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;![...c.branches].some(e=>e.contains(t))&&(a?.(e),o?.(e),e.defaultPrevented||s?.())},p);return!function(e,t=globalThis?.document){let r=J(e);h.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{x===c.layers.size-1&&(n?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),h.useEffect(()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(A=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),er(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=A)}},[d,p,r,c]),h.useEffect(()=>()=>
35{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),er())},[d,c]),h.useEffect(()=>{let e=()=>m({});return document.addEventListener(Z,e),()=>document.removeEventListener(Z,e)},[]),(0,j.jsx)(X.div,{...l,ref:f,style:{pointerEvents:w?v?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,B.onFocusCapture),onBlurCapture:O(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});function er(){let e=new CustomEvent(Z);document.dispatchEvent(e)}function en(e,t,r,{discrete:n}){let i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Y(i,a):i.dispatchEvent(a)}et.displayName="DismissableLayer",h.forwardRef((e,t)=>{let r=h.useContext(ee),n=h.useRef(null),i=V(t,n);return h.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,j.jsx)(X.div,{...e,ref:i})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",0,et],726330);var ei=globalThis?.document?h.useLayoutEffect:()=>{};e.s(["useLayoutEffect",0,ei],934620);var ea=h[" useId ".trim().toString()]||(()=>void 0),eo=0;function es(e){let[t,r]=h.useState(ea());return ei(()=>{e||r(e=>e??String(eo++))},[e]),e||(t?`radix-${t}`:"")}e.s(["useId",0,es],610772);var eA=e.i(258950),el=e.i(953760),ec=h.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...a}=e;return(0,j.jsx)(X.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,j.jsx)("polygon",{points:"0,0 30,0 15,10"})})});ec.displayName="Arrow";var ed="Popper",[eu,eh]=K(ed),[ep,em]=eu(ed),ef=e=>{let{__scopePopper:t,children:r}=e,[n,i]=h.useState(null);return(0,j.jsx)(ep,{scope:t,anchor:n,onAnchorChange:i,children:r})};ef.displayName=ed;var eg="PopperAnchor",ey=h.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,a=em(eg,r),o=h.useRef(null),s=V(t,o),A=h.useRef(null);return h.useEffect(()=>{let e=A.current;A.current=n?.current||o.current,e!==A.current&&a.onAnchorChange(A.current)}),n?null:(0,j.jsx)(X.div,{...i,ref:s})});ey.displayName=eg;var eb="PopperContent",[ex,ew]=eu(eb),ev=h.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:A=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:u=!1,updatePositionStrategy:p="optimized",onPlaced:m,...f}=e,g=em(eb,r),[y,b]=h.useState(null),x=V(t,e=>b(e)),[w,v]=h.useState(null),C=function(e){let[t,r]=h.useState(void 0);return ei(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(w),B=C?.width??0,S=C?.height??0,k="number"==typeof c?c:{top:0,right:0,bottom:0,left:0,...c},E=Array.isArray(l)?l:[l],F=E.length>0,T={padding:k,boundary:E.filter(ek),altBoundary:F},{refs:U,floatingStyles:I,placement:Q,isPositioned:L,middlewareData:_}=(0,eA.useFloating)({strategy:"fixed",placement:n+("center"!==a?"-"+a:""),whileElementsMounted:(...e)=>(0,el.autoUpdate)(...e,{animationFrame:"always"===p}),elements:{reference:g.anchor},middleware:[(0,eA.offset)({mainAxis:i+S,alignmentAxis:o}),A&&(0,eA.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?(0,eA.limitShift)():void 0,...T}),A&&(0,eA.flip)({...T}),(0,eA.size)({...T,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty("--radix-popper-available-width",`${r}px`),o.setProperty("--radix-popper-available-height",`${n}px`),o.setProperty("--radix-popper-anchor-width",`${i}px`),o.setProperty("--radix-popper-anchor-height",`${a}px`)}}),w&&(0,eA.arrow)({element:w,padding:s}),eE({arrowWidth:B,arrowHeight:S}),u&&(0,eA.hide)({strategy:"referenceHidden",...T})]}),[P,D]=eF(Q),R=J(m);ei(()=>{L&&R?.()},[L,R]);let M=_.arrow?.x,O=_.arrow?.y,N=_.arrow?.centerOffset!==0,[H,K]=h.useState();return ei(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),(0,j.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:L?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,j.jsx)(ex,{scope:r,placedSide:P,onArrowChange:v,arrowX:M,arrowY:O,shouldHideArrow:N,children:(0,j.jsx)(X.div,{"data-side":P,"data-align":D,...f,ref:x,style:{...f.style,animation:L?void 0:"none"}})})})});ev.displayName=eb;var eC="PopperArrow",eB={top:"bottom",right:"left",bottom:"top",left:"r
35ight"},eS=h.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=ew(eC,r),a=eB[i.placedSide];return(0,j.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,j.jsx)(ec,{...n,ref:t,style:{...n.style,display:"block"}})})});function ek(e){return null!==e}eS.displayName=eC;var eE=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[A,l]=eF(r),c={start:"0%",center:"50%",end:"100%"}[l],d=(i.arrow?.x??0)+o/2,u=(i.arrow?.y??0)+s/2,h="",p="";return"bottom"===A?(h=a?c:`${d}px`,p=`${-s}px`):"top"===A?(h=a?c:`${d}px`,p=`${n.floating.height+s}px`):"right"===A?(h=`${-s}px`,p=a?c:`${u}px`):"left"===A&&(h=`${n.floating.width+s}px`,p=a?c:`${u}px`),{data:{x:h,y:p}}}});function eF(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",0,ey,"Arrow",0,eS,"Content",0,ev,"Root",0,ef,"createPopperScope",0,eh],853660);var eT=h.forwardRef((e,t)=>{let{container:r,...n}=e,[i,a]=h.useState(!1);ei(()=>a(!0),[]);let o=r||i&&globalThis?.document?.body;return o?G.default.createPortal((0,j.jsx)(X.div,{...n,ref:t}),o):null});eT.displayName="Portal",e.s(["Portal",0,eT],774606);var eU=e=>{var t;let r,n,{present:i,children:a}=e,o=function(e){var t,r;let[n,i]=h.useState(),a=h.useRef(null),o=h.useRef(e),s=h.useRef("none"),[A,l]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},h.useReducer((e,t)=>r[e][t]??e,t));return h.useEffect(()=>{let e=eI(a.current);s.current="mounted"===A?e:"none"},[A]),ei(()=>{let t=a.current,r=o.current;if(r!==e){let n=s.current,i=eI(t);e?l("MOUNT"):"none"===i||t?.display==="none"?l("UNMOUNT"):r&&n!==i?l("ANIMATION_OUT"):l("UNMOUNT"),o.current=e}},[e,l]),ei(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let i=eI(a.current).includes(CSS.escape(r.animationName));if(r.target===n&&i&&(l("ANIMATION_END"),!o.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(s.current=eI(a.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(A),ref:h.useCallback(e=>{a.current=e?getComputedStyle(e):null,i(e)},[])}}(i),s="function"==typeof a?a({present:o.isPresent}):h.Children.only(a),A=V(o.ref,(t=s,(n=(r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?t.props.ref:t.props.ref||t.ref));return"function"==typeof a||o.isPresent?h.cloneElement(s,{ref:A}):null};function eI(e){return e?.animationName||"none"}eU.displayName="Presence",e.s(["Presence",0,eU],296626),h[" useEffectEvent ".trim().toString()],h[" useInsertionEffect ".trim().toString()];var eQ=h[" useInsertionEffect ".trim().toString()]||ei;function ej({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[i,a,o]=function({defaultProp:e,onChange:t}){let[r,n]=h.useState(e),i=h.useRef(r),a=h.useRef(t);return eQ(()=>{a.current=t},[t]),h.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}({defaultProp:t,onChange:r}),s=void 0!==e,A=s?e:i;{let t=h.useRef(void 0!==e);h.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,n])}return[A,h.useCallback(t=>{if(s){let r="function"==typeof t?t(e):t;r!==e&&o.current?.(r)}else a(t)},[s,e,a,o])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",0,ej],369340);var eL=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),e_=h.forwardRef((e,t)=>
vendor: 4,379 bytes, line 35
35(0,j.jsx)(X.span,{...e,ref:t,style:{...eL,...e.style}}));e_.displayName="VisuallyHidden";var[eP,eD]=K("Tooltip",[eh]),eR=eh(),eM="TooltipProvider",eO="tooltip.open",[eN,eH]=eP(eM),eV=e=>{let{__scopeTooltip:t,delayDuration:r=700,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,o=h.useRef(!0),s=h.useRef(!1),A=h.useRef(0);return h.useEffect(()=>{let e=A.current;return()=>window.clearTimeout(e)},[]),(0,j.jsx)(eN,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:h.useCallback(()=>{window.clearTimeout(A.current),o.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:h.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};eV.displayName=eM;var eK="Tooltip",[eG,eW]=eP(eK),ez=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,A=eH(eK,e.__scopeTooltip),l=eR(t),[c,d]=h.useState(null),u=es(),p=h.useRef(0),m=o??A.disableHoverableContent,f=s??A.delayDuration,g=h.useRef(!1),[y,b]=ej({prop:n,defaultProp:i??!1,onChange:e=>{e?(A.onOpen(),document.dispatchEvent(new CustomEvent(eO))):A.onClose(),a?.(e)},caller:eK}),x=h.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),w=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,b(!0)},[b]),v=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),C=h.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,b(!0),p.current=0},f)},[f,b]);return h.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,j.jsx)(ef,{...l,children:(0,j.jsx)(eG,{scope:t,contentId:u,open:y,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:h.useCallback(()=>{A.isOpenDelayedRef.current?C():w()},[A.isOpenDelayedRef,C,w]),onTriggerLeave:h.useCallback(()=>{m?v():(window.clearTimeout(p.current),p.current=0)},[v,m]),onOpen:w,onClose:v,disableHoverableContent:m,children:r})})};ez.displayName=eK;var e$="TooltipTrigger",eq=h.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,i=eW(e$,r),a=eH(e$,r),o=eR(r),s=V(t,h.useRef(null),i.onTriggerChange),A=h.useRef(!1),l=h.useRef(!1),c=h.useCallback(()=>A.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),(0,j.jsx)(ey,{asChild:!0,...o,children:(0,j.jsx)(X.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...n,ref:s,onPointerMove:O(e.onPointerMove,e=>{"touch"!==e.pointerType&&(l.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),l.current=!0))}),onPointerLeave:O(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:O(e.onPointerDown,()=>{i.open&&i.onClose(),A.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:O(e.onFocus,()=>{A.current||i.onOpen()}),onBlur:O(e.onBlur,i.onClose),onClick:O(e.onClick,i.onClose)})})});eq.displayName=e$;var[eX,eY]=eP("TooltipPortal",{forceMount:void 0}),eJ="TooltipContent",eZ=h.forwardRef((e,t)=>{let r=eY(eJ,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...a}=e,o=eW(eJ,e.__scopeTooltip);return(0,j.jsx)(eU,{present:n||o.open,children:o.disableHoverableContent?(0,j.jsx)(e3,{side:i,...a,ref:t}):(0,j.jsx)(e0,{side:i,...a,ref:t})})}),e0=h.forwardRef((e,t)=>{let r=eW(eJ,e.__scopeTooltip),n=eH(eJ,e.__scopeTooltip),i=h.useRef(null),a=V(t,i),[o,s]=h.useState(null),{trigger:A,onClose:l}=r,c=i.current,{onPointerInTransitChange:d}=n,u=h.useCallback(()=>{s(null),d(!1)},[d]),p=h.useCallback((e,t)=>{let r,n=e.currentTarget,i={x:e.clientX,y:e.clientY},a=function(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,i,a)){case a:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}(i,n.getBoundingClientRect());s(((r=[...function(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(i,a),...function(e){let{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}(t.getBoundingClientRect())].slice()).sort((e,t)=>
35e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}(r))),d(!0)},[d]);return h.useEffect(()=>()=>u(),[u]),h.useEffect(()=>{if(A&&c){let e=e=>p(e,c),t=e=>p(e,A);return A.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{A.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}},[A,c,p,u]),h.useEffect(()=>{if(o){let e=e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=A?.contains(t)||c?.contains(t),i=!function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],A=o.x,l=o.y,c=s.x,d=s.y;l>n!=d>n&&r<(c-A)*(n-l)/(d-l)+A&&(i=!i)}return i}(r,o);n?u():i&&(u(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[A,c,o,l,u]),(0,j.jsx)(e3,{...e,ref:a})}),[e1,e2]=eP(eK,{isInside:!1}),e4=$("TooltipContent"),e3=h.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,A=eW(eJ,r),l=eR(r),{onClose:c}=A;return h.useEffect(()=>(document.addEventListener(eO,c),()=>document.removeEventListener(eO,c)),[c]),h.useEffect(()=>{if(A.trigger){let e=e=>{let t=e.target;t?.contains(A.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[A.trigger,c]),(0,j.jsx)(et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:c,children:(0,j.jsxs)(ev,{"data-state":A.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,j.jsx)(e4,{children:n}),(0,j.jsx)(e1,{scope:r,isInside:!0,children:(0,j.jsx)(e_,{id:A.contentId,role:"tooltip",children:i||n})})]})})});eZ.displayName=eJ;var e5="TooltipArrow";h.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,i=eR(r);return e2(e5,r).isInside?null:(0,j.jsx)(eS,{...i,...n,ref:t})}).displayName=e5;var e6=0;function e8(){h.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??e7()),document.body.insertAdjacentElement("beforeend",e[1]??e7()),e6++,()=>{1===e6&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),e6--}},[])}function e7(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}e.s(["useFocusGuards",0,e8],303536);var e9="focusScope.autoFocusOnMount",te="focusScope.autoFocusOnUnmount",tt={bubbles:!1,cancelable:!0},tr=h.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,A]=h.useState(null),l=J(i),c=J(a),d=h.useRef(null),u=V(t,e=>A(e)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(n){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ta(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;null!==t&&(s.contains(t)||ta(d.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ta(s)});return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,s,p.paused]),h.useEffect(()=>{if(s){to.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(e9,tt);s.addEventListener(e9,l),s.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(ta(n,{select:t}),document.activeElement!==r)return}(tn(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&ta(s))}return()=>{s.removeEventListener(e9,l),setTimeout(()=>{let t=new CustomEvent(te,tt);s.addEventListener(te,c),s.dispatchEvent(t),t.defaultPrevented||ta(e??document.body,{select:!0}),s.removeEventListener(te,c),to.remove(p)}
35,0)}}},[s,l,c,p]);let m=h.useCallback(e=>{if(!r&&!n||p.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){var a;let t,n=e.currentTarget,[o,s]=[ti(t=tn(a=n),a),ti(t.reverse(),a)];o&&s?e.shiftKey||i!==s?e.shiftKey&&i===o&&(e.preventDefault(),r&&ta(s,{select:!0})):(e.preventDefault(),r&&ta(o,{select:!0})):i===n&&e.preventDefault()}},[r,n,p.paused]);return(0,j.jsx)(X.div,{tabIndex:-1,...o,ref:u,onKeyDown:m})});function tn(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ti(e,t){for(let r of e)if(!function(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function ta(e,{select:t=!1}={}){if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}tr.displayName="FocusScope";var to=(t=[],{add(e){let r=t[0];e!==r&&r?.pause(),(t=ts(t,e)).unshift(e)},remove(e){t=ts(t,e),t[0]?.resume()}});function ts(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}e.s(["FocusScope",0,tr],765491);var tA=new WeakMap,tl=new WeakMap,tc={},td=0,tu=function(e){return e&&(e.host||tu(e.parentNode))},th=function(e,t,r,n){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=tu(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tc[r]||(tc[r]=new WeakMap);var a=tc[r],o=[],s=new Set,A=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var c=function(e){!e||A.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,A=(tA.get(e)||0)+1,l=(a.get(e)||0)+1;tA.set(e,A),a.set(e,l),o.push(e),1===A&&i&&tl.set(e,!0),1===l&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),s.clear(),td++,function(){o.forEach(function(e){var t=tA.get(e)-1,i=a.get(e)-1;tA.set(e,t),a.set(e,i),t||(tl.has(e)||e.removeAttribute(n),tl.delete(e)),i||e.removeAttribute(r)}),--td||(tA=new WeakMap,tA=new WeakMap,tl=new WeakMap,tc={})}},tp=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),th(n,i,r,"aria-hidden")):function(){return null}};e.s(["hideOthers",0,tp],186312);var tm=e.i(290571),tf="right-scroll-bar-position",tg="width-before-scroll-bar";function ty(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tb="u">typeof window?h.useLayoutEffect:h.useEffect,tx=new WeakMap,tw=(void 0===r&&(r={}),(void 0===n&&(n=function(e){return e}),i=[],a=!1,o={read:function(){if(a)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:null},useMedium:function(e){var t=n(e,a);return i.push(t),function(){i=i.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(a=!0;i.length;){var t=i;i=[],t.forEach(e)}i={push:function(t){return e(t)},filter:function(){return i}}},assignMedium:function(e){a=!0;var t=[];if(i.length){var r=i;i=[],r.forEach(e),t=i}var n=function(){var r=t;t=[],r.forEach(e)},o=function(){return Promise.resolve().then(n)};o(),i={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),i}}}}).options=(0,tm.__assign)({async:!0,ssr:!1},r),o),tv=function(){},tC=h.forwardRef(function(e,t){var r,n,i,a,o=h.useRef(null),s=h.useState({onScrollCapture:tv,onWheelCapture:tv,onTouchMoveCapture:tv}),A=s[0],l=s[1],c=e.forwardProps,d=e.children,u=e.className,p=e.removeScrollBar,m=e.enabled,f=e.shards,g=e.sideCar,y=e.noRelative,b=e.noIsolation,x=e.inert,w=e.allowPinchZoom,v=e.as,C=e.gapMode,B=(0,tm.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(r=[o,t],n=function(e){return r.forEach(function(t){return ty(t,e)})},(i=(0,h.useState)(function(){return{value:null,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,a=i.facade,tb(function(){var e=tx.get(a);if(e){var t=new Set(e),n=new Set(r),i=a.current;t.forEach(function(e){n.has(e)||ty(e,null)}
35),n.forEach(function(e){t.has(e)||ty(e,i)})}tx.set(a,r)},[r]),a),k=(0,tm.__assign)((0,tm.__assign)({},B),A);return h.createElement(h.Fragment,null,m&&h.createElement(g,{sideCar:tw,removeScrollBar:p,shards:f,noRelative:y,noIsolation:b,inert:x,setCallbacks:l,allowPinchZoom:!!w,lockRef:o,gapMode:C}),c?h.cloneElement(h.Children.only(d),(0,tm.__assign)((0,tm.__assign)({},k),{ref:S})):h.createElement(void 0===v?"div":v,(0,tm.__assign)({},k,{className:u,ref:S}),d))});tC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tC.classNames={fullWidth:tg,zeroRight:tf};var tB=function(e){var t=e.sideCar,r=(0,tm.__rest)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return h.createElement(n,(0,tm.__assign)({},r))};tB.isSideCarExport=!0;var tS=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var n,i;(n=t).styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r)),i=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tk=function(){var e=tS();return function(t,r){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},tE=function(){var e=tk();return function(t){return e(t.styles,t.dynamic),null}},tF={left:0,top:0,right:0,gap:0},tT=function(e){return parseInt(e||"",10)||0},tU=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[tT(r),tT(n),tT(i)]},tI=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return tF;var t=tU(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tQ=tE(),tj="data-scroll-locked",tL=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(tj,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(o,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tf," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(tg," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(tf," .").concat(tf," {\n right: 0 ").concat(n,";\n }\n \n .").concat(tg," .").concat(tg," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tj,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},t_=function(){var e=parseInt(document.body.getAttribute(tj)||"0",10);return isFinite(e)?e:0},tP=function(){h.useEffect(function(){return document.body.setAttribute(tj,(t_()+1).toString()),function(){var e=t_()-1;e<=0?document.body.removeAttribute(tj):document.body.setAttribute(tj,e.toString())}},[])},tD=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;tP();var a=h.useMemo(function(){return tI(i)},[i]);return h.createElement(tQ,{styles:tL(a,!t,i,r?"":"!important")})},tR=!1;if("u">typeof window)try{var tM=Object.defineProperty({},"passive",{get:function(){return tR=!0,!0}});window.addEventListener("test",tM,tM),window.removeEventListener("test",tM,tM)}catch(e){tR=!1}var tO=!!tR&&{passive:!1},tN=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},tH=function(e,t){var r=t.ownerDocument,n=t;do{if("u">typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),tV(e,n)){var i=tK(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body)return!1},tV=function(e,t){return"v"===e?tN(t,"overflowY"):tN(t,"overflowX")},tK=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},tG=function(e,t,r,n,i){var a,o=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=o*n,A=r.target,l=t.contains(A),c=!1,d=s>0,u=0,h=0;
35do{if(!A)break;var p=tK(e,A),m=p[0],f=p[1]-p[2]-o*m;(m||f)&&tV(e,A)&&(u+=f,h+=m);var g=A.parentNode;A=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&A!==document.body||l&&(t.contains(A)||t===A))return d&&(i&&1>Math.abs(u)||!i&&s>u)?c=!0:!d&&(i&&1>Math.abs(h)||!i&&-s>h)&&(c=!0),c},tW=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tz=function(e){return[e.deltaX,e.deltaY]},t$=function(e){return e&&"current"in e?e.current:e},tq=0,tX=[];let tY=(s=function(e){var t=h.useRef([]),r=h.useRef([0,0]),n=h.useRef(),i=h.useState(tq++)[0],a=h.useState(tE)[0],o=h.useRef(e);h.useEffect(function(){o.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,tm.__spreadArray)([e.lockRef.current],(e.shards||[]).map(t$),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=h.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var i,a=tW(e),s=r.current,A="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(A)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var u=window.getSelection(),h=u&&u.anchorNode;if(h&&(h===c||h.contains(c)))return!1;var p=tH(d,c);if(!p)return!0;if(p?i=d:(i="v"===d?"h":"v",p=tH(d,c)),!p)return!1;if(!n.current&&"changedTouches"in e&&(A||l)&&(n.current=i),!i)return!0;var m=n.current||i;return tG(m,t,e,"h"===m?A:l,!0)},[]),A=h.useCallback(function(e){if(tX.length&&tX[tX.length-1]===a){var r="deltaY"in e?tz(e):tW(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}
35if(!n){var i=(o.current.shards||[]).map(t$).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?s(e,i[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),l=h.useCallback(function(e,r,n,i){var a={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=h.useCallback(function(e){r.current=tW(e),n.current=void 0},[]),d=h.useCallback(function(t){l(t.type,tz(t),t.target,s(t,e.lockRef.current))},[]),u=h.useCallback(function(t){l(t.type,tW(t),t.target,s(t,e.lockRef.current))},[]);h.useEffect(function(){return tX.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:u}),document.addEventListener("wheel",A,tO),document.addEventListener("touchmove",A,tO),document.addEventListener("touchstart",c,tO),function(){tX=tX.filter(function(e){return e!==a}),document.removeEventListener("wheel",A,tO),document.removeEventListener("touchmove",A,tO),document.removeEventListener("touchstart",c,tO)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(a,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?h.createElement(tD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},tw.useMedium(s),tB);var tJ=h.forwardRef(function(e,t){return h.createElement(tC,(0,tm.__assign)({},e,{ref:t,sideCar:tY}))});tJ.classNames=tC.classNames,e.s(["RemoveScroll",0,tJ],985369);var tZ="Popover",[t0,t1]=K(tZ,[eh]),t2=eh(),[t4,t3]=t0(tZ),t5=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=t2(t),A=h.useRef(null),[l,c]=h.useState(!1),[d,u]=ej({prop:n,defaultProp:i??!1,onChange:a,caller:tZ});return(0,j.jsx)(ef,{...s,children:(0,j.jsx)(t4,{scope:t,contentId:es(),triggerRef:A,open:d,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(e=>!e),[u]),hasCustomAnchor:l,onCustomAnchorAdd:h.useCallback(()=>c(!0),[]),onCustomAnchorRemove:h.useCallback(()=>c(!1),[]),modal:o,children:r})})};t5.displayName=tZ;var t6="PopoverAnchor";h.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=t3(t6,r),a=t2(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return h.useEffect(()=>(o(),()=>s()),[o,s]),(0,j.jsx)(ey,{...a,...n,ref:t})}).displayName=t6;var t8="PopoverTrigger",t7=h.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=t3(t8,r),a=t2(r),o=V(t,i.triggerRef),s=(0,j.jsx)(X.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":rd(i.open),...n,ref:o,onClick:O(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,j.jsx)(ey,{asChild:!0,...a,children:s})});t7.displayName=t8;var t9="PopoverPortal",[re,rt]=t0(t9,{forceMount:void 0}),rr=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=t3(t9,t);return(0,j.jsx)(re,{scope:t,forceMount:r,children:(0,j.jsx)(eU,{present:r||a.open,children:(0,j.jsx)(eT,{asChild:!0,container:i,children:n})})})};rr.displayName=t9;var rn="PopoverContent",ri=h.forwardRef((e,t)=>{let r=rt(rn,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=t3(rn,e.__scopePopover);return(0,j.jsx)(eU,{present:n||a.open,children:a.modal?(0,j.jsx)(ro,{...i,ref:t}):(0,j.jsx)(rs,{...i,ref:t})})});ri.displayName=rn;var ra=W("PopoverContent.RemoveScroll"),ro=h.forwardRef((e,t)=>{let r=t3(rn,e.__scopePopover),n=h.useRef(null),i=V(t,n),a=h.useRef(!1);return h.useEffect(()=>{let e=n.current;if(e)return tp(e)},[]),(0,j.jsx)(tJ,{as:ra,allowPinchZoom:!0,children:(0,j.jsx)(rA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;a.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:O(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),rs=h.forwardRef((e,t)=>
35{let r=t3(rn,e.__scopePopover),n=h.useRef(!1),i=h.useRef(!1);return(0,j.jsx)(rA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),rA=h.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:l,onInteractOutside:c,...d}=e,u=t3(rn,r),h=t2(r);return e8(),(0,j.jsx)(tr,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(et,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:l,onDismiss:()=>u.onOpenChange(!1),children:(0,j.jsx)(ev,{"data-state":rd(u.open),role:"dialog",id:u.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),rl="PopoverClose";h.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=t3(rl,r);return(0,j.jsx)(X.button,{type:"button",...n,ref:t,onClick:O(e.onClick,()=>i.onOpenChange(!1))})}).displayName=rl;var rc=h.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=t2(r);return(0,j.jsx)(eS,{...i,...n,ref:t})});function rd(e){return e?"open":"closed"}rc.displayName="PopoverArrow",e.s(["Arrow",0,rc,"Content",0,ri,"Popover",0,t5,"PopoverContent",0,ri,"PopoverPortal",0,rr,"PopoverTrigger",0,t7,"Root",0,t5,"Trigger",0,t7],178761);var ru=e.i(78333),rh="u">typeof window?h.useLayoutEffect:h.useEffect,rp="u"<typeof window;function rm(e,{defaultValue:t=!1,initializeWithValue:r=!0}={}){let n=e=>rp?t:window.matchMedia(e).matches,[i,a]=(0,h.useState)(()=>r?n(e):t);function o(){a(n(e))}return rh(()=>{let t=window.matchMedia(e);return o(),t.addListener?t.addListener(o):t.addEventListener("change",o),()=>{t.removeListener?t.removeListener(o):t.removeEventListener("change",o)}},[e]),i}e.s(["useCopyToClipboard",0,function(){let[e,t]=(0,h.useState)(null);return[e,(0,h.useCallback)(async e=>{if(!(null==navigator?void 0:navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),t(e),!0}catch(e){return console.warn("Copy failed",e),t(null),!1}},[])]},"useDebounceCallback",0,function(e,t=500,r){var n;let i,a=(0,h.useRef)();n=()=>{a.current&&a.current.cancel()},(i=(0,h.useRef)(n)).current=n,(0,h.useEffect)(()=>()=>{i.current()},[]);let o=(0,h.useMemo)(()=>{let n=(0,ru.default)(e,t,r),i=(...e)=>n(...e);return i.cancel=()=>{n.cancel()},i.isPending=()=>!!a.current,i.flush=()=>n.flush(),i},[e,t,r]);return(0,h.useEffect)(()=>{a.current=(0,ru.default)(e,t,r)},[e,t,r]),o},"useMediaQuery",0,rm],39839);var rf=e.i(403275);e.i(406185);var rg=e.i(457600);let ry=(0,rg.cva)({base:{fill:"modal-background"}}),rb=(0,rg.cva)({base:{fill:"modal-background"}}),rx=({children:e,content:t,open:r,defaultOpen:n,onOpenChange:i,asChild:a=!1,...o})=>rm("(max-width: 600px)")?(0,j.jsxs)(t5,{open:r,defaultOpen:n,onOpenChange:i,children:[(0,j.jsx)(t7,{asChild:a,children:e}),(0,j.jsxs)(ri,{sideOffset:2,side:"bottom",align:"center",style:{zIndex:0x989683,outline:"none",maxWidth:"100vw"},...o,children:[(0,j.jsx)(rc,{className:rb()}),(0,j.jsx)(rf.default,{css:{zIndex:0x989684,boxShadow:"0px 1px 5px rgba(0,0,0,0.2)",borderRadius:8,overflow:"hidden"},children:(0,j.jsx)(rf.default,{css:{background:"modal-background",p:"2"},children:t})})]})]}):(0,j.jsx)(eV,{children:(0,j.jsxs)(ez,{open:r,defaultOpen:n,onOpenChange:i,delayDuration:250,children:[(0,j.jsx)(eq,{asChild:a,children:e}),(0,j.jsxs)(eZ,{sideOffset:2,side:"bottom",align:"center",style:{zIndex:0x989683},...o,children:[(0,j.jsx)("div",{className:ry()}),(0,j.jsx)(rf.default,{css:{zIndex:0x989684,boxShadow:"0px 1px 5px rgba(0,0,0,0.2)",borderRadius:8,overflow:"hidden"},children:(0,j.jsx)(rf.default,{css:{background:"modal-background",p:"2"},children:t})})]})]})});e.s(["default",0,rx],281752);let rw={prefix:"fas",iconName:"route",icon:[512,512,[],"f4d7","M512 96c0 50.2-59.1 125.1-84.6 155c-3.8 4.4-9.4 6.1-14.5 5L320 256c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c53 0 96 43 96 96s-43 96-96 96l-276.4 0c8.7-9.9 19.3-22.6 3
350-36.8c6.3-8.4 12.8-17.6 19-27.2L416 448c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-53 0-96-43-96-96s43-96 96-96l39.8 0c-21-31.5-39.8-67.7-39.8-96c0-53 43-96 96-96s96 43 96 96zM117.1 489.1c-3.8 4.3-7.2 8.1-10.1 11.3l-1.8 2-.2-.2c-6 4.6-14.6 4-20-1.8C59.8 473 0 402.5 0 352c0-53 43-96 96-96s96 43 96 96c0 30-21.1 67-43.5 97.9c-10.7 14.7-21.7 28-30.8 38.5l-.6 .7zM128 352a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM416 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},rv={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},rC={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]};e.s(["faArrowDown",0,{prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},"faArrowLeft",0,{prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},"faArrowRight",0,{prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},"faCheck",0,{prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},"faChevronDown",0,{prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},"faChevronRight",0,{prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},"faCircleCheck",0,{prefix:"fas",iconName:"circle-check",icon:[512,512,[61533,"check-circle"],"f058","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},"faCircleXmark",0,{prefix:"fas",iconName:"circle-xmark",icon:[512,512,[61532,"times-circle","xmark-circle"],"f057","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]},"faClipboard",0,{prefix:"fas",iconName:"clipboard",icon:[384,512,[128203],"f328","M192 0c-41.8 0-77.4 26.7-90.5 64L64 64C28.7 64 0 92.7 0 128L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64l-37.5 0C269.4 26.7 233.8 0 192 0zm0 64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM112 192l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]}
35,"faClock",0,{prefix:"fas",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]},"faClose",0,rv,"faCopy",0,{prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M208 0L332.1 0c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9L448 336c0 26.5-21.5 48-48 48l-192 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48zM48 128l80 0 0 64-64 0 0 256 192 0 0-32 64 0 0 48c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 176c0-26.5 21.5-48 48-48z"]},"faExclamationTriangle",0,rC,"faExternalLink",0,{prefix:"fas",iconName:"arrow-up-right-from-square",icon:[512,512,["external-link"],"f08e","M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l82.7 0L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3l0 82.7c0 17.7 14.3 32 32 32s32-14.3 32-32l0-160c0-17.7-14.3-32-32-32L320 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},"faFolderOpen",0,{prefix:"fas",iconName:"folder-open",icon:[576,512,[128194,128449,61717],"f07c","M88.7 223.8L0 375.8 0 96C0 60.7 28.7 32 64 32l117.5 0c17 0 33.3 6.7 45.3 18.7l26.5 26.5c12 12 28.3 18.7 45.3 18.7L416 96c35.3 0 64 28.7 64 64l0 32-336 0c-22.8 0-43.8 12.1-55.3 31.8zm27.6 16.1C122.1 230 132.6 224 144 224l400 0c11.5 0 22 6.1 27.7 16.1s5.7 22.2-.1 32.1l-112 192C453.9 474 443.4 480 432 480L32 480c-11.5 0-22-6.1-27.7-16.1s-5.7-22.2 .1-32.1l112-192z"]},"faInfoCircle",0,{prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},"faMagnifyingGlass",0,{prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},"faPlus",0,{prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},"faQrcode",0,{prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},"faRotateRight",0,{prefix:"fas",iconName:"rotate-right",icon:[512,512,["redo-alt","rotate-forward"],"f2f9","M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z"]},"faRoute",0,rw,"faStar",0,{prefix:"fas",iconName:"star",icon:[576,512,[11088,61446],"f005","M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"]},"faTriangleExclamation",0,rC,"faXmark",0,rv],468757),e.s(["WidgetErrorWell",0,({error:e,hasInsufficientBalance:t,quote:r,currency:n,relayerFeeProportion:i,isHighRelayerServiceFee:a,isCapacityExceededError:o,isCouldNotExecuteError:s,containerCss:A,recipientWalletSupportsChain:l,recipient:c,toChainWalletVMSupported:d,recipientLinkedWallet:u,toChainVmType:h})=>{let p=rm("(max-width: 600px)"),m=e?e?.response?.data?.message?e?.response?.data.message==="processing response error"?"Amount is higher than the available liquidity.":e?.response?.data.message:"Unknown Error":null,f=-3.5>Number(r?.details?.totalImpact?.percent),g=r?.details?.totalImpact?.usd,y=f&&g&&-10>=Number(g),b=m?.includes("No quotes found"),x=r?.details?.currencyOut&&(r?.details?.currencyOut?.amountUsd===void 0||r?.details?.currencyOut?.amountUsd==="0"),w=e?.response?.data?.errorCode==="NO_SWAP_ROUTES_FOUND"||e?.response?.data?.errorCode==="UNSUPPORTED_ROUTE";return b||w?(0,j.jsxs)(P.Flex,{align:"center",justify:"between",css:{gap:"2",p:"3",width:"100%",borderRadius:"widget-card-border-radius",backgroundColor:"widget-background",border:"widget-card-border",overflow:"hidden",mb:"widget-card-section-gutter"}
35,children:[(0,j.jsx)(D.Text,{style:"subtitle2",children:"Route"}),(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"1"},children:[(0,j.jsx)(D.Text,{style:"subtitle2",color:"subtle",children:"No available routes"}),(0,j.jsx)(_.Box,{css:{color:"gray11",width:14,flexShrink:0},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:rw,width:14})})]})]}):l||!c||(0,L.isDeadAddress)(c)||c===L.tronDeadAddress||!d||u&&u.vmType!==h?m&&!r?(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",p:"3",backgroundColor:"red2","--borderColor":"colors.red4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"red10"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsx)(D.Text,{style:"subtitle3",css:{color:"red12"},children:m})]}):t?null:i&&i>=40n?(0,j.jsx)(rx,{side:p?"top":"right",content:(0,j.jsx)(D.Text,{style:"subtitle3",css:{maxWidth:215,display:"inline-block"},children:"We recommend increasing the amount or waiting for the gas fee to be lower."}),children:(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",py:"3",px:"3",backgroundColor:"amber2","--borderColor":"colors.amber4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"amber10"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsx)(D.Text,{style:"subtitle3",css:{color:"amber12"},children:"Fees exceed 40% of the received amount."})]})}):y?(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",py:"2",px:"3",backgroundColor:"amber2","--borderColor":"colors.amber4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"amber10"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsxs)(D.Text,{style:"subtitle3",css:{color:"amber12"},children:["The price impact is currently high (",r?.details?.totalImpact?.percent,"%)."]})]}):x?(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",py:"2",px:"3",backgroundColor:"amber2","--borderColor":"colors.amber4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"amber10"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsx)(D.Text,{style:"subtitle3",css:{color:"amber12"},children:"Unable to detect token price. Please confirm expected output before submitting."})]}):a?(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",py:"3",px:"3",backgroundColor:"amber2","--borderColor":"colors.amber4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"amber10"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsx)(D.Text,{style:"subtitle3",css:{color:"amber12"},children:"Due to high demand, Relayer fees have temporarily been increased."})]}):null:(0,j.jsxs)(P.Flex,{align:"center",css:{gap:"2",p:"3",backgroundColor:"amber2","--borderColor":"colors.amber4",border:"1px solid var(--borderColor)",borderRadius:12,mb:"3",...A},id:"widget-error-well-section",children:[(0,j.jsx)(_.Box,{css:{color:"amber9"},children:(0,j.jsx)(R.FontAwesomeIcon,{icon:M.faExclamationCircle,width:16})}),(0,j.jsx)(D.Text,{style:"subtitle3",css:{color:"amber12"},children:"Your selected wallet doesn't support the destination chain. Please choose a different wallet."})]})}],527255);var rB=e.i(830553);let rS=({css:e})=>(0,j.jsx)(rB.default,{css:{animationName:"pulse",backgroundColor:"skeleton-background",borderRadius:8,width:100,height:12,animation:"pulse 3s ease-in-out infinite",...e}});e.s(["Skeleton",0,rS],514476);var rk=e.i(285311);e.s(["BalanceDisplay",0,({balance:e,decimals:t,symbol:r,isLoading:n,hasInsufficientBalance:i,displaySymbol:a=!0,isConnected:o,pending:s,hideBalanceLabel:A=!1,size:l="sm"})=>{let c=!!(e&&t&&e.toString().length-t>4),d="md"===l?"subtitle2":"subtitle3";return s?(0,j.jsx)(P.Flex,{align:"center",css:{height:18},children:(0,j.jsx)(D.Text,{style:d,color:"red",children:A?"pending":"Balance: pending"})}):(0,j.jsx)(P.Flex,{align:"center",css:{height:18},children:o?(0,j.jsx)(j.Fragment,{children:n?(0,j.jsx)(rS,{}):(0,j.jsxs)(D.Text,{style:d,color:i?"red":"subtleSecondary",children:[A?"":"Balance: ",void 0!==e?(0,rk.formatBN)(e??0n,5,t,c)+(a&&r?` ${r}`:""):"-"," "]})}):null})}],772222);var rE=e.i(613213);e.s(["PercentageButtons",0,({balance:e,onPercentageClick:t,getFeeBufferAmount:r,fromChain:n,publicClient:i,isFromNative:a,variant:o="desktop",percentages:s=[20,50],buttonStyles:A})=>{let l="mobile"===o,c=A||{fontSize:l?14:12,fontWeight:"500",px:"1",py:l?"6px":"1",minHeight:l?"auto":"23px",lineHeight:"100%",backgroundColor:"widget-selector-background",border:"none",borderRadius:l?"6px":"12px",flex:l?"1":"none",justifyContent:"center",_hover:{backgroundColor:"widget-selector-hover-background"}},d=async()=>
35{if(!e||!n)return;let o=0n;a&&r&&(o=await r(n.vmType,n.id,e,i??null)),t(a&&o>0n&&e>o?e-o:e,"max",a?o:0n)};return(0,j.jsxs)(P.Flex,{css:{gap:"1",width:l?"100%":"auto",mb:l?"1":"0"},children:[s.map(r=>(0,j.jsxs)(rE.Button,{"aria-label":`${r}%`,css:c,color:"white",disabled:!e||0n===e,onClick:()=>{e&&e>0n&&t(e*BigInt(r)/100n,`${r}%`)},children:[r,"%"]},r)),(0,j.jsx)(rE.Button,{"aria-label":"MAX",css:c,color:"white",disabled:!e||0n===e,onMouseEnter:()=>{n?.vmType==="evm"&&i&&e&&r?r(n.vmType,n.id,e,i):n?.vmType==="svm"&&n.id&&r&&r(n.vmType,n.id,0n,null)},onClick:d,children:"MAX"})]})}],133253),e.s(["EventNames",0,{SWAP_CTA_CLICKED:"SWAP_CTA_CLICKED",QUOTE_ERROR:"QUOTE_ERROR",SWAP_ERROR:"SWAP_ERROR",SWAP_INPUT_FOCUSED:"SWAP_INPUT_FOCUSED",SWAP_OUTPUT_FOCUSED:"SWAP_OUTPUT_FOCUSED",SWAP_ADDRESS_MODAL_CLICKED:"SWAP_ADDRESS_MODAL_CLICKED",SWAP_SWITCH_NETWORK:"SWAP_SWITCH_NETWORK",QUOTE_REQUESTED:"QUOTE_REQUESTED",QUOTE_RECEIVED:"QUOTE_RECEIVED",SWAP_SLIPPAGE_TOLERANCE_SET:"SWAP_SLIPPAGE_TOLERANCE_SET",DEPOSIT_ADDRESS_MODAL_OPEN:"DEPOSIT_ADDRESS_MODAL_OPEN",DEPOSIT_ADDRESS_MODAL_CLOSED:"DEPOSIT_ADDRESS_MODAL_CLOSED",DEPOSIT_ADDRESS_SWAP_ERROR:"DEPOSIT_ADDRESS_SWAP_ERROR",SWAP_MODAL_OPEN:"SWAP_MODAL_OPEN",SWAP_MODAL_CLOSED:"SWAP_MODAL_CLOSED",SWAP_START_TOKEN_SELECT:"SWAP_START_TOKEN_SELECT",SWAP_TOKEN_SELECT:"SWAP_TOKEN_SELECT",SWAP_EXIT_TOKEN_SELECT:"SWAP_EXIT_TOKEN_SELECT",DEPOSIT_SUBMITTED:"DEPOSIT_SUBMITTED",APPROVAL_SUBMITTED:"APPROVAL_SUBMITTED",APPROVAL_SUCCESS:"APPROVAL_SUCCESS",APPROVAL_ERROR:"APPROVAL_ERROR",DEPOSIT_SUCCESS:"DEPOSIT_SUCCESS",DEPOSIT_ERROR:"DEPOSIT_ERROR",BATCH_TX_SUBMITTED:"BATCH_TX_SUBMITTED",FILL_SUCCESS:"FILL_SUCCESS",FILL_ERROR:"FILL_ERROR",SWAP_SUCCESS:"SWAP_SUCCESS",SWAP_ROUTE_SELECTED:"SWAP_ROUTE_SELECTED",TOKEN_SELECTOR_CONTRACT_SEARCH:"TOKEN_SELECTOR_CONTRACT_SEARCH",CTA_SET_MAX_CAPACITY_CLICKED:"CTA_SET_MAX_CAPACITY_CLICKED",CTA_SWITCH_ROUTE_CLICKED:"CTA_SWITCH_ROUTE_CLICKED",CTA_MAX_CAPACITY_PROMPTED:"CTA_MAX_CAPACITY_PROMPTED",WALLET_SELECTOR_SELECT:"WALLET_SELECTOR_SELECT",WALLET_SELECTOR_OPEN:"WALLET_SELECTOR_OPEN",WALLET_SELECTOR_CLOSE:"WALLET_SELECTOR_CLOSE",MAX_AMOUNT_CLICKED:"MAX_AMOUNT_CLICKED",CURRENCY_STEP_CHAIN_FILTER:"CURRENCY_STEP_CHAIN_FILTER",UNVERIFIED_TOKEN_ACCEPTED:"UNVERIFIED_TOKEN_ACCEPTED",ONRAMP_MODAL_OPEN:"ONRAMP_MODAL_OPEN",ONRAMP_MODAL_CLOSE:"ONRAMP_MODAL_CLOSE",ONRAMP_CTA_CLICKED:"ONRAMP_CTA_CLICKED",ONRAMPING_MOONPAY_TX_START:"ONRAMPING_MOONPAY_TX_START",ONRAMPING_MOONPAY_TX_COMPLETE:"ONRAMPING_MOONPAY_TX_COMPLETE",ONRAMPING_MOONPAY_TX_FAILED:"ONRAMPING_MOONPAY_TX_FAILED",ONRAMPING_MOONPAY_TX_API_ERROR:"ONRAMPING_MOONPAY_TX_API_ERROR",ONRAMP_SUCCESS:"ONRAMP_SUCCESS",ONRAMP_ERROR:"ONRAMP_ERROR",ONRAMP_PASSTHROUGH_SUCCESS:"ONRAMP_PASSTHROUGH_SUCCESS",GAS_TOP_UP_TOGGLE:"GAS_TOP_UP_TOGGLE",AGW_CHECK_ERROR:"AGW_CHECK_ERROR",CHAIN_STARRED:"CHAIN_STARRED",CHAIN_UNSTARRED:"CHAIN_UNSTARRED",USER_REJECTED_WALLET:"USER_REJECTED_WALLET",CONNECT_WALLET_CLICKED:"CONNECT_WALLET_CLICKED",TRANSACTION_VALIDATING:"TRANSACTION_VALIDATING",ADDRESS_MODAL_OPEN:"ADDRESS_MODAL_OPEN",ADDRESS_MODAL_CONFIRMED:"ADDRESS_MODAL_CONFIRMED"}],214288);var rF=e.i(789594),rT=e.i(789408),rU=e.i(348396),rI=e.i(170778),rQ=e.i(210920);e.s(["useReadContract",0,function(e={}){let{abi:t,address:r,functionName:n,query:i={}}=e,a=e.code,o=(0,rQ.useConfig)(e),s=(0,rI.useChainId)({config:o}),A=function(e,t={}){return{async queryFn({queryKey:r}){let n=t.abi;if(!n)throw Error("abi is required");let{functionName:i,scopeKey:a,...o}=r[1],s=(()=>{let e=r[1];if(e.address)return{address:e.address};if(e.code)return{code:e.code};throw Error("address or code is required")})();if(!i)throw Error("functionName is required");return(0,rF.readContract)(e,{abi:n,functionName:i,args:o.args,...s,...o})},queryKey:function(e={}){let{abi:t,...r}=e;return["readContract",(0,rT.filterQueryOptions)(r)]}(t)}}(o,{...e,chainId:e.chainId??s}),l=!!((r||a)&&t&&n&&(i.enabled??!0));return(0,rU.useQuery)({...i,...A,enabled:l,structuralSharing:i.structuralSharing??rT.structuralSharing})}],896137)},458093,(e,t,r)=>{"use strict";
35Object.defineProperty(r,"__esModule",{value:!0});var n="xmark",i=[128473,10005,10006,10060,215,"close","multiply","remove","times"],a="f00d",o="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z";r.definition={prefix:"fas",iconName:n,icon:[384,512,i,a,o]},r.faXmark=r.definition,r.prefix="fas",r.iconName=n,r.width=384,r.height=512,r.ligatures=i,r.unicode=a,r.svgPathData=o,r.aliases=i},631078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="arrow-right",i=[8594],a="f061",o="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z";r.definition={prefix:"fas",iconName:n,icon:[448,512,i,a,o]},r.faArrowRight=r.definition,r.prefix="fas",r.iconName=n,r.width=448,r.height=512,r.ligatures=i,r.unicode=a,r.svgPathData=o,r.aliases=i},898474,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="clock",i=[128339,"clock-four"],a="f017",o="M256 0a256 256 0 1 1 0 512A256 256 0 1 1 256 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z";r.definition={prefix:"fas",iconName:n,icon:[512,512,i,a,o]},r.faClock=r.definition,r.prefix="fas",r.iconName=n,r.width=512,r.height=512,r.ligatures=i,r.unicode=a,r.svgPathData=o,r.aliases=i},189515,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(898474);r.definition={prefix:n.prefix,iconName:n.iconName,icon:[n.width,n.height,n.aliases,n.unicode,n.svgPathData]},r.faClockFour=r.definition,r.prefix=n.prefix,r.iconName=n.iconName,r.width=n.width,r.height=n.height,r.ligatures=n.aliases,r.unicode=n.unicode,r.svgPathData=n.svgPathData,r.aliases=n.aliases},13484,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="gas-pump",i=[9981],a="f52f",o="M32 64C32 28.7 60.7 0 96 0L256 0c35.3 0 64 28.7 64 64l0 192 8 0c48.6 0 88 39.4 88 88l0 32c0 13.3 10.7 24 24 24s24-10.7 24-24l0-154c-27.6-7.1-48-32.2-48-62l0-64L384 64c-8.8-8.8-8.8-23.2 0-32s23.2-8.8 32 0l77.3 77.3c12 12 18.7 28.3 18.7 45.3l0 13.5 0 24 0 32 0 152c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-32c0-22.1-17.9-40-40-40l-8 0 0 144c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 64zM96 80l0 96c0 8.8 7.2 16 16 16l128 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16L112 64c-8.8 0-16 7.2-16 16z";r.definition={prefix:"fas",iconName:n,icon:[512,512,i,a,o]},r.faGasPump=r.definition,r.prefix="fas",r.iconName=n,r.width=512,r.height=512,r.ligatures=i,r.unicode=a,r.svgPathData=o,r.aliases=i},162388,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n="chevron-down",i=[],a="f078",o="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";r.definition={prefix:"fas",iconName:n,icon:[512,512,i,a,o]},r.faChevronDown=r.definition,r.prefix="fas",r.iconName=n,r.width=512,r.height=512,r.ligatures=i,r.unicode=a,r.svgPathData=o,r.aliases=i},906386,326999,641696,546017,e=>{"use strict";let t,r,n,i,a,o,s;var A,l,c,d,u,h,p,m,f,g,y,b,x,w=e.i(474076),v=e.i(500932),C=e.i(271645),B=e.i(709643);e.i(565306);var S=e.i(849850),k=e.i(309833),E=e.i(613213),F=e.i(310479),T=e.i(446999),U=e.i(902282),I=e.i(644616),Q=e.i(700510),j=e.i(285311),L=e.i(329805),_=e.i(811488),P=e.i(747727),D=e.i(57844),R=e.i(527255),M=e.i(772222),O=e.i(133253),N=e.i(214288),H=e.i(796516),V=e.i(914146),K=e.i(160518),G=e.i(896137),W=e.i(752012),z=e.i(30757),$=e.i(266027);let q=/^(?!T[1-9A-HJ-NP-Za-km-z]{33}$)(?!0x[0-9a-fA-F]{40}$)(?!0x[0-9a-fA-F]{64}$)(?!bc1)[1-9A-HJ-NP-Za-km-z]{32,44}$/,X=["backpackeclipse"],Y=(e,t="mainnet",r)=>{var n;let i=(0,C.useContext)(z.ProviderOptionsContext),a=["useDuneBalances",e],o=(0,H.isAddress)(e??""),s=(n=e??"",q.test(n)),A=(0,$.useQuery)({queryKey:["useDuneBalances",e],queryFn:()=>{let r=`${i.duneConfig?.apiBaseUrl??"https://api.sim.dune.com"}/v1/evm/balances/${e?.toLowerCase()}?chain_ids=${t}&exclude_spam_tokens=true`;return(s&&(r=`${i.duneConfig?.apiBaseUrl??"https://api.sim.dune.com"}/beta/svm/balances/${e}?chain_ids=all&exclude_spam_tokens=true`),s||o)?fetch(r,{headers:i.duneConfig?.apiKey?{"X-Sim-Api-Key":i.duneConfig?.apiKey}:{}}).then(e=>e.json()).then(e=>{if(e.balances){let t=e.balances;t&&t.filter(e=>{try{return BigInt(e.amount),!0}catch(e){return!1}}).sort((e,t)=>
35void 0!==e.value_usd&&void 0!==t.value_usd?e.value_usd-t.value_usd:void 0!==e.value_usd?-1:void 0!==t.value_usd?1:parseFloat((0,I.formatUnits)(BigInt(e.amount),e.decimals))-parseFloat((0,I.formatUnits)(BigInt(t.amount),t.decimals)))}return e}):null},...r,enabled:void 0!==e&&(i.duneConfig?.apiKey!==void 0||i.duneConfig?.apiBaseUrl!==void 0)&&r?.enabled&&(s||o)}),l=A?.data?.balances?.reduce((e,t)=>{let r={...t};r.chain_id||"solana"!==r.chain||(r.chain_id=0x2f3fb341),r.chain_id||"eclipse"!==r.chain||(r.chain_id=9286185),"native"===r.address&&(r.address="solana"===r.chain||"eclipse"===r.chain?"11111111111111111111111111111111":V.zeroAddress);let n=r.chain_id;return n||"solana"!==r.chain||(n=0x2f3fb341),n||"eclipse"!==r.chain||(n=9286185),e[`${n}:${r.address}`]=r,e},{});return{...A,balanceMap:l,queryKey:a}};var J=e.i(156720),Z=e.i(211786);let ee=/^(bc1[a-zA-HJ-NP-Z0-9]{39,59}|[13][a-km-zA-HJ-NP-Z1-9]{26,35}|[2][mn][a-km-zA-HJ-NP-Z1-9]{43}|[bc][A-HJ-NP-Za-km-z1-9]{25,34})$/,et=/^(0x[a-fA-F0-9]{64})$/,er=/^(41[a-fA-F0-9]{40}|T[a-zA-Z0-9]{33})$/,en=/^\d+$/;function ei(e){return en.test(e)}let ea=(e,t,r,n,i)=>{let a;if(i&&i[9286185]?a=i[9286185]:"svm"===e&&(a=X),t){if("evm"===e||"hypevm"===e||!e)return(0,H.isAddress)(t);else if("svm"===e)return!(r&&n&&(9286185===r&&!a.includes(n.toLowerCase())||0x2f3fb341===r&&a.includes(n.toLowerCase())))&&q.test(t);else if("bvm"===e)return ee.test(t);else if("suivm"===e)return et.test(t);else if("tvm"===e)return er.test(t);else if("lvm"===e)return ei(t)}return!1},eo=(e,t,r,n,i)=>t&&ea(e??"evm",t,r,n,i)?t:(0,Z.getDeadAddress)(e,r);function es(e,t,r,n){let i=r.find(e=>e.address===t);if(i?.vmType!==e.vmType||i&&!ea(e.vmType,i.address,e.id,i.connector,n)){let t=r.find(t=>ea(e.vmType,t.address,e.id,t.connector,n));return t?.address}}var eA=e.i(668375);let el="0x00000000000000000000000000000000",ec={"0x2e6d84f2d7ca82e6581e03523e4389f7":{coin:"USDe",decimals:2},"0x54e00a5988577cb0b0c9ab0cb6ef7f4b":{coin:"USDH",decimals:2}},ed=Object.fromEntries(Array.from("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz").map((e,t)=>[e,t]));async function eu(e){let t=await eh(e);if(21!==t.length||65!==t[0])throw Error("Invalid TRON address payload");return"0x"+[...t.slice(1)].map(e=>e.toString(16).padStart(2,"0")).join("")}async function eh(e){let t=[0];for(let r of e){let e=ed[r];if(void 0===e)throw Error("Invalid base58 char");let n=e;for(let e=0;e<t.length;e++){let r=58*t[e]+n;t[e]=255&r,n=r>>8}for(;n;)t.push(255&n),n>>=8}for(let r of e){if("1"!==r)break;t.push(0)}if((t=t.reverse()).length<4)throw Error("Too short for checksum");let r=new Uint8Array(t.slice(0,-4)),n=t.slice(-4),i=await crypto.subtle.digest("SHA-256",r),a=new Uint8Array(await crypto.subtle.digest("SHA-256",i)).slice(0,4);if(!n.every((e,t)=>e===a[t]))throw Error("Invalid base58 checksum");return r}let ep=({chain:e,address:t,currency:r,enabled:n=!0,refreshInterval:i=6e4,wallet:a})=>{var o,s,A;let l,c,d,u,h,p,m,f,g,y,b=r&&r!==V.zeroAddress,x=t&&(0,H.isAddress)(t),w=(0,J.default)(),v=a?.getBalance!==void 0&&a.vmType===e?.vmType,B=(({wallet:e,chain:t,address:r,currency:n,enabled:i=!0,refreshInterval:a=6e4})=>{let o=["adaptedWalletBalance",e?.vmType,t?.id,r,n];return{...(0,$.useQuery)({queryKey:o,queryFn:async()=>{if(e?.getBalance&&t?.id&&r)return e.getBalance(t.id,r,n)},enabled:!!(e?.getBalance&&i&&t?.id&&r),refetchInterval:a}),queryKey:o}})({wallet:a,chain:e,address:t,currency:r,enabled:n&&v,refreshInterval:i}),{data:S,queryKey:k,isLoading:E,isError:F,error:T}=(0,K.useBalance)({chainId:e?.id,address:t,query:{enabled:!!(!v&&!b&&e&&"evm"===e.vmType&&x&&n),refetchInterval:i}}),{data:U,queryKey:I,isLoading:Q,isError:j,error:L}=(0,G.useReadContract)({chainId:e?.id,address:r,abi:W.erc20Abi,functionName:"balanceOf",args:t?[t]:void 0,query:{enabled:!!(!v&&b&&e&&"evm"===e.vmType&&x&&n),refetchInterval:i}}),_=ea(e?.vmType,t,e?.id),P=Y(t,w?.baseApiUrl?.includes("testnet")?"testnet":"mainnet",{enabled:!!(!v&&e&&"svm"===e.vmType&&9286185!==e.id&&t&&_&&n),staleTime:i,gcTime:i}),D=(o={enabled:!!(!v&&e&&"bvm"===e.vmType&&t&&_&&n),gcTime:i,staleTime:i},(0,C.useContext)(z.ProviderOptionsContext),l=["useBitcoinBalance",t],{...c=(0,$.useQuery)({queryKey:["useBitcoinBalance",t],queryFn:()=>fetch(`https://mempool.space/api/address/${t}`).then(e=>e.json()).then(e=>{let t=BigInt(0),r=BigInt(0);if(e){let n=e.chain_stats.funded_txo_sum,i=e.chain_stats.spent_txo_sum;r=BigInt(e.mempool_stats.spent_txo_sum),t=BigInt(n)-BigInt(i)-r}return{balance:t,pendingBalance:r}}),enabled:void 0!==t,...o}),balance:c.data?.balance,queryKey:l}),R=((e,t="0x2::sui::SUI",r)=>{let n=(0,J.default)(),i=n?.baseApiUrl?.includes("testnet")?"https://fullnode.testnet.sui.io:443":"https://fullnode.mainnet.sui.io:443",a=["useSuiBalance",e,t,i],o=(0,$.useQuery)({queryKey:a,queryFn:async()=>{let r=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"suix_getBalance",params:[e,t]})}),n=await r.json();if(n.error)throw Error(n.error.message);let a=n.result;
35return{balance:BigInt(a.totalBalance),lockedBalance:BigInt(Object.values(a.lockedBalance)[0]||0)}},enabled:void 0!==e,...r});return{...o,balance:o.data?.balance,lockedBalance:o.data?.lockedBalance,queryKey:a}})(t,r,{enabled:!!(!v&&e&&"suivm"===e.vmType&&t&&_&&n),gcTime:i,staleTime:i}),M=(s={enabled:!!(!v&&e&&"svm"===e.vmType&&9286185===e.id&&t&&_&&n)},d=(0,J.default)(),p=["useEclipseBalance",t,h=(u=d?.chains?.find(e=>9286185===e.id))&&u.httpRpcUrl?u.httpRpcUrl:"https://mainnetbeta-rpc.eclipse.xyz"],{...m=(0,$.useQuery)({queryKey:p,queryFn:async()=>{let e=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"getBalance",params:[t]})}),r=await e.json();if(r.error)throw Error(r.error.message);return{balance:BigInt(r.result.value)}},enabled:void 0!==t,...s}),balance:m.data?.balance,queryKey:p}),O=((e,t=el,r)=>{let n=(0,H.isAddress)(e??""),i=t===el,a=ec[t.toLowerCase()],o=i?8:a?.decimals??2,s=["useHyperliquidBalance",e,t],A=(0,$.useQuery)({queryKey:s,queryFn:async()=>{if(e&&n){if(i){let t=await fetch("https://api.hyperliquid.xyz/info",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"clearinghouseState",user:e})}),r=await t.json();return r?.withdrawable}else if(a){let t=await fetch("https://api.hyperliquid.xyz/info",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"spotClearinghouseState",user:e})}),r=await t.json(),n=r?.balances?.find(e=>e.coin.toLowerCase()===a.coin.toLowerCase());return n?.total}}},enabled:void 0!==e&&n,...r}),l=(0,eA.parseUnits)(A.data??"0",o);return{...A,balance:l,queryKey:s}})(t,r,{enabled:!!(!v&&e&&"hypevm"===e.vmType&&t&&_&&n),gcTime:i,staleTime:i}),N=(A={enabled:!!(!v&&e&&"tvm"===e.vmType&&t&&_&&n),gcTime:i,staleTime:i},f="https://api.trongrid.io",g=["useTronBalance",t,r],{...y=(0,$.useQuery)({queryKey:g,queryFn:async()=>{if(t)if("TXuo7BWT6hDdotW8LPPeiShe1KHUFzB6hJ"!==r&&r){let e=(await eu(t)).slice(2).padStart(64,"0"),n=await fetch(`${f}/walletsolidity/triggerconstantcontract`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({owner_address:t,contract_address:r,function_selector:"balanceOf(address)",parameter:e,visible:!0})}),i=await n.json();if(i.error)throw Error(i.error.message);return{balance:BigInt("0x"+i?.constant_result?.[0])}}else{let e=await fetch(`${f}/walletsolidity/getaccount`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:t,visible:!0})}),r=await e.json();if(r.error)throw Error(r.error.message);return{balance:BigInt(r.result.balance??0)}}},enabled:void 0!==t,...A}),balance:y.data?.balance,queryKey:g});if(v)return{value:B.data,queryKey:B.queryKey,isLoading:B.isLoading,isError:B.isError,error:B.error,isDuneBalance:!1};if(e?.vmType==="evm")return{value:b?U:S?.value,queryKey:b?I:k,isLoading:b?Q:E,isError:b?j:T,error:b?L:F,isDuneBalance:!1};if(e?.vmType==="svm"){let t,n=!0,i=!1,a=null;return(9286185===e.id?(t=M.data?.balance,n=!1,i=M.isError,a=M.error):(t=r&&P.balanceMap&&P.balanceMap[`${e.id}:${r}`]&&P.balanceMap[`${e.id}:${r}`].amount?BigInt(P.balanceMap[`${e.id}:${r}`].amount??0):void 0,n=!0,i=P.isError,a=P.error),_)?{value:t,queryKey:P.queryKey,isLoading:P.isLoading,isError:i,error:a,isDuneBalance:n}:{value:void 0,queryKey:P.queryKey,isLoading:P.isLoading,isError:i,error:a,isDuneBalance:n}}if(e?.vmType==="bvm")if(_)return{value:r&&D.balance?D.balance:void 0,queryKey:D.queryKey,isLoading:D.isLoading,isError:D.isError,error:D.error,isDuneBalance:!1,hasPendingBalance:!!(D.data?.pendingBalance&&D.data?.pendingBalance>0n)};else return{value:void 0,queryKey:D.queryKey,isLoading:D.isLoading,isError:D.isError,error:D.error,isDuneBalance:!1,hasPendingBalance:!1};if(e?.vmType==="suivm")return{value:R.balance,queryKey:R.queryKey,isLoading:R.isLoading,isError:R.isError,error:R.error,isDuneBalance:!1};else if(e?.vmType==="hypevm")return{value:O.balance,queryKey:O.queryKey,isLoading:O.isLoading,isError:O.isError,error:O.error,isDuneBalance:!1};else if(e?.vmType==="tvm")return{value:N.balance,queryKey:N.queryKey,isLoading:N.isLoading,isError:N.isError,error:N.error,isDuneBalance:!1};else return{value:void 0,queryKey:P.queryKey,isLoading:P.isLoading,isError:P.isError,error:P.error,isDuneBalance:!1}};var em=e.i(39839);function ef(e,t,r){let n=(0,C.useMemo)(()=>
35r,[r]),i=n?.equalityFn??((e,t)=>e===t),a=e instanceof Function?e():e,[o,s]=(0,C.useState)(a),[A,l]=(0,C.useState)(a),c=(0,C.useRef)(a),d=(0,em.useDebounceCallback)(s,t,n);return i(c.current,a)||(d(a),c.current=a),{value:A,debouncedValue:o,setValue:e=>{d.cancel(),l(e),d(e)},setDebouncedValue:e=>{d.cancel(),d(e)},debouncedControls:d}}var eg=e.i(982615);function ey(e,t){let[r,n]=(0,C.useState)(),{address:i}=(0,eg.useAccount)();return(0,C.useEffect)(()=>{(async e=>{e?n(await e.address()):n(void 0)})(e)},[e,t]),e?r:i}let eb={phantom:[1,8453,0x2f3fb341,137,8253038,101,10143,143,999],backpack:[1,8453,137,42161,10,10143,80094,9286185,0x2f3fb341],magiceden:[1,137,8453,33139,8253038,0x2f3fb341,1329,2741,42161,80094,56,43114],uniswap:[1,130,42161,43114,8453,81457,56,42220,10,137,480,324,7777777],abstract:[2741],ronin:[1,56,137,42161,8453,2020],porto:[8453,42161,56,42220,1,10,137,80094]},ex={binance:[7777777,8453],binanceus:[7777777,8453]},ew={phantomevm:"phantom",phantomsui:"phantom",phantombtc:"phantom",magicedensol:"magiceden",roninwallet:"ronin",portoevm:"porto",surfwalletsui:"surf",trusttron:"trust"},ev=[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isAGW",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"}],eC=(e,t)=>{let r=(0,C.useState)(e);return t||r};var eB=e.i(994661),eS=e.i(419954),ek=e.i(801782);let eE=function(e=eB.MAINNET_RELAY_API,t,r){let n=new URL(`${e}/currencies/token/price`);return(0,eS.setParams)(n,t??{}),(0,ek.default)(n.href,r)};function eF(e,t,r){let n=(0,$.useQuery)({queryKey:["useTokenPrice",t],queryFn:()=>eE(e,t),retry:!1,...r});return(0,C.useMemo)(()=>({...n}),[n.data,n.error,n.isLoading])}function eT(e,t,r,n){if(!e)return e;let i=r??4,a=n??4,o=i+a+1;return e.length<=o?e:e.slice(0,i)+(t||"â¦")+e.slice(-a)}let eU=(e,t)=>{var r;let n=e?.toLowerCase(),i=`https://api.ensideas.com/ens/resolve/${n}`,a=(0,$.useQuery)({queryKey:["useENSResolver",e],queryFn:()=>fetch(i).then(e=>e.json()),...t,enabled:!!e&&e.length>0&&(t?.enabled===void 0||t.enabled)}),o=e?eT(e):"",s=a.data?.name?(r=a.data.name).length<24?r:r.slice(0,20)+"â¦"+r.slice(-3):null,A="";return a.data?.name?A=s||"":e&&(A=o||""),{...a,address:e,name:a.data?.name,shortName:s,displayName:A,shortAddress:o,avatar:a.data?.avatar}};var eI=e.i(912598);let eQ=(e,t)=>{let r=(0,eI.useQueryClient)(),n=!!e&&(0,H.isAddress)(e),i=!!e&&/^\d+$/.test(e),a=n?"l1_address":"index",o=n?e?.toLowerCase():e;return(0,$.useQuery)({queryKey:["useLighterAccount",o],queryFn:async()=>{if(i){for(let[,t]of r.getQueriesData({queryKey:["useLighterAccount"]}))if(t&&t.index?.toString()===e)return t}let t=new URL("https://mainnet.zklighter.elliot.ai/api/v1/account");t.searchParams.set("by",a),t.searchParams.set("value",e);let s=await fetch(t.toString());if(!s.ok)return null;let A=await s.json();if(200!==A.code||!A.accounts?.length)return null;let l=A.accounts[0],c=n?l.index.toString():l.l1_address.toLowerCase();return c&&c!==o&&r.setQueryData(["useLighterAccount",c],l),l},...t,enabled:!!e&&(!!n||!!i)&&(t?.enabled===void 0||t.enabled)})};function ej(e){return/^[a-zA-Z0-9-]{3,}\.eth$/.test(e)}var eL=e.i(645037),e_=e.i(477480),eP=e.i(44563);async function eD(e,t={}){let{account:r,chainId:n,connector:i}=t,a=await (0,eP.getConnectorClient)(e,{account:r,connector:i});return(0,e_.getCapabilities)(a,{account:r,chainId:n})}var eR=e.i(206148),eM=e.i(789408),eO=e.i(348396),eN=e.i(210920),eH=e.i(822315),eV=e.i(472856);eH.default.extend(eV.default);let eK=e=>{let t=Math.floor((e=Number(e))/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),i=Math.floor(e%60),a=[];return t>0&&a.push(`${t}d`),r>0&&a.push(`${r}h`),n>0&&a.push(`${n}m`),i>0&&a.push(`${i}s`),a.join(" ")},eG=()=>{let e=new Date,t=Math.floor(e.getUTCMinutes()/15),r=new Date(e);return r.setUTCMinutes(15*t,0,0),r.getTime()};function eW(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function ez(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function e$(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function eq(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function eX(e,t){return e<<32-t|e>>>t}function eY(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),eW(e),e}e.i(581949);class eJ{}class eZ extends eJ{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=eq(this.buffer)}update(e){ez(this),eW(e=eY(e));let{view:t,buffer:r,blockLen:n}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(n-this.pos,i-a);if(o===n){let t=eq(e);for(;n<=i-a;a+=n)this.process(t,a);continue}r.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ez(this);eW(e);let t=this.outputLen;if(e.length<t)throw Error("digestInto() expects output buffer of length at least "+t);this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:a}=this,{pos:o}=this;r[o++]=128,e$(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let e=o;e<i;e++)r[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),a=BigInt(0xffffffff),o=Number(r>>i&a),s=Number(r&a),A=4*!!n,l=4*!n;e.setUint32(t+A,o,n),e.setUint32(t+l,s,n)}(n,i-8,BigInt(8*this.length),a),this.process(n,0);let s=eq(e),A=this.outputLen;if(A%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=A/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)s.setUint32(4*e,c[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=n,e.pos=o,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}
35let e0=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),e1=Uint32Array.from([0xc1059ed8,0x367cd507,0x3070dd17,0xf70e5939,0xffc00b31,0x68581511,0x64f98fa7,0xbefa4fa4]),e2=Uint32Array.from([0xcbbb9d5d,0xc1059ed8,0x629a292a,0x367cd507,0x9159015a,0x3070dd17,0x152fecd8,0xf70e5939,0x67332667,0xffc00b31,0x8eb44a87,0x68581511,0xdb0c2e0d,0x64f98fa7,0x47b5481d,0xbefa4fa4]),e4=Uint32Array.from([0x6a09e667,0xf3bcc908,0xbb67ae85,0x84caa73b,0x3c6ef372,0xfe94f82b,0xa54ff53a,0x5f1d36f1,0x510e527f,0xade682d1,0x9b05688c,0x2b3e6c1f,0x1f83d9ab,0xfb41bd6b,0x5be0cd19,0x137e2179]),e3=BigInt(0x100000000-1),e5=BigInt(32),e6=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),e8=new Uint32Array(64);class e7 extends eZ{constructor(e=32){super(64,e,8,!1),this.A=0|e0[0],this.B=0|e0[1],this.C=0|e0[2],this.D=0|e0[3],this.E=0|e0[4],this.F=0|e0[5],this.G=0|e0[6],this.H=0|e0[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:a,G:o,H:s}=this;return[e,t,r,n,i,a,o,s]}set(e,t,r,n,i,a,o,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|a,this.G=0|o,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)e8[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=e8[e-15],r=e8[e-2],n=eX(t,7)^eX(t,18)^t>>>3,i=eX(r,17)^eX(r,19)^r>>>10;e8[e]=i+e8[e-7]+n+e8[e-16]|0}let{A:r,B:n,C:i,D:a,E:o,F:s,G:A,H:l}=this;for(let e=0;e<64;e++){var c,d,u,h;let t=l+(eX(o,6)^eX(o,11)^eX(o,25))+((c=o)&s^~c&A)+e6[e]+e8[e]|0,p=(eX(r,2)^eX(r,13)^eX(r,22))+((d=r)&(u=n)^d&(h=i)^u&h)|0;l=A,A=s,s=o,o=a+t|0,a=i,i=n,n=r,r=t+p|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,A=A+this.G|0,l=l+this.H|0,this.set(r,n,i,a,o,s,A,l)}roundClean(){e$(e8)}destroy(){this.set(0,0,0,0,0,0,0,0),e$(this.buffer)}}let e9=function(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let a=0;a<r;a++){let{h:r,l:o}=function(e,t=!1){return t?{h:Number(e&e3),l:Number(e>>e5&e3)}:{h:0|Number(e>>e5&e3),l:0|Number(e&e3)}}(e[a],t);[n[a],i[a]]=[r,o]}return[n,i]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
355771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),te=e9[0],tt=e9[1],tr=new Uint32Array(80),tn=new Uint32Array(80),ti=(A=()=>new e7,(r=e=>A().update(eY(e)).digest()).outputLen=(n=A()).outputLen,r.blockLen=n.blockLen,r.create=()=>A(),r);function ta(e){let t,r=JSON.stringify((t=e=>null===e||"object"!=typeof e?e:Array.isArray(e)?e.map(t):Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,r])=>[e,t(r)]))(e),(e,t)=>"bigint"==typeof t?t.toString():void 0===t?null:"object"==typeof t&&null!==t&&"toString"in t&&"function"==typeof t.toString?t.toString():t);return[...ti(new TextEncoder().encode(r))].map(e=>Number(e).toString(16).padStart(2,"0")).join("")}let to=(e,t=!1)=>{let r=Number(e??0),n=t?-r:r;return{value:n,formatted:(0,j.formatDollar)(n)}},ts=e=>e&&e[0]?e[0].requestId:void 0,tA=e=>{let t=e?.currencyIn?.currency?.chainId===8253038||e?.currencyOut?.currency?.chainId===8253038?1200:e?.timeEstimate??0,r=eK(t);return{time:t,formattedTime:r}},tl=e=>{if(!e)return{step:null,stepItem:null};let t=e.filter(e=>e.items&&e.items.length>0).find(e=>e.items.some(e=>"incomplete"===e.status)),r=t?.items.find(e=>"incomplete"===e.status);return{step:t,stepItem:r}},tc=(e,t,r,n,i)=>{let a=e?.operation;"swap"===a&&(a=e?.currencyIn?.currency?.chainId===e?.currencyOut?.currency?.chainId?"same_chain_swap":e?.currencyIn?.currency?.symbol===e?.currencyOut?.currency?.symbol?"bridge":"cross_chain_swap");let o=eG();return{wallet_connector:n,quote_request_id:ta({...i,interval:o}),quote_id:r?ts(r):void 0,amount_in:e?.currencyIn?.amount,amount_in_formatted:parseFloat(`${e?.currencyIn?.amountFormatted??"0"}`),currency_in:e?.currencyIn?.currency?.symbol,currency_in_address:e?.currencyIn?.currency?.address,chain_id_in:e?.currencyIn?.currency?.chainId,currency_in_decimals:e?.currencyIn?.currency?.decimals,amount_out:e?.currencyOut?.amount,amount_out_formatted:parseFloat(`${e?.currencyOut?.amountFormatted??"0"}`),currency_out_decimals:e?.currencyOut?.currency?.decimals,currency_out:e?.currencyOut?.currency?.symbol,currency_out_address:e?.currencyOut?.currency?.address,chain_id_out:e?.currencyOut?.currency?.chainId,currency_in_usd:e?.currencyIn?.amountUsd,currency_out_usd:e?.currencyOut?.amountUsd,deposit_address:r?.find(e=>e.depositAddress)?.depositAddress,txHashes:r?.map(e=>{let t=[];return e.items?.forEach(e=>{e.txHashes&&(t=t.concat([...e.txHashes??[],...e.internalTxHashes??[]]))}),t}).flat(),operation:a,checkStatuses:r?.map(e=>{let t=[];return e.items?.forEach(r=>{r.checkStatus&&t.push({stepId:e.id,checkStatus:r.checkStatus})}),t}).flat(),subsidized:t?.subsidized!==void 0&&"0"!==t.subsidized.amount}},td=(e,t)=>{if(e&&e>0&&t&&Number(t)>0)try{return parseFloat(t)*e}catch(e){console.error("Failed to parse amount string for USD calculation",t,e)}},tu=e=>e?.fees?.subsidized?.amount!=void 0&&e?.fees?.subsidized?.amount!="0",th=function(e=eB.MAINNET_RELAY_API,t,r){return new Promise((n,i)=>{let a=`${e}/quote/v2`;(0,ek.axiosPostFetcher)(a,t,r).then(e=>{n({...e,request:{url:a,method:"post",data:t}})}).catch(e=>{i(e)})})};var tp=e.i(314035);let tm=e=>{if(!(e instanceof Error))return e;try{return JSON.stringify({name:e.name,message:e.message,stack:e.stack,...e})}catch(t){return e}},tf={staleTime:6e4,refetchInterval:3e4,refetchOnWindowFocus:!1},tg=({transactionModalOpen:e,setTransactionModalOpen:t,depositAddressModalOpen:r,fromToken:n,setFromToken:i,toToken:a,setToToken:o,defaultToAddress:s,defaultAmount:A,defaultTradeType:l,slippageTolerance:c,context:d,wallet:u,multiWalletSupportEnabled:h=!1,linkedWallets:p,supportedWalletVMs:m,useSecureBaseUrl:f,children:g,onAnalyticEvent:y,onSwapError:b})=>{var x,v,B,S,k,E,F,T,Q,L;let _,P,D,R,M,O,V,K,W,[q,X]=eC(i?n:void 0,i?[n,i]:void 0),[Y,J]=eC(o?a:void 0,o?[a,o]:void 0),Z=(0,C.useContext)(z.ProviderOptionsContext),ee=Z.vmConnectorKeyOverrides,et=(0,U.useRelayClient)(),{connector:er}=(0,eg.useAccount)(),en=(0,eL.useWalletClient)(),[el,ec]=(0,C.useState)(s),ed=ey(u,p),[eu,eh]=(0,C.useState)(l??"EXACT_INPUT"),em=(0,eI.useQueryClient)(),[eB,eS]=(0,C.useState)(null),[ek,eE]=(0,C.useState)(null),[e_,eP]=(0,C.useState)(!1),[eH,eV]=(0,C.useState)(null),[eK,eW]=(0,C.useState)(!1),[ez,e$]=(0,C.useState)(null),{value:eq,debouncedValue:eX,setValue:eY,debouncedControls:eJ}=ef(l&&"EXACT_INPUT"!==l?"":A??"",500),{value:eZ,debouncedValue:e0,setValue:e1,debouncedControls:e2}=ef("EXPECTED_OUTPUT"===l?A??"":"",500),[e4,e3]=(0,C.useState)(null),e5=et?.chains.find(e=>e.id===Y?.chainId),e6=et?.chains?.find(e=>e.id===q?.chainId),e8=!e6?.vmType||m.includes(e6?.vmType)||e6?.id===1337,e7=!e5?.vmType||m.includes(e5?.vmType),e9=(0,C.useMemo)(()=>{let e=p?.find(e=>ed===("evm"===e.vmType?e.address.toLowerCase():e.address)),t=ea(e5?.vmType,el??"",e5?.id,el||e?.address!==ed?void 0:e?.connector,ee);if(h&&e5&&p&&!t)return es(e5,el,p,ee)},[h,e5,el,ed,p,ec]),te=el??e9??ed,{value:tt,queryKey:tr,isLoading:tn,isError:ti,isDuneBalance:td,hasPendingBalance:tg}=ep({chain:e6,address:ed,currency:q?.address?q.address:void 0,enabled:void 0!==q,refreshInterval:void 0,wallet:u}),{value:ty,queryKey:tb,isLoading:tx,isDuneBalance:tw,hasPendingBalance:tv}=ep({chain:e5,address:te,currency:Y?.address?Y.address:void 0,enabled:void 0!==Y,refreshInterval:void 0,wallet:u}),tC=(0,C.useCallback)(()=>{let e=e=>{let t=0,r=setInterval(()=>{4===t?clearInterval(r):(t++,e())},3e3)};
35em.invalidateQueries({queryKey:["useDuneBalances"]}),td?e(()=>{em.invalidateQueries({queryKey:tr})}):em.invalidateQueries({queryKey:tr}),tw?e(()=>{em.invalidateQueries({queryKey:tb})}):em.invalidateQueries({queryKey:tb})},[em,tr,tb,tw,td,ed]),{data:tB}=function(e={}){let{account:t,query:r={}}=e,{address:n}=(0,eg.useAccount)(),i=function(e,t={}){return{async queryFn({queryKey:t}){let{scopeKey:r,...n}=t[1];return await eD(e,n)},queryKey:function(e={}){return["capabilities",(0,eM.filterQueryOptions)(e)]}(t),retry:(e,t)=>!(t instanceof eR.ConnectorNotConnectedError)&&e<3}}((0,eN.useConfig)(e),{...e,account:t??n});return(0,eO.useQuery)({...r,...i})}({query:{enabled:er&&("coinbaseWalletSDK"===er.id||"coinbase"===er.id)}}),tS=!!(q?.chainId&&tB?.[q?.chainId]?.auxiliaryFunds?.supported),tk=e6?.vmType==="svm"||e5?.vmType==="svm",tE=e6?.vmType==="bvm"||e5?.vmType==="bvm",tF=p?.find(e=>ed===("evm"===e.vmType?e.address.toLowerCase():e.address)||e.address===ed),tT=(te?p?.find(e=>e.address===te):void 0)!==void 0,tU=ea(e6?.vmType,ed??"",e6?.id,tF?.connector,ee),tI=eo(e6?.vmType,ed,e6?.id,tF?.connector,ee),tQ=ea(e5?.vmType,te??"",e5?.id),tj=eo(e5?.vmType,te,e5?.id),{displayName:tL}=function(e,t,r){let n=!!e&&(0,H.isAddress)(e),i=!!e&&ej(e),{displayName:a,isLoading:o}=eU(e,{enabled:"evm"===t&&(n||i)}),s="lvm"===t,A=!!e&&ei(e),{data:l,isLoading:c}=eQ(s&&e?e:void 0),d="evm"===t&&o||s&&c;return{displayName:(0,C.useMemo)(()=>{if(e){if("evm"===t)return a||eT(e);if(s){let t=A?e:l?.index?.toString(),r=A?l?.l1_address:e;if(t&&r)return`${t} (${eT(r)})`;if(t)return t;if(r)return eT(r)}return eT(e)}},[e,t,a,s,A,l]),isLoading:d}}(te,e5?.vmType,e5?.id),[t_,tP]=(0,C.useState)(c);(0,C.useEffect)(()=>{tP(c)},[c]);let{required:tD,amount:tR,amountUsd:tM,balance:tO}=((e,t,r,n,i="10",a="2")=>{let o=(0,U.useRelayClient)(),s=r&&r.address!==e?.currency?.address,A=void 0!==r&&void 0!==n&&void 0!==e&&e?.currency?.address!==void 0&&e.id!==t?.id&&169!==e.id&&e?.vmType==="evm"&&s&&(e?.currency?.supportsBridging||e?.tokenSupport==="All"),{value:l}=ep({chain:e,address:n,currency:e?.currency?.address?e.currency.address:void 0,enabled:A}),{data:c}=eF(o?.baseApiUrl,{address:e?.currency?.address??"",chainId:e?.id??0,referrer:o?.source},{refetchInterval:3e5,refetchOnWindowFocus:!1,enabled:A});if(!(A&&void 0!==l&&c?.price))return{required:!1,amount:void 0,amountUsd:void 0,balance:void 0};{let t=e?.currency?.decimals??18,r=BigInt(Math.floor(1e6*i))*BigInt(10**t)/BigInt(Math.floor(1e6*c.price)),n=BigInt(Math.floor(1e6*a))*BigInt(10**t)/BigInt(Math.floor(1e6*c.price)),o=r>l;return{required:o,amount:o?n:void 0,amountUsd:o?a:void 0,balance:l}}})(e5,e6,Y,te),{data:tN,isLoading:tH}=eF(et?.baseApiUrl,{address:q?.address??"",chainId:q?.chainId??0,referrer:et?.source},{enabled:!!(q?.address&&q.chainId),...tf}),{data:tV,isLoading:tK}=eF(et?.baseApiUrl,{address:Y?.address??"",chainId:Y?.chainId??0,referrer:et?.source},{enabled:!!(Y?.address&&Y.chainId),...tf}),tG=q?.address===e6?.currency?.address,tW=((e,t,r,n)=>{let[i,a]=(0,C.useState)(void 0),o=(0,C.useRef)(void 0),s=(0,C.useCallback)(async()=>{if(!e||!t||"evm"!==r)return void a(void 0);if(!e.isEOA)return void a(!1);try{console.log("CHECKING EXPLICIT DEPOSIT");let{isEOA:r}=await e.isEOA(t);a(!r)}catch(e){console.error("[Explicit Deposit] error",{chain_id:t,address:n,error_message:e instanceof Error?e.message:"Unknown error"}),a(!0)}},[e,t,r,n]);return(0,C.useEffect)(()=>{if(o.current&&clearTimeout(o.current),a(void 0),e&&t&&"evm"===r)return o.current=setTimeout(()=>{s()},150),()=>{o.current&&clearTimeout(o.current)}},[e,t,r,s]),i})(u,q?.chainId,e6?.vmType,ed),tz=q&&Y?{user:tI,originChainId:q.chainId,destinationChainId:Y.chainId,originCurrency:q.address,destinationCurrency:Y.address,recipient:tj,tradeType:eu,appFees:Z.appFees,amount:"EXACT_INPUT"===eu?(0,eA.parseUnits)(eX,q.decimals).toString():(0,eA.parseUnits)(e0,Y.decimals).toString(),referrer:et?.source??void 0,useDepositAddress:!e8,refundTo:q?.chainId===1337?ed:void 0,slippageTolerance:c,topupGas:eK&&tD,...tF?.vmType==="bvm"&&u?.metadata?.publicKey?{additionalData:{userPublicKey:u?.metadata?.publicKey}}:{},...void 0!==tW&&e6?.vmType==="evm"&&{explicitDeposit:tW}}:void 0,t$=!!(et&&("EXACT_INPUT"===eu&&eX&&eX.length>0&&0!==Number(eX)||"EXPECTED_OUTPUT"===eu&&e0&&e0.length>0&&0!==Number(e0))&&void 0!==q&&void 0!==Y&&!e&&!r),{data:tq,error:tX,isFetching:tY,executeQuote:tJ,queryKey:tZ}=(x=et||void 0,v=(e,t)=>
35{let r=eG(),n=ta({...e,interval:r});y?.(N.EventNames.QUOTE_REQUESTED,{parameters:e,wallet_connector:tF?.connector,chain_id_in:e?.originChainId,chain_id_out:e?.destinationChainId,http_config:t,quote_request_id:n})},B=({details:e,steps:t},r)=>{let n=eG(),i=ta({...r,interval:n});y?.(N.EventNames.QUOTE_RECEIVED,{parameters:r,wallet_connector:tF?.connector,amount_in:e?.currencyIn?.amountFormatted,amount_in_raw:e?.currencyIn?.amount,currency_in:e?.currencyIn?.currency?.symbol,chain_id_in:e?.currencyIn?.currency?.chainId,amount_out:e?.currencyOut?.amountFormatted,amount_out_raw:e?.currencyOut?.amount,currency_out:e?.currencyOut?.currency?.symbol,chain_id_out:e?.currencyOut?.currency?.chainId,slippage_tolerance_destination_percentage:e?.slippageTolerance?.destination?.percent,slippage_tolerance_origin_percentage:e?.slippageTolerance?.origin?.percent,steps:t,quote_request_id:i,quote_id:t?ts(t):void 0})},S={refetchOnWindowFocus:!1,enabled:t$&&void 0!==tz,refetchInterval:e||r||eX!==eq||e0!==eZ?void 0:12e3},k=e=>{let t=tm(e?.response?.data?.message?Error(e?.response?.data?.message):e),r=eG(),n=ta({...tz,interval:r});y?.(N.EventNames.QUOTE_ERROR,{wallet_connector:tF?.connector,error_message:t,parameters:tz,quote_request_id:n,status_code:e.response.status??e.status??""})},E=void 0,F=f?.(tz)?Z?.secureBaseUrl:void 0,_=["useQuote",tz],P=(0,$.useQuery)({queryKey:_,queryFn:()=>{v?.(tz,E),tz&&x?.source&&!tz.referrer&&(tz.referrer=x.source);let e=th(F??x?.baseApiUrl,tz,{...E,headers:{"relay-sdk-version":x?.version??"unknown","relay-kit-ui-version":x?.uiVersion??"unknown"}});return e.then(e=>{B?.(e,tz)}).catch(e=>{if(k)k?.(e);else throw e}),e},enabled:void 0!==x&&void 0!==tz,retry:!1,...S}),D=(0,C.useCallback)(e=>{if(!u)throw"Missing a valid wallet";if(!P.data)throw"Missing a quote";return x?.actions?.execute({wallet:u,quote:P.data,onProgress:e})},[P.data,u,x]),(0,C.useMemo)(()=>({...P,data:P.error?void 0:P.data,queryKey:_,executeQuote:D}),[P.data,P.error,P.isLoading,P.isFetching,P.isRefetching,P.dataUpdatedAt,D,_])),t0=(0,C.useCallback)(()=>{em.invalidateQueries({queryKey:tZ})},[em,tZ]),t1=tq||tY&&t$?null:tX,t2=t1?void 0:tq,t4=t2?.details?.currencyGasTopup?.amount?BigInt(t2?.details?.currencyGasTopup?.amount):tR,t3=t2?.details?.currencyGasTopup?.amountUsd??tM;T=()=>{ec(void 0)},R=(0,C.useRef)(ed),(0,C.useEffect)(()=>{R.current===ed||ed||T?.(),R.current=ed},[ed,T]);let t5=e5?.vmType==="lvm",{data:t6}=eQ(t5&&ed?ed:void 0);(0,C.useEffect)(()=>{t5&&t6?.index&&(!el||!ei(el))&&ec(t6.index.toString())},[t5,t6,el]),(0,C.useEffect)(()=>{if("EXACT_INPUT"===eu){let e=t2?.details?.currencyOut?.amount??"";e1(""!==e?(0,I.formatUnits)(BigInt(e),Number(t2?.details?.currencyOut?.currency?.decimals??18)):"")}else if("EXPECTED_OUTPUT"===eu){let e=t2?.details?.currencyIn?.amount??"";eY(""!==e?(0,I.formatUnits)(BigInt(e),Number(t2?.details?.currencyIn?.currency?.decimals??18)):"")}eJ.flush(),e2.flush()},[t2,eu]);let t8=(0,C.useMemo)(()=>{let e=et?.chains,t=e?.find(e=>e.id===q?.chainId),r=e?.find(e=>e.id===Y?.chainId);return q&&Y&&t&&r&&t2?((e,t,r)=>{let n=r?.fees,i=r?.details?.expandedPriceImpact,a=BigInt(n?.gas?.amount??0),o=(0,j.formatBN)(a,5,Number(n?.gas?.currency?.decimals??18)),s=i?.execution?.usd,A=i?.relay?.usd,l=Number(A??0)>0,c=i?.app?.usd,d=c&&0!==Number(c),u=Number(n?.relayer?.amountUsd??0)+Number(n?.app?.amountUsd??0),h=tu(r),p=[{raw:a,formatted:`${o}`,usd:to(n?.gas?.amountUsd,!0),name:`Deposit Gas (${t.displayName})`,tooltip:null,type:"gas",id:"origin-gas",currency:n?.gas?.currency},{raw:0n,formatted:"0",usd:h?{value:0,formatted:"0"}:to(s,!1),name:`Execution Fee (${e.displayName})`,tooltip:null,type:"gas",id:"destination-gas",currency:n?.relayer?.currency},{raw:0n,formatted:"0",usd:h?{value:0,formatted:"0"}:to(A,!1),name:l?"Reward":"Relay Fee",tooltip:null,type:"relayer",id:"relayer-fee",currency:n?.relayer?.currency}];d&&p.push({raw:0n,formatted:"0",usd:h?{value:0,formatted:"0"}:to(c,!1),name:"App Fee",tooltip:null,type:"relayer",id:"app-fee",currency:n?.app?.currency});let m="subtleSecondary";if(r?.details?.totalImpact?.percent==="-0.00"&&(r.details.totalImpact.percent="-0.01"),r?.details?.totalImpact?.percent){let e=Number(r.details.totalImpact.percent);e<=-3?m="red":e>0?m="success":h&&(m="success")}return{breakdown:p,totalFees:{usd:(0,j.formatDollar)(u),priceImpactPercentage:r?.details?.totalImpact?.percent?`${r?.details?.totalImpact?.percent}%`:void 0,priceImpact:r?.details?.totalImpact?.usd&&r?.details?.totalImpact?.usd!="0"?(0,j.formatDollar)(parseFloat(r?.details?.totalImpact?.usd??0)):void 0,priceImpactColor:m,swap
35Impact:to(i?.swap?.usd,!1)},isGasSponsored:h}})(r,t,t2):null},[t2,q,Y,et]),t7=BigInt(t2?.details?.currencyIn?.amount??0n),t9=!!(!ti&&t7&&ed&&(tt??0n)<t7&&!tS&&e8),re=t1?t1?.message?t1?.message:"Unknown Error":null,rt=t1?t1?.response?.data?.message?t1?.response?.data.message:"Unknown Error":null,rr=!!re?.includes("No quotes available"),rn=rt?.includes("Amount is higher than the available liquidity")||rt?.includes("Insufficient relayer liquidity"),ri=rt?.includes("Could not execute"),ra=(M=t2?.details?.currencyIn?.amountUsd?Number(t2.details.currencyIn.amountUsd):null,O=t2?.fees?.relayerService?.amountUsd?Number(t2.fees.relayerService.amountUsd):null,!!M&&!!O&&O>1.5*M/100&&O>25),ro=(V=t2?.details?.currencyIn?.amountUsd?Number(t2.details.currencyIn.amountUsd):null,K=t2?.fees?.relayerService?.amountUsd?Number(t2.fees.relayerService.amountUsd):null,V&&K?BigInt(Math.floor(100*K/V)):0n),rs=tA(t2?.details),rA=((e,t,r,n)=>{var i;let a,o=t&&(0,H.isAddress)(t)?t.toLowerCase():t,s=r?.find(e=>("evm"===e.vmType?e.address.toLowerCase():e.address)===o),A=(i=!s,a=(0,G.useReadContract)({abi:ev,functionName:"isAGW",address:"0xd5E3efDA6bB5aB545cc2358796E96D9033496Dda",chainId:2741,args:t&&(0,H.isAddress)(t)?[t]:void 0,query:{enabled:!!(t&&(0,H.isAddress)(t))&&(void 0===i||i),staleTime:1/0,gcTime:1/0}}),(0,C.useEffect)(()=>{t&&a.isError&&n?.(N.EventNames.AGW_CHECK_ERROR,{error:a.error,address:t})},[a.isError,a.error]),!a.isError&&a.data),{data:l}=(0,$.useQuery)({queryKey:["useCexAddresses"],queryFn:()=>fetch(new URL("https://raw.githubusercontent.com/reservoirprotocol/relay-kit/refs/heads/main/assets/cexAddresses.json").href).then(e=>e.json()).then(e=>e),staleTime:864e5,gcTime:864e5}),c=l?.addresses.includes(o??"");return(0,C.useMemo)(()=>{if(!e||!t||1337===e)return!0;if(!s)return!c&&(!A||2741===e);let r=ew[s.connector]??s.connector,n=ex[r];if(n&&n.includes(e))return!1;let i=eb[r];return!i||!!i.includes(e)},[e,t,s,A,c])})(e5?.id,te,p,y),rl=q?.address===Y?.address&&q?.chainId===Y?.chainId&&ed===te,rc=(({fromToken:e,toToken:t,multiWalletSupportEnabled:r,isValidFromAddress:n,fromChainWalletVMSupported:i,isValidToAddress:a,toChainWalletVMSupported:o,fromChain:s,toChain:A,isSameCurrencySameRecipientSwap:l,debouncedInputAmountValue:c,debouncedOutputAmountValue:d,hasInsufficientBalance:u,isInsufficientLiquidityError:h,quote:p,operation:m})=>{let f=p?.steps?.[0],g=f?.items?.[0];return(0,C.useMemo)(()=>{if(!e||!t)return"Select a token";if(r&&!n&&i)return`Select ${s?.displayName} Wallet`;if(r&&!a)return o?`Select ${A?.displayName} Wallet`:`Enter ${A?.displayName} Address`;if(A?.vmType!=="evm"&&!a)return`Enter ${A?.displayName} Address`;if(l)return"Invalid recipient";if(!c||!d)return"Enter an amount";if(u)return"Insufficient Balance";if(h)return"Insufficient Liquidity";if(!o&&!a)return`Enter ${A?.displayName} Address`;if(f?.id==="approve"&&g?.status==="incomplete")return"Approve & Swap";switch(m){case"wrap":return"Wrap";case"unwrap":return"Unwrap";case"send":return"Send";case"swap":return"Swap";case"bridge":return"Bridge";default:return"Confirm"}},[e,t,r,n,i,a,o,A,l,c,d,u,h,f,m])})({fromToken:q,toToken:Y,multiWalletSupportEnabled:h,isValidFromAddress:tU,fromChainWalletVMSupported:e8,isValidToAddress:tQ,toChainWalletVMSupported:e7,fromChain:e6,toChain:e5,isSameCurrencySameRecipientSwap:rl,debouncedInputAmountValue:eX,debouncedOutputAmountValue:e0,hasInsufficientBalance:t9,isInsufficientLiquidityError:rr,quote:t2,operation:t2?.details?.operation});Q=!tY,L=e=>{e&&y?.(N.EventNames.CTA_MAX_CAPACITY_PROMPTED,{inputAmount:eX,outputAmount:e0})},W=(0,C.useRef)(void 0),(0,C.useEffect)(()=>{Q&&W.current!==rn&&(W.current=rn,L(rn))},[rn,Q,L]),W.current;let rd=(0,C.useCallback)(async()=>{let e=[],r=(r,n)=>{let i=tm(r?.response?.data?.message?Error(r?.response?.data?.message):r);if(r&&("string"==typeof r.message&&r.message.includes("rejected")||"string"==typeof r&&r.includes("rejected")||"string"==typeof r&&r.includes("Approval Denied")||"string"==typeof r&&r.includes("denied transaction")||"string"==typeof r.message&&r.message.includes("Approval Denied")||"string"==typeof r.message&&r.message.includes("Plugin Closed")||"string"==typeof r.message&&r.message.includes("denied transaction")||"string"==typeof r.message&&r.message.includes("Failed to initialize request")&&e6?.id===274
351)){t(!1),y?.(N.EventNames.USER_REJECTED_WALLET,{error_message:i});return}let{step:a,stepItem:o}=tl(n),s={...tc(t2?.details,t2?.fees,n??null,tF?.connector,tz),error_message:i},A=a?.id==="approve",l=A?N.EventNames.APPROVAL_ERROR:N.EventNames.DEPOSIT_ERROR,c=r&&"string"==typeof r.message&&r.message.includes("TransactionConfirmationError")||r.name&&r.name.includes("TransactionConfirmationError");if(!o?.receipt||!o.check||c||"object"==typeof o.receipt&&"status"in o.receipt&&"reverted"===o.receipt.status||o.checkStatus&&"unknown"===o.checkStatus)!o?.receipt||"object"==typeof o.receipt&&"status"in o.receipt&&"reverted"===o.receipt.status?y?.(l,s):y?.(N.EventNames.SWAP_ERROR,s);else{let t=A?N.EventNames.APPROVAL_SUCCESS:N.EventNames.DEPOSIT_SUCCESS;e.includes(t)?y?.(N.EventNames.FILL_ERROR,s):(y?.(t,s),e.push(t),setTimeout(()=>{y?.(N.EventNames.FILL_ERROR,s)},20))}e3(i),b?.(i,{...t2,steps:n})};try{let n,i=tc(t2?.details,t2?.fees,t2?.steps?t2?.steps:null,tF?.connector,tz);if(y?.(N.EventNames.SWAP_CTA_CLICKED,i),eP(!0),!tJ)throw"Missing a quote";if(!u&&!en.data)throw"Missing a wallet";eS(t2?.steps),eE(t2),t(!0);let a=u??(0,tp.adaptViemWallet)(en.data),o=await a?.getChainId(),s=et?.chains?.find(e=>e.id===o),A=q?.chainId;q?.chainId===1337&&(A=s?.vmType!=="evm"?1:o),q&&A&&A!==o&&(y?.(N.EventNames.SWAP_SWITCH_NETWORK,{activeWalletChainId:o,...i}),await a?.switchChain(A));let l=tJ(({steps:t})=>{eS(t),n=t;let{step:r,stepItem:i}=tl(t),a=tc(t2?.details,t2?.fees,t,tF?.connector,tz);if(r&&i){let t="approve"===r.id||"approval"===r.id,n=t?N.EventNames.APPROVAL_SUBMITTED:N.EventNames.DEPOSIT_SUBMITTED,o=t?N.EventNames.APPROVAL_SUCCESS:N.EventNames.DEPOSIT_SUCCESS,s=!!(Array.isArray(r.items)&&r.items.length>1&&u?.handleBatchTransactionStep);!t&&s&&(n=N.EventNames.BATCH_TX_SUBMITTED),!e.includes(n)&&!i.receipt&&i?.txHashes&&i?.txHashes?.length>0?(e.push(n),y?.(n,a)):e.includes(o)||(!i.receipt||"object"==typeof i.receipt&&"status"in i.receipt&&"reverted"===i.receipt.status)&&"pending"!==i.checkStatus||(y?.(o,a),e.push(o)),"complete"===i.status&&i.check&&!e.includes(N.EventNames.FILL_SUCCESS)&&(e.includes(N.EventNames.DEPOSIT_SUCCESS)||s?y?.(N.EventNames.FILL_SUCCESS,a):(y?.(N.EventNames.DEPOSIT_SUCCESS,a),e.push(N.EventNames.DEPOSIT_SUCCESS),setTimeout(()=>{y?.(N.EventNames.FILL_SUCCESS,a)},20)),e.push(N.EventNames.FILL_SUCCESS))}else t?.every(e=>e.items?.every(e=>"complete"===e.status))&&!e.includes(N.EventNames.FILL_SUCCESS)&&(e.includes(N.EventNames.DEPOSIT_SUCCESS)||e.includes(N.EventNames.BATCH_TX_SUBMITTED)?y?.(N.EventNames.FILL_SUCCESS,a):(y?.(N.EventNames.DEPOSIT_SUCCESS,a),e.push(N.EventNames.DEPOSIT_SUCCESS),setTimeout(()=>{y?.(N.EventNames.FILL_SUCCESS,a)},20)),e.push(N.EventNames.FILL_SUCCESS))});l&&"object"==typeof l&&"abortController"in l&&e$(l.abortController),l?.catch(e=>{r(e,n)}).finally(()=>{eP(!1),e$(null),tC()})}catch(e){r(e),eP(!1)}},[et,ed,er,u,en,q,Y,el,te,eX,e0,eu,e_,tJ,eS,eE,tC,tF,ez]);return(0,w.jsx)(w.Fragment,{children:g({quote:t2,steps:eB,setSteps:eS,swap:rd,transactionModalOpen:e,feeBreakdown:t8,fromToken:q,setFromToken:X,toToken:Y,setToToken:J,swapError:e4,error:t1,toDisplayName:tL,address:ed,recipient:te,customToAddress:el,setCustomToAddress:ec,tradeType:eu,setTradeType:eh,details:eH,isSameCurrencySameRecipientSwap:rl,debouncedInputAmountValue:eX,debouncedAmountInputControls:eJ,setAmountInputValue:eY,amountInputValue:eq,amountOutputValue:eZ,debouncedOutputAmountValue:e0,debouncedAmountOutputControls:e2,setAmountOutputValue:e1,toBalance:ty,toBalancePending:tv,isLoadingToBalance:tx,isFetchingQuote:tY,isLoadingFromBalance:tn,fromBalance:tt,fromBalancePending:tg,highRelayerServiceFee:ra,relayerFeeProportion:ro,hasInsufficientBalance:t9,isInsufficientLiquidityError:rr,isCapacityExceededError:rn,isCouldNotExecuteError:ri,ctaCopy:rc,isFromNative:tG,slippageTolerance:t_,timeEstimate:rs,isSvmSwap:tk,isBvmSwap:tE,isValidFromAddress:tU,isValidToAddress:tQ,supportedWalletVMs:m,fromChainWalletVMSupported:e8,toChainWalletVMSupported:e7,isRecipientLinked:tT,recipientWalletSupportsChain:rA,gasTopUpEnabled:eK,setGasTopUpEnabled:eW,gasTopUpBalance:tO,gasTopUpRequired:tD,gasTopUpAmount:t4,gasTopUpAmountUsd:t3,invali
35dateBalanceQueries:tC,invalidateQuoteQuery:t0,setDetails:eV,setSwapError:e3,quoteInProgress:ek,setQuoteInProgress:eE,linkedWallet:tF,quoteParameters:tz,abortController:ez,fromTokenPriceData:tN,toTokenPriceData:tV,isLoadingFromTokenPrice:tH,isLoadingToTokenPrice:tK})})};var ty=e.i(282084);e.i(406185);var tb=e.i(457600),tx=e.i(849145);let tw=(0,tb.cva)({base:{display:"flex",background:"subtle-background-color",px:"3",py:"1",gap:"1"},variants:{color:{red:{background:"red3",color:"red11"},gray:{background:"gray2",color:"gray8"},green:{background:"green3",color:"green12"},amber:{background:"amber2",color:"amber9"},transparent:{background:"none",color:"gray12"},primary:{background:"primary3",color:"primary12"}},radius:{pill:{borderRadius:25},rounded:{borderRadius:12},squared:{borderRadius:8}},bordered:{true:{"--borderColor":"colors.gray.6",border:"1px solid var(--borderColor)"}}},defaultVariants:{radius:"pill"}}),tv=({css:e,...t})=>(0,w.jsx)("div",{...t,className:(0,tx.css)(tw.raw(t),tx.css.raw(e))});var tC=e.i(981140),tB=e.i(820783),tS=e.i(30030),tk=e.i(610772),tE=e.i(369340),tF=e.i(726330),tT=e.i(765491),tU=e.i(774606),tI=e.i(296626),tQ=e.i(248425),tj=e.i(303536),tL=e.i(985369),t_=e.i(186312),tP=e.i(991918),tD="Dialog",[tR,tM]=(0,tS.createContextScope)(tD),[tO,tN]=tR(tD),tH=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=C.useRef(null),A=C.useRef(null),[l,c]=(0,tE.useControllableState)({prop:n,defaultProp:i??!1,onChange:a,caller:tD});return(0,w.jsx)(tO,{scope:t,triggerRef:s,contentRef:A,contentId:(0,tk.useId)(),titleId:(0,tk.useId)(),descriptionId:(0,tk.useId)(),open:l,onOpenChange:c,onOpenToggle:C.useCallback(()=>c(e=>!e),[c]),modal:o,children:r})};tH.displayName=tD;var tV="DialogTrigger",tK=C.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=tN(tV,r),a=(0,tB.useComposedRefs)(t,i.triggerRef);return(0,w.jsx)(tQ.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":t9(i.open),...n,ref:a,onClick:(0,tC.composeEventHandlers)(e.onClick,i.onOpenToggle)})});tK.displayName=tV;var tG="DialogPortal",[tW,tz]=tR(tG,{forceMount:void 0}),t$=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=tN(tG,t);return(0,w.jsx)(tW,{scope:t,forceMount:r,children:C.Children.map(n,e=>(0,w.jsx)(tI.Presence,{present:r||a.open,children:(0,w.jsx)(tU.Portal,{asChild:!0,container:i,children:e})}))})};t$.displayName=tG;var tq="DialogOverlay",tX=C.forwardRef((e,t)=>{let r=tz(tq,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=tN(tq,e.__scopeDialog);return a.modal?(0,w.jsx)(tI.Presence,{present:n||a.open,children:(0,w.jsx)(tJ,{...i,ref:t})}):null});tX.displayName=tq;var tY=(0,tP.createSlot)("DialogOverlay.RemoveScroll"),tJ=C.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=tN(tq,r);return(0,w.jsx)(tL.RemoveScroll,{as:tY,allowPinchZoom:!0,shards:[i.contentRef],children:(0,w.jsx)(tQ.Primitive.div,{"data-state":t9(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),tZ="DialogContent",t0=C.forwardRef((e,t)=>{let r=tz(tZ,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=tN(tZ,e.__scopeDialog);return(0,w.jsx)(tI.Presence,{present:n||a.open,children:a.modal?(0,w.jsx)(t1,{...i,ref:t}):(0,w.jsx)(t2,{...i,ref:t})})});t0.displayName=tZ;var t1=C.forwardRef((e,t)=>{let r=tN(tZ,e.__scopeDialog),n=C.useRef(null),i=(0,tB.useComposedRefs)(t,r.contentRef,n);return C.useEffect(()=>{let e=n.current;if(e)return(0,t_.hideOthers)(e)},[]),(0,w.jsx)(t4,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,tC.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,tC.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,tC.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())})}),t2=C.forwardRef((e,t)=>{let r=tN(tZ,e.__scopeDialog),n=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(t4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let a=t.target;r.triggerRef.current?.contains(a)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),t4=C.forwardRef((e,t)=>
35{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=tN(tZ,r),A=C.useRef(null),l=(0,tB.useComposedRefs)(t,A);return(0,tj.useFocusGuards)(),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(tT.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(tF.DismissableLayer,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":t9(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(rn,{titleId:s.titleId}),(0,w.jsx)(ri,{contentRef:A,descriptionId:s.descriptionId})]})]})}),t3="DialogTitle",t5=C.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=tN(t3,r);return(0,w.jsx)(tQ.Primitive.h2,{id:i.titleId,...n,ref:t})});t5.displayName=t3;var t6="DialogDescription";C.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=tN(t6,r);return(0,w.jsx)(tQ.Primitive.p,{id:i.descriptionId,...n,ref:t})}).displayName=t6;var t8="DialogClose",t7=C.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=tN(t8,r);return(0,w.jsx)(tQ.Primitive.button,{type:"button",...n,ref:t,onClick:(0,tC.composeEventHandlers)(e.onClick,()=>i.onOpenChange(!1))})});function t9(e){return e?"open":"closed"}t7.displayName=t8;var re="DialogTitleWarning",[rt,rr]=(0,tS.createContext)(re,{contentName:tZ,titleName:t3,docsSlug:"dialog"}),rn=({titleId:e})=>{let t=rr(re),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 36 37If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 38 39For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ri=({contentRef:e,descriptionId:t})=>{let r=rr("DialogDescriptionWarning"),n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return C.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null};function ra(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}e.s(["Content",0,t0,"DialogClose",0,t7,"DialogContent",0,t0,"DialogPortal",0,t$,"DialogTrigger",0,tK,"Overlay",0,tX,"Portal",0,t$,"Root",0,tH,"Title",0,t5],326999),e.i(247167);let ro=e=>Array.isArray(e);function rs(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function rA(e){return"string"==typeof e||Array.isArray(e)}function rl(e){let t=[{},{}];return null==e||e.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function rc(e,t,r,n){if("function"==typeof t){let[i,a]=rl(n);t=t(void 0!==r?r:e.custom,i,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[i,a]=rl(n);t=t(void 0!==r?r:e.custom,i,a)}return t}function rd(e,t,r){let n=e.getProps();return rc(n,t,void 0!==r?r:n.custom,e)}let ru=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rh=["initial",...ru],rp=e=>e;function rm(e){let t;return()=>(void 0===t&&(t=e()),t)}let rf=rm(()=>void 0!==window.ScrollTimeline);class rg{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=t}attachTimeline(e,t){let r=this.animations.map(r=>rf()&&r.attachTimeline?r.attachTimeline(e):"function"==typeof t?t(r):void 0);return()=>{r.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ry extends rg{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}let rb=e=>1e3*e;function rx(e){let t=0,r=e.next(t);for(;!r.done&&t<2e4;)t+=50,r=e.next(t);return t>=2e4?1/0:t}function rw(e,t){e.timeline=t,e.onfinish=null}let rv=e=>Array.isArray(e)&&"number"==typeof e[0],rC,rB=(i=rm(()=>{try{document.createElement("div").animate({opacity:0}
39,{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),()=>{var e;return null!=(e=rC)?e:i()}),rS=(e,t,r)=>{let n=t-e;return 0===n?1:(r-e)/n},rk=(e,t,r=10)=>{let n="",i=Math.max(Math.round(t/r),2);for(let t=0;t<i;t++)n+=e(rS(0,i-1,t))+", ";return`linear(${n.substring(0,n.length-2)})`},rE=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,rF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:rE([0,.65,.55,1]),circOut:rE([.55,0,1,.45]),backIn:rE([.31,.01,.66,-.59]),backOut:rE([.33,1.53,.69,.99])};function rT(e,t){return e?e[t]||e.default||e:void 0}function rU(e){return"function"==typeof e}let rI=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rQ=new Set(rI),rj=new Set(["width","height","top","left","right","bottom",...rI]),rL=e=>ro(e)?e[e.length-1]||0:e,r_=["read","resolveKeyframes","update","preRender","render","postRender"];function rP(e,t){let r=!1,n=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=r_.reduce((e,t)=>(e[t]=function(e){let t=new Set,r=new Set,n=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(A.schedule(t),e()),t(o)}let A={schedule:(e,i=!1,o=!1)=>{let s=o&&n?t:r;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(o=e,n){i=!0;return}n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,i&&(i=!1,A.process(e))}};return A}(a),e),{}),{read:s,resolveKeyframes:A,update:l,preRender:c,render:d,postRender:u}=o,h=()=>{let a=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(a-i.timestamp,40),1),i.timestamp=a,i.isProcessing=!0,s.process(i),A.process(i),l.process(i),c.process(i),d.process(i),u.process(i),i.isProcessing=!1,r&&t&&(n=!1,e(h))};return{schedule:r_.reduce((t,a)=>{let s=o[a];return t[a]=(t,a=!1,o=!1)=>(!r&&(r=!0,n=!0,i.isProcessing||e(h)),s.schedule(t,a,o)),t},{}),cancel:e=>{for(let t=0;t<r_.length;t++)o[r_[t]].cancel(e)},state:i,steps:o}}let{schedule:rD,cancel:rR,state:rM,steps:rO}=rP("u">typeof requestAnimationFrame?requestAnimationFrame:rp,!0);function rN(){t=void 0}let rH={now:()=>(void 0===t&&rH.set(rM.isProcessing?rM.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(rN)}};function rV(e,t){-1===e.indexOf(t)&&e.push(t)}function rK(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}class rG{constructor(){this.subscriptions=[]}add(e){return rV(this.subscriptions,e),()=>rK(this.subscriptions,e)}notify(e,t,r){let n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(let i=0;i<n;i++){let n=this.subscriptions[i];n&&n(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class rW{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let r=rH.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=rH.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new rG);let r=this.events[e].add(t);return"change"===e?()=>{r(),rD.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return s&&s.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=rH.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),r?1e3/r*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rz(e,t){return new rW(e,t)}let r$=e=>!!(e&&e.getVelocity);function rq(e,t){let r=e.getValue("willChange");if(r$(r)&&r.add)return r.add(t)}let rX=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rY="data-"+rX("framerAppearId"),rJ=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e;function rZ(e,t,r,n){return e===t&&r===n?rp:i=>0===i||1===i?i:rJ(function(e,t,r,n,i){let a,o,s=0;do(a=rJ(o=t+(r-t)/2,n,i)-e)>0?r=o:t=o;while(Math.abs(a)>1e-7&&++s<12)return o}(i,0,1,e,r),t,n)}let r0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,r1=e=>t=>1-e(1-t),r2=rZ(.33,1.53,.69,.99),r4=r1(r2),r3=r0(r4),r5=e=>(e*=2)<1?.5*r4(e):.5*(2-Math.pow(2,-10*(e-1))),r6=e=>1-Math.sin(Math.acos(e)),r8=r1(r6),r7=r0(r6),r9=(e,t,r)=>r>t?t:r<e?e:r,ne={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},nt={...ne,transform:e=>r9(0,1,e)},nr={...ne,default:1},nn=e=>Math.round(1e5*e)/1e5,ni=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,na=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,no=(e,t)=>r=>!!("string"==typeof r&&na.test(r)&&r.startsWith(e)||t&&null!=r&&Object.prototype.hasOwnProperty.call(r,t)),ns=(e,t,r)=>n=>{if("string"!=typeof n)return n;let[i,a,o,s]=n.match(ni);return{[e]:parseFloat(i),[t]:parseFloat(a),[r]:parseFloat(o),alpha:void 0!==s?parseFloat(s):1}},nA={...ne,transform:e=>Math.round(r9(0,255,e))},nl={test:no("rgb","red"),parse:ns("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+nA.transform(e)+", "+nA.transform(t)+", "+nA.transform(r)+", "+nn(nt.transform(n))+")"},nc={test:no("#"),parse:function(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alph
39a:i?parseInt(i,16)/255:1}},transform:nl.transform},nd=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),nu=nd("deg"),nh=nd("%"),np=nd("px"),nm=nd("vh"),nf=nd("vw"),ng={...nh,parse:e=>nh.parse(e)/100,transform:e=>nh.transform(100*e)},ny={test:no("hsl","hue"),parse:ns("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+nh.transform(nn(t))+", "+nh.transform(nn(r))+", "+nn(nt.transform(n))+")"},nb={test:e=>nl.test(e)||nc.test(e)||ny.test(e),parse:e=>nl.test(e)?nl.parse(e):ny.test(e)?ny.parse(e):nc.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?nl.transform(e):ny.transform(e)},nx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nw="number",nv="color",nC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nB(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},i=[],a=0,o=t.replace(nC,e=>(nb.test(e)?(n.color.push(a),i.push(nv),r.push(nb.parse(e))):e.startsWith("var(")?(n.var.push(a),i.push("var"),r.push(e)):(n.number.push(a),i.push(nw),r.push(parseFloat(e))),++a,"${}")).split("${}");return{values:r,split:o,indexes:n,types:i}}function nS(e){return nB(e).values}function nk(e){let{split:t,types:r}=nB(e),n=t.length;return e=>{let i="";for(let a=0;a<n;a++)if(i+=t[a],void 0!==e[a]){let t=r[a];t===nw?i+=nn(e[a]):t===nv?i+=nb.transform(e[a]):i+=e[a]}return i}}let nE=e=>"number"==typeof e?0:e,nF={test:function(e){var t,r;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(ni))?void 0:t.length)||0)+((null==(r=e.match(nx))?void 0:r.length)||0)>0},parse:nS,createTransformer:nk,getAnimatableNone:function(e){let t=nS(e);return nk(e)(t.map(nE))}},nT=new Set(["brightness","contrast","saturate","opacity"]);function nU(e){let[t,r]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[n]=r.match(ni)||[];if(!n)return e;let i=r.replace(n,""),a=+!!nT.has(t);return n!==r&&(a*=100),t+"("+a+i+")"}let nI=/\b([a-z-]*)\(.*?\)/gu,nQ={...nF,getAnimatableNone:e=>{let t=e.match(nI);return t?t.map(nU).join(" "):e}},nj={...ne,transform:Math.round},nL={borderWidth:np,borderTopWidth:np,borderRightWidth:np,borderBottomWidth:np,borderLeftWidth:np,borderRadius:np,radius:np,borderTopLeftRadius:np,borderTopRightRadius:np,borderBottomRightRadius:np,borderBottomLeftRadius:np,width:np,maxWidth:np,height:np,maxHeight:np,top:np,right:np,bottom:np,left:np,padding:np,paddingTop:np,paddingRight:np,paddingBottom:np,paddingLeft:np,margin:np,marginTop:np,marginRight:np,marginBottom:np,marginLeft:np,backgroundPositionX:np,backgroundPositionY:np,rotate:nu,rotateX:nu,rotateY:nu,rotateZ:nu,scale:nr,scaleX:nr,scaleY:nr,scaleZ:nr,skew:nu,skewX:nu,skewY:nu,distance:np,translateX:np,translateY:np,translateZ:np,x:np,y:np,z:np,perspective:np,transformPerspective:np,opacity:nt,originX:ng,originY:ng,originZ:np,zIndex:nj,size:np,fillOpacity:nt,strokeOpacity:nt,numOctaves:nj},n_={...nL,color:nb,backgroundColor:nb,outlineColor:nb,fill:nb,stroke:nb,borderColor:nb,borderTopColor:nb,borderRightColor:nb,borderBottomColor:nb,borderLeftColor:nb,filter:nQ,WebkitFilter:nQ},nP=e=>n_[e];function nD(e,t){let r=nP(e);return r!==nQ&&(r=nF),r.getAnimatableNone?r.getAnimatableNone(t):void 0}let nR=new Set(["auto","none","0"]),nM=e=>e===ne||e===np,nO=(e,t)=>parseFloat(e.split(", ")[t]),nN=(e,t)=>(r,{transform:n})=>{if("none"===n||!n)return 0;let i=n.match(/^matrix3d\((.+)\)$/u);if(i)return nO(i[1],t);{let t=n.match(/^matrix\((.+)\)$/u);return t?nO(t[1],e):0}},nH=new Set(["x","y","z"]),nV=rI.filter(e=>!nH.has(e)),nK={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:nN(4,13),y:nN(5,14)};nK.translateX=nK.x,nK.translateY=nK.y;
39let nG=new Set,nW=!1,nz=!1;function n$(){if(nz){let e=Array.from(nG).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),r=new Map;t.forEach(e=>{let t,n=(t=[],nV.forEach(r=>{let n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(+!!r.startsWith("scale")))}),t);n.length&&(r.set(e,n),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,r])=>{var n;null==(n=e.getValue(t))||n.set(r)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}nz=!1,nW=!1,nG.forEach(e=>e.complete()),nG.clear()}function nq(){nG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nz=!0)})}class nX{constructor(e,t,r,n,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=n,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nG.add(this),nW||(nW=!0,rD.read(nq),rD.resolveKeyframes(n$))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:r,motionValue:n}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){let i=null==n?void 0:n.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(r&&t){let n=r.readValue(t,a);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=a),n&&void 0===i&&n.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),nG.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nG.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let nY=e=>t=>"string"==typeof t&&t.startsWith(e),nJ=nY("--"),nZ=nY("var(--"),n0=e=>!!nZ(e)&&n1.test(e.split("/*")[0].trim()),n1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,n2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,n4=e=>t=>t.test(e),n3=[ne,np,nh,nu,nf,nm,{test:e=>"auto"===e,parse:e=>e}],n5=e=>n3.find(n4(e));class n6 extends nX{constructor(e,t,r,n,i){super(e,t,r,n,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let r=0;r<e.length;r++){let n=e[r];if("string"==typeof n&&n0(n=n.trim())){let i=function e(t,r,n=1){rp(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);let[i,a]=function(e){let t=n2.exec(e);if(!t)return[,];let[,r,n,i]=t;return[`--${null!=r?r:n}`,i]}(t);if(!i)return;let o=window.getComputedStyle(r).getPropertyValue(i);if(o){let e=o.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return n0(a)?e(a,r,n+1):a}(n,t.current);void 0!==i&&(e[r]=i),r===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!rj.has(r)||2!==e.length)return;let[n,i]=e,a=n5(n),o=n5(i);if(a!==o)if(nM(a)&&nM(o))for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r&&(e[t]=parseFloat(r))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,r=[];for(let t=0;t<e.length;t++)(function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)})(e[t])&&r.push(t);r.length&&function(e,t,r){let n,i=0;for(;i<e.length&&!n;){let t=e[i];"string"==typeof t&&!nR.has(t)&&nB(t).values.length&&(n=e[i]),i++}if(n&&r)for(let i of t)e[i]=nD(r,n)}(e,r,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;"height"===r&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nK[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let n=t[t.length-1];void 0!==n&&e.getValue(r,n).jump(n,!1)}measureEndState(){var e;let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let i=t.getValue(r);i&&i.jump(this.measuredOrigin,!1);let a=n.length-1,o=n[a];n[a]=nK[r](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEac
39h(([e,r])=>{t.getValue(e).set(r)}),this.resolveNoneKeyframes()}}let n8=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(nF.test(e)||"0"===e)&&!e.startsWith("url(")),n7=e=>null!==e;function n9(e,{repeat:t,repeatType:r="loop"},n){let i=e.filter(n7),a=t&&"loop"!==r&&t%2==1?0:i.length-1;return a&&void 0!==n?n:i[a]}class ie{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:a="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rH.now(),this.options={autoplay:e,delay:t,type:r,repeat:n,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(nq(),n$()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=rH.now(),this.hasAttemptedResolve=!0;let{name:r,type:n,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:A}=this.options;if(!A&&!function(e,t,r,n){let i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],o=n8(i,t),s=n8(a,t);return rp(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!!o&&!!s&&(function(e){let t=e[0];if(1===e.length)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}(e)||("spring"===r||rU(r))&&n)}(e,r,n,i))if(a)this.options.duration=0;else{s&&s(n9(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}let l=this.initPlayback(e,t);!1!==l&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}let it=(e,t,r)=>e+(t-e)*r;function ir(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ii(e,t){return r=>r>0?t:e}let ia=(e,t,r)=>{let n=e*e,i=r*(t*t-n)+n;return i<0?0:Math.sqrt(i)},io=[nc,nl,ny];function is(e){let t=io.find(t=>t.test(e));if(rp(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===ny&&(r=function({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,r/=100;let i=0,a=0,o=0;if(t/=100){let n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;i=ir(s,n,e+1/3),a=ir(s,n,e),o=ir(s,n,e-1/3)}else i=a=o=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*o),alpha:n}}(r)),r}let iA=(e,t)=>{let r=is(e),n=is(t);if(!r||!n)return ii(e,t);let i={...r};return e=>(i.red=ia(r.red,n.red,e),i.green=ia(r.green,n.green,e),i.blue=ia(r.blue,n.blue,e),i.alpha=it(r.alpha,n.alpha,e),nl.transform(i))},il=(e,t)=>r=>t(e(r)),ic=(...e)=>e.reduce(il),id=new Set(["none","hidden"]);function iu(e,t){return r=>it(e,t,r)}function ih(e){return"number"==typeof e?iu:"string"==typeof e?n0(e)?ii:nb.test(e)?iA:ig:Array.isArray(e)?ip:"object"==typeof e?nb.test(e)?iA:im:ii}function ip(e,t){let r=[...e],n=r.length,i=e.map((e,r)=>ih(e)(e,t[r]));return e=>{for(let t=0;t<n;t++)r[t]=i[t](e);return r}}function im(e,t){let r={...e,...t},n={};for(let i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=ih(e[i])(e[i],t[i]));return e=>{for(let t in n)r[t]=n[t](e);return r}}let ig=(e,t)=>{let r=nF.createTransformer(t),n=nB(e),i=nB(t);if(!(n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length))return rp(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ii(e,t);if(id.has(e)&&!i.values.length||id.has(t)&&!n.values.length)return id.has(e)?r=>r<=0?e:t:r=>r>=1?t:e;return ic(ip(function(e,t){var r;let n=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let o=t.types[a],s=e.indexes[o][i[o]],A=null!=(r=e.values[s])?r:0;n[a]=A,i[o]++}return n}(n,i),i.values),r)};function iy(e,t,r){return"number"==typeof e&&"number"==typeof t&&"number"==typeof r?it(e,t,r):ih(e)(e,t)}function ib(e,t,r){var n,i;let a=Math.max(t-5,0);return n=r-e(a),(i=t-a)?1e3/i*n:0}let ix=.01,iw=2,iv=.005,iC=.5;function iB(e,t){return e*Math.sqrt(1-t*t)}let iS=["duration","bounce"],ik=["stiffness","damping","mass"];function iE(e,t){return t.some(t=>void 0!==e[t])}function iF(e=.3,t=.3){let r,n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:i,restDelta:a}=n,o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],A={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!iE(e,ik)&&iE(e,iS))if(e.visualDuration){let r=2*Math.PI/(1.2*e.visualDuration),n=r*r,i=2*r9(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:1,stiffness:n,damping:i}}else{let r=function({duration:e=800,bounce:t=.3,velocity:r=0,mass:n=1}){let i,a;rp(e<=rb(10),"Spring duration must be 10 seconds or less");let o=1-t;o=r9(.05,1,o),e=r9(.01,10,e/1e3),o<1?(i=t=>{let n=t*o,i=n*e;return .001-(n-r)/iB(t,o)*Math.exp(-i)},a=t=>{let n=t*o*e,a=Math.pow(o,2)*Math.pow(t,2)*e,s=Math.exp(-n),A=iB(Math.pow(t,2),o);return(n*r+r-a)*s*(-i(t)+.001>0?-1:1)/A}):(i=t=>-.001+Math.exp(-t*e)*((t-r)*e+1),a=t=>e*e*(r-t)*Math.exp(-t*e));let s=function(e,t,r){let n=r;for(let r=1;r<12;r++)n-=e(n)/t(n);return n}(i,a,5/e);if(e=rb(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(s,2)*n;return{stiffness:t,damping:2*o*Math.sqrt(n*t),duration:e}}}(e);(t={...t,...r,mass:1}).isResolvedFromDuration=!0}return t}({...n,velocity:-((n.velocity||0)/1e3)}),m=h||0,f=c/(2*Math.sqrt(l*d)),g=s-o,y=Math.sqrt(l/d)/1e3,b=5>Math.abs(g);if(i||(i=b?ix:iw),a||(a=b?iv:iC),f<1){let e=iB(y,f);r=t=>s-Math.exp(-f*y*t)*((m+f*y*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(1===f)r=e=>s-Math.exp(-y*e)*(g+(m+y*g)*e);else{let e=y*Math.sqrt(f*f-1);r=t=>{let r=Math.exp(-f*y*t),n=Math.min(e*t,300);return s-r*((m+f*y*g)*Math.sinh(n)+e*g*Math.cosh(n))/e}}let x={calculatedDuration:p&&u||null,next:e=>{let t=r(e);if(p)A.done=e>=u;else{let n=0;f<1&&(n=0===e?rb(m):ib(r,e,t));let o=Math.abs(s-t)<=a;A.done=Math.abs(n)<=i&&o}return A.value=A.done?s:t,A},toString:()=>{let e=Math.min(rx(x),2e4),t=rk(t=>x.next(e*t).value,e,30);return e+"ms "+t}};return x}function iT({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=
39500,modifyTarget:o,min:s,max:A,restDelta:l=.5,restSpeed:c}){let d,u,h=e[0],p={done:!1,value:h},m=r*t,f=h+m,g=void 0===o?f:o(f);g!==f&&(m=g-h);let y=e=>-m*Math.exp(-e/n),b=e=>g+y(e),x=e=>{let t=y(e),r=b(e);p.done=Math.abs(t)<=l,p.value=p.done?g:r},w=e=>{let t;if(t=p.value,void 0!==s&&t<s||void 0!==A&&t>A){var r;d=e,u=iF({keyframes:[p.value,(r=p.value,void 0===s?A:void 0===A||Math.abs(s-r)<Math.abs(A-r)?s:A)],velocity:ib(b,e,p.value),damping:i,stiffness:a,restDelta:l,restSpeed:c})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(u||void 0!==d||(t=!0,x(e),w(e)),void 0!==d&&e>=d)?u.next(e-d):(t||x(e),p)}}}let iU=rZ(.42,0,1,1),iI=rZ(0,0,.58,1),iQ=rZ(.42,0,.58,1),ij={linear:rp,easeIn:iU,easeInOut:iQ,easeOut:iI,circIn:r6,circInOut:r7,circOut:r8,backIn:r4,backInOut:r3,backOut:r2,anticipate:r5},iL=e=>{if(rv(e)){rp(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,i]=e;return rZ(t,r,n,i)}return"string"==typeof e?(rp(void 0!==ij[e],`Invalid easing type '${e}'`),ij[e]):e};function i_({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){var i;let a,o=Array.isArray(n)&&"number"!=typeof n[0]?n.map(iL):iL(n),s={done:!1,value:t[0]},A=function(e,t,{clamp:r=!0,ease:n,mixer:i}={}){let a=e.length;if(rp(a===t.length,"Both input and output ranges must be the same length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,r){let n=[],i=r||iy,a=e.length-1;for(let r=0;r<a;r++){let a=i(e[r],e[r+1]);t&&(a=ic(Array.isArray(t)?t[r]||rp:t,a)),n.push(a)}return n}(t,n,i),A=s.length,l=r=>{if(o&&r<e[0])return t[0];let n=0;if(A>1)for(;n<e.length-2&&!(r<e[n+1]);n++);let i=rS(e[n],e[n+1],r);return s[n](i)};return r?t=>l(r9(e[0],e[a-1],t)):l}((i=r&&r.length===t.length?r:(!function(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let i=rS(0,t,n);e.push(it(r,1,i))}}(a=[0],t.length-1),a),i.map(t=>t*e)),t,{ease:Array.isArray(o)?o:t.map(()=>o||iQ).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(s.value=A(t),s.done=t>=e,s)}}let iP=e=>{let t=({timestamp:t})=>e(t);return{start:()=>rD.update(t,!0),stop:()=>rR(t),now:()=>rM.isProcessing?rM.timestamp:rH.now()}},iD={decay:iT,inertia:iT,tween:i_,keyframes:i_,spring:iF},iR=e=>e/100;class iM extends ie{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};const{name:t,motionValue:r,element:n,keyframes:i}=this.options,a=(null==n?void 0:n.KeyframeResolver)||nX,o=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new a(i,o,t,r,n),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let t,r,{type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o,velocity:s=0}=this.options,A=rU(n)?n:iD[n]||i_;A!==i_&&"number"!=typeof e[0]&&(t=ic(iR,iy(e[0],e[1])),e=[0,100]);let l=A({...this.options,keyframes:e});"mirror"===o&&(r=A({...this.options,keyframes:[...e].reverse(),velocity:-s})),null===l.calculatedDuration&&(l.calculatedDuration=rx(l));let{calculatedDuration:c}=l,d=c+a;return{generator:l,mirroredGenerator:r,mapPercentToKeyframes:t,calculatedDuration:c,resolvedDuration:d,totalDuration:d*(i+1)-a}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){let{resolved:r}=this;if(!r){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:n,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:A,totalDuration:l,resolvedDuration:c}=r;if(null===this.startTime)return i.next(0);let{delay:d,repeat:u,repeatType:h,repeatDelay:p,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let f=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?f<0:f>l;this.currentTime=Math.max(f,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=l);let y=this.currentTime,b=i;if(u){let e=Math.min(this.currentTime,l)/c,t=Math.floor(e),r=e%1;!r&&e>=1&&(r=1),1===r&&t--,(t=Math.min(t,u+1))%2&&("reverse"===h?(r=1-r,p&&(r-=p/c)):"mirror"===h&&(b=a)),y=r9(0,1,r)*c}let x=g?{done:!1,value:s[0]}:b.next(y);o&&(x.value=o(x.value));let{done:w}=x;g||null===A||(w=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let v=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return v&&void 0!==n&&(x.value=n9(s,this.options,n)),m&&m(x.value),v&&this.finish(),x}
39get duration(){let{resolved:e}=this;return e?e.calculatedDuration/1e3:0}get time(){return this.currentTime/1e3}set time(e){e=rb(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=iP,onPlay:t,startTime:r}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=n):this.startTime=null!=r?r:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!=(e=this.currentTime)?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}let iO=new Set(["opacity","clipPath","filter","transform"]),iN=rm(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),iH={anticipate:r5,backInOut:r3,circInOut:r7};class iV extends ie{constructor(e){super(e);const{name:t,motionValue:r,element:n,keyframes:i}=this.options;this.resolver=new n6(i,(e,t)=>this.onKeyframesResolved(e,t),t,r,n),this.resolver.scheduleResolve()}initPlayback(e,t){var r;let{duration:n=300,times:i,ease:a,type:o,motionValue:s,name:A,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;if("string"==typeof a&&rB()&&a in iH&&(a=iH[a]),rU((r=this.options).type)||"spring"===r.type||!function e(t){return!!("function"==typeof t&&rB()||!t||"string"==typeof t&&(t in rF||rB())||rv(t)||Array.isArray(t)&&t.every(e))}(r.ease)){let{onComplete:t,onUpdate:r,motionValue:s,element:A,...l}=this.options,c=function(e,t){let r=new iM({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},i=[],a=0;for(;!n.done&&a<2e4;)i.push((n=r.sample(a)).value),a+=10;return{times:void 0,keyframes:i,duration:a-10,ease:"linear"}}(e,l);1===(e=c.keyframes).length&&(e[1]=e[0]),n=c.duration,i=c.times,a=c.ease,o="keyframes"}let c=function(e,t,r,{delay:n=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeInOut",times:A}={}){let l={[t]:r};A&&(l.offset=A);let c=function e(t,r){if(t)return"function"==typeof t&&rB()?rk(t,r):rv(t)?rE(t):Array.isArray(t)?t.map(t=>e(t,r)||rF.easeOut):rF[t]}(s,i);return Array.isArray(c)&&(l.easing=c),e.animate(l,{delay:n,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:"reverse"===o?"alternate":"normal"})}(s.owner.current,A,e,{...this.options,duration:n,times:i,ease:a});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(rw(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:r}=this.options;s.set(n9(e,this.options,t)),r&&r(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:o,ease:a,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return t/1e3}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return(t.currentTime||0)/1e3}set time(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.currentTime=rb(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return rp;let{animation:r}=t;rw(r,e)}else this.pendingTimeline=e;return rp}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;
39"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:r,duration:n,type:i,ease:a,times:o}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:A,...l}=this.options,c=new iM({...l,keyframes:r,duration:n,type:i,ease:a,times:o,isGenerator:!0}),d=rb(this.time);e.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:A}=t.owner.getProps();return iN()&&r&&iO.has(r)&&!s&&!A&&!n&&"mirror"!==i&&0!==a&&"inertia"!==o}}let iK={type:"spring",stiffness:500,damping:25,restSpeed:10},iG={type:"keyframes",duration:.8},iW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iz=(e,t,r,n={},i,a)=>o=>{let s=rT(n,e)||{},A=s.delay||n.delay||0,{elapsed:l=0}=n;l-=rb(A);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};!function({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:A,elapsed:l,...c}){return!!Object.keys(c).length}(s)&&(c={...c,...((e,{keyframes:t})=>t.length>2?iG:rQ.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:iK:iW)(e,c)}),c.duration&&(c.duration=rb(c.duration)),c.repeatDelay&&(c.repeatDelay=rb(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(c.duration=0,0===c.delay&&(d=!0)),d&&!a&&void 0!==t.get()){let e=n9(c.keyframes,s);if(void 0!==e)return rD.update(()=>{c.onUpdate(e),c.onComplete()}),new ry([])}return!a&&iV.supports(c)?new iV(c):new iM(c)};function i$(e,t,{delay:r=0,transitionOverride:n,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...A}=t;n&&(o=n);let l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(let t in A){let n=e.getValue(t,null!=(a=e.latestValues[t])?a:null),i=A[t];if(void 0===i||c&&function({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&!0!==t[r];return t[r]=!1,n}(c,t))continue;let s={delay:r,...rT(o||{},t)},d=!1;if(window.MotionHandoffAnimation){let r=e.props[rY];if(r){let e=window.MotionHandoffAnimation(r,t,rD);null!==e&&(s.startTime=e,d=!0)}}rq(e,t),n.start(iz(t,n,i,e.shouldReduceMotion&&rj.has(t)?{type:!1}:s,e,d));let u=n.animation;u&&l.push(u)}return s&&Promise.all(l).then(()=>{rD.update(()=>{s&&function(e,t){let{transitionEnd:r={},transition:n={},...i}=rd(e,t)||{};for(let t in i={...i,...r}){let r=rL(i[t]);e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,rz(r))}}(e,s)})}),l}function iq(e,t,r={}){var n;let i=rd(e,t,"exit"===r.type?null==(n=e.presenceContext)?void 0:n.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(a=r.transitionOverride);let o=i?()=>Promise.all(i$(e,i,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(n=0)=>{let{delayChildren:i=0,staggerChildren:o,staggerDirection:s}=a;return function(e,t,r=0,n=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*n,A=1===i?(e=0)=>e*n:(e=0)=>s-e*n;return Array.from(e.variantChildren).sort(iX).forEach((e,n)=>{e.notify("AnimationStart",t),o.push(iq(e,t,{...a,delay:r+A(n)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(o)}(e,t,i+n,o,s,r)}:()=>Promise.resolve(),{when:A}=a;if(!A)return Promise.all([o(),s(r.delay)]);{let[e,t]="beforeChildren"===A?[o,s]:[s,o];return e().then(()=>t())}}function iX(e,t){return e.sortNodePosition(t)}let iY=rh.length,iJ=[...ru].reverse(),iZ=ru.length;function i0(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i1(){return{animate:i0(!0),whileInView:i0(),whileHover:i0(),whileTap:i0(),whileDrag:i0(),whileFocus:i0(),exit:i0()}}class i2{constructor(e){this.isMounted=!1,this.node=e}update(){}}let i4=0,i3={x:!1,y:!1},i5=e=>
39"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function i6(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function i8(e){return{point:{x:e.pageX,y:e.pageY}}}function i7(e,t,r,n){return i6(e,t,e=>i5(e)&&r(e,i8(e)),n)}let i9=(e,t)=>Math.abs(e-t);class ae{constructor(e,t,{transformPagePoint:r,contextWindow:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let r=an(this.lastMoveEventInfo,this.history),n=null!==this.startEvent,i=(e=r.offset,t={x:0,y:0},Math.sqrt(i9(e.x,t.x)**2+i9(e.y,t.y)**2)>=3);if(!n&&!i)return;let{point:a}=r,{timestamp:o}=rM;this.history.push({...a,timestamp:o});let{onStart:s,onMove:A}=this.handlers;n||(s&&s(this.lastMoveEvent,r),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,r)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=at(t,this.transformPagePoint),rD.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:r,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=an("pointercancel"===e.type?this.lastMoveEventInfo:at(t,this.transformPagePoint),this.history);this.startEvent&&r&&r(e,a),n&&n(e,a)},!i5(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=r,this.contextWindow=n||window;const a=at(i8(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=rM;this.history=[{...o,timestamp:s}];const{onSessionStart:A}=t;A&&A(e,an(a,this.history)),this.removeListeners=ic(i7(this.contextWindow,"pointermove",this.handlePointerMove),i7(this.contextWindow,"pointerup",this.handlePointerUp),i7(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),rR(this.updatePoint)}}function at(e,t){return t?{point:t(e.point)}:e}function ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function an({point:e},t){return{point:e,delta:ar(e,ai(t)),offset:ar(e,t[0]),velocity:function(e){if(e.length<2)return{x:0,y:0};let t=e.length-1,r=null,n=ai(e);for(;t>=0&&(r=e[t],!(n.timestamp-r.timestamp>rb(.1)));)t--;if(!r)return{x:0,y:0};let i=(n.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};let a={x:(n.x-r.x)/i,y:(n.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t)}}function ai(e){return e[e.length-1]}function aa(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ao(e){return e.max-e.min}function as(e,t,r,n=.5){e.origin=n,e.originPoint=it(t.min,t.max,e.origin),e.scale=ao(r)/ao(t),e.translate=it(r.min,r.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function aA(e,t,r,n){as(e.x,t.x,r.x,n?n.originX:void 0),as(e.y,t.y,r.y,n?n.originY:void 0)}function al(e,t,r){e.min=r.min+t.min,e.max=e.min+ao(t)}function ac(e,t,r){e.min=t.min-r.min,e.max=e.min+ao(t)}function ad(e,t,r){ac(e.x,t.x,r.x),ac(e.y,t.y,r.y)}function au(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function ah(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function ap(e,t,r){return{min:am(e,t),max:am(e,r)}}function am(e,t){return"number"==typeof e?e:e[t]||0}let af=()=>({translate:0,scale:1,origin:0,originPoint:0}),ag=()=>({x:af(),y:af()}),ay=()=>({min:0,max:0}),ab=()=>({x:ay(),y:ay()});function ax(e){return[e("x"),e("y")]}function aw({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function av(e){return void 0===e||1===e}function aC({scale:e,scaleX:t,scaleY:r}){return!av(e)||!av(t)||!av(r)}function aB(e){return aC(e)||aS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aS(e){var t,r;return(t=e.x)&&"0%"!==t||(r=e.y)&&"0%"!==r}function ak(e,t,r,n,i){return void 0!==i&&(e=n+i*(e-n)),n+r*(e-n)+t}function aE(e,t=0,r=1,n,i){e.min=ak(e.min,t,r,n,i),e.max=ak(e.max,t,r,n,i)}function aF(e,{x:t,y:r}){aE(e.x,t.translate,t.scale,t.originPoint),aE(e.y,r.translate,r.scale,r.originPoint)}function aT(e,t){e.min=e.min+t,e.max=e.max+t}function aU(e,t,r,n,i=.5){let a=it(e.min,e.max,i);aE(e,t,r,a,n)}function aI(e,t){aU(e.x,t.x,t.scaleX,t.scale,t.originX),aU(e.y,t.y,t.scaleY,t.scale,t.originY)}function aQ(e,t){return aw(function(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}let aj=({current:e})=>e?e.ownerDocument.defaultView:null,aL=new WeakMap;class a_{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ab(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let n=e=>{let{dragSnapToOrigin:r}=this.getProps();r?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(i8(e).point)},i=(e,t)=>{let{drag:r,dragPropagation:n,onDragStart:i}=this.getProps();if(r&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
39y"===e)if(i3[e])return null;else return i3[e]=!0,()=>{i3[e]=!1};return i3.x||i3.y?null:(i3.x=i3.y=!0,()=>{i3.x=i3.y=!1})}(r),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ax(e=>{let t=this.getAxisMotionValue(e).get()||0;if(nh.test(t)){let{projection:r}=this.visualElement;if(r&&r.layout){let n=r.layout.layoutBox[e];n&&(t=ao(n)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&rD.postRender(()=>i(e,t)),rq(this.visualElement,"transform");let{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},a=(e,t)=>{let{dragPropagation:r,dragDirectionLock:n,onDirectionLock:i,onDrag:a}=this.getProps();if(!r&&!this.openDragLock)return;let{offset:o}=t;if(n&&null===this.currentDirection){this.currentDirection=function(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(o),null!==this.currentDirection&&i&&i(this.currentDirection);return}this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>ax(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())}),{dragSnapToOrigin:A}=this.getProps();this.panSession=new ae(e,{onSessionStart:n,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:A,contextWindow:aj(this.visualElement)})}stop(e,t){let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:n}=t;this.startAnimation(n);let{onDragEnd:i}=this.getProps();i&&rD.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){let{drag:n}=this.getProps();if(!r||!aP(e,n,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:r},n){return void 0!==t&&e<t?e=n?it(t,e,n.min):Math.max(e,t):void 0!==r&&e>r&&(e=n?it(r,e,n.max):Math.min(e,r)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&aa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=function(e,{top:t,left:r,bottom:n,right:i}){return{x:au(e.x,r,i),y:au(e.y,t,n)}}(n.layoutBox,t):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:ap(e,"left","right"),y:ap(e,"top","bottom")}}(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ax(e=>{var t,r;let i;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=n.layoutBox[e],r=this.constraints[e],i={},void 0!==r.min&&(i.min=r.min-t.min),void 0!==r.max&&(i.max=r.max-t.min),i))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!aa(t))return!1;let n=t.current;rp(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:i}=this.visualElement;if(!i||!i.layout)return!1;let a=function(e,t,r){let n=aQ(e,r),{scroll:i}=t;return i&&(aT(n.x,i.offset.x),aT(n.y,i.offset.y)),n}(n,i.root,this.visualElement.getTransformPagePoint()),o=(e=i.layout.layoutBox,{x:ah(e.x,a.x),y:ah(e.y,a.y)});if(r){let e=r(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=aw(e))}return o}startAnimation(e){let{drag:t,dragMomentum:r,dragElastic:n,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{};return Promise.all(ax(o=>{if(!aP(o,t,this.currentDirection))return;let A=s&&s[o]||{};a&&(A={min:0,max:0});
39let l={type:"inertia",velocity:r?e[o]:0,bounceStiffness:n?200:1e6,bounceDamping:n?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...i,...A};return this.startAxisValueAnimation(o,l)})).then(o)}startAxisValueAnimation(e,t){let r=this.getAxisMotionValue(e);return rq(this.visualElement,e),r.start(iz(e,r,0,t,this.visualElement,!1))}stopAnimation(){ax(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ax(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps();return r[t]||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ax(t=>{let{drag:r}=this.getProps();if(!aP(t,r,this.currentDirection))return;let{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){let{min:r,max:a}=n.layout.layoutBox[t];i.set(e[t]-it(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!aa(t)||!r||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};ax(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var r,i;let a,o,s,A=t.get();n[e]=(r={min:A,max:A},i=this.constraints[e],a=.5,o=ao(r),(s=ao(i))>o?a=rS(i.min,i.max-o,r.min):o>s&&(a=rS(r.min,r.max-s,i.min)),r9(0,1,a))}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ax(t=>{if(!aP(t,e,null))return;let r=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];r.set(it(i,a,n[t]))})}addListeners(){if(!this.visualElement.current)return;aL.set(this.visualElement,this);let e=i7(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:r=!0}=this.getProps();t&&r&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();aa(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,n=r.addEventListener("measure",t);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),rD.read(t);let i=i6(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ax(t=>{let r=this.getAxisMotionValue(t);r&&(this.originPoint[t]+=e[t].translate,r.set(r.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),a&&a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:a=.35,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:n,dragConstraints:i,dragElastic:a,dragMomentum:o}}}function aP(e,t,r){return(!0===t||t===e)&&(null===r||r===e)}let aD=e=>(t,r)=>{e&&rD.postRender(()=>e(t,r))};var aR=C;let aM=(0,C.createContext)(null);function aO(e=!0){let t=(0,C.useContext)(aM);if(null===t)return[!0,null];let{isPresent:r,onExitComplete:n,register:i}=t,a=(0,C.useId)();(0,C.useEffect)(()=>{e&&i(a)},[e]);let o=(0,C.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}let aN=(0,C.createContext)({}),aH=(0,C.createContext)({}),aV={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function aK(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let aG={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!np.test(e))return e;else e=parseFloat(e);let r=aK(e,t.target.x),n=aK(e,t.target.y);return`${r}% ${n}%`}},aW={},{schedule:az,cancel:a$}=rP(queueMicrotask,!1);class aq extends aR.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:n}=this.props,{projection:i}=e;Object.assign(aW,aY),i&&(t.group&&t.group.add(i),r&&r.register&&n&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),aV.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:r,drag:n,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,n||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||rD.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),az.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:n}=e;n&&(n.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(n),r&&r.deregister&&r.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function aX(e){let[t,r]=aO(),n=(0,aR.useContext)(aN);return(0,w.jsx)(aq,{...e,layoutGroup:n,switchLayoutGroup:(0,aR.useContext)(aH),isPresent:t,safeToRemove:r})}let aY={borderRadius:{...aG,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:aG,borderTopRightRadius:aG,borderBottomLeftRadius:aG,borderBottomRightRadius:aG,boxShadow:{correct:(e,{treeScale:t,projectionDelta:r})=>{let n=nF.parse(e);if(n.length>5)return e;let i=nF.createTransformer(e),a=+("number"!=typeof n[0]),o=r.x.scale*t.x,s=r.y.scale*t.y;n[0+a]/=o,n[1+a]/=s;let A=it(o,s,.5);return"number"==typeof n[2+a]&&(n[2+a]/=A),"number"==typeof n[3+a]&&(n[3+a]/=A),i(n)}}},aJ=(e,t)=>e.depth-t.depth;class aZ{constructor(){this.children=[],this.isDirty=!1}add(e){rV(this.children,e),this.isDirty=!0}remove(e){rK(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(aJ),this.isDirty=!1,this.children.forEac
39h(e)}}function a0(e){let t=r$(e)?e.get():e;return t&&"object"==typeof t&&t.mix&&t.toValue?t.toValue():t}let a1=["TopLeft","TopRight","BottomLeft","BottomRight"],a2=a1.length,a4=e=>"string"==typeof e?parseFloat(e):e,a3=e=>"number"==typeof e||np.test(e);function a5(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let a6=a7(0,.5,r8),a8=a7(.5,.95,rp);function a7(e,t,r){return n=>n<e?0:n>t?1:r(rS(e,t,n))}function a9(e,t){e.min=t.min,e.max=t.max}function oe(e,t){a9(e.x,t.x),a9(e.y,t.y)}function ot(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function or(e,t,r,n,i){return e-=t,e=n+1/r*(e-n),void 0!==i&&(e=n+1/i*(e-n)),e}function on(e,t,[r,n,i],a,o){!function(e,t=0,r=1,n=.5,i,a=e,o=e){if(nh.test(t)&&(t=parseFloat(t),t=it(o.min,o.max,t/100)-o.min),"number"!=typeof t)return;let s=it(a.min,a.max,n);e===a&&(s-=t),e.min=or(e.min,t,r,s,i),e.max=or(e.max,t,r,s,i)}(e,t[r],t[n],t[i],t.scale,a,o)}let oi=["x","scaleX","originX"],oa=["y","scaleY","originY"];function oo(e,t,r,n){on(e.x,t,oi,r?r.x:void 0,n?n.x:void 0),on(e.y,t,oa,r?r.y:void 0,n?n.y:void 0)}function os(e){return 0===e.translate&&1===e.scale}function oA(e){return os(e.x)&&os(e.y)}function ol(e,t){return e.min===t.min&&e.max===t.max}function oc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function od(e,t){return oc(e.x,t.x)&&oc(e.y,t.y)}function ou(e){return ao(e.x)/ao(e.y)}function oh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class op{constructor(){this.members=[]}add(e){rV(this.members,e),e.scheduleRender()}remove(e){if(rK(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,r=this.members.findIndex(t=>e===t);if(0===r)return!1;for(let e=r;e>=0;e--){let r=this.members[e];if(!1!==r.isPresent){t=r;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:n}=e.options;!1===n&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let om={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},of="u">typeof window&&void 0!==window.MotionDebug,og=["","X","Y","Z"],oy={visibility:"hidden"},ob=0;function ox(e,t,r,n){let{latestValues:i}=t;i[e]&&(r[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function ow({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},r=null==t?void 0:t()){this.id=ob++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,of&&(om.totalNodes=om.resolvedTargetDeltas=om.recalculatedProjection=0),this.nodes.forEach(oB),this.nodes.forEach(oI),this.nodes.forEach(oQ),this.nodes.forEach(oS),of&&window.MotionDebug.record(om)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new aZ)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new rG),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let r=this.eventHandlers.get(e);r&&r.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,r=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;let{layoutId:n,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),r&&(i||n)&&(this.isLayoutDirty=!0),e){let r,n=()=>this.root.updateBlockedByResize=!1;e(t,()=>{let e,t;this.root.updateBlockedByResize=!0,r&&r(),e=rH.now(),t=({timestamp:r})=>{let i=r-e;i>=250&&(rR(t),n(i-250))},rD.read(t,!0),r=()=>rR(t),aV.hasAnimatedSinceResize&&(aV.hasAnimatedSinceResize=!1,this.nodes.forEac
39h(oU))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&a&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:r,layout:n})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||oR,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),A=!this.targetLayout||!od(this.targetLayout,n)||r,l=!t&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...rT(i,"layout"),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||oU(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,rR(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(oj),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:r}=t.options;if(!r)return;let n=r.props[rY];if(window.MotionHasOptimisedAnimation(n,"transform")){let{layout:e,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",rD,!(e||r))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&e(i)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:r}=this.options;if(void 0===t&&!r)return;let n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oE);return}this.isUpdating||this.nodes.forEach(oF),this.isUpdating=!1,this.nodes.forEach(oT),this.nodes.forEach(ov),this.nodes.forEach(oC),this.clearAllSnapshots();let e=rH.now();rM.delta=r9(0,1e3/60,e-rM.timestamp),rM.timestamp=e,rM.isProcessing=!0,rO.update.process(rM),rO.preRender.process(rM),rO.render.process(rM),rM.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,az.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ok),this.sharedNodes.forEach(oL)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rD.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rD.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ab(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!oA(this.projectionDelta),r=this.getTransformTemplate(),n=r?r(this.latestValues,""):void 0,a=n!==this.prevTransformTemplateValue;e&&(t||aB(this.latestValues)||a)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let r=this.measurePageBox(),n=this.removeElementScroll(r);return e&&(n=this.removeTransform(n)),oN((t=n).x),oN(t.y),{animationId:this.root.animationId,measuredBox:r,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return ab();let r=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(oV))){let{scroll:e}=this.root;e&&(aT(r.x,e.offset.x),aT(r.y,e.offset.y))}return r}removeElementScroll(e){var t;let r=ab();if(oe(r,e),null==(t=this.scroll)?void 0:t.wasRoot)return r;for(let t=0;t<this.path.length;t++){let n=this.path[t],{scroll:i,options:a}=n;n!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&oe(r,e),aT(r.x,i.offset.x),aT(r.y,i.offset.y))}return r}applyTransform(e,t=!1){let r=ab();oe(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&aI(r,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),aB(n.latestValues)&&aI(r,n.latestValues)}return aB(this.latestValues)&&aI(r,this.latestValues),r}removeTransform(e){let t=ab();oe(t,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];if(!r.instance||!aB(r.latestValues))continue;aC(r.latestValues)&&r.updateSnapshot();let n=ab();oe(n,r.measurePageBox()),oo(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,n)}return aB(this.latestValues)&&oo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rM.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t,r,n,i;let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let o=!!this.resumingFrom||this!==a;if(!(e||o&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:s,layoutId:A}=this.options;if(this.layout&&(s||A)){if(this.resolvedRelativeTargetAt=rM.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ab(),this.relativeTargetOrigin=ab(),ad(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),oe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=ab(),this.targetWithTransforms=ab()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),r=this.target,n=this.relativeTarget,i=this.relativeParent.target,al(r.x,n.x,i.x),al(r.y,n.y,i.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):oe(this.target,this.layout.layoutBox),aF(this.target,this.targetDelta)):oe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ab(),this.relativeTargetOrigin=ab(),ad(this.relativeTargetOrigin,this.target,e.target),oe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}of&&om.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||aC(this.parent.latestValues)||aS(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),r=!!this.resumingFrom||this!==t,n=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(n=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===rM.timestamp&&(n=!1),n)return;let{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;oe(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;!function(e,t,r,n=!1){let i,a,o=r.length;if(o){t.x=t.y=1;for(let s=0;s<o;s++){a=(i=r[s]).projectionDelta;let{visualElement:o}=i.options;(!o||!o.props.style||"contents"!==o.props.style.display)&&(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&aI(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,aF(e,a)),n&&aB(i.latestValues)&&aI(e,i.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,r),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=ab());let{target:A}=t;if(!A){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(ot(this.prevProjectionDelta.x,this.projectionDelta.x),ot(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),aA(this.projectionDelta,this.layoutCorrected,A,this.latestValues),this.treeScale.x===o&&this.treeScale.y===s&&oh(this.projectionDelta.x,this.prevProjectionDelta.x)&&oh(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",A)),of&&om.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ag(),this.projectionDelta=ag(),this.projectionDeltaWithTransform=ag()}setAnimationOrigin(e,t=!1){let r,n=this.snapshot,i=n?n.latestValues:{},a={...this.latestValues},o=ag();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=ab(),A=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=!!(A&&!c&&!0===this.options.crossfade&&!this.path.some(oD));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;if(o_(o.x,e.x,n),o_(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var l,u,h,p,m,f;ad(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,p=this.relativeTargetOrigin,m=s,f=n,oP(h.x,p.x,m.x,f),oP(h.y,p.y,m.y,f),r&&(l=this.relativeTarget,u=r,ol(l.x,u.x)&&ol(l.y,u.y))&&(this.isProjectionDirty=!1),r||(r=ab()),oe(r,this.relativeTarget)}A&&(this.animationValues=a,function(e,t,r,n,i,a){i?(e.opacity=it(0,void 0!==r.opacity?r.opacity:1,a6(n)),e.opacityExit=it(void 0!==t.opacity?t.opacity:1,0,a8(n))):a&&(e.opacity=it(void 0!==t.opacity?t.opacity:1,void 0!==r.opacity?r.opacity:1,n));for(let i=0;i<a2;i++){let a=`border${a1[i]}Radius`,o=a5(t,a),s=a5(r,a);(void 0!==o||void 0!==s)&&(o||(o=0),s||(s=0),0===o||0===s||a3(o)===a3(s)?(e[a]=Math.max(it(a4(o),a4(s),n),0),(nh.test(s)||nh.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||r.rotate)&&(e.rotate=it(t.rotate||0,r.rotate||0,n))}(a,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(rR(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rD.update(()=>{var t;let r;aV.hasAnimatedSinceResize=!0,this.currentAnimation=(t={...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}},(r=r$(0)?0:rz(0)).start(iz("",r,1e3,t)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:r,layout:n,latestValues:i}=e;if(t&&r&&n){if(this!==e&&this.layout&&n&&oH(this.options.animationType,this.layout.layoutBox,n.layoutBox)){r=this.target||ab();let t=ao(this.layout.layoutBox.x);r.x.min=e.target.x.min,r.x.max=r.x.min+t;let n=ao(this.layout.layoutBox.y);r.y.min=e.target.y.min,r.y.max=r.y.min+n}oe(t,r),aI(t,i),aA(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
39)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new op),this.sharedNodes.get(e).add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:r}={}){let n=this.getStack();n&&n.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:r}=e;if((r.z||r.rotate||r.rotateX||r.rotateY||r.rotateZ||r.skewX||r.skewY)&&(t=!0),!t)return;let n={};r.z&&ox("z",e,n,this.animationValues);for(let t=0;t<og.length;t++)ox(`rotate${og[t]}`,e,n,this.animationValues),ox(`skew${og[t]}`,e,n,this.animationValues);for(let t in e.render(),n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}getProjectionStyles(e){var t,r;if(!this.instance||this.isSVG)return;if(!this.isVisible)return oy;let n={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,n.opacity="",n.pointerEvents=a0(null==e?void 0:e.pointerEvents)||"",n.transform=i?i(this.latestValues,""):"none",n;let a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=a0(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!aB(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}let o=a.animationValues||a.latestValues;this.applyTransformsToTarget(),n.transform=function(e,t,r){let n="",i=e.x.translate/t.x,a=e.y.translate/t.y,o=(null==r?void 0:r.z)||0;if((i||a||o)&&(n=`translate3d(${i}px, ${a}px, ${o}px) `),(1!==t.x||1!==t.y)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=r;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),a&&(n+=`rotateY(${a}deg) `),o&&(n+=`skewX(${o}deg) `),s&&(n+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,A=e.y.scale*t.y;return(1!==s||1!==A)&&(n+=`scale(${s}, ${A})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,o),i&&(n.transform=i(o,n.transform));let{x:s,y:A}=this.projectionDelta;for(let e in n.transformOrigin=`${100*s.origin}% ${100*A.origin}% 0`,a.animationValues?n.opacity=a===this?null!=(r=null!=(t=o.opacity)?t:this.latestValues.opacity)?r:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:n.opacity=a===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0,aW){if(void 0===o[e])continue;let{correct:t,applyTo:r}=aW[e],i="none"===n.transform?o[e]:t(o[e],a);if(r){let e=r.length;for(let t=0;t<e;t++)n[r[t]]=i}else n[e]=i}return this.options.layoutId&&(n.pointerEvents=a===this?a0(null==e?void 0:e.pointerEvents)||"":"none"),n}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(oE),this.root.sharedNodes.clear()}}}function ov(e){e.updateLayout()}function oC(e){var t;let r=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,a=r.source!==e.layout.source;"size"===i?ax(e=>{let n=a?r.measuredBox[e]:r.layoutBox[e],i=ao(n);n.min=t[e].min,n.max=n.min+i}):oH(i,r.layoutBox,t)&&ax(n=>{let i=a?r.measuredBox[n]:r.layoutBox[n],o=ao(t[n]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+o)});let o=ag();aA(o,t,r.layoutBox);let s=ag();a?aA(s,e.applyTransform(n,!0),r.measuredBox):aA(s,t,r.layoutBox);let A=!oA(o),l=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:i,layout:a}=n;
39if(i&&a){let o=ab();ad(o,r.layoutBox,i.layoutBox);let s=ab();ad(s,t,a.layoutBox),od(o,s)||(l=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:r,delta:s,layoutDelta:o,hasLayoutChanged:A,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function oB(e){of&&om.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function oS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ok(e){e.clearSnapshot()}function oE(e){e.clearMeasurements()}function oF(e){e.isLayoutDirty=!1}function oT(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oU(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oI(e){e.resolveTargetDelta()}function oQ(e){e.calcProjection()}function oj(e){e.resetSkewAndRotation()}function oL(e){e.removeLeadSnapshot()}function o_(e,t,r){e.translate=it(t.translate,0,r),e.scale=it(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function oP(e,t,r,n){e.min=it(t.min,r.min,n),e.max=it(t.max,r.max,n)}function oD(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let oR={duration:.45,ease:[.4,0,.1,1]},oM=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oO=oM("applewebkit/")&&!oM("chrome/")?Math.round:rp;function oN(e){e.min=oO(e.min),e.max=oO(e.max)}function oH(e,t,r){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(ou(t)-ou(r)))}function oV(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}let oK=ow({attachResizeListener:(e,t)=>i6(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oG={current:void 0},oW=ow({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oG.current){let e=new oK({});e.mount(window),e.setOptions({layoutScroll:!0}),oG.current=e}return oG.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function oz(e,t){let r=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document.querySelectorAll(e);return t?Array.from(t):[]}return Array.from(e)}(e),n=new AbortController;return[r,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function o$(e){return t=>{"touch"===t.pointerType||i3.x||i3.y||e(t)}}function oq(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover","Start"===r);let i=n["onHover"+r];i&&rD.postRender(()=>i(t,i8(t)))}let oX=(e,t)=>!!t&&(e===t||oX(e,t.parentElement)),oY=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),oJ=new WeakSet;function oZ(e){return t=>{"Enter"===t.key&&e(t)}}function o0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function o1(e){return i5(e)&&!(i3.x||i3.y)}function o2(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap","Start"===r);let i=n["onTap"+("End"===r?"":r)];i&&rD.postRender(()=>i(t,i8(t)))}let o4=new WeakMap,o3=new WeakMap,o5=e=>{let t=o4.get(e.target);t&&t(e)},o6=e=>{e.forEach(o5)},o8={some:0,all:1},o7=(0,C.createContext)({strict:!1}),o9=(0,C.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),se=(0,C.createContext)({});function st(e){return ra(e.animate)||rh.some(t=>rA(e[t]))}function sr(e){return!!(st(e)||e.variants)}function sn(e){return Array.isArray(e)?e.join(" "):e}let si="u">typeof window,sa={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},so={};for(let e in sa)so[e]={isEnabled:t=>sa[e].some(e=>!!t[e])};let ss=Symbol.for("motionComponentSymbol"),sA=si?C.useLayoutEffect:C.useEffect,sl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sc(e){if("string"!=typeof e||e.includes("-"));else if(sl.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}function sd(e){let t=(0,C.useRef)(null);return null===t.current&&(t.current=e()),t.current}let su=e=>(t,r)=>{let n=(0,C.useContext)(se),i=(0,C.useContext)(aM),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,i,a){let o={latestValues:function(e,t,r,n){let i={},a=n(e,{});for(let e in a)i[e]=a0(a[e]);let{initial:o,animate:s}=e,A=st(e),l=sr(e);t&&l&&!A&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===s&&(s=t.animate));let c=!!r&&!1===r.initial,d=(c=c||!1===o)?s:o;if(d&&"boolean"!=typeof d&&!ra(d)){let t=Array.isArray(d)?d:[d];for(let r=0;r<t.length;r++){let n=rc(e,t[r]);if(n){let{transitionEnd:e,transition:t,...r}=n;for(let e in r){let t=r[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}(n,i,a,e),renderState:t()};return r&&(o.onMount=e=>r({props:n,current:e,...o}),o.onUpdate=e=>r(e)),o})(e,t,n,i);return r?a():sd(a)},sh=(e,t)=>t&&"number"==typeof e?t.transform(e):e,sp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sm=rI.length;function sf(e,t,r){let{style:n,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let r=t[e];if(rQ.has(e)){o=!0;continue}if(nJ(e)){i[e]=r;continue}{let t=sh(r,nL[e]);e.startsWith("origin")?(s=!0,a[e]=t):n[e]=t}}if(!t.transform&&(o||r?n.transform=function(e,t,r){let n="",i=!0;for(let a=0;a<sm;a++){let o=rI[a],s=e[o];if(void 0===s)continue;let A=!0;if(!(A="number"==typeof s?s===+!!o.startsWith("scale"):0===parseFloat(s))||r){let e=sh(s,nL[o]);if(!A){i=!1;let t=sp[o]||o;n+=`${t}(${e}) `}r&&(t[o]=e)}}return n=n.trim(),r?n=r(t,i?"":n):i&&(n="none"),n}(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:e="50%",originY:t="50%",originZ:r=0}=a;n.transformOrigin=`${e} ${t} ${r}`}}let sg={offset:"stroke-dashoffset",array:"stroke-dasharray"},sy={offset:"strokeDashoffset",array:"strokeDasharray"};
39function sb(e,t,r){return"string"==typeof e?e:np.transform(t+r*e)}function sx(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:A=0,...l},c,d){let u,h;if(sf(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:p,style:m,dimensions:f}=e;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==i||void 0!==a||m.transform)&&(u=sb(void 0!==i?i:.5,f.x,f.width),h=sb(void 0!==a?a:.5,f.y,f.height),m.transformOrigin=`${u} ${h}`),void 0!==t&&(p.x=t),void 0!==r&&(p.y=r),void 0!==n&&(p.scale=n),void 0!==o&&function(e,t,r=1,n=0,i=!0){e.pathLength=1;let a=i?sg:sy;e[a.offset]=np.transform(-n);let o=np.transform(t),s=np.transform(r);e[a.array]=`${o} ${s}`}(p,o,s,A,!1)}let sw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),sv=()=>({...sw(),attrs:{}}),sC=e=>"string"==typeof e&&"svg"===e.toLowerCase();function sB(e,{style:t,vars:r},n,i){for(let a in Object.assign(e.style,t,i&&i.getProjectionStyles(n)),r)e.style.setProperty(a,r[a])}let sS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function sk(e,t,r,n){for(let r in sB(e,t,void 0,n),t.attrs)e.setAttribute(sS.has(r)?r:rX(r),t.attrs[r])}function sE(e,{layout:t,layoutId:r}){return rQ.has(e)||e.startsWith("origin")||(t||void 0!==r)&&(!!aW[e]||"opacity"===e)}function sF(e,t,r){var n;let{style:i}=e,a={};for(let o in i)(r$(i[o])||t.style&&r$(t.style[o])||sE(o,e)||(null==(n=null==r?void 0:r.getValue(o))?void 0:n.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function sT(e,t,r){let n=sF(e,t,r);for(let r in e)(r$(e[r])||r$(t[r]))&&(n[-1!==rI.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}let sU=["x","y","width","height","cx","cy","r"],sI={useVisualState:su({scrapeMotionValuesFromProps:sT,createRenderState:sv,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:i})=>{if(!r)return;let a=!!e.drag;if(!a){for(let e in i)if(rQ.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let r=0;r<sU.length;r++){let n=sU[r];e[n]!==t[n]&&(o=!0)}o&&rD.read(()=>{try{n.dimensions="function"==typeof r.getBBox?r.getBBox():r.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}rD.render(()=>{sx(n,i,sC(r.tagName),e.transformTemplate),sk(r,n)})})}})},sQ={useVisualState:su({scrapeMotionValuesFromProps:sF,createRenderState:sw})};function sj(e,t,r){for(let n in t)r$(t[n])||sE(n,r)||(e[n]=t[n])}let sL=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function s_(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sL.has(e)}let sP=e=>!s_(e);try{(l=e.r(934537).default)&&(sP=e=>e.startsWith("on")?!s_(e):l(e))}catch(e){}let sD={current:null},sR={current:!1},sM=[...n3,nb,nF],sO=new WeakMap,sN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sH{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:n,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nX,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=rH.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,rD.render(this.render,!1,!0))};const{latestValues:s,renderState:A,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=A,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=st(t),this.isVariantNode=sr(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==s[e]&&r$(t)&&t.set(s[e],!1)}}mount(e){this.current=e,sO.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
39h((e,t)=>this.bindToMotionValue(t,e)),sR.current||function(){if(sR.current=!0,si)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>sD.current=e.matches;e.addListener(t),t()}else sD.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sD.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in sO.delete(this.current),this.projection&&this.projection.unmount(),rR(this.notifyUpdate),rR(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){let r;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=rQ.has(e),i=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&rD.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=t.on("renderRequest",this.scheduleRender);window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),a(),r&&r(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in so){let t=so[e];if(!t)continue;let{isEnabled:r,Feature:n}=t;if(!this.features[e]&&n&&r(this.props)&&(this.features[e]=new n(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ab()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<sN.length;t++){let r=sN[t];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);let n=e["on"+r];n&&(this.propEventSubscriptions[r]=this.on(r,n))}this.prevMotionValues=function(e,t,r){for(let n in t){let i=t[n],a=r[n];if(r$(i))e.addValue(n,i);else if(r$(a))e.addValue(n,rz(i,{owner:e}));else if(a!==i)if(e.hasValue(n)){let t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(n);e.addValue(n,rz(void 0!==t?t:i,{owner:e}))}}for(let n in r)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return void 0===r&&void 0!==t&&(r=rz(null===t?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){var r;let n=void 0===this.latestValues[e]&&this.current?null!=(r=this.getBaseTargetFromProps(this.props,e))?r:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=n){let r,i;if("string"==typeof n&&(r=n,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r)||(i=n,/^0[^.\s]+$/u.test(i))))n=parseFloat(n);else{let r;r=n,!sM.find(n4(r))&&nF.test(t)&&(n=nD(e,t))}this.setBaseTarget(e,r$(n)?n.get():n)}return r$(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let r,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let i=rc(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||r$(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new rG),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class sV extends sH{constructor(){super(...arguments),this.KeyframeResolver=n6}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;r$(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class sK extends sV{constructor(){super(...arguments),this.type="html",this.renderInstance=sB}readValueFromInstance(e,t){if(rQ.has(t)){let e=nP(t);return e&&e.default||0}{let r=window.getComputedStyle(e),n=(nJ(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof n?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:t}){return aQ(e,t)}build(e,t,r){sf(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return sF(e,t,r)}}class sG extends sV{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ab}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(rQ.has(t)){let e=nP(t);return e&&e.default||0}return t=sS.has(t)?t:rX(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return sT(e,t,r)}build(e,t,r){sx(e,t,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,r,n){sk(e,t,r,n)}mount(e){this.isSVGTag=sC(e.tagName),super.mount(e)}}let sW=function(e){if("u"<typeof Proxy)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(r,n)=>"create"===n?e:(t.has(n)||t.set(n,e(n)),t.get(n))})}((c={animation:{Feature:class extends i2{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:r})=>(function(e,t,r={}){let n;if(e.notify("AnimationStart",t),Array.isArray(t))n=Promise.all(t.map(t=>iq(e,t,r)));else if("string"==typeof t)n=iq(e,t,r);else{let i="function"==typeof t?rd(e,t,r.custom):t;n=Promise.all(i$(e,i,r))}return n.then(()=>
39{e.notify("AnimationComplete",t)})})(e,t,r))),r=i1(),n=!0,i=t=>(r,n)=>{var i;let a=rd(e,n,"exit"===t?null==(i=e.presenceContext)?void 0:i.custom:void 0);if(a){let{transition:e,transitionEnd:t,...n}=a;r={...r,...n,...t}}return r};function a(a){let{props:o}=e,s=function e(t){if(!t)return;if(!t.isControllingVariants){let r=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(r.initial=t.props.initial),r}let r={};for(let e=0;e<iY;e++){let n=rh[e],i=t.props[n];(rA(i)||!1===i)&&(r[n]=i)}return r}(e.parent)||{},A=[],l=new Set,c={},d=1/0;for(let t=0;t<iZ;t++){var u,h;let p=iJ[t],m=r[p],f=void 0!==o[p]?o[p]:s[p],g=rA(f),y=p===a?m.isActive:null;!1===y&&(d=t);let b=f===s[p]&&f!==o[p]&&g;if(b&&n&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys={...c},!m.isActive&&null===y||!f&&!m.prevProp||ra(f)||"boolean"==typeof f)continue;let x=(u=m.prevProp,"string"==typeof(h=f)?h!==u:!!Array.isArray(h)&&!rs(h,u)),w=x||p===a&&m.isActive&&!b&&g||t>d&&g,v=!1,C=Array.isArray(f)?f:[f],B=C.reduce(i(p),{});!1===y&&(B={});let{prevResolvedValues:S={}}=m,k={...S,...B},E=t=>{w=!0,l.has(t)&&(v=!0,l.delete(t)),m.needsAnimating[t]=!0;let r=e.getValue(t);r&&(r.liveStyle=!1)};for(let e in k){let t=B[e],r=S[e];if(!c.hasOwnProperty(e))(ro(t)&&ro(r)?rs(t,r):t===r)?void 0!==t&&l.has(e)?E(e):m.protectedKeys[e]=!0:null!=t?E(e):l.add(e)}m.prevProp=f,m.prevResolvedValues=B,m.isActive&&(c={...c,...B}),n&&e.blockInitialAnimation&&(w=!1);let F=!(b&&x)||v;w&&F&&A.push(...C.map(e=>({animation:e,options:{type:p}})))}if(l.size){let t={};l.forEach(r=>{let n=e.getBaseTarget(r),i=e.getValue(r);i&&(i.liveStyle=!0),t[r]=null!=n?n:null}),A.push({animation:t})}let p=!!A.length;return n&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(p=!1),n=!1,p?t(A):Promise.resolve()}return{animateChanges:a,setActive:function(t,n){var i;if(r[t].isActive===n)return Promise.resolve();null==(i=e.variantChildren)||i.forEach(e=>{var r;return null==(r=e.animationState)?void 0:r.setActive(t,n)}),r[t].isActive=n;let o=a(t);for(let e in r)r[e].protectedKeys={};return o},setAnimateFunction:function(r){t=r(e)},getState:()=>r,reset:()=>{r=i1(),n=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();ra(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends i2{constructor(){super(...arguments),this.id=i4++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;let n=this.node.animationState.setActive("exit",!e);t&&!e&&n.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends i2{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:r={}}=this.node.getProps(),{root:n,margin:i,amount:a="some",once:o}=r,s={root:n?n.current:void 0,rootMargin:i,threshold:"number"==typeof a?a:o8[a]},A=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:r,onViewportLeave:n}=this.node.getProps(),i=t?r:n;i&&i(e)};return e=this.node.current,t=function({root:e,...t}){let r=e||document;o3.has(r)||o3.set(r,{});let n=o3.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(o6,{root:e,...t})),n[i]}(s),o4.set(e,A),t.observe(e),()=>{o4.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends i2{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,i,a]=oz(e,r),o=e=>{let n=e.currentTarget;if(!o1(e)||oJ.has(n))return;oJ.add(n);let a=t(e),o=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",A),o1(e)&&oJ.has(n)&&(oJ.delete(n),"function"==typeof a&&a(e,{success:t}))},s=e=>{o(e,r.useGlobalTarget||oX(n,e.target))},A=e=>{o(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",A,
39i)};return n.forEach(e=>{oY.has(e.tagName)||-1!==e.tabIndex||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(r.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),e.addEventListener("focus",e=>((e,t)=>{let r=e.currentTarget;if(!r)return;let n=oZ(()=>{if(oJ.has(r))return;o0(r,"down");let e=oZ(()=>{o0(r,"up")});r.addEventListener("keyup",e,t),r.addEventListener("blur",()=>o0(r,"cancel"),t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)})(e,i),i)}),a}(e,e=>(o2(this.node,e,"Start"),(e,{success:t})=>o2(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends i2{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ic(i6(this.node.current,"focus",()=>this.onFocus()),i6(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends i2{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,r={}){let[n,i,a]=oz(e,r),o=o$(e=>{let{target:r}=e,n=t(e);if("function"!=typeof n||!r)return;let a=o$(e=>{n(e),r.removeEventListener("pointerleave",a)});r.addEventListener("pointerleave",a,i)});return n.forEach(e=>{e.addEventListener("pointerenter",o,i)}),a}(e,e=>(oq(this.node,e,"Start"),e=>oq(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends i2{constructor(){super(...arguments),this.removePointerDownListener=rp}onPointerDown(e){this.session=new ae(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:aj(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:n}=this.node.getProps();return{onSessionStart:aD(e),onStart:aD(t),onMove:r,onEnd:(e,t)=>{delete this.session,n&&rD.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=i7(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends i2{constructor(e){super(e),this.removeGroupControls=rp,this.removeListeners=rp,this.controls=new a_(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rp}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:oW,MeasureLayout:aX},layout:{ProjectionNode:oW,MeasureLayout:aX}},d=(e,t)=>sc(e)?new sG(t):new sK(t,{allowProjection:e!==C.Fragment}),function(e,{forwardMotionProps:t}={forwardMotionProps:!1}){return function({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){var a,o;function s(e,a){var o;let s,A={...(0,C.useContext)(o9),...e,layoutId:function({layoutId:e}){let t=(0,C.useContext)(aN).id;return t&&void 0!==e?t+"-"+e:e}(e)},{isStatic:l}=A,c=function(e){let{initial:t,animate:r}=function(e,t){if(st(e)){let{initial:t,animate:r}=e;return{initial:!1===t||rA(t)?t:void 0,animate:rA(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,C.useContext)(se));return(0,C.useMemo)(()=>({initial:t,animate:r}),[sn(t),sn(r)])}(e),d=n(e,l);if(!l&&si){(0,C.useContext)(o7).strict;let e=function(e){let{drag:t,layout:r}=so;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}(A);s=e.MeasureLayout,c.visualElement=function(e,t,r,n,i){var a,o;let{visualElement:s}=(0,C.useContext)(se),A=(0,C.useContext)(o7),l=(0,C.useContext)(aM),c=(0,C.useContext)(o9).reducedMotion,d=(0,C.useRef)(null);n=n||A.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:s,props:r,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));let u=d.current,h=(0,C.useContext)(aH);u&&!u.projection&&i&&("html"===u.type||"svg"===u.type)&&function(e,t,r,n){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:A,layoutRoot:l}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&aa(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:n,layoutScroll:A,layoutRoot:l})}(d.current,r,i,h);let p=(0,C.useRef)(!1);(0,C.useInsertionEffect)(()=>{u&&p.current&&u.update(r,l)});let m=r[rY],f=(0,C.useRef)(!!m&&!(null==(a=window.MotionHandoffIsComplete)?void 0:a.call(window,m))&&(null==(o=window.MotionHasOptimisedAnimation)?void 0:o.call(window,m)));return sA(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),az.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),(0,C.useEffect)(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,m)}),f.current=!1))}),u}(i,d,A,t,e.ProjectionNode)}return(0,w.jsxs)(se.Provider,{value:c,children:[s&&c.visualElement?(0,w.jsx)(s,{visualElement:c.visualElement,...A}):null,r(i,e,(o=c.visualElement,(0,C.useCallback)(e=>{e&&d.onMount&&d.onMount(e),o&&(e?o.mount(e):o.unmount()),a&&("function"==typeof a?a(e):aa(a)&&(a.current=e))},[o])),d,l,c.visualElement)]})}e&&function(e){for(let t in e)so[t]={...so[t],...e[t]}}(e),s.displayName=`motion.${"string"==typeof i?i:`create(${null!=(o=null!=(a=i.displayName)?a:i.name)?o:""})`}`;let A=(0,C.forwardRef)(s);return A[ss]=i,A}({...sc(e)?sI:sQ,preloadedFeatures:c,useRender:function(e=!1){return(t,r,n,{latestValues:i},a)=>{let o=(sc(t)?function(e,t,r,n){let i=(0,C.useMemo)(()=>{let r=sv();return sx(r,t,sC(n),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){let t={};sj(t,e.style,e),i.style={...t,...i.style}}return i}:function(e,t){let r,n,i={},a=(r=e.style||{},sj(n={},r,e),Object.assign(n,function({transformTemplate:e},t){return(0,C.useMemo)(()=>{let r=sw();return sf(r,t,e),Object.assign({},r.vars,r.style)}
39,[t])}(e,t)),n);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i})(r,i,a,t),s=function(e,t,r){let n={};for(let i in e)("values"!==i||"object"!=typeof e.values)&&(sP(i)||!0===r&&s_(i)||!t&&!s_(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),A=t!==C.Fragment?{...s,...o,ref:n}:{},{children:l}=r,c=(0,C.useMemo)(()=>r$(l)?l.get():l,[l]);return(0,C.createElement)(t,{...A,children:c})}}(t),createVisualElement:d,Component:e})}));var sz=C;class s$ extends sz.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function sq({children:e,isPresent:t}){let r=(0,sz.useId)(),n=(0,sz.useRef)(null),i=(0,sz.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,sz.useContext)(o9);return(0,sz.useInsertionEffect)(()=>{let{width:e,height:o,top:s,left:A}=i.current;if(t||!n.current||!e||!o)return;n.current.dataset.motionPopId=r;let l=document.createElement("style");return a&&(l.nonce=a),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` 40 [data-motion-pop-id="${r}"] { 41 position: absolute !important; 42 width: ${e}px !important; 43 height: ${o}px !important; 44 top: ${s}px !important; 45 left: ${A}px !important; 46 } 47 `),()=>{document.head.removeChild(l)}},[t]),(0,w.jsx)(s$,{isPresent:t,childRef:n,sizeRef:i,children:sz.cloneElement(e,{ref:n})})}let sX=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:a,mode:o})=>{let s=sd(sY),A=(0,C.useId)(),l=(0,C.useCallback)(e=>{for(let t of(s.set(e,!0),s.values()))if(!t)return;n&&n()},[s,n]),c=(0,C.useMemo)(()=>({id:A,initial:t,isPresent:r,custom:i,onExitComplete:l,register:e=>(s.set(e,!1),()=>s.delete(e))}),a?[Math.random(),l]:[r,l]);return(0,C.useMemo)(()=>{s.forEach((e,t)=>s.set(t,!1))},[r]),C.useEffect(()=>{r||s.size||!n||n()},[r]),"popLayout"===o&&(e=(0,w.jsx)(sq,{isPresent:r,children:e})),(0,w.jsx)(aM.Provider,{value:c,children:e})};function sY(){return new Map}let sJ=e=>e.key||"";function sZ(e){let t=[];return C.Children.forEach(e,e=>{(0,C.isValidElement)(e)&&t.push(e)}),t}let s0=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1})=>{let[s,A]=aO(o),l=(0,C.useMemo)(()=>sZ(e),[e]),c=o&&!s?[]:l.map(sJ),d=(0,C.useRef)(!0),u=(0,C.useRef)(l),h=sd(()=>new Map),[p,m]=(0,C.useState)(l),[f,g]=(0,C.useState)(l);sA(()=>{d.current=!1,u.current=l;for(let e=0;e<f.length;e++){let t=sJ(f[e]);c.includes(t)?h.delete(t):!0!==h.get(t)&&h.set(t,!1)}},[f,c.length,c.join("-")]);let y=[];if(l!==p){let e=[...l];for(let t=0;t<f.length;t++){let r=f[t],n=sJ(r);c.includes(n)||(e.splice(t,0,r),y.push(r))}"wait"===a&&y.length&&(e=y),g(sZ(e)),m(l);return}let{forceRender:b}=(0,C.useContext)(aN);return(0,w.jsx)(w.Fragment,{children:f.map(e=>{let p=sJ(e),m=(!o||!!s)&&(l===f||c.includes(p));return(0,w.jsx)(sX,{isPresent:m,initial:(!d.current||!!r)&&void 0,custom:m?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:m?void 0:()=>{if(!h.has(p))return;h.set(p,!0);let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(null==b||b(),g(u.current),o&&(null==A||A()),n&&n())},children:e},p)})})};e.i(174080);var s1=Symbol.for("react.lazy"),s2=C[" use ".trim().toString()];function s4(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s1&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var s3=Symbol("radix.slottable");function s5(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===s3}var s6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{var r,n;let i,a,o,s=(n=r=`Primitive.${t}`,(i=C.forwardRef((e,t)=>
47{let{children:r,...n}=e;if(s4(r)&&"function"==typeof s2&&(r=s2(r._payload)),C.isValidElement(r)){var i;let e,a,o=(i=r,(a=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(a=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),s=function(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...a}:"className"===n&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==C.Fragment&&(s.ref=t?(0,tB.composeRefs)(t,o):o),C.cloneElement(r,s)}return C.Children.count(r)>1?C.Children.only(null):null})).displayName=`${n}.SlotClone`,a=i,(o=C.forwardRef((e,t)=>{let{children:r,...n}=e;s4(r)&&"function"==typeof s2&&(r=s2(r._payload));let i=C.Children.toArray(r),o=i.find(s5);if(o){let e=o.props.children,r=i.map(t=>t!==o?t:C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null);return(0,w.jsx)(a,{...n,ref:t,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,w.jsx)(a,{...n,ref:t,children:r})})).displayName=`${r}.Slot`,o),A=C.forwardRef((e,r)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,w.jsx)(n?s:t,{...i,ref:r})});return A.displayName=`Primitive.${t}`,{...e,[t]:A}},{}),s8=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),s7=C.forwardRef((e,t)=>(0,w.jsx)(s6.span,{...e,ref:t,style:{...s8,...e.style}}));s7.displayName="VisuallyHidden";let s9=(0,tb.cva)({base:{position:"fixed",inset:0}}),Ae=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(tX,{ref:n,...r,className:`${(0,tx.css)(s9.raw(),tx.css.raw(t))} relay-kit-reset`,children:e})),At=(0,tb.cva)({base:{backgroundColor:"modal-background",borderRadius:"modal-border-radius",border:"modal-border",position:"fixed",left:"50%",top:"100%",minWidth:"90vw",maxWidth:"100vw",sm:{minWidth:"400px",maxWidth:"532px"},maxHeight:"85vh",overflowY:"auto",_focus:{outline:"none"},"@media(max-width: 520px)":{borderBottomRightRadius:0,borderBottomLeftRadius:0,width:"100%"}}});(0,C.forwardRef)(({children:e,...t},r)=>(0,w.jsx)(t0,{ref:r,...t,className:At(),children:e}));let Ar=(0,C.forwardRef)(({children:e,css:t,disableAnimation:r=!1,...n},i)=>{let a=(0,em.useMediaQuery)("(max-width: 520px)"),o=a&&!r;return(0,w.jsx)(t0,{className:(0,tx.css)(At.raw(n),tx.css.raw(t)),forceMount:!0,asChild:!0,...n,children:(0,w.jsxs)(sW.div,{ref:i,transition:{type:o?"tween":void 0,duration:o?.2:.1,ease:o?void 0:"linear"},...o?{initial:{opacity:0,bottom:"-100%",top:"auto",left:0},animate:{opacity:1,bottom:0,top:"auto",left:0},exit:{opacity:0,bottom:"-100%",top:"auto",left:0}}:{initial:{opacity:0,top:"50%",transform:"translateX(-50%) translateY(-50%)"},animate:{opacity:1,top:"50%",transform:"translateX(-50%) translateY(-50%)"},exit:{opacity:0,top:"50%",transform:"translateX(-50%) translateY(-50%)"}},children:[(0,w.jsx)(s7,{children:(0,w.jsx)(t5,{children:"Title"})}),e]},a+"modal")})});Ar.displayName="AnimatedContent",(0,C.forwardRef)(({children:e,trigger:t,portalProps:r,...n},i)=>{let[a,o]=(0,C.useState)(!1);return(0,w.jsxs)(tH,{onOpenChange:o,open:a,children:[(0,w.jsx)(tK,{asChild:!0,children:t}),(0,w.jsx)(s0,{children:a?(0,w.jsx)(t$,{forceMount:!0,...r,children:(0,w.jsx)(Ar,{ref:i,forceMount:!0,...n,children:e})}):null})]})}).displayName="Dialog";var An=e.i(458093);let Ai=({trigger:e,css:t,overlayZIndex:r=1e7,showCloseButton:n=!0,disableAnimation:i=!1,children:a,...o})=>(0,w.jsxs)(tH,{modal:!0,...o,children:[(0,w.jsx)(tK,{asChild:!0,children:e}),(0,w.jsx)(s0,{children:o.open?(0,w.jsx)(t$,{forceMount:!0,children:(0,w.jsx)(Ae,{forceMount:!0,css:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"blackA10"},style:{zIndex:r},children:(0,w.jsxs)(Ar,{forceMount:!0,css:{"--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",padding:"4",...t},disableAnimation:i,onPointerDownOutside:o.onPointerDownOutside,onOpenAutoFocus:o.onOpenAutoFocus,children:[n?(0,w.jsx)(t7,{asChild:!0,style:{position:"absolute",right:10,top:12,zIndex:10},children:(0,w.jsx)(E.Button,{color:"ghost",size:"none",css:{color:"gray9",p:"2"},onClick:e=>{o.onCloseButtonClicked?.(e)},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:An.faXmark,width:16,height:16})})}):null,a]})})}):null})]}),Aa=e=>(0,w.jsx)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,w.jsx)("path",{d:"M12.375 1.875C12.375 2.92969 11.5156 3.75 10.5 3.75C9.44531 3.75 8.625 2.92969 8.625 1.875C8.625 0.859375 9.44531 0 10.5 0C11.5156 0 12.375 0.859375 12.375 1.875ZM12.375 18.125C12.375 19.1797 11.5156 20 10.5 20C9.44531 20 8.625 19.1797 8.625 18.125C8.625 17.1094 9.44531 16.25 10.5 16.25C11.5156 16.25 12.375 17.1094 12.375 18.125ZM0.5 10C0.5 8.98438 1.32031 8.125 2.375 8.125C3.39062 8.125 4.25 8.98438 4.25 10C4.25 11.0547 3.39062 11.875 2.375 11.875C1.32031 11.875 0.5 11.0547 0.5 10ZM20.5 10C20.5 11.0547 19.6406 11.875 18.625 11.875C17.5703 11.875 16.75 11.0547 16.75 10C16.75 8.98438 17.5703 8.125 18.625 8.125C19.6406 8.125 20.5 8.98438 20.5 10ZM3.39062 17.0703C2.6875 16.3672 2.6875 15.1562 3.39062 14.4531C4.13281 13.7109 5.34375 13.7109 6.04688 14.4531C6.78906 15.1562 6.78906 16.3672 6.04688 17.0703C5.34375 17.8125 4.13281 17.8125 3.39062 17.0703ZM6.04688 5.58594C5.34375 6.32812 4.13281 6.32812 3.39062 5.58594C2.6875 4.88281 2.6875 3.67188 3.39062 2.92969C4.13281 2.22656 5.34375 2.22656 6.04688 2.92969C6.78906 3.67188 6.78906 4.88281 6.04688 5.58594ZM14.9141 14.4531C15.6172 13.7109 16.8281 13.7109 17.5703 14.4531C18.2734 15.1562 18.2734 16.3672 17.5703 17.0703C16.8281 17.8125 15.6172 17.8125 14.9141 17.0703C14.1719 16.3672 14.1719 15.1562 14.9141 14.4531Z"})}),Ao=(0,tb.cva)({base:{animation:"spin 1s linear infinite",fill:"primary-color"}}),As=({css:e})=>{let t=(0,C.useContext)(z.ProviderOptionsContext);return t.loader?(0,w.jsx)("div",{className:(0,tx.css)(e),children:t.loader({width:e?.width??20,height:e?.height??20,fill:e?.fill})}):(0,w.jsx)(Aa,{className:(0,tx.css)(Ao.raw(),tx.css.raw(e))})};var AA=e.i(468757);let Al=(0,tb.cva)({base:{cursor:"pointer",width:"max-content",fontWeight:500,fontSize:14,color:"anchor-color",_hover:{color:"anchor-hover-color"},"--focusColor":"colors.focus-color",_focusVisible:{boxShadow:"0 0 0 2px var(--focusColor)",outline:"none",borderRadius:"4px"}},variants:{color:{gray:{color:"gray11",_hover:{color:"gray12"}},base:{color:"anchor-color",_hover:{color:"anchor-hover-color"}},black:{color:"gray12",_hover:{color:"gray12"}}},weight:{heavy:{fontWeight:900},bold:{fontWeight:700},semi_bold:{fontWeight:600}}}}),Ac=({css:e,weight:t,color:r,children:n,...i})=>(0,w.jsx)("button",{...i,className:(0,tx.css)(Al.raw({weight:t,color:r}),tx.css.raw(e)),children:n}),Ad=({css:e,weight:t,color:r,...n})=>(0,w.jsx)("a",{...n,className:(0,tx.css)(Al.raw({weight:t,color:r}),tx.css.raw(e))});var Au=e.i(422083);let Ah=({open:e,toAddress:t,toChain:r,linkedWallets:n,isConnected:i,multiWalletSupportEnabled:a,wallet:o,onAnalyticEvent:s,onOpenChange:A,onConfirmed:l,onClear:c})=>{let d=ey(o,n),[u,h]=(0,C.useState)(""),[p,m]=(0,C.useState)(""),[f,g]=(0,C.useState)([]),y=(0,C.useContext)(z.ProviderOptionsContext).vmConnectorKeyOverrides,b=r?.vmType==="lvm",x=(0,H.isAddress)(p),v=ei(p),{data:B,isLoading:S,isError:T}=eQ(b&&(x||v)?p:void 0),U=B?.index?.toString(),I=b&&x&&!!U&&ei(U),Q=(0,C.useMemo)(()=>n.filter(e=>ea(r?.vmType,e.address,r?.id,e.connector,y)),[r,n]),j=(0,C.useMemo)(()=>f.filter(e=>ea(r?.vmType,e,r?.id)),[f,r]),L=b&&!!B&&(x&&p.toLowerCase()===d?.toLowerCase()||v&&B.l1_address?.toLowerCase()===d?.toLowerCase()),P=!u&&!t||t===d&&u===d||Q.some(e=>e.address===t)||L;(0,C.useEffect)(()=>
47{e?(ea(r?.vmType,t??"",r?.id)&&(h(t||""),m(t||"")),g((0,Au.getCustomAddresses)()),s?.(N.EventNames.ADDRESS_MODAL_OPEN)):(h(""),m(""))},[e]);let{data:D,isLoading:R}=eU(ej(p)?p:""),M=R||S;return(0,C.useEffect)(()=>{b&&x?h(U??""):ea(r?.vmType,p,r?.id)?h(p):D?.address?h(D.address):h("")},[p,D,U,b,x,r]),(0,w.jsx)(Ai,{trigger:null,open:e,onOpenChange:A,css:{overflow:"hidden"},children:(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:"4",sm:{width:386}},children:[(0,w.jsx)(F.Text,{style:"h6",children:"To Address"}),(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"2",position:"relative"},children:[(0,w.jsxs)(k.Flex,{css:{position:"relative",display:"inline-block"},children:[(0,w.jsx)(ty.Input,{type:"text",inputMode:"text",autoComplete:"off",autoCorrect:"off",className:"ph-no-capture",css:{width:"100%",height:48},inputStyle:{paddingRight:p.length>0?"42px":"16px"},placeholder:r?"evm"===r.vmType?"Address or ENS":b?`${r.displayName} address or EVM address`:`Enter ${r.displayName} address`:"Enter address",value:p,onChange:e=>{m(e.target.value)}}),p.length>0&&!M&&(0,w.jsx)(E.Button,{color:"ghost",size:"none",css:{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)",width:"24px",height:"24px",minWidth:"24px",minHeight:"24px",padding:"0",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"gray3",color:"gray8"},onMouseDown:e=>{e.preventDefault()},onClick:()=>{m("")},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCircleXmark,width:16,height:16})}),M&&(0,w.jsx)(As,{css:{right:2,top:3,position:"absolute"}})]}),T?(0,w.jsx)(F.Text,{color:"red",style:"subtitle2",children:"Failed to resolve Lighter address"}):b&&x&&!S&&!U?(0,w.jsx)(F.Text,{color:"red",style:"subtitle2",children:"No Lighter account found for this EVM address"}):u||!p.length||M?null:(0,w.jsx)(F.Text,{color:"red",style:"subtitle2",children:"Not a valid address"}),I&&U?(0,w.jsxs)(k.Flex,{css:{bg:"green2",p:"2",borderRadius:8,gap:"2"},align:"center",children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCircleCheck,color:"#30A46C",width:16,height:16}),(0,w.jsxs)(F.Text,{style:"subtitle3",children:["Lighter Account ID: ",U]})]}):null,!P&&u&&i?(0,w.jsxs)(k.Flex,{css:{bg:"amber2",p:"2",borderRadius:8,gap:"2"},align:"center",children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faTriangleExclamation,color:"#FFA01C",width:16,height:16,style:{flexShrink:0}}),(0,w.jsxs)(F.Text,{style:"subtitle3",color:"warning",children:["This isn't the connected wallet address. Please ensure that the address provided is accurate."," "]})]}):null,!a&&i?P?(0,w.jsxs)(k.Flex,{css:{bg:"green2",p:"2",borderRadius:8,gap:"2"},align:"center",children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCircleCheck,color:"#30A46C",width:16,height:16}),(0,w.jsx)(F.Text,{style:"subtitle3",children:"Connected Wallet"})]}):(0,w.jsx)(Ac,{onClick:()=>{c(),A(!1)},children:"Use connected wallet address"}):null,j.length>0?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(F.Text,{style:"subtitle2",children:"Recent addresses"}),(0,w.jsx)(k.Flex,{css:{gap:"2",flexWrap:"wrap"},align:"center",children:j.map(e=>(0,w.jsxs)(tv,{color:"transparent",bordered:!0,radius:"squared",css:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",px:"8px"},onClick:()=>{l(e),A(!1),s?.(N.EventNames.ADDRESS_MODAL_CONFIRMED,{address:e,context:"custom_address"})},children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClipboard,width:16,height:16,color:"#9CA3AF"}),(0,w.jsx)(F.Text,{style:"subtitle2",children:eT(e)})]},e))})]}):null]}),(0,w.jsx)(E.Button,{cta:!0,disabled:M||!ea(r?.vmType,u,r?.id),css:{justifyContent:"center"},onClick:()=>{ea(r?.vmType,u,r?.id)&&(Q.some(e=>e.address===u)||u===d||((0,Au.addCustomAddress)(u),g((0,Au.getCustomAddresses)())),l(u),s?.(N.EventNames.ADDRESS_MODAL_CONFIRMED,{address:u,context:"input"})),A(!1)},"data-testid":"save-button",children:"Save"})]})})},Ap=e=>{let t="-",r=0;if(e?.status!=="pending"&&e?.status!=="waiting"){let n=e?.data?.inTxs?.map(e=>e.timestamp)??null,i=n?Math.min(...n):null,a=e?.data?.outTxs?.filter(e=>e.timestamp)?.map(e=>e.timestamp)??null,o=a&&a.length>0?Math.max(...a):null;i&&o&&((r=o-i)<0?(t="-",r=0):t=r>60?eK(r):`${r}s`)}return{fillTime:t,seconds:r}},Am=e=>e?.length&&e.find(e=>e.requestId)?.requestId||null;var Af=e.i(83114),Af=Af;(u=y||(y={}))[u.Confirmation=0]="Confirmation",u[u.Submitted=1]="Submitted",u[u.Success=2]="Success",u[u.Error=3]="Error";let Ag=({open:e,slippageTolerance:t,wallet:r,steps:n,quote:i,swapError:a,setSwapError:o,children:s,onSuccess:A,onValidating:l})=>{let c=(0,U.useRelayClient)();i?.details?.currencyIn?.currency?.chainId;let[d,u]=(0,C.useState)(y.Confirmation),[h,p]=(0,C.useState)(),[m,f]=(0,C.useState)(),[g,b]=(0,C.useState)([]),[x,v]=(0,C.useState)(!1),[B,S]=(0,C.useState)(!1);(0,C.useEffect)(()=>{e||S(!1)},[e]),(0,C.useEffect)(()=>{let e;if(a)return void u(y.Error);if(!n)return;let t=n.filter(e=>e.items&&e.items.length>0),r=t.length,o=[],s=null;for(let r of t){for(let t of r.items||[])if(t.txHashes&&t.txHashes.length>
470&&(o=t.txHashes.concat([...o])),t.internalTxHashes&&t.internalTxHashes.length>0&&(o=t.internalTxHashes.concat([...o])),"incomplete"===t.status){s=r,e=t;break}if(s&&e)break}b(o),!B&&(o.length>0||e?.isValidatingSignature==!0)&&d===y.Confirmation&&(l?.(i),S(!0)),s||(s=t[r-1]),p(s),f(e);let c=i?.details?.currencyOut?.currency?.chainId===8253038,h=n.every(e=>!e.items||0==e.items.length||e.items?.every(e=>!!c&&"submitted"===e.checkStatus||"complete"===e.status)),m=n.some(e=>e.items?.some(e=>"pending"===e.checkStatus)),g=n.some(e=>e.items?.some(e=>"submitted"===e.checkStatus)),x=n.some(e=>e.items?.some(e=>!0===e.isValidatingSignature||"validating"===e.progressState));(m||g)&&d===y.Confirmation&&!x&&(u(y.Submitted),l?.(i)),h&&d!==y.Success&&(u(y.Success),A?.(i,n))},[n,a]);let k=(0,C.useMemo)(()=>Am(n),[n]),{data:E,isInitialLoading:F}=(0,Af.default)((d===y.Success||d===y.Error)&&k?{id:k}:void 0,c?.baseApiUrl,{enabled:(d===y.Success||d===y.Error)&&(!!k||!!g[0]),refetchInterval(e){if(e.state.dataUpdateCount>10)return 0;let t=e.state.data?.pages[0].requests?.[0];return!t||("refund"===t.status||t.data?.refundCurrencyData)&&(!t.data?.outTxs||0===t.data.outTxs.length)?2500:0}}),T=E[0],{fillTime:I,seconds:Q}=Ap(T),j=tA(i?.details),L=tu(i);return(0,w.jsx)(w.Fragment,{children:s({wallet:r,progressStep:d,setProgressStep:u,currentStep:h,setCurrentStep:p,currentStepItem:m,setCurrentStepItem:f,quote:i,steps:n,waitingForSteps:x,swapError:a,setSwapError:o,allTxHashes:g,setAllTxHashes:b,transaction:T,fillTime:I,seconds:Q,requestId:k,isLoadingTransaction:F,isAutoSlippage:void 0===t,timeEstimate:j,isGasSponsored:L,currentCheckStatus:m?.checkStatus})})};var Ay=e.i(388340),Ab=e.i(631078);let Ax=({error:e,hasTxHashes:t,fromChain:r})=>{let n=C.useMemo(()=>e&&e.response?.data?.message?e.response?.data?.message:e?.message?.includes("An internal error was received.")||!e?.message?"Oops! Something went wrong while processing your transaction.":e?.name&&(e?.message?.includes("does not support chain")||e?.message?.match(/Chain \d+ not supported/))?`Your wallet does not support ${r?.displayName??"this chain"}`:!t||e?.message?.includes("Deposit transaction with hash")?"Oops, something went wrong while initiating the swap. Your request was not submitted. Please try again.":e?.message?.includes("solver status check")?"This transaction is taking longer than usual to process. Please visit the transaction page for more details.":e?.message?.includes("OUT_OF_ENERGY")?"Your wallet does not have enough energy to complete the transaction. Please top up your energy.":"TransactionConfirmationError"===e.name?"Transaction Failed. Try adjusting slippage or gas limits and try again.":e?.message,[e?.message,t]);return(0,w.jsx)(F.Text,{style:"subtitle1",css:{my:"4",textAlign:"center",width:"100%",wordBreak:"break-word"},children:n})},Aw=(e,t,r)=>{let n,i=t?.find(t=>t.id===e),a=((n=t?.find(t=>t.id===e)?.explorerUrl||"https://etherscan.io").endsWith("/")&&(n=n.slice(0,-1)),n);return r&&(a=i?.explorerPaths?.transaction?`${a}${i.explorerPaths.transaction.replace("{TX_HASH}",r)}`:`${a}/tx/${r}`),a=((e,t)=>{if(t){let r=new URLSearchParams(t);return`${e}?${r.toString()}`}return e})(a,i?.explorerQueryParams)};var Av=e.i(514476);let AC=({allTxHashes:e,fromChain:t,toChain:r,refundData:n,isSolverStatusTimeout:i,fillTx:a})=>{let o=(0,U.useRelayClient)(),s=n?o?.chains.find(e=>e.id===n?.currency?.chainId):null,A=(0,C.useMemo)(()=>e.reduce((e,t)=>(e[t.chainId]||(e[t.chainId]=[]),e[t.chainId].push(t),e),{}),[e,o?.chains]),l=t?.id===r?.id,c=[],d=t?.id?A[t.id]?.filter(e=>!e.isBatchTx).slice(0,1):[];if(d&&d.length>0&&t&&c.push({label:"Send tx",txHashes:d,isRefund:!1}),n&&s){let e=A[s.id]?.filter(e=>!e.isBatchTx)||[],t=a?.txHash||e[0]?.txHash,r=t?Aw(s.id,o?.chains,t):null;t&&r&&c.push({label:"Receive tx",txHashes:[],isRefund:!0,refundTxHash:t,refundTxUrl:r})}else if(r?.id&&A[r.id]&&!l){let e=A[r.id].filter(e=>!e.isBatchTx);e.length>0&&c.push({label:"Receive tx",txHashes:e,isRefund:!1})}return(0,w.jsx)(k.Flex,{direction:"column",css:{gap:"3"},children:c.map((e,t)=>(0,w.jsxs)(k.Flex,{justify:"between",css:{alignItems:"center"},children:[(0,w.jsxs)(k.Flex,{css:{alignItems:"center",gap:"2"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:e.label}),e.isRefund?(0,w.jsxs)(tv,{color:"gray",css:{py:"1",px:"6px",display:"flex",alignItems:"center"},children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faRotateRight,style:{width:16,height:16,marginRight:4},color:"#889096"})," ",(0,w.jsx)(F.Text,{style:"subtitle3",children:"Refunded"})]}):null]}),!e.isRefund&&e.txHashes.length>0?(0,w.jsx)(k.Flex,{direction:"column",children:e.txHashes.map(({tx
47Hash:e,chainId:t,isBatchTx:r})=>{let n=Aw(t,o?.chains,e);return n&&!r?(0,w.jsx)(Ad,{href:n,target:"_blank","data-testid":"transaction-link",children:eT(e)},e):null})}):null,e.isRefund&&e.refundTxHash&&e.refundTxUrl?(0,w.jsx)(k.Flex,{direction:"column",children:(0,w.jsx)(Ad,{href:e.refundTxUrl,target:"_blank","data-testid":"refund-transaction-link",children:eT(e.refundTxHash)})}):null,e.isRefund||0!==e.txHashes.length||i?null:(0,w.jsx)(k.Flex,{direction:"column",children:(0,w.jsx)(F.Text,{color:"red",style:"subtitle2",children:"Order has not been filled"})}),!e.isRefund&&0===e.txHashes.length&&i?(0,w.jsx)(k.Flex,{direction:"column",children:(0,w.jsx)(Av.Skeleton,{css:{height:20}})}):null]},t))})},AB=({reasonCode:e})=>{if(e&&"N/A"!=e)switch(e){case"TOO_LITTLE_RECEIVED":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because the received amount was too low. Try adjusting the slippage or amount."});case"NEW_CALLDATA_INCLUDES_HIGHER_RENT_FEE":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because network fees increased. Try adjusting the slippage or amount."});case"NEGATIVE_NEW_AMOUNT_AFTER_FEES":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because the fees exceeded the expected amount. Try adjusting the slippage or amount."});case"NO_QUOTES":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because no swap routes were found for your request. Try a different token or amount."});case"REVERSE_SWAP_FAILED":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because the reverse swap couldnât be completed. Try adjusting the slippage or amount."});case"GENERATE_SWAP_FAILED":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because something went wrong while setting up your swap. Please try again."});case"SLIPPAGE":return(0,w.jsxs)(w.Fragment,{children:["Your transaction has been refunded because the market price shifted more than the allowed slippage. Try adjusting your slippage settings or"," ",(0,w.jsx)(Ad,{href:"https://docs.relay.link/what-is-relay#intercom",target:"_blank",children:"contact support"})," ","if the issue persists."," "]});case"DEPOSITED_AMOUNT_TOO_LOW_TO_FILL":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because the deposited amount was too low. Try adjusting the slippage or amount."});case"AMOUNT_TOO_LOW_TO_REFUND":return(0,w.jsxs)(w.Fragment,{children:["Your transaction amount is insufficient to cover the gas cost for an automatic refund. Please"," ",(0,w.jsx)(Ad,{href:"https://docs.relay.link/what-is-relay#intercom",target:"_blank",children:"contact support"})," ","if you need assistance."," "]});case"EXECUTION_REVERTED":case"MISSING_REVERT_DATA":return(0,w.jsx)(w.Fragment,{children:"Your transaction has been refunded because there was an issue during execution. Try adjusting the slippage or amount."});default:return(0,w.jsxs)(w.Fragment,{children:["It looks like an unknown issue occurred during the transaction. Please"," ",(0,w.jsx)(Ad,{href:"https://docs.relay.link/what-is-relay#intercom",target:"_blank",children:"contact support"})," ","if you have any further questions."," "]})}};var AS=e.i(830553);let Ak=({chainId:e,css:t={},height:r=14,width:n=14,square:i=!0,borderRadius:a=4})=>{let o=(0,C.useContext)(z.ProviderOptionsContext),s=(0,J.default)(),A=e?s?.chains?.find(t=>t.id===e):null,l=A?"dark"===o.themeScheme&&A.icon?.dark||A.icon?.light:null,c=i&&l?l.replace("/icons/","/icons/square/"):l;return c?(0,w.jsx)(k.Flex,{css:{display:"flex",flexShrink:0,...t},style:{height:r,width:n,borderRadius:a},children:c?(0,w.jsx)("img",{src:c,alt:`Chain #${e}`,style:{borderRadius:i?a:0,width:t&&t.width?Number(t.width):"100%",height:t&&t.height?Number(t.height):"100%"}}):null}):null};var AE=e.i(403275),AF=e.i(528539);let AT={sm:{token:20,chain:12},base:{token:24,chain:10},md:{token:32,chain:16},lg:{token:40,chain:18}},AU=({chainId:e,tokenlogoURI:t,tokenSymbol:r,css:n={},size:i="md",chainRadius:a=4,chainIconSize:o})=>{let s=t&&"missing.png"!==t,A=AT[i],l=o??A.chain;return e?(0,w.jsxs)(AS.default,{css:{position:"relative",flexShrink:0,width:A.token,height:A.token,overflow:"hidden",borderRadius:a,...n},children:[s?(0,w.jsx)("img",{alt:"Token",src:t,width:A.token,height:A.token,style:{borderRadius:9999,overflow:"hidden"}}):r?(0,w.jsx)(AE.default,{css:{width:A.token,height:A.token,borderRadius:"50%",backgroundColor:"primary4",color:"primary8",dis
47play:"flex",alignItems:"center",justifyContent:"center"},children:(0,w.jsx)(AF.default,{style:"h6",children:r?.charAt(0).toUpperCase()})}):null,(0,w.jsx)(Ak,{chainId:e,width:l,height:l,borderRadius:a,css:{position:"absolute",right:0,bottom:0,overflow:"hidden","--borderColor":"colors.modal-background",border:"1px solid var(--borderColor)",backgroundColor:"modal-background"}})]}):null},AI=({error:e,address:t,allTxHashes:r,transaction:n,fromChain:i,toChain:a,fromToken:o,toToken:s,fromAmountFormatted:A,toAmountFormatted:l,onOpenChange:c})=>{let d,u=(e=>{if(!e||"string"!=typeof e)return e;try{let t=JSON.parse(e),r=Error(t.message);return r.name=t.name,r.stack=t.stack,Object.assign(r,t),r}catch(t){return e}})(e),h=n?.data?.failReason??u?.message,p=h?.toLowerCase()?.includes("refunded")||n?.status==="refund",m=r&&r.length>0,f=u?.message?.includes("solver status check"),g=(0,U.useRelayClient)(),y=g?.baseApiUrl.includes("testnets")?"https://testnets.relay.link":"https://relay.link",b=r?r[0]:void 0;Aw(b?.chainId,g?.chains,b?.txHash),p?n&&"refund"===n.status&&n.data?.outTxs&&n.data.outTxs.length>0&&(d={txHash:n.data.outTxs[0].hash,chainId:n.data.outTxs[0].chainId}):d=r&&r.length>1?r[r.length-1]:void 0,Aw(d?.chainId,g?.chains,d?.txHash);let x=p&&h?Error(h):u,v=n?.data?.refundCurrencyData,C=n?.data?.refundCurrencyData?.currency?.chainId?g?.chains.find(e=>e.id===n.data?.refundCurrencyData?.currency?.chainId):null;return(0,w.jsxs)(k.Flex,{direction:"column",align:"center",justify:"between",css:{width:"100%"},children:[(0,w.jsxs)(sW.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:[p?(0,w.jsx)(T.Box,{css:{color:"gray9",mr:"$2"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faRotateRight,style:{height:40}})}):null,!p&&f?(0,w.jsx)(T.Box,{css:{color:"amber9",mr:"$2"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:Ay.faCircleExclamation,style:{height:40}})}):null,p||f?null:(0,w.jsx)(T.Box,{css:{color:"red9",mr:"$2"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCircleXmark,style:{height:40}})})]}),p?n?.data?.failReason!=="UNKNOWN"&&n?.data?.failReason?(0,w.jsxs)(F.Text,{style:"subtitle2",css:{my:"4",textAlign:"center"},children:[(0,w.jsx)(AB,{reasonCode:n?.data?.failReason}),v?` We've refunded ${v.amountFormatted} ${v.currency?.symbol} on ${C?.displayName}
47.`:" We apologize for the inconvenience, a refund has been sent to your wallet address."]}):(0,w.jsxs)(k.Flex,{direction:"column",css:{my:"4",textAlign:"center",alignItems:"center"},children:[(0,w.jsxs)(F.Text,{style:"subtitle1",css:{mb:"16px"},children:["It looks like an unknown issue occurred during the transaction.",o&&A&&i?` We've refunded ${A} ${o.symbol} on ${i.displayName}.`:" We've refunded your tokens."]}),(0,w.jsxs)(k.Flex,{css:{alignItems:"center",gap:"2"},children:[o&&i?(0,w.jsxs)(tv,{color:"gray",css:{alignItems:"center",py:"2",px:"3"},children:[(0,w.jsx)(AU,{chainId:i.id,tokenlogoURI:o.logoURI,tokenSymbol:o.symbol,size:"base"}),(0,w.jsxs)(F.Text,{style:"subtitle1",css:{ml:"2"},children:[A," ",o.symbol]})]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"}),(0,w.jsx)(k.Flex,{css:{alignItems:"center",justifyContent:"center",p:"2"},children:(0,w.jsx)(_.FontAwesomeIcon,{style:{width:14},icon:Ab.faArrowRight})}),s&&a?(0,w.jsxs)(tv,{color:"gray",css:{alignItems:"center",py:"2",px:"3"},children:[(0,w.jsx)(AU,{chainId:a.id,tokenlogoURI:s.logoURI,tokenSymbol:s.symbol,size:"base"}),(0,w.jsxs)(F.Text,{style:"subtitle1",css:{ml:"2"},children:[l," ",s.symbol]})]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"})]})]}):(0,w.jsx)(Ax,{error:x,hasTxHashes:m,fromChain:i}),b||d?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(k.Flex,{direction:"column",css:{p:"3","--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",gap:"3",width:"100%",borderRadius:12,mb:24},children:(0,w.jsx)(AC,{allTxHashes:r,fromChain:i,toChain:a,isSolverStatusTimeout:f,refundData:v,fillTx:d})}),(0,w.jsxs)(k.Flex,{css:{gap:"3",width:"100%"},children:[(0,w.jsx)(E.Button,{color:"secondary",cta:!0,onClick:()=>{window.open(b?`${y}/transaction/${b.txHash}`:`${y}/transactions?address=${t}`,"_blank")},css:{justifyContent:"center",whiteSpace:"nowrap"},children:"View Details"}),(0,w.jsx)(E.Button,{cta:!0,onClick:()=>{c(!1)},css:{justifyContent:"center",width:"100%"},children:"Done"})]})]}):(0,w.jsx)(E.Button,{cta:!0,onClick:()=>{c(!1)},css:{justifyContent:"center",width:"100%"},children:"Done"})]})},AQ=(e,t)=>{if(e.includes("approve")){let e=t?.fromTokenSymbol||"token",r=t?.operation==="wrap"?"wrap":t?.operation==="unwrap"?"unwrap":t?.operation==="send"?"send":"swap";return`Approve ${e} for ${r}`}if(e.includes("swap")||e.includes("send")||e.includes("deposit")){let r=t?.fromTokenSymbol||"token",n=t?.toTokenSymbol||"token",i=t?.fromChainName||"chain";return t?.operation==="send"?`Send ${r}`:t?.operation==="wrap"?`Wrap ${r}`:t?.operation==="unwrap"?`Unwrap ${r}`:e.includes("send")?`Send ${r} on ${i}`:`Swap ${r} to ${n}`}if(e.includes("relay"))return"Relay processes your transaction";if(e.includes("receive")){let e=t?.toTokenSymbol||"token",r=t?.toChainName||"chain";return`Receive ${e} on ${r}`}return"Processing transaction"},Aj=({width:e=19,height:t=16,fill:r="#5A45DF",...n})=>(0,w.jsx)("svg",{width:e,height:t,viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,w.jsx)("path",{d:"M2.71802 0L7.71802 0L7.71802 4C7.71802 4.5625 8.15552 5 8.71802 5L12.718 5L12.718 6.375L9.74927 9.34375C9.49927 9.59375 9.31177 9.90625 9.21802 10.2812L8.74927 12.1562C8.68677 12.4375 8.68677 12.75 8.78052 13H8.49927L8.37427 12.75C8.15552 12.2812 7.68677 12 7.21802 12C6.90552 12 6.59302 12.125 6.37427 12.3125L5.99927 11.125C5.90552 10.75 5.56177 10.5 5.21802 10.5C4.84302 10.5 4.49927 10.75 4.40552 11.125L3.93677 12.6562C3.87427 12.875 3.68677 13 3.46802 13H3.21802C2.93677 13 2.71802 13.25 2.71802 13.5C2.71802 13.7812 2.93677 14 3.21802 14H3.46802C4.12427 14 4.71802 13.5938 4.90552 12.9375L5.21802 11.9062L5.71802 13.6562C5.78052 13.8438 5.96802 14 6.15552 14C6.37427 14.0312 6.56177 13.9375 6.65552 13.75L6.93677 13.1875C6.96802 13.0937 7.09302 13 7.21802 13C7.31177 13 7.43677 13.0937 7.46802 13.1875L7.74927 13.75C7.84302 13.9062 7.99927 14 8.21802 14H10.218C10.218 14 10.2493 14 10.2805 14C10.3743 14 10.468 14 10.5618 13.9687L12.4368 13.5C12.5305 13.4687 12.6243 13.4375 12.718 13.4062V14C12.718 15.125 11.8118 16 10.718 16L2.71802 16C1.59302 16 0.718018 15.125 0.718018 14L0.718018 2C0.718018 0.90625 1.59302 0 2.71802 0ZM8.71802 0L12.718 4L8.71802 4V0ZM17.8743 4.375L18.343 4.84375C18.8118 5.3125 18.8118 6.125 18.343 6.59375L17.4055 7.53125L15.1868 5.3125L16.1243 4.375C16.593 3.90625 17.4055 3.90625 17.8743 4.375ZM10.4368 10.0312L14.4993 6L16.718 8.21875L12.6555 12.25C12.5305 12.4062 12.3743 12.4687 12.218 12.5312L10.3118 13C10.1555 13.0312 9.96802 13 9.84302 12.875C9.71802 12.75 9.68677 12.5625 9.71802 12.375L10.1868 10.5C10.218 10.3437 10.3118 10.187
475 10.4368 10.0312Z",fill:r})}),AL=({width:e=17,height:t=15,fill:r="#889096",...n})=>(0,w.jsx)("svg",{width:e,height:t,viewBox:"0 0 17 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,w.jsx)("path",{d:"M13.3118 0.59375C13.6868 0.4375 14.1243 0.53125 14.4055 0.8125L16.4055 2.8125C16.593 3 16.718 3.25 16.718 3.5C16.718 3.78125 16.593 4.03125 16.4055 4.21875L14.4055 6.21875C14.1243 6.5 13.6868 6.59375 13.3118 6.4375C12.9368 6.28125 12.718 5.90625 12.718 5.5L12.718 4.5H11.718C11.3743 4.5 11.093 4.65625 10.9055 4.90625L9.59302 6.6875L8.34302 5L9.31177 3.71875C9.87427 2.96875 10.7493 2.5 11.718 2.5H12.718V1.5C12.718 1.125 12.9368 0.75 13.3118 0.59375ZM5.84302 8.34375L7.09302 10L6.09302 11.3125C5.53052 12.0625 4.65552 12.5 3.71802 12.5H1.71802C1.15552 12.5 0.718018 12.0625 0.718018 11.5C0.718018 10.9688 1.15552 10.5 1.71802 10.5H3.71802C4.03052 10.5 4.31177 10.375 4.49927 10.125L5.84302 8.34375ZM14.4055 14.2187C14.1243 14.5 13.6868 14.5937 13.3118 14.4375C12.9368 14.2812 12.6868 13.9062 12.6868 13.5V12.5H11.6868C10.7493 12.5 9.87427 12.0625 9.31177 11.3125L4.49927 4.90625C4.31177 4.65625 4.03052 4.5 3.71802 4.5L1.71802 4.5C1.15552 4.5 0.718018 4.0625 0.718018 3.5C0.718018 2.96875 1.15552 2.5 1.71802 2.5L3.71802 2.5C4.65552 2.5 5.53052 2.96875 6.09302 3.71875L10.9055 10.125C11.093 10.375 11.3743 10.5 11.718 10.5H12.718V9.5C12.718 9.125 12.9368 8.75 13.3118 8.59375C13.6868 8.4375 14.1243 8.53125 14.4055 8.8125L16.4055 10.8125C16.593 11 16.718 11.25 16.718 11.5C16.718 11.7812 16.593 12.0312 16.4055 12.2187L14.4055 14.2187Z",fill:r})}),A_=({width:e=15,height:t=13,fill:r="#5A45DF",...n})=>(0,w.jsx)("svg",{width:e,height:t,viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,w.jsx)("path",{d:"M2.71802 1.5L2.71802 11.5C2.71802 12.0625 2.24927 12.5 1.71802 12.5C1.15552 12.5 0.718018 12.0625 0.718018 11.5L0.718018 1.5C0.718018 0.96875 1.15552 0.5 1.71802 0.5C2.24927 0.5 2.71802 0.96875 2.71802 1.5ZM14.4055 7.21875L10.4055 11.2187C10.0305 11.625 9.37427 11.625 8.99927 11.2187C8.59302 10.8437 8.59302 10.1875 8.99927 9.8125L11.2805 7.5L5.71802 7.5C5.15552 7.5 4.71802 7.0625 4.71802 6.5C4.71802 5.96875 5.15552 5.5 5.71802 5.5L11.2805 5.5L8.99927 3.21875C8.59302 2.84375 8.59302 2.1875 8.99927 1.8125C9.37427 1.40625 10.0305 1.40625 10.4055 1.8125L14.4055 5.8125C14.8118 6.1875 14.8118 6.84375 14.4055 7.21875Z",fill:r})}),AP=({width:e=15,height:t=13,fill:r="#889096",...n})=>(0,w.jsx)("svg",{width:e,height:t,viewBox:"0 0 15 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,w.jsx)("path",{d:"M0.718018 1.5C0.718018 0.96875 1.15552 0.5 1.71802 0.5C2.24927 0.5 2.71802 0.96875 2.71802 1.5L2.71802 11.5C2.71802 12.0625 2.24927 12.5 1.71802 12.5C1.15552 12.5 0.718018 12.0625 0.718018 11.5L0.718018 1.5ZM4.99927 7.21875C4.59302 6.84375 4.59302 6.1875 4.99927 5.8125L8.99927 1.8125C9.37427 1.40625 10.0305 1.40625 10.4055 1.8125C10.8118 2.1875 10.8118 2.84375 10.4055 3.21875L8.12427 5.5L13.718 5.5C14.2493 5.5 14.718 5.96875 14.718 6.5C14.718 7.0625 14.2493 7.5 13.718 7.5H8.12427L10.4055 9.8125C10.8118 10.1875 10.8118 10.8437 10.4055 11.2187C10.0305 11.625 9.37427 11.625 8.99927 11.2187L4.99927 7.21875Z",fill:r})}),AD=({stepId:e,chainId:t})=>(0,w.jsx)(k.Flex,{css:{borderRadius:"100px",padding:"8px",width:"32px",height:"32px",gap:"2"},children:(()=>{if(e.includes("approve"))return(0,w.jsx)(Aj,{width:14,height:16,fill:"currentColor"});if(e.includes("swap")||e.includes("deposit")||e.includes("send"))if(e.includes("same-chain"))return(0,w.jsx)(AL,{width:16,height:16,fill:"currentColor"});else return(0,w.jsx)(A_,{width:14,height:16,fill:"currentColor"});return e.includes("relay")?(0,w.jsx)(AL,{width:16,height:16,fill:"currentColor"}):e.includes("receive")?(0,w.jsx)(AP,{width:14,height:16,fill:"currentColor"}):(0,w.jsx)(Ak,{chainId:t,square:!1,width:14,height:16})})()}),AR=({fromToken:e,toToken:t,fromChain:r,toChain:n,fromAmountFormatted:i,toAmountFormatted:a,quote:o,steps:s,currentAddress:A,linkedWallets:l})=>{let c=o?.details?.operation||"swap",{formattedSteps:d}=(0,C.useMemo)(()=>(({steps:e,fromToken:t,toToken:r,fromChain:n,toChain:i,operation:a,quote:o,currentAddress:s,linkedWallets:A})=>
47{if(!e||0===e.length)return{formattedSteps:[]};let l=((e,t)=>{if(!e||!t)return;let r=t.find(t=>e===("evm"===t.vmType?t.address.toLowerCase():t.address)||t.address===e);if(!r?.connector)return;let n=ew[r.connector]??r.connector;return n.charAt(0).toUpperCase()+n.slice(1)})(s,A)??"your wallet",c=[],d=e?.filter(e=>e.items&&e.items.length>0),u=t?.symbol||o?.details?.currencyIn?.currency?.symbol||"Unknown",h=r?.symbol||o?.details?.currencyOut?.currency?.symbol||"Unknown",p=d.some(e=>"approve"===e.id||"approval"===e.id),m=n?.id===i?.id,f=d.find(e=>e.items?.some(e=>"incomplete"===e.status)),g=f?.items?.find(e=>"incomplete"===e.status),y=g?.progressState,b=d.every(e=>e.items?.every(e=>"complete"===e.status)),x=r?.chainId||i?.id||o?.details?.currencyOut?.currency?.chainId,w=!m&&!!x&&d.some(e=>e.items?.some(e=>e.txHashes?.some(e=>e.chainId===x)||e.internalTxHashes?.some(e=>e.chainId===x))),v=(e,t,r,n,i,a,o,s,A)=>{if(r&&("send"===e||"swap"===e)){let e=o?.[0]?.txHash||a?.[0]?.txHash;if(e)return`Success: ${e.slice(0,6)}...${e.slice(-4)}`}if(t){if("pending"===i){if("relay"===e)return;if("send"===e)return"Sent to Relay"}if("submitted"===i)switch(e){case"receive":return"Receiving";case"relay":return"Relay processing complete";default:return"Transaction submitted"}switch(e){case"approve":if("validating"===n)return"Approving";return`Approve in ${s||"wallet"}`;case"send":case"swap":if("confirming"===n)return`Confirm in ${s||"wallet"}`;if("validating"===n){let t=a?.[0]?.txHash||o?.[0]?.txHash;if("send"===e)return t?`Sending to Relay: ${t.slice(0,6)}...${t.slice(-4)}`:"Sending to Relay";return"Relay processes your transaction"}return;case"receive":return"Receiving";default:return}}},C=e=>e?.items?.flatMap(e=>[...e.txHashes||[],...e.internalTxHashes||[]])||[],B=e=>e?.items?.every(e=>"complete"===e.status)||!1,S=e=>d.find(t=>e.includes(t.id)),k=(e,t,r,n,i,a,o,s=!1)=>{let A=C(i),c=v(t,r,n,r?y:void 0,g?.checkStatus,"receive"===t?g?.txHashes:i?.items?.flatMap(e=>e.txHashes||[]),"receive"===t?g?.internalTxHashes:i?.items?.flatMap(e=>e.internalTxHashes||[]),l,x),d=E(t,r,n,c,g?.checkStatus);return{id:e,action:AQ(e,a),isActive:r,isCompleted:n,progressState:r?y:void 0,txHashes:A,isWalletAction:"relay"!==t&&"receive"!==t,chainId:o,isApproveStep:s,subText:c,subTextColor:d.color,showSubTextSpinner:d.showSpinner}},E=(e,t,r,n,i)=>n?r&&n.startsWith("Success:")?{color:"green11",showSpinner:!1}:"pending"===i?"relay"===e?{color:"primary11",showSpinner:!0}:{color:"primary11",showSpinner:!1}:"submitted"===i?"receive"===e&&n.startsWith("Receiving")?{color:"primary11",showSpinner:!0}:{color:"primary11",showSpinner:!1}:"receive"===e?{color:t?"primary11":"slate10",showSpinner:t}:{color:"primary11",showSpinner:!0}:{color:void 0,showSpinner:!1},F={fromTokenSymbol:u,toTokenSymbol:h,fromChainName:n?.displayName,toChainName:i?.displayName,operation:a};if(m)if(p){let e=S(["approve","approval"]),r=f?.id===e?.id&&!b,n=B(e);c.push(k("approve-same-chain","approve",r,n,e,F,t?.chainId,!0));let i=S(["swap","deposit","send"]),a=f?.id===i?.id||n&&!b,o=B(i);c.push(k("swap-same-chain","swap",a,o,i,F,t?.chainId,!1))}else{let e=S(["swap","deposit","send"]),r=B(e);c.push(k("swap-same-chain","swap",!b,r,e,F,t?.chainId,!1))}else{if(p){let e=S(["approve","approval"]),r=f?.id===e?.id&&!b,n=B(e);c.push(k("approve-cross-chain","approve",r,n,e,F,t?.chainId,!0))}let e=S(["deposit","send","authorize1"]),r=e?.items?.every(e=>"complete"===e.status||"pending"===e.checkStatus||"submitted"===e.checkStatus||"success"===e.checkStatus)||!1,a=(f?.id===e?.id||!p&&!b||p&&c[0]?.isCompleted&&!b)&&!r,o=v("send",a,r,y,g?.checkStatus,e?.items?.flatMap(e=>e.txHashes||[]),e?.items?.flatMap(e=>e.internalTxHashes||[]),l,x),s=E("send",a,r,o,g?.checkStatus);c.push({id:"send-cross-chain",action:AQ("send-cross-chain",F),isActive:a,isCompleted:r,progressState:a?y:void 0,txHashes:C(e),isWalletAction:!0,chainId:t?.chainId,isApproveStep:!1,subText:o,subTextColor:s.color,showSubTextSpinner:s.showSpinner});let A=g?.checkStatus==="submitted"&&g?.status==="incomplete",d=r&&g?.checkStatus==="pending",u=g?.checkStatus==="submitted"||g?.checkStatus==="success",m=v("relay",d,u,d?y:void 0,g?.checkStatus,void 0,void 0,l,x),T=E("relay",d,u,m,g?.checkStatus);c.push({id:"relay-processing",action:AQ("relay-processing"),isActive:!!d,isCompleted:!!u,isWalletAction:!1,chainId:n?.id,isApproveStep:!1,subText:m,subTextColor:T.color,showSubTextSpinner:T.showSpinner});let U=!!((w||A)&&!b),I=!!b,Q=v("receive",U,I,U?y:void 0,g?.checkStatus,g?.txHashes,g?.internalTxHashes,l,x),j=E("receive",U,I,Q,g?.checkStatus);c.push({id:"receive-cross-chain",action:AQ("receive-cross-chain",{toTokenSymbol:h,toChainName:i?.displayName}),isActive:U,isCompleted:I,isWalletAction:!1,chainId:i?.id,isApproveStep:!1,subText:Q,subTextColor:j.color,showSubTextSpinner:j.showSpinner})}return{formattedSteps:c}})({steps:s,fromToken:e,toToken:t,fromChain:r,toChain:n,operation:c,quote:o,currentAddress:A,linkedWallets:l}),[s,e,t,r,n,c,o,A,l]),u=o?.details?.currencyGasTopup?.currency,h=o?.details?.currencyGasTopup?.amount?(0,j.formatBN)(BigInt(o?.details?.currencyGasTopup?.amount),5,u?.decimals??18):void 0;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{align:"center",justify:"between",direction:"column",css:{flexShrink:0,bp500:{flexDirection:"row"}},children:[(0,w.jsxs)(k.Flex,{direction:"row",css:{backgroundColor:"subtle-background-color",p:"12px 16px",borderRadius:12,gap:2,width:"100%",alignItems:"center",bp500:{flexDirection:"column",gap:1,alignItems:"flex-start"}},children:[(0,w.jsx)(AU,{chainId:e?.chainId,tokenlogoURI:e?.logoURI,tokenSymbol:e?.symbol,css:{height:32,width:32}}),(0,w.jsxs)(k.Flex,{direction:"column",align:"start",css:{gap:"1"},children:[(0,w.jsx)(F.Text,{color:"subtle",style:"subtitle2",children:r?.displayName}),(0,w.jsxs)(F.Text,{style:"h6",ellipsify:!0,css:{lineHeight:"20px"},children:[i," ",e?.symbol]})]})]}),(0,w.jsx)(F.Text,{style:"body1",css:{color:"gray9",p:"0 12px",bp400Down:{transform:"rotate(90deg)",p:"12px 0"}},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:Ab.faArrowRight,width:16})}),(0,w.jsxs)(k.Flex,{direction:"row",css:{backgroundColor:"subtle-background-color",p:"12px 16px",borderRadius:12,gap:2,width:"100%",alignItems:"center",bp500:{flexDirection:"column",gap:1,alignItems:"flex-start"}},children:[(0,w.jsx)(AU,{chainId:t?.chainId,tokenlogoURI:t?.logoURI,tokenSymbol:t?.symbol,css:{height:32,width:32}}),(0,w.jsxs)(k.Flex,{direction:"column",align:"start",css:{gap:"1"},children:[(0,w.jsx)(F.Text,{color:"subtle",style:"subtitle2",children:n?.displayName}),(0,w.jsxs)(F.Text,{style:"h6",ellipsify:!0,css:{lineHeight:"20px"},children:[a," ",t?.symbol]})]})]})]}),h?(0,w.jsxs)(k.Flex,{direction:"row",justify:"between",css:{backgroundColor:"subtle-background-color",p:"12px 16px",borderRadius:12,gap:2,width:"100%",alignItems:"center"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Additional Gas"}),(0,w.jsxs)(F.Text,{style:"subtitle2",children:[h," ",u?.symbol]})]}):null,(0,w.jsx)(k.Flex,{direction:"column",css:{"--borderColor":"colors.gray3",border:"1px solid var(--borderColor)",borderRadius:12,px:"3",py:"2",gap:"1"},children:d.map((e,t)=>(0,w.jsxs)(T.Box,{children:[(0,w.jsx)(AM,{...e}),t!==d.length-1&&(0,w.jsx)(T.Box,{css:{height:"14px",pl:"12px",marginTop:"4px"},children:(0,w.jsx)(T.Box,{css:{width:"1px",height:"100%",backgroundColor:"gray7"}})})]},e.id))})]})},AM=({id:e,action:t,isActive:r,isCompleted:n,txHashes:i,isWalletAction:a,chainId:o,isApproveStep:s,subText:A,subTextColor:l,showSubTextSpinner:c})=>{let d=(0,J.default)(),u=d?.chains;return(0,w.jsx)(k.Flex,{align:"center",justify:"between",css:{width:"100%",gap:"3"},children:(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"3",height:40},children:[(0,w.jsx)(k.Flex,{"data-active":r&&!n,css:{height:30,width:30,borderRadius:9999999,flexShrink:0,alignItems:"center",justifyContent:"center",backgroundColor:n?"green3":r?"primary6":"gray5",color:r&&!n?"primary11":n?"green11":r?"primary11":"gray9",animation:r&&!n?"pulse-shadow 1s infinite alternate-reverse":"none","& > *":{color:n?"green11":r?"primary11":"gray9"}},children:n?(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCheck,width:12}):(0,w.jsx)(AD,{stepId:e,chainId:o})}),(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"2px"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:r?void 0:"subtle",children:t}),A&&(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"6px"},children:[(()=>{if(A.startsWith("Success:")){let[e,t]=A.split(": "),r=i?.[0]?.txHash,n=i?.[0]?.chainId,a=r&&n?Aw(n,u,r):void 0;return(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px"},children:[(0,w.jsxs)(F.Text,{style:"subtitle3",css:{color:"green11"},children:[e,":"]}
47),t&&(r&&a?(0,w.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--colors-primary11)",textDecoration:"none"},children:(0,w.jsx)(F.Text,{style:"subtitle3",css:{color:"primary11"},children:t})}):(0,w.jsx)(F.Text,{style:"subtitle3",css:{color:"primary11"},children:t}))]})}if(A.includes(": ")&&(A.startsWith("Sending to Relay:")||A.startsWith("Receiving:"))){let[e,t]=A.split(": "),r=i?.[0]?.txHash,n=i?.[0]?.chainId,a=r&&n?Aw(n,u,r):void 0;return(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px"},children:[(0,w.jsxs)(F.Text,{style:"subtitle3",css:{color:"primary11"},children:[e,":"]}),t&&(r&&a?(0,w.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--colors-primary11)",textDecoration:"none"},children:(0,w.jsx)(F.Text,{style:"subtitle3",css:{color:"primary11"},children:t})}):(0,w.jsx)(F.Text,{style:"subtitle3",css:{color:"primary11"},children:t}))]})}return(0,w.jsx)(F.Text,{style:"subtitle3",css:{color:"slate10"===l?"slate10":"subtle"===l?"text-subtle":"green11"===l?"green11":"primary11"},children:A})})(),c&&(0,w.jsx)(As,{css:{height:12,width:12}})]})]})]})})};var AO=e.i(189515);let AN=({width:e=41,height:t=40,fill:r="none",...n})=>(0,w.jsxs)("svg",{width:e,height:t,viewBox:"0 0 41 40",fill:r,xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,w.jsx)("rect",{x:.612305,width:40,height:40,rx:6.66667,fill:"#4615C8"}),(0,w.jsx)("path",{d:"M37.0882 19.872C37.026 19.499 36.6738 19.2158 36.2594 19.2158H15.5456C15.3453 19.2158 15.2693 19.057 15.2555 19.0086C15.2416 18.9603 15.1933 18.7945 15.3522 18.6633L26.196 9.85697C26.5137 9.60142 26.6173 9.15937 26.4239 8.82784C26.3065 8.62063 26.1131 8.4825 25.8783 8.44105C25.6504 8.39961 25.4155 8.45487 25.2359 8.60682L14.4405 17.3786C14.2816 17.5098 14.1227 17.4269 14.0813 17.3993C14.0398 17.3717 13.8948 17.2681 13.9431 17.0678L15.29 11.2453C15.3798 10.8447 15.1864 10.4372 14.841 10.2921C14.62 10.2023 14.3852 10.2092 14.1711 10.3197C13.9708 10.4233 13.8188 10.6167 13.7705 10.8447L12.2164 17.572C12.175 17.7516 12.023 17.793 11.9816 17.8068C11.9401 17.8206 11.7813 17.8345 11.6708 17.6894L9.43294 14.7747C9.18429 14.4501 8.74224 14.3396 8.41071 14.5191C8.20351 14.6296 8.05846 14.823 8.01011 15.051C7.96176 15.2789 8.01011 15.5137 8.15516 15.6933L10.4828 18.7254C10.5588 18.8221 10.5657 18.9465 10.5173 19.0501C10.4621 19.1606 10.3585 19.2227 10.241 19.2227H4.12843C3.71401 19.2227 3.36176 19.5059 3.2996 19.8789C3.25816 20.1137 3.32032 20.3417 3.47918 20.5212C3.63113 20.7008 3.84525 20.7975 4.08008 20.7975H9.37768C9.57798 20.7975 9.65395 20.9564 9.66777 21.0047C9.68158 21.0531 9.72994 21.2188 9.57108 21.3501L6.1038 24.1681C5.79299 24.4167 5.69629 24.8519 5.86897 25.1696C5.97948 25.3768 6.17978 25.5218 6.42152 25.5702C6.65635 25.6185 6.89119 25.5633 7.06386 25.4182L10.4828 22.6348C10.6416 22.5035 10.8005 22.5864 10.8419 22.614C10.8834 22.6417 11.0284 22.7453 10.9801 22.9456L9.63323 28.775C9.54344 29.1549 9.71612 29.5417 10.0338 29.7005C10.248 29.8041 10.5035 29.811 10.7245 29.7005C10.9455 29.5969 11.1044 29.4035 11.1597 29.1756L12.7137 22.4483C12.7552 22.2687 12.9071 22.2272 12.9486 22.2134C12.9969 22.2065 13.1489 22.1858 13.2594 22.3309L20.1387 31.2753C20.2699 31.4549 20.484 31.5585 20.7119 31.5723C20.7257 31.5723 20.7465 31.5723 20.7603 31.5723C20.9813 31.5723 21.1885 31.4825 21.3335 31.3306C21.596 31.0543 21.6029 30.6053 21.3543 30.2807L14.4405 21.2948C14.3645 21.1981 14.3576 21.0738 14.4059 20.9702C14.4612 20.8597 14.5648 20.7975 14.6822 20.7975H36.3146C36.5495 20.7975 36.7636 20.6939 36.9155 20.5212C37.0675 20.3417 37.1297 20.1137 37.0951 19.8789L37.0882 19.872Z",fill:"white"})]}),AH=({fromToken:e,toToken:t,fromAmountFormatted:r,toAmountFormatted:n,allTxHashes:i,transaction:a,fillTime:o,seconds:s,timeEstimate:A,details:l,isLoadingTransaction:c,onOpenChange:d,requestId:u,isGasSponsored:h,currentCheckStatus:p})=>{let m,f,g,y,b=(0,U.useRelayClient)(),x=l?.operation==="wrap",v=l?.operation==="unwrap",B=(0,C.useContext)(z.ProviderOptionsContext),S=b?.chains,I=a?.data?.metadata?.currencyIn?.amount?(0,j.formatSignificantDigits)(a?.data?.metadata?.currencyIn?.amount,a?.data?.metadata?.currencyIn?.currency?.decimals??18):r,Q=a?.data?.metadata?.currencyIn?.currency??e,L=a?.data?.metadata?.currencyIn?.currency?.metadata?.logoURI??e?.logoURI,P=a?.data?.metadata?.currencyOut?.amount?(0,j.formatSignificantDigits)(a?.data?.metadata?.currencyOut?.amount,a?.data?.metadata?.currencyOut?.currency?.decimals??18):n,D=a?.data?.metadata?.currencyOut?.currency??t,R=a?.data?.metadata?.currencyOut?.currency?.metadata?.logoURI??t?.logoURI,M=b?.baseApiUrl.includes("testnets")?"https://testnets.relay.link":"https://relay.link",O=Q?b?.chains.find(e=>e.id===Q?.chainId):null,N=D?b?.chains.find(e=>e.id===D?.chainId):null,H=O?.id===N?.id&&!x&&!v,V=u?`${M}/transaction/${u}
47`:null,K=(l?.timeEstimate??0)*1e3,G=O?.id===8253038,W=N?.id===8253038,$=a?.status==="refund"||a?.data?.refundCurrencyData,q=G||W?10:Math.round(K/1e3/60),X=a?.data?.metadata?.currencyGasTopup?.currency,Y=a?.data?.metadata?.currencyGasTopup?.amount?(0,j.formatSignificantDigits)(BigInt(a?.data?.metadata?.currencyGasTopup?.amount),X?.decimals??18):void 0,J=(e,t=!1)=>{if($&&!t){let t=a?.data?.outTxs?.[0]?.hash;if(a?.data?.outTxs?.[0]?.chainId===e&&t)return t;if(a?.data?.refundCurrencyData&&!t)return}return i.find(t=>t.chainId===e)?.txHash};return B.themeScheme,G||W&&("submitted"===p||"success"===p)?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{direction:"column",align:"center",justify:"between",children:[(0,w.jsx)(sW.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,w.jsxs)(k.Flex,{align:"center",justify:"center",css:{height:80,width:78,position:"relative",backgroundColor:"amber2",borderRadius:"999999px"},children:[(0,w.jsxs)("svg",{style:{position:"absolute",top:7,left:0,zIndex:0},width:"76",height:"80",viewBox:"0 0 64 54",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,w.jsx)("mask",{id:"path-1-inside-1_1551_3458",fill:"white",children:(0,w.jsx)("path",{d:"M60.5983 22C62.477 22 64.0187 23.5272 63.8194 25.3953C63.3839 29.4763 62.1661 33.4465 60.2215 37.0847C57.7408 41.7257 54.1538 45.6834 49.7782 48.607C45.4027 51.5307 40.3736 53.3301 35.1366 53.8459C29.8995 54.3617 24.616 53.578 19.7541 51.5641C14.8923 49.5503 10.6021 46.3685 7.26367 42.3006C3.92522 38.2327 1.64152 33.4042 0.614871 28.2429C-0.411778 23.0816 -0.149694 17.7467 1.37791 12.7109C2.57543 8.7632 4.52167 5.09478 7.09947 1.90114C8.27945 0.439263 10.4495 0.449489 11.7779 1.77792C13.1063 3.10635 13.0848 5.24829 11.9473 6.74343C10.1382 9.12126 8.76082 11.8094 7.88827 14.6858C6.68544 18.651 6.47907 22.8516 7.28745 26.9156C8.09583 30.9796 9.89401 34.7816 12.5227 37.9846C15.1514 41.1877 18.5294 43.693 22.3576 45.2787C26.1859 46.8644 30.346 47.4815 34.4697 47.0754C38.5934 46.6692 42.5532 45.2524 45.9985 42.9503C49.4438 40.6482 52.2682 37.532 54.2215 33.8776C55.6384 31.2267 56.5653 28.352 56.9674 25.3914C57.2203 23.5298 58.7197 22 60.5983 22Z"})}),(0,w.jsx)("path",{d:"M60.5983 22C62.477 22 64.0187 23.5272 63.8194 25.3953C63.3839 29.4763 62.1661 33.4465 60.2215 37.0847C57.7408 41.7257 54.1538 45.6834 49.7782 48.607C45.4027 51.5307 40.3736 53.3301 35.1366 53.8459C29.8995 54.3617 24.616 53.578 19.7541 51.5641C14.8923 49.5503 10.6021 46.3685 7.26367 42.3006C3.92522 38.2327 1.64152 33.4042 0.614871 28.2429C-0.411778 23.0816 -0.149694 17.7467 1.37791 12.7109C2.57543 8.7632 4.52167 5.09478 7.09947 1.90114C8.27945 0.439263 10.4495 0.449489 11.7779 1.77792C13.1063 3.10635 13.0848 5.24829 11.9473 6.74343C10.1382 9.12126 8.76082 11.8094 7.88827 14.6858C6.68544 18.651 6.47907 22.8516 7.28745 26.9156C8.09583 30.9796 9.89401 34.7816 12.5227 37.9846C15.1514 41.1877 18.5294 43.693 22.3576 45.2787C26.1859 46.8644 30.346 47.4815 34.4697 47.0754C38.5934 46.6692 42.5532 45.2524 45.9985 42.9503C49.4438 40.6482 52.2682 37.532 54.2215 33.8776C55.6384 31.2267 56.5653 28.352 56.9674 25.3914C57.2203 23.5298 58.7197 22 60.5983 22Z",stroke:"#FFB224",strokeWidth:"8",strokeLinejoin:"round",mask:"url(#path-1-inside-1_1551_3458)"})]}),(0,w.jsx)(T.Box,{css:{color:"amber9",mr:"$2",zIndex:1},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AO.faClockFour,style:{height:32}})})]})}),(0,w.jsx)(F.Text,{style:"subtitle1",css:{my:"4",textAlign:"center"},children:G||W?`Bitcoin confirmation takes ${q} minutes. Track progress on the transaction page.`:`Processing bridge, this will take ~${q} ${1===q?"min":"mins"}.`}),(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"2",mb:24},children:[O?(0,w.jsxs)(tv,{color:"gray",css:{alignItems:"center",py:"2",px:"3"},children:[(0,w.jsx)(AU,{chainId:O.id,tokenlogoURI:L,tokenSymbol:Q?.symbol,size:"sm",chainRadius:2.5}),(0,w.jsxs)(F.Text,{style:"subtitle1",css:{ml:"2"},children:[I," ",Q?.symbol]})]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"}),(0,w.jsx)(k.Flex,{css:{alignItems:"center",justifyContent:"center",p:"2"},children:(0,w.jsx)(_.FontAwesomeIcon,{style:{width:14},icon:AA.faArrowRight})}),N?(0,w.jsxs)(tv,{color:"gray",css:{alignItems:"center",py:"2",px:"3"},children:[(0,w.jsx)(AU,{chainId:N.id,tokenlogoURI:R,tokenSymbol:D?.symbol,size:"sm",chainRadius:2.5}),(0,w.jsxs)(F.Text,{style:"subtitle1",css:{ml:"2"},children:[P," ",D?.symbol]})]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"})]}),(0,w.jsx)(F.Text,{css:{background:"gray2",p:"4",borderRadius:12,textAlign:"center"},style:"body2",children:"You can close this modal while it finalizes on the blockchain. The transaction will continue in the background."}),(()=>{if($){let e=a?.data?.outTxs?.[0]?.hash,t=a?.data?.outTxs?.[0]?.chainId;if(e&&t){let r=Aw(t,S,e),n=eT(e,"...",6,4);return r&&n?(0,w.jsxs)(Ad,{href:r,target:"_blank",css:{mt:"12px",textAlign:"center",fontSize:"14px"},children:["View Refund Tx: ",n]}):null}return c?(0,w.jsx)(F.Text,{style:"body3",color:"subtle",css:{mt:"12px",textAlign:"center"},children:"Fetching refund transaction..."}):null}if(i&&i.length>0){let e=i[0]?.txHash,t=i[0]?.chainId,r=e&&t?Aw(t,S,e):void 0,n=eT(e,"...",6,4);return r&&n?(0,w.jsxs)(Ad,{href:r,target:"_blank",css:{mt:"12px",textAlign:"center",fontSize:"14px"},children:["View Tx: ",n]}):null}return null})()]}),V?null:(0,w.jsx)(k.Flex,{direction:"column",css:{p:"3","--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",gap:"3",width:"100%",borderRadius:12},children:(0,w.jsx)(AC,{allTxHashes:i,fromChain:O,toChain:N,fillTx:null})}),(0,w.jsxs)(k.Flex,{css:{width:"100%",mt:8,gap:"3"},children:[(0,w.jsx)(E.Button,{cta:!0,color:"secondary",onClick:()=>{d(!1)},css:{justifyContent:"center",width:"100%"},children:"Done"}),V?(0,w.jsx)("a",{href:V,style:{width:"100%"},target:"_blank",children:(0,w.jsx)(E.Button,{cta:!0,color:"primary",css:{justifyContent:"center",width:"max-content"},children:"Track Progress"})}):null]})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{direction:"column",align:"center",justify:"between",children:[(0,w.jsx)(sW.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,w.jsxs)(k.Flex,{align:"center",children:[(0,w.jsx)(AN,{}),(0,w.jsx)(k.Flex,{align:"center",justify:"center",css:{width:40,height:40,backgroundColor:"green9",color:"white",borderRadius:"100px","--borderColor":"white",border:"2px s
47olid var(--borderColor)",ml:"-8px"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCheck,style:{height:20,color:"white"}})})]})}),(0,w.jsx)(F.Text,{style:"h6",css:{my:"12px",textAlign:"center","& .green-time":{color:"green11"}},children:o&&"-"!==o?(0,w.jsxs)(w.Fragment,{children:["Completed in ",(0,w.jsx)("span",{className:"green-time",children:o})]}):"Transaction Completed"}),(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"3",padding:"3","--borderColor":"colors.slate.5",border:"1px solid var(--borderColor)",borderRadius:12,width:"100%"},children:[Q?(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"4px"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Sent"}),(0,w.jsxs)(k.Flex,{justify:"between",children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px"},children:[(0,w.jsx)(AU,{size:"sm",chainId:Q.chainId,tokenlogoURI:L,tokenSymbol:Q.symbol,chainRadius:2.5}),c?(0,w.jsx)(Av.Skeleton,{css:{height:24,width:60,background:"gray5"}}):(0,w.jsxs)(F.Text,{style:"h6",children:[I," ",Q.symbol]})]}),!H&&Q?.chainId&&(f=(m=J(Q.chainId,!0))?Aw(Q.chainId,S,m):void 0,m?(0,w.jsx)(Ad,{href:f,target:"_blank",css:{color:"primary11",fontSize:"14px"},children:eT(m,"...",6,4)}):null)]})]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"}),D?(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"4px"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Received"}),(0,w.jsxs)(k.Flex,{justify:"between",children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px"},children:[(0,w.jsx)(AU,{size:"sm",chainId:D.chainId,tokenlogoURI:R,tokenSymbol:D.symbol,chainRadius:2.5}),c?(0,w.jsx)(Av.Skeleton,{css:{height:24,width:60,background:"gray5"}}):(0,w.jsxs)(F.Text,{style:"h6",children:[P," ",D.symbol]})]}),D?.chainId&&(y=(g=J(D.chainId))?Aw(D.chainId,S,g):void 0,g?(0,w.jsx)(Ad,{href:y,target:"_blank",css:{color:"primary11",fontSize:"14px"},children:eT(g,"...",6,4)}):null)]}),Y&&X?(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px",mt:"4px"},children:[(0,w.jsx)(AU,{size:"sm",chainId:X.chainId,tokenlogoURI:`${eB.ASSETS_RELAY_API}/icons/currencies/${X?.symbol?.toLowerCase()??X?.chainId}.png`,tokenSymbol:X.symbol,chainRadius:2.5}),(0,w.jsxs)(F.Text,{style:"h6",children:[Y," ",X.symbol]})]}):null]}):(0,w.jsx)(F.Text,{style:"subtitle1",children:"?"})]})]}),(0,w.jsxs)(k.Flex,{css:{width:"100%",gap:"3"},children:[u?(0,w.jsx)("a",{href:`${M}/transaction/${u}`,style:{width:"100%"},target:"_blank",onClick:e=>{e.stopPropagation()},children:(0,w.jsx)(E.Button,{color:"secondary",cta:!0,css:{justifyContent:"center",width:"max-content"},children:"View Details"})}):null,(0,w.jsx)(E.Button,{cta:!0,onClick:()=>{d(!1)},css:{justifyContent:"center",width:"100%"},children:"Done"})]})]})},AV=e=>{let{quote:t,steps:r,swapError:n,setSwapError:i,open:a,address:o,fromToken:s,toToken:A,slippageTolerance:l,wallet:c,onOpenChange:d,onAnalyticEvent:u,onSuccess:h,onSwapValidating:p}=e;return(0,C.useEffect)(()=>{d(a)},[a]),(0,w.jsx)(Ag,{open:a,fromToken:s,toToken:A,quote:t,steps:r,swapError:n,setSwapError:i,slippageTolerance:l,address:o,wallet:c,onValidating:e=>{let t=e?.steps,r=e?.details,n=e?.fees;p?.({steps:t,fees:n,details:r})},onSuccess:(e,t)=>{let r=e?.details,n=e?.fees,i={amount_in:parseFloat(`${r?.currencyIn?.amountFormatted}`),amount_in_raw:r?.currencyIn?.amount,amount_out:parseFloat(`${r?.currencyOut?.amountFormatted}`),amount_out_raw:r?.currencyOut?.amount};n?.gas?.amountFormatted&&(i.gas_fee=parseFloat(n.gas.amountFormatted)),n?.relayer?.amountFormatted&&(i.relayer_fee=parseFloat(n.relayer.amountFormatted));let a=t?ts(t):void 0;u?.(N.EventNames.SWAP_SUCCESS,{...i,chain_id_in:s?.chainId,currency_in:s?.symbol,currency_in_address:r?.currencyIn?.currency?.address,currency_in_decimals:s?.decimals,currency_in_usd:r?.currencyIn?.amountUsd,chain_id_out:A?.chainId,currency_out:A?.symbol,currency_out_address:r?.currencyOut?.currency?.address,currency_out_decimals:A?.decimals,currency_out_usd:r?.currencyOut?.amountUsd,quote_id:a,txHashes:t?.map(e=>{let t=[];return e.items?.forEach(e=>{e.txHashes&&(t=t.concat([...e.txHashes??[],...e.internalTxHashes??[]]))}),t}).flat(),steps:t,subsidized:n?.subsidized!==void 0&&"0"!==n.subsidized.amount}),h?.({steps:t,fees:n,details:r})},children:t=>(0,w.jsx)(AK,{address:o,onAnalyticEvent:u,...e,...t})})},AK=({open:e,onOpenChange:t,fromToken:r,toToken:n,quote:i,address:a,swapError:o,setSwapError:s,progressStep:A,setProgressStep:l,steps:c,setSteps:d,currentStep:u,setCurrentStep:h,setCurrentStepItem:p,allTxHashes:m,setAllTxHashes:f,transaction:g,fillTime:b,seconds:x,onAnalyticEvent:v,timeEstimate:B,fromChain:S,toChain:E,isLoadingTransaction:T,setQuote:U,requestId:I,isGasSponsored:Q,linkedWallets:L,currentCheckStatus:_})=>{(0,C.useEffect)(()=>{e?(l(y.Confirmation),v?.(N.EventNames.SWAP_MODAL_OPEN)):(u&&v?.(N.EventNames.SWAP_MODAL_CLOSED),h(null),p(null),f([]),s(null),d(null),U(null))},[e]);let P=i?.details,D=P?.currencyIn?.amount?(0,j.formatBN)(P?.currencyIn?.amount,6,r?.decimals,!1):"",R=P?.currencyOut?.amount?(0,j.formatBN)(P?.currencyOut.amount,6,n?.decimals,!1):"";return(0,w.jsx)(Ai,{trigger:null,open:e,onOpenChange:t,css:{overflow:"hidden",p:"4",maxWidth:"412px !important","@media(max-width: 520px)":{maxWidth:"unset !important"}},showCloseButton:!0,onPointerDownOutside:e=>{let t=Array.from(document.querySelectorAll("#dynamic-send-transaction"));t.some(t=>!!e.target&&t.contains(e.target))&&t.length>0&&e.preventDefault()},children:(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:"3"},children:[(0,w.jsx)(F.Text,{style:"h6",css:{mb:8},children:"Transaction Details"}),A===y.Confirmation||A===y.Submitted?(0,w.jsx)(AR,{fromToken:r,toToken:n,fromChain:S,toChain:E,fromAmountFormatted:D,toAmountFormatted:R,quote:i,steps:c,currentAddress:a,linkedWallets:L}):null,A===y.Success?(0,w.jsx)(AH,{fromToken:r,toToken:n,fromAmountFormatted:D,toAmountFormatted:R,allTxHashes:m,transaction:g,fillTime:b??"",seconds:x??0,onOpenChange:t,timeEstimate:B?.formattedTime,details:P,isLoadingTransaction:T,requestId:I,isGasSponsored:Q,currentCheckStatus:_}):null,A===y.Error?(0,w.jsx)(AI,{error:o,allTxHashes:m,address:a,onOpenChange:t,transaction:g,fromChain:S,toChain:E,fromToken:r,toToken:n,fromAmountFormatted:D,toAmountFormatted:R}):null]})})};var Af=Af;(h=b||(b={}))[h.WaitingForDeposit=0]="WaitingForDeposit",h[h.Validating=1]="Validating",h[h.Success=2]="Success",h[h.Error=3]="Error";let AG=({open:e,address:t,fromChain:r,fromToken:n,toToken:i,debouncedInputAmountValue:a,debouncedOutputAmountValue:o,recipient:s,invalidateBalanceQuer
47ies:A,children:l,onSuccess:c,onAnalyticEvent:d,onSwapError:u})=>{var h,p,m,f,g;let y,x,[v,B]=(0,C.useState)(null),[S,k]=(0,C.useState)(!1),[E,F]=(0,C.useState)(null),[T,I]=(0,C.useState)(b.WaitingForDeposit),[Q,j]=(0,C.useState)(null),L=(0,U.useRelayClient)(),_=(0,C.useContext)(z.ProviderOptionsContext),{connector:P}=(0,eg.useAccount)(),D=(0,Z.getDeadAddress)(r?.vmType,r?.id),R=S?void 0:v,M=(0,C.useMemo)(()=>Am(R?.steps),[R]),O=(0,C.useMemo)(()=>{var e;let t;return e=R?.steps,t=e?.find(e=>"deposit"===e.id),t?.depositAddress},[R]);(0,C.useEffect)(()=>{if(e){I(b.WaitingForDeposit),d?.(N.EventNames.DEPOSIT_ADDRESS_MODAL_OPEN);let t=n&&i?{user:D,originChainId:n.chainId,destinationChainId:i.chainId,originCurrency:n.address,destinationCurrency:i.address,recipient:s,tradeType:"EXACT_INPUT",appFees:_.appFees,amount:(0,eA.parseUnits)(a,n.decimals).toString(),referrer:L?.source??void 0,useDepositAddress:!0}:void 0,r=eG(),o=ta({...t,interval:r});d?.(N.EventNames.QUOTE_REQUESTED,{parameters:t,quote_request_id:o,chain_id_in:t?.originChainId,chain_id_out:t?.destinationChainId}),th(L?.baseApiUrl,t,{headers:{"relay-sdk-version":L?.version??"unknown","relay-kit-ui-version":L?.uiVersion??"unknown"}}).then(r=>{if(k(!1),!e)return;B(r);let n=eG(),i=ta({...t,interval:n});d?.(N.EventNames.QUOTE_RECEIVED,{parameters:t,wallet_connector:P?.name,quote_id:r.steps?ts(r.steps):void 0,quote_request_id:i,amount_in:r.details?.currencyIn?.amountFormatted,amount_in_raw:r.details?.currencyIn?.amount,currency_in:r.details?.currencyIn?.currency?.symbol,chain_id_in:r.details?.currencyIn?.currency?.chainId,amount_out:r.details?.currencyOut?.amountFormatted,amount_out_raw:r.details?.currencyOut?.amount,currency_out:r.details?.currencyOut?.currency?.symbol,chain_id_out:r.details?.currencyOut?.currency?.chainId,slippage_tolerance_destination_percentage:r.details?.slippageTolerance?.destination?.percent,slippage_tolerance_origin_percentage:r.details?.slippageTolerance?.origin?.percent,steps:r.steps})}).catch(r=>{if(k(!1),!e)return;let n=tm(r?.response?.data?.message?Error(r?.response?.data?.message):r),i=eG(),a=ta({...t,interval:i});d?.(N.EventNames.QUOTE_ERROR,{wallet_connector:P?.name,error_message:n,parameters:t,quote_request_id:a}),F(r)})}else R&&d?.(N.EventNames.DEPOSIT_ADDRESS_MODAL_CLOSED),j(null),B(null),k(!1),F(null)},[e]);let{data:H}=(h=L||void 0,p={requestId:M??void 0,referrer:L?.source},m=void 0,f=void 0,g={enabled:null!==M&&e,refetchInterval:e=>!e.state.data?.status||M&&["waiting","pending"].includes(e.state.data?.status)?1e3:0},y=["useExecutionStatus",p],x=(0,$.useQuery)({queryKey:y,queryFn:()=>{m?.();let e=function(e=eB.MAINNET_RELAY_API,t){return new Promise((r,n)=>{let i=new URL(`${e}/intents/status/v2`),a={...t};(0,eS.setParams)(i,a),(0,ek.default)(i.href,void 0).then(e=>{let t={url:i.href,method:"get"};r({...e,request:t})}).catch(e=>{n(e)})})}(h?.baseApiUrl,p);return e.then(e=>{f?.(e)}),e},enabled:void 0!==h&&void 0!==p,retry:!1,...g}),(0,C.useMemo)(()=>({...x,data:x.error?void 0:x.data,queryKey:y}),[x.data,x.error,x.isLoading,x.isFetching,x.isRefetching,x.dataUpdatedAt,y]));(0,C.useEffect)(()=>{if(H?.status==="failure"||H?.status==="refund"||E){let e=Error(H?.details??"Oops! Something went wrong while processing your transaction.");T!==b.Error&&u?.(e.message,R),I(b.Error),d?.(N.EventNames.DEPOSIT_ADDRESS_SWAP_ERROR,{error_message:tm(H?.details??E),wallet_connector:P?.name,quote_id:M,amount_in:parseFloat(`${a}`),currency_in:n?.symbol,chain_id_in:n?.chainId,amount_out:parseFloat(`${o}`),currency_out:i?.symbol,chain_id_out:i?.chainId,txHashes:H?.txHashes??[]}),j(e),A()}else H?.status==="success"?(T!==b.Success&&c?.(R,H),I(b.Success),A()):H?.status==="pending"&&(((R?.details?.timeEstimate??0)+(r&&8253038===r.id?600:0))*1e3>(L?.maxPollingAttemptsBeforeTimeout??30)*(L?.pollingInterval??5e3)?I(b.Success):I(b.Validating))},[H?.status,E]);let V=(0,C.useMemo)(()=>{H?.status;let e=[];return H?.txHashes?.forEach(t=>{e.push({txHash:t,chainId:i?.chainId})}),H?.inTxHashes?.forEach(t=>{e.push({txHash:t,chainId:n?.chainId})}),e},[H?.txHashes,H?.inTxHashes]),{data:K,isLoading:G}=(0,Af.default)((T===b.Success||T===b.Error)&&V[0]?{user:t,hash:V[0]?.txHash}:void 0,L?.baseApiUrl,{enabled:(T===b.Success||T===b.Error)&&!!V[0],refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchInterval:!1,retryOnMount:!1}),W=K[0],{fillTime:q,seconds:X}=Ap(W),Y=tA(R?.details),J=i?.chainId?L?.chains.find(e=>e.id===i?.chainId):null;return(0,w.jsx)(w.Fragment,{children:l({progressStep:T,setProgressStep:I,quote:R,isFetchingQuote:S,quoteError:E,swapError:Q,setSwapError:j,allTxHashes:V,transaction:W,fillTime:q,seconds:X,requestId:M,depositAddress:O,executionStatus:H,isLoadingTransaction:G,toChain:J,timeEstimate:Y})})};var AW=e.i(281752);let Az=({text:e})=>{let[t,r]=(0,em.useCopyToClipboard)(),[n,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(!1),s=()=>{r(e),i(!0),setTimeout(()=>i(!1),1e3)};return(0,w.jsx)(AW.default,{align:"center",side:"top",open:a,content:(0,w.jsx)(F.Text,{style:"body2",children:n?"Copied!":"Copy"}),children:(0,w.jsx)(E.Button,{color:"ghost",size:"none",onClick:e=>{e.preventDefault(),s()},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onTouchStart:()=>{s(),o(!0),setTimeout(()=>
vendor: 13,075 bytes, line 47
47o(!1),1e3)},css:{color:"gray9",_hover:{color:"gray11"}},children:(0,w.jsx)(s0,{initial:!1,mode:"wait",children:(0,w.jsx)(sW.span,{transition:{type:"spring",duration:.15,bounce:0},initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:n?(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCheck,width:16,height:16}):(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faCopy,width:16,height:16})},n?"Copied":"Copy")})})})};var A$=Object.defineProperty,Aq=Object.getOwnPropertySymbols,AX=Object.prototype.hasOwnProperty,AY=Object.prototype.propertyIsEnumerable,AJ=(e,t,r)=>t in e?A$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AZ=(e,t)=>{for(var r in t||(t={}))AX.call(t,r)&&AJ(e,r,t[r]);if(Aq)for(var r of Aq(t))AY.call(t,r)&&AJ(e,r,t[r]);return e},A0=(e,t)=>{var r={};for(var n in e)AX.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&Aq)for(var n of Aq(e))0>t.indexOf(n)&&AY.call(e,n)&&(r[n]=e[n]);return r};(e=>{let t=class t{constructor(e,r,n,a){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(a<-1||a>7)throw RangeError("Mask value out of range");this.size=4*e+17;let o=[];for(let e=0;e<this.size;e++)o.push(!1);for(let e=0;e<this.size;e++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),-1==a){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(a=t,e=r),this.applyMask(t)}}i(0<=a&&a<=7),this.mask=a,this.applyMask(a),this.drawFormatBits(a),this.isFunction=[]}static encodeText(r,n){let i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){let i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,n,a=1,s=40,A=-1,l=!0){let c,d;if(!(t.MIN_VERSION<=a&&a<=s&&s<=t.MAX_VERSION)||A<-1||A>7)throw RangeError("Invalid value");for(c=a;;c++){let r=8*t.getNumDataCodewords(c,n),i=o.getTotalBits(e,c);if(i<=r){d=i;break}if(c>=s)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(c,e)&&(n=e);let u=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,u),r(t.numChars,t.mode.numCharCountBits(c),u),t.getData()))u.push(e);i(u.length==d);let h=8*t.getNumDataCodewords(c,n);i(u.length<=h),r(0,Math.min(4,h-u.length),u),r(0,(8-u.length%8)%8,u),i(u.length%8==0);for(let e=236;u.length<h;e^=253)r(e,8,u);let p=[];for(;8*p.length<u.length;)p.push(0);return u.forEach((e,t)=>p[t>>>3]|=e<<7-(7&t)),new t(c,n,p,A)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)(0!=r||0!=n)&&(0!=r||n!=t-1)&&(r!=t-1||0!=n)&&this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,r=t;for(let e=0;e<10;e++)r=r<<1^(r>>>9)*1335;let a=(t<<10|r)^21522;i(a>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(a,e));this.setFunctionModule(8,7,n(a,6)),this.setFunctionModule(8,8,n(a,7)),this.setFunctionModule(7,8,n(a,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(a,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(a,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(a,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let r=n(t,e),i=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(i,a,r),this.setFunctionModule(a,i,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),a=e+n,o=t+r;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){let r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw RangeError("Invalid argument");let a=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],o=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(t.getNumRawDataModules(r)/8),A=a-s%a,l=Math.floor(s/a),c=[],d=t.reedSolomonComputeDivisor(o);for(let r=0,n=0;r<a;r++){let i=e.slice(n,n+l-o+(r<A?0:1));n+=i.length;let a=t.reedSolomonComputeRemainder(i,d);r<A&&i.push(0),c.push(i.concat(a))}let u=[];for(let e=0;e<c[0].length;e++)c.forEach((t,r)=>{(e!=l-o||r>=A)&&u.push(t[e])});return i(u.length==s),u}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i<this.size;i++)for(let a=0;a<2;a++){let o=t-a,s=(t+1&2)==0?this.size-1-i:i;!this.isFunction[s][o]&&r<8*e.length&&(this.modules[s][o]=n(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[r][o]==n?5==++i?e+=t.PENALTY_N1:i>5&&e++:(this.finderPenaltyAddHistory(i,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[r][o],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,a)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][r]==n?5==++i?e+=t.PENALTY_N1:i>5&&e++:(this.finderPenaltyAddHistory(i,a),n||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),n=this.modules[o][r],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,a)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){let i=this.modules[r][n];i==this.modules[r][n+1]&&i==this.modules[r+1][n]&&i==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(let e of this.modules)r=e.reduce((e,t)=>e+ +!!t,r);let n=this.size*this.size,a=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=a&&a<=9),i(0<=(e+=a*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let i=0;i<e;i++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map(e=>0);for(let i of e){let e=i^n.shift();n.push(0),r.forEach((r,i)=>n[i]^=t.reedSolomonMultiply(r,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285^(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];i(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let a=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(let e of t)r(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){let i=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+i),10),3*i+1,n),e+=i}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){let n;if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let i=[];for(n=0;n+2<=t.length;n+=2){let a=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));r(a+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),11,i)}return n<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,i),new e(e.Mode.ALPHANUMERIC,t.length,i)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else if(t<1e6)r(6,3,n),r(t,21,n);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(let n of e){let e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let o=a;e.QrSegment=a})(x||(x={})),m=(p=x||(x={})).QrCode||(p.QrCode={}),(a=class{constructor(e,t){this.ordinal=e,this.formatBits=t}}).LOW=new a(0,1),a.MEDIUM=new a(1,0),a.QUARTILE=new a(2,3),a.HIGH=new a(3,2),m.Ecc=a,g=(f=x||(x={})).QrSegment||(f.QrSegment={}),(o=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}}).NUMERIC=new o(1,[10,12,14]),o.ALPHANUMERIC=new o(2,[9,11,13]),o.BYTE=new o(4,[8,16,16]),o.KANJI=new o(8,[8,10,12]),o.ECI=new o(7,[0,0,0]),g.Mode=o;var A1=x,A2={L:A1.QrCode.Ecc.LOW,M:A1.QrCode.Ecc.MEDIUM,Q:A1.QrCode.Ecc.QUARTILE,H:A1.QrCode.Ecc.HIGH},A4="#FFFFFF",A3="#000000";function A5(e,t=0){let r=[];return e.forEach(function(e,n){let i=null;e.forEach(function(a,o){if(!a&&null!==i){r.push(`M${i+t} ${n+t}h${o-i}v1H${i+t}z`),i=null;return}if(o===e.length-1){if(!a)return;null===i?r.push(`M${o+t},${n+t} h1v1H${o+t}z`):r.push(`M${i+t},${n+t} h${o+1-i}v1H${i+t}z`);return}a&&null===i&&(i=o)})}),r.join("")}function A6(e,t){return e.slice().map((e,r)=>r<t.y||r>=t.y+t.h?e:e.map((e,r)=>(r<t.x||r>=t.x+t.w)&&e))}function A8({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:a,size:o,boostLevel:s}){let A=C.default.useMemo(()=>{let n=(Array.isArray(e)?e:[e]).reduce((e,t)=>
47(e.push(...A1.QrSegment.makeSegments(t)),e),[]);return A1.QrCode.encodeSegments(n,A2[t],r,void 0,void 0,s)},[e,t,r,s]),{cells:l,margin:c,numCells:d,calculatedImageSettings:u}=C.default.useMemo(()=>{let e=A.getModules(),t=null!=i?Math.max(Math.floor(i),0):4*!!n,r=e.length+2*t,s=function(e,t,r,n){if(null==n)return null;let i=e.length+2*r,a=Math.floor(.1*t),o=i/t,s=(n.width||a)*o,A=(n.height||a)*o,l=null==n.x?e.length/2-s/2:n.x*o,c=null==n.y?e.length/2-A/2:n.y*o,d=null==n.opacity?1:n.opacity,u=null;if(n.excavate){let e=Math.floor(l),t=Math.floor(c),r=Math.ceil(s+l-e),n=Math.ceil(A+c-t);u={x:e,y:t,w:r,h:n}}return{x:l,y:c,h:A,w:s,excavation:u,opacity:d,crossOrigin:n.crossOrigin}}(e,o,t,a);return{cells:e,margin:t,numCells:r,calculatedImageSettings:s}},[A,o,a,n,i]);return{qrcode:A,margin:c,cells:l,numCells:d,calculatedImageSettings:u}}var A7=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}(),A9=C.default.forwardRef(function(e,t){let{value:r,size:n=128,level:i="L",bgColor:a=A4,fgColor:o=A3,includeMargin:s=!1,minVersion:A=1,boostLevel:l,marginSize:c,imageSettings:d}=e,u=A0(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:h}=u,p=A0(u,["style"]),m=null==d?void 0:d.src,f=C.default.useRef(null),g=C.default.useRef(null),y=C.default.useCallback(e=>{f.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[b,x]=C.default.useState(!1),{margin:w,cells:v,numCells:B,calculatedImageSettings:S}=A8({value:r,level:i,minVersion:A,boostLevel:l,includeMargin:s,marginSize:c,imageSettings:d,size:n});C.default.useEffect(()=>{if(null!=f.current){let e=f.current,t=e.getContext("2d");if(!t)return;let r=v,i=g.current,s=null!=S&&null!==i&&i.complete&&0!==i.naturalHeight&&0!==i.naturalWidth;s&&null!=S.excavation&&(r=A6(v,S.excavation));let A=window.devicePixelRatio||1;e.height=e.width=n*A;let l=n/B*A;t.scale(l,l),t.fillStyle=a,t.fillRect(0,0,B,B),t.fillStyle=o,A7?t.fill(new Path2D(A5(r,w))):v.forEach(function(e,r){e.forEach(function(e,n){e&&t.fillRect(n+w,r+w,1,1)})}),S&&(t.globalAlpha=S.opacity),s&&t.drawImage(i,S.x+w,S.y+w,S.w,S.h)}}),C.default.useEffect(()=>{x(!1)},[m]);let k=AZ({height:n,width:n},h),E=null;return null!=m&&(E=C.default.createElement("img",{src:m,key:m,style:{display:"none"},onLoad:()=>{x(!0)},ref:g,crossOrigin:null==S?void 0:S.crossOrigin})),C.default.createElement(C.default.Fragment,null,C.default.createElement("canvas",AZ({style:k,height:n,width:n,ref:y,role:"img"},p)),E)});A9.displayName="QRCodeCanvas",C.default.forwardRef(function(e,t){let{value:r,size:n=128,level:i="L",bgColor:a=A4,fgColor:o=A3,includeMargin:s=!1,minVersion:A=1,boostLevel:l,title:c,marginSize:d,imageSettings:u}=e,h=A0(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:p,cells:m,numCells:f,calculatedImageSettings:g}=A8({value:r,level:i,minVersion:A,boostLevel:l,includeMargin:s,marginSize:d,imageSettings:u,size:n}),y=m,b=null;null!=u&&null!=g&&(null!=g.excavation&&(y=A6(m,g.excavation)),b=C.default.createElement("image",{href:u.src,height:g.h,width:g.w,x:g.x+p,y:g.y+p,preserveAspectRatio:"none",opacity:g.opacity,crossOrigin:g.crossOrigin}));let x=A5(y,p);return C.default.createElement("svg",AZ({height:n,width:n,viewBox:`0 0 ${f} ${f}`,ref:t,role:"img"},h),!!c&&C.default.createElement("title",null,c),C.default.createElement("path",{fill:a,d:`M0,0 h${f}v${f}H0z`,shapeRendering:"crispEdges"}),C.default.createElement("path",{fill:o,d:x,shapeRendering:"crispEdges"}),b)}).displayName="QRCodeSVG";var le=e.i(178761);let lt=({fromToken:e,fromChain:t,fromAmountFormatted:r,isFetchingQuote:n,depositAddress:i})=>{let a=((e,t="0",r,n,i)=>{if("evm"===e)return`ethereum:${n}@${i}?value=${r?0:t}`;if("svm"===e){if(0x2f3fb341===i)return`solana:${n}?amount=${r?0:t}`}else if("bvm"===e)return`bitcoin:${n}?amount=${r?0:t}`;else return n})(t?.vmType,r,e&&t&&e.address!==(0,Z.getDeadAddress)(t?.vmType)?e.address:void 0,i,t?.id);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{direction:"column",css:{"--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",borderRadius:8,px:"2",py:"3",mb:"3",gap:"2"},children:[(0,w.jsxs)(F.Text,{style:"body2",children:["Transfer funds manually from your ",t?.displayName," wallet to Relayâs deposit address to complete the bridge."]}),(0,w.jsx)(Ad,{href:"https://support.relay.link/en/articles/10269920-how-do-deposit-addresses-work",target:"_blank",children:"Learn More"})]}),(0,w.jsxs)(k.Flex,{css:{gap:"1"},children:[(0,w.jsxs)(k.Flex,{css:{gap:"1",width:"100%"},direction:"column",children:[(0,w.jsx)(F.Text,{style:"subtitle2",children:"Network"}),(0,w.jsxs)(tv,{color:"gray",css:{display:"flex",alignItems:"center",py:"2"},radius:"squared",children:[(0,w.jsx)(Ak,{chainId:t?.id,height:20,width:20}),(0,w.jsx)(F.Text,{style:"h6",children:t?.displayName})]})]}),(0,w.jsxs)(k.Flex,{css:{gap:"1",width:"100%"},direction:"column",children:[(0,w.jsx)(F.Text,{style:"subtitle2",children:"Amount to transfer"}),(0,w.jsxs)(tv,{color:"gray",css:{display:"flex",alignItems:"center",py:"2"},radius:"squared",children:[r?(0,w.jsxs)(w.Fragment,{children:[" ",(0,w.jsx)(F.Text,{style:"h6",css:{fontWeight:"500",mr:"1"},children:r}),(0,w.jsx)("img",{alt:e?.name,src:e?.logoURI,width:20,height:20,style:{borderRadius:9999}}
47),(0,w.jsx)(F.Text,{style:"h6",children:e?.symbol})]}):(0,w.jsx)(Av.Skeleton,{css:{height:24,width:"100%"}})," "]})]})]}),(0,w.jsx)(F.Text,{style:"subtitle2",children:"Relay's Deposit Address"}),(0,w.jsx)(tv,{radius:"rounded",color:"gray",css:{display:"flex",alignItems:"center",gap:"3",p:"3"},children:n?(0,w.jsx)(Av.Skeleton,{css:{height:21,width:"100%"}}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(F.Text,{style:"subtitle2",css:{marginRight:"auto"},children:eT(i,"...",28,4)}),a?(0,w.jsxs)(le.Popover,{children:[(0,w.jsx)(le.PopoverTrigger,{style:{cursor:"pointer"},children:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faQrcode,style:{width:16,height:16}})})}),(0,w.jsx)(le.PopoverPortal,{children:(0,w.jsx)(le.PopoverContent,{style:{zIndex:9999},sideOffset:4,children:(0,w.jsx)(T.Box,{css:{boxShadow:"0px 1px 5px rgba(0,0,0,0.2)",borderRadius:8,overflow:"hidden",transition:"transform 0.3s ease","&:hover":{transform:"scale(1.25)"}},children:(0,w.jsx)(T.Box,{css:{background:"modal-background",p:"2"},children:(0,w.jsxs)(k.Flex,{css:{margin:"0 auto",width:105,height:105},children:[(0,w.jsx)(k.Flex,{css:{position:"absolute",width:105,height:105,alignItems:"center",justifyContent:"center"},children:(0,w.jsxs)(k.Flex,{css:{position:"relative",zIndex:"999",transform:"translate3d(0,0,0)"},children:[(0,w.jsx)(Ak,{chainId:t?.id,height:14,width:14,css:{borderRadius:4,border:"1.5px solid white",position:"absolute",bottom:0,right:0}}),(0,w.jsx)("img",{alt:e?.name,src:e?.logoURI,width:33,height:33,style:{borderRadius:"100%",border:"1.5px solid white",background:"white"}})]})}),(0,w.jsx)(A9,{value:a,width:105,height:105,level:"H",imageSettings:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAhCAYAAAC803lsAAAMP2lDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkEBoAQSkhN4EESkBpITQQu8INkISIJQQA0HFjiwquBZULGBDV0UUrIDYETuLYu8LKgrKuliwK29SQNd95Xvn++be//5z5j9nzp1bBgC1kxyRKBtVByBHmC+OCfKjj09KppN6AAJQQAE6wJLDzRMxo6LCALSh89/t3U3oDe2avVTrn/3/1TR4/DwuAEgUxKm8PG4OxAcBwKu4InE+AEQpbzYtXyTFsAEtMUwQ4kVSnC7HVVKcKsd7ZT5xMSyIWwFQUuFwxOkAqF6BPL2Amw41VPshdhTyBEIA1OgQe+fk5PIgToHYGvqIIJbqM1J/0En/m2bqsCaHkz6M5XORmZK/IE+UzZnxf5bjf1tOtmQohiVsKhni4BjpnGHdbmflhkqxCsR9wtSISIg1If4g4Mn8IUYpGZLgeLk/asDNY8GawbsMUEcexz8UYgOIA4XZEWEKPjVNEMiGGK4QdLognx0HsS7Ei/h5AbEKn83i3BhFLLQhTcxiKvjzHLEsrjTWQ0lWPFOh/zqDz1boY6qFGXGJEFMgNi8QJERArAqxQ15WbKjCZ1xhBitiyEcsiZHmbw5xDF8Y5CfXxwrSxIExCv/SnLyh+WKbMwTsCAXen58RFyyvD9bK5cjyh3PBrvCFzPghHX7e+LChufD4/gHyuWM9fGF8rELngyjfL0Y+FqeIsqMU/rgpPztIyptC7JxXEKsYiyfkwwUp18fTRPlRcfI88cJMTkiUPB98OQgDLOAP6EACWyrIBZlA0N7X2Aev5D2BgAPEIB3wgb2CGRqRKOsRwmMsKAR/QsQHecPj/GS9fFAA+a/DrPxoD9JkvQWyEVngKcQ5IBRkw2uJbJRwOFoCeAIZwT+ic2DjwnyzYZP2/3t+iP3OMCETpmAkQxHpakOexACiPzGYGEi0wfVxb9wTD4NHX9iccAbuPjSP7/6Ep4QOwiPCDUIn4c4UQZH4pyzDQSfUD1TUIvXHWuCWUNMF98O9oDpUxnVwfWCPO8M4TNwHRnaBLEuRt7Qq9J+0/zaDH+6Gwo/sSEbJI8i+ZOufR6raqroMq0hr/WN95LmmDtebNdzzc3zWD9XnwXPoz57YIuwAdg47hV3AjmKNgI6dwJqwNuyYFA+vriey1TUULUaWTxbUEfwj3tCdlVYyz7HWsdfxi7wvnz9d+o4GrFzRDLEgPSOfzoRfBD6dLeQ6jKI7OTo5AyD9vshfX2+iZd8NRKftO7fgDwC8TgwODh75zoWcAGCfG3z8D3/nrBnw06EMwPnDXIm4QM7h0gMBviXU4JOmB4yAGbCG83ECrsAT+IIAEAIiQRxIApNh9hlwnYvBNDALzAcloAwsB6vBerAJbAU7wR6wHzSCo+AUOAsugSvgBrgHV083eAH6wTvwGUEQEkJFaIgeYoxYIHaIE8JAvJEAJAyJQZKQFCQdESISZBayAClDypH1yBakBtmHHEZOIReQDuQO0oX0Iq+RTyiGqqBaqCFqiY5GGSgTDUXj0EloOjoVLUSL0aXoWrQa3Y02oKfQS+gNtBN9gQ5gAFPGdDATzB5jYCwsEkvG0jAxNgcrxSqwaqwOa4b3+RrWifVhH3EiTsPpuD1cwcF4PM7Fp+Jz8CX4enwn3oC34tfwLrwf/0agEgwIdgQPApswnpBOmEYoIVQQthMOEc7AZ6mb8I5IJOoQrYhu8FlMImYSZxKXEDcQ64kniR3Ex8QBEomkR7IjeZEiSRxSPqmEtI60m3SCdJXUTfqgpKxkrOSkFKiUrCRUKlKqUNqldFzpqtIzpc9kdbIF2YMcSeaRZ5CXkbeRm8mXyd3kzxQNihXFixJHyaTMp6yl1FHOUO5T3igrK5squytHKwuU5ymvVd6rfF65S/mjiqaKrQpLZaKKRGWpyg6Vkyp3VN5QqVRLqi81mZpPXUqtoZ6mPqR+UKWpOqiyVXmqc1UrVRtUr6q+VCOrWagx1SarFapVqB1Qu6zWp05Wt1RnqXPU56hXqh9Wv6U+oEHTGKMRqZGjsURjl8YFjR5NkqalZoAmT7NYc6vmac3HNIxmRmPRuLQFtG20M7RuLaKWlRZbK1OrTGuPVrtWv7amtrN2gvZ07UrtY9qdOpiOpQ5bJ1tnmc5+nZs6n0YYjmCO4I9YPKJuxNUR73VH6vrq8nVLdet1b+h+0qPrBehl6a3Qa9R7oI/r2+pH60/T36h/Rr9vpNZIz5HckaUj94+8a4Aa2BrEGMw02GrQZjBgaGQYZCgyXGd42rDPSMfI1yjTaJXRcaNeY5qxt7HAeJXxCePndG06k55NX0tvpfebGJgEm0hMtpi0m3w2tTKNNy0yrTd9YEYxY5ilma0yazHrNzc2DzefZV5rfteCbMGwyLBYY3HO4r2llWWi5ULLRsseK10rtlWhVa3VfWuqtY/1VOtq6+s2RBuGTZbNBpsrtqiti22GbaXtZTvUztVOYLfBrmMUYZT7KOGo6lG37FXsmfYF9rX2XQ46DmEORQ6NDi9Hm49OHr1i9LnR3xxdHLMdtzneG6M5JmRM0ZjmMa+dbJ24TpVO18dSxwaOnTu2aewrZztnvvNG59suNJdwl4UuLS5fXd1cxa51rr1u5m4pblVutxhajCjGEsZ5d4K7n/tc96PuHz1cPfI99nv85WnvmeW5y7NnnNU4/rht4x57mXpxvLZ4dXrTvVO8N3t3+pj4cHyqfR75mvnyfLf7PmPaMDOZu5kv/Rz9xH6H/N6zPFizWSf9Mf8g/1L/9gDNgPiA9QEPA00D0wNrA/uDXIJmBp0MJgSHBq8IvsU2ZHPZNez+ELeQ2SGtoSqhsaHrQx+F2YaJw5rD0fCQ8JXh9yMsIoQRjZEgkh25MvJBlFXU1Kgj0cToqOjK6KcxY2JmxZyLpcVOid0V+y7OL25Z3L1463hJfEuCWsLEhJqE94n+ieWJneNHj589/lKSfpIgqSmZlJyQvD15YELAhNUTuie6TCyZeHOS1aTpky5M1p+cPfnYFLUpnCkHUggpiSm7Ur5wIjnVnIFUdmpVaj+XxV3DfcHz5a3i9fK9+OX8Z2leaeVpPele6SvTezN8Mioy+gQswXrBq8zgzE2Z77Mis3ZkDWYnZtfnKOWk5BwWagqzhK25RrnTcztEdqISUedUj6mrp/aLQ8Xb85C8SXlN+VrwR75NYi35RdJV4F1QWfBhWsK0A9M1pgunt82wnbF4xrPCwMLfZuIzuTNbZpnMmj+razZz9pY5yJzUOS1zzeYWz+2eFzRv53zK/Kz5vxc5FpUXvV2QuKC52LB4XvHjX4J+qS1RLRGX3FrouXDTInyRYFH74rGL1y3+VsorvVjmWFZR9mUJd8nFX8f8uvbXwaVpS9uXuS7buJy4XLj85gqfFTvLNcoLyx+vDF/ZsIq+qnTV29VTVl+ocK7YtIayRrKmc23Y2qZ15uuWr/uyPmP9jUq/yvoqg6rFVe838DZc3ei7sW6T4aayTZ82Czbf3hK0paHasrpiK3Frwdan2xK2nfuN8VvNdv3tZdu/7hDu6NwZs7O1xq2mZpfBrmW1aK2ktnf3xN1X9vjvaaqzr9tSr1Nfthfslex9vi9l3839oftbDjAO1B20OFh1iHaotAFpmNHQ35jR2NmU1NRxOORwS7Nn86EjDkd2HDU5WnlM+9iy45TjxccHTxSeGDgpOtl3Kv3U45YpLfdOjz99vTW6tf1M6JnzZwPPnj7HPHfivNf5oxc8Lhy+yLjYeMn1UkObS9uh311+P9Tu2t5w2e1y0xX3K80d4zqOX/W5euqa/7Wz19nXL92IuNFxM/7m7VsTb3Xe5t3uuZN959Xdgruf7827T7hf+kD9QcVDg4fVf9j8Ud/p2nmsy7+r7VHso3uPuY9fPMl78qW7+Cn1acUz42c1PU49R3sDe688n/C8+4Xoxee+kj81/qx6af3y4F++f7X1j+/vf
47iV+Nfh6yRu9NzveOr9tGYgaePgu593n96Uf9D7s/Mj4eO5T4qdnn6d9IX1Z+9Xma/O30G/3B3MGB0UcMUf2K4DBhqalAfB6BwDUJABocH9GmSDf/8kMke9ZZQj8JyzfI8rMFYA6+P8e3Qf/bm4BsHcb3H5BfbWJAERRAYhzB+jYscNtaK8m21dKjQj3AZujv6bmpIJ/Y/I95w95/3wGUlVn8PP5XwFtfFZdDkCYAAAAlmVYSWZNTQAqAAAACAAFARIAAwAAAAEAAQAAARoABQAAAAEAAABKARsABQAAAAEAAABSASgAAwAAAAEAAgAAh2kABAAAAAEAAABaAAAAAAAAAJAAAAABAAAAkAAAAAEAA5KGAAcAAAASAAAAhKACAAQAAAABAAAAIqADAAQAAAABAAAAIQAAAABBU0NJSQAAAFNjcmVlbnNob3Qpdkf5AAAACXBIWXMAABYlAAAWJQFJUiTwAAAC12lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNi4wLjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MTk0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6VXNlckNvbW1lbnQ+U2NyZWVuc2hvdDwvZXhpZjpVc2VyQ29tbWVudD4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjE4NjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjE0NDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+MTQ0PC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4Kmj5GzQAAACtJREFUWAnt0DEBAAAAwqD1T20ND4hAYcCAAQMGDBgwYMCAAQMGDBgwcDEwEakAAc3C1KAAAAAASUVORK5CYII=",height:33,width:33,excavate:!0},style:{margin:"0 auto",width:105,height:105}})]})})})})})]}):null,(0,w.jsx)(Az,{text:i??""})]})}),(0,w.jsxs)(E.Button,{disabled:!0,css:{color:"button-disabled-color !important",mt:8,justifyContent:"center"},children:[(0,w.jsx)(As,{css:{height:16,width:16,fill:"button-disabled-color"}}),"Waiting for you to transfer funds"]})]})},lr=({txHashes:e,status:t})=>{let r=(0,U.useRelayClient)(),n=r?.baseApiUrl&&r.baseApiUrl.includes("testnet")?"https://testnets.relay.link":"https://relay.link",i=e&&e[0]?e[0]:void 0;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{direction:"column",align:"center",justify:"between",children:[(0,w.jsx)(As,{css:{height:40,width:40,fill:"primary-color"}}),(0,w.jsx)(F.Text,{style:"subtitle2",css:{mt:"4",mb:"2",textAlign:"center"},children:"Funds received. Your transaction is now in progress."}),(0,w.jsxs)(F.Text,{color:"subtle",style:"body2",css:{mt:12,textAlign:"center"},children:["Feel free to leave at any time, you can track your progress within the"," ",(0,w.jsxs)(Ad,{href:`${n}/transaction/${i}`,target:"_blank",rel:"noreffer",children:[" ","transaction page"]}),"."]})]}),(0,w.jsxs)(E.Button,{disabled:!0,css:{color:"button-disabled-color !important",mt:8,justifyContent:"center"},children:[(0,w.jsx)(As,{css:{height:16,width:16,fill:"button-disabled-color"}}),"Validating Transaction"]})]})},ln=e=>{let{open:t,address:r,fromChain:n,fromToken:i,toToken:a,recipient:o,debouncedInputAmountValue:s,debouncedOutputAmountValue:A,onOpenChange:l,invalidateBalanceQueries:c,onAnalyticEvent:d,onSuccess:u}=e;return(0,C.useEffect)(()=>
47{l(t)},[t]),(0,w.jsx)(AG,{open:t,fromChain:n,fromToken:i,toToken:a,debouncedInputAmountValue:s,debouncedOutputAmountValue:A,address:r,recipient:o,invalidateBalanceQueries:c,onAnalyticEvent:d,onSuccess:(e,t)=>{let r=e?.details,n=e?.fees,o={amount_in:parseFloat(`${r?.currencyIn?.amountFormatted}`),amount_out:parseFloat(`${r?.currencyOut?.amountFormatted}`)};n?.gas?.amountFormatted&&(o.gas_fee=parseFloat(n.gas.amountFormatted)),n?.relayer?.amountFormatted&&(o.relayer_fee=parseFloat(n.relayer.amountFormatted));let s=e?ts(e?.steps):void 0;d?.(N.EventNames.SWAP_SUCCESS,{...o,chain_id_in:i?.chainId,currency_in:i?.symbol,chain_id_out:a?.chainId,currency_out:a?.symbol,quote_id:s,txHashes:[...t?.inTxHashes??[],...t?.txHashes??[]],steps:e?.steps}),u?.({steps:e?.steps,fees:n,details:r})},children:t=>(0,w.jsx)(li,{address:r,onAnalyticEvent:d,...e,...t})})},li=({open:e,onOpenChange:t,fromToken:r,toToken:n,quote:i,isFetchingQuote:a,quoteError:o,address:s,swapError:A,progressStep:l,allTxHashes:c,transaction:d,timeEstimate:u,fillTime:h,seconds:p,fromChain:m,toChain:f,recipient:g,depositAddress:y,executionStatus:x,isLoadingTransaction:v,requestId:C})=>{let B=i?.details,S=B?.currencyIn?.amount?(0,j.formatBN)(B?.currencyIn?.amount,6,r?.decimals,!1):"",E=B?.currencyOut?.amount?(0,j.formatBN)(B?.currencyOut.amount,6,n?.decimals,!1):"",T=l===b.WaitingForDeposit;return(0,w.jsx)(Ai,{trigger:null,open:e,onOpenChange:t,css:{overflow:"hidden",p:"4",maxWidth:"412px !important"},showCloseButton:!0,onPointerDownOutside:e=>{let t=Array.from(document.querySelectorAll("#dynamic-send-transaction"));t.some(t=>!!e.target&&t.contains(e.target))&&t.length>0&&e.preventDefault()},children:(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:T?"3":"4"},children:[(0,w.jsx)(F.Text,{style:"h6",css:{mb:8},children:T?"Manual Transfer":"Trade Details"}),l===b.WaitingForDeposit?(0,w.jsx)(lt,{fromToken:r,fromChain:m,fromAmountFormatted:S,isFetchingQuote:a,depositAddress:y}):null,l===b.Validating?(0,w.jsx)(lr,{status:x?.status,txHashes:x?.txHashes??[]}):null,l===b.Success?(0,w.jsx)(AH,{fromToken:r,toToken:n,fromAmountFormatted:S,toAmountFormatted:E,allTxHashes:c,transaction:d,fillTime:h,seconds:p??0,onOpenChange:t,timeEstimate:u?.formattedTime,details:B,isLoadingTransaction:v,requestId:C}):null,l===b.Error?(0,w.jsx)(AI,{error:A||o,allTxHashes:c,address:s,onOpenChange:t,transaction:d,fromChain:m,toChain:f,fromToken:r,toToken:n,fromAmountFormatted:S,toAmountFormatted:E}):null]})})},la=()=>{let[e,t]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{t(!0)},[]),e},lo=({steps:e,setSteps:t,quoteInProgress:r,setQuoteInProgress:n,transactionModalOpen:i,setTransactionModalOpen:a,depositAddressModalOpen:o,setDepositAddressModalOpen:s,addressModalOpen:A,setAddressModalOpen:l,children:c,fromChain:d,fromToken:u,toToken:h,debouncedInputAmountValue:p,debouncedOutputAmountValue:m,customToAddress:f,address:g,slippageTolerance:y,timeEstimate:b,recipient:x,toChain:v,wallet:C,linkedWallets:B,multiWalletSupportEnabled:S,swapError:k,setSwapError:E,onTransactionModalOpenChange:F,onDepositAddressModalOpenChange:T,onSwapSuccess:U,onSwapValidating:I,onAnalyticEvent:Q,invalidateBalanceQueries:j,invalidateQuoteQuery:L,setCustomToAddress:_})=>{let P=la(),{isConnected:D}=(0,eg.useAccount)();return(0,w.jsxs)("div",{className:"relay-kit-reset",children:[c(),P?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(AV,{steps:e,setSteps:t,quote:r,setQuote:n,swapError:k,setSwapError:E,open:i,onOpenChange:e=>{a(e),F(e)},fromChain:d,toChain:v,fromToken:u,toToken:h,slippageTolerance:y,address:g,onAnalyticEvent:Q,onSuccess:U,onSwapValidating:I,wallet:C,linkedWallets:B,multiWalletSupportEnabled:S,invalidateQuoteQuery:L}),(0,w.jsx)(ln,{open:o,onOpenChange:e=>{s(e),T(e)},fromChain:d,fromToken:u,toToken:h,debouncedInputAmountValue:p,debouncedOutputAmountValue:m,address:g,recipient:x,onAnalyticEvent:Q,onSuccess:U,invalidateBalanceQueries:j})]}):null,(0,w.jsx)(Ah,{open:A,toAddress:f,toChain:v,isConnected:void 0!==C||!!D,linkedWallets:B??[],multiWalletSupportEnabled:S,wallet:C,onAnalyticEvent:Q,onOpenChange:e=>{l(e)},onConfirmed:e=>{_(e)},onClear:()=>{_(void 0)}})]})},ls=({transactionModalOpen:e,depositAddressModalOpen:t,isValidFromAddress:r,isValidToAddress:n,context:i,showHighPriceImpactWarning:a=!1,disableSwapButton:o=!1,tokenWidgetMode:s=!1,hasValidAmount:A=!0,onConnectWallet:l,quote:c,address:d,hasInsufficientBalance:u,isInsufficientLiquidityError:h,debouncedInputAmountValue:p,debouncedOutputAmountValue:m,isSameCurrencySameRecipientSwap:f,fromChainWalletVMSupported:g,recipientWalletSupportsChain:y,onClick:b,ctaCopy:x,onAnalyticEvent:v,isFetchingQuote:C})=>{if(la()&&(d||!g)){let l=!c||0===Number(p)||0===Number(m),d=s&&(x.includes("Select")||x.includes("Enter")),v=s&&"Select a token"===x,B=s?o||C||v||u||!d&&!A:C||n&&(r||!g)&&(l||u||h||e||t||f||!y||o),S=s&&C&&A?"Fetching quote":x;return(0,w.jsx)(E.Button,{css:{justifyContent:"center",width:s?"100%":void 0,...!s&&{textTransform:"none"}},color:a?"error":"primary","aria-label":i,cta:!0,disabled:B,"data-testid":s?"token-action-button":"swap-button",onClick:()=>{B||b()},children:S})}return(0,w.jsx)(E.Button,{cta:!0,css:{justifyContent:"center",width:s?"100%":void 0,...!s&&{textTransform:"none"}},"aria-label":"Connect wallet",onClick:()=>
47{if(!l)throw"Missing onWalletConnect function";l(),v?.(N.EventNames.CONNECT_WALLET_CLICKED,{context:i})},"data-testid":s?"token-widget-connect-wallet-button":"widget-connect-wallet-button",children:"Connect Wallet"})},lA=({children:e,css:t,id:r})=>(0,w.jsx)(k.Flex,{align:"center",justify:"between",id:r,css:{width:"100%",display:"flex",flexDirection:"column",alignItems:"start",backgroundColor:"widget-card-background",border:"widget-card-border",gap:"3",p:"12px 12px",borderRadius:"widget-card-border-radius",...t},children:e});var ll=e.i(13484),lc=e.i(162388);let ld=({isLoading:e,containerCss:t})=>e?(0,w.jsxs)(k.Flex,{align:"center",css:{gap:14,mb:"3",mt:"1",p:"3 0",m:"0 auto",...t},children:[(0,w.jsx)(As,{css:{height:16,width:16}}),(0,w.jsx)(F.Text,{style:"subtitle2",children:"Fetching the best price"})]}):null;var lu=e.i(934620),lh="Collapsible",[lp,lm]=(0,tS.createContextScope)(lh),[lf,lg]=lp(lh),ly=C.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[A,l]=(0,tE.useControllableState)({prop:n,defaultProp:i??!1,onChange:o,caller:lh});return(0,w.jsx)(lf,{scope:r,disabled:a,contentId:(0,tk.useId)(),open:A,onOpenToggle:C.useCallback(()=>l(e=>!e),[l]),children:(0,w.jsx)(tQ.Primitive.div,{"data-state":lB(A),"data-disabled":a?"":void 0,...s,ref:t})})});ly.displayName=lh;var lb="CollapsibleTrigger",lx=C.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,i=lg(lb,r);return(0,w.jsx)(tQ.Primitive.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":lB(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:(0,tC.composeEventHandlers)(e.onClick,i.onOpenToggle)})});lx.displayName=lb;var lw="CollapsibleContent",lv=C.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=lg(lw,e.__scopeCollapsible);return(0,w.jsx)(tI.Presence,{present:r||i.open,children:({present:e})=>(0,w.jsx)(lC,{...n,ref:t,present:e})})});lv.displayName=lw;var lC=C.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:i,...a}=e,o=lg(lw,r),[s,A]=C.useState(n),l=C.useRef(null),c=(0,tB.useComposedRefs)(t,l),d=C.useRef(0),u=d.current,h=C.useRef(0),p=h.current,m=o.open||s,f=C.useRef(m),g=C.useRef(void 0);return C.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,lu.useLayoutEffect)(()=>{let e=l.current;if(e){g.current=g.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,f.current||(e.style.transitionDuration=g.current.transitionDuration,e.style.animationName=g.current.animationName),A(n)}},[o.open,n]),(0,w.jsx)(tQ.Primitive.div,{"data-state":lB(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":u?`${u}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:m&&i})});function lB(e){return e?"open":"closed"}let lS=(0,tb.cva)({base:{overflow:"hidden",_data_state_open:{animation:"collapsibleSlideDown 300ms cubic-bezier(0.87, 0, 0.13, 1)"},_data_state_closed:{animation:"collapsibleSlideUp 300ms cubic-bezier(0.87, 0, 0.13, 1)"}}}),lk=(0,tb.cva)({base:{width:"100%"}}),lE=(0,tb.cva)({base:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer"}}),lF=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(lv,{ref:n,...r,className:(0,tx.css)(lS.raw(),tx.css.raw(t)),children:e})),lT=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(ly,{ref:n,...r,className:(0,tx.css)(lk.raw(),tx.css.raw(t)),children:e})),lU=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(lx,{ref:n,...r,className:(0,tx.css)(lE.raw(),tx.css.raw(t)),children:e})),lI=e=>{if(0!==e&&void 0!==e)return e>0?"success":void 0},lQ=({feeBreakdown:e,children:t,tooltipProps:r})=>(0,w.jsx)(AW.default,{content:(0,w.jsxs)(k.Flex,{css:{minWidth:200},direction:"column",children:[(0,w.jsxs)(k.Flex,{align:"center",css:{width:"100%"},children:[(0,w.jsxs)(F.Text,{style:"subtitle3",css:{mr:"auto"},children:["Total Price Impact"," "]}),(0,w.jsx)(F.Text,{style:"subtitle3",css:{mr:"1",ml:"2"},color:e?.totalFees?.priceImpactColor,children:e?.totalFees.priceImpact}),(0,w.jsxs)(F.Text,{style:"subtitle3",color:e?.totalFees?.priceImpactColor,children:["(",e?.totalFees.priceImpactPercentage,")"]})]}),(0,w.jsx)(T.Box,{css:{width:"100%",height:1,backgroundColor:"slate.6",marginTop:"2",marginBottom:"2"}}),(0,w.jsxs)(k.Flex,{align:"center",css:{width:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",css:{mr:"auto"},children:"Swap Impact"}),(0,w.jsx)(F.Text,{style:"subtitle3",color:lI(e?.totalFees?.swapImpact?.value),children:e?.totalFees?.swapImpact?.formatted})]}),e?.breakdown.map(t=>"origin-gas"===t.id?null:(0,w.jsxs)(k.Flex,{align:"center",css:{width:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",css:{mr:"auto"},children:t.name}),e.isGasSponsored&&0===t.usd.value?(0,w.jsx)(F.Text,{style:"subtitle3",color:"success",children:"Free"}
47):(0,w.jsx)(F.Text,{style:"subtitle3",color:lI(t.usd.value),children:t.usd.formatted})]},t.id)),(0,w.jsx)(Ad,{href:"https://docs.relay.link/references/api/api_core_concepts/fees#relay-fees",target:"_blank",rel:"noopener noreferrer",css:{color:"primary11",fontSize:12},children:"Learn more about the fees"})]}),...r,children:t}),lj={"very-high":"red11",high:"amber11",low:void 0},lL=({feeBreakdown:e,isFetchingQuote:t,quote:r,toToken:n,fromToken:i,toChain:a,timeEstimate:o,isSingleChainLocked:s,fromChainWalletVMSupported:A,isAutoSlippage:l,slippageInputBps:c,error:d,onOpenSlippageConfig:u})=>{let h,[p,m]=(0,C.useState)(!1),f=r?.details?.rate,g=r?.details?.isFixedRate,y=e?.breakdown?.find(e=>"origin-gas"===e.id),b=(0,j.formatDollar)(Math.abs(y?.usd.value??0)),[x,v]=(0,C.useState)("input"),B=-3.5>Number(r?.details?.totalImpact?.percent),S=n?.chainId===i?.chainId,U=r?.details?.slippageTolerance?.origin?.percent,I=r?.details?.slippageTolerance?.destination?.percent,Q=Number((Number(c??"0")/100).toFixed(2)),L=`${Math.max(Number(g?"0":(S&&"0"===I?U:I)??"0"),Q)}`,P=lj[(h=parseFloat(L))>=40?"very-high":h>=6?"high":"low"],D=r?.details?.currencyOut?.minimumAmount?(0,j.formatBN)(r.details.currencyOut.minimumAmount,6,n?.decimals,!1):void 0,R=[{title:"Estimated time",value:(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",color:o&&o.time<=30?"{colors.grass.9}":"{colors.amber.9}"},children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClock,width:16}),(0,w.jsxs)(F.Text,{style:"subtitle2",children:["~ ",o?.formattedTime]})]})},{title:"Network cost",value:(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1"},children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:ll.faGasPump,width:16,style:{color:"#C1C8CD"}}),(0,w.jsx)(F.Text,{style:"subtitle2",children:b})]})},{title:"Price Impact",value:(0,w.jsx)(lQ,{feeBreakdown:e,tooltipProps:{side:"top",align:"end"},children:(0,w.jsx)("div",{children:(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",color:"gray8"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",css:{color:B?"red11":void 0},children:e?.totalFees?.priceImpactPercentage}),(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faInfoCircle,width:14,height:14,style:{display:"inline-block",marginLeft:4}})]})})})}];if(!e)if(t)return(0,w.jsx)(T.Box,{id:"fee-breakdown-section",css:{borderRadius:"widget-card-border-radius",backgroundColor:"widget-background",border:"widget-card-border",overflow:"hidden",mb:"widget-card-section-gutter"},children:(0,w.jsx)(ld,{isLoading:t,containerCss:{mt:0,mb:0,px:"4",py:"3",width:"100%",justifyContent:"center"}})});else return null;return(0,w.jsxs)(k.Flex,{css:{borderRadius:"widget-card-border-radius",borderBottomRadius:p?"0":"widget-card-border-radius",backgroundColor:"widget-background",border:"widget-card-border",borderBottom:p?"none":"widget-card-border",overflow:"hidden",transition:"border-radius 300ms, border-bottom 0s",transitionDelay:p?"0s, 0s":"0s, 300ms",mb:"widget-card-section-gutter"},direction:"column",children:[(0,w.jsxs)(k.Flex,{justify:"between",align:"center",css:{p:"3",pb:"0"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",children:"Max Slippage"}),(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"2"},children:[l?(0,w.jsx)(E.Button,{"aria-label":"Auto",css:{fontSize:12,fontWeight:"500",px:"1",py:"1",minHeight:"23px",lineHeight:"100%",backgroundColor:"widget-selector-background",border:"none",_hover:{backgroundColor:"widget-selector-hover-background"}},color:"white",onClick:e=>{e.preventDefault(),u?.()},children:"Auto"}):null,(0,w.jsx)(AW.default,{side:"top",align:"end",content:D?(0,w.jsxs)(k.Flex,{direction:"row",css:{gap:"2"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Min. received"}),(0,w.jsxs)(F.Text,{style:"subtitle2",children:[D," ",n?.symbol]})]}):null,children:(0,w.jsxs)(F.Text,{style:"subtitle2",css:{color:P},children:[L,"%"]})})]})]}),(0,w.jsxs)(lT,{open:p,onOpenChange:m,children:[(0,w.jsx)(lU,{id:"fee-breakdown-section",children:(0,w.jsxs)(k.Flex,{justify:"between",align:"center",css:{flexDirection:"row",gap:"2",width:"100%",p:"3"},children:[(0,w.jsx)("span",{style:{cursor:"pointer",flexShrink:1,overflow:"hidden",height:21},onClick:e=>{v("input"===x?"output":"input"),e.preventDefault()},children:(0,w.jsx)(l_,{fromToken:i,toToken:n,rate:Number(f),isInputMode:"input"===x})}),(0,w.jsxs)(k.Flex,{css:{gap:"2",color:o&&o.time<=30?"{colors.grass.9}":"{colors.amber.9}",flexShrink:0},align:"center",children:[!p&&o&&o?.time!==0?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClock,width:16}),(0,w.jsxs)(F.Text,{style:"subtitle2",css:{flexShrink:0},children:["~ ",o?.formattedTime]}),(0,w.jsx)(k.Flex,{justify:"center",align:"center",css:{color:"gray6",height:4},children:"â¢"})]}):null,!p&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_.FontAwesomeIcon,{icon:ll.faGasPump,width:16,style:{color:"#C1C8C
47D"}}),(0,w.jsx)(F.Text,{style:"subtitle2",css:{flexShrink:0},children:b})]}),(0,w.jsx)(T.Box,{css:{marginLeft:"2",transition:"transform 300ms",transform:p?"rotate(-180deg)":"rotate(0)",color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:lc.faChevronDown,width:12})})]})]})}),(0,w.jsx)(lF,{css:{borderRadius:"0 0 12px 12px"},children:(0,w.jsx)(k.Flex,{direction:"column",css:{px:"3",pb:"3",pt:"0",gap:"2",backgroundColor:"widget-background"},children:R.map(e=>(0,w.jsx)(C.default.Fragment,{children:(0,w.jsxs)(k.Flex,{justify:"between",align:"center",css:{width:"100%",gap:"4"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",css:{alignSelf:"flex-start"},children:e.title}),e.value]})},e.title))})})]})]})},l_=({fromToken:e,toToken:t,rate:r,isInputMode:n})=>{let i,a=n?e?.symbol:t?.symbol,o=n?t?.symbol:e?.symbol,s=`1 ${a} = ${(i=n?r:1/r)>=1?(0,j.formatBN)(i,2,18,!1):(0,j.formatBN)(i,4,18,!1)} ${o}`,A=s.length>22,l=(0,w.jsx)("div",{style:{width:"100%",minWidth:0},children:(0,w.jsx)(F.Text,{style:"subtitle2",ellipsify:!0,children:s})});return A?(0,w.jsx)(AW.default,{content:(0,w.jsx)(F.Text,{style:"subtitle2",children:s}),asChild:!0,children:l}):l},lP=({token:e,locked:t,address:r,testId:n})=>{let i=(0,J.default)(),a=i?.chains?.find(t=>t.id===e?.chainId);return e?(0,w.jsxs)(E.Button,{color:"white",corners:"pill",disabled:t,css:{height:50,minHeight:50,width:"max-content",flexShrink:0,overflow:"hidden",px:"3",py:"2",backgroundColor:"widget-selector-background",border:"none",_hover:{backgroundColor:"widget-selector-hover-background"},_disabled:{backgroundColor:"widget-selector-background"}},"data-testid":n,children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"2"},children:[(0,w.jsx)(AU,{chainId:e.chainId,tokenlogoURI:e.logoURI,tokenSymbol:e.symbol,css:{width:32,height:32}}),(0,w.jsxs)(k.Flex,{direction:"column",align:"start",css:{maxWidth:100,minWidth:60},children:[(0,w.jsx)(F.Text,{style:"h6",ellipsify:!0,css:{maxWidth:"100%"},children:e.symbol}),(0,w.jsx)(F.Text,{style:"subtitle3",ellipsify:!0,color:"subtle",css:{lineHeight:"15px",maxWidth:"100%"},children:a?.displayName})]})]}),t?null:(0,w.jsx)(T.Box,{css:{color:"gray11",width:14,flexShrink:0},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faChevronRight,width:14})})]}):(0,w.jsxs)(E.Button,{color:r?"primary":"secondary",corners:"pill",cta:!0,css:{height:50,minHeight:50,width:"max-content",flexShrink:0,overflow:"hidden",px:"3",py:"2",fontWeight:700,fontSize:"16px"},children:["Select Token",(0,w.jsx)(T.Box,{css:{width:14},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faChevronRight,width:14})})]})};function lD(e){let t=e+"CollectionProvider",[r,n]=(0,tS.createContextScope)(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:r}=e,n=C.default.useRef(null),a=C.default.useRef(new Map).current;return(0,w.jsx)(i,{scope:t,itemMap:a,collectionRef:n,children:r})};o.displayName=t;let s=e+"CollectionSlot",A=(0,tP.createSlot)(s),l=C.default.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=a(s,r),o=(0,tB.useComposedRefs)(t,i.collectionRef);return(0,w.jsx)(A,{ref:o,children:n})});l.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",u=(0,tP.createSlot)(c),h=C.default.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,o=C.default.useRef(null),s=(0,tB.useComposedRefs)(t,o),A=a(c,r);return C.default.useEffect(()=>(A.itemMap.set(o,{ref:o,...i}),()=>void A.itemMap.delete(o))),(0,w.jsx)(u,{...{[d]:""},ref:s,children:n})});return h.displayName=c,[{Provider:o,Slot:l,ItemSlot:h},function(t){let r=a(e+"CollectionConsumer",t);return C.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var lR=new WeakMap;function lM(e,t){var r,n;let i,a,o;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let s=(r=e,n=t,i=r.length,(o=(a=lO(n))>=0?a:i+a)<0||o>=i?-1:o);return -1===s?void 0:e[s]}function lO(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#u;constructor(e){super(e),this.#u=[...super.keys()],lR.set(this,!0)}set(e,t){return lR.get(this)&&(this.has(e)?this.#u[this.#u.indexOf(e)]=e:this.#u.push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),a=this.#u.length,o=lO(e),s=o>=0?o:a+o,A=s<0||s>=a?-1:s;if(A===this.size||i&&A===this.size-1||-1===A)return this.set(t,r),this;let l=this.size+ +!i;o<0&&s++;let c=[...this.#u],d=!1;for(let e=s;e<l;e++)if(s===e){let a=c[e];c[e]===t&&(a=c[e+1]),i&&this.delete(t),n=this.get(a),this.set(t,r)}else{d||c[e-1]!==t||(d=!0);let r=c[d?e:e-1],i=n;n=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,n){let i=new e(this);return i.insert(t,r,n),i}before(e){let t=this.#u.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#u.indexOf(e);return -1===n?this:this.insert(n,t,r)}after(e){let t=this.#u.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#u.indexOf(e);return -1===n?this:this.insert(n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#u=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#u.splice(this.#u.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=lM(this.#u,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=lM(this.#u,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#u.indexOf(e)}keyAt(e){return lM(this.#u,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,r){let n=[],i=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(n)}reduce(...e){let[t,r]=e,n=0,i=r??this.at(0);for(let r of this)i=0===n&&1===e.length?r:Reflect.apply(t,this,[i,r,n,this]),n++;return i}reduceRight(...e){let[t,r]=e,n=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);
47n=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,r,this])}return n}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e,i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);n.set(t,r)}return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}});var lN=C.createContext(void 0);function lH(e){let t=C.useContext(lN);return e||t||"ltr"}var lV=e.i(853660),lK=e.i(30207),lG="rovingFocusGroup.onEntryFocus",lW={bubbles:!1,cancelable:!0},lz="RovingFocusGroup",[l$,lq,lX]=lD(lz),[lY,lJ]=(0,tS.createContextScope)(lz,[lX]),[lZ,l0]=lY(lz),l1=C.forwardRef((e,t)=>(0,w.jsx)(l$.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(l$.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(l2,{...e,ref:t})})}));l1.displayName=lz;var l2=C.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:A,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...d}=e,u=C.useRef(null),h=(0,tB.useComposedRefs)(t,u),p=lH(a),[m,f]=(0,tE.useControllableState)({prop:o,defaultProp:s??null,onChange:A,caller:lz}),[g,y]=C.useState(!1),b=(0,lK.useCallbackRef)(l),x=lq(r),v=C.useRef(!1),[B,S]=C.useState(0);return C.useEffect(()=>{let e=u.current;if(e)return e.addEventListener(lG,b),()=>e.removeEventListener(lG,b)},[b]),(0,w.jsx)(lZ,{scope:r,orientation:n,dir:p,loop:i,currentTabStopId:m,onItemFocus:C.useCallback(e=>f(e),[f]),onItemShiftTab:C.useCallback(()=>y(!0),[]),onFocusableItemAdd:C.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:C.useCallback(()=>S(e=>e-1),[]),children:(0,w.jsx)(tQ.Primitive.div,{tabIndex:g||0===B?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:(0,tC.composeEventHandlers)(e.onMouseDown,()=>{v.current=!0}),onFocus:(0,tC.composeEventHandlers)(e.onFocus,e=>{let t=!v.current;if(e.target===e.currentTarget&&t&&!g){let t=new CustomEvent(lG,lW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);l6([e.find(e=>e.active),e.find(e=>e.id===m),...e].filter(Boolean).map(e=>e.ref.current),c)}}v.current=!1}),onBlur:(0,tC.composeEventHandlers)(e.onBlur,()=>y(!1))})})}),l4="RovingFocusGroupItem",l3=C.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:o,...s}=e,A=(0,tk.useId)(),l=a||A,c=l0(l4,r),d=c.currentTabStopId===l,u=lq(r),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=c;return C.useEffect(()=>{if(n)return h(),()=>p()},[n,h,p]),(0,w.jsx)(l$.ItemSlot,{scope:r,id:l,focusable:n,active:i,children:(0,w.jsx)(tQ.Primitive.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:(0,tC.composeEventHandlers)(e.onMouseDown,e=>{n?c.onItemFocus(l):e.preventDefault()}),onFocus:(0,tC.composeEventHandlers)(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:(0,tC.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void c.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var n;let i=(n=e.key,"rtl"!==r?n:"ArrowLeft"===n?"ArrowRight":"ArrowRight"===n?"ArrowLeft":n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return l5[i]}(e,c.orientation,c.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=u().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,n;"prev"===t&&i.reverse();let a=i.indexOf(e.currentTarget);i=c.loop?(r=i,n=a+1,r.map((e,t)=>r[(n+t)%r.length])):i.slice(a+1)}setTimeout(()=>l6(i))}}),children:"function"==typeof o?o({isCurrentTabStop:d,hasTabStop:null!=m}):o})})});l3.displayName=l4;var l5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function l6(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}var l8=["Enter"," "],l7=["ArrowUp","PageDown","End"],l9=["ArrowDown","PageUp","Home",...l7],ce={ltr:[...l8,"ArrowRight"],rtl:[...l8,"ArrowLeft"]},ct={ltr:["ArrowLeft"],rtl:["ArrowRight"]}
47,cr="Menu",[cn,ci,ca]=lD(cr),[co,cs]=(0,tS.createContextScope)(cr,[ca,lV.createPopperScope,lJ]),cA=(0,lV.createPopperScope)(),cl=lJ(),[cc,cd]=co(cr),[cu,ch]=co(cr),cp=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:o=!0}=e,s=cA(t),[A,l]=C.useState(null),c=C.useRef(!1),d=(0,lK.useCallbackRef)(a),u=lH(i);return C.useEffect(()=>{let e=()=>{c.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>c.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,w.jsx)(lV.Root,{...s,children:(0,w.jsx)(cc,{scope:t,open:r,onOpenChange:d,content:A,onContentChange:l,children:(0,w.jsx)(cu,{scope:t,onClose:C.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:u,modal:o,children:n})})})};cp.displayName=cr;var cm=C.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=cA(r);return(0,w.jsx)(lV.Anchor,{...i,...n,ref:t})});cm.displayName="MenuAnchor";var cf="MenuPortal",[cg,cy]=co(cf,{forceMount:void 0}),cb="MenuContent",[cx,cw]=co(cb),cv=C.forwardRef((e,t)=>{let r=cy(cb,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=cd(cb,e.__scopeMenu),o=ch(cb,e.__scopeMenu);return(0,w.jsx)(cn.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(tI.Presence,{present:n||a.open,children:(0,w.jsx)(cn.Slot,{scope:e.__scopeMenu,children:o.modal?(0,w.jsx)(cC,{...i,ref:t}):(0,w.jsx)(cB,{...i,ref:t})})})})}),cC=C.forwardRef((e,t)=>{let r=cd(cb,e.__scopeMenu),n=C.useRef(null),i=(0,tB.useComposedRefs)(t,n);return C.useEffect(()=>{let e=n.current;if(e)return(0,t_.hideOthers)(e)},[]),(0,w.jsx)(ck,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:(0,tC.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),cB=C.forwardRef((e,t)=>{let r=cd(cb,e.__scopeMenu);return(0,w.jsx)(ck,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),cS=(0,tP.createSlot)("MenuContent.ScrollLock"),ck=C.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:A,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,onDismiss:h,disableOutsideScroll:p,...m}=e,f=cd(cb,r),g=ch(cb,r),y=cA(r),b=cl(r),x=ci(r),[v,B]=C.useState(null),S=C.useRef(null),k=(0,tB.useComposedRefs)(t,S,f.onContentChange),E=C.useRef(0),F=C.useRef(""),T=C.useRef(0),U=C.useRef(null),I=C.useRef("right"),Q=C.useRef(0),j=p?tL.RemoveScroll:C.Fragment;C.useEffect(()=>()=>window.clearTimeout(E.current),[]),(0,tj.useFocusGuards)();let L=C.useCallback(e=>{var t,r;return I.current===U.current?.side&&(t=e,!!(r=U.current?.area)&&function(e,t){let{x:r,y:n}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],A=o.x,l=o.y,c=s.x,d=s.y;l>n!=d>n&&r<(c-A)*(n-l)/(d-l)+A&&(i=!i)}return i}({x:t.clientX,y:t.clientY},r))},[]);return(0,w.jsx)(cx,{scope:r,searchRef:F,onItemEnter:C.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:C.useCallback(e=>{L(e)||(S.current?.focus(),B(null))},[L]),onTriggerLeave:C.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:T,onPointerGraceIntentChange:C.useCallback(e=>{U.current=e},[]),children:(0,w.jsx)(j,{...p?{as:cS,allowPinchZoom:!0}:void 0,children:(0,w.jsx)(tT.FocusScope,{asChild:!0,trapped:i,onMountAutoFocus:(0,tC.composeEventHandlers)(a,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,w.jsx)(tF.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,onDismiss:h,children:(0,w.jsx)(l1,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:v,onCurrentTabStopIdChange:B,onEntryFocus:(0,tC.composeEventHandlers)(A,e=>{g.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,w.jsx)(lV.Content,{role:"menu","aria-orientation":"vertical","data-state":cJ(f.open),"data-radix-menu-content":"",dir:g.dir,...y,...m,ref:k,style:{outline:"none",...m.style},onKeyDown:(0,tC.composeEventHandlers)(m.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.ke
47y.length;if(t){var i;let t,a,o,s,A,l;"Tab"===e.key&&e.preventDefault(),!r&&n&&(i=e.key,t=F.current+i,a=x().filter(e=>!e.disabled),o=document.activeElement,s=a.find(e=>e.ref.current===o)?.textValue,A=function(e,t,r){var n;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,o=(n=Math.max(a,0),e.map((t,r)=>e[(n+r)%e.length]));1===i.length&&(o=o.filter(e=>e!==r));let s=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return s!==r?s:void 0}(a.map(e=>e.textValue),t,s),l=a.find(e=>e.textValue===A)?.ref.current,function e(t){F.current=t,window.clearTimeout(E.current),""!==t&&(E.current=window.setTimeout(()=>e(""),1e3))}(t),l&&setTimeout(()=>l.focus()))}let a=S.current;if(e.target!==a||!l9.includes(e.key))return;e.preventDefault();let o=x().filter(e=>!e.disabled).map(e=>e.ref.current);l7.includes(e.key)&&o.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(o)}),onBlur:(0,tC.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),F.current="")}),onPointerMove:(0,tC.composeEventHandlers)(e.onPointerMove,c1(e=>{let t=e.target,r=Q.current!==e.clientX;e.currentTarget.contains(t)&&r&&(I.current=e.clientX>Q.current?"right":"left",Q.current=e.clientX)}))})})})})})})});cv.displayName=cb;var cE=C.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(tQ.Primitive.div,{role:"group",...n,ref:t})});cE.displayName="MenuGroup";var cF=C.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(tQ.Primitive.div,{...n,ref:t})});cF.displayName="MenuLabel";var cT="MenuItem",cU="menu.itemSelect",cI=C.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...i}=e,a=C.useRef(null),o=ch(cT,e.__scopeMenu),s=cw(cT,e.__scopeMenu),A=(0,tB.useComposedRefs)(t,a),l=C.useRef(!1);return(0,w.jsx)(cQ,{...i,ref:A,disabled:r,onClick:(0,tC.composeEventHandlers)(e.onClick,()=>{let e=a.current;if(!r&&e){let t=new CustomEvent(cU,{bubbles:!0,cancelable:!0});e.addEventListener(cU,e=>n?.(e),{once:!0}),(0,tQ.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?l.current=!1:o.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:(0,tC.composeEventHandlers)(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:(0,tC.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==s.searchRef.current;r||t&&" "===e.key||l8.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});cI.displayName=cT;var cQ=C.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:i,...a}=e,o=cw(cT,r),s=cl(r),A=C.useRef(null),l=(0,tB.useComposedRefs)(t,A),[c,d]=C.useState(!1),[u,h]=C.useState("");return C.useEffect(()=>{let e=A.current;e&&h((e.textContent??"").trim())},[a.children]),(0,w.jsx)(cn.ItemSlot,{scope:r,disabled:n,textValue:i??u,children:(0,w.jsx)(l3,{asChild:!0,...s,focusable:!n,children:(0,w.jsx)(tQ.Primitive.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:l,onPointerMove:(0,tC.composeEventHandlers)(e.onPointerMove,c1(e=>{n?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,tC.composeEventHandlers)(e.onPointerLeave,c1(e=>o.onItemLeave(e))),onFocus:(0,tC.composeEventHandlers)(e.onFocus,()=>d(!0)),onBlur:(0,tC.composeEventHandlers)(e.onBlur,()=>d(!1))})})})}),cj=C.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...i}=e;return(0,w.jsx)(cN,{scope:e.__scopeMenu,checked:r,children:(0,w.jsx)(cI,{role:"menuitemcheckbox","aria-checked":cZ(r)?"mixed":r,...i,ref:t,"data-state":c0(r),onSelect:(0,tC.composeEventHandlers)(i.onSelect,()=>n?.(!!cZ(r)||!r),{checkForDefaultPrevented:!1})})})});cj.displayName="MenuCheckboxItem";var cL="MenuRadioGroup",[c_,cP]=co(cL,{value:void 0,onValueChange:()=>{}}),cD=C.forwardRef((e,t)=>{let{value:r,onValueChange:n,...i}=e,a=(0,lK.useCallbackRef)(n);return(0,w.jsx)(c_,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,w.jsx)(cE,{...i,ref:t})})});cD.displayName=cL;var cR="MenuRadioItem",cM=C.forwardRef((e,t)=>{let{value:r,...n}=e,i=cP(cR,e.__scopeMenu),a=r===i.value;return(0,w.jsx)(cN,{scope:e.__scopeMenu,checked:a,children:(0,w.jsx)(cI,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":c0(a),onSelect:(0,tC.composeEventHandlers)(n.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});cM.displayName=cR;var cO="MenuItemIndicator",[cN,cH]=co(cO,{checked:!1}
47),cV=C.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...i}=e,a=cH(cO,r);return(0,w.jsx)(tI.Presence,{present:n||cZ(a.checked)||!0===a.checked,children:(0,w.jsx)(tQ.Primitive.span,{...i,ref:t,"data-state":c0(a.checked)})})});cV.displayName=cO;var cK=C.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,w.jsx)(tQ.Primitive.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});cK.displayName="MenuSeparator";var cG=C.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,i=cA(r);return(0,w.jsx)(lV.Arrow,{...i,...n,ref:t})});cG.displayName="MenuArrow";var[cW,cz]=co("MenuSub"),c$="MenuSubTrigger",cq=C.forwardRef((e,t)=>{let r=cd(c$,e.__scopeMenu),n=ch(c$,e.__scopeMenu),i=cz(c$,e.__scopeMenu),a=cw(c$,e.__scopeMenu),o=C.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:A}=a,l={__scopeMenu:e.__scopeMenu},c=C.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return C.useEffect(()=>c,[c]),C.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),A(null)}},[s,A]),(0,w.jsx)(cm,{asChild:!0,...l,children:(0,w.jsx)(cQ,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":cJ(r.open),...e,ref:(0,tB.composeRefs)(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:(0,tC.composeEventHandlers)(e.onPointerMove,c1(t=>{a.onItemEnter(t),!t.defaultPrevented&&(e.disabled||r.open||o.current||(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100)))})),onPointerLeave:(0,tC.composeEventHandlers)(e.onPointerLeave,c1(e=>{c();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,i="right"===n,o=t[i?"left":"right"],A=t[i?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+(i?-5:5),y:e.clientY},{x:o,y:t.top},{x:A,y:t.top},{x:A,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:(0,tC.composeEventHandlers)(e.onKeyDown,t=>{let i=""!==a.searchRef.current;e.disabled||i&&" "===t.key||ce[n.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});cq.displayName=c$;var cX="MenuSubContent",cY=C.forwardRef((e,t)=>{let r=cy(cb,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,a=cd(cb,e.__scopeMenu),o=ch(cb,e.__scopeMenu),s=cz(cX,e.__scopeMenu),A=C.useRef(null),l=(0,tB.useComposedRefs)(t,A);return(0,w.jsx)(cn.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(tI.Presence,{present:n||a.open,children:(0,w.jsx)(cn.Slot,{scope:e.__scopeMenu,children:(0,w.jsx)(ck,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:"rtl"===o.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&A.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,tC.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:(0,tC.composeEventHandlers)(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:(0,tC.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=ct[o.dir].includes(e.key);t&&r&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});function cJ(e){return e?"open":"closed"}function cZ(e){return"indeterminate"===e}function c0(e){return cZ(e)?"indeterminate":e?"checked":"unchecked"}function c1(e){return t=>"mouse"===t.pointerType?e(t):void 0}cY.displayName=cX;var c2="DropdownMenu",[c4,c3]=(0,tS.createContextScope)(c2,[cs]),c5=cs(),[c6,c8]=c4(c2),c7=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,A=c5(t),l=C.useRef(null),[c,d]=(0,tE.useControllableState)({prop:i,defaultProp:a??!1,onChange:o,caller:c2});return(0,w.jsx)(c6,{scope:t,triggerId:(0,tk.useId)(),triggerRef:l,contentId:(0,tk.useId)(),open:c,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,w.jsx)(cp,{...A,open:c,onOpenChange:d,dir:n,modal:s,children:r})})};c7.displayName=c2;var c9="DropdownMenuTrigger",de=C.forwardRef((e,t)=>
47{let{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,a=c8(c9,r),o=c5(r);return(0,w.jsx)(cm,{asChild:!0,...o,children:(0,w.jsx)(tQ.Primitive.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...i,ref:(0,tB.composeRefs)(t,a.triggerRef),onPointerDown:(0,tC.composeEventHandlers)(e.onPointerDown,e=>{!n&&0===e.button&&!1===e.ctrlKey&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:(0,tC.composeEventHandlers)(e.onKeyDown,e=>{!n&&(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});de.displayName=c9;var dt="DropdownMenuContent",dr=C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c8(dt,r),a=c5(r),o=C.useRef(!1);return(0,w.jsx)(cv,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...n,ref:t,onCloseAutoFocus:(0,tC.composeEventHandlers)(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:(0,tC.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!i.modal||n)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dr.displayName=dt,C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cE,{...i,...n,ref:t})}).displayName="DropdownMenuGroup",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cF,{...i,...n,ref:t})}).displayName="DropdownMenuLabel";var dn=C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cI,{...i,...n,ref:t})});dn.displayName="DropdownMenuItem",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cj,{...i,...n,ref:t})}).displayName="DropdownMenuCheckboxItem",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cD,{...i,...n,ref:t})}).displayName="DropdownMenuRadioGroup",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cM,{...i,...n,ref:t})}).displayName="DropdownMenuRadioItem",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cV,{...i,...n,ref:t})}).displayName="DropdownMenuItemIndicator",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cK,{...i,...n,ref:t})}).displayName="DropdownMenuSeparator",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cG,{...i,...n,ref:t})}).displayName="DropdownMenuArrow",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cq,{...i,...n,ref:t})}).displayName="DropdownMenuSubTrigger",C.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,i=c5(r);return(0,w.jsx)(cY,{...i,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}).displayName="DropdownMenuSubContent";let di=(0,tb.cva)({base:{mx:"4",p:"3",borderRadius:8,zIndex:0x989682,background:"modal-background",boxShadow:"0px 0px 50px 0px #0000001F",border:"dropdown-border"}}),da=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(dr,{...r,ref:n,className:(0,tx.css)(di.raw(),tx.css.raw(t)),children:e})),ds=(0,tb.cva)({base:{display:"flex",alignItems:"center",fontSize:16,color:"text-default",background:"modal-background",p:"3",outline:"none",cursor:"pointer",transition:"background-color 150ms linear",_hover:{backgroundColor:"gray/10"},"&:focus":{backgroundColor:"gray/10"}}}),dA=(0,C.forwardRef)(({children:e,css:t,...r},n)=>(0,w.jsx)(dn,{...r,ref:n,className:(0,tx.css)(ds.raw(),tx.css.raw(t)),children:e})),dl=(0,C.forwardRef)(({children:e,trigger:t,contentProps:r,...n},i)=>{let[a,o]=(0,C.useState)(!1);return(0,w.jsxs)(c7,{...n,open:n.open??a,onOpenChange:n.onOpenChange??o,children:[(0,w.jsx)(de,{asChild:!0,children:t}),(n.open||a)&&(0,w.jsx)(da,{ref:i,...r,children:e})]})});dl.displayName="Dropdown";let dc=({context:e,wallets:t,selectedWalletAddress:r,chain:n,disablePasteWalletAddressOption:i,testId:a,onSelect:o,onAnalyticEvent:s,onLinkNewWallet:A,setAddressModalOpen:l,disableWalletFiltering:c=!1})=>{let[d,u]=(0,C.useState)(!1),h=(0,C.useContext)(z.ProviderOptionsContext).vmConnectorKeyOverrides,p=(0,C.useMemo)(()=>{let e;return!n||c?t:(h&&h[9286185]?e=h[9286185]:"svm"===n.vmType&&(e=X),t.filter(t=>t.vmType===n.vmType&&(9286185!==n.id||!!e.includes(t.connector.toLowerCase()))&&!(0x2f3fb341===n.id&&e.includes(t.connector.toLowerCase()))))},[t,n,c]),m=(0,C.useMemo)(()=>t.find(e=>{var t,n;return t=e.vmType,n=e.address,!!n&&!!r&&("evm"===t||"suivm"===t?n.toLowerCase()===r.toLowerCase():n===r)}),[t,r]),f=(0,C.useMemo)(()=>!n||ea(n?.vmType,r,n?.id,m?.connector,h),[r,m,n?.vmType,n?.id,h]),g="origin"!==e||p.length>0,y=n?.vmType==="evm"||n?.vmType==="hypevm"||m?.vmType==="evm"||m?.vmType==="hypevm",{displayName:b}=eU(r,{enabled:y&&f}),x=y&&!!b;return(0,w.jsx)(dl,{open:!!g&&d,onOpenChange:t=>{g&&(u(t),s?.(t?N.EventNames.WALLET_SELECTOR_OPEN:N.EventNames.WALLET_SELECTOR_CLOSE,{context:e}))},trigger:(0,w.jsxs)(E.Button,{"aria-label":"Multi wallet dropdown",color:!m&&r?"warning":"ghost",onClick:()=>{g||(A(),s?.(N.EventNames.WALLET_SELECTOR_SELECT,{context:"not_connected"}))},size:"none",corners:"pill",css:{gap:"2",px:"2 !important",py:"1",cursor:"pointer",display:"flex",alignContent:"center"},"data-testid":a,children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",flexShrink:1,minWidth:0},children:[f&&m?.walletLogoUrl?(0,w.jsx)("img",{src:m.walletLogoUrl,style:{width:16,height:16,borderRadius:4,flexShrink:0}}):r&&!m?(0,w.jsx)(T.Box,{css:{color:"amber11",flexShrink:0},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClipboard,width:16,height:16})}):null,(0,w.jsx)(F.Text,{style:"subtitle2",css:{color:!m&&r?"amber11":"anchor-color",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:f&&r&&""!=r?x?b:eT(r):"Select wallet"})]}),g&&(0,w.jsx)(T.Box,{css:{color:!m&&r?"amber11":"anchor-color",flexShrink:0},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faChevronDown,width:14,height:14})})]}),contentProps:{sideOffset:12,alignOffset:-12,align:"end",css:{maxWidth:248,p:0}},children:(0,w.jsxs)(k.Flex,{direction:"column",css:{borderRadius:12,p:"1",gap:"1"},children:[p.map((e,t)=>(0,w.jsxs)(dA,{"aria-label":e.address,onClick:()=>{s?.(N.EventNames.WALLET_SELECTOR_SELECT,{context:"select_option",wallet_address:e.address,wallet_vm:e.vmType,w
47allet_icon:e.walletLogoUrl??""}),u(!1),o(e)},css:{...dd,"--borderColor":"colors.gray.6",border:"1px solid var(--borderColor)"},children:[e.walletLogoUrl?(0,w.jsx)("img",{src:e.walletLogoUrl,style:{width:16,height:16,borderRadius:4}}):null,(0,w.jsx)(F.Text,{style:"subtitle2",children:eT(e.address)})]},t)),(0,w.jsx)(dA,{"aria-label":"Connect a new wallet",css:{...dd},onClick:()=>{s?.(N.EventNames.WALLET_SELECTOR_SELECT,{context:"link_option"}),A()},children:(0,w.jsx)(F.Text,{style:"subtitle2",children:"Connect a new wallet"})}),"destination"!==e||i?null:(0,w.jsx)(dA,{"aria-label":"Paste wallet address",css:{...dd},onClick:()=>{s?.(N.EventNames.WALLET_SELECTOR_SELECT,{context:"custom_option"}),l?.(!0)},children:(0,w.jsx)(F.Text,{style:"subtitle2",children:"Paste wallet address"})})]})})},dd={borderRadius:8,gap:"2",cursor:"pointer",p:"2",transition:"backdrop-filter 250ms linear",_hover:{backdropFilter:"brightness(98%)"},flexShrink:0,alignContent:"center",width:"100%"},du=(e,t)=>{if(e&&t&&t.chainId===e.id){let r=[...e?.erc20Currencies??[],e.currency??void 0],n=r.find(e=>e?.address===t?.address);if(n&&n.supportsBridging)return t;{let t=r.find(e=>e?.supportsBridging);if(t){let r;return{chainId:Number(r=e.id),address:t?.address??"",name:t?.name??"",symbol
47:t?.symbol??"",decimals:t?.decimals??0,logoURI:`${eB.ASSETS_RELAY_API}/icons/currencies/${t?.id??t?.symbol?.toLowerCase()??r}.png`,verified:!0}}}}return null},dh=(e,t,r,n)=>!!n||void 0!==t&&e===t&&(r!==t||n),dp=new Set([1,42161,8453,0x2f3fb341]),dm=(e,t,r)=>{let n,i=r??(0,Au.getStarredChainIds)(),a=e.find(e=>void 0===e.id),o=e.filter(e=>void 0!==e.id);if(void 0===i){let r=t||Array.from(dp),i=e.filter(e=>void 0!==e.id).map(e=>e.id),a=r.filter(e=>i.includes(e));if(a.length>0){(0,Au.setRelayUiKitData)({starredChainIds:a});let e=new Set(a);n=o.filter(t=>t.id&&e.has(t.id)).sort((e,t)=>e.displayName.localeCompare(t.displayName))}else n=[]}else if(0===i.length)n=[];else{let e=new Set(i);n=o.filter(t=>t.id&&e.has(t.id)).sort((e,t)=>e.displayName.localeCompare(t.displayName))}return{allChainsOption:a,starredChains:n,alphabeticalChains:o.sort((e,t)=>e.displayName.localeCompare(t.displayName))}},df=function(e=eB.MAINNET_RELAY_API,t,r){let n=new URL(`${e}/currencies/v2`);return(0,ek.axiosPostFetcher)(n.href,t,r)};function dg(e,t,r){let n=(0,$.useQuery)({queryKey:["useTokenList",t],queryFn:()=>df(e,t),enabled:!!t,retry:!1,...r});return(0,C.useMemo)(()=>({...n,data:n.error?void 0:n.data}),[n.data,n.error,n.isLoading])}let dy=({open:e,onOpenChange:t,data:r,onAcceptToken:n,onDecline:i,onAnalyticEvent:a})=>{let o=(0,J.default)(),s=o?.chains?.find(e=>e.id===r?.token?.chainId),A=r?.token?.logoURI&&r?.token?.logoURI!=="missing.png";return(0,w.jsx)(Ai,{trigger:null,open:e,onOpenChange:t,onPointerDownOutside:()=>{i?.(r?.token,r?.context)},onCloseButtonClicked:()=>{i?.(r?.token,r?.context)},css:{overflow:"hidden",zIndex:0x989681},overlayZIndex:0x989681,children:(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:"4",sm:{width:370}},children:[(0,w.jsx)(F.Text,{style:"h6",children:"Unverified Token"}),(0,w.jsxs)(k.Flex,{align:"center",direction:"column",css:{gap:"4"},children:[(0,w.jsxs)(k.Flex,{align:"center",justify:"center",children:[A?(0,w.jsx)("img",{src:r?.token.logoURI,alt:r?.token?.name,style:{width:"48px",height:"48px",borderRadius:9999}}):null,(0,w.jsx)(k.Flex,{align:"center",css:{width:"48px",height:"48px",background:"amber3",borderRadius:9999,p:"3",marginLeft:A?"-20px":"0"},children:(0,w.jsx)(T.Box,{css:{color:"amber9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faExclamationTriangle,width:24,height:24,style:{width:24,height:24}})})})]}),(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",css:{textAlign:"center"},children:"This token isnât traded on leading U.S. centralized exchanges or frequently swapped on major DEXes. Always conduct your own research before trading."}),(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"3",p:"3",bg:"gray2",borderRadius:"12px",width:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",ellipsify:!0,children:r?.token?.address}),(0,w.jsx)(Az,{text:r?.token?.address??""}),(0,w.jsx)(Ad,{href:`${s?.explorerUrl}/token/${r?.token?.address}`,target:"_blank",css:{height:"14px"},children:(0,w.jsx)(T.Box,{css:{color:"gray9",_hover:{color:"gray11"}},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faExternalLink})})})]}),(0,w.jsxs)(k.Flex,{css:{gap:"3",width:"100%"},children:[(0,w.jsx)(E.Button,{onClick:()=>{i?.(r?.token,r?.context),t(!1)},color:"ghost",css:{flex:1,justifyContent:"center",bg:"gray3",_hover:{bg:"gray4"}},children:"Cancel"}),(0,w.jsx)(E.Button,{cta:!0,onClick:()=>{if(r?.token){let e=`${r?.token.chainId}:${r?.token.address}`,t=(0,Au.alreadyAcceptedToken)(r?.token),n=(0,Au.getRelayUiKitData)();t||(0,Au.setRelayUiKitData)({acceptedUnverifiedTokens:[...n.acceptedUnverifiedTokens,e]}),a?.(N.EventNames.UNVERIFIED_TOKEN_ACCEPTED,{token:r?.token,context:r?.context})}n(r?.token,r?.context)},color:"warning",css:{flex:1,justifyContent:"center",px:"16px"},children:"I Understand"})]})]})]})})};var db=e.i(190025);let dx=Object.values(e.i(649751)).reduce((e,t)=>(e[t.id]=t,e),{});var dw=e.i(321960);let dv=function(e=eB.MAINNET_RELAY_API,t,r){let n=new URL(`${e}/chains`);return(0,eS.setParams)(n,t??{}),(0,ek.default)(n.href,r)},dC={staleTime:3e5,gcTime:3e5,refetchOnMount:!1,refetchOnWindowFocus:!1},dB=()=>{var e,t;let r,n=(0,U.useRelayClient)(),i=(0,C.useContext)(z.ProviderOptionsContext);return e=n?.baseApiUrl,t={includeChains:i.privateChainIds?.join(","),referrer:n?.source},r=(0,$.useQuery)({queryKey:["useRelayChains",e,t],queryFn:()=>dv(e,t),retry:!1,...dC}),(0,C.useMemo)(()=>{let e=r?.data?.chains?.map(e=>{let t,r;return t=(r=[999,1337].includes(e.id)?void 0:dx[e.id])||{id:e.id,name:e.displayName,nativeCurrency:{name:e.currency.name??"Ethereum",decimals:e.currency.decimals??18,symbol
47:e.currency.symbol??"ETH"},rpcUrls:{default:{http:[e.httpRpcUrl],webSocket:[e.wsRpcUrl]},public:{http:[e.httpRpcUrl],webSocket:[e.wsRpcUrl]}},blockExplorers:{etherscan:{name:e.explorerName,url:e.explorerUrl},default:{name:e.explorerName,url:e.explorerUrl}}},{...e,viemChain:t,icon:{dark:`${eB.ASSETS_RELAY_API}/icons/${e.id}/dark.png`,light:e.iconUrl??`${eB.ASSETS_RELAY_API}/icons/${e.id}/light.png`,squaredDark:`${eB.ASSETS_RELAY_API}/icons/square/${e.id}/dark.png`,squaredLight:`${eB.ASSETS_RELAY_API}/icons/square/${e.id}/light.png`}}});return{...r,viemChains:e?.map(e=>e.viemChain),chains:e||[(0,db.convertViemChainToRelayChain)(dw.mainnet)]}},[r.data,r.data?.chains,r.error,r.isLoading])},dS=(e,t,r,n,i,a=!0)=>{let{chains:o}=dB(),s=(0,C.useMemo)(()=>o?new Map(o.filter(e=>e?.currency?.address).map(e=>[`${e.id}:${e.currency?.address?.toLowerCase()}`,!0])):new Map,[o]);return(0,C.useMemo)(()=>e?e.map(e=>{if("number"!=typeof e?.chainId||!e?.address||!e?.symbol||!e?.name||"number"!=typeof e?.decimals)return null;let r=o?.find(t=>t.id===e.chainId),n=`${e.chainId}:${e.address.toLowerCase()}`,i=t?.[n];return{chainId:e.chainId,address:e.address,symbol:e.symbol,name:e.name,decimals:e.decimals,logoURI:e.metadata?.logoURI??"",verified:e.metadata?.verified??!1,vmType:e.vmType,balance:i,isGasCurrency:1337!==e.chainId&&s.has(`${e.chainId}:${e.address.toLowerCase()}`),chain:r}}).filter(e=>null!==e).filter((e,t,r)=>t===r.findIndex(t=>t.chainId===e.chainId&&t.address.toLowerCase()===e.address.toLowerCase())).filter(e=>!i||e.chainId===i).filter(e=>"from"!==r||!!n||"evm"===e.vmType).sort((e,t)=>{if(a){let r=e.balance?.value_usd??0,n=t.balance?.value_usd??0;if(r!==n)return n-r}return 0}):[],[e,t,r,n,i,s,a])};var dk="Toggle",dE=C.forwardRef((e,t)=>
47{let{pressed:r,defaultPressed:n,onPressedChange:i,...a}=e,[o,s]=(0,tE.useControllableState)({prop:r,onChange:i,defaultProp:n??!1,caller:dk});return(0,w.jsx)(tQ.Primitive.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:(0,tC.composeEventHandlers)(e.onClick,()=>{e.disabled||s(!o)})})});dE.displayName=dk;var dF="ToggleGroup",[dT,dU]=(0,tS.createContextScope)(dF,[lJ]),dI=lJ(),dQ=C.default.forwardRef((e,t)=>{let{type:r,...n}=e;if("single"===r)return(0,w.jsx)(d_,{...n,ref:t});if("multiple"===r)return(0,w.jsx)(dP,{...n,ref:t});throw Error(`Missing prop \`type\` expected on \`${dF}\``)});dQ.displayName=dF;var[dj,dL]=dT(dF),d_=C.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:i=()=>{},...a}=e,[o,s]=(0,tE.useControllableState)({prop:r,defaultProp:n??"",onChange:i,caller:dF});return(0,w.jsx)(dj,{scope:e.__scopeToggleGroup,type:"single",value:C.default.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:C.default.useCallback(()=>s(""),[s]),children:(0,w.jsx)(dM,{...a,ref:t})})}),dP=C.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:i=()=>{},...a}=e,[o,s]=(0,tE.useControllableState)({prop:r,defaultProp:n??[],onChange:i,caller:dF}),A=C.default.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=C.default.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,w.jsx)(dj,{scope:e.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:A,onItemDeactivate:l,children:(0,w.jsx)(dM,{...a,ref:t})})});dQ.displayName=dF;var[dD,dR]=dT(dF),dM=C.default.forwardRef((e,t)=>{let{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...A}=e,l=dI(r),c=lH(o),d={role:"group",dir:c,...A};return(0,w.jsx)(dD,{scope:r,rovingFocus:i,disabled:n,children:i?(0,w.jsx)(l1,{asChild:!0,...l,orientation:a,dir:c,loop:s,children:(0,w.jsx)(tQ.Primitive.div,{...d,ref:t})}):(0,w.jsx)(tQ.Primitive.div,{...d,ref:t})})}),dO="ToggleGroupItem",dN=C.default.forwardRef((e,t)=>{let r=dL(dO,e.__scopeToggleGroup),n=dR(dO,e.__scopeToggleGroup),i=dI(e.__scopeToggleGroup),a=r.value.includes(e.value),o=n.disabled||e.disabled,s={...e,pressed:a,disabled:o},A=C.default.useRef(null);return n.rovingFocus?(0,w.jsx)(l3,{asChild:!0,...i,focusable:!o,active:a,ref:A,children:(0,w.jsx)(dH,{...s,ref:t})}):(0,w.jsx)(dH,{...s,ref:t})});dN.displayName=dO;var dH=C.default.forwardRef((e,t)=>{let{__scopeToggleGroup:r,value:n,...i}=e,a=dL(dO,r),o={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s="single"===a.type?o:void 0;return(0,w.jsx)(dE,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(n):a.onItemDeactivate(n)}})});let dV=(0,tb.cva)({base:{display:"flex",flexDirection:"column"}}),dK=(0,tb.cva)({base:{display:"flex",alignItems:"center",position:"relative",userSelect:"none",cursor:"pointer","&[data-state=on]":{}}}),dG=({children:e,onSelect:t,css:r})=>(0,w.jsx)(dQ,{type:"single",loop:!1,onValueChange:t,className:(0,tx.css)(dV.raw(),tx.css.raw(r)),children:e}),dW=(0,C.forwardRef)(({children:e,value:t,css:r,asChild:n,...i},a)=>(0,w.jsx)(dN,{value:t,className:(0,tx.css)(dK.raw(),tx.css.raw(r)),asChild:n,...i,ref:a,children:e}));dW.displayName="AccessibleListItem";let dz=({title:e,tokens:t,isLoading:r,isLoadingBalances:n,chainFilterId:i,showMoreButton:a})=>{let[o,s]=(0,C.useState)(!1),A=a&&t&&t.length>4&&!o?t.slice(0,4):t;return r?(0,w.jsx)(w.Fragment,{children:Array.from({length:10}).map((e,t)=>(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"2",p:"2",width:"100%"},children:[(0,w.jsx)(Av.Skeleton,{css:{width:40,height:40,borderRadius:"50%",flexShrink:0}}),(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"2px",flexGrow:1},children:[(0,w.jsx)(Av.Skeleton,{css:{width:"60%",height:16}}),(0,w.jsx)(Av.Skeleton,{css:{width:"40%",height:16}})]})]},t))}):A.length>0?(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"1",width:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:e}),A.map(e=>{let t=`${e.chainId}:${e.address}`,r=!!(e.balance&&e.decimals&&e.balance.toString().length-e.decimals>4);return(0,w.jsx)(dW,{value:t,asChild:!0,children:(0,w.jsxs)(E.Button,{color:"ghost",css:{gap:"2",cursor:"pointer",px:"2",py:"2",transition:"backdrop-filter 250ms linear",_hover:{backgroundColor:"gray/10"},flexShrink:0,alignContent:"center",display:"flex",width:"100%","--focusColor":"colors.focus-color",_focusVisible:{boxShadow:"inset 0 0 0 2px var(--focusColor)"},'&[data-state="on"]':{boxShadow:"inset 0 0 0 2px var(--focusColor)"},_active:{boxShadow:"inset 0 0 0 2px var(--focusColor)"},_focusWithin:{boxShadow:"inset 0 0 0 2px var(--focusColor)"},scrollSnapAlign:"start"},children:[(0,w.jsx)(AU,{chainId:e.chainId,tokenlogoURI:e.logoURI,tokenSymbol:e.symbol,size:"lg"}),(0,w.jsxs)(k.Flex,{direction:"column",align:"start",css:{gap:"2px",maxWidth:"100%",minWidth:0},children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",maxWidth:"100%"},children:[(0,w.jsx)(F.Text,{style:"h6",ellipsify:!0,css:{gap:"1",alignItems:"center"},children:e.symbol}),e.isGasCurrency&&i&&(0,w.jsx)(F.Text,{style:"subtitle3",css:{px:"6px",py:"4px",borderRadius:"100px",backgroundColor:"gray3",whiteSpace:"nowrap",flexShrink:0,lineHeight:"12px","button:hover &":{backgroundColor:"gray5"}},children:"Gas Token"})]}),(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",maxWidth:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:i?"subtle":void 0,ellipsify:!0,children:i?e.name:e.chain?.displayName||e.name}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",ellipsify:!0,css:{textWrap:"nowrap"},children:eT(e.address)}),e.verified?null:(0,w.jsx)(T.Box,{css:{color:"gray8"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faExclamationTriangle,width:14,height:14})})]})]}),(e.balance||n)&&(0,w.jsx)(k.Flex,{direction:"column",align:"end",css:{gap:"2px",ml:"auto",flexShrink:0},children:n?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Av.Skeleton,{css:{ml:"auto",width:60}}),(0,w.jsx)(Av.Skeleton,{css:{ml:"auto",width:60}})]}):(0,w.jsxs)(w.Fragment,{children:[e.balance?.value_usd&&e.balance.value_usd>0&&(0,w.jsx)(F.Text,{style:"h6",children:(0,j.formatDollar)(e.balance?.value_usd)}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:(0,j.formatBN)(e.balance.amount,4,e.decimals,r)})]})})]})},t)}),a&&(0,w.jsxs)(E.Button,{color:"grey",size:"small",corners:"pill",css:{ml:"auto",minHeight:24,px:"2",py:"1"},onClick:()=>s(!o),children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:o?"Less":"More"}),(0,w.jsx)(F.Text,{style:"body1",css:{color:"gray9",marginLeft:"auto",transform:o?"rotate(180deg)":"rotate(0)",width:12},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faChevronDown})})]})]}):void 0},d$=[984122,1625,2911,17071,7865,1996,1514,660279];function dq(e){return Array.isArray?Array.isArray(e):"[object Array]"===d2(e)}let dX=1/0;function dY(e){return"string"==typeof e}function dJ(e){return"number"==typeof e}function dZ(e){return"object"==typeof e}function d0(e){return null!=e}function d1(e){return!e.trim().length}
47function d2(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let d4=Object.prototype.hasOwnProperty;class d3{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=d5(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function d5(e){let t=null,r=null,n=null,i=1,a=null;if(dY(e)||dq(e))n=e,t=d6(e),r=d8(e);else{if(!d4.call(e,"name"))throw Error("Missing name property in key");let o=e.name;if(n=o,d4.call(e,"weight")&&(i=e.weight)<=0)throw Error(`Property 'weight' in key '${o}' must be a positive integer`);t=d6(o),r=d8(o),a=e.getFn}return{path:t,id:r,weight:i,src:n,getFn:a}}function d6(e){return dq(e)?e:e.split(".")}function d8(e){return dq(e)?e.join("."):e}var d7={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(e,t){let r=[],n=!1,i=(e,t,a)=>{if(d0(e))if(t[a]){var o,s;let A=e[t[a]];if(!d0(A))return;if(a===t.length-1&&(dY(A)||dJ(A)||!0===(o=A)||!1===o||dZ(s=o)&&null!==s&&"[object Boolean]"==d2(o)))r.push(null==A?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-dX?"-0":t}(A));else if(dq(A)){n=!0;for(let e=0,r=A.length;e<r;e+=1)i(A[e],t,a+1)}else t.length&&i(A,t,a+1)}else r.push(e)};return i(e,dY(t)?t.split("."):t,0),n?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};let d9=/[^ ]+/g;class ue{constructor({getFn:e=d7.getFn,fieldNormWeight:t=d7.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let i=t.match(d9).length;if(r.has(i))return r.get(i);let a=parseFloat(Math.round(1/Math.pow(i,.5*e)*n)/n);return r.set(i,a),a},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,dY(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();dY(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!d0(e)||d1(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((t,n)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(d0(i)){if(dq(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:r,value:n}=t.pop();if(d0(n))if(dY(n)&&!d1(n)){let t={v:n,i:r,n:this.norm.get(n)};e.push(t)}else dq(n)&&n.forEach((e,r)=>{t.push({nestedArrIndex:r,value:e})})}r.$[n]=e}else if(dY(i)&&!d1(i)){let e={v:i,n:this.norm.get(i)};r.$[n]=e}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function ut(e,t,{getFn:r=d7.getFn,fieldNormWeight:n=d7.fieldNormWeight}={}){let i=new ue({getFn:r,fieldNormWeight:n});return i.setKeys(e.map(d5)),i.setSources(t),i.create(),i}function ur(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:i=d7.distance,ignoreLocation:a=d7.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(n-r);return i?o+s/i:s?1:o}let un=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A7
475\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class ui{constructor(e,{location:t=d7.location,threshold:r=d7.threshold,distance:n=d7.distance,includeMatches:i=d7.includeMatches,findAllMatches:a=d7.findAllMatches,minMatchCharLength:o=d7.minMatchCharLength,isCaseSensitive:s=d7.isCaseSensitive,ignoreDiacritics:A=d7.ignoreDiacritics,ignoreLocation:l=d7.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:A,ignoreLocation:l},e=s?e:e.toLowerCase(),e=A?un(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,r=d-t;for(;e<r;)c(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?un(e):e,this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:A,ignoreLocation:l}=this.options,c=[],d=0,u=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:h})=>{let{isMatch:p,score:m,indices:f}=function(e,t,r,{location:n=d7.location,distance:i=d7.distance,threshold:a=d7.threshold,findAllMatches:o=d7.findAllMatches,minMatchCharLength:s=d7.minMatchCharLength,includeMatches:A=d7.includeMatches,ignoreLocation:l=d7.ignoreLocation}={}){let c;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let d=t.length,u=e.length,h=Math.max(0,Math.min(n,u)),p=a,m=h,f=s>1||A,g=f?Array(u):[];for(;(c=e.indexOf(t,m))>-1;)if(p=Math.min(ur(t,{currentLocation:c,expectedLocation:h,distance:i,ignoreLocation:l}),p),m=c+d,f){let e=0;for(;e<d;)g[c+e]=1,e+=1}m=-1;let y=[],b=1,x=d+u,w=1<<d-1;for(let n=0;n<d;n+=1){let a=0,s=x;for(;a<s;)ur(t,{errors:n,currentLocation:h+s,expectedLocation:h,distance:i,ignoreLocation:l})<=p?a=s:x=s,s=Math.floor((x-a)/2+a);x=s;let A=Math.max(1,h-s+1),c=o?u:Math.min(h+s,u)+d,v=Array(c+2);v[c+1]=(1<<n)-1;for(let a=c;a>=A;a-=1){let o=a-1,s=r[e.charAt(o)];if(f&&(g[o]=+!!s),v[a]=(v[a+1]<<1|1)&s,n&&(v[a]|=(y[a+1]|y[a])<<1|1|y[a+1]),v[a]&w&&(b=ur(t,{errors:n,currentLocation:o,expectedLocation:h,distance:i,ignoreLocation:l}))<=p){if(p=b,(m=o)<=h)break;A=Math.max(1,2*h-m)}}if(ur(t,{errors:n+1,currentLocation:h,expectedLocation:h,distance:i,ignoreLocation:l})>p)break;y=v}
47let v={isMatch:m>=0,score:Math.max(.001,b)};if(f){let e=function(e=[],t=d7.minMatchCharLength){let r=[],n=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&-1===n?n=a:o||-1===n||((i=a-1)-n+1>=t&&r.push([n,i]),n=-1)}return e[a-1]&&a-n>=t&&r.push([n,a-1]),r}(g,s);e.length?A&&(v.indices=e):v.isMatch=!1}return v}(e,t,r,{location:i+h,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:A,includeMatches:n,ignoreLocation:l});p&&(u=!0),d+=m,p&&f&&(c=[...c,...f])});let h={isMatch:u,score:u?d/this.chunks.length:1};return u&&n&&(h.indices=c),h}}class ua{constructor(e){this.pattern=e}static isMultiMatch(e){return uo(e,this.multiRegex)}static isSingleMatch(e){return uo(e,this.singleRegex)}search(){}}function uo(e,t){let r=e.match(t);return r?r[1]:null}class us extends ua{constructor(e,{location:t=d7.location,threshold:r=d7.threshold,distance:n=d7.distance,includeMatches:i=d7.includeMatches,findAllMatches:a=d7.findAllMatches,minMatchCharLength:o=d7.minMatchCharLength,isCaseSensitive:s=d7.isCaseSensitive,ignoreDiacritics:A=d7.ignoreDiacritics,ignoreLocation:l=d7.ignoreLocation}={}){super(e),this._bitapSearch=new ui(e,{location:t,threshold:r,distance:n,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:A,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class uA extends ua{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+i,n.push([t,r-1]);let a=!!n.length;return{isMatch:a,score:+!a,indices:n}}}let ul=[class extends ua{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},uA,class extends ua{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},class extends ua{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends ua{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},class extends ua{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},class extends ua{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},us],uc=ul.length,ud=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,uu=new Set([us.type,uA.type]),uh=[];function up(e,t){for(let r=0,n=uh.length;r<n;r+=1){let n=uh[r];if(n.condition(e,t))return new n(e,t)}return new ui(e,t)}let um="$and",uf="$path",ug=e=>!!(e[um]||e.$or),uy=e=>({[um]:Object.keys(e).map(t=>({[t]:e[t]}))});function ub(e,t,{auto:r=!0}={}){let n=e=>{let i=Object.keys(e),a=!!e[uf];if(!a&&i.length>1&&!ug(e))return n(uy(e));if(!dq(e)&&dZ(e)&&!ug(e)){let n=a?e[uf]:i[0],o=a?e.$val:e[n];if(!dY(o))throw Error(`Invalid value for key ${n}`);let s={keyId:d8(n),pattern:o};return r&&(s.searcher=up(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let r=e[t];dq(r)&&r.forEach(e=>{o.children.push(n(e))})}),o};return ug(e)||(e=uy(e)),n(e)}function ux(e,t){let r=e.matches;
47t.matches=[],d0(r)&&r.forEach(e=>{if(!d0(e.indices)||!e.indices.length)return;let{indices:r,value:n}=e,i={indices:r,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function uw(e,t){t.score=e.score}class uv{constructor(e,t={},r){this.options={...d7,...t},this.options.useExtendedSearch,this._keyStore=new d3(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof ue))throw Error("Incorrect 'index' type");this._myIndex=t||ut(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){d0(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let r=0,n=this._docs.length;r<n;r+=1){let i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:r,includeScore:n,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=dY(e)?dY(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return!function(e,{ignoreFieldNorm:t=d7.ignoreFieldNorm}){e.forEach(e=>{let r=1;e.matches.forEach(({key:e,norm:n,score:i})=>{let a=e?e.weight:null;r*=Math.pow(0===i&&a?Number.EPSILON:i,(a||1)*(t?1:n))}),e.score=r})}(s,{ignoreFieldNorm:o}),i&&s.sort(a),dJ(t)&&t>-1&&(s=s.slice(0,t)),function(e,t,{includeMatches:r=d7.includeMatches,includeScore:n=d7.includeScore}={}){let i=[];return r&&i.push(ux),n&&i.push(uw),e.map(e=>{let{idx:r}=e,n={item:t[r],refIndex:r};return i.length&&i.forEach(t=>{t(e,n)}),n})}(s,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){let t=up(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:e,i:r,n:i})=>{if(!d0(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&n.push({item:e,idx:r,matches:[{score:o,value:e,norm:i,indices:s}]})}),n}_searchLogical(e){let t=ub(e,this.options),r=(e,t,n)=>{if(!e.children){let{keyId:r,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:i});return a&&a.length?[{idx:n,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=r(e.children[a],t,n);if(o.length)i.push(...o);else if(e.operator===um)return[]}return i},n=this._myIndex.records,i={},a=[];return n.forEach(({$:e,i:n})=>
47{if(d0(e)){let o=r(t,e,n);o.length&&(i[n]||(i[n]={idx:n,item:e,matches:[]},a.push(i[n])),o.forEach(({matches:e})=>{i[n].matches.push(...e)}))}}),a}_searchObjectList(e){let t=up(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach(({$:e,i:n})=>{if(!d0(e))return;let a=[];r.forEach((r,n)=>{a.push(...this._findMatches({key:r,value:e[n],searcher:t}))}),a.length&&i.push({idx:n,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:r}){if(!d0(t))return[];let n=[];if(dq(t))t.forEach(({v:t,i:i,n:a})=>{if(!d0(t))return;let{isMatch:o,score:s,indices:A}=r.searchIn(t);o&&n.push({score:s,key:e,value:t,idx:i,norm:a,indices:A})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:A}=r.searchIn(i);o&&n.push({score:s,key:e,value:i,norm:a,indices:A})}return n}}uv.version="7.1.0",uv.createIndex=ut,uv.parseIndex=function(e,{getFn:t=d7.getFn,fieldNormWeight:r=d7.fieldNormWeight}={}){let{keys:n,records:i}=e,a=new ue({getFn:t,fieldNormWeight:r});return a.setKeys(n),a.setIndexRecords(i),a},uv.config=d7,uv.parseQuery=ub,function(...e){uh.push(...e)}(class{constructor(e,{isCaseSensitive:t=d7.isCaseSensitive,ignoreDiacritics:r=d7.ignoreDiacritics,includeMatches:n=d7.includeMatches,minMatchCharLength:i=d7.minMatchCharLength,ignoreLocation:a=d7.ignoreLocation,findAllMatches:o=d7.findAllMatches,location:s=d7.location,threshold:A=d7.threshold,distance:l=d7.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:A,distance:l},e=t?e:e.toLowerCase(),e=r?un(e):e,this.pattern=e,this.query=function(e,t={}){return e.split("|").map(e=>{let r=e.trim().split(ud).filter(e=>e&&!!e.trim()),n=[];for(let e=0,i=r.length;e<i;e+=1){let i=r[e],a=!1,o=-1;for(;!a&&++o<uc;){let e=ul[o],r=e.isMultiMatch(i);r&&(n.push(new e(r,t)),a=!0)}if(!a)for(o=-1;++o<uc;){let e=ul[o],r=e.isSingleMatch(i);if(r){n.push(new e(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?un(e):e;let a=0,o=[],s=0;for(let n=0,i=t.length;n<i;n+=1){let i=t[n];o.length=0,a=0;for(let t=0,n=i.length;t<n;t+=1){let n=i[t],{isMatch:A,indices:l,score:c}=n.search(e);if(A){if(a+=1,s+=c,r){let e=n.constructor.type;uu.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return r&&(e.indices=o),e}}return{isMatch:!1,score:1}}});let uC=e=>(0,w.jsxs)("svg",{width:"269",height:"269",viewBox:"0 0 269 269",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,w.jsx)("mask",{id:"mask0_9457_8334",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"11",y:"11",width:"119",height:"119",children:(0,w.jsx)("path",{d:"M111.65 11.1951H28.9226C19.1321 11.1951 11.1953 19.1318 11.1953 28.9224V111.65C11.1953 121.44 19.1321 129.377 28.9226 129.377H111.65C121.441 129.377 129.377 121.44 129.377 111.65V28.9224C129.377 19.1318 121.441 11.1951 111.65 11.1951Z",fill:"white"})}),(0,w.jsxs)("g",{mask:"url(#mask0_9457_8334)",children:[(0,w.jsx)("path",{d:"M111.65 11.1951H28.9226C19.1321 11.1951 11.1953 19.1318 11.1953 28.9224V111.65C11.1953 121.44 19.1321 129.377 28.9226 129.377H111.65C121.441 129.377 129.377 121.44 129.377 111.65V28.9224C129.377 19.1318 121.441 11.1951 111.65 11.1951Z",fill:"#F7931A"}),(0,w.jsx)("path",{d:"M96.3462 61.8671C97.5225 54.0033 91.5349 49.7763 83.3473 46.9564L86.0034 36.3043L79.5184 34.6886L76.9328 45.0602C75.2279 44.6351 73.4771 44.2345 71.737 43.8373L74.3414 33.3972L67.8604 31.7815L65.2028 42.4301C63.792 42.1089 62.4063 41.7915 61.062 41.457L61.0695 41.4235L52.1265 39.1906L50.4014 46.1162C50.4014 46.1162 55.2128 47.2189 55.1114 47.2868C57.7374 47.9422 58.2123 49.6804 58.1335 51.0581L55.1079 63.1934C55.2887 63.2393 55.5233 63.3057 55.7821 63.4097C55.5657 63.356 55.3355 63.2974 55.0966 63.2402L50.8558 80.24C50.5349 81.0377 49.7203 82.2349 47.8843 81.7803C47.9493 81.8745 43.1709 80.6042 43.1709 80.6042L39.9512 88.0266L48.3903 90.1301C49.9603 90.5238 51.4988 90.9357 53.0139 91.323L50.3304 102.097L56.8079 103.713L59.4654 93.0531C61.235 93.5335 62.9523 93.9765 64.6335 94.3942L61.9849 105.004L68.4702 106.62L71.1534 95.8655C82.2118 97.9581 90.5267 97.1144 94.0266 87.1133C96.8468 79.0612 93.8862 74.4168 88.0685 71.3881C92.3058 70.411 95.4975 67.6244 96.3485 61.8679L96.3462 61.8671ZM81.5295 82.6416C79.5253 90.6937 65.9666 86.341 61.5707 85.2495L65.1318 70.9754C69.5274 72.0727 83.6237 74.2441 81.5295 82.6416ZM83.5351 61.7504C81.7068 69.0746 70.4218 65.3536 66.761 64.4411L69.9896 51.4954C73.6504 52.4078 85.439 54.1108 83.5351 61.7504Z",fill:"white"})]}),(0,w.jsx)("path",{d:"M240.078 11.1951H157.35C147.56 11.1951 139.623 19.1318 139.623 28.9224V111.65C139.623 121.44 147.56 129.377 157.35 129.377H240.078C249.868 129.377 257.805 121.44 257.805 111.65V28.9224C257.805 19.1318 249.868 11.1951 240.078 11.1951Z",fill:"#2151F5"}),(0,w.jsx)("path",{d:"M154.396 66.5192H220.321V73.974H154.396C154.407 78.2573 155.803 82.8428 157.382 86.7837C164.783 105.261 183.836 116.345 203.498 114.38C225.114 112.221 242.926 93.0306 243.032 71.2441C243.057 65.9361 242.33 60.621 240.541 55.5994C235.502 41.4618 223.498 30.5974 208.86 27.1329C188.033 22.2037 166.118 33.3099 157.716 52.9745C155.953 57.0991 154.433 61.9936 154.396 66.5192Z",fill:"white"}),(0,w.jsx)("mask",{id:"mask1_9457_8334",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"11",y:"139",width:"119",height:"119",children:(0,w.jsx)("path",{d:"M111.65 139.623H28.9226C19.1321 139.623 11.1953 147.56 11.1953 157.35V240.078C11.1953 249.868 19.1321 257.805 28.9226 257.805H111.65C121.441 257.805 129.377 249.868 129.377 240.078V157.35C129.377 147.56 121.441 139.623 111.65 139.623Z",fill:"white"})}),(0,w.jsxs)("g",{mask:"url(#mask1_9457_8334)",children:[(0,w.jsx)("path",{d:"M111.65 139.623H28.9226C19.1321 139.623 11.1953 147.56 11.1953 157.35V240.078C11.1953 249.868 19.1321 257.805 28.9226 257.805H111.65C121.441 257.805 129.377 249.868 129.377 240.078V157.35C129.377 147.56 121.441 139.623 111.65 139.623Z",fill:"#FF0000"}),(0,w.jsx)("path",{d:"M70.2868 240.799C93.5298 240.799 112.372 221.957 112.372 198.714C112.372 175.471 93.5298 156.629 70.2868 156.629C47.0439 156.629 28.2017 175.471 28.2017 198.714C28.2017 221.957 47.0439 240.799 70.2868 240.799Z",fill:"white"}),(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M70.2864 257.805C102.922 257.805 129.378 231.349 129.378 198.714C129.378 166.079 102.922 139.623 70.2864 139.623C37.6514 139.623 11.1953 166.079 11.1953 198.714C11.1953 231.349 37.6514 257.805 70.2864 257.805ZM48.0469 214.945C49.6636 215.454 51.4151 215.708 53.3013 215.708C57.6426 215.708 61.1006 214.706 63.6753 212.7C66.25 210.664 68.0464 207.595 69.0644 203.493C69.3639 202.206 69.6483 200.918 69.9177 199.631C70.2172 198.343 70.4715 197.041 70.6812 195.724C71.0404 193.688 70.9806 191.907 70.5015 190.38C70.0524 188.853 69.259 187.565 68.1213 186.517C67.0135 185.47 65.6513 184.691 64.0346 184.182C62.4479 183.643 60.7113 183.374 58.8251 183.374C54.454 183.374 50.9809 184.422 48.4062 186.517C45.8315 188.613 44.05 191.682 43.062 195.724C42.7625 197.041 42.4633 198.343 42.1638 199.631C41.8943 200.918 41.6398 202.206 41.4003 203.493C41.0711 205.529 41.1309 207.31 41.58 208.837C42.0591 210.364 42.8523 211.637 43.9602 212.655C45.068 213.673 46.4302 214.436 48.0469 214.945ZM58.1515 207.804C56.924 208.762 55.5018 209.241 53.8851 209.241C52.2384 209.241 51.0558 208.762 50.3373 207.804C49.6187 206.846 49.4391 205.319 49.7984 203.224C50.0378 201.906 50.2775 200.664 50.5169 199.496C50.7864 198.329 51.0858 197.116 51.4151 195.859C51.924 193.763 52.7773 192.236 53.9749 191.278C55.2024 190.32 56.6246 189.841 58.2413 189.841C59.858 189.841 61.0406 190.32 61.7891 191.278C62.5377 192.236 62.7173 193.763 62.3281 195.859C62.1184 197.116 61.879 198.329 61.6095 199.496C61.3701 200.664 61.0855 201.906 60.7562 203.224C60.2473 205.319 59.3789 206.846 58.1515 207.804ZM71.8001 214.945C71.9798 215.155 72.2192 215.259 72.5187 215.259H78.6263C78.9556 215.259 79.2399 215.155 79.4796 214.945C79.7491 214.735 79.9136 214.466 79.9736 214.137L82.0394 204.301H88.1022C91.9644 204.301 95.0331 203.478 97.3086 201.831C99.6138 200.185 101.141 197.64 101.889 194.197C102.249 192.46 102.233 190.949 101.844 189.661C101.455 188.344 100.767 187.251 99.7786 186.383C98.7906 185.515 97.548 184.871 96.0511 184.452C94.584 184.033 92.9373 183.823 91.1111 183.823H79.1652C78.8658 183.823 78.5814 183.928 78.312 184.137C78.0425 184.347 77.8778 184.616 77.818 184.946L71.6205 214.137C71.5604 214.466 71.6205 214.735 71.8001 214.945ZM88.3716 198.104H83.2071L84.9585 190.065H90.3476C91.4255 190.065 92.2187 190.245 92.7278 190.604C93.2668 190.963 93.5811 191.443 93.6709 192.041C93.7607 192.64 93.7307 193.329 93.5811 194.107C93.2816 195.454 92.638 196.457 91.65 197.116C90.6918 197.775 89.5991 198.104 88.3716 198.104Z",fill:"#FF0000"})]}),(0,w.jsx)("path",{d:"M240.078 139.623H157.35C147.56 139.623 139.623 147.56 139.623 157.35V240.078C139.623 249.868 147.56 257.805 157.35 257.805H240.078C249.868 257.805 257.805 249.868 257.805 240.078V157.35C257.805 147.56 249.868 139.623 240.078 139.623Z",fill:"black"}),(0,w.jsx)("mask",{id:"mask2_9457_8334",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"160",y:"163",width:"78",height:"71",children:(0,w.jsx)("path",{d:"M237.123 163.998H160.305V233.43H237.123V163.998Z",fill:"white"})}),(0,w.jsxs)("g",{mask:"url(#mask2_9457_8334)",children:[(0,w.jsx)("mask",{id:"mask3_9457_8334",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"160",y:"163",width:"78",height:"71",children:(0,w.jsx)("path",{d:"M237.106 163.998H160.305V233.276H237.106V163.998Z",fill:"white"})}),(0,w.jsx)("g",{mask:"url(#mask3_9457_8334)",children:(0,w.jsx)("path",{d:"M236.71 218.619L224.032 232.332C223.757 232.63 223.423 232.868 223.053 233.03C222.682 233.192 222.282 233.276 221.878 233.276H161.777C161.49 233.276 161.209 233.191 160.969 233.033C160.73 232.874 160.541 232.648 160.427 232.383C160.312 232.118 160.277 231.825 160.326 231.54C160.375 231.254 160.505 230.99 160.7 230.779L173.388 217.065C173.663 216.768 173.996 216.531 174.365 216.368C174.734 216.206 175.133 216.122 175.536 216.
47121H235.634C235.921 216.121 236.201 216.206 236.441 216.364C236.681 216.523 236.87 216.749 236.984 217.014C237.098 217.279 237.133 217.573 237.085 217.858C237.036 218.143 236.906 218.407 236.71 218.619ZM224.032 191.003C223.757 190.705 223.423 190.468 223.053 190.305C222.682 190.143 222.282 190.059 221.878 190.06H161.777C161.49 190.06 161.209 190.144 160.969 190.303C160.73 190.461 160.541 190.687 160.427 190.952C160.312 191.218 160.277 191.511 160.326 191.796C160.375 192.081 160.505 192.345 160.7 192.557L173.388 206.271C173.663 206.568 173.996 206.805 174.365 206.967C174.734 207.129 175.133 207.213 175.536 207.214H235.634C235.921 207.214 236.201 207.13 236.441 206.971C236.681 206.812 236.87 206.587 236.984 206.321C237.098 206.056 237.133 205.763 237.085 205.478C237.036 205.193 236.906 204.928 236.71 204.717L224.032 191.003ZM161.777 181.152H221.878C222.282 181.153 222.682 181.069 223.053 180.907C223.423 180.744 223.757 180.507 224.032 180.209L236.71 166.495C236.906 166.284 237.036 166.019 237.085 165.734C237.133 165.449 237.098 165.156 236.984 164.891C236.87 164.625 236.681 164.4 236.441 164.241C236.201 164.082 235.921 163.998 235.634 163.998H175.536C175.133 163.998 174.734 164.083 174.365 164.245C173.996 164.407 173.663 164.644 173.388 164.941L160.704 178.655C160.508 178.866 160.378 179.131 160.329 179.415C160.281 179.7 160.315 179.993 160.429 180.258C160.543 180.523 160.731 180.749 160.971 180.908C161.21 181.067 161.49 181.152 161.777 181.152Z",fill:"url(#paint0_linear_9457_8334)"})})]}),(0,w.jsx)("defs",{children:(0,w.jsxs)("linearGradient",{id:"paint0_linear_9457_8334",x1:"166.788",y1:"234.927",x2:"230.418",y2:"163.808",gradientUnits:"userSpaceOnUse",children:[(0,w.jsx)("stop",{offset:"0.08",stopColor:"#9945FF"}),(0,w.jsx)("stop",{offset:"0.3",stopColor:"#8752F3"}),(0,w.jsx)("stop",{offset:"0.5",stopColor:"#5497D5"}),(0,w.jsx)("stop",{offset:"0.6",stopColor:"#43B4CA"}),(0,w.jsx)("stop",{offset:"0.72",stopColor:"#28E0B9"}),(0,w.jsx)("stop",{offset:"0.97",stopColor:"#19FB9B"})]})})]}),uB=({tag:e})=>(0,w.jsx)(F.Text,{style:"subtitle3",css:{backgroundColor:"primary5",color:"primary11",px:"6px",py:"4px",borderRadius:"100px",fontStyle:"italic",lineHeight:"100%"},children:e}),uS=(0,C.forwardRef)(({value:e,onChange:t,placeholder:r="Search for a chain",onKeyDown:n},i)=>(0,w.jsx)(ty.Input,{ref:i,placeholder:r,icon:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faMagnifyingGlass,width:16,height:16})}
47),containerCss:{width:"100%",height:40,mb:"2"},css:{width:"100%",_placeholder_parent:{textOverflow:"ellipsis"},"--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",backgroundColor:"modal-background"},value:e,onChange:e=>t(e.target.value),onKeyDown:n})),uk={includeScore:!0,includeMatches:!0,threshold:.2,keys:["id","name","displayName"]},uE=({options:e,value:t,isOpen:r,onSelect:n,onAnalyticEvent:i,onInputRef:a,tokenSearchInputRef:o,popularChainIds:s,context:A,onChainStarToggle:l,starredChainIds:c})=>{let[d,u]=(0,C.useState)(""),h=new uv(e,uk),p=(0,C.useRef)(null),[m,f]=(0,C.useState)(!1),{allChainsOption:g,starredChains:y,alphabeticalChains:b}=(0,C.useMemo)(()=>dm(e,s,c),[e,s,c,r]),x=(0,C.useMemo)(()=>{if(""===d.trim())return null;let e=h.search(d),t=new Map;return e.forEach(e=>{t.has(e.item.id)||t.set(e.item.id,e.item)}),Array.from(t.values())},[d,h]);return(0,C.useEffect)(()=>{p.current&&r&&!m?(p.current.scrollIntoView({behavior:"instant",block:"nearest"}),f(!0)):r||(f(!1),p.current=null)},[r,m]),(0,w.jsx)(k.Flex,{direction:"column",css:{maxWidth:212,flexShrink:0,gap:"1",bg:"gray3",borderRadius:12,p:"3"},children:(0,w.jsxs)(dG,{onSelect:t=>{if("input"!==t&&t){let r="all-chains"===t?{id:void 0,name:"All Chains"}:e.find(e=>e.id?.toString()===t);if(r){n(r);let e=void 0!==r.id&&y.some(e=>e.id===r.id);i?.(N.EventNames.CURRENCY_STEP_CHAIN_FILTER,{chain:r.name,chain_id:r.id,search_term:d,context:A,from_starred_list:e})}}},css:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[(0,w.jsx)(dW,{value:"input",asChild:!0,children:(0,w.jsx)(uS,{ref:a,placeholder:"Search chains",value:d,onChange:u})}),(0,w.jsx)(k.Flex,{direction:"column",css:{flex:1,overflowY:"auto",gap:"1",scrollbarColor:"var(--relay-colors-gray5) transparent"},children:x?x.map(e=>{let r="tags"in e?e.tags?.[0]:void 0,n=t.id===e.id;return(0,w.jsx)(uF,{chain:e,isActive:n,tag:r,onClick:e=>{e.detail>0&&o?.focus()},onChainStarToggle:l,value:e.id?.toString()??"all-chains",onAnalyticEvent:i},e.id?.toString()??"all-chains")}):(0,w.jsxs)(w.Fragment,{children:[g&&(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(uF,{chain:g,isActive:void 0===t.id,onClick:e=>{e.detail>0&&o?.focus()},onChainStarToggle:l,value:"all-chains",onAnalyticEvent:i},"all-chains")}),y.length>0&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{align:"center",css:{px:"2",py:"1",gap:"1"},children:[(0,w.jsx)(T.Box,{css:{color:"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:12,height:12})}),(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Starred Chains"}),(0,w.jsx)(AW.default,{content:(0,w.jsx)(F.Text,{style:"body3",children:"Right-click to star a chain"}),children:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faInfoCircle,width:12,height:12})})})]}),y.map(e=>{let r="tags"in e?e.tags?.[0]:void 0,n=t.id===e.id;return e.id?(0,w.jsx)(uF,{chain:e,isActive:n,tag:r,onClick:e=>{e.detail>0&&o?.focus()},onChainStarToggle:l,activeChainRef:n?p:void 0,value:e.id?.toString(),showStar:!1,onAnalyticEvent:i},e.id?.toString()):null})]}),(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",css:{px:"2",py:"1"},children:"Chains A-Z"}),b.map(e=>{let r="tags"in e?e.tags?.[0]:void 0,n=t.id===e.id;return e.id?(0,w.jsx)(uF,{chain:e,isActive:n,tag:r,onClick:e=>{e.detail>0&&o?.focus()},onChainStarToggle:l,activeChainRef:n?p:void 0,value:e.id?.toString(),onAnalyticEvent:i},e.id?.toString()):null})]})})]})})},uF=({chain:e,isActive:t,onClick:r,tag:n,value:i,activeChainRef:a,onChainStarToggle:o,showStar:s=!0,onAnalyticEvent:A})=>{let[l,c]=(0,C.useState)(!1),d=(0,C.useRef)(null),u=!!e.id&&(0,Au.isChainStarred)(e.id),h=(0,C.useCallback)(e=>{d.current&&!d.current.contains(e.target)&&c(!1)},[]),p=(0,C.useCallback)(e=>{"Escape"===e.key&&c(!1)},[]);return((0,C.useEffect)(()=>{if(l)return document.addEventListener("mousedown",h),document.addEventListener("touchstart",h),document.addEventListener("keydown",p),requestAnimationFrame(()=>{d.current?.scrollIntoView({block:"nearest"})}),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h),document.removeEventListener("keydown",p)}},[l,h,p]),e.id)?(0,w.jsxs)(k.Flex,{css:{position:"relative",width:"100%"},children:[(0,w.jsx)(dW,{value:i,asChild:!0,children:(0,w.jsxs)(E.Button,{color:"ghost",size:"none",onClick:r,ref:t?a:null,onContextMenu:e=>{e.preventDefault(),c(!0)},onKeyDown:e=>{e.shiftKey&&"F10"===e.key||"ContextMenu"===e.key?(e.preventDefault(),c(!0)):["ArrowDown","ArrowUp","Home","End"].includes(e.ke
47y)&&l&&c(!1)},css:{p:"2",display:"flex",alignItems:"center",gap:"2",width:"100%",...t&&{backgroundColor:"gray6"},transition:"backdrop-filter 250ms linear",_hover:{backgroundColor:t?"gray6":"gray/10"},"--focusColor":"colors.focus-color",_focus:{boxShadow:"inset 0 0 0 2px var(--focusColor)"}},children:[(0,w.jsx)(Ak,{chainId:e.id,square:!0,width:24,height:24}),(0,w.jsx)(F.Text,{style:"subtitle1",ellipsify:!0,children:"displayName"in e&&e.displayName||e.name}),s&&u&&(0,w.jsx)(T.Box,{css:{color:"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:16,height:16})}),n&&(0,w.jsx)(uB,{tag:n})]})}),l&&(0,w.jsx)("div",{ref:d,style:{position:"absolute",top:"100%",left:0,marginTop:"4px",minWidth:140,zIndex:9999},onClick:t=>{if(t.stopPropagation(),e.id){(0,Au.toggleStarredChain)(e.id);let t=u?N.EventNames.CHAIN_UNSTARRED:N.EventNames.CHAIN_STARRED;A?.(t,{chain:e.name,chain_id:e.id}),o?.(),c(!1)}},onMouseDown:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),children:(0,w.jsxs)(k.Flex,{css:{display:"flex",alignItems:"center",gap:"6px",padding:"3",borderRadius:12,cursor:"pointer",backgroundColor:"modal-background",_hover:{backgroundColor:"gray2"}},children:[(0,w.jsx)(T.Box,{css:{color:u?"gray8":"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:16,height:16})}),(0,w.jsx)(F.Text,{style:"subtitle1",css:{lineHeight:"20px"},children:u?"Unstar chain":"Star chain"})]})})]}):(0,w.jsx)(dW,{value:i,asChild:!0,children:(0,w.jsxs)(E.Button,{color:"ghost",size:"none",onClick:r,ref:t?a:null,css:{p:"2",display:"flex",alignItems:"center",gap:"2",position:"relative",...t&&{backgroundColor:"gray6"},transition:"backdrop-filter 250ms linear",_hover:{backgroundColor:t?"gray6":"gray/10"},"--focusColor":"colors.focus-color",_focus:{boxShadow:"inset 0 0 0 2px var(--focusColor)"}},children:[(0,w.jsx)(uC,{style:{width:24,height:24}}),(0,w.jsx)(F.Text,{style:"subtitle1",ellipsify:!0,children:e.name})]})})},uT=({chainId:e,depositAddressOnly:t,onSelect:r})=>{let{chains:n}=dB(),i=n?.find(t=>t.id===e),a=(0,C.useMemo)(()=>i?.featuredTokens?i.featuredTokens.filter(e=>!t||e.supportsBridging).map(t=>({...t,chainId:Number(e),verified:!0,logoURI:t?.metadata?.logoURI??""})):[],[i?.featuredTokens,e,t]);return a.length?(0,w.jsx)(k.Flex,{css:{width:"100%",alignItems:"center",flexWrap:"wrap",gap:"1",my:"2"},children:a.map((e,t)=>(0,w.jsx)(dW,{asChild:!0,value:`${e.chainId}:${e.address}`,children:(0,w.jsxs)(E.Button,{onClick:t=>{t.preventDefault(),r({...e})},color:"ghost",size:"none",css:{display:"flex",flexShrink:0,cursor:"pointer",outline:"none",p:"1",pr:"2",gap:1,alignItems:"center","--borderColor":"colors.gray5",border:"1px solid var(--borderColor)",borderRadius:"100px","--focusColor":"colors.focus-color",_focusVisible:{boxShadow:"inset 0 0 0 2px var(--focusColor)"},'&[data-state="on"]':{boxShadow:"inset 0 0 0 2px var(--focusColor)"},_active:{boxShadow:"inset 0 0 0 2px var(--focusColor)"},_focusWithin:{boxShadow:"inset 0 0 0 2px var(--focusColor)"}},children:[(0,w.jsx)(AU,{chainId:e.chainId,tokenlogoURI:e?.metadata?.logoURI,tokenSymbol:e.symbol}),(0,w.jsx)(F.Text,{style:"h6",ellipsify:!0,children:e.symbol})]})},`${e.chainId}:${e.address}:${t}`))}):null},uU={includeScore:!0,includeMatches:!0,threshold:.2,keys:["id","name","displayName"]},uI=({options:e,value:t,onSelect:r,onBack:n,onClose:i,onAnalyticEvent:a,popularChainIds:o,context:s,onChainStarToggle:A,starredChainIds:l})=>{let[c,d]=(0,C.useState)(""),u=new uv(e,uU),{allChainsOption:h,starredChains:p,alphabeticalChains:m}=(0,C.useMemo)(()=>dm(e,o,l),[e,o,l]),f=(0,C.useMemo)(()=>{if(""===c.trim())return null;let e=u.search(c),t=new Map;return e.forEach(e=>{t.has(e.item.id)||t.set(e.item.id,e.item)}),Array.from(t.values())},[c,u]),g=(0,C.useCallback)(e=>{r(e);let t=void 0!==e.id&&p.some(t=>t.id===e.id);a?.(N.EventNames.CURRENCY_STEP_CHAIN_FILTER,{chain:e.name,chain_id:e.id,search_term:c,context:s,from_starred_list:t}),n()},[r,a,c,s,p,n]);return(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:"3"},children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",width:"100%"},children:[(0,w.jsx)(E.Button,{color:"ghost",size:"none",onClick:n,css:{p:"2",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"40px",height:"40px",color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faArrowLeft,width:16,height:16})}),(0,w.jsx)(ty.Input,{placeholder:"Search a chain",icon:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faMagnifyingGlass,width:16,height:16})}
47),containerCss:{flex:1,height:40},css:{width:"100%",_placeholder_parent:{textOverflow:"ellipsis"}},value:c,onChange:e=>d(e.target.value)}),(0,w.jsx)(E.Button,{color:"ghost",size:"none",onClick:i,css:{p:"2",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"40px",height:"40px",color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faXmark,width:16,height:16})})]}),(0,w.jsx)(dG,{onSelect:t=>{if(t){let r="all-chains"===t?{id:void 0,name:"All Chains"}:e.find(e=>e.id?.toString()===t);r&&g(r)}},css:{display:"flex",flexDirection:"column",width:"100%",flex:1,overflowY:"auto",scrollbarColor:"var(--relay-colors-gray5) transparent"},children:f?f.map(e=>{let t="tags"in e?e.tags?.[0]:void 0;return(0,w.jsx)(uQ,{chain:e,tag:t,value:e.id?.toString()??"all-chains",onChainStarToggle:A,onAnalyticEvent:a},e.id?.toString()??"all-chains")}):(0,w.jsxs)(w.Fragment,{children:[h&&(0,w.jsx)(uQ,{chain:h,value:"all-chains",onAnalyticEvent:a}),p.length>0&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(k.Flex,{align:"center",css:{py:"2",gap:"2"},children:[(0,w.jsx)(T.Box,{css:{color:"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:16,height:16})}),(0,w.jsx)(F.Text,{style:"subtitle1",color:"subtle",children:"Starred Chains"}),(0,w.jsx)(AW.default,{content:(0,w.jsx)(F.Text,{style:"body3",children:"Long-press to star a chain"}),children:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faInfoCircle,width:14,height:14})})})]}),p.map(e=>{let t="tags"in e?e.tags?.[0]:void 0;return e.id?(0,w.jsx)(uQ,{chain:e,tag:t,value:e.id.toString(),onChainStarToggle:A,showStar:!1,onAnalyticEvent:a},e.id.toString()):null})]}),(0,w.jsx)(F.Text,{style:"subtitle1",color:"subtle",css:{py:"2"},children:"Chains A-Z"}),m.map(e=>{let t="tags"in e?e.tags?.[0]:void 0;return e.id?(0,w.jsx)(uQ,{chain:e,tag:t,value:e.id.toString(),onChainStarToggle:A,onAnalyticEvent:a},e.id.toString()):null})]})})]})},uQ=({chain:e,tag:t,value:r,onChainStarToggle:n,showStar:i=!0,onAnalyticEvent:a})=>{let[o,s]=(0,C.useState)(!1),[A,l]=(0,C.useState)(null),c=(0,C.useRef)(null),d=!!e.id&&(0,Au.isChainStarred)(e.id),u=(0,C.useCallback)(e=>{c.current&&!c.current.contains(e.target)&&s(!1)},[]),h=(0,C.useCallback)(e=>{"Escape"===e.key&&s(!1)},[]);(0,C.useEffect)(()=>{if(o)return document.addEventListener("mousedown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("click",u,!0),document.addEventListener("keydown",h),requestAnimationFrame(()=>{c.current?.scrollIntoView({block:"nearest"})}),()=>{document.removeEventListener("mousedown",u,!0),document.removeEventListener("touchstart",u,!0),document.removeEventListener("click",u,!0),document.removeEventListener("keydown",h)}},[o,u,h]);let p=(0,C.useCallback)(()=>{if(e.id){(0,Au.toggleStarredChain)(e.id);let t=d?N.EventNames.CHAIN_UNSTARRED:N.EventNames.CHAIN_STARRED;a?.(t,{chain:e.name,chain_id:e.id}),n?.(),s(!1)}},[e.id,e.name,d,a,n]),m=(0,C.useCallback)(t=>{e.id&&l(setTimeout(()=>{"vibrate"in navigator&&navigator.vibrate(50),s(!0)},500))},[e.id]),f=(0,C.useCallback)(()=>{A&&(clearTimeout(A),l(null))},[A]),g=(0,C.useCallback)(()=>{A&&(clearTimeout(A),l(null))},[A]);return e.id?(0,w.jsxs)("div",{style:{position:"relative",width:"100%"},children:[(0,w.jsx)(dW,{value:r,asChild:!0,children:(0,w.jsxs)(E.Button,{color:"ghost",size:"none",onContextMenu:e=>{e.preventDefault(),s(!0)},onKeyDown:e=>{(e.shiftKey&&"F10"===e.key||"ContextMenu"===e.key)&&(e.preventDefault(),s(!0))},onTouchStart:m,onTouchEnd:f,onTouchMove:g,css:{py:"3",px:"2",display:"flex",alignItems:"center",gap:"2",width:"100%",height:"56px",borderRadius:"12px",userSelect:"none",_hover:{backgroundColor:"gray3"}},style:{WebkitUserSelect:"none"},children:[(0,w.jsx)(Ak,{chainId:e.id,square:!0,width:24,height:24}),(0,w.jsx)(F.Text,{style:"subtitle1",css:{flex:1,textAlign:"left"},children:"displayName"in e&&e.displayName||e.name}),i&&d&&(0,w.jsx)(T.Box,{css:{color:"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:16,height:16})}),t&&(0,w.jsx)(uB,{tag:t})]})}),o&&(0,w.jsx)("div",{ref:c,style:{position:"absolute",top:"100%",left:0,marginTop:"4px",minWidth:160,zIndex:999999},onClick:e=>{e.stopPropagation(),p()},onMouseDown:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation(),children:(0,w.jsxs)(k.Flex,{css:{alignItems:"center",gap:"8px",padding:"8px",borderRadius:12,cursor:"pointer",backgroundColor:"gray1","--borderColor":"colors.subtle-border-color",border:"1px solid var(--borderColor)",_hover:{backgroundColor:"gray2"}},children:[(0,w.jsx)(T.Box,{css:{color:d?"gray8":"primary9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faStar,width:16,height:16})}),(0,w.jsx)(F.Text,{style:"subtitle1",css:{lineHeight:"20px"},children:d?"Unstar chain":"Star chain"})]})})]}):(0,w.jsx)(dW,{value:r,asChild:!0,children:(0,w.jsxs)(E.Button,{color:"ghost",size:"none",css:{py:"3",px:"2",dis
47play:"flex",alignItems:"center",gap:"2",width:"100%",height:"56px",borderRadius:"12px",_hover:{backgroundColor:"gray3"}},children:[(0,w.jsx)(uC,{style:{width:24,height:24}}),(0,w.jsx)(F.Text,{style:"subtitle1",children:e.name})]})})},uj=({options:e,value:t,onSelect:r,onMoreClick:n,popularChainIds:i,starredChainIds:a,onAnalyticEvent:o,context:s})=>{let A=(0,C.useMemo)(()=>{let{allChainsOption:t,starredChains:r,alphabeticalChains:n}=dm(e,i,a),o=[];t&&o.push(t);let s=5-o.length,A=r.slice(0,s);o.push(...A);let l=o.length;if(l<5){let e=new Set(o.map(e=>e.id)),t=n.filter(t=>t.id&&i?.includes(t.id)&&!e.has(t.id)).slice(0,5-l);o.push(...t);let r=o.length;if(r<5){let e=new Set(o.map(e=>e.id)),t=n.filter(t=>t.id&&!e.has(t.id)).slice(0,5-r);o.push(...t)}}return o.slice(0,5)},[e,i,a]);return(0,w.jsxs)(k.Flex,{css:{gap:"2",width:"100%",overflowX:"auto",py:"2"},children:[A.map(e=>(0,w.jsx)(uL,{chain:e,isSelected:t.id===e.id,onClick:()=>{o?.(N.EventNames.CURRENCY_STEP_CHAIN_FILTER,{chain:e.name,chain_id:e.id,search_term:"",context:s,from_starred_list:a?.includes(e.id)??!1}),r(e)}},e.id?.toString()??"all-chains")),(0,w.jsxs)(E.Button,{color:"ghost",size:"none",onClick:n,css:{display:"flex",alignItems:"center",gap:"1",px:"2",py:"10px",height:"40px",borderRadius:"8px",backgroundColor:"dropdown-background",color:"gray9",_hover:{backgroundColor:"gray3"}},children:[(0,w.jsx)(F.Text,{style:"subtitle1",color:"subtle",children:"More"}),(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faChevronRight,width:16,height:16})]})]})},uL=({chain:e,isSelected:t,onClick:r})=>(0,w.jsx)(E.Button,{color:"ghost",size:"none",onClick:r,css:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1",py:"2",px:"3",borderRadius:"12px",backgroundColor:t?"gray6":"dropdown-background",_hover:{backgroundColor:t?"gray6":"gray3"}},children:e.id?(0,w.jsx)(Ak,{chainId:e.id,width:24,height:24,css:{borderRadius:"4px",overflow:"hidden"}}):(0,w.jsx)(F.Text,{style:"subtitle1",css:{height:"24px",width:"20px"},children:"All"})}),u_=function(e=eB.MAINNET_RELAY_API,t,r){let n=new URL(`${e}/currencies/trending`);return(0,eS.setParams)(n,t??{}),(0,ek.default)(n.href,r)},uP=({token:e,trigger:t,chainIdsFilter:r,lockedChainIds:n,context:i,address:a,isValidAddress:o,multiWalletSupportEnabled:s=!1,fromChainWalletVMSupported:A,supportedWalletVMs:l,popularChainIds:c,setToken:d,onAnalyticEvent:u})=>{var h,p,m;let f,g=(0,J.default)(),{chains:y}=dB(),b=(0,em.useMediaQuery)("(min-width: 660px)"),[x,v]=(0,C.useState)(!1),[B,S]=(0,C.useState)("tokens"),[U,I]=(0,C.useState)(!1),[Q,j]=(0,C.useState)(),[L,P]=(0,C.useState)({id:void 0,name:"All Chains"}),[D,R]=(0,C.useState)(()=>(0,Au.getStarredChainIds)()),{value:M,debouncedValue:O,setValue:H}=ef("",500),V="from"===i?L?.vmType?!l?.includes(L.vmType):!!L.id&&!A&&L.id===e?.chainId:!A,K=V&&"to"===i,G=(0,C.useMemo)(()=>{let e=y?.filter(e=>g?.chains?.find(t=>t.id===e.id))??[];return s||"from"!==i||(e=e.filter(e=>"evm"===e.vmType)),K&&(e=e.filter(({id:e})=>!d$.includes(e))),e.sort((e,t)=>{let r=dp.has(e.id),n=dp.has(t.id);return r&&!n?-1:!r&&n?1:r&&n?Array.from(dp).indexOf(e.id)-Array.from(dp).indexOf(t.id):e.displayName.localeCompare(t.displayName)})},[y,g?.chains,s,i,V]),W=(0,C.useMemo)(()=>{if(n)return n;let e=G.map(e=>e.id);return r&&(e=e.filter(e=>!r.includes(e))),e},[G,n,r,V]),z=W.length>1,q="from"===i?G?.filter(e=>("evm"===e.vmType||"suivm"===e.vmType||"tvm"===e.vmType||"hypevm"===e.vmType||0x2f3fb341===e.id||9286185===e.id||8253038===e.id)&&W.includes(e.id)):G?.filter(e=>W.includes(e.id)),X=(0,C.useMemo)(()=>[...K?[]:[{id:void 0,name:"All Chains"}],...q],[K,q,D]),ee=""===O,{data:et,balanceMap:er,isLoading:en}=Y(a&&a!==Z.evmDeadAddress&&a!==Z.solDeadAddress&&a!==Z.bitcoinDeadAddress&&o?a:void 0,g?.baseApiUrl?.includes("testnet")?"testnet":"mainnet",{staleTime:6e4,gcTime:6e4}),ei=(0,C.useMemo)(()=>et?.balances?.filter(e=>W.includes(e.chain_id)),[et?.balances,W]),eo=(0,C.useMemo)(()=>{if(ei&&ei.length>0)return ei.map(e=>`${e.chain_id}:${e.address}`)},[ei]),{data:es,isLoading:eA}=dg(g?.baseApiUrl,eo?{tokens:eo,limit:100,depositAddressOnly:V,referrer:g?.source}:void 0,{enabled:!!ei}),el=ea(L.vmType,O,L.id),{data:ec,isLoading:ed}=(h=g?.baseApiUrl,p={referrer:g?.source},m={enabled:"to"===i},f=["useTrendingCurrencies",p],(0,$.useQuery)({queryKey:f,queryFn:()=>u_(h,p),...m,enabled:m?.enabled})),{data:eu,isLoading:eh}=dg(g?.baseApiUrl,{chainIds:L.id?[L.id]:G.map(e=>e.id),address:el?O:void 0,term:el?void 0:O,defaultList:ee&&!V,limit:12,depositAddressOnly:V,referrer:g?.source}),{data:ep,isLoading:eg}=dg(g?.baseApiUrl,{chainIds:L.id?[L.id]:G.map(e=>e.id),address:el?O:void 0,term:el?void 0:O,defaultList:!1,limit:12,useExternalSearch:!0,referrer:g?.source},{enabled:!!O&&!V}),ey=(0,C.useMemo)(()=>{var e;let t,r;
47return O?(e=[eu,ep],t=[],r=new Set,e.forEach(e=>{e&&e.forEach(e=>{if(!e)return;let n=`${e.chainId}:${e.address?.toLowerCase()}`;r.has(n)||(r.add(n),t.push(e))})}),t):eu},[eu,ep,O]),eb=dS(es,er,i,s,L.id,!0),ex=dS(ec,er,"to",s,void 0,!1),ew=dS(ey,er,i,s,L.id,!1),[ev,eC]=(0,C.useState)(null),[eB,eS]=(0,C.useState)(null),ek=z?ev:eB,eE=(0,C.useCallback)(()=>{R((0,Au.getStarredChainIds)())},[]);(0,C.useEffect)(()=>{x&&R((0,Au.getStarredChainIds)())},[x]);let eF=(0,C.useCallback)(()=>{H(""),eC(null),eS(null),S("tokens")},[]),eT=(0,C.useCallback)(t=>{var r,n,o,s,A;let l,c,d=0,h=0,p=0;try{!en&&er&&(c=Object.keys(er).length,Object.values(er).forEach(e=>{let t=e.symbol?e.symbol.toLowerCase():e.symbol;"usdc"===t?d+=1:"usdt"===t?h+=1:"eth"===t&&(p+=1)})),u?.(t?N.EventNames.SWAP_START_TOKEN_SELECT:N.EventNames.SWAP_EXIT_TOKEN_SELECT,{direction:"from"===i?"input":"output",...!t&&{balanceData:{tokenCount:c,usdcCount:d,usdtCount:h,ethCount:p,balanceAddress:a}}})}catch(e){console.error(e)}t&&P((r=q,n=i,o=V,s=e,l={id:void 0,name:"All Chains"},1===r.length?r[0]:o?s?r.find(e=>e.id===s.chainId)||l:r[0]:A||void 0===s||"from"===n?l:r.find(e=>e.id===s.chainId)||l)),v(t)},[er,en,i,a,u,v,q,V,e]),eU=(0,C.useCallback)(e=>{let t,r=e.verified,n="from"===i?"input":"output";if(O.length>0&&(t=ew.findIndex(t=>t.chainId===e.chainId&&t.address?.toLowerCase()===e.address?.toLowerCase())),r)u?.(N.EventNames.SWAP_TOKEN_SELECT,{direction:n,token_symbol
47:e.symbol,chain_id:e.chainId,token_address:e.address,search_term:O,position:t}),d(e);else{let r=(0,Au.getRelayUiKitData)(),i=`${e.chainId}:${e.address}`;if(r.acceptedUnverifiedTokens.includes(i))u?.(N.EventNames.SWAP_TOKEN_SELECT,{direction:n,token_symbol:e.symbol,chain_id:e.chainId,token_address:e.address,search_term:O,position:t}),d(e);else{j(e),I(!0);return}}eT(!1)},[d,eT,eF,i,u,O,ew]);return(0,C.useEffect)(()=>{x||eF()},[x]),(0,C.useEffect)(()=>{x&&ek&&b&&ek.focus()},[x,ek]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{position:"relative"},children:(0,w.jsx)(Ai,{open:x,onOpenChange:eT,showCloseButton:b,disableAnimation:!b,onOpenAutoFocus:e=>{b||e.preventDefault()},trigger:t,css:{p:"4",display:"flex",flexDirection:"column",height:b?"min(85vh, 600px)":"100%",maxHeight:b?"min(85vh, 600px)":"100%",borderRadius:b?"modal-border-radius":"0px",width:"100%",maxWidth:"100%",sm:{maxWidth:"100%"},"@media(min-width: 660px)":{minWidth:b?z?660:408:400,maxWidth:b&&z?660:408}},children:b||"chains"!==B?(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",height:"100%",gap:"3",overflowY:"hidden"},children:[b&&(0,w.jsx)(F.Text,{style:"h6",children:"Select Token"}),(0,w.jsxs)(k.Flex,{css:{flex:1,gap:"3",overflow:"hidden"},children:[b&&(!W||z)?(0,w.jsx)(uE,{options:X,value:L,isOpen:x,onSelect:P,onAnalyticEvent:u,onInputRef:eC,tokenSearchInputRef:eB,popularChainIds:c,context:i,onChainStarToggle:eE,starredChainIds:D}):null,(0,w.jsxs)(dG,{onSelect:e=>{if("input"===e)return;let[t,...r]=e.split(":"),n=r.join(":"),i=[...eb,...ew,...ex].find(e=>e.chainId===Number(t)&&e.address?.toLowerCase()===n?.toLowerCase());i&&eU(i)},css:{display:"flex",flexDirection:"column",width:"100%",minWidth:0,height:"100%"},children:[(0,w.jsxs)(k.Flex,{direction:"column",align:"start",css:{width:"100%",gap:"2",background:"modal-background"},children:[(0,w.jsxs)(k.Flex,{align:"center",css:{width:"100%",gap:"2"},children:[(0,w.jsx)(dW,{value:"input",asChild:!0,children:(0,w.jsx)(ty.Input,{ref:eS,placeholder:"Search for a token or paste address",icon:(0,w.jsx)(T.Box,{css:{color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faMagnifyingGlass,width:16,height:16})}
47),containerCss:{width:"100%",height:40,mb:b?"1":"0"},css:{width:"100%",_placeholder_parent:{textOverflow:"ellipsis"}},value:M,onChange:e=>{let t=e.target.value;H(t),ea(L.vmType,t)&&u?.(N.EventNames.TOKEN_SELECTOR_CONTRACT_SEARCH,{search_term:t,chain_filter:L.id})}})}),!b&&(0,w.jsx)(E.Button,{color:"ghost",size:"none",onClick:()=>eT(!1),css:{p:"2",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"40px",height:"40px",color:"gray9"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faXmark,width:16,height:16})})]}),b||W&&!z?null:(0,w.jsx)(uj,{options:X,value:L,onSelect:P,onMoreClick:()=>S("chains"),popularChainIds:c,starredChainIds:D,onAnalyticEvent:u,context:i}),b||void 0===L.id?null:(0,w.jsx)(k.Flex,{align:"center",css:{gap:"2",pb:"1",width:"100%"},children:(0,w.jsxs)(F.Text,{style:"subtitle2",color:"subtle",children:["Tokens on"," ","displayName"in L&&L.displayName||L.name]})})]}),(0,w.jsxs)(k.Flex,{direction:"column",css:{flex:1,overflowY:"auto",gap:"3",pt:b||void 0===L.id?"2":"0",scrollbarColor:"var(--relay-colors-gray5) transparent"},children:[L.id&&0===M.length&&!V?(0,w.jsx)(uT,{chainId:L.id,depositAddressOnly:V,onSelect:e=>{eU(e)}}):null,M.length>0?(0,w.jsx)(dz,{title:"Results",tokens:ew,isLoading:eh||M!==O,isLoadingBalances:en,chainFilterId:L.id}):(0,w.jsx)(k.Flex,{direction:"column",css:{gap:"3"},children:[{title:"Your Tokens",tokens:eb,isLoading:eA,show:eb.length>0},{title:"Global 24H Volume",tokens:ew,isLoading:eh,show:!0},{title:"Relay 24H Volume",tokens:ex,isLoading:ed,show:"to"===i&&void 0===L.id,showMoreButton:!0}].sort((e,t)=>"to"===i?-1:1).map(({title:e,tokens:t,isLoading:r,show:n,showMoreButton:i})=>n&&(0,w.jsx)(dz,{title:e,tokens:t,isLoading:r,isLoadingBalances:en,chainFilterId:L.id,showMoreButton:i},e))}),eh||eg||eu?.length!==0||ep?.length!==0?null:(0,w.jsxs)(k.Flex,{direction:"column",align:"center",css:{py:"5",maxWidth:312,alignSelf:"center"},children:[!L?.id&&el&&(0,w.jsx)(T.Box,{css:{color:"gray8",mb:"2"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faFolderOpen,size:"xl",width:27,height:24})}),(0,w.jsx)(F.Text,{color:"subtle",style:"body2",css:{textAlign:"center"},children:!L?.id&&el?"No results. Switch to the desired chain to search by contract.":"No results."})]})]},L.id??"all")]})]})]}):(0,w.jsx)(uI,{options:X,value:L,onSelect:e=>{P(e),S("tokens")},onBack:()=>S("tokens"),onClose:()=>eT(!1),onAnalyticEvent:u,popularChainIds:c,context:i,onChainStarToggle:eE,starredChainIds:D})})}),U&&(0,w.jsx)(dy,{open:U,onOpenChange:I,data:Q?{token:Q}:void 0,onAcceptToken:e=>{e&&eU(e),I(!1)}})]})},uD=({toChain:e,gasTopUpEnabled:t,onGasTopUpEnabled:r,gasTopUpRequired:n,gasTopUpAmount:i,gasTopUpAmountUsd:a,gasTopUpBalance:o})=>{let s=e?.currency,A=e?.currency?.supportsBridging;if(!s||!n||!A)return null;let l=`${eB.ASSETS_RELAY_API}/icons/currencies/${s?.id??s?.symbol?.toLowerCase()??e?.id}.png`;return(0,w.jsx)(tv,{color:"primary",css:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:()=>{r(!t)},children:t?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(F.Text,{style:"subtitle2",css:{color:"primary12",mr:"2"},children:["+",i?(0,j.formatBN)(i,5,s.decimals??18):"-"," ",a?`(${(0,j.formatDollar)(+a)})`:"-"]}),(0,w.jsx)(AU,{chainId:e?.id,tokenlogoURI:l,size:"sm",chainRadius:2}),(0,w.jsx)(F.Text,{style:"subtitle2",ellipsify:!0,children:e?.currency?.symbol}),(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClose})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(F.Text,{style:"subtitle2",css:{color:"primary12",mr:"6px"},children:["Add Gas (Balance:"," ",o?(0,j.formatBN)(o,5,s.decimals??18):"0"," ",s.symbol,")"]}),(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faPlus})]})})},uR=({toToken:e,isFetchingQuote:t,feeBreakdown:r,quote:n})=>{if(e&&n?.details?.currencyOut?.amountUsd&&n?.details?.currencyOut?.amountUsd!=="0"&&!t)if(r?.isGasSponsored&&n?.details?.totalImpact?.percent==="0")return(0,w.jsxs)(k.Flex,{css:{gap:"2px"},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:"("}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"success",children:"0%"}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",css:{textDecoration:"line-through"},children:"0.01%"}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:")"})]});else if(r?.isGasSponsored)return(0,w.jsxs)(k.Flex,{css:{gap:"2px"},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:"("}),(0,w.jsx)(F.Text,{style:"subtitle3",color:r?.totalFees.priceImpactColor,children:r?.totalFees.priceImpactPercentage}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"success",children:"Fee Subsidized"}),(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtle",children:")"})]});else return(0,w.jsxs)(F.Text,{style:"subtitle3",color:r?.totalFees.priceImpactColor,children:["(",r?.totalFees.priceImpactPercentage,")"]});return null},uM=({fromToken:e,setFromToken:t,toToken:r,setToToken:n,defaultToAddress:i,defaultAmount:a,defaultTradeType:o,slippageTolerance:s,onOpenSlippageConfig:A,lockToToken:l=!1,lockFromToken:c=!1,lockChainId:d,singleChainMode:u=!1,wallet:h,multiWalletSupportEnabled:p=!1,linkedWallets:m,supportedWalletVMs:f,disableInputAutoFocus:g=!1,popularChainIds:y,disablePasteWalletAddressOption:b,useSecureBaseUrl:x,onSetPrimaryWallet:v,onLinkNewWallet:B,onFromTokenChange:S,onToTokenChange:H,onConnectWallet:V,onAnalyticEvent:K,onSwapSuccess:G,onSwapValidating:W,onSwapError:$})=>{let q=(0,C.useCallback)((e,t)=>{try{K?.(e,t)}catch(r){console.error("Error in onAnalyticEvent",e,t,r)}},[K]),X=(0,U.useRelayClient)(),Y=(0,C.useContext)(z.ProviderOptionsContext).vmConnectorKeyOverrides,[J,ee]=(0,C.useState)(!1),[et,er]=(0,C.useState)(!1),[en,ei]=(0,C.useState)(!1),[ea,eo]=(0,C.useState)(!1),[eA,el]=(0,C.useState)([]),[ec,ed]=(0,C.useState)(!1),[eu,eh]=(0,C.useState)(""),[ep,em]=(0,C.useState)(""),[ef,eg]=(0,C.useState)(""),ey=c||l,eb=u&&void 0!==d;return(0,C.useEffect)(()=>{e&&"verified"in e&&!e.verified&&((0,Au.alreadyAcceptedToken)(e)||(eA.push({token:e,context:"from"}),t?.(void 0))),r&&"verified"in r&&!r.verified&&((0,Au.alreadyAcceptedToken)(r)||(eA.push({token:r,context:"to"}),n?.(void 0)))},[e,r]),(0,w.jsx)(tg,{context:"Swap",transactionModalOpen:J,setTransactionModalOpen:ee,depositAddressModalOpen:et,defaultAmount:a,defaultToAddress:i,defaultTradeType:o,toToken:r,setToToken:n,fromToken:e,setFromToken:t,slippageTolerance:s,wallet:h,linkedWallets:m,multiWalletSupportEnabled:p,onSwapError:$,onAnalyticEvent:q,supportedWalletVMs:f,useSecureBaseUrl:x,children:({quote:e,steps:t,swap:r,setSteps:n,feeBreakdown:i,fromToken:a,setFromToken:o,toToken:s,setToToken:u,error:x,toDisplayName:U,address:K,recipient:z,customToAddress:$,setCustomToAddress:ex,tradeType:ew,setTradeType:ev,isSameCurrencySameRecipientSwap:eC,debouncedInputAmountValue:eB,debouncedAmountInputControls:eS,setAmountInputValue:ek,amountInputValue:eE,amountOutputValue:eF,debouncedOutputAmountValue:eT,debouncedAmountOutputControls:eU,setAmountOutputValue:eI,toBalance:eQ,toBalancePending:ej,isLoadingToBalance:eL,isFetchingQuote:e_,isLoadingFromBalance:eP,fromBalance:eD,fromBalancePending:eR,highRelayerServiceFee:eM,relayerFeeProportion:eO,hasInsufficientBalance:eN,isInsufficientLiquidityError:eH,isCapacityExceededError:eV,isCouldNotExecuteError:eK,ctaCopy:eG,isFromNative:eW,timeEstimate:ez,isSvmSwap:e$,isBvmSwap:eq,isValidFromAddress:eX,isValidToAddress:eY,slippageTolerance:eJ,fromChainWalletVMSupported:eZ,toChainWalletVMSupported:e0,isRecipientLinked:e1,swapError:e2,recipientWalletSupportsChain:e4,gasTopUpEnabled:e3,setGasTopUpEnabled:e5,gasTopUpRequired:e6,gasTopUpBalance:e8,gasTopUpAmount:e7,gasTopUpAmountUsd:e9,linkedWallet:te,quoteParameters:tt,setSwapError:tr,invalidateBalanceQuer
47ies:tn,invalidateQuoteQuery:ti,quoteInProgress:ta,setQuoteInProgress:to,abortController:ts,fromTokenPriceData:tA,toTokenPriceData:tl,isLoadingFromTokenPrice:tu,isLoadingToTokenPrice:th})=>{let tp=(0,C.useMemo)(()=>td(tA?.price,eE),[tA,eE]),tm=(0,C.useMemo)(()=>td(tl?.price,eF),[tl,eF]),tf=async(e,t,r)=>{if(a){let n=(0,I.formatUnits)(e,a?.decimals);if(ek(n),ev("EXACT_INPUT"),eU.cancel(),eS.flush(),q?.(N.EventNames.MAX_AMOUNT_CLICKED,{percent:t,bufferAmount:r?r.toString():"0",chainType:tb?.vmType}),ec&&tk){let e=Number(n);isNaN(e)||eh((e*tk).toFixed(2))}}},tg=e=>{if(!e){o(void 0),S?.(void 0);return}let t=e,r=X?.chains.find(t=>e?.chainId==t.id);if(r?.vmType&&!f.includes(r?.vmType)){ev("EXACT_INPUT");let e=du(tx,s);e&&e?.address!=s?.address&&ty(e);let n=du(r,t);n&&n.address!=t?.address&&(t=n)}o(t),S?.(t)},ty=e=>{if(!e){u(void 0),H?.(void 0);return}let t=e;if(!eZ){let r=X?.chains.find(t=>e?.chainId==t.id);if(r){let e=du(r,t);e&&e.address!=t?.address&&(t=e)}}u(t),H?.(t)},tb=X?.chains?.find(e=>e.id===a?.chainId),tx=X?.chains?.find(e=>e.id===s?.chainId),tw=(0,Q.usePublicClient)({chainId:tb?.id});(0,C.useEffect)(()=>{if(p&&tb&&K&&m&&!eX){let e=es(tb,K,m,Y);e&&v?.(e)}if(p&&tx&&z&&m&&!eY){let e=es(tx,z,m,Y);e?ex(e):ex(void 0)}},[p,tb?.id,tx?.id,K,m,v,eX,eY,Y]),(0,C.useEffect)(()=>{b&&$&&ex(void 0)},[b]);let tv=void 0===eJ,tC=-3.5>Number(e?.details?.totalImpact?.percent),tB=e?.details?.totalImpact?.usd,tS=!!(tC&&tB&&-10>=Number(tB)),tk=(0,C.useMemo)(()=>{if(ec)if(tA?.price&&tA.price>0)return tA.price;else return null;if(!(eE&&Number(eE)>0&&e?.details?.currencyIn?.amountUsd))return null;{let t=Number(eE),r=Number(e.details.currencyIn.amountUsd);return t>0&&r>0?r/t:null}},[ec,tA?.price,e?.details?.currencyIn?.amountUsd,eE]),tE=()=>{if(ec)!eu&&ef&&ek(ef),eh(""),em(""),ed(!1);else{let t="",r="";e?.details?.currencyIn?.amountUsd&&Number(e.details.currencyIn.amountUsd)>0?t=String(Number(e.details.currencyIn.amountUsd)):tp&&tp>0?t=tp.toFixed(2):eE&&Number(eE)>0&&tk&&tk>0&&(t=(Number(eE)*tk).toFixed(2)),e?.details?.currencyOut?.amountUsd&&Number(e.details.currencyOut.amountUsd)>0?r=String(Number(e.details.currencyOut.amountUsd)):tm&&tm>0?r=tm.toFixed(2):eF&&Number(eF)>0&&tl?.price&&tl.price>0&&(r=(Number(eF)*tl.price).toFixed(2)),eg(eE),eh(t),em(r),ed(!0),"EXPECTED_OUTPUT"===ew&&r||ev("EXACT_INPUT")}};(0,C.useEffect)(()=>{if(ec)if(tk&&tk>0&&eu){let e=Number(eu);!isNaN(e)&&e>0&&ek((e/tk).toFixed(a?.decimals??8))}else(""===eu||0===Number(eu))&&ek("")},[ec,eu,tk,ek,a?.decimals]),(0,C.useEffect)(()=>{if(ec&&"EXPECTED_OUTPUT"===ew)if(tl?.price&&tl.price>0&&ep){let e=Number(ep);!isNaN(e)&&e>0&&eI((e/tl.price).toFixed(s?.decimals??8))}else(""===ep||0===Number(ep))&&eI("")},[ec,ew,ep,tl?.price,eI,s?.decimals]),(0,C.useEffect)(()=>{if(ec&&"EXPECTED_OUTPUT"!==ew)if(e?.details?.currencyOut?.amountUsd&&!e_){let t=Number(e.details.currencyOut.amountUsd);!isNaN(t)&&t>=0&&em(t.toFixed(2))}else if(tl?.price&&tl.price>0&&eF&&Number(eF)>0){let e=Number(eF)*tl.price;!isNaN(e)&&e>=0&&em(e.toFixed(2))}else eF&&0!==Number(eF)||em("")},[ec,ew,e?.details?.currencyOut?.amountUsd,e_,tl?.price,eF]),(0,C.useEffect)(()=>{if(ec&&"EXPECTED_OUTPUT"===ew)if(e?.details?.currencyIn?.amountUsd&&!e_){let t=Number(e.details.currencyIn.amountUsd);!isNaN(t)&&t>=0&&eh(t.toFixed(2))}else eE&&0!==Number(eE)||eh("")},[ec,ew,e?.details?.currencyIn?.amountUsd,e_,eE]);let tF=m?.find(e=>e.address===z);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(lo,{steps:t,setSteps:n,quoteInProgress:ta,setQuoteInProgress:to,transactionModalOpen:J,setTransactionModalOpen:ee,depositAddressModalOpen:et,setDepositAddressModalOpen:er,addressModalOpen:en,setAddressModalOpen:ei,fromToken:a,fromChain:tb,toToken:s,toChain:tx,address:K,recipient:z,amountInputValue:eE,amountOutputValue:eF,debouncedInputAmountValue:eB,debouncedOutputAmountValue:eT,tradeType:ew,onTransactionModalOpenChange:e=>{e?ea&&eo(!1):(ea?eo(!1):t&&ti(),ts&&ts.abort(),tr(null),n(null),to(null))},onDepositAddressModalOpenChange:e=>{e?ea&&eo(!1):(tr(null),ea?eo(!1):ti())},slippageTolerance:eJ,swapError:e2,setSwapError:tr,onSwapSuccess:e=>{eo(!0),ek(""),eI(""),G?.(e)}
47,onSwapValidating:W,onAnalyticEvent:q,invalidateBalanceQueries:tn,invalidateQuoteQuery:ti,customToAddress:$,setCustomToAddress:ex,timeEstimate:ez,wallet:h,linkedWallets:m,multiWalletSupportEnabled:p,children:()=>(0,w.jsxs)(k.Flex,{direction:"column",css:{width:"100%",overflow:"hidden",border:"widget-border",minWidth:320,maxWidth:408},children:[(0,w.jsxs)(lA,{css:{backgroundColor:"widget-background"},id:"from-token-section",children:[(0,w.jsxs)(k.Flex,{align:"center",justify:"between",css:{gap:"2",width:"100%"},children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Sell"}),!0===p&&eZ?(0,w.jsx)(dc,{context:"origin",selectedWalletAddress:K,disablePasteWalletAddressOption:b,onSelect:e=>v?.(e.address),chain:tb,onLinkNewWallet:()=>{!K&&eZ?V?.():B?.({chain:tb,direction:"from"})?.then(e=>{v?.(e.address)})},setAddressModalOpen:ei,wallets:m,onAnalyticEvent:q,testId:"origin-wallet-select-button"}):null]}),(0,w.jsxs)(k.Flex,{align:"center",justify:"between",css:{gap:"4",width:"100%"},children:[(0,w.jsx)(L.default,{autoFocus:!g,prefixSymbol:ec?"$":void 0,value:ec?eu:"EXACT_INPUT"===ew?eE:eE?(0,j.formatFixedLength)(eE,8):eE,setValue:e=>{ec?(eh(e),ev("EXACT_INPUT"),eg(""),0===Number(e)&&(eI(""),em(""),eS.flush())):(ek(e),ev("EXACT_INPUT"),0===Number(e)&&(eI(""),eS.flush()))},onFocus:()=>{q?.(N.EventNames.SWAP_INPUT_FOCUSED)},css:{fontWeight:"700",fontSize:32,lineHeight:"36px",py:0,color:e_&&"EXPECTED_OUTPUT"===ew?"text-subtle":"input-color",_placeholder:{color:e_&&"EXPECTED_OUTPUT"===ew?"text-subtle":"input-color"}}}),(0,w.jsx)(uP,{address:K,isValidAddress:eX,token:a,onAnalyticEvent:q,fromChainWalletVMSupported:eZ,supportedWalletVMs:f,setToken:e=>{e.address!==s?.address||e.chainId!==s?.chainId||K!==z||l&&a?tg(e):(tg(s),ty(a))},context:"from",multiWalletSupportEnabled:p,lockedChainIds:eb?[d]:dh(a?.chainId,d,s?.chainId,c)&&a?.chainId?[a.chainId]:void 0,chainIdsFilter:!eZ&&s?[s.chainId]:void 0,popularChainIds:y,trigger:(0,w.jsx)("div",{style:{width:"max-content"},children:(0,w.jsx)(lP,{token:a,locked:c,address:K,testId:"origin-token-select-button"})})})]}),(0,w.jsxs)(k.Flex,{direction:"column",css:{gap:"3",width:"100%"},children:[(0,w.jsxs)(k.Flex,{align:"center",justify:"between",css:{gap:"3",width:"100%"},children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"4px",_hover:{cursor:"pointer"}},onClick:()=>{tE()},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtleSecondary",css:{minHeight:18,display:"flex",alignItems:"center"},children:ec?a?eu&&Number(eu)>0?eE&&tk&&!tu?`${(0,j.formatNumber)(eE,4,!1)} ${a.symbol}`:(0,w.jsx)(T.Box,{css:{width:45,height:12,backgroundColor:"gray7",borderRadius:"widget-border-radius"}}):`0 ${a.symbol}`:null:e?.details?.currencyIn?.amountUsd&&!e_?(0,j.formatDollar)(Number(e.details.currencyIn.amountUsd)):tu&&eE&&Number(eE)>0?(0,w.jsx)(T.Box,{css:{width:45,height:12,backgroundColor:"gray7",borderRadius:"widget-border-radius"}}):tp&&tp>0&&tA?.price&&tA.price>0?(0,j.formatDollar)(tp):"$0.00"}),(0,w.jsx)(E.Button,{"aria-label":"Switch Input Mode",size:"none",color:"ghost",css:{color:"gray11",alignSelf:"center",justifyContent:"center",width:"20px",height:"20px",borderRadius:"100px",padding:"4px",backgroundColor:"gray3"},onClick:tE,children:(0,w.jsx)(P.SwitchIcon,{width:16,height:10})})]}),(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"3",marginLeft:"auto",height:23},children:[a?(0,w.jsx)(M.BalanceDisplay,{isLoading:eP,balance:eD,decimals:a?.decimals,symbol:a?.symbol,hasInsufficientBalance:eN,displaySymbol:!1,isConnected:!(0,Z.isDeadAddress)(K)&&K!==Z.tronDeadAddress&&void 0!==K,pending:eR}):(0,w.jsx)(k.Flex,{css:{height:18}}),eD&&(tb?.vmType==="evm"||tb?.vmType==="svm")?(0,w.jsx)(T.Box,{css:{display:"none",sm:{display:"block"}},children:(0,w.jsx)(O.PercentageButtons,{balance:eD,onPercentageClick:tf,getFeeBufferAmount:D.getFeeBufferAmount,fromChain:tb,publicClient:tw,isFromNative:eW,variant:"desktop"})}):null]})]}),eD&&(tb?.vmType==="evm"||tb?.vmType==="svm")?(0,w.jsx)(T.Box,{css:{display:"block",sm:{display:"none"}},children:(0,w.jsx)(O.PercentageButtons,{balance:eD,onPercentageClick:tf,getFeeBufferAmount:D.getFeeBufferAmount,fromChain:tb,publicClient:tw,isFromNative:eW,variant:"mobile"})}):null]})]}),(0,w.jsx)(T.Box,{css:{position:"relative",my:-13,mx:"auto",height:32,width:32},children:ey||(e$||eq)&&!p?null:(0,w.jsx)(E.Button,{"aria-label":"Swap Tokens Direction",size:"none",color:"white",css:{mt:"4px",color:"gray9",alignSelf:"center",justifyContent:"center",width:"100%",height:"100%","--borderWidth":"borders.widget-swap-currency-button-border-width","--borderColor":"colors.widget-swap-currency-button-border-color",border:"var(--borderWidth) solid var(--borderColor)",zIndex:10,borderRadius:"widget-swap-currency-button-border-radius"},onClick:()=>{(a||s)&&(ec?(tg(s),ty(a),eh(ep),em(eu),ev("EXACT_INPUT"),eS.flush(),eU.flush()):("EXACT_INPUT"===ew?(ev("EXPECTED_OUTPUT"),ek(""),eI(eE)):(ev("EXACT_INPUT"),eI(""),ek(eF)),tg(s),ty(a),eS.flush(),eU.flush()))},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faArrowDown,width:16,height:16})})}),(0,w.jsxs)(lA,{css:{backgroundColor:"widget-background",mb:"widget-card-section-gutter"},id:"to-token-section",children:[(0,w.jsxs)(k.Flex,{css:{width:"100%"},align:"center",justify:"between",children:[(0,w.jsx)(F.Text,{style:"subtitle2",color:"subtle",children:"Buy"}),p&&e0?(0,w.jsx)(dc,{context:"destination",disablePasteWalletAddressOption:b,selectedWalletAddress:z,onSelect:e=>{ex(e.address)},chain:tx,onLinkNewWallet:()=>{!K&&e0?V?.():B?.({chain:tx,direction:"to"})?.then(e=>{ex(e.address)})},setAddressModalOpen:ei,wallets:m,onAnalyticEvent:q,testId:"destination-wallet-select-button"}):null,p&&e0?null:(0,w.jsxs)(E.Button,{color:eY&&p&&!e1?"warning":"secondary",corners:"pill",size:"none",css:{display:"flex",alignItems:"center",px:"2",py:"1"},onClick:()=>{ei(!0),q?.(N.EventNames.SWAP_ADDRESS_MODAL_CLICKED)},children:[eY&&p&&!e1?(0,w.jsx)(T.Box,{css:{color:"amber11"},children:(0,w.jsx)(_.FontAwesomeIcon,{icon:AA.faClipboard,width:16,height:16})}):null,(0,w.jsx)(F.Text,{style:"subtitle2",css:{color:eY&&p&&!e1?"amber11":"anchor-color"},children:eY?U:"Enter Address"})]})]}),(0,w.jsxs)(k.Flex,{align:"center",justify:"between",css:{gap:"4",width:"100%"},children:[(0,w.jsx)(L.default,{prefixSymbol:ec?"$":void 0,value:ec?ep:"EXPECTED_OUTPUT"===ew?eF:eF?(0,j.formatFixedLength)(eF,8):eF,setValue:e=>{ec?(em(e),ev("EXPECTED_OUTPUT"),0===Number(e)&&(ek(""),eh(""),eU.flush())):(eI(e),ev("EXPECTED_OUTPUT"),0===Number(e)&&(ek(""),eU.flush()))},disabled:!s||!eZ,onFocus:()=>{q?.(N.EventNames.SWAP_OUTPUT_FOCUSED)},css:{fontWeight:"700",fontSize:32,color:e_&&"EXACT_INPUT"===ew?"text-subtle":"input-color",_placeholder:{color:e_&&"EXACT_INPUT"===ew?"text-subtle":"input-color"},_disabled:{cursor:"not-allowed",_placeholder:{color:"gray10"},color:"gray10"}}}),(0,w.jsx)(uP,{address:z,isValidAddress:eY,token:s,fromChainWalletVMSupported:eZ,supportedWalletVMs:f,setToken:e=>{e.address!==a?.address||e.chainId!==a?.chainId||K!==z||l&&a?ty(e):(ty(a),tg(s))},context:"to",multiWalletSupportEnabled:p,trigger:(0,w.jsx)("div",{style:{width:"max-content"},children:(0,w.jsx)(lP,{token:s,locked:l,address:K,testId:"destination-token-select-button"})}
47),onAnalyticEvent:q,lockedChainIds:eb?[d]:dh(s?.chainId,d,a?.chainId,l)&&s?.chainId?[s.chainId]:void 0,chainIdsFilter:!eZ&&a?[a.chainId]:void 0,popularChainIds:y})]}),(0,w.jsx)(uD,{toChain:tx,gasTopUpEnabled:e3,onGasTopUpEnabled:t=>{e5(t),q?.(N.EventNames.GAS_TOP_UP_TOGGLE,{enabled:t,amount:e7,amount_usd:e9,quote:e})},gasTopUpRequired:e6,gasTopUpAmount:e7,gasTopUpAmountUsd:e9,gasTopUpBalance:e8}),(0,w.jsxs)(k.Flex,{align:"center",justify:"between",css:{gap:"3",width:"100%"},children:[(0,w.jsxs)(k.Flex,{align:"center",css:{gap:"1",minHeight:18},children:[(0,w.jsx)(F.Text,{style:"subtitle3",color:"subtleSecondary",children:ec?s?ep&&Number(ep)>0?eF&&!th?`${(0,j.formatNumber)(eF,4,!1)} ${s.symbol}`:(0,w.jsx)(T.Box,{css:{width:45,height:12,backgroundColor:"gray7",borderRadius:"widget-border-radius"}}):`0 ${s.symbol}`:null:s&&e?.details?.currencyOut?.amountUsd&&!e_?(0,j.formatDollar)(Number(e.details.currencyOut.amountUsd)):s&&th&&eF&&Number(eF)>0?(0,w.jsx)(T.Box,{css:{width:45,height:12,backgroundColor:"gray7",borderRadius:"widget-border-radius"}}):s&&tm&&tm>0&&tl?.price&&tl.price>0?(0,j.formatDollar)(tm):"$0.00"}),(0,w.jsx)(uR,{toToken:s,isFetchingQuote:e_,feeBreakdown:i,quote:e})]}),(0,w.jsx)(k.Flex,{css:{marginLeft:"auto"},children:s?(0,w.jsx)(M.BalanceDisplay,{isLoading:eL,balance:eQ,decimals:s?.decimals,symbol:s?.symbol,displaySymbol:!1,isConnected:!(0,Z.isDeadAddress)(K)&&K!==Z.tronDeadAddress&&void 0!==K,pending:ej}):(0,w.jsx)(k.Flex,{css:{height:18}})})]})]}),(0,w.jsx)(lL,{feeBreakdown:i,isFetchingQuote:e_,toToken:s,fromToken:a,quote:e,timeEstimate:ez,isAutoSlippage:tv,slippageInputBps:eJ,toChain:tx,isSingleChainLocked:eb,fromChainWalletVMSupported:eZ,error:x,onOpenSlippageConfig:()=>{A?.()}}),(0,w.jsx)(R.WidgetErrorWell,{hasInsufficientBalance:eN,error:x,quote:e,currency:a,isHighRelayerServiceFee:eM,isCapacityExceededError:eV,isCouldNotExecuteError:eK,relayerFeeProportion:eO,containerCss:{mb:"widget-card-section-gutter"},recipientWalletSupportsChain:e4,recipient:z,toChainWalletVMSupported:e0,recipientLinkedWallet:tF,toChainVmType:tx?.vmType}),(0,w.jsx)(ls,{isFetchingQuote:e_,transactionModalOpen:J,depositAddressModalOpen:et,isValidFromAddress:eX,isValidToAddress:eY,fromChainWalletVMSupported:eZ,context:"Swap",showHighPriceImpactWarning:tS,onConnectWallet:V,onAnalyticEvent:q,quote:e,address:K,hasInsufficientBalance:eN,isInsufficientLiquidityError:eH,recipientWalletSupportsChain:e4,debouncedInputAmountValue:eB,debouncedOutputAmountValue:eT,isSameCurrencySameRecipientSwap:eC,onClick:()=>{if(eZ)if(eY&&eX)r();else if(p&&(eY||!eY&&e0)){let e=eX?tx:tb;K?B?.({chain:e,direction:eX?"to":"from"})?.then(e=>{eX?ex(e.address):v?.(e.address)}):V?.()}else ei(!0);else if(eY){let t=tc(e?.details,e?.fees,e?.steps?e?.steps:null,te?.connector,tt);q?.(N.EventNames.SWAP_CTA_CLICKED,t),er(!0)}else p&&e0?K?B?.({chain:tx,direction:"to"})?.then(e=>{ex(e.address)}):V?.():ei(!0)},ctaCopy:eG})]})}),(0,w.jsx)(dy,{open:eA.length>0,onOpenChange:()=>{},data:eA.length>0?eA[0]:void 0,onDecline:(e,t)=>{el(eA.filter(r=>r.context!==t||r.token.address!==e?.address||r.token.chainId!==e?.chainId))},onAcceptToken:(e,t)=>{e&&("to"===t?(q?.(N.EventNames.SWAP_TOKEN_SELECT,{direction:"output",token_symbol
47:e.symbol}),e.address!==a?.address||e.chainId!==a?.chainId||K!==z||l&&a?ty(e):(ty(a),tg(s))):"from"===t&&(q?.(N.EventNames.SWAP_TOKEN_SELECT,{direction:"input",token_symbol:e.symbol}),e.address!==s?.address||e.chainId!==s?.chainId||K!==z||l&&a?tg(e):(tg(s),ty(a)))),el(eA.filter(t=>t.token.address!==e?.address||t.token.chainId!==e?.chainId))}})]})}})};var uO=e.i(268407);e.i(842917);var uN=e.i(858532);let uH={chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",decimals:6,name:"USD Coin",symbol:"USDC",logoURI:"https://ethereum-optimism.github.io/data/USDC/logo.png"};function uV(e,t){console.log("Analytic Event",e,t)}e.s(["BridgeModal",0,()=>{let e,t,r,n,i,a,o,s,A,l,c,d=(0,v.c)(25),u=(0,B.useTranslations)(),{data:h}=(0,eL.useWalletClient)(),{setModal:p}=(0,uO.useActionStore)();d[0]===Symbol.for("react.memo_cache_sentinel")?(e={chainId:8453,address:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",decimals:6,name:"USDC",symbol:"USDC",logoURI:"https://ethereum-optimism.github.io/data/USDC/logo.png"},d[0]=e):e=d[0];let[m,f]=(0,C.useState)(e),[g,y]=(0,C.useState)(uH);e:{let e;if(!h){t=void 0;break e}d[1]!==h?(e=(0,tp.adaptViemWallet)(h),d[1]=h,d[2]=e):e=d[2],t=e}let b=t;return d[3]!==u?(r=u("modals.swapToEthereum"),d[3]=u,d[4]=r):r=d[4],d[5]!==p?(n=()=>p("deposit-direct"),d[5]=p,d[6]=n):n=d[6],d[7]===Symbol.for("react.memo_cache_sentinel")?(i=e=>f(e),d[7]=i):i=d[7],d[8]===Symbol.for("react.memo_cache_sentinel")?(a=e=>y(e),d[8]=a):a=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(o=["evm"],d[9]=o):o=d[9],d[10]!==p?(s=()=>{p("connect-wallet")},d[10]=p,d[11]=s):s=d[11],d[12]!==p||d[13]!==u?(A=()=>{p("deposit-direct"),uN.showToast.success({message:u("modals.swapSuccessful"),description:u("modals.swapSuccessfulDesc")})},d[12]=p,d[13]=u,d[14]=A):A=d[14],d[15]!==b||d[16]!==m||d[17]!==s||d[18]!==A||d[19]!==g?(l=(0,w.jsx)(uM,{wallet:b,fromToken:m,setFromToken:i,toToken:g,setToToken:a,lockToToken:!0,lockChainId:1,defaultAmount:"5",supportedWalletVMs:o,disablePasteWalletAddressOption:!0,onConnectWallet:s,onAnalyticEvent:uV,onSwapSuccess:A}),d[15]=b,d[16]=m,d[17]=s,d[18]=A,d[19]=g,d[20]=l):l=d[20],d[21]!==r||d[22]!==n||d[23]!==l?(c=(0,w.jsx)(S.ModalBox,{title:r,active:"bridge",disableClose:!1,onBack:n,children:l}),d[21]=r,d[22]=n,d[23]=l,d[24]=c):c=d[24],c}],906386);var uK=e.i(838456),uG=e.i(397837),uW=e.i(206242),uz=e.i(75581),u$=e.i(18214),uq=e.i(782904),uX=e.i(461342),uY=e.i(954512),uJ=e.i(525836);e.i(992550);var uZ=e.i(407585),u0=e.i(632418);e.i(849387);var u1=e.i(727726);let u2=e=>{let t,r,n,i,a=(0,v.c)(8),{title:o,value:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",gap:1,justifyContent:"space-between",alignItems:"center",padding:"6px 0"},a[0]=t):t=a[0],a[1]!==o?(r=(0,w.jsx)(uq.Typography,{variant:"body1",color:"textSecondary",children:o}),a[1]=o,a[2]=r):r=a[2],a[3]!==s?(n=(0,w.jsx)(uq.Typography,{variant:"body1",children:s}),a[3]=s,a[4]=n):n=a[4],a[5]!==r||a[6]!==n?(i=(0,w.jsxs)(uK.Box,{sx:t,children:[r,n]}),a[5]=r,a[6]=n,a[7]=i):i=a[7],i};e.s(["IsolatedMarginUpdateModal",0,()=>{let e=(0,B.useTranslations)(),t=(0,uY.useTheme)(),{payload:r,setModal:n}=(0,uO.useActionStore)(),{updateIsolatedMargin:i}=(0,u1.useAccountActions)(),a=(0,uO.useUserTradingDataStore)(e=>e.positions),o=(0,uO.useUserTradingDataStore)(e=>e.accountSummary),s=(0,uO.useTradingDataStore)(e=>e.instruments),A=(0,uO.useTradingDataStore)(e=>e.tickers),l=s[r],c=l?.only_isolated,d=Object.values(a).find(e=>e.instrument_id===r),[u,h]=(0,C.useState)(""),[p,m]=(0,C.useState)(0),[f,g]=(0,C.useState)(null),[y,b]=(0,C.useState)("Add"),[x,v]=(0,C.useState)(!1);(0,C.useEffect)(()=>{""===u?g(null):Number(u)>p?g(e("common.insufficientBalance")):g(null)},[u,p]),(0,C.useEffect)(()=>{(async()=>{if("Add"===y)m(Number((Number(o?.available_balance)||0).toFixed(2)));else if("Remove"===y){let e=d?A[d.instrument]:void 0,t=e?parseFloat(e.mark_price):0,r=d?parseFloat(d.entry_price):0,n=d?parseFloat(d.size):0;m(Number((Number(d?.margin??0)+Math.min(0,(t-r)*n)).toFixed(2)))}})()},[o,y,d,A]);let k=async()=>{v(!0);try{let e=Number(u);"Add"===y?e=Number(u):"Remove"===y&&(e=-Number(u)),await i(r,d?.position_side,e.toString()),n(null)}catch(e){console.error("Internal transfer failed:",e)}finally{v(!1)}};return(0,w.jsx)(S.ModalBox,{title:e("modals.adjustIsolatedMargin"),active:"isolated-margin-update",disableClose:x,children:(0,w.jsxs)(uK.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,w.jsx)(uq.Typography,{variant:"body1",children:e("modals.adjustIsolatedMarginDesc")}),(0,w.jsx)(uJ.default,{placeholder:e("common.amount"),fullWidth:!0,endAdornment:(0,w.jsx)(uW.InputAdornment,{position:"end",children:(0,w.jsxs)(uK.Box,{sx:{display:"flex",gap:"0.5rem"},children:[(0,w.jsx)(uG.Button,{variant:"contained",size:"small",sx:{width:58},onClick:()=>{h(p.toString())},disabled:x,children:e("common.max")}
47),(0,w.jsxs)(u$.Select,{size:"small",value:y,onChange:e=>{b(e.target.value),h("")},MenuProps:(0,uX.getMenuProps)(t,{vertical:"bottom",horizontal:"right"}),sx:{minWidth:"5rem"},children:[(0,w.jsx)(uz.MenuItem,{value:"Add",disableRipple:!0,children:e("modals.add")},"asset-Add"),!c&&(0,w.jsx)(uz.MenuItem,{value:"Remove",disableRipple:!0,children:e("modals.remove")},"asset-Remove")]})]})}),value:u,onChange:e=>{h(e.target.value)},type:"number"}),(0,w.jsxs)(uK.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,w.jsx)(u2,{title:e("modals.currentMarginFor",{instrument:d?.instrument??""}),value:d?.margin??"0"}),"Add"===y&&(0,w.jsx)(u2,{title:e("modals.marginAvailableToAdd"),value:Number(p.toString()).toFixed(2)}),"Remove"===y&&(0,w.jsx)(u2,{title:e("modals.marginAvailableToRemove"),value:Number(p.toString()).toFixed(2)})]}),f&&(0,w.jsxs)(uK.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,u0.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,w.jsx)(uZ.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,w.jsx)(uq.Typography,{variant:"body1",color:"secondary.light",children:f})]}),(0,w.jsx)(uG.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:k,disableRipple:!0,loading:x,disabled:null!==f||x||!u,children:x?e("common.confirming"):e("common.confirm")})]})})}],641696);var u4=e.i(302682),u3=e.i(166107),u5=e.i(990577),u6=e.i(700756),u8=e.i(818279),u7=e.i(31066),u9=e.i(103439),he=e.i(120785),ht=e.i(206287),hr=e.i(57159),hn=e.i(911347);let hi=`I accept the Hotstuff Terms of Use, Privacy Policy, and Cookie Policy. 48 49Terms Version: 1.0 50Timestamp: {{timestamp}}`;e.s(["TermsPolicyModal",0,()=>{let e=(0,B.useTranslations)(),{setModal:t}=(0,uO.useActionStore)(),{address:r,master:n,setLegalTermsSigned:i}=(0,uO.useAuthStore)(),{isConnected:a}=(0,eg.useAccount)(),{authenticated:o}=(0,he.usePrivy)(),{wallets:s}=(0,ht.useWallets)(),[A,l]=(0,C.useState)(!1),[c,d]=(0,C.useState)(!1),[u,h]=(0,C.useState)(!1),[p,m]=(0,C.useState)(null),f=A&&c,g=async()=>{if(f){h(!0),m(null);try{let e;if(o&&s.length>0){let t=s[0];if(!t)throw Error("No Privy wallet found");let r=await t.getEthereumProvider();e=(0,hr.createWalletClient)({account:n,chain:dw.mainnet,transport:(0,hn.custom)(r)})}else if(a){if(!(e=await (0,u7.getWalletClient)(u9.wagmiConfig,{account:n})))throw Error("Failed to get wallet client")}else throw Error("No wallet connected");let A=Date.now(),l=hi.replace("{{timestamp}}",A.toString()),c=await e.signMessage({account:n,message:l});await (0,u8.signLegalTerms)(r,c,"1.0"),i(r,!0),t(null)}catch(t){console.error("Failed to sign legal terms:",t),m(t instanceof Error?t.message:e("modals.failedToSignTerms"))}finally{h(!1)}}};return(0,w.jsxs)(S.ModalBox,{title:e("modals.termsOfUse"),active:"terms-policy",maxWidth:"sm",children:[(0,w.jsx)(uq.Typography,{variant:"subtitle1",color:"textSecondary",sx:{mb:1},children:e("modals.reviewAndAccept")}),(0,w.jsxs)(uK.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,w.jsx)(u4.FormControlLabel,{control:(0,w.jsx)(u3.Checkbox,{color:"default",size:"small",checked:A,onChange:()=>l(!A),disabled:u}),label:(0,w.jsxs)(uq.Typography,{variant:"body1",color:"textSecondary",children:["You acknowledge that you have read, understood, and agreed to the"," ",(0,w.jsx)(u5.Link,{href:"https://hotstuff.trade/terms",target:"_blank",sx:{color:"primary.main",textDecoration:"none","&:hover":{textDecoration:"underline"}},children:e("modals.termsOfUse")})," ","and"," ",(0,w.jsx)(u5.Link,{href:"https://hotstuff.trade/privacy",target:"_blank",sx:{color:"primary.main",textDecoration:"none","&:hover":{textDecoration:"underline"}},children:e("modals.privacyPolicy")}),"."]}),sx:{alignItems:"flex-start",m:0}}),(0,w.jsx)(u4.FormControlLabel,{control:(0,w.jsx)(u3.Checkbox,{color:"default",size:"small",checked:c,onChange:()=>d(!c),disabled:u}),label:(0,w.jsx)(uq.Typography,{variant:"body1",color:"textSecondary",children:e("modals.cookiePolicy")}),sx:{alignItems:"flex-start",m:0}})]}),p&&(0,w.jsx)(uq.Typography,{variant:"body2",color:"error",sx:{textAlign:"center",mt:1},children:p}),(0,w.jsxs)(uK.Box,{sx:{display:"flex",gap:1.5,mt:1},children:[(0,w.jsx)(uG.Button,{fullWidth:!0,variant:"contained",color:"inherit",size:"large",onClick:()=>{t(null)},disabled:u,children:e("modals.decline")}),(0,w.jsx)(uG.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:g,disabled:!f||u,children:u?(0,w.jsx)(u6.CircularProgress,{size:24,color:"inherit"}):e("modals.acceptAndSign")})]})]})}],546017)},233582,2158,175019,e=>{"use strict";e.s(["AffiliateTiersModal",()=>A],233582);var t=e.i(474076),r=e.i(500932),n=e.i(709643),i=e.i(838456);e.i(565306);var a=e.i(849850),o=e.i(405858);e.i(859912);var s=e.i(358866);let A=()=>{let e,A,l,c,d=(0,r.c)(6),u=(0,n.useTranslations)();d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.createAffiliateTiersConfig)(),d[0]=e):e=d[0];let h=e;return d[1]!==u?(A=u("referrals.affiliateTiers"),d[1]=u,d[2]=A):A=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(i.Box,{sx:{width:"100%",display:"flex",flexDirection:"column"},children:(0,t.jsx)(o.default,{config:h})}),d[3]=l):l=d[3],d[4]!==A?(c=(0,t.jsx)(a.ModalBox,{title:A,active:"affiliate-tiers",maxWidth:"lg",children:l}),d[4]=A,d[5]=c):c=d[5],c};var l=e.i(271645),c=e.i(782904),d=e.i(456757),u=e.i(163010),h=e.i(162282),p=e.i(943487),m=e.i(268407),f=e.i(344873);e.i(992550);var g=e.i(407585),y=e.i(772475),b=e.i(485683),x=e.i(632418),w=e.i(6
5057688),v=e.i(170466),C=e.i(858532),B=e.i(915833);let S={1:{name:"Diamond",badge:"/assets/points/diamond.png"},2:{name:"Platinum",badge:"/assets/points/platinum.svg"},3:{name:"Gold",badge:"/assets/points/gold.svg"},4:{name:"Silver",badge:"/assets/points/silver.svg"},5:{name:"Bronze",badge:"/assets/points/bronze.svg"},6:{name:"Copper",badge:"/assets/points/copper.svg"}},k=[{value:"1",label:"1",imagePath:"/imgs/png/points-card/1.png"},{value:"2",label:"2",imagePath:"/imgs/png/points-card/2.png"},{value:"3",label:"3",imagePath:"/imgs/png/points-card/3.png"},{value:"4",label:"4",imagePath:"/imgs/png/points-card/4.png"},{value:"5",label:"5",imagePath:"/imgs/png/points-card/5.png"},{value:"6",label:"6",imagePath:"/imgs/png/points-card/6.png"}],E=(0,l.forwardRef)((e,a)=>{let o,s,A,l,d,u,h,p,m,y,b,x,w,v,C,B,E,F,T,U,I,Q,j,L,_,P,D,R,M,O,N,H,V,K,G,W,z,$,q,X,Y,J,Z,ee,et,er,en,ei,ea,eo,es,eA=(0,r.c)(90),{data:el}=e,ec=(0,n.useTranslations)(),{points:ed,league:eu,leagueId:eh,rank:ep,rankDiff:em,epoch:ef,showWeek:eg,overlay:ey}=el,eb=ey??"1";if(eA[0]!==eb)o=k.find(e=>e.value===eb)||k[0],eA[0]=eb,eA[1]=o;else o=eA[1];let ex=o,ew=S[eh]?.badge||S[6].badge;eA[2]===Symbol.for("react.memo_cache_sentinel")?(s={position:"relative",width:{xs:"100%",sm:600},maxWidth:"100%",aspectRatio:"3 / 2",borderRadius:"8px",overflow:"hidden",backgroundColor:"#0D0D0D",margin:0,display:"block",boxSizing:"border-box"},eA[2]=s):s=eA[2],eA[3]===Symbol.for("react.memo_cache_sentinel")?(A=(0,t.jsx)(i.Box,{component:"img",src:"/imgs/png/points-card/bg.png",alt:"Background",sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0,objectFit:"cover"}}),eA[3]=A):A=eA[3],eA[4]===Symbol.for("react.memo_cache_sentinel")?(l={position:"relative",zIndex:1,p:{xs:"20px",sm:"40px"},height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between"},eA[4]=l):l=eA[4],eA[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(i.Box,{component:"img",src:"/assets/hero-logo.svg",alt:"Hotstuff",sx:{width:{xs:90,sm:120},height:{xs:18,sm:24},objectFit:"contain",objectPosition:"left"}}),eA[5]=d):d=eA[5],eA[6]===Symbol.for("react.memo_cache_sentinel")?(u={display:"flex",flexDirection:"column",gap:{xs:"4px",sm:"8px"},maxWidth:{xs:"56%",sm:"none"}},eA[6]=u):u=eA[6],eA[7]===Symbol.for("react.memo_cache_sentinel")?(h={xs:"11px",sm:"16px"},eA[7]=h):h=eA[7],eA[8]===Symbol.for("react.memo_cache_sentinel")?(p={color:"rgba(255, 255, 255, 0.7)",fontSize:h,fontWeight:400,lineHeight:{xs:"14px",sm:"24px"},marginTop:{xs:"8px",sm:"16px"}},eA[8]=p):p=eA[8],eA[9]!==ec?(m=ec("modals.myPoints"),eA[9]=ec,eA[10]=m):m=eA[10],eA[11]!==m?(y=(0,t.jsx)(c.Typography,{sx:p,children:m}),eA[11]=m,eA[12]=y):y=eA[12],eA[13]===Symbol.for("react.memo_cache_sentinel")?(b={color:"#A6F787",fontWeight:500,fontSize:{xs:"30px",sm:"64px"},lineHeight:{xs:"34px",sm:"72px"},letterSpacing:"-0.02em"},eA[13]=b):b=eA[13],eA[14]!==ed?(x=(0,f.formatNumber)(ed,{useGrouping:!0,decimals:0}),eA[14]=ed,eA[15]=x):x=eA[15],eA[16]!==x?(w=(0,t.jsx)(c.Typography,{sx:b,children:x}),eA[16]=x,eA[17]=w):w=eA[17],eA[18]===Symbol.for("react.memo_cache_sentinel")?(v={display:"flex",gap:{xs:"12px",sm:"24px"},mt:{xs:"6px",sm:"24px"}},eA[18]=v):v=eA[18],eA[19]!==ef||eA[20]!==eg||eA[21]!==ec?(C=eg&&(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:{xs:"2px",sm:"4px"}},children:[(0,t.jsx)(c.Typography,{sx:{color:"rgba(255, 255, 255, 0.5)",fontSize:{xs:"10px",sm:"14px"},fontWeight:400,lineHeight:{xs:"12px",sm:"20px"}},children:ec("modals.week")}),(0,t.jsxs)(c.Typography,{sx:{color:"#FFFFFF",fontSize:{xs:"12px",sm:"20px"},fontWeight:500,lineHeight:{xs:"16px",sm:"28px"}},children:["#",(0,f.formatNumber)(ef,{useGrouping:!1,decimals:0})]})]}),eA[19]=ef,eA[20]=eg,eA[21]=ec,eA[22]=C):C=eA[22],eA[23]===Symbol.for("react.memo_cache_sentinel")?(B={display:"flex",flexDirection:"column",gap:{xs:"2px",sm:"4px"}},eA[23]=B):B=eA[23],eA[24]===Symbol.for("react.memo_cache_sentinel")?(E={xs:"10px",sm:"14px"},eA[24]=E):E=eA[24],eA[25]===Symbol.for("react.memo_cache_sentinel")?(F={color:"rgba(255, 255, 255, 0.5)",fontSize:E,fontWeight:400,lineHeight:{xs:"12px",sm:"20px"}},eA[25]=F):F=eA[25],eA[26]!==ec?(T=ec("points.rank"),eA[26]=ec,eA[27]=T):T=eA[27],eA[28]!==T?(U=(0,t.jsx)(c.Typography,{sx:F,children:T}),eA[28]=T,eA[29]=U):U=eA[29],eA[30]===Symbol.for("react.memo_cache_sentinel")?(I={display:"flex",alignItems:"center",gap:{xs:"4px",sm:"6px"}}
50,eA[30]=I):I=eA[30],eA[31]===Symbol.for("react.memo_cache_sentinel")?(Q={xs:"12px",sm:"20px"},eA[31]=Q):Q=eA[31],eA[32]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#FFFFFF",fontSize:Q,fontWeight:500,lineHeight:{xs:"16px",sm:"28px"}},eA[32]=j):j=eA[32],eA[33]!==ep?(L=(0,f.formatNumber)(ep,{useGrouping:!0,decimals:0}),eA[33]=ep,eA[34]=L):L=eA[34],eA[35]!==L?(_=(0,t.jsxs)(c.Typography,{sx:j,children:["#",L]}),eA[35]=L,eA[36]=_):_=eA[36],eA[37]!==em||eA[38]!==eg?(P=!eg&&void 0!==em&&0!==em&&(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:"2px"},children:[(0,t.jsx)(g.Iconify,{icon:em<0?"mdi:arrow-up":"mdi:arrow-down",sx:{color:em<0?"primary.main":"secondary.light",width:{xs:9,sm:12},height:{xs:9,sm:12}}}),(0,t.jsx)(c.Typography,{sx:{fontSize:{xs:"10px",sm:"14px"},fontWeight:500,color:em<0?"primary.main":"secondary.light",lineHeight:1},children:Math.abs(em)})]}),eA[37]=em,eA[38]=eg,eA[39]=P):P=eA[39],eA[40]!==_||eA[41]!==P?(D=(0,t.jsxs)(i.Box,{sx:I,children:[_,P]}),eA[40]=_,eA[41]=P,eA[42]=D):D=eA[42],eA[43]!==U||eA[44]!==D?(R=(0,t.jsxs)(i.Box,{sx:B,children:[U,D]}),eA[43]=U,eA[44]=D,eA[45]=R):R=eA[45],eA[46]===Symbol.for("react.memo_cache_sentinel")?(M={display:"flex",flexDirection:"column",gap:{xs:"2px",sm:"4px"}},eA[46]=M):M=eA[46],eA[47]===Symbol.for("react.memo_cache_sentinel")?(O={xs:"10px",sm:"14px"},eA[47]=O):O=eA[47],eA[48]===Symbol.for("react.memo_cache_sentinel")?(N={color:"rgba(255, 255, 255, 0.5)",fontSize:O,fontWeight:400,lineHeight:{xs:"12px",sm:"20px"}},eA[48]=N):N=eA[48],eA[49]!==ec?(H=ec("points.league"),eA[49]=ec,eA[50]=H):H=eA[50],eA[51]!==H?(V=(0,t.jsx)(c.Typography,{sx:N,children:H}),eA[51]=H,eA[52]=V):V=eA[52],eA[53]===Symbol.for("react.memo_cache_sentinel")?(K={display:"flex",alignItems:"center",justifyContent:"center",gap:{xs:"3px",sm:"4px"}},eA[53]=K):K=eA[53],eA[54]===Symbol.for("react.memo_cache_sentinel")?(G={width:{xs:14,sm:24},height:{xs:14,sm:24},flexShrink:0,objectFit:"contain"},eA[54]=G):G=eA[54],eA[55]!==eu||eA[56]!==ew?(W=(0,t.jsx)(i.Box,{component:"img",src:ew,alt:eu,sx:G}),eA[55]=eu,eA[56]=ew,eA[57]=W):W=eA[57],eA[58]===Symbol.for("react.memo_cache_sentinel")?(z={xs:"12px",sm:"20px"},eA[58]=z):z=eA[58],eA[59]===Symbol.for("react.memo_cache_sentinel")?($={color:"#FFFFFF",fontSize:z,fontWeight:500,lineHeight:{xs:"16px",sm:"28px"}},eA[59]=$):$=eA[59],eA[60]!==eu?(q=(0,t.jsx)(c.Typography,{sx:$,children:eu}),eA[60]=eu,eA[61]=q):q=eA[61],eA[62]!==W||eA[63]!==q?(X=(0,t.jsxs)(i.Box,{sx:K,children:[W,q]}),eA[62]=W,eA[63]=q,eA[64]=X):X=eA[64],eA[65]!==V||eA[66]!==X?(Y=(0,t.jsxs)(i.Box,{sx:M,children:[V,X]}),eA[65]=V,eA[66]=X,eA[67]=Y):Y=eA[67],eA[68]!==C||eA[69]!==R||eA[70]!==Y?(J=(0,t.jsxs)(i.Box,{sx:v,children:[C,R,Y]}),eA[68]=C,eA[69]=R,eA[70]=Y,eA[71]=J):J=eA[71],eA[72]!==y||eA[73]!==w||eA[74]!==J?(Z=(0,t.jsxs)(i.Box,{sx:u,children:[y,w,J]}),eA[72]=y,eA[73]=w,eA[74]=J,eA[75]=Z):Z=eA[75],eA[76]===Symbol.for("react.memo_cache_sentinel")?(ee={xs:"10px",sm:"12px"},eA[76]=ee):ee=eA[76],eA[77]===Symbol.for("react.memo_cache_sentinel")?(et=(0,t.jsx)(c.Typography,{sx:{color:"rgba(255, 255, 255, 0.5)",fontSize:ee,fontWeight:400,lineHeight:{xs:"12px",sm:"16px"}},children:"hotstuff.trade"}),eA[77]=et):et=eA[77],eA[78]!==Z?(er=(0,t.jsxs)(i.Box,{sx:l,children:[d,Z,et]}),eA[78]=Z,eA[79]=er):er=eA[79],eA[80]===Symbol.for("react.memo_cache_sentinel")?(en=(0,t.jsx)(i.Box,{sx:{position:"absolute",top:{xs:"12px",sm:"24px"},right:{xs:"12px",sm:"24px"},bottom:{xs:"12px",sm:"24px"},width:{xs:"35%",sm:"220px"},zIndex:2,pointerEvents:"none",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:"8px",backgroundColor:"transparent"}}),eA[80]=en):en=eA[80],eA[81]===Symbol.for("react.memo_cache_sentinel")?(ei={position:"absolute",top:0,right:0,bottom:0,width:"45%",zIndex:3,pointerEvents:"none",display:"flex",alignItems:"flex-end",justifyContent:"center"},eA[81]=ei):ei=eA[81];let ev=`${ex.label} overlay`;return eA[82]===Symbol.for("react.memo_cache_sentinel")?(ea={width:"100%",height:"95%",objectFit:"contain",objectPosition:"center bottom"},eA[82]=ea):ea=eA[82],eA[83]!==ex.imagePath||eA[84]!==ev?(eo=(0,t.jsx)(i.Box,{sx:ei,children:(0,t.jsx)(i.Box,{component:"img",src:ex.imagePath,alt:ev,sx:ea})}),eA[83]=ex.imagePath,eA[84]=ev,eA[85]=eo):eo=eA[85],eA[86]!==a||eA[87]!==er||eA[88]!==eo?(es=(0,t.jsxs)(i.Box,{ref:a,sx:s,children:[A,er,en,eo]}),eA[86]=a,eA[87]=er,eA[88]=eo,eA[89]=es):es=eA[89],es});E.displayName="PointsShareCard",e.s(["PointsShareCardModal",0,()=>{var e;let r,o,s=(0,n.useTranslations)(),{payload:A}=(0,m.useActionStore)(),{address:S}=(0,m.useAuthStore)(),F=(0,m.useUserTradingDataStore)(e=>e.referralSummary[S]),T=(e=F?.codes?.filter(Boolean)?.[0]||"",r=(0,v.getSubdomainHostname)(),e?`https://${r}/join/${e}`:`https://${r}/join`),[U,I]=(0,l.useState)(""),[Q,j]=(0,l.useState)("1"),[L,_]=(0,l.useState)("total"),P=(0,l.useRef)(null),D=(0,u.useMediaQuery)("(max-width: 1000px)"),R=A?{points:A.points??0,league:A.league??"Copper",leagueId:A.leagueId??6,rank:A.rank??0,rankDiff:A.rankDiff,epoch:A.epoch??1}:null,M=(o=A?.lastEpochData)?{points:o.points??0,league:o.league??"Copper",leagueId:o.leagueId??6,rank:o.rank??0,epoch:o.epoch??1}:null,O=!!M,N=O&&"current-week"===L?M:R,H=!O||"current-week"===L,V=N?{...N,showWeek:H}:null,K=(e,t)=>{let r=e.showWeek?`Week: #${(0,f.formatNumber)(e.epoch,{useGrouping:!1,decimals:0})} 51`:"";return`My Points: ${(0,f.formatNumber)(e.points,{useGrouping:!0,decimals:0})} 52 53${r}League: ${e.league} 54Rank: #${(0,f.formatNumber)(e.rank,{useGrouping:!0,decimals:0})} 55 56Trade on @tradehotstuff 57 58${t}`};if((0,l.useEffect)(()=>{V&&I(K(V,T))},[V,L]),!V)return(0,t.jsx)(a.ModalBox,{title:s("competitions.shareCardTitle"),active:"points-share-card",maxWidth:"lg",children:(0,t.jsx)(i.Box,{children:(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",children:s("common.noData")})})});let G=async()=>
58{if(P.current)try{let e=P.current.getBoundingClientRect(),t=P.current.querySelectorAll("img"),r=new Map;await Promise.all(Array.from(t).map(async e=>{e.complete||await new Promise(t=>{e.onload=t,e.onerror=t});try{let t=await fetch(e.src),n=await t.blob(),i=await new Promise(e=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.readAsDataURL(n)});r.set(e,e.src),e.src=i}catch{}})),await new Promise(e=>setTimeout(e,100));let n=await (0,B.default)(P.current,{backgroundColor:"#0D0D0D",scale:2,logging:!1,useCORS:!1,allowTaint:!1,imageTimeout:15e3,width:e.width,height:e.height});r.forEach((e,t)=>{t.src=e}),n.toBlob(e=>{if(e){let t=URL.createObjectURL(e),r=document.createElement("a");r.download=`hotstuff-points-${Date.now()}.png`,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}},"image/png",1)}catch(e){console.error("Error saving image:",e),C.showToast.error({message:s("modals.failedToSaveImage")})}},W={...V,referralLink:T,overlay:Q};return(0,t.jsx)(a.ModalBox,{title:s("competitions.shareCardTitle"),active:"points-share-card",maxWidth:"md",sx:{"& .MuiDialog-paper":{maxWidth:D?"650px":"md"}},children:(0,t.jsxs)(p.default,{container:!0,spacing:3,children:[(0,t.jsx)(p.default,{size:{xs:12,md:8},children:(0,t.jsx)(E,{ref:P,data:W})}),(0,t.jsx)(p.default,{size:{xs:12,md:4},children:(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",gap:3},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[O&&(0,t.jsx)(b.default,{options:[{label:s("points.totalPoints"),value:"total"},{label:s("modals.currentWeek"),value:"current-week"}],value:L,onChange:e=>_(e),tabSx:{px:1.5,fontSize:"13px"},sx:{width:"fit-content"}}),(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:s("referrals.referralLink")}),(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:e=>(0,x.varAlpha)(e.vars.palette.grey["500Channel"],.08),borderRadius:1,p:"8px 12px",gap:1},children:[(0,t.jsx)(c.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:T}),(0,t.jsx)(h.IconButton,{size:"small",onClick:()=>{navigator.clipboard.writeText(T),C.showToast.success({message:s("referrals.referralLinkCopied")})},sx:{p:.5,flexShrink:0,transition:"all 0.2s ease-in-out","&:hover":{color:"primary.main"}},children:(0,t.jsx)(g.Iconify,{width:16,height:16,icon:"solar:copy-outline",sx:{color:"text.secondary"}})})]})]}),(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:s("modals.editYourText")}),(0,t.jsx)(d.TextField,{fullWidth:!0,multiline:!0,rows:5,size:"medium",slotProps:{htmlInput:{spellCheck:"false"}},value:U,onChange:e=>I(e.target.value),sx:{"& .MuiOutlinedInput-root":{padding:0,paddingBottom:"8px",backgroundColor:"grey.800","& fieldset":{borderColor:"transparent"}}}})]}),(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(c.Typography,{variant:"body1",color:"text.secondary",sx:{mb:1},children:s("modals.overlay")}),(0,t.jsx)(i.Box,{sx:{display:"flex",gap:1,flexWrap:"wrap",justifyContent:"left"},children:k.map(e=>{let r=Q===e.value;return(0,t.jsx)(i.Box,{onClick:()=>j(e.value),sx:{width:40,height:40,borderRadius:"4px",backgroundColor:"grey.800",border:r?"2px solid":"1px solid",borderColor:r?"grey.500":"grey.700",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},title:e.label,children:(0,t.jsx)(i.Box,{sx:{position:"relative",width:"100%",height:"100%"},children:(0,t.jsx)(w.default,{src:e.imagePath,alt:`${e.label} overlay preview`,fill:!0,style:{objectFit:"cover"}})})},e.value)})})]})]})]}),(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"row",gap:"8px",mt:"auto"},children:[(0,t.jsx)(y.ActionButton,{fullWidth:!0,variant:"contained",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",lineHeight:1,"& .MuiButton-startIcon":{margin:0,display:"inline-flex",alignItems:"center"}},startIcon:(0,t.jsx)(g.Iconify,{icon:"eva:download-outline",width:16,height:16}),color:"inherit",size:"medium",onClick:G,children:s("modals.saveImage")}),(0,t.jsx)(y.ActionButton,{fullWidth:!0,variant:"contained",sx:{dis
58play:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",lineHeight:1,"& .MuiButton-startIcon":{margin:0,display:"inline-flex",alignItems:"center"}},startIcon:(0,t.jsx)(g.Iconify,{icon:"eva:external-link-outline",width:16,height:16}),color:"inherit",size:"medium",onClick:e=>{e?.preventDefault(),e?.stopPropagation();try{let e=U.trim()||K(V,T);e.length>280&&(e=e.substring(0,277)+"...");let t=new URLSearchParams;t.append("text",e);let r=`https://x.com/intent/tweet?${t.toString()}`;window.open(r,"_blank","noopener,noreferrer")||console.error("Failed to open Twitter/X window. Popup may be blocked.")}catch(e){console.error("Error sharing on X:",e)}},children:s("modals.shareOnX")})]})]})})]})})}],2158);var F=e.i(650599);e.s(["LeaderboardShareCardModal",0,()=>{let e,i,a,o,s=(0,r.c)(10),A=(0,n.useTranslations)();s[0]!==A?(e=e=>{if(!e)return null;let t=Number(e.rank??0),r=e.rankDisplay??(t>0?`#${(0,f.formatNumber)(t,{decimals:0,useGrouping:!0})}`:"-");return{type:"position",competitionShare:!0,competitionTitle:e.leaderboardTitle??A("leaderboard.title"),rank:t,volume:e.metricDisplay??"$0.00",rankDisplay:r,volumeDisplay:e.metricDisplay??"$0.00",rankLabel:A("points.rank"),metricLabel:e.metricLabel??A("common.volume"),instrumentName:"",pnl:0,isPositive:!0,roi:0,entryPrice:0,markPrice:0,leverage:"1x"}},s[0]=A,s[1]=e):e=s[1];let l=e;s[2]!==A?(i=(e,t)=>{let r=e.rankDisplay??(Number(e.rank??0)>0?`#${(0,f.formatNumber)(Number(e.rank),{decimals:0,useGrouping:!0})}`:"-"),n=e.metricLabel??A("common.volume"),i=e.volumeDisplay??"$0.00",a=e.competitionTitle??A("leaderboard.title");return`${a} 59Rank: ${r} 60${n}: ${i} 61 62Trade on @tradehotstuff 63 64${t}`},s[2]=A,s[3]=i):i=s[3];let c=i;return s[4]!==A?(a=A("competitions.shareCardTitle"),s[4]=A,s[5]=a):a=s[5],s[6]!==l||s[7]!==c||s[8]!==a?(o=(0,t.jsx)(F.ShareCardModal,{modalKey:"leaderboard-share-card",title:a,extractData:l,generateShareText:c}),s[6]=l,s[7]=c,s[8]=a,s[9]=o):o=s[9],o}],175019)},836681,674823,72341,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(618566),a=e.i(709643),o=e.i(838456),s=e.i(397837),A=e.i(740661),l=e.i(411725),c=e.i(479589),d=e.i(162282),u=e.i(782904);e.i(992550);var h=e.i(407585);e.i(842917),e.i(68043);var p=e.i(268407);e.i(756080),e.s(["BannerTrigger",0,()=>null,"CompetitionAnnouncementBanner",0,()=>{let e,n,m,f,g,y,b,x,w,v,C,B,S,k,E,F,T,U,I,Q=(0,r.c)(34),j=(0,a.useTranslations)(),L=(0,i.useRouter)(),{setModal:_}=(0,p.useActionStore)(),{setBannerLastShownAt:P}=(0,p.useTradingPreferencesStore)();Q[0]!==P||Q[1]!==_?(e=()=>{P("competition-1",Date.now()),_(null)},Q[0]=P,Q[1]=_,Q[2]=e):e=Q[2];let D=e;return Q[3]===Symbol.for("react.memo_cache_sentinel")?(n={backdrop:{sx:{backgroundColor:"rgba(0,0,0,0.75)"}}},m={"& .MuiDialog-paper":{width:{xs:"90vw",md:520},maxHeight:{xs:"85vh",md:"unset"},borderRadius:"12px",overflow:"hidden",backgroundColor:"#0F0F0F"}},Q[3]=n,Q[4]=m):(n=Q[3],m=Q[4]),Q[5]===Symbol.for("react.memo_cache_sentinel")?(f={display:"flex",justifyContent:"space-between",alignItems:"center",px:1.5,py:1},Q[5]=f):f=Q[5],Q[6]!==j?(g=j("competitions.title"),Q[6]=j,Q[7]=g):g=Q[7],Q[8]!==g?(y=(0,t.jsx)(u.Typography,{variant:"body1",fontWeight:500,children:g}),Q[8]=g,Q[9]=y):y=Q[9],Q[10]===Symbol.for("react.memo_cache_sentinel")?(b={color:"text.secondary","&:hover":{color:"#fff"}},x=(0,t.jsx)(h.Iconify,{icon:"mingcute:close-line",width:18}),Q[10]=b,Q[11]=x):(b=Q[10],x=Q[11]),Q[12]!==D?(w=(0,t.jsx)(d.IconButton,{onClick:D,size:"small",sx:b,children:x}),Q[12]=D,Q[13]=w):w=Q[13],Q[14]!==y||Q[15]!==w?(v=(0,t.jsxs)(c.DialogTitle,{sx:f,children:[y,w]}),Q[14]=y,Q[15]=w,Q[16]=v):v=Q[16],Q[17]===Symbol.for("react.memo_cache_sentinel")?(C={p:1.5,pt:0,display:"flex",flexDirection:"column",gap:1.5},Q[17]=C):C=Q[17],Q[18]===Symbol.for("react.memo_cache_sentinel")?(B={borderRadius:"10px",overflow:"hidden"},Q[18]=B):B=Q[18],Q[19]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(o.Box,{sx:B,children:(0,t.jsx)("img",{src:"/banner/1.png",alt:"Banner",style:{width:"100%",height:"auto",display:"block"}})}),Q[19]=S):S=Q[19],Q[20]!==D||Q[21]!==L?(k=()=>{D(),L.push("/competitions/hotstuff-volume-championship")},Q[20]=D,Q[21]=L,Q[22]=k):k=Q[22],Q[23]===Symbol.for("react.memo_cache_sentinel")?(E=(0,t.jsx)(h.Iconify,{icon:"material-symbols:arrow-right-alt",width:20}),Q[23]=E):E=Q[23],Q[24]===Symbol.for("react.memo_cache_sentinel")?(F={width:"100%",height:36,minWidth:64,borderRadius:"8px",alignSelf:"center",backgroundColor:"#93EA5D !important",color:"#000","&:hover":{backgroundColor:"#93EA5D !important"},"& .MuiButton-endIcon":{color:"#000"}},Q[24]=F):F=Q[24],Q[25]!==j?(T=j("modals.checkYourRank"),Q[25]=j,Q[26]=T):T=Q[26],Q[27]!==k||Q[28]!==T?(U=(0,t.jsxs)(l.DialogContent,{sx:C,children:[S,(0,t.jsx)(s.Button,{variant:"contained",onClick:k,endIcon:E,sx:F,children:T})]}),Q[27]=k,Q[28]=T,Q[29]=U):U=Q[29],Q[30]!==D||Q[31]!==U||Q[32]!==v?(I=(0,t.jsxs)(A.Dialog,{open:!0,onClose:D,maxWidth:!1,slotProps:n,sx:m,children:[v,U]}),Q[30]=D,Q[31]=U,Q[32]=v,Q[33]=I):I=Q[33],I}],836681);var m=e.i(525836),f=e.i(206242),g=e.i(632418);e.i(565306);var y=e.i(849850),b=e.i(727726);e.i(929009);var x=e.i(444714),w=e.i(796516);e.s(["ApproveBrokerModal",0,()=>{let e=(0,a.useTranslations)(),{payload:r,isLoading:i,setLoading:A,setModal:l}=(0,p.useActionStore)(),{address:c}=(0,p.useAuthStore)(),{fetchBrokers:d}=(0,x.useBrokers)({enabled:!1}
64),[v,C]=(0,n.useState)(""),[B,S]=(0,n.useState)(""),{approveBrokerFee:k}=(0,b.useAccountActions)(),[E,F]=(0,n.useState)(null);(0,n.useEffect)(()=>{r&&(S(r.brokerAddress||""),C(r.maxFeeRate?String(r.maxFeeRate):""))},[r]);let T=async()=>{A(!0);try{await k(B,v),l(null),setTimeout(()=>{d(1,100)},1e3)}catch(e){console.error("Approve broker failed:",e)}finally{A(!1)}};(0,n.useEffect)(()=>{let t=parseFloat(v);B?(0,w.isAddress)(B)?!v||isNaN(t)?F(e("modals.maxFeeRateRequired")):t<=0?F(e("modals.feeRateGreaterThanZero")):t>.1?F(e("modals.feeRateCannotExceed")):F(null):F(e("modals.builderAddressInvalid")):F(e("modals.builderAddressRequired"))},[v,B]);let U=v?(100*parseFloat(v)).toFixed(3):"0";return(0,t.jsxs)(y.ModalBox,{title:e("modals.approveBuilder"),active:"approve-broker",disableClose:i,children:[(0,t.jsxs)(o.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsxs)(o.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)(u.Typography,{variant:"body1",color:"textSecondary",children:e("tables.builderAddress")}),(0,t.jsx)(m.default,{fullWidth:!0,value:B,onChange:e=>{S(e.target.value)},placeholder:"0x...",disabled:i})]}),(0,t.jsxs)(o.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,t.jsx)(u.Typography,{variant:"body1",color:"textSecondary",children:e("tables.maxFeeRate")}),(0,t.jsx)(m.default,{fullWidth:!0,endAdornment:(0,t.jsx)(f.InputAdornment,{position:"end",children:(0,t.jsx)(s.Button,{variant:"contained",size:"small",sx:{width:58},disabled:i,onClick:()=>{C("0.01")},children:e("common.max")})}),value:v,onChange:e=>{C(e.target.value)},type:"number",placeholder:"0.001",disabled:i})]})]}),E&&(0,t.jsxs)(o.Box,{px:1,py:.75,sx:{backgroundColor:e=>(0,g.varAlpha)(e.vars.palette.error.mainChannel,.12),display:"flex",borderRadius:.75,alignItems:"center",gap:1},children:[(0,t.jsx)(h.Iconify,{icon:"mingcute:alert-octagon-line",width:20,height:20,sx:{color:"secondary.main"}}),(0,t.jsx)(u.Typography,{variant:"body1",color:"secondary.light",children:E})]}),(0,t.jsx)(s.Button,{fullWidth:!0,variant:"contained",color:"primary",size:"large",onClick:T,disableRipple:!0,loading:i,disabled:null!==E||i,children:i?e("common.confirming"):e("modals.approveBuilder")}),(0,t.jsx)(u.Typography,{variant:"body1",color:"textSecondary",children:e("modals.builderFeeNotice",{feePercentage:U})})]})}],674823);var v=e.i(954512),C=e.i(421852),B=e.i(915833);let S=(0,n.forwardRef)(function({type:e,rewardType:r,isScratched:i,boostEndsAt:a,width:o=284,height:s=372,onClick:A,children:l},c){let d=(0,v.useTheme)(),u=(0,n.useRef)(null),p=(0,n.useRef)(null),m=C.EASTER_CARD_CONFIGS[e]??C.EASTER_CARD_CONFIGS[0],f=C.EASTER_REWARD_CONFIGS[r]??C.EASTER_REWARD_CONFIGS[0],g=o/284,[y,b]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!a)return void b(null);let e=new Date(a).getTime(),t=()=>{let t=e-Date.now();b(t>0?t:0)};t();let r=setInterval(t,1e3);return()=>clearInterval(r)},[a]);let x=null!==y&&y<=0,w=null===y?null:x?"Expired":function(e){if(e<=0)return"";let t=Math.floor(e/1e3),r=Math.floor(t/3600),n=Math.floor(t%3600/60),i=t%60;return r>0?`${r}h ${n}m`:n>0?`${n}m ${i}s`:`${i}s`}(y),S=async()=>{let t=u.current;if(t)try{let r=new Map;await Promise.all(Array.from(t.querySelectorAll("img")).map(async e=>{e.complete||await new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()});try{let t=await fetch(e.src).then(e=>e.blob()),n=await new Promise(e=>{let r=new FileReader;r.onloadend=()=>e(r.result),r.readAsDataURL(t)});r.set(e,e.src),e.src=n}catch{}})),p.current&&(p.current.style.display="none"),await new Promise(e=>setTimeout(e,100));let n=await (0,B.default)(t,{backgroundColor:null,scale:Math.min(window.devicePixelRatio||1,2),logging:!1,useCORS:!0,allowTaint:!1,width:o,height:s}),i=await new Promise(e=>{n.toBlob(t=>e(t),"image/png",1)}),a=i?URL.createObjectURL(i):n.toDataURL("image/png",1),A=document.createElement("a");A.download=`hotstuff-easter-card-${e}.png`,A.href=a,A.rel="noopener",document.body.appendChild(A),A.click(),document.body.removeChild(A),i&&URL.revokeObjectURL(a),r.forEach((e,t)=>{t.src=e}),p.current&&(p.current.style.display="")}catch(e){p.current&&(p.current.style.display=""),console.error("Easter card download failed:",e)}};return(0,t.jsxs)("div",{ref:e=>{u.current=e,"function"==typeof c?c(e):c&&(c.current=e)},onClick:A,style:{position:"relative",width:o,height:s,borderRadius:14*g,overflow:"hidden",cursor:A?"pointer":"default",flexShrink:0,border:"1px solid rgba(255,255,255,0.12)"},children:[(0,t.jsx)("img",{src:i?m.scratchedBg:m.unscratchedBg,width:o,height:s,style:{display:"block",width:"100%",height:"100%",objectFit:"cover"},alt:""}),w&&i&&(0,t.jsx)("div",{style:{position:"absolute",top:14*g,left:-26*g,width:100*g,textAlign:"center",background:x?d.palette.secondary.main:m.accentColor,color:x?"#fff":"#000",fontSize:9*g,fontWeight:700,padding:`${4*g}px 0`,transform:"rotate(-45deg)",zIndex:4,letterSpacing:"0.03em",boxShadow:"0 2px 6px rgba(0,0,0,0.3)"},children:w}),i&&(0,t.jsxs)("div",{style:{position:"absolute",left:16*g,bottom:10*g,zIndex:2},children:[(0,t.jsx)("div",{style:{fontSize:12*g,lineHeight:"14px",color:"rgba(255,255,255,1)"},children:"Rank Multiplier"}),(0,t.jsxs)("div",{style:{fontSize:80*g,fontWeight:500,lineHeight:"120%",color:m.accentColor},children:[f.multiplier,"x"]}),(0,t.jsx)("div",{style:{fontSize:12*g,color:"rgba(255,255,255,1)",marginBottom:4*g},children:"Valid for"}),(0,t.jsxs)("div",{style:{fontSize:40*g,lineHeight:"120%",fontWeight:700,color:m.accentColor},children:[f.validForHours," hours"]})]}),i&&(0,t.jsx)("button",{ref:p,onClick:e=>{e.stopPropagation(),S()},style:{position:"absolute",top:10*g,right:10*g,background:"rgba(255,255,255,0.15)",border:"none",borderRadius:"50%",width:32*g,height:32*g,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:0,zIndex:3},"aria-label":"Download",children:(0,t.jsx)(h.Iconify,{icon:"eva:download-outline",width:16*g,height:16*g,sx:{color:"#fff"}})}),l]})});var k=e.i(242405);function E(e){return e.eggs}function F(e){return e.showCard}function T(e){return 2===e.status||3===e.status}e.s(["CollectedEggsModal",0,()=>{let e,n,i,s,A,l,c,d,h,m=(0,r.c)(25),f=(0,a.useTranslations)(),g=(0,p.useEasterStore)(E),b=(0,p.useEasterStore)(F),x=(0,k.default)("(max-width: 1000px)");if(m[0]!==g||m[1]!==x||m[2]!==b||m[3]!==f){let r=g.filter(T);n=y.ModalBox,m[11]!==f?(A=f("modals.collectedEggs"),m[11]=f,m[12]=A):A=m[12],l="collected-eggs",m[13]===Symbol.for("react.memo_cache_sentinel")?(c={"& .MuiDialog-paper":{maxWidth:"960px",width:"90%"}},m[13]=c):c=m[13],e=o.Box,m[14]===Symbol.for("react.memo_cache_sentinel")?(i={display:"flex",flexDirection:"column",gap:2,pb:{xs:1,md:3},px:{xs:0,md:2}},m[14]=i):i=m[14],s=r.length>0?(0,t.jsx)(o.Box,{sx:{display:"flex",flexWrap:x?"nowrap":"wrap",gap:2,overflowX:x?"auto":"visible",scrollSnapType:x?"x mandatory":"none","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",WebkitOverflowScrolling:"touch"},children:r.map(e=>(0,t.jsx)(o.Box,{sx:{scrollSnapAlign:x?"center":"none"},children:(0,t.jsx)(S,{type:e.egg_type,rewardType:e.reward_type,isScratched:3===e.status,boostEndsAt:e.boost_ends_at,width:284,height:372,onClick:3!==e.status?()=>b(e):void 0})},e.egg_type))}):(0,t.jsx)(o.Box,{sx:{textAlign:"center",py:4},children:(0,t.jsx)(u.Typography,{variant:"body1",color:"textSecondary",children:f("modals.noEggsCollected")})}),m[0]=g,m[1]=x,m[2]=b,m[3]=f,m[4]=e,m[5]=n,m[6]=i,m[7]=s,m[8]=A,m[9]=l,m[10]=c}else e=m[4],n=m[5],i=m[6],s=m[7],A=m[8],l=m[9],c=m[10];return m[15]!==e||m[16]!==i||m[17]!==s?(d=(0,t.jsx)(e,{sx:i,children:s}),m[15]=e,m[16]=i,m[17]=s,m[18]=d):d=m[18],m[19]!==n||m[20]!==A||m[21]!==l||m[22]!==c||m[23]!==d?(h=(0,t.jsx)(n,{title:A,active:l,sx:c,children:d}),m[19]=n,m[20]=A,m[21]=l,m[22]=c,m[23]=d,m[24]=h):h=m[24],h}],72341)},38355,e=>{"use strict";var t=e.i(474076),r=e.i(271645),n=e.i(982615),i=e.i(120785),a=e.i(206287),o=e.i(31066),s=e.i(57159),A=e.i(911347),l=e.i(736837),c=e.i(321960),d=e.i(103439),u=e.i(268407),h=e.i(818279),p=e.i(344873);let m=(0,r.createContext)(null),f=e=>e instanceof Error?e.message:"Unable to process FIFA cards";e.s(["FifaProvider",0,function({children:e}){let{isConnected:g}=(0,n.useAccount)(),{authenticated:y,ready:b}=(0,i.usePrivy)(),{wallets:x}=(0,a.useWallets)(),{address:w,master:v,status:C}=(0,u.useAuthStore)(),B=(0,u.useFifaStore)(e=>e.setCards),S=(0,u.useFifaStore)(e=>e.setLoading),k=(0,u.useFifaStore)(e=>e.setActing),E=(0,u.useFifaStore)(e=>e.setError),F=(0,u.useFifaStore)(e=>e.clearCards),T=(0,r.useMemo)(()=>w&&"0x0000000000000000000000000000000000000000"!==w?(0,p.normalizeAddress)(w):null,[w]),U=(0,r.useCallback)(async e=>{if(g){let t=await (0,o.getWalletClient)(d.wagmiConfig,{account:v});if(t)return t.signMessage({account:v,message:e})}if(y&&b&&x.length>0){let t=x[0];if(!t)throw Error("No Privy wallet found");let r=await t.getEthereumProvider();return(0,s.createWalletClient)({account:v,chain:c.mainnet,transport:(0,A.custom)(r)}).signMessage({account:v,message:e})}throw Error("No wallet signer available")},[y,b,x,v,g]),I=(0,r.useCallback)(async e=>{if(!T)throw Error("No active FIFA account");let t=u.useAuthStore.getState().agents[T];if(!t?.privateKey)throw Error("No agent signer available");return(0,l.privateKeyToAccount)(t.privateKey).signMessage({message:e})},[T]),Q=(0,r.useCallback)(async()=>
64{if(!T||"disconnected"===C)return void F();S(!0),E(null);try{let e=await (0,h.getFifaCards)({user:T});B(e)}catch(e){B([]),E(f(e))}finally{S(!1)}},[T,C,F,B,E,S]),j=(0,r.useCallback)(async e=>{if(!T||"disconnected"===C){let e=Error("No active FIFA account");throw E(e.message),e}k(!0),E(null);let t=(0,h.buildUpdateFifaCardSignaturePayload)(T,e);try{let r;try{r=await U(t.message)}catch(n){let e=f(n).toLowerCase();if(!e.includes("no wallet signer available")&&!e.includes("no privy wallet found"))throw n;r=await I(t.message)}await (0,h.updateFifaCard)({user:t.user,card_type:e,action:"activate",signature:r}),await Q()}catch(e){throw E(f(e)),await Q(),e}finally{k(!1)}},[T,Q,k,E,I,U,C]);(0,r.useEffect)(()=>{"disconnected"!==C&&T?Q():F()},[T,C,F,Q]);let L=(0,r.useMemo)(()=>({refreshCards:Q,activateCard:j}),[j,Q]);return(0,t.jsx)(m.Provider,{value:L,children:e})},"useFifaCompetition",0,()=>{let e=(0,r.useContext)(m);if(!e)throw Error("useFifaCompetition must be used within FifaProvider");return e}])},961879,e=>{"use strict";e.s(["FifaSuperCardsModal",()=>S]);var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(838456),a=e.i(397837),o=e.i(700756),s=e.i(917098),A=e.i(162282),l=e.i(782904);e.i(992550);var c=e.i(407585),d=e.i(858532),u=e.i(709643);e.i(730603);var h=e.i(38355),p=e.i(268407),m=e.i(344873),f=e.i(818279),g=e.i(915833);e.i(565306);var y=e.i(849850),b=e.i(485683);let x="/imgs/png/competitions/fifa/modric.svg",w=e=>e.card_type>=10?"legendary":"super",v=e=>{let t=Number(e.threshold_volume);return Number.isFinite(t)?t:1/0},C=e=>{let a,o,s,A,l,c=(0,r.c)(10),{src:d,alt:u}=e,[h,p]=(0,n.useState)(d);return c[0]!==d?(a=()=>{p(d)},o=[d],c[0]=d,c[1]=a,c[2]=o):(a=c[1],o=c[2]),(0,n.useEffect)(a,o),c[3]!==h?(s=()=>{h!==x&&p(x)},c[3]=h,c[4]=s):s=c[4],c[5]===Symbol.for("react.memo_cache_sentinel")?(A={display:"block",width:"100%",aspectRatio:"280 / 236",objectFit:"cover",backgroundColor:"#101010"},c[5]=A):A=c[5],c[6]!==u||c[7]!==h||c[8]!==s?(l=(0,t.jsx)(i.Box,{component:"img",src:h,alt:u,onError:s,sx:A}),c[6]=u,c[7]=h,c[8]=s,c[9]=l):l=c[9],l},B=({card:e,cardIndex:r,isActing:s,onActivate:u,t:h})=>{let p,f,y=null!=(p=e.boost_ends_at?new Date(e.boost_ends_at).getTime():null)&&p>Date.now()?{stateKey:"common.active",ribbonBackground:"#D8FFB6",ribbonColor:"#13210D",pillBackground:"rgba(147, 234, 93, 0.16)",pillColor:"#D8FFB6",buttonBackground:"#1F2B18",buttonColor:"#D8FFB6",hasDimOverlay:!1}:1===e.status?{stateKey:"competitions.unlocked",ribbonBackground:"#FFFFFF",ribbonColor:"#141414",pillBackground:"rgba(255, 255, 255, 0.16)",pillColor:"#FFFFFF",buttonBackground:"#FFFFFF",buttonColor:"#141414",hasDimOverlay:!1}:2===e.status?{stateKey:"modals.expired",ribbonBackground:"#FFFFFF",ribbonColor:"#141414",pillBackground:"rgba(255, 255, 255, 0.12)",pillColor:"rgba(255,255,255,0.72)",buttonBackground:"#2B2B2B",buttonColor:"rgba(255,255,255,0.72)",hasDimOverlay:!0}:{stateKey:"modals.locked",ribbonBackground:"#FFFFFF",ribbonColor:"#141414",pillBackground:"rgba(255, 255, 255, 0.12)",pillColor:"rgba(255,255,255,0.72)",buttonBackground:"#2B2B2B",buttonColor:"rgba(255,255,255,0.72)",hasDimOverlay:!0},b=1===e.status,v="common.active"===y.stateKey,B=(f=e.image)?`/imgs/png/competitions/fifa/${f}.svg`:x,S=(0,n.useRef)(null),[k,E]=(0,n.useState)(!1),F=b?h("modals.activateCard"):h(y.stateKey),T="legendary"===w(e),U=T?h("modals.randomDrop"):(0,m.formatNumber)(e.threshold_volume,{currency:"$",decimals:0}),I=async()=>{let t=S.current;if(!t||k)return;let n=new Map;try{E(!0),await Promise.all(Array.from(t.querySelectorAll("img")).map(async e=>{if(e.complete||await new Promise(t=>{e.onload=()=>t(),e.onerror=()=>t()}),!e.src.startsWith("data:"))try{let t=await fetch(e.src),r=await t.blob(),i=await new Promise(e=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.readAsDataURL(r)});n.set(e,e.src),e.src=i}catch{}})),await new Promise(e=>setTimeout(e,100));let i=t.getBoundingClientRect(),a=await (0,g.default)(t,{backgroundColor:"#141414",scale:Math.min(window.devicePixelRatio||1,2),logging:!1,useCORS:!0,allowTaint:!1,imageTimeout:15e3,width:i.width,height:i.height,onclone:e=>{let t=e.querySelector("[data-fifa-card-actions]");t instanceof HTMLElement&&(t.style.display="none");let r=e.querySelector("[data-fifa-card-export]");r instanceof HTMLElement&&(r.style.width=`${i.width}px`,r.style.minWidth=`${i.width}px`,r.style.maxWidth=`${i.width}px`)}}),o=await new Promise(e=>{a.toBlob(t=>e(t),"image/png",1)}),s=o?URL.createObjectURL(o):a.toDataURL("image/png",1),A=document.createElement("a");A.download=`fifa-${w(e)}-card-${r+1}.png`,A.href=s,A.rel="noopener",document.body.appendChild(A),A.click(),document.body.removeChild(A),o&&URL.revokeObjectURL(s),d.showToast.success({message:h("modals.imageSavedSuccess")})}catch(e){console.error("FIFA super card download failed:",e),d.showToast.error({message:h("modals.failedToSaveImage")})}
64finally{n.forEach((e,t)=>{t.src=e}),E(!1)}};return(0,t.jsxs)(i.Box,{ref:S,"data-fifa-card-export":!0,"data-fifa-card":!0,sx:{position:"relative",width:{xs:"228px",sm:"240px",md:"252px"},minWidth:{xs:"228px",sm:"240px",md:"252px"},flexShrink:0,scrollSnapAlign:"start",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",border:"modals.locked"===y.stateKey?"1px solid rgba(255,255,255,0.08)":"1px solid transparent",background:"modals.locked"===y.stateKey?"#141414":"linear-gradient(#141414,#141414) padding-box, linear-gradient(152.19deg,#F095A2 2.25%,#82AFF5 41.43%,#0DDE78 58.94%,#AD89F3 104.45%) border-box",boxShadow:"0 14px 28px rgba(0,0,0,0.22)"},children:[(0,t.jsxs)(i.Box,{sx:{position:"relative"},children:[(0,t.jsx)(C,{src:B,alt:h(T?"modals.legendaryCardNumber":"modals.superCardNumber",{number:r+1})}),(0,t.jsx)(i.Box,{sx:{position:"absolute",top:24,left:-44,zIndex:3,width:158,py:.42,transform:"rotate(-45deg)",transformOrigin:"center",backgroundColor:y.ribbonBackground,color:y.ribbonColor,boxShadow:"0 3px 10px rgba(0,0,0,0.2)",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,t.jsx)(l.Typography,{variant:"caption",sx:{display:"block",color:"inherit",fontWeight:900,letterSpacing:"0.02em",textTransform:"uppercase",fontSize:"0.62rem",lineHeight:1.1,marginTop:"4px"},children:h(y.stateKey)})}),(0,t.jsx)(i.Box,{sx:{position:"absolute",top:8,right:8,zIndex:3,px:.45,py:.45,borderRadius:"4px",backgroundColor:y.pillBackground,backdropFilter:"blur(10px)",border:"1px solid rgba(255,255,255,0.12)"},children:(0,t.jsx)(l.Typography,{variant:"caption",sx:{display:"block",color:y.pillColor,fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontSize:"0.58rem",lineHeight:1.1},children:U})})]}),(0,t.jsxs)(i.Box,{sx:{backgroundColor:"#171717",p:"16px",display:"flex",flexDirection:"column",gap:"16px"},children:[(0,t.jsxs)(i.Box,{sx:{width:"100%",display:"flex",justifyContent:"space-between"},children:[(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(l.Typography,{variant:"caption",sx:{display:"block",color:"rgba(255,255,255,0.58)",textTransform:"uppercase",letterSpacing:"0.06em",mb:.32,fontSize:"0.58rem",lineHeight:1.1},children:h("modals.boostMultiplier")}),(0,t.jsxs)(l.Typography,{sx:{color:"#FFFFFF",fontSize:{xs:"1.18rem",sm:"1.42rem"},fontWeight:800,lineHeight:1,letterSpacing:"-0.04em"},children:[e.multiplier,"x"]})]}),(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(l.Typography,{variant:"caption",sx:{display:"block",color:"rgba(255,255,255,0.58)",textTransform:"uppercase",letterSpacing:"0.06em",mb:.32,fontSize:"0.58rem",lineHeight:1.1},children:h("modals.validFor")}),(0,t.jsxs)(l.Typography,{sx:{color:"#FFFFFF",fontSize:{xs:"1.18rem",sm:"1.32rem"},fontWeight:800,lineHeight:1,letterSpacing:"-0.04em"},children:[e.duration_hours,"h"]})]})]}),(0,t.jsxs)(i.Box,{"data-fifa-card-actions":!0,sx:{display:"flex",gap:.6},children:[(0,t.jsx)(a.Button,{fullWidth:!0,size:"large",onClick:()=>u(e.card_type),disabled:!b||s,sx:{minHeight:34,borderRadius:"4px",backgroundColor:y.buttonBackground,color:y.buttonColor,fontSize:"0.66rem",fontWeight:800,textTransform:"uppercase",letterSpacing:"0.04em",boxShadow:"none",px:1,"&:hover":{backgroundColor:b?"#F2F2F2":y.buttonBackground,boxShadow:"none"},"&.Mui-disabled":{backgroundColor:y.buttonBackground,color:y.buttonColor,opacity:v?1:.9}},children:s&&b?h("common.confirming"):F}),(0,t.jsx)(A.IconButton,{"aria-label":h("modals.saveImage"),onClick:I,disabled:k,sx:{width:34,height:34,borderRadius:"4px",backgroundColor:"#2B2B2B",color:"#FFFFFF",flexShrink:0,"&:hover":{backgroundColor:"#343434"}},children:k?(0,t.jsx)(o.CircularProgress,{size:14,sx:{color:"#FFFFFF"}}):(0,t.jsx)(c.Iconify,{icon:"eva:download-outline",width:14})})]})]}),y.hasDimOverlay&&(0,t.jsx)(i.Box,{sx:{position:"absolute",inset:0,zIndex:2,pointerEvents:"none",backgroundColor:"rgba(0,0,0,0.48)"}})]})},S=()=>{let e,a,d,m,g,x,w,v,C,S,L,_,P,D,R,M,O,N,H,V,K,G,W,z,$,q=(0,r.c)(59),X=(0,u.useTranslations)(),Y=(0,p.useFifaStore)(k),J=(0,p.useFifaStore)(E),Z=(0,p.useFifaStore)(F),ee=(0,p.useFifaStore)(T),{activateCard:et}=(0,h.useFifaCompetition)(),er=(0,n.useRef)(null),[en,ei]=(0,n.use
64State)("super"),[ea,eo]=(0,n.useState)(!1),[es,eA]=(0,n.useState)(!1);if(q[0]!==Y){let t=new Map(Y.map(U));e=f.FIFA_CARD_CATALOG.map(e=>{let r=t.get(e.card_type);return{id:r?.id??`catalog-${e.card_type}`,user_address:r?.user_address,card_type:e.card_type,reward_type:r?.reward_type??e.reward_type,threshold_volume:r?.threshold_volume??e.threshold_volume,multiplier:r?.multiplier??e.multiplier,duration_hours:r?.duration_hours??e.duration_hours,image:r?.image??e.image,status:r?.status??0,activated_at:r?.activated_at,boost_ends_at:r?.boost_ends_at}}).sort(I),q[0]=Y,q[1]=e}else e=q[1];let el=e;q[2]!==el?(a=el.filter(Q),q[2]=el,q[3]=a):a=q[3],q[4]!==el?(d=el.filter(j),q[4]=el,q[5]=d):d=q[5],q[6]!==a||q[7]!==d?(m={super:a,legendary:d},q[6]=a,q[7]=d,q[8]=m):m=q[8];let ec=m,ed=ec[en];q[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{let e=er.current;e&&(e.scrollTo({left:0}),eo(!1))},q[9]=g):g=q[9],q[10]!==en?(x=[en],q[10]=en,q[11]=x):x=q[11],(0,n.useEffect)(g,x),q[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{let e=er.current;if(!e)return;let t=()=>{let t=e.scrollWidth-e.clientWidth;eo(e.scrollLeft>4),eA(e.scrollLeft<t-4)},r=window.requestAnimationFrame(t),n=new ResizeObserver(()=>t());return n.observe(e),Array.from(e.children).forEach(e=>n.observe(e)),e.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",t),()=>{window.cancelAnimationFrame(r),n.disconnect(),e.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},q[12]=w):w=q[12],q[13]!==en||q[14]!==J||q[15]!==ed.length?(v=[ed.length,en,J],q[13]=en,q[14]=J,q[15]=ed.length,q[16]=v):v=q[16],(0,n.useEffect)(w,v),q[17]!==et?(C=async e=>{try{await et(e)}catch{}},q[17]=et,q[18]=C):C=q[18];let eu=C;q[19]===Symbol.for("react.memo_cache_sentinel")?(S=e=>{let t=er.current;if(!t)return;let r=t.querySelector("[data-fifa-card]"),n=r?.offsetWidth??252,i=window.getComputedStyle(t),a=Number.parseFloat(i.columnGap||i.gap||"0")||0,o=window.innerWidth>=1200?4:window.innerWidth>=900?3:1,s=o*n+Math.max(o-1,0)*a;t.scrollBy({left:"next"===e?s:-s,behavior:"smooth"})},q[19]=S):S=q[19];let eh=S;return q[20]!==X?(L=X("modals.fifaSuperCards"),q[20]=X,q[21]=L):L=q[21],q[22]===Symbol.for("react.memo_cache_sentinel")?(_={"& .MuiDialog-paper":{maxWidth:"1120px",width:"94%"}},q[22]=_):_=q[22],q[23]===Symbol.for("react.memo_cache_sentinel")?(P={display:"flex",flexDirection:"column",gap:2.5},q[23]=P):P=q[23],q[24]===Symbol.for("react.memo_cache_sentinel")?(D={display:"flex",justifyContent:"space-between",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"},gap:1.5},q[24]=D):D=q[24],q[25]!==X?(R=X("modals.fifaSuperCardsDescription"),q[25]=X,q[26]=R):R=q[26],q[27]!==R?(M=(0,t.jsx)(l.Typography,{variant:"body1",color:"text.secondary",children:R}),q[27]=R,q[28]=M):M=q[28],q[29]!==ee?(O=ee&&(0,t.jsx)(l.Typography,{variant:"body2",sx:{mt:1,color:"#FF8B8B"},children:ee}),q[29]=ee,q[30]=O):O=q[30],q[31]!==M||q[32]!==O?(N=(0,t.jsx)(i.Box,{sx:D,children:(0,t.jsxs)(i.Box,{children:[M,O]})}),q[31]=M,q[32]=O,q[33]=N):N=q[33],q[34]!==en||q[35]!==es||q[36]!==ea||q[37]!==ec.legendary||q[38]!==ec.super||q[39]!==eu||q[40]!==Z||q[41]!==J||q[42]!==X||q[43]!==ed?(H=J?(0,t.jsx)(i.Box,{sx:{display:"flex",justifyContent:"center",py:8},children:(0,t.jsx)(o.CircularProgress,{size:30})}):(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:1.1},children:[(0,t.jsx)(b.default,{options:[{label:`${X("modals.superCardsTab")} (${ec.super.length})`,value:"super"},{label:`${X("modals.legendaryCardsTab")} (${ec.legendary.length})`,value:"legendary"}],value:en,onChange:e=>ei(e),tabSx:{px:1.5,fontSize:"13px"},sx:{width:"fit-content"}}),(0,t.jsx)(l.Typography,{variant:"body2",color:"text.secondary",children:"legendary"===en?X("modals.fifaLegendaryCardsDescription"):X("modals.fifaSuperCardsUnlockDescription")})]}),0===ed.length?(0,t.jsx)(i.Box,{sx:{py:8,textAlign:"center"},children:(0,t.jsx)(l.Typography,{variant:"body2",color:"text.secondary",children:"legendary"===en?X("modals.noFifaLegendaryCards"):X("modals.noFifaSuperCards")})}
64):(0,t.jsx)(i.Box,{ref:er,sx:{display:"flex",gap:1.25,overflowX:"auto",overflowY:"hidden",scrollSnapType:"x proximity",width:"100%",maxWidth:{xs:"100%",lg:"1038px"},mx:"auto",px:{xs:.5,md:.75},pb:.5,WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:ed.map((e,r)=>(0,t.jsx)(B,{card:e,cardIndex:r,isActing:Z,onActivate:e=>void eu(e),t:X},e.id))}),ed.length>1&&(0,t.jsxs)(i.Box,{sx:{display:"flex",justifyContent:"center",gap:1.25},children:[(0,t.jsx)(A.IconButton,{"aria-label":"Scroll previous cards",onClick:()=>eh("prev"),sx:{width:{xs:42,md:50},height:{xs:42,md:50},borderRadius:"999px",border:"1.5px solid rgba(255,255,255,0.28)",color:"#FFFFFF",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(255,255,255,0.06)"},opacity:ea?1:.45},children:(0,t.jsx)(c.Iconify,{icon:"solar:arrow-left-linear",width:22})}),(0,t.jsx)(A.IconButton,{"aria-label":"Scroll next cards",onClick:()=>eh("next"),sx:{width:{xs:42,md:50},height:{xs:42,md:50},borderRadius:"999px",border:"1.5px solid rgba(255,255,255,0.28)",color:"#FFFFFF",backgroundColor:"transparent","&:hover":{backgroundColor:"rgba(255,255,255,0.06)"},opacity:es?1:.45},children:(0,t.jsx)(c.Iconify,{icon:"solar:arrow-right-linear",width:22})})]})]}),q[34]=en,q[35]=es,q[36]=ea,q[37]=ec.legendary,q[38]=ec.super,q[39]=eu,q[40]=Z,q[41]=J,q[42]=X,q[43]=ed,q[44]=H):H=q[44],q[45]===Symbol.for("react.memo_cache_sentinel")?(V=(0,t.jsx)(s.Divider,{sx:{borderStyle:"dashed"},orientation:"horizontal",flexItem:!0}),q[45]=V):V=q[45],q[46]===Symbol.for("react.memo_cache_sentinel")?(K={mt:"8px"},q[46]=K):K=q[46],q[47]!==en||q[48]!==X?(G="legendary"===en?X("modals.fifaLegendaryCardsFooter"):X("modals.fifaSuperCardsFooter"),q[47]=en,q[48]=X,q[49]=G):G=q[49],q[50]!==G?(W=(0,t.jsx)(l.Typography,{variant:"body1",color:"textSecondary",sx:K,children:G}),q[50]=G,q[51]=W):W=q[51],q[52]!==N||q[53]!==H||q[54]!==W?(z=(0,t.jsxs)(i.Box,{sx:P,children:[N,H,V,W]}),q[52]=N,q[53]=H,q[54]=W,q[55]=z):z=q[55],q[56]!==L||q[57]!==z?($=(0,t.jsx)(y.ModalBox,{title:L,active:"fifa-super-cards",sx:_,children:z}),q[56]=L,q[57]=z,q[58]=$):$=q[58],$};function k(e){return e.cards}function E(e){return e.isLoading}function F(e){return e.isActing}function T(e){return e.error}function U(e){return[e.card_type,e]}function I(e,t){let r=v(e),n=v(t);return r!==n?r-n:e.card_type-t.card_type}function Q(e){return"super"===w(e)}function j(e){return"legendary"===w(e)}},114764,847920,789305,e=>{"use strict";var t=e.i(474076),r=e.i(500932),n=e.i(271645),i=e.i(838456),a=e.i(397837),o=e.i(700756),s=e.i(782904),A=e.i(748478),l=e.i(31066),c=e.i(982615),d=e.i(120785),u=e.i(206287),h=e.i(57159),p=e.i(911347),m=e.i(321960),f=e.i(632418),g=e.i(103439);e.i(565306);var y=e.i(849850),b=e.i(525836);e.i(992550);var x=e.i(407585),w=e.i(797986),v=e.i(858532),C=e.i(268407);e.i(929009);var B=e.i(839577),S=e.i(818279),k=e.i(344873);let E="0x0000000000000000000000000000000000000000",F=/^[a-z0-9_]{3,32}$/,T=()=>{let{isConnected:e}=(0,c.useAccount)(),{authenticated:r}=(0,d.usePrivy)(),{wallets:y}=(0,u.useWallets)(),{address:T,master:U,activeVault:I}=(0,C.useAuthStore)(),{fetchUserProfileByAddress:Q,checkUsernameAvailable:j,updateUsername:L,isCheckingUsername:_,isSettingUsername:P}=(0,B.useUserProfile)(),D=(0,n.useMemo)(()=>{if(I&&I!==E)return(0,k.normalizeAddress)(I);let e=U!==E?U:T;return(0,k.normalizeAddress)(e)},[T,U,I]),R=(0,n.useMemo)(()=>D.toLowerCase(),[D]),[M,O]=(0,n.useState)(""),[N,H]=(0,n.useState)(""),[V,K]=(0,n.useState)("idle"),[G,W]=(0,n.useState)(null),[z,$]=(0,n.useState)(!1),[q,X]=(0,n.useState)(!1),[Y,J]=(0,n.useState)(!1),Z=(0,n.useRef)(null),ee=M.trim().toLowerCase(),et=ee!==N,er=F.test(ee),en=N.length>0;(0,n.useEffect)(()=>{if(!Y||!en)return;let e=e=>{Z.current&&!Z.current.contains(e.target)&&(O(N),J(!1),K("idle"),W(null))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[Y,en,N]);let ei=(!en||Y)&&et&&er&&"available"===V&&!P&&!q&&!z,ea=(0,n.useMemo)(()=>N?`/@${N}`:null,[N]),eo=(0,n.useMemo)(()=>ea?`${window.location.origin}${ea}`:null,[ea]);(0,n.useEffect)(()=>{let e=!0,t=async()=>{$(!0),W(null);try{let t=await Q(D);if(!e)return;let r=(t.username??"").toLowerCase();O(r),H(r),K("idle")}catch{if(!e)return;O(""),H(""),K("idle"),W("Unable to load profile. You can still claim a user handle.")}finally{e&&$(!1)}};return D&&D!==E&&t(),()=>{e=!1}},[D,Q]),(0,n.useEffect)(()=>
64{if(!et||!ee){K("idle"),W(null);return}if(!F.test(ee)){K("invalid"),W("Nickname must be 3-32 chars: lowercase letters, numbers, underscores.");return}let e=!0,t=setTimeout(async()=>{K("checking"),W(null);try{let t=await j(ee);if(!e)return;t.available?(K("available"),W("Nickname available. Claim it now!")):(K("taken"),W("Nickname already taken."))}catch{if(!e)return;K("idle"),W("Could not validate nickname right now.")}},300);return()=>{e=!1,clearTimeout(t)}},[j,et,ee]);let es=(0,n.useCallback)(async t=>{if(r&&y.length>0){let e=y[0];if(!e)throw Error("No Privy wallet available");let r=await e.getEthereumProvider();return(0,h.createWalletClient)({account:D,chain:m.mainnet,transport:(0,p.custom)(r)}).signMessage({account:D,message:t})}if(!e)throw Error("No wallet connected");let n=await (0,l.getWalletClient)(g.wagmiConfig,{account:D});if(!n)throw Error("Failed to get wallet client");return n.signMessage({account:D,message:t})},[D,r,e,y]),eA=(0,n.useCallback)(async()=>{if(ei){X(!0),W(null);try{let e=Date.now(),{message:t}=(0,S.buildSetUsernameSignaturePayload)(D,ee,e),r=await es(t);await L({user_address:D,username:ee,timestamp_ms:e,signature:r}),H(ee),K("idle"),W("Nickname saved successfully."),J(!1),v.showToast.success({message:"Profile updated"})}catch(t){let e=t instanceof Error?t.message:"Failed to save nickname. Please try again.";W(e),v.showToast.error({message:"Failed to update profile",description:e})}finally{X(!1)}}},[D,ei,ee,es,L]),el=(0,n.useCallback)(()=>{ea?window.open(ea,"_blank","noopener,noreferrer"):v.showToast.info({message:"Save a nickname first to create your profile URL"})},[ea]),ec=(0,n.useCallback)(async()=>{if(!eo)return void v.showToast.info({message:"Save a nickname first to share your profile URL"});try{await navigator.clipboard.writeText(eo),v.showToast.success({message:"Profile link copied"})}catch{v.showToast.error({message:"Failed to copy profile link"})}},[eo]);return(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",justifyContent:"center",flexDirection:"column",gap:"32px",alignItems:"center"},children:[(0,t.jsx)(i.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",overflow:"hidden",width:120,height:120,border:"0.75px solid rgba(116, 116, 116, 0.48)",backgroundColor:"rgba(116, 116, 116, 0.08)"},children:(0,t.jsx)(A.default,{size:100,name:R,variant:"beam",colors:["#9ACD32","#5E9EFF","#FF8C42","#A78BFA","#33D1CC"]})}),(0,t.jsxs)(i.Box,{sx:{display:"flex",gap:"8px"},children:[(0,t.jsx)(a.Button,{variant:"contained",color:"inherit",onClick:el,children:"View Profile"}),(0,t.jsx)(a.Button,{variant:"contained",color:"inherit",onClick:()=>{ec()},children:"Copy Profile"})]})]}),(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px",mt:"24px"},children:[(0,t.jsx)(s.Typography,{variant:"body1",color:"text.secondary",children:"User Handle"}),en&&!Y?(0,t.jsxs)(i.Box,{onClick:()=>J(!0),sx:{px:1.5,py:1.2,borderRadius:1,display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"text",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.grey["500Channel"],.08)},children:[(0,t.jsxs)(s.Typography,{variant:"body1",children:["@",N]}),(0,t.jsx)(a.Button,{variant:"contained",size:"small",color:"inherit",onClick:()=>J(!0),sx:{whiteSpace:"nowrap",flexShrink:0},children:"Edit"})]}):(0,t.jsxs)(i.Box,{ref:Z,sx:{display:"flex",flexDirection:"column",gap:"8px"},children:[(0,t.jsx)(b.default,{fullWidth:!0,autoFocus:!0,value:M,onChange:e=>{O(e.target.value.toLowerCase().replace(/\s/g,""))},placeholder:"Pick a handle",inputProps:{maxLength:32,spellCheck:!1,autoComplete:"off"},disabled:z||q||P,endAdornment:(0,t.jsx)(a.Button,{variant:"contained",size:"small",color:"inherit",onClick:eA,disabled:!ei,sx:{whiteSpace:"nowrap",flexShrink:0},children:q||P?(0,t.jsx)(o.CircularProgress,{size:18,color:"inherit"}):"Save Changes"})}),(G||_||"checking"===V)&&(0,t.jsx)(s.Typography,{variant:"body1",sx:{display:"block",color:"available"===V?"success.main":"taken"===V||"invalid"===V?"error.main":"text.secondary"},children:_||"checking"===V?"Checking nickname availability...":G})]})]}),(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:"8px",mt:"24px"},children:[(0,t.jsx)(s.Typography,{variant:"body1",color:"text.secondary",children:"Wallet Address"}),(0,t.jsxs)(i.Box,{sx:{px:1.5,py:1.2,borderRadius:1,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:e=>(0,f.varAlpha)(e.vars.palette.grey["500Channel"],.08)},children:[(0,t.jsxs)(i.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,t.jsx)(x.Iconify,{icon:"iconoir:wallet",width:16,height:16,sx:{color:"text.secondary"}}),(0,t.jsx)(s.Typography,{variant:"body1",children:(0,k.formatWalletAddress)(D)})]}),(0,t.jsx)(w.CopyIconButton,{value:D,toastMessage:"Wallet address copied",iconSx:{color:"text.secondary"},sx:{"&:hover":{color:"primary.main"}}})]})]})]})},U=()=>{let e,n=(0,r.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,t.jsx)(s.Typography,{variant:"h6",children:"Social Links"}),(0,t.jsx)(s.Typography,{variant:"body2",color:"text.secondary",children:"Social link settings are coming soon."})]}),n[0]=e):e=n[0],e};e.s(["SettingsModal",0,()=>
64{let e,a,o,s=(0,r.c)(4),[A]=(0,n.useState)("user-profile");return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",flexDirection:"row",gap:"24px"},s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(a={width:"100%"},s[1]=a):a=s[1],s[2]!==A?(o=(0,t.jsx)(y.ModalBox,{title:"User Profile",active:"settings",maxWidth:"xs",children:(0,t.jsx)(i.Box,{sx:e,children:(0,t.jsx)(i.Box,{sx:a,children:"user-profile"===A?(0,t.jsx)(T,{}):(0,t.jsx)(U,{})})})}),s[2]=A,s[3]=o):o=s[3],o}],114764),e.i(614271);var I=e.i(110204),Q=e.i(139349),j=e.i(624321),L=e.i(709643);e.s(["MarketSessionModal",0,()=>{let e,n,a,o,A,l,c,d,u,h,p,m,f,g,b,w,v=(0,r.c)(38),C=(0,L.useTranslations)(),B=(0,Q.useUsEquityMarketSession)();if(v[0]!==C?(e=C("modals.marketSessionTitle"),v[0]=C,v[1]=e):e=v[1],v[2]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",flexDirection:"column"},v[2]=n):n=v[2],v[3]!==C?(a=C("modals.currentSession"),v[3]=C,v[4]=a):a=v[4],v[5]!==B.key||v[6]!==C?(o=(0,j.getMarketSessionLabel)(B.key,C),v[5]=B.key,v[6]=C,v[7]=o):o=v[7],v[8]!==a||v[9]!==o?(A=(0,t.jsx)(I.Label,{label:a,value:o}),v[8]=a,v[9]=o,v[10]=A):A=v[10],v[11]!==C?(l=C("modals.endsIn"),v[11]=C,v[12]=l):l=v[12],v[13]!==B.endsInMs?(c=(0,j.formatSessionCountdown)(B.endsInMs),v[13]=B.endsInMs,v[14]=c):c=v[14],v[15]!==l||v[16]!==c?(d=(0,t.jsx)(I.Label,{label:l,value:c}),v[15]=l,v[16]=c,v[17]=d):d=v[17],v[18]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(i.Box,{sx:{pt:.4,my:1,borderTop:"1px solid rgba(116, 116, 116, 0.16)"}}),v[18]=u):u=v[18],v[19]!==B.schedule||v[20]!==C){let e;v[22]!==C?(e=e=>(0,t.jsx)(I.Label,{label:(0,j.getMarketSessionLabel)(e.key,C),value:(0,j.formatUsEquityScheduleRange)(e)},e.key),v[22]=C,v[23]=e):e=v[23],h=B.schedule.map(e),v[19]=B.schedule,v[20]=C,v[21]=h}else h=v[21];return v[24]===Symbol.for("react.memo_cache_sentinel")?(p={mt:1,pt:2,borderTop:"1px solid rgba(116, 116, 116, 0.16)",display:"flex",alignItems:"center",gap:1,color:"text.secondary"},v[24]=p):p=v[24],v[25]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(x.Iconify,{icon:"eva:info-outline",width:16,height:16,sx:{mt:0,flexShrink:0}}),v[25]=m):m=v[25],v[26]!==C?(f=C("modals.marketSessionDisclaimer"),v[26]=C,v[27]=f):f=v[27],v[28]!==f?(g=(0,t.jsxs)(i.Box,{sx:p,children:[m,(0,t.jsx)(s.Typography,{variant:"body1",color:"text.secondary",children:f})]}),v[28]=f,v[29]=g):g=v[29],v[30]!==g||v[31]!==A||v[32]!==d||v[33]!==h?(b=(0,t.jsxs)(i.Box,{sx:n,children:[A,d,u,h,g]}),v[30]=g,v[31]=A,v[32]=d,v[33]=h,v[34]=b):b=v[34],v[35]!==e||v[36]!==b?(w=(0,t.jsx)(y.ModalBox,{title:e,active:"market-session",maxWidth:"sm",children:b}),v[35]=e,v[36]=b,v[37]=w):w=v[37],w}],847920);var _=e.i(693380),P=e.i(990577),D=e.i(81121),R=e.i(657688),M=e.i(497624),O=e.i(25690);let N=e=>e.replace(/\s+/g," ").trim(),H={"Alpaca Securities LLC":"/imgs/svg/service-providers/alpaca.svg","InCore Bank AG":"/imgs/svg/service-providers/incore-bank.svg","Maerki Baumann & Co. AG":"/imgs/svg/service-providers/maerki-baumann.svg"},V=(e,t,r)=>{r?.trim()&&e.push({label:t,value:{type:"text",text:r.trim()}})},K=e=>{let n,a,o,A=(0,r.c)(9),{name:l,src:c}=e;if(!c){let e,r,n;return A[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"inline-flex",alignItems:"center",minHeight:24,px:.9,py:.35,borderRadius:.9,bgcolor:"grey.200",color:"grey.900"},A[0]=e):e=A[0],A[1]===Symbol.for("react.memo_cache_sentinel")?(r={fontSize:11,lineHeight:1.1,fontWeight:600},A[1]=r):r=A[1],A[2]!==l?(n=(0,t.jsx)(i.Box,{component:"span",sx:e,children:(0,t.jsx)(s.Typography,{variant:"caption",sx:r,children:l})}),A[2]=l,A[3]=n):n=A[3],n}A[4]===Symbol.for("react.memo_cache_sentinel")?(n={display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:0,flexShrink:0},A[4]=n):n=A[4];let d=`${l} logo`;return A[5]===Symbol.for("react.memo_cache_sentinel")?(a={width:"auto",height:"14px",maxWidth:"100%",objectFit:"contain",display:"block"},A[5]=a):a=A[5],A[6]!==c||A[7]!==d?(o=(0,t.jsx)(i.Box,{component:"span",sx:n,children:(0,t.jsx)(R.default,{src:c,alt:d,width:120,height:14,unoptimized:!0,style:a})}),A[6]=c,A[7]=d,A[8]=o):o=A[8],o},G=e=>
64{let n,a,o,s=(0,r.c)(5),{links:A}=e;return A.length?(s[0]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",alignItems:"center",gap:.1,flexShrink:0},s[0]=n):n=s[0],s[1]!==A?(a=A.map(q),s[1]=A,s[2]=a):a=s[2],s[3]!==a?(o=(0,t.jsx)(i.Box,{sx:n,children:a}),s[3]=a,s[4]=o):o=s[4],o):null},W=e=>{let n,a,o=(0,r.c)(22),{row:A}=e;if("symbolWithRefs"===A.value.type){let e,r,n,a,l;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},o[0]=e):e=o[0],o[1]===Symbol.for("react.memo_cache_sentinel")?(r={color:"text.secondary",fontSize:13,lineHeight:1.45,wordBreak:"break-word",minWidth:0},o[1]=r):r=o[1],o[2]!==A.value.symbol?(n=(0,t.jsx)(s.Typography,{variant:"body2",component:"span",sx:r,children:A.value.symbol}),o[2]=A.value.symbol,o[3]=n):n=o[3],o[4]!==A.value.links?(a=(0,t.jsx)(G,{links:A.value.links}),o[4]=A.value.links,o[5]=a):a=o[5],o[6]!==n||o[7]!==a?(l=(0,t.jsxs)(i.Box,{sx:e,children:[n,a]}),o[6]=n,o[7]=a,o[8]=l):l=o[8],l}if("logos"===A.value.type){let e,r,n;return o[9]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",minWidth:0,my:.3},o[9]=e):e=o[9],o[10]!==A.value.items?(r=A.value.items.map(X),o[10]=A.value.items,o[11]=r):r=o[11],o[12]!==r?(n=(0,t.jsx)(i.Box,{sx:e,children:r}),o[12]=r,o[13]=n):n=o[13],n}if("link"===A.value.type){let e,r,n;return o[14]===Symbol.for("react.memo_cache_sentinel")?(e={color:"text.primary",display:"inline-flex",alignItems:"center",gap:.4,fontSize:13},o[14]=e):e=o[14],o[15]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(x.Iconify,{icon:"tabler:arrow-up-right",width:13,height:13,sx:{color:"primary.light"}}),o[15]=r):r=o[15],o[16]!==A.value.label||o[17]!==A.value.url?(n=(0,t.jsxs)(P.Link,{href:A.value.url,target:"_blank",rel:"noopener noreferrer",underline:"none",sx:e,children:[A.value.label,r]}),o[16]=A.value.label,o[17]=A.value.url,o[18]=n):n=o[18],n}return o[19]===Symbol.for("react.memo_cache_sentinel")?(n={color:"text.secondary",fontSize:13,lineHeight:1.45,wordBreak:"break-word"},o[19]=n):n=o[19],o[20]!==A.value.text?(a=(0,t.jsx)(s.Typography,{variant:"body2",sx:n,children:A.value.text}),o[20]=A.value.text,o[21]=a):a=o[21],a},z=e=>{let n,a,o,A,l,c,d,u=(0,r.c)(12),{title:h,rows:p}=e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(n={flex:1,minWidth:0,borderRadius:1.25,bgcolor:"grey.900",px:{xs:1.75,md:2},py:{xs:1.75,md:2}},u[0]=n):n=u[0],u[1]===Symbol.for("react.memo_cache_sentinel")?(a={fontWeight:600,mb:1.6},u[1]=a):a=u[1],u[2]!==h?(o=(0,t.jsx)(s.Typography,{variant:"subtitle2",sx:a,children:h}),u[2]=h,u[3]=o):o=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(A={display:"flex",flexDirection:"column",gap:1.35},u[4]=A):A=u[4],u[5]!==p?(l=p.map(Y),u[5]=p,u[6]=l):l=u[6],u[7]!==l?(c=(0,t.jsx)(i.Box,{sx:A,children:l}),u[7]=l,u[8]=c):c=u[8],u[9]!==o||u[10]!==c?(d=(0,t.jsxs)(i.Box,{sx:n,children:[o,c]}),u[9]=o,u[10]=c,u[11]=d):d=u[11],d},$=e=>{let n,a,o,A,l,c,d,u,h,p,m,f,g,y,b,x,w,v,C,B,S,k,E,F,T,U=(0,r.c)(47),{data:I}=e;return U[0]===Symbol.for("react.memo_cache_sentinel")?(n={display:"flex",flexDirection:"column",gap:2.2},U[0]=n):n=U[0],U[1]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:1.5,width:"100%"},U[1]=a):a=U[1],U[2]===Symbol.for("react.memo_cache_sentinel")?(o={display:"flex",alignItems:{xs:"flex-start",md:"center"},gap:1.4,minWidth:0,flex:1},U[2]=o):o=U[2],U[3]!==I.iconSymbol?(A=(0,t.jsx)(M.CryptoIcon,{symbol:I.iconSymbol,size:48}),U[3]=I.iconSymbol,U[4]=A):A=U[4],U[5]===Symbol.for("react.memo_cache_sentinel")?(l={minWidth:0},U[5]=l):l=U[5],U[6]===Symbol.for("react.memo_cache_sentinel")?(c={xs:20,md:22},U[6]=c):c=U[6],U[7]===Symbol.for("react.memo_cache_sentinel")?(d={fontSize:c,lineHeight:1.12,fontWeight:600,display:{xs:"block",md:"none"}},U[7]=d):d=U[7],U[8]!==I.titleSymbol?(u=(0,t.jsx)(s.Typography,{variant:"h5",sx:d,noWrap:!0,children:I.titleSymbol}),U[8]=I.titleSymbol,U[9]=u):u=U[9],U[10]===Symbol.for("react.memo_cache_sentinel")?(h={display:{xs:"block",md:"none"},mt:.35,color:"text.secondary",fontSize:13,lineHeight:1.35,wordBreak:"break-word"},U[10]=h):h=U[10],U[11]!==I.titleName?(p=(0,t.jsx)(s.Typography,{variant:"body2",sx:h,children:I.titleName}),U[11]=I.titleName,U[12]=p):p=U[12],U[13]===Symbol.for("react.memo_cache_sentinel")?(m={xs:20,md:22},U[13]=m):m=U[13],U[14]===Symbol.for("react.memo_cache_sentinel")?(f={fontSize:m,lineHeight:1.12,fontWeight:600,display:{xs:"none",md:"block"}},U[14]=f):f=U[14],U[15]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(i.Box,{component:"span",sx:{px:.35},children:"â¢"}),U[15]=g):g=U[15],U[16]!==I.titleName||U[17]!==I.titleSymbol?(y=(0,t.jsxs)(s.Typography,{variant:"h5",sx:f,noWrap:!0,children:[I.titleSymbol," ",g," ",I.titleName]}),U[16]=I.titleName,U[17]=I.titleSymbol,U[18]=y):y=U[18],U[19]!==I.category?(b=I.category&&(0,t.jsx)(s.Typography,{variant:"subtitle2",sx:{color:"primary.light",fontSize:14,fontWeight:500,mt:{xs:.75,md:.5}},noWrap:!0,children:I.category}),U[19]=I.category,U[20]=b):b=U[20],U[21]!==p||U[22]!==y||U[23]!==b||U[24]!==u?(x=(0,t.jsxs)(i.Box,{sx:l,children:[u,p,y,b]}),U[21]=p,U[22]=y,U[23]=b,U[24]=u,U[25]=x):x=U[25],U[26]!==x||U[27]!==A?(w=(0,t.jsxs)(i.Box,{sx:o,children:[A,x]}),U[26]=x,U[27]=A,U[28]=w):w=U[28],U[29]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(i.Box,{"aria-hidden":!0,sx:J}),U[29]=v):v=U[29],U[30]!==w?(C=(0,t.jsxs)(i.Box,{sx:a,children:[w,v]}),U[30]=w,U[31]=C):C=U[31],U[32]!==I.description||U[33]!==I.keyBenefits?(B=(I.description||I.keyBenefits)&&(0,t.jsxs)(i.Box,{children:[(0,t.jsx)(s.Typography,{variant:"caption",sx:{color:"text.primary",fontSize:12,display:"block",mb:.8},children:"Description"}),I.description&&(0,t.jsx)(s.Typography,{variant:"body2",sx:{color:"text.secondary",fontSize:12.5,lineHeight:1.35},children:I.description}),I.keyBenefits&&(0,t.jsx)(s.Typography,{variant:"body2",sx:{color:"text.secondary",fontSize:12.5,lineHeight:1.35,mt:.8*!!I.description},children:I.keyBenefits})]}),U[32]=I.description,U[33]=I.keyBenefits,U[34]=B):B=U[34],U[35]===Symbol.for("react.memo_cache_sentinel")?(S={display:"flex",gap:1.8,flexDirection:{xs:"column",md:"row"}},U[35]=S):S=U[35],U[36]!==I.details?(k=(0,t.jsx)(z,{title:"Details",rows:I.details}),U[36]=I.details,U[37]=k):k=U[37],U[38]!==I.underlyingInformation?(E=(0,t.jsx)(z,{title:"Underlying Information",rows:I.underlyingInformation}),U[38]=I.underlyingInformation,U[39]=E):E=U[39],U[40]!==k||U[41]!==E?(F=(0,t.jsxs)(i.Box,{sx:S,children:[k,E]}),U[40]=k,U[41]=E,U[42]=F):F=U[42],U[43]!==C||U[44]!==B||U[45]!==F?(T=(0,t.jsxs)(i.Box,{sx:n,children:[C,B,F]}),U[43]=C,U[44]=B,U[45]=F,U[46]=T):T=U[46],T};function q(e){return(0,t.jsx)(D.Tooltip,{title:`Open ${e.label}`,arrow:!0,placement:"top",children:(0,t.jsx)(P.Link,{href:e.url,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${e.label}
64`,underline:"none",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",p:.65,borderRadius:1,color:"text.secondary",lineHeight:0,"&:hover":{color:"text.primary",bgcolor:"action.hover"}},children:(0,t.jsx)(i.Box,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,"& svg":{width:16,height:16}},children:e.icon})})},`${e.label}-${e.url}`)}function X(e){return(0,t.jsx)(D.Tooltip,{title:e.name,arrow:!0,placement:"top",children:(0,t.jsx)(i.Box,{component:"span",sx:{display:"inline-flex",px:.15},children:(0,t.jsx)(K,{name:e.name,src:e.src})})},e.name)}function Y(e){return(0,t.jsxs)(i.Box,{sx:{display:"flex",flexDirection:"column",gap:"logos"===e.value.type?.85:.4},children:[(0,t.jsx)(s.Typography,{variant:"caption",sx:{color:"text.primary",fontSize:12,lineHeight:1.2},children:e.label}),(0,t.jsx)(W,{row:e})]},e.label)}function J(e){return{flexShrink:0,width:e.spacing(6),minWidth:e.spacing(6)}}function Z(e){return{pr:e.spacing(6)}}e.s(["InstrumentDetailsModal",0,()=>{let e,n,i,a,o,A,l,c,d,u,h=(0,r.c)(17),{payload:p,setModal:m}=(0,C.useActionStore)();if(h[0]!==p)e="object"==typeof p&&null!==p&&"instrumentName"in p?p.instrumentName:void 0,h[0]=p,h[1]=e;else e=h[1];let f=e;if(h[2]!==f){var g;let e,r,i,a,o,s,A=(0,O.getStaticXStockProductDetails)(f);n=A?(V(e=[],"Issuer",A.productDetails.issuer),V(e,"ISIN",A.productDetails.isin),r=A.serviceProviders.broker?.length?A.serviceProviders.broker:A.serviceProviders.custodian,(i=(!r?.length?[]:r.flatMap(e=>(e=>{let t=N(e);if(!t)return[];let r=t.split(/\s{2,}|(?<=LLC|AG|Ltd|Ltd\.|Limited|Bank AG)\s+(?=[A-Z])/).map(N).filter(Boolean);return r.length>0?r:[t]})(e))).map(e=>({name:e,src:H[e]}))).length&&e.push({label:"Broker & Custodian",value:{type:"logos",items:i}}),g=A.backedUrl,g?.trim()&&e.push({label:"More info",value:{type:"link",label:"Backed",url:g.trim()}}),V(a=[],"Issuer",A.underlying.issuer),V(a,"ISIN",A.underlying.isin),o=A.links.map(e=>({label:/coingecko/i.test(e.label)?"CoinGecko":/tradingview/i.test(e.label)?"TradingView":e.label.replace(/^View\s+/i,"").trim(),url:e.url,icon:(e=>/coingecko/i.test(e.label)||/coingecko\.com/i.test(e.url)?(0,t.jsx)(x.Iconify,{icon:"arcticons:coingecko",width:14,height:14}):/tradingview/i.test(e.label)||/tradingview\.com/i.test(e.url)?(0,t.jsx)(x.Iconify,{icon:"simple-icons:tradingview",width:14,height:14}):(0,t.jsx)(x.Iconify,{icon:"eva:info-outline",width:14,height:14}))(e)})),(s=A.underlying.symbol?.trim())&&(o.length>0?a.push({label:"Symbol",value:{type:"symbolWithRefs",symbol:s,links:o}}):a.push({label:"Symbol",value:{type:"text",text:s}})),{instrumentName:A.instrumentName,iconSymbol:A.instrumentName,titleSymbol:A.symbol??A.instrumentName,titleName:A.underlying.name?.trim()??A.title??A.instrumentName,category:A.category,description:A.description,keyBenefits:A.keyBenefits,details:e,underlyingInformation:a}):null,h[2]=f,h[3]=n}else n=h[3];let b=n;h[4]!==m?(i=()=>m(null),h[4]=m,h[5]=i):i=h[5];let w=i;return h[6]===Symbol.for("react.memo_cache_sentinel")?(a={width:{md:640},maxWidth:{xs:"100%",md:"min(640px, calc(100vw - 32px))"},borderRadius:{md:1.25},bgcolor:"#090909",color:"text.primary",backgroundImage:"none"},o={px:{xs:2,md:2.5},pb:{xs:2,md:2.5},position:"relative"},h[6]=a,h[7]=o):(a=h[6],o=h[7]),h[8]===Symbol.for("react.memo_cache_sentinel")?(A={position:"absolute",top:8,right:16,color:"text.disabled",borderRadius:"50%",p:.4,zIndex:1,"&:hover":{color:"text.primary"}},h[8]=A):A=h[8],h[9]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(x.Iconify,{icon:"mingcute:close-line",width:18,height:18}),h[9]=l):l=h[9],h[10]!==w?(c=(0,t.jsx)(_.ButtonBase,{onClick:w,sx:A,"aria-label":"Close instrument details",children:l}),h[10]=w,h[11]=c):c=h[11],h[12]!==b?(d=b?(0,t.jsx)($,{data:b}):(0,t.jsx)(s.Typography,{variant:"body2",color:"text.secondary",sx:Z,children:"Instrument details are not available yet."}),h[12]=b,h[13]=d):d=h[13],h[14]!==c||h[15]!==d?(u=(0,t.jsxs)(y.ModalBox,{active:"instrument-details",title:"Instrument details",hideTitleBar:!0,maxWidth:!1,paperSx:a,contentSx:o,children:[c,d]}),h[14]=c,h[15]=d,h[16]=u):u=h[16],u}],789305)},102970,e=>{"use strict";e.s([]),e.i(826734),e.i(230103),e.i(179493),e.i(205797),e.i(306613),e.i(437202),e.i(155219),e.i(741931),e.i(711273),e.i(296860),e.i(823952),e.i(
64744048),e.i(794406),e.i(941603),e.i(13877),e.i(423086),e.i(635719),e.i(769840),e.i(302957),e.i(107305),e.i(48578),e.i(759940),e.i(501024),e.i(187847),e.i(494999),e.i(956799),e.i(447540),e.i(266805),e.i(884181),e.i(869952),e.i(823369),e.i(126877),e.i(310335),e.i(817847),e.i(6316),e.i(767097),e.i(401998),e.i(641331),e.i(94318),e.i(200583),e.i(906386),e.i(641696),e.i(546017),e.i(233582),e.i(2158),e.i(175019),e.i(836681),e.i(674823),e.i(72341),e.i(961879),e.i(114764),e.i(847920),e.i(789305)},446243,303723,815824,676427,536350,e=>{"use strict";e.s(["ModalProvider",()=>tO],446243);var t,r,n,i,a,o,s=e.i(474076),A=e.i(500932);e.i(102970);var l=e.i(826734),c=e.i(230103),d=e.i(179493),u=e.i(205797),h=e.i(306613),p=e.i(155219),m=e.i(741931),f=e.i(711273),g=e.i(296860),y=e.i(823952),b=e.i(941603),x=e.i(13877),w=e.i(423086),v=e.i(635719),C=e.i(769840),B=e.i(302957),S=e.i(107305),k=e.i(48578),E=e.i(759940),F=e.i(501024),T=e.i(187847),U=e.i(494999),I=e.i(956799),Q=e.i(447540),j=e.i(266805),L=e.i(884181),_=e.i(869952),P=e.i(823369),D=e.i(126877),R=e.i(310335),M=e.i(817847),O=e.i(767097),N=e.i(6316),H=e.i(401998),V=e.i(641331),K=e.i(94318),G=e.i(200583),W=e.i(906386),z=e.i(641696),$=e.i(546017),q=e.i(233582),X=e.i(2158),Y=e.i(175019),J=e.i(836681),Z=e.i(674823),ee=e.i(72341),et=e.i(961879),er=e.i(114764),en=e.i(847920),ei=e.i(789305),ea=e.i(271645),eo=e.i(618566),es=e.i(838456),eA=e.i(142944),eA=eA,el=e.i(954512),ec=e.i(632418),ed=/[\\\/_+.#"@\[\(\{&]/,eu=/[\\\/_+.#"@\[\(\{&]/g,eh=/[\s-]/,ep=/[\s-]/g;function em(e){return e.toLowerCase().replace(ep," ")}var ef=e.i(326999),eg=e.i(248425),ey=e.i(610772),eb=e.i(820783),ex='[cmdk-group=""]',ew='[cmdk-group-items=""]',ev='[cmdk-item=""]',eC=`${ev}:not([aria-disabled="true"])`,eB="cmdk-item-select",eS="data-value",ek=(e,t,r)=>{var n;return n=e,function e(t,r,n,i,a,o,s){if(o===r.length)return a===t.length?1:.99;var A=`${a},${o}`;if(void 0!==s[A])return s[A];for(var l,c,d,u,h=i.charAt(o),p=n.indexOf(h,a),m=0;p>=0;)(l=e(t,r,n,i,p+1,o+1,s))>m&&(p===a?l*=1:ed.test(t.charAt(p-1))?(l*=.8,(d=t.slice(a,p-1).match(eu))&&a>0&&(l*=Math.pow(.999,d.length))):eh.test(t.charAt(p-1))?(l*=.9,(u=t.slice(a,p-1).match(ep))&&a>0&&(l*=Math.pow(.999,u.length))):(l*=.17,a>0&&(l*=Math.pow(.999,p-a))),t.charAt(p)!==r.charAt(o)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===i.charAt(o+1)||i.charAt(o+1)===i.charAt(o)&&n.charAt(p-1)!==i.charAt(o))&&.1*(c=e(t,r,n,i,p+1,o+2,s))>l&&(l=.1*c),l>m&&(m=l),p=n.indexOf(h,p+1);return s[A]=m,m}(n=r&&r.length>0?`${n+" "+r.join(" ")}`:n,t,em(n),em(t),0,0,{})},eE=ea.createContext(void 0),eF=ea.createContext(void 0),eT=ea.createContext(void 0),eU=ea.forwardRef((e,t)=>{let r=eO(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=eO(()=>new Set),i=eO(()=>new Map),a=eO(()=>new Map),o=eO(()=>new Set),s=eR(e),{label:A,children:l,value:c,onValueChange:d,filter:u,shouldFilter:h,loop:p,disablePointerSelection:m=!1,vimBindings:f=!0,...g}=e,y=(0,ey.useId)(),b=(0,ey.useId)(),x=(0,ey.useId)(),w=ea.useRef(null),v=eV();eM(()=>{if(void 0!==c){let e=c.trim();r.current.value=e,C.emit()}},[c]),eM(()=>{v(6,T)},[]);let C=ea.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var i,a,o,A;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)F(),k(),v(1,E);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(x);e?e.focus():null==(i=document.getElementById(y))||i.focus()}if(v(7,()=>{var e;r.current.selectedItemId=null==(e=U())?void 0:e.id,C.emit()}),n||v(5,T),(null==(a=s.current)?void 0:a.value)!==void 0){null==(A=(o=s.current).onValueChange)||A.call(o,null!=t?t:"");return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),B=ea.useMemo(()=>({value:(e,t,n)=>{var i;t!==(null==(i=a.current.get(e))?void 0:i.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,S(t,n)),v(2,()=>{k(),C.emit()}))},item:(e,t)=>(n.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),v(3,()=>{F(),k(),r.current.value||E(),C.emit()}),()=>{a.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=U();v(4,()=>{F(),(null==t?void 0:t.getAttribute("id"))===e&&E(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:A||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:w}),[]);function S(e,t){var n,i;let a=null!=(i=null==(n=s.current)?void 0:n.filter)?i:ek;return e?a(e,r.current.search,t):0}function k(){if(!r.current.search||!1===s.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=i.current.get(r),a=0;
64n.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([r,a])});let n=w.current;I().sort((t,r)=>{var n,i;let a=t.getAttribute("id"),o=r.getAttribute("id");return(null!=(n=e.get(o))?n:0)-(null!=(i=e.get(a))?i:0)}).forEach(e=>{let t=e.closest(ew);t?t.appendChild(e.parentElement===t?e:e.closest(`${ew} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${ew} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=w.current)?void 0:t.querySelector(`${ex}[${eS}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function E(){let e=I().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(eS);C.setState("value",t||void 0)}function F(){var e,t,o,A;if(!r.current.search||!1===s.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let l=0;for(let i of n.current){let n=S(null!=(t=null==(e=a.current.get(i))?void 0:e.value)?t:"",null!=(A=null==(o=a.current.get(i))?void 0:o.keywords)?A:[]);r.current.filtered.items.set(i,n),n>0&&l++}for(let[e,t]of i.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=l}function T(){var e,t,r;let n=U();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(ex))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function U(){var e;return null==(e=w.current)?void 0:e.querySelector(`${ev}[aria-selected="true"]`)}function I(){var e;return Array.from((null==(e=w.current)?void 0:e.querySelectorAll(eC))||[])}function Q(e){let t=I()[e];t&&C.setState("value",t.getAttribute(eS))}function j(e){var t;let r=U(),n=I(),i=n.findIndex(e=>e===r),a=n[i+e];null!=(t=s.current)&&t.loop&&(a=i+e<0?n[n.length-1]:i+e===n.length?n[0]:n[i+e]),a&&C.setState("value",a.getAttribute(eS))}function L(e){let t=U(),r=null==t?void 0:t.closest(ex),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,ex):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,ex))?void 0:r.querySelector(eC);n?C.setState("value",n.getAttribute(eS)):j(e)}let _=()=>Q(I().length-1),P=e=>{e.preventDefault(),e.metaKey?_():e.altKey?L(1):j(1)},D=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?L(-1):j(-1)};return ea.createElement(eg.Primitive.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=g.onKeyDown)||t.call(g,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":f&&e.ctrlKey&&P(e);break;case"ArrowDown":P(e);break;case"p":case"k":f&&e.ctrlKey&&D(e);break;case"ArrowUp":D(e);break;case"Home":e.preventDefault(),Q(0);break;case"End":e.preventDefault(),_();break;case"Enter":{e.preventDefault();let t=U();if(t){let e=new Event(eB);t.dispatchEvent(e)}}}}},ea.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:eG},A),eK(e,e=>ea.createElement(eF.Provider,{value:C},ea.createElement(eE.Provider,{value:B},e))))}),eI=ea.forwardRef((e,t)=>{var r,n;let i=(0,ey.useId)(),a=ea.useRef(null),o=ea.useContext(eT),s=ea.useContext(eE),A=eR(e),l=null!=(n=null==(r=A.current)?void 0:r.forceMount)?n:null==o?void 0:o.forceMount;eM(()=>{if(!l)return s.item(i,null==o?void 0:o.id)},[l]);let c=eH(i,a,[e.value,e.children,a],e.keywords),d=ea.useContext(eF),u=eN(e=>e.value&&e.value===c.current),h=eN(e=>!!l||!1===s.filter()||!e.search||e.filtered.items.get(i)>0);function p(){var e,t;m(),null==(t=(e=A.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(ea.useEffect(()=>{let t=a.current;if(!(!t||e.disabled))return t.addEventListener(eB,p),()=>t.removeEventListener(eB,p)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:f,value:g,onSelect:y,forceMount:b,keywords:x,...w}=e;return ea.createElement(eg.Primitive.div,{ref:(0,eb.composeRefs)(a,t),...w,id:i,"cmdk-item":"",role:"option","aria-disabled":!!f,"aria-selected":!!u,"data-disabled":!!f,"data-selected":!!u,onPointerMove:f||s.getDisablePointerSelection()?void 0:m,onClick:f?void 0:p},e.children)}),eQ=ea.forwardRef((e,t)=>
64{let{heading:r,children:n,forceMount:i,...a}=e,o=(0,ey.useId)(),s=ea.useRef(null),A=ea.useRef(null),l=(0,ey.useId)(),c=ea.useContext(eE),d=eN(e=>!!i||!1===c.filter()||!e.search||e.filtered.groups.has(o));eM(()=>c.group(o),[]),eH(o,s,[e.value,e.heading,A]);let u=ea.useMemo(()=>({id:o,forceMount:i}),[i]);return ea.createElement(eg.Primitive.div,{ref:(0,eb.composeRefs)(s,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},r&&ea.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:l},r),eK(e,e=>ea.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?l:void 0},ea.createElement(eT.Provider,{value:u},e))))}),ej=ea.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,i=ea.useRef(null),a=eN(e=>!e.search);return r||a?ea.createElement(eg.Primitive.div,{ref:(0,eb.composeRefs)(i,t),...n,"cmdk-separator":"",role:"separator"}):null}),eL=ea.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,i=null!=e.value,a=ea.useContext(eF),o=eN(e=>e.search),s=eN(e=>e.selectedItemId),A=ea.useContext(eE);return ea.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),ea.createElement(eg.Primitive.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":s,id:A.inputId,type:"text",value:i?e.value:o,onChange:e=>{i||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),e_=ea.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...i}=e,a=ea.useRef(null),o=ea.useRef(null),s=eN(e=>e.selectedItemId),A=ea.useContext(eE);return ea.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),ea.createElement(eg.Primitive.div,{ref:(0,eb.composeRefs)(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:A.listId},eK(e,e=>ea.createElement("div",{ref:(0,eb.composeRefs)(o,A.listInnerRef),"cmdk-list-sizer":""},e)))}),eP=ea.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:i,contentClassName:a,container:o,...s}=e;return ea.createElement(ef.Root,{open:r,onOpenChange:n},ea.createElement(ef.Portal,{container:o},ea.createElement(ef.Overlay,{"cmdk-overlay":"",className:i}),ea.createElement(ef.Content,{"aria-label":e.label,"cmdk-dialog":"",className:a},ea.createElement(eU,{ref:t,...s}))))}),eD=Object.assign(eU,{List:e_,Item:eI,Input:eL,Group:eQ,Separator:ej,Dialog:eP,Empty:ea.forwardRef((e,t)=>eN(e=>0===e.filtered.count)?ea.createElement(eg.Primitive.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:ea.forwardRef((e,t)=>{let{progress:r,children:n,label:i="Loading...",...a}=e;return ea.createElement(eg.Primitive.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},eK(e,e=>ea.createElement("div",{"aria-hidden":!0},e)))})});function eR(e){let t=ea.useRef(e);return eM(()=>{t.current=e}),t}var eM="u"<typeof window?ea.useEffect:ea.useLayoutEffect;function eO(e){let t=ea.useRef();return void 0===t.current&&(t.current=e()),t}function eN(e){let t=ea.useContext(eF),r=()=>e(t.snapshot());return ea.useSyncExternalStore(t.subscribe,r,r)}function eH(e,t,r,n=[]){let i=ea.useRef(),a=ea.useContext(eE);return eM(()=>{var o;let s=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():i.current}})(),A=n.map(e=>e.trim());a.value(e,s,A),null==(o=t.current)||o.setAttribute(eS,s),i.current=s}),i}var eV=()=>{let[e,t]=ea.useState(),r=eO(()=>new Map);return eM(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function eK({asChild:e,children:t},r){let n;return e&&ea.isValidElement(t)?ea.cloneElement("function"==typeof(n=t.type)?n(t.props):"render"in n?n.render(t.props):t,{ref:t.ref},r(t.props.children)):r(t)}var eG={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};e.i(992550);var eW=e.i(407585),ez=e.i(268407),e$=e.i(832550);e.i(164485);var eq=e.i(392953);let eX="@media (min-width: 1001px)";function eY(e){return{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",height:"16px",px:"4px",py:"2px",borderRadius:"2px",fontSize:e.typography.pxToRem(10),fontWeight:500,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",lineHeight:1.25,color:e.palette.text.primary,bgcolor:e.vars.palette.grey[600],opacity:1}}var eJ=e.i(210457),eZ=e.i(344873),e0=e.i(279391),e1=e.i(377010);let e2=new Set(["perp","spot","option"]);function e4(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(
64Boolean)}function e3(...e){return[...new Set(e.flatMap(e=>e4(e??"")))].join(" ")}function e5(e,t){let r=e4(t);if(!r.length)return 1;if(!r.every(t=>e.includes(t)))return 0;let n=t.trim().toLowerCase();if(n.length<=3&&!e.split(" ").some(e=>e.startsWith(n)))return 0;let i=100+2*r.length;return n&&e.startsWith(n)?i+=40:n&&e.includes(` ${n}`)&&(i+=20),i}function e6(e){return e.rows.length>0}function e8(e){return e.rows.length>0}function e7(e){return e.score>0}function e9(e){var t,r,n;let i,a,o,s=(0,eJ.getInstrumentMetadata)(e.name),A=s?.displayName??e.name,l=s.searchAliases??(0,eJ.getInstrumentSearchAliases)(e.name),c={...e,metadata:{displayName:s?.displayName,category:s?.category,searchAliases:l}},d=(0,e0.kindCaption)(e);return{instrument:c,displayName:A,subtitle:d,searchText:(t=c,r=A,n=d,i=t.metadata??{},a=(0,eJ.getInstrumentMetadata)(t.name),o=Array.isArray(i.searchAliases)&&i.searchAliases.length>0?i.searchAliases:(0,eJ.getInstrumentSearchAliases)(t.name),e3(t.name,r,n,i.displayName,a.friendlyName,a.xStockName,i.category,...t.name.split(/[-/_]/).map(e=>e.trim().toLowerCase()).filter(e=>e&&!e2.has(e)),...o))}}function te(e){return!e.delisted}function tt(e){return{category:e.category,pinned:e.pinned,row:{key:e.key,title:e.title,subtitle:e.subtitle,icon:e.icon,searchText:e3(e.title,e.subtitle,...e.searchHints??[]),run:e.run}}}var tr=e.i(782904),tn=e.i(261722);e.i(614271);var ti=e.i(304974),ta=e.i(559648);let to=(0,tn.styled)(eD.Item)(({theme:e})=>({cursor:"pointer",border:"none",backgroundColor:e.vars.palette.background.paper,width:"100%",textAlign:"left",borderRadius:4,marginBottom:e.spacing(.25),minHeight:32,padding:e.spacing(.75,1.25,.75,1.5),display:"flex",alignItems:"center",outline:"none",boxShadow:"none",color:e.palette.text.secondary,transition:e.transitions.create(["background-color","color"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeInOut}),"&:focus, &:focus-visible":{outline:"none",boxShadow:"none"},"&:hover":{backgroundColor:"#74747433",color:e.palette.text.primary},'&[data-selected="true"]':{backgroundColor:"#74747433",color:e.palette.text.primary},'&:hover .palette-row-icon, &[data-selected="true"] .palette-row-icon':{color:e.palette.text.primary},"& .palette-row-subtitle":{color:e.palette.text.secondary},'&:hover .palette-row-subtitle, &[data-selected="true"] .palette-row-subtitle':{color:`${(0,ec.varAlpha)(e.vars.palette.text.primaryChannel,.72)} !important`},'&[data-market-row="true"]':{paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.25)}}));function ts(e){let t,r,n,i,a,o,l,c=(0,A.c)(32),{row:d,onSelect:u}=e,h=null!=d.leverageLabel,{favoriteInstruments:p,addFavoriteInstrument:m,removeFavoriteInstrument:f}=(0,ez.useTradingPreferencesStore)();c[0]===Symbol.for("react.memo_cache_sentinel")?(t={passthrough:!0},c[0]=t):t=c[0];let g=(0,eq.useEasterEgg)(eq.BUTTON.FAVORITE_COIN,t);c[1]!==m||c[2]!==p||c[3]!==f?(r=e=>{p.includes(e)?f(e):m(e)},c[1]=m,c[2]=p,c[3]=f,c[4]=r):r=c[4],c[5]!==r||c[6]!==g?(n=g(r),c[5]=r,c[6]=g,c[7]=n):n=c[7];let y=n;c[8]!==p||c[9]!==h||c[10]!==d.key?(i=h&&p.includes(d.key),c[8]=p,c[9]=h,c[10]=d.key,c[11]=i):i=c[11];let b=i;return c[12]!==h||c[13]!==d.key?(a=h?{"data-market-row":"true","data-instrument":d.key}:{},c[12]=h,c[13]=d.key,c[14]=a):a=c[14],c[15]!==b||c[16]!==h||c[17]!==d.icon||c[18]!==d.isGrowthMode||c[19]!==d.key||c[20]!==d.lastPrice||c[21]!==d.leverageLabel||c[22]!==d.pointBoost||c[23]!==d.subtitle||c[24]!==d.title||c[25]!==y?(o=h?(0,s.jsxs)(es.Box,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:1},children:[(0,s.jsx)(es.Box,{className:"palette-row-icon",sx:{width:22,height:22,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary"},children:(0,s.jsx)(eW.Iconify,{icon:b?"eva:star-fill":"eva:star-outline",width:16,height:16,sx:{color:b?"warning.dark":"grey.400",cursor:"pointer"},onClick:e=>{e.stopPropagation(),y(d.key)}})}),(0,s.jsxs)(es.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",display:"flex",alignItems:"center",gap:.75},children:[(0,s.jsx)(tr.Typography,{variant:"body2",sx:{color:"inherit",fontSize:"10px",fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:d.title}),(0,s.jsxs)(es.Box,{sx:{display:"inline-flex",alignItems:"center",gap:.5,flexShrink:0},children:[(0,s.jsx)(tr.Typography,{component:"span",variant:"body2",sx:tA,children:d.leverageLabel}),d.isGrowthMode?(0,s.jsx)(ti.GrowthModeIndicator,{iconSx:{ml:0}}):null,null!=d.pointBoost?(0,s.jsx)(ta.PointBoostIndicator,{multiplier:d.pointBoost,iconSx:{ml:0}}):null]})]}),null!=d.lastPrice&&(0,s.jsx)(tr.Typography,{variant:"body2",sx:{color:"inherit",flexShrink:0,fontVariantNumeric:"tabular-nums",display:"inline-flex",alignItems:"center",minHeight:32,lineHeight:1},children:d.lastPrice})]}):(0,s.jsxs)(es.Box,{sx:{display:"flex",alignItems:"flex-start",ga
64p:1.25,minWidth:0,flex:1},children:[(0,s.jsx)(es.Box,{className:"palette-row-icon",sx:{width:22,height:22,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary",mt:.125,"& svg":{display:"block",width:"20px !important",height:"20px !important"}},children:d.icon?(0,s.jsx)(eW.Iconify,{icon:d.icon,width:20,height:20}):null}),(0,s.jsxs)(es.Box,{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",alignItems:"flex-start",gap:.375,textAlign:"left"},children:[(0,s.jsx)(tr.Typography,{variant:"body2",sx:{color:"inherit",width:"100%",lineHeight:1.35,fontSize:"10px",fontWeight:500},children:d.title}),(0,s.jsx)(tr.Typography,{variant:"caption",className:"palette-row-subtitle",component:"span",display:"block",sx:{width:"100%",lineHeight:1.45,fontSize:"10px"},children:d.subtitle})]})]}),c[15]=b,c[16]=h,c[17]=d.icon,c[18]=d.isGrowthMode,c[19]=d.key,c[20]=d.lastPrice,c[21]=d.leverageLabel,c[22]=d.pointBoost,c[23]=d.subtitle,c[24]=d.title,c[25]=y,c[26]=o):o=c[26],c[27]!==u||c[28]!==d.key||c[29]!==a||c[30]!==o?(l=(0,s.jsx)(to,{value:d.key,...a,onSelect:u,onMouseDown:tl,children:o}),c[27]=u,c[28]=d.key,c[29]=a,c[30]=o,c[31]=l):l=c[31],l}function tA(e){return{fontSize:"10px",fontWeight:500,bgcolor:(0,ec.varAlpha)(e.vars.palette.primary.mainChannel,.16),color:"success.main",display:"inline-flex",alignItems:"center",px:"6px",py:"2px",borderRadius:"4px",lineHeight:1}}function tl(e){return e.preventDefault()}function tc(e){let t,r,n=(0,A.c)(10),{sections:i,showNoResults:a,onItemRun:o}=e;if(a){let e,t,r;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:"100%",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",px:2,py:4},n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)(tr.Typography,{component:"p",sx:{typography:"subtitle1",fontWeight:600,mb:1,color:"text.primary"},children:"No results found"}),n[1]=t):t=n[1],n[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,s.jsxs)(es.Box,{sx:e,role:"status","aria-live":"polite",children:[t,(0,s.jsx)(tr.Typography,{component:"p",sx:{typography:"body2",color:"text.secondary",lineHeight:1.55,maxWidth:360,mx:"auto"},children:"Try a symbol like BTC or ETH"})]}),n[2]=r):r=n[2],r}if(n[3]!==o||n[4]!==i){let e;n[6]!==o?(e=e=>(0,s.jsx)(eD.Group,{value:e.label,heading:e.label,children:e.rows.map(e=>(0,s.jsx)(ts,{row:e,onSelect:()=>o(e)},e.key))},e.label),n[6]=o,n[7]=e):e=n[7],t=i.map(e),n[3]=o,n[4]=i,n[5]=t}else t=n[5];return n[8]!==t?(r=(0,s.jsx)(eD.List,{children:t}),n[8]=t,n[9]=r):r=n[9],r}let td={display:"inline-flex",alignItems:"center",gap:1},tu=e=>{let t,r,n=(0,A.c)(6),{t:i,children:a,sx:o}=e;n[0]!==o||n[1]!==i?(t=o?[eY(i),...Array.isArray(o)?o:[o]]:eY(i),n[0]=o,n[1]=i,n[2]=t):t=n[2];let l=t;return n[3]!==a||n[4]!==l?(r=(0,s.jsx)(es.Box,{component:"kbd",sx:l,children:a}),n[3]=a,n[4]=l,n[5]=r):r=n[5],r},th=e=>{let t,r,n,i=(0,A.c)(8),{t:a,label:o,keys:l}=e;if(i[0]!==a)t={...{fontSize:a.typography.pxToRem(10),[a.breakpoints.up("sm")]:{fontSize:a.typography.pxToRem(11)}},color:a.palette.text.secondary,letterSpacing:.2,whiteSpace:"nowrap"},i[0]=a,i[1]=t;else t=i[1];return i[2]!==o||i[3]!==t?(r=(0,s.jsx)(tr.Typography,{component:"span",sx:t,children:o}),i[2]=o,i[3]=t,i[4]=r):r=i[4],i[5]!==l||i[6]!==r?(n=(0,s.jsxs)(es.Box,{component:"span",sx:td,children:[l,r]}),i[5]=l,i[6]=r,i[7]=n):n=i[7],n};function tp(){let e,t,r,n,i,a,o,l,c,d,u,h,p=(0,A.c)(27),m=(0,el.useTheme)(),f=tm;p[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:"auto",px:"6px"},t=f("K"),p[0]=e,p[1]=t):(e=p[0],t=p[1]),p[2]!==m?(r={label:"Open",keys:(0,s.jsx)(tu,{t:m,sx:e,children:t})},p[2]=m,p[3]=r):r=p[3],p[4]!==m?(n={label:"Select",keys:(0,s.jsx)(tu,{t:m,children:"Enter"})},p[4]=m,p[5]=n):n=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(i=f("F"),p[6]=i):i=p[6],p[7]!==m?(a={label:"Favourite",keys:(0,s.jsx)(tu,{t:m,children:i})},p[7]=m,p[8]=a):a=p[8],p[9]!==m?(o={label:"Close",keys:(0,s.jsx)(tu,{t:m,children:"Esc"})},p[9]=m,p[10]=o):o=p[10],p[11]!==m?(l={label:"Nav",keys:(0,s.jsx)(tu,{t:m,children:"â â"})},p[11]=m,p[12]=l):l=p[12],p[13]!==r||p[14]!==n||p[15]!==a||p[16]!==o||p[17]!==l?(c=[r,n,a,o,l],p[13]=r,p[14]=n,p[15]=a,p[16]=o,p[17]=l,p[18]=c):c=p[18];let g=c;if(p[19]!==m)d={flexShrink:0,mt:"auto",pt:1,width:"100%",boxSizing:"border-box",borderTop:`1px dotted ${(0,ec.varAlpha)(m.vars.palette.grey["500Channel"],"dark"===m.palette.mode?.1:.06)}`,display:"flex",flexWrap:"nowrap",alignItems:"center",alignContent:"center",justifyContent:"center",columnGap:m.spacing(1.75),rowGap:0,px:1.5,overflowX:"auto",overflowY:"hidden",WebkitOverflowScrolling:"touch",scrollbarWidth:"thin","& > *":{flexShrink:0}},p[19]=m,p[20]=d;else d=p[20];return p[21]!==g||p[22]!==m?(u=g.map(e=>{let{label:t,keys:r}=e;return(0,s.jsx)(th,{t:m,label:t,keys:r},t)}),p[21]=g,p[22]=m,p[23]=u):u=p[23],p[24]!==u||p[25]!==d?(h=(0,s.jsx)(es.Box,{component:"footer","aria-hidden":!0,sx:d,children:u}),p[24]=u,p[25]=d,p[26]=h):h=p[26],h}function tm(e){return(0,s.jsxs)(es.Box,{component:"span",sx:{dis
64play:"inline-flex",alignItems:"center",gap:"4px"},children:[(0,s.jsx)(eW.Iconify,{icon:"lucide:command",width:12,height:12,sx:{color:"text.primary"}}),(0,s.jsx)(es.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center"},children:e})]})}var tf=e.i(709643);function tg(){let e,t,r,n,i=(0,tf.useTranslations)(),a=(0,el.useTheme)(),o=(0,eo.useRouter)(),l=(0,eo.usePathname)(),c=(0,ez.useGlobalStore)(e=>e.enableCommandPalette),d="/join-waitlist"===l||!c,u=(0,ez.useActionStore)(e=>e.modal),h=(0,ez.useActionStore)(e=>e.setModal),p=(0,ez.useActionStore)(e=>e.setCommandPaletteOpen),m=(0,ez.useAuthStore)(e=>e.master),{logout:f}=(0,e$.useAuthActions)(),g=(0,ez.useTradingDataStore)(e=>e.instruments),y=(0,ez.useTradingDataStore)(e=>e.tickers),{favoriteInstruments:b,addFavoriteInstrument:x,removeFavoriteInstrument:w}=(0,ez.useTradingPreferencesStore)(),v=(0,eq.useEasterEgg)(eq.BUTTON.FAVORITE_COIN,{passthrough:!0})(e=>{b.includes(e)?w(e):x(e)}),[C,B]=(0,ea.useState)(!1),[S,k]=(0,ea.useState)(""),[E,F]=(0,ea.useState)(""),T=(0,ea.useRef)(!1),U=(0,ea.useCallback)(e=>{F(""),k(e)},[]),I=(0,ea.useCallback)(e=>{B(e),F(""),k("")},[]),Q=(0,ea.useCallback)(()=>{d||(document.activeElement?.blur?.(),u&&h(null),null!=document.querySelector('.MuiModal-root[aria-hidden="false"], .MuiPopover-root[aria-hidden="false"], .MuiMenu-root[aria-hidden="false"], [role="dialog"]:not([aria-hidden="true"])')&&document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:!0,cancelable:!0})),window.requestAnimationFrame(()=>{d||I(!0)}))},[I,u,d,h]),j=(0,ea.useCallback)(()=>I(!1),[I]),L=(0,ea.useCallback)(e=>{T.current=!0,o.push(e),j()},[o,j]),_=(0,ea.useCallback)(e=>{window.open(e,"_blank","noopener"),j()},[j]),{sections:P,showNoResults:D}=function(e){let t,r,n,i,a,o,s,l,c,d=(0,A.c)(42),{query:u,instruments:h,tickers:p,navigateToPath:m,navigateExternal:f,openTradingModal:g,disconnect:y,master:b}=e;d[0]!==y||d[1]!==b||d[2]!==f||d[3]!==m||d[4]!==g?(t=(0,e0.buildStaticRows)({navigateToPath:m,navigateExternal:f,openTradingModal:g,disconnect:y,master:b}).map(tt),d[0]=y,d[1]=b,d[2]=f,d[3]=m,d[4]=g,d[5]=t):t=d[5];let x=t;d[6]!==h?(r=Object.values(h||{}).filter(te).map(e9),d[6]=h,d[7]=r):r=d[7];let w=r;d[8]!==u?(n=u.trim(),d[8]=u,d[9]=n):n=d[9];let v=n.length>0;d[10]!==p?(i=(e,t)=>(0,e0.marketVolume)(p,t.instrument.name)-(0,e0.marketVolume)(p,e.instrument.name),d[10]=p,d[11]=i):i=d[11];let C=i;if(d[12]!==C||d[13]!==v||d[14]!==w||d[15]!==m||d[16]!==u||d[17]!==p){let e,t;d[19]!==C||d[20]!==v?(e=(e,t)=>{if(v){var r,n;return t.score!==e.score?t.score-e.score:(r=e,n=t,r.displayName.localeCompare(n.displayName))}return C(e,t)},d[19]=C,d[20]=v,d[21]=e):e=d[21],d[22]!==m||d[23]!==p?(t=e=>{let t,{instrument:r,displayName:n,subtitle:i,searchText:a}=e;return{key:r.name,title:n,subtitle:i,searchText:a,leverageLabel:r.max_leverage?`${r.max_leverage}x`:"Spot",lastPrice:(t=Number(p[r.name]?.last_price??0))?(0,eZ.formatNumber)(t,{instrument_name:r.name,useTickSize:!0,fallback:"0",preserveDecimalString:!0,trimTrailingZeros:!1}):"0",isGrowthMode:r.growth_mode??!1,pointBoost:(0,eJ.getInstrumentPointBoost)(r.name),run:()=>m("spot"===r.kind?(0,e1.getInvestInstrumentPath)(r.name):(0,e0.tradePath)(r.name.trim()))}},d[22]=m,d[23]=p,d[24]=t):t=d[24],a=w.map(e=>({...e,score:v?e5(e.searchText,u):1})).filter(e7).sort(e).map(t),d[12]=C,d[13]=v,d[14]=w,d[15]=m,d[16]=u,d[17]=p,d[18]=a}else a=d[18];let B=a;d[25]!==x?(o=e=>x.filter(t=>t.category===e),d[25]=x,d[26]=o):o=d[26];let S=o;if(d[27]!==S||d[28]!==B||d[29]!==u){let e,t;d[31]!==S||d[32]!==u?(e=e=>({label:e0.SECTION_LABELS[e],rows:function(e,t){let r,n=e.map(e=>e.row);return t.trim()?(r=t.trim())?n.map(e=>({row:e,score:function(e,t){let r=e5(e.searchText,t);if(!r)return 0;let n=t.trim().toLowerCase(),i=e.title.toLowerCase(),a=e.subtitle.toLowerCase();return n&&i.startsWith(n)?r+80:n&&i.includes(n)?r+50:n&&a.includes(n)?r+20:r}(e,r)})).filter(({score:e})=>e>0).sort((e,t)=>t.score-e.score).map(({row:e})=>e):n:e.filter(e=>e.pinned).map(e=>e.row)}(S(e),u)}),d[31]=S,d[32]=u,d[33]=e):e=d[33];let r=e0.STATIC_CATEGORY_ORDER.map(e).filter(e8);d[34]!==B?(t={label:e0.SECTION_LABELS.instruments,rows:B}
64,d[34]=B,d[35]=t):t=d[35],s=[t,...r].filter(e6),d[27]=S,d[28]=B,d[29]=u,d[30]=s}else s=d[30];let k=s;d[36]!==u||d[37]!==k.length?(l=0===k.length&&u.trim().length>0,d[36]=u,d[37]=k.length,d[38]=l):l=d[38];let E=l;return d[39]!==k||d[40]!==E?(c={sections:k,showNoResults:E},d[39]=k,d[40]=E,d[41]=c):c=d[41],c}({query:S,instruments:g,tickers:y,navigateToPath:L,navigateExternal:_,openTradingModal:(0,ea.useCallback)(e=>{j(),window.requestAnimationFrame(()=>h(e))},[j,h]),disconnect:(0,ea.useCallback)(()=>{f(),j()},[f,j]),master:m});(0,ea.useEffect)(()=>{d&&C&&I(!1)},[d,C,I]),(0,ea.useEffect)(()=>(p(C),()=>p(!1)),[C,p]),(0,ea.useEffect)(()=>{let e=e=>{if(!d&&(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()){if(e.preventDefault(),e.stopPropagation(),C)return void I(!1);Q()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[d,C,I,Q]),(0,ea.useEffect)(()=>{if(!C||d)return;let e=e=>{if(!(e.metaKey||e.ctrlKey))return;let t=e.key.toLowerCase();if("s"===t){e.preventDefault(),document.querySelector("[cmdk-input]")?.focus?.();return}if("f"===t){e.preventDefault();let t=document.querySelector('[cmdk-item][data-selected="true"][data-market-row="true"]'),r=t?.dataset.instrument??t?.getAttribute("data-instrument");r&&v(r)}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[C,d,v]),(0,ea.useEffect)(()=>{C&&requestAnimationFrame(()=>{document.querySelector("[cmdk-list]")?.scrollTo?.(0,0)})},[S,C]);let R=(0,ea.useRef)(!1);return(0,ea.useEffect)(()=>{if(C){R.current=!0;return}R.current&&(R.current=!1,requestAnimationFrame(()=>document.activeElement?.blur?.()))},[C]),(0,ea.useEffect)(()=>{if(!T.current)return;T.current=!1;let e=window.setTimeout(()=>document.activeElement?.blur?.(),0);return()=>clearTimeout(e)},[l]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eA.default,{styles:(e=1.5*a.shape.borderRadius,t=a.spacing(1.5),r=`1px solid ${(0,ec.varAlpha)("dark"===a.palette.mode?a.vars.palette.common.whiteChannel:a.vars.palette.grey["500Channel"],"dark"===a.palette.mode?.16:.22)}`,n=a.vars.palette.background.paper,{"[cmdk-overlay]":{position:"fixed",inset:0,zIndex:a.zIndex.modal,backgroundColor:(0,ec.varAlpha)(a.vars.palette.common.blackChannel,.6)},"[cmdk-dialog]":{position:"fixed",zIndex:a.zIndex.modal,left:"50%",top:"clamp(96px, 18vh, 220px)",transform:"translateX(-50%)",width:"min(calc(100vw - 32px), 640px)",minWidth:"min(280px, calc(100vw - 32px))",maxWidth:640,maxHeight:481,height:"auto",margin:0,padding:a.spacing(3),display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:t,backgroundColor:n,border:r,boxShadow:a.customShadows.dialog,"@media (max-width: 1000px)":{left:0,right:0,top:"auto",bottom:0,transform:"none",width:"100%",maxWidth:"100%",minWidth:0,borderTopLeftRadius:e,borderTopRightRadius:e,borderBottomLeftRadius:0,borderBottomRightRadius:0,maxHeight:"90vh",height:"auto",padding:a.spacing(2.5,2,2)}},"[cmdk-root]":{display:"flex",flexDirection:"column",minHeight:0,width:"100%",overflow:"hidden",[eX]:{flex:1,minHeight:0}},"[cmdk-input]":{flex:1,minWidth:0,fontFamily:"Poppins",height:"100%",padding:0,border:"none",borderRadius:0,outline:"none",backgroundColor:"transparent",color:a.palette.text.secondary,fontSize:a.typography.pxToRem(10),lineHeight:1.25,fontWeight:a.typography.fontWeightRegular,"&::placeholder":{color:a.palette.text.secondary,opacity:1}},"[cmdk-list]":{overflow:"auto",scrollPaddingBlockStart:a.spacing(1),scrollPaddingBlockEnd:a.spacing(1),marginTop:a.spacing(2.5),display:"flex",flexDirection:"column",gap:a.spacing(2),paddingTop:0,paddingBottom:a.spacing(.25),height:"var(--cmdk-list-height)",transition:a.transitions.create("height",{duration:140}),maxHeight:"min(54vh, 440px)",minHeight:0,[eX]:{marginTop:0,maxHeight:"min(320px, calc(481px - 200px))"}},"[cmdk-group]":{borderRadius:a.spacing(1),backgroundColor:n,paddingTop:a.spacing(1.25),paddingBottom:a.spacing(1),overflow:"hidden"},"[cmdk-group-heading]":{...a.typography.overline,display:"block",position:"static",fontSize:a.typography.pxToRem(10),textAlign:"left",marginTop:0,marginBottom:a.spacing(1),paddingLeft:a.spacing(1.5),paddingRight:a.spacing(1.5),paddingTop:a.spacing(.25),paddingBottom:a.spacing(.25),fontWeight:a.typography.fontWeightSemiBold,color:(0,ec.varAlpha)(a.vars.palette.text.primaryChannel,.6)}})}),(0,s.jsx)(eD.Dialog,{open:C,onOpenChange:I,label:i("modals.commandPalette.commandMenu"),shouldFilter:!1,value:E,onValueChange:F,children:(0,s.jsxs)(es.Box,{sx:e=>({display:"flex",flexDirection:"column",width:"100%",minWidth:0,minHeight:0,overflow:"hidden",gap:e.spacing(2),[e.breakpoints.up(1001)]:{gap:e.spacing(2.5)}}),children:[(0,s.jsx)(es.Box,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%",pr:.25,boxSizing:"border-box",flexShrink:0},children:(0,s.jsxs)(es.Box,{sx:e=>({flex:1,display:"flex",alignItems:"center",minWidth:0,height:52,pl:1.5,pr:1.5,gap:1,borderRadius:1,bgcolor:"#74747414",border:`1px solid ${(0,ec.varAlpha)(e.vars.palette.grey["500Channel"],"dark"===e.palette.mode?.1:.12)}`,transition:e.transitions.create(["background-color","border-color"],{duration:150}),"&:hover":{borderColor:(0,ec.varAlpha)(e.vars.palette.grey["500Channel"],"dark"===e.palette.mode?.14:.16)}}),children:[(0,s.jsx)(eW.Iconify,{icon:"prime:search",width:16,sx:{color:"text.secondary",flexShrink:0}}),(0,s.jsx)(eD.Input,{placeholder:i("common.search"),value:S,onValueChange:U,autoFocus:C&&!d})]})}),(0,s.jsx)(es.Box,{sx:e=>({minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",[e.breakpoints.up(1001)]:{flex:1}}),children:(0,s.jsx)(tc,{sections:P,showNoResults:D,onItemRun:e=>{"function"==typeof e.run&&e.run()}},S.trim()?"q":"0")}),(0,s.jsx)(tp,{})]})})]})}e.i(247167);var ty=e.i(858532);(t=i||(i={}))[t.DEFAULT=0]="DEFAULT",t[t.FULL_TOKEN_BALANCE=1]="FULL_TOKEN_BALANCE",t[t.FULL_NATIVE_BALANCE=2]="FULL_NATIVE_BALANCE",t[t.COLLECT_TOKEN_BALANCE=3]="COLLECT_TOKEN_BALANCE",(r=a||(a={})).TRANSACTION_SUCCESS="transaction_success",r.CLOSE_REQUEST="close_request",(n=o||(o={})).RABBY="rabby",n.METAMASK="metamask",n.PHANTOM="phantom",n.COINBASE="coinbase",n.TRUST="trust",n.BRAVE="brave",n.OKX="okx",n.KEPLR="keplr",n.TOKENPOCKET="tokenpocket",n.BITGET="bitget",n.RAINBOW="rainbow",n.FRAME="frame",n.UNISWAP="uniswap",n.ONE_INCH="1inch",n.LEDGER="ledger",n.SAFE="safe",n.WALLETCONNECT="walletconnect";let tb="SWAPPER_WALLET_CHAIN_CHANGED",tx="SWAPPER_TX_RESPONSE",tw="SWAPPER_CHAIN_SWITCH_RESPONSE";class tv{constructor(e){this.isReady=!1,this.isConnected=!1,this.iframe=e.iframe,this.iframeOrigin=function(e,t){if(t)return t;try{return new URL(e.src).origin}catch{return"https://deposit.swapper.finance"}}(e.iframe,e.iframeOrigin),this.onTransactionRequest=e.onTransactionRequest,this.onChainSwitchRequest=e.onChainSwitchRequest,this.autoConnectConfig=e.autoConnect,this.walletName=e.autoConnect?.walletName,this.messageListener=this.handleMessage.bind(this),window.addEventListener("message",this.messageListener)}handleMessage(e){if(e.origin!==this.iframeOrigin||!e.data||"object"!=typeof e.data)return;let{type:t}=e.data;switch(t){case"SWAPPER_WALLET_READY":this.isReady=!0,this.autoConnectConfig&&this.connectWallet(this.autoConnectConfig.address,this.autoConnectConfig.chainId,this.autoConnectConfig.walletName);break;case"SWAPPER_TX_REQUEST":this.handleTxRequest(e.data);break;case"SWAPPER_CHAIN_SWITCH_REQUEST":this.handleChainSwitchRequest(e.data)}}async handleTxRequest(e){try{let t=await this.onTransactionRequest(e.transaction);this.postMessage({type:tx,requestId:e.requestId,hash:t.hash})}catch(t){this.postMessage({type:tx,requestId:e.requestId,error:t instanceof Error?t.message:String(t)})}}async handleChainSwitchRequest(e){try{await this.onChainSwitchRequest(Number(e.chainId)),this.chainId=Number(e.chainId),this.postMessage({type:tw,requestId:e.requestId}),this.postMessage({type:tb,chainId:e.chainId})}catch(t){this.postMessage({type:tw,requestId:e.requestId,error:t instanceof Error?t.message:String(t)})}}postMessage(e){this.iframe.contentWindow?.postMessage(e,this.iframeOrigin)}connectWallet(e,t,r){this.isConnected=!0,this.address=e,this.chainId=t,r&&(this.walletName=r),this.postMessage({type:"SWAPPER_WALLET_CONNECT",address:e,chainId:String(t),...this.walletName?{walletName:this.walletName}:{}})}disconnectWallet(){this.isConnected=!1,this.address=void 0,this.chainId=void 0,this.postMessage({type:"SWAPPER_WALLET_DISCONNECT"})}notifyChainChanged(e){this.chainId=e,this.postMessage({type:tb,chainId:String(e)})}setAutoConnect(e){this.autoConnectConfig=e,e?.walletName&&(this.walletName=e.walletName),e&&this.isReady&&this.connectWallet(e.address,e.chainId,e.walletName)}getIsReady(){return this.isReady}getIsConnected(){return this.isConnected}getAddress(){return this.address}getChainId(){return this.chainId}getWalletName(){return this.walletName}destroy(){window.removeEventListener("message",this.messageListener),this.isReady=!1,this.isConnected=!1,this.address=void 0,this.chainId=void 0,this.walletName=void 0,this.autoConnectConfig=void 0}}class tC{constructor(e){this.signer=e}async getAddress(){return this.signer.getAddress()}async getChainId(){return this.signer.getChainId()}async sendTransaction(e){return{hash:(await this.signer.sendTransaction({to:e.to,data:e.data,value:e.value,gasLimit:e.gasLim
64it})).hash}}async switchChain(e){let t="0x"+Number(e).toString(16);if(this.signer.provider&&"send"in this.signer.provider)await this.signer.provider.send("wallet_switchEthereumChain",[{chainId:t}]);else throw Error("Provider does not support wallet_switchEthereumChain")}}class tB{constructor(e){this.signer=e}async getAddress(){return this.signer.getAddress()}async getChainId(){return Number((await this.signer.provider.getNetwork()).chainId)}async sendTransaction(e){return{hash:(await this.signer.sendTransaction({to:e.to,data:e.data,value:e.value,gasLimit:e.gasLimit})).hash}}async switchChain(e){let t="0x"+Number(e).toString(16);await this.signer.provider.send("wallet_switchEthereumChain",[{chainId:t}])}}class tS{constructor(e){this.client=e}async getAddress(){let[e]=await this.client.getAddresses();if(!e)throw Error("No account found in WalletClient");return e}async getChainId(){return this.client.getChainId()}async sendTransaction(e){let[t]=await this.client.getAddresses();if(!t)throw Error("No account found");return{hash:await this.client.sendTransaction({account:t,to:e.to,data:e.data,value:e.value?BigInt(e.value):void 0,gas:e.gasLimit?BigInt(e.gasLimit):void 0,chain:null})}}async switchChain(e){await this.client.switchChain({id:e})}}let tk=[{id:o.RABBY,flag:"isRabby",pattern:/rabby/i},{id:o.METAMASK,flag:"isMetaMask",pattern:/metamask/i},{id:o.PHANTOM,flag:"isPhantom",pattern:/phantom/i},{id:o.COINBASE,flag:"isCoinbaseWallet",pattern:/coinbase/i},{id:o.TRUST,flag:"isTrust",pattern:/trust/i},{id:o.BRAVE,flag:"isBraveWallet",pattern:/brave/i},{id:o.OKX,flag:"isOkxWallet",pattern:/okx/i},{id:o.KEPLR,flag:"isKeplr",pattern:/keplr/i},{id:o.TOKENPOCKET,flag:"isTokenPocket",pattern:/tokenpocket/i},{id:o.BITGET,flag:"isBitget",pattern:/bitget/i},{id:o.RAINBOW,flag:"isRainbow",pattern:/rainbow/i},{id:o.FRAME,flag:"isFrame",pattern:/frame/i},{id:o.UNISWAP,flag:"isUniswapWallet",pattern:/uniswap/i},{id:o.ONE_INCH,flag:"is1inch",pattern:/1inch/i},{id:o.LEDGER,flag:"isLedgerConnect",pattern:/ledger/i},{id:o.SAFE,flag:"isSafe",pattern:/safe/i},{id:o.WALLETCONNECT,pattern:/walletconnect/i}];async function tE(e){try{if(e.provider&&"function"==typeof e.provider.send)return await e.provider.send("web3_clientVersion",[])}catch{}try{if(e.provider&&"function"==typeof e.provider._getProvider){let t=await e.provider._getProvider();if("function"==typeof t.send)return await t.send("web3_clientVersion",[])}}catch{}try{if(e.rpcClient&&"function"==typeof e.rpcClient.request)return await e.rpcClient.request({method:"web3_clientVersion"})}catch{}try{if(e.transport&&"function"==typeof e.transport.request)return await e.transport.request({method:"web3_clientVersion"})}catch{}try{if("function"==typeof e.request)return await e.request({method:"web3_clientVersion"})}catch{}throw Error("No RPC access pattern found")}async function tF(e){let t=function(){let e=window.ethereum;if(e){for(let{id:t,flag:r}of tk)if(r&&e[r])return t}}();if(t)return t;try{let t=await tE(e);if("string"==typeof t&&t.trim()){for(let{id:e,pattern:r}of tk)if(r.test(t))return e;return}}catch{}}function tT(e){if("object"==typeof e&&null!==e&&"function"==typeof e.getAddresses)return new tS(e);if("object"==typeof e&&null!==e&&"function"==typeof e.getAddress&&"function"==typeof e.sendTransaction&&null!=e.provider&&"function"==typeof e.provider.getNetwork&&!("getChainId"in e))return new tB(e);if("object"==typeof e&&null!==e&&"function"==typeof e.getAddress&&"function"==typeof e.getChainId&&"function"==typeof e.sendTransaction&&!("getAddresses"in e))return new tC(e);if("object"==typeof e&&null!==e&&"function"==typeof e.getAddress&&"function"==typeof e.getChainId&&"function"==typeof e.sendTransaction&&"function"==typeof e.switchChain)return e;throw Error("Unsupported signer type. Expected an ethers v5 Signer, ethers v6 Signer, viem WalletClient, or an object implementing the SwapperSigner interface.")}class tU{constructor(e){if(this.eventHandlers=new Map,this.signerRequestId=0,this.validateConfig(e),this.config={integratorId:e.integratorId,dstChainId:e.dstChainId,dstTokenAddr:e.dstTokenAddr,depositWalletAddress:e.depositWalletAddress,styles:e.styles,customContractCalls:e.customContractCalls,supportedDepositOptions:e.supportedDepositOptions,webhookUrl:e.webhookUrl,actionLabel:e.actionLabel},this.iframeUrl=e.iframeUrl||"https://deposit.swapper.finance/",this.iframeOrigin=new URL(this.iframeUrl).origin,this.iframeAttributes=e.iframeAttributes,this.closable=e.closable??!1,this.iframe=this.createIframe(e),this.setupMessageListener(),e.onEvent&&this.on("*",e.onEvent),e.container&&this.mount(e.container),e.wallet)if("signer"in e.wallet){const t=e.wallet.signer,r=tT(t),n=e=>r.sendTransaction(e),i=e=>r.switchChain(e);Promise.all([r.getAddress(),r.getChainId(),tF(t)]).then(([e,t,r])=>{this.walletProvider=new tv({iframe:this.iframe,iframeOrigin:this.iframeOrigin,onTransactionRequest:n,onChainSwitchRequest:i,autoConnect:{address:e,chainId:t,walletName:r}})}).catch(e=>{console.error("[SwapperIframe] Failed to initialize wallet provider:",e)})}else this.walletProvider=new tv({iframe:this.iframe,iframeOrigin:this.iframeOrigin,onTransactionRequest:e.wallet.onTransactionRequest,onChainSwitchRequest:e.wallet.onChainSwitchRequest,autoConnect:e.wallet.autoConnect})}validateConfig(e){for(let t of["integratorId","dstChainId","dstTokenAddr","depositWalletAddress"])e[t]||console.warn(`[SwapperIframe] Missing required parameter: ${t}`)}createIframe(e){let t=document.createElement("iframe"),r=new URL(this.iframeUrl);r.searchParams.set("integratorId",this.config.integratorId),r.searchParams.set("dstChainId",this.config.dstChainId),r.searchParams.set("dstTokenAddr",this.config.dstTokenAddr),r.searchParams.set("depositWalletAddress",this.config.depositWalletAddress),this.config.styles&&r.searchParams.set("styles",JSON.stringify(this.config.styles)),this.config.customContractCalls&&r.searchParams.set("customContractCalls",JSON.stringify(this.config.customContractCalls)),this.config.supp
64ortedDepositOptions&&r.searchParams.set("supportedDepositOptions",JSON.stringify(this.config.supportedDepositOptions)),this.config.webhookUrl&&r.searchParams.set("webhookUrl",this.config.webhookUrl),this.config.actionLabel&&r.searchParams.set("actionLabel",this.config.actionLabel),this.closable&&r.searchParams.set("closable","true"),r.searchParams.set("t",Date.now().toString()),t.src=r.toString(),t.style.border="none",t.style.width=e.iframeAttributes?.width||"100%",t.style.height=e.iframeAttributes?.height||"560px",t.title=e.iframeAttributes?.title||"Swapper Deposit Widget",t.style.borderRadius=e.iframeAttributes?.borderRadius||"28px",t.style.opacity="0",t.style.transition="opacity 0.1s ease",t.addEventListener("load",()=>{t.style.opacity="1"});let n=`camera; clipboard-write self ${this.iframeOrigin}`,i=e.iframeAttributes?.allow||"",a=i?`${n} ${i}`:n;t.setAttribute("allow",a);let o="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts",s=e.iframeAttributes?.sandbox||"",A=s?`${o} ${s}`:o;return t.setAttribute("sandbox",A),e.iframeAttributes&&Object.entries(e.iframeAttributes).forEach(([e,r])=>{r&&"width"!==e&&"height"!==e&&"title"!==e&&"allow"!==e&&"sandbox"!==e&&"borderRadius"!==e&&t.setAttribute(e,r)}),t}emitEvent(e){let t=this.eventHandlers.get(e.type);t&&t.forEach(t=>t(e));let r=this.eventHandlers.get("*");r&&r.forEach(t=>t(e))}setupMessageListener(){this.messageListener=e=>{if(e.origin===this.iframeOrigin&&e.data&&"object"==typeof e.data){if("SWAPPER_EVENT"===e.data.type){let t=e.data;return"1.0"!==t.version?void console.warn(`[SwapperIframe] Received widget event with unsupported protocol version ${t.version} (expected 1.0)`):void this.emitEvent({type:t.name,data:t.payload})}this.emitEvent({type:e.data.type,data:e.data.data})}},window.addEventListener("message",this.messageListener)}mount(e){let t="string"==typeof e?document.querySelector(e):e;if(!t)throw Error(`Container not found: ${"string"==typeof e?e:"provided element"}`);let r=document.createElement("div");r.style.width=this.iframeAttributes?.width||"450px",r.style.minWidth=this.iframeAttributes?.minWidth||"360px",r.style.maxWidth="100%",r.style.borderRadius=this.iframeAttributes?.borderRadius||"0px",r.style.height=this.iframeAttributes?.height||"560px",r.style.overflow="hidden",t.style.display="block",t.style.width="100%",r.appendChild(this.iframe),t.appendChild(r)}updateConfig(e){this.config={...this.config,...e},this.configDebounceTimeout&&clearTimeout(this.configDebounceTimeout),this.configDebounceTimeout=setTimeout(()=>{this.sendMessage({type:"SWAPPER_CONFIG",config:this.config}),this.configDebounceTimeout=void 0},300)}updateStyles(e){this.updateConfig({styles:e})}updateCustomContractCalls(e){this.updateConfig({customContractCalls:e})}updateSupportedDepositOptions(e){this.updateConfig({supportedDepositOptions:e})}updateWebhookUrl(e){this.updateConfig({webhookUrl:e})}sendMessage(e){this.iframe.contentWindow?.postMessage(e,this.iframeOrigin)}on(e,t){this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),this.eventHandlers.get(e).add(t)}off(e,t){let r=this.eventHandlers.get(e);r&&(r.delete(t),0===r.size&&this.eventHandlers.delete(e))}getIframe(){return this.iframe}getConfig(){return{...this.config}}updateSigner(e){if(e){this.disconnectTimeout&&(clearTimeout(this.disconnectTimeout),this.disconnectTimeout=void 0);let t=tT(e);this.walletProvider&&(this.walletProvider.destroy(),this.walletProvider=void 0);let r=e=>t.sendTransaction(e),n=e=>t.switchChain(e),i=++this.signerRequestId;Promise.all([t.getAddress(),t.getChainId(),tF(e)]).then(([e,t,a])=>{i===this.signerRequestId&&(this.walletProvider=new tv({iframe:this.iframe,iframeOrigin:this.iframeOrigin,onTransactionRequest:r,onChainSwitchRequest:n,autoConnect:{address:e,chainId:t,walletName:a}}),this.walletProvider.connectWallet(e,t,a))}).catch(e=>{console.error("[SwapperIframe] Failed to update wallet provider:",e)})}else this.disconnectTimeout&&clearTimeout(this.disconnectTimeout),this.disconnectTimeout=setTimeout(()=>{this.walletProvider&&(this.walletProvider.disconnectWallet(),this.walletProvider.destroy(),this.walletProvider=void 0),this.disconnectTimeout=void 0},500)}disconnectWallet(){this.disconnectTimeout&&(clearTimeout(this.disconnectTimeout),this.disconnectTimeout=void 0),this.walletProvider&&(this.walletProvider.disconnectWallet(),this.walletProvider.destroy(),this.walletProvider=void 0)}destroy(){if(this.configDebounceTimeout&&(clearTimeout(this.configDebounceTimeout),this.configDebounceTimeout=void 0),this.disconnectTimeout&&(clearTimeout(this.disconnectTimeout),this.disconnectTimeout=void 0),this.walletProvider&&(this.walletProvider.destroy(),this.walletProvider=void 0),this.messageListener&&window.removeEventListener("message",this.messageListener),this.eventHandlers.clear(),this.iframe.parentNode){let e=this.iframe.parentNode;e.parentNode?e.parentNode.removeChild(e):e.removeChild(this.iframe)}}}var tI=e.i(120785),tQ=e.i(206287),tj=e.i(57159),tL=e.i(911347),t_=e.i(321960),tP=e.i(645037);e.i(565306);var tD=e.i(849850);let tR=e=>{let t,r,n,i,o,l,c,d,u,h,p,m,f,g,y=(0,A.c)(33),{open:b}=e,x=(0,tf.useTranslations)(),{address:w}=(0,ez.useAuthStore)(),{setModal:v}=(0,ez.useActionStore)(),{data:C}=(0,tP.useWalletClient)(),{authenticated:B}=(0,tI.usePrivy)(),{wallets:S}=(0,tQ.useWallets)(),[k,E]=(0,ea.useState)(null),[F,T]=(0,ea.useState)(null),U=(0,ea.useRef)(null);y[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>T(e),y[0]=t):t=y[0];let I=t,Q=!w||"0x0000000000000000000000000000000000000000"===w,j=C??k;y[1]!==w||y[2]!==S?(r=S.find(e=>"privy"===e.walletClientType&&e.address.toLowerCase()===w?.toLowerCase())??S.find(tM),y[1]=w,y[2]=S,y[3]=r):r=y[3];let L=r;return y[4]!==B||y[5]!==b||y[6]!==L||y[7]!==C?(n=()=>
64{if(!b||C||!B||!L)return void E(null);let e=!1;return L.getEthereumProvider().then(t=>{e||E((0,tj.createWalletClient)({chain:t_.mainnet,transport:(0,tL.custom)(t)}))}),()=>{e=!0}},i=[B,b,L,C],y[4]=B,y[5]=b,y[6]=L,y[7]=C,y[8]=n,y[9]=i):(n=y[8],i=y[9]),(0,ea.useEffect)(n,i),y[10]!==w||y[11]!==F||y[12]!==Q||y[13]!==b||y[14]!==v||y[15]!==j||y[16]!==x?(o=()=>{if(!b||Q||!j||!F){U.current?.destroy(),U.current=null;return}return U.current=new tU({container:F,integratorId:"db9588106ff48d30c012",dstChainId:"hotstuff",dstTokenAddr:"1",depositWalletAddress:w,wallet:{signer:j,autoConnect:!0},closable:!0,iframeAttributes:{width:"100%",height:"560px",minWidth:"0",borderRadius:"0px"},styles:{themeMode:"dark",componentStyles:{primaryColor:"#93EA5D",primaryTextColor:"#0f0f0f",accentColor:"#93EA5D",sphereColor:"#93EA5D"}},onEvent:e=>{e.type===a.TRANSACTION_SUCCESS&&ty.showToast.success({message:x("modals.swapperDepositSuccess"),description:x("modals.swapperDepositSuccessDesc")}),e.type===a.CLOSE_REQUEST&&v(null)}}),()=>{U.current?.destroy(),U.current=null}},l=[w,F,Q,b,v,j,x],y[10]=w,y[11]=F,y[12]=Q,y[13]=b,y[14]=v,y[15]=j,y[16]=x,y[17]=o,y[18]=l):(o=y[17],l=y[18]),(0,ea.useEffect)(o,l),y[19]!==x?(c=x("modals.depositTitle"),y[19]=x,y[20]=c):c=y[20],y[21]!==v?(d=()=>v(null),u=()=>v("deposit"),y[21]=v,y[22]=d,y[23]=u):(d=y[22],u=y[23]),y[24]===Symbol.for("react.memo_cache_sentinel")?(h={p:"0px !important"},p={overflow:"hidden",background:"#111111"},m={pb:"0px !important"},y[24]=h,y[25]=p,y[26]=m):(h=y[24],p=y[25],m=y[26]),y[27]===Symbol.for("react.memo_cache_sentinel")?(f=(0,s.jsx)(es.Box,{children:(0,s.jsx)(es.Box,{ref:I})}),y[27]=f):f=y[27],y[28]!==b||y[29]!==c||y[30]!==d||y[31]!==u?(g=(0,s.jsx)(tD.ModalBox,{title:c,active:"deposit-swapper",open:b,onClose:d,onBack:u,maxWidth:"450px",noPaddingTop:!0,contentSx:h,paperSx:p,titleSx:m,children:f}),y[28]=b,y[29]=c,y[30]=d,y[31]=u,y[32]=g):g=y[32],g};function tM(e){return"privy"===e.walletClientType}function tO(e){let t,r,n,i,a,o,ea,eo,es,eA,el,ec,ed,eu,eh,ep,em,ef,eg,ey,eb,ex,ew,ev,eC,eB,eS,ek,eE,eF,eT,eU,eI,eQ,ej,eL,e_,eP,eD,eR,eM,eO,eN,eH,eV,eK,eG,eW,e$,eq,eX,eY,eJ,eZ,e0=(0,A.c)(157),{children:e1}=e,{modal:e2}=(0,ez.useActionStore)();e0[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)(tg,{}),r=(0,s.jsx)(J.BannerTrigger,{}),e0[0]=t,e0[1]=r):(t=e0[0],r=e0[1]);let e4="deposit-swapper"===e2;return e0[2]!==e4?(n=(0,s.jsx)(tR,{open:e4}),e0[2]=e4,e0[3]=n):n=e0[3],e0[4]!==e2?(i="deposit"===e2&&(0,s.jsx)(c.DepositSelectModal,{}),e0[4]=e2,e0[5]=i):i=e0[5],e0[6]!==e2?(a="deposit-direct"===e2&&(0,s.jsx)(l.DepositModal,{}),e0[6]=e2,e0[7]=a):a=e0[7],e0[8]!==e2?(o="margin"===e2&&(0,s.jsx)(d.MarginModal,{}),e0[8]=e2,e0[9]=o):o=e0[9],e0[10]!==e2?(ea="leverage"===e2&&(0,s.jsx)(u.LeverageModal,{}),e0[10]=e2,e0[11]=ea):ea=e0[11],e0[12]!==e2?(eo="one-way"===e2&&(0,s.jsx)(h.OneWayModal,{}),e0[12]=e2,e0[13]=eo):eo=e0[13],e0[14]!==e2?(es="internal-transfer"===e2&&(0,s.jsx)(p.InternalTransferModal,{}),e0[14]=e2,e0[15]=es):es=e0[15],e0[16]!==e2?(eA="send"===e2&&(0,s.jsx)(m.SendModal,{}),e0[16]=e2,e0[17]=eA):eA=e0[17],e0[18]!==e2?(el="withdraw"===e2&&(0,s.jsx)(f.WithdrawModal,{}),e0[18]=e2,e0[19]=el):el=e0[19],e0[20]!==e2?(ec="vault-deposit"===e2&&(0,s.jsx)(g.VaultDepositModal,{}),e0[20]=e2,e0[21]=ec):ec=e0[21],e0[22]!==e2?(ed="vault-redeem"===e2&&(0,s.jsx)(y.VaultRedeemModal,{}),e0[22]=e2,e0[23]=ed):ed=e0[23],e0[24]!==e2?(eu="fee-tiers"===e2&&(0,s.jsx)(b.FeeTiersModal,{}),e0[24]=e2,e0[25]=eu):eu=e0[25],e0[26]!==e2?(eh="connect-wallet"===e2&&(0,s.jsx)(x.ConnectWalletModal,{}),e0[26]=e2,e0[27]=eh):eh=e0[27],e0[28]!==e2?(ep="enable-trading"===e2&&(0,s.jsx)(w.EnableTradingModal,{}),e0[28]=e2,e0[29]=ep):ep=e0[29],e0[30]!==e2?(em="create-agent-wallet"===e2&&(0,s.jsx)(v.CreateAgentWalletModal,{}),e0[30]=e2,e0[31]=em):em=e0[31],e0[32]!==e2?(ef="faucet"===e2&&(0,s.jsx)(C.FaucetModal,{}),e0[32]=e2,e0[33]=ef):ef=e0[33],e0[34]!==e2?(eg="tp-sl"===e2&&(0,s.jsx)(B.TpSlModal,{}),e0[34]=e2,e0[35]=eg):eg=e0[35],e0[36]!==e2?(ey="tp-sl-view"===e2&&(0,s.jsx)(S.TpSlViewModal,{}),e0[36]=e2,e0[37]=ey):ey=e0[37],e0[38]!==e2?(eb="vault-leader"===e2&&(0,s.jsx)(k.
64VaultLeaderModal,{}),e0[38]=e2,e0[39]=eb):eb=e0[39],e0[40]!==e2?(ex="share-card"===e2&&(0,s.jsx)(E.ShareCardModal,{}),e0[40]=e2,e0[41]=ex):ex=e0[41],e0[42]!==e2?(ew="competition-share-card"===e2&&(0,s.jsx)(F.CompetitionShareCardModal,{}),e0[42]=e2,e0[43]=ew):ew=e0[43],e0[44]!==e2?(ev="trade-history-share-card"===e2&&(0,s.jsx)(T.TradeHistoryShareCardModal,{}),e0[44]=e2,e0[45]=ev):ev=e0[45],e0[46]!==e2?(eC="whitelist"===e2&&(0,s.jsx)(U.WhitelistModal,{}),e0[46]=e2,e0[47]=eC):eC=e0[47],e0[48]!==e2?(eB="close-all-positions"===e2&&(0,s.jsx)(I.CloseAllPositionsModal,{}),e0[48]=e2,e0[49]=eB):eB=e0[49],e0[50]!==e2?(eS="qr-wallet"===e2&&(0,s.jsx)(Q.QRWalletModal,{}),e0[50]=e2,e0[51]=eS):eS=e0[51],e0[52]!==e2?(ek="qr-scan"===e2&&(0,s.jsx)(j.QrScanModal,{}),e0[52]=e2,e0[53]=ek):ek=e0[53],e0[54]!==e2?(eE="set-referrer"===e2&&(0,s.jsx)(L.SetReferrerModal,{}),e0[54]=e2,e0[55]=eE):eE=e0[55],e0[56]!==e2?(eF="create-referral-code"===e2&&(0,s.jsx)(_.CreateReferralCodeModal,{}),e0[56]=e2,e0[57]=eF):eF=e0[57],e0[58]!==e2?(eT="collected-cards"===e2&&(0,s.jsx)(P.CollectedCardsModal,{}),e0[58]=e2,e0[59]=eT):eT=e0[59],e0[60]!==e2?(eU="slippage"===e2&&(0,s.jsx)(D.SlippageModal,{}),e0[60]=e2,e0[61]=eU):eU=e0[61],e0[62]!==e2?(eI="spot-slippage"===e2&&(0,s.jsx)(R.SpotSlippageModal,{}),e0[62]=e2,e0[63]=eI):eI=e0[63],e0[64]!==e2?(eQ="referral-tiers"===e2&&(0,s.jsx)(M.ReferralTiersModal,{}),e0[64]=e2,e0[65]=eQ):eQ=e0[65],e0[66]!==e2?(ej="referral-invite-code"===e2&&(0,s.jsx)(N.ReferralInviteCodeModal,{}),e0[66]=e2,e0[67]=ej):ej=e0[67],e0[68]!==e2?(eL="share-referral-code"===e2&&(0,s.jsx)(O.ShareReferralCodeModal,{}),e0[68]=e2,e0[69]=eL):eL=e0[69],e0[70]!==e2?(e_="eligible"===e2&&(0,s.jsx)(H.EligibileModal,{}),e0[70]=e2,e0[71]=e_):e_=e0[71],e0[72]!==e2?(eP="request-form"===e2&&(0,s.jsx)(V.RequestFormModal,{}),e0[72]=e2,e0[73]=eP):eP=e0[73],e0[74]!==e2?(eD="invite-code"===e2&&(0,s.jsx)(K.InviteCodeModal,{}),e0[74]=e2,e0[75]=eD):eD=e0[75],e0[76]!==e2?(eR="rabby-mobile-guide"===e2&&(0,s.jsx)(G.RabbyMobileGuideModal,{}),e0[76]=e2,e0[77]=eR):eR=e0[77],e0[78]!==e2?(eM="bridge"===e2&&(0,s.jsx)(W.BridgeModal,{}),e0[78]=e2,e0[79]=eM):eM=e0[79],e0[80]!==e2?(eO="isolated-margin-update"===e2&&(0,s.jsx)(z.IsolatedMarginUpdateModal,{}),e0[80]=e2,e0[81]=eO):eO=e0[81],e0[82]!==e2?(eN="terms-policy"===e2&&(0,s.jsx)($.TermsPolicyModal,{}),e0[82]=e2,e0[83]=eN):eN=e0[83],e0[84]!==e2?(eH="affiliate-tiers"===e2&&(0,s.jsx)(q.AffiliateTiersModal,{}),e0[84]=e2,e0[85]=eH):eH=e0[85],e0[86]!==e2?(eV="points-share-card"===e2&&(0,s.jsx)(X.PointsShareCardModal,{}),e0[86]=e2,e0[87]=eV):eV=e0[87],e0[88]!==e2?(eK="leaderboard-share-card"===e2&&(0,s.jsx)(Y.LeaderboardShareCardModal,{}),e0[88]=e2,e0[89]=eK):eK=e0[89],e0[90]!==e2?(eG="competition-announcement-banner"===e2&&(0,s.jsx)(J.CompetitionAnnouncementBanner,{}),e0[90]=e2,e0[91]=eG):eG=e0[91],e0[92]!==e2?(eW="approve-broker"===e2&&(0,s.jsx)(Z.ApproveBrokerModal,{}),e0[92]=e2,e0[93]=eW):eW=e0[93],e0[94]!==e2?(e$="collected-eggs"===e2&&(0,s.jsx)(ee.CollectedEggsModal,{}),e0[94]=e2,e0[95]=e$):e$=e0[95],e0[96]!==e2?(eq="fifa-super-cards"===e2&&(0,s.jsx)(et.FifaSuperCardsModal,{}),e0[96]=e2,e0[97]=eq):eq=e0[97],e0[98]!==e2?(eX="settings"===e2&&(0,s.jsx)(er.SettingsModal,{}),e0[98]=e2,e0[99]=eX):eX=e0[99],e0[100]!==e2?(eY="market-session"===e2&&(0,s.jsx)(en.MarketSessionModal,{}),e0[100]=e2,e0[101]=eY):eY=e0[101],e0[102]!==e2?(eJ="instrument-details"===e2&&(0,s.jsx)(ei.InstrumentDetailsModal,{}),e0[102]=e2,e0[103]=eJ):eJ=e0[103],e0[104]!==e1||e0[105]!==es||e0[106]!==eA||e0[107]!==el||e0[108]!==ec||e0[109]!==ed||e0[110]!==eu||e0[111]!==eh||e0[112]!==ep||e0[113]!==em||e0[114]!==ef||e0[115]!==eg||e0[116]!==ey||e0[117]!==eb||e0[118]!==ex||e0[119]!==ew||e0[120]!==ev||e0[121]!==eC||e0[122]!==eB||e0[123]!==eS||e0[124]!==ek||e0[125]!==eE||e0[126]!==eF||e0[127]!==eT||e0[128]!==eU||e0[129]!==eI||e0[130]!==eQ||e0[131]!==ej||e0[132]!==eL||e0[133]!==e_||e0[134]!==eP||e0[135]!==n||e0[136]!==eD||e0[137]!==eR||e0[138]!==eM||e0[139]!==eO||e0[140]!==eN||e0[141]!==eH||e0[142]!==eV||e0[143]!==eK||e0[144]!==eG||e0[145]!==eW||e0[146]!==i||e0[147]!==e$||e0[148]!==eq||e0[149]!==eX||e0[150]!==eY||e0[151]!==eJ||e0[152]!==a||e0[153]!==o||e0[154]!==ea||e0[155]!==eo?(eZ=(0,s.jsxs)(s.Fragment,{children:[e1,t,r,n,i,a,o,ea,eo,es,eA,el,ec,ed,eu,eh,ep,em,ef,eg,ey,eb,ex,ew,ev,eC,eB,eS,ek,eE,eF,eT,eU,eI,eQ,ej,eL,e_,eP,eD,eR,eM,eO,eN,eH,eV,eK,eG,eW,e$,eq,eX,eY,eJ]}),e0[104]=e1,e0[105]=es,e0[106]=eA,e0[107]=el,e0[108]=ec,e0[109]=ed,e0[110]=eu,e0[111]=eh,e0[112]=ep,e0[113]=em,e0[114]=ef,e0[115]=eg,e0[116]=ey,e0[
64117]=eb,e0[118]=ex,e0[119]=ew,e0[120]=ev,e0[121]=eC,e0[122]=eB,e0[123]=eS,e0[124]=ek,e0[125]=eE,e0[126]=eF,e0[127]=eT,e0[128]=eU,e0[129]=eI,e0[130]=eQ,e0[131]=ej,e0[132]=eL,e0[133]=e_,e0[134]=eP,e0[135]=n,e0[136]=eD,e0[137]=eR,e0[138]=eM,e0[139]=eO,e0[140]=eN,e0[141]=eH,e0[142]=eV,e0[143]=eK,e0[144]=eG,e0[145]=eW,e0[146]=i,e0[147]=e$,e0[148]=eq,e0[149]=eX,e0[150]=eY,e0[151]=eJ,e0[152]=a,e0[153]=o,e0[154]=ea,e0[155]=eo,e0[156]=eZ):eZ=e0[156],eZ}e.i(929009);var tN=e.i(967219),tH=e.i(487251),tV=e.i(37770);e.s(["UserTradingDataProvider",0,e=>{let t,r,n,i=(0,A.c)(7),{children:a}=e,{address:o,status:l}=(0,ez.useAuthStore)(),{clearUserTradingData:c}=(0,ez.useUserTradingDataStore)();return(0,tN.useAccountSummary)(),(0,tH.useReferralSummary)(),(0,tV.useUserFees)(),i[0]!==o||i[1]!==c||i[2]!==l?(t=()=>{"disconnected"===l&&"0x0000000000000000000000000000000000000000"===o&&c()},r=[l,o,c],i[0]=o,i[1]=c,i[2]=l,i[3]=t,i[4]=r):(t=i[3],r=i[4]),(0,ea.useEffect)(t,r),i[5]!==a?(n=(0,s.jsx)(s.Fragment,{children:a}),i[5]=a,i[6]=n):n=i[6],n}],303723);var tK=e.i(44867),tG=e.i(118925),tW=e.i(868873),tz=e.i(421241);e.i(842917);var t$=e.i(68043);e.s(["EligibiltyProvider",0,e=>{let t,r,n,i=(0,A.c)(12),{children:a}=e,{address:o,status:l}=(0,ez.useAuthStore)(),{fetchUserMetadata:c}=(0,tK.useUserMetadata)(),{fetchLegalTermsStatus:d}=(0,tG.useLegalTerms)(),{fetchPointsHistory:u}=(0,tW.usePointsHistory)(),{isUserMetadataLoading:h}=(0,ez.useAuthStore)(),p=o&&"0x0000000000000000000000000000000000000000"!==o&&"disconnected"!==l;if(i[0]!==o||i[1]!==d||i[2]!==u||i[3]!==c||i[4]!==p?(t=()=>{p&&(c(o),d(o),t$.isMainnet&&u(o))},i[0]=o,i[1]=d,i[2]=u,i[3]=c,i[4]=p,i[5]=t):t=i[5],i[6]!==o||i[7]!==l?(r=[o,l],i[6]=o,i[7]=l,i[8]=r):r=i[8],(0,ea.useEffect)(t,r),h&&p){let e;return i[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(es.Box,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)(tz.default,{})}),i[9]=e):e=i[9],e}return i[10]!==a?(n=(0,s.jsx)(s.Fragment,{children:a}),i[10]=a,i[11]=n):n=i[11],n}],815824);var tq=e.i(756080);let tX=["/join-waitlist"],tY=["/explorer"],tJ="/invest";function tZ(e){return e.clearEggs}function t0(e){return e.markScratched}function t1(e){return e.markDiscovered}function t2(e){return e.dismissCard}function t4(e){return e.fetchEggs}function t3(e){return e.activeEgg}function t5(e){return e.status}function t6(e){return e.address}e.s(["AccessGuard",0,function(e){let t,r,n,i,a,o,l,c=(0,A.c)(26),{children:d}=e,u=(0,eo.usePathname)(),h=(0,eo.useRouter)(),p=(0,ea.useRef)(!1);c[0]!==u?(t=function(e){if(tX.includes(e))return!0;for(let t of tY)if(e.startsWith(t))return!0;return!!e.startsWith("/join/")}(u),c[0]=u,c[1]=t):t=c[1];let m=t,{canAccess:f,isLoading:g,featureFlags:y}=(0,tq.useCanAccessPlatform)();if(c[2]!==f||c[3]!==y||c[4]!==u)r=f&&!y.invest&&(u===tJ||u.startsWith(`${tJ}/`)),c[2]=f,c[3]=y,c[4]=u,c[5]=r;else r=c[5];let b=r;if(c[6]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{p.current=!1},c[6]=n):n=c[6],c[7]!==u?(i=[u],c[7]=u,c[8]=i):i=c[8],(0,ea.useEffect)(n,i),c[9]!==b||c[10]!==m||c[11]!==g||c[12]!==h?(a=()=>{m||g||p.current||b&&(p.current=!0,h.replace("/trade"))},c[9]=b,c[10]=m,c[11]=g,c[12]=h,c[13]=a):a=c[13],c[14]!==f||c[15]!==b||c[16]!==m||c[17]!==g||c[18]!==h?(o=[b,m,g,f,h],c[14]=f,c[15]=b,c[16]=m,c[17]=g,c[18]=h,c[19]=o):o=c[19],(0,ea.useEffect)(a,o),m){let e;return c[20]!==d?(e=(0,s.jsx)(s.Fragment,{children:d}),c[20]=d,c[21]=e):e=c[21],e}if(g){let e;return c[22]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(es.Box,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)(tz.default,{})}),c[22]=e):e=c[22],e}if(b){let e;return c[23]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(es.Box,{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)(tz.default,{})}),c[23]=e):e=c[23],e}return c[24]!==d?(l=(0,s.jsx)(s.Fragment,{children:d}),c[24]=d,c[25]=l):l=c[25],l}],676427),e.i(818279),e.i(736837),e.s(["EasterEggProvider",0,function(e){let t,r,n,i=(0,A.c)(8),{children:a}=e,o=(0,ez.useAuthStore)(t6),l=(0,ez.useAuthStore)(t5);(0,ez.useEasterStore)(t3);let c=(0,ez.useEasterStore)(t4);(0,ez.useEasterStore)(t2),(0,ez.useEasterStore)(t1),(0,ez.useEasterStore)(t0);let d=(0,ez.useEasterStore)(tZ);return i[0]!==o||i[1]!==d||i[2]!==c||i[3]!==l?(t=()=>{"trading-enabled"===l&&o?c(o):d()},r=[o,l,c,d],i[0]=o,i[1]=d,i[2]=c,i[3]=l,i[4]=t,i[5]=r):(t=i[4],r=i[5]),(0,ea.useEffect)(t,r),i[6]!==a?(n=(0,s.jsx)(s.Fragment,{children:a}),i[6]=a,i[7]=n):n=i[7],n}],536350)},730603,e=>{"use strict";e.s([]),e.i(928376),e.i(366181),e.i(513417),e.i(446243),e.i(303723),e.i(815824),e.i(676427),e.i(536350),e.i(38355)}]); 65
66//# debugId=52cfd78e-905e-3e4e-2711-7c21b858eff8 67//# sourceMappingURL=0x2-ule6vj-fj.js.map
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.