@wormhole-foundation/wormhole-connect 0.2.5-beta.1-development → 0.2.5-beta.2-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -498,7 +498,7 @@ ${Cn}`)}if(Zn){const Cn=getTokenDecimals(wh.toChainId(Dt.toChain),"native");mn=t
498
498
  animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
499
499
  `),indeterminate2Keyframe)),LinearProgress=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiLinearProgress"}),{className:yt,color:Dt="primary",value:sn,valueBuffer:ln,variant:mn="indeterminate"}=pt,hn=_objectWithoutPropertiesLoose(pt,_excluded$h),yn=_extends({},pt,{color:Dt,variant:mn}),Zn=useUtilityClasses$e(yn),Cn=useTheme(),Qn={},Fn={bar1:{},bar2:{}};if((mn==="determinate"||mn==="buffer")&&sn!==void 0){Qn["aria-valuenow"]=Math.round(sn),Qn["aria-valuemin"]=0,Qn["aria-valuemax"]=100;let Hn=sn-100;Cn.direction==="rtl"&&(Hn=-Hn),Fn.bar1.transform=`translateX(${Hn}%)`}if(mn==="buffer"&&ln!==void 0){let Hn=(ln||0)-100;Cn.direction==="rtl"&&(Hn=-Hn),Fn.bar2.transform=`translateX(${Hn}%)`}return jsxRuntimeExports.jsxs(LinearProgressRoot,_extends({className:clsx(Zn.root,yt),ownerState:yn,role:"progressbar"},Qn,{ref:ht},hn,{children:[mn==="buffer"?jsxRuntimeExports.jsx(LinearProgressDashed,{className:Zn.dashed,ownerState:yn}):null,jsxRuntimeExports.jsx(LinearProgressBar1,{className:Zn.bar1,ownerState:yn,style:Fn.bar1}),mn==="determinate"?null:jsxRuntimeExports.jsx(LinearProgressBar2,{className:Zn.bar2,ownerState:yn,style:Fn.bar2})]}))}),LinearProgress$1=LinearProgress;function getLinkUtilityClass(it){return generateUtilityClass("MuiLink",it)}const linkClasses=generateUtilityClasses("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),linkClasses$1=linkClasses,colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=it=>colorTransformations[it]||it,getTextDecoration=({theme:it,ownerState:dt})=>{const ht=transformDeprecatedColors(dt.color),pt=getPath(it,`palette.${ht}`,!1)||dt.color,yt=getPath(it,`palette.${ht}Channel`);return"vars"in it&&yt?`rgba(${yt} / 0.4)`:alpha(pt,.4)},getTextDecoration$1=getTextDecoration,_excluded$g=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],useUtilityClasses$d=it=>{const{classes:dt,component:ht,focusVisible:pt,underline:yt}=it,Dt={root:["root",`underline${capitalize$1(yt)}`,ht==="button"&&"button",pt&&"focusVisible"]};return composeClasses(Dt,getLinkUtilityClass,dt)},LinkRoot=styled$1(Typography$1,{name:"MuiLink",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.root,dt[`underline${capitalize$1(ht.underline)}`],ht.component==="button"&&dt.button]}})(({theme:it,ownerState:dt})=>_extends({},dt.underline==="none"&&{textDecoration:"none"},dt.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},dt.underline==="always"&&_extends({textDecoration:"underline"},dt.color!=="inherit"&&{textDecorationColor:getTextDecoration$1({theme:it,ownerState:dt})},{"&:hover":{textDecorationColor:"inherit"}}),dt.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${linkClasses$1.focusVisible}`]:{outline:"auto"}})),Link=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiLink"}),{className:yt,color:Dt="primary",component:sn="a",onBlur:ln,onFocus:mn,TypographyClasses:hn,underline:yn="always",variant:Zn="inherit",sx:Cn}=pt,Qn=_objectWithoutPropertiesLoose(pt,_excluded$g),{isFocusVisibleRef:Fn,onBlur:Hn,onFocus:Yn,ref:er}=useIsFocusVisible(),[Kn,Xn]=reactExports.useState(!1),fr=useForkRef(ht,er),or=Wn=>{Hn(Wn),Fn.current===!1&&Xn(!1),ln&&ln(Wn)},ar=Wn=>{Yn(Wn),Fn.current===!0&&Xn(!0),mn&&mn(Wn)},jn=_extends({},pt,{color:Dt,component:sn,focusVisible:Kn,underline:yn,variant:Zn}),cr=useUtilityClasses$d(jn);return jsxRuntimeExports.jsx(LinkRoot,_extends({color:Dt,className:clsx(cr.root,yt),classes:hn,component:sn,onBlur:or,onFocus:ar,ref:fr,ownerState:jn,variant:Zn,sx:[...Object.keys(colorTransformations).includes(Dt)?[]:[{color:Dt}],...Array.isArray(Cn)?Cn:[Cn]]},Qn))}),Link$1=Link,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(it){return generateUtilityClass("MuiList",it)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const _excluded$f=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$c=it=>{const{classes:dt,disablePadding:ht,dense:pt,subheader:yt}=it;return composeClasses({root:["root",!ht&&"padding",pt&&"dense",yt&&"subheader"]},getListUtilityClass,dt)},ListRoot=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.root,!ht.disablePadding&&dt.padding,ht.dense&&dt.dense,ht.subheader&&dt.subheader]}})(({ownerState:it})=>_extends({listStyle:"none",margin:0,padding:0,position:"relative"},!it.disablePadding&&{paddingTop:8,paddingBottom:8},it.subheader&&{paddingTop:0})),List=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiList"}),{children:yt,className:Dt,component:sn="ul",dense:ln=!1,disablePadding:mn=!1,subheader:hn}=pt,yn=_objectWithoutPropertiesLoose(pt,_excluded$f),Zn=reactExports.useMemo(()=>({dense:ln}),[ln]),Cn=_extends({},pt,{component:sn,dense:ln,disablePadding:mn}),Qn=useUtilityClasses$c(Cn);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Zn,children:jsxRuntimeExports.jsxs(ListRoot,_extends({as:sn,className:clsx(Qn.root,Dt),ref:ht,ownerState:Cn},yn,{children:[hn,yt]}))})}),List$1=List,listItemIconClasses=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,listItemTextClasses=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$e=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(it,dt,ht){return it===dt?it.firstChild:dt&&dt.nextElementSibling?dt.nextElementSibling:ht?null:it.firstChild}function previousItem$1(it,dt,ht){return it===dt?ht?it.firstChild:it.lastChild:dt&&dt.previousElementSibling?dt.previousElementSibling:ht?null:it.lastChild}function textCriteriaMatches(it,dt){if(dt===void 0)return!0;let ht=it.innerText;return ht===void 0&&(ht=it.textContent),ht=ht.trim().toLowerCase(),ht.length===0?!1:dt.repeating?ht[0]===dt.keys[0]:ht.indexOf(dt.keys.join(""))===0}function moveFocus$1(it,dt,ht,pt,yt,Dt){let sn=!1,ln=yt(it,dt,dt?ht:!1);for(;ln;){if(ln===it.firstChild){if(sn)return!1;sn=!0}const mn=pt?!1:ln.disabled||ln.getAttribute("aria-disabled")==="true";if(!ln.hasAttribute("tabindex")||!textCriteriaMatches(ln,Dt)||mn)ln=yt(it,ln,ht);else return ln.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function it(dt,ht){const{actions:pt,autoFocus:yt=!1,autoFocusItem:Dt=!1,children:sn,className:ln,disabledItemsFocusable:mn=!1,disableListWrap:hn=!1,onKeyDown:yn,variant:Zn="selectedMenu"}=dt,Cn=_objectWithoutPropertiesLoose(dt,_excluded$e),Qn=reactExports.useRef(null),Fn=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{yt&&Qn.current.focus()},[yt]),reactExports.useImperativeHandle(pt,()=>({adjustStyleForScrollbar:(Xn,fr)=>{const or=!Qn.current.style.width;if(Xn.clientHeight<Qn.current.clientHeight&&or){const ar=`${getScrollbarSize(ownerDocument(Xn))}px`;Qn.current.style[fr.direction==="rtl"?"paddingLeft":"paddingRight"]=ar,Qn.current.style.width=`calc(100% + ${ar})`}return Qn.current}}),[]);const Hn=Xn=>{const fr=Qn.current,or=Xn.key,ar=ownerDocument(fr).activeElement;if(or==="ArrowDown")Xn.preventDefault(),moveFocus$1(fr,ar,hn,mn,nextItem$1);else if(or==="ArrowUp")Xn.preventDefault(),moveFocus$1(fr,ar,hn,mn,previousItem$1);else if(or==="Home")Xn.preventDefault(),moveFocus$1(fr,null,hn,mn,nextItem$1);else if(or==="End")Xn.preventDefault(),moveFocus$1(fr,null,hn,mn,previousItem$1);else if(or.length===1){const jn=Fn.current,cr=or.toLowerCase(),Wn=performance.now();jn.keys.length>0&&(Wn-jn.lastTime>500?(jn.keys=[],jn.repeating=!0,jn.previousKeyMatched=!0):jn.repeating&&cr!==jn.keys[0]&&(jn.repeating=!1)),jn.lastTime=Wn,jn.keys.push(cr);const hr=ar&&!jn.repeating&&textCriteriaMatches(ar,jn);jn.previousKeyMatched&&(hr||moveFocus$1(fr,ar,!1,mn,nextItem$1,jn))?Xn.preventDefault():jn.previousKeyMatched=!1}yn&&yn(Xn)},Yn=useForkRef(Qn,ht);let er=-1;reactExports.Children.forEach(sn,(Xn,fr)=>{if(!reactExports.isValidElement(Xn)){er===fr&&(er+=1,er>=sn.length&&(er=-1));return}Xn.props.disabled||(Zn==="selectedMenu"&&Xn.props.selected||er===-1)&&(er=fr),er===fr&&(Xn.props.disabled||Xn.props.muiSkipListHighlight||Xn.type.muiSkipListHighlight)&&(er+=1,er>=sn.length&&(er=-1))});const Kn=reactExports.Children.map(sn,(Xn,fr)=>{if(fr===er){const or={};return Dt&&(or.autoFocus=!0),Xn.props.tabIndex===void 0&&Zn==="selectedMenu"&&(or.tabIndex=0),reactExports.cloneElement(Xn,or)}return Xn});return jsxRuntimeExports.jsx(List$1,_extends({role:"menu",ref:Yn,className:ln,onKeyDown:Hn,tabIndex:yt?0:-1},Cn,{children:Kn}))}),MenuList$1=MenuList;function getPopoverUtilityClass(it){return generateUtilityClass("MuiPopover",it)}generateUtilityClasses("MuiPopover",["root","paper"]);const _excluded$d=["onEntering"],_excluded2$2=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3=["slotProps"];function getOffsetTop(it,dt){let ht=0;return typeof dt=="number"?ht=dt:dt==="center"?ht=it.height/2:dt==="bottom"&&(ht=it.height),ht}function getOffsetLeft(it,dt){let ht=0;return typeof dt=="number"?ht=dt:dt==="center"?ht=it.width/2:dt==="right"&&(ht=it.width),ht}function getTransformOriginValue(it){return[it.horizontal,it.vertical].map(dt=>typeof dt=="number"?`${dt}px`:dt).join(" ")}function resolveAnchorEl(it){return typeof it=="function"?it():it}const useUtilityClasses$b=it=>{const{classes:dt}=it;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,dt)},PopoverRoot=styled$1(Modal$2,{name:"MuiPopover",slot:"Root",overridesResolver:(it,dt)=>dt.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(it,dt)=>dt.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function it(dt,ht){var pt,yt,Dt;const sn=useThemeProps({props:dt,name:"MuiPopover"}),{action:ln,anchorEl:mn,anchorOrigin:hn={vertical:"top",horizontal:"left"},anchorPosition:yn,anchorReference:Zn="anchorEl",children:Cn,className:Qn,container:Fn,elevation:Hn=8,marginThreshold:Yn=16,open:er,PaperProps:Kn={},slots:Xn,slotProps:fr,transformOrigin:or={vertical:"top",horizontal:"left"},TransitionComponent:ar=Grow$1,transitionDuration:jn="auto",TransitionProps:{onEntering:cr}={},disableScrollLock:Wn=!1}=sn,hr=_objectWithoutPropertiesLoose(sn.TransitionProps,_excluded$d),ur=_objectWithoutPropertiesLoose(sn,_excluded2$2),Gn=(pt=fr==null?void 0:fr.paper)!=null?pt:Kn,Un=reactExports.useRef(),ir=useForkRef(Un,Gn.ref),pr=_extends({},sn,{anchorOrigin:hn,anchorReference:Zn,elevation:Hn,marginThreshold:Yn,externalPaperSlotProps:Gn,transformOrigin:or,TransitionComponent:ar,transitionDuration:jn,TransitionProps:hr}),sr=useUtilityClasses$b(pr),Ar=reactExports.useCallback(()=>{if(Zn==="anchorPosition")return yn;const ts=resolveAnchorEl(mn),hs=(ts&&ts.nodeType===1?ts:ownerDocument(Un.current).body).getBoundingClientRect();return{top:hs.top+getOffsetTop(hs,hn.vertical),left:hs.left+getOffsetLeft(hs,hn.horizontal)}},[mn,hn.horizontal,hn.vertical,yn,Zn]),br=reactExports.useCallback(ts=>({vertical:getOffsetTop(ts,or.vertical),horizontal:getOffsetLeft(ts,or.horizontal)}),[or.horizontal,or.vertical]),wr=reactExports.useCallback(ts=>{const uo={width:ts.offsetWidth,height:ts.offsetHeight},hs=br(uo);if(Zn==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue(hs)};const ao=Ar();let wo=ao.top-hs.vertical,Eo=ao.left-hs.horizontal;const Oo=wo+uo.height,Fr=Eo+uo.width,qo=ownerWindow(resolveAnchorEl(mn)),Bo=qo.innerHeight-Yn,ga=qo.innerWidth-Yn;if(Yn!==null&&wo<Yn){const Xo=wo-Yn;wo-=Xo,hs.vertical+=Xo}else if(Yn!==null&&Oo>Bo){const Xo=Oo-Bo;wo-=Xo,hs.vertical+=Xo}if(Yn!==null&&Eo<Yn){const Xo=Eo-Yn;Eo-=Xo,hs.horizontal+=Xo}else if(Fr>ga){const Xo=Fr-ga;Eo-=Xo,hs.horizontal+=Xo}return{top:`${Math.round(wo)}px`,left:`${Math.round(Eo)}px`,transformOrigin:getTransformOriginValue(hs)}},[mn,Zn,Ar,br,Yn]),[Jn,rr]=reactExports.useState(er),_r=reactExports.useCallback(()=>{const ts=Un.current;if(!ts)return;const uo=wr(ts);uo.top!==null&&(ts.style.top=uo.top),uo.left!==null&&(ts.style.left=uo.left),ts.style.transformOrigin=uo.transformOrigin,rr(!0)},[wr]);reactExports.useEffect(()=>(Wn&&window.addEventListener("scroll",_r),()=>window.removeEventListener("scroll",_r)),[mn,Wn,_r]);const yr=(ts,uo)=>{cr&&cr(ts,uo),_r()},Er=()=>{rr(!1)};reactExports.useEffect(()=>{er&&_r()}),reactExports.useImperativeHandle(ln,()=>er?{updatePosition:()=>{_r()}}:null,[er,_r]),reactExports.useEffect(()=>{if(!er)return;const ts=debounce$1(()=>{_r()}),uo=ownerWindow(mn);return uo.addEventListener("resize",ts),()=>{ts.clear(),uo.removeEventListener("resize",ts)}},[mn,er,_r]);let Ir=jn;jn==="auto"&&!ar.muiSupportAuto&&(Ir=void 0);const Hr=Fn||(mn?ownerDocument(resolveAnchorEl(mn)).body:void 0),Vr=(yt=Xn==null?void 0:Xn.root)!=null?yt:PopoverRoot,ro=(Dt=Xn==null?void 0:Xn.paper)!=null?Dt:PopoverPaper,po=useSlotProps({elementType:ro,externalSlotProps:_extends({},Gn,{style:Jn?Gn.style:_extends({},Gn.style,{opacity:0})}),additionalProps:{elevation:Hn,ref:ir},ownerState:pr,className:clsx(sr.paper,Gn==null?void 0:Gn.className)}),No=useSlotProps({elementType:Vr,externalSlotProps:(fr==null?void 0:fr.root)||{},externalForwardedProps:ur,additionalProps:{ref:ht,slotProps:{backdrop:{invisible:!0}},container:Hr,open:er},ownerState:pr,className:clsx(sr.root,Qn)}),{slotProps:Ho}=No,Do=_objectWithoutPropertiesLoose(No,_excluded3);return jsxRuntimeExports.jsx(Vr,_extends({},Do,!isHostComponent(Vr)&&{slotProps:Ho,disableScrollLock:Wn},{children:jsxRuntimeExports.jsx(ar,_extends({appear:!0,in:er,onEntering:yr,onExited:Er,timeout:Ir},hr,{children:jsxRuntimeExports.jsx(ro,_extends({},po,{children:Cn}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(it){return generateUtilityClass("MuiMenu",it)}generateUtilityClasses("MuiMenu",["root","paper","list"]);const _excluded$c=["onEntering"],_excluded2$1=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$a=it=>{const{classes:dt}=it;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,dt)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:it=>rootShouldForwardProp(it)||it==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(it,dt)=>dt.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(it,dt)=>dt.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(it,dt)=>dt.list})({outline:0}),Menu$1=reactExports.forwardRef(function it(dt,ht){var pt,yt;const Dt=useThemeProps({props:dt,name:"MuiMenu"}),{autoFocus:sn=!0,children:ln,className:mn,disableAutoFocusItem:hn=!1,MenuListProps:yn={},onClose:Zn,open:Cn,PaperProps:Qn={},PopoverClasses:Fn,transitionDuration:Hn="auto",TransitionProps:{onEntering:Yn}={},variant:er="selectedMenu",slots:Kn={},slotProps:Xn={}}=Dt,fr=_objectWithoutPropertiesLoose(Dt.TransitionProps,_excluded$c),or=_objectWithoutPropertiesLoose(Dt,_excluded2$1),ar=useTheme(),jn=ar.direction==="rtl",cr=_extends({},Dt,{autoFocus:sn,disableAutoFocusItem:hn,MenuListProps:yn,onEntering:Yn,PaperProps:Qn,transitionDuration:Hn,TransitionProps:fr,variant:er}),Wn=useUtilityClasses$a(cr),hr=sn&&!hn&&Cn,ur=reactExports.useRef(null),Gn=(wr,Jn)=>{ur.current&&ur.current.adjustStyleForScrollbar(wr,ar),Yn&&Yn(wr,Jn)},Un=wr=>{wr.key==="Tab"&&(wr.preventDefault(),Zn&&Zn(wr,"tabKeyDown"))};let ir=-1;reactExports.Children.map(ln,(wr,Jn)=>{reactExports.isValidElement(wr)&&(wr.props.disabled||(er==="selectedMenu"&&wr.props.selected||ir===-1)&&(ir=Jn))});const pr=(pt=Kn.paper)!=null?pt:MenuPaper,sr=(yt=Xn.paper)!=null?yt:Qn,Ar=useSlotProps({elementType:Kn.root,externalSlotProps:Xn.root,ownerState:cr,className:[Wn.root,mn]}),br=useSlotProps({elementType:pr,externalSlotProps:sr,ownerState:cr,className:Wn.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends({onClose:Zn,anchorOrigin:{vertical:"bottom",horizontal:jn?"right":"left"},transformOrigin:jn?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:pr,root:Kn.root},slotProps:{root:Ar,paper:br},open:Cn,ref:ht,transitionDuration:Hn,TransitionProps:_extends({onEntering:Gn},fr),ownerState:cr},or,{classes:Fn,children:jsxRuntimeExports.jsx(MenuMenuList,_extends({onKeyDown:Un,actions:ur,autoFocus:sn&&(ir===-1||hn),autoFocusItem:hr,variant:er},yn,{className:clsx(Wn.list,yn.className),children:ln}))}))}),Menu$2=Menu$1;function getMenuItemUtilityClass(it){return generateUtilityClass("MuiMenuItem",it)}const menuItemClasses=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$b=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver=(it,dt)=>{const{ownerState:ht}=it;return[dt.root,ht.dense&&dt.dense,ht.divider&&dt.divider,!ht.disableGutters&&dt.gutters]},useUtilityClasses$9=it=>{const{disabled:dt,dense:ht,divider:pt,disableGutters:yt,selected:Dt,classes:sn}=it,mn=composeClasses({root:["root",ht&&"dense",dt&&"disabled",!yt&&"gutters",pt&&"divider",Dt&&"selected"]},getMenuItemUtilityClass,sn);return _extends({},sn,mn)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:it=>rootShouldForwardProp(it)||it==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver})(({theme:it,ownerState:dt})=>_extends({},it.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!dt.disableGutters&&{paddingLeft:16,paddingRight:16},dt.divider&&{borderBottom:`1px solid ${(it.vars||it).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(it.vars||it).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:it.vars?`rgba(${it.vars.palette.primary.mainChannel} / ${it.vars.palette.action.selectedOpacity})`:alpha(it.palette.primary.main,it.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:it.vars?`rgba(${it.vars.palette.primary.mainChannel} / calc(${it.vars.palette.action.selectedOpacity} + ${it.vars.palette.action.focusOpacity}))`:alpha(it.palette.primary.main,it.palette.action.selectedOpacity+it.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:it.vars?`rgba(${it.vars.palette.primary.mainChannel} / calc(${it.vars.palette.action.selectedOpacity} + ${it.vars.palette.action.hoverOpacity}))`:alpha(it.palette.primary.main,it.palette.action.selectedOpacity+it.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:it.vars?`rgba(${it.vars.palette.primary.mainChannel} / ${it.vars.palette.action.selectedOpacity})`:alpha(it.palette.primary.main,it.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(it.vars||it).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(it.vars||it).palette.action.disabledOpacity},[`& + .${dividerClasses$1.root}`]:{marginTop:it.spacing(1),marginBottom:it.spacing(1)},[`& + .${dividerClasses$1.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!dt.dense&&{[it.breakpoints.up("sm")]:{minHeight:"auto"}},dt.dense&&_extends({minHeight:32,paddingTop:4,paddingBottom:4},it.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiMenuItem"}),{autoFocus:yt=!1,component:Dt="li",dense:sn=!1,divider:ln=!1,disableGutters:mn=!1,focusVisibleClassName:hn,role:yn="menuitem",tabIndex:Zn,className:Cn}=pt,Qn=_objectWithoutPropertiesLoose(pt,_excluded$b),Fn=reactExports.useContext(ListContext$1),Hn=reactExports.useMemo(()=>({dense:sn||Fn.dense||!1,disableGutters:mn}),[Fn.dense,sn,mn]),Yn=reactExports.useRef(null);useEnhancedEffect$1(()=>{yt&&Yn.current&&Yn.current.focus()},[yt]);const er=_extends({},pt,{dense:Hn.dense,divider:ln,disableGutters:mn}),Kn=useUtilityClasses$9(pt),Xn=useForkRef(Yn,ht);let fr;return pt.disabled||(fr=Zn!==void 0?Zn:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:Hn,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends({ref:Xn,role:yn,tabIndex:fr,component:Dt,focusVisibleClassName:clsx(Kn.focusVisible,hn),className:clsx(Kn.root,Cn)},Qn,{ownerState:er,classes:Kn}))})}),MenuItem$1=MenuItem;function getNativeSelectUtilityClasses(it){return generateUtilityClass("MuiNativeSelect",it)}const nativeSelectClasses=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$a=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$8=it=>{const{classes:dt,variant:ht,disabled:pt,multiple:yt,open:Dt,error:sn}=it,ln={select:["select",ht,pt&&"disabled",yt&&"multiple",sn&&"error"],icon:["icon",`icon${capitalize$1(ht)}`,Dt&&"iconOpen",pt&&"disabled"]};return composeClasses(ln,getNativeSelectUtilityClasses,dt)},nativeSelectSelectStyles=({ownerState:it,theme:dt})=>_extends({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends({},dt.vars?{backgroundColor:`rgba(${dt.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:dt.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(dt.vars||dt).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},it.variant==="filled"&&{"&&&":{paddingRight:32}},it.variant==="outlined"&&{borderRadius:(dt.vars||dt).shape.borderRadius,"&:focus":{borderRadius:(dt.vars||dt).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.select,dt[ht.variant],ht.error&&dt.error,{[`&.${nativeSelectClasses$1.multiple}`]:dt.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:it,theme:dt})=>_extends({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(dt.vars||dt).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(dt.vars||dt).palette.action.disabled}},it.open&&{transform:"rotate(180deg)"},it.variant==="filled"&&{right:7},it.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.icon,ht.variant&&dt[`icon${capitalize$1(ht.variant)}`],ht.open&&dt.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function it(dt,ht){const{className:pt,disabled:yt,error:Dt,IconComponent:sn,inputRef:ln,variant:mn="standard"}=dt,hn=_objectWithoutPropertiesLoose(dt,_excluded$a),yn=_extends({},dt,{disabled:yt,variant:mn,error:Dt}),Zn=useUtilityClasses$8(yn);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends({ownerState:yn,className:clsx(Zn.select,pt),disabled:yt,ref:ln||ht},hn)),dt.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:sn,ownerState:yn,className:Zn.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$9=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend")(({ownerState:it,theme:dt})=>_extends({float:"unset",width:"auto",overflow:"hidden"},!it.withLabel&&{padding:0,lineHeight:"11px",transition:dt.transitions.create("width",{duration:150,easing:dt.transitions.easing.easeOut})},it.withLabel&&_extends({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:dt.transitions.create("max-width",{duration:50,easing:dt.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},it.notched&&{maxWidth:"100%",transition:dt.transitions.create("max-width",{duration:100,easing:dt.transitions.easing.easeOut,delay:50})})));function NotchedOutline(it){const{className:dt,label:ht,notched:pt}=it,yt=_objectWithoutPropertiesLoose(it,_excluded$9),Dt=ht!=null&&ht!=="",sn=_extends({},it,{notched:pt,withLabel:Dt});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends({"aria-hidden":!0,className:dt,ownerState:sn},yt,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:sn,children:Dt?jsxRuntimeExports.jsx("span",{children:ht}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$8=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$7=it=>{const{classes:dt}=it,pt=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,dt);return _extends({},dt,pt)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:it=>rootShouldForwardProp(it)||it==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:it,ownerState:dt})=>{const ht=it.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends({position:"relative",borderRadius:(it.vars||it).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(it.vars||it).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:it.vars?`rgba(${it.vars.palette.common.onBackgroundChannel} / 0.23)`:ht}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(it.vars||it).palette[dt.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(it.vars||it).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(it.vars||it).palette.action.disabled}},dt.startAdornment&&{paddingLeft:14},dt.endAdornment&&{paddingRight:14},dt.multiline&&_extends({padding:"16.5px 14px"},dt.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(it,dt)=>dt.notchedOutline})(({theme:it})=>{const dt=it.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:it.vars?`rgba(${it.vars.palette.common.onBackgroundChannel} / 0.23)`:dt}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:it,ownerState:dt})=>_extends({padding:"16.5px 14px"},!it.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:it.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:it.palette.mode==="light"?null:"#fff",caretColor:it.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},it.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[it.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},dt.size==="small"&&{padding:"8.5px 14px"},dt.multiline&&{padding:0},dt.startAdornment&&{paddingLeft:0},dt.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function it(dt,ht){var pt,yt,Dt,sn,ln;const mn=useThemeProps({props:dt,name:"MuiOutlinedInput"}),{components:hn={},fullWidth:yn=!1,inputComponent:Zn="input",label:Cn,multiline:Qn=!1,notched:Fn,slots:Hn={},type:Yn="text"}=mn,er=_objectWithoutPropertiesLoose(mn,_excluded$8),Kn=useUtilityClasses$7(mn),Xn=useFormControl(),fr=formControlState({props:mn,muiFormControl:Xn,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),or=_extends({},mn,{color:fr.color||"primary",disabled:fr.disabled,error:fr.error,focused:fr.focused,formControl:Xn,fullWidth:yn,hiddenLabel:fr.hiddenLabel,multiline:Qn,size:fr.size,type:Yn}),ar=(pt=(yt=Hn.root)!=null?yt:hn.Root)!=null?pt:OutlinedInputRoot,jn=(Dt=(sn=Hn.input)!=null?sn:hn.Input)!=null?Dt:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends({slots:{root:ar,input:jn},renderSuffix:cr=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:or,className:Kn.notchedOutline,label:Cn!=null&&Cn!==""&&fr.required?ln||(ln=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Cn," ","*"]})):Cn,notched:typeof Fn<"u"?Fn:!!(cr.startAdornment||cr.filled||cr.focused)}),fullWidth:yn,inputComponent:Zn,multiline:Qn,ref:ht,type:Yn},er,{classes:_extends({},Kn,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(it){return generateUtilityClass("MuiSelect",it)}const selectClasses=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$7=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[{[`&.${selectClasses$1.select}`]:dt.select},{[`&.${selectClasses$1.select}`]:dt[ht.variant]},{[`&.${selectClasses$1.error}`]:dt.error},{[`&.${selectClasses$1.multiple}`]:dt.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.icon,ht.variant&&dt[`icon${capitalize$1(ht.variant)}`],ht.open&&dt.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:it=>slotShouldForwardProp(it)&&it!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(it,dt)=>dt.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(it,dt){return typeof dt=="object"&&dt!==null?it===dt:String(it)===String(dt)}function isEmpty(it){return it==null||typeof it=="string"&&!it.trim()}const useUtilityClasses$6=it=>{const{classes:dt,variant:ht,disabled:pt,multiple:yt,open:Dt,error:sn}=it,ln={select:["select",ht,pt&&"disabled",yt&&"multiple",sn&&"error"],icon:["icon",`icon${capitalize$1(ht)}`,Dt&&"iconOpen",pt&&"disabled"],nativeInput:["nativeInput"]};return composeClasses(ln,getSelectUtilityClasses,dt)},SelectInput=reactExports.forwardRef(function it(dt,ht){const{"aria-describedby":pt,"aria-label":yt,autoFocus:Dt,autoWidth:sn,children:ln,className:mn,defaultOpen:hn,defaultValue:yn,disabled:Zn,displayEmpty:Cn,error:Qn=!1,IconComponent:Fn,inputRef:Hn,labelId:Yn,MenuProps:er={},multiple:Kn,name:Xn,onBlur:fr,onChange:or,onClose:ar,onFocus:jn,onOpen:cr,open:Wn,readOnly:hr,renderValue:ur,SelectDisplayProps:Gn={},tabIndex:Un,value:ir,variant:pr="standard"}=dt,sr=_objectWithoutPropertiesLoose(dt,_excluded$7),[Ar,br]=useControlled({controlled:ir,default:yn,name:"Select"}),[wr,Jn]=useControlled({controlled:Wn,default:hn,name:"Select"}),rr=reactExports.useRef(null),_r=reactExports.useRef(null),[yr,Er]=reactExports.useState(null),{current:Ir}=reactExports.useRef(Wn!=null),[Hr,Vr]=reactExports.useState(),ro=useForkRef(ht,Hn),po=reactExports.useCallback(Uo=>{_r.current=Uo,Uo&&Er(Uo)},[]),No=yr==null?void 0:yr.parentNode;reactExports.useImperativeHandle(ro,()=>({focus:()=>{_r.current.focus()},node:rr.current,value:Ar}),[Ar]),reactExports.useEffect(()=>{hn&&wr&&yr&&!Ir&&(Vr(sn?null:No.clientWidth),_r.current.focus())},[yr,sn]),reactExports.useEffect(()=>{Dt&&_r.current.focus()},[Dt]),reactExports.useEffect(()=>{if(!Yn)return;const Uo=ownerDocument(_r.current).getElementById(Yn);if(Uo){const _a=()=>{getSelection().isCollapsed&&_r.current.focus()};return Uo.addEventListener("click",_a),()=>{Uo.removeEventListener("click",_a)}}},[Yn]);const Ho=(Uo,_a)=>{Uo?cr&&cr(_a):ar&&ar(_a),Ir||(Vr(sn?null:No.clientWidth),Jn(Uo))},Do=Uo=>{Uo.button===0&&(Uo.preventDefault(),_r.current.focus(),Ho(!0,Uo))},ts=Uo=>{Ho(!1,Uo)},uo=reactExports.Children.toArray(ln),hs=Uo=>{const _a=uo.find(bs=>bs.props.value===Uo.target.value);_a!==void 0&&(br(_a.props.value),or&&or(Uo,_a))},ao=Uo=>_a=>{let bs;if(_a.currentTarget.hasAttribute("tabindex")){if(Kn){bs=Array.isArray(Ar)?Ar.slice():[];const us=Ar.indexOf(Uo.props.value);us===-1?bs.push(Uo.props.value):bs.splice(us,1)}else bs=Uo.props.value;if(Uo.props.onClick&&Uo.props.onClick(_a),Ar!==bs&&(br(bs),or)){const us=_a.nativeEvent||_a,$s=new us.constructor(us.type,us);Object.defineProperty($s,"target",{writable:!0,value:{value:bs,name:Xn}}),or($s,Uo)}Kn||Ho(!1,_a)}},wo=Uo=>{hr||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Uo.key)!==-1&&(Uo.preventDefault(),Ho(!0,Uo))},Eo=yr!==null&&wr,Oo=Uo=>{!Eo&&fr&&(Object.defineProperty(Uo,"target",{writable:!0,value:{value:Ar,name:Xn}}),fr(Uo))};delete sr["aria-invalid"];let Fr,qo;const Bo=[];let ga=!1;(isFilled({value:Ar})||Cn)&&(ur?Fr=ur(Ar):ga=!0);const Xo=uo.map(Uo=>{if(!reactExports.isValidElement(Uo))return null;let _a;if(Kn){if(!Array.isArray(Ar))throw new Error(formatMuiErrorMessage(2));_a=Ar.some(bs=>areEqualValues(bs,Uo.props.value)),_a&&ga&&Bo.push(Uo.props.children)}else _a=areEqualValues(Ar,Uo.props.value),_a&&ga&&(qo=Uo.props.children);return reactExports.cloneElement(Uo,{"aria-selected":_a?"true":"false",onClick:ao(Uo),onKeyUp:bs=>{bs.key===" "&&bs.preventDefault(),Uo.props.onKeyUp&&Uo.props.onKeyUp(bs)},role:"option",selected:_a,value:void 0,"data-value":Uo.props.value})});ga&&(Kn?Bo.length===0?Fr=null:Fr=Bo.reduce((Uo,_a,bs)=>(Uo.push(_a),bs<Bo.length-1&&Uo.push(", "),Uo),[]):Fr=qo);let Zo=Hr;!sn&&Ir&&yr&&(Zo=No.clientWidth);let Cs;typeof Un<"u"?Cs=Un:Cs=Zn?null:0;const ko=Gn.id||(Xn?`mui-component-select-${Xn}`:void 0),so=_extends({},dt,{variant:pr,value:Ar,open:Eo,error:Qn}),bo=useUtilityClasses$6(so);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(SelectSelect,_extends({ref:po,tabIndex:Cs,role:"button","aria-disabled":Zn?"true":void 0,"aria-expanded":Eo?"true":"false","aria-haspopup":"listbox","aria-label":yt,"aria-labelledby":[Yn,ko].filter(Boolean).join(" ")||void 0,"aria-describedby":pt,onKeyDown:wo,onMouseDown:Zn||hr?null:Do,onBlur:Oo,onFocus:jn},Gn,{ownerState:so,className:clsx(Gn.className,bo.select,mn),id:ko,children:isEmpty(Fr)?_span||(_span=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):Fr})),jsxRuntimeExports.jsx(SelectNativeInput,_extends({"aria-invalid":Qn,value:Array.isArray(Ar)?Ar.join(","):Ar,name:Xn,ref:rr,"aria-hidden":!0,onChange:hs,tabIndex:-1,disabled:Zn,className:bo.nativeInput,autoFocus:Dt,ownerState:so},sr)),jsxRuntimeExports.jsx(SelectIcon,{as:Fn,className:bo.icon,ownerState:so}),jsxRuntimeExports.jsx(Menu$2,_extends({id:`menu-${Xn||""}`,anchorEl:No,open:Eo,onClose:ts,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},er,{MenuListProps:_extends({"aria-labelledby":Yn,role:"listbox",disableListWrap:!0},er.MenuListProps),PaperProps:_extends({},er.PaperProps,{style:_extends({minWidth:Zo},er.PaperProps!=null?er.PaperProps.style:null)}),children:Xo}))]})}),SelectInput$1=SelectInput,_excluded$6=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],_excluded2=["root"],useUtilityClasses$5=it=>{const{classes:dt}=it;return dt},styledRootConfig={name:"MuiSelect",overridesResolver:(it,dt)=>dt.root,shouldForwardProp:it=>rootShouldForwardProp(it)&&it!=="variant",slot:"Root"},StyledInput=styled$1(Input$2,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$1=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({name:"MuiSelect",props:dt}),{autoWidth:yt=!1,children:Dt,classes:sn={},className:ln,defaultOpen:mn=!1,displayEmpty:hn=!1,IconComponent:yn=ArrowDropDownIcon,id:Zn,input:Cn,inputProps:Qn,label:Fn,labelId:Hn,MenuProps:Yn,multiple:er=!1,native:Kn=!1,onClose:Xn,onOpen:fr,open:or,renderValue:ar,SelectDisplayProps:jn,variant:cr="outlined"}=pt,Wn=_objectWithoutPropertiesLoose(pt,_excluded$6),hr=Kn?NativeSelectInput$1:SelectInput$1,ur=useFormControl(),Gn=formControlState({props:pt,muiFormControl:ur,states:["variant","error"]}),Un=Gn.variant||cr,ir=_extends({},pt,{variant:Un,classes:sn}),pr=useUtilityClasses$5(ir),sr=_objectWithoutPropertiesLoose(pr,_excluded2),Ar=Cn||{standard:jsxRuntimeExports.jsx(StyledInput,{ownerState:ir}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:Fn,ownerState:ir}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:ir})}[Un],br=useForkRef(ht,Ar.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(Ar,_extends({inputComponent:hr,inputProps:_extends({children:Dt,error:Gn.error,IconComponent:yn,variant:Un,type:void 0,multiple:er},Kn?{id:Zn}:{autoWidth:yt,defaultOpen:mn,displayEmpty:hn,labelId:Hn,MenuProps:Yn,onClose:Xn,onOpen:fr,open:or,renderValue:ar,SelectDisplayProps:_extends({id:Zn},jn)},Qn,{classes:Qn?deepmerge(sr,Qn.classes):sr},Cn?Cn.props.inputProps:{})},er&&Kn&&Un==="outlined"?{notched:!0}:{},{ref:br,className:clsx(Ar.props.className,ln,pr.root)},!Cn&&{variant:Un},Wn))})});Select$1.muiName="Select";const Select$2=Select$1;function getTooltipUtilityClass(it){return generateUtilityClass("MuiTooltip",it)}const tooltipClasses=generateUtilityClasses("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),tooltipClasses$1=tooltipClasses,_excluded$5=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function round(it){return Math.round(it*1e5)/1e5}const useUtilityClasses$4=it=>{const{classes:dt,disableInteractive:ht,arrow:pt,touch:yt,placement:Dt}=it,sn={popper:["popper",!ht&&"popperInteractive",pt&&"popperArrow"],tooltip:["tooltip",pt&&"tooltipArrow",yt&&"touch",`tooltipPlacement${capitalize$1(Dt.split("-")[0])}`],arrow:["arrow"]};return composeClasses(sn,getTooltipUtilityClass,dt)},TooltipPopper=styled$1(Popper$1,{name:"MuiTooltip",slot:"Popper",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.popper,!ht.disableInteractive&&dt.popperInteractive,ht.arrow&&dt.popperArrow,!ht.open&&dt.popperClose]}})(({theme:it,ownerState:dt,open:ht})=>_extends({zIndex:(it.vars||it).zIndex.tooltip,pointerEvents:"none"},!dt.disableInteractive&&{pointerEvents:"auto"},!ht&&{pointerEvents:"none"},dt.arrow&&{[`&[data-popper-placement*="bottom"] .${tooltipClasses$1.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${tooltipClasses$1.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${tooltipClasses$1.arrow}`]:_extends({},dt.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${tooltipClasses$1.arrow}`]:_extends({},dt.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),TooltipTooltip=styled$1("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.tooltip,ht.touch&&dt.touch,ht.arrow&&dt.tooltipArrow,dt[`tooltipPlacement${capitalize$1(ht.placement.split("-")[0])}`]]}})(({theme:it,ownerState:dt})=>_extends({backgroundColor:it.vars?it.vars.palette.Tooltip.bg:alpha(it.palette.grey[700],.92),borderRadius:(it.vars||it).shape.borderRadius,color:(it.vars||it).palette.common.white,fontFamily:it.typography.fontFamily,padding:"4px 8px",fontSize:it.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:it.typography.fontWeightMedium},dt.arrow&&{position:"relative",margin:0},dt.touch&&{padding:"8px 16px",fontSize:it.typography.pxToRem(14),lineHeight:`${round(16/14)}em`,fontWeight:it.typography.fontWeightRegular},{[`.${tooltipClasses$1.popper}[data-popper-placement*="left"] &`]:_extends({transformOrigin:"right center"},dt.isRtl?_extends({marginLeft:"14px"},dt.touch&&{marginLeft:"24px"}):_extends({marginRight:"14px"},dt.touch&&{marginRight:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="right"] &`]:_extends({transformOrigin:"left center"},dt.isRtl?_extends({marginRight:"14px"},dt.touch&&{marginRight:"24px"}):_extends({marginLeft:"14px"},dt.touch&&{marginLeft:"24px"})),[`.${tooltipClasses$1.popper}[data-popper-placement*="top"] &`]:_extends({transformOrigin:"center bottom",marginBottom:"14px"},dt.touch&&{marginBottom:"24px"}),[`.${tooltipClasses$1.popper}[data-popper-placement*="bottom"] &`]:_extends({transformOrigin:"center top",marginTop:"14px"},dt.touch&&{marginTop:"24px"})})),TooltipArrow=styled$1("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(it,dt)=>dt.arrow})(({theme:it})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:it.vars?it.vars.palette.Tooltip.bg:alpha(it.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let hystersisOpen=!1,hystersisTimer=null,cursorPosition={x:0,y:0};function composeEventHandler(it,dt){return ht=>{dt&&dt(ht),it(ht)}}const Tooltip=reactExports.forwardRef(function it(dt,ht){var pt,yt,Dt,sn,ln,mn,hn,yn,Zn,Cn,Qn,Fn,Hn,Yn,er,Kn,Xn,fr,or;const ar=useThemeProps({props:dt,name:"MuiTooltip"}),{arrow:jn=!1,children:cr,components:Wn={},componentsProps:hr={},describeChild:ur=!1,disableFocusListener:Gn=!1,disableHoverListener:Un=!1,disableInteractive:ir=!1,disableTouchListener:pr=!1,enterDelay:sr=100,enterNextDelay:Ar=0,enterTouchDelay:br=700,followCursor:wr=!1,id:Jn,leaveDelay:rr=0,leaveTouchDelay:_r=1500,onClose:yr,onOpen:Er,open:Ir,placement:Hr="bottom",PopperComponent:Vr,PopperProps:ro={},slotProps:po={},slots:No={},title:Ho,TransitionComponent:Do=Grow$1,TransitionProps:ts}=ar,uo=_objectWithoutPropertiesLoose(ar,_excluded$5),hs=reactExports.isValidElement(cr)?cr:jsxRuntimeExports.jsx("span",{children:cr}),ao=useTheme(),wo=ao.direction==="rtl",[Eo,Oo]=reactExports.useState(),[Fr,qo]=reactExports.useState(null),Bo=reactExports.useRef(!1),ga=ir||wr,Xo=reactExports.useRef(),Zo=reactExports.useRef(),Cs=reactExports.useRef(),ko=reactExports.useRef(),[so,bo]=useControlled({controlled:Ir,default:!1,name:"Tooltip",state:"open"});let Uo=so;const _a=useId(Jn),bs=reactExports.useRef(),us=reactExports.useCallback(()=>{bs.current!==void 0&&(document.body.style.WebkitUserSelect=bs.current,bs.current=void 0),clearTimeout(ko.current)},[]);reactExports.useEffect(()=>()=>{clearTimeout(Xo.current),clearTimeout(Zo.current),clearTimeout(Cs.current),us()},[us]);const $s=Ko=>{clearTimeout(hystersisTimer),hystersisOpen=!0,bo(!0),Er&&!Uo&&Er(Ko)},qs=useEventCallback(Ko=>{clearTimeout(hystersisTimer),hystersisTimer=setTimeout(()=>{hystersisOpen=!1},800+rr),bo(!1),yr&&Uo&&yr(Ko),clearTimeout(Xo.current),Xo.current=setTimeout(()=>{Bo.current=!1},ao.transitions.duration.shortest)}),Es=Ko=>{Bo.current&&Ko.type!=="touchstart"||(Eo&&Eo.removeAttribute("title"),clearTimeout(Zo.current),clearTimeout(Cs.current),sr||hystersisOpen&&Ar?Zo.current=setTimeout(()=>{$s(Ko)},hystersisOpen?Ar:sr):$s(Ko))},vr=Ko=>{clearTimeout(Zo.current),clearTimeout(Cs.current),Cs.current=setTimeout(()=>{qs(Ko)},rr)},{isFocusVisibleRef:$r,onBlur:Sr,onFocus:Nr,ref:qr}=useIsFocusVisible(),[,Br]=reactExports.useState(!1),Mr=Ko=>{Sr(Ko),$r.current===!1&&(Br(!1),vr(Ko))},go=Ko=>{Eo||Oo(Ko.currentTarget),Nr(Ko),$r.current===!0&&(Br(!0),Es(Ko))},Bs=Ko=>{Bo.current=!0;const rs=hs.props;rs.onTouchStart&&rs.onTouchStart(Ko)},$a=Es,Vs=vr,eu=Ko=>{Bs(Ko),clearTimeout(Cs.current),clearTimeout(Xo.current),us(),bs.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ko.current=setTimeout(()=>{document.body.style.WebkitUserSelect=bs.current,Es(Ko)},br)},su=Ko=>{hs.props.onTouchEnd&&hs.props.onTouchEnd(Ko),us(),clearTimeout(Cs.current),Cs.current=setTimeout(()=>{qs(Ko)},_r)};reactExports.useEffect(()=>{if(!Uo)return;function Ko(rs){(rs.key==="Escape"||rs.key==="Esc")&&qs(rs)}return document.addEventListener("keydown",Ko),()=>{document.removeEventListener("keydown",Ko)}},[qs,Uo]);const Yu=useForkRef(hs.ref,qr,Oo,ht);!Ho&&Ho!==0&&(Uo=!1);const Ws=reactExports.useRef(),au=Ko=>{const rs=hs.props;rs.onMouseMove&&rs.onMouseMove(Ko),cursorPosition={x:Ko.clientX,y:Ko.clientY},Ws.current&&Ws.current.update()},Wo={},Vo=typeof Ho=="string";ur?(Wo.title=!Uo&&Vo&&!Un?Ho:null,Wo["aria-describedby"]=Uo?_a:null):(Wo["aria-label"]=Vo?Ho:null,Wo["aria-labelledby"]=Uo&&!Vo?_a:null);const zo=_extends({},Wo,uo,hs.props,{className:clsx(uo.className,hs.props.className),onTouchStart:Bs,ref:Yu},wr?{onMouseMove:au}:{}),Co={};pr||(zo.onTouchStart=eu,zo.onTouchEnd=su),Un||(zo.onMouseOver=composeEventHandler($a,zo.onMouseOver),zo.onMouseLeave=composeEventHandler(Vs,zo.onMouseLeave),ga||(Co.onMouseOver=$a,Co.onMouseLeave=Vs)),Gn||(zo.onFocus=composeEventHandler(go,zo.onFocus),zo.onBlur=composeEventHandler(Mr,zo.onBlur),ga||(Co.onFocus=go,Co.onBlur=Mr));const jo=reactExports.useMemo(()=>{var Ko;let rs=[{name:"arrow",enabled:!!Fr,options:{element:Fr,padding:4}}];return(Ko=ro.popperOptions)!=null&&Ko.modifiers&&(rs=rs.concat(ro.popperOptions.modifiers)),_extends({},ro.popperOptions,{modifiers:rs})},[Fr,ro]),As=_extends({},ar,{isRtl:wo,arrow:jn,disableInteractive:ga,placement:Hr,PopperComponentProp:Vr,touch:Bo.current}),Gs=useUtilityClasses$4(As),lo=(pt=(yt=No.popper)!=null?yt:Wn.Popper)!=null?pt:TooltipPopper,Ns=(Dt=(sn=(ln=No.transition)!=null?ln:Wn.Transition)!=null?sn:Do)!=null?Dt:Grow$1,Jr=(mn=(hn=No.tooltip)!=null?hn:Wn.Tooltip)!=null?mn:TooltipTooltip,zr=(yn=(Zn=No.arrow)!=null?Zn:Wn.Arrow)!=null?yn:TooltipArrow,_i=appendOwnerState(lo,_extends({},ro,(Cn=po.popper)!=null?Cn:hr.popper,{className:clsx(Gs.popper,ro==null?void 0:ro.className,(Qn=(Fn=po.popper)!=null?Fn:hr.popper)==null?void 0:Qn.className)}),As),co=appendOwnerState(Ns,_extends({},ts,(Hn=po.transition)!=null?Hn:hr.transition),As),_o=appendOwnerState(Jr,_extends({},(Yn=po.tooltip)!=null?Yn:hr.tooltip,{className:clsx(Gs.tooltip,(er=(Kn=po.tooltip)!=null?Kn:hr.tooltip)==null?void 0:er.className)}),As),Ro=appendOwnerState(zr,_extends({},(Xn=po.arrow)!=null?Xn:hr.arrow,{className:clsx(Gs.arrow,(fr=(or=po.arrow)!=null?or:hr.arrow)==null?void 0:fr.className)}),As);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[reactExports.cloneElement(hs,zo),jsxRuntimeExports.jsx(lo,_extends({as:Vr??Popper$1,placement:Hr,anchorEl:wr?{getBoundingClientRect:()=>({top:cursorPosition.y,left:cursorPosition.x,right:cursorPosition.x,bottom:cursorPosition.y,width:0,height:0})}:Eo,popperRef:Ws,open:Eo?Uo:!1,id:_a,transition:!0},Co,_i,{popperOptions:jo,children:({TransitionProps:Ko})=>jsxRuntimeExports.jsx(Ns,_extends({timeout:ao.transitions.duration.shorter},Ko,co,{children:jsxRuntimeExports.jsxs(Jr,_extends({},_o,{children:[Ho,jn?jsxRuntimeExports.jsx(zr,_extends({},Ro,{ref:qo})):null]}))}))}))]})}),Tooltip$1=Tooltip;function getSwitchUtilityClass(it){return generateUtilityClass("MuiSwitch",it)}const switchClasses=generateUtilityClasses("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),switchClasses$1=switchClasses,_excluded$4=["className","color","edge","size","sx"],useUtilityClasses$3=it=>{const{classes:dt,edge:ht,size:pt,color:yt,checked:Dt,disabled:sn}=it,ln={root:["root",ht&&`edge${capitalize$1(ht)}`,`size${capitalize$1(pt)}`],switchBase:["switchBase",`color${capitalize$1(yt)}`,Dt&&"checked",sn&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},mn=composeClasses(ln,getSwitchUtilityClass,dt);return _extends({},dt,mn)},SwitchRoot=styled$1("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.root,ht.edge&&dt[`edge${capitalize$1(ht.edge)}`],dt[`size${capitalize$1(ht.size)}`]]}})(({ownerState:it})=>_extends({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},it.edge==="start"&&{marginLeft:-8},it.edge==="end"&&{marginRight:-8},it.size==="small"&&{width:40,height:24,padding:7,[`& .${switchClasses$1.thumb}`]:{width:16,height:16},[`& .${switchClasses$1.switchBase}`]:{padding:4,[`&.${switchClasses$1.checked}`]:{transform:"translateX(16px)"}}})),SwitchSwitchBase=styled$1(SwitchBase$1,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.switchBase,{[`& .${switchClasses$1.input}`]:dt.input},ht.color!=="default"&&dt[`color${capitalize$1(ht.color)}`]]}})(({theme:it})=>({position:"absolute",top:0,left:0,zIndex:1,color:it.vars?it.vars.palette.Switch.defaultColor:`${it.palette.mode==="light"?it.palette.common.white:it.palette.grey[300]}`,transition:it.transitions.create(["left","transform"],{duration:it.transitions.duration.shortest}),[`&.${switchClasses$1.checked}`]:{transform:"translateX(20px)"},[`&.${switchClasses$1.disabled}`]:{color:it.vars?it.vars.palette.Switch.defaultDisabledColor:`${it.palette.mode==="light"?it.palette.grey[100]:it.palette.grey[600]}`},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{opacity:.5},[`&.${switchClasses$1.disabled} + .${switchClasses$1.track}`]:{opacity:it.vars?it.vars.opacity.switchTrackDisabled:`${it.palette.mode==="light"?.12:.2}`},[`& .${switchClasses$1.input}`]:{left:"-100%",width:"300%"}}),({theme:it,ownerState:dt})=>_extends({"&:hover":{backgroundColor:it.vars?`rgba(${it.vars.palette.action.activeChannel} / ${it.vars.palette.action.hoverOpacity})`:alpha(it.palette.action.active,it.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},dt.color!=="default"&&{[`&.${switchClasses$1.checked}`]:{color:(it.vars||it).palette[dt.color].main,"&:hover":{backgroundColor:it.vars?`rgba(${it.vars.palette[dt.color].mainChannel} / ${it.vars.palette.action.hoverOpacity})`:alpha(it.palette[dt.color].main,it.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${switchClasses$1.disabled}`]:{color:it.vars?it.vars.palette.Switch[`${dt.color}DisabledColor`]:`${it.palette.mode==="light"?lighten(it.palette[dt.color].main,.62):darken(it.palette[dt.color].main,.55)}`}},[`&.${switchClasses$1.checked} + .${switchClasses$1.track}`]:{backgroundColor:(it.vars||it).palette[dt.color].main}})),SwitchTrack=styled$1("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(it,dt)=>dt.track})(({theme:it})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:it.transitions.create(["opacity","background-color"],{duration:it.transitions.duration.shortest}),backgroundColor:it.vars?it.vars.palette.common.onBackground:`${it.palette.mode==="light"?it.palette.common.black:it.palette.common.white}`,opacity:it.vars?it.vars.opacity.switchTrack:`${it.palette.mode==="light"?.38:.3}`})),SwitchThumb=styled$1("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(it,dt)=>dt.thumb})(({theme:it})=>({boxShadow:(it.vars||it).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Switch$1=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiSwitch"}),{className:yt,color:Dt="primary",edge:sn=!1,size:ln="medium",sx:mn}=pt,hn=_objectWithoutPropertiesLoose(pt,_excluded$4),yn=_extends({},pt,{color:Dt,edge:sn,size:ln}),Zn=useUtilityClasses$3(yn),Cn=jsxRuntimeExports.jsx(SwitchThumb,{className:Zn.thumb,ownerState:yn});return jsxRuntimeExports.jsxs(SwitchRoot,{className:clsx(Zn.root,yt),sx:mn,ownerState:yn,children:[jsxRuntimeExports.jsx(SwitchSwitchBase,_extends({type:"checkbox",icon:Cn,checkedIcon:Cn,ref:ht,ownerState:yn},hn,{classes:_extends({},Zn,{root:Zn.switchBase})})),jsxRuntimeExports.jsx(SwitchTrack,{className:Zn.track,ownerState:yn})]})}),MuiSwitch=Switch$1;function getTabUtilityClass(it){return generateUtilityClass("MuiTab",it)}const tabClasses=generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),tabClasses$1=tabClasses,_excluded$3=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],useUtilityClasses$2=it=>{const{classes:dt,textColor:ht,fullWidth:pt,wrapped:yt,icon:Dt,label:sn,selected:ln,disabled:mn}=it,hn={root:["root",Dt&&sn&&"labelIcon",`textColor${capitalize$1(ht)}`,pt&&"fullWidth",yt&&"wrapped",ln&&"selected",mn&&"disabled"],iconWrapper:["iconWrapper"]};return composeClasses(hn,getTabUtilityClass,dt)},TabRoot=styled$1(ButtonBase$1,{name:"MuiTab",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.root,ht.label&&ht.icon&&dt.labelIcon,dt[`textColor${capitalize$1(ht.textColor)}`],ht.fullWidth&&dt.fullWidth,ht.wrapped&&dt.wrapped]}})(({theme:it,ownerState:dt})=>_extends({},it.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},dt.label&&{flexDirection:dt.iconPosition==="top"||dt.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},dt.icon&&dt.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${tabClasses$1.iconWrapper}`]:_extends({},dt.iconPosition==="top"&&{marginBottom:6},dt.iconPosition==="bottom"&&{marginTop:6},dt.iconPosition==="start"&&{marginRight:it.spacing(1)},dt.iconPosition==="end"&&{marginLeft:it.spacing(1)})},dt.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${tabClasses$1.selected}`]:{opacity:1},[`&.${tabClasses$1.disabled}`]:{opacity:(it.vars||it).palette.action.disabledOpacity}},dt.textColor==="primary"&&{color:(it.vars||it).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(it.vars||it).palette.primary.main},[`&.${tabClasses$1.disabled}`]:{color:(it.vars||it).palette.text.disabled}},dt.textColor==="secondary"&&{color:(it.vars||it).palette.text.secondary,[`&.${tabClasses$1.selected}`]:{color:(it.vars||it).palette.secondary.main},[`&.${tabClasses$1.disabled}`]:{color:(it.vars||it).palette.text.disabled}},dt.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},dt.wrapped&&{fontSize:it.typography.pxToRem(12)})),Tab=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiTab"}),{className:yt,disabled:Dt=!1,disableFocusRipple:sn=!1,fullWidth:ln,icon:mn,iconPosition:hn="top",indicator:yn,label:Zn,onChange:Cn,onClick:Qn,onFocus:Fn,selected:Hn,selectionFollowsFocus:Yn,textColor:er="inherit",value:Kn,wrapped:Xn=!1}=pt,fr=_objectWithoutPropertiesLoose(pt,_excluded$3),or=_extends({},pt,{disabled:Dt,disableFocusRipple:sn,selected:Hn,icon:!!mn,iconPosition:hn,label:!!Zn,fullWidth:ln,textColor:er,wrapped:Xn}),ar=useUtilityClasses$2(or),jn=mn&&Zn&&reactExports.isValidElement(mn)?reactExports.cloneElement(mn,{className:clsx(ar.iconWrapper,mn.props.className)}):mn,cr=hr=>{!Hn&&Cn&&Cn(hr,Kn),Qn&&Qn(hr)},Wn=hr=>{Yn&&!Hn&&Cn&&Cn(hr,Kn),Fn&&Fn(hr)};return jsxRuntimeExports.jsxs(TabRoot,_extends({focusRipple:!sn,className:clsx(ar.root,yt),ref:ht,role:"tab","aria-selected":Hn,disabled:Dt,onClick:cr,onFocus:Wn,ownerState:or,tabIndex:Hn?0:-1},fr,{children:[hn==="top"||hn==="start"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jn,Zn]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[Zn,jn]}),yn]}))}),Tab$1=Tab,KeyboardArrowLeft=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),KeyboardArrowRight=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function easeInOutSin(it){return(1+Math.sin(Math.PI*it-Math.PI/2))/2}function animate(it,dt,ht,pt={},yt=()=>{}){const{ease:Dt=easeInOutSin,duration:sn=300}=pt;let ln=null;const mn=dt[it];let hn=!1;const yn=()=>{hn=!0},Zn=Cn=>{if(hn){yt(new Error("Animation cancelled"));return}ln===null&&(ln=Cn);const Qn=Math.min(1,(Cn-ln)/sn);if(dt[it]=Dt(Qn)*(ht-mn)+mn,Qn>=1){requestAnimationFrame(()=>{yt(null)});return}requestAnimationFrame(Zn)};return mn===ht?(yt(new Error("Element already at target position")),yn):(requestAnimationFrame(Zn),yn)}const _excluded$2=["onChange"],styles={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ScrollbarSize(it){const{onChange:dt}=it,ht=_objectWithoutPropertiesLoose(it,_excluded$2),pt=reactExports.useRef(),yt=reactExports.useRef(null),Dt=()=>{pt.current=yt.current.offsetHeight-yt.current.clientHeight};return useEnhancedEffect$1(()=>{const sn=debounce$1(()=>{const mn=pt.current;Dt(),mn!==pt.current&&dt(pt.current)}),ln=ownerWindow(yt.current);return ln.addEventListener("resize",sn),()=>{sn.clear(),ln.removeEventListener("resize",sn)}},[dt]),reactExports.useEffect(()=>{Dt(),dt(pt.current)},[dt]),jsxRuntimeExports.jsx("div",_extends({style:styles,ref:yt},ht))}function getTabScrollButtonUtilityClass(it){return generateUtilityClass("MuiTabScrollButton",it)}const tabScrollButtonClasses=generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),tabScrollButtonClasses$1=tabScrollButtonClasses,_excluded$1=["className","slots","slotProps","direction","orientation","disabled"],useUtilityClasses$1=it=>{const{classes:dt,orientation:ht,disabled:pt}=it;return composeClasses({root:["root",ht,pt&&"disabled"]},getTabScrollButtonUtilityClass,dt)},TabScrollButtonRoot=styled$1(ButtonBase$1,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.root,ht.orientation&&dt[ht.orientation]]}})(({ownerState:it})=>_extends({width:40,flexShrink:0,opacity:.8,[`&.${tabScrollButtonClasses$1.disabled}`]:{opacity:0}},it.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${it.isRtl?-90:90}deg)`}})),TabScrollButton=reactExports.forwardRef(function it(dt,ht){var pt,yt;const Dt=useThemeProps({props:dt,name:"MuiTabScrollButton"}),{className:sn,slots:ln={},slotProps:mn={},direction:hn}=Dt,yn=_objectWithoutPropertiesLoose(Dt,_excluded$1),Cn=useTheme().direction==="rtl",Qn=_extends({isRtl:Cn},Dt),Fn=useUtilityClasses$1(Qn),Hn=(pt=ln.StartScrollButtonIcon)!=null?pt:KeyboardArrowLeft,Yn=(yt=ln.EndScrollButtonIcon)!=null?yt:KeyboardArrowRight,er=useSlotProps({elementType:Hn,externalSlotProps:mn.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:Qn}),Kn=useSlotProps({elementType:Yn,externalSlotProps:mn.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:Qn});return jsxRuntimeExports.jsx(TabScrollButtonRoot,_extends({component:"div",className:clsx(Fn.root,sn),ref:ht,role:null,ownerState:Qn,tabIndex:null},yn,{children:hn==="left"?jsxRuntimeExports.jsx(Hn,_extends({},er)):jsxRuntimeExports.jsx(Yn,_extends({},Kn))}))}),TabScrollButton$1=TabScrollButton;function getTabsUtilityClass(it){return generateUtilityClass("MuiTabs",it)}const tabsClasses=generateUtilityClasses("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tabsClasses$1=tabsClasses,_excluded=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],nextItem=(it,dt)=>it===dt?it.firstChild:dt&&dt.nextElementSibling?dt.nextElementSibling:it.firstChild,previousItem=(it,dt)=>it===dt?it.lastChild:dt&&dt.previousElementSibling?dt.previousElementSibling:it.lastChild,moveFocus=(it,dt,ht)=>{let pt=!1,yt=ht(it,dt);for(;yt;){if(yt===it.firstChild){if(pt)return;pt=!0}const Dt=yt.disabled||yt.getAttribute("aria-disabled")==="true";if(!yt.hasAttribute("tabindex")||Dt)yt=ht(it,yt);else{yt.focus();return}}},useUtilityClasses=it=>{const{vertical:dt,fixed:ht,hideScrollbar:pt,scrollableX:yt,scrollableY:Dt,centered:sn,scrollButtonsHideMobile:ln,classes:mn}=it;return composeClasses({root:["root",dt&&"vertical"],scroller:["scroller",ht&&"fixed",pt&&"hideScrollbar",yt&&"scrollableX",Dt&&"scrollableY"],flexContainer:["flexContainer",dt&&"flexContainerVertical",sn&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",ln&&"scrollButtonsHideMobile"],scrollableX:[yt&&"scrollableX"],hideScrollbar:[pt&&"hideScrollbar"]},getTabsUtilityClass,mn)},TabsRoot=styled$1("div",{name:"MuiTabs",slot:"Root",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[{[`& .${tabsClasses$1.scrollButtons}`]:dt.scrollButtons},{[`& .${tabsClasses$1.scrollButtons}`]:ht.scrollButtonsHideMobile&&dt.scrollButtonsHideMobile},dt.root,ht.vertical&&dt.vertical]}})(({ownerState:it,theme:dt})=>_extends({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},it.vertical&&{flexDirection:"column"},it.scrollButtonsHideMobile&&{[`& .${tabsClasses$1.scrollButtons}`]:{[dt.breakpoints.down("sm")]:{display:"none"}}})),TabsScroller=styled$1("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.scroller,ht.fixed&&dt.fixed,ht.hideScrollbar&&dt.hideScrollbar,ht.scrollableX&&dt.scrollableX,ht.scrollableY&&dt.scrollableY]}})(({ownerState:it})=>_extends({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},it.fixed&&{overflowX:"hidden",width:"100%"},it.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},it.scrollableX&&{overflowX:"auto",overflowY:"hidden"},it.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),FlexContainer=styled$1("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(it,dt)=>{const{ownerState:ht}=it;return[dt.flexContainer,ht.vertical&&dt.flexContainerVertical,ht.centered&&dt.centered]}})(({ownerState:it})=>_extends({display:"flex"},it.vertical&&{flexDirection:"column"},it.centered&&{justifyContent:"center"})),TabsIndicator=styled$1("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(it,dt)=>dt.indicator})(({ownerState:it,theme:dt})=>_extends({position:"absolute",height:2,bottom:0,width:"100%",transition:dt.transitions.create()},it.indicatorColor==="primary"&&{backgroundColor:(dt.vars||dt).palette.primary.main},it.indicatorColor==="secondary"&&{backgroundColor:(dt.vars||dt).palette.secondary.main},it.vertical&&{height:"100%",width:2,right:0})),TabsScrollbarSize=styled$1(ScrollbarSize,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),defaultIndicatorStyle={},Tabs=reactExports.forwardRef(function it(dt,ht){const pt=useThemeProps({props:dt,name:"MuiTabs"}),yt=useTheme(),Dt=yt.direction==="rtl",{"aria-label":sn,"aria-labelledby":ln,action:mn,centered:hn=!1,children:yn,className:Zn,component:Cn="div",allowScrollButtonsMobile:Qn=!1,indicatorColor:Fn="primary",onChange:Hn,orientation:Yn="horizontal",ScrollButtonComponent:er=TabScrollButton$1,scrollButtons:Kn="auto",selectionFollowsFocus:Xn,slots:fr={},slotProps:or={},TabIndicatorProps:ar={},TabScrollButtonProps:jn={},textColor:cr="primary",value:Wn,variant:hr="standard",visibleScrollbar:ur=!1}=pt,Gn=_objectWithoutPropertiesLoose(pt,_excluded),Un=hr==="scrollable",ir=Yn==="vertical",pr=ir?"scrollTop":"scrollLeft",sr=ir?"top":"left",Ar=ir?"bottom":"right",br=ir?"clientHeight":"clientWidth",wr=ir?"height":"width",Jn=_extends({},pt,{component:Cn,allowScrollButtonsMobile:Qn,indicatorColor:Fn,orientation:Yn,vertical:ir,scrollButtons:Kn,textColor:cr,variant:hr,visibleScrollbar:ur,fixed:!Un,hideScrollbar:Un&&!ur,scrollableX:Un&&!ir,scrollableY:Un&&ir,centered:hn&&!Un,scrollButtonsHideMobile:!Qn}),rr=useUtilityClasses(Jn),_r=useSlotProps({elementType:fr.StartScrollButtonIcon,externalSlotProps:or.startScrollButtonIcon,ownerState:Jn}),yr=useSlotProps({elementType:fr.EndScrollButtonIcon,externalSlotProps:or.endScrollButtonIcon,ownerState:Jn}),[Er,Ir]=reactExports.useState(!1),[Hr,Vr]=reactExports.useState(defaultIndicatorStyle),[ro,po]=reactExports.useState(!1),[No,Ho]=reactExports.useState(!1),[Do,ts]=reactExports.useState(!1),[uo,hs]=reactExports.useState({overflow:"hidden",scrollbarWidth:0}),ao=new Map,wo=reactExports.useRef(null),Eo=reactExports.useRef(null),Oo=()=>{const qs=wo.current;let Es;if(qs){const $r=qs.getBoundingClientRect();Es={clientWidth:qs.clientWidth,scrollLeft:qs.scrollLeft,scrollTop:qs.scrollTop,scrollLeftNormalized:getNormalizedScrollLeft(qs,yt.direction),scrollWidth:qs.scrollWidth,top:$r.top,bottom:$r.bottom,left:$r.left,right:$r.right}}let vr;if(qs&&Wn!==!1){const $r=Eo.current.children;if($r.length>0){const Sr=$r[ao.get(Wn)];vr=Sr?Sr.getBoundingClientRect():null}}return{tabsMeta:Es,tabMeta:vr}},Fr=useEventCallback(()=>{const{tabsMeta:qs,tabMeta:Es}=Oo();let vr=0,$r;if(ir)$r="top",Es&&qs&&(vr=Es.top-qs.top+qs.scrollTop);else if($r=Dt?"right":"left",Es&&qs){const Nr=Dt?qs.scrollLeftNormalized+qs.clientWidth-qs.scrollWidth:qs.scrollLeft;vr=(Dt?-1:1)*(Es[$r]-qs[$r]+Nr)}const Sr={[$r]:vr,[wr]:Es?Es[wr]:0};if(isNaN(Hr[$r])||isNaN(Hr[wr]))Vr(Sr);else{const Nr=Math.abs(Hr[$r]-Sr[$r]),qr=Math.abs(Hr[wr]-Sr[wr]);(Nr>=1||qr>=1)&&Vr(Sr)}}),qo=(qs,{animation:Es=!0}={})=>{Es?animate(pr,wo.current,qs,{duration:yt.transitions.duration.standard}):wo.current[pr]=qs},Bo=qs=>{let Es=wo.current[pr];ir?Es+=qs:(Es+=qs*(Dt?-1:1),Es*=Dt&&detectScrollType()==="reverse"?-1:1),qo(Es)},ga=()=>{const qs=wo.current[br];let Es=0;const vr=Array.from(Eo.current.children);for(let $r=0;$r<vr.length;$r+=1){const Sr=vr[$r];if(Es+Sr[br]>qs){$r===0&&(Es=qs);break}Es+=Sr[br]}return Es},Xo=()=>{Bo(-1*ga())},Zo=()=>{Bo(ga())},Cs=reactExports.useCallback(qs=>{hs({overflow:null,scrollbarWidth:qs})},[]),ko=()=>{const qs={};qs.scrollbarSizeListener=Un?jsxRuntimeExports.jsx(TabsScrollbarSize,{onChange:Cs,className:clsx(rr.scrollableX,rr.hideScrollbar)}):null;const vr=Un&&(Kn==="auto"&&(ro||No)||Kn===!0);return qs.scrollButtonStart=vr?jsxRuntimeExports.jsx(er,_extends({slots:{StartScrollButtonIcon:fr.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:_r},orientation:Yn,direction:Dt?"right":"left",onClick:Xo,disabled:!ro},jn,{className:clsx(rr.scrollButtons,jn.className)})):null,qs.scrollButtonEnd=vr?jsxRuntimeExports.jsx(er,_extends({slots:{EndScrollButtonIcon:fr.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:yr},orientation:Yn,direction:Dt?"left":"right",onClick:Zo,disabled:!No},jn,{className:clsx(rr.scrollButtons,jn.className)})):null,qs},so=useEventCallback(qs=>{const{tabsMeta:Es,tabMeta:vr}=Oo();if(!(!vr||!Es)){if(vr[sr]<Es[sr]){const $r=Es[pr]+(vr[sr]-Es[sr]);qo($r,{animation:qs})}else if(vr[Ar]>Es[Ar]){const $r=Es[pr]+(vr[Ar]-Es[Ar]);qo($r,{animation:qs})}}}),bo=useEventCallback(()=>{Un&&Kn!==!1&&ts(!Do)});reactExports.useEffect(()=>{const qs=debounce$1(()=>{wo.current&&Fr()}),Es=ownerWindow(wo.current);Es.addEventListener("resize",qs);let vr;return typeof ResizeObserver<"u"&&(vr=new ResizeObserver(qs),Array.from(Eo.current.children).forEach($r=>{vr.observe($r)})),()=>{qs.clear(),Es.removeEventListener("resize",qs),vr&&vr.disconnect()}},[Fr]),reactExports.useEffect(()=>{const qs=Array.from(Eo.current.children),Es=qs.length;if(typeof IntersectionObserver<"u"&&Es>0&&Un&&Kn!==!1){const vr=qs[0],$r=qs[Es-1],Sr={root:wo.current,threshold:.99},Nr=go=>{po(!go[0].isIntersecting)},qr=new IntersectionObserver(Nr,Sr);qr.observe(vr);const Br=go=>{Ho(!go[0].isIntersecting)},Mr=new IntersectionObserver(Br,Sr);return Mr.observe($r),()=>{qr.disconnect(),Mr.disconnect()}}},[Un,Kn,Do,yn==null?void 0:yn.length]),reactExports.useEffect(()=>{Ir(!0)},[]),reactExports.useEffect(()=>{Fr()}),reactExports.useEffect(()=>{so(defaultIndicatorStyle!==Hr)},[so,Hr]),reactExports.useImperativeHandle(mn,()=>({updateIndicator:Fr,updateScrollButtons:bo}),[Fr,bo]);const Uo=jsxRuntimeExports.jsx(TabsIndicator,_extends({},ar,{className:clsx(rr.indicator,ar.className),ownerState:Jn,style:_extends({},Hr,ar.style)}));let _a=0;const bs=reactExports.Children.map(yn,qs=>{if(!reactExports.isValidElement(qs))return null;const Es=qs.props.value===void 0?_a:qs.props.value;ao.set(Es,_a);const vr=Es===Wn;return _a+=1,reactExports.cloneElement(qs,_extends({fullWidth:hr==="fullWidth",indicator:vr&&!Er&&Uo,selected:vr,selectionFollowsFocus:Xn,onChange:Hn,textColor:cr,value:Es},_a===1&&Wn===!1&&!qs.props.tabIndex?{tabIndex:0}:{}))}),us=qs=>{const Es=Eo.current,vr=ownerDocument(Es).activeElement;if(vr.getAttribute("role")!=="tab")return;let Sr=Yn==="horizontal"?"ArrowLeft":"ArrowUp",Nr=Yn==="horizontal"?"ArrowRight":"ArrowDown";switch(Yn==="horizontal"&&Dt&&(Sr="ArrowRight",Nr="ArrowLeft"),qs.key){case Sr:qs.preventDefault(),moveFocus(Es,vr,previousItem);break;case Nr:qs.preventDefault(),moveFocus(Es,vr,nextItem);break;case"Home":qs.preventDefault(),moveFocus(Es,null,nextItem);break;case"End":qs.preventDefault(),moveFocus(Es,null,previousItem);break}},$s=ko();return jsxRuntimeExports.jsxs(TabsRoot,_extends({className:clsx(rr.root,Zn),ownerState:Jn,ref:ht,as:Cn},Gn,{children:[$s.scrollButtonStart,$s.scrollbarSizeListener,jsxRuntimeExports.jsxs(TabsScroller,{className:rr.scroller,ownerState:Jn,style:{overflow:uo.overflow,[ir?`margin${Dt?"Left":"Right"}`:"marginBottom"]:ur?void 0:-uo.scrollbarWidth},ref:wo,children:[jsxRuntimeExports.jsx(FlexContainer,{"aria-label":sn,"aria-labelledby":ln,"aria-orientation":Yn==="vertical"?"vertical":null,className:rr.flexContainer,ownerState:Jn,onKeyDown:us,ref:Eo,role:"tablist",children:bs}),Er&&Uo]}),$s.scrollButtonEnd]}))}),Tabs$1=Tabs,DownIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M7 9L12 14L17 9",fill:"none",stroke:"currentColor",strokeOpacity:"0.9",strokeLinecap:"round",strokeLinejoin:"round"}),"Down"),Switch=styled$1(MuiSwitch)(({theme:it})=>({width:40,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:it.palette.success[400]}}},"& .MuiSwitch-thumb":{boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.75)",width:16,height:16},"& .MuiSwitch-track":{borderRadius:10,opacity:1,backgroundColor:it.palette.button.primary,boxSizing:"border-box"}})),useStyles$M=makeStyles()(it=>({container:{width:"100%",borderRadius:"8px",boxShadow:it.palette.card.elevation},header:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px",backgroundColor:it.palette.card.background,backgroundOpacity:"80%",borderRadius:"8px",transition:"border-radius 0.4s"},title:{fontSize:"14px",fontWeight:"bold"},description:{fontSize:"14px",opacity:"80%"},invert:{transform:"rotate(180deg)"},arrow:{width:"32px",height:"32px",transition:"transform 0.4s"},controlled:{cursor:"default !important"},banner:{borderBottomRightRadius:"8px",borderBottomLeftRadius:"8px",backgroundColor:it.palette.info[500],padding:"8px 16px",display:"flex",flexDirection:"row",transition:"border-radius 0.1s 0.3s"},open:{transition:"border-radius 0s 0s",borderBottomLeftRadius:"0 !important",borderBottomRightRadius:"0 !important"},disabled:{opacity:"70%",cursor:"not-allowed !important"},link:{...LINK(it),margin:"0 0 0 4px"},collapseControl:{cursor:"pointer"}}));var CollapseControlStyle=(it=>(it[it.None=1]="None",it[it.Arrow=2]="Arrow",it[it.Switch=3]="Switch",it))(CollapseControlStyle||{});function DownControl(it){const{classes:dt}=useStyles$M();return jsxRuntimeExports.jsx(DownIcon,{className:joinClass([dt.arrow,!it.collapsed&&dt.invert])})}function getControlComponent(it,dt){switch(it){case 1:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});case 2:return jsxRuntimeExports.jsx(DownControl,{collapsed:dt});case 3:return jsxRuntimeExports.jsx(Switch,{checked:!dt});default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}}function BridgeCollapse(it){const{classes:dt}=useStyles$M(),{onCollapseChange:ht,disabled:pt,startClosed:yt}=it,[Dt,sn]=React.useState(yt||!1),ln=reactExports.useCallback(()=>{pt||sn(Zn=>(ht&&ht(!Zn),!Zn))},[pt,ht]);reactExports.useEffect(()=>{sn(yt||!1)},[yt]);const mn=it.controlStyle||2,hn=it.controlled?it.value||!1:Dt,yn=getControlComponent(mn,hn);return jsxRuntimeExports.jsxs("div",{className:dt.container,children:[jsxRuntimeExports.jsxs("div",{className:joinClass([dt.header,(!!it.banner||!hn)&&dt.open,!!pt&&dt.disabled]),children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:dt.title,children:it.title}),it.description&&jsxRuntimeExports.jsx("div",{className:dt.description,children:it.description})]}),jsxRuntimeExports.jsx("div",{onClick:ln,className:dt.collapseControl,children:yn})]}),it.banner&&jsxRuntimeExports.jsx("div",{className:joinClass([dt.banner,(it.disableCollapse||!hn)&&dt.open]),children:it.banner}),jsxRuntimeExports.jsx(Collapse$1,{in:it.disableCollapse||!hn,unmountOnExit:!0,children:it.children})]})}const ArrowRightIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M4 12H20M20 12L13 5M20 12L13 19",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),"ArrowRight"),useStyles$L=makeStyles()(it=>({options:{backgroundColor:it.palette.card.background,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"},option:{width:"100%",borderRadius:"0",backgroundColor:it.palette.card.background,"&:last-child":{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px"},"&:not(:last-child)":{borderBottom:`0.5px solid ${it.palette.divider}`}},optionContent:{padding:"16px"},optionContentEnabled:{"&:hover":{backgroundColor:it.palette.options.hover}},arrow:{position:"absolute",right:"0",height:"100%",display:"flex",justifyContent:"center"},invert:{transform:"rotate(180deg)"},active:{backgroundColor:`${it.palette.options.select} !important`}}));function Options(it){const{classes:dt}=useStyles$L(),ht=pt=>it.collapsable&&it.collapsed&&it.active!==pt;return jsxRuntimeExports.jsx("div",{className:dt.options,children:it.children.map((pt,yt)=>jsxRuntimeExports.jsx(Collapse$1,{in:!ht(pt.key),className:joinClass([dt.option,it.active===pt.key&&dt.active]),unmountOnExit:!0,children:jsxRuntimeExports.jsx("div",{className:joinClass([dt.optionContent,!pt.disabled&&dt.optionContentEnabled]),onClick:()=>it.onSelect(pt.key),style:{cursor:it.children.length>0?"pointer":"default"},children:pt.child})},yt))})}const useStyles$K=makeStyles()(()=>({price:{fontSize:"10px"},alignRight:{textAlign:"right"}})),Price=({children:it,textAlign:dt="left"})=>{const{classes:ht}=useStyles$K();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:it!=null&&it.length?jsxRuntimeExports.jsx("div",{className:`${ht.price}`,style:{textAlign:dt},children:it}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})})},range=it=>[...Array(it).keys()],zip=it=>range(it[0].length).map(dt=>range(it.length).map(ht=>it[ht][dt]));function isMappableKey(it){return["string","number","symbol","bigint","boolean"].includes(typeof it)}const isRecursiveTuple=it=>it.length===2&&!Array.isArray(it[0])&&Array.isArray(it[1]),cartesianRightRecursive=it=>it.length===0?[]:Array.isArray(it[0])?it.map(([dt,ht])=>Array.isArray(ht)?(isRecursiveTuple(ht)?cartesianRightRecursive(ht):ht).map(pt=>[dt,pt].flat()):[[dt,ht]]).flat():isRecursiveTuple(it)?cartesianRightRecursive(it[1]).map(dt=>[it[0],dt]):it,toMapping=(it,dt)=>{const ht=cartesianRightRecursive(it);if(ht.length===0)throw new Error("Invalid mapping: empty");const pt=dt===void 0?[range(ht[0].length-1),[ht[0].length-1]]:dt.map(Cn=>typeof Cn=="number"?[Cn]:Cn);let yt=[],Dt=!0;const sn=(Cn,Qn)=>{const Fn=Array.from(new Set(Cn[0]).values()),Hn=new Map(Fn.map(er=>[er,[]]));for(const[er,Kn]of Cn[0].entries())Hn.get(Kn).push(er);if(Cn.length===1){const er=Object.fromEntries(Fn.map(Kn=>[Kn,Hn.get(Kn).map(Xn=>Qn[Xn].length===1?Qn[Xn][0]:Qn[Xn])]));if(Dt){for(const Kn of Hn.values())if(Kn.length>1)return Dt=!1,er;yt.push(er)}return er}const Yn=zip(Cn.slice(1));return Object.fromEntries(Fn.map(er=>{const Kn=Hn.get(er),Xn=zip(Kn.map(or=>Yn[or])),fr=Kn.map(or=>Qn[or]);return[er,sn(Xn,fr)]}))},ln=zip(ht),mn=Cn=>{const Qn=ln[Cn];if(Qn===void 0)throw new Error(`Invalid shape: column ${Cn} does not exist`);return Qn},[hn,yn]=pt.map(Cn=>Cn.map(Qn=>mn(Qn)));if(hn.length===0)throw new Error("Invalid shape: empty key set");if(yn.length===0)throw new Error("Invalid shape: empty value set");for(const Cn of hn)for(const Qn of Cn)if(!isMappableKey(Qn))throw new Error(`Invalid key: ${Qn} in ${Cn}`);const Zn=sn(hn,zip(yn));if(Dt)for(const Cn of yt)for(const Qn of Object.keys(Cn))Cn[Qn]=Cn[Qn][0];return Zn},has=it=>(...dt)=>it(...dt)!==void 0,get=it=>(...dt)=>it(...dt);function constMap(it,dt){const ht=toMapping(it,dt),pt=(...yt)=>yt.reduce((Dt,sn)=>Dt?Dt[sn.toString()]??void 0:void 0,ht);return Object.assign(pt,{get:get(pt),has:has(pt)})}const chainsAndChainIdEntries=[["Solana",1],["Ethereum",2],["Terra",3],["Bsc",4],["Polygon",5],["Avalanche",6],["Oasis",7],["Algorand",8],["Aurora",9],["Fantom",10],["Karura",11],["Acala",12],["Klaytn",13],["Celo",14],["Near",15],["Moonbeam",16],["Neon",17],["Terra2",18],["Injective",19],["Osmosis",20],["Sui",21],["Aptos",22],["Arbitrum",23],["Optimism",24],["Gnosis",25],["Pythnet",26],["Xpla",28],["Btc",29],["Base",30],["Sei",32],["Rootstock",33],["Wormchain",3104],["Cosmoshub",4e3],["Evmos",4001],["Kujira",4002],["Sepolia",10002],["ArbitrumSepolia",10003],["BaseSepolia",10004],["OptimismSepolia",10005],["Holesky",10006]];zip(chainsAndChainIdEntries);constMap(chainsAndChainIdEntries);const chainIdToChain=constMap(chainsAndChainIdEntries,[1,0]);var ConsistencyLevels;(function(it){it[it.Finalized=1]="Finalized",it[it.Immediate=200]="Immediate",it[it.Safe=201]="Safe"})(ConsistencyLevels||(ConsistencyLevels={}));const safeThresholds=[["Ethereum",32]];constMap(safeThresholds);const finalityThresholds=[["Ethereum",64],["Solana",32],["Polygon",32],["Bsc",15],["Fantom",1],["Celo",1],["Moonbeam",1],["Avalanche",0],["Sui",0],["Algorand",0],["Aptos",0],["Sei",0],["Near",0],["Terra",0],["Terra2",0],["Xpla",0],["Injective",0],["Karura",1],["Acala",1]],finalityThreshold=constMap(finalityThresholds),blockTimeMilliseconds=[["Acala",12e3],["Algorand",3300],["Aptos",4e3],["Arbitrum",300],["ArbitrumSepolia",300],["Aurora",3e3],["Avalanche",2e3],["Base",2e3],["BaseSepolia",2e3],["Bsc",3e3],["Celo",5e3],["Cosmoshub",5e3],["Ethereum",15e3],["Evmos",2e3],["Fantom",2500],["Gnosis",5e3],["Holesky",15e3],["Injective",2500],["Karura",12e3],["Klaytn",1e3],["Kujira",3e3],["Moonbeam",12e3],["Near",1500],["Neon",3e4],["Oasis",6e3],["Optimism",2e3],["OptimismSepolia",2e3],["Osmosis",6e3],["Polygon",2e3],["Rootstock",3e4],["Sei",400],["Sepolia",15e3],["Solana",400],["Sui",3e3],["Terra",6e3],["Terra2",6e3],["Xpla",5e3],["Wormchain",5e3],["Btc",6e5],["Pythnet",400]],blockTime=constMap(blockTimeMilliseconds),useStyles$J=makeStyles()(it=>({link:{...LINK(it),margin:"0 0 0 4px"},tag:{padding:"4px 8px",borderRadius:"8px",display:"flex",alignItems:"center",gap:"8px",[it.breakpoints.down("sm")]:{padding:"4px 0",backgroundColor:"transparent !important"}},filled:{backgroundColor:it.palette.card.secondary},tagIcon:{[it.breakpoints.down("sm")]:{display:"none"}},route:{[it.breakpoints.up("sm")]:{display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr",gridTemplateAreas:'"path fees"'},[it.breakpoints.down("sm")]:{display:"flex",flexDirection:"column"},width:"100%",maxWidth:"100%",fontSize:"14px"},disabled:{color:"grey",cursor:"default"},routeLeft:{gridArea:"path",display:"flex",flexDirection:"column"},routeTitle:{display:"flex",[it.breakpoints.down("sm")]:{flexDirection:"column"},[it.breakpoints.up("sm")]:{flexDirection:"row"},alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:"600",marginBottom:"8px",whiteSpace:"nowrap"},routePath:{display:"flex",alignItems:"center",gap:"8px",[it.breakpoints.down("sm")]:{gap:"4px",alignContent:"center"}},routeRight:{gridArea:"fees",display:"flex",flexDirection:"column",justifyContent:"space-around",alignItems:"flex-end",padding:"4px 0",height:"100%"},routeAmt:{opacity:"0.6",fontSize:"12px"},multiLineChip:{[it.breakpoints.down("sm")]:{height:"auto","& .MuiChip-label":{display:"block",whiteSpace:"normal",textAlign:"center",maxWidth:"256px"}}}}));function Banner(it){const{classes:dt}=useStyles$J(),ht=it.text||"This route provided by",pt=useSelector(Dt=>Dt.transferInput.route),yt=pt&&(it.route||RoutesConfig[pt]);return yt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ht,jsxRuntimeExports.jsx("a",{href:yt.link,target:"_blank",className:dt.link,rel:"noreferrer",children:yt.providedBy})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function Tag(it){const{classes:dt}=useStyles$J(),ht=it.height||20;return jsxRuntimeExports.jsxs("div",{className:joinClass([dt.tag,!!it.colorFilled&&dt.filled]),children:[jsxRuntimeExports.jsx("div",{style:{height:ht,width:ht},className:dt.tagIcon,children:it.icon}),it.text]})}const getEstimatedTime=it=>{if(!it)return;const dt=chainIdToChain(wh.toChainId(it)),ht=finalityThreshold.get(dt);if(!(typeof ht>"u"))return ht===0?"Instantly":millisToMinutesAndSeconds(blockTime(dt)*ht)};function RouteOption(it){const{classes:dt}=useStyles$J(),ht=useTheme(),pt=useMediaQuery(ht.breakpoints.down("sm")),{token:yt,destToken:Dt,amount:sn,toChain:ln,fromChain:mn}=useSelector(ur=>ur.transferInput),{toNativeToken:hn,relayerFee:yn}=useSelector(ur=>ur.relay),{usdPrices:{data:Zn}}=useSelector(ur=>ur.tokenPrices),Cn=Zn||{},Qn=useSelector(ur=>ur.porticoBridge),[Fn,Hn]=reactExports.useState(void 0),[Yn,er]=reactExports.useState(void 0),[Kn,Xn]=reactExports.useState(void 0);reactExports.useEffect(()=>{let ur=!1;async function Gn(){try{const Un=isPorticoRoute(it.route.route)?Qn:{toNativeToken:hn,relayerFee:yn},ir=await RouteOperator.computeReceiveAmountWithFees(it.route.route,Number.parseFloat(sn),yt,Dt,mn,ln,Un);ur||(Hn(Number.parseFloat(toFixedDecimals(`${ir}`,6))),er(calculateUSDPrice(ir,Cn,TOKENS[Dt])),Xn(getEstimatedTime(mn)))}catch{ur||(Hn(0),er(""),Xn(getEstimatedTime(mn)))}}return Gn(),()=>{ur=!0}},[it.route,sn,hn,yn,yt,Dt,ln,mn,Qn,Zn]);const fr=TOKENS[yt],or=fr&&jsxRuntimeExports.jsx(TokenIcon,{icon:fr.icon,height:20}),ar=TOKENS[Dt],jn=ar&&jsxRuntimeExports.jsx(TokenIcon,{icon:ar.icon,height:20}),cr=it.route.route,Wn=reactExports.useMemo(()=>RouteOperator.getRoute(cr),[cr]),hr=reactExports.useMemo(()=>Wn.AUTOMATIC_DEPOSIT||ln&&(isGatewayChain(ln)||ln==="sei")||isPorticoRoute(Wn.TYPE),[Wn,ln]);return fr&&ar&&jsxRuntimeExports.jsx(Tooltip$1,{title:it.disabled?"Not enough funds on the source chain for automatic redemption":"",children:jsxRuntimeExports.jsxs("div",{className:`${dt.route} ${it.disabled?dt.disabled:""}`,children:[jsxRuntimeExports.jsxs("div",{className:dt.routeLeft,children:[jsxRuntimeExports.jsxs("div",{className:dt.routeTitle,children:[it.route.name,hr?jsxRuntimeExports.jsx(Chip$1,{label:"Receive tokens automatically",color:"success",variant:"outlined",size:"small",className:dt.multiLineChip}):jsxRuntimeExports.jsx(Chip$1,{label:"Approve transfer with destination wallet",color:"warning",variant:"outlined",size:"small",className:dt.multiLineChip})]}),jsxRuntimeExports.jsxs("div",{className:dt.routePath,children:[jsxRuntimeExports.jsx(Tag,{icon:or,text:getDisplayName(fr),colorFilled:!0}),jsxRuntimeExports.jsx(ArrowRightIcon,{fontSize:pt?"inherit":void 0}),jsxRuntimeExports.jsx(Tag,{icon:it.route.icon(),text:it.route.routePath||it.route.providedBy}),jsxRuntimeExports.jsx(ArrowRightIcon,{fontSize:pt?"inherit":void 0}),jsxRuntimeExports.jsx(Tag,{icon:jn,text:getDisplayName(ar),colorFilled:!0})]})]}),jsxRuntimeExports.jsx("div",{className:dt.routeRight,children:it.disabled?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:"Transfer amount too low"})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{children:[Fn," ",getDisplayName(TOKENS[Dt]),jsxRuntimeExports.jsx(Price,{textAlign:"right",children:Yn})]}),jsxRuntimeExports.jsx("div",{className:dt.routeAmt,children:"after fees"}),typeof Kn<"u"&&jsxRuntimeExports.jsxs("div",{className:dt.routeAmt,children:["Estimated time: ",Kn]})]})})]})})}function RouteOptions(){const it=useDispatch(),{isTransactionInProgress:dt,route:ht,routeStates:pt,token:yt,destToken:Dt,fromChain:sn,toChain:ln,amount:mn}=useSelector(Cn=>Cn.transferInput),hn=reactExports.useCallback(Cn=>{if(pt&&pt.some(Qn=>Qn.name===Cn)){const Qn=pt.find(Fn=>Fn.name===Cn);Qn!=null&&Qn.available&&it(setTransferRoute(Cn))}},[pt,it]),[yn]=o(mn,500);reactExports.useEffect(()=>{let Cn=!0;return!sn||!ln||!yt||!Dt?void 0:((async()=>{const Fn=[];for(const Hn of ROUTES){const Yn=Hn,er=await RouteOperator.isRouteAvailable(Yn,yt,Dt,yn,sn,ln),Kn=await RouteOperator.isRouteSupported(Yn,yt,Dt,yn,sn,ln);Fn.push({name:Yn,supported:Kn,available:er})}Cn&&it(setRoutes(Fn))})(),()=>{Cn=!1})},[it,yt,Dt,yn,sn,ln]);const Zn=reactExports.useMemo(()=>pt?pt.filter(Qn=>Qn.supported):[],[pt]);return Zn&&Zn.length>0?jsxRuntimeExports.jsx(BridgeCollapse,{title:"Route",disabled:dt,banner:jsxRuntimeExports.jsx(Banner,{}),disableCollapse:!0,startClosed:!1,onCollapseChange:()=>{},controlStyle:CollapseControlStyle.None,children:jsxRuntimeExports.jsx(Options,{active:ht,onSelect:hn,collapsable:!0,collapsed:!1,children:Zn.map(({name:Cn,available:Qn})=>({key:Cn,disabled:!Qn,child:jsxRuntimeExports.jsx(RouteOption,{disabled:!Qn,route:RoutesConfig[Cn]})}))})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}const useStyles$I=makeStyles()(()=>({container:{display:"flex",flexDirection:"column",gap:"8px",width:"100%"},amounts:{display:"flex",justifyContent:"space-between",alignItems:"center"},amountDisplay:{display:"flex",alignItems:"center",gap:"8px"}}));function label(it,dt,ht,pt){return jsxRuntimeExports.jsxs("div",{children:[toFixedDecimals(`${it}`,4)," ",dt,jsxRuntimeExports.jsx("br",{}),toFixedDecimals(`${ht}`,4)," ",pt]})}const PrettoSlider=styled$1(Slider$1)(({color1:it,color2:dt})=>({color:it,height:8,"& .MuiSlider-rail":{height:"4px",backgroundColor:dt},"& .MuiSlider-track":{height:"6px"},"& .MuiSlider-thumb":{height:28,width:28,backgroundColor:"#fff"}}));function formatAmount(it){if(!it)return 0;let dt=toFixedDecimals(`${it}`,6);return it<1e-6&&(dt="0"),Number.parseFloat(dt)}const INITIAL_STATE={disabled:!1,min:0,max:0,nativeGas:0,nativeGasPrice:"",token:formatAmount(),tokenPrice:"",swapAmt:0,conversionRate:void 0};function GasSlider(it){const{classes:dt}=useStyles$I(),ht=useDispatch(),{token:pt,toChain:yt,amount:Dt,route:sn,destToken:ln}=useSelector(Un=>Un.transferInput),[mn]=o(Dt,500),{maxSwapAmt:hn,relayerFee:yn}=useSelector(Un=>Un.relay),Zn=reactExports.useMemo(()=>Number.parseFloat(mn)-(yn||0),[mn,yn]),{receiving:Cn}=useSelector(Un=>Un.wallet),{usdPrices:{data:Qn}}=useSelector(Un=>Un.tokenPrices),Fn=Qn||{},Hn=CHAINS$1[yt],Yn=TOKENS[pt],er=TOKENS[ln],Kn=TOKENS[Hn.gasToken],[Xn,fr]=reactExports.useState(INITIAL_STATE),[or]=o(Xn.swapAmt,500),[ar,jn]=reactExports.useState(it.disabled);reactExports.useEffect(()=>{if(!Zn||Zn===0||!hn||!sn||!RouteOperator.getRoute(sn).NATIVE_GAS_DROPOFF_SUPPORTED)return;let Un=Zn&&hn&&Math.max(Math.min(hn,Zn),0);if(Un){const pr=RouteOperator.getRoute(sn).getMinSendAmount({toNativeToken:Un,relayerFee:yn}),sr=Math.max(pr-Zn-(yn||0),0);Un=Math.max(Math.min(hn,Zn-sr),0)}const ir=Zn-Xn.swapAmt;Un===0&&jn(!0),fr(pr=>({...pr,disabled:Zn<=0||Un===0,token:formatAmount(ir),tokenPrice:calculateUSDPrice(formatAmount(ir),Fn,TOKENS[pt]),max:formatAmount(Un)}))},[yn,hn,Zn,sn,Xn.swapAmt,Qn,pt]),reactExports.useEffect(()=>{if(!yt||!Yn||!sn||!RouteOperator.getRoute(sn).NATIVE_GAS_DROPOFF_SUPPORTED||!Cn.address||!er)return;let Un=!1;return(async()=>{var Jn;const ir=er.tokenId;try{const rr=await RouteOperator.maxSwapAmount(sn,yt,ir,Cn.address);if(Un)return;if(!rr){ht(setMaxSwapAmt(void 0));return}const _r=getTokenDecimals(wh.toChainId(yt),ir),yr=toDecimals(rr,_r,6);ht(setMaxSwapAmt(Number.parseFloat(yr)))}catch(rr){if(Un)return;if((Jn=rr.message)!=null&&Jn.includes("swap rate not set"))sn===Route.CCTPRelay?ht(setTransferRoute(Route.CCTPManual)):ht(setTransferRoute(Route.Bridge));else throw rr}const{gasToken:pr}=CHAINS$1[yt],sr=await getConversion(pt,pr);if(Un)return;const Ar=await RouteOperator.minSwapAmountNative(sn,yt,ir,Cn.address),br=Number.parseFloat(toDecimals(Ar,getTokenDecimals(wh.toChainId(yt),"native")));if(Un)return;const wr=sr?br/sr:0;fr(rr=>({...rr,conversionRate:sr,min:wr}))})(),()=>{Un=!0}},[Yn,er,Cn,yt,sn,pt,ln,ht]);function cr(Un){const{children:ir,...pr}=Un;return jsxRuntimeExports.jsxs(SliderThumb,{...pr,children:[ir,jsxRuntimeExports.jsx(TokenIcon,{icon:Kn.icon,height:16})]})}const Wn=Un=>{jn(Un),Un&&(fr(ir=>({...ir,swapAmt:0,nativeGas:0,nativeGasPrice:"",token:formatAmount(Zn),tokenPrice:calculateUSDPrice(formatAmount(Zn),Fn,TOKENS[pt])})),ht(setReceiveNativeAmt(0)))},hr=Un=>{if(!Zn||!Xn.conversionRate)return;const ir=Un.target.value<Xn.min?0:Un.target.value,pr=ir*Xn.conversionRate,sr=Zn-ir,Ar=ir,br={nativeGas:formatAmount(pr),nativeGasPrice:calculateUSDPrice(formatAmount(pr),Fn,Kn),token:formatAmount(sr),tokenPrice:calculateUSDPrice(formatAmount(sr),Fn,TOKENS[pt]),swapAmt:formatAmount(Ar)};fr(wr=>({...wr,...br}))};reactExports.useEffect(()=>{let Un=!1;return(async()=>{if(!er||!Yn||!sn||!Cn.address)return;ht(setToNativeToken(or));const ir=er.tokenId,pr=getTokenDecimals(wh.toChainId(yt),ir),sr=parseUnits(`${or}`,pr),Ar=await RouteOperator.nativeTokenAmount(sn,yt,ir,sr,Cn.address);if(Un)return;const br=getTokenDecimals(wh.toChainId(yt),"native"),wr=Number.parseFloat(toDecimals(Ar.toString(),br,6));ht(setReceiveNativeAmt(wr)),fr(Jn=>({...Jn,nativeGas:wr,nativeGasPrice:calculateUSDPrice(wr,Fn,Kn),token:formatAmount(Zn-or),tokenPrice:calculateUSDPrice(formatAmount(Zn-or),Fn,TOKENS[pt])}))})(),()=>{Un=!0}},[or,ht,Kn,Cn.address,Yn,er,yt,sn,Zn,Qn,pt]);const ur=THEME.success[100],Gn=!it.disabled&&!!sn&&jsxRuntimeExports.jsx(Banner,{text:"This feature provided by",route:RoutesConfig[sn]});return jsxRuntimeExports.jsx(BridgeCollapse,{title:"Native gas",banner:Gn,disabled:it.disabled||Xn.disabled,startClosed:it.disabled,controlStyle:CollapseControlStyle.Switch,controlled:!0,value:ar,onCollapseChange:Wn,children:jsxRuntimeExports.jsx(InputContainer,{styles:{width:"100%",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",boxShadow:"none"},children:Yn&&Kn&&Hn?jsxRuntimeExports.jsxs("div",{className:dt.container,children:[jsxRuntimeExports.jsxs("div",{children:["Would you like to receive some native gas token (",getDisplayName(Kn),")?"]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(PrettoSlider,{slots:{thumb:cr},"aria-label":"Native gas conversion amount",defaultValue:0,value:Xn.swapAmt,color1:Kn.color??ur,color2:Yn.color??ur,step:1e-6,min:0,max:Xn.max,valueLabelFormat:()=>label(Xn.nativeGas,getDisplayName(Kn),Xn.token,getDisplayName(TOKENS[pt])),valueLabelDisplay:"auto",onChange:hr,marks:Xn.min?[{value:Xn.min,label:"Min"}]:void 0}),jsxRuntimeExports.jsxs("div",{className:dt.amounts,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:dt.amountDisplay,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:Kn.icon,height:16}),jsxRuntimeExports.jsxs("div",{children:[Xn.nativeGas," ",getDisplayName(Kn)]})]}),jsxRuntimeExports.jsx(Price,{textAlign:"right",children:Xn.nativeGasPrice})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:dt.amountDisplay,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:Yn.icon,height:16}),Xn.token," ",getDisplayName(Yn)]}),jsxRuntimeExports.jsx(Price,{textAlign:"right",children:Xn.tokenPrice})]})]})]})]}):jsxRuntimeExports.jsx("div",{})})})}const useStyles$H=makeStyles()(it=>({row:{display:"flex",justifyContent:"space-between",alignItems:"center",margin:"4px 0"},rowTitle:{fontSize:"14px",opacity:"70%"},arrow:{height:"24px",marginLeft:"8px",transition:"transform 0.4s"},invert:{transform:"rotate(180deg)"},subrow:{marginLeft:"16px"},subrowText:{fontSize:"14px"}}));function RenderRows(it){const{classes:dt}=useStyles$H(),[ht,pt]=React.useState(!0),yt=()=>pt(Dt=>!Dt);return jsxRuntimeExports.jsx("div",{children:it.rows.map((Dt,sn)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:dt.row,style:{cursor:Dt.rows?"pointer":"default"},onClick:()=>Dt.rows&&yt(),children:[jsxRuntimeExports.jsxs("div",{className:dt.row,children:[jsxRuntimeExports.jsx("span",{className:dt.rowTitle,children:Dt.title}),Dt.rows&&jsxRuntimeExports.jsx(DownIcon,{className:joinClass([dt.arrow,!ht&&dt.invert])})]}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:`${it.small&&dt.subrowText}`,children:Dt.value}),jsxRuntimeExports.jsx(Price,{textAlign:"right",children:Dt.valueUSD})]})]}),jsxRuntimeExports.jsx("div",{children:Dt.rows&&jsxRuntimeExports.jsx(Collapse$1,{in:!ht,children:jsxRuntimeExports.jsx("div",{className:dt.subrow,children:jsxRuntimeExports.jsx(RenderRows,{rows:Dt.rows,small:!0})})})})]},sn))})}const defaultPrices={};function Preview(it){const dt=useDispatch(),ht=useTheme(),[pt,yt]=React.useState({rows:[]}),{token:Dt,destToken:sn,amount:ln,fromChain:mn,toChain:hn,route:yn,receiveAmount:Zn,gasEst:Cn}=useSelector(Xn=>Xn.transferInput),{toNativeToken:Qn,receiveNativeAmt:Fn,relayerFee:Hn}=useSelector(Xn=>Xn.relay),Yn=useSelector(Xn=>Xn.porticoBridge),{usdPrices:{data:er}}=useSelector(Xn=>Xn.tokenPrices),Kn=er||defaultPrices;return reactExports.useEffect(()=>{(async()=>{if(!mn||!yn)return;const fr=hn&&CHAINS$1[mn],or=hn&&CHAINS$1[hn],ar=Dt&&TOKENS[Dt],jn=sn&&TOKENS[sn];if(!ar||!jn||!fr||!or)return;const cr=isPorticoRoute(yn)?Yn:{toNativeToken:Qn,receiveNativeAmt:Fn,relayerFee:Hn},Wn=await RouteOperator.getPreview(yn,ar,jn,Number.parseFloat(ln),mn,hn,Cn.send,Cn.claim,Zn.data||"",Kn,cr);yt({rows:Wn})})()},[Dt,sn,ln,mn,hn,yn,Zn,Qn,Fn,Yn,Cn,dt,Hn,Kn]),reactExports.useEffect(()=>{(async()=>{if(!(!Dt||!mn||!hn||!yn||!RouteOperator.getRoute(yn).AUTOMATIC_DEPOSIT))try{const or=Dt&&TOKENS[Dt];if(!or)return;const ar=await RouteOperator.getRelayerFee(yn,mn,hn,Dt,sn),jn=getTokenDecimals(toChainId(mn),or.tokenId||"native"),cr=Number.parseFloat(toDecimals(ar,jn,6));dt(setRelayerFee$1(cr))}catch(or){if(or.message===TokenNotSupportedForRelayError.MESSAGE||or.message===TokenNotRegisteredError.MESSAGE)yn===Route.CCTPRelay?dt(setTransferRoute(Route.CCTPManual)):dt(setTransferRoute(Route.Bridge));else throw or}})()},[yn,Dt,sn,hn,mn,dt]),jsxRuntimeExports.jsx(BridgeCollapse,{title:"Preview",disabled:it.collapsed,controlled:!0,value:it.collapsed,controlStyle:CollapseControlStyle.None,children:jsxRuntimeExports.jsx(InputContainer,{styles:{boxShadow:"none",borderTopLeftRadius:"0",borderTopRightRadius:"0"},bg:ht.palette.options.select,children:jsxRuntimeExports.jsx(RenderRows,{rows:pt.rows})})})}const useStyles$G=makeStyles()(it=>({button:{width:"100%",backgroundColor:it.palette.button.primary,color:it.palette.button.primaryText,borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center",padding:"12px 64px",cursor:"pointer",textAlign:"center"},disabled:{cursor:"not-allowed",clickEvents:"none",backgroundColor:it.palette.button.disabled+" !important",color:it.palette.button.disabledText+" !important"},elevated:{boxShadow:it.palette.card.elevation},action:{backgroundColor:it.palette.button.action,color:it.palette.button.actionText},link:{backgroundColor:"transparent"}}));function Button(it){const{classes:dt}=useStyles$G(),ht=pt=>{it.onClick&&!it.disabled&&it.onClick(pt)};return jsxRuntimeExports.jsx("div",{className:joinClass([dt.button,!!it.elevated&&dt.elevated,!!it.action&&dt.action,!!it.link&&dt.link,!!it.disabled&&dt.disabled]),onClick:ht,children:it.children})}const AlertIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M12.0003 9.99993V13.7499M2.69731 17.1259C1.83131 18.6259 2.91431 20.4999 4.64531 20.4999H19.3553C21.0853 20.4999 22.1683 18.6259 21.3033 17.1259L13.9493 4.37793C13.0833 2.87793 10.9173 2.87793 10.0513 4.37793L2.69731 17.1259ZM12.0003 16.7499H12.0073V16.7579H12.0003V16.7499Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),"Alert"),useStyles$F=makeStyles()(it=>({base:{width:"100%",padding:"8px",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"10px",borderRadius:"8px"},error:{backgroundColor:it.palette.error[500]+OPACITY[25]},warning:{backgroundColor:it.palette.warning[500]+OPACITY[25]}}));function AlertBanner(it){const{classes:dt}=useStyles$F();return jsxRuntimeExports.jsx(Collapse$1,{in:it.show&&!!it.content,unmountOnExit:!0,children:jsxRuntimeExports.jsxs("div",{className:joinClass([dt.base,!!it.warning&&dt.warning,!!it.error&&dt.error]),style:{margin:it.margin||0},children:[jsxRuntimeExports.jsx(AlertIcon,{}),it.content]})})}const getGasFallback=(it,dt,ht)=>{var ln;const pt=wh.toChainName(it),yt=(ln=GAS_ESTIMATES[pt])==null?void 0:ln[dt];if(!yt||!yt[ht])return BigNumber$2.from(0);const Dt=BigNumber$2.from(yt[ht]);return CHAINS$1[pt].context===Context.ETH?parseUnits(Dt.toString(),"gwei"):Dt},estimateSendGas=async(it,dt,ht,pt,yt,Dt,sn,ln)=>{let mn;try{mn=await RouteOperator.getRoute(it).estimateSendGas(dt,ht,pt,yt,Dt,sn,ln)}catch{dt===NATIVE?mn=getGasFallback(pt,it,"sendNative"):mn=getGasFallback(pt,it,"sendToken")}if(!mn)throw new Error("could not estimate send gas");return formatGasFee(pt,mn)},estimateClaimGas=async(it,dt,ht)=>{let pt;try{pt=await RouteOperator.getRoute(it).estimateClaimGas(dt,ht)}catch{pt=getGasFallback(dt,it,"claim")}if(!pt)throw new Error("could not estimate send gas");return formatGasFee(dt,pt)},useStyles$E=makeStyles()(it=>({body:{width:"100%"},tosDisclaimer:{display:"flex",flexDirection:"row",marginBottom:10,marginLeft:16,fontSize:"12px"},link:{...LINK(it),margin:"0 0 0 4px"}}));function Send(it){const{classes:dt}=useStyles$E(),ht=useDispatch(),pt=useSelector(sr=>sr.transferInput),{showValidationState:yt,validations:Dt,fromChain:sn,toChain:ln,token:mn,destToken:hn,amount:yn,route:Zn,isTransactionInProgress:Cn,foreignAsset:Qn,associatedTokenAddress:Fn}=pt,[Hn]=o(yn,500),Yn=useSelector(sr=>sr.wallet),{sending:er,receiving:Kn}=Yn,Xn=useSelector(sr=>sr.relay),{toNativeToken:fr,relayerFee:or}=Xn,ar=useSelector(sr=>sr.porticoBridge),[jn,cr]=reactExports.useState(er.currentAddress.toLowerCase()===er.address.toLowerCase()),[Wn,hr]=reactExports.useState(""),ur=validateSolanaTokenAccount(ln,Qn,Fn,Zn);async function Gn(){if(hr(""),await validate({transferInput:pt,relay:Xn,wallet:Yn,portico:ar},ht),!(!isTransferValid(Dt)||!Zn)){ht(setIsTransactionInProgress(!0));try{const Ar=CHAINS$1[sn];if((Ar==null?void 0:Ar.context)===Context.ETH){registerWalletSigner(sn,TransferWallet.SENDING);const yr=Ar.chainId;if(typeof yr!="number")throw new Error("invalid evm chain ID");await switchChain(yr,TransferWallet.SENDING)}(Ar==null?void 0:Ar.context)===Context.COSMOS&&await switchChain(Ar.chainId,TransferWallet.SENDING);const wr=TOKENS[mn].tokenId,Jn=isPorticoRoute(Zn)?ar:{toNativeToken:fr},rr=await RouteOperator.send(Zn,wr||"native",`${yn}`,sn,er.address,ln,Kn.address,hn,Jn);let _r;for(;_r===void 0;){try{_r=await RouteOperator.getMessage(Zn,rr,sn,!0)}catch(yr){console.error(yr)}_r===void 0&&await sleep(3e3)}ht(setIsTransactionInProgress(!1)),ht(setSendTx(rr)),ht(setTxDetails(_r)),ht(setRoute$1(Zn)),ht(setRoute("redeem")),hr("")}catch(Ar){console.error(Ar),ht(setIsTransactionInProgress(!1)),hr((Ar==null?void 0:Ar.message)===INSUFFICIENT_ALLOWANCE?"Error due to insufficient token allowance, please try again":(Ar==null?void 0:Ar.message)===SWAP_ERROR?SWAP_ERROR:"Error with transfer, please try again")}}}const Un=reactExports.useCallback(async()=>{const sr=TOKENS[mn];if(!Zn||!sr)return;const Ar=sr.tokenId,br=await estimateSendGas(Zn,Ar||"native",(Hn||0).toString(),sn,er.address,ln,Kn.address,{relayerFee:or,toNativeToken:fr});ht(setSendingGasEst(br))},[mn,Hn,sn,er,ln,Kn,fr,or,ht,Zn]),ir=reactExports.useCallback(async()=>{if(!Zn||!ln)return;const sr=await estimateClaimGas(Zn,ln,void 0);ht(setClaimGasEst(sr))},[ln,Zn,ht]);reactExports.useEffect(()=>{isTransferValid(Dt)&&(Un(),ir())},[Dt,ir,Un]),reactExports.useEffect(()=>{cr(er.currentAddress.toLowerCase()===er.address.toLowerCase())},[er]);const pr=reactExports.useMemo(()=>{if(!Zn)return!1;const sr=RouteOperator.getRoute(Zn);return!(sr.AUTOMATIC_DEPOSIT||ln&&isGatewayChain(ln)||ln==="sei"||isPorticoRoute(sr.TYPE))},[Zn,ln]);return jsxRuntimeExports.jsxs("div",{className:dt.body,children:[!!it.valid&&jsxRuntimeExports.jsx(AlertBanner,{show:yt&&!!it.valid&&pr,content:"This transfer requires two transactions: one on the source chain and one on the destination chain. You will need gas on the destination chain.",warning:!0,margin:"0 0 16px 0"}),jsxRuntimeExports.jsx(AlertBanner,{show:!!Wn,content:Wn,error:!0,margin:"0 0 16px 0"}),it.valid&&!jn?jsxRuntimeExports.jsxs(Button,{disabled:!0,elevated:!0,children:["Connect to ",displayWalletAddress(er.type,er.address)]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:dt.tosDisclaimer,children:["By proceeding, you agree to the",jsxRuntimeExports.jsx("span",{className:dt.link,onClick:()=>ht(setRoute("terms")),rel:"noreferrer",children:"Terms of Use"})]}),jsxRuntimeExports.jsx(Button,{onClick:Gn,action:it.valid,disabled:Cn||!!ur,elevated:!0,children:Cn?jsxRuntimeExports.jsx(CircularProgress$1,{size:22}):"Approve and proceed with transaction"})]})]})}const useStyles$D=makeStyles()((it,{align:dt,fontSize:ht})=>({title:{fontSize:`${ht}px`,width:"100%",textAlign:dt,fontFamily:it.palette.font.header,[it.breakpoints.down("sm")]:{fontSize:"24px"}}}));function Header$1(it){const dt={align:it.align||"center",fontSize:it.size||42},{classes:ht}=useStyles$D(dt);return jsxRuntimeExports.jsx("div",{className:ht.title,children:it.text})}const MenuIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M3.75 6.75H20.25M3.75 12H20.25M12 17.25H20.25",fill:"none",stroke:"currentColor",strokeOpacity:"0.6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),"Menu"),CloseIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M12 0C5.38338 0 0 5.38338 0 12C0 18.6166 5.38338 24 12 24C18.6166 24 24 18.6166 24 12C24 5.38338 18.6166 0 12 0ZM12 1.84615C17.6188 1.84615 22.1538 6.38123 22.1538 12C22.1538 17.6188 17.6188 22.1538 12 22.1538C6.38123 22.1538 1.84615 17.6188 1.84615 12C1.84615 6.38123 6.38123 1.84615 12 1.84615ZM8.51077 7.18154L7.18154 8.51077L10.6745 12L7.18338 15.4892L8.51262 16.8185L12 13.3265L15.4892 16.8157L16.8185 15.4892L13.3265 12L16.8157 8.51077L15.4892 7.18154L12 10.6745L8.51077 7.18338V7.18154Z",fill:"currentColor",fillOpacity:"0.9"}),"Close"),useStyles$C=makeStyles()((it,{width:dt})=>({dialog:{zIndex:10},container:{position:"relative",width:"100%",margin:"0 auto",display:"flex",justifyContent:"center"},modal:{width:"100%",maxWidth:`${dt}px`,margin:"40px auto",padding:"24px",textAlign:"center",position:"relative",[it.breakpoints.down("sm")]:{margin:"20px auto",padding:"24px 12px"},maxHeight:"calc( 100vh - 80px )"},close:{position:"absolute",top:"28px",right:"28px",cursor:"pointer",opacity:"70%",zIndex:"10",[it.breakpoints.down("sm")]:{top:"12px",right:"20px"}},background:{background:it.palette.modal.background}}));function Modal({open:it,width:dt,closable:ht,children:pt,onClose:yt}){const{classes:Dt}=useStyles$C({width:dt}),sn=reactExports.useCallback(ln=>{ln.stopPropagation()},[]);return jsxRuntimeExports.jsx(Dialog$1,{open:it,sx:{borderRadius:8},className:Dt.dialog,fullWidth:!0,fullScreen:!0,children:jsxRuntimeExports.jsx(ScopedCssBaseline$1,{enableColorScheme:!0,children:jsxRuntimeExports.jsxs("div",{className:Dt.container,onClick:yt,children:[ht&&jsxRuntimeExports.jsx(CloseIcon,{sx:{fontSize:32},className:Dt.close,onClick:yt}),jsxRuntimeExports.jsx("div",{className:Dt.modal,onClick:sn,children:pt})]})})})}function Spacer(it){return jsxRuntimeExports.jsx("div",{style:{height:`${it.height||24}px`}})}function WormholeLogo(it){return jsxRuntimeExports.jsxs("svg",{width:"227",height:"24",viewBox:"0 0 227 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M1.23295 17V6.81818H4.6733C5.47206 6.81818 6.125 6.96236 6.6321 7.25071C7.14252 7.53575 7.52036 7.92188 7.76562 8.40909C8.01089 8.89631 8.13352 9.43987 8.13352 10.0398C8.13352 10.6397 8.01089 11.1849 7.76562 11.6754C7.52367 12.166 7.14915 12.5571 6.64205 12.8487C6.13494 13.1371 5.48532 13.2812 4.69318 13.2812H2.22727V12.1875H4.65341C5.20028 12.1875 5.63944 12.093 5.97088 11.9041C6.30232 11.7152 6.54261 11.46 6.69176 11.1385C6.84422 10.8137 6.92045 10.4474 6.92045 10.0398C6.92045 9.6321 6.84422 9.26752 6.69176 8.94602C6.54261 8.62453 6.30066 8.37263 5.96591 8.19034C5.63116 8.00473 5.18703 7.91193 4.63352 7.91193H2.46591V17H1.23295ZM12.9808 17.1591C12.2914 17.1591 11.6866 16.995 11.1662 16.6669C10.6491 16.3388 10.2448 15.8797 9.95312 15.2898C9.66477 14.6998 9.5206 14.0104 9.5206 13.2216C9.5206 12.4261 9.66477 11.7318 9.95312 11.1385C10.2448 10.5452 10.6491 10.0845 11.1662 9.75639C11.6866 9.42827 12.2914 9.2642 12.9808 9.2642C13.6702 9.2642 14.2734 9.42827 14.7905 9.75639C15.3108 10.0845 15.7152 10.5452 16.0036 11.1385C16.2952 11.7318 16.4411 12.4261 16.4411 13.2216C16.4411 14.0104 16.2952 14.6998 16.0036 15.2898C15.7152 15.8797 15.3108 16.3388 14.7905 16.6669C14.2734 16.995 13.6702 17.1591 12.9808 17.1591ZM12.9808 16.1051C13.5045 16.1051 13.9354 15.9709 14.2734 15.7024C14.6115 15.4339 14.8617 15.081 15.0241 14.6435C15.1866 14.206 15.2678 13.732 15.2678 13.2216C15.2678 12.7112 15.1866 12.2356 15.0241 11.7947C14.8617 11.3539 14.6115 10.9976 14.2734 10.7259C13.9354 10.4541 13.5045 10.3182 12.9808 10.3182C12.4571 10.3182 12.0263 10.4541 11.6882 10.7259C11.3501 10.9976 11.0999 11.3539 10.9375 11.7947C10.7751 12.2356 10.6939 12.7112 10.6939 13.2216C10.6939 13.732 10.7751 14.206 10.9375 14.6435C11.0999 15.081 11.3501 15.4339 11.6882 15.7024C12.0263 15.9709 12.4571 16.1051 12.9808 16.1051ZM19.7024 17L17.3757 9.36364H18.6087L20.2592 15.2102H20.3388L21.9695 9.36364H23.2223L24.8331 15.1903H24.9126L26.5632 9.36364H27.7962L25.4695 17H24.3161L22.6456 11.1335H22.5263L20.8558 17H19.7024ZM32.2892 17.1591C31.5534 17.1591 30.9187 16.9967 30.3851 16.6719C29.8548 16.3438 29.4455 15.8864 29.1571 15.2997C28.8721 14.7098 28.7296 14.0237 28.7296 13.2415C28.7296 12.4593 28.8721 11.7699 29.1571 11.1733C29.4455 10.5734 29.8465 10.1061 30.3603 9.77131C30.8773 9.43324 31.4805 9.2642 32.1699 9.2642C32.5676 9.2642 32.9604 9.33049 33.3482 9.46307C33.736 9.59564 34.089 9.81108 34.4071 10.1094C34.7253 10.4044 34.9789 10.7955 35.1678 11.2827C35.3567 11.7699 35.4512 12.3698 35.4512 13.0824V13.5795H29.5648V12.5653H34.258C34.258 12.1345 34.1718 11.75 33.9995 11.4119C33.8304 11.0739 33.5885 10.8071 33.2736 10.6115C32.9621 10.416 32.5942 10.3182 32.1699 10.3182C31.7026 10.3182 31.2982 10.4342 30.9569 10.6662C30.6188 10.8949 30.3586 11.1932 30.1763 11.5611C29.994 11.929 29.9029 12.3234 29.9029 12.7443V13.4205C29.9029 13.9972 30.0023 14.486 30.2012 14.8871C30.4033 15.2848 30.6834 15.5881 31.0414 15.7969C31.3993 16.0024 31.8153 16.1051 32.2892 16.1051C32.5975 16.1051 32.8759 16.062 33.1245 15.9759C33.3764 15.8864 33.5935 15.7538 33.7757 15.5781C33.958 15.3991 34.0989 15.1771 34.1983 14.9119L35.3319 15.2301C35.2125 15.6146 35.012 15.9527 34.7303 16.2443C34.4486 16.5327 34.1006 16.758 33.6863 16.9205C33.272 17.0795 32.8063 17.1591 32.2892 17.1591ZM37.236 17V9.36364H38.3695V10.517H38.449C38.5882 10.1392 38.8401 9.83262 39.2047 9.5973C39.5693 9.36198 39.9803 9.24432 40.4377 9.24432C40.5239 9.24432 40.6316 9.24597 40.7608 9.24929C40.8901 9.2526 40.9879 9.25758 41.0542 9.2642V10.4574C41.0144 10.4474 40.9232 10.4325 40.7807 10.4126C40.6415 10.3894 40.494 10.3778 40.3382 10.3778C39.967 10.3778 39.6356 10.4557 39.3439 10.6115C39.0556 10.764 38.8269 10.9761 38.6578 11.2479C38.4921 11.5163 38.4093 11.8229 38.4093 12.1676V17H37.236ZM45.4142 17.1591C44.6784 17.1591 44.0437 16.9967 43.5101 16.6719C42.9798 16.3438 42.5705 15.8864 42.2821 15.2997C41.9971 14.7098 41.8546 14.0237 41.8546 13.2415C41.8546 12.4593 41.9971 11.7699 42.2821 11.1733C42.5705 10.5734 42.9715 10.1061 43.4853 9.77131C44.0023 9.43324 44.6055 9.2642 45.2949 9.2642C45.6926 9.2642 46.0854 9.33049 46.4732 9.46307C46.861 9.59564 47.214 9.81108 47.5321 10.1094C47.8503 10.4044 48.1039 10.7955 48.2928 11.2827C48.4817 11.7699 48.5762 12.3698 48.5762 13.0824V13.5795H42.6898V12.5653H47.383C47.383 12.1345 47.2968 11.75 47.1245 11.4119C46.9554 11.0739 46.7135 10.8071 46.3986 10.6115C46.0871 10.416 45.7192 10.3182 45.2949 10.3182C44.8276 10.3182 44.4232 10.4342 44.0819 10.6662C43.7438 10.8949 43.4836 11.1932 43.3013 11.5611C43.119 11.929 43.0279 12.3234 43.0279 12.7443V13.4205C43.0279 13.9972 43.1273 14.486 43.3262 14.8871C43.5283 15.2848 43.8084 15.5881 44.1664 15.7969C44.5243 16.0024 44.9403 16.1051 45.4142 16.1051C45.7225 16.1051 46.0009 16.062 46.2495 15.9759C46.5014 15.8864 46.7185 15.7538 46.9007 15.5781C47.083 15.3991 47.2239 15.1771 47.3233 14.9119L48.4569 15.2301C48.3375 15.6146 48.137 15.9527 47.8553 16.2443C47.5736 16.5327 47.2256 16.758 46.8113 16.9205C46.397 17.0795 45.9313 17.1591 45.4142 17.1591ZM53.2445 17.1591C52.6081 17.1591 52.0463 16.9983 51.5591 16.6768C51.0719 16.352 50.6908 15.8946 50.4157 15.3047C50.1406 14.7114 50.003 14.0104 50.003 13.2017C50.003 12.3996 50.1406 11.7036 50.4157 11.1136C50.6908 10.5237 51.0736 10.0679 51.5641 9.74645C52.0546 9.42495 52.6214 9.2642 53.2644 9.2642C53.7615 9.2642 54.1543 9.34706 54.4426 9.51278C54.7343 9.67519 54.9564 9.8608 55.1088 10.0696C55.2646 10.2751 55.3856 10.4441 55.4718 10.5767H55.5712V6.81818H56.7445V17H55.611V15.8267H55.4718C55.3856 15.9659 55.263 16.1416 55.1039 16.3537C54.9448 16.5625 54.7177 16.7498 54.4228 16.9155C54.1278 17.0779 53.735 17.1591 53.2445 17.1591ZM53.4036 16.1051C53.8742 16.1051 54.272 15.9825 54.5968 15.7372C54.9216 15.4886 55.1685 15.1456 55.3375 14.7081C55.5066 14.2673 55.5911 13.7585 55.5911 13.1818C55.5911 12.6117 55.5082 12.1129 55.3425 11.6854C55.1768 11.2545 54.9315 10.9197 54.6067 10.6811C54.2819 10.4392 53.8809 10.3182 53.4036 10.3182C52.9064 10.3182 52.4921 10.4458 52.1607 10.701C51.8326 10.9529 51.5856 11.2959 51.4199 11.7301C51.2575 12.161 51.1763 12.6449 51.1763 13.1818C51.1763 13.7254 51.2592 14.2192 51.4249 14.6634C51.5939 15.1042 51.8425 15.4555 52.1706 15.7173C52.5021 15.9759 52.9131 16.1051 53.4036 16.1051ZM63.1529 17V6.81818H66.7125C67.4218 6.81818 68.0068 6.94081 68.4675 7.18608C68.9282 7.42803 69.2712 7.7545 69.4966 8.16548C69.722 8.57315 69.8347 9.02557 69.8347 9.52273C69.8347 9.96023 69.7568 10.3215 69.601 10.6065C69.4486 10.8916 69.2464 11.117 68.9945 11.2827C68.7459 11.4484 68.4758 11.571 68.1841 11.6506V11.75C68.4957 11.7699 68.8089 11.8793 69.1238 12.0781C69.4386 12.277 69.7021 12.562 69.9142 12.9332C70.1264 13.3045 70.2324 13.7585 70.2324 14.2955C70.2324 14.8059 70.1164 15.2649 69.8844 15.6726C69.6524 16.0803 69.2862 16.4034 68.7857 16.642C68.2852 16.8807 67.6339 17 66.8319 17H63.1529ZM64.3858 15.9062H66.8319C67.6373 15.9062 68.209 15.7505 68.5471 15.4389C68.8884 15.1241 69.0591 14.7429 69.0591 14.2955C69.0591 13.9508 68.9713 13.6326 68.7956 13.3409C68.62 13.0459 68.3697 12.8106 68.0449 12.6349C67.7201 12.456 67.3356 12.3665 66.8915 12.3665H64.3858V15.9062ZM64.3858 11.2926H66.6728C67.044 11.2926 67.3787 11.2197 67.677 11.0739C67.9786 10.928 68.2173 10.7225 68.3929 10.4574C68.5719 10.1922 68.6614 9.88068 68.6614 9.52273C68.6614 9.07528 68.5056 8.69579 68.1941 8.38423C67.8825 8.06937 67.3887 7.91193 66.7125 7.91193H64.3858V11.2926ZM72.8549 19.8636C72.6561 19.8636 72.4788 19.8471 72.323 19.8139C72.1672 19.7841 72.0595 19.7543 71.9998 19.7244L72.2981 18.6903C72.5832 18.7633 72.835 18.7898 73.0538 18.7699C73.2725 18.75 73.4664 18.6522 73.6355 18.4766C73.8078 18.3042 73.9653 18.0241 74.1078 17.6364L74.3265 17.0398L71.5027 9.36364H72.7754L74.8833 15.4489H74.9629L77.0708 9.36364H78.3436L75.1021 18.1136C74.9563 18.508 74.7756 18.8345 74.5602 19.093C74.3448 19.3549 74.0945 19.5488 73.8095 19.6747C73.5278 19.8007 73.2096 19.8636 72.8549 19.8636Z",fill:it.color,fillOpacity:"0.6"}),jsxRuntimeExports.jsx("path",{d:"M133.698 7.32755L130.547 16.1698C130.533 16.2126 130.504 16.2492 130.466 16.2741C130.429 16.2989 130.383 16.3104 130.338 16.3069H130.099C130.054 16.3087 130.009 16.2965 129.971 16.2719C129.933 16.2474 129.903 16.2117 129.886 16.1698L127.524 9.96839L125.166 16.1698C125.15 16.2118 125.121 16.2476 125.084 16.2723C125.046 16.2969 125.001 16.309 124.956 16.3069H124.714C124.669 16.3094 124.624 16.2974 124.586 16.2727C124.549 16.248 124.52 16.212 124.505 16.1698L121.354 7.33064C121.305 7.19361 121.358 7.10844 121.492 7.10844H122.467C122.513 7.10384 122.559 7.1149 122.598 7.13982C122.636 7.16473 122.665 7.202 122.68 7.24548L124.926 13.9401L127.21 7.80911C127.226 7.76689 127.255 7.7309 127.294 7.70629C127.332 7.68168 127.377 7.6697 127.423 7.67207H127.628C127.673 7.66981 127.717 7.68189 127.755 7.70654C127.793 7.73119 127.821 7.76713 127.837 7.80911L130.188 13.9401L132.382 7.24548C132.397 7.202 132.426 7.16473 132.464 7.13982C132.503 7.1149 132.549 7.10384 132.595 7.10844H133.556C133.694 7.10844 133.746 7.19361 133.698 7.32755",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M147.413 11.6335C147.404 12.5442 147.124 13.432 146.608 14.1849C146.091 14.9379 145.362 15.5225 144.512 15.865C143.661 16.2075 142.728 16.2926 141.829 16.1096C140.93 15.9266 140.105 15.4837 139.46 14.8366C138.814 14.1896 138.375 13.3673 138.199 12.4735C138.024 11.5796 138.118 10.6541 138.471 9.81351C138.825 8.97292 139.421 8.25486 140.184 7.74975C140.948 7.24465 141.845 6.9751 142.763 6.97506C143.38 6.96645 143.992 7.0814 144.563 7.31303C145.134 7.54465 145.652 7.88819 146.086 8.3231C146.52 8.758 146.861 9.27533 147.089 9.84414C147.317 10.4129 147.427 11.0215 147.413 11.6335V11.6335ZM146.123 11.6335C146.123 9.48971 144.714 8.01328 142.763 8.01328C140.812 8.01328 139.403 9.48971 139.403 11.6335C139.403 13.7773 140.812 15.2537 142.763 15.2537C144.714 15.2537 146.123 13.7773 146.123 11.6335Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M159.728 15.791C159.758 15.8251 159.776 15.8674 159.781 15.9122C159.786 15.9571 159.777 16.0023 159.756 16.0421C159.734 16.0818 159.701 16.1142 159.661 16.1349C159.62 16.1556 159.575 16.1636 159.53 16.158H158.651C158.623 16.1571 158.595 16.1493 158.57 16.1351C158.545 16.1209 158.524 16.1008 158.509 16.0767L156.304 12.7754H153.935V15.973C153.934 16.022 153.915 16.069 153.88 16.1037C153.845 16.1384 153.797 16.1582 153.748 16.1588H152.89C152.84 16.158 152.793 16.1381 152.758 16.1034C152.724 16.0687 152.704 16.0219 152.703 15.973V7.29323C152.704 7.24433 152.724 7.19765 152.759 7.16299C152.793 7.12834 152.84 7.10842 152.89 7.10742H156.265C158.627 7.10742 159.793 8.3392 159.793 9.94105C159.808 10.5776 159.592 11.1982 159.186 11.6907C158.779 12.1833 158.209 12.5153 157.577 12.6268L159.728 15.791ZM156.024 11.7372C157.881 11.7372 158.505 10.9731 158.505 9.94182C158.505 8.91057 157.881 8.14642 156.024 8.14642H153.934V11.7372H156.024Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M174.242 6.96207H174.522C174.547 6.96048 174.572 6.96419 174.595 6.97297C174.619 6.98174 174.64 6.99538 174.658 7.01296C174.675 7.03054 174.689 7.05167 174.698 7.07493C174.707 7.0982 174.711 7.12307 174.709 7.14788V15.9739C174.711 15.9987 174.707 16.0236 174.698 16.0469C174.689 16.0701 174.675 16.0913 174.658 16.1088C174.64 16.1264 174.619 16.1401 174.595 16.1488C174.572 16.1576 174.547 16.1613 174.522 16.1597H173.664C173.639 16.1613 173.613 16.1576 173.59 16.1488C173.567 16.1401 173.545 16.1264 173.528 16.1088C173.51 16.0913 173.496 16.0701 173.487 16.0469C173.478 16.0236 173.475 15.9987 173.476 15.9739V9.70821L170.019 14.6748C170.007 14.6993 169.989 14.7201 169.966 14.7347C169.943 14.7493 169.917 14.7571 169.889 14.7571C169.862 14.7571 169.836 14.7493 169.813 14.7347C169.79 14.7201 169.772 14.6993 169.76 14.6748L166.303 9.70821V15.9732C166.305 15.998 166.301 16.0228 166.292 16.0461C166.284 16.0694 166.27 16.0905 166.252 16.1081C166.234 16.1257 166.213 16.1393 166.19 16.1481C166.166 16.1568 166.141 16.1606 166.116 16.159H165.258C165.233 16.1606 165.208 16.1568 165.184 16.1481C165.161 16.1393 165.14 16.1257 165.122 16.1081C165.104 16.0905 165.09 16.0694 165.082 16.0461C165.073 16.0228 165.069 15.998 165.071 15.9732V7.14711C165.069 7.12229 165.073 7.09743 165.082 7.07416C165.09 7.0509 165.104 7.02977 165.122 7.01219C165.14 6.9946 165.161 6.98097 165.184 6.9722C165.208 6.96342 165.233 6.9597 165.258 6.9613H165.535C165.581 6.96146 165.627 6.97308 165.668 6.99511C165.709 7.01713 165.743 7.04888 165.769 7.08749L169.888 12.7958L174.011 7.08749C174.035 7.04907 174.068 7.01734 174.108 6.99527C174.148 6.9732 174.193 6.96151 174.239 6.9613",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M188.578 7.29323V15.9722C188.577 16.0212 188.557 16.068 188.522 16.1027C188.488 16.1374 188.44 16.1572 188.391 16.158H187.533C187.483 16.1572 187.436 16.1374 187.401 16.1027C187.366 16.068 187.346 16.0212 187.346 15.9722V12.0183H181.668V15.9722C181.667 16.0212 181.647 16.068 181.612 16.1027C181.578 16.1374 181.53 16.1572 181.481 16.158H180.623C180.573 16.1572 180.526 16.1374 180.491 16.1027C180.456 16.068 180.436 16.0212 180.436 15.9722V7.29323C180.436 7.2442 180.456 7.1974 180.491 7.16273C180.526 7.12805 180.573 7.10822 180.623 7.10742H181.481C181.53 7.10822 181.578 7.12805 181.612 7.16273C181.647 7.1974 181.667 7.2442 181.668 7.29323V10.98H187.346V7.29323C187.346 7.2442 187.366 7.1974 187.401 7.16273C187.436 7.12805 187.483 7.10822 187.533 7.10742H188.391C188.44 7.10822 188.488 7.12805 188.522 7.16273C188.557 7.1974 188.577 7.2442 188.578 7.29323Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M203.167 11.6335C203.158 12.5442 202.878 13.432 202.361 14.1849C201.845 14.9379 201.116 15.5225 200.266 15.865C199.415 16.2075 198.482 16.2926 197.583 16.1096C196.684 15.9266 195.859 15.4837 195.213 14.8366C194.568 14.1896 194.129 13.3673 193.953 12.4735C193.777 11.5796 193.872 10.6541 194.225 9.81351C194.579 8.97292 195.175 8.25486 195.938 7.74975C196.702 7.24465 197.599 6.9751 198.517 6.97506C199.134 6.96645 199.746 7.0814 200.317 7.31303C200.888 7.54465 201.406 7.88819 201.84 8.3231C202.274 8.758 202.615 9.27533 202.843 9.84414C203.071 10.4129 203.181 11.0215 203.167 11.6335V11.6335ZM201.877 11.6335C201.877 9.48971 200.468 8.01328 198.517 8.01328C196.566 8.01328 195.157 9.48971 195.157 11.6335C195.157 13.7773 196.566 15.2537 198.517 15.2537C200.468 15.2537 201.877 13.7773 201.877 11.6335Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M214.912 15.3048V15.9722C214.914 15.997 214.91 16.0219 214.901 16.0451C214.892 16.0684 214.879 16.0895 214.861 16.1071C214.843 16.1247 214.822 16.1383 214.798 16.1471C214.775 16.1559 214.75 16.1596 214.725 16.158H208.644C208.595 16.1572 208.548 16.1374 208.513 16.1027C208.478 16.068 208.458 16.0212 208.457 15.9722V7.29323C208.458 7.2442 208.478 7.1974 208.513 7.16273C208.548 7.12805 208.595 7.10822 208.644 7.10742H209.502C209.552 7.10842 209.599 7.12834 209.633 7.16299C209.668 7.19765 209.688 7.24433 209.689 7.29323V15.119H214.727C214.752 15.1174 214.777 15.1211 214.801 15.1299C214.824 15.1387 214.846 15.1523 214.863 15.1699C214.881 15.1875 214.895 15.2086 214.904 15.2319C214.912 15.2551 214.916 15.28 214.915 15.3048",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M226.762 15.3052V15.9725C226.763 15.9973 226.759 16.0222 226.751 16.0455C226.742 16.0687 226.728 16.0899 226.71 16.1075C226.693 16.125 226.671 16.1387 226.648 16.1474C226.624 16.1562 226.599 16.1599 226.574 16.1583H220.008C219.958 16.1575 219.911 16.1377 219.876 16.103C219.841 16.0684 219.821 16.0216 219.82 15.9725V7.29359C219.821 7.24456 219.841 7.19776 219.876 7.16309C219.911 7.12841 219.958 7.10858 220.008 7.10778H226.425C226.45 7.10619 226.475 7.10991 226.499 7.11868C226.522 7.12746 226.544 7.14109 226.561 7.15867C226.579 7.17625 226.593 7.19738 226.602 7.22065C226.61 7.24391 226.614 7.26878 226.613 7.29359V7.96097C226.614 7.98578 226.61 8.01065 226.602 8.03391C226.593 8.05718 226.579 8.0783 226.561 8.09589C226.544 8.11347 226.522 8.1271 226.499 8.13588C226.475 8.14465 226.45 8.14837 226.425 8.14678H221.051V10.9804H225.828C225.852 10.9789 225.877 10.9825 225.9 10.991C225.923 10.9996 225.944 11.0129 225.962 11.03C225.979 11.0472 225.993 11.0679 226.002 11.0907C226.011 11.1135 226.015 11.1379 226.014 11.1623V11.8336C226.016 11.8583 226.012 11.883 226.003 11.9061C225.994 11.9292 225.98 11.9502 225.963 11.9677C225.945 11.9852 225.924 11.9987 225.901 12.0075C225.877 12.0163 225.853 12.0201 225.828 12.0186H221.051V15.1194H226.575C226.6 15.1178 226.625 15.1215 226.649 15.1302C226.672 15.139 226.693 15.1527 226.711 15.1702C226.729 15.1878 226.742 15.209 226.751 15.2322C226.76 15.2555 226.764 15.2803 226.762 15.3052",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M101.01 24C97.8272 23.998 94.7753 22.7335 92.5237 20.4839C90.2721 18.2344 89.0049 15.1835 89 12.0008C89.0049 8.81788 90.2721 5.76688 92.5236 3.51709C94.7751 1.2673 97.8271 0.00244275 101.01 0C104.193 0.00244275 107.245 1.2673 109.496 3.51709C111.748 5.76688 113.015 8.81788 113.02 12.0008C113.015 15.1835 111.748 18.2344 109.496 20.4839C107.245 22.7335 104.193 23.998 101.01 24ZM101.01 0.923847C98.072 0.925882 95.2548 2.09328 93.1764 4.1699C91.0981 6.24652 89.9283 9.06277 89.9238 12.0008C89.9267 14.9391 91.096 17.7562 93.1747 19.8329C95.2535 21.9096 98.0716 23.0762 101.01 23.0762C103.948 23.0762 106.767 21.9096 108.845 19.8329C110.924 17.7562 112.093 14.9391 112.096 12.0008C112.092 9.06277 110.922 6.24652 108.844 4.1699C106.765 2.09328 103.948 0.925882 101.01 0.923847V0.923847Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M102.528 22.103C99.891 22.101 97.3626 21.0531 95.4973 19.1892C93.632 17.3254 92.5822 14.7978 92.5781 12.1609C92.5822 9.52399 93.632 6.99637 95.4973 5.13252C97.3626 3.26867 99.891 2.22079 102.528 2.21875C105.165 2.22079 107.693 3.26867 109.559 5.13252C111.424 6.99637 112.474 9.52399 112.478 12.1609C112.474 14.7978 111.424 17.3254 109.559 19.1892C107.693 21.0531 105.165 22.101 102.528 22.103ZM102.528 2.93628C100.081 2.93831 97.7357 3.91065 96.0052 5.63998C94.2747 7.36931 93.3008 9.71443 93.2972 12.1609C93.3012 14.6071 94.2753 16.9518 96.0058 18.6808C97.7362 20.4098 100.082 21.3819 102.528 21.3839C104.974 21.3819 107.32 20.4098 109.05 18.6808C110.781 16.9518 111.755 14.6071 111.759 12.1609C111.755 9.7147 110.781 7.36996 109.05 5.64096C107.32 3.91196 104.974 2.93985 102.528 2.93782V2.93628Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M104.046 20.2045C101.955 20.2029 99.9501 19.3719 98.4711 17.894C96.992 16.4161 96.1595 14.4119 96.1562 12.321C96.1595 10.2301 96.992 8.22586 98.4711 6.74794C99.9501 5.27003 101.955 4.43913 104.046 4.4375C106.137 4.43872 108.142 5.26949 109.621 6.74749C111.1 8.22549 111.933 10.23 111.936 12.321C111.932 14.4119 111.1 16.4161 109.621 17.894C108.142 19.3719 106.137 20.2029 104.046 20.2045V20.2045ZM104.046 4.95023C102.091 4.95145 100.216 5.7282 98.8331 7.11004C97.4501 8.49189 96.6718 10.3659 96.669 12.321C96.6722 14.2758 97.4507 16.1494 98.8337 17.5309C100.217 18.9124 102.091 19.689 104.046 19.6902C106.001 19.689 107.875 18.9124 109.258 17.5309C110.641 16.1494 111.42 14.2758 111.423 12.321C111.42 10.3659 110.642 8.49189 109.259 7.11004C107.876 5.7282 106.001 4.95145 104.046 4.95023V4.95023Z",fill:it.color}),jsxRuntimeExports.jsx("path",{d:"M105.566 18.3055C104.021 18.3043 102.54 17.6904 101.447 16.5984C100.354 15.5064 99.7388 14.0256 99.7363 12.4807C99.7384 10.9355 100.353 9.45427 101.446 8.36196C102.539 7.26965 104.021 6.65552 105.566 6.6543C107.111 6.65552 108.593 7.26965 109.685 8.36196C110.778 9.45427 111.393 10.9355 111.395 12.4807C111.393 14.0256 110.778 15.5064 109.685 16.5984C108.592 17.6904 107.111 18.3043 105.566 18.3055V18.3055ZM105.566 6.96225C104.102 6.96347 102.699 7.54515 101.664 8.57971C100.629 9.61427 100.046 11.0172 100.044 12.4807C100.047 13.9439 100.629 15.3464 101.664 16.3806C102.7 17.4149 104.103 17.9964 105.566 17.9976C107.029 17.9964 108.432 17.4149 109.467 16.3806C110.502 15.3464 111.085 13.9439 111.087 12.4807C111.085 11.0172 110.503 9.61427 109.468 8.57971C108.433 7.54515 107.029 6.96347 105.566 6.96225Z",fill:it.color})]})}const useStyles$B=makeStyles()(it=>({container:{display:"flex",justifyContent:"center",flexDirection:"row"},partnerLogo:{maxHeight:it.spacing(3)},separator:{paddingLeft:it.spacing(1),paddingRight:it.spacing(1)}}));function PartnerLogo(){const{classes:it}=useStyles$B();return jsxRuntimeExports.jsx("img",{src:partnerLogo,alt:"partner",className:it.partnerLogo})}function PoweredByIcon(it){const{classes:dt}=useStyles$B();return partnerLogo?jsxRuntimeExports.jsxs(Box$1,{className:dt.container,children:[jsxRuntimeExports.jsx(WormholeLogo,{color:it.color}),jsxRuntimeExports.jsx(Typography$1,{component:"span",className:dt.separator,children:"&"}),jsxRuntimeExports.jsx(PartnerLogo,{})]}):jsxRuntimeExports.jsx(WormholeLogo,{color:it.color})}const useStyles$A=makeStyles()(()=>({menuIcon:ICON,menu:{display:"flex",flexDirection:"column",gap:"8px",padding:"8px"},menuItem:{padding:"16px 0",textAlign:"left",cursor:"pointer","&:hover":{textDecoration:"underline"}}}));function Menu(){const{classes:it}=useStyles$A(),dt=useTheme(),ht=useDispatch(),[pt,yt]=reactExports.useState(!1),Dt=sn=>{ht(setRoute(sn)),yt(!1)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:it.menuIcon,onClick:()=>yt(!0),children:jsxRuntimeExports.jsx(MenuIcon,{})}),jsxRuntimeExports.jsx(Modal,{open:pt,closable:!0,width:650,onClose:()=>yt(!1),children:jsxRuntimeExports.jsxs("div",{className:it.menu,children:[jsxRuntimeExports.jsx(PoweredByIcon,{color:dt.palette.text.primary}),jsxRuntimeExports.jsx(Spacer,{height:8}),jsxRuntimeExports.jsx("div",{className:it.menuItem,onClick:()=>Dt("bridge"),children:"Bridge"}),jsxRuntimeExports.jsx("div",{className:it.menuItem,onClick:()=>Dt("search"),children:"Resume transaction"}),jsxRuntimeExports.jsx("div",{className:it.menuItem,onClick:()=>Dt("faq"),children:"FAQs"}),jsxRuntimeExports.jsx("div",{className:it.menuItem,onClick:()=>Dt("terms"),children:"Terms of Use"})]})})]})}const useStyles$z=makeStyles()((it,{showHamburgerMenu:dt,align:ht})=>({container:{width:"100%",display:"flex",flexDirection:"column",gap:"8px",marginBottom:dt?"40px":"0px",[it.breakpoints.down("sm")]:{marginBottom:"20px"}},header:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},left:{display:"flex",flexGrow:1,alignItems:"center",textAlign:ht},arrowBack:{transform:"rotate(90deg)",marginRight:"16px",cursor:"pointer"},description:{fontWeight:"300",fontSize:"14px",opacity:"0.6",marginBottom:dt?"0px":"40px"}}));function PageHeader({back:it,title:dt,align:ht="left",description:pt,showHamburgerMenu:yt=!0}){const{classes:Dt}=useStyles$z({showHamburgerMenu:yt,align:ht}),sn=useDispatch();function ln(){sn(setRoute("bridge"))}return jsxRuntimeExports.jsxs("div",{className:Dt.container,children:[jsxRuntimeExports.jsxs("div",{className:Dt.header,children:[jsxRuntimeExports.jsxs("div",{className:Dt.left,children:[it&&jsxRuntimeExports.jsx(DownIcon,{className:Dt.arrowBack,fontSize:"large",onClick:ln}),jsxRuntimeExports.jsx(Header$1,{text:dt,align:ht})]}),yt?jsxRuntimeExports.jsx(Menu,{}):null]}),pt&&jsxRuntimeExports.jsx("div",{className:Dt.description,children:pt})]})}const WalletIcon$1=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M21 12C21 11.4033 20.7629 10.831 20.341 10.409C19.919 9.98705 19.3467 9.75 18.75 9.75H15C15 10.5456 14.6839 11.3087 14.1213 11.8713C13.5587 12.4339 12.7956 12.75 12 12.75C11.2044 12.75 10.4413 12.4339 9.87868 11.8713C9.31607 11.3087 9 10.5456 9 9.75H5.25C4.65326 9.75 4.08097 9.98705 3.65901 10.409C3.23705 10.831 3 11.4033 3 12M21 12V18C21 18.5967 20.7629 19.169 20.341 19.591C19.919 20.0129 19.3467 20.25 18.75 20.25H5.25C4.65326 20.25 4.08097 20.0129 3.65901 19.591C3.23705 19.169 3 18.5967 3 18V12M21 12V9M3 12V9M21 9C21 8.40326 20.7629 7.83097 20.341 7.40901C19.919 6.98705 19.3467 6.75 18.75 6.75H5.25C4.65326 6.75 4.08097 6.98705 3.65901 7.40901C3.23705 7.83097 3 8.40326 3 9M21 9V6C21 5.40326 20.7629 4.83097 20.341 4.40901C19.919 3.98705 19.3467 3.75 18.75 3.75H5.25C4.65326 3.75 4.08097 3.98705 3.65901 4.40901C3.23705 4.83097 3 5.40326 3 6V9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),"Wallet"),useStyles$y=makeStyles()((it,{size:dt})=>({container:{height:dt,width:dt,...CENTER},icon:{maxHeight:"100%",maxWidth:"100%"}}));function WalletIcon(it){const dt=it.height||32,{classes:ht}=useStyles$y({size:dt}),{icon:pt,name:yt}=it;return jsxRuntimeExports.jsx("div",{className:ht.container,children:pt&&jsxRuntimeExports.jsx("img",{className:ht.icon,src:pt,alt:yt})})}function useEvent(it){if(typeof window>"u")return it;const dt=reactExports.useRef(null);return reactExports.useLayoutEffect(()=>{dt.current=it}),reactExports.useCallback((...ht)=>{var pt;(pt=dt.current)===null||pt===void 0||pt.call(dt,...ht)},[])}const printedWarnings={};function warn(it,dt){printedWarnings[it]||(printedWarnings[it]=!0,console.error("[material-ui-popup-state] WARNING",dt))}const initCoreState={isOpen:!1,setAnchorElUsed:!1,anchorEl:void 0,anchorPosition:void 0,hovered:!1,focused:!1,_openEventType:null,_childPopupState:null,_deferNextOpen:!1,_deferNextClose:!1};function usePopupState({parentPopupState:it,popupId:dt,variant:ht,disableAutoFocus:pt}){const yt=reactExports.useRef(!0);reactExports.useEffect(()=>(yt.current=!0,()=>{yt.current=!1}),[]);const[Dt,sn]=reactExports.useState(initCoreState),ln=reactExports.useCallback(Kn=>{yt.current&&sn(Kn)},[]),mn=reactExports.useCallback(Kn=>ln(Xn=>({...Xn,setAnchorElUsed:!0,anchorEl:Kn??void 0})),[]),hn=useEvent(Kn=>(Dt.isOpen?Cn(Kn):yn(Kn),Dt)),yn=useEvent(Kn=>{const Xn=Kn instanceof Element?void 0:Kn,fr=Kn instanceof Element?Kn:(Kn==null?void 0:Kn.currentTarget)instanceof Element?Kn.currentTarget:void 0;if((Xn==null?void 0:Xn.type)==="touchstart"){ln(Wn=>({...Wn,_deferNextOpen:!0}));return}const or=Xn==null?void 0:Xn.clientX,ar=Xn==null?void 0:Xn.clientY,jn=typeof or=="number"&&typeof ar=="number"?{left:or,top:ar}:void 0,cr=Wn=>{if(!Kn&&!Wn.setAnchorElUsed&&ht!=="dialog"&&warn("missingEventOrAnchorEl","eventOrAnchorEl should be defined if setAnchorEl is not used"),it){if(!it.isOpen)return Wn;setTimeout(()=>it._setChildPopupState(er))}const hr={...Wn,isOpen:!0,anchorPosition:jn,hovered:(Xn==null?void 0:Xn.type)==="mouseover"||Wn.hovered,focused:(Xn==null?void 0:Xn.type)==="focus"||Wn.focused,_openEventType:Xn==null?void 0:Xn.type};return Xn!=null&&Xn.currentTarget?Wn.setAnchorElUsed||(hr.anchorEl=Xn==null?void 0:Xn.currentTarget):fr&&(hr.anchorEl=fr),hr};ln(Wn=>Wn._deferNextOpen?(setTimeout(()=>ln(cr),0),{...Wn,_deferNextOpen:!1}):cr(Wn))}),Zn=Kn=>{const{_childPopupState:Xn}=Kn;return setTimeout(()=>{Xn==null||Xn.close(),it==null||it._setChildPopupState(null)}),{...Kn,isOpen:!1,hovered:!1,focused:!1}},Cn=useEvent(Kn=>{const Xn=Kn instanceof Element?void 0:Kn;if((Xn==null?void 0:Xn.type)==="touchstart"){ln(fr=>({...fr,_deferNextClose:!0}));return}ln(fr=>fr._deferNextClose?(setTimeout(()=>ln(Zn),0),{...fr,_deferNextClose:!1}):Zn(fr))}),Qn=reactExports.useCallback((Kn,Xn)=>{Kn?yn(Xn):Cn(Xn)},[]),Fn=useEvent(Kn=>{const{relatedTarget:Xn}=Kn;ln(fr=>fr.hovered&&!(Xn instanceof Element&&isElementInPopup(Xn,er))?fr.focused?{...fr,hovered:!1}:Zn(fr):fr)}),Hn=useEvent(Kn=>{if(!Kn)return;const{relatedTarget:Xn}=Kn;ln(fr=>fr.focused&&!(Xn instanceof Element&&isElementInPopup(Xn,er))?fr.hovered?{...fr,focused:!1}:Zn(fr):fr)}),Yn=reactExports.useCallback(Kn=>ln(Xn=>({...Xn,_childPopupState:Kn})),[]),er={...Dt,setAnchorEl:mn,popupId:dt,variant:ht,open:yn,close:Cn,toggle:hn,setOpen:Qn,onBlur:Hn,onMouseLeave:Fn,disableAutoFocus:pt??!!(Dt.hovered||Dt.focused),_setChildPopupState:Yn};return er}function controlAriaProps({isOpen:it,popupId:dt,variant:ht}){return{...ht==="popover"?{"aria-haspopup":!0,"aria-controls":it&&dt!=null?dt:void 0}:ht==="popper"?{"aria-describedby":it&&dt!=null?dt:void 0}:void 0}}function bindTrigger(it){return{...controlAriaProps(it),onClick:it.open,onTouchStart:it.open}}function bindPopover({isOpen:it,anchorEl:dt,anchorPosition:ht,close:pt,popupId:yt,onMouseLeave:Dt,disableAutoFocus:sn,_openEventType:ln}){return{id:yt,anchorEl:dt,anchorPosition:ht,anchorReference:ln==="contextmenu"?"anchorPosition":"anchorEl",open:it,onClose:pt,onMouseLeave:Dt,...sn&&{disableAutoFocus:!0,disableEnforceFocus:!0,disableRestoreFocus:!0}}}function getPopup(it,{popupId:dt}){if(!dt)return null;const ht=typeof it.getRootNode=="function"?it.getRootNode():document;return typeof ht.getElementById=="function"?ht.getElementById(dt):null}function isElementInPopup(it,dt){const{anchorEl:ht,_childPopupState:pt}=dt;return isAncestor(ht,it)||isAncestor(getPopup(it,dt),it)||pt!=null&&isElementInPopup(it,pt)}function isAncestor(it,dt){if(!it)return!1;for(;dt;){if(dt===it)return!0;dt=dt.parentElement}return!1}function PopupState({children:it,popupId:dt,variant:ht,parentPopupState:pt,disableAutoFocus:yt}){const Dt=usePopupState({popupId:dt,variant:ht,parentPopupState:pt,disableAutoFocus:yt}),sn=it(Dt);return sn??null}PopupState.propTypes={children:PropTypes.func.isRequired,popupId:PropTypes.string,variant:PropTypes.oneOf(["popover","popper"]).isRequired,parentPopupState:PropTypes.object,disableAutoFocus:PropTypes.bool};const useStyles$x=makeStyles()((it,{disabled:dt})=>({connectWallet:{display:"flex",alignItems:"center",justifyContent:"end",gap:"8px",padding:"8px 16px",borderRadius:"8px",backgroundColor:it.palette.button.primary,cursor:dt?"not-allowed":"pointer",opacity:dt?.7:1},walletIcon:{width:"24px",height:"24px"},down:{marginRight:"-8px"},dropdown:{backgroundColor:it.palette.popover.background,display:"flex",flexDirection:"column",gap:"8px",padding:"8px",width:"175px"},dropdownItem:{borderRadius:"8px",padding:"16px",cursor:"pointer","&:hover":{backgroundColor:it.palette.popover.secondary}}}));function ExplorerLink$1({address:it,href:dt,target:ht="_blank",label:pt="Transactions"}){const{classes:yt}=useStyles$x({disabled:!1}),Dt=()=>window.open(dt.replace("{:address}",it),ht);return jsxRuntimeExports.jsx("div",{className:yt.dropdownItem,onClick:Dt,children:pt})}function ConnectWallet(it){const{disabled:dt=!1,type:ht}=it,{classes:pt}=useStyles$x({disabled:dt}),yt=useTheme(),Dt=useDispatch(),sn=useMediaQuery(yt.breakpoints.down("sm")),ln=useSelector(Zn=>Zn.wallet[ht]),mn=async Zn=>{dt||(Zn&&Zn.close(),Dt(setWalletModal(ht)))},hn=async Zn=>{await copyTextToClipboard(ln.address),Zn.close()},yn=async()=>{Dt(disconnectWallet(ht))};if(ln&&ln.address)return jsxRuntimeExports.jsx(PopupState,{variant:"popover",popupId:"demo-popup-popover",children:Zn=>{const{onClick:Cn,...Qn}=bindTrigger(Zn),Fn=Hn=>{dt||Cn(Hn)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:pt.connectWallet,onClick:Fn,...Qn,children:[jsxRuntimeExports.jsx(WalletIcon,{name:ln.name,icon:ln.icon,height:24}),displayWalletAddress(ln.type,ln.address),!dt&&jsxRuntimeExports.jsx(DownIcon,{className:pt.down})]}),jsxRuntimeExports.jsx(Popover$1,{...bindPopover(Zn),sx:{marginTop:1},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:jsxRuntimeExports.jsx(ScopedCssBaseline$1,{enableColorScheme:!0,children:jsxRuntimeExports.jsxs("div",{className:pt.dropdown,children:[jsxRuntimeExports.jsx("div",{className:pt.dropdownItem,onClick:()=>hn(Zn),children:"Copy address"}),EXPLORER?jsxRuntimeExports.jsx(ExplorerLink$1,{address:ln.address,href:EXPLORER.href,target:EXPLORER.target,label:EXPLORER.label}):null,jsxRuntimeExports.jsx("div",{className:pt.dropdownItem,onClick:()=>mn(Zn),children:"Change wallet"}),jsxRuntimeExports.jsx("div",{className:pt.dropdownItem,onClick:yn,children:"Disconnect"})]})})})]})}});{let Zn=jsxRuntimeExports.jsxs("div",{className:pt.connectWallet,onClick:()=>mn(),children:[jsxRuntimeExports.jsx(WalletIcon$1,{}),jsxRuntimeExports.jsx("div",{children:sn?"Connect":"Connect wallet"})]});return dt?jsxRuntimeExports.jsx(Tooltip$1,{title:"Please select a network first",children:Zn}):Zn}}const useStyles$w=makeStyles()(it=>({chainTile:{backgroundColor:it.palette.card.secondary,borderRadius:"8px",padding:it.spacing(1.5),display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",cursor:"pointer",textAlign:"center",gap:it.spacing(1.5)},chainIcon:{width:"56px",height:"56px"},chainHeader:{fontSize:"16px",opacity:"60%"},chainName:{fontSize:"16px"},error:ERROR_BORDER(it)}));function ChainTile(it){var yt,Dt;const{disabled:dt=!1}=it,{classes:ht}=useStyles$w(),pt=sn=>{dt||it.onClick(sn)};return jsxRuntimeExports.jsxs("div",{className:joinClass([ht.chainTile,!!it.error&&ht.error]),onClick:pt,children:[it.chain?jsxRuntimeExports.jsx("div",{className:ht.chainHeader,children:"Network"}):null,jsxRuntimeExports.jsx(TokenIcon,{icon:(yt=it.chain)==null?void 0:yt.icon,height:56}),jsxRuntimeExports.jsx("div",{className:ht.chainName,children:((Dt=it.chain)==null?void 0:Dt.displayName)||"Select network"})]})}function ValidationError(it){const dt=useSelector(sn=>sn.transferInput.showValidationState),ht=it.validations.filter(sn=>!!sn),pt=ht.length>0,yt=ht[0],Dt=(it.forceShow||dt)&&pt;return jsxRuntimeExports.jsx(AlertBanner,{show:Dt,content:yt,error:!0,margin:it.margin})}const useStyles$v=makeStyles()((it,{cursorStyle:dt})=>({inputField:{display:"flex",flexDirection:"column",justifyContent:"space-between",borderRadius:"8px",width:"100%",padding:"12px",cursor:"default"},editable:{backgroundColor:it.palette.card.secondary},enabled:{cursor:dt||"pointer"},label:{fontSize:"14px",color:it.palette.text.secondary,marginBottom:"4px"},content:{overflow:"hidden"},error:ERROR_BORDER(it)}));function Input(it){const{classes:dt}=useStyles$v({cursorStyle:it.cursor}),ht=[dt.inputField,!!it.error&&dt.error,!!it.editable&&dt.editable,!it.disabled&&dt.enabled];return jsxRuntimeExports.jsxs("div",{className:joinClass(ht),onClick:it.onClick,children:[jsxRuntimeExports.jsx("div",{className:dt.label,children:it.label}),jsxRuntimeExports.jsx("div",{className:dt.content,children:it.children})]})}const useStyles$u=makeStyles()(it=>({select:{display:"flex",alignItems:"center",gap:"8px"},secondaryText:{opacity:"0.6",fontSize:"13px",[it.breakpoints.down("sm")]:{display:"none"}}}));function Select(it){const{classes:dt}=useStyles$u(),{selected:ht}=it,pt=()=>{it.editable&&!it.disabled&&it.onClick()};return jsxRuntimeExports.jsx(Input,{label:it.label,error:it.error,editable:it.editable,disabled:it.disabled,onClick:pt,children:ht?jsxRuntimeExports.jsxs("div",{className:dt.select,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:ht.icon,height:24}),ht.text,ht.secondaryText&&jsxRuntimeExports.jsx("div",{className:dt.secondaryText,children:ht.secondaryText})]}):it.disabled?NO_INPUT:jsxRuntimeExports.jsxs("div",{className:dt.select,children:[jsxRuntimeExports.jsx(TokenIcon,{height:24}),"Select"]})})}const useStyles$t=makeStyles()(it=>({outerContainer:{display:"flex",flexDirection:"column"},container:{width:"100%",display:"flex",flexDirection:"column",gap:it.spacing(1.5)},errorContainer:{width:"100%"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:it.spacing(0,1.5),[it.breakpoints.down("sm")]:{padding:"0"}},headerTitle:{fontSize:"16px",fontWeight:"bold"},content:{display:"grid",gridTemplateColumns:"158px 1fr",gridTemplateRows:"1fr",gridTemplateAreas:'"chain inputs"',width:"100%",maxWidth:"100%",[it.breakpoints.down("sm")]:{gridTemplateColumns:"1fr !important",gridTemplateAreas:'"inputs" !important'}},chain:{gridArea:"chain"},inputs:{gridArea:"inputs",display:"flex",flexDirection:"column",gap:it.spacing(1.5),width:"100%",paddingLeft:it.spacing(1.5),[it.breakpoints.down("sm")]:{paddingLeft:"0"}},chainRow:{display:"flex",flexDirection:"row",gap:it.spacing(1.5)},chainSmall:{display:"block",width:"40%"},token:{width:"100%",[it.breakpoints.down("sm")]:{width:"60%"}},amtRow:{display:"grid",gridTemplateColumns:"1fr 120px",gridTemplateRows:"1fr",gridTemplateAreas:'"amount balance"',maxWidth:"100%"},amount:{gridArea:"amount",overflow:"hidden"},balance:{gridArea:"balance",backgroundColor:"transparent"}}));function Inputs(it){const{classes:dt}=useStyles$t(),{showValidationState:ht,isTransactionInProgress:pt}=useSelector(hn=>hn.transferInput),yt=it.chain&&CHAINS$1[it.chain],Dt=yt?{icon:yt.icon,text:yt.displayName}:void 0,sn=useTheme(),ln=useMediaQuery(sn.breakpoints.down("sm")),mn=reactExports.useMemo(()=>it.balance&&it.tokenPrice?getUSDFormat(Number.parseFloat(`${it.balance}`)*it.tokenPrice):"",[it.tokenPrice,it.balance]);return jsxRuntimeExports.jsxs("div",{className:dt.container,children:[jsxRuntimeExports.jsxs("div",{className:dt.errorContainer,children:[jsxRuntimeExports.jsxs("div",{className:dt.header,children:[jsxRuntimeExports.jsx("div",{className:dt.headerTitle,children:it.title}),jsxRuntimeExports.jsx(ConnectWallet,{type:it.wallet,disabled:pt||!Dt})]}),it.walletError?jsxRuntimeExports.jsx(AlertBanner,{show:!!it.walletError,content:it.walletError,error:!0,margin:"12px 0 0 0"}):jsxRuntimeExports.jsx(ValidationError,{validations:it.walletValidations,margin:"12px 0 0 0"})]}),jsxRuntimeExports.jsx(InputContainer,{children:jsxRuntimeExports.jsxs("div",{className:dt.outerContainer,children:[jsxRuntimeExports.jsxs("div",{className:dt.content,children:[!ln&&jsxRuntimeExports.jsx("div",{className:dt.chain,children:jsxRuntimeExports.jsx(ChainTile,{chain:yt,error:!!(ht&&it.chainValidation),onClick:it.onChainClick,disabled:pt})}),jsxRuntimeExports.jsxs("div",{className:dt.inputs,children:[jsxRuntimeExports.jsxs("div",{className:dt.chainRow,children:[ln&&jsxRuntimeExports.jsx("div",{className:dt.chainSmall,children:jsxRuntimeExports.jsx(Select,{label:"Network",selected:Dt,error:!!(ht&&it.chainValidation),onClick:it.onChainClick,editable:!0,disabled:pt})}),jsxRuntimeExports.jsx("div",{className:dt.token,children:it.tokenInput})]}),jsxRuntimeExports.jsxs("div",{className:dt.amtRow,children:[jsxRuntimeExports.jsx("div",{className:dt.amount,children:it.amountInput}),jsxRuntimeExports.jsx("div",{className:dt.balance,children:jsxRuntimeExports.jsx(Input,{label:"Balance",disabled:!0,children:jsxRuntimeExports.jsx("div",{children:it.balance?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:it.balance}),jsxRuntimeExports.jsx(Price,{children:mn})]}):NO_INPUT})})})]})]})]}),jsxRuntimeExports.jsx(ValidationError,{validations:it.inputValidations,margin:"12px 0 0 0"}),it.warning&&it.warning]})})]})}const useStyles$s=makeStyles()((it,{align:dt})=>({input:{width:"100%",border:"none",backgroundImage:"none",backgroundColor:"transparent",background:"transparent",fontSize:"inherit",boxShadow:"none",webkitBoxShadow:"none",moxBoxShadow:"none",outline:"none",flexGrow:"1",textAlign:dt||"left"}})),NUMBER_FORMAT_REGEX=/^\d*\.?\d*$/,NUMBER_REPLACE_REGEX=/[^0-9.]/g;function InputTransparent(it){const{classes:dt}=useStyles$s({align:it.align}),ht=yt=>{it.type==="number"&&!NUMBER_FORMAT_REGEX.test(yt.target.value)&&(yt.target.value=yt.target.value.replace(NUMBER_REPLACE_REGEX,"")),it.onChange&&it.onChange(yt)},pt=yt=>{yt.key==="Enter"&&it.onEnter&&it.onEnter(yt)};return jsxRuntimeExports.jsx("input",{ref:it.inputRef,id:it.id,className:dt.input,placeholder:it.placeholder,min:it.min,max:it.max,step:it.step,onChange:ht,onKeyDown:pt,readOnly:it.disabled,value:it.value})}function AmountInput(it){const dt=reactExports.useRef(null),{showValidationState:ht,validations:pt,token:yt,isTransactionInProgress:Dt}=useSelector(Zn=>Zn.transferInput),{usdPrices:{data:sn}}=useSelector(Zn=>Zn.tokenPrices),ln=sn||{};function mn(Zn){let Cn=Zn.target.value;const Qn=Cn.indexOf(".");Qn>0&&Cn.length-Qn-8>0&&(Cn=toFixedDecimals(Cn,8)),it.handleAmountChange(Cn)}const hn=()=>{dt.current&&dt.current.focus()},yn=reactExports.useMemo(()=>{const Zn=getTokenPrice(ln,TOKENS[yt])||0;if(Zn)return getUSDFormat(Number(it.value)*Zn)},[it.value,yt,ln]);return jsxRuntimeExports.jsx(Input,{label:it.label??"Amount",error:!!(ht&&pt.amount),editable:!0,disabled:!0,onClick:hn,cursor:"text",children:yt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(InputTransparent,{inputRef:dt,placeholder:"0.00",type:"number",min:0,step:.1,onChange:mn,disabled:Dt||it.disabled,value:it.value}),yn&&jsxRuntimeExports.jsx(Price,{children:yn})]}):jsxRuntimeExports.jsx("div",{children:NO_INPUT})})}var OpenInNew={},createSvgIcon={};const require$$0=getAugmentedNamespace(utils);var hasRequiredCreateSvgIcon;function requireCreateSvgIcon(){return hasRequiredCreateSvgIcon||(hasRequiredCreateSvgIcon=1,function(it){"use client";Object.defineProperty(it,"__esModule",{value:!0}),Object.defineProperty(it,"default",{enumerable:!0,get:function(){return dt.createSvgIcon}});var dt=require$$0}(createSvgIcon)),createSvgIcon}var _interopRequireDefault$3=interopRequireDefaultExports;Object.defineProperty(OpenInNew,"__esModule",{value:!0});var default_1$3=OpenInNew.default=void 0,_createSvgIcon$3=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");default_1$3=OpenInNew.default=_default$3;const useStyles$r=makeStyles()((it,{blendColor:dt})=>({anchor:{position:"relative",width:"100%"},scrollContainer:{width:"100%",height:"calc(100% - 48px)",overflowY:"scroll",overflowX:"hidden",padding:0},fadeOverlay:{position:"absolute",left:"0",right:"0",bottom:"0",height:"40px",zIndex:"5",backgroundImage:`linear-gradient(${dt+OPACITY[0]} 0%, ${dt+OPACITY[100]} 100%)`,pointerEvents:"none"},fadeOverlayTop:{position:"absolute",left:"0",right:"0",top:"0",height:"8px",zIndex:"5",backgroundImage:`linear-gradient(${dt+OPACITY[100]} 0%, ${dt+OPACITY[0]} 100%)`,pointerEvents:"none"},content:{padding:"8px 0 16px 0"}}));function Scroll(it){const{classes:dt}=useStyles$r({blendColor:it.blendColor});return jsxRuntimeExports.jsx("div",{className:dt.anchor,children:jsxRuntimeExports.jsxs("div",{className:dt.scrollContainer,style:{maxHeight:it.height},children:[jsxRuntimeExports.jsx("div",{className:dt.fadeOverlayTop}),jsxRuntimeExports.jsx("div",{className:dt.fadeOverlay}),jsxRuntimeExports.jsx("div",{className:dt.content,children:it.children})]})})}const SearchIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M21.0008 21.0008L15.8038 15.8038M15.8038 15.8038C17.2104 14.3972 18.0006 12.4895 18.0006 10.5003C18.0006 8.51108 17.2104 6.60336 15.8038 5.19678C14.3972 3.79021 12.4895 3 10.5003 3C8.51108 3 6.60336 3.79021 5.19678 5.19678C3.79021 6.60336 3 8.51108 3 10.5003C3 12.4895 3.79021 14.3972 5.19678 15.8038C6.60336 17.2104 8.51108 18.0006 10.5003 18.0006C12.4895 18.0006 14.3972 17.2104 15.8038 15.8038V15.8038Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),"Search"),useStyles$q=makeStyles()(it=>({searchContent:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},container:{width:"100%",padding:"16px",borderRadius:"8px",backgroundColor:it.palette.card.secondary},input:{flexGrow:1},searchBorder:{border:`1px solid ${changeOpacity(it.palette.divider,50)}`,borderRadius:"8px"},clickable:{cursor:"pointer"}}));function Search(it){const{classes:dt}=useStyles$q(),ht=reactExports.useRef(null),pt=()=>{ht.current&&ht.current.focus()};return reactExports.useEffect(()=>{pt()},[]),jsxRuntimeExports.jsx("div",{className:dt.searchBorder,children:jsxRuntimeExports.jsx("div",{className:dt.container,onClick:pt,children:jsxRuntimeExports.jsxs("div",{className:dt.searchContent,children:[jsxRuntimeExports.jsx("div",{className:dt.input,children:jsxRuntimeExports.jsx(InputTransparent,{value:it.value,inputRef:ht,placeholder:it.placeholder,onChange:it.onChange,onEnter:it.onSearch})}),jsxRuntimeExports.jsx("div",{onClick:it.onSearch,className:it.onSearch&&dt.clickable,children:jsxRuntimeExports.jsx(SearchIcon,{})})]})})})}const useStyles$p=makeStyles()(it=>({tabs:{display:"flex",flexDirection:"row",justifyContext:"space-between"},tab:{flexGrow:1}}));function CustomTabPanel(it){const{children:dt,value:ht,index:pt,...yt}=it;return jsxRuntimeExports.jsx("div",{role:"tabpanel",hidden:ht!==pt,id:`simple-tabpanel-${pt}`,"aria-labelledby":`simple-tab-${pt}`,...yt,children:ht===pt&&jsxRuntimeExports.jsx(Box$1,{sx:{py:3},children:dt})})}function a11yProps(it){return{id:`simple-tab-${it}`,"aria-controls":`simple-tabpanel-${it}`}}function BasicTabs(it){const{tabs:dt}=it,{classes:ht}=useStyles$p(),pt=useTheme(),[yt,Dt]=reactExports.useState(0),sn=(ln,mn)=>{Dt(mn)};return jsxRuntimeExports.jsxs(Box$1,{sx:{width:"100%"},children:[jsxRuntimeExports.jsx(Box$1,{sx:{borderBottom:1,borderColor:`${pt.palette.divider}`},children:jsxRuntimeExports.jsx(Tabs$1,{value:yt,onChange:sn,className:ht.tabs,children:dt.map((ln,mn)=>reactExports.createElement(Tab$1,{label:ln.label,...a11yProps(mn),className:ht.tab,key:`tab${mn}`}))})}),dt.map((ln,mn)=>jsxRuntimeExports.jsx(CustomTabPanel,{value:yt,index:mn,children:ln.panel},`panel${mn}`))]})}const useStyles$o=makeStyles()(it=>({tokensContainer:{display:"flex",flexDirection:"column"},noResults:{...CENTER,minHeight:"72px"},tokenRow:{position:"relative",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"16px 8px",transition:"background-color 0.4s",cursor:"pointer","&:hover":{backgroundColor:it.palette.options.select},"&:not(:last-child)":{borderBottom:`0.5px solid ${it.palette.divider}`}},moreTokensRow:{textDecoration:"none",color:"inherit"},tokenRowLeft:{display:"flex",alignItems:"center",fontSize:"14px",gap:"8px",textAlign:"left"},tokenRowRight:{display:"flex",flexDirection:"column",alignItems:"right",textAlign:"right"},tokenRowBalanceText:{opacity:"60%",fontSize:"12px"},tokenRowBalance:{fontSize:"14px"},tokenRowAddressContainer:{width:"100%",position:"absolute",fontSize:"14px",display:"flex",justifyContent:"center",alignItems:"center"},tokenRowAddress:{width:"100px",textAlign:"left",opacity:"60%"},nativeChain:{opacity:"60%"},loading:{display:"flex",justifyContent:"center",alignItems:"center",height:"72px"},moreTokens:{textTransform:"none",marginTop:"66px",minHeight:"64px",minWidth:"193px",backgroundColor:it.palette.button.primary},iconButton:{width:"32px",height:"32px",color:it.palette.modal.background,backgroundColor:it.palette.button.primaryText,"&:hover":{backgroundColor:it.palette.button.primaryText},borderRadius:"100%"},iconOpenInNew:{width:"19px",height:"19px"},moreTokensLabel:{marginRight:"16px"},noWrap:{whiteSpace:"nowrap"}})),displayNativeChain=it=>{const dt=CHAINS$1[it.nativeChain];return dt?dt.displayName:""};function DisplayTokens(it){const{classes:dt}=useStyles$o(),ht=useTheme(),{tokens:pt,balances:yt,walletAddress:Dt,chain:sn,selectToken:ln,loading:mn,search:hn,moreTokens:yn=()=>{}}=it,Zn=Qn=>!sn||!Dt?!1:!!(!yt||yt&&yt[Qn]!==null),Cn=reactExports.useMemo(()=>sortTokens(pt,sn),[pt,sn]);return jsxRuntimeExports.jsx(Scroll,{height:"calc(100vh - 375px)",blendColor:ht.palette.modal.background,children:jsxRuntimeExports.jsx("div",{className:dt.tokensContainer,children:Cn.length>0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Cn.map(Qn=>jsxRuntimeExports.jsxs("div",{className:dt.tokenRow,onClick:()=>ln(Qn.key),children:[jsxRuntimeExports.jsxs("div",{className:dt.tokenRowLeft,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:Qn.icon,height:32}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{children:Qn.symbol}),jsxRuntimeExports.jsx("div",{className:dt.nativeChain,children:displayNativeChain(Qn)})]})]}),jsxRuntimeExports.jsxs("div",{className:dt.tokenRowRight,children:[jsxRuntimeExports.jsx("div",{className:dt.tokenRowBalanceText,children:"Balance"}),jsxRuntimeExports.jsx("div",{className:dt.tokenRowBalance,children:yt&&yt[Qn.key]&&Dt?jsxRuntimeExports.jsx("div",{children:yt[Qn.key]}):Zn(Qn.key)?jsxRuntimeExports.jsx(CircularProgress$1,{size:14}):jsxRuntimeExports.jsx("div",{children:NO_INPUT})})]}),jsxRuntimeExports.jsx("div",{className:dt.tokenRowAddressContainer,children:jsxRuntimeExports.jsxs("div",{className:dt.tokenRowAddress,children:[jsxRuntimeExports.jsx("div",{className:dt.noWrap,children:Qn.nativeChain===sn?"Native":"Wormhole Wrapped"}),Qn.tokenId&&jsxRuntimeExports.jsx("div",{children:displayAddress(Qn.tokenId.chain,Qn.tokenId.address)})]})})]},Qn.key)),MORE_TOKENS?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(Button$2,{disableRipple:!0,className:dt.moreTokens,onClick:()=>MORE_TOKENS&&yn(MORE_TOKENS.href,MORE_TOKENS.target),children:[jsxRuntimeExports.jsx("span",{className:dt.moreTokensLabel,children:MORE_TOKENS.label}),jsxRuntimeExports.jsx(IconButton$1,{className:dt.iconButton,children:jsxRuntimeExports.jsx(default_1$3,{className:dt.iconOpenInNew})})]})})}):null]}):mn?jsxRuntimeExports.jsx("div",{className:dt.loading,children:jsxRuntimeExports.jsx(CircularProgress$1,{size:24})}):jsxRuntimeExports.jsx("div",{className:dt.noResults,children:hn?"No results":"No balances detected"})})})}function isGatewayNativeToken(it){return it.tokenId&&isGatewayChain(it.tokenId.chain)}function TokensModal(it){const dt=useTheme(),ht=useDispatch(),{open:pt,chain:yt,walletAddress:Dt,type:sn}=it,ln=useMediaQuery(dt.breakpoints.down("sm")),[mn,hn]=reactExports.useState(!1),[yn,Zn]=reactExports.useState(!1),[Cn,Qn]=reactExports.useState([]),[Fn,Hn]=reactExports.useState(""),{balances:Yn,supportedSourceTokens:er,supportedDestTokens:Kn,allSupportedDestTokens:Xn,fromChain:fr,toChain:or}=useSelector(sr=>sr.transferInput),ar=reactExports.useMemo(()=>Xn.filter(sr=>!isGatewayNativeToken(sr)),[Xn]),jn=reactExports.useMemo(()=>(sn==="source"?er:Kn).filter(Ar=>!isGatewayNativeToken(Ar)),[sn,er,Kn]),cr=reactExports.useMemo(()=>accessChainBalances(Yn,Dt,yt),[yt,Yn,Dt]),Wn=sr=>{if(sr){const Ar=sr.target.value.toLowerCase();Hn(Ar)}else Hn("")},hr=(sr,Ar="_self")=>{let br=sr;fr&&(br=br.replace("{:sourceChain}",fr)),or&&(br=br.replace("{:targetChain}",or)),window.open(br.replace("&targetChain={:targetChain}",""),Ar)},ur=reactExports.useMemo(()=>Fn?Cn.filter(sr=>sr.symbol.toLowerCase().includes(Fn)||sr.tokenId&&sr.tokenId.address.toLowerCase().includes(Fn)):Cn,[Cn,Fn]),Gn=()=>{setTimeout(()=>Hn(""),500),it.onClose()},Un=sr=>{it.onSelect(sr),Gn()};reactExports.useEffect(()=>{Zn(!1)},[yt,Dt]);const ir=reactExports.useCallback(async()=>{if(!Dt||!yt)return;const sr=Date.now()-60*1e3*5;if(cr&&cr.balances&&cr.lastUpdated>sr){Zn(!0);return}const Ar=sn==="dest"?ar:jn,br=Ar.find(_r=>!_r.tokenId&&_r.nativeChain===yt),wr=Ar.filter(_r=>!!_r.tokenId),Jn=wr.reduce((_r,yr)=>yr.tokenId?[..._r,yr.tokenId]:_r,[]);let rr={};if(br){let _r=null;try{_r=await wh.getNativeBalance(Dt,yt),rr={...rr,...formatBalance(yt,br,_r)}}catch(yr){console.warn("Failed to fetch native balance",yr)}}try{const _r=await wh.getTokenBalances(Dt,Jn,yt);rr=Jn.reduce((yr,Er,Ir)=>({...yr,...formatBalance(yt,wr[Ir],_r[Ir])}),rr)}catch(_r){console.warn("Failed to fetch balances",_r)}ht(setBalances({address:Dt,chain:yt,balances:rr}))},[Dt,yt,ht,sn,jn,cr,ar]);reactExports.useEffect(()=>{let sr=!0;if(!Dt||!yt){Qn(jn);return}return yn||(hn(!0),ir().finally(()=>{sr&&(hn(!1),Zn(!0))})),()=>{sr=!1}},[Dt,jn,yt,ht,ir,sn,pt,yn]),reactExports.useEffect(()=>{const sr=jn.filter(Ar=>{if(!Ar.tokenId&&Ar.nativeChain!==yt)return!1;const br=yt&&CCTPManual_CHAINS.includes(yt);if(Ar.symbol==="USDC"&&Ar.nativeChain!==yt&&br)return!1;if(Ar.symbol==="tBTC"&&yt){if(isTBTCCanonicalChain(yt)){if(Ar.nativeChain!==yt)return!1}else if(wh.toChainId(Ar.nativeChain)!==CHAIN_ID_ETH$1)return!1}if(sn==="dest"||!cr)return!0;const wr=cr.balances[Ar.key];return wr!==null&&wr!=="0"});Qn(sr)},[cr,yt,jn,sn]);const pr=[{label:"Available Tokens",panel:jsxRuntimeExports.jsx(DisplayTokens,{tokens:ur,balances:cr==null?void 0:cr.balances,walletAddress:Dt,chain:yt,selectToken:Un,moreTokens:hr,loading:mn,search:Fn})},{label:"All Tokens",panel:jsxRuntimeExports.jsx(DisplayTokens,{tokens:sn==="dest"?ar:jn,balances:cr==null?void 0:cr.balances,walletAddress:Dt,chain:yt,selectToken:Un,moreTokens:hr,loading:mn,search:Fn})}];return jsxRuntimeExports.jsxs(Modal,{open:pt,closable:!0,width:500,onClose:Gn,children:[jsxRuntimeExports.jsx(Header$1,{text:"Select asset",size:28}),jsxRuntimeExports.jsx(Spacer,{height:16}),jsxRuntimeExports.jsxs(Alert$1,{variant:"outlined",severity:"info",children:["You should always check for markets and liquidity before sending tokens."," ",jsxRuntimeExports.jsx(Link$1,{href:AVAILABLE_MARKETS_URL,target:"_blank",rel:"noopener noreferrer",children:"Click here to see available markets for wrapped tokens."})]}),jsxRuntimeExports.jsx(Spacer,{height:16}),jsxRuntimeExports.jsx(Search,{placeholder:ln?"Token symbol or address":"Search by name or contract address",onChange:Wn}),jsxRuntimeExports.jsx(BasicTabs,{tabs:pr})]})}const useStyles$n=makeStyles()((it,{size:dt})=>({container:{position:"relative",height:dt,width:dt,...CENTER},icon:{maxHeight:"100%",maxWidth:"100%"},subIcon:{position:"absolute",bottom:`calc(${dt}px - ${it.spacing(1)})`,left:`calc(${dt}px - ${it.spacing(1)})`,width:it.spacing(2),height:it.spacing(2)},tooltip:{maxWidth:"270px",maxHeight:"104px",borderRadius:"4px",padding:"16px",gap:"10px",backgroundColor:it.palette.card.background}}));function MoreNetworkIcon({height:it,alt:dt,icon:ht,showOpenInNewIcon:pt=!0,description:yt}){const Dt=it||32,{classes:sn}=useStyles$n({size:Dt});return jsxRuntimeExports.jsxs("div",{className:sn.container,children:[jsxRuntimeExports.jsx("img",{style:{maxHeight:"100%",maxWidth:"100%"},alt:dt,src:ht}),pt&&(yt?jsxRuntimeExports.jsx(Tooltip$1,{arrow:!0,placement:"top-end",title:yt,classes:{tooltip:sn.tooltip,tooltipArrow:sn.tooltip},children:jsxRuntimeExports.jsx(default_1$3,{className:sn.subIcon})}):jsxRuntimeExports.jsx(default_1$3,{className:sn.subIcon}))]})}const useStyles$m=makeStyles()(it=>({chainsContainer:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 150px)",justifyContent:"space-between"},noResults:{...CENTER,minHeight:"130px"},chainTile:{width:"117px",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",margin:"12px 4px",padding:"16px",transition:"background-color 0.4s",cursor:"pointer",borderRadius:"8px","&:hover":{backgroundColor:it.palette.options.select}},extraChainTile:{textDecoration:"none",color:"inherit"},chainIcon:{width:"48px",height:"48px"},chainText:{fontSize:"14px",marginTop:"16px"},disabled:{opacity:"40%",cursor:"not-allowed",clickEvent:"none"},subtitle:{opacity:"60%"}}));function ChainsModal(it){const{classes:dt}=useStyles$m(),ht=useTheme(),pt=it.chains||CHAINS_ARR,[yt,Dt]=reactExports.useState(),sn=(Cn,Qn,Fn)=>{var Hn,Yn;Cn?(Hn=it.onMoreNetworkSelect)==null||Hn.call(it,Cn,Qn,Fn):(Yn=it.onMoreNetworkSelect)==null||Yn.call(it,MORE_NETWORKS.href,Qn,Fn)},ln=reactExports.useMemo(()=>{const Cn=RouteOperator.allSupportedChains();return pt.filter(Qn=>Cn.includes(Qn.key))},[pt]),mn=Cn=>{Dt(Cn==null?void 0:Cn.target.value.toLowerCase())},hn=Cn=>Cn==="wormchain"?!1:yt?CHAINS$1[Cn].displayName.toLowerCase().includes(yt):!0,yn=()=>{setTimeout(()=>Dt(void 0),500),it.onClose()},Zn=Cn=>{it.onSelect(Cn),yn()};return jsxRuntimeExports.jsxs(Modal,{open:it.open,closable:!0,width:CHAINS_ARR.length>6?650:500,onClose:yn,children:[jsxRuntimeExports.jsx(Header$1,{text:it.title,size:28}),jsxRuntimeExports.jsx("div",{className:dt.subtitle,children:"Select Network"}),jsxRuntimeExports.jsx(Spacer,{height:16}),jsxRuntimeExports.jsx(Search,{placeholder:"Search networks",onChange:mn}),jsxRuntimeExports.jsx(Spacer,{height:16}),jsxRuntimeExports.jsx(Scroll,{height:"calc(100vh - 300px)",blendColor:ht.palette.modal.background,children:ln.length>0?jsxRuntimeExports.jsxs("div",{className:dt.chainsContainer,children:[ln.map((Cn,Qn)=>{const Fn=it.isDisabled?it.isDisabled(Cn.key):!1;return hn(Cn.key)&&jsxRuntimeExports.jsxs("div",{className:joinClass([dt.chainTile,!!Fn&&dt.disabled]),onClick:()=>Zn(Cn.key),children:[jsxRuntimeExports.jsx(TokenIcon,{icon:Cn.icon,height:48}),jsxRuntimeExports.jsx("div",{className:dt.chainText,children:Cn.displayName})]},Qn)}),MORE_NETWORKS==null?void 0:MORE_NETWORKS.networks.map((Cn,Qn)=>jsxRuntimeExports.jsxs("div",{className:joinClass([dt.chainTile,dt.extraChainTile]),onClick:()=>sn(Cn.href||MORE_NETWORKS.href,Cn.name||Cn.label.toLocaleLowerCase().split(" ").join("_"),Cn.target||(MORE_NETWORKS==null?void 0:MORE_NETWORKS.target)),children:[jsxRuntimeExports.jsx(MoreNetworkIcon,{icon:Cn.icon,alt:Cn.label,height:48,showOpenInNewIcon:Cn.showOpenInNewIcon,description:Cn.description||(MORE_NETWORKS==null?void 0:MORE_NETWORKS.description)}),jsxRuntimeExports.jsx("div",{className:dt.chainText,children:Cn.label})]},Qn))]}):jsxRuntimeExports.jsx("div",{className:dt.noResults,children:"No results"})})]})}function FromInputs(){const it=useDispatch(),[dt,ht]=reactExports.useState(!1),[pt,yt]=reactExports.useState(!1),{toNativeToken:Dt,relayerFee:sn}=useSelector(sr=>sr.relay),ln=useSelector(sr=>sr.porticoBridge),mn=useSelector(sr=>sr.wallet.sending),{usdPrices:{data:hn}}=useSelector(sr=>sr.tokenPrices),yn=hn||{},{showValidationState:Zn,validations:Cn,route:Qn,fromChain:Fn,toChain:Hn,balances:Yn,token:er,amount:Kn,isTransactionInProgress:Xn,destToken:fr}=useSelector(sr=>sr.transferInput),or=er&&TOKENS[er],ar=accessBalance(Yn,mn.address,Fn,er)||void 0,jn=reactExports.useCallback(sr=>isDisabledChain(sr,mn),[mn]),cr=async sr=>{selectFromChain(it,sr,mn)},Wn=sr=>{it(setToken(sr))},hr=reactExports.useMemo(()=>{var Ar;if(!or)return;const sr=(Ar=CHAINS$1[or.nativeChain])==null?void 0:Ar.displayName;return{icon:or.icon,text:or.symbol,secondaryText:`(${sr})`}},[or]),ur=jsxRuntimeExports.jsx(Select,{label:"Asset",selected:hr,error:!!(Zn&&Cn.token),onClick:()=>ht(!0),disabled:!Fn||Xn,editable:!0}),Gn=reactExports.useCallback(async sr=>{it(setAmount(typeof sr=="number"?`${sr}`:sr));const Ar=typeof sr=="number"?sr:Number.parseFloat(sr);if(!Qn){it(setReceiveAmount(`${sr}`));return}try{const br=isPorticoRoute(Qn)?ln:{toNativeToken:Dt,relayerFee:sn};it(setFetchingReceiveAmount());const wr=await RouteOperator.computeReceiveAmount(Qn,Ar,er,fr,Fn,Hn,br);it(setReceiveAmount(`${wr}`))}catch{it(setReceiveAmountError("Error computing receive amount"))}},[it,Dt,sn,Qn,er,fr,Hn,Fn,ln]),Un=reactExports.useCallback(Gn,[Qn,Dt,sn,it,Gn]);reactExports.useEffect(()=>{Qn&&Gn(Kn)},[Qn,Kn,Gn]);const ir=jsxRuntimeExports.jsx(AmountInput,{handleAmountChange:Un,value:Kn}),pr=(sr,Ar,br="_self")=>{const wr=hydrateHrefTemplate(sr,Ar);wr&&window.open(wr,br)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Inputs,{title:"From",wallet:TransferWallet.SENDING,walletValidations:[Cn.sendingWallet],walletError:mn.error,inputValidations:[Cn.fromChain,Cn.token,Cn.amount],chain:Fn,chainValidation:Cn.fromChain,onChainClick:()=>yt(!0),tokenInput:ur,amountInput:ir,balance:ar,tokenPrice:getTokenPrice(yn,TOKENS[er])}),jsxRuntimeExports.jsx(TokensModal,{open:dt,chain:Fn,walletAddress:mn.address,type:"source",onSelect:Wn,onClose:()=>ht(!1)}),jsxRuntimeExports.jsx(ChainsModal,{open:pt,title:"Sending from",chains:CHAINS_ARR.filter(sr=>sr.key!==Hn),onSelect:cr,onClose:()=>yt(!1),onMoreNetworkSelect:(sr,Ar,br)=>pr(sr,Ar,br),isDisabled:jn})]})}const useStyles$l=makeStyles()(it=>({associatedTokenWarning:{display:"flex",flexDirection:"column",alignItems:"start"},link:{textDecoration:"underline",opacity:"0.8",padding:"4px 0",cursor:"pointer","&:hover":{opacity:"1"}},disabled:{cursor:"not-allowed",opacity:"0.6","&:hover":{opacity:"0.6"}},inProgress:{marginRight:"8px"},error:{color:it.palette.error[500],marginTop:"4px"}}));function AssociatedTokenWarning(it){const{classes:dt}=useStyles$l(),[ht,pt]=reactExports.useState(!1),[yt,Dt]=reactExports.useState(""),sn=async()=>{if(!ht){pt(!0),Dt("");try{await it.createAssociatedTokenAccount(),Dt("")}catch(ln){Dt("Encountered an error, please try again."),console.error(ln)}finally{pt(!1)}}};return jsxRuntimeExports.jsxs("div",{className:dt.associatedTokenWarning,children:["No associated token account exists for your wallet on Solana. You must create it before proceeding.",yt&&jsxRuntimeExports.jsx("div",{className:dt.error,children:yt}),jsxRuntimeExports.jsxs("div",{className:joinClass([dt.link,ht&&dt.disabled]),onClick:sn,children:[ht&&jsxRuntimeExports.jsx(CircularProgress$1,{size:18,className:dt.inProgress}),"Create account"]})]})}function TokenWarnings(){const it=useDispatch(),{toChain:dt,fromChain:ht,token:pt,destToken:yt,foreignAsset:Dt,associatedTokenAddress:sn,route:ln}=useSelector(or=>or.transferInput),{receiving:mn}=useSelector(or=>or.wallet),[hn,yn]=reactExports.useState(!1),[Zn,Cn]=reactExports.useState(!1),Qn=TOKENS[pt],Fn=TOKENS[yt];reactExports.useEffect(()=>{let or=!0;return(async()=>{if(!dt||!Qn||!ln){it(setForeignAsset("")),yn(!1);return}const jn=getWrappedTokenId(Qn);if(!jn)throw new Error("Could not retrieve target token info");const cr=await RouteOperator.getForeignAsset(ln,jn,dt);or&&(cr?(it(setForeignAsset(cr)),yn(!1)):(it(setForeignAsset("")),yn(!0)))})(),()=>{or=!1}},[dt,Qn,ln,it]);const Hn=reactExports.useCallback(async()=>{if(!Dt||!Qn)return yn(!1),!1;const or=getWrappedTokenId(Qn),ar=await solanaContext().getAssociatedTokenAccount(or,mn.address);return ar?(it(setAssociatedTokenAddress(ar.toString())),yn(!1),!0):(it(setAssociatedTokenAddress("")),yn(!0),!1)},[Dt,Qn,mn,it]),Yn=reactExports.useCallback(async()=>{if(!mn.address||!pt)throw new Error("Must fill in all fields before you can create a token account");if(!Dt)throw new Error("The token must be registered on Solana before an associated token account can be created");const or=getWrappedTokenId(Qn),ar=await solanaContext().createAssociatedTokenAccount(or,mn.address,"finalized");if(!ar)return;await signAndSendTransaction("solana",ar,TransferWallet.RECEIVING);let jn=!1,cr=0;return await new Promise(Wn=>{const hr=setInterval(async()=>{jn||cr>20?(clearInterval(hr),Wn(!0)):(jn=await Hn(),cr+=1)},1e3)})},[pt,mn,Dt,Qn,Hn]);reactExports.useEffect(()=>{const or=!!USDC_BRIDGE_URL,ar=(Qn==null?void 0:Qn.symbol)==="USDC"&&(Fn==null?void 0:Fn.symbol)==="USDC"&&(Fn==null?void 0:Fn.nativeChain)!==dt,jn=dt&&CCTPManual_CHAINS.includes(dt)&&ht&&CCTPManual_CHAINS.includes(ht),cr=or&&ar&&jn;!dt||!pt||!mn.address||(dt==="solana"&&Dt&&ln!==Route.TBTC&&Hn(),cr?(yn(!0),Cn(!0)):(yn(!1),Cn(!1)))},[dt,pt,Dt,mn,sn,Hn,ln,Qn==null?void 0:Qn.symbol,Qn==null?void 0:Qn.nativeChain,Fn==null?void 0:Fn.symbol,Fn==null?void 0:Fn.nativeChain,ht]);const er=jsxRuntimeExports.jsxs(Typography$1,{children:["This token is not registered, you must"," ",jsxRuntimeExports.jsx(Link$1,{target:"_blank",variant:"inherit",href:ATTEST_URL,children:"register"})," ","it before you continue. Newly registered tokens will not have liquid markets."]}),Kn=jsxRuntimeExports.jsx(AssociatedTokenWarning,{createAssociatedTokenAccount:Yn}),Xn=jsxRuntimeExports.jsxs(Typography$1,{children:["This transaction will transfer wrapped USDC (wUSDC) to the destination chain. If you want to transfer native USDC on chains supported by Circle's CCTP, use the"," ",jsxRuntimeExports.jsx(Link$1,{target:"_blank",variant:"inherit",href:USDC_BRIDGE_URL,children:"USDC Bridge"}),"."]});let fr;return Dt?dt==="solana"&&ln!==Route.Relay?fr=Kn:Zn&&(fr=Xn):fr=er,jsxRuntimeExports.jsx(AlertBanner,{show:hn,content:fr,warning:!0,margin:"12px 0 0 0"})}function ToInputs(){const it=useDispatch(),[dt,ht]=reactExports.useState(!1),[pt,yt]=reactExports.useState(!1),{showValidationState:Dt,validations:sn,fromChain:ln,toChain:mn,balances:hn,destToken:yn,receiveAmount:Zn,route:Cn,isTransactionInProgress:Qn}=useSelector(Gn=>Gn.transferInput),Fn=useSelector(Gn=>Gn.wallet.receiving),{usdPrices:{data:Hn}}=useSelector(Gn=>Gn.tokenPrices),Yn=Hn||{},er=accessBalance(hn,Fn.address,mn,yn)||void 0,Kn=TOKENS[yn],Xn=Gn=>{it(setDestToken(Gn))},fr=reactExports.useCallback(Gn=>isDisabledChain(Gn,Fn),[Fn]),or=async Gn=>{selectToChain(it,Gn,Fn)},ar=reactExports.useMemo(()=>{var ir;if(!Kn)return;const Gn=Kn.symbol,Un=(ir=CHAINS$1[Kn.nativeChain])==null?void 0:ir.displayName;return{icon:Kn.icon,text:Gn,secondaryText:`(${Un})`}},[Kn]),jn=jsxRuntimeExports.jsx(Select,{label:"Asset",selected:ar,error:!!(Dt&&sn.token),onClick:()=>ht(!0),disabled:!mn||Qn,editable:!0}),cr=()=>{},Wn=Cn&&isPorticoRoute(Cn)?"Expected Amount (-0.05%)":"Amount",hr=jsxRuntimeExports.jsx(AmountInput,{handleAmountChange:cr,value:Zn.data||"",disabled:!0,label:Wn}),ur=(Gn,Un,ir="_self")=>{const pr=hydrateHrefTemplate(Gn,ln,Un);pr&&window.open(pr,ir)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Inputs,{title:"To",wallet:TransferWallet.RECEIVING,walletValidations:[sn.receivingWallet],walletError:Fn.error,inputValidations:[sn.toChain,sn.destToken,sn.relayerFee,sn.receiveAmount],chain:mn,chainValidation:sn.toChain,onChainClick:()=>yt(!0),tokenInput:jn,amountInput:hr,balance:er,warning:jsxRuntimeExports.jsx(TokenWarnings,{}),tokenPrice:getTokenPrice(Yn,TOKENS[yn])}),jsxRuntimeExports.jsx(TokensModal,{open:dt,chain:mn,walletAddress:Fn.address,type:"dest",onSelect:Xn,onClose:()=>ht(!1)}),jsxRuntimeExports.jsx(ChainsModal,{open:pt,title:"Sending to",chains:CHAINS_ARR.filter(Gn=>Gn.key!==ln),onSelect:or,onClose:()=>yt(!1),onMoreNetworkSelect:(Gn,Un,ir)=>ur(Gn,Un,ir),isDisabled:fr})]})}const REMAINING_NOTIONAL_TOLERANCE=.98,GOVERNOR_API_BASE_URLS=[WORMHOLE_API,...WORMHOLE_RPC_HOSTS],useIsTransferLimited=()=>{const[it,dt]=reactExports.useState(null),[ht,pt]=reactExports.useState(null),[yt,Dt]=reactExports.useState(void 0),[sn,ln]=reactExports.useState(void 0),{fromChain:mn,token:hn,amount:yn}=useSelector(Qn=>Qn.transferInput),Zn=reactExports.useRef(!1);return reactExports.useEffect(()=>{let Qn=!1;return(async()=>{if(!hn||!mn){Dt(void 0);return}try{const Hn=TOKENS[hn],Yn=getWrappedTokenId(Hn),er=wh.toChainId(Yn.chain),Kn=utils$P.hexlify(await formatAssetAddress(er,Yn.address));Qn||(Dt(Kn),ln(er))}catch{Qn||Dt(void 0)}})(),()=>{Qn=!0}},[hn,mn]),reactExports.useEffect(()=>{if(!Zn.current){let Qn=!1;(async()=>{for(const Fn of GOVERNOR_API_BASE_URLS){try{const Hn=`${Fn}${Fn.endsWith("/")?"":"/"}v1/governor`,[Yn,er]=await Promise.all([axios$1.get(`${Hn}/token_list`),axios$1.get(`${Hn}/available_notional_by_chain`)]);if(!Qn){dt((Yn==null?void 0:Yn.data)||null),pt((er==null?void 0:er.data)||null);break}}catch(Hn){console.error(Hn)}if(Qn)break}return()=>{Qn=!0}})(),Zn.current=!0}},[]),reactExports.useMemo(()=>{if(!mn||!hn||!yn||!yt||!sn)return{isLimited:!1};const Qn=wh.toChainId(mn);if(hn&&mn&&yn&&it&&ht){const Fn=it.entries.find(Hn=>Hn.originChainId===sn&&Hn.originAddress===yt);if(Fn){const Hn=ht.entries.find(Yn=>Yn.chainId===Qn);if(Hn){const Yn=Fn.price*Number.parseFloat(yn),er=Yn>Hn.notionalLimit?"EXCEEDS_MAX_NOTIONAL":Yn>Hn.bigTransactionSize*REMAINING_NOTIONAL_TOLERANCE?"EXCEEDS_LARGE_TRANSFER_LIMIT":Yn>Hn.remainingAvailableNotional*REMAINING_NOTIONAL_TOLERANCE?"EXCEEDS_REMAINING_NOTIONAL":void 0;return{isLimited:!!er,reason:er,limits:{chainId:Qn,chainNotionalLimit:Hn.notionalLimit,chainRemainingAvailableNotional:Hn.remainingAvailableNotional,chainBigTransactionSize:Hn.bigTransactionSize,tokenPrice:Fn.price}}}}}return{isLimited:!1}},[mn,hn,yt,sn,yn,it,ht])},ClockIcon=()=>jsxRuntimeExports.jsxs("svg",{width:"65",height:"64",viewBox:"0 0 65 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("rect",{x:"1.5",y:"1",width:"62",height:"62",rx:"31",fill:"#FFE8D7",fillOpacity:"0.1"}),jsxRuntimeExports.jsx("rect",{x:"1.5",y:"1",width:"62",height:"62",rx:"31",stroke:"#E48329",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{d:"M32.484 16C23.652 16 16.5 23.168 16.5 32C16.5 40.832 23.652 48 32.484 48C41.332 48 48.5 40.832 48.5 32C48.5 23.168 41.332 16 32.484 16ZM37.764 39.536L30.9 32.656V24H34.1V31.344L40.036 37.28L37.764 39.536Z",fill:"#E48329"})]}),GOVERNOR_WHITEPAPER_URL="https://github.com/wormhole-foundation/wormhole/blob/main/whitepapers/0007_governor.md",useStyles$k=makeStyles()(it=>({dialog:{zIndex:10},paper:{borderRadius:24,[it.breakpoints.down("sm")]:{maxWidth:"100%",maxHeight:"100%",margin:0,borderRadius:0}},container:{position:"relative",width:"100%",margin:"0 auto",display:"flex",justifyContent:"center"},modal:{width:"100%",padding:32,position:"relative",maxHeight:"calc( 100vh - 80px )",[it.breakpoints.down("sm")]:{padding:"24px 12px",maxHeight:"100%"}},close:{color:"#3C3D77",position:"absolute",top:"28px",right:"28px",cursor:"pointer",opacity:"70%",zIndex:"10",[it.breakpoints.down("sm")]:{top:"12px",right:"20px"}},background:{background:it.palette.modal.background},icon:{textAlign:"center",paddingTop:24,paddingBottom:24},title:{textAlign:"center",fontSize:24,fontWeight:600,lineHeight:"32px",paddingTop:24,paddingBottom:24,borderBottom:"1px solid #313266"},text:{fontSize:"16px",fontWeight:400,lineHeight:"24px",color:"#9495D6",paddingTop:24,paddingBottom:24},link:{color:"#D5D5EB",textDecorationLine:"underline"},orange:{color:"#E48329"},clock:{width:64,height:64},buttonContainer:{display:"flex",justifyContent:"space-between",marginTop:"24px",gap:10,[it.breakpoints.down("sm")]:{flexDirection:"column"}}})),TransferLimitedWarning=it=>{const{classes:dt}=useStyles$k(),{fromChain:ht,token:pt}=it,[yt,Dt]=React.useState(!0),sn=useIsTransferLimited(),ln=()=>{Dt(!1)},mn=()=>{Dt(!1),setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight)},500)};if(reactExports.useEffect(()=>{Dt(!0)},[ht,pt]),sn.isLimited&&sn.reason&&sn.limits){const hn=wh.toChainName(sn.limits.chainId);let yn,Zn;return sn.reason==="EXCEEDS_MAX_NOTIONAL"||sn.reason==="EXCEEDS_REMAINING_NOTIONAL"?(Zn=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["This transaction will take up to"," ",jsxRuntimeExports.jsx("span",{className:dt.orange,children:"24 hours"})," to complete"]}),yn=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["This transaction will take up to 24 hours to process as Wormhole has"," ","reached the daily limit for ",hn,".",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"This is a normal and temporary security feature by the Wormhole"," ","network.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:GOVERNOR_WHITEPAPER_URL,target:"_blank",rel:"noreferrer",children:"Learn more"})," ","about this temporary security measure."]})):sn.reason==="EXCEEDS_LARGE_TRANSFER_LIMIT"&&(Zn=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["This transaction requires"," ",jsxRuntimeExports.jsx("span",{className:dt.orange,children:"24 hours"})," to complete"]}),yn=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["This transaction will take 24 hours to process, as it exceeds the Wormhole network's temporary transaction limit of $",sn.limits.chainBigTransactionSize," on ",hn," for"," ","security reasons.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"You may also split the transaction into smaller transactions less than"," ","$",sn.limits.chainBigTransactionSize," each to avoid the"," ","24 hour security delay.",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("a",{href:GOVERNOR_WHITEPAPER_URL,target:"_blank",rel:"noreferrer",children:"Learn more"})," ","about this temporary measure."]})),yn&&Zn?jsxRuntimeExports.jsx(Dialog$1,{open:yt,sx:{borderRadius:8},className:dt.dialog,classes:{paper:dt.paper},children:jsxRuntimeExports.jsx(ScopedCssBaseline$1,{enableColorScheme:!0,children:jsxRuntimeExports.jsxs("div",{className:dt.container,children:[jsxRuntimeExports.jsx(CloseIcon,{sx:{fontSize:32},className:dt.close,onClick:ln}),jsxRuntimeExports.jsxs("div",{className:dt.modal,children:[jsxRuntimeExports.jsx("div",{className:dt.icon,children:jsxRuntimeExports.jsx(ClockIcon,{})}),jsxRuntimeExports.jsx("div",{className:dt.title,children:Zn}),jsxRuntimeExports.jsx("div",{className:dt.text,children:yn}),jsxRuntimeExports.jsxs("div",{className:dt.buttonContainer,children:[jsxRuntimeExports.jsx(Button,{link:!0,onClick:ln,children:"Cancel"}),jsxRuntimeExports.jsx(Button,{onClick:mn,children:"Continue"})]})]})]})})}):null}return null},useStyles$j=makeStyles()(it=>({button:{borderRadius:"50%",width:"42px",height:"42px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:it.palette.card.background,boxShadow:it.palette.card.elevation,cursor:"pointer",[it.breakpoints.up("md")]:{marginBottom:"-40px"},zIndex:2}}));function SwapChains(){const{classes:it}=useStyles$j(),dt=useDispatch(),{isTransactionInProgress:ht}=useSelector(yt=>yt.transferInput),pt=()=>{ht||(dt(swapChains()),dt(swapWallets()))};return jsxRuntimeExports.jsx("div",{className:it.button,onClick:pt,children:jsxRuntimeExports.jsxs("svg",{width:"21",height:"22",viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M7.88281 18.4384L3.49031 14.0547",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M7.88281 3.5625L7.88281 18.4375",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M13.1153 3.5625L17.5078 7.94625",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntimeExports.jsx("path",{d:"M13.1172 18.4375L13.1172 3.5625",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})})}const useStyles$i=makeStyles()(it=>({menuIcon:ICON,menu:{display:"flex",[it.breakpoints.down("md")]:{flexDirection:"column"},flexDirection:"row",gap:"8px",padding:"8px",width:"100%"},menuItem:{padding:"16px 0",textAlign:"center",fontSize:"14px",margin:"auto",cursor:"pointer","&:hover":{textDecoration:"underline"}}}));function itemAppender(it,dt){const{order:ht=it.length,target:pt="_black",href:yt,label:Dt}=dt;return it.splice(ht,0,{label:Dt,handleClick:()=>window.open(yt,pt)}),it}function defaultMenuItems(it){return[{label:"Resume Transaction",handleClick:()=>it("search")},{label:"FAQs",handleClick:()=>it("faq")},{label:"Terms of Use",handleClick:()=>it("terms")}]}function FooterNavBar(){const{classes:it}=useStyles$i(),dt=useDispatch(),ht=reactExports.useCallback(yt=>{dt(setRoute(yt))},[dt]),pt=reactExports.useMemo(()=>MENU_ENTRIES.reduce(itemAppender,defaultMenuItems(ht)),[ht]);return jsxRuntimeExports.jsx("div",{className:it.menu,children:pt.map(({label:yt,handleClick:Dt},sn)=>jsxRuntimeExports.jsx("div",{className:it.menuItem,onClick:Dt,children:yt},`${yt.toLowerCase()}_${sn}`))})}const FETCH_SWAP_INFO_INTERVAL=6e4,usePorticoSwapInfo=()=>{const it=useDispatch(),{route:dt,token:ht,destToken:pt,toChain:yt,fromChain:Dt,amount:sn,isTransactionInProgress:ln}=useSelector(mn=>mn.transferInput);reactExports.useEffect(()=>{if(!dt||!isPorticoRoute(dt)||!ht||!pt||!Dt||!yt||ln)return;let mn=!1;return(async()=>{if(!await RouteOperator.isRouteSupported(dt,ht,pt,sn,Dt,yt)){it(resetSwapAmounts());return}for(it(setFetchingSwapAmounts());!mn;){try{const Cn=await RouteOperator.getRoute(dt).computeSwapAmounts(Number.parseFloat(sn),ht,pt,Dt,yt);mn||it(setSwapAmounts(Cn))}catch{mn||it(setSwapAmountsError("Error computing swap amounts"))}await sleep(FETCH_SWAP_INFO_INTERVAL)}})(),()=>{mn=!0}},[dt,ht,pt,yt,Dt,sn,ln,it])},FETCH_FEE_INTERVAL=6e4,usePorticoRelayerFee=()=>{const it=useDispatch(),{route:dt,token:ht,destToken:pt,toChain:yt,fromChain:Dt,isTransactionInProgress:sn}=useSelector(ln=>ln.transferInput);reactExports.useEffect(()=>{if(!dt||!isPorticoRoute(dt)||!ht||!pt||!Dt||!yt||sn)return;let ln=!1;return(async()=>{if(!await RouteOperator.isRouteSupported(dt,ht,pt,"0",Dt,yt)){it(resetRelayerFee());return}for(it(setFetchingRelayerFee());!ln;){try{const yn=await RouteOperator.getRelayerFee(dt,Dt,yt,ht,pt);ln||it(setRelayerFee(yn.toString()))}catch{ln||it(setRelayerFeeError("Error fetching relayer fee"))}await sleep(FETCH_FEE_INTERVAL)}})(),()=>{ln=!0}},[dt,ht,pt,yt,Dt,sn,it])},PRICES_FETCH_INTERVAL=6e4*5,COINGECKO_URL="https://api.coingecko.com/",COINGECKO_URL_PRO="https://pro-api.coingecko.com/",COINGECKO_IDS=Object.values(TOKENS).filter(it=>!!it.coinGeckoId).map(({coinGeckoId:it})=>it).join(","),useFetchTokenPrices=()=>{const it=useDispatch();reactExports.useEffect(()=>{let dt=!1;const ht=new AbortController,pt=ht.signal,yt=new Headers({"Content-Type":"application/json",...COINGECKO_API_KEY?{"x-cg-pro-api-key":COINGECKO_API_KEY||""}:{}});return(async()=>{for(;!dt;){try{const ln=await(await fetch(`${COINGECKO_API_KEY?COINGECKO_URL_PRO:COINGECKO_URL}api/v3/simple/price?ids=${COINGECKO_IDS}&vs_currencies=usd${COINGECKO_API_KEY?`?x_cg_pro_api_key=${COINGECKO_API_KEY}`:""}`,{signal:pt,headers:yt})).json();dt||it(setPrices(ln))}catch(sn){dt||it(setPricesError(`Error fetching token prices: ${sn}`))}await sleep(PRICES_FETCH_INTERVAL)}})(),()=>{dt=!0,ht.abort()}},[])},useStyles$h=makeStyles()(it=>({spacer:{display:"flex",flexDirection:"column",gap:"16px",alignItems:"center",justifyContent:"center",width:"100%"},bridgeContent:{margin:"auto",maxWidth:"650px"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},poweredBy:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",marginTop:"24px"}}));function isSupportedToken(it,dt){return it?dt.some(ht=>ht.key===it):!0}function Bridge(){const{classes:it}=useStyles$h(),dt=useTheme(),ht=useDispatch(),{showValidationState:pt,validations:yt,fromChain:Dt,toChain:sn,token:ln,destToken:mn,route:hn,isTransactionInProgress:yn,amount:Zn}=useSelector(cr=>cr.transferInput),{toNativeToken:Cn,relayerFee:Qn}=useSelector(cr=>cr.relay),Fn=useSelector(cr=>cr.porticoBridge),{receiving:Hn}=useSelector(cr=>cr.wallet);useConfirmBeforeLeaving(yn),reactExports.useEffect(()=>{if(!Dt||!sn||!Hn.address)return;const cr=CHAINS$1[sn];wh.getNativeBalance(Hn.address,sn).then(Wn=>{const hr=TOKENS[cr.gasToken];if(!hr)throw new Error("Could not get native gas token config");const ur=getTokenDecimals(toChainId(hr.nativeChain),"native");ht(setReceiverNativeBalance$1(toDecimals(Wn,ur,6)))})},[Dt,sn,Hn.address,ht]),reactExports.useEffect(()=>{(async()=>{const Wn=await RouteOperator.allSupportedSourceTokens(TOKENS[mn],Dt,sn);ht(setSupportedSourceTokens(Wn)),isSupportedToken(ln,Wn)||ht(setToken("")),Wn.length===1&&ln===""&&ht(setToken(Wn[0].key))})()},[hn,Dt,mn,ht]),reactExports.useEffect(()=>{(async()=>{var Gn,Un;const Wn=await RouteOperator.allSupportedDestTokens(TOKENS[ln],Dt,sn);ht(setSupportedDestTokens(Wn));const hr=await RouteOperator.allSupportedDestTokens(void 0,Dt,sn);ht(setAllSupportedDestTokens(hr)),sn&&Wn.length===1&&ht(setDestToken(Wn[0].key));const ur=Wn.map(ir=>ir.symbol);if(sn&&ur.every(ir=>ir===ur[0])&&["USDC","tBTC"].includes(ur[0])){const ir=(Gn=Wn.find(pr=>{var sr;return pr.symbol===ur[0]&&pr.nativeChain===((sr=pr.tokenId)==null?void 0:sr.chain)&&pr.nativeChain===sn}))==null?void 0:Gn.key;ir&&ht(setDestToken(ir))}if(ln&&mn===""&&sn&&(!hn||isPorticoRoute(hn))){const ir=(Un=TOKENS[ln])==null?void 0:Un.symbol;if([...ETHBridge.SUPPORTED_TOKENS,...wstETHBridge.SUPPORTED_TOKENS].includes(ir)){let sr=getNativeVersionOfToken(ir,sn);if(!sr){const Ar=getWrappedToken(TOKENS[ln]);sr=getNativeVersionOfToken(Ar.symbol,sn)}sr&&isSupportedToken(sr,Wn)&&ht(setDestToken(sr))}}})()},[hn,ln,Dt,sn,ht]),reactExports.useEffect(()=>{(async()=>{if(hn)try{const Wn=isPorticoRoute(hn)?Fn:{toNativeToken:Cn,relayerFee:Qn};ht(setFetchingReceiveAmount());const hr=await RouteOperator.computeReceiveAmount(hn,Number.parseFloat(Zn),ln,mn,Dt,sn,Wn);ht(setReceiveAmount(hr.toString()))}catch(Wn){ht(setReceiveAmountError(Wn.message))}})()},[Zn,Cn,Qn,hn,ln,mn,sn,Dt,Fn,ht]),usePorticoSwapInfo(),usePorticoRelayerFee(),useFetchTokenPrices(),useValidate();const Yn=isTransferValid(yt),er=!Yn||yn,Kn=sn?CHAINS$1[sn]:void 0,Xn=Kn?TOKENS[Kn.gasToken]:void 0,fr=Xn?getWrappedToken(Xn):void 0,or=fr&&mn===fr.key,ar=hn&&RouteOperator.getRoute(hn).NATIVE_GAS_DROPOFF_SUPPORTED&&!or,jn=!!Dt&&!!sn&&!!ln&&!!mn&&!!Zn;return jsxRuntimeExports.jsxs("div",{className:joinClass([it.bridgeContent,it.spacer]),children:[jsxRuntimeExports.jsx(PageHeader,{title:pageHeader.text,align:pageHeader.align,showHamburgerMenu}),jsxRuntimeExports.jsx(FromInputs,{}),jsxRuntimeExports.jsx(SwapChains,{}),jsxRuntimeExports.jsx(ToInputs,{}),jsxRuntimeExports.jsx(ValidationError,{forceShow:jn,validations:[yt.route],margin:"12px 0 0 0"}),jsxRuntimeExports.jsx(RouteOptions,{}),jsxRuntimeExports.jsx(Collapse$1,{in:Yn&&pt,children:jsxRuntimeExports.jsxs("div",{className:it.spacer,children:[jsxRuntimeExports.jsx(Collapse$1,{in:ar,sx:ar?{}:{marginBottom:"-16px",transition:"margin 0.4s"},children:ar&&jsxRuntimeExports.jsx(GasSlider,{disabled:er})}),jsxRuntimeExports.jsx(Preview,{collapsed:pt?!Yn:!0}),jsxRuntimeExports.jsx(TransferLimitedWarning,{fromChain:Dt,token:ln}),jsxRuntimeExports.jsx(Send,{valid:!!Yn})]})}),showHamburgerMenu?null:jsxRuntimeExports.jsx(FooterNavBar,{}),jsxRuntimeExports.jsx("div",{className:it.poweredBy,children:jsxRuntimeExports.jsx(PoweredByIcon,{color:dt.palette.text.primary})})]})}const useStyles$g=makeStyles()(it=>({container:{width:"100%",borderRadius:"8px",boxShadow:it.palette.card.elevation},header:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px",cursor:"pointer",backgroundColor:it.palette.card.background,backgroundOpacity:"80%",borderRadius:"8px",transition:"border-radius 0.4s"},title:{fontSize:"14px",fontWeight:"bold"},invert:{transform:"rotate(180deg)"},arrow:{width:"32px",height:"32px",transition:"transform 0.4s"},content:{padding:"16px",backgroundColor:it.palette.card.background,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",fontWeight:"300"},open:{borderBottomLeftRadius:"0 !important",borderBottomRightRadius:"0 !important"}}));function Dropdown(it){const{classes:dt}=useStyles$g(),ht=()=>{it.onToggle&&it.onToggle(it.id)};return jsxRuntimeExports.jsxs("div",{className:dt.container,children:[jsxRuntimeExports.jsxs("div",{className:joinClass([dt.header,!!it.open&&dt.open]),onClick:ht,children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("div",{className:dt.title,children:it.title})}),jsxRuntimeExports.jsx(DownIcon,{className:joinClass([dt.arrow,!!it.open&&dt.invert])})]}),jsxRuntimeExports.jsx(Collapse$1,{in:it.open,children:jsxRuntimeExports.jsx("div",{className:dt.content,children:it.children})})]})}const useStyles$f=makeStyles()(it=>({container:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center",marginTop:"20px"},faqs:{display:"flex",flexDirection:"column",gap:"16px",width:"100%"},link:{color:it.palette.text.primary,textDecoration:"underline",cursor:"pointer"}}));function FAQ(){const{classes:it}=useStyles$f(),dt=[{title:"What is Wormhole Connect?",content:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Wormhole Connect is an open source frontend SDK that lets Web3 developers embed asset bridging directly into their apps or websites."})},{title:"What types of assets does Connect support?",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Initially, Connect will only support bridging wrapped assets. This means that any native token bridged through Connect and the underlying Wormhole Token Bridge will be received as a Wormhole-wrapped token on the destination chain. In some cases, Wormhole minted tokens are the canonical representation on the chain (e.g. WETH on Solana is a Wormhole minted token, see",jsxRuntimeExports.jsx("a",{href:"https://github.com/wormhole-foundation/wormhole-token-list",target:"_blank",rel:"noreferrer",className:it.link,children:"https://github.com/wormhole-foundation/wormhole-token-list"}),") and in other cases Wormhole minted tokens can be swapped on the destination chain’s DEX(s) for whatever assets you need (e.g. USDCeth bridged from Ethereum to Avalanche can be swapped for native USDC on Trader Joe)."]})},{title:"Will Connect support native asset bridging?",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Yes, Connect will soon surface multiple Wormhole-powered services (e.g. cross chain asset swaps) that enable other forms of bridging more suitable for certain use cases. Check"," ",jsxRuntimeExports.jsx("a",{href:"https://wormhole.com/connect",target:"_blank",rel:"noreferrer",className:it.link,children:"https://wormhole.com/connect"})," ","for updates on Connect support."]})},{title:"What chains and assets does Connect support?",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Initially, Connect supports wrapped asset bridging of ETH, WETH, USDC, MATIC, WMATIC, BNB, WBNB, AVAX, WAVAX, FTM, WFTM, CELO, GLMR, WGLMR, AND SOL across Ethereum, Polygon, BSC, Avalanche, Celo, Moonbeam, Base, Solana and Sui. Connect will support other Wormhole-connected chains and assets in the future, see the full list of Connect supported chains on the"," ",jsxRuntimeExports.jsx("a",{href:"https://github.com/wormhole-foundation/wormhole-connect/blob/development/wormhole-connect/src/config/mainnet/chains.ts",target:"_blank",rel:"noreferrer",className:it.link,children:"GitHub repository"})," ","and Wormhole supported chains at"," ",jsxRuntimeExports.jsx("a",{href:"https://wormhole.com/network",target:"_blank",rel:"noreferrer",className:it.link,children:"https://wormhole.com/network"}),"."]})},{title:"What is automatic relaying?",content:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"On EVM-based chains, Connect lets users bridge assets while only having to pay gas on the source chain. The automatic relaying feature pays gas on behalf of users on the destination chain. Connect will support automatic relaying for other chains in the future."})},{title:"What is gas dropoff?",content:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"Gas dropoff is a Connect feature that enables users to pay an additional fee on the source chain to request a small amount of native gas on the destination chain. For example, a user bridging USDC from Ethereum to Sui can pay a fee denominated in USDC from their sending wallet to receive some native SUI in their receiving wallet in addition to the USDC they are bridging over. Gas dropoff is currently supported on EVM-based chains and Sui, and will be supported on other chains in the future."})},{title:"Can I customize Connect inside my application?",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Connect supports both light and dark modes and can optionally be fully customized. See the"," ",jsxRuntimeExports.jsx("a",{href:"https://www.npmjs.com/package/@wormhole-foundation/wormhole-connect",target:"_blank",rel:"noreferrer",className:it.link,children:"NPM package readme"})," ","for more details."]})},{title:"Contact",content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["If you have any further questions or require troubleshooting, please reach out to Wormhole's community managers on"," ",jsxRuntimeExports.jsx("a",{href:"https://discord.com/invite/wormholecrypto",target:"_blank",rel:"noreferrer",className:it.link,children:"Discord"}),".",jsxRuntimeExports.jsx(AlertBanner,{show:!0,warning:!0,content:"Beware of scams. Admins will never DM or message you first.",margin:"16px 0 0 0"})]})}],[ht,pt]=reactExports.useState(void 0),yt=Dt=>{pt(Dt===ht?void 0:Dt)};return jsxRuntimeExports.jsxs("div",{className:it.container,children:[jsxRuntimeExports.jsx(PageHeader,{title:"FAQ",description:"This page collects and answers the most commonly asked questions.",showHamburgerMenu,back:!0}),jsxRuntimeExports.jsx("div",{className:it.faqs,children:dt.map((Dt,sn)=>{const ln=sn+1;return jsxRuntimeExports.jsx(Dropdown,{title:Dt.title,open:!!ht&&ht===ln,onToggle:()=>yt(ln),children:Dt.content},ln)})}),showHamburgerMenu?null:jsxRuntimeExports.jsx(FooterNavBar,{})]})}var Launch={},_interopRequireDefault$2=interopRequireDefaultExports;Object.defineProperty(Launch,"__esModule",{value:!0});var default_1$2=Launch.default=void 0,_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"Launch");default_1$2=Launch.default=_default$2;const useStyles$e=makeStyles()(it=>({row:{display:"flex",alignItems:"center",gap:"16px"},icon:{width:"24px",height:"24px"},chain:{display:"flex",alignItems:"center",gap:"8px"},link:{...LINK(it),justifyContent:"center"}}));function ChainsTag(){const{classes:it}=useStyles$e(),dt=useSelector(yn=>yn.redeem.txData),ht=useSelector(yn=>yn.redeem.signedMessage),pt=CHAINS$1[dt.fromChain],yt=CHAINS$1[dt.toChain],Dt=dt.sendTx||(ht==null?void 0:ht.sendTx),sn=dt.sequence||(ht==null?void 0:ht.sequence),ln=dt.emitterAddress||(ht==null?void 0:ht.emitterAddress),mn=ln?stripHexPrefix(ln):void 0,hn=reactExports.useMemo(()=>{if(!dt)return;if(isEvmChain(pt.id)&&Dt)return`${WORMSCAN}tx/${Dt}${isMainnet?"":"?network=TESTNET"}`;if(!mn||!sn)return;const yn=isGatewayChain(pt.id)?CHAIN_ID_WORMCHAIN$1:pt.id;return`${WORMSCAN}tx/${yn}/${mn}/${sn}${isMainnet?"":"?network=TESTNET"}`},[dt,Dt,mn,sn,pt.id]);return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(InputContainer,{children:jsxRuntimeExports.jsxs("div",{className:it.row,children:[jsxRuntimeExports.jsxs("div",{className:it.chain,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:pt.icon,height:24}),jsxRuntimeExports.jsx("div",{children:pt.displayName})]}),jsxRuntimeExports.jsx(ArrowRightIcon,{}),jsxRuntimeExports.jsxs("div",{className:it.chain,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:yt.icon,height:24}),jsxRuntimeExports.jsx("div",{children:yt.displayName})]})]})}),dt&&hn&&jsxRuntimeExports.jsxs("a",{className:it.link,href:hn,target:"_blank",rel:"noreferrer",children:[jsxRuntimeExports.jsx("div",{children:"View on Wormholescan"}),jsxRuntimeExports.jsx(default_1$2,{})]})]})}const useStyles$d=makeStyles()(it=>({content:{marginLeft:"14px",minHeight:"40px",borderLeft:`1px solid ${it.palette.primary[700]}`,padding:"8px 0 16px 32px",[it.breakpoints.down("sm")]:{marginLeft:"0",borderLeft:"none",paddingLeft:"0"}},lineActive:{borderColor:it.palette.success[400]},lineWarning:{borderColor:it.palette.warning[400]},lineNone:{border:"none !important"}}));function StepperLabel$1(it){const{classes:dt}=useStyles$d(),{index:ht,activeStep:pt,last:yt,children:Dt,warning:sn}=it;return jsxRuntimeExports.jsx("div",{className:joinClass([dt.content,pt>ht&&(sn?dt.lineWarning:dt.lineActive),!!yt&&dt.lineNone]),children:pt>=ht&&Dt})}var Check={},_interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(Check,"__esModule",{value:!0});var default_1$1=Check.default=void 0,_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");default_1$1=Check.default=_default$1;var Warning={},_interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(Warning,"__esModule",{value:!0});var default_1=Warning.default=void 0,_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");default_1=Warning.default=_default;const useStyles$c=makeStyles()(it=>({label:{display:"flex",alignItems:"center"},textInactive:{color:`${it.palette.text.primary}${OPACITY[30]} !important`},icon:{width:"32px",height:"32px",backgroundColor:it.palette.card.background,borderRadius:"50%",border:`1px solid ${it.palette.primary[500]}`,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px",marginRight:"32px",[it.breakpoints.down("sm")]:{margin:"0 8px 0 16px"}},filled:{backgroundColor:`${it.palette.success[400]} !important`},iconActive:{border:`1px solid ${it.palette.success[400]} !important`},iconWarning:{border:`1px solid ${it.palette.warning[400]} !important`}}));function StepIcon(it){const{active:dt,completed:ht,filled:pt,warning:yt}=it,{classes:Dt}=useStyles$c(),sn=useTheme();return yt?jsxRuntimeExports.jsx("div",{className:joinClass([Dt.icon,Dt.iconWarning,!!pt&&Dt.filled]),children:jsxRuntimeExports.jsx(default_1,{htmlColor:sn.palette.warning[500]})}):ht?jsxRuntimeExports.jsx("div",{className:joinClass([Dt.icon,Dt.iconActive,!!pt&&Dt.filled]),children:jsxRuntimeExports.jsx(default_1$1,{htmlColor:pt?"#fff":sn.palette.success[500]})}):dt?jsxRuntimeExports.jsx("div",{className:joinClass([Dt.icon,Dt.iconActive]),children:it.index}):jsxRuntimeExports.jsx("div",{className:Dt.icon,children:it.index})}function StepperLabel(it){const{classes:dt}=useStyles$c(),{index:ht,activeStep:pt,filled:yt,children:Dt,warning:sn}=it;return jsxRuntimeExports.jsxs("div",{className:joinClass([dt.label,ht>pt&&dt.textInactive]),children:[jsxRuntimeExports.jsx(StepIcon,{index:ht,active:ht===pt,completed:ht<pt,filled:yt,warning:sn}),Dt]})}function Stepper(it){const{steps:dt,activeStep:ht}=it,pt=useTheme();return jsxRuntimeExports.jsx(Stack$1,{sx:{width:"100%"},children:dt.map((yt,Dt)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(StepperLabel,{index:Dt+1,activeStep:ht,filled:pt.palette.mode==="light",warning:yt.warningLabel,children:jsxRuntimeExports.jsx("div",{children:yt.label})}),jsxRuntimeExports.jsx(StepperLabel$1,{index:Dt+1,activeStep:ht,last:Dt+1===dt.length,warning:yt.warningLine,children:yt.component})]},Dt))})}const BorderLinearProgress=styled$1(LinearProgress$1)(({theme:it})=>({borderRadius:5,[`&.${linearProgressClasses$1.colorPrimary}`]:{backgroundColor:it.palette.card.secondary},[`& .${linearProgressClasses$1.bar}`]:{borderRadius:5,backgroundColor:it.palette.success[300]}})),useStyles$b=makeStyles()(it=>({confirmations:{display:"flex",flexDirection:"column",justifyContent:"center",gap:"8px",marginTop:"16px"},confirmationsText:{textAlign:"center"}}));function Confirmations(it){const{classes:dt}=useStyles$b(),{chain:ht,blockHeight:pt}=it,yt=CHAINS$1[ht],Dt=pt+yt.finalityThreshold,[sn,ln]=reactExports.useState(0),{route:mn}=useSelector(Cn=>Cn.redeem);reactExports.useEffect(()=>{if(yt.finalityThreshold===0)return;let Cn=!1;return(async()=>{for(;0<Dt&&!Cn;){const Fn=await getCurrentBlock(it.chain);Cn||(ln(Fn),await new Promise(Hn=>setTimeout(Hn,1e3)))}})(),()=>{Cn=!0}},[Dt,it.chain,yt.finalityThreshold]);const hn=sn>Dt?0:Dt-sn,yn=yt.finalityThreshold-hn,Zn=yt.finalityThreshold===0?100:Math.floor(yn/yt.finalityThreshold*100);return jsxRuntimeExports.jsxs("div",{className:dt.confirmations,children:[jsxRuntimeExports.jsx(BorderLinearProgress,{variant:"determinate",value:Zn,color:"secondary"}),jsxRuntimeExports.jsx("div",{className:dt.confirmationsText,children:Zn<100?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[yn," / ",yt.finalityThreshold," Confirmations"]}):mn?RoutesConfig[mn].pendingMessage:""})]})}const useStyles$a=makeStyles()(it=>({link:{...LINK(it),transform:"translateX(10px)"}}));function ExplorerLink(it){const{classes:dt}=useStyles$a(),ht=CHAINS$1[it.chain];let pt;return it.type==="tx"?ht.key==="sui"?pt=`${ht.explorerUrl}txblock/${it.txHash}`:ht.key==="aptos"?pt=`${ht.explorerUrl}txn/${it.txHash}`:ht.key==="sei"?pt=`${ht.explorerUrl}transaction/${it.txHash}`:ht.key==="osmosis"?pt=ENV==="TESTNET"?`${ht.explorerUrl}txs/${it.txHash}`:`${ht.explorerUrl}transactions/${it.txHash}`:pt=`${ht.explorerUrl}tx/${it.txHash}`:it.type==="address"&&(ht.key==="aptos"?pt=`${ht.explorerUrl}account/${it.address}`:pt=`${ht.explorerUrl}address/${it.address}`),it.type==="object"&&ht.key==="sui"&&(pt=`${ht.explorerUrl}object/${it.object}`),isMainnet||(ht.key==="solana"&&(pt+="?cluster=devnet"),ht.key==="sui"&&(pt+="?network=testnet"),ht.key==="aptos"&&(pt+="?network=testnet")),jsxRuntimeExports.jsxs("a",{className:dt.link,style:it.styles,href:pt,target:"_blank",rel:"noreferrer",children:[jsxRuntimeExports.jsx("div",{children:ht.explorerName}),jsxRuntimeExports.jsx(default_1$2,{})]})}const useStyles$9=makeStyles()(it=>({header:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:"8px",borderBottom:`0.5px solid ${it.palette.divider}`,marginBottom:"8px"},left:{display:"flex",flexDirection:"row",alignItems:"center",fontSize:"16px",gap:"8px"},chainIcon:{height:"32px",width:"32px"}}));function Header(it){const{classes:dt}=useStyles$9(),ht=CHAINS$1[it.chain];return jsxRuntimeExports.jsxs("div",{className:dt.header,children:[jsxRuntimeExports.jsxs("div",{className:dt.left,children:[jsxRuntimeExports.jsx(TokenIcon,{icon:ht.icon,height:32}),jsxRuntimeExports.jsx("div",{children:displayAddress(it.chain,it.address)}),jsxRuntimeExports.jsx(WalletIcon$1,{})]}),it.loading?jsxRuntimeExports.jsx(CircularProgress$1,{size:26}):it.text?jsxRuntimeExports.jsx("div",{children:it.text}):it.txHash&&jsxRuntimeExports.jsx(ExplorerLink,{chain:it.chain,type:"tx",txHash:it.txHash})]})}function SendFrom(){const{txData:it,route:dt,signedMessage:ht}=useSelector(mn=>mn.redeem),pt=useSelector(mn=>mn.redeem.transferComplete),{usdPrices:{data:yt}}=useSelector(mn=>mn.tokenPrices),Dt=yt||{},[sn,ln]=reactExports.useState([]);return reactExports.useEffect(()=>{!it||!dt||RouteOperator.getTransferSourceInfo(dt,{txData:it,tokenPrices:Dt}).then(mn=>ln(mn))},[it,dt,yt]),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(InputContainer,{children:[jsxRuntimeExports.jsx(Header,{chain:it.fromChain,address:it.sender,txHash:it.sendTx}),jsxRuntimeExports.jsx(RenderRows,{rows:sn})]}),!pt&&!ht&&jsxRuntimeExports.jsx(Confirmations,{chain:it.fromChain,blockHeight:it.block})]})}const useStyles$8=makeStyles()(it=>({walletRow:{position:"relative",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"16px 8px",transition:"background-color 0.4s",cursor:"pointer",fontSize:"16px","&:hover":{backgroundColor:it.palette.options.select},"&:not(:last-child)":{borderBottom:`0.5px solid ${it.palette.divider}`}},walletRowLeft:{display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"},context:{opacity:"0.6"},notInstalled:{opacity:"60%"},noResults:{...CENTER,minHeight:"72px",maxWidth:"350px",margin:"auto",flexDirection:"column",marginBottom:"10px",gap:"8px"},noResultsTitle:{fontSize:"20px",fontWeight:"600"}})),FAILED_TO_LOAD_ERR="Failed to load wallets. Please refresh and try again.";function WalletsModal(it){const dt=useTheme(),{classes:ht}=useStyles$8(dt),{chain:pt,type:yt}=it,Dt=useDispatch(),{fromChain:sn,toChain:ln}=useSelector(Kn=>Kn.transferInput),[mn,hn]=reactExports.useState({state:"loading"}),[yn,Zn]=reactExports.useState(""),Cn=reactExports.useMemo(()=>{const Kn=CHAINS_ARR.map(Xn=>Xn.context);return new Set(Kn)},[]);reactExports.useEffect(()=>{let Kn=!1;async function Xn(){const fr=pt||(yt===TransferWallet.SENDING?sn:ln),or=CHAINS$1[fr];return Cn.has(or.context)?await getWalletOptions(or):[]}return(async()=>{try{const fr=await Xn();!Kn&&fr&&hn({state:"result",options:fr})}catch{hn({state:"error",error:FAILED_TO_LOAD_ERR})}})(),()=>{Kn=!0}},[sn,ln,it.chain,pt,yt,Cn]);const Qn=Kn=>{if(!Kn)return;const Xn=Kn.target.value.toLowerCase();Zn(Xn)},Fn=async Kn=>{var jn;const{wallet:Xn}=Kn,fr=yt===TransferWallet.SENDING?sn:ln,or=fr?(jn=CHAINS$1[fr])==null?void 0:jn.chainId:void 0;await Xn.connect({chainId:or}),setWalletConnection(it.type,Xn);const ar=Xn.getAddress();if(Xn.on("disconnect",()=>{Xn.removeAllListeners(),Dt(clearWallet(it.type))}),Xn.on("accountsChanged",cr=>{(cr.length===0||cr.length&&ar&&cr[0]!==ar)&&Xn.disconnect()}),ar){const cr={address:ar,type:Kn.type,icon:Xn.getIcon(),name:Xn.getName()};it.type===TransferWallet.SENDING?Dt(connectWallet(cr)):Dt(connectReceivingWallet(cr)),Dt(setWalletModal(!1)),it.onClose&&it.onClose()}},Hn=Kn=>{const Xn=Kn.sort(ar=>ar.isReady?-1:1),fr=({name:ar,type:jn})=>ar.toLowerCase().includes(yn)||jn.toLowerCase().includes(yn);return(yn?Xn.filter(fr):Xn).map((ar,jn)=>{const cr=ar.isReady,Wn=cr?()=>Fn(ar):()=>window.open(ar.wallet.getUrl());return jsxRuntimeExports.jsxs("div",{className:ht.walletRow,onClick:Wn,children:[jsxRuntimeExports.jsxs("div",{className:ht.walletRowLeft,children:[jsxRuntimeExports.jsx(WalletIcon,{name:ar.name,icon:ar.icon,height:32}),jsxRuntimeExports.jsxs("div",{className:`${!cr&&ht.notInstalled}`,children:[!cr&&"Install"," ",ar.name]})]}),jsxRuntimeExports.jsx("div",{className:ht.context,children:ar.type.toUpperCase()})]},jn)})},Yn=()=>{it.onClose?it.onClose():Dt(setWalletModal(!1))},er=()=>{if(mn.state==="loading")return jsxRuntimeExports.jsx(CircularProgress$1,{});if(mn.state==="error")return jsxRuntimeExports.jsx(AlertBanner,{show:!0,content:mn.error,error:!0});if(mn.state==="result"){const{options:Kn}=mn;if(Kn.length>0)return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Search,{placeholder:"Search",onChange:Qn}),jsxRuntimeExports.jsx(Spacer,{height:16}),jsxRuntimeExports.jsx(Scroll,{height:"calc(100vh - 250px)",blendColor:dt.palette.modal.background,children:jsxRuntimeExports.jsx("div",{children:Hn(Kn)})})]})}return jsxRuntimeExports.jsxs("div",{className:ht.noResults,children:[jsxRuntimeExports.jsx("div",{className:ht.noResultsTitle,children:"No wallets detected"}),jsxRuntimeExports.jsx("div",{children:"Install a wallet extension to continue"})]})};return jsxRuntimeExports.jsxs(Modal,{open:!!it.type,closable:!0,width:500,onClose:Yn,children:[jsxRuntimeExports.jsx(Header$1,{text:"Connect wallet",size:28}),jsxRuntimeExports.jsx(Spacer,{height:16}),er()]})}const InfoIcon=createSvgIcon$1(jsxRuntimeExports.jsx("path",{d:"M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21508 0.913451 7.4078C0.00519941 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.807 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0865C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6934 24 14.3734 24 12C23.9969 8.81834 22.7317 5.76787 20.4819 3.51809C18.2321 1.26832 15.1817 0.00305488 12 0ZM12 22.1538C9.99176 22.1538 8.02862 21.5583 6.35883 20.4426C4.68904 19.3269 3.38759 17.7411 2.61907 15.8857C1.85055 14.0303 1.64947 11.9887 2.04126 10.0191C2.43305 8.04943 3.40011 6.24019 4.82015 4.82015C6.24019 3.40011 8.04943 2.43305 10.0191 2.04126C11.9887 1.64947 14.0303 1.85055 15.8857 2.61907C17.7411 3.38759 19.3269 4.68903 20.4426 6.35882C21.5583 8.02861 22.1538 9.99176 22.1538 12C22.1508 14.692 21.08 17.2729 19.1765 19.1765C17.2729 21.08 14.692 22.1508 12 22.1538ZM13.8462 17.5385C13.8462 17.7833 13.7489 18.0181 13.5758 18.1912C13.4027 18.3643 13.1679 18.4615 12.9231 18.4615H12C11.7552 18.4615 11.5204 18.3643 11.3473 18.1912C11.1742 18.0181 11.0769 17.7833 11.0769 17.5385V12C10.8321 12 10.5973 11.9027 10.4242 11.7296C10.2511 11.5565 10.1538 11.3217 10.1538 11.0769C10.1538 10.8321 10.2511 10.5973 10.4242 10.4242C10.5973 10.2511 10.8321 10.1538 11.0769 10.1538H12C12.2448 10.1538 12.4796 10.2511 12.6527 10.4242C12.8258 10.5973 12.9231 10.8321 12.9231 11.0769V16.6154C13.1679 16.6154 13.4027 16.7126 13.5758 16.8857C13.7489 17.0589 13.8462 17.2936 13.8462 17.5385ZM10.3846 6.92308C10.3846 6.64922 10.4658 6.38152 10.618 6.15382C10.7701 5.92613 10.9864 5.74866 11.2394 5.64386C11.4924 5.53906 11.7708 5.51164 12.0394 5.56507C12.3079 5.61849 12.5547 5.75036 12.7483 5.944C12.9419 6.13765 13.0738 6.38436 13.1272 6.65295C13.1807 6.92154 13.1532 7.19994 13.0485 7.45294C12.9437 7.70595 12.7662 7.9222 12.5385 8.07434C12.3108 8.22649 12.0431 8.30769 11.7692 8.30769C11.402 8.30769 11.0498 8.16181 10.7902 7.90215C10.5305 7.64248 10.3846 7.2903 10.3846 6.92308Z",fill:"currentColor",fillOpacity:"0.9"}),"Info"),useStyles$7=makeStyles()(it=>({flex:{display:"flex",alignItems:"center",marginLeft:"auto"},icon:{height:"14px",cursor:"pointer"}}));function SwitchToManualClaim({checked:it,onChange:dt,disabled:ht,title:pt}){const{classes:yt}=useStyles$7();return jsxRuntimeExports.jsxs("div",{className:yt.flex,children:[!it&&jsxRuntimeExports.jsx("span",{children:"Waiting for relayer. . ."}),jsxRuntimeExports.jsxs("div",{className:yt.flex,children:[jsxRuntimeExports.jsx("span",{children:"Switch to manual claim"}),jsxRuntimeExports.jsx(Tooltip$1,{title:pt,arrow:!0,children:jsxRuntimeExports.jsx(InfoIcon,{className:yt.icon})}),jsxRuntimeExports.jsx(Switch,{checked:it,onChange:Dt=>dt(Dt.target.checked),disabled:ht})]})]})}function AssociatedTokenAlert(){const it=useDispatch(),dt=useSelector(Dt=>Dt.redeem.txData),ht=useSelector(Dt=>Dt.wallet.receiving),pt=reactExports.useCallback(async()=>{const Dt=getTokenById(dt.tokenId);if(!Dt)return;const sn=getWrappedTokenId(Dt),ln=await solanaContext().createAssociatedTokenAccount(sn,ht.address,"finalized");ln&&(await signAndSendTransaction("solana",ln,TransferWallet.RECEIVING),it(setTxDetails({...dt,recipient:ht.address})))},[dt,ht.address,it]),yt=jsxRuntimeExports.jsx(AssociatedTokenWarning,{createAssociatedTokenAccount:pt});return jsxRuntimeExports.jsx(AlertBanner,{warning:!0,show:!!ht.address,content:yt})}function SendTo(){const it=useDispatch(),{redeemTx:dt,transferComplete:ht,route:pt,signedMessage:yt}=useSelector(pr=>pr.redeem),Dt=useSelector(pr=>pr.redeem.txData),sn=useSelector(pr=>pr.wallet.receiving),ln=useSelector(pr=>pr.redeem.transferDestInfo),{usdPrices:{data:mn}}=useSelector(pr=>pr.tokenPrices),hn=mn||{},[yn,Zn]=reactExports.useState(""),[Cn,Qn]=reactExports.useState(!1),Fn=()=>{ar(!0)},Hn=reactExports.useCallback(()=>{if(!Dt)return;const pr=sn.address.toLowerCase(),sr=sn.currentAddress.toLowerCase(),Ar=Dt.recipient.toLowerCase();return pr===sr&&pr===Ar},[sn,Dt]),Yn=reactExports.useCallback(pr=>{Qn(pr)},[]),[er,Kn]=reactExports.useState(!1),[Xn,fr]=reactExports.useState(Hn()),[or,ar]=reactExports.useState(!1),jn=reactExports.useCallback(async()=>{if(pt){if(dt)return dt;if(yt&&pt){const pr=await RouteOperator.tryFetchRedeemTx(pt,yt);if(pr)return it(setRedeemTx(pr)),pr}}},[dt,pt,yt,it]);reactExports.useEffect(()=>{if(!Dt||!pt)return;(async()=>{let sr;try{sr=await jn()}catch(br){console.error(`could not fetch redeem event:
500
500
  ${br}`)}let Ar;sr||(Ar=await estimateClaimGas(pt,Dt.toChain,yt)),it(setTransferDestInfo(void 0));try{const br=await RouteOperator.getTransferDestInfo(pt,{txData:Dt,tokenPrices:hn,receiveTx:sr,transferComplete:ht,gasEstimate:Ar});it(setTransferDestInfo(br))}catch(br){console.error(br)}})()},[ht,jn,Dt,pt,yt,it,mn]),reactExports.useEffect(()=>{fr(Hn())},[sn,Hn]);const cr=reactExports.useMemo(()=>{if(!pt)return!1;const pr=RouteOperator.getRoute(pt);return pr.AUTOMATIC_DEPOSIT||isGatewayChain(Dt.toChain)||Dt.toChain==="sei"||isPorticoRoute(pr.TYPE)},[pt,Dt]),Wn=async()=>{if(Kn(!0),Zn(""),!pt)throw new Error("Unknown route, cannot claim");if(!sn||!Xn)throw Zn("Connect to receiving wallet"),new Error("Connect to receiving wallet");const pr=CHAINS$1[Dt.toChain];if(!pr)throw Zn("Your claim has failed, please try again"),new Error("invalid destination chain");try{if(pr.context===Context.ETH&&typeof pr.chainId=="number"&&(registerWalletSigner(Dt.toChain,TransferWallet.RECEIVING),await switchChain(pr.chainId,TransferWallet.RECEIVING)),!yt)throw new Error("failed to get vaa, cannot redeem");const sr=await RouteOperator.redeem(pt,Dt.toChain,yt,sn.address);it(setRedeemTx(sr)),it(setTransferComplete(!0)),Kn(!1),Zn("")}catch(sr){Kn(!1),Zn("Your claim has failed, please try again"),console.error(sr)}},hr=Dt.recipient===""&&Dt.toChain==="solana"&&Dt.payloadID===PayloadType.Manual,ur=cr?!ht&&!Cn:er&&!ht,Gn=ht||cr?"":yn?"Error please retry . . .":"Claim below",Un=!ht&&(pt===Route.Relay||isPorticoRoute(pt));let ir="";return Un&&(ir="This option avoids the relayer fee but requires you to pay the gas fee on the destination chain.",pt===Route.Relay&&(ir+=" You will not receive any native gas.")),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(InputContainer,{children:[jsxRuntimeExports.jsx(Header,{chain:Dt.toChain,address:Dt.recipient,loading:ur,txHash:dt,text:Gn}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Un&&jsxRuntimeExports.jsx(SwitchToManualClaim,{checked:Cn,onChange:Yn,disabled:er,title:ir})}),jsxRuntimeExports.jsx(RenderRows,{rows:(ln==null?void 0:ln.displayData)||[]})]}),hr&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spacer,{height:8}),jsxRuntimeExports.jsx(AssociatedTokenAlert,{})]}),!ht&&(!cr||Cn)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Spacer,{height:8}),jsxRuntimeExports.jsx(AlertBanner,{show:!!yn,content:yn,error:!0,margin:"0 0 12px 0"}),sn.address?Xn?jsxRuntimeExports.jsx(Button,{onClick:Wn,action:!0,disabled:er,children:er?jsxRuntimeExports.jsx(CircularProgress$1,{size:22}):"Claim"}):jsxRuntimeExports.jsxs(Button,{onClick:Fn,elevated:!0,children:["Connect to ",displayAddress(Dt.toChain,Dt.recipient)]}):jsxRuntimeExports.jsx(Button,{onClick:Fn,action:!0,children:"Connect wallet"})]}),or&&jsxRuntimeExports.jsx(WalletsModal,{type:TransferWallet.RECEIVING,chain:Dt.toChain,onClose:()=>ar(!1)})]})}const useStyles$6=makeStyles()(it=>({addToken:{display:"flex",alignItems:"center",marginTop:"8px",flexDirection:"row"},addTokenText:{marginLeft:"8px"},addTokenLink:{textDecoration:"underline"}}));function AddToEVMWallet({token:it,address:dt}){const ht=useDispatch(),{classes:pt}=useStyles$6(),yt=useSelector(ln=>ln.redeem.txData),Dt=useSelector(ln=>ln.wallet[TransferWallet.RECEIVING]),sn=async()=>{var mn;if(!Dt||!Dt.address){ht(setWalletModal(TransferWallet.RECEIVING));return}const ln=(mn=CHAINS$1[yt.toChain])==null?void 0:mn.chainId;!ln||typeof ln=="string"||(await switchChain(ln,TransferWallet.RECEIVING),await watchAsset({address:dt,symbol:it.symbol,decimals:getTokenDecimals(wh.toChainId(yt.toChain),it.tokenId||"native"),chainId:ln},TransferWallet.RECEIVING))};return jsxRuntimeExports.jsx(Link$1,{onClick:sn,href:"#",className:pt.addTokenLink,children:jsxRuntimeExports.jsxs(Typography$1,{component:"span",gap:1,className:pt.addToken,children:[jsxRuntimeExports.jsx(TokenIcon,{height:20,icon:it.icon}),"Add ",getDisplayName(it)," to your wallet"]})})}function AddToSolanaWallet({token:it,address:dt}){const{classes:ht}=useStyles$6();return jsxRuntimeExports.jsxs(Typography$1,{component:"span",className:ht.addToken,children:[jsxRuntimeExports.jsx(TokenIcon,{height:20,icon:it.icon}),jsxRuntimeExports.jsxs("span",{className:ht.addTokenText,children:["See ",getDisplayName(it)," token on"]}),jsxRuntimeExports.jsx(ExplorerLink,{styles:{marginLeft:-4},chain:"solana",type:"address",address:dt})]})}function AddToSuiWallet({token:it,address:dt}){const{classes:ht}=useStyles$6();return jsxRuntimeExports.jsxs(Typography$1,{component:"span",className:ht.addToken,children:[jsxRuntimeExports.jsx(TokenIcon,{height:20,icon:it.icon}),jsxRuntimeExports.jsxs("span",{className:ht.addTokenText,children:["See ",getDisplayName(it)," token on"]}),jsxRuntimeExports.jsx(ExplorerLink,{styles:{marginLeft:-4},chain:"sui",type:"object",object:dt})]})}function AddToAptosWallet({token:it,address:dt}){const{classes:ht}=useStyles$6(),pt=dt.split("::")[0];return jsxRuntimeExports.jsxs(Typography$1,{component:"span",className:ht.addToken,children:[jsxRuntimeExports.jsx(TokenIcon,{height:20,icon:it.icon}),jsxRuntimeExports.jsxs("span",{className:ht.addTokenText,children:["See ",getDisplayName(it)," token on"]}),jsxRuntimeExports.jsx(ExplorerLink,{styles:{marginLeft:-4},chain:"aptos",type:"address",address:pt})]})}function AddToWallet(){var mn,hn,yn;const it=useSelector(Zn=>Zn.redeem.txData),dt=useSelector(Zn=>Zn.redeem.route),ht=useSelector(Zn=>Zn.redeem.transferDestInfo),[pt,yt]=reactExports.useState(void 0),[Dt,sn]=reactExports.useState(void 0);reactExports.useEffect(()=>{(async()=>{if(isGatewayChain(it.toChain))return;const Cn=isPorticoTransferDestInfo(ht);if(dt&&isPorticoRoute(dt)&&!Cn)return;const Qn=Cn?ht.destTxInfo.receivedTokenKey:it.receivedTokenKey,Fn=TOKENS[Qn];if(!Fn)return;try{if(getChainConfig(it.toChain).gasToken===Fn.key)return}catch(er){console.error(er)}const Hn=getWrappedToken(Fn);if(!Hn.tokenId)return;const Yn=await wh.getForeignAsset(Hn.tokenId,it.toChain);if(it.toChain==="sui"&&Yn){const Kn=await wh.getContext("sui").provider.getCoinMetadata({coinType:Yn});sn(Kn==null?void 0:Kn.id),yt(Hn);return}sn(Yn),yt(Hn)})().catch(Cn=>console.error("Failed to fetch token info",Cn))},[it,dt,ht]);const ln=wh.toChainId(it.toChain);return!pt||!Dt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):isEVMChain$1(ln)?jsxRuntimeExports.jsx(AddToEVMWallet,{address:Dt,token:pt}):ln===((mn=MAINNET_CHAINS.solana)==null?void 0:mn.id)&&pt.symbol!=="WSOL"?jsxRuntimeExports.jsx(AddToSolanaWallet,{address:Dt,token:pt}):ln===((hn=MAINNET_CHAINS.sui)==null?void 0:hn.id)?jsxRuntimeExports.jsx(AddToSuiWallet,{address:Dt,token:pt}):ln===((yn=MAINNET_CHAINS.aptos)==null?void 0:yn.id)&&pt.symbol!=="APT"?jsxRuntimeExports.jsx(AddToAptosWallet,{address:Dt,token:pt}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}const useStyles$5=makeStyles()(it=>({link:{color:it.palette.text.primary,textDecoration:"underline",cursor:"pointer"},root:{display:"flex",gap:"8px",marginTop:it.spacing(1)},warningIcon:{color:it.palette.warning[500]}})),PorticoSwapFailed=({info:{swapFailed:it,receivedTokenKey:dt}})=>{const{classes:ht}=useStyles$5(),pt=useSelector(Zn=>Zn.redeem.txData);if(!it||!pt)return null;const{canonicalTokenAddress:yt,finalTokenAddress:Dt}=it,{toChain:sn}=pt,ln=getDisplayName(TOKENS[dt]),hn=`The swap reverted on ${getChainConfig(sn).displayName} and you received Wormhole Wrapped ${ln} instead. You can retry the swap here:`,yn=`${OKU_TRADE_BASE_URL}/${sn}/swap/${yt}/${Dt}`;return jsxRuntimeExports.jsx("div",{className:ht.root,children:jsxRuntimeExports.jsxs("div",{children:[hn," ",jsxRuntimeExports.jsx("a",{href:yn,target:"_blank",rel:"noreferrer",className:ht.link,children:"Oku Trade"})]})})};function BridgeComplete(){const it=useDispatch(),dt=useSelector(ln=>ln.redeem.transferDestInfo),ht=useTheme(),pt=()=>{typeof window<"u"&&(window.location.href=CTA.link)},yt=()=>{it(setRoute("bridge"))};let Dt,sn=jsxRuntimeExports.jsx("div",{children:"The bridge is now complete."});return isPorticoTransferDestInfo(dt)&&dt.destTxInfo.swapFailed&&(Dt=ht.palette.warning[500]+OPACITY[25],sn=jsxRuntimeExports.jsx(PorticoSwapFailed,{info:dt.destTxInfo})),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(InputContainer,{bg:Dt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[sn,!!CTA&&jsxRuntimeExports.jsx("div",{children:"Click the button below to begin using your new assets."}),jsxRuntimeExports.jsx(AddToWallet,{})]})}),jsxRuntimeExports.jsx(Spacer,{}),CTA?jsxRuntimeExports.jsx(Button,{onClick:pt,action:!0,elevated:!0,children:CTA.text}):jsxRuntimeExports.jsx(Button,{onClick:yt,action:!0,elevated:!0,children:"Bridge more assets"})]})}function MilestoneStepper(){const it=useSelector(sn=>sn.redeem.signedMessage),dt=useSelector(sn=>sn.redeem.transferComplete),ht=useSelector(sn=>sn.redeem.transferDestInfo);let pt=!1;isPorticoTransferDestInfo(ht)&&(pt=!!ht.destTxInfo.swapFailed);const yt=dt?4:it?2:1,Dt=[{label:"Send from",component:jsxRuntimeExports.jsx(SendFrom,{})},{label:"Send to",component:jsxRuntimeExports.jsx(SendTo,{}),warningLine:pt},{label:"Transaction complete",component:jsxRuntimeExports.jsx(BridgeComplete,{}),warningLabel:pt}];return jsxRuntimeExports.jsx(Stepper,{steps:Dt,activeStep:yt})}const useStyles$4=makeStyles()(it=>({link:{color:it.palette.text.primary,textDecoration:"underline",cursor:"pointer"}})),GovernorEnqueuedWarning=it=>{const{classes:dt}=useStyles$4(),ht=CHAINS$1[it.chain],pt=jsxRuntimeExports.jsxs("div",{children:[`This transfer will take 24 hours to complete as Wormhole has reached the
501
- daily transfer limit for ${ht==null?void 0:ht.displayName}.`," ",jsxRuntimeExports.jsx("a",{href:GOVERNOR_WHITEPAPER_URL,target:"_blank",rel:"noopener noreferrer",className:dt.link,children:"Learn more"})," ","about this temporary security measure."]});return jsxRuntimeExports.jsx(AlertBanner,{show:!!it.show,content:pt,error:!0,margin:"0 0 24px 0"})};function Redeem({setSignedMessage:it,setIsVaaEnqueued:dt,setTransferComplete:ht,txData:pt,transferComplete:yt,isVaaEnqueued:Dt,route:sn,signedMessage:ln}){return useConfirmBeforeLeaving(!yt),reactExports.useEffect(()=>{if(!(pt!=null&&pt.sendTx)||!pt.emitterAddress||ln)return;let mn=!1;return(async()=>{for(;!mn;){let hn=!1;try{hn=await fetchIsVAAEnqueued(pt)}catch(yn){console.error(yn)}mn||(dt(hn),await sleep(3e4))}})(),()=>{mn=!0}},[pt,ln,dt]),reactExports.useEffect(()=>{if(!sn||!(pt!=null&&pt.sendTx)||yt)return;let mn=!1;return(async()=>{let hn=0,yn;for(;yn===void 0&&!mn;){try{yn=await RouteOperator.getSignedMessage(sn,pt)}catch{yn=void 0}if(mn)return;yn!==void 0?it(yn):await sleep(hn<10?3e3:3e4),hn++}})(),()=>{mn=!0}},[pt,sn,it,yt]),reactExports.useEffect(()=>{if(!sn||!(pt!=null&&pt.toChain)||!ln||yt)return;let mn=!1;return(async()=>{let hn=0,yn=!1;for(;!yn&&!mn;){try{yn=await RouteOperator.isTransferCompleted(sn,pt.toChain,ln)}catch(Zn){console.error(Zn)}if(mn)return;yn?ht():await sleep(hn<10?3e3:3e4),hn++}})(),()=>{mn=!0}},[sn,pt,yt,ht,ln]),pt!=null&&pt.fromChain?jsxRuntimeExports.jsxs("div",{style:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center"},children:[jsxRuntimeExports.jsx(PageHeader,{title:"Bridge",back:!0,showHamburgerMenu}),jsxRuntimeExports.jsx(ChainsTag,{}),jsxRuntimeExports.jsx(Spacer,{}),jsxRuntimeExports.jsx(GovernorEnqueuedWarning,{show:!ln&&Dt,chain:pt.fromChain}),jsxRuntimeExports.jsx(MilestoneStepper,{})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function mapStateToProps(it){const{txData:dt,transferComplete:ht,isVaaEnqueued:pt,route:yt,signedMessage:Dt}=it.redeem;return{txData:dt,transferComplete:ht,isVaaEnqueued:pt,route:yt,signedMessage:Dt}}const mapDispatchToProps=it=>({setSignedMessage:dt=>it(setSignedMessage(dt)),setIsVaaEnqueued:dt=>it(setIsVaaEnqueued(dt)),setTransferComplete:()=>it(setTransferComplete(!0))}),Redeem$1=connect(mapStateToProps,mapDispatchToProps)(Redeem),useStyles$3=makeStyles()(()=>({terms:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center"},body:{textAlign:"left",display:"flex",flexDirection:"column",gap:"8px",fontWeight:"300"}}));function Terms(){const{classes:it}=useStyles$3();return jsxRuntimeExports.jsxs("div",{className:it.terms,children:[jsxRuntimeExports.jsx(PageHeader,{title:"Terms",back:!0,showHamburgerMenu}),jsxRuntimeExports.jsxs("div",{className:it.body,children:[jsxRuntimeExports.jsx("div",{children:"Disclaimer:"}),jsxRuntimeExports.jsx("div",{children:`The operator (the "Operator") of this website or mobile application has implemented, deployed, and is operating open source software (the "SDK") that overlays the Wormhole protocol, a cross chain messaging protocol. THIS SDK AND THE WORMHOLE PROTOCOL ARE MADE AVAILABLE "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. By using or accessing this SDK or the Wormhole protocol, you and the Operator agree that no developer or entity involved in creating, deploying, maintaining, operating this SDK or the Wormhole protocol, or causing or supporting any of the foregoing, will be liable in any manner for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of this SDK or the Wormhole protocol, or this SDK or the Wormhole protocol themselves, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. By using or accessing this SDK, you represent that you are not subject to sanctions or otherwise designated on any list of prohibited or restricted parties or excluded or denied persons, including but not limited to the lists maintained by the United States' Department of Treasury's Office of Foreign Assets Control, the United Nations Security Council, the European Union or its Member States, or any other government authority.`}),jsxRuntimeExports.jsx("div",{children:"You assume all risks associated with using the SDK, the Wormhole protocol, and digital assets and decentralized systems generally, including but not limited to, that: (a) digital assets are highly volatile; (b) using digital assets is inherently risky due to both features of such assets and the potential unauthorized acts of third parties; (c) you may not have ready access to assets; and (d) you may lose some or all of your tokens or other assets. You agree that you will have no recourse against anyone else for any losses due to the use of the SDK or the Wormhole protocol. For example, these losses may arise from or relate to: (i) incorrect information; (ii) software or network failures; (iii) corrupted cryptocurrency wallet files; (iv) unauthorized access; (v) errors, mistakes, or inaccuracies; or (vi) third-party activities."})]}),showHamburgerMenu?null:jsxRuntimeExports.jsx(FooterNavBar,{})]})}const VALID_CHAINS=CHAINS_ARR.filter(it=>it.key!=="wormchain").map(it=>it.key);function useExternalSearch(){const[it,dt]=reactExports.useState(!1),[ht,pt]=reactExports.useState(),[yt,Dt]=reactExports.useState();return reactExports.useEffect(()=>{if(SEARCH_TX!=null&&SEARCH_TX.chainName&&(SEARCH_TX!=null&&SEARCH_TX.txHash)){const sn=coalesceChainName(SEARCH_TX.chainName);VALID_CHAINS.includes(sn)&&(dt(!0),pt(SEARCH_TX.txHash),Dt(sn))}},[]),{hasExternalSearch:it,txHash:ht,chainName:yt,clear:()=>{dt(!1),pt(void 0),Dt(void 0),SEARCH_TX&&(SEARCH_TX.chainName=void 0,SEARCH_TX.txHash=void 0)}}}const useStyles$2=makeStyles()(it=>({container:{maxWidth:"650px"},chain:{width:"175px",[it.breakpoints.down("sm")]:{width:"100%"}},inputs:{display:"flex",flexDirection:"row",gap:"16px",[it.breakpoints.down("sm")]:{flexDirection:"column"}},search:{flexGrow:1},footerNavBar:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center",marginTop:"20px"}})),EMPTY="";function TxSearch(){const{classes:it}=useStyles$2(),dt=useDispatch(),[ht,pt]=reactExports.useState({chain:EMPTY,tx:EMPTY}),[yt,Dt]=reactExports.useState(""),[sn,ln]=reactExports.useState(!1);function mn(Yn){pt(er=>({...er,chain:Yn.target.value}))}function hn(Yn){pt(er=>({...er,tx:Yn.target.value}))}async function yn(){if(!ht.tx||!ht.chain)return Dt("Enter the source chain and transaction ID");if(!isValidTxId(ht.chain,ht.tx))return Dt("Invalid transaction ID");try{ln(!0);const Yn=await RouteOperator.getRouteFromTx(ht.tx,ht.chain),er=await RouteOperator.getMessage(Yn,ht.tx,ht.chain);Dt(""),dt(setTxDetails(er)),dt(setRoute$1(Yn)),dt(setRoute("redeem")),dt(setToChain(er.toChain))}catch(Yn){console.error(Yn),Dt("Bridge transaction not found, check that you have the correct chain and transaction ID")}finally{ln(!1)}}const{hasExternalSearch:Zn,txHash:Cn,chainName:Qn,clear:Fn}=useExternalSearch();reactExports.useEffect(()=>{Zn&&Cn&&Qn&&(pt({chain:Qn,tx:Cn}),Fn())},[Zn,Cn,Qn,Fn]);const Hn=reactExports.useCallback(()=>yn(),[ht]);return reactExports.useEffect(()=>{ht.chain!==EMPTY&&ht.tx!==EMPTY&&!sn&&Hn()},[Hn,ht,sn]),jsxRuntimeExports.jsxs("div",{className:it.container,children:[jsxRuntimeExports.jsx(PageHeader,{title:"Resume transaction",description:"Bridging can require a manual redemption process on the designation chain. If you did not complete the redemption during your initial transaction, you may do so here.",showHamburgerMenu,back:!0}),jsxRuntimeExports.jsxs("div",{className:it.inputs,children:[jsxRuntimeExports.jsx("div",{className:it.chain,children:jsxRuntimeExports.jsxs(Select$2,{sx:{width:"100%",height:"100%",minHeight:"64.5px"},value:ht.chain,displayEmpty:!0,placeholder:"Select network",onChange:Yn=>mn(Yn),children:[jsxRuntimeExports.jsx(MenuItem$1,{disabled:!0,value:"",children:"Select network"},0),CHAINS_ARR.filter(Yn=>Yn.key!=="wormchain").map((Yn,er)=>jsxRuntimeExports.jsx(MenuItem$1,{value:Yn.key,children:Yn.displayName},er+1))]})}),jsxRuntimeExports.jsx("div",{className:it.search,children:jsxRuntimeExports.jsx(Search,{placeholder:"Source chain transaction hash",onChange:hn,onSearch:yn,value:ht.tx})})]}),jsxRuntimeExports.jsx(Spacer,{}),jsxRuntimeExports.jsx(AlertBanner,{show:!!yt,content:yt,error:!0,margin:"0 0 16px 0"}),jsxRuntimeExports.jsx(Button,{disabled:!ht.chain||!ht.tx,elevated:!0,onClick:yn,children:sn?jsxRuntimeExports.jsx(CircularProgress$1,{size:24}):"Search"}),showHamburgerMenu?null:jsxRuntimeExports.jsx("div",{className:it.footerNavBar,children:jsxRuntimeExports.jsx(FooterNavBar,{})})]})}const useStyles$1=makeStyles()(it=>({appContent:{textAlign:"left",margin:"40px auto",maxWidth:"900px",width:"100%",display:"flex",justifyContent:"center",padding:"16px",fontFamily:it.palette.font.primary,[it.breakpoints.down("sm")]:{margin:"0 auto"}}}));function AppRouter(){const{classes:it}=useStyles$1(),dt=useDispatch(),ht=useSelector(sn=>sn.router.showWalletModal),pt=useSelector(sn=>sn.router.route),yt=usePrevious(pt),{hasExternalSearch:Dt}=useExternalSearch();return reactExports.useEffect(()=>{const sn="redeem",ln="bridge";yt===sn&&pt!==sn&&(dt(clearRedeem()),dt(clearWallets())),yt===ln&&pt!==ln&&(dt(clearTransfer()),dt(clearPorticoBridge()))},[pt,yt,dt]),reactExports.useEffect(()=>{Dt&&(dt(clearRedeem()),dt(setRoute("search")))},[Dt,dt]),jsxRuntimeExports.jsxs("div",{className:it.appContent,children:[ht&&jsxRuntimeExports.jsx(WalletsModal,{type:ht}),pt==="bridge"&&jsxRuntimeExports.jsx(Bridge,{}),pt==="redeem"&&jsxRuntimeExports.jsx(Redeem$1,{}),pt==="search"&&jsxRuntimeExports.jsx(TxSearch,{}),pt==="terms"&&jsxRuntimeExports.jsx(Terms,{}),pt==="faq"&&jsxRuntimeExports.jsx(FAQ,{})]})}const colors={bg:"#030712",purple:"#3B234E",blue:"#302A60",pink:"#5A1E46"},useStyles=makeStyles()(()=>({container:{backgroundColor:`${colors.bg} !important`,width:"100%",minHeight:"100vh",height:"100%",zIndex:"-2"},bg:{position:"relative",overflow:"hidden",width:"100%",height:"100%"},circles:{position:"absolute",display:"flex",flexDirection:"column",width:"100%",minWidth:"600px",height:"100%",top:0,bottom:0,left:0,right:0,overscrollBehaviorY:"none",backgroundImage:"url(circles.svg)",backgroundPosition:"top center",backgroundRepeat:"repeat-y",backgroundSize:"120%",zIndex:"-1",pointerEvent:"none"},background:{position:"absolute",width:"100%",minWidth:"600px",height:"100%",top:0,bottom:0,left:0,right:0,backgroundColor:colors.bg,zIndex:"-2",pointerEvent:"none"},gradientRight:{position:"absolute",top:"72px",right:"-1000px",width:"1757px",minWidth:"600px",height:"1506px",background:`radial-gradient(closest-side at 50% 50%, ${colors.blue} 0%, ${colors.blue}00 100%)`,opacity:"0.5",transform:"matrix(0.87, 0.48, -0.48, 0.87, 0, 0)",zIndex:"-1",pointerEvent:"none"},gradientLeft:{top:"-530px",left:"-350px",width:"1379px",minWidth:"600px",height:"1378px",position:"absolute",background:`radial-gradient(closest-side at 50% 50%, ${colors.pink}${OPACITY[60]} 0%, ${colors.pink}00 100%)`,opacity:"0.5",zIndex:"-1",pointerEvent:"none"},gradientLeft2:{bottom:"-330px",left:"-350px",width:"1379px",height:"1378px",position:"absolute",background:`radial-gradient(closest-side at 50% 50%, ${colors.purple} 0%, ${colors.purple}00 100%)`,opacity:"0.5",zIndex:"-1",pointerEvent:"none"},gradientRight2:{position:"absolute",bottom:"-900px",right:"-1000px",width:"1757px",minWidth:"600px",height:"1506px",background:`radial-gradient(closest-side at 50% 50%, ${colors.purple} 0%, ${colors.purple}00 100%)`,opacity:"0.5",transform:"matrix(0.87, 0.48, -0.48, 0.87, 0, 0);",zIndex:"-1",pointerEvent:"none"},children:{width:"100%"}}));function Background({children:it}){const{classes:dt}=useStyles();return THEME.background.default==="wormhole"?jsxRuntimeExports.jsx("div",{className:"container",children:jsxRuntimeExports.jsxs("div",{className:dt.bg,children:[it,jsxRuntimeExports.jsx("div",{className:dt.circles}),jsxRuntimeExports.jsx("div",{className:dt.background}),jsxRuntimeExports.jsx("div",{className:dt.gradientRight}),jsxRuntimeExports.jsx("div",{className:dt.gradientRight2}),jsxRuntimeExports.jsx("div",{className:dt.gradientLeft}),jsxRuntimeExports.jsx("div",{className:dt.gradientLeft2})]})}):jsxRuntimeExports.jsx("div",{className:dt.children,children:it})}class ErrorBoundary extends React.Component{constructor(dt){super(dt),this.state={hasError:!1}}static getDerivedStateFromError(dt){return{hasError:!0}}componentDidCatch(dt,ht){console.error(dt,ht)}render(){return this.state.hasError?jsxRuntimeExports.jsx(Card$1,{children:jsxRuntimeExports.jsx(Typography$1,{variant:"h5",style:{textAlign:"center",marginTop:24,marginBottom:24},children:"An unexpected error has occurred. Please refresh the page."})}):this.props.children}}const ColorModeContext=reactExports.createContext({toggleColorMode:()=>{}});function App(){const[it,dt]=reactExports.useState(THEME_MODE),ht=reactExports.useMemo(()=>({toggleColorMode:()=>{dt(yt=>yt==="light"?"dark":"light")}}),[]),pt=reactExports.useMemo(()=>createTheme(getDesignTokens(it)),[it]);return jsxRuntimeExports.jsx(Provider$1,{store,children:jsxRuntimeExports.jsx(ColorModeContext.Provider,{value:ht,children:jsxRuntimeExports.jsx(ThemeProvider,{theme:pt,children:jsxRuntimeExports.jsx(ScopedCssBaseline$1,{enableColorScheme:!0,children:jsxRuntimeExports.jsx(ErrorBoundary,{children:jsxRuntimeExports.jsx(Background,{children:jsxRuntimeExports.jsx(AppRouter,{})})})})})})})}function ToggleColorMode(){const[it,dt]=reactExports.useState("light"),ht=reactExports.useMemo(()=>({toggleColorMode:()=>{dt(yt=>yt==="light"?"dark":"light")}}),[]),pt=reactExports.useMemo(()=>createTheme({palette:{mode:it}}),[it]);return jsxRuntimeExports.jsx(ColorModeContext.Provider,{value:ht,children:jsxRuntimeExports.jsx(ThemeProvider,{theme:pt,children:jsxRuntimeExports.jsx(App,{})})})}const root=client$8.createRoot(document.getElementById("wormhole-connect"));root.render(jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(ErrorBoundary,{children:jsxRuntimeExports.jsx(ToggleColorMode,{})})}));export{inquire_1 as $,naclFastExports as A,BaseFeatures as B,CHAINS as C,requireCryptoBrowserify as D,dist_browser$1 as E,eventsExports as F,binary as G,helpers as H,any as I,coin as J,CHAIN_ID_WORMCHAIN as K,isCosmWasmChain as L,build$9 as M,NotSupported as N,build$c as O,build$2 as P,_m0$v as Q,Long$S as R,BigNumber$1 as S,SHA256Exports as T,Base64Exports as U,aspromise as V,Wallet as W,base64$b as X,eventemitter as Y,float as Z,__vitePreload as _,Web3Provider as a,browserExports as a$,utf8$j as a0,pool_1 as a1,long as a2,base64Js as a3,require$$1$1 as a4,require$$1$2 as a5,require$$0$6 as a6,require$$0$4 as a7,require$$0$3 as a8,CHAINS$1 as a9,tuple as aA,is as aB,integer as aC,JsonRpcProvider as aD,CHAIN_ID_SUI as aE,reactExports as aF,jsxRuntimeExports as aG,dist$6 as aH,sha3Exports as aI,require$$5$1 as aJ,CHAIN_ID_APTOS as aK,AptosClient as aL,wh as aM,defineProperty as aN,require_typeof as aO,interopRequireDefaultExports as aP,requireRegenerator as aQ,requireAsyncToGenerator as aR,requireClassCallCheck as aS,requireCreateClass as aT,xstream as aU,build$4 as aV,browser as aW,_defineProperty as aX,require$$14 as aY,commonjsRequire$1 as aZ,requireSha_js as a_,Context as aa,RPCS as ab,REST as ac,PublicKey$4 as ad,bs58$3 as ae,CHAIN_ID_SOLANA as af,VersionedTransaction as ag,Transaction as ah,Connection$1 as ai,clusterApiUrl as aj,isMainnet as ak,ENV as al,string as am,union as an,object$1 as ao,nullable as ap,literal as aq,define$1 as ar,record as as,boolean as at,number as au,array as av,assign as aw,any$7 as ax,unknown as ay,optional as az,CHAIN_ID_ETH as b,CHAIN_ID_SEI as b0,CHAIN_ID_SEI$1 as b1,require$$2$4 as b2,EventEmitter$2 as b3,dist$3 as b4,requireString_decoder as b5,requireStreamBrowserify as b6,util$D as b7,requireReadableBrowser as b8,requireInherits_browser as b9,NotConnected as c,dist$7 as d,equalBytes as e,WalletState as f,getDefaultExportFromCjs$1 as g,hexValue as h,Contract as i,formatUnits as j,keccak_256 as k,formatEther as l,isHexString$1 as m,isEVMChain as n,WALLET_CONNECT_PROJECT_ID as o,getAugmentedNamespace as p,commonjsGlobal as q,bnExports$2 as r,bufferPolyfill as s,js as t,requireBrowser$b as u,elliptic as v,requireElliptic as w,requireBrowser$9 as x,dist_browser as y,requireAssert as z};
501
+ daily transfer limit for ${ht==null?void 0:ht.displayName}.`," ",jsxRuntimeExports.jsx("a",{href:GOVERNOR_WHITEPAPER_URL,target:"_blank",rel:"noopener noreferrer",className:dt.link,children:"Learn more"})," ","about this temporary security measure."]});return jsxRuntimeExports.jsx(AlertBanner,{show:!!it.show,content:pt,error:!0,margin:"0 0 24px 0"})};function Redeem({setSignedMessage:it,setIsVaaEnqueued:dt,setTransferComplete:ht,txData:pt,transferComplete:yt,isVaaEnqueued:Dt,route:sn,signedMessage:ln}){return useConfirmBeforeLeaving(!yt),reactExports.useEffect(()=>{if(!(pt!=null&&pt.sendTx)||!pt.emitterAddress||ln)return;let mn=!1;return(async()=>{for(;!mn;){let hn=!1;try{hn=await fetchIsVAAEnqueued(pt)}catch(yn){console.error(yn)}mn||(dt(hn),await sleep(3e4))}})(),()=>{mn=!0}},[pt,ln,dt]),reactExports.useEffect(()=>{if(!sn||!(pt!=null&&pt.sendTx)||yt)return;let mn=!1;return(async()=>{let hn=0,yn;for(;yn===void 0&&!mn;){try{yn=await RouteOperator.getSignedMessage(sn,pt)}catch{yn=void 0}if(mn)return;yn!==void 0?it(yn):await sleep(hn<10?3e3:3e4),hn++}})(),()=>{mn=!0}},[pt,sn,it,yt]),reactExports.useEffect(()=>{if(!sn||!(pt!=null&&pt.toChain)||!ln||yt)return;let mn=!1;return(async()=>{let hn=0,yn=!1;for(;!yn&&!mn;){try{yn=await RouteOperator.isTransferCompleted(sn,pt.toChain,ln)}catch(Zn){console.error(Zn)}if(mn)return;yn?ht():await sleep(hn<10?3e3:3e4),hn++}})(),()=>{mn=!0}},[sn,pt,yt,ht,ln]),pt!=null&&pt.fromChain?jsxRuntimeExports.jsxs("div",{style:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center"},children:[jsxRuntimeExports.jsx(PageHeader,{title:"Bridge",back:!0,showHamburgerMenu}),jsxRuntimeExports.jsx(ChainsTag,{}),jsxRuntimeExports.jsx(Spacer,{}),jsxRuntimeExports.jsx(GovernorEnqueuedWarning,{show:!ln&&Dt,chain:pt.fromChain}),jsxRuntimeExports.jsx(MilestoneStepper,{})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function mapStateToProps(it){const{txData:dt,transferComplete:ht,isVaaEnqueued:pt,route:yt,signedMessage:Dt}=it.redeem;return{txData:dt,transferComplete:ht,isVaaEnqueued:pt,route:yt,signedMessage:Dt}}const mapDispatchToProps=it=>({setSignedMessage:dt=>it(setSignedMessage(dt)),setIsVaaEnqueued:dt=>it(setIsVaaEnqueued(dt)),setTransferComplete:()=>it(setTransferComplete(!0))}),Redeem$1=connect(mapStateToProps,mapDispatchToProps)(Redeem),useStyles$3=makeStyles()(()=>({terms:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center"},body:{textAlign:"left",display:"flex",flexDirection:"column",gap:"8px",fontWeight:"300"}}));function Terms(){const{classes:it}=useStyles$3();return jsxRuntimeExports.jsxs("div",{className:it.terms,children:[jsxRuntimeExports.jsx(PageHeader,{title:"Terms",back:!0,showHamburgerMenu}),jsxRuntimeExports.jsxs("div",{className:it.body,children:[jsxRuntimeExports.jsx("div",{children:"Disclaimer:"}),jsxRuntimeExports.jsx("div",{children:`The operator (the "Operator") of this website or mobile application has implemented, deployed, and is operating open source software (the "SDK") that overlays the Wormhole protocol, a cross chain messaging protocol. THIS SDK AND THE WORMHOLE PROTOCOL ARE MADE AVAILABLE "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. By using or accessing this SDK or the Wormhole protocol, you and the Operator agree that no developer or entity involved in creating, deploying, maintaining, operating this SDK or the Wormhole protocol, or causing or supporting any of the foregoing, will be liable in any manner for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of this SDK or the Wormhole protocol, or this SDK or the Wormhole protocol themselves, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. By using or accessing this SDK, you represent that you are not subject to sanctions or otherwise designated on any list of prohibited or restricted parties or excluded or denied persons, including but not limited to the lists maintained by the United States' Department of Treasury's Office of Foreign Assets Control, the United Nations Security Council, the European Union or its Member States, or any other government authority.`}),jsxRuntimeExports.jsx("div",{children:"You assume all risks associated with using the SDK, the Wormhole protocol, and digital assets and decentralized systems generally, including but not limited to, that: (a) digital assets are highly volatile; (b) using digital assets is inherently risky due to both features of such assets and the potential unauthorized acts of third parties; (c) you may not have ready access to assets; and (d) you may lose some or all of your tokens or other assets. You agree that you will have no recourse against anyone else for any losses due to the use of the SDK or the Wormhole protocol. For example, these losses may arise from or relate to: (i) incorrect information; (ii) software or network failures; (iii) corrupted cryptocurrency wallet files; (iv) unauthorized access; (v) errors, mistakes, or inaccuracies; or (vi) third-party activities."})]}),showHamburgerMenu?null:jsxRuntimeExports.jsx(FooterNavBar,{})]})}const VALID_CHAINS=CHAINS_ARR.filter(it=>it.key!=="wormchain").map(it=>it.key);function useExternalSearch(){const[it,dt]=reactExports.useState(!1),[ht,pt]=reactExports.useState(),[yt,Dt]=reactExports.useState();return reactExports.useEffect(()=>{if(SEARCH_TX!=null&&SEARCH_TX.chainName&&(SEARCH_TX!=null&&SEARCH_TX.txHash)){const sn=coalesceChainName(SEARCH_TX.chainName);VALID_CHAINS.includes(sn)&&(dt(!0),pt(SEARCH_TX.txHash),Dt(sn))}},[]),{hasExternalSearch:it,txHash:ht,chainName:yt,clear:()=>{dt(!1),pt(void 0),Dt(void 0),SEARCH_TX&&(SEARCH_TX.chainName=void 0,SEARCH_TX.txHash=void 0)}}}const useStyles$2=makeStyles()(it=>({container:{maxWidth:"650px"},chain:{width:"175px",[it.breakpoints.down("sm")]:{width:"100%"}},inputs:{display:"flex",flexDirection:"row",gap:"16px",[it.breakpoints.down("sm")]:{flexDirection:"column"}},search:{flexGrow:1},footerNavBar:{width:"100%",maxWidth:"700px",display:"flex",flexDirection:"column",alignItems:"center",marginTop:"20px"}})),EMPTY="";function TxSearch(){const{classes:it}=useStyles$2(),dt=useDispatch(),[ht,pt]=reactExports.useState({chain:EMPTY,tx:EMPTY,autoSearch:!1}),[yt,Dt]=reactExports.useState(""),[sn,ln]=reactExports.useState(!1);function mn(Yn){pt(er=>({...er,chain:Yn.target.value}))}function hn(Yn){pt(er=>({...er,tx:Yn.target.value}))}async function yn(){if(!ht.tx||!ht.chain)return Dt("Enter the source chain and transaction ID");if(!isValidTxId(ht.chain,ht.tx))return Dt("Invalid transaction ID");try{ln(!0);const Yn=await RouteOperator.getRouteFromTx(ht.tx,ht.chain),er=await RouteOperator.getMessage(Yn,ht.tx,ht.chain);Dt(""),dt(setTxDetails(er)),dt(setRoute$1(Yn)),dt(setRoute("redeem")),dt(setToChain(er.toChain))}catch(Yn){console.error(Yn),Dt("Bridge transaction not found, check that you have the correct chain and transaction ID")}finally{ln(!1)}}const{hasExternalSearch:Zn,txHash:Cn,chainName:Qn,clear:Fn}=useExternalSearch();reactExports.useEffect(()=>{const Yn=!!(Zn&&Cn&&Qn);Yn&&(pt({chain:Qn,tx:Cn,autoSearch:Yn}),Fn())},[Zn,Cn,Qn,Fn]);const Hn=reactExports.useCallback(()=>yn(),[ht]);return reactExports.useEffect(()=>{const{chain:Yn,tx:er,autoSearch:Kn}=ht;Kn&&Yn!==EMPTY&&er!==EMPTY&&!sn&&(pt(Xn=>({...Xn,autoSearch:!1})),Hn())},[Hn,ht,sn]),jsxRuntimeExports.jsxs("div",{className:it.container,children:[jsxRuntimeExports.jsx(PageHeader,{title:"Resume transaction",description:"Bridging can require a manual redemption process on the designation chain. If you did not complete the redemption during your initial transaction, you may do so here.",showHamburgerMenu,back:!0}),jsxRuntimeExports.jsxs("div",{className:it.inputs,children:[jsxRuntimeExports.jsx("div",{className:it.chain,children:jsxRuntimeExports.jsxs(Select$2,{sx:{width:"100%",height:"100%",minHeight:"64.5px"},value:ht.chain,displayEmpty:!0,placeholder:"Select network",onChange:Yn=>mn(Yn),children:[jsxRuntimeExports.jsx(MenuItem$1,{disabled:!0,value:"",children:"Select network"},0),CHAINS_ARR.filter(Yn=>Yn.key!=="wormchain").map((Yn,er)=>jsxRuntimeExports.jsx(MenuItem$1,{value:Yn.key,children:Yn.displayName},er+1))]})}),jsxRuntimeExports.jsx("div",{className:it.search,children:jsxRuntimeExports.jsx(Search,{placeholder:"Source chain transaction hash",onChange:hn,onSearch:yn,value:ht.tx})})]}),jsxRuntimeExports.jsx(Spacer,{}),jsxRuntimeExports.jsx(AlertBanner,{show:!!yt,content:yt,error:!0,margin:"0 0 16px 0"}),jsxRuntimeExports.jsx(Button,{disabled:!ht.chain||!ht.tx,elevated:!0,onClick:yn,children:sn?jsxRuntimeExports.jsx(CircularProgress$1,{size:24}):"Search"}),showHamburgerMenu?null:jsxRuntimeExports.jsx("div",{className:it.footerNavBar,children:jsxRuntimeExports.jsx(FooterNavBar,{})})]})}const useStyles$1=makeStyles()(it=>({appContent:{textAlign:"left",margin:"40px auto",maxWidth:"900px",width:"100%",display:"flex",justifyContent:"center",padding:"16px",fontFamily:it.palette.font.primary,[it.breakpoints.down("sm")]:{margin:"0 auto"}}}));function AppRouter(){const{classes:it}=useStyles$1(),dt=useDispatch(),ht=useSelector(sn=>sn.router.showWalletModal),pt=useSelector(sn=>sn.router.route),yt=usePrevious(pt),{hasExternalSearch:Dt}=useExternalSearch();return reactExports.useEffect(()=>{const sn="redeem",ln="bridge";yt===sn&&pt!==sn&&(dt(clearRedeem()),dt(clearWallets())),yt===ln&&pt!==ln&&(dt(clearTransfer()),dt(clearPorticoBridge()))},[pt,yt,dt]),reactExports.useEffect(()=>{Dt&&(dt(clearRedeem()),dt(setRoute("search")))},[Dt,dt]),jsxRuntimeExports.jsxs("div",{className:it.appContent,children:[ht&&jsxRuntimeExports.jsx(WalletsModal,{type:ht}),pt==="bridge"&&jsxRuntimeExports.jsx(Bridge,{}),pt==="redeem"&&jsxRuntimeExports.jsx(Redeem$1,{}),pt==="search"&&jsxRuntimeExports.jsx(TxSearch,{}),pt==="terms"&&jsxRuntimeExports.jsx(Terms,{}),pt==="faq"&&jsxRuntimeExports.jsx(FAQ,{})]})}const colors={bg:"#030712",purple:"#3B234E",blue:"#302A60",pink:"#5A1E46"},useStyles=makeStyles()(()=>({container:{backgroundColor:`${colors.bg} !important`,width:"100%",minHeight:"100vh",height:"100%",zIndex:"-2"},bg:{position:"relative",overflow:"hidden",width:"100%",height:"100%"},circles:{position:"absolute",display:"flex",flexDirection:"column",width:"100%",minWidth:"600px",height:"100%",top:0,bottom:0,left:0,right:0,overscrollBehaviorY:"none",backgroundImage:"url(circles.svg)",backgroundPosition:"top center",backgroundRepeat:"repeat-y",backgroundSize:"120%",zIndex:"-1",pointerEvent:"none"},background:{position:"absolute",width:"100%",minWidth:"600px",height:"100%",top:0,bottom:0,left:0,right:0,backgroundColor:colors.bg,zIndex:"-2",pointerEvent:"none"},gradientRight:{position:"absolute",top:"72px",right:"-1000px",width:"1757px",minWidth:"600px",height:"1506px",background:`radial-gradient(closest-side at 50% 50%, ${colors.blue} 0%, ${colors.blue}00 100%)`,opacity:"0.5",transform:"matrix(0.87, 0.48, -0.48, 0.87, 0, 0)",zIndex:"-1",pointerEvent:"none"},gradientLeft:{top:"-530px",left:"-350px",width:"1379px",minWidth:"600px",height:"1378px",position:"absolute",background:`radial-gradient(closest-side at 50% 50%, ${colors.pink}${OPACITY[60]} 0%, ${colors.pink}00 100%)`,opacity:"0.5",zIndex:"-1",pointerEvent:"none"},gradientLeft2:{bottom:"-330px",left:"-350px",width:"1379px",height:"1378px",position:"absolute",background:`radial-gradient(closest-side at 50% 50%, ${colors.purple} 0%, ${colors.purple}00 100%)`,opacity:"0.5",zIndex:"-1",pointerEvent:"none"},gradientRight2:{position:"absolute",bottom:"-900px",right:"-1000px",width:"1757px",minWidth:"600px",height:"1506px",background:`radial-gradient(closest-side at 50% 50%, ${colors.purple} 0%, ${colors.purple}00 100%)`,opacity:"0.5",transform:"matrix(0.87, 0.48, -0.48, 0.87, 0, 0);",zIndex:"-1",pointerEvent:"none"},children:{width:"100%"}}));function Background({children:it}){const{classes:dt}=useStyles();return THEME.background.default==="wormhole"?jsxRuntimeExports.jsx("div",{className:"container",children:jsxRuntimeExports.jsxs("div",{className:dt.bg,children:[it,jsxRuntimeExports.jsx("div",{className:dt.circles}),jsxRuntimeExports.jsx("div",{className:dt.background}),jsxRuntimeExports.jsx("div",{className:dt.gradientRight}),jsxRuntimeExports.jsx("div",{className:dt.gradientRight2}),jsxRuntimeExports.jsx("div",{className:dt.gradientLeft}),jsxRuntimeExports.jsx("div",{className:dt.gradientLeft2})]})}):jsxRuntimeExports.jsx("div",{className:dt.children,children:it})}class ErrorBoundary extends React.Component{constructor(dt){super(dt),this.state={hasError:!1}}static getDerivedStateFromError(dt){return{hasError:!0}}componentDidCatch(dt,ht){console.error(dt,ht)}render(){return this.state.hasError?jsxRuntimeExports.jsx(Card$1,{children:jsxRuntimeExports.jsx(Typography$1,{variant:"h5",style:{textAlign:"center",marginTop:24,marginBottom:24},children:"An unexpected error has occurred. Please refresh the page."})}):this.props.children}}const ColorModeContext=reactExports.createContext({toggleColorMode:()=>{}});function App(){const[it,dt]=reactExports.useState(THEME_MODE),ht=reactExports.useMemo(()=>({toggleColorMode:()=>{dt(yt=>yt==="light"?"dark":"light")}}),[]),pt=reactExports.useMemo(()=>createTheme(getDesignTokens(it)),[it]);return jsxRuntimeExports.jsx(Provider$1,{store,children:jsxRuntimeExports.jsx(ColorModeContext.Provider,{value:ht,children:jsxRuntimeExports.jsx(ThemeProvider,{theme:pt,children:jsxRuntimeExports.jsx(ScopedCssBaseline$1,{enableColorScheme:!0,children:jsxRuntimeExports.jsx(ErrorBoundary,{children:jsxRuntimeExports.jsx(Background,{children:jsxRuntimeExports.jsx(AppRouter,{})})})})})})})}function ToggleColorMode(){const[it,dt]=reactExports.useState("light"),ht=reactExports.useMemo(()=>({toggleColorMode:()=>{dt(yt=>yt==="light"?"dark":"light")}}),[]),pt=reactExports.useMemo(()=>createTheme({palette:{mode:it}}),[it]);return jsxRuntimeExports.jsx(ColorModeContext.Provider,{value:ht,children:jsxRuntimeExports.jsx(ThemeProvider,{theme:pt,children:jsxRuntimeExports.jsx(App,{})})})}const root=client$8.createRoot(document.getElementById("wormhole-connect"));root.render(jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(ErrorBoundary,{children:jsxRuntimeExports.jsx(ToggleColorMode,{})})}));export{inquire_1 as $,naclFastExports as A,BaseFeatures as B,CHAINS as C,requireCryptoBrowserify as D,dist_browser$1 as E,eventsExports as F,binary as G,helpers as H,any as I,coin as J,CHAIN_ID_WORMCHAIN as K,isCosmWasmChain as L,build$9 as M,NotSupported as N,build$c as O,build$2 as P,_m0$v as Q,Long$S as R,BigNumber$1 as S,SHA256Exports as T,Base64Exports as U,aspromise as V,Wallet as W,base64$b as X,eventemitter as Y,float as Z,__vitePreload as _,Web3Provider as a,browserExports as a$,utf8$j as a0,pool_1 as a1,long as a2,base64Js as a3,require$$1$1 as a4,require$$1$2 as a5,require$$0$6 as a6,require$$0$4 as a7,require$$0$3 as a8,CHAINS$1 as a9,tuple as aA,is as aB,integer as aC,JsonRpcProvider as aD,CHAIN_ID_SUI as aE,reactExports as aF,jsxRuntimeExports as aG,dist$6 as aH,sha3Exports as aI,require$$5$1 as aJ,CHAIN_ID_APTOS as aK,AptosClient as aL,wh as aM,defineProperty as aN,require_typeof as aO,interopRequireDefaultExports as aP,requireRegenerator as aQ,requireAsyncToGenerator as aR,requireClassCallCheck as aS,requireCreateClass as aT,xstream as aU,build$4 as aV,browser as aW,_defineProperty as aX,require$$14 as aY,commonjsRequire$1 as aZ,requireSha_js as a_,Context as aa,RPCS as ab,REST as ac,PublicKey$4 as ad,bs58$3 as ae,CHAIN_ID_SOLANA as af,VersionedTransaction as ag,Transaction as ah,Connection$1 as ai,clusterApiUrl as aj,isMainnet as ak,ENV as al,string as am,union as an,object$1 as ao,nullable as ap,literal as aq,define$1 as ar,record as as,boolean as at,number as au,array as av,assign as aw,any$7 as ax,unknown as ay,optional as az,CHAIN_ID_ETH as b,CHAIN_ID_SEI as b0,CHAIN_ID_SEI$1 as b1,require$$2$4 as b2,EventEmitter$2 as b3,dist$3 as b4,requireString_decoder as b5,requireStreamBrowserify as b6,util$D as b7,requireReadableBrowser as b8,requireInherits_browser as b9,NotConnected as c,dist$7 as d,equalBytes as e,WalletState as f,getDefaultExportFromCjs$1 as g,hexValue as h,Contract as i,formatUnits as j,keccak_256 as k,formatEther as l,isHexString$1 as m,isEVMChain as n,WALLET_CONNECT_PROJECT_ID as o,getAugmentedNamespace as p,commonjsGlobal as q,bnExports$2 as r,bufferPolyfill as s,js as t,requireBrowser$b as u,elliptic as v,requireElliptic as w,requireBrowser$9 as x,dist_browser as y,requireAssert as z};
502
502
  function __vite__mapDeps(indexes) {
503
503
  if (!__vite__mapDeps.viteFileDeps) {
504
504
  __vite__mapDeps.viteFileDeps = ["assets/evm-_u-parWE.js","assets/index.es-KQuHSU-N.js","assets/cosmos-_wqy4SgE.js","assets/index-OmMVPptj.js","assets/libsodium-wrappers-s_wI-8A0.js","assets/solana-mxqvqbiT.js","assets/wallets-pQNhbRa-.js","assets/sui-H5lS8E5R.js","assets/sei-9GJ_6OK0.js"]
package/lib/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var react_1 = require("react");
19
19
  var PACKAGE_NAME = "@wormhole-foundation/wormhole-connect";
20
- var DEFAULT_VERSION = "0.2.5-beta.1-development" || "latest";
20
+ var DEFAULT_VERSION = "0.2.5-beta.2-development" || "latest";
21
21
  function WormholeBridge(_a) {
22
22
  var config = _a.config, _b = _a.versionOrTag, versionOrTag = _b === void 0 ? DEFAULT_VERSION : _b;
23
23
  (0, react_1.useEffect)(function () {
package/lib/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from "react";
3
3
  var PACKAGE_NAME = "@wormhole-foundation/wormhole-connect";
4
- var DEFAULT_VERSION = "0.2.5-beta.1-development" || "latest";
4
+ var DEFAULT_VERSION = "0.2.5-beta.2-development" || "latest";
5
5
  function WormholeBridge(_a) {
6
6
  var config = _a.config, _b = _a.versionOrTag, versionOrTag = _b === void 0 ? DEFAULT_VERSION : _b;
7
7
  useEffect(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wormhole-foundation/wormhole-connect",
3
- "version": "0.2.5-beta.1-development",
3
+ "version": "0.2.5-beta.2-development",
4
4
  "dependencies": {
5
5
  "@mui/material": "^5.12.1"
6
6
  },