@zeniai/web-components 4.4.44-betaAK0 → 4.4.45-betaAK0

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.
Files changed (26) hide show
  1. package/dist/{SessionTimeoutPopup-BHISSH2H.cjs → SessionTimeoutPopup-Bsr96w3Y.cjs} +168 -144
  2. package/dist/SessionTimeoutPopup-Bsr96w3Y.cjs.map +4 -0
  3. package/dist/{SessionTimeoutPopup-BDrzUHmk.js → SessionTimeoutPopup-DEfBJy53.js} +232 -215
  4. package/dist/SessionTimeoutPopup-DEfBJy53.js.map +4 -0
  5. package/dist/cockpit.cjs.js +2 -2
  6. package/dist/cockpit.cjs.js.map +1 -1
  7. package/dist/cockpit.esm.js +2027 -2027
  8. package/dist/cockpit.esm.js.map +1 -1
  9. package/dist/components/expenseAutomation/ExpenseAutomationPage.d.ts +1 -0
  10. package/dist/components/expenseAutomation/sections/jeSchedules/JESchedulePage.d.ts +4 -2
  11. package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEOneTimeAccrualDetailPage.d.ts +6 -1
  12. package/dist/components/expenseAutomation/sections/jeSchedules/accrualDetail/JEOneTimeAccrualLinkedEntriesButton.d.ts +13 -0
  13. package/dist/components/expenseAutomation/sections/jeSchedules/common/LinkedRecordsMenuButton.d.ts +30 -0
  14. package/dist/components/expenseAutomation/sections/jeSchedules/sections/JEExistingSection.d.ts +3 -1
  15. package/dist/components/expenseAutomation/sections/jeSchedules/sections/JESchedulesSection.d.ts +3 -1
  16. package/dist/{index-CpEJHEWA.js → index-BfdJ8Cyp.js} +2 -2
  17. package/dist/{index-CpEJHEWA.js.map → index-BfdJ8Cyp.js.map} +1 -1
  18. package/dist/{index-BkaY3PZA.cjs → index-a4spysVG.cjs} +2 -2
  19. package/dist/{index-BkaY3PZA.cjs.map → index-a4spysVG.cjs.map} +1 -1
  20. package/dist/index.cjs.js +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.esm.js +1 -1
  23. package/package.json +3 -3
  24. package/dist/SessionTimeoutPopup-BDrzUHmk.js.map +0 -4
  25. package/dist/SessionTimeoutPopup-BHISSH2H.cjs.map +0 -4
  26. package/dist/context/featureProvider/FeatureProvider.test.d.ts +0 -1
@@ -1881,12 +1881,12 @@ return jsxRuntimeExports.jsxs(TooltipContainer$r,{children:[
1881
1881
  color: ${Colors.heroDark};
1882
1882
  `,strings$5A=appLocale.getLocalizedStrings(),{common:{strings:commonStrings$x}}=strings$5A,logInvalidTooltipData=e=>console.error(commonStrings$x.invalidTooltipDataMessage.replace("{variant}",e)),PREFIX$1="ZeniTooltip",classes$1={root:`${PREFIX$1}-root`,popper:`${PREFIX$1}-popper`,tooltip:`${PREFIX$1}-tooltip`,arrow:`${PREFIX$1}-arrow`,tooltipPlacementLeft:`${PREFIX$1}-tooltipPlacementLeft`,tooltipPlacementRight:`${PREFIX$1}-tooltipPlacementRight`,tooltipPlacementTop:`${PREFIX$1}-tooltipPlacementTop`,tooltipPlacementBottom:`${PREFIX$1}-tooltipPlacementBottom`},ToBeStyledTooltip=({className:e,disableIntersectionObserver:t=!1,...n})=>{const o=React.useRef(null),[i,r]=React.useState(t),a=React.useCallback(e=>{const[t]=e;r(t.isIntersecting)},[]);return React.useEffect(()=>{if(!0===t)return void r(!0);const e={root:null,rootMargin:Space.sp0},n=o.current,i=new IntersectionObserver(a,e);return null!=n&&i.observe(n),()=>{null!=n&&i.unobserve(n)}},[o,a,t]),/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$7,{...n,classes:{...classes$1,popper:e},ref:o,slotProps:{...n.slotProps,popper:{...n.slotProps?.popper??{},...!0===t?{}:{sx:{display:i?"block":"none"}}}}})},StyledTooltip$2=styled$2(ToBeStyledTooltip,{shouldForwardProp:e=>"tooltipBorderRadius"!==e})(({maxWidth:e,variant:t,style:n,tooltipBorderRadius:o})=>{const i=(()=>{switch(t){case"runway":return{padding:"8px 12px 8px 12px",maxWidth:"240px",minWidth:"160px",borderRadius:sp[1]};case"small-description":return{padding:`12px ${Space.sp3} 12px ${Space.sp3}`,minWidth:"180px",borderRadius:sp[1]};case"list-description":return{padding:`12px ${Space.sp3} 12px ${Space.sp3}`,minWidth:"200px",borderRadius:sp[1]};case"informative":return{padding:`${Space.sp3} ${Space.sp3} ${Space.sp4} ${Space.sp4}`,minWidth:"220px",maxWidth:"250px",borderRadius:sp[1]};case"multi-information-points":return{maxWidth:"264px",borderRadius:sp[1],padding:`12px ${Space.sp3}`};case"chain-of-thought":return{minWidth:"343px",maxWidth:"504px",borderRadius:sp[2],padding:sp[0],margin:sp[0]};case"categorized-list":return{maxWidth:"510px",borderRadius:sp[2],padding:sp[0]};default:return{padding:"3px 8px 4px 8px",borderRadius:sp[1],maxWidth:"240px"}}})();return{[`& .${classes$1.tooltip}`]:{color:Colors.championDark,backgroundColor:Colors.blackColor,textAlign:null!=n?.textAlign?n?.textAlign:"standard"===t?"center":"left",fontSize:n?.fontSize??textStyles.extraSmallSemiBold.fontSize,fontWeight:FontWeight.semiBold,lineHeight:n?.lineHeight??textStyles.extraSmallSemiBold.lineHeight,padding:n?.padding??i.padding,maxWidth:e??i.maxWidth,minWidth:n?.minWidth??i.minWidth,maxHeight:n?.maxHeight,overflowY:n?.overflowY,overflowX:n?.overflowX,..."chain-of-thought"===t?{margin:n?.margin??i.margin}:{},letterSpacing:textStyles.extraSmallSemiBold.letterSpacing,fontFamily:fonts.Original,borderRadius:o??i.borderRadius,position:n?.position??"unset",top:n?.top??"unset",left:n?.left??"unset"},'&.MuiTooltip-popper[data-popper-placement*="left"]':{paddingRight:n?.marginRight??Space.sp2},[`&.MuiTooltip-popper[data-popper-placement*="left"] .${classes$1.tooltip}`]:{marginRight:0},'&.MuiTooltip-popper[data-popper-placement*="right"]':{paddingLeft:n?.marginLeft??Space.sp2},[`&.MuiTooltip-popper[data-popper-placement*="right"] .${classes$1.tooltip}`]:{marginLeft:0},'&.MuiTooltip-popper[data-popper-placement*="top"]':{paddingBottom:n?.marginBottom??Space.sp2},[`&.MuiTooltip-popper[data-popper-placement*="top"] .${classes$1.tooltip}`]:{marginBottom:0},'&.MuiTooltip-popper[data-popper-placement*="bottom"]':{paddingTop:n?.marginTop??Space.sp2},[`&.MuiTooltip-popper[data-popper-placement*="bottom"] .${classes$1.tooltip}`]:{marginTop:0},[`& .${classes$1.arrow}`]:{color:Colors.blackColor,fontSize:"8px","&::before":{borderRadius:"1px"}},[`&.MuiTooltip-popper[data-popper-placement*="bottom"] .${classes$1.arrow}`]:{marginTop:"0.3em"},[`&.MuiTooltip-popper[data-popper-placement*="top"] .${classes$1.arrow}`]:{marginBottom:"0.3em"},[`&.MuiTooltip-popper[data-popper-placement*="left"] .${classes$1.arrow}`]:{marginRight:"0.3em"},[`&.MuiTooltip-popper[data-popper-placement*="right"] .${classes$1.arrow}`]:{marginLeft:"0.3em"}}}),renderTooltipContent$4=({variant:e,title:t,data:n})=>{const o=t??commonStrings$x.empty;switch(e){case"runway":return null!=n&&isRunwayData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(RunwayTooltip,{data:n}):(logInvalidTooltipData("runway"),o);case"small-description":{const e="string"==typeof n?n:String(n??"");/* @__PURE__ */
1883
1883
  return jsxRuntimeExports.jsx(SmallDescriptionTooltip,{content:e})}case"list-description":return null!=n&&isListDescriptionData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(ListDescriptionTooltip,{title:n.title,items:n.items}):(logInvalidTooltipData("list-description"),o);case"informative":return null!=n&&isInformativeData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(InformativeTooltip,{data:n}):(logInvalidTooltipData("informative"),o);case"chain-of-thought":return null!=n&&isChainOfThoughtData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(ChainOfThoughtTooltip,{data:n}):(logInvalidTooltipData("chain-of-thought"),o);case"multi-information-points":return null!=n&&isMultiInformationPointsData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(MultiInformationPointsTooltip,{data:n}):(logInvalidTooltipData("multi-information-points"),o);case"categorized-list":return null!=n&&isCategorizedListData(n)?/* @__PURE__ */jsxRuntimeExports.jsx(CategorizedListTooltip,{data:n}):(logInvalidTooltipData("categorized-list"),o);default:return o}},Tooltip$6=({children:e,title:t,open:n,variant:o="standard",data:i,placement:r="bottom",display:a="inline-block",position:s="static",disableIntersectionObserver:l=!1,disablePopperFlip:c=!1,disablePopperPreventOverflow:d=!1,offset:p,popperDisablePortal:u=!1,popperStrategy:m,maxWidth:h,arrow:g=!1,enterDelay:x,enterTouchDelay:f,leaveTouchDelay:y,leaveDelay:S,fadeTimeout:C=400,fadeEasing:$,style:b,tooltipBorderRadius:v,onOpen:A,onClose:E,disableHoverListener:w,disableFocusListener:R,disableTouchListener:j})=>{const T=React.useMemo(()=>renderTooltipContent$4({variant:o,title:t,data:i}),[o,t,i]),I=React.useMemo(()=>{const e=[];!0===c&&e.push({name:"flip",enabled:!1}),!0===d&&e.push({name:"preventOverflow",enabled:!1}),null!=p&&e.push({name:"offset",options:{offset:p}});const t={};e.length>0&&(t.modifiers=e),null!=m&&(t.strategy=m);const n={};if(!0===u&&(n.disablePortal=!0),Object.keys(t).length>0&&(n.popperOptions=t),null!=n.disablePortal||null!=n.popperOptions)return n},[c,d,p,u,m]);/* @__PURE__ */
1884
- return jsxRuntimeExports.jsx(StyledTooltip$2,{slotProps:{transition:{timeout:C,...null!=$?{easing:$}:{}},...null!=I?{popper:I}:{}},slots:{transition:Fade},title:T,placement:r,classes:classes$1,variant:o,arrow:g,...null!=n&&{open:n},disableIntersectionObserver:l,maxWidth:h??getDefaultMaxWidth(o),style:b,tooltipBorderRadius:v,enterDelay:x,enterTouchDelay:f,leaveTouchDelay:y,leaveDelay:S,onOpen:A,onClose:E,disableHoverListener:w,disableFocusListener:R,disableTouchListener:j,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledDiv$15,{style:{display:a,position:s,top:b?.top??"unset",alignItems:"center",flexDirection:b?.flexDirection??"unset",rowGap:b?.rowGap??"unset",width:b?.width??"unset",height:b?.height??"unset"},children:e})})},StyledDiv$15=styled$2.div``,SvgArrowLeft=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M10 13L5 8L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),SvgMenu=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M2.5 8H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M2.5 5H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M2.5 11H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),SvgZeniIconOnly=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z",fill:"currentColor"}),/* @__PURE__ */React.createElement("path",{d:"M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z",fill:"currentColor"}),/* @__PURE__ */React.createElement("path",{d:"M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z",fill:"currentColor"})),{common:{back:back$d}}=appLocale.getLocalizedStrings(),navBarHeight=new ResponsiveSized(52,sp[8],sp[8]),dimensions$2D={navBarHeight:navBarHeight,navBarWithSearchHeight:new ResponsiveSized(88,sp[8],sp[8]),navBarPaddingTop:new ResponsiveSized(12,12,sp[0]),navBarPaddingBottom:new ResponsiveSized(sp[0],12,sp[0]),titleMarginLeft:new ResponsiveSized(sp[3],sp[4],sp[0]),contentContainerMargin:new ResponsiveSized(sp[3],sp[4],sp[5]),titleTextWrapperGap:new ResponsiveSized(sp[2],sp[0])},navBarContentContainerMargin=dimensions$2D.contentContainerMargin,fontStyles$1J={title:new ResponsiveSizedStyle("extraLargeMedium","h7Bold")};function NavBar({title:e,titleTextStyles:t,subTitle:n,subTitleWrapperStyle:o,backgroundColor:i,transparentBackground:r=!1,searchAutoComplete:a,style:s,titleStyle:l,scrollableContent:c,navBarContainerStyles:d,navBarContentContainerStyles:p,showBackButton:u=!0,showLeftSection:m=!0,showMenuIcon:h=!1,ignoreScrollAction:g=!1,onClickMenuIcon:x,onBackClick:f,onZeniLogoClick:y,showZeniLogo:S=!1,zeniLogoVisiblity:C="hidden",rightSideComponent:$,leftSideComponent:b,downloadPresent:v=!1,hideMiddleSection:A=!1,hideSearchBtn:E=!1,isSearchOpen:w=!1,enableTitleOnScroll:R=!1,scrollThreshold:j=sp[9],leftComponentStyle:T,keepBackgroundOnScroll:I=!1,showBorderBottom:k=!0,rightComponentStyle:L,source:D}){const _=useWindowSizeContext(),[P,B]=useState(!1),[M,O]=useState(!1),F=useCallback(e=>{O(e>j)},[j]);useEffect(()=>{const e=c?.current;if(null!=e){const t=()=>{const t=e.scrollTop;B(t>0),R&&F(t)};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}}{const e=()=>{B(window.scrollY>10),R&&F(window.scrollY)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[c,R,j,F]);const N=new Color$1(i??"transparent"),z=useGlobalInfoContext(),H=null!=z.loggedInUserRole&&!hasInvestorBankerLevelAccess(z.loggedInUserRole),V=()=>{if(!0===w&&"small"===_&&!m)return null;const i=null!=b?b:!0!==h?/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$4,{showBackButton:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{style:{marginTop:Space.sp1},title:back$d,enterDelay:600,display:"flex",placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$5,{onClick:f,"data-testid":generateDataTestId("nav-bar-back-click")})})}):/* @__PURE__ */jsxRuntimeExports.jsx(MenuIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMenuIcon$1,{onClick:x,"data-testid":generateDataTestId("nav-bar-menu-click")})}),r=A||!0===w&&"small"===_||!M&&R?null:/* @__PURE__ */jsxRuntimeExports.jsx(TitleContainer$x,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(TitleText$g,{style:l,windowSize:_,isSubtitleVisible:null!=n,children:[
1884
+ return jsxRuntimeExports.jsx(StyledTooltip$2,{slotProps:{transition:{timeout:C,...null!=$?{easing:$}:{}},...null!=I?{popper:I}:{}},slots:{transition:Fade},title:T,placement:r,classes:classes$1,variant:o,arrow:g,...null!=n&&{open:n},disableIntersectionObserver:l,maxWidth:h??getDefaultMaxWidth(o),style:b,tooltipBorderRadius:v,enterDelay:x,enterTouchDelay:f,leaveTouchDelay:y,leaveDelay:S,onOpen:A,onClose:E,disableHoverListener:w,disableFocusListener:R,disableTouchListener:j,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledDiv$15,{style:{display:a,position:s,top:b?.top??"unset",alignItems:"center",flexDirection:b?.flexDirection??"unset",rowGap:b?.rowGap??"unset",width:b?.width??"unset",height:b?.height??"unset"},children:e})})},StyledDiv$15=styled$2.div``,SvgArrowLeft=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M10 13L5 8L10 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),SvgMenu=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M2.5 8H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M2.5 5H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M2.5 11H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),SvgZeniIconOnly=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z",fill:"currentColor"}),/* @__PURE__ */React.createElement("path",{d:"M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z",fill:"currentColor"}),/* @__PURE__ */React.createElement("path",{d:"M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z",fill:"currentColor"})),{common:{back:back$e}}=appLocale.getLocalizedStrings(),navBarHeight=new ResponsiveSized(52,sp[8],sp[8]),dimensions$2D={navBarHeight:navBarHeight,navBarWithSearchHeight:new ResponsiveSized(88,sp[8],sp[8]),navBarPaddingTop:new ResponsiveSized(12,12,sp[0]),navBarPaddingBottom:new ResponsiveSized(sp[0],12,sp[0]),titleMarginLeft:new ResponsiveSized(sp[3],sp[4],sp[0]),contentContainerMargin:new ResponsiveSized(sp[3],sp[4],sp[5]),titleTextWrapperGap:new ResponsiveSized(sp[2],sp[0])},navBarContentContainerMargin=dimensions$2D.contentContainerMargin,fontStyles$1J={title:new ResponsiveSizedStyle("extraLargeMedium","h7Bold")};function NavBar({title:e,titleTextStyles:t,subTitle:n,subTitleWrapperStyle:o,backgroundColor:i,transparentBackground:r=!1,searchAutoComplete:a,style:s,titleStyle:l,scrollableContent:c,navBarContainerStyles:d,navBarContentContainerStyles:p,showBackButton:u=!0,showLeftSection:m=!0,showMenuIcon:h=!1,ignoreScrollAction:g=!1,onClickMenuIcon:x,onBackClick:f,onZeniLogoClick:y,showZeniLogo:S=!1,zeniLogoVisiblity:C="hidden",rightSideComponent:$,leftSideComponent:b,downloadPresent:v=!1,hideMiddleSection:A=!1,hideSearchBtn:E=!1,isSearchOpen:w=!1,enableTitleOnScroll:R=!1,scrollThreshold:j=sp[9],leftComponentStyle:T,keepBackgroundOnScroll:I=!1,showBorderBottom:k=!0,rightComponentStyle:L,source:D}){const _=useWindowSizeContext(),[P,B]=useState(!1),[M,O]=useState(!1),F=useCallback(e=>{O(e>j)},[j]);useEffect(()=>{const e=c?.current;if(null!=e){const t=()=>{const t=e.scrollTop;B(t>0),R&&F(t)};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}}{const e=()=>{B(window.scrollY>10),R&&F(window.scrollY)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[c,R,j,F]);const N=new Color$1(i??"transparent"),z=useGlobalInfoContext(),H=null!=z.loggedInUserRole&&!hasInvestorBankerLevelAccess(z.loggedInUserRole),V=()=>{if(!0===w&&"small"===_&&!m)return null;const i=null!=b?b:!0!==h?/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$5,{showBackButton:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{style:{marginTop:Space.sp1},title:back$e,enterDelay:600,display:"flex",placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$6,{onClick:f,"data-testid":generateDataTestId("nav-bar-back-click")})})}):/* @__PURE__ */jsxRuntimeExports.jsx(MenuIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMenuIcon$1,{onClick:x,"data-testid":generateDataTestId("nav-bar-menu-click")})}),r=A||!0===w&&"small"===_||!M&&R?null:/* @__PURE__ */jsxRuntimeExports.jsx(TitleContainer$x,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(TitleText$g,{style:l,windowSize:_,isSubtitleVisible:null!=n,children:[
1885
1885
  /* @__PURE__ */jsxRuntimeExports.jsx(ControlledComponent,{controller:Boolean(S),children:/* @__PURE__ */jsxRuntimeExports.jsxs(TitleWithZeniLogoWrapper,{windowSize:_,children:["string"==typeof e?/* @__PURE__ */jsxRuntimeExports.jsx(NavbarTitle,{subTitleWrapperStyle:o,title:e,subtitle:n,titleTextStyles:t}):e,
1886
1886
  /* @__PURE__ */jsxRuntimeExports.jsx(ZeniLogoWrapper,{visibility:C,onClick:y,"data-testid":generateDataTestId("nav-bar-zeni-logo")})]})}),
1887
1887
  /* @__PURE__ */jsxRuntimeExports.jsx(ControlledComponent,{controller:!0!==Boolean(S),children:/* @__PURE__ */jsxRuntimeExports.jsx(TitleWithoutZeniLogoWrapper,{windowSize:_,children:"string"==typeof e?/* @__PURE__ */jsxRuntimeExports.jsx(NavbarTitle,{subTitleWrapperStyle:o,title:e,subtitle:n,titleTextStyles:t}):e})})]})});/* @__PURE__ */
1888
1888
  return jsxRuntimeExports.jsxs(LeftSectionWrapper,{children:[i,r]})},W=()=>/* @__PURE__ */jsxRuntimeExports.jsxs(RightSectionWrapper,{children:[!0===H?/* @__PURE__ */jsxRuntimeExports.jsx(SearchButton,{searchAutoComplete:a,enableMarginRight:!0===v&&null==$,backgroundColor:N,"data-testid":generateDataTestId("nav-bar-search-button"),source:D}):null,$]});/* @__PURE__ */
1889
- return jsxRuntimeExports.jsx(NavbarContainer$4,{bgColor:!0===r?"transparent":N.toString(),isScrolled:P,ignoreScrollAction:g,windowSize:_,isSearchHidden:E,keepBackgroundOnScroll:I,showBorderBottom:k,style:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentContainer$O,{windowSize:_,isSearchHidden:E,style:p,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Container$7A,{windowSize:_,style:d,children:[h?V():/* @__PURE__ */jsxRuntimeExports.jsx(LeftComponentWrapper,{style:T,windowSize:_,children:V()}),h?W():/* @__PURE__ */jsxRuntimeExports.jsx(RightComponentWrapper,{style:L,children:W()})]})})})}const NavbarContainer$4=styled$2.div`
1889
+ return jsxRuntimeExports.jsx(NavbarContainer$5,{bgColor:!0===r?"transparent":N.toString(),isScrolled:P,ignoreScrollAction:g,windowSize:_,isSearchHidden:E,keepBackgroundOnScroll:I,showBorderBottom:k,style:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentContainer$O,{windowSize:_,isSearchHidden:E,style:p,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Container$7A,{windowSize:_,style:d,children:[h?V():/* @__PURE__ */jsxRuntimeExports.jsx(LeftComponentWrapper,{style:T,windowSize:_,children:V()}),h?W():/* @__PURE__ */jsxRuntimeExports.jsx(RightComponentWrapper,{style:L,children:W()})]})})})}const NavbarContainer$5=styled$2.div`
1890
1890
  display: flex;
1891
1891
  flex-direction: column;
1892
1892
  min-height: ${e=>e.isSearchHidden?dimensions$2D.navBarHeight.valuePx(e.windowSize):dimensions$2D.navBarWithSearchHeight.valuePx(e.windowSize)};
@@ -1949,7 +1949,7 @@ return jsxRuntimeExports.jsx(NavbarContainer$4,{bgColor:!0===r?"transparent":N.t
1949
1949
  `,SubTitleWrapper=styled$2(SmallRegular)`
1950
1950
  color: ${e=>e.theme.colors.champion};
1951
1951
  white-space: nowrap;
1952
- `,BackButtonWrapper$4=styled$2.div`
1952
+ `,BackButtonWrapper$5=styled$2.div`
1953
1953
  display: ${e=>e.showBackButton?"flex":"none"};
1954
1954
  align-items: center;
1955
1955
  justify-content: center;
@@ -1962,7 +1962,7 @@ return jsxRuntimeExports.jsx(NavbarContainer$4,{bgColor:!0===r?"transparent":N.t
1962
1962
  background-color: ${e=>e.theme.colors.grey3};
1963
1963
  color: ${e=>e.theme.colors.primary};
1964
1964
  }
1965
- `,Back$5=styled$2(SvgArrowLeft)`
1965
+ `,Back$6=styled$2(SvgArrowLeft)`
1966
1966
  height: ${Space.sp3};
1967
1967
  width: ${Space.sp3};
1968
1968
  cursor: pointer;
@@ -2284,7 +2284,7 @@ return jsxRuntimeExports.jsxs(AiCfoOnboardingPageContainer,{windowSize:u,style:o
2284
2284
  gap: ${({windowSize:e})=>D$53.tileGap.valuePx(e)};
2285
2285
  align-items: stretch;
2286
2286
  min-width: 0;
2287
- `;var now_1,hasRequiredNow,_trimmedEndIndex,hasRequired_trimmedEndIndex,_baseTrim,hasRequired_baseTrim,isSymbol_1,hasRequiredIsSymbol,toNumber_1,hasRequiredToNumber,debounce_1,hasRequiredDebounce;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();return now_1=function(){return e.Date.now()}}function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;return _trimmedEndIndex=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;return _baseTrim=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isSymbol_1=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),n=requireIsSymbol(),o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt;return toNumber_1=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=i.test(s);return c||r.test(s)?a(s.slice(2),c?2:8):o.test(s)?NaN:+s}}function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),n=requireToNumber(),o=Math.max,i=Math.min;return debounce_1=function(r,a,s){var l,c,d,p,u,m,h=0,g=!1,x=!1,f=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,h=e,p=r.apply(n,t)}function S(e){var t=e-m;return void 0===m||t>=a||t<0||x&&e-h>=d}function C(){var e=t();if(S(e))return $(e);u=setTimeout(C,function(e){var t=a-(e-m);return x?i(t,d-(e-h)):t}(e))}function $(e){return u=void 0,f&&l?y(e):(l=c=void 0,p)}function b(){var e=t(),n=S(e);if(l=arguments,c=this,m=e,n){if(void 0===u)return function(e){return h=e,u=setTimeout(C,a),g?y(e):p}(m);if(x)return clearTimeout(u),u=setTimeout(C,a),y(m)}return void 0===u&&(u=setTimeout(C,a)),p}return a=n(a)||0,e(s)&&(g=!!s.leading,d=(x="maxWait"in s)?o(n(s.maxWait)||0,a):d,f="trailing"in s?!!s.trailing:f),b.cancel=function(){void 0!==u&&clearTimeout(u),h=0,l=m=c=u=void 0},b.flush=function(){return void 0===u?p:$(t())},b},debounce_1}var debounceExports=requireDebounce();const debounce=/* @__PURE__ */getDefaultExportFromCjs(debounceExports);var DynamicConfigNamesCockpit=/* @__PURE__ */(e=>(e.cardsTabCockpitUser="cards_tab_cockpit_enabled_users",e.monthEndInsightsEnablement="month_end_insights_enablement",e.expenseAutomationEnablement="expense_automation_enablement",e.monthEndPreviewEnablement="month_end_preview_enablement",e.qboConnectionPoolEnablement="qbo_connection_pool_enablement",e.aiAccountantOnboardingConfig="ai_accountant_onboarding_config",e.creditAgentEnablement="credit_agent_enablement",e.cockpitControlsConfig="cockpit_controls_config",e))(DynamicConfigNamesCockpit||{}),DynamicConfigNamesWebApp=/* @__PURE__ */(e=>(e.treDynamicConfig="tre_dynamic_config",e.documentAiReceiptMaxSizeLimitBytesConfig="document_ai_receipt_max_size_limit_bytes_config",e.meetingLinksConfig="meeting_links_config",e.zeniAssistConfig="zeni_assist_config",e.zeniCardsConfig="zeni_cards_config",e.zeniAccountsConfig="deposit_accounts_config",e.expressPayConfig="express_pay_config",e.accountReconGLAccountsConfig="account_recon_gl_accounts_config",e.treasuryConfig="treasury_config",e.newTagOnMenuConfig="new_tag_on_menu_config",e.sameDayAchDisablementConfig="same_day_ach_disablement_config",e.aiCfoMessageDynamicConfig="ai_cfo_message_dynamic_config",e.aiCfoDiscoveryTipsConfig="ai_cfo_discovery_tips_config",e.webappPrefetchConfig="webapp_prefetch_config",e.expenseAutomationEnablementZeniUsers="expense_automation_enablement_zeni_users",e.approvalRuleV3Config="approval_rule_v3_config",e.transactionCategorizationConfig="transaction_categorization_config",e.zeniCardsVisibilityConfig="zeni_cards_visibility_config",e.updateTransactionTypeConfig="update_transaction_type_config",e.createTransactionTransactionTypeSupportedConfig="create_transaction_transaction_type_supported_config",e.resetKycKybConfig="reset_kyc_kyb_config",e))(DynamicConfigNamesWebApp||{}),DynamicConfigNamesShared=/* @__PURE__ */(e=>(e.sessionAutoLogoutConfig="session_auto_logout_config",e))(DynamicConfigNamesShared||{});const DynamicConfigNames={...DynamicConfigNamesCockpit,...DynamicConfigNamesWebApp,...DynamicConfigNamesShared};var noop_1,hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop_1;return hasRequiredNoop=1,noop_1=function(){}}var noopExports=requireNoop();const noop$9=/* @__PURE__ */getDefaultExportFromCjs(noopExports);var src$2={},src$1={},$_StatsigGlobal={},Log={},hasRequiredLog$1,hasRequired$_StatsigGlobal;function requireLog$1(){return hasRequiredLog$1||(hasRequiredLog$1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function t(e){return e.unshift("[Statsig]"),e}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...o){n.level>=e.LogLevel.Info&&console.info(" INFO ",...t(o))}static debug(...o){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...t(o))}static warn(...o){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...t(o))}static error(...o){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...t(o))}}e.Log=n,n.level=e.LogLevel.Warn}(Log)),Log}function require$_StatsigGlobal(){return hasRequired$_StatsigGlobal||(hasRequired$_StatsigGlobal=1,function(e){var t,n,o;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const i=requireLog$1();e._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:c}catch(e){return c}};e._getStatsigGlobalFlag=t=>(0,e._getStatsigGlobal)()[t];e._getInstance=t=>{const n=(0,e._getStatsigGlobal)();return t?n.instances&&n.instances[t]:(n.instances&&Object.keys(n.instances).length>1&&i.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),n.firstInstance)};const r="__STATSIG__",a="undefined"!=typeof window?window:{},s=void 0!==commonjsGlobal$1?commonjsGlobal$1:{},l="undefined"!=typeof globalThis?globalThis:{},c=null!==(o=null!==(n=null!==(t=a[r])&&void 0!==t?t:s[r])&&void 0!==n?n:l[r])&&void 0!==o?o:{instance:e._getInstance};a[r]=c,s[r]=c,l[r]=c}($_StatsigGlobal)),$_StatsigGlobal}var Diagnostics={},hasRequiredDiagnostics;function requireDiagnostics(){return hasRequiredDiagnostics||(hasRequiredDiagnostics=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=/* @__PURE__ */new Map,n="start",o="end",i="statsig::diagnostics";function r(e,t,n,o){return Object.assign({key:n,action:t,step:o,timestamp:Date.now()},e)}function a(e,n){var o;const i=null!==(o=t.get(e))&&void 0!==o?o:[];i.push(n),t.set(e,i)}function s(e,t){if(t in e)return e[t]}e.Diagnostics={_getMarkers:e=>t.get(e),_markInitOverallStart:e=>{a(e,r({},n,"overall"))},_markInitOverallEnd:(e,t,n)=>{a(e,r({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,r(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,r(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{a(e,r({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,r(t,o,"initialize","process"))},_clearMarkers:e=>{t.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:s(e,"code"),name:s(e,"name"),message:s(e,"message")}},_getDiagnosticsData(t,n,o,i){var r;return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null===(r=null==t?void 0:t.headers)||void 0===r?void 0:r.get("x-statsig-region"),isDelta:!0===o.includes('"is_delta":true')||void 0,attempt:n,error:e.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(t,n,o,r){const a=e.Diagnostics._getMarkers(o);if(null==a||a.length<=0)return-1;const s=a[a.length-1].timestamp-a[0].timestamp;e.Diagnostics._clearMarkers(o);const l=function(e,t){const n={eventName:i,user:e,value:null,metadata:t,time:Date.now()};return n}(t,{context:"initialize",markers:a.slice(),statsigOptions:r});return n.enqueue(l),s}}}(Diagnostics)),Diagnostics}var EventLogger={},BatchedEventsQueue={},EventBatch={},hasRequiredEventBatch;function requireEventBatch(){if(hasRequiredEventBatch)return EventBatch;hasRequiredEventBatch=1,Object.defineProperty(EventBatch,"__esModule",{value:!0}),EventBatch.EventBatch=void 0;return EventBatch.EventBatch=class{constructor(e){this.attempts=0,this.createdAt=Date.now(),this.events=e}incrementAttempts(){this.attempts++}},EventBatch}var EventRetryConstants={},hasRequiredEventRetryConstants,hasRequiredBatchedEventsQueue;function requireEventRetryConstants(){return hasRequiredEventRetryConstants||(hasRequiredEventRetryConstants=1,Object.defineProperty(EventRetryConstants,"__esModule",{value:!0}),EventRetryConstants.EventRetryConstants=void 0,EventRetryConstants.EventRetryConstants={MAX_RETRY_ATTEMPTS:8,DEFAULT_BATCH_SIZE:100,MAX_PENDING_BATCHES:40,TICK_INTERVAL_MS:1e3,QUICK_FLUSH_WINDOW_MS:200,MAX_LOCAL_STORAGE:500,get MAX_QUEUED_EVENTS(){return this.DEFAULT_BATCH_SIZE*this.MAX_PENDING_BATCHES}}),EventRetryConstants}function requireBatchedEventsQueue(){if(hasRequiredBatchedEventsQueue)return BatchedEventsQueue;hasRequiredBatchedEventsQueue=1,Object.defineProperty(BatchedEventsQueue,"__esModule",{value:!0}),BatchedEventsQueue.BatchQueue=void 0;const e=requireEventBatch(),t=requireEventRetryConstants();return BatchedEventsQueue.BatchQueue=class{constructor(e=t.EventRetryConstants.DEFAULT_BATCH_SIZE){this._batches=[],this._batchSize=e}batchSize(){return this._batchSize}requeueBatch(e){return this._enqueueBatch(e)}hasFullBatch(){return this._batches.some(e=>e.events.length>=this._batchSize)}takeNextBatch(){return this._batches.shift()}takeAllBatches(){const e=this._batches;return this._batches=[],e}createBatches(t){let n=0,o=0;for(;n<t.length;){const i=t.slice(n,n+this._batchSize);o+=this._enqueueBatch(new e.EventBatch(i)),n+=this._batchSize}return o}_enqueueBatch(e){this._batches.push(e);let n=0;for(;this._batches.length>t.EventRetryConstants.MAX_PENDING_BATCHES;){const e=this._batches.shift();e&&(n+=e.events.length)}return n}},BatchedEventsQueue}var CacheKey={},Hashing={},TypingUtils={},hasRequiredTypingUtils,hasRequiredHashing,hasRequiredCacheKey;function requireTypingUtils(){if(hasRequiredTypingUtils)return TypingUtils;return hasRequiredTypingUtils=1,Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0,TypingUtils._typeOf=function(e){return Array.isArray(e)?"array":typeof e},TypingUtils._isTypeMatch=function(e,t){const n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)},TypingUtils}function requireHashing(){return hasRequiredHashing||(hasRequiredHashing=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=requireTypingUtils();e._DJB2=e=>{let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return String(t>>>0)};e._DJB2Object=(t,n)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(t,n)));e._getSortedObject=(n,o)=>{if(null==n)return null;const i=Object.keys(n).sort(),r={};return i.forEach(i=>{const a=n[i];0!==o&&"object"===(0,t._typeOf)(a)?r[i]=(0,e._getSortedObject)(a,null!=o?o-1:o):r[i]=a}),r}}(Hashing)),Hashing}function requireCacheKey(){if(hasRequiredCacheKey)return CacheKey;hasRequiredCacheKey=1,Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const e=requireHashing();function t(t,n,o){var i;if(o)return o(t,n);const r=n&&n.customIDs?n.customIDs:{},a=[`uid:${null!==(i=null==n?void 0:n.userID)&&void 0!==i?i:""}`,`cids:${Object.keys(r).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${r[e]}`).join(",")}`,`k:${t}`];return(0,e._DJB2)(a.join("|"))}return CacheKey._getUserStorageKey=t,CacheKey._getStorageKey=function(n,o,i){return o?t(n,o,i):(0,e._DJB2)(`k:${n}`)},CacheKey}var FlushCoordinator={},EventSender={},NetworkConfig={},hasRequiredNetworkConfig;function requireNetworkConfig(){return hasRequiredNetworkConfig||(hasRequiredNetworkConfig=1,e=NetworkConfig,Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}),NetworkConfig;var e}var SDKType={},hasRequiredSDKType;function requireSDKType(){if(hasRequiredSDKType)return SDKType;hasRequiredSDKType=1,Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const e={};let t;return SDKType.SDKType={_get:n=>{var o;return(null!==(o=e[n])&&void 0!==o?o:"js-mono")+(null!=t?t:"")},_setClientType(t,n){e[t]=n},_setBindingType(e){t&&"-react"!==t||(t="-"+e)}},SDKType}var StatsigMetadata={},hasRequiredStatsigMetadata;function requireStatsigMetadata(){return hasRequiredStatsigMetadata||(hasRequiredStatsigMetadata=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.33.0";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:e=>{t=Object.assign(Object.assign({},t),e)}}}(StatsigMetadata)),StatsigMetadata}var VisibilityObserving={},SafeJs={},hasRequiredSafeJs,hasRequiredVisibilityObserving,hasRequiredEventSender;function requireSafeJs(){return hasRequiredSafeJs||(hasRequiredSafeJs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._cloneObject=e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=requireLog$1();e._getWindowSafe=()=>"undefined"!=typeof window?window:null;e._getDocumentSafe=()=>{var t;const n=(0,e._getWindowSafe)();return null!==(t=null==n?void 0:n.document)&&void 0!==t?t:null};e._isServerEnv=()=>{if(null!==(0,e._getDocumentSafe)())return!1;const t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||t};e._addWindowEventListenerSafe=(t,n)=>{const o=(0,e._getWindowSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._addDocumentEventListenerSafe=(t,n)=>{const o=(0,e._getDocumentSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._getCurrentPageUrlSafe=()=>{var t;try{return null===(t=(0,e._getWindowSafe)())||void 0===t?void 0:t.location.href.split(/[?#]/)[0]}catch(n){return}};e._getUnloadEvent=()=>{const t=(0,e._getWindowSafe)();if(!t)return"beforeunload";return"onpagehide"in t?"pagehide":"beforeunload"};e._cloneObject=(e,n)=>{try{return JSON.parse(JSON.stringify(n))}catch(o){return t.Log.error(`Failed to clone object ${e}`),null}}}(SafeJs)),SafeJs}function requireVisibilityObserving(){return hasRequiredVisibilityObserving||(hasRequiredVisibilityObserving=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=requireSafeJs(),n="foreground",o="background",i=[];let r=n,a=!1;e._isCurrentlyVisible=()=>r===n;e._isUnloading=()=>a;e._subscribeToVisiblityChanged=e=>{i.unshift(e)};e._notifyVisibilityChanged=e=>{e!==r&&(r=e,i.forEach(t=>t(e)))},(0,t._addWindowEventListenerSafe)("focus",()=>{a=!1,(0,e._notifyVisibilityChanged)(n)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(o)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)("visible"===document.visibilityState?n:o)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{a=!0,(0,e._notifyVisibilityChanged)(o)})}(VisibilityObserving)),VisibilityObserving}function requireEventSender(){if(hasRequiredEventSender)return EventSender;hasRequiredEventSender=1;var e=EventSender&&EventSender.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventSender,"__esModule",{value:!0}),EventSender.EventSender=void 0;const t=requireLog$1(),n=requireNetworkConfig(),o=requireSDKType(),i=requireStatsigMetadata(),r=requireVisibilityObserving();return EventSender.EventSender=class{constructor(e,t,n,o,i){this._sdkKey=e,this._network=t,this._emitter=n,this._options=i,this._logEventUrlConfig=o}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}sendBatch(n){return e(this,void 0,void 0,function*(){var e,o,i;let a="event_sender_unexpected_exception";const s={};try{const t=(0,r._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(o=null===(e=this._options)||void 0===e?void 0:e.networkConfig)||void 0===o?void 0:o.networkOverrideFunc);a="event_sender_pre_logs_flushed_emitter_exception",this._emitter({name:"pre_logs_flushed",events:n.events}),a=t?"event_sender_unexpected_exception":"event_sender_post_exception";const i=t?this._sendEventsViaBeacon(n,s):yield this._sendEventsViaPost(n,s);return i.success?(a="event_sender_logs_flushed_emitter_exception",this._emitter({name:"logs_flushed",events:n.events}),i):Object.assign(Object.assign(Object.assign({success:!1,statusCode:i.statusCode,failurePath:i.failurePath},i.failureErrorMessage?{failureErrorMessage:i.failureErrorMessage}:{}),i.failureDiagnosticBucket?{failureDiagnosticBucket:i.failureDiagnosticBucket}:{}),i.failureDiagnosticMetadata?{failureDiagnosticMetadata:i.failureDiagnosticMetadata}:{})}catch(l){return t.Log.warn("Failed to send batch:",l),Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(i=s.path)&&void 0!==i?i:a},s.errorMessage?{failureErrorMessage:s.errorMessage}:{}),s.diagnosticBucket?{failureDiagnosticBucket:s.diagnosticBucket}:{}),s.diagnosticMetadata?{failureDiagnosticMetadata:s.diagnosticMetadata}:{})}})}_sendEventsViaPost(t,n){return e(this,void 0,void 0,function*(){var e,o;const i=yield this._network.post(this._getRequestData(t),n),r=null!==(e=null==i?void 0:i.code)&&void 0!==e?e:-1;return-1===r?Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(o=n.path)&&void 0!==o?o:void 0===i?"event_sender_post_returned_undefined":"event_sender_post_returned_null"},n.errorMessage?{failureErrorMessage:n.errorMessage}:{}),n.diagnosticBucket?{failureDiagnosticBucket:n.diagnosticBucket}:{}),n.diagnosticMetadata?{failureDiagnosticMetadata:n.diagnosticMetadata}:{}):{success:r>=200&&r<300,statusCode:r}})}_sendEventsViaBeacon(e,t){var n;const o=this._network.beacon(this._getRequestData(e),t);return Object.assign(Object.assign(Object.assign({success:o,statusCode:o?200:-1,failurePath:o?void 0:null!==(n=t.path)&&void 0!==n?n:"beacon_send_false"},!o&&t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),!o&&t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),!o&&t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e.events},urlConfig:this._logEventUrlConfig,retries:3,preserveFailedStatusCode:!0,isCompressable:!0,params:{[n.NetworkParam.EventCount]:String(e.events.length)},headers:{"statsig-event-count":String(e.events.length),"statsig-retry-count":String(e.attempts),"statsig-sdk-type":o.SDKType._get(this._sdkKey),"statsig-sdk-version":i.SDK_VERSION},credentials:"same-origin"}}},EventSender}var FlushInterval={},hasRequiredFlushInterval;function requireFlushInterval(){if(hasRequiredFlushInterval)return FlushInterval;hasRequiredFlushInterval=1,Object.defineProperty(FlushInterval,"__esModule",{value:!0}),FlushInterval.FlushInterval=void 0;const e=1e3,t=6e4;return FlushInterval.FlushInterval=class{constructor(){this._currentIntervalMs=e,this._lastFlushAttemptTime=Date.now()}getCurrentIntervalMs(){return this._currentIntervalMs}markFlushAttempt(){this._lastFlushAttemptTime=Date.now()}getTimeSinceLastAttempt(){return Date.now()-this._lastFlushAttemptTime}hasReachedMaxInterval(){return this.getTimeSinceLastAttempt()>=t}getTimeTillMaxInterval(){return t-this.getTimeSinceLastAttempt()}hasCompletelyRecoveredFromBackoff(){return this._currentIntervalMs<=e}adjustForSuccess(){const t=this._currentIntervalMs;t!==e&&(this._currentIntervalMs=Math.max(e,Math.floor(t/2)))}adjustForFailure(){const e=this._currentIntervalMs;this._currentIntervalMs=Math.min(t,2*e)}getTimeUntilNextFlush(){return this.getCurrentIntervalMs()-this.getTimeSinceLastAttempt()}},FlushInterval}var FlushTypes={},hasRequiredFlushTypes;function requireFlushTypes(){return hasRequiredFlushTypes||(hasRequiredFlushTypes=1,Object.defineProperty(FlushTypes,"__esModule",{value:!0}),FlushTypes.FlushType=void 0,(t=e||(FlushTypes.FlushType=e={})).ScheduledMaxTime="scheduled:max_time",t.ScheduledFullBatch="scheduled:full_batch",t.Limit="limit",t.Manual="manual",t.Shutdown="shutdown"),FlushTypes;var e,t}var NetworkCore={},NetworkFallbackResolver={},DnsTxtQuery={},hasRequiredDnsTxtQuery;function requireDnsTxtQuery(){if(hasRequiredDnsTxtQuery)return DnsTxtQuery;hasRequiredDnsTxtQuery=1;var e=DnsTxtQuery&&DnsTxtQuery.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const t=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n=["i","e","d"];return DnsTxtQuery._fetchTxtRecords=function(o){return e(this,void 0,void 0,function*(){const e=yield o("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!e.ok){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const i=yield e.arrayBuffer();return function(e){const t=e.findIndex((t,o)=>o<200&&"="===String.fromCharCode(t)&&n.includes(String.fromCharCode(e[o-1])));if(-1===t){const e=new Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let o="";for(let n=t-1;n<e.length;n++)o+=String.fromCharCode(e[n]);return o.split(",")}(new Uint8Array(i))})},DnsTxtQuery}var StorageProvider={},hasRequiredStorageProvider,hasRequiredNetworkFallbackResolver;function requireStorageProvider(){return hasRequiredStorageProvider||(hasRequiredStorageProvider=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=requireLog$1(),n=requireSafeJs(),o={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>o[e]?o[e]:null,setItem:(e,t)=>{o[e]=t},removeItem:e=>{delete o[e]},getAllKeys:()=>Object.keys(o)};let r=null;try{const e=(0,n._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(r={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,n)=>e.localStorage.setItem(t,n),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(c){t.Log.warn("Failed to setup localStorageProvider.")}let a=null!=r?r:i,s=a;function l(t){try{return t()}catch(c){if(c instanceof Error&&"SecurityError"===c.name)return e.Storage._setProvider(i),null;throw c}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:e=>l(()=>s.getItem(e)),setItem:(e,t)=>l(()=>s.setItem(e,t)),removeItem:e=>s.removeItem(e),getAllKeys:()=>s.getAllKeys(),_setProvider:e=>{a=e,s=e},_setDisabled:e=>{s=e?i:a}},e._getObjectFromStorage=function(n){const o=e.Storage.getItem(n);try{return JSON.parse(null!=o?o:"null")}catch(i){return t.Log.error(`Failed to parse value for key "${n}"`),null}},e._setObjectInStorage=function(t,n){e.Storage.setItem(t,JSON.stringify(n))}}(StorageProvider)),StorageProvider}function requireNetworkFallbackResolver(){if(hasRequiredNetworkFallbackResolver)return NetworkFallbackResolver;hasRequiredNetworkFallbackResolver=1;var e=NetworkFallbackResolver&&NetworkFallbackResolver.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(NetworkFallbackResolver,"__esModule",{value:!0}),NetworkFallbackResolver._isDomainFailure=NetworkFallbackResolver.NetworkFallbackResolver=void 0;const t=requireDnsTxtQuery(),n=requireHashing(),o=requireLog$1(),i=requireStorageProvider(),r=6048e5;function a(e,t){var n;const o=null!==(n=null==e?void 0:e.toLowerCase())&&void 0!==n?n:"";return t||o.includes("uncaught exception")||o.includes("failed to fetch")||o.includes("networkerror when attempting to fetch resource")}function s(e){return`statsig.network_fallback.${(0,n._DJB2)(e)}`}function l(e,t){const n=s(e);t&&0!==Object.keys(t).length?i.Storage.setItem(n,JSON.stringify(t)):i.Storage.removeItem(n)}return NetworkFallbackResolver.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null===(t=e.networkConfig)||void 0===t?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var n;const o=null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint];o&&(o.expiryTime=Date.now()+r,l(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:o})))}getActiveFallbackUrl(e,t){var n,r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let a=this._fallbackInfo;null==a&&(a=null!==(n=function(e){const t=s(e),r=i.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==n?n:{},this._fallbackInfo=a);const c=a[t.endpoint];return!c||Date.now()>(null!==(r=c.expiryTime)&&void 0!==r?r:0)||t.getChecksum()!==c.urlConfigChecksum?(delete a[t.endpoint],this._fallbackInfo=a,l(e,this._fallbackInfo),null):c.url?c.url:null}tryFetchUpdatedFallbackInfo(t,n,o,i){return e(this,void 0,void 0,function*(){var e,r;try{if(!a(o,i))return!1;const r=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,s=this._pickNewFallbackUrl(null===(e=this._fallbackInfo)||void 0===e?void 0:e[n.endpoint],r);return!!s&&(this._updateFallbackInfoWithNewUrl(t,n,s),!0)}catch(s){return null===(r=this._errorBoundary)||void 0===r||r.logError("tryFetchUpdatedFallbackInfo",s),!1}})}_updateFallbackInfoWithNewUrl(e,t,n){var o,i,a;const s={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+r,previous:[]},c=t.endpoint,d=null===(o=this._fallbackInfo)||void 0===o?void 0:o[c];d&&s.previous.push(...d.previous),s.previous.length>10&&(s.previous=[]);const p=null===(a=null===(i=this._fallbackInfo)||void 0===i?void 0:i[c])||void 0===a?void 0:a.url;null!=p&&s.previous.push(p),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[c]:s}),l(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(n){return e(this,void 0,void 0,function*(){var e;const o=this._dnsQueryCooldowns[n.endpoint];if(o&&Date.now()<o)return null;this._dnsQueryCooldowns[n.endpoint]=Date.now()+144e5;const i=[],r=yield(0,t._fetchTxtRecords)(null!==(e=this._networkOverrideFunc)&&void 0!==e?e:fetch),a=function(e){try{return new URL(e).pathname}catch(t){return null}}(n.defaultUrl);for(const t of r){if(!t.startsWith(n.endpointDnsKey+"="))continue;const e=t.split("=");if(e.length>1){let t=e[1];t.endsWith("/")&&(t=t.slice(0,-1)),i.push(`https://${t}${a}`)}}return i})}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;const o=new Set(null!==(n=null==e?void 0:e.previous)&&void 0!==n?n:[]),i=null==e?void 0:e.url;let r=null;for(const a of t){const e=a.endsWith("/")?a.slice(0,-1):a;if(!o.has(a)&&e!==i){r=e;break}}return r}},NetworkFallbackResolver._isDomainFailure=a,NetworkFallbackResolver}var SDKFlags={},hasRequiredSDKFlags;function requireSDKFlags(){if(hasRequiredSDKFlags)return SDKFlags;hasRequiredSDKFlags=1,Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const e={};return SDKFlags.SDKFlags={setFlags:(t,n)=>{e[t]=n},get:(t,n)=>{var o,i;return null!==(i=null===(o=e[t])||void 0===o?void 0:o[n])&&void 0!==i&&i}},SDKFlags}var SessionID={},UUID={},hasRequiredUUID,hasRequiredSessionID;function requireUUID(){if(hasRequiredUUID)return UUID;return hasRequiredUUID=1,Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0,UUID.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=/* @__PURE__ */(new Date).getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let o=16*Math.random();return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),("x"===n?o:7&o|8).toString(16)})},UUID}function requireSessionID(){return hasRequiredSessionID||(hasRequiredSessionID=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=requireCacheKey(),n=requireLog$1(),o=requireStorageProvider(),i=requireUUID(),r=requireVisibilityObserving(),a=18e5,s=144e5,l={};function c(e){var t;const n=e.data,o=function({lastUpdate:e}){return Date.now()-e>a}(n)||function({startTime:e}){return Date.now()-e>s}(n);return o&&(e.data=u(),null===(t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e.sdkKey))||void 0===t||t.$emt({name:"session_expired"})),o}function d(e){return`statsig.session_id.${(0,t._getStorageKey)(e)}`}function p(e){try{(0,o._setObjectInStorage)(e.storageKey,e.data),e.lastPersistedAt=Date.now()}catch(t){n.Log.warn("Failed to save SessionID")}}function u(){return{sessionID:(0,i.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}(0,r._subscribeToVisiblityChanged)(e=>{"background"===e&&Object.values(l).forEach(e=>p(e))}),e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:(e,t=!0)=>{null==l[e]&&(l[e]=function(e){const t=d(e),n=function(e){const t=(0,o._getObjectFromStorage)(e);return t}(t);if(n&&n.sessionID&&n.startTime&&n.lastUpdate)return{data:n,sdkKey:e,lastPersistedAt:0,storageKey:t};return{data:u(),sdkKey:e,lastPersistedAt:0,storageKey:t}}(e));return function(e,t){const n=Date.now(),o=c(e);o?p(e):t&&(e.data.lastUpdate=n,function(e){const t=Date.now();t-e.lastPersistedAt>15e3&&p(e)}(e));return e}(l[e],t)},overrideInitialSessionID:(e,t)=>{const n=Date.now(),o={data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t,lastPersistedAt:Date.now(),storageKey:d(t)};p(o),l[t]=o},checkForIdleSession:e=>{const t=l[e];if(!t)return;c(t)&&p(t)}}}(SessionID)),SessionID}var StableID={},hasRequiredStableID;function requireStableID(){if(hasRequiredStableID)return StableID;hasRequiredStableID=1,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const e=requireCacheKey(),t=requireLog$1(),n=requireSafeJs(),o=requireStorageProvider(),i=requireUUID(),r={},a={},s={};function l(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}function c(e,n){const i=l(n);try{(0,o._setObjectInStorage)(i,e)}catch(r){t.Log.warn("Failed to save StableID to storage")}}function d(e,t){if(!a[t]||null==(0,n._getDocumentSafe)())return;const o=/* @__PURE__ */new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${o.toUTCString()}; path=/`}function p(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}return StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(s[e])return null;if(null!=r[e])return r[e];let t=null;return t=function(e){if(!a[e]||null==(0,n._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const n of t){const[t,o]=n.trim().split("=");if(t===p(e))return decodeURIComponent(o)}return null}(e),null!=t?(r[e]=t,c(t,e),t):(t=function(e){const t=l(e);return(0,o._getObjectFromStorage)(t)}(e),null==t&&(t=(0,i.getUUID)()),c(t,e),d(t,e),r[e]=t,t)},setOverride:(e,t)=>{r[t]=e,c(e,t),d(e,t)},_setCookiesEnabled:(e,t)=>{a[e]=t},_setDisabled:(e,t)=>{s[e]=t}},StableID.getCookieName=p,StableID}var StatsigClientEventEmitter={},hasRequiredStatsigClientEventEmitter;function requireStatsigClientEventEmitter(){return hasRequiredStatsigClientEventEmitter||(hasRequiredStatsigClientEventEmitter=1,Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"}),StatsigClientEventEmitter}var StatsigOptionsCommon={},hasRequiredStatsigOptionsCommon,hasRequiredNetworkCore,hasRequiredFlushCoordinator;function requireStatsigOptionsCommon(){return hasRequiredStatsigOptionsCommon||(hasRequiredStatsigOptionsCommon=1,Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),StatsigOptionsCommon}function requireNetworkCore(){return hasRequiredNetworkCore||(hasRequiredNetworkCore=1,function(e){var t=NetworkCore&&NetworkCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=e.RETRYABLE_CODES=void 0,require$_StatsigGlobal();const n=require$_StatsigGlobal(),o=requireDiagnostics(),i=requireLog$1(),r=requireNetworkConfig(),a=requireNetworkFallbackResolver(),s=requireSDKFlags(),l=requireSDKType(),c=requireSafeJs(),d=requireSessionID(),p=requireStableID(),u=requireStatsigClientEventEmitter(),m=requireStatsigMetadata(),h=requireStatsigOptionsCommon(),g=requireVisibilityObserving();e.RETRYABLE_CODES=/* @__PURE__ */new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new a.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e,t){if(!x(e))return t&&(t.path="beacon_invalid_sdk_key"),!1;const n=this._getInternalRequestArgs("POST",e),o=this._getPopulatedURL(n),i=navigator;try{const e=i.sendBeacon.bind(i)(o,n.body);return e||t&&(t.path="beacon_send_false"),e}catch(r){throw t&&(t.path="beacon_send_exception"),r}}post(e,n){return t(this,void 0,void 0,function*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t,n)})}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(n,a){return t(this,void 0,void 0,function*(){var s,l,d,p;if(!x(n))return a&&(a.path="network_invalid_sdk_key"),null;if(this._netConfig.preventAllNetworkTraffic)return a&&(a.path="network_prevent_all_network_traffic"),null;const{method:m,body:h,retries:f,attempt:C}=n,$=n.urlConfig.endpoint;if(this._isRateLimited($))return i.Log.warn(`Request to ${$} was blocked because you are making requests too frequently.`),a&&(a.path="network_rate_limited"),null;const b=null!=C?C:1;let v=!1;const A=this._getPopulatedURL(n),E=Date.now();let w=null;const R=(0,g._isUnloading)();try{const e={method:m,body:h,headers:Object.assign({},n.headers),priority:n.priority,keepalive:R};!function(e,t){if(e.urlConfig.endpoint!==r.Endpoint._initialize)return;o.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(n,b);const t=this._leakyBucket[$];t&&(t.lastRequestTime=Date.now(),this._leakyBucket[$]=t);const i=null!==(s=this._netConfig.networkOverrideFunc)&&void 0!==s?s:fetch;let a;if(w=yield Promise.race([i(A,e).finally(()=>clearTimeout(a)),new Promise((e,t)=>{a=setTimeout(()=>{v=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!w.ok){const e=yield w.text().catch(()=>"No Text"),t=new Error(`NetworkError: ${A} ${e}`);throw t.name="NetworkError",t}const l=yield w.text();return S(n,w,b,l),this._fallbackResolver.tryBumpExpiryTime(n.sdkKey,n.urlConfig),{body:l,code:w.status}}catch(T){const o=function(e){if("string"==typeof e)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;return"Unknown Error"}(T),r=(j=v,(null!=o?o:"").includes("Timeout")||j);S(n,w,b,"",T);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(n.sdkKey,n.urlConfig,o,r))&&(n.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(n.sdkKey,n.urlConfig)),!f||b>f||!e.RETRYABLE_CODES.has(null!==(l=null==w?void 0:w.status)&&void 0!==l?l:500)){null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:T,tag:u.ErrorTag.NetworkError,requestArgs:n});const e=`A networking error occurred during ${m} request to ${A}.`;if(i.Log.error(e,o,T),null===(p=this._errorBoundary)||void 0===p||p.attachErrorIfNoneExists(e),n.preserveFailedStatusCode&&null!=w)return{body:null,code:w.status};if(null==w&&a){a.path=r?"network_request_timed_out_no_response":"network_request_exception_no_response",o&&(a.errorMessage=o);try{const e=function(e,t,n,o){var i,r,a;const s=(0,c._getWindowSafe)(),l=null==s?void 0:s.document,d="undefined"!=typeof navigator?navigator:null,p=(0,g._isUnloading)(),u=d&&"boolean"==typeof d.onLine?String(d.onLine):"unknown",m=null!==(i=null==l?void 0:l.visibilityState)&&void 0!==i?i:"unknown",h=Object.keys(null!==(r=e.headers)&&void 0!==r?r:{}).length>0,x=function(e,t){if(!t)return!0;return!e.startsWith(`${t}/`)&&!e.startsWith(`${t}?`)&&e!==t}(t,null===(a=null==s?void 0:s.location)||void 0===a?void 0:a.origin),f=null!=e.urlConfig.customUrl,S=null!=e.fallbackUrl,C=y(o,[250,1e3,5e3,1e4]),$=y(function(e){if(null==e)return 0;if("string"==typeof e)return e.length;if(e instanceof Uint8Array)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob)return e.size;return-1}(e.body),[16384,65536,262144,1048576]);let b="unknown_no_response";n?b="timeout":"false"===u?b="browser_offline":p?b="page_unloading":"hidden"===m?b="page_hidden":x&&h?b="cross_origin_custom_headers_preflight_risk":f||S?b="custom_url_no_response":o<250&&(b="immediate_network_rejection");return{bucket:b,metadata:{elapsedMsBucket:C,bodySizeBucket:$,online:u,visibilityState:m,isUnloading:String(p),crossOrigin:String(x),hasCustomUrl:String(f)}}}(n,A,r,Date.now()-E);a.diagnosticBucket=e.bucket,a.diagnosticMetadata=e.metadata}catch(I){}}return null}return yield function(e){return t(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(b),this._sendRequest(Object.assign(Object.assign({},n),{retries:f,attempt:b+1}),a)}var j})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=h.LogEventCompressionMode.Disabled),t||(t=h.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const n=Date.now(),o=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:n},i=n-o.lastRequestTime,r=Math.floor(.05*i);return o.count=Math.max(0,o.count-r),o.count>=50||(o.count+=1,o.lastRequestTime=n,this._leakyBucket[e]=o,!1)}_getPopulatedURL(e){var t;const n=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==r.Endpoint._initialize&&e.urlConfig.endpoint!==r.Endpoint._download_config_specs||(this._lastUsedInitUrl=n);const o=Object.assign({[r.NetworkParam.SdkKey]:e.sdkKey,[r.NetworkParam.SdkType]:l.SDKType._get(e.sdkKey),[r.NetworkParam.SdkVersion]:m.SDK_VERSION,[r.NetworkParam.Time]:String(Date.now()),[r.NetworkParam.SessionID]:d.SessionID.get(e.sdkKey)},e.params),i=Object.keys(o).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(o[e])}`).join("&");return`${n}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;const o=(0,c._getWindowSafe)(),a=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof a&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==o?void 0:o.btoa))try{e.body=o.btoa(a).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.StatsigEncoded]:"1"})}catch(s){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,s)}}_tryToCompressBody(e){return t(this,void 0,void 0,function*(){var t;const o=e.body;if("string"==typeof o&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,n._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const o=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,i=!0===s.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case h.LogEventCompressionMode.Disabled:return!1;case h.LogEventCompressionMode.Enabled:return!(o&&!i);case h.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(o),a=new CompressionStream("gzip"),s=a.writable.getWriter();s.write(n).catch(i.Log.error),s.close().catch(i.Log.error);const l=a.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const p=c.reduce((e,t)=>e+t.length,0),u=new Uint8Array(p);let m=0;for(const e of c)u.set(e,m),m+=e.length;e.body=u,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.IsGzipped]:"1"})}catch(a){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,a)}})}_getInternalRequestArgs(e,t){const n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),o=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&f(o,t.data),o}};const x=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),f=(e,t)=>{const{sdkKey:n,fallbackUrl:o}=e,i=p.StableID.get(n),r=d.SessionID.get(n),a=l.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:i,sessionID:r,sdkType:a,fallbackUrl:o})}))};function y(e,t){if(e<0)return"unknown";for(const n of t)if(e<n)return`<${n}`;return`>=${t[t.length-1]}`}function S(e,t,n,i,a){e.urlConfig.endpoint===r.Endpoint._initialize&&o.Diagnostics._markInitNetworkReqEnd(e.sdkKey,o.Diagnostics._getDiagnosticsData(t,n,i,a))}}(NetworkCore)),NetworkCore}function requireFlushCoordinator(){if(hasRequiredFlushCoordinator)return FlushCoordinator;hasRequiredFlushCoordinator=1;var e=FlushCoordinator&&FlushCoordinator.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(FlushCoordinator,"__esModule",{value:!0}),FlushCoordinator.FlushCoordinator=void 0;const t=requireEventRetryConstants(),n=requireEventSender(),o=requireFlushInterval(),i=requireFlushTypes(),r=requireHashing(),a=requireLog$1(),s=requireNetworkCore(),l=requireSafeJs(),c=requireSessionID(),d=requireStatsigOptionsCommon(),p=requireStorageProvider(),u=/* @__PURE__ */new Set(["network_request_timed_out_no_response","network_request_exception_no_response","event_sender_post_returned_null","event_sender_post_returned_undefined","event_sender_post_exception"]);return FlushCoordinator.FlushCoordinator=class{constructor(e,t,i,r,a,s,l,c,d,p){this._cooldownTimer=null,this._maxIntervalTimer=null,this._hasRunQuickFlush=!1,this._currentFlushPromise=null,this._creationTime=Date.now(),this._isShuttingDown=!1,this._storageKey=null,this._flushInterval=new o.FlushInterval,this._batchQueue=e,this._pendingEvents=t,this._onPrepareFlush=i,this._errorBoundary=p,this._sdkKey=r,this._loggingEnabled=d,this._eventSender=new n.EventSender(r,a,s,l,c)}setLoggingEnabled(e){this._loggingEnabled=e}setLogEventCompressionMode(e){this._eventSender.setLogEventCompressionMode(e)}startScheduledFlushCycle(){this._scheduleNextFlush()}stopScheduledFlushCycle(){this._clearAllTimers()}addEvent(e){this._pendingEvents.addToPendingEventsQueue(e),this._currentFlushPromise||this._pendingEvents.hasEventsForFullBatch()&&this.processLimitFlush()}processManualFlush(){return e(this,void 0,void 0,function*(){return this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Manual).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}),this._currentFlushPromise})}processShutdown(){return e(this,void 0,void 0,function*(){return this._isShuttingDown=!0,this._clearAllTimers(),this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Shutdown).catch(e=>{a.Log.error(`Error during shutdown flush: ${e}`)}).finally(()=>{this._currentFlushPromise=null}),this._currentFlushPromise})}_executeFlush(t){return e(this,void 0,void 0,function*(){this._clearAllTimers();try{this._prepareQueueForFlush(t);const e=this._batchQueue.takeAllBatches();if(0===e.length)return;yield Promise.all(e.map(e=>this._processOneBatch(e,t)))}finally{this._isShuttingDown||this._scheduleNextFlush()}})}checkQuickFlush(){this._hasRunQuickFlush||Date.now()-this._creationTime>t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS||(this._hasRunQuickFlush=!0,setTimeout(()=>{this.processManualFlush().catch(e=>{a.Log.warn("Quick flush failed:",e)})},t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS))}_attemptScheduledFlush(){if(this._currentFlushPromise)return void this._scheduleNextFlush();const e=this.containsAtLeastOneFullBatch(),t=this._flushInterval.hasReachedMaxInterval();if(!e&&!t)return void this._scheduleNoopPollTick();let n;this._flushInterval.markFlushAttempt(),n=e?i.FlushType.ScheduledFullBatch:i.FlushType.ScheduledMaxTime,this._currentFlushPromise=this._processNextBatch(n).then(()=>{}).catch(e=>{a.Log.error("Error during scheduled flush:",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})}processLimitFlush(){this._flushInterval.hasCompletelyRecoveredFromBackoff()&&(this._currentFlushPromise||(this._currentFlushPromise=this._processLimitFlushInternal().catch(e=>{a.Log.error("Error during limit flush",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})))}_processLimitFlushInternal(){return e(this,void 0,void 0,function*(){if(yield this._processNextBatch(i.FlushType.Limit))for(;this._flushInterval.hasCompletelyRecoveredFromBackoff()&&this.containsAtLeastOneFullBatch();){if(!(yield this._processNextBatch(i.FlushType.Limit)))break}})}_scheduleNextFlush(){if(this._clearAllTimers(),this._isShuttingDown)return;const e=Math.max(0,this._flushInterval.getTimeUntilNextFlush());this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e);const t=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t)}_clearAllTimers(){null!==this._cooldownTimer&&(clearTimeout(this._cooldownTimer),this._cooldownTimer=null),null!==this._maxIntervalTimer&&(clearTimeout(this._maxIntervalTimer),this._maxIntervalTimer=null)}_scheduleNoopPollTick(){if(this._clearAllTimers(),this._isShuttingDown)return;this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t.EventRetryConstants.TICK_INTERVAL_MS);const e=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e)}_processNextBatch(t){return e(this,void 0,void 0,function*(){this._prepareQueueForFlush(t);const e=this._batchQueue.takeNextBatch();return!!e&&this._processOneBatch(e,t)})}_processOneBatch(t,n){return e(this,void 0,void 0,function*(){if(this._loggingEnabled!==d.LoggingEnabledOption.always&&(0,l._isServerEnv)())return this._flushInterval.adjustForSuccess(),!0;const e=yield this._eventSender.sendBatch(t);return e.success?(this._flushInterval.adjustForSuccess(),!0):(this._flushInterval.adjustForFailure(),this._handleFailure(t,n,e.statusCode,e.failurePath,e.failureErrorMessage,e.failureDiagnosticBucket,e.failureDiagnosticMetadata),!1)})}_prepareQueueForFlush(e){this._onPrepareFlush();const n=this.convertPendingEventsToBatches();n>0&&(a.Log.warn(`Dropped ${n} events`),this._errorBoundary.logDroppedEvents(n,"Batch queue limit reached during batching",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:e,retries:"dropped before batching"}))}containsAtLeastOneFullBatch(){return this._pendingEvents.hasEventsForFullBatch()||this._batchQueue.hasFullBatch()}convertPendingEventsToBatches(){if(this._pendingEvents.isEmpty())return 0;const e=this._pendingEvents.takeAll();return this._batchQueue.createBatches(e)}_isRetryableBatch(e,t){return!!s.RETRYABLE_CODES.has(e)||!(-1!==e||!t||!u.has(t))}_handleFailure(e,n,o,r,s,l,c){if(n===i.FlushType.Shutdown)return a.Log.warn(`${n} flush failed during shutdown. ${e.events.length} event(s) will be saved to storage for retry in next session.`),void this._saveShutdownFailedEventsToStorage(e.events);if(!this._isRetryableBatch(o,r)){const t="non-retryable error";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped. Non-retryable error: ${o}`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}if(e.attempts>=t.EventRetryConstants.MAX_RETRY_ATTEMPTS){const t="max retry attempts exceeded";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped.`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}e.incrementAttempts();const d=this._batchQueue.requeueBatch(e);d>0&&(a.Log.warn(`Failed to requeue batch : dropped ${d} events due to full queue`),this._errorBoundary.logDroppedEvents(d,"Batch queue limit reached during requeue",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:n,retries:e.attempts}))}loadAndRetryShutdownFailedEvents(){return e(this,void 0,void 0,function*(){const e=this._getStorageKey();try{p.Storage.isReady()||(yield p.Storage.isReadyResolver());const t=this._getShutdownFailedEventsFromStorage(e);if(0===t.length)return;a.Log.debug(`Loading ${t.length} failed shutdown event(s) from storage for retry`),p.Storage.removeItem(e),t.forEach(e=>{this.addEvent(e)}),yield this.processManualFlush()}catch(t){a.Log.warn("Failed to load and retry failed shutdown events:",t)}})}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.failed_shutdown_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_saveShutdownFailedEventsToStorage(e){const n=this._getStorageKey();try{let o=[...this._getShutdownFailedEventsFromStorage(n),...e];o.length>t.EventRetryConstants.MAX_LOCAL_STORAGE&&(o=o.slice(-t.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,p._setObjectInStorage)(n,o),a.Log.debug(`Saved ${e.length} failed shutdown event(s) to storage (total stored: ${o.length})`)}catch(o){a.Log.warn("Unable to save failed shutdown events to storage:",o)}}_getShutdownFailedEventsFromStorage(e){try{const t=(0,p._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}},FlushCoordinator}var PendingEvents={},hasRequiredPendingEvents;function requirePendingEvents(){if(hasRequiredPendingEvents)return PendingEvents;hasRequiredPendingEvents=1,Object.defineProperty(PendingEvents,"__esModule",{value:!0}),PendingEvents.PendingEvents=void 0;const e=requireLog$1();return PendingEvents.PendingEvents=class{constructor(e){this._pendingEvents=[],this._batchSize=e}addToPendingEventsQueue(t){this._pendingEvents.push(t),e.Log.debug("Enqueued Event:",t)}hasEventsForFullBatch(){return this._pendingEvents.length>=this._batchSize}takeAll(){const e=this._pendingEvents;return this._pendingEvents=[],e}isEmpty(){return 0===this._pendingEvents.length}},PendingEvents}var StatsigEvent={},hasRequiredStatsigEvent;function requireStatsigEvent(){if(hasRequiredStatsigEvent)return StatsigEvent;hasRequiredStatsigEvent=1,Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",n="statsig::layer_exposure",o=(e,t,n,o,i)=>(n.bootstrapMetadata&&(o.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:r(n,o),secondaryExposures:i,time:Date.now()});StatsigEvent._isExposureEvent=({eventName:o})=>o===t||o===e||o===n;function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}StatsigEvent._createGateExposure=(e,n,r)=>{var a,s,l;const c={gate:n.name,gateValue:String(n.value),ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(c.configVersion=n.__evaluation.version),o(t,e,n.details,c,i(null!==(l=null===(s=n.__evaluation)||void 0===s?void 0:s.secondary_exposures)&&void 0!==l?l:[],r))},StatsigEvent._mapExposures=i;StatsigEvent._createConfigExposure=(t,n,r)=>{var a,s,l,c;const d={config:n.name,ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(d.configVersion=n.__evaluation.version),null!=(null===(s=n.__evaluation)||void 0===s?void 0:s.passed)&&(d.rulePassed=String(n.__evaluation.passed)),o(e,t,n.details,d,i(null!==(c=null===(l=n.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],r))};StatsigEvent._createLayerParameterExposure=(e,t,r,a)=>{var s,l,c,d,p,u,m;const h=t.__evaluation,g=!0===(null===(s=null==h?void 0:h.explicit_parameters)||void 0===s?void 0:s.includes(r));let x="",f=null!==(l=null==h?void 0:h.undelegated_secondary_exposures)&&void 0!==l?l:[];g&&(x=null!==(c=h.allocated_experiment_name)&&void 0!==c?c:"",f=null!==(d=h.secondary_exposures)&&void 0!==d?d:[]);const y=null===(p=t.__evaluation)||void 0===p?void 0:p.parameter_rule_ids,S={config:t.name,parameterName:r,ruleID:null!==(u=null==y?void 0:y[r])&&void 0!==u?u:t.ruleID,allocatedExperiment:x,isExplicitParameter:String(g)};return null!=(null===(m=t.__evaluation)||void 0===m?void 0:m.version)&&(S.configVersion=t.__evaluation.version),o(n,e,t.details,S,i(f,a))};const r=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t);return StatsigEvent}var UrlConfiguration={},hasRequiredUrlConfiguration,hasRequiredEventLogger;function requireUrlConfiguration(){if(hasRequiredUrlConfiguration)return UrlConfiguration;hasRequiredUrlConfiguration=1,Object.defineProperty(UrlConfiguration,"__esModule",{value:!0}),UrlConfiguration.UrlConfiguration=void 0;const e=requireHashing(),t=requireNetworkConfig(),n={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};return UrlConfiguration.UrlConfiguration=class{constructor(e,o,i,r){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=n[e],o&&(this.customUrl=o),!o&&i&&(this.customUrl=i.endsWith("/")?`${i}${e}`:`${i}/${e}`),r&&(this.fallbackUrls=r);const a=t.NetworkDefault[e];this.defaultUrl=`${a}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var t;const n=(null!==(t=this.fallbackUrls)&&void 0!==t?t:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+n)}},UrlConfiguration}function requireEventLogger(){if(hasRequiredEventLogger)return EventLogger;hasRequiredEventLogger=1;var e=EventLogger&&EventLogger.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventLogger,"__esModule",{value:!0}),EventLogger.EventLogger=void 0;const t=requireBatchedEventsQueue(),n=requireCacheKey(),o=requireEventRetryConstants(),i=requireFlushCoordinator(),r=requireHashing(),a=requireLog$1(),s=requireNetworkConfig(),l=requirePendingEvents(),c=requireSafeJs(),d=requireStatsigEvent(),p=requireStatsigOptionsCommon(),u=requireStorageProvider(),m=requireUrlConfiguration(),h=requireVisibilityObserving(),g={};return EventLogger.EventLogger=class x{static _safeFlushAndForget(e){var t;null===(t=g[e])||void 0===t||t.flush().catch(()=>{})}constructor(e,t,n,o,i){var r;this._sdkKey=e,this._emitter=t,this._network=n,this._options=o,this._errorBoundary=i,this._pendingEvents=null,this._batchQueue=null,this._flushCoordinator=null,this._lastExposureTimeMap={},this._nonExposedChecks={},this._isShuttingDown=!1,this._storageKey=null,this._pendingCompressionMode=null,this._loggingEnabled=null!==(r=null==o?void 0:o.loggingEnabled)&&void 0!==r?r:!0===(null==o?void 0:o.disableLogging)?p.LoggingEnabledOption.disabled:p.LoggingEnabledOption.browserOnly,(null==o?void 0:o.loggingEnabled)&&void 0!==o.disableLogging&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.");const l=null==o?void 0:o.networkConfig;this._logEventUrlConfig=new m.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._flushCoordinator?this._flushCoordinator.setLogEventCompressionMode(e):this._pendingCompressionMode=e}setLoggingEnabled(e){const t="disabled"===this._loggingEnabled,n="disabled"!==e;if(this._loggingEnabled=e,this._flushCoordinator&&this._flushCoordinator.setLoggingEnabled(e),t&&n){const e=this._loadStoredEvents();a.Log.debug(`Loaded ${e.length} stored event(s) from storage`),e.length>0&&(e.forEach(e=>{this._initFlushCoordinator().addEvent(e)}),this.flush().catch(e=>{a.Log.warn("Failed to flush events after enabling logging:",e)}))}}enqueue(e){var t;if(!this._shouldLogEvent(e))return;const n=this._normalizeEvent(e);"disabled"!==this._loggingEnabled?(this._initFlushCoordinator().addEvent(n),null===(t=this._flushCoordinator)||void 0===t||t.checkQuickFlush()):this._storeEventToStorage(n)}incrementNonExposureCount(e){var t;const n=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=n+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;const t=(0,c._isServerEnv)();if(t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled))return;const n=this._initFlushCoordinator();g[this._sdkKey]=this,t||(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?x._safeFlushAndForget(this._sdkKey):"foreground"===e&&n.startScheduledFlushCycle()}),n.loadAndRetryShutdownFailedEvents().catch(e=>{a.Log.warn("Failed to load failed shutdown events:",e)}),n.startScheduledFlushCycle()}stop(){return e(this,void 0,void 0,function*(){this._isShuttingDown=!0,this._flushCoordinator&&(yield this._flushCoordinator.processShutdown()),delete g[this._sdkKey],this._flushCoordinator=null,this._pendingEvents=null,this._batchQueue=null})}flush(){return e(this,void 0,void 0,function*(){if(this._flushCoordinator)return this._flushCoordinator.processManualFlush()})}appendAndResetNonExposedChecks(){if(0===Object.keys(this._nonExposedChecks).length)return;const e=Object.assign({},this._nonExposedChecks);this._nonExposedChecks={};const t=this._normalizeEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:e}});this._flushCoordinator&&this._flushCoordinator.addEvent(t)}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,c._isServerEnv)())return!1;if(!(0,d._isExposureEvent)(e))return!0;const o=e.user?e.user:{statsigEnvironment:void 0},i=(0,n._getUserStorageKey)(this._sdkKey,o),r=e.metadata?e.metadata:{},a=[e.eventName,i,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),s=this._lastExposureTimeMap[a],l=Date.now();return!(s&&l-s<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=l,!0)}_getCurrentPageUrl(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,c._getCurrentPageUrlSafe)()}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.pending_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_initFlushCoordinator(){var e,n;if(this._flushCoordinator)return this._flushCoordinator;const r=null!==(n=null===(e=this._options)||void 0===e?void 0:e.loggingBufferMaxSize)&&void 0!==n?n:o.EventRetryConstants.DEFAULT_BATCH_SIZE;return this._pendingEvents=new l.PendingEvents(r),this._batchQueue=new t.BatchQueue(r),this._flushCoordinator=new i.FlushCoordinator(this._batchQueue,this._pendingEvents,()=>this.appendAndResetNonExposedChecks(),this._sdkKey,this._network,this._emitter,this._logEventUrlConfig,this._options,this._loggingEnabled,this._errorBoundary),this._pendingCompressionMode&&(this._flushCoordinator.setLogEventCompressionMode(this._pendingCompressionMode),this._pendingCompressionMode=null),this._flushCoordinator}_storeEventToStorage(e){const t=this._getStorageKey();try{let n=this._getEventsFromStorage(t);n.push(e),n.length>o.EventRetryConstants.MAX_LOCAL_STORAGE&&(n=n.slice(-o.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,u._setObjectInStorage)(t,n)}catch(n){a.Log.warn("Unable to save events to storage")}}_getEventsFromStorage(e){try{const t=(0,u._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}_loadStoredEvents(){const e=this._getStorageKey(),t=this._getEventsFromStorage(e);return t.length>0&&u.Storage.removeItem(e),t}_normalizeEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},n=this._getCurrentPageUrl();return n&&(t.statsigMetadata={currentPage:n}),Object.assign(Object.assign({},e),t)}},EventLogger}var ClientInterfaces={},hasRequiredClientInterfaces;function requireClientInterfaces(){if(hasRequiredClientInterfaces)return ClientInterfaces;hasRequiredClientInterfaces=1,Object.defineProperty(ClientInterfaces,"__esModule",{value:!0}),ClientInterfaces.PrecomputedEvaluationsContextHandle=void 0;const e=requireLog$1(),t=requireSafeJs(),n=requireSessionID(),o=requireStableID();return ClientInterfaces.PrecomputedEvaluationsContextHandle=class{constructor(e,t,n,o,i,r){this._sdkKey=e,this._getOptions=t,this._getErrorBoundary=n,this._getValues=o,this._getUser=i,this._getSdkInstanceID=r}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let n=(0,t._cloneObject)("StatsigUser",this._getUser());return null==n&&(e.Log.error("Failed to clone user"),n={}),n}getSession(e=!0){return n.StatsigSession.get(this._sdkKey,e)}get stableID(){return o.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(e=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(e),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}},ClientInterfaces}var DataAdapterCore={},StatsigUser={},hasRequiredStatsigUser;function requireStatsigUser(){if(hasRequiredStatsigUser)return StatsigUser;hasRequiredStatsigUser=1,Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getUnitIDFromUser=StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const e=requireHashing(),t=requireLog$1(),n=requireSafeJs();return StatsigUser._normalizeUser=function(e,o,i){const r=(0,n._cloneObject)("StatsigUser",e);return null==r?(t.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(null!=o&&null!=o.environment?r.statsigEnvironment=o.environment:null!=i&&(r.statsigEnvironment={tier:i}),r)},StatsigUser._getFullUserHash=function(t){return t?(0,e._DJB2Object)(t):null},StatsigUser._getUnitIDFromUser=function(e,t){var n,o,i;if("string"!=typeof t)return e.userID;const r=t.toLowerCase();return"userid"!==r?null!==(o=null===(n=e.customIDs)||void 0===n?void 0:n[t])&&void 0!==o?o:null===(i=e.customIDs)||void 0===i?void 0:i[r]:e.userID},StatsigUser}var TypedJsonParse={},hasRequiredTypedJsonParse,hasRequiredDataAdapterCore;function requireTypedJsonParse(){if(hasRequiredTypedJsonParse)return TypedJsonParse;hasRequiredTypedJsonParse=1,Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const e=requireLog$1();return TypedJsonParse._typedJsonParse=function(t,n,o){try{const e=JSON.parse(t);if(e&&"object"==typeof e&&n in e)return e}catch(i){}return e.Log.error(`Failed to parse ${o}`),null},TypedJsonParse}function requireDataAdapterCore(){if(hasRequiredDataAdapterCore)return DataAdapterCore;hasRequiredDataAdapterCore=1;var e=DataAdapterCore&&DataAdapterCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DataAdapterCore,"__esModule",{value:!0}),DataAdapterCore._makeDataAdapterResult=DataAdapterCore.DataAdapterCore=void 0;const t=requireLog$1(),n=requireStableID(),o=requireStatsigUser(),i=requireStorageProvider(),r=requireTypedJsonParse();function a(e,t,n,i){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,o._getFullUserHash)(i)}}DataAdapterCore.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new s}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,o._normalizeUser)(e,this._options),n=this._getCacheKey(t),i=this._inMemoryCache.get(n,t);if(i&&this._getIsCacheValueValid(i))return i;const r=this._loadFromCache(n);return r&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(n,r,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){const n=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(n);this._inMemoryCache.add(i,a("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===n.StableID.get(this._getSdkKey())}_getDataAsyncImpl(n,o,r){return e(this,void 0,void 0,function*(){i.Storage.isReady()||(yield i.Storage.isReadyResolver());const e=null!=n?n:this.getDataSync(o),a=[this._fetchAndPrepFromNetwork(e,o,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(t,n){return e(this,void 0,void 0,function*(){const e=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(e),r=yield this._getDataAsyncImpl(null,e,n);r&&this._inMemoryCache.add(i,Object.assign(Object.assign({},r),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(o,i,s){return e(this,void 0,void 0,function*(){var e;const l=null!==(e=null==o?void 0:o.data)&&void 0!==e?e:null,c=null!=o&&this._isCachedResultValidFor204(o,i),d=yield this._fetchFromNetwork(l,i,s,c);if(!d)return t.Log.debug("No response returned for latest value"),null;const p=(0,r._typedJsonParse)(d,"has_updates","Response"),u=this._getSdkKey(),m=n.StableID.get(u);let h=null;if(!0===(null==p?void 0:p.has_updates))h=a("Network",d,m,i);else{if(!l||!1!==(null==p?void 0:p.has_updates))return null;h=a("NetworkNotModified",l,m,i)}const g=this._getCacheKey(i);return this._inMemoryCache.add(g,h,this._cacheLimit),this._writeToCache(g,h),h})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;const n=null===(t=i.Storage.getItem)||void 0===t?void 0:t.call(i.Storage,e);if(null==n)return null;const o=(0,r._typedJsonParse)(n,"source","Cached Result");return o?Object.assign(Object.assign({},o),{source:"Cache"}):null}_writeToCache(e,t){const n=JSON.stringify(t);for(let r=0;r<8;r++)try{i.Storage.setItem(e,n);break}catch(o){if(!(o instanceof Error)||!o.toString().includes("QuotaExceededError")&&!o.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw o;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var n;const o=null!==(n=(0,i._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==n?n:{};o[e]=Date.now();const r=l(o,t);for(const a of r)delete o[a],i.Storage.removeItem(a);(0,i._setObjectInStorage)(this._lastModifiedStoreKey,o)}},DataAdapterCore._makeDataAdapterResult=a;class s{constructor(){this._data={}}get(e,n){var o;const i=this._data[e],r=null==i?void 0:i.stableID,a=null===(o=null==n?void 0:n.customIDs)||void 0===o?void 0:o.stableID;return a&&r&&a!==r?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):i}add(e,t,n){const o=l(this._data,n-1);for(const i of o)delete this._data[i];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function l(e,t){const n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort((t,n)=>{const o=e[t],i=e[n];return"object"==typeof o&&"object"==typeof i?o.receivedAt-i.receivedAt:o-i}).slice(0,n.length-t)}return DataAdapterCore}var DownloadConfigSpecsResponse={},hasRequiredDownloadConfigSpecsResponse;function requireDownloadConfigSpecsResponse(){return hasRequiredDownloadConfigSpecsResponse||(hasRequiredDownloadConfigSpecsResponse=1,Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0})),DownloadConfigSpecsResponse}var ErrorBoundary={},hasRequiredErrorBoundary;function requireErrorBoundary(){return hasRequiredErrorBoundary||(hasRequiredErrorBoundary=1,function(e){var t=ErrorBoundary&&ErrorBoundary.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const n=requireLog$1(),o=requireSDKType(),i=requireStatsigMetadata();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const r="[Statsig] UnknownError";function a(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function s(e){if(!e)return{};const t={};return Object.keys(e).forEach(n=>{const o=n,i=e[o];switch(typeof i){case"number":case"bigint":case"boolean":t[String(o)]=i;break;case"string":i.length<50?t[String(o)]=i:t[String(o)]="set";break;case"object":"environment"===o?t.environment=i:"networkConfig"===o?t.networkConfig=i:t[String(o)]=null!=i?"set":"unset"}}),t}e.ErrorBoundary=class{constructor(e,t,n,o){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=o,this._seen=/* @__PURE__ */new Set}wrap(e,t){try{const n=e;(function(e){const t=/* @__PURE__ */new Set;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(e=>"function"==typeof(null==n?void 0:n[e])).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)})(n).forEach(o=>{const i=n[o];"$EB"in i||(n[o]=(...n)=>this._capture(t?`${t}:${o}`:o,()=>i.apply(e,n)),n[o].$EB=!0)})}catch(n){this._onError("eb:wrap",n)}}logError(e,t){this._onError(e,t)}logDroppedEvents(e,t,n){const o={eventCount:String(e),reason:t};n&&Object.keys(n).forEach(e=>{o[e]=String(n[e])}),this._onError("statsig::log_event_dropped_event_count",new Error(t),!0,o)}logEventRequestFailure(e,t,n,o,i,r,a,s,l){const c={eventCount:String(e),flushType:n,statusCode:String(o),reason:t,retries:String(i)};r&&(c.failurePath=r),"string"==typeof a&&a.length>0&&(c.failureErrorMessage=a),"string"==typeof s&&s.length>0&&(c.failureDiagnosticBucket=s),l&&Object.keys(l).forEach(e=>{const t=l[e];t.length>0&&(c[`failureDiagnostic_${e}`]=t)}),this._onError("statsig::log_event_failed",new Error(t),!0,c)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=a(e))}_capture(e,t){try{const n=t();return n&&n instanceof Promise?n.catch(t=>this._onError(e,t)):n}catch(n){return this._onError(e,n),null}}_onError(l,c,d=!1,p){try{n.Log.warn(`Caught error in ${l}`,{error:c});(()=>t(this,void 0,void 0,function*(){var t,n,u,m,h,g,x;const f=c||Error(r),y=f instanceof Error,S=y?f.name:"No Name",C=a(f);if(this._lastSeenError=C,!d&&this._seen.has(S))return;if(this._seen.add(S),null===(n=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===n?void 0:n.preventAllNetworkTraffic)return void(null===(u=this._emitter)||void 0===u||u.call(this,{name:"error",error:c,tag:l}));const $=o.SDKType._get(this._sdkKey),b=i.StatsigMetadataProvider.get(),v=y?f.stack:function(e){try{return JSON.stringify(e)}catch(t){return r}}(f),A=Object.assign(Object.assign({tag:l,exception:S,info:v,statsigOptions:s(this._options)},Object.assign(Object.assign({},b),{sdkType:$})),null!=p?p:{}),E=null===(m=this._options)||void 0===m?void 0:m.networkConfig,w=null!==(h=null==E?void 0:E.networkOverrideFunc)&&void 0!==h?h:fetch;yield w(null!==(g=null==E?void 0:E.sdkExceptionUrl)&&void 0!==g?g:e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($),"STATSIG-SDK-VERSION":String(b.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(A)}),null===(x=this._emitter)||void 0===x||x.call(this,{name:"error",error:c,tag:l})}))().then(()=>{}).catch(()=>{})}catch(u){}}}}(ErrorBoundary)),ErrorBoundary}var EvaluationOptions={},hasRequiredEvaluationOptions;function requireEvaluationOptions(){return hasRequiredEvaluationOptions||(hasRequiredEvaluationOptions=1,Object.defineProperty(EvaluationOptions,"__esModule",{value:!0})),EvaluationOptions}var EvaluationTypes={},hasRequiredEvaluationTypes;function requireEvaluationTypes(){return hasRequiredEvaluationTypes||(hasRequiredEvaluationTypes=1,Object.defineProperty(EvaluationTypes,"__esModule",{value:!0})),EvaluationTypes}var InitializeResponse={},hasRequiredInitializeResponse;function requireInitializeResponse(){return hasRequiredInitializeResponse||(hasRequiredInitializeResponse=1,Object.defineProperty(InitializeResponse,"__esModule",{value:!0})),InitializeResponse}var MemoKey={},hasRequiredMemoKey;function requireMemoKey(){if(hasRequiredMemoKey)return MemoKey;hasRequiredMemoKey=1,Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=/* @__PURE__ */new Set([]),t=/* @__PURE__ */new Set(["userPersistedValues"]);return MemoKey.createMemoKey=function(n,o,i){let r=`${n}|${o}`;if(!i)return r;for(const a of Object.keys(i)){if(t.has(a))return;e.has(a)?r+=`|${a}=true`:r+=`|${a}=${i[a]}`}return r},MemoKey}var OverrideAdapter={},hasRequiredOverrideAdapter;function requireOverrideAdapter(){return hasRequiredOverrideAdapter||(hasRequiredOverrideAdapter=1,Object.defineProperty(OverrideAdapter,"__esModule",{value:!0})),OverrideAdapter}var ParamStoreTypes={},hasRequiredParamStoreTypes;function requireParamStoreTypes(){return hasRequiredParamStoreTypes||(hasRequiredParamStoreTypes=1,Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0})),ParamStoreTypes}var SizeOf={},hasRequiredSizeOf;function requireSizeOf(){return hasRequiredSizeOf||(hasRequiredSizeOf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;e._fastApproxSizeOf=(t,n)=>{let o=0;const i=Object.keys(t);for(let r=0;r<i.length;r++){const a=i[r],s=t[a];if(o+=a.length,o+="object"==typeof s&&null!==s?(0,e._fastApproxSizeOf)(s,n)+2:String(s).length+1,o>=n)return o}return o}}(SizeOf)),SizeOf}var StatsigClientBase={},hasRequiredStatsigClientBase;function requireStatsigClientBase(){if(hasRequiredStatsigClientBase)return StatsigClientBase;hasRequiredStatsigClientBase=1;var e=StatsigClientBase&&StatsigClientBase.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClientBase,"__esModule",{value:!0}),StatsigClientBase.StatsigClientBase=void 0,require$_StatsigGlobal();const t=require$_StatsigGlobal(),n=requireErrorBoundary(),o=requireEventLogger(),i=requireLog$1(),r=requireMemoKey(),a=requireSafeJs(),s=requireSessionID(),l=requireStableID(),c=requireStatsigOptionsCommon(),d=requireStorageProvider();return StatsigClientBase.StatsigClientBase=class{constructor(e,r,c,p){var u,m,h,g;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const x=this.$emt.bind(this);null!=(null==p?void 0:p.logLevel)&&(i.Log.level=p.logLevel),(null==p?void 0:p.disableStorage)&&d.Storage._setDisabled(!0),(null==p?void 0:p.initialSessionID)&&s.StatsigSession.overrideInitialSessionID(p.initialSessionID,e),(null==p?void 0:p.storageProvider)&&d.Storage._setProvider(p.storageProvider),(null==p?void 0:p.enableCookies)&&l.StableID._setCookiesEnabled(e,p.enableCookies),(null==p?void 0:p.disableStableID)&&l.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=p?p:{},this._memoCache={},this.overrideAdapter=null!==(u=null==p?void 0:p.overrideAdapter)&&void 0!==u?u:null,this._errorBoundary=new n.ErrorBoundary(e,p,x),this._logger=new o.EventLogger(e,x,c,p,this._errorBoundary),this._errorBoundary.wrap(this),this._errorBoundary.wrap(r),this._errorBoundary.wrap(this._logger),c.setErrorBoundary(this._errorBoundary),this.dataAdapter=r,this.dataAdapter.attach(e,p,c),this.storageProvider=d.Storage,null===(g=null===(h=null===(m=this.overrideAdapter)||void 0===m?void 0:m.loadFromStorage)||void 0===h?void 0:h.call(m))||void 0===g||g.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,n){var o;if((0,a._isServerEnv)())return;const r=(0,t._getStatsigGlobal)(),s=null!==(o=r.instances)&&void 0!==o?o:{},l=n;null!=s[e]&&i.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");s[e]=l,r.firstInstance||(r.firstInstance=l);r.instances=s,__STATSIG__=r}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,d.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;const n=t=>{try{t(e)}catch(n){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,n);i.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>n(e)),null===(t=this._listeners["*"])||void 0===t||t.forEach(n)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,n){!0!==(null==n?void 0:n.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(n,o)=>{if(this._options.disableEvaluationMemoization)return t(n,o);const i=(0,r.createMemoKey)(e,n,o);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(n,o)),this._memoCache[i]):t(n,o)}}},StatsigClientBase}var StatsigDataAdapter={},hasRequiredStatsigDataAdapter;function requireStatsigDataAdapter(){return hasRequiredStatsigDataAdapter||(hasRequiredStatsigDataAdapter=1,Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached"),StatsigDataAdapter}var StatsigPlugin={},hasRequiredStatsigPlugin;function requireStatsigPlugin(){return hasRequiredStatsigPlugin||(hasRequiredStatsigPlugin=1,Object.defineProperty(StatsigPlugin,"__esModule",{value:!0})),StatsigPlugin}var StatsigTypeFactories={},hasRequiredStatsigTypeFactories;function requireStatsigTypeFactories(){if(hasRequiredStatsigTypeFactories)return StatsigTypeFactories;hasRequiredStatsigTypeFactories=1,Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const e=requireLog$1(),t=requireTypingUtils();function n(e,t,n,o){var i;return{name:e,details:t,ruleID:null!==(i=null==n?void 0:n.rule_id)&&void 0!==i?i:"",__evaluation:n,value:o}}function o(e,t,o){var r,a;const s=null!==(r=null==o?void 0:o.value)&&void 0!==r?r:{};return Object.assign(Object.assign({},n(e,t,o,s)),{idType:null!==(a=null==o?void 0:o.id_type)&&void 0!==a?a:null,get:i(e,null==o?void 0:o.value)})}function i(n,o,i){return(r,a)=>{var s;const l=null!==(s=null==o?void 0:o[r])&&void 0!==s?s:null;return null==l?null!=a?a:null:null==a||(0,t._isTypeMatch)(l,a)?(null==i||i(r),l):(e.Log.warn(`Parameter type mismatch. '${n}.${r}' was found to be type '${typeof l}' but fallback/return type is '${typeof a}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=a?a:null)}}return StatsigTypeFactories._makeFeatureGate=function(e,t,o){var i;return Object.assign(Object.assign({},n(e,t,o,!0===(null==o?void 0:o.value))),{idType:null!==(i=null==o?void 0:o.id_type)&&void 0!==i?i:null})},StatsigTypeFactories._makeDynamicConfig=o,StatsigTypeFactories._makeExperiment=function(e,t,n){var i;const r=o(e,t,n);return Object.assign(Object.assign({},r),{groupName:null!==(i=null==n?void 0:n.group_name)&&void 0!==i?i:null})},StatsigTypeFactories._makeLayer=function(e,t,o,r){var a,s;return Object.assign(Object.assign({},n(e,t,o,void 0)),{get:i(e,null==o?void 0:o.value,r),groupName:null!==(a=null==o?void 0:o.group_name)&&void 0!==a?a:null,__value:null!==(s=null==o?void 0:o.value)&&void 0!==s?s:{}})},StatsigTypeFactories._mergeOverride=function(e,t,n,o){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,n,o)})},StatsigTypeFactories._makeTypedGet=i,StatsigTypeFactories}var StatsigTypes={},hasRequiredStatsigTypes;function requireStatsigTypes(){return hasRequiredStatsigTypes||(hasRequiredStatsigTypes=1,Object.defineProperty(StatsigTypes,"__esModule",{value:!0})),StatsigTypes}var StatsigUpdateDetails={},hasRequiredStatsigUpdateDetails,hasRequiredSrc$2;function requireStatsigUpdateDetails(){if(hasRequiredStatsigUpdateDetails)return StatsigUpdateDetails;hasRequiredStatsigUpdateDetails=1,Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;return StatsigUpdateDetails.createUpdateDetails=(e,t,n,o,i,r)=>({duration:n,source:t,success:e,error:o,sourceUrl:i,warnings:r}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},StatsigUpdateDetails}function requireSrc$2(){return hasRequiredSrc$2||(hasRequiredSrc$2=1,function(e){var t=src$1&&src$1.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$1&&src$1.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,require$_StatsigGlobal();const o=require$_StatsigGlobal(),i=requireDiagnostics();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});const r=requireEventLogger();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return r.EventLogger}});const a=requireLog$1();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return a.Log}});const s=requireStatsigMetadata(),l=requireStorageProvider();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),n(require$_StatsigGlobal(),e),n(requireCacheKey(),e),n(requireClientInterfaces(),e),n(requireDataAdapterCore(),e),n(requireDiagnostics(),e),n(requireDownloadConfigSpecsResponse(),e),n(requireErrorBoundary(),e),n(requireEvaluationOptions(),e),n(requireEvaluationTypes(),e),n(requireHashing(),e),n(requireInitializeResponse(),e),n(requireLog$1(),e),n(requireMemoKey(),e),n(requireNetworkConfig(),e),n(requireNetworkCore(),e),n(requireOverrideAdapter(),e),n(requireParamStoreTypes(),e),n(requireSafeJs(),e),n(requireSDKType(),e),n(requireSessionID(),e),n(requireSizeOf(),e),n(requireStableID(),e),n(requireStatsigClientBase(),e),n(requireStatsigClientEventEmitter(),e),n(requireStatsigDataAdapter(),e),n(requireStatsigEvent(),e),n(requireStatsigMetadata(),e),n(requireStatsigOptionsCommon(),e),n(requireStatsigPlugin(),e),n(requireStatsigTypeFactories(),e),n(requireStatsigTypes(),e),n(requireStatsigUser(),e),n(requireStorageProvider(),e),n(requireTypedJsonParse(),e),n(requireTypingUtils(),e),n(requireUrlConfiguration(),e),n(requireUUID(),e),n(requireVisibilityObserving(),e),n(requireStatsigUpdateDetails(),e),n(requireSDKFlags(),e),Object.assign((0,o._getStatsigGlobal)(),{Log:a.Log,SDK_VERSION:s.SDK_VERSION})}(src$1)),src$1}var StatsigContext={},NoopEvaluationsClient={},hasRequiredNoopEvaluationsClient,hasRequiredStatsigContext;function requireNoopEvaluationsClient(){if(hasRequiredNoopEvaluationsClient)return NoopEvaluationsClient;hasRequiredNoopEvaluationsClient=1,Object.defineProperty(NoopEvaluationsClient,"__esModule",{value:!0}),NoopEvaluationsClient.isNoopClient=NoopEvaluationsClient.NoopEvaluationsClient=void 0;const e=requireSrc$2(),t={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},n=()=>{},o=()=>t,i=()=>Promise.resolve(),r=()=>Promise.resolve(t),a={reason:"Error:NoClient"},s=t=>(...n)=>{const o="string"==typeof n[0]?n[0]:n[1];switch(t){case"gate":return(0,e._makeFeatureGate)(o,a,null);case"config":return(0,e._makeDynamicConfig)(o,a,null);case"layer":return(0,e._makeLayer)(o,a,null);case"param_store":return{name:o}}},l={attach:n,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:n,setDataLegacy:n,prefetchData:i},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:e.Storage,sdkInstanceID:""},d=new e.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>""),p={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:o,initializeAsync:r,shutdown:i,flush:i,updateRuntimeOptions:n,updateUserSync:o,updateUserAsync:r,getContext:()=>Object.assign({},c),getContextHandle:()=>d,checkGate:()=>!1,getFeatureGate:s("gate"),getDynamicConfig:s("config"),getExperiment:s("config"),getLayer:s("layer"),getParameterStore:s("param_store"),logEvent:n,on:n,off:n,$on:n,$emt:n,dataAdapter:l};return NoopEvaluationsClient.NoopEvaluationsClient=p,NoopEvaluationsClient.isNoopClient=function(e){return"isNoop"in e},NoopEvaluationsClient}function requireStatsigContext(){if(hasRequiredStatsigContext)return StatsigContext;hasRequiredStatsigContext=1,Object.defineProperty(StatsigContext,"__esModule",{value:!0});const e=React__default,t=requireNoopEvaluationsClient();return StatsigContext.default=(0,e.createContext)({renderVersion:0,client:t.NoopEvaluationsClient,isLoading:!0}),StatsigContext}var StatsigProvider={},useClientAsyncInit={},src={},StatsigClient={},EvaluationStore={},V1InitializeContainer={},hasRequiredV1InitializeContainer;function requireV1InitializeContainer(){if(hasRequiredV1InitializeContainer)return V1InitializeContainer;hasRequiredV1InitializeContainer=1,Object.defineProperty(V1InitializeContainer,"__esModule",{value:!0}),V1InitializeContainer.V1InitializeContainer=void 0;const e=requireSrc$2();return V1InitializeContainer.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V1InitializeContainer}var V2InitializeContainer={},hasRequiredV2InitializeContainer,hasRequiredEvaluationStore;function requireV2InitializeContainer(){if(hasRequiredV2InitializeContainer)return V2InitializeContainer;hasRequiredV2InitializeContainer=1,Object.defineProperty(V2InitializeContainer,"__esModule",{value:!0}),V2InitializeContainer.V2InitializeContainer=void 0;const e=requireSrc$2();return V2InitializeContainer.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,n,o;const i=this._getResultFromLookup(this._values.feature_gates,e);return i?{name:e,value:!0===i.v,rule_id:null!==(t=i.r)&&void 0!==t?t:"default",secondary_exposures:null!==(n=i.s)&&void 0!==n?n:[],id_type:null!==(o=i.i)&&void 0!==o?o:""}:null}getConfig(e){var t,n,o,i;const r=this._getResultFromLookup(this._values.dynamic_configs,e);return r?{name:e,value:null!==(t=this._values.values[r.v])&&void 0!==t?t:{},rule_id:r.r,secondary_exposures:null!==(n=r.s)&&void 0!==n?n:[],id_type:null!==(o=r.i)&&void 0!==o?o:"",is_user_in_experiment:!0===r.ue,passed:!0===r.p,group_name:null!==(i=r.gn)&&void 0!==i?i:void 0,is_experiment_active:!0===r.ea,group:r.r,is_device_based:"stableID"===r.i}:null}getLayer(e){var t,n,o,i,r,a;const s=this._getResultFromLookup(this._values.layer_configs,e);return s?{name:e,value:null!==(t=this._values.values[s.v])&&void 0!==t?t:{},rule_id:s.r,secondary_exposures:null!==(n=s.s)&&void 0!==n?n:[],is_user_in_experiment:!0===s.ue,group_name:null!==(o=s.gn)&&void 0!==o?o:void 0,is_experiment_active:!0===s.ea,group:s.r,is_device_based:"stableID"===s.i,allocated_experiment_name:null!==(i=s.ae)&&void 0!==i?i:"",explicit_parameters:null!==(r=s.ep)&&void 0!==r?r:[],undelegated_secondary_exposures:null!==(a=s.us)&&void 0!==a?a:[],parameter_rule_ids:s.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V2InitializeContainer}function requireEvaluationStore(){if(hasRequiredEvaluationStore)return EvaluationStore;hasRequiredEvaluationStore=1,Object.defineProperty(EvaluationStore,"__esModule",{value:!0});const e=requireSrc$2(),t=requireV1InitializeContainer(),n=requireV2InitializeContainer();return EvaluationStore.default=class{constructor(e,t){this._sdkKey=e,this._options=t,this._valuesForExternalUse=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=/* @__PURE__ */new Set}reset(){this._values=null,this._valuesForExternalUse=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._valuesForExternalUse}setValues(o,i){var r,a;if(!o)return!1;const s=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse");if(null==s)return!1;if(this._source=o.source,!0!==(null==s?void 0:s.has_updates))return!0;return(null!==(r=s.time)&&void 0!==r?r:0)<this._lcut||(this._valuesForExternalUse=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse"),this._lcut=s.time,this._receivedAt=o.receivedAt,"init-v2"===s.response_format?this._values=new n.V2InitializeContainer(s):this._values=new t.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(o.source,s),o.source&&s.user&&this._setWarningState(i,s),e.SDKFlags.setFlags(this._sdkKey,null!==(a=s.sdk_flags)&&void 0!==a?a:{})),!0}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){const t=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(t)}getConfig(e){const t=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(t)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){const t=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(t)}getParamStore(e){const t=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(t)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;const n={};return t.user&&(n.user=t.user),t.sdkInfo&&(n.generatorSDKInfo=t.sdkInfo),n.lcut=t.time,n}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(t,n){var o,i,r;const a=e.StableID.get(this._sdkKey);if((null===(o=t.customIDs)||void 0===o?void 0:o.stableID)===a||!(null===(i=t.customIDs)||void 0===i?void 0:i.stableID)&&!a){if("user"in n){let o=n.user,i=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(null===(r=this._options)||void 0===r?void 0:r.disableStableID)&&(i=Object.assign(Object.assign({},i),{customIDs:Object.assign(Object.assign({},i.customIDs),{stableID:void 0})}),o=Object.assign(Object.assign({},o),{customIDs:Object.assign(Object.assign({},o.customIDs),{stableID:void 0})})),(0,e._getFullUserHash)(i)!==(0,e._getFullUserHash)(o)&&this._warnings.add("PartialUserMatch")}}else this._warnings.add("StableIDMismatch")}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};const e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,n;const o=this.getCurrentSourceDetails();let i=o.reason;const r=null!==(t=o.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&r.length>0&&(i+=r[0]),"Uninitialized"!==i&&"NoValues"!==i){i=`${i}:${e?"Unrecognized":"Recognized"}`}const a="Bootstrap"===this._source&&null!==(n=this._bootstrapMetadata)&&void 0!==n?n:void 0;return a&&(o.bootstrapMetadata=a),Object.assign(Object.assign({},o),{reason:i})}},EvaluationStore}var Network={},EvaluationResponseDeltas={},hasRequiredEvaluationResponseDeltas,hasRequiredNetwork;function requireEvaluationResponseDeltas(){if(hasRequiredEvaluationResponseDeltas)return EvaluationResponseDeltas;hasRequiredEvaluationResponseDeltas=1,Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const e=requireSrc$2();function t(e,t){null==e||e.forEach(e=>{delete t[e]})}return EvaluationResponseDeltas._resolveDeltasResponse=function(n,o){const i=(0,e._typedJsonParse)(o,"checksum","DeltasEvaluationResponse");if(!i)return{hadBadDeltaChecksum:!0};const r=function(e){const n=e;return t(e.deleted_gates,n.feature_gates),delete n.deleted_gates,t(e.deleted_configs,n.dynamic_configs),delete n.deleted_configs,t(e.deleted_layers,n.layer_configs),delete n.deleted_layers,n}(function(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{feature_gates:Object.assign(Object.assign({},e.feature_gates),t.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),t.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),t.dynamic_configs)})}(n,i)),a=(0,e._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2);return a===i.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:r,badFullResponse:i.deltas_full_response}},EvaluationResponseDeltas}function requireNetwork(){if(hasRequiredNetwork)return Network;hasRequiredNetwork=1;var e=Network&&Network.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationResponseDeltas();class o extends t.NetworkCore{constructor(e,n){super(e,n);const o=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,null==o?void 0:o.initializeUrl,null==o?void 0:o.api,null==o?void 0:o.initializeFallbackUrls)}fetchEvaluations(n,o,i,r,a){return e(this,void 0,void 0,function*(){var e,s,l,c,d,p;const u=o?(0,t._typedJsonParse)(o,"has_updates","InitializeResponse"):null;let m={user:r,hash:null!==(l=null===(s=null===(e=this._option)||void 0===e?void 0:e.networkConfig)||void 0===s?void 0:s.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==u?void 0:u.has_updates){const e=(null==u?void 0:u.hash_used)!==(null!==(p=null===(d=null===(c=this._option)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==p?p:"djb2");m=Object.assign(Object.assign({},m),{sinceTime:a&&!e?u.time:0,previousDerivedFields:"derived_fields"in u&&a?u.derived_fields:{},deltasResponseRequested:!0,full_checksum:u.full_checksum,partialUserMatchSinceTime:e?0:u.time})}return this._fetchEvaluations(n,u,m,i)})}_fetchEvaluations(t,o,i,r){return e(this,void 0,void 0,function*(){var e,a;const s=yield this.post({sdkKey:t,urlConfig:this._initializeUrlConfig,data:i,retries:2,isStatsigEncodable:!0,priority:r});if(204===(null==s?void 0:s.code))return'{"has_updates": false}';if(200!==(null==s?void 0:s.code))return null!==(e=null==s?void 0:s.body)&&void 0!==e?e:null;if(!0!==(null==o?void 0:o.has_updates)||!0!==(null===(a=s.body)||void 0===a?void 0:a.includes('"is_delta":true'))||!0!==i.deltasResponseRequested)return s.body;const l=(0,n._resolveDeltasResponse)(o,s.body);return"string"==typeof l?l:this._fetchEvaluations(t,o,Object.assign(Object.assign(Object.assign({},i),l),{deltasResponseRequested:!1}),r)})}}return Network.default=o,Network}var ParamStoreGetterFactory={},hasRequiredParamStoreGetterFactory;function requireParamStoreGetterFactory(){if(hasRequiredParamStoreGetterFactory)return ParamStoreGetterFactory;hasRequiredParamStoreGetterFactory=1,Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const e=requireSrc$2(),t={disableExposureLog:!0};function n(e){return null==e||!1===e.disableExposureLog}function o(t,n){return null!=n&&!(0,e._isTypeMatch)(t,n)}return ParamStoreGetterFactory._makeParamStoreGetter=function(i,r,a){return(s,l)=>{if(null==r)return l;const c=r[s];if(null==c||null!=l&&(0,e._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e){return e.value}(c);case"gate":return function(e,o,i){return e.getFeatureGate(o.gate_name,n(i)?void 0:t).value?o.pass_value:o.fail_value}(i,c,a);case"dynamic_config":return function(e,i,r,a){const s=e.getDynamicConfig(i.config_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"experiment":return function(e,i,r,a){const s=e.getExperiment(i.experiment_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"layer":return function(e,i,r,a){const s=e.getLayer(i.layer_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);default:return l}}},ParamStoreGetterFactory}var StatsigEvaluationsDataAdapter={},hasRequiredStatsigEvaluationsDataAdapter,hasRequiredStatsigClient,hasRequiredSrc$1;function requireStatsigEvaluationsDataAdapter(){if(hasRequiredStatsigEvaluationsDataAdapter)return StatsigEvaluationsDataAdapter;hasRequiredStatsigEvaluationsDataAdapter=1;var e=StatsigEvaluationsDataAdapter&&StatsigEvaluationsDataAdapter.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=void 0;const t=requireSrc$2(),n=requireNetwork();let o=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,o){super.attach(e,t,o),null!==o&&o instanceof n.default?this._network=o:this._network=new n.default(null!=t?t:{})}getDataAsync(e,n,o){return this._getDataAsyncImpl(e,(0,t._normalizeUser)(n,this._options),o)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){const n=(0,t._typedJsonParse)(e,"has_updates","data");n&&"user"in n?super.setData(e,n.user):t.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(t,n,o,i){return e(this,void 0,void 0,function*(){var e;const r=yield null===(e=this._network)||void 0===e?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==o?void 0:o.priority,n,i);return null!=r?r:null})}_getCacheKey(e){var n;const o=(0,t._getStorageKey)(this._getSdkKey(),e,null===(n=this._options)||void 0===n?void 0:n.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${o}`}_isCachedResultValidFor204(e,n){return null!=e.fullUserHash&&e.fullUserHash===(0,t._getFullUserHash)(n)}};return StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=o,StatsigEvaluationsDataAdapter}function requireStatsigClient(){if(hasRequiredStatsigClient)return StatsigClient;hasRequiredStatsigClient=1;var e=StatsigClient&&StatsigClient.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClient,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationStore(),o=requireNetwork(),i=requireParamStoreGetterFactory(),r=requireStatsigEvaluationsDataAdapter();let a=class a extends t.StatsigClientBase{static instance(e){const n=(0,t._getStatsigGlobal)().instance(e);return n instanceof a?n:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new a(null!=e?e:"",{}))}constructor(e,i,a=null){var s,l;t.SDKType._setClientType(e,"javascript-client");const c=new o.default(a,e=>{this.$emt(e)});super(e,null!==(s=null==a?void 0:a.dataAdapter)&&void 0!==s?s:new r.StatsigEvaluationsDataAdapter,c,a),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new n.default(e,null!=a?a:null),this._network=c,this._user=this._configureUser(i,a),this._sdkInstanceID=(0,t.getUUID)(),this._contextHandle=new t.PrecomputedEvaluationsContextHandle(e,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID);const d=null!==(l=null==a?void 0:a.plugins)&&void 0!==l?l:[];for(const t of d)t.bind(this)}initializeSync(e){var n;return"Uninitialized"!==this.loadingStatus?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(t){return e(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(t)),this._initializePromise})}updateUserSync(e,t){const n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(o){const e=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,n,o){var i;const r=[...null!==(i=this._store.getWarnings())&&void 0!==i?i:[]];this._resetForUser(e);const a=this.dataAdapter.getDataSync(this._user);null==a&&r.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);const s=null==n?void 0:n.disableBackgroundCacheRefresh;return!0===s||null==s&&"Bootstrap"===(null==a?void 0:a.source)||this._runPostUpdate(null!=a?a:null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),r)}updateUserAsync(t,n){return e(this,void 0,void 0,function*(){const e=performance.now();try{return yield this._updateUserAsyncImpl(t,n)}catch(o){const t=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(t,e)}})}_updateUserAsyncImpl(n,o){return e(this,void 0,void 0,function*(){this._resetForUser(n);const e=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let i=this.dataAdapter.getDataSync(e);if(this._store.setValues(i,this._user),this._setStatus("Loading",i),i=yield this.dataAdapter.getDataAsync(i,e,o),e!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=i&&(t.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(i,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(i),r||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());const a=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(r,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let e=(0,t._cloneObject)("StatsigUser",this._user);return null==e&&(t.Log.error("Failed to clone user"),e={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:e,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){const o="string"==typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:o}),this._logger.enqueue(Object.assign(Object.assign({},o),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(n){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,n)})}_createErrorUpdateDetails(e,n){var o;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-n,e,null,[...null!==(o=this._store.getWarnings())&&void 0!==o?o:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,n){this.dataAdapter.getDataAsync(e,n,{priority:"low"}).catch(e=>{t.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,n){var o,i,r;const a=(0,t._normalizeUser)(e,n),s=null===(o=a.customIDs)||void 0===o?void 0:o.stableID;if(s){const e=null===(r=(i=this.storageProvider).isReadyResolver)||void 0===r?void 0:r.call(i);e?e.then(()=>t.StableID.setOverride(s,this._sdkKey),()=>t.StableID.setOverride(s,this._sdkKey)):t.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(a.analyticsOnlyMetadata=Object.assign(Object.assign({},a.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),a}_getFeatureGateImpl(e,n){var o,i;const{result:r,details:a}=this._store.getGate(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Gate"),this._checkInitializationStatus(a.reason);const s=(0,t._makeFeatureGate)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getGateOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createGateExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,n){var o,i;const{result:r,details:a}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Dynamic config"),this._checkInitializationStatus(a.reason);const s=(0,t._makeDynamicConfig)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getDynamicConfigOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,n){var o,i,r,a;const{result:s,details:l}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==s?void 0:s.id_type,e,"Experiment"),this._checkInitializationStatus(l.reason);const c=(0,t._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,t._mapExposures)(null!==(i=null===(o=c.__evaluation)||void 0===o?void 0:o.secondary_exposures)&&void 0!==i?i:[],this._store.getExposureMapping()));const d=null===(a=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getExperimentOverride)||void 0===a?void 0:a.call(r,c,this._user,n),p=null!=d?d:c;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,p,this._store.getExposureMapping()),n),this.$emt({name:"experiment_evaluation",experiment:p}),p}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,n){var o,i,r;const{result:a,details:s}=this._store.getLayer(e),l=(0,t._makeLayer)(e,s,a),c=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getLayerOverride)||void 0===i?void 0:i.call(o,l,this._user,n);(null==n?void 0:n.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,t._mergeOverride)(l,c,null!==(r=null==c?void 0:c.__value)&&void 0!==r?r:l.__value,o=>{(null==n?void 0:n.disableExposureLog)||this._enqueueExposure(e,(0,t._createLayerParameterExposure)(this._user,d,o,this._store.getExposureMapping()),n)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,o;const{result:r,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:r,get:(0,i._makeParamStoreGetter)(this,r,t)},l=null===(o=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getParamStoreOverride)||void 0===o?void 0:o.call(n,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,i._makeParamStoreGetter)(this,l.config,t)),s}_checkUserHasIdForEvaluation(e,n,o){e&&((0,t._getUnitIDFromUser)(this._user,e)||t.Log.warn(`The user does not have the required id_type "${e}" for ${o} "${n}"`))}_checkInitializationStatus(e){("Uninitialized"===e||e.startsWith("Loading"))&&t.Log.warn(`SDK initialization has not completed. Reason: ${e}`)}};return StatsigClient.default=a,StatsigClient}function requireSrc$1(){return hasRequiredSrc$1||(hasRequiredSrc$1=1,function(e){var t=src&&src.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src&&src.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const o=requireSrc$2(),i=requireStatsigClient();e.StatsigClient=i.default,n(requireSrc$2(),e);const r=Object.assign((0,o._getStatsigGlobal)(),{StatsigClient:i.default});e.default=r}(src)),src}var useStatsigInternalClientFactoryAsync={},hasRequiredUseStatsigInternalClientFactoryAsync,hasRequiredUseClientAsyncInit,hasRequiredStatsigProvider;function requireUseStatsigInternalClientFactoryAsync(){if(hasRequiredUseStatsigInternalClientFactoryAsync)return useStatsigInternalClientFactoryAsync;hasRequiredUseStatsigInternalClientFactoryAsync=1,Object.defineProperty(useStatsigInternalClientFactoryAsync,"__esModule",{value:!0}),useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=void 0;const e=React__default,t=requireSrc$2();return useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=function(n,o){const i=(0,e.useMemo)(()=>{var e;return null!==(e=(0,t._getInstance)(o.sdkKey))&&void 0!==e?e:n(o)},[]),[r,a]=(0,e.useState)("Ready"!==i.loadingStatus);return(0,e.useMemo)(()=>{"Ready"!==i.loadingStatus&&i.initializeAsync().catch(t.Log.error).finally(()=>a(!1))},[]),{client:i,isLoading:r}},useStatsigInternalClientFactoryAsync}function requireUseClientAsyncInit(){if(hasRequiredUseClientAsyncInit)return useClientAsyncInit;hasRequiredUseClientAsyncInit=1,Object.defineProperty(useClientAsyncInit,"__esModule",{value:!0}),useClientAsyncInit.useClientAsyncInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryAsync();return useClientAsyncInit.useClientAsyncInit=function(n,o,i=null){return(0,t.useStatsigInternalClientFactoryAsync)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,statsigOptions:i})},useClientAsyncInit}function requireStatsigProvider(){if(hasRequiredStatsigProvider)return StatsigProvider;hasRequiredStatsigProvider=1,Object.defineProperty(StatsigProvider,"__esModule",{value:!0}),StatsigProvider.StatsigProvider=void 0;const e=requireJsxRuntime(),t=React__default,n=requireSrc$2(),o=requireStatsigContext(),i=requireUseClientAsyncInit();function r(n){const[r,a]=(0,t.useState)(0),c=(0,i.useClientAsyncInit)(n.sdkKey,n.user,n.options).client,[d,p]=(0,t.useState)(!l(c));s(c,a,p);const u=(0,t.useMemo)(()=>({renderVersion:r,client:c,isLoading:d}),[r,c,d]);return(0,e.jsx)(o.default.Provider,{value:u,children:null!=n.loadingComponent&&u.isLoading?n.loadingComponent:n.children})}function a(n){const[i,r]=(0,t.useState)(0),a=n.client,[c,d]=(0,t.useState)(!l(a));s(a,r,d);const p=(0,t.useMemo)(()=>({renderVersion:i,client:a,isLoading:c}),[i,a,c]);return(0,e.jsx)(o.default.Provider,{value:p,children:null!=n.loadingComponent&&p.isLoading?n.loadingComponent:n.children})}function s(e,o,i){(0,t.useEffect)(()=>{const t=()=>{o(e=>e+1),i(!l(e))};return n.SDKType._setBindingType("react"),e.$on("values_updated",t),()=>{e.flush().catch(e=>n.Log.error("An error occurred during flush",e)),e.off("values_updated",t)}},[e,o])}function l(e){return"isNoop"in e||"Ready"===e.loadingStatus}return StatsigProvider.StatsigProvider=function(t){return"client"in t?(("sdkKey"in t||"user"in t)&&n.Log.warn("Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored."),(0,e.jsx)(a,Object.assign({},t))):(0,e.jsx)(r,Object.assign({},t))},StatsigProvider}var useClientBootstrapInit={},useStatsigInternalClientFactoryBootstrap={},hasRequiredUseStatsigInternalClientFactoryBootstrap,hasRequiredUseClientBootstrapInit;function requireUseStatsigInternalClientFactoryBootstrap(){if(hasRequiredUseStatsigInternalClientFactoryBootstrap)return useStatsigInternalClientFactoryBootstrap;hasRequiredUseStatsigInternalClientFactoryBootstrap=1,Object.defineProperty(useStatsigInternalClientFactoryBootstrap,"__esModule",{value:!0}),useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=void 0;const e=React__default,t=requireSrc$2();return useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=function(n,o){const i=(0,e.useRef)((0,t._getInstance)(o.sdkKey));return(0,e.useMemo)(()=>{if(i.current)return i.current;const e=n(o);return i.current=e,o.useLegacyFormat?e.dataAdapter.setDataLegacy(o.initialValues,o.initialUser):e.dataAdapter.setData(o.initialValues),e.initializeSync(),e},[])},useStatsigInternalClientFactoryBootstrap}function requireUseClientBootstrapInit(){if(hasRequiredUseClientBootstrapInit)return useClientBootstrapInit;hasRequiredUseClientBootstrapInit=1,Object.defineProperty(useClientBootstrapInit,"__esModule",{value:!0}),useClientBootstrapInit.useClientBootstrapInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryBootstrap();return useClientBootstrapInit.useClientBootstrapInit=function(n,o,i,r=null,a){return(0,t.useStatsigInternalClientFactoryBootstrap)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,initialValues:i,statsigOptions:r,useLegacyFormat:a})},useClientBootstrapInit}var useDynamicConfig={},hasRequiredUseDynamicConfig;function requireUseDynamicConfig(){if(hasRequiredUseDynamicConfig)return useDynamicConfig;hasRequiredUseDynamicConfig=1,Object.defineProperty(useDynamicConfig,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useDynamicConfig.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${i}'.`),n.NoopEvaluationsClient.getDynamicConfig(i,r)):a.getDynamicConfig(i,r),[i,a,s,...r?Object.values(r):[]])},useDynamicConfig}var useExperiment={},hasRequiredUseExperiment;function requireUseExperiment(){if(hasRequiredUseExperiment)return useExperiment;hasRequiredUseExperiment=1,Object.defineProperty(useExperiment,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useExperiment.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${i}'.`),n.NoopEvaluationsClient.getExperiment(i,r)):a.getExperiment(i,r),[i,a,s,...r?Object.values(r):[]])},useExperiment}var useFeatureGate={},hasRequiredUseFeatureGate;function requireUseFeatureGate(){if(hasRequiredUseFeatureGate)return useFeatureGate;hasRequiredUseFeatureGate=1,Object.defineProperty(useFeatureGate,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useFeatureGate.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.getFeatureGate(i,r)):a.getFeatureGate(i,r),[i,a,s,...r?Object.values(r):[]])},useFeatureGate}var useGateValue={},hasRequiredUseGateValue;function requireUseGateValue(){if(hasRequiredUseGateValue)return useGateValue;hasRequiredUseGateValue=1,Object.defineProperty(useGateValue,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useGateValue.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.checkGate(i,r)):a.checkGate(i,r),[i,a,s,...r?Object.values(r):[]])},useGateValue}var useLayer={},hasRequiredUseLayer;function requireUseLayer(){if(hasRequiredUseLayer)return useLayer;hasRequiredUseLayer=1,Object.defineProperty(useLayer,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useLayer.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${i}'.`),n.NoopEvaluationsClient.getLayer(i,r)):a.getLayer(i,r),[i,a,s,...r?Object.values(r):[]])},useLayer}var useParameterStore={},hasRequiredUseParameterStore;function requireUseParameterStore(){if(hasRequiredUseParameterStore)return useParameterStore;hasRequiredUseParameterStore=1,Object.defineProperty(useParameterStore,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useParameterStore.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${i}'.`),n.NoopEvaluationsClient.getParameterStore(i,r)):a.getParameterStore(i,r),[i,a,s,...r?Object.values(r):[]])},useParameterStore}var useStatsigClient={},hasRequiredUseStatsigClient;function requireUseStatsigClient(){if(hasRequiredUseStatsigClient)return useStatsigClient;hasRequiredUseStatsigClient=1,Object.defineProperty(useStatsigClient,"__esModule",{value:!0}),useStatsigClient.useStatsigClient=void 0;const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useStatsigClient.useStatsigClient=function(){const{client:i,renderVersion:r,isLoading:a}=(0,e.useContext)(o.default),s=(0,e.useMemo)(()=>(0,n.isNoopClient)(i)?(t.Log.warn("Attempting to retrieve a StatsigClient but none was set."),n.NoopEvaluationsClient):i,[i,r]),l=[s,r],c=(0,e.useCallback)((e,t)=>s.checkGate(e,t),l),d=(0,e.useCallback)((e,t)=>s.getFeatureGate(e,t),l),p=(0,e.useCallback)((e,t)=>s.getDynamicConfig(e,t),l),u=(0,e.useCallback)((e,t)=>s.getExperiment(e,t),l),m=(0,e.useCallback)((e,t)=>s.getLayer(e,t),l),h=(0,e.useCallback)((e,t)=>s.getParameterStore(e,t),l),g=(0,e.useCallback)((e,t,n)=>"string"==typeof e?s.logEvent(e,t,n):s.logEvent(e),l);return(0,e.useMemo)(()=>({client:s,checkGate:c,getFeatureGate:d,getDynamicConfig:p,getExperiment:u,getLayer:m,getParameterStore:h,logEvent:g,isLoading:a}),[s,c,d,p,u,m,h,g,a])},useStatsigClient}var useStatsigUser={},hasRequiredUseStatsigUser,hasRequiredSrc;function requireUseStatsigUser(){if(hasRequiredUseStatsigUser)return useStatsigUser;hasRequiredUseStatsigUser=1,Object.defineProperty(useStatsigUser,"__esModule",{value:!0}),useStatsigUser.useStatsigUser=void 0;const e=React__default,t=requireStatsigContext(),n=requireUseStatsigClient();function o(e){return e.getContextHandle().user}return useStatsigUser.useStatsigUser=function(){const{client:i}=(0,n.useStatsigClient)(),{renderVersion:r}=(0,e.useContext)(t.default);return{user:(0,e.useMemo)(()=>o(i),[i,r]),updateUserSync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserSync(e)),[i]),updateUserAsync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserAsync(e)),[i])}},useStatsigUser}function requireSrc(){return hasRequiredSrc||(hasRequiredSrc=1,function(e){var t=src$2&&src$2.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$2&&src$2.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.useStatsigUser=e.useStatsigInternalClientFactoryBootstrap=e.useStatsigInternalClientFactoryAsync=e.useStatsigClient=e.useParameterStore=e.useLayer=e.useGateValue=e.useFeatureGate=e.useExperiment=e.useDynamicConfig=e.useClientBootstrapInit=e.useClientAsyncInit=e.StatsigProvider=e.StatsigContext=void 0;const o=requireSrc$2(),i=requireStatsigContext();e.StatsigContext=i.default;const r=requireStatsigProvider();Object.defineProperty(e,"StatsigProvider",{enumerable:!0,get:function(){return r.StatsigProvider}});const a=requireUseClientAsyncInit();Object.defineProperty(e,"useClientAsyncInit",{enumerable:!0,get:function(){return a.useClientAsyncInit}});const s=requireUseClientBootstrapInit();Object.defineProperty(e,"useClientBootstrapInit",{enumerable:!0,get:function(){return s.useClientBootstrapInit}});const l=requireUseDynamicConfig();e.useDynamicConfig=l.default;const c=requireUseExperiment();e.useExperiment=c.default;const d=requireUseFeatureGate();e.useFeatureGate=d.default;const p=requireUseGateValue();e.useGateValue=p.default;const u=requireUseLayer();e.useLayer=u.default;const m=requireUseParameterStore();e.useParameterStore=m.default;const h=requireUseStatsigClient();Object.defineProperty(e,"useStatsigClient",{enumerable:!0,get:function(){return h.useStatsigClient}});const g=requireUseStatsigInternalClientFactoryAsync();Object.defineProperty(e,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return g.useStatsigInternalClientFactoryAsync}});const x=requireUseStatsigInternalClientFactoryBootstrap();Object.defineProperty(e,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return x.useStatsigInternalClientFactoryBootstrap}});const f=requireUseStatsigUser();Object.defineProperty(e,"useStatsigUser",{enumerable:!0,get:function(){return f.useStatsigUser}}),n(requireSrc$1(),e),Object.assign((0,o._getStatsigGlobal)(),{StatsigContext:i.default,StatsigProvider:r.StatsigProvider,useClientAsyncInit:a.useClientAsyncInit,useClientBootstrapInit:s.useClientBootstrapInit,useDynamicConfig:l.default,useExperiment:c.default,useFeatureGate:d.default,useGateValue:p.default,useLayer:u.default,useParameterStore:m.default,useStatsigClient:h.useStatsigClient,useStatsigInternalClientFactoryAsync:g.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:x.useStatsigInternalClientFactoryBootstrap,useStatsigUser:f.useStatsigUser})}(src$2)),src$2}var srcExports=requireSrc(),FeatureGatesNamesCockpit=/* @__PURE__ */(e=>(e.enableZeniGPTFeatureForMonthEndEmail="zeni_gpt_for_month_end_email_enabled",e.isBirdsEyeViewEnabled="is_birds_eye_view_enabled",e.isReviewTabVendorColumnEnabled="review_vendor_column_enabled",e.enableSendingMonthEndEmail="sending_month_end_email_enabled",e))(FeatureGatesNamesCockpit||{}),FeatureGatesNamesWebApp=/* @__PURE__ */(e=>(e.isVendorMagicLinkFeatureEnabled="is_vendor_magic_link_feature_enabled",e.billPaySetupShowInternationalPaymentByWise="bill_pay_setup_show_international_payment_by_wise",e.isDepositAccountsFeatureEnabled="is_deposit_accounts_feature_enabled",e.isLimitedCategoryForReimbursement="is_limited_category_for_reimbursements_enabled",e.isBillPayLocalCurrencyFeatureEnabled="is_bill_pay_local_currency_feature_enabled",e.isOpexByVendorFeatureEnabled="is_opex_by_vendor_feature_enabled",e.isInternationalPaymentShaVsOurFeatureEnabled="is_international_sha_vs_our_feature_enabled",e.isApAgingFeatureEnabled="is_ap_aging_feature_enabled",e.isArAgingFeatureEnabled="is_ar_aging_feature_enabled",e.isChargeCardFeatureEnabled="is_charge_card_feature_enabled",e.isEarlyPayFeatureEnabled="is_early_pay_feature_enabled",e.isVendorReviewFeatureEnabled="is_vendor_review_feature_enabled",e.isVendorRecommendationFeatureEnabled="is_vendor_recommendation_feature_enabled",e.isShowDeletedBillsFeatureEnabled="is_show_deleted_bills_feature_enabled",e.isShowDeletedReimbursementsFeatureEnabled="is_show_deleted_reimbursements_feature_enabled",e.isRecurringBillsFeatureEnabled="is_recurring_bills_feature_enabled",e.isScheduledJEPrepaidExpensesFeatureEnabled="is_scheduled_je_prepaid_expenses_feature_enabled",e.isScheduledJEFixedAssetsFeatureEnabled="is_scheduled_je_fixed_assets_feature_enabled",e.isScheduledJEAccruedExpensesFeatureEnabled="is_scheduled_je_accrued_expenses_feature_enabled",e.isReferralFeatureEnabled="is_referral_feature_enabled",e.isSettingsFeatureEnabled="is_settings_feature_enabled",e.isVendorBulkUpdateOnTransactionEnabled="is_vendor_bulk_update_on_transaction_enabled",e.isCashbackFeatureEnabled="is_cashback_feature_enabled",e.isBillPayBulkActionEnabled="is_bill_pay_bulk_action_enabled",e.isFiling1099FeatureEnabled="is_filing_1099_feature_enabled",e.isReimbursementBulkActionEnabled="is_reimbursement_bulk_action_enabled",e.isExpenseAutomationEnabled="is_expense_automation_enabled",e.isRevenueAutomationEnabled="is_revenue_automation_enabled",e.isIssuePhysicalCardEnabled="is_issue_physical_card_enabled",e.isTaskTemplatesEnabled="is_task_templates_enabled",e.isTaskManagerCustomerUserAccessEnabled="is_task_manager_customer_user_access_enabled",e.isShaDisabled="is_sha_disabled",e.isOurDisabled="is_our_disabled",e.isBillPayDetectInsufficientFundsEnabled="is_bill_pay_detect_insufficient_funds_enabled",e.isExpenseAutomationEnabledV2="is_expense_automation_enabled_v2",e.isDebitCardFeatureEnabled="is_debit_card_feature_enabled",e.isRealtimeInsightsFeatureEnabled="is_realtime_insights_feature_enabled",e.isTreasuryEnabled="is_treasury_enabled",e.isInvoicingFeatureEnabled="is_invoicing_feature_enabled",e.isChainOfThoughtEnabled="is_chain_of_thought_enabled",e.isRecommendationFeedbackEnabled="is_recommendation_feedback_enabled",e.isDashboardSidebarHalloweenAnimationEnabled="is_dashboard_sidebar_halloween_animation_enabled",e.isDashboardSidebarThanksGivingAnimationEnabled="is_dashboard_sidebar_thanksgiving_animation_enabled",e.isDashboardSidebarChristmasAnimationEnabled="is_dashboard_sidebar_christmas_animation_enabled",e.isDashboardSidebarNewYearAnimationEnabled="is_dashboard_sidebar_new_year_animation_enabled",e.isExpenseAutomationSearchAndFilterEnabled="is_expense_automation_search_and_filter_enabled",e.isChargeCardPaymentHistoryFeatureEnabled="is_charge_card_payment_history_feature_enabled",e.isIssuePhysicalDebitCardEnabled="is_issue_physical_debit_card_enabled",e.isAutoTransferRuleEnabled="is_auto_transfer_rule_enabled",e.isMissingReceiptsBulkUploadEnabled="is_missing_receipts_bulk_upload_enabled",e.isAiCfoFileUploadEnabled="is_ai_cfo_file_upload_enabled",e.isAiCfoAnswerExportEnabled="is_ai_cfo_answer_export_enabled",e.isAiCfoDiscoveryTipsEnabled="is_ai_cfo_discovery_tips_enabled",e.isAiCfoNavButtonEnabled="is_ai_cfo_nav_button_enabled",e.isTransactionDetailSplitViewEnabled="is_transaction_detail_split_view_enabled",e.isServiceWorkerPrefetchingEnabled="is_prefetching_enabled",e.isTransactionActivityEnabled="is_transaction_activity_enabled",e.isCreateTransferEntryFromExpenseEnabled="is_create_transfer_entry_from_expense_enabled",e.isCreateTransactionEnabled="is_create_transaction_enabled",e.isReportsHorizontalClassLayoutSwitchEnabled="is_reports_horizontal_class_layout_switch_enabled",e.isReportsCustomDateRangeEnabled="reports_custom_date_range",e.isAiCfoEnabled="is_ai_cfo_enabled",e.isProjectsTransactionsEnabled="is_projects_transactions_enabled",e.isAiCardCreationEnabled="is_ai_card_creation_enabled",e.isCardPolicyEnabled="is_card_policy_enabled",e.isTaskManagerNotificationControlsEnabled="is_task_manager_notification_controls_enabled",e.isTaskSnoozeEnabled="is_task_snooze_enabled",e.isTaskVisibilityEnabled="is_task_visibility_enabled",e.isTaskCannedResponsesEnabled="is_task_canned_responses_enabled",e.isTaskCategorizationEnabled="is_task_categorization_enabled",e.isTaskBulkResolutionEnabled="is_task_bulk_resolution_enabled",e.isTaskAssigneeSortingEnabled="is_task_assignee_sorting_enabled",e.isTaskRecurringParentEnabled="is_task_recurring_parent_enabled",e.isTaskGroupAssigneesEnabled="is_task_group_assignees_enabled",e.aiAuditScorePercentage="ai_audit_score_percentage",e.isReconV3Enabled="is_reconciliation_v3_enabled",e.isReconciliationCombinedStatementEnabled="is_reconciliation_combined_statement_enabled",e.isReconReportEnabled="is_recon_report_enabled",e.isTransactionSplitEnabled="transaction_split_enabled",e.isAccrualEnabled="is_accrual_enabled",e))(FeatureGatesNamesWebApp||{});const FeatureGatesNames={...FeatureGatesNamesCockpit,...FeatureGatesNamesWebApp},CONFIG_SYNC_INTERVAL_MS=18e5;Object.values(FeatureGatesNames),Object.values(DynamicConfigNames);const StatsigNetworkValuesContext=createContext(!0),useIsFeatureGateLoading=()=>!useContext(StatsigNetworkValuesContext),useZeniFeatureGate=e=>{const t=useIsFeatureGateLoading();try{return{isFeatureGateLoading:t,isFeatureEnabled:srcExports.useFeatureGate(e).value}}catch{return{isFeatureGateLoading:t,isFeatureEnabled:!1}}},useZeniDynamicConfig=e=>{const t=srcExports.useDynamicConfig(e);try{return{isDynamicConfigLoading:!1,configValue:t.value}}catch{return{isDynamicConfigLoading:!1,configValue:{}}}},ZeniFeatureProvider=e=>!0===e.zeniFeatureProviderConfig.nonBlockingInit?/* @__PURE__ */jsxRuntimeExports.jsx(NonBlockingZeniFeatureProvider,{...e}):/* @__PURE__ */jsxRuntimeExports.jsx(BlockingZeniFeatureProvider,{...e}),useZeniStatsigUser=e=>useMemo(()=>({...null!=e.userId?{userID:e.userId}:{},...null!=e.userEmail?{email:e.userEmail}:{},custom:{company_id:e.companyId??"",connected_account_provider:e.connectedAccountProvider??""}}),[e.companyId,e.connectedAccountProvider,e.userEmail,e.userId]),BlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),i={networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0},{client:r,isLoading:a}=srcExports.useClientAsyncInit(t.featureClientSecret,o,i);return useEffect(()=>{null!=r&&!1===a&&r.updateUserAsync(o)},[r,o,a]),useEffect(()=>{if(null==r||a)return;const e=setInterval(()=>{r.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[r,o,a]),a?/* @__PURE__ */jsxRuntimeExports.jsx(InitializationComponent,{}):/* @__PURE__ */jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:r,children:n},e.companyId)},statsigIdentity=e=>[e.userID??"",e.custom?.company_id??""].join(":");function startStatsigSession(e,t,n,o){const i=srcExports._getInstance(e)??new srcExports.StatsigClient(e,t,n);"Uninitialized"===i.loadingStatus&&i.initializeSync({disableBackgroundCacheRefresh:!0});let r=0;const a={client:i,hasStoredValues:!1,lastRequestedUser:t,refresh:e=>{r+=1;const t=r;a.lastRequestedUser=e;const n=()=>{t===r&&o(statsigIdentity(e))};i.updateUserAsync(e).then(n,n)}};return a.refresh(t),a.hasStoredValues=null!=t.userID&&null!=i.getContext().values,a}const NonBlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),[i,r]=useState(null),[a]=useState(()=>startStatsigSession(t.featureClientSecret,o,{networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0,customUserCacheKeyFunc:(e,t)=>[e,t.userID??"",t.custom?.company_id??""].join(":")},r));return useEffect(()=>{o!==a.lastRequestedUser&&a.refresh(o)},[a,o]),useEffect(()=>{const e=setInterval(()=>{a.client.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[a,o]),a.hasStoredValues||null!=i?/* @__PURE__ */jsxRuntimeExports.jsx(StatsigNetworkValuesContext.Provider,{value:i===statsigIdentity(o),children:/* @__PURE__ */jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:a.client,children:n},e.companyId)}):/* @__PURE__ */jsxRuntimeExports.jsx(InitializationComponent,{})},BusyContainer$i=styled$2.div`
2287
+ `;var now_1,hasRequiredNow,_trimmedEndIndex,hasRequired_trimmedEndIndex,_baseTrim,hasRequired_baseTrim,isSymbol_1,hasRequiredIsSymbol,toNumber_1,hasRequiredToNumber,debounce_1,hasRequiredDebounce;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();return now_1=function(){return e.Date.now()}}function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;return _trimmedEndIndex=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;return _baseTrim=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isSymbol_1=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),n=requireIsSymbol(),o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt;return toNumber_1=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=i.test(s);return c||r.test(s)?a(s.slice(2),c?2:8):o.test(s)?NaN:+s}}function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),n=requireToNumber(),o=Math.max,i=Math.min;return debounce_1=function(r,a,s){var l,c,d,p,u,m,h=0,g=!1,x=!1,f=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,h=e,p=r.apply(n,t)}function S(e){var t=e-m;return void 0===m||t>=a||t<0||x&&e-h>=d}function C(){var e=t();if(S(e))return $(e);u=setTimeout(C,function(e){var t=a-(e-m);return x?i(t,d-(e-h)):t}(e))}function $(e){return u=void 0,f&&l?y(e):(l=c=void 0,p)}function b(){var e=t(),n=S(e);if(l=arguments,c=this,m=e,n){if(void 0===u)return function(e){return h=e,u=setTimeout(C,a),g?y(e):p}(m);if(x)return clearTimeout(u),u=setTimeout(C,a),y(m)}return void 0===u&&(u=setTimeout(C,a)),p}return a=n(a)||0,e(s)&&(g=!!s.leading,d=(x="maxWait"in s)?o(n(s.maxWait)||0,a):d,f="trailing"in s?!!s.trailing:f),b.cancel=function(){void 0!==u&&clearTimeout(u),h=0,l=m=c=u=void 0},b.flush=function(){return void 0===u?p:$(t())},b},debounce_1}var debounceExports=requireDebounce();const debounce=/* @__PURE__ */getDefaultExportFromCjs(debounceExports);var DynamicConfigNamesCockpit=/* @__PURE__ */(e=>(e.cardsTabCockpitUser="cards_tab_cockpit_enabled_users",e.monthEndInsightsEnablement="month_end_insights_enablement",e.expenseAutomationEnablement="expense_automation_enablement",e.monthEndPreviewEnablement="month_end_preview_enablement",e.qboConnectionPoolEnablement="qbo_connection_pool_enablement",e.aiAccountantOnboardingConfig="ai_accountant_onboarding_config",e.creditAgentEnablement="credit_agent_enablement",e.cockpitControlsConfig="cockpit_controls_config",e))(DynamicConfigNamesCockpit||{}),DynamicConfigNamesWebApp=/* @__PURE__ */(e=>(e.treDynamicConfig="tre_dynamic_config",e.documentAiReceiptMaxSizeLimitBytesConfig="document_ai_receipt_max_size_limit_bytes_config",e.meetingLinksConfig="meeting_links_config",e.zeniAssistConfig="zeni_assist_config",e.zeniCardsConfig="zeni_cards_config",e.zeniAccountsConfig="deposit_accounts_config",e.expressPayConfig="express_pay_config",e.accountReconGLAccountsConfig="account_recon_gl_accounts_config",e.treasuryConfig="treasury_config",e.newTagOnMenuConfig="new_tag_on_menu_config",e.sameDayAchDisablementConfig="same_day_ach_disablement_config",e.aiCfoMessageDynamicConfig="ai_cfo_message_dynamic_config",e.aiCfoDiscoveryTipsConfig="ai_cfo_discovery_tips_config",e.webappPrefetchConfig="webapp_prefetch_config",e.expenseAutomationEnablementZeniUsers="expense_automation_enablement_zeni_users",e.approvalRuleV3Config="approval_rule_v3_config",e.transactionCategorizationConfig="transaction_categorization_config",e.zeniCardsVisibilityConfig="zeni_cards_visibility_config",e.updateTransactionTypeConfig="update_transaction_type_config",e.createTransactionTransactionTypeSupportedConfig="create_transaction_transaction_type_supported_config",e.resetKycKybConfig="reset_kyc_kyb_config",e))(DynamicConfigNamesWebApp||{}),DynamicConfigNamesShared=/* @__PURE__ */(e=>(e.sessionAutoLogoutConfig="session_auto_logout_config",e))(DynamicConfigNamesShared||{});const DynamicConfigNames={...DynamicConfigNamesCockpit,...DynamicConfigNamesWebApp,...DynamicConfigNamesShared};var noop_1,hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop_1;return hasRequiredNoop=1,noop_1=function(){}}var noopExports=requireNoop();const noop$9=/* @__PURE__ */getDefaultExportFromCjs(noopExports);var src$2={},src$1={},$_StatsigGlobal={},Log={},hasRequiredLog$1,hasRequired$_StatsigGlobal;function requireLog$1(){return hasRequiredLog$1||(hasRequiredLog$1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function t(e){return e.unshift("[Statsig]"),e}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...o){n.level>=e.LogLevel.Info&&console.info(" INFO ",...t(o))}static debug(...o){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...t(o))}static warn(...o){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...t(o))}static error(...o){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...t(o))}}e.Log=n,n.level=e.LogLevel.Warn}(Log)),Log}function require$_StatsigGlobal(){return hasRequired$_StatsigGlobal||(hasRequired$_StatsigGlobal=1,function(e){var t,n,o;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const i=requireLog$1();e._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:c}catch(e){return c}};e._getStatsigGlobalFlag=t=>(0,e._getStatsigGlobal)()[t];e._getInstance=t=>{const n=(0,e._getStatsigGlobal)();return t?n.instances&&n.instances[t]:(n.instances&&Object.keys(n.instances).length>1&&i.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),n.firstInstance)};const r="__STATSIG__",a="undefined"!=typeof window?window:{},s=void 0!==commonjsGlobal$1?commonjsGlobal$1:{},l="undefined"!=typeof globalThis?globalThis:{},c=null!==(o=null!==(n=null!==(t=a[r])&&void 0!==t?t:s[r])&&void 0!==n?n:l[r])&&void 0!==o?o:{instance:e._getInstance};a[r]=c,s[r]=c,l[r]=c}($_StatsigGlobal)),$_StatsigGlobal}var Diagnostics={},hasRequiredDiagnostics;function requireDiagnostics(){return hasRequiredDiagnostics||(hasRequiredDiagnostics=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=/* @__PURE__ */new Map,n="start",o="end",i="statsig::diagnostics";function r(e,t,n,o){return Object.assign({key:n,action:t,step:o,timestamp:Date.now()},e)}function a(e,n){var o;const i=null!==(o=t.get(e))&&void 0!==o?o:[];i.push(n),t.set(e,i)}function s(e,t){if(t in e)return e[t]}e.Diagnostics={_getMarkers:e=>t.get(e),_markInitOverallStart:e=>{a(e,r({},n,"overall"))},_markInitOverallEnd:(e,t,n)=>{a(e,r({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,r(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,r(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{a(e,r({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,r(t,o,"initialize","process"))},_clearMarkers:e=>{t.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:s(e,"code"),name:s(e,"name"),message:s(e,"message")}},_getDiagnosticsData(t,n,o,i){var r;return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null===(r=null==t?void 0:t.headers)||void 0===r?void 0:r.get("x-statsig-region"),isDelta:!0===o.includes('"is_delta":true')||void 0,attempt:n,error:e.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(t,n,o,r){const a=e.Diagnostics._getMarkers(o);if(null==a||a.length<=0)return-1;const s=a[a.length-1].timestamp-a[0].timestamp;e.Diagnostics._clearMarkers(o);const l=function(e,t){const n={eventName:i,user:e,value:null,metadata:t,time:Date.now()};return n}(t,{context:"initialize",markers:a.slice(),statsigOptions:r});return n.enqueue(l),s}}}(Diagnostics)),Diagnostics}var EventLogger={},BatchedEventsQueue={},EventBatch={},hasRequiredEventBatch;function requireEventBatch(){if(hasRequiredEventBatch)return EventBatch;hasRequiredEventBatch=1,Object.defineProperty(EventBatch,"__esModule",{value:!0}),EventBatch.EventBatch=void 0;return EventBatch.EventBatch=class{constructor(e){this.attempts=0,this.createdAt=Date.now(),this.events=e}incrementAttempts(){this.attempts++}},EventBatch}var EventRetryConstants={},hasRequiredEventRetryConstants,hasRequiredBatchedEventsQueue;function requireEventRetryConstants(){return hasRequiredEventRetryConstants||(hasRequiredEventRetryConstants=1,Object.defineProperty(EventRetryConstants,"__esModule",{value:!0}),EventRetryConstants.EventRetryConstants=void 0,EventRetryConstants.EventRetryConstants={MAX_RETRY_ATTEMPTS:8,DEFAULT_BATCH_SIZE:100,MAX_PENDING_BATCHES:40,TICK_INTERVAL_MS:1e3,QUICK_FLUSH_WINDOW_MS:200,MAX_LOCAL_STORAGE:500,get MAX_QUEUED_EVENTS(){return this.DEFAULT_BATCH_SIZE*this.MAX_PENDING_BATCHES}}),EventRetryConstants}function requireBatchedEventsQueue(){if(hasRequiredBatchedEventsQueue)return BatchedEventsQueue;hasRequiredBatchedEventsQueue=1,Object.defineProperty(BatchedEventsQueue,"__esModule",{value:!0}),BatchedEventsQueue.BatchQueue=void 0;const e=requireEventBatch(),t=requireEventRetryConstants();return BatchedEventsQueue.BatchQueue=class{constructor(e=t.EventRetryConstants.DEFAULT_BATCH_SIZE){this._batches=[],this._batchSize=e}batchSize(){return this._batchSize}requeueBatch(e){return this._enqueueBatch(e)}hasFullBatch(){return this._batches.some(e=>e.events.length>=this._batchSize)}takeNextBatch(){return this._batches.shift()}takeAllBatches(){const e=this._batches;return this._batches=[],e}createBatches(t){let n=0,o=0;for(;n<t.length;){const i=t.slice(n,n+this._batchSize);o+=this._enqueueBatch(new e.EventBatch(i)),n+=this._batchSize}return o}_enqueueBatch(e){this._batches.push(e);let n=0;for(;this._batches.length>t.EventRetryConstants.MAX_PENDING_BATCHES;){const e=this._batches.shift();e&&(n+=e.events.length)}return n}},BatchedEventsQueue}var CacheKey={},Hashing={},TypingUtils={},hasRequiredTypingUtils,hasRequiredHashing,hasRequiredCacheKey;function requireTypingUtils(){if(hasRequiredTypingUtils)return TypingUtils;return hasRequiredTypingUtils=1,Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0,TypingUtils._typeOf=function(e){return Array.isArray(e)?"array":typeof e},TypingUtils._isTypeMatch=function(e,t){const n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)},TypingUtils}function requireHashing(){return hasRequiredHashing||(hasRequiredHashing=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=requireTypingUtils();e._DJB2=e=>{let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return String(t>>>0)};e._DJB2Object=(t,n)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(t,n)));e._getSortedObject=(n,o)=>{if(null==n)return null;const i=Object.keys(n).sort(),r={};return i.forEach(i=>{const a=n[i];0!==o&&"object"===(0,t._typeOf)(a)?r[i]=(0,e._getSortedObject)(a,null!=o?o-1:o):r[i]=a}),r}}(Hashing)),Hashing}function requireCacheKey(){if(hasRequiredCacheKey)return CacheKey;hasRequiredCacheKey=1,Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const e=requireHashing();function t(t,n,o){var i;if(o)return o(t,n);const r=n&&n.customIDs?n.customIDs:{},a=[`uid:${null!==(i=null==n?void 0:n.userID)&&void 0!==i?i:""}`,`cids:${Object.keys(r).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${r[e]}`).join(",")}`,`k:${t}`];return(0,e._DJB2)(a.join("|"))}return CacheKey._getUserStorageKey=t,CacheKey._getStorageKey=function(n,o,i){return o?t(n,o,i):(0,e._DJB2)(`k:${n}`)},CacheKey}var FlushCoordinator={},EventSender={},NetworkConfig={},hasRequiredNetworkConfig;function requireNetworkConfig(){return hasRequiredNetworkConfig||(hasRequiredNetworkConfig=1,e=NetworkConfig,Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}),NetworkConfig;var e}var SDKType={},hasRequiredSDKType;function requireSDKType(){if(hasRequiredSDKType)return SDKType;hasRequiredSDKType=1,Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const e={};let t;return SDKType.SDKType={_get:n=>{var o;return(null!==(o=e[n])&&void 0!==o?o:"js-mono")+(null!=t?t:"")},_setClientType(t,n){e[t]=n},_setBindingType(e){t&&"-react"!==t||(t="-"+e)}},SDKType}var StatsigMetadata={},hasRequiredStatsigMetadata;function requireStatsigMetadata(){return hasRequiredStatsigMetadata||(hasRequiredStatsigMetadata=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.33.0";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:e=>{t=Object.assign(Object.assign({},t),e)}}}(StatsigMetadata)),StatsigMetadata}var VisibilityObserving={},SafeJs={},hasRequiredSafeJs,hasRequiredVisibilityObserving,hasRequiredEventSender;function requireSafeJs(){return hasRequiredSafeJs||(hasRequiredSafeJs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._cloneObject=e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=requireLog$1();e._getWindowSafe=()=>"undefined"!=typeof window?window:null;e._getDocumentSafe=()=>{var t;const n=(0,e._getWindowSafe)();return null!==(t=null==n?void 0:n.document)&&void 0!==t?t:null};e._isServerEnv=()=>{if(null!==(0,e._getDocumentSafe)())return!1;const t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||t};e._addWindowEventListenerSafe=(t,n)=>{const o=(0,e._getWindowSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._addDocumentEventListenerSafe=(t,n)=>{const o=(0,e._getDocumentSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._getCurrentPageUrlSafe=()=>{var t;try{return null===(t=(0,e._getWindowSafe)())||void 0===t?void 0:t.location.href.split(/[?#]/)[0]}catch(n){return}};e._getUnloadEvent=()=>{const t=(0,e._getWindowSafe)();if(!t)return"beforeunload";return"onpagehide"in t?"pagehide":"beforeunload"};e._cloneObject=(e,n)=>{try{return JSON.parse(JSON.stringify(n))}catch(o){return t.Log.error(`Failed to clone object ${e}`),null}}}(SafeJs)),SafeJs}function requireVisibilityObserving(){return hasRequiredVisibilityObserving||(hasRequiredVisibilityObserving=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=requireSafeJs(),n="foreground",o="background",i=[];let r=n,a=!1;e._isCurrentlyVisible=()=>r===n;e._isUnloading=()=>a;e._subscribeToVisiblityChanged=e=>{i.unshift(e)};e._notifyVisibilityChanged=e=>{e!==r&&(r=e,i.forEach(t=>t(e)))},(0,t._addWindowEventListenerSafe)("focus",()=>{a=!1,(0,e._notifyVisibilityChanged)(n)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(o)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)("visible"===document.visibilityState?n:o)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{a=!0,(0,e._notifyVisibilityChanged)(o)})}(VisibilityObserving)),VisibilityObserving}function requireEventSender(){if(hasRequiredEventSender)return EventSender;hasRequiredEventSender=1;var e=EventSender&&EventSender.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventSender,"__esModule",{value:!0}),EventSender.EventSender=void 0;const t=requireLog$1(),n=requireNetworkConfig(),o=requireSDKType(),i=requireStatsigMetadata(),r=requireVisibilityObserving();return EventSender.EventSender=class{constructor(e,t,n,o,i){this._sdkKey=e,this._network=t,this._emitter=n,this._options=i,this._logEventUrlConfig=o}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}sendBatch(n){return e(this,void 0,void 0,function*(){var e,o,i;let a="event_sender_unexpected_exception";const s={};try{const t=(0,r._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(o=null===(e=this._options)||void 0===e?void 0:e.networkConfig)||void 0===o?void 0:o.networkOverrideFunc);a="event_sender_pre_logs_flushed_emitter_exception",this._emitter({name:"pre_logs_flushed",events:n.events}),a=t?"event_sender_unexpected_exception":"event_sender_post_exception";const i=t?this._sendEventsViaBeacon(n,s):yield this._sendEventsViaPost(n,s);return i.success?(a="event_sender_logs_flushed_emitter_exception",this._emitter({name:"logs_flushed",events:n.events}),i):Object.assign(Object.assign(Object.assign({success:!1,statusCode:i.statusCode,failurePath:i.failurePath},i.failureErrorMessage?{failureErrorMessage:i.failureErrorMessage}:{}),i.failureDiagnosticBucket?{failureDiagnosticBucket:i.failureDiagnosticBucket}:{}),i.failureDiagnosticMetadata?{failureDiagnosticMetadata:i.failureDiagnosticMetadata}:{})}catch(l){return t.Log.warn("Failed to send batch:",l),Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(i=s.path)&&void 0!==i?i:a},s.errorMessage?{failureErrorMessage:s.errorMessage}:{}),s.diagnosticBucket?{failureDiagnosticBucket:s.diagnosticBucket}:{}),s.diagnosticMetadata?{failureDiagnosticMetadata:s.diagnosticMetadata}:{})}})}_sendEventsViaPost(t,n){return e(this,void 0,void 0,function*(){var e,o;const i=yield this._network.post(this._getRequestData(t),n),r=null!==(e=null==i?void 0:i.code)&&void 0!==e?e:-1;return-1===r?Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(o=n.path)&&void 0!==o?o:void 0===i?"event_sender_post_returned_undefined":"event_sender_post_returned_null"},n.errorMessage?{failureErrorMessage:n.errorMessage}:{}),n.diagnosticBucket?{failureDiagnosticBucket:n.diagnosticBucket}:{}),n.diagnosticMetadata?{failureDiagnosticMetadata:n.diagnosticMetadata}:{}):{success:r>=200&&r<300,statusCode:r}})}_sendEventsViaBeacon(e,t){var n;const o=this._network.beacon(this._getRequestData(e),t);return Object.assign(Object.assign(Object.assign({success:o,statusCode:o?200:-1,failurePath:o?void 0:null!==(n=t.path)&&void 0!==n?n:"beacon_send_false"},!o&&t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),!o&&t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),!o&&t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e.events},urlConfig:this._logEventUrlConfig,retries:3,preserveFailedStatusCode:!0,isCompressable:!0,params:{[n.NetworkParam.EventCount]:String(e.events.length)},headers:{"statsig-event-count":String(e.events.length),"statsig-retry-count":String(e.attempts),"statsig-sdk-type":o.SDKType._get(this._sdkKey),"statsig-sdk-version":i.SDK_VERSION},credentials:"same-origin"}}},EventSender}var FlushInterval={},hasRequiredFlushInterval;function requireFlushInterval(){if(hasRequiredFlushInterval)return FlushInterval;hasRequiredFlushInterval=1,Object.defineProperty(FlushInterval,"__esModule",{value:!0}),FlushInterval.FlushInterval=void 0;const e=1e3,t=6e4;return FlushInterval.FlushInterval=class{constructor(){this._currentIntervalMs=e,this._lastFlushAttemptTime=Date.now()}getCurrentIntervalMs(){return this._currentIntervalMs}markFlushAttempt(){this._lastFlushAttemptTime=Date.now()}getTimeSinceLastAttempt(){return Date.now()-this._lastFlushAttemptTime}hasReachedMaxInterval(){return this.getTimeSinceLastAttempt()>=t}getTimeTillMaxInterval(){return t-this.getTimeSinceLastAttempt()}hasCompletelyRecoveredFromBackoff(){return this._currentIntervalMs<=e}adjustForSuccess(){const t=this._currentIntervalMs;t!==e&&(this._currentIntervalMs=Math.max(e,Math.floor(t/2)))}adjustForFailure(){const e=this._currentIntervalMs;this._currentIntervalMs=Math.min(t,2*e)}getTimeUntilNextFlush(){return this.getCurrentIntervalMs()-this.getTimeSinceLastAttempt()}},FlushInterval}var FlushTypes={},hasRequiredFlushTypes;function requireFlushTypes(){return hasRequiredFlushTypes||(hasRequiredFlushTypes=1,Object.defineProperty(FlushTypes,"__esModule",{value:!0}),FlushTypes.FlushType=void 0,(t=e||(FlushTypes.FlushType=e={})).ScheduledMaxTime="scheduled:max_time",t.ScheduledFullBatch="scheduled:full_batch",t.Limit="limit",t.Manual="manual",t.Shutdown="shutdown"),FlushTypes;var e,t}var NetworkCore={},NetworkFallbackResolver={},DnsTxtQuery={},hasRequiredDnsTxtQuery;function requireDnsTxtQuery(){if(hasRequiredDnsTxtQuery)return DnsTxtQuery;hasRequiredDnsTxtQuery=1;var e=DnsTxtQuery&&DnsTxtQuery.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const t=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n=["i","e","d"];return DnsTxtQuery._fetchTxtRecords=function(o){return e(this,void 0,void 0,function*(){const e=yield o("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!e.ok){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const i=yield e.arrayBuffer();return function(e){const t=e.findIndex((t,o)=>o<200&&"="===String.fromCharCode(t)&&n.includes(String.fromCharCode(e[o-1])));if(-1===t){const e=new Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let o="";for(let n=t-1;n<e.length;n++)o+=String.fromCharCode(e[n]);return o.split(",")}(new Uint8Array(i))})},DnsTxtQuery}var StorageProvider={},hasRequiredStorageProvider,hasRequiredNetworkFallbackResolver;function requireStorageProvider(){return hasRequiredStorageProvider||(hasRequiredStorageProvider=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=requireLog$1(),n=requireSafeJs(),o={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>o[e]?o[e]:null,setItem:(e,t)=>{o[e]=t},removeItem:e=>{delete o[e]},getAllKeys:()=>Object.keys(o)};let r=null;try{const e=(0,n._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(r={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,n)=>e.localStorage.setItem(t,n),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(c){t.Log.warn("Failed to setup localStorageProvider.")}let a=null!=r?r:i,s=a;function l(t){try{return t()}catch(c){if(c instanceof Error&&"SecurityError"===c.name)return e.Storage._setProvider(i),null;throw c}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:e=>l(()=>s.getItem(e)),setItem:(e,t)=>l(()=>s.setItem(e,t)),removeItem:e=>s.removeItem(e),getAllKeys:()=>s.getAllKeys(),_setProvider:e=>{a=e,s=e},_setDisabled:e=>{s=e?i:a}},e._getObjectFromStorage=function(n){const o=e.Storage.getItem(n);try{return JSON.parse(null!=o?o:"null")}catch(i){return t.Log.error(`Failed to parse value for key "${n}"`),null}},e._setObjectInStorage=function(t,n){e.Storage.setItem(t,JSON.stringify(n))}}(StorageProvider)),StorageProvider}function requireNetworkFallbackResolver(){if(hasRequiredNetworkFallbackResolver)return NetworkFallbackResolver;hasRequiredNetworkFallbackResolver=1;var e=NetworkFallbackResolver&&NetworkFallbackResolver.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(NetworkFallbackResolver,"__esModule",{value:!0}),NetworkFallbackResolver._isDomainFailure=NetworkFallbackResolver.NetworkFallbackResolver=void 0;const t=requireDnsTxtQuery(),n=requireHashing(),o=requireLog$1(),i=requireStorageProvider(),r=6048e5;function a(e,t){var n;const o=null!==(n=null==e?void 0:e.toLowerCase())&&void 0!==n?n:"";return t||o.includes("uncaught exception")||o.includes("failed to fetch")||o.includes("networkerror when attempting to fetch resource")}function s(e){return`statsig.network_fallback.${(0,n._DJB2)(e)}`}function l(e,t){const n=s(e);t&&0!==Object.keys(t).length?i.Storage.setItem(n,JSON.stringify(t)):i.Storage.removeItem(n)}return NetworkFallbackResolver.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null===(t=e.networkConfig)||void 0===t?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var n;const o=null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint];o&&(o.expiryTime=Date.now()+r,l(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:o})))}getActiveFallbackUrl(e,t){var n,r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let a=this._fallbackInfo;null==a&&(a=null!==(n=function(e){const t=s(e),r=i.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==n?n:{},this._fallbackInfo=a);const c=a[t.endpoint];return!c||Date.now()>(null!==(r=c.expiryTime)&&void 0!==r?r:0)||t.getChecksum()!==c.urlConfigChecksum?(delete a[t.endpoint],this._fallbackInfo=a,l(e,this._fallbackInfo),null):c.url?c.url:null}tryFetchUpdatedFallbackInfo(t,n,o,i){return e(this,void 0,void 0,function*(){var e,r;try{if(!a(o,i))return!1;const r=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,s=this._pickNewFallbackUrl(null===(e=this._fallbackInfo)||void 0===e?void 0:e[n.endpoint],r);return!!s&&(this._updateFallbackInfoWithNewUrl(t,n,s),!0)}catch(s){return null===(r=this._errorBoundary)||void 0===r||r.logError("tryFetchUpdatedFallbackInfo",s),!1}})}_updateFallbackInfoWithNewUrl(e,t,n){var o,i,a;const s={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+r,previous:[]},c=t.endpoint,d=null===(o=this._fallbackInfo)||void 0===o?void 0:o[c];d&&s.previous.push(...d.previous),s.previous.length>10&&(s.previous=[]);const p=null===(a=null===(i=this._fallbackInfo)||void 0===i?void 0:i[c])||void 0===a?void 0:a.url;null!=p&&s.previous.push(p),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[c]:s}),l(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(n){return e(this,void 0,void 0,function*(){var e;const o=this._dnsQueryCooldowns[n.endpoint];if(o&&Date.now()<o)return null;this._dnsQueryCooldowns[n.endpoint]=Date.now()+144e5;const i=[],r=yield(0,t._fetchTxtRecords)(null!==(e=this._networkOverrideFunc)&&void 0!==e?e:fetch),a=function(e){try{return new URL(e).pathname}catch(t){return null}}(n.defaultUrl);for(const t of r){if(!t.startsWith(n.endpointDnsKey+"="))continue;const e=t.split("=");if(e.length>1){let t=e[1];t.endsWith("/")&&(t=t.slice(0,-1)),i.push(`https://${t}${a}`)}}return i})}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;const o=new Set(null!==(n=null==e?void 0:e.previous)&&void 0!==n?n:[]),i=null==e?void 0:e.url;let r=null;for(const a of t){const e=a.endsWith("/")?a.slice(0,-1):a;if(!o.has(a)&&e!==i){r=e;break}}return r}},NetworkFallbackResolver._isDomainFailure=a,NetworkFallbackResolver}var SDKFlags={},hasRequiredSDKFlags;function requireSDKFlags(){if(hasRequiredSDKFlags)return SDKFlags;hasRequiredSDKFlags=1,Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const e={};return SDKFlags.SDKFlags={setFlags:(t,n)=>{e[t]=n},get:(t,n)=>{var o,i;return null!==(i=null===(o=e[t])||void 0===o?void 0:o[n])&&void 0!==i&&i}},SDKFlags}var SessionID={},UUID={},hasRequiredUUID,hasRequiredSessionID;function requireUUID(){if(hasRequiredUUID)return UUID;return hasRequiredUUID=1,Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0,UUID.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=/* @__PURE__ */(new Date).getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let o=16*Math.random();return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),("x"===n?o:7&o|8).toString(16)})},UUID}function requireSessionID(){return hasRequiredSessionID||(hasRequiredSessionID=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=requireCacheKey(),n=requireLog$1(),o=requireStorageProvider(),i=requireUUID(),r=requireVisibilityObserving(),a=18e5,s=144e5,l={};function c(e){var t;const n=e.data,o=function({lastUpdate:e}){return Date.now()-e>a}(n)||function({startTime:e}){return Date.now()-e>s}(n);return o&&(e.data=u(),null===(t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e.sdkKey))||void 0===t||t.$emt({name:"session_expired"})),o}function d(e){return`statsig.session_id.${(0,t._getStorageKey)(e)}`}function p(e){try{(0,o._setObjectInStorage)(e.storageKey,e.data),e.lastPersistedAt=Date.now()}catch(t){n.Log.warn("Failed to save SessionID")}}function u(){return{sessionID:(0,i.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}(0,r._subscribeToVisiblityChanged)(e=>{"background"===e&&Object.values(l).forEach(e=>p(e))}),e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:(e,t=!0)=>{null==l[e]&&(l[e]=function(e){const t=d(e),n=function(e){const t=(0,o._getObjectFromStorage)(e);return t}(t);if(n&&n.sessionID&&n.startTime&&n.lastUpdate)return{data:n,sdkKey:e,lastPersistedAt:0,storageKey:t};return{data:u(),sdkKey:e,lastPersistedAt:0,storageKey:t}}(e));return function(e,t){const n=Date.now(),o=c(e);o?p(e):t&&(e.data.lastUpdate=n,function(e){const t=Date.now();t-e.lastPersistedAt>15e3&&p(e)}(e));return e}(l[e],t)},overrideInitialSessionID:(e,t)=>{const n=Date.now(),o={data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t,lastPersistedAt:Date.now(),storageKey:d(t)};p(o),l[t]=o},checkForIdleSession:e=>{const t=l[e];if(!t)return;c(t)&&p(t)}}}(SessionID)),SessionID}var StableID={},hasRequiredStableID;function requireStableID(){if(hasRequiredStableID)return StableID;hasRequiredStableID=1,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const e=requireCacheKey(),t=requireLog$1(),n=requireSafeJs(),o=requireStorageProvider(),i=requireUUID(),r={},a={},s={};function l(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}function c(e,n){const i=l(n);try{(0,o._setObjectInStorage)(i,e)}catch(r){t.Log.warn("Failed to save StableID to storage")}}function d(e,t){if(!a[t]||null==(0,n._getDocumentSafe)())return;const o=/* @__PURE__ */new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${o.toUTCString()}; path=/`}function p(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}return StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(s[e])return null;if(null!=r[e])return r[e];let t=null;return t=function(e){if(!a[e]||null==(0,n._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const n of t){const[t,o]=n.trim().split("=");if(t===p(e))return decodeURIComponent(o)}return null}(e),null!=t?(r[e]=t,c(t,e),t):(t=function(e){const t=l(e);return(0,o._getObjectFromStorage)(t)}(e),null==t&&(t=(0,i.getUUID)()),c(t,e),d(t,e),r[e]=t,t)},setOverride:(e,t)=>{r[t]=e,c(e,t),d(e,t)},_setCookiesEnabled:(e,t)=>{a[e]=t},_setDisabled:(e,t)=>{s[e]=t}},StableID.getCookieName=p,StableID}var StatsigClientEventEmitter={},hasRequiredStatsigClientEventEmitter;function requireStatsigClientEventEmitter(){return hasRequiredStatsigClientEventEmitter||(hasRequiredStatsigClientEventEmitter=1,Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"}),StatsigClientEventEmitter}var StatsigOptionsCommon={},hasRequiredStatsigOptionsCommon,hasRequiredNetworkCore,hasRequiredFlushCoordinator;function requireStatsigOptionsCommon(){return hasRequiredStatsigOptionsCommon||(hasRequiredStatsigOptionsCommon=1,Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),StatsigOptionsCommon}function requireNetworkCore(){return hasRequiredNetworkCore||(hasRequiredNetworkCore=1,function(e){var t=NetworkCore&&NetworkCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=e.RETRYABLE_CODES=void 0,require$_StatsigGlobal();const n=require$_StatsigGlobal(),o=requireDiagnostics(),i=requireLog$1(),r=requireNetworkConfig(),a=requireNetworkFallbackResolver(),s=requireSDKFlags(),l=requireSDKType(),c=requireSafeJs(),d=requireSessionID(),p=requireStableID(),u=requireStatsigClientEventEmitter(),m=requireStatsigMetadata(),h=requireStatsigOptionsCommon(),g=requireVisibilityObserving();e.RETRYABLE_CODES=/* @__PURE__ */new Set([408,500,502,503,504,522,524,599]);e.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new a.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e,t){if(!x(e))return t&&(t.path="beacon_invalid_sdk_key"),!1;const n=this._getInternalRequestArgs("POST",e),o=this._getPopulatedURL(n),i=navigator;try{const e=i.sendBeacon.bind(i)(o,n.body);return e||t&&(t.path="beacon_send_false"),e}catch(r){throw t&&(t.path="beacon_send_exception"),r}}post(e,n){return t(this,void 0,void 0,function*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t,n)})}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(n,a){return t(this,void 0,void 0,function*(){var s,l,d,p;if(!x(n))return a&&(a.path="network_invalid_sdk_key"),null;if(this._netConfig.preventAllNetworkTraffic)return a&&(a.path="network_prevent_all_network_traffic"),null;const{method:m,body:h,retries:f,attempt:C}=n,$=n.urlConfig.endpoint;if(this._isRateLimited($))return i.Log.warn(`Request to ${$} was blocked because you are making requests too frequently.`),a&&(a.path="network_rate_limited"),null;const b=null!=C?C:1;let v=!1;const A=this._getPopulatedURL(n),E=Date.now();let w=null;const R=(0,g._isUnloading)();try{const e={method:m,body:h,headers:Object.assign({},n.headers),priority:n.priority,keepalive:R};!function(e,t){if(e.urlConfig.endpoint!==r.Endpoint._initialize)return;o.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(n,b);const t=this._leakyBucket[$];t&&(t.lastRequestTime=Date.now(),this._leakyBucket[$]=t);const i=null!==(s=this._netConfig.networkOverrideFunc)&&void 0!==s?s:fetch;let a;if(w=yield Promise.race([i(A,e).finally(()=>clearTimeout(a)),new Promise((e,t)=>{a=setTimeout(()=>{v=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!w.ok){const e=yield w.text().catch(()=>"No Text"),t=new Error(`NetworkError: ${A} ${e}`);throw t.name="NetworkError",t}const l=yield w.text();return S(n,w,b,l),this._fallbackResolver.tryBumpExpiryTime(n.sdkKey,n.urlConfig),{body:l,code:w.status}}catch(T){const o=function(e){if("string"==typeof e)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;return"Unknown Error"}(T),r=(j=v,(null!=o?o:"").includes("Timeout")||j);S(n,w,b,"",T);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(n.sdkKey,n.urlConfig,o,r))&&(n.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(n.sdkKey,n.urlConfig)),!f||b>f||!e.RETRYABLE_CODES.has(null!==(l=null==w?void 0:w.status)&&void 0!==l?l:500)){null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:T,tag:u.ErrorTag.NetworkError,requestArgs:n});const e=`A networking error occurred during ${m} request to ${A}.`;if(i.Log.error(e,o,T),null===(p=this._errorBoundary)||void 0===p||p.attachErrorIfNoneExists(e),n.preserveFailedStatusCode&&null!=w)return{body:null,code:w.status};if(null==w&&a){a.path=r?"network_request_timed_out_no_response":"network_request_exception_no_response",o&&(a.errorMessage=o);try{const e=function(e,t,n,o){var i,r,a;const s=(0,c._getWindowSafe)(),l=null==s?void 0:s.document,d="undefined"!=typeof navigator?navigator:null,p=(0,g._isUnloading)(),u=d&&"boolean"==typeof d.onLine?String(d.onLine):"unknown",m=null!==(i=null==l?void 0:l.visibilityState)&&void 0!==i?i:"unknown",h=Object.keys(null!==(r=e.headers)&&void 0!==r?r:{}).length>0,x=function(e,t){if(!t)return!0;return!e.startsWith(`${t}/`)&&!e.startsWith(`${t}?`)&&e!==t}(t,null===(a=null==s?void 0:s.location)||void 0===a?void 0:a.origin),f=null!=e.urlConfig.customUrl,S=null!=e.fallbackUrl,C=y(o,[250,1e3,5e3,1e4]),$=y(function(e){if(null==e)return 0;if("string"==typeof e)return e.length;if(e instanceof Uint8Array)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob)return e.size;return-1}(e.body),[16384,65536,262144,1048576]);let b="unknown_no_response";n?b="timeout":"false"===u?b="browser_offline":p?b="page_unloading":"hidden"===m?b="page_hidden":x&&h?b="cross_origin_custom_headers_preflight_risk":f||S?b="custom_url_no_response":o<250&&(b="immediate_network_rejection");return{bucket:b,metadata:{elapsedMsBucket:C,bodySizeBucket:$,online:u,visibilityState:m,isUnloading:String(p),crossOrigin:String(x),hasCustomUrl:String(f)}}}(n,A,r,Date.now()-E);a.diagnosticBucket=e.bucket,a.diagnosticMetadata=e.metadata}catch(I){}}return null}return yield function(e){return t(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(b),this._sendRequest(Object.assign(Object.assign({},n),{retries:f,attempt:b+1}),a)}var j})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=h.LogEventCompressionMode.Disabled),t||(t=h.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const n=Date.now(),o=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:n},i=n-o.lastRequestTime,r=Math.floor(.05*i);return o.count=Math.max(0,o.count-r),o.count>=50||(o.count+=1,o.lastRequestTime=n,this._leakyBucket[e]=o,!1)}_getPopulatedURL(e){var t;const n=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==r.Endpoint._initialize&&e.urlConfig.endpoint!==r.Endpoint._download_config_specs||(this._lastUsedInitUrl=n);const o=Object.assign({[r.NetworkParam.SdkKey]:e.sdkKey,[r.NetworkParam.SdkType]:l.SDKType._get(e.sdkKey),[r.NetworkParam.SdkVersion]:m.SDK_VERSION,[r.NetworkParam.Time]:String(Date.now()),[r.NetworkParam.SessionID]:d.SessionID.get(e.sdkKey)},e.params),i=Object.keys(o).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(o[e])}`).join("&");return`${n}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;const o=(0,c._getWindowSafe)(),a=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof a&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==o?void 0:o.btoa))try{e.body=o.btoa(a).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.StatsigEncoded]:"1"})}catch(s){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,s)}}_tryToCompressBody(e){return t(this,void 0,void 0,function*(){var t;const o=e.body;if("string"==typeof o&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,n._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const o=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,i=!0===s.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case h.LogEventCompressionMode.Disabled:return!1;case h.LogEventCompressionMode.Enabled:return!(o&&!i);case h.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(o),a=new CompressionStream("gzip"),s=a.writable.getWriter();s.write(n).catch(i.Log.error),s.close().catch(i.Log.error);const l=a.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const p=c.reduce((e,t)=>e+t.length,0),u=new Uint8Array(p);let m=0;for(const e of c)u.set(e,m),m+=e.length;e.body=u,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.IsGzipped]:"1"})}catch(a){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,a)}})}_getInternalRequestArgs(e,t){const n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),o=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&f(o,t.data),o}};const x=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),f=(e,t)=>{const{sdkKey:n,fallbackUrl:o}=e,i=p.StableID.get(n),r=d.SessionID.get(n),a=l.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:i,sessionID:r,sdkType:a,fallbackUrl:o})}))};function y(e,t){if(e<0)return"unknown";for(const n of t)if(e<n)return`<${n}`;return`>=${t[t.length-1]}`}function S(e,t,n,i,a){e.urlConfig.endpoint===r.Endpoint._initialize&&o.Diagnostics._markInitNetworkReqEnd(e.sdkKey,o.Diagnostics._getDiagnosticsData(t,n,i,a))}}(NetworkCore)),NetworkCore}function requireFlushCoordinator(){if(hasRequiredFlushCoordinator)return FlushCoordinator;hasRequiredFlushCoordinator=1;var e=FlushCoordinator&&FlushCoordinator.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(FlushCoordinator,"__esModule",{value:!0}),FlushCoordinator.FlushCoordinator=void 0;const t=requireEventRetryConstants(),n=requireEventSender(),o=requireFlushInterval(),i=requireFlushTypes(),r=requireHashing(),a=requireLog$1(),s=requireNetworkCore(),l=requireSafeJs(),c=requireSessionID(),d=requireStatsigOptionsCommon(),p=requireStorageProvider(),u=/* @__PURE__ */new Set(["network_request_timed_out_no_response","network_request_exception_no_response","event_sender_post_returned_null","event_sender_post_returned_undefined","event_sender_post_exception"]);return FlushCoordinator.FlushCoordinator=class{constructor(e,t,i,r,a,s,l,c,d,p){this._cooldownTimer=null,this._maxIntervalTimer=null,this._hasRunQuickFlush=!1,this._currentFlushPromise=null,this._creationTime=Date.now(),this._isShuttingDown=!1,this._storageKey=null,this._flushInterval=new o.FlushInterval,this._batchQueue=e,this._pendingEvents=t,this._onPrepareFlush=i,this._errorBoundary=p,this._sdkKey=r,this._loggingEnabled=d,this._eventSender=new n.EventSender(r,a,s,l,c)}setLoggingEnabled(e){this._loggingEnabled=e}setLogEventCompressionMode(e){this._eventSender.setLogEventCompressionMode(e)}startScheduledFlushCycle(){this._scheduleNextFlush()}stopScheduledFlushCycle(){this._clearAllTimers()}addEvent(e){this._pendingEvents.addToPendingEventsQueue(e),this._currentFlushPromise||this._pendingEvents.hasEventsForFullBatch()&&this.processLimitFlush()}processManualFlush(){return e(this,void 0,void 0,function*(){return this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Manual).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}),this._currentFlushPromise})}processShutdown(){return e(this,void 0,void 0,function*(){return this._isShuttingDown=!0,this._clearAllTimers(),this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Shutdown).catch(e=>{a.Log.error(`Error during shutdown flush: ${e}`)}).finally(()=>{this._currentFlushPromise=null}),this._currentFlushPromise})}_executeFlush(t){return e(this,void 0,void 0,function*(){this._clearAllTimers();try{this._prepareQueueForFlush(t);const e=this._batchQueue.takeAllBatches();if(0===e.length)return;yield Promise.all(e.map(e=>this._processOneBatch(e,t)))}finally{this._isShuttingDown||this._scheduleNextFlush()}})}checkQuickFlush(){this._hasRunQuickFlush||Date.now()-this._creationTime>t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS||(this._hasRunQuickFlush=!0,setTimeout(()=>{this.processManualFlush().catch(e=>{a.Log.warn("Quick flush failed:",e)})},t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS))}_attemptScheduledFlush(){if(this._currentFlushPromise)return void this._scheduleNextFlush();const e=this.containsAtLeastOneFullBatch(),t=this._flushInterval.hasReachedMaxInterval();if(!e&&!t)return void this._scheduleNoopPollTick();let n;this._flushInterval.markFlushAttempt(),n=e?i.FlushType.ScheduledFullBatch:i.FlushType.ScheduledMaxTime,this._currentFlushPromise=this._processNextBatch(n).then(()=>{}).catch(e=>{a.Log.error("Error during scheduled flush:",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})}processLimitFlush(){this._flushInterval.hasCompletelyRecoveredFromBackoff()&&(this._currentFlushPromise||(this._currentFlushPromise=this._processLimitFlushInternal().catch(e=>{a.Log.error("Error during limit flush",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})))}_processLimitFlushInternal(){return e(this,void 0,void 0,function*(){if(yield this._processNextBatch(i.FlushType.Limit))for(;this._flushInterval.hasCompletelyRecoveredFromBackoff()&&this.containsAtLeastOneFullBatch();){if(!(yield this._processNextBatch(i.FlushType.Limit)))break}})}_scheduleNextFlush(){if(this._clearAllTimers(),this._isShuttingDown)return;const e=Math.max(0,this._flushInterval.getTimeUntilNextFlush());this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e);const t=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t)}_clearAllTimers(){null!==this._cooldownTimer&&(clearTimeout(this._cooldownTimer),this._cooldownTimer=null),null!==this._maxIntervalTimer&&(clearTimeout(this._maxIntervalTimer),this._maxIntervalTimer=null)}_scheduleNoopPollTick(){if(this._clearAllTimers(),this._isShuttingDown)return;this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t.EventRetryConstants.TICK_INTERVAL_MS);const e=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e)}_processNextBatch(t){return e(this,void 0,void 0,function*(){this._prepareQueueForFlush(t);const e=this._batchQueue.takeNextBatch();return!!e&&this._processOneBatch(e,t)})}_processOneBatch(t,n){return e(this,void 0,void 0,function*(){if(this._loggingEnabled!==d.LoggingEnabledOption.always&&(0,l._isServerEnv)())return this._flushInterval.adjustForSuccess(),!0;const e=yield this._eventSender.sendBatch(t);return e.success?(this._flushInterval.adjustForSuccess(),!0):(this._flushInterval.adjustForFailure(),this._handleFailure(t,n,e.statusCode,e.failurePath,e.failureErrorMessage,e.failureDiagnosticBucket,e.failureDiagnosticMetadata),!1)})}_prepareQueueForFlush(e){this._onPrepareFlush();const n=this.convertPendingEventsToBatches();n>0&&(a.Log.warn(`Dropped ${n} events`),this._errorBoundary.logDroppedEvents(n,"Batch queue limit reached during batching",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:e,retries:"dropped before batching"}))}containsAtLeastOneFullBatch(){return this._pendingEvents.hasEventsForFullBatch()||this._batchQueue.hasFullBatch()}convertPendingEventsToBatches(){if(this._pendingEvents.isEmpty())return 0;const e=this._pendingEvents.takeAll();return this._batchQueue.createBatches(e)}_isRetryableBatch(e,t){return!!s.RETRYABLE_CODES.has(e)||!(-1!==e||!t||!u.has(t))}_handleFailure(e,n,o,r,s,l,c){if(n===i.FlushType.Shutdown)return a.Log.warn(`${n} flush failed during shutdown. ${e.events.length} event(s) will be saved to storage for retry in next session.`),void this._saveShutdownFailedEventsToStorage(e.events);if(!this._isRetryableBatch(o,r)){const t="non-retryable error";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped. Non-retryable error: ${o}`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}if(e.attempts>=t.EventRetryConstants.MAX_RETRY_ATTEMPTS){const t="max retry attempts exceeded";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped.`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}e.incrementAttempts();const d=this._batchQueue.requeueBatch(e);d>0&&(a.Log.warn(`Failed to requeue batch : dropped ${d} events due to full queue`),this._errorBoundary.logDroppedEvents(d,"Batch queue limit reached during requeue",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:n,retries:e.attempts}))}loadAndRetryShutdownFailedEvents(){return e(this,void 0,void 0,function*(){const e=this._getStorageKey();try{p.Storage.isReady()||(yield p.Storage.isReadyResolver());const t=this._getShutdownFailedEventsFromStorage(e);if(0===t.length)return;a.Log.debug(`Loading ${t.length} failed shutdown event(s) from storage for retry`),p.Storage.removeItem(e),t.forEach(e=>{this.addEvent(e)}),yield this.processManualFlush()}catch(t){a.Log.warn("Failed to load and retry failed shutdown events:",t)}})}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.failed_shutdown_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_saveShutdownFailedEventsToStorage(e){const n=this._getStorageKey();try{let o=[...this._getShutdownFailedEventsFromStorage(n),...e];o.length>t.EventRetryConstants.MAX_LOCAL_STORAGE&&(o=o.slice(-t.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,p._setObjectInStorage)(n,o),a.Log.debug(`Saved ${e.length} failed shutdown event(s) to storage (total stored: ${o.length})`)}catch(o){a.Log.warn("Unable to save failed shutdown events to storage:",o)}}_getShutdownFailedEventsFromStorage(e){try{const t=(0,p._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}},FlushCoordinator}var PendingEvents={},hasRequiredPendingEvents;function requirePendingEvents(){if(hasRequiredPendingEvents)return PendingEvents;hasRequiredPendingEvents=1,Object.defineProperty(PendingEvents,"__esModule",{value:!0}),PendingEvents.PendingEvents=void 0;const e=requireLog$1();return PendingEvents.PendingEvents=class{constructor(e){this._pendingEvents=[],this._batchSize=e}addToPendingEventsQueue(t){this._pendingEvents.push(t),e.Log.debug("Enqueued Event:",t)}hasEventsForFullBatch(){return this._pendingEvents.length>=this._batchSize}takeAll(){const e=this._pendingEvents;return this._pendingEvents=[],e}isEmpty(){return 0===this._pendingEvents.length}},PendingEvents}var StatsigEvent={},hasRequiredStatsigEvent;function requireStatsigEvent(){if(hasRequiredStatsigEvent)return StatsigEvent;hasRequiredStatsigEvent=1,Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",n="statsig::layer_exposure",o=(e,t,n,o,i)=>(n.bootstrapMetadata&&(o.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:r(n,o),secondaryExposures:i,time:Date.now()});StatsigEvent._isExposureEvent=({eventName:o})=>o===t||o===e||o===n;function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}StatsigEvent._createGateExposure=(e,n,r)=>{var a,s,l;const c={gate:n.name,gateValue:String(n.value),ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(c.configVersion=n.__evaluation.version),o(t,e,n.details,c,i(null!==(l=null===(s=n.__evaluation)||void 0===s?void 0:s.secondary_exposures)&&void 0!==l?l:[],r))},StatsigEvent._mapExposures=i;StatsigEvent._createConfigExposure=(t,n,r)=>{var a,s,l,c;const d={config:n.name,ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(d.configVersion=n.__evaluation.version),null!=(null===(s=n.__evaluation)||void 0===s?void 0:s.passed)&&(d.rulePassed=String(n.__evaluation.passed)),o(e,t,n.details,d,i(null!==(c=null===(l=n.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],r))};StatsigEvent._createLayerParameterExposure=(e,t,r,a)=>{var s,l,c,d,p,u,m;const h=t.__evaluation,g=!0===(null===(s=null==h?void 0:h.explicit_parameters)||void 0===s?void 0:s.includes(r));let x="",f=null!==(l=null==h?void 0:h.undelegated_secondary_exposures)&&void 0!==l?l:[];g&&(x=null!==(c=h.allocated_experiment_name)&&void 0!==c?c:"",f=null!==(d=h.secondary_exposures)&&void 0!==d?d:[]);const y=null===(p=t.__evaluation)||void 0===p?void 0:p.parameter_rule_ids,S={config:t.name,parameterName:r,ruleID:null!==(u=null==y?void 0:y[r])&&void 0!==u?u:t.ruleID,allocatedExperiment:x,isExplicitParameter:String(g)};return null!=(null===(m=t.__evaluation)||void 0===m?void 0:m.version)&&(S.configVersion=t.__evaluation.version),o(n,e,t.details,S,i(f,a))};const r=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t);return StatsigEvent}var UrlConfiguration={},hasRequiredUrlConfiguration,hasRequiredEventLogger;function requireUrlConfiguration(){if(hasRequiredUrlConfiguration)return UrlConfiguration;hasRequiredUrlConfiguration=1,Object.defineProperty(UrlConfiguration,"__esModule",{value:!0}),UrlConfiguration.UrlConfiguration=void 0;const e=requireHashing(),t=requireNetworkConfig(),n={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};return UrlConfiguration.UrlConfiguration=class{constructor(e,o,i,r){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=n[e],o&&(this.customUrl=o),!o&&i&&(this.customUrl=i.endsWith("/")?`${i}${e}`:`${i}/${e}`),r&&(this.fallbackUrls=r);const a=t.NetworkDefault[e];this.defaultUrl=`${a}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var t;const n=(null!==(t=this.fallbackUrls)&&void 0!==t?t:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+n)}},UrlConfiguration}function requireEventLogger(){if(hasRequiredEventLogger)return EventLogger;hasRequiredEventLogger=1;var e=EventLogger&&EventLogger.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventLogger,"__esModule",{value:!0}),EventLogger.EventLogger=void 0;const t=requireBatchedEventsQueue(),n=requireCacheKey(),o=requireEventRetryConstants(),i=requireFlushCoordinator(),r=requireHashing(),a=requireLog$1(),s=requireNetworkConfig(),l=requirePendingEvents(),c=requireSafeJs(),d=requireStatsigEvent(),p=requireStatsigOptionsCommon(),u=requireStorageProvider(),m=requireUrlConfiguration(),h=requireVisibilityObserving(),g={};return EventLogger.EventLogger=class x{static _safeFlushAndForget(e){var t;null===(t=g[e])||void 0===t||t.flush().catch(()=>{})}constructor(e,t,n,o,i){var r;this._sdkKey=e,this._emitter=t,this._network=n,this._options=o,this._errorBoundary=i,this._pendingEvents=null,this._batchQueue=null,this._flushCoordinator=null,this._lastExposureTimeMap={},this._nonExposedChecks={},this._isShuttingDown=!1,this._storageKey=null,this._pendingCompressionMode=null,this._loggingEnabled=null!==(r=null==o?void 0:o.loggingEnabled)&&void 0!==r?r:!0===(null==o?void 0:o.disableLogging)?p.LoggingEnabledOption.disabled:p.LoggingEnabledOption.browserOnly,(null==o?void 0:o.loggingEnabled)&&void 0!==o.disableLogging&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.");const l=null==o?void 0:o.networkConfig;this._logEventUrlConfig=new m.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._flushCoordinator?this._flushCoordinator.setLogEventCompressionMode(e):this._pendingCompressionMode=e}setLoggingEnabled(e){const t="disabled"===this._loggingEnabled,n="disabled"!==e;if(this._loggingEnabled=e,this._flushCoordinator&&this._flushCoordinator.setLoggingEnabled(e),t&&n){const e=this._loadStoredEvents();a.Log.debug(`Loaded ${e.length} stored event(s) from storage`),e.length>0&&(e.forEach(e=>{this._initFlushCoordinator().addEvent(e)}),this.flush().catch(e=>{a.Log.warn("Failed to flush events after enabling logging:",e)}))}}enqueue(e){var t;if(!this._shouldLogEvent(e))return;const n=this._normalizeEvent(e);"disabled"!==this._loggingEnabled?(this._initFlushCoordinator().addEvent(n),null===(t=this._flushCoordinator)||void 0===t||t.checkQuickFlush()):this._storeEventToStorage(n)}incrementNonExposureCount(e){var t;const n=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=n+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;const t=(0,c._isServerEnv)();if(t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled))return;const n=this._initFlushCoordinator();g[this._sdkKey]=this,t||(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?x._safeFlushAndForget(this._sdkKey):"foreground"===e&&n.startScheduledFlushCycle()}),n.loadAndRetryShutdownFailedEvents().catch(e=>{a.Log.warn("Failed to load failed shutdown events:",e)}),n.startScheduledFlushCycle()}stop(){return e(this,void 0,void 0,function*(){this._isShuttingDown=!0,this._flushCoordinator&&(yield this._flushCoordinator.processShutdown()),delete g[this._sdkKey],this._flushCoordinator=null,this._pendingEvents=null,this._batchQueue=null})}flush(){return e(this,void 0,void 0,function*(){if(this._flushCoordinator)return this._flushCoordinator.processManualFlush()})}appendAndResetNonExposedChecks(){if(0===Object.keys(this._nonExposedChecks).length)return;const e=Object.assign({},this._nonExposedChecks);this._nonExposedChecks={};const t=this._normalizeEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:e}});this._flushCoordinator&&this._flushCoordinator.addEvent(t)}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,c._isServerEnv)())return!1;if(!(0,d._isExposureEvent)(e))return!0;const o=e.user?e.user:{statsigEnvironment:void 0},i=(0,n._getUserStorageKey)(this._sdkKey,o),r=e.metadata?e.metadata:{},a=[e.eventName,i,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),s=this._lastExposureTimeMap[a],l=Date.now();return!(s&&l-s<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=l,!0)}_getCurrentPageUrl(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,c._getCurrentPageUrlSafe)()}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.pending_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_initFlushCoordinator(){var e,n;if(this._flushCoordinator)return this._flushCoordinator;const r=null!==(n=null===(e=this._options)||void 0===e?void 0:e.loggingBufferMaxSize)&&void 0!==n?n:o.EventRetryConstants.DEFAULT_BATCH_SIZE;return this._pendingEvents=new l.PendingEvents(r),this._batchQueue=new t.BatchQueue(r),this._flushCoordinator=new i.FlushCoordinator(this._batchQueue,this._pendingEvents,()=>this.appendAndResetNonExposedChecks(),this._sdkKey,this._network,this._emitter,this._logEventUrlConfig,this._options,this._loggingEnabled,this._errorBoundary),this._pendingCompressionMode&&(this._flushCoordinator.setLogEventCompressionMode(this._pendingCompressionMode),this._pendingCompressionMode=null),this._flushCoordinator}_storeEventToStorage(e){const t=this._getStorageKey();try{let n=this._getEventsFromStorage(t);n.push(e),n.length>o.EventRetryConstants.MAX_LOCAL_STORAGE&&(n=n.slice(-o.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,u._setObjectInStorage)(t,n)}catch(n){a.Log.warn("Unable to save events to storage")}}_getEventsFromStorage(e){try{const t=(0,u._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}_loadStoredEvents(){const e=this._getStorageKey(),t=this._getEventsFromStorage(e);return t.length>0&&u.Storage.removeItem(e),t}_normalizeEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},n=this._getCurrentPageUrl();return n&&(t.statsigMetadata={currentPage:n}),Object.assign(Object.assign({},e),t)}},EventLogger}var ClientInterfaces={},hasRequiredClientInterfaces;function requireClientInterfaces(){if(hasRequiredClientInterfaces)return ClientInterfaces;hasRequiredClientInterfaces=1,Object.defineProperty(ClientInterfaces,"__esModule",{value:!0}),ClientInterfaces.PrecomputedEvaluationsContextHandle=void 0;const e=requireLog$1(),t=requireSafeJs(),n=requireSessionID(),o=requireStableID();return ClientInterfaces.PrecomputedEvaluationsContextHandle=class{constructor(e,t,n,o,i,r){this._sdkKey=e,this._getOptions=t,this._getErrorBoundary=n,this._getValues=o,this._getUser=i,this._getSdkInstanceID=r}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let n=(0,t._cloneObject)("StatsigUser",this._getUser());return null==n&&(e.Log.error("Failed to clone user"),n={}),n}getSession(e=!0){return n.StatsigSession.get(this._sdkKey,e)}get stableID(){return o.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(e=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(e),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}},ClientInterfaces}var DataAdapterCore={},StatsigUser={},hasRequiredStatsigUser;function requireStatsigUser(){if(hasRequiredStatsigUser)return StatsigUser;hasRequiredStatsigUser=1,Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getUnitIDFromUser=StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const e=requireHashing(),t=requireLog$1(),n=requireSafeJs();return StatsigUser._normalizeUser=function(e,o,i){const r=(0,n._cloneObject)("StatsigUser",e);return null==r?(t.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(null!=o&&null!=o.environment?r.statsigEnvironment=o.environment:null!=i&&(r.statsigEnvironment={tier:i}),r)},StatsigUser._getFullUserHash=function(t){return t?(0,e._DJB2Object)(t):null},StatsigUser._getUnitIDFromUser=function(e,t){var n,o,i;if("string"!=typeof t)return e.userID;const r=t.toLowerCase();return"userid"!==r?null!==(o=null===(n=e.customIDs)||void 0===n?void 0:n[t])&&void 0!==o?o:null===(i=e.customIDs)||void 0===i?void 0:i[r]:e.userID},StatsigUser}var TypedJsonParse={},hasRequiredTypedJsonParse,hasRequiredDataAdapterCore;function requireTypedJsonParse(){if(hasRequiredTypedJsonParse)return TypedJsonParse;hasRequiredTypedJsonParse=1,Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const e=requireLog$1();return TypedJsonParse._typedJsonParse=function(t,n,o){try{const e=JSON.parse(t);if(e&&"object"==typeof e&&n in e)return e}catch(i){}return e.Log.error(`Failed to parse ${o}`),null},TypedJsonParse}function requireDataAdapterCore(){if(hasRequiredDataAdapterCore)return DataAdapterCore;hasRequiredDataAdapterCore=1;var e=DataAdapterCore&&DataAdapterCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DataAdapterCore,"__esModule",{value:!0}),DataAdapterCore._makeDataAdapterResult=DataAdapterCore.DataAdapterCore=void 0;const t=requireLog$1(),n=requireStableID(),o=requireStatsigUser(),i=requireStorageProvider(),r=requireTypedJsonParse();function a(e,t,n,i){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,o._getFullUserHash)(i)}}DataAdapterCore.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new s}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,o._normalizeUser)(e,this._options),n=this._getCacheKey(t),i=this._inMemoryCache.get(n,t);if(i&&this._getIsCacheValueValid(i))return i;const r=this._loadFromCache(n);return r&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(n,r,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){const n=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(n);this._inMemoryCache.add(i,a("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===n.StableID.get(this._getSdkKey())}_getDataAsyncImpl(n,o,r){return e(this,void 0,void 0,function*(){i.Storage.isReady()||(yield i.Storage.isReadyResolver());const e=null!=n?n:this.getDataSync(o),a=[this._fetchAndPrepFromNetwork(e,o,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(t,n){return e(this,void 0,void 0,function*(){const e=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(e),r=yield this._getDataAsyncImpl(null,e,n);r&&this._inMemoryCache.add(i,Object.assign(Object.assign({},r),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(o,i,s){return e(this,void 0,void 0,function*(){var e;const l=null!==(e=null==o?void 0:o.data)&&void 0!==e?e:null,c=null!=o&&this._isCachedResultValidFor204(o,i),d=yield this._fetchFromNetwork(l,i,s,c);if(!d)return t.Log.debug("No response returned for latest value"),null;const p=(0,r._typedJsonParse)(d,"has_updates","Response"),u=this._getSdkKey(),m=n.StableID.get(u);let h=null;if(!0===(null==p?void 0:p.has_updates))h=a("Network",d,m,i);else{if(!l||!1!==(null==p?void 0:p.has_updates))return null;h=a("NetworkNotModified",l,m,i)}const g=this._getCacheKey(i);return this._inMemoryCache.add(g,h,this._cacheLimit),this._writeToCache(g,h),h})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;const n=null===(t=i.Storage.getItem)||void 0===t?void 0:t.call(i.Storage,e);if(null==n)return null;const o=(0,r._typedJsonParse)(n,"source","Cached Result");return o?Object.assign(Object.assign({},o),{source:"Cache"}):null}_writeToCache(e,t){const n=JSON.stringify(t);for(let r=0;r<8;r++)try{i.Storage.setItem(e,n);break}catch(o){if(!(o instanceof Error)||!o.toString().includes("QuotaExceededError")&&!o.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw o;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var n;const o=null!==(n=(0,i._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==n?n:{};o[e]=Date.now();const r=l(o,t);for(const a of r)delete o[a],i.Storage.removeItem(a);(0,i._setObjectInStorage)(this._lastModifiedStoreKey,o)}},DataAdapterCore._makeDataAdapterResult=a;class s{constructor(){this._data={}}get(e,n){var o;const i=this._data[e],r=null==i?void 0:i.stableID,a=null===(o=null==n?void 0:n.customIDs)||void 0===o?void 0:o.stableID;return a&&r&&a!==r?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):i}add(e,t,n){const o=l(this._data,n-1);for(const i of o)delete this._data[i];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function l(e,t){const n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort((t,n)=>{const o=e[t],i=e[n];return"object"==typeof o&&"object"==typeof i?o.receivedAt-i.receivedAt:o-i}).slice(0,n.length-t)}return DataAdapterCore}var DownloadConfigSpecsResponse={},hasRequiredDownloadConfigSpecsResponse;function requireDownloadConfigSpecsResponse(){return hasRequiredDownloadConfigSpecsResponse||(hasRequiredDownloadConfigSpecsResponse=1,Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0})),DownloadConfigSpecsResponse}var ErrorBoundary={},hasRequiredErrorBoundary;function requireErrorBoundary(){return hasRequiredErrorBoundary||(hasRequiredErrorBoundary=1,function(e){var t=ErrorBoundary&&ErrorBoundary.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const n=requireLog$1(),o=requireSDKType(),i=requireStatsigMetadata();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const r="[Statsig] UnknownError";function a(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function s(e){if(!e)return{};const t={};return Object.keys(e).forEach(n=>{const o=n,i=e[o];switch(typeof i){case"number":case"bigint":case"boolean":t[String(o)]=i;break;case"string":i.length<50?t[String(o)]=i:t[String(o)]="set";break;case"object":"environment"===o?t.environment=i:"networkConfig"===o?t.networkConfig=i:t[String(o)]=null!=i?"set":"unset"}}),t}e.ErrorBoundary=class{constructor(e,t,n,o){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=o,this._seen=/* @__PURE__ */new Set}wrap(e,t){try{const n=e;(function(e){const t=/* @__PURE__ */new Set;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(e=>"function"==typeof(null==n?void 0:n[e])).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)})(n).forEach(o=>{const i=n[o];"$EB"in i||(n[o]=(...n)=>this._capture(t?`${t}:${o}`:o,()=>i.apply(e,n)),n[o].$EB=!0)})}catch(n){this._onError("eb:wrap",n)}}logError(e,t){this._onError(e,t)}logDroppedEvents(e,t,n){const o={eventCount:String(e),reason:t};n&&Object.keys(n).forEach(e=>{o[e]=String(n[e])}),this._onError("statsig::log_event_dropped_event_count",new Error(t),!0,o)}logEventRequestFailure(e,t,n,o,i,r,a,s,l){const c={eventCount:String(e),flushType:n,statusCode:String(o),reason:t,retries:String(i)};r&&(c.failurePath=r),"string"==typeof a&&a.length>0&&(c.failureErrorMessage=a),"string"==typeof s&&s.length>0&&(c.failureDiagnosticBucket=s),l&&Object.keys(l).forEach(e=>{const t=l[e];t.length>0&&(c[`failureDiagnostic_${e}`]=t)}),this._onError("statsig::log_event_failed",new Error(t),!0,c)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=a(e))}_capture(e,t){try{const n=t();return n&&n instanceof Promise?n.catch(t=>this._onError(e,t)):n}catch(n){return this._onError(e,n),null}}_onError(l,c,d=!1,p){try{n.Log.warn(`Caught error in ${l}`,{error:c});(()=>t(this,void 0,void 0,function*(){var t,n,u,m,h,g,x;const f=c||Error(r),y=f instanceof Error,S=y?f.name:"No Name",C=a(f);if(this._lastSeenError=C,!d&&this._seen.has(S))return;if(this._seen.add(S),null===(n=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===n?void 0:n.preventAllNetworkTraffic)return void(null===(u=this._emitter)||void 0===u||u.call(this,{name:"error",error:c,tag:l}));const $=o.SDKType._get(this._sdkKey),b=i.StatsigMetadataProvider.get(),v=y?f.stack:function(e){try{return JSON.stringify(e)}catch(t){return r}}(f),A=Object.assign(Object.assign({tag:l,exception:S,info:v,statsigOptions:s(this._options)},Object.assign(Object.assign({},b),{sdkType:$})),null!=p?p:{}),E=null===(m=this._options)||void 0===m?void 0:m.networkConfig,w=null!==(h=null==E?void 0:E.networkOverrideFunc)&&void 0!==h?h:fetch;yield w(null!==(g=null==E?void 0:E.sdkExceptionUrl)&&void 0!==g?g:e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($),"STATSIG-SDK-VERSION":String(b.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(A)}),null===(x=this._emitter)||void 0===x||x.call(this,{name:"error",error:c,tag:l})}))().then(()=>{}).catch(()=>{})}catch(u){}}}}(ErrorBoundary)),ErrorBoundary}var EvaluationOptions={},hasRequiredEvaluationOptions;function requireEvaluationOptions(){return hasRequiredEvaluationOptions||(hasRequiredEvaluationOptions=1,Object.defineProperty(EvaluationOptions,"__esModule",{value:!0})),EvaluationOptions}var EvaluationTypes={},hasRequiredEvaluationTypes;function requireEvaluationTypes(){return hasRequiredEvaluationTypes||(hasRequiredEvaluationTypes=1,Object.defineProperty(EvaluationTypes,"__esModule",{value:!0})),EvaluationTypes}var InitializeResponse={},hasRequiredInitializeResponse;function requireInitializeResponse(){return hasRequiredInitializeResponse||(hasRequiredInitializeResponse=1,Object.defineProperty(InitializeResponse,"__esModule",{value:!0})),InitializeResponse}var MemoKey={},hasRequiredMemoKey;function requireMemoKey(){if(hasRequiredMemoKey)return MemoKey;hasRequiredMemoKey=1,Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=/* @__PURE__ */new Set([]),t=/* @__PURE__ */new Set(["userPersistedValues"]);return MemoKey.createMemoKey=function(n,o,i){let r=`${n}|${o}`;if(!i)return r;for(const a of Object.keys(i)){if(t.has(a))return;e.has(a)?r+=`|${a}=true`:r+=`|${a}=${i[a]}`}return r},MemoKey}var OverrideAdapter={},hasRequiredOverrideAdapter;function requireOverrideAdapter(){return hasRequiredOverrideAdapter||(hasRequiredOverrideAdapter=1,Object.defineProperty(OverrideAdapter,"__esModule",{value:!0})),OverrideAdapter}var ParamStoreTypes={},hasRequiredParamStoreTypes;function requireParamStoreTypes(){return hasRequiredParamStoreTypes||(hasRequiredParamStoreTypes=1,Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0})),ParamStoreTypes}var SizeOf={},hasRequiredSizeOf;function requireSizeOf(){return hasRequiredSizeOf||(hasRequiredSizeOf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;e._fastApproxSizeOf=(t,n)=>{let o=0;const i=Object.keys(t);for(let r=0;r<i.length;r++){const a=i[r],s=t[a];if(o+=a.length,o+="object"==typeof s&&null!==s?(0,e._fastApproxSizeOf)(s,n)+2:String(s).length+1,o>=n)return o}return o}}(SizeOf)),SizeOf}var StatsigClientBase={},hasRequiredStatsigClientBase;function requireStatsigClientBase(){if(hasRequiredStatsigClientBase)return StatsigClientBase;hasRequiredStatsigClientBase=1;var e=StatsigClientBase&&StatsigClientBase.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClientBase,"__esModule",{value:!0}),StatsigClientBase.StatsigClientBase=void 0,require$_StatsigGlobal();const t=require$_StatsigGlobal(),n=requireErrorBoundary(),o=requireEventLogger(),i=requireLog$1(),r=requireMemoKey(),a=requireSafeJs(),s=requireSessionID(),l=requireStableID(),c=requireStatsigOptionsCommon(),d=requireStorageProvider();return StatsigClientBase.StatsigClientBase=class{constructor(e,r,c,p){var u,m,h,g;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const x=this.$emt.bind(this);null!=(null==p?void 0:p.logLevel)&&(i.Log.level=p.logLevel),(null==p?void 0:p.disableStorage)&&d.Storage._setDisabled(!0),(null==p?void 0:p.initialSessionID)&&s.StatsigSession.overrideInitialSessionID(p.initialSessionID,e),(null==p?void 0:p.storageProvider)&&d.Storage._setProvider(p.storageProvider),(null==p?void 0:p.enableCookies)&&l.StableID._setCookiesEnabled(e,p.enableCookies),(null==p?void 0:p.disableStableID)&&l.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=p?p:{},this._memoCache={},this.overrideAdapter=null!==(u=null==p?void 0:p.overrideAdapter)&&void 0!==u?u:null,this._errorBoundary=new n.ErrorBoundary(e,p,x),this._logger=new o.EventLogger(e,x,c,p,this._errorBoundary),this._errorBoundary.wrap(this),this._errorBoundary.wrap(r),this._errorBoundary.wrap(this._logger),c.setErrorBoundary(this._errorBoundary),this.dataAdapter=r,this.dataAdapter.attach(e,p,c),this.storageProvider=d.Storage,null===(g=null===(h=null===(m=this.overrideAdapter)||void 0===m?void 0:m.loadFromStorage)||void 0===h?void 0:h.call(m))||void 0===g||g.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,n){var o;if((0,a._isServerEnv)())return;const r=(0,t._getStatsigGlobal)(),s=null!==(o=r.instances)&&void 0!==o?o:{},l=n;null!=s[e]&&i.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");s[e]=l,r.firstInstance||(r.firstInstance=l);r.instances=s,__STATSIG__=r}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,d.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;const n=t=>{try{t(e)}catch(n){if(!0===t.__isInternal)return void this._errorBoundary.logError(`__emit:${e.name}`,n);i.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>n(e)),null===(t=this._listeners["*"])||void 0===t||t.forEach(n)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,n){!0!==(null==n?void 0:n.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(n,o)=>{if(this._options.disableEvaluationMemoization)return t(n,o);const i=(0,r.createMemoKey)(e,n,o);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(n,o)),this._memoCache[i]):t(n,o)}}},StatsigClientBase}var StatsigDataAdapter={},hasRequiredStatsigDataAdapter;function requireStatsigDataAdapter(){return hasRequiredStatsigDataAdapter||(hasRequiredStatsigDataAdapter=1,Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached"),StatsigDataAdapter}var StatsigPlugin={},hasRequiredStatsigPlugin;function requireStatsigPlugin(){return hasRequiredStatsigPlugin||(hasRequiredStatsigPlugin=1,Object.defineProperty(StatsigPlugin,"__esModule",{value:!0})),StatsigPlugin}var StatsigTypeFactories={},hasRequiredStatsigTypeFactories;function requireStatsigTypeFactories(){if(hasRequiredStatsigTypeFactories)return StatsigTypeFactories;hasRequiredStatsigTypeFactories=1,Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const e=requireLog$1(),t=requireTypingUtils();function n(e,t,n,o){var i;return{name:e,details:t,ruleID:null!==(i=null==n?void 0:n.rule_id)&&void 0!==i?i:"",__evaluation:n,value:o}}function o(e,t,o){var r,a;const s=null!==(r=null==o?void 0:o.value)&&void 0!==r?r:{};return Object.assign(Object.assign({},n(e,t,o,s)),{idType:null!==(a=null==o?void 0:o.id_type)&&void 0!==a?a:null,get:i(e,null==o?void 0:o.value)})}function i(n,o,i){return(r,a)=>{var s;const l=null!==(s=null==o?void 0:o[r])&&void 0!==s?s:null;return null==l?null!=a?a:null:null==a||(0,t._isTypeMatch)(l,a)?(null==i||i(r),l):(e.Log.warn(`Parameter type mismatch. '${n}.${r}' was found to be type '${typeof l}' but fallback/return type is '${typeof a}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=a?a:null)}}return StatsigTypeFactories._makeFeatureGate=function(e,t,o){var i;return Object.assign(Object.assign({},n(e,t,o,!0===(null==o?void 0:o.value))),{idType:null!==(i=null==o?void 0:o.id_type)&&void 0!==i?i:null})},StatsigTypeFactories._makeDynamicConfig=o,StatsigTypeFactories._makeExperiment=function(e,t,n){var i;const r=o(e,t,n);return Object.assign(Object.assign({},r),{groupName:null!==(i=null==n?void 0:n.group_name)&&void 0!==i?i:null})},StatsigTypeFactories._makeLayer=function(e,t,o,r){var a,s;return Object.assign(Object.assign({},n(e,t,o,void 0)),{get:i(e,null==o?void 0:o.value,r),groupName:null!==(a=null==o?void 0:o.group_name)&&void 0!==a?a:null,__value:null!==(s=null==o?void 0:o.value)&&void 0!==s?s:{}})},StatsigTypeFactories._mergeOverride=function(e,t,n,o){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,n,o)})},StatsigTypeFactories._makeTypedGet=i,StatsigTypeFactories}var StatsigTypes={},hasRequiredStatsigTypes;function requireStatsigTypes(){return hasRequiredStatsigTypes||(hasRequiredStatsigTypes=1,Object.defineProperty(StatsigTypes,"__esModule",{value:!0})),StatsigTypes}var StatsigUpdateDetails={},hasRequiredStatsigUpdateDetails,hasRequiredSrc$2;function requireStatsigUpdateDetails(){if(hasRequiredStatsigUpdateDetails)return StatsigUpdateDetails;hasRequiredStatsigUpdateDetails=1,Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;return StatsigUpdateDetails.createUpdateDetails=(e,t,n,o,i,r)=>({duration:n,source:t,success:e,error:o,sourceUrl:i,warnings:r}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},StatsigUpdateDetails}function requireSrc$2(){return hasRequiredSrc$2||(hasRequiredSrc$2=1,function(e){var t=src$1&&src$1.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$1&&src$1.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,require$_StatsigGlobal();const o=require$_StatsigGlobal(),i=requireDiagnostics();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});const r=requireEventLogger();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return r.EventLogger}});const a=requireLog$1();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return a.Log}});const s=requireStatsigMetadata(),l=requireStorageProvider();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),n(require$_StatsigGlobal(),e),n(requireCacheKey(),e),n(requireClientInterfaces(),e),n(requireDataAdapterCore(),e),n(requireDiagnostics(),e),n(requireDownloadConfigSpecsResponse(),e),n(requireErrorBoundary(),e),n(requireEvaluationOptions(),e),n(requireEvaluationTypes(),e),n(requireHashing(),e),n(requireInitializeResponse(),e),n(requireLog$1(),e),n(requireMemoKey(),e),n(requireNetworkConfig(),e),n(requireNetworkCore(),e),n(requireOverrideAdapter(),e),n(requireParamStoreTypes(),e),n(requireSafeJs(),e),n(requireSDKType(),e),n(requireSessionID(),e),n(requireSizeOf(),e),n(requireStableID(),e),n(requireStatsigClientBase(),e),n(requireStatsigClientEventEmitter(),e),n(requireStatsigDataAdapter(),e),n(requireStatsigEvent(),e),n(requireStatsigMetadata(),e),n(requireStatsigOptionsCommon(),e),n(requireStatsigPlugin(),e),n(requireStatsigTypeFactories(),e),n(requireStatsigTypes(),e),n(requireStatsigUser(),e),n(requireStorageProvider(),e),n(requireTypedJsonParse(),e),n(requireTypingUtils(),e),n(requireUrlConfiguration(),e),n(requireUUID(),e),n(requireVisibilityObserving(),e),n(requireStatsigUpdateDetails(),e),n(requireSDKFlags(),e),Object.assign((0,o._getStatsigGlobal)(),{Log:a.Log,SDK_VERSION:s.SDK_VERSION})}(src$1)),src$1}var StatsigContext={},NoopEvaluationsClient={},hasRequiredNoopEvaluationsClient,hasRequiredStatsigContext;function requireNoopEvaluationsClient(){if(hasRequiredNoopEvaluationsClient)return NoopEvaluationsClient;hasRequiredNoopEvaluationsClient=1,Object.defineProperty(NoopEvaluationsClient,"__esModule",{value:!0}),NoopEvaluationsClient.isNoopClient=NoopEvaluationsClient.NoopEvaluationsClient=void 0;const e=requireSrc$2(),t={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},n=()=>{},o=()=>t,i=()=>Promise.resolve(),r=()=>Promise.resolve(t),a={reason:"Error:NoClient"},s=t=>(...n)=>{const o="string"==typeof n[0]?n[0]:n[1];switch(t){case"gate":return(0,e._makeFeatureGate)(o,a,null);case"config":return(0,e._makeDynamicConfig)(o,a,null);case"layer":return(0,e._makeLayer)(o,a,null);case"param_store":return{name:o}}},l={attach:n,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:n,setDataLegacy:n,prefetchData:i},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:e.Storage,sdkInstanceID:""},d=new e.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>""),p={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:o,initializeAsync:r,shutdown:i,flush:i,updateRuntimeOptions:n,updateUserSync:o,updateUserAsync:r,getContext:()=>Object.assign({},c),getContextHandle:()=>d,checkGate:()=>!1,getFeatureGate:s("gate"),getDynamicConfig:s("config"),getExperiment:s("config"),getLayer:s("layer"),getParameterStore:s("param_store"),logEvent:n,on:n,off:n,$on:n,$emt:n,dataAdapter:l};return NoopEvaluationsClient.NoopEvaluationsClient=p,NoopEvaluationsClient.isNoopClient=function(e){return"isNoop"in e},NoopEvaluationsClient}function requireStatsigContext(){if(hasRequiredStatsigContext)return StatsigContext;hasRequiredStatsigContext=1,Object.defineProperty(StatsigContext,"__esModule",{value:!0});const e=React__default,t=requireNoopEvaluationsClient();return StatsigContext.default=(0,e.createContext)({renderVersion:0,client:t.NoopEvaluationsClient,isLoading:!0}),StatsigContext}var StatsigProvider={},useClientAsyncInit={},src={},StatsigClient={},EvaluationStore={},V1InitializeContainer={},hasRequiredV1InitializeContainer;function requireV1InitializeContainer(){if(hasRequiredV1InitializeContainer)return V1InitializeContainer;hasRequiredV1InitializeContainer=1,Object.defineProperty(V1InitializeContainer,"__esModule",{value:!0}),V1InitializeContainer.V1InitializeContainer=void 0;const e=requireSrc$2();return V1InitializeContainer.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V1InitializeContainer}var V2InitializeContainer={},hasRequiredV2InitializeContainer,hasRequiredEvaluationStore;function requireV2InitializeContainer(){if(hasRequiredV2InitializeContainer)return V2InitializeContainer;hasRequiredV2InitializeContainer=1,Object.defineProperty(V2InitializeContainer,"__esModule",{value:!0}),V2InitializeContainer.V2InitializeContainer=void 0;const e=requireSrc$2();return V2InitializeContainer.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,n,o;const i=this._getResultFromLookup(this._values.feature_gates,e);return i?{name:e,value:!0===i.v,rule_id:null!==(t=i.r)&&void 0!==t?t:"default",secondary_exposures:null!==(n=i.s)&&void 0!==n?n:[],id_type:null!==(o=i.i)&&void 0!==o?o:""}:null}getConfig(e){var t,n,o,i;const r=this._getResultFromLookup(this._values.dynamic_configs,e);return r?{name:e,value:null!==(t=this._values.values[r.v])&&void 0!==t?t:{},rule_id:r.r,secondary_exposures:null!==(n=r.s)&&void 0!==n?n:[],id_type:null!==(o=r.i)&&void 0!==o?o:"",is_user_in_experiment:!0===r.ue,passed:!0===r.p,group_name:null!==(i=r.gn)&&void 0!==i?i:void 0,is_experiment_active:!0===r.ea,group:r.r,is_device_based:"stableID"===r.i}:null}getLayer(e){var t,n,o,i,r,a;const s=this._getResultFromLookup(this._values.layer_configs,e);return s?{name:e,value:null!==(t=this._values.values[s.v])&&void 0!==t?t:{},rule_id:s.r,secondary_exposures:null!==(n=s.s)&&void 0!==n?n:[],is_user_in_experiment:!0===s.ue,group_name:null!==(o=s.gn)&&void 0!==o?o:void 0,is_experiment_active:!0===s.ea,group:s.r,is_device_based:"stableID"===s.i,allocated_experiment_name:null!==(i=s.ae)&&void 0!==i?i:"",explicit_parameters:null!==(r=s.ep)&&void 0!==r?r:[],undelegated_secondary_exposures:null!==(a=s.us)&&void 0!==a?a:[],parameter_rule_ids:s.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V2InitializeContainer}function requireEvaluationStore(){if(hasRequiredEvaluationStore)return EvaluationStore;hasRequiredEvaluationStore=1,Object.defineProperty(EvaluationStore,"__esModule",{value:!0});const e=requireSrc$2(),t=requireV1InitializeContainer(),n=requireV2InitializeContainer();return EvaluationStore.default=class{constructor(e,t){this._sdkKey=e,this._options=t,this._valuesForExternalUse=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=/* @__PURE__ */new Set}reset(){this._values=null,this._valuesForExternalUse=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._valuesForExternalUse}setValues(o,i){var r,a;if(!o)return!1;const s=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse");if(null==s)return!1;if(this._source=o.source,!0!==(null==s?void 0:s.has_updates))return!0;return(null!==(r=s.time)&&void 0!==r?r:0)<this._lcut||(this._valuesForExternalUse=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse"),this._lcut=s.time,this._receivedAt=o.receivedAt,"init-v2"===s.response_format?this._values=new n.V2InitializeContainer(s):this._values=new t.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(o.source,s),o.source&&s.user&&this._setWarningState(i,s),e.SDKFlags.setFlags(this._sdkKey,null!==(a=s.sdk_flags)&&void 0!==a?a:{})),!0}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){const t=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(t)}getConfig(e){const t=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(t)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){const t=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(t)}getParamStore(e){const t=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(t)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;const n={};return t.user&&(n.user=t.user),t.sdkInfo&&(n.generatorSDKInfo=t.sdkInfo),n.lcut=t.time,n}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(t,n){var o,i,r;const a=e.StableID.get(this._sdkKey);if((null===(o=t.customIDs)||void 0===o?void 0:o.stableID)===a||!(null===(i=t.customIDs)||void 0===i?void 0:i.stableID)&&!a){if("user"in n){let o=n.user,i=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(null===(r=this._options)||void 0===r?void 0:r.disableStableID)&&(i=Object.assign(Object.assign({},i),{customIDs:Object.assign(Object.assign({},i.customIDs),{stableID:void 0})}),o=Object.assign(Object.assign({},o),{customIDs:Object.assign(Object.assign({},o.customIDs),{stableID:void 0})})),(0,e._getFullUserHash)(i)!==(0,e._getFullUserHash)(o)&&this._warnings.add("PartialUserMatch")}}else this._warnings.add("StableIDMismatch")}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};const e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,n;const o=this.getCurrentSourceDetails();let i=o.reason;const r=null!==(t=o.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&r.length>0&&(i+=r[0]),"Uninitialized"!==i&&"NoValues"!==i){i=`${i}:${e?"Unrecognized":"Recognized"}`}const a="Bootstrap"===this._source&&null!==(n=this._bootstrapMetadata)&&void 0!==n?n:void 0;return a&&(o.bootstrapMetadata=a),Object.assign(Object.assign({},o),{reason:i})}},EvaluationStore}var Network={},EvaluationResponseDeltas={},hasRequiredEvaluationResponseDeltas,hasRequiredNetwork;function requireEvaluationResponseDeltas(){if(hasRequiredEvaluationResponseDeltas)return EvaluationResponseDeltas;hasRequiredEvaluationResponseDeltas=1,Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const e=requireSrc$2();function t(e,t){null==e||e.forEach(e=>{delete t[e]})}return EvaluationResponseDeltas._resolveDeltasResponse=function(n,o){const i=(0,e._typedJsonParse)(o,"checksum","DeltasEvaluationResponse");if(!i)return{hadBadDeltaChecksum:!0};const r=function(e){const n=e;return t(e.deleted_gates,n.feature_gates),delete n.deleted_gates,t(e.deleted_configs,n.dynamic_configs),delete n.deleted_configs,t(e.deleted_layers,n.layer_configs),delete n.deleted_layers,n}(function(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{feature_gates:Object.assign(Object.assign({},e.feature_gates),t.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),t.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),t.dynamic_configs)})}(n,i)),a=(0,e._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2);return a===i.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:r,badFullResponse:i.deltas_full_response}},EvaluationResponseDeltas}function requireNetwork(){if(hasRequiredNetwork)return Network;hasRequiredNetwork=1;var e=Network&&Network.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationResponseDeltas();class o extends t.NetworkCore{constructor(e,n){super(e,n);const o=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,null==o?void 0:o.initializeUrl,null==o?void 0:o.api,null==o?void 0:o.initializeFallbackUrls)}fetchEvaluations(n,o,i,r,a){return e(this,void 0,void 0,function*(){var e,s,l,c,d,p;const u=o?(0,t._typedJsonParse)(o,"has_updates","InitializeResponse"):null;let m={user:r,hash:null!==(l=null===(s=null===(e=this._option)||void 0===e?void 0:e.networkConfig)||void 0===s?void 0:s.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==u?void 0:u.has_updates){const e=(null==u?void 0:u.hash_used)!==(null!==(p=null===(d=null===(c=this._option)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==p?p:"djb2");m=Object.assign(Object.assign({},m),{sinceTime:a&&!e?u.time:0,previousDerivedFields:"derived_fields"in u&&a?u.derived_fields:{},deltasResponseRequested:!0,full_checksum:u.full_checksum,partialUserMatchSinceTime:e?0:u.time})}return this._fetchEvaluations(n,u,m,i)})}_fetchEvaluations(t,o,i,r){return e(this,void 0,void 0,function*(){var e,a;const s=yield this.post({sdkKey:t,urlConfig:this._initializeUrlConfig,data:i,retries:2,isStatsigEncodable:!0,priority:r});if(204===(null==s?void 0:s.code))return'{"has_updates": false}';if(200!==(null==s?void 0:s.code))return null!==(e=null==s?void 0:s.body)&&void 0!==e?e:null;if(!0!==(null==o?void 0:o.has_updates)||!0!==(null===(a=s.body)||void 0===a?void 0:a.includes('"is_delta":true'))||!0!==i.deltasResponseRequested)return s.body;const l=(0,n._resolveDeltasResponse)(o,s.body);return"string"==typeof l?l:this._fetchEvaluations(t,o,Object.assign(Object.assign(Object.assign({},i),l),{deltasResponseRequested:!1}),r)})}}return Network.default=o,Network}var ParamStoreGetterFactory={},hasRequiredParamStoreGetterFactory;function requireParamStoreGetterFactory(){if(hasRequiredParamStoreGetterFactory)return ParamStoreGetterFactory;hasRequiredParamStoreGetterFactory=1,Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const e=requireSrc$2(),t={disableExposureLog:!0};function n(e){return null==e||!1===e.disableExposureLog}function o(t,n){return null!=n&&!(0,e._isTypeMatch)(t,n)}return ParamStoreGetterFactory._makeParamStoreGetter=function(i,r,a){return(s,l)=>{if(null==r)return l;const c=r[s];if(null==c||null!=l&&(0,e._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e){return e.value}(c);case"gate":return function(e,o,i){return e.getFeatureGate(o.gate_name,n(i)?void 0:t).value?o.pass_value:o.fail_value}(i,c,a);case"dynamic_config":return function(e,i,r,a){const s=e.getDynamicConfig(i.config_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"experiment":return function(e,i,r,a){const s=e.getExperiment(i.experiment_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"layer":return function(e,i,r,a){const s=e.getLayer(i.layer_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);default:return l}}},ParamStoreGetterFactory}var StatsigEvaluationsDataAdapter={},hasRequiredStatsigEvaluationsDataAdapter,hasRequiredStatsigClient,hasRequiredSrc$1;function requireStatsigEvaluationsDataAdapter(){if(hasRequiredStatsigEvaluationsDataAdapter)return StatsigEvaluationsDataAdapter;hasRequiredStatsigEvaluationsDataAdapter=1;var e=StatsigEvaluationsDataAdapter&&StatsigEvaluationsDataAdapter.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=void 0;const t=requireSrc$2(),n=requireNetwork();let o=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,o){super.attach(e,t,o),null!==o&&o instanceof n.default?this._network=o:this._network=new n.default(null!=t?t:{})}getDataAsync(e,n,o){return this._getDataAsyncImpl(e,(0,t._normalizeUser)(n,this._options),o)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){const n=(0,t._typedJsonParse)(e,"has_updates","data");n&&"user"in n?super.setData(e,n.user):t.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(t,n,o,i){return e(this,void 0,void 0,function*(){var e;const r=yield null===(e=this._network)||void 0===e?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==o?void 0:o.priority,n,i);return null!=r?r:null})}_getCacheKey(e){var n;const o=(0,t._getStorageKey)(this._getSdkKey(),e,null===(n=this._options)||void 0===n?void 0:n.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${o}`}_isCachedResultValidFor204(e,n){return null!=e.fullUserHash&&e.fullUserHash===(0,t._getFullUserHash)(n)}};return StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=o,StatsigEvaluationsDataAdapter}function requireStatsigClient(){if(hasRequiredStatsigClient)return StatsigClient;hasRequiredStatsigClient=1;var e=StatsigClient&&StatsigClient.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClient,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationStore(),o=requireNetwork(),i=requireParamStoreGetterFactory(),r=requireStatsigEvaluationsDataAdapter();let a=class a extends t.StatsigClientBase{static instance(e){const n=(0,t._getStatsigGlobal)().instance(e);return n instanceof a?n:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new a(null!=e?e:"",{}))}constructor(e,i,a=null){var s,l;t.SDKType._setClientType(e,"javascript-client");const c=new o.default(a,e=>{this.$emt(e)});super(e,null!==(s=null==a?void 0:a.dataAdapter)&&void 0!==s?s:new r.StatsigEvaluationsDataAdapter,c,a),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new n.default(e,null!=a?a:null),this._network=c,this._user=this._configureUser(i,a),this._sdkInstanceID=(0,t.getUUID)(),this._contextHandle=new t.PrecomputedEvaluationsContextHandle(e,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID);const d=null!==(l=null==a?void 0:a.plugins)&&void 0!==l?l:[];for(const t of d)t.bind(this)}initializeSync(e){var n;return"Uninitialized"!==this.loadingStatus?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(t){return e(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(t)),this._initializePromise})}updateUserSync(e,t){const n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(o){const e=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,n,o){var i;const r=[...null!==(i=this._store.getWarnings())&&void 0!==i?i:[]];this._resetForUser(e);const a=this.dataAdapter.getDataSync(this._user);null==a&&r.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);const s=null==n?void 0:n.disableBackgroundCacheRefresh;return!0===s||null==s&&"Bootstrap"===(null==a?void 0:a.source)||this._runPostUpdate(null!=a?a:null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),r)}updateUserAsync(t,n){return e(this,void 0,void 0,function*(){const e=performance.now();try{return yield this._updateUserAsyncImpl(t,n)}catch(o){const t=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(t,e)}})}_updateUserAsyncImpl(n,o){return e(this,void 0,void 0,function*(){this._resetForUser(n);const e=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let i=this.dataAdapter.getDataSync(e);if(this._store.setValues(i,this._user),this._setStatus("Loading",i),i=yield this.dataAdapter.getDataAsync(i,e,o),e!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=i&&(t.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(i,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(i),r||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());const a=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(r,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let e=(0,t._cloneObject)("StatsigUser",this._user);return null==e&&(t.Log.error("Failed to clone user"),e={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:e,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){const o="string"==typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:o}),this._logger.enqueue(Object.assign(Object.assign({},o),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(n){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,n)})}_createErrorUpdateDetails(e,n){var o;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-n,e,null,[...null!==(o=this._store.getWarnings())&&void 0!==o?o:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,n){this.dataAdapter.getDataAsync(e,n,{priority:"low"}).catch(e=>{t.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,n){var o,i,r;const a=(0,t._normalizeUser)(e,n),s=null===(o=a.customIDs)||void 0===o?void 0:o.stableID;if(s){const e=null===(r=(i=this.storageProvider).isReadyResolver)||void 0===r?void 0:r.call(i);e?e.then(()=>t.StableID.setOverride(s,this._sdkKey),()=>t.StableID.setOverride(s,this._sdkKey)):t.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(a.analyticsOnlyMetadata=Object.assign(Object.assign({},a.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),a}_getFeatureGateImpl(e,n){var o,i;const{result:r,details:a}=this._store.getGate(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Gate"),this._checkInitializationStatus(a.reason);const s=(0,t._makeFeatureGate)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getGateOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createGateExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,n){var o,i;const{result:r,details:a}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Dynamic config"),this._checkInitializationStatus(a.reason);const s=(0,t._makeDynamicConfig)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getDynamicConfigOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,n){var o,i,r,a;const{result:s,details:l}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==s?void 0:s.id_type,e,"Experiment"),this._checkInitializationStatus(l.reason);const c=(0,t._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,t._mapExposures)(null!==(i=null===(o=c.__evaluation)||void 0===o?void 0:o.secondary_exposures)&&void 0!==i?i:[],this._store.getExposureMapping()));const d=null===(a=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getExperimentOverride)||void 0===a?void 0:a.call(r,c,this._user,n),p=null!=d?d:c;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,p,this._store.getExposureMapping()),n),this.$emt({name:"experiment_evaluation",experiment:p}),p}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,n){var o,i,r;const{result:a,details:s}=this._store.getLayer(e),l=(0,t._makeLayer)(e,s,a),c=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getLayerOverride)||void 0===i?void 0:i.call(o,l,this._user,n);(null==n?void 0:n.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,t._mergeOverride)(l,c,null!==(r=null==c?void 0:c.__value)&&void 0!==r?r:l.__value,o=>{(null==n?void 0:n.disableExposureLog)||this._enqueueExposure(e,(0,t._createLayerParameterExposure)(this._user,d,o,this._store.getExposureMapping()),n)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,o;const{result:r,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:r,get:(0,i._makeParamStoreGetter)(this,r,t)},l=null===(o=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getParamStoreOverride)||void 0===o?void 0:o.call(n,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,i._makeParamStoreGetter)(this,l.config,t)),s}_checkUserHasIdForEvaluation(e,n,o){e&&((0,t._getUnitIDFromUser)(this._user,e)||t.Log.warn(`The user does not have the required id_type "${e}" for ${o} "${n}"`))}_checkInitializationStatus(e){("Uninitialized"===e||e.startsWith("Loading"))&&t.Log.warn(`SDK initialization has not completed. Reason: ${e}`)}};return StatsigClient.default=a,StatsigClient}function requireSrc$1(){return hasRequiredSrc$1||(hasRequiredSrc$1=1,function(e){var t=src&&src.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src&&src.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const o=requireSrc$2(),i=requireStatsigClient();e.StatsigClient=i.default,n(requireSrc$2(),e);const r=Object.assign((0,o._getStatsigGlobal)(),{StatsigClient:i.default});e.default=r}(src)),src}var useStatsigInternalClientFactoryAsync={},hasRequiredUseStatsigInternalClientFactoryAsync,hasRequiredUseClientAsyncInit,hasRequiredStatsigProvider;function requireUseStatsigInternalClientFactoryAsync(){if(hasRequiredUseStatsigInternalClientFactoryAsync)return useStatsigInternalClientFactoryAsync;hasRequiredUseStatsigInternalClientFactoryAsync=1,Object.defineProperty(useStatsigInternalClientFactoryAsync,"__esModule",{value:!0}),useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=void 0;const e=React__default,t=requireSrc$2();return useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=function(n,o){const i=(0,e.useMemo)(()=>{var e;return null!==(e=(0,t._getInstance)(o.sdkKey))&&void 0!==e?e:n(o)},[]),[r,a]=(0,e.useState)("Ready"!==i.loadingStatus);return(0,e.useMemo)(()=>{"Ready"!==i.loadingStatus&&i.initializeAsync().catch(t.Log.error).finally(()=>a(!1))},[]),{client:i,isLoading:r}},useStatsigInternalClientFactoryAsync}function requireUseClientAsyncInit(){if(hasRequiredUseClientAsyncInit)return useClientAsyncInit;hasRequiredUseClientAsyncInit=1,Object.defineProperty(useClientAsyncInit,"__esModule",{value:!0}),useClientAsyncInit.useClientAsyncInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryAsync();return useClientAsyncInit.useClientAsyncInit=function(n,o,i=null){return(0,t.useStatsigInternalClientFactoryAsync)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,statsigOptions:i})},useClientAsyncInit}function requireStatsigProvider(){if(hasRequiredStatsigProvider)return StatsigProvider;hasRequiredStatsigProvider=1,Object.defineProperty(StatsigProvider,"__esModule",{value:!0}),StatsigProvider.StatsigProvider=void 0;const e=requireJsxRuntime(),t=React__default,n=requireSrc$2(),o=requireStatsigContext(),i=requireUseClientAsyncInit();function r(n){const[r,a]=(0,t.useState)(0),c=(0,i.useClientAsyncInit)(n.sdkKey,n.user,n.options).client,[d,p]=(0,t.useState)(!l(c));s(c,a,p);const u=(0,t.useMemo)(()=>({renderVersion:r,client:c,isLoading:d}),[r,c,d]);return(0,e.jsx)(o.default.Provider,{value:u,children:null!=n.loadingComponent&&u.isLoading?n.loadingComponent:n.children})}function a(n){const[i,r]=(0,t.useState)(0),a=n.client,[c,d]=(0,t.useState)(!l(a));s(a,r,d);const p=(0,t.useMemo)(()=>({renderVersion:i,client:a,isLoading:c}),[i,a,c]);return(0,e.jsx)(o.default.Provider,{value:p,children:null!=n.loadingComponent&&p.isLoading?n.loadingComponent:n.children})}function s(e,o,i){(0,t.useEffect)(()=>{const t=()=>{o(e=>e+1),i(!l(e))};return n.SDKType._setBindingType("react"),e.$on("values_updated",t),()=>{e.flush().catch(e=>n.Log.error("An error occurred during flush",e)),e.off("values_updated",t)}},[e,o])}function l(e){return"isNoop"in e||"Ready"===e.loadingStatus}return StatsigProvider.StatsigProvider=function(t){return"client"in t?(("sdkKey"in t||"user"in t)&&n.Log.warn("Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored."),(0,e.jsx)(a,Object.assign({},t))):(0,e.jsx)(r,Object.assign({},t))},StatsigProvider}var useClientBootstrapInit={},useStatsigInternalClientFactoryBootstrap={},hasRequiredUseStatsigInternalClientFactoryBootstrap,hasRequiredUseClientBootstrapInit;function requireUseStatsigInternalClientFactoryBootstrap(){if(hasRequiredUseStatsigInternalClientFactoryBootstrap)return useStatsigInternalClientFactoryBootstrap;hasRequiredUseStatsigInternalClientFactoryBootstrap=1,Object.defineProperty(useStatsigInternalClientFactoryBootstrap,"__esModule",{value:!0}),useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=void 0;const e=React__default,t=requireSrc$2();return useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=function(n,o){const i=(0,e.useRef)((0,t._getInstance)(o.sdkKey));return(0,e.useMemo)(()=>{if(i.current)return i.current;const e=n(o);return i.current=e,o.useLegacyFormat?e.dataAdapter.setDataLegacy(o.initialValues,o.initialUser):e.dataAdapter.setData(o.initialValues),e.initializeSync(),e},[])},useStatsigInternalClientFactoryBootstrap}function requireUseClientBootstrapInit(){if(hasRequiredUseClientBootstrapInit)return useClientBootstrapInit;hasRequiredUseClientBootstrapInit=1,Object.defineProperty(useClientBootstrapInit,"__esModule",{value:!0}),useClientBootstrapInit.useClientBootstrapInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryBootstrap();return useClientBootstrapInit.useClientBootstrapInit=function(n,o,i,r=null,a){return(0,t.useStatsigInternalClientFactoryBootstrap)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,initialValues:i,statsigOptions:r,useLegacyFormat:a})},useClientBootstrapInit}var useDynamicConfig={},hasRequiredUseDynamicConfig;function requireUseDynamicConfig(){if(hasRequiredUseDynamicConfig)return useDynamicConfig;hasRequiredUseDynamicConfig=1,Object.defineProperty(useDynamicConfig,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useDynamicConfig.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${i}'.`),n.NoopEvaluationsClient.getDynamicConfig(i,r)):a.getDynamicConfig(i,r),[i,a,s,...r?Object.values(r):[]])},useDynamicConfig}var useExperiment={},hasRequiredUseExperiment;function requireUseExperiment(){if(hasRequiredUseExperiment)return useExperiment;hasRequiredUseExperiment=1,Object.defineProperty(useExperiment,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useExperiment.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${i}'.`),n.NoopEvaluationsClient.getExperiment(i,r)):a.getExperiment(i,r),[i,a,s,...r?Object.values(r):[]])},useExperiment}var useFeatureGate={},hasRequiredUseFeatureGate;function requireUseFeatureGate(){if(hasRequiredUseFeatureGate)return useFeatureGate;hasRequiredUseFeatureGate=1,Object.defineProperty(useFeatureGate,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useFeatureGate.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.getFeatureGate(i,r)):a.getFeatureGate(i,r),[i,a,s,...r?Object.values(r):[]])},useFeatureGate}var useGateValue={},hasRequiredUseGateValue;function requireUseGateValue(){if(hasRequiredUseGateValue)return useGateValue;hasRequiredUseGateValue=1,Object.defineProperty(useGateValue,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useGateValue.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.checkGate(i,r)):a.checkGate(i,r),[i,a,s,...r?Object.values(r):[]])},useGateValue}var useLayer={},hasRequiredUseLayer;function requireUseLayer(){if(hasRequiredUseLayer)return useLayer;hasRequiredUseLayer=1,Object.defineProperty(useLayer,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useLayer.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${i}'.`),n.NoopEvaluationsClient.getLayer(i,r)):a.getLayer(i,r),[i,a,s,...r?Object.values(r):[]])},useLayer}var useParameterStore={},hasRequiredUseParameterStore;function requireUseParameterStore(){if(hasRequiredUseParameterStore)return useParameterStore;hasRequiredUseParameterStore=1,Object.defineProperty(useParameterStore,"__esModule",{value:!0});const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useParameterStore.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${i}'.`),n.NoopEvaluationsClient.getParameterStore(i,r)):a.getParameterStore(i,r),[i,a,s,...r?Object.values(r):[]])},useParameterStore}var useStatsigClient={},hasRequiredUseStatsigClient;function requireUseStatsigClient(){if(hasRequiredUseStatsigClient)return useStatsigClient;hasRequiredUseStatsigClient=1,Object.defineProperty(useStatsigClient,"__esModule",{value:!0}),useStatsigClient.useStatsigClient=void 0;const e=React__default,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useStatsigClient.useStatsigClient=function(){const{client:i,renderVersion:r,isLoading:a}=(0,e.useContext)(o.default),s=(0,e.useMemo)(()=>(0,n.isNoopClient)(i)?(t.Log.warn("Attempting to retrieve a StatsigClient but none was set."),n.NoopEvaluationsClient):i,[i,r]),l=[s,r],c=(0,e.useCallback)((e,t)=>s.checkGate(e,t),l),d=(0,e.useCallback)((e,t)=>s.getFeatureGate(e,t),l),p=(0,e.useCallback)((e,t)=>s.getDynamicConfig(e,t),l),u=(0,e.useCallback)((e,t)=>s.getExperiment(e,t),l),m=(0,e.useCallback)((e,t)=>s.getLayer(e,t),l),h=(0,e.useCallback)((e,t)=>s.getParameterStore(e,t),l),g=(0,e.useCallback)((e,t,n)=>"string"==typeof e?s.logEvent(e,t,n):s.logEvent(e),l);return(0,e.useMemo)(()=>({client:s,checkGate:c,getFeatureGate:d,getDynamicConfig:p,getExperiment:u,getLayer:m,getParameterStore:h,logEvent:g,isLoading:a}),[s,c,d,p,u,m,h,g,a])},useStatsigClient}var useStatsigUser={},hasRequiredUseStatsigUser,hasRequiredSrc;function requireUseStatsigUser(){if(hasRequiredUseStatsigUser)return useStatsigUser;hasRequiredUseStatsigUser=1,Object.defineProperty(useStatsigUser,"__esModule",{value:!0}),useStatsigUser.useStatsigUser=void 0;const e=React__default,t=requireStatsigContext(),n=requireUseStatsigClient();function o(e){return e.getContextHandle().user}return useStatsigUser.useStatsigUser=function(){const{client:i}=(0,n.useStatsigClient)(),{renderVersion:r}=(0,e.useContext)(t.default);return{user:(0,e.useMemo)(()=>o(i),[i,r]),updateUserSync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserSync(e)),[i]),updateUserAsync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserAsync(e)),[i])}},useStatsigUser}function requireSrc(){return hasRequiredSrc||(hasRequiredSrc=1,function(e){var t=src$2&&src$2.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$2&&src$2.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.useStatsigUser=e.useStatsigInternalClientFactoryBootstrap=e.useStatsigInternalClientFactoryAsync=e.useStatsigClient=e.useParameterStore=e.useLayer=e.useGateValue=e.useFeatureGate=e.useExperiment=e.useDynamicConfig=e.useClientBootstrapInit=e.useClientAsyncInit=e.StatsigProvider=e.StatsigContext=void 0;const o=requireSrc$2(),i=requireStatsigContext();e.StatsigContext=i.default;const r=requireStatsigProvider();Object.defineProperty(e,"StatsigProvider",{enumerable:!0,get:function(){return r.StatsigProvider}});const a=requireUseClientAsyncInit();Object.defineProperty(e,"useClientAsyncInit",{enumerable:!0,get:function(){return a.useClientAsyncInit}});const s=requireUseClientBootstrapInit();Object.defineProperty(e,"useClientBootstrapInit",{enumerable:!0,get:function(){return s.useClientBootstrapInit}});const l=requireUseDynamicConfig();e.useDynamicConfig=l.default;const c=requireUseExperiment();e.useExperiment=c.default;const d=requireUseFeatureGate();e.useFeatureGate=d.default;const p=requireUseGateValue();e.useGateValue=p.default;const u=requireUseLayer();e.useLayer=u.default;const m=requireUseParameterStore();e.useParameterStore=m.default;const h=requireUseStatsigClient();Object.defineProperty(e,"useStatsigClient",{enumerable:!0,get:function(){return h.useStatsigClient}});const g=requireUseStatsigInternalClientFactoryAsync();Object.defineProperty(e,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return g.useStatsigInternalClientFactoryAsync}});const x=requireUseStatsigInternalClientFactoryBootstrap();Object.defineProperty(e,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return x.useStatsigInternalClientFactoryBootstrap}});const f=requireUseStatsigUser();Object.defineProperty(e,"useStatsigUser",{enumerable:!0,get:function(){return f.useStatsigUser}}),n(requireSrc$1(),e),Object.assign((0,o._getStatsigGlobal)(),{StatsigContext:i.default,StatsigProvider:r.StatsigProvider,useClientAsyncInit:a.useClientAsyncInit,useClientBootstrapInit:s.useClientBootstrapInit,useDynamicConfig:l.default,useExperiment:c.default,useFeatureGate:d.default,useGateValue:p.default,useLayer:u.default,useParameterStore:m.default,useStatsigClient:h.useStatsigClient,useStatsigInternalClientFactoryAsync:g.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:x.useStatsigInternalClientFactoryBootstrap,useStatsigUser:f.useStatsigUser})}(src$2)),src$2}var srcExports=requireSrc(),FeatureGatesNamesCockpit=/* @__PURE__ */(e=>(e.enableZeniGPTFeatureForMonthEndEmail="zeni_gpt_for_month_end_email_enabled",e.isBirdsEyeViewEnabled="is_birds_eye_view_enabled",e.isReviewTabVendorColumnEnabled="review_vendor_column_enabled",e.enableSendingMonthEndEmail="sending_month_end_email_enabled",e))(FeatureGatesNamesCockpit||{}),FeatureGatesNamesWebApp=/* @__PURE__ */(e=>(e.isVendorMagicLinkFeatureEnabled="is_vendor_magic_link_feature_enabled",e.billPaySetupShowInternationalPaymentByWise="bill_pay_setup_show_international_payment_by_wise",e.isDepositAccountsFeatureEnabled="is_deposit_accounts_feature_enabled",e.isLimitedCategoryForReimbursement="is_limited_category_for_reimbursements_enabled",e.isBillPayLocalCurrencyFeatureEnabled="is_bill_pay_local_currency_feature_enabled",e.isOpexByVendorFeatureEnabled="is_opex_by_vendor_feature_enabled",e.isInternationalPaymentShaVsOurFeatureEnabled="is_international_sha_vs_our_feature_enabled",e.isApAgingFeatureEnabled="is_ap_aging_feature_enabled",e.isArAgingFeatureEnabled="is_ar_aging_feature_enabled",e.isChargeCardFeatureEnabled="is_charge_card_feature_enabled",e.isEarlyPayFeatureEnabled="is_early_pay_feature_enabled",e.isVendorReviewFeatureEnabled="is_vendor_review_feature_enabled",e.isVendorRecommendationFeatureEnabled="is_vendor_recommendation_feature_enabled",e.isShowDeletedBillsFeatureEnabled="is_show_deleted_bills_feature_enabled",e.isShowDeletedReimbursementsFeatureEnabled="is_show_deleted_reimbursements_feature_enabled",e.isRecurringBillsFeatureEnabled="is_recurring_bills_feature_enabled",e.isScheduledJEPrepaidExpensesFeatureEnabled="is_scheduled_je_prepaid_expenses_feature_enabled",e.isScheduledJEFixedAssetsFeatureEnabled="is_scheduled_je_fixed_assets_feature_enabled",e.isScheduledJEAccruedExpensesFeatureEnabled="is_scheduled_je_accrued_expenses_feature_enabled",e.isReferralFeatureEnabled="is_referral_feature_enabled",e.isSettingsFeatureEnabled="is_settings_feature_enabled",e.isVendorBulkUpdateOnTransactionEnabled="is_vendor_bulk_update_on_transaction_enabled",e.isCashbackFeatureEnabled="is_cashback_feature_enabled",e.isBillPayBulkActionEnabled="is_bill_pay_bulk_action_enabled",e.isFiling1099FeatureEnabled="is_filing_1099_feature_enabled",e.isReimbursementBulkActionEnabled="is_reimbursement_bulk_action_enabled",e.isExpenseAutomationEnabled="is_expense_automation_enabled",e.isRevenueAutomationEnabled="is_revenue_automation_enabled",e.isIssuePhysicalCardEnabled="is_issue_physical_card_enabled",e.isTaskTemplatesEnabled="is_task_templates_enabled",e.isTaskManagerCustomerUserAccessEnabled="is_task_manager_customer_user_access_enabled",e.isShaDisabled="is_sha_disabled",e.isOurDisabled="is_our_disabled",e.isBillPayDetectInsufficientFundsEnabled="is_bill_pay_detect_insufficient_funds_enabled",e.isExpenseAutomationEnabledV2="is_expense_automation_enabled_v2",e.isDebitCardFeatureEnabled="is_debit_card_feature_enabled",e.isRealtimeInsightsFeatureEnabled="is_realtime_insights_feature_enabled",e.isTreasuryEnabled="is_treasury_enabled",e.isInvoicingFeatureEnabled="is_invoicing_feature_enabled",e.isChainOfThoughtEnabled="is_chain_of_thought_enabled",e.isRecommendationFeedbackEnabled="is_recommendation_feedback_enabled",e.isDashboardSidebarHalloweenAnimationEnabled="is_dashboard_sidebar_halloween_animation_enabled",e.isDashboardSidebarThanksGivingAnimationEnabled="is_dashboard_sidebar_thanksgiving_animation_enabled",e.isDashboardSidebarChristmasAnimationEnabled="is_dashboard_sidebar_christmas_animation_enabled",e.isDashboardSidebarNewYearAnimationEnabled="is_dashboard_sidebar_new_year_animation_enabled",e.isExpenseAutomationSearchAndFilterEnabled="is_expense_automation_search_and_filter_enabled",e.isChargeCardPaymentHistoryFeatureEnabled="is_charge_card_payment_history_feature_enabled",e.isIssuePhysicalDebitCardEnabled="is_issue_physical_debit_card_enabled",e.isAutoTransferRuleEnabled="is_auto_transfer_rule_enabled",e.isMissingReceiptsBulkUploadEnabled="is_missing_receipts_bulk_upload_enabled",e.isAiCfoFileUploadEnabled="is_ai_cfo_file_upload_enabled",e.isAiCfoAnswerExportEnabled="is_ai_cfo_answer_export_enabled",e.isAiCfoDiscoveryTipsEnabled="is_ai_cfo_discovery_tips_enabled",e.isAiCfoNavButtonEnabled="is_ai_cfo_nav_button_enabled",e.isTransactionDetailSplitViewEnabled="is_transaction_detail_split_view_enabled",e.isServiceWorkerPrefetchingEnabled="is_prefetching_enabled",e.isTransactionActivityEnabled="is_transaction_activity_enabled",e.isCreateTransferEntryFromExpenseEnabled="is_create_transfer_entry_from_expense_enabled",e.isCreateTransactionEnabled="is_create_transaction_enabled",e.isReportsHorizontalClassLayoutSwitchEnabled="is_reports_horizontal_class_layout_switch_enabled",e.isReportsCustomDateRangeEnabled="reports_custom_date_range",e.isAiCfoEnabled="is_ai_cfo_enabled",e.isProjectsTransactionsEnabled="is_projects_transactions_enabled",e.isAiCardCreationEnabled="is_ai_card_creation_enabled",e.isCardPolicyEnabled="is_card_policy_enabled",e.isTaskManagerNotificationControlsEnabled="is_task_manager_notification_controls_enabled",e.isTaskSnoozeEnabled="is_task_snooze_enabled",e.isTaskVisibilityEnabled="is_task_visibility_enabled",e.isTaskCannedResponsesEnabled="is_task_canned_responses_enabled",e.isTaskCategorizationEnabled="is_task_categorization_enabled",e.isTaskBulkResolutionEnabled="is_task_bulk_resolution_enabled",e.isTaskAssigneeSortingEnabled="is_task_assignee_sorting_enabled",e.isTaskRecurringParentEnabled="is_task_recurring_parent_enabled",e.isTaskGroupAssigneesEnabled="is_task_group_assignees_enabled",e.aiAuditScorePercentage="ai_audit_score_percentage",e.isReconV3Enabled="is_reconciliation_v3_enabled",e.isReconciliationCombinedStatementEnabled="is_reconciliation_combined_statement_enabled",e.isReconReportEnabled="is_recon_report_enabled",e.isTransactionSplitEnabled="transaction_split_enabled",e.isAccrualEnabled="is_accrual_enabled",e))(FeatureGatesNamesWebApp||{});const FeatureGatesNames={...FeatureGatesNamesCockpit,...FeatureGatesNamesWebApp},CONFIG_SYNC_INTERVAL_MS=18e5;Object.values(FeatureGatesNames),Object.values(DynamicConfigNames);const StatsigNetworkValuesContext=createContext(!0),useIsFeatureGateLoading=()=>!useContext(StatsigNetworkValuesContext),useZeniFeatureGate=e=>{const t=useIsFeatureGateLoading();try{return{isFeatureGateLoading:t,isFeatureEnabled:srcExports.useFeatureGate(e).value}}catch{return{isFeatureGateLoading:t,isFeatureEnabled:!1}}},useZeniDynamicConfig=e=>{const t=srcExports.useDynamicConfig(e);try{return{isDynamicConfigLoading:!1,configValue:t.value}}catch{return{isDynamicConfigLoading:!1,configValue:{}}}},ZeniFeatureProvider=e=>!0===e.zeniFeatureProviderConfig.nonBlockingInit?/* @__PURE__ */jsxRuntimeExports.jsx(NonBlockingZeniFeatureProvider,{...e}):/* @__PURE__ */jsxRuntimeExports.jsx(BlockingZeniFeatureProvider,{...e}),useZeniStatsigUser=e=>useMemo(()=>({...null!=e.userId?{userID:e.userId}:{},...null!=e.userEmail?{email:e.userEmail}:{},custom:{company_id:e.companyId??"",connected_account_provider:e.connectedAccountProvider??""}}),[e.companyId,e.connectedAccountProvider,e.userEmail,e.userId]),BlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),i={networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0},{client:r,isLoading:a}=srcExports.useClientAsyncInit(t.featureClientSecret,o,i);return useEffect(()=>{null!=r&&!1===a&&r.updateUserAsync(o)},[r,o,a]),useEffect(()=>{if(null==r||a)return;const e=setInterval(()=>{r.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[r,o,a]),a?/* @__PURE__ */jsxRuntimeExports.jsx(InitializationComponent,{}):/* @__PURE__ */jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:r,children:n},e.companyId)},statsigIdentity=e=>[e.userID??"",e.custom?.company_id??""].join(":"),STATSIG_EVALUATIONS_CACHE_PREFIX="statsig.cached.evaluations",MAX_STORED_COMPANIES_PER_USER=2,statsigCacheKey=(e,t)=>srcExports._DJB2([e,t.userID??"",t.custom?.company_id??""].join("|"));function keepRecentCompaniesOnly(e,t){const n=t.custom?.company_id;if(null==t.userID||null==n||""===n)return;const o=`zeni.statsig.recent_companies.${t.userID}`;try{const i=JSON.parse(window.localStorage.getItem(o)??"[]"),r=Array.isArray(i)?i.filter(e=>"string"==typeof e&&e!==String(n)):[],a=[String(n),...r];a.slice(MAX_STORED_COMPANIES_PER_USER).forEach(n=>{window.localStorage.removeItem(`${STATSIG_EVALUATIONS_CACHE_PREFIX}.${statsigCacheKey(e,{...t,custom:{...t.custom,company_id:n}})}`)}),window.localStorage.setItem(o,JSON.stringify(a.slice(0,MAX_STORED_COMPANIES_PER_USER)))}catch{}}function startStatsigSession(e,t,n,o){const i=srcExports._getInstance(e)??new srcExports.StatsigClient(e,t,n);"Uninitialized"===i.loadingStatus&&i.initializeSync({disableBackgroundCacheRefresh:!0});let r=0;const a={client:i,hasStoredValues:!1,lastRequestedUser:t,refresh:t=>{r+=1;const n=r;a.lastRequestedUser=t;const s=()=>{n===r&&(keepRecentCompaniesOnly(e,t),o(statsigIdentity(t)))};i.updateUserAsync(t).then(s,s)}};return a.refresh(t),a.hasStoredValues=null!=t.userID&&null!=i.getContext().values,a}const NonBlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),[i,r]=useState(null),[a]=useState(()=>startStatsigSession(t.featureClientSecret,o,{networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0,customUserCacheKeyFunc:statsigCacheKey},r));return useEffect(()=>{o!==a.lastRequestedUser&&a.refresh(o)},[a,o]),useEffect(()=>{const e=setInterval(()=>{a.client.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[a,o]),a.hasStoredValues||null!=i?/* @__PURE__ */jsxRuntimeExports.jsx(StatsigNetworkValuesContext.Provider,{value:i===statsigIdentity(o),children:/* @__PURE__ */jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:a.client,children:n},e.companyId)}):/* @__PURE__ */jsxRuntimeExports.jsx(InitializationComponent,{})},BusyContainer$i=styled$2.div`
2288
2288
  background-color: ${e=>e.theme.colors.background};
2289
2289
  height: 100vh;
2290
2290
  width: 100%;
@@ -11893,7 +11893,7 @@ return jsxRuntimeExports.jsxs(ModalContainer$h,{windowSize:a,role:"presentation"
11893
11893
  padding-top: ${e=>D$4W.ButtonContainerPaddingTop.valuePx(e.windowSize)};
11894
11894
  `,StyledDiv$Y=styled$2.div``,StyledSSNCardTemplate=styled$2(SvgSsnCardFront)`
11895
11895
  transform: scale(1, 0.9);
11896
- `,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var $=l+1&32767;h[$]=m[C],m[C]=$}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var b=0;l<p-2&&(b=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=b>>>16,A=65535&b;if(0!=b){A=65535&b;var E=a(v=b>>>16,r.of0);r.lhst[257+E]++;var w=a(A,r.df0);r.dhst[w]++,y+=r.exb[E]+r.dxb[w],u[g]=v<<23|l-d,u[g+1]=A<<16|E<<8|w,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var $=32+(l+3&7?8-(l+3&7):0)+(a<<3),b=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var A=0;A<286;A++)y.lhst[A]=0;for(A=0;A<30;A++)y.dhst[A]=0;for(A=0;A<19;A++)y.ihst[A]=0;var E=$<b&&$<v?0:b<v?1:2;if(S(s,l,e),S(s,l+1,E),l+=3,0==E){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var w,R;if(1==E&&(w=y.fltree,R=y.fdtree),2==E){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),w=y.ltree,R=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],w,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,w,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,R,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,w,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,$=0,b=0;0==h;)if(h=i(e,b,1),g=i(e,b+1,2),b+=3,0!=g){if(p&&(t=UZIP2.F._check(t,$+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,b,5)+257,f=r(e,b+5,5)+1,y=r(e,b+10,4)+4,b+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var A=1;for(v=0;v<y;v++){var E=r(e,b+3*v,3);d.itree[1+(d.ordr[v]<<1)]=E,E>A&&(A=E)}b+=3*y,s(d.itree,A),l(d.itree,A,d.imap),u=d.lmap,m=d.dmap,b=a(d.imap,(1<<A)-1,x+f,e,b,d.ttree);var w=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<w)-1;var R=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<R)-1,s(d.ltree,w),l(d.ltree,w,u),s(d.dtree,R),l(d.dtree,R,m)}for(;;){var j=u[c(e,b)&S];b+=15&j;var T=j>>>4;if(T>>>8==0)t[$++]=T;else{if(256==T)break;var I=$+T-254;if(T>264){var k=d.ldef[T-257];I=$+(k>>>3)+r(e,b,7&k),b+=7&k}var L=m[c(e,b)&C];b+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,b,15&_);for(b+=15&_,p&&(t=UZIP2.F._check(t,$+(1<<17)));$<I;)t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P];$=I}}}else{7&b&&(b+=8-(7&b));var B=4+(b>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,$+M)),t.set(new n(e.buffer,e.byteOffset+B,M),$),b=B+M<<3,$+=M}return t.length==$?t:t.slice(0,$)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var $=3*(b=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(8==u)for(h=0;h<a;h++){var b;f=h<<2,$=3*(b=t[h]),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[A=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[A+1]}if(16==u)for(h=0;h<a;h++){var A;f=h<<2,v=t[A=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[A+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var E=0;E<n;E++){var w=(v=255*(t[e+(E>>>3)]>>>7-(7&E)&1))==255*x?0:255;d[o+E]=w<<24|v<<16|v<<8|v}else if(2==u)for(E=0;E<n;E++)w=(v=85*(t[e+(E>>>2)]>>>6-((3&E)<<1)&3))==85*x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(4==u)for(E=0;E<n;E++)w=(v=17*(t[e+(E>>>1)]>>>4-((1&E)<<2)&15))==17*x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(8==u)for(E=0;E<n;E++)w=(v=t[e+E])==x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(16==u)for(E=0;E<n;E++)v=t[e+(E<<1)],w=m(t,e+(E<<1))==x?0:255,d[o+E]=w<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let $=u[g];for(;$<n;)$+=f,y++;const b=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,A=p[g];for(;A<o;){let t=u[g],o=d+v*b<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[A*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[A*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[A*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=A*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,A+=r}y*S!=0&&(d+=S*(1+b)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,$=g.Z,b=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=b.J,r=b.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var A=0;A<38;A+=2)b.Q[A]=0,b.Q[A+1]=0;for(A=0;A<d;A++){const n=f(t,h+3*A,3);b.Q[1+(b.X[A]<<1)]=n,n>e&&(e=n)}h+=3*d,S(b.Q,e),C(b.Q,e,b.u),i=b.w,r=b.d,h=y(b.u,(1<<e)-1,l+c,t,h,b.v);const n=g.V(b.v,0,l,b.C);p=(1<<n)-1;const o=g.V(b.v,l,c,b.D);u=(1<<o)-1,S(b.C,n),C(b.C,n,i),S(b.D,o),C(b.D,o,r)}for(;;){const e=i[$(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=b.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[$(t,h)&u];h+=15&i;const a=i>>>4,s=b.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let $=0;$<d;$++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=$*t+n<<2,u=(s+$)*i+a+n<<2):(p=(-s+$)*t-a+n<<2,u=$*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(E){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((A=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),A.rect.width,A.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),$=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,$);else{var b=o(r.slice(S+2,S+2+$));v=s.readUTF8(b,0,b.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),$=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,$):(b=o(r.slice(y,y+$)),v=s.readUTF8(b,0,b.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var A;return 0!=g&&((A=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),A.rect.width,A.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let $=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<$&&($=e,m=h)}const b=p[m],v=[S[0]-b[0],S[1]-b[1],S[2]-b[2],S[3]-b[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=(b=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let $=0;for(y=0;y<e.frames.length;y++){var b=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,$++),p+=4,l(S,p,b.rect.width),p+=4,l(S,p,b.rect.height),p+=4,l(S,p,b.rect.x),p+=4,l(S,p,b.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=b.dispose,p++,S[p]=b.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=b.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,$++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,$=0;$<C;$+=4)y&=e[$+3]}const b=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let $=0,b=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<b&&(b=u,$=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-$]),1==$&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),A={},E=[],w=[];if(0!=i){const e=[];for($=0;$<v.length;$++)e.push(v[$].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for($=0;$<t.plte.length;$++)E.push(t.plte[$].est.rgba);let n=0;for($=0;$<v.length;$++){const e=(j=v[$]).img.length;var R=new Uint8Array(t.inds.buffer,n>>2,e>>2);w.push(R);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,E,o,R),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,R=new Uint8Array(C),w.push(R),$=0;$<C;$++){const t=e[$];if(0!=$&&t==e[$-1])R[$]=R[$-1];else if($>T&&t==e[$-T])R[$]=R[$-T];else{let e=A[t];if(null==e&&(A[t]=e=E.length,E.push(t),E.length>=300))break;R[$]=e}}}const I=E.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=w[S];for(let t=0;t<e;t++){$=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[$+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[$+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[$+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[$+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==b&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for($=0;$<i;$++){const e=3*$,n=4*$;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:E,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=$(e,i.i0,i.i1),i.est=b(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=$(e,c.i0,c.i1),c.est=b(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=b(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function $(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function b(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,$=0;function b(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function A(e){C+=e}b(19778),v(d),A(4),v(122),v(108),v(n),v(-o>>>0),b(1),b(32),v(3),v(c),v(2835),v(2835),A(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[$++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}$<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,$,b,v,A;function E(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function w(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,E(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,E(),c=handleMaxWidthOrHeight(l,t),E(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,E(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),E(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=A?.95*v.width:v.width,n=A?.95*v.height:v.height,[$,b]=getNewCanvasAndCtx(t,n),b.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile($,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=$,S=C.size,w(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},R=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory($),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),w(100),o(C)};return h=n,E(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,A=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?R.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(w(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([import("./index-CpEJHEWA.js"),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>/* @__PURE__ */jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React__default.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?/* @__PURE__ */jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+/* @__PURE__ */(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+/* @__PURE__ */(new Date).getTime()}}function $(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(E){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function A(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new b(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=m,t.Request=C,t.Response=b),e.Headers=m,e.Request=C,e.Response=b,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=/* @__PURE__ */getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3g}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=useState(0),[o,i]=useState(void 0),[r,a]=useState(null),[s,l]=useState(void 0),c=useWindowSizeContext(),d=useRef(null),p=useRef(null),u=useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:/* @__PURE__ */jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);/* @__PURE__ */
11896
+ `,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var $=l+1&32767;h[$]=m[C],m[C]=$}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var b=0;l<p-2&&(b=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=b>>>16,A=65535&b;if(0!=b){A=65535&b;var E=a(v=b>>>16,r.of0);r.lhst[257+E]++;var w=a(A,r.df0);r.dhst[w]++,y+=r.exb[E]+r.dxb[w],u[g]=v<<23|l-d,u[g+1]=A<<16|E<<8|w,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var $=32+(l+3&7?8-(l+3&7):0)+(a<<3),b=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var A=0;A<286;A++)y.lhst[A]=0;for(A=0;A<30;A++)y.dhst[A]=0;for(A=0;A<19;A++)y.ihst[A]=0;var E=$<b&&$<v?0:b<v?1:2;if(S(s,l,e),S(s,l+1,E),l+=3,0==E){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var w,R;if(1==E&&(w=y.fltree,R=y.fdtree),2==E){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),w=y.ltree,R=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],w,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,w,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,R,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,w,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,$=0,b=0;0==h;)if(h=i(e,b,1),g=i(e,b+1,2),b+=3,0!=g){if(p&&(t=UZIP2.F._check(t,$+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,b,5)+257,f=r(e,b+5,5)+1,y=r(e,b+10,4)+4,b+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var A=1;for(v=0;v<y;v++){var E=r(e,b+3*v,3);d.itree[1+(d.ordr[v]<<1)]=E,E>A&&(A=E)}b+=3*y,s(d.itree,A),l(d.itree,A,d.imap),u=d.lmap,m=d.dmap,b=a(d.imap,(1<<A)-1,x+f,e,b,d.ttree);var w=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<w)-1;var R=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<R)-1,s(d.ltree,w),l(d.ltree,w,u),s(d.dtree,R),l(d.dtree,R,m)}for(;;){var j=u[c(e,b)&S];b+=15&j;var T=j>>>4;if(T>>>8==0)t[$++]=T;else{if(256==T)break;var I=$+T-254;if(T>264){var k=d.ldef[T-257];I=$+(k>>>3)+r(e,b,7&k),b+=7&k}var L=m[c(e,b)&C];b+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,b,15&_);for(b+=15&_,p&&(t=UZIP2.F._check(t,$+(1<<17)));$<I;)t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P];$=I}}}else{7&b&&(b+=8-(7&b));var B=4+(b>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,$+M)),t.set(new n(e.buffer,e.byteOffset+B,M),$),b=B+M<<3,$+=M}return t.length==$?t:t.slice(0,$)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var $=3*(b=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(8==u)for(h=0;h<a;h++){var b;f=h<<2,$=3*(b=t[h]),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[A=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[A+1]}if(16==u)for(h=0;h<a;h++){var A;f=h<<2,v=t[A=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[A+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var E=0;E<n;E++){var w=(v=255*(t[e+(E>>>3)]>>>7-(7&E)&1))==255*x?0:255;d[o+E]=w<<24|v<<16|v<<8|v}else if(2==u)for(E=0;E<n;E++)w=(v=85*(t[e+(E>>>2)]>>>6-((3&E)<<1)&3))==85*x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(4==u)for(E=0;E<n;E++)w=(v=17*(t[e+(E>>>1)]>>>4-((1&E)<<2)&15))==17*x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(8==u)for(E=0;E<n;E++)w=(v=t[e+E])==x?0:255,d[o+E]=w<<24|v<<16|v<<8|v;else if(16==u)for(E=0;E<n;E++)v=t[e+(E<<1)],w=m(t,e+(E<<1))==x?0:255,d[o+E]=w<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let $=u[g];for(;$<n;)$+=f,y++;const b=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,A=p[g];for(;A<o;){let t=u[g],o=d+v*b<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[A*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[A*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[A*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=A*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,A+=r}y*S!=0&&(d+=S*(1+b)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,$=g.Z,b=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=b.J,r=b.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var A=0;A<38;A+=2)b.Q[A]=0,b.Q[A+1]=0;for(A=0;A<d;A++){const n=f(t,h+3*A,3);b.Q[1+(b.X[A]<<1)]=n,n>e&&(e=n)}h+=3*d,S(b.Q,e),C(b.Q,e,b.u),i=b.w,r=b.d,h=y(b.u,(1<<e)-1,l+c,t,h,b.v);const n=g.V(b.v,0,l,b.C);p=(1<<n)-1;const o=g.V(b.v,l,c,b.D);u=(1<<o)-1,S(b.C,n),C(b.C,n,i),S(b.D,o),C(b.D,o,r)}for(;;){const e=i[$(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=b.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[$(t,h)&u];h+=15&i;const a=i>>>4,s=b.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let $=0;$<d;$++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=$*t+n<<2,u=(s+$)*i+a+n<<2):(p=(-s+$)*t-a+n<<2,u=$*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(E){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((A=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),A.rect.width,A.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),$=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,$);else{var b=o(r.slice(S+2,S+2+$));v=s.readUTF8(b,0,b.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),$=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,$):(b=o(r.slice(y,y+$)),v=s.readUTF8(b,0,b.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var A;return 0!=g&&((A=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),A.rect.width,A.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let $=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<$&&($=e,m=h)}const b=p[m],v=[S[0]-b[0],S[1]-b[1],S[2]-b[2],S[3]-b[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=(b=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let $=0;for(y=0;y<e.frames.length;y++){var b=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,$++),p+=4,l(S,p,b.rect.width),p+=4,l(S,p,b.rect.height),p+=4,l(S,p,b.rect.x),p+=4,l(S,p,b.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=b.dispose,p++,S[p]=b.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=b.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,$++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,$=0;$<C;$+=4)y&=e[$+3]}const b=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let $=0,b=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<b&&(b=u,$=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-$]),1==$&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),A={},E=[],w=[];if(0!=i){const e=[];for($=0;$<v.length;$++)e.push(v[$].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for($=0;$<t.plte.length;$++)E.push(t.plte[$].est.rgba);let n=0;for($=0;$<v.length;$++){const e=(j=v[$]).img.length;var R=new Uint8Array(t.inds.buffer,n>>2,e>>2);w.push(R);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,E,o,R),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,R=new Uint8Array(C),w.push(R),$=0;$<C;$++){const t=e[$];if(0!=$&&t==e[$-1])R[$]=R[$-1];else if($>T&&t==e[$-T])R[$]=R[$-T];else{let e=A[t];if(null==e&&(A[t]=e=E.length,E.push(t),E.length>=300))break;R[$]=e}}}const I=E.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=w[S];for(let t=0;t<e;t++){$=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[$+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[$+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[$+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[$+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==b&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for($=0;$<i;$++){const e=3*$,n=4*$;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:E,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=$(e,i.i0,i.i1),i.est=b(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=$(e,c.i0,c.i1),c.est=b(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=b(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function $(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function b(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,$=0;function b(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function A(e){C+=e}b(19778),v(d),A(4),v(122),v(108),v(n),v(-o>>>0),b(1),b(32),v(3),v(c),v(2835),v(2835),A(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[$++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}$<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,$,b,v,A;function E(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function w(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,E(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,E(),c=handleMaxWidthOrHeight(l,t),E(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,E(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),E(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=A?.95*v.width:v.width,n=A?.95*v.height:v.height,[$,b]=getNewCanvasAndCtx(t,n),b.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile($,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=$,S=C.size,w(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},R=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory($),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),w(100),o(C)};return h=n,E(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,A=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?R.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(w(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([import("./index-BfdJ8Cyp.js"),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>/* @__PURE__ */jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React__default.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?/* @__PURE__ */jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+/* @__PURE__ */(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+/* @__PURE__ */(new Date).getTime()}}function $(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(E){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function A(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new b(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=m,t.Request=C,t.Response=b),e.Headers=m,e.Request=C,e.Response=b,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=/* @__PURE__ */getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3g}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=useState(0),[o,i]=useState(void 0),[r,a]=useState(null),[s,l]=useState(void 0),c=useWindowSizeContext(),d=useRef(null),p=useRef(null),u=useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:/* @__PURE__ */jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);/* @__PURE__ */
11897
11897
  return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})},C=()=>{e.setShowFullScreenView(!0)};/* @__PURE__ */
11898
11898
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
11899
11899
  /* @__PURE__ */jsxRuntimeExports.jsx(FileInputElement,{fileRef:d,name:FileInputElementName$1,onFileChange:t=>{if(null!=t.target.files){const n=t.target.files[0];e.onUploadAttachment?.([n],[n.name])}},multiple:e.allowMultiFiles,sizeLimit:SizeLimit32MB,onFileSizeError:t=>e.openSizeLimitPopup?.(t)}),
@@ -13269,7 +13269,7 @@ return jsxRuntimeExports.jsx(BackNavigationContext.Provider,{value:{hasProvider:
13269
13269
  align-items: center;
13270
13270
  border-bottom: 1px solid ${e=>e.theme.colors.grey2};
13271
13271
  box-sizing: content-box;
13272
- `,dimensions$2x={navBarHeight:navBarHeight,navBarPaddingLeft:new ResponsiveSized(sp[3],sp[3],sp[5]),navBarPaddingRight:new ResponsiveSized(sp[3],sp[3],sp[5]),titleMarginLeft:new ResponsiveSized(sp[4],sp[5]),titleMarginRight:new ResponsiveSized(sp[4],sp[5])},fontStyles$1E={title:new ResponsiveSizedStyle("extraLargeMedium","eyebrowStandardBold")},NavbarContainer$3=styled$2.div`
13272
+ `,dimensions$2x={navBarHeight:navBarHeight,navBarPaddingLeft:new ResponsiveSized(sp[3],sp[3],sp[5]),navBarPaddingRight:new ResponsiveSized(sp[3],sp[3],sp[5]),titleMarginLeft:new ResponsiveSized(sp[4],sp[5]),titleMarginRight:new ResponsiveSized(sp[4],sp[5])},fontStyles$1E={title:new ResponsiveSizedStyle("extraLargeMedium","eyebrowStandardBold")},NavbarContainer$4=styled$2.div`
13273
13273
  min-height: ${e=>dimensions$2x.navBarHeight.valuePx(e.windowSize)};
13274
13274
  position: -webkit-sticky;
13275
13275
  position: sticky;
@@ -13319,7 +13319,7 @@ return jsxRuntimeExports.jsx(BackNavigationContext.Provider,{value:{hasProvider:
13319
13319
  width: ${Space.sp3};
13320
13320
  height: ${Space.sp3};
13321
13321
  `;function NavBarWithClose({title:e,backgroundColor:t,style:n,onCloseClick:o,scrollableContent:i,showBorderBottom:r=!1,textTitleContainerStyles:a,isTitleAlignLeft:s=!1}){const l=useTheme(),c=useWindowSizeContext(),[d,p]=useState(!1);useEffect(()=>{const e=i?.current;if(null!=e){const t=()=>{p(e.scrollTop>0)};return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}}{const e=()=>{p(window.scrollY>10)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[i]);const u=new Color$1(t??l.colors.grey5);/* @__PURE__ */
13322
- return jsxRuntimeExports.jsx(NavbarContainer$3,{bgColor:u.toString(),isScrolled:d,showBorderBottom:r,windowSize:c,style:n,children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentContainer$N,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Container$7a,{windowSize:c,style:{...a},children:[
13322
+ return jsxRuntimeExports.jsx(NavbarContainer$4,{bgColor:u.toString(),isScrolled:d,showBorderBottom:r,windowSize:c,style:n,children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentContainer$N,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Container$7a,{windowSize:c,style:{...a},children:[
13323
13323
  /* @__PURE__ */jsxRuntimeExports.jsx(TitleText$f,{windowSize:c,isTitleAlignLeft:s,children:e}),
13324
13324
  /* @__PURE__ */jsxRuntimeExports.jsx(CloseIconWrapper$7,{onClick:o,"data-testid":generateDataTestId("close-nav-bar-with-close"),children:/* @__PURE__ */jsxRuntimeExports.jsx(Close$2,{})})]})})})}const CountrySelectField=({name:e,registerOptions:t,defaultValue:n,isDisabled:o,style:i,placeholder:r,isOptionRemovable:a=!0,menuItemHeight:s=sp[5],valueToInfo:l})=>{const{control:c,formState:{errors:d}}=useFormContext(),p=useTheme(),[u,m]=useState(!1),h=has(d,e??""),g=useCallback(e=>({value:e.value,label:e.label,info:l?.(e.value)??"",isDisabled:e.isDisabled}),[l]),x=e=>{if(null!=e&&!1!==Boolean(e))return{value:e,label:n.allOptions.find(t=>t.value===e)?.label??e,info:l?.(e)??""}},f={control:e=>({...e,height:Space.sp5,minHeight:Space.sp5,backgroundColor:"transparent",outline:"none",boxShadow:"none",border:"none"}),container:e=>({...e,width:"100%",...i}),valueContainer:(e,t)=>({...e,borderRadius:"6px",margin:`${Space.sp0} ${Space.sp2} ${Space.sp0} ${Space.sp3}`,justifyContent:!1===t.selectProps.menuIsOpen?"flex-end":"flex-start",outline:"none",padding:0}),input:e=>({...e,borderRadius:"6px",outline:"none"}),menu:e=>({...e,backgroundColor:p.colors.grey5,borderRadius:"6px",whiteSpace:"nowrap",zIndex:2,width:"100%",margin:`${Space.sp1} 0 0 0`,padding:`${Space.sp1} 0`,border:`1px solid ${p.colors.grey2}`,overflow:"hidden",boxShadow:"none"}),menuList:e=>({...e,borderRadius:0})},y={hasError:h,menuItemHeight:s};/* @__PURE__ */
13325
13325
  return jsxRuntimeExports.jsx(Controller,{name:e,control:c,defaultValue:n,rules:t,"data-testid":generateDataTestId("country-select-field",e),render:({field:{onChange:t,onBlur:n,value:i,ref:s}})=>{const l=i;/* @__PURE__ */
@@ -13797,8 +13797,8 @@ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
13797
13797
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledCountrySelectField,{isDisabled:i,label:{label:common$3d.labels.country,width:p},style:{width:t?"100%":"auto"},additionalInfoLabel:h&&has(c,uniqueName$1C(o,"country"))?d.address.countryError.replace("__reason__",d.address.forBillingSetup):void 0,countrySelectField:{name:uniqueName$1C(o,"country"),placeholder:common$3d.texts.selectCountry,defaultValue:getCountryOptions(n?.country),registerOptions:{validate:e=>null!=e&&!0===Boolean(e.selectedOption)}}}),
13798
13798
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{isDisabled:i,label:{label:d.address.zipCode,width:p},style:t?{width:"100%"}:{width:"auto"},showErrorInfoLabel:h&&has(c,uniqueName$1C(o,"postalCode")),errorInfoLabel:d.address.zipCodeError.replace("__reason__",d.address.forBillingSetup),text:{type:"text",name:uniqueName$1C(o,"postalCode"),defaultValue:n?.postalCode,placeholder:common$3d.texts.addZipCode,autoComplete:"new-password",options:{required:!0}}}),
13799
13799
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{isDisabled:i,label:{label:d.address.secondaryInfo,width:m},style:{paddingBottom:D$4N.paddingBottom.valuePx(l),width:t?"100%":"auto"},isOptional:!0,text:{type:"text",name:uniqueName$1C(o,"secondaryInfo"),defaultValue:n?.street[2],placeholder:d.address.secondaryInfoPlaceholder,autoComplete:"new-password"}})]})})]})}function AddressFormPage(e){const{addressToEdit:t}=e,n=useWindowSizeContext(),o=useTheme(),i=useForm({mode:"onSubmit",defaultValues:getAddressDefaultValues(sectionId$1,t)}),{loadingState:r,onSubmitHandler:a,addTitleMessage:s,editTitleMessage:l,subTitleMessage:c,isSubPage:d=!1,dontShowSaveConfirmationPopup:p=!1,onCancel:u,hideAddressSubTitle:m=!1,hideAddressBackButton:h=!1,showNavbarWithClose:g=!1,showAddressCloseButton:x=!1,customNavStyles:f,customTitleStyles:y,subTitleStyles:S,navBarContainerStyles:C,footerButtons:$}=e,b=p??!1,v=companyPassport$1.address,[A,E]=useState(!1),[w,R]=useState(!1),j={onOkClick:()=>{null!=u&&(E(!1),i.reset(),u())},onCancelClick:()=>{E(!1)}},T={onOkClick:()=>{R(!1),a?.(i.getValues(sectionId$1))},onCancelClick:()=>{R(!1)}};React__default.useEffect(()=>{const e=i.watch((e,{name:t})=>{null!=t&&t!==sectionId$1&&null!=e&&null!=e[sectionId$1]&&defer(()=>(async(e,t)=>{if(e===`${sectionId$1}.street`&&null!=t.street?.addressValue){const{addressValue:e}=t.street,n=i.getValues(`${sectionId$1}.country`),o=getCountryOptions(e.country);i.setValue(sectionId$1,{street:t.street,city:e.locality??"",state:e.administrativeAreaLevel1??"",country:o,countryCode:e.countryCode??"",postalCode:e.postalCode??"",secondaryInfo:t.secondaryInfo??"",suite:t.suite??""}),has(i.formState.errors,`${sectionId$1}.city`)&&Boolean(e.locality)&&i.trigger(`${sectionId$1}.city`),n.selectedOption!==o.selectedOption&&i.setValue(`${sectionId$1}.country`,o)}else e===`${sectionId$1}.country`&&null!=t.country.selectedOption&&i.setValue(`${sectionId$1}.countryCode`,getAlpha2(t.country.selectedOption))})(t,e[sectionId$1]))});return()=>{e.unsubscribe()}});const I=!0===g?NavBarWithClose:NavBar,k=()=>{const t=null==e.addressToEdit?v.titleAdd:common$3d.texts.editAddress,n=null==e.addressToEdit?s:l;return null!=n&&0!==n.length?n:t},L=()=>{null!=u&&(!0===d&&0!==Object.keys(i.formState.dirtyFields).length?E(!0):u())},D=useRegisterBackHandler(L),_=h||D;/* @__PURE__ */
13800
- return jsxRuntimeExports.jsxs(FormPageContainer,{isSubPage:d,children:[d?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["small"===n?/* @__PURE__ */jsxRuntimeExports.jsxs(NavBarContainer$u,{style:C,children:[!1===_?/* @__PURE__ */jsxRuntimeExports.jsx(Back$4,{onClick:L,"data-testid":generateDataTestId("address-form-nav-back")}):null,
13801
- /* @__PURE__ */jsxRuntimeExports.jsx(CustomTitle,{windowSize:n,isSubPage:d,hideAddressBackButton:_,style:{...y,..._&&!x?{marginTop:Space.sp9}:{}},children:k()}),!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(Close$1,{onClick:L,"data-testid":generateDataTestId("address-form-nav-close")}):null]}):!1===_||!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(NavSectionContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(CustomNav,{showAtEnd:x,style:{...f},children:[!1===_?/* @__PURE__ */jsxRuntimeExports.jsx(Back$4,{onClick:L,"data-testid":generateDataTestId("address-form-nav-back")}):null,!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(Close$1,{onClick:L,"data-testid":generateDataTestId("address-form-nav-close")}):null]})}):null,"small"!==n?/* @__PURE__ */jsxRuntimeExports.jsx(CustomTitle,{windowSize:n,isSubPage:d,hideAddressBackButton:_,style:{...y},children:k()}):null]}):/* @__PURE__ */jsxRuntimeExports.jsx(I,{source:"AddressFormPage",title:k(),backgroundColor:o.colors.grey4,style:{zIndex:2,...e.navbarStyles},onBackClick:L,onCloseClick:L}),!0===d&&!1===m?/* @__PURE__ */jsxRuntimeExports.jsx(SubTitleHeader,{size:n,style:{...S},children:null!=c&&0!==c.length?c:common$3d.texts.mailingAddress}):null,!0===d&&!0===A?/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopup,{titleComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpTitle$3,{children:common$3d.confirmationPopup.discardTitle}),descriptionComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpDescription$2,{children:common$3d.confirmationPopup.discardDescription}),primaryButtonText:common$3d.confirmationPopup.discard,secondaryButtonText:common$3d.cancel,proceedButtonVariant:"destructive",action:j}):null,null!=t&&!0===d&&!0===w?/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopup,{titleComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpTitle$3,{children:v.popupAddressConfirmationSave}),descriptionComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpDescription$2,{children:v.popupSaveDescription}),primaryButtonText:common$3d.proceed,secondaryButtonText:common$3d.cancel,action:T}):null,
13800
+ return jsxRuntimeExports.jsxs(FormPageContainer,{isSubPage:d,children:[d?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["small"===n?/* @__PURE__ */jsxRuntimeExports.jsxs(NavBarContainer$u,{style:C,children:[!1===_?/* @__PURE__ */jsxRuntimeExports.jsx(Back$5,{onClick:L,"data-testid":generateDataTestId("address-form-nav-back")}):null,
13801
+ /* @__PURE__ */jsxRuntimeExports.jsx(CustomTitle,{windowSize:n,isSubPage:d,hideAddressBackButton:_,style:{...y,..._&&!x?{marginTop:Space.sp9}:{}},children:k()}),!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(Close$1,{onClick:L,"data-testid":generateDataTestId("address-form-nav-close")}):null]}):!1===_||!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(NavSectionContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(CustomNav,{showAtEnd:x,style:{...f},children:[!1===_?/* @__PURE__ */jsxRuntimeExports.jsx(Back$5,{onClick:L,"data-testid":generateDataTestId("address-form-nav-back")}):null,!0===x?/* @__PURE__ */jsxRuntimeExports.jsx(Close$1,{onClick:L,"data-testid":generateDataTestId("address-form-nav-close")}):null]})}):null,"small"!==n?/* @__PURE__ */jsxRuntimeExports.jsx(CustomTitle,{windowSize:n,isSubPage:d,hideAddressBackButton:_,style:{...y},children:k()}):null]}):/* @__PURE__ */jsxRuntimeExports.jsx(I,{source:"AddressFormPage",title:k(),backgroundColor:o.colors.grey4,style:{zIndex:2,...e.navbarStyles},onBackClick:L,onCloseClick:L}),!0===d&&!1===m?/* @__PURE__ */jsxRuntimeExports.jsx(SubTitleHeader,{size:n,style:{...S},children:null!=c&&0!==c.length?c:common$3d.texts.mailingAddress}):null,!0===d&&!0===A?/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopup,{titleComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpTitle$3,{children:common$3d.confirmationPopup.discardTitle}),descriptionComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpDescription$2,{children:common$3d.confirmationPopup.discardDescription}),primaryButtonText:common$3d.confirmationPopup.discard,secondaryButtonText:common$3d.cancel,proceedButtonVariant:"destructive",action:j}):null,null!=t&&!0===d&&!0===w?/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopup,{titleComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpTitle$3,{children:v.popupAddressConfirmationSave}),descriptionComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpDescription$2,{children:v.popupSaveDescription}),primaryButtonText:common$3d.proceed,secondaryButtonText:common$3d.cancel,action:T}):null,
13802
13802
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionFormContainer,{size:n,isSubPage:d,style:{...e.sectionStyles},children:/* @__PURE__ */jsxRuntimeExports.jsx(FormProvider,{...i,children:/* @__PURE__ */jsxRuntimeExports.jsx("form",{id:formId$5,onSubmit:i.handleSubmit(e=>{null!=t&&!0===d&&!1===w&&!0!==b?R(!0):a?.(e[sectionId$1])}),autoComplete:"new-password",style:d?{width:"100%"}:{width:D$4N.width.valuePx(n)},children:/* @__PURE__ */jsxRuntimeExports.jsx(AddressSection$2,{sectionId:sectionId$1,...e,isDisabled:e.isDisabled||"In-Progress"===r?"disabled":void 0})})})}),
13803
13803
  /* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{formId:formId$5,showCancel:!0,primaryBtn:{label:$?.primaryButtonLabel??v.saveAddress,isLoading:"In-Progress"===r,style:{width:$?.buttonWidth??D$4N.buttonWidth.value(n)},isDisabled:null!=e.isDisabled},cancelBtn:{label:common$3d.cancel,style:{width:$?.buttonWidth??D$4N.buttonWidth.value(n)},onClick:L},separatorStyle:{...$?.separatorStyle}})]})}const uniqueName$1C=(e,t)=>`${e}.${t}`,CustomNav=styled$2.div`
13804
13804
  padding: ${Space.sp3} ${Space.sp8} ${Space.sp3} ${Space.sp6};
@@ -13810,7 +13810,7 @@ return jsxRuntimeExports.jsxs(FormPageContainer,{isSubPage:d,children:[d?/* @__P
13810
13810
  margin-bottom: ${e=>D$4N.customTitleMarginBottom.valuePx(e.windowSize)};
13811
13811
  margin-top: ${e=>!0===e.isSubPage?Space.sp3:Space.sp0};
13812
13812
  margin-left: ${e=>D$4N.customTitleMarginLeft.valuePx(e.windowSize)};
13813
- `,Back$4=styled$2(SvgArrowLeft)`
13813
+ `,Back$5=styled$2(SvgArrowLeft)`
13814
13814
  cursor: pointer;
13815
13815
  width: ${Space.sp4};
13816
13816
  height: ${Space.sp4};
@@ -16581,10 +16581,10 @@ return jsxRuntimeExports.jsx(FullSizeZeniBrandCheckingAccIcon,{color:getAccounts
16581
16581
  `,FullSizeZeniBrandCheckingAccIcon=styled$2(SvgZeniBrandCheckingAcc)`
16582
16582
  width: 100%;
16583
16583
  height: 100%;
16584
- `,dimensions$2v={largeLabelWidth:new ResponsiveSized(120,120,160),containerPaddingLeft:new ResponsiveSized(sp[3],sp[5],sp[5]),containerPaddingRight:new ResponsiveSized(sp[3],sp[5],sp[5]),reviewContentWrapperPaddingBottom:new ResponsiveSized(sp[5],sp[8])},fontStyles$1t={pageTitle:new ResponsiveSizedStyle("h7Medium","h7Medium")},{common:{edit:edit$4,labels:labels$6,currency:currency$h,back:back$c,texts:{byClickingTransferIAuthorizeZeniToInitiate:byClickingTransferIAuthorizeZeniToInitiate$1,reviewAndConfirm:reviewAndConfirm$1,transfer:transfer$3,wireTransfer:wireTransfer,youCanUseAWireTransferIfYou:youCanUseAWireTransferIfYou}},dateFormat:{visual:{MMMDCommaYYYYformat:MMMDDCommaYYYYformat$2}},spendManagement:{zeniAccounts:{zeniAccountList:{transferDrawer:strings$5a}},billPay:{insufficientFunds:{lowBalance:lowBalance$1}}}}=appLocale.getLocalizedStrings(),TransferReviewPage$1=({transferDetails:e,reviewTransferDetail:t,setCurrentDrawerContent:n,setShowReviewContent:o,onTransferClick:i,clearReviewTransferDetail:r,fireTrackTransferBetweenAccountsFormClicked:a})=>{const s=useWindowSizeContext(),l=useTheme(),[c,d]=useState(!1);useEffect(()=>{null!=e.error?d(!0):d(!1)},[e.error]);const p=dimensions$2v.largeLabelWidth.value(s);/* @__PURE__ */
16584
+ `,dimensions$2v={largeLabelWidth:new ResponsiveSized(120,120,160),containerPaddingLeft:new ResponsiveSized(sp[3],sp[5],sp[5]),containerPaddingRight:new ResponsiveSized(sp[3],sp[5],sp[5]),reviewContentWrapperPaddingBottom:new ResponsiveSized(sp[5],sp[8])},fontStyles$1t={pageTitle:new ResponsiveSizedStyle("h7Medium","h7Medium")},{common:{edit:edit$4,labels:labels$6,currency:currency$h,back:back$d,texts:{byClickingTransferIAuthorizeZeniToInitiate:byClickingTransferIAuthorizeZeniToInitiate$1,reviewAndConfirm:reviewAndConfirm$1,transfer:transfer$3,wireTransfer:wireTransfer,youCanUseAWireTransferIfYou:youCanUseAWireTransferIfYou}},dateFormat:{visual:{MMMDCommaYYYYformat:MMMDDCommaYYYYformat$2}},spendManagement:{zeniAccounts:{zeniAccountList:{transferDrawer:strings$5a}},billPay:{insufficientFunds:{lowBalance:lowBalance$1}}}}=appLocale.getLocalizedStrings(),TransferReviewPage$1=({transferDetails:e,reviewTransferDetail:t,setCurrentDrawerContent:n,setShowReviewContent:o,onTransferClick:i,clearReviewTransferDetail:r,fireTrackTransferBetweenAccountsFormClicked:a})=>{const s=useWindowSizeContext(),l=useTheme(),[c,d]=useState(!1);useEffect(()=>{null!=e.error?d(!0):d(!1)},[e.error]);const p=dimensions$2v.largeLabelWidth.value(s);/* @__PURE__ */
16585
16585
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
16586
16586
  /* @__PURE__ */jsxRuntimeExports.jsxs(PageContent$s,{windowSize:s,children:[
16587
- /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$t,{windowSize:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$c,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackIconWrapper$1,{"data-testid":generateDataTestId("nav-bar-back-transfer-review"),onClick:()=>{a("Back",t.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer"),o(!1),r()},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$a,{})})})}),
16587
+ /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$t,{windowSize:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$d,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackIconWrapper$1,{"data-testid":generateDataTestId("nav-bar-back-transfer-review"),onClick:()=>{a("Back",t.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer"),o(!1),r()},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$a,{})})})}),
16588
16588
  /* @__PURE__ */jsxRuntimeExports.jsx(PageTitle$7,{windowSize:s,children:reviewAndConfirm$1}),c?/* @__PURE__ */jsxRuntimeExports.jsx(ErrorBoxContainer$5,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(ErrorBox$5,{children:[
16589
16589
  /* @__PURE__ */jsxRuntimeExports.jsxs(LeftContent$6,{children:[
16590
16590
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertIcon$9,{}),
@@ -27993,7 +27993,7 @@ return jsxRuntimeExports.jsxs(AiCfoMenuContainer,{children:[
27993
27993
  width: ${Space.sp3};
27994
27994
  height: ${Space.sp3};
27995
27995
  flex-shrink: 0;
27996
- `,{drawerGroups:drawerGroups,drawerMenuSubtitles:drawerMenuSubtitles,common:{analytics:analytics$1,back:back$b,oauthConsent:{company:company$2},texts:{cash:cash,accountsPayable:accountsPayable$1,accountsReceivable:accountsReceivable$1,companySettings:companySettings,aiBookkeeping:aiBookkeeping,aiAgents:aiAgents$1,overview:overview$1,billing:billing$1,payments2:payments2$3}},dateFormat:{visual:{MMMYYFormat:mmmYy$b}},cardsShutdown:{navAlertLabel:cardsShutdownNavAlertLabel}}=appLocale.getLocalizedStrings(),CARDS_MENU_TYPE="cards",GROUP_TITLE_MAP={...drawerGroups,cash:cash,accounts_payable:accountsPayable$1,accounts_receivable:accountsReceivable$1,company:company$2,company_settings:companySettings,ai_bookkeeping:aiBookkeeping,ai_agents:aiAgents$1,invoicing_general:overview$1,invoicing_billing:billing$1,invoicing_payments_group:payments2$3,invoicing_analytics_group:analytics$1},COMMAND_CENTER_SUBMENU_TYPES=["transaction_categorization","je_schedules","missing_receipts","flux_analysis","reconciliation"],INVOICING_SETTINGS_SUBMENU_TYPES=["invoicing_settings_branding","invoicing_settings_integrations","invoicing_settings_dunning","invoicing_settings_quickbooks"],COMMAND_CENTER_SUBMENU_TYPES_ARR=COMMAND_CENTER_SUBMENU_TYPES,isCloseManagementMenu=e=>"command_center"===e||COMMAND_CENTER_SUBMENU_TYPES_ARR.includes(e),slideInRightToLeft$1=keyframes`
27996
+ `,{drawerGroups:drawerGroups,drawerMenuSubtitles:drawerMenuSubtitles,common:{analytics:analytics$1,back:back$c,oauthConsent:{company:company$2},texts:{cash:cash,accountsPayable:accountsPayable$1,accountsReceivable:accountsReceivable$1,companySettings:companySettings,aiBookkeeping:aiBookkeeping,aiAgents:aiAgents$1,overview:overview$1,billing:billing$1,payments2:payments2$3}},dateFormat:{visual:{MMMYYFormat:mmmYy$b}},cardsShutdown:{navAlertLabel:cardsShutdownNavAlertLabel}}=appLocale.getLocalizedStrings(),CARDS_MENU_TYPE="cards",GROUP_TITLE_MAP={...drawerGroups,cash:cash,accounts_payable:accountsPayable$1,accounts_receivable:accountsReceivable$1,company:company$2,company_settings:companySettings,ai_bookkeeping:aiBookkeeping,ai_agents:aiAgents$1,invoicing_general:overview$1,invoicing_billing:billing$1,invoicing_payments_group:payments2$3,invoicing_analytics_group:analytics$1},COMMAND_CENTER_SUBMENU_TYPES=["transaction_categorization","je_schedules","missing_receipts","flux_analysis","reconciliation"],INVOICING_SETTINGS_SUBMENU_TYPES=["invoicing_settings_branding","invoicing_settings_integrations","invoicing_settings_dunning","invoicing_settings_quickbooks"],COMMAND_CENTER_SUBMENU_TYPES_ARR=COMMAND_CENTER_SUBMENU_TYPES,isCloseManagementMenu=e=>"command_center"===e||COMMAND_CENTER_SUBMENU_TYPES_ARR.includes(e),slideInRightToLeft$1=keyframes`
27997
27997
  from {
27998
27998
  transform: translateX(100%);
27999
27999
  }
@@ -28136,7 +28136,7 @@ return jsxRuntimeExports.jsx(CommandCenterSubmenuRow,{isActive:n(i),onClick:()=>
28136
28136
  return jsxRuntimeExports.jsx(CommandCenterSubmenuRow,{isActive:n(r),onClick:()=>o(r),onMouseEnter:()=>a(i),onMouseLeave:()=>a(null),role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o(r))},"data-testid":generateDataTestId(e,t),children:/* @__PURE__ */jsxRuntimeExports.jsx(CommandCenterSubmenuLabel,{children:MENU_TITLE_MAP[t]??t})},t)})})]}):null]},t.type))]});var c}function MenuList$5({selectedMenu:e,currentTenant:t,isVendorsTabVisible:n,isSetting:o,isInvoicing:i,isAiCfo:r,isAiCfoAccessEnabled:a,routinesEnabled:s,routines:l,selectedRoutineId:c,onRoutineSelect:d,skillsEnabled:p,isZeniAccountEnabled:u,isChargeCardEnabled:m,isTreasuryEnabled:h,rewardsConfiguration:g,className:x,style:f,isNotificationsTabVisible:y,isTaskManagerAccessEnabled:S,isExpenseAutomationEnabledForUser:C,aiCfoView:$,additionalMessage:b,monthEndCloseChecksView:v,onCalendarOpen:A,onPeriodChange:E,onSelectionChanged:w,onDeleteChatSession:R,updateCurrentChatSessionId:j,onBackClick:T}){const I=useGlobalInfoContext(),{isRewardsTabVisible:k}=g,{useFeatureGate:L}=useZeniFeatureContext(),{isCardsHidden:D,isCardsShuttingDown:_}=useZeniCardsVisibilityConfig(t?.tenantId),{isFeatureEnabled:P}=L(FeatureGatesNames.isDebitCardFeatureEnabled),{isFeatureEnabled:B}=L(FeatureGatesNames.isInvoicingFeatureEnabled),{isFeatureEnabled:M}=L(FeatureGatesNames.isChargeCardFeatureEnabled);let O=[];const F=i?invoicingMenuList:o?settingMenuList:menuList,N=null!=t&&isBillPayTabVisible(t,I),z=null!=t&&isReimbursementTabVisible(t,I),H=null!=I&&isZeniAccountsTabVisible(u,I),V=null!=t&&null!=I&&isCardsTabVisible(t,m,I,D),W=null!=I&&isTreasuryTabVisible(h,I),U=null!=I&&isInvoicingTabVisible(B,I);!0===Boolean(t?.userRole)&&(O=F.map(e=>{switch(e.type){case"home":case"reports":return{...e,isVisible:isTraditionalCompanyTabsVisible(I)};case"forecast":return{...e,isVisible:"netsuite"!==I.connectionName&&isTraditionalCompanyTabsVisible(I)};case"cards":return{...e,isVisible:V};case"bills":return{...e,isVisible:N};case"reimbursements":return{...e,isVisible:z};case"checking":return{...e,isVisible:H};case"invoicing":return{...e,isVisible:U};case"treasury":return{...e,isVisible:W};case"vendors":return{...e,isVisible:n};case"users_and_roles":return{...e,isVisible:hasAdminLevelAccess(I.loggedInUserRole??[])};case"rewards":return{...e,isVisible:k,isAnimated:g.isRewardsAnimated,subTitle:getRewardsSubtitle(g.rewardsPlan)};case"accounting":return{...e,isVisible:isAccountingTabVisible(I.loggedInUserRole,P,t,I.loggedInUserRoleMap)};case"approval_rules":return{...e,isVisible:isApprovalRulesTabVisible(I.loggedInUserRole,P,t,I.loggedInUserRoleMap)};case"billing":return{...e,isVisible:isBillingTabVisible(I.loggedInUserRole,t)};case"bank_connections":return{...e,isVisible:isBankConnectionsMenuVisible(t,I.loggedInUserRoleMap,M,P)};case"business_verification":return{...e,isVisible:isBusinessVerificationTabVisible(t,I.loggedInUserRoleMap)};case"company_settings":case"company_details":return{...e,isVisible:isCompanyDetailsTabVisible(I.loggedInUserRole,t,I.loggedInUserRoleMap)};case"integrations":return{...e,isVisible:isIntegrationsTabVisible(I.loggedInUserRole,P,t)};case"my_profile":return{...e,isVisible:null!=t&&isSettingsVisible(t)};case"my_bank_connections":return{...e,isVisible:isMyBankConnectionsTabVisible(t,I.loggedInUserRoleMap)};case"notifications":return{...e,isVisible:null!=t&&(isSettingsVisible(t)&&y)};case"performance":case"command_center":return{...e,isVisible:C,isAnimated:!1};case"ai_cfo":return{...e,isVisible:a,isAnimated:!0};case"task_checklist":return{...e,isVisible:!0===S,isAnimated:!1};default:return e}}));const G=e=>{w(e,b)},q=i?[...ALL_INVOICING_MENU_GROUPS]:[...ALL_MENU_GROUPS,...ALL_SETTINGS_MENU_GROUPS],Q={type:"home",group:"ai_intelligence",isVisible:!0,isAnimated:!1},Y=t=>e===t.type;/* @__PURE__ */
28137
28137
  return jsxRuntimeExports.jsx(AnimatedMenuListContainer,{isAiCfo:r,className:x,style:f,children:r?/* @__PURE__ */jsxRuntimeExports.jsx(AiCfoMenuContent,{selectedMenu:e,aiCfoView:$,routinesEnabled:s,routines:l,selectedRoutineId:c,onRoutineSelect:d,skillsEnabled:p,onClick:G,onDeleteChatSession:R,updateCurrentChatSessionId:j}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[o||i?null:/* @__PURE__ */jsxRuntimeExports.jsx(HomeSectionWrapper,{children:/* @__PURE__ */jsxRuntimeExports.jsx(MenuButton,{menu:Q,isSelected:Y(Q),isCollapsed:!1,onClick:G})}),(o||i)&&T?/* @__PURE__ */jsxRuntimeExports.jsxs(BackButtonContainer,{isSelected:!1,onClick:()=>{T()},children:[
28138
28138
  /* @__PURE__ */jsxRuntimeExports.jsx(BackIcon$2,{}),
28139
- /* @__PURE__ */jsxRuntimeExports.jsx(BackTitle,{children:back$b})]}):null,q.map(t=>"close_management"===t?/* @__PURE__ */jsxRuntimeExports.jsx(CloseManagementGroupItem,{menuList:O,selectedMenu:e,isItemSelected:Y,onClick:G,monthEndCloseChecksView:v,onPeriodChange:E,onCalendarOpen:A},t):/* @__PURE__ */jsxRuntimeExports.jsx(MenuGroupItem,{group:t,menuList:O,isCardsShuttingDown:_&&O.some(e=>e.group===t&&e.type===CARDS_MENU_TYPE),isItemSelected:Y,onClick:G},t))]})})}const getRewardsSubtitle=e=>0===e.referrerAmount.amount?void 0:drawerMenuSubtitles.rewards.replace("__reward-amount__",amountToString("0,0",e.referrerAmount)),SEARCH_INPUT_EMPTY_FILTER_MARGIN_TOP=`-${textStyles.smallMedium.lineHeightValue}px`;function reactSelectLabelToString(e){return"string"==typeof e?e:"number"==typeof e?String(e):""}const SingleValue$4=e=>{const{children:t,selectProps:n}=e,{showDownChevron:o}=n,i=reactSelectLabelToString(t);/* @__PURE__ */
28139
+ /* @__PURE__ */jsxRuntimeExports.jsx(BackTitle,{children:back$c})]}):null,q.map(t=>"close_management"===t?/* @__PURE__ */jsxRuntimeExports.jsx(CloseManagementGroupItem,{menuList:O,selectedMenu:e,isItemSelected:Y,onClick:G,monthEndCloseChecksView:v,onPeriodChange:E,onCalendarOpen:A},t):/* @__PURE__ */jsxRuntimeExports.jsx(MenuGroupItem,{group:t,menuList:O,isCardsShuttingDown:_&&O.some(e=>e.group===t&&e.type===CARDS_MENU_TYPE),isItemSelected:Y,onClick:G},t))]})})}const getRewardsSubtitle=e=>0===e.referrerAmount.amount?void 0:drawerMenuSubtitles.rewards.replace("__reward-amount__",amountToString("0,0",e.referrerAmount)),SEARCH_INPUT_EMPTY_FILTER_MARGIN_TOP=`-${textStyles.smallMedium.lineHeightValue}px`;function reactSelectLabelToString(e){return"string"==typeof e?e:"number"==typeof e?String(e):""}const SingleValue$4=e=>{const{children:t,selectProps:n}=e,{showDownChevron:o}=n,i=reactSelectLabelToString(t);/* @__PURE__ */
28140
28140
  return jsxRuntimeExports.jsx(components.SingleValue,{...e,children:/* @__PURE__ */jsxRuntimeExports.jsxs(ValueBox$3,{children:[
28141
28141
  /* @__PURE__ */jsxRuntimeExports.jsx(SingleValueTextSlot,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:i,style:{width:"100%"},itemTextStyle:{...textStyles.smallMedium.cssObject,color:"inherit"},tooltipTextStyle:{textAlign:"left"},withNoHover:!0,placement:"bottom-start"})}),!1===o?null:/* @__PURE__ */jsxRuntimeExports.jsx(DownChevronStyled,{})]})})},GroupHeading$6=e=>{const[t,n]=useState(!0),o="string"==typeof e.data.label?e.data.label:void 0;/* @__PURE__ */
28142
28142
  return jsxRuntimeExports.jsx(StyledGroupHeading$6,{isGroupOpen:t,onClick:()=>n(!t),"data-testid":generateDataTestId("group-heading",o),children:/* @__PURE__ */jsxRuntimeExports.jsxs(components.GroupHeading,{...e,children:[
@@ -42127,7 +42127,7 @@ return jsxRuntimeExports.jsxs(NavBarRightRowStyled,{children:[
42127
42127
  max-width: calc(100% - 36px);
42128
42128
  margin-left: ${Space.sp3};
42129
42129
  `,PickerTitle=({backgroundColor:e,pickerValues:t,valueToLabel:n,selectedValue:o,onPickerSelectionChanged:i,isPickerDisabled:r,titleTextStyle:a,styles:s})=>{const l=useTheme();/* @__PURE__ */
42130
- return jsxRuntimeExports.jsx(PickerContainer$2,{style:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(Picker,{pickerValues:t,valueToLabel:n,selectedValue:o,onPickerSelectionChanged:i,backgroundColor:e,titleTextStyle:a??textStyles.extraLargeRegular,titleColor:l.colors.champion,selectedOptionColor:l.colors.champion,isDisabled:r,optionTextStyle:textStyles.eyebrowSmallSemiBold})})},{common:{back:back$a}}=appLocale.getLocalizedStrings(),dimensions$1Q={navBarHeight:navBarHeight,titleMarginLeft:new ResponsiveSized(sp[3],sp[5],sp[5])},fontStyles$15={title:new ResponsiveSizedStyle("extraLargeMedium","h7Bold")},Container$4U=styled$2.div`
42130
+ return jsxRuntimeExports.jsx(PickerContainer$2,{style:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(Picker,{pickerValues:t,valueToLabel:n,selectedValue:o,onPickerSelectionChanged:i,backgroundColor:e,titleTextStyle:a??textStyles.extraLargeRegular,titleColor:l.colors.champion,selectedOptionColor:l.colors.champion,isDisabled:r,optionTextStyle:textStyles.eyebrowSmallSemiBold})})},{common:{back:back$b}}=appLocale.getLocalizedStrings(),dimensions$1Q={navBarHeight:navBarHeight,titleMarginLeft:new ResponsiveSized(sp[3],sp[5],sp[5])},fontStyles$15={title:new ResponsiveSizedStyle("extraLargeMedium","h7Bold")},Container$4U=styled$2.div`
42131
42131
  display: flex;
42132
42132
  align-items: center;
42133
42133
  justify-content: space-between;
@@ -42143,7 +42143,7 @@ return jsxRuntimeExports.jsx(PickerContainer$2,{style:s,children:/* @__PURE__ */
42143
42143
  flex-direction: row;
42144
42144
  align-items: center;
42145
42145
  gap: ${Space.sp4};
42146
- `,BackButtonWrapper$3=styled$2.div`
42146
+ `,BackButtonWrapper$4=styled$2.div`
42147
42147
  display: ${e=>e.showBackButton?"flex":"none"};
42148
42148
  align-items: center;
42149
42149
  justify-content: center;
@@ -42154,7 +42154,7 @@ return jsxRuntimeExports.jsx(PickerContainer$2,{style:s,children:/* @__PURE__ */
42154
42154
  overflow: hidden;
42155
42155
  white-space: nowrap;
42156
42156
  margin-left: ${e=>dimensions$1Q.titleMarginLeft.valuePx(e.windowSize)};
42157
- `,Back$3=styled$2(SvgArrowLeft)`
42157
+ `,Back$4=styled$2(SvgArrowLeft)`
42158
42158
  cursor: pointer;
42159
42159
  width: ${Space.sp3};
42160
42160
  height: ${Space.sp3};
@@ -42172,7 +42172,7 @@ return jsxRuntimeExports.jsx(PickerContainer$2,{style:s,children:/* @__PURE__ */
42172
42172
  color: ${e=>e.theme.colors.primary};
42173
42173
  }
42174
42174
  `;function NavBarWithPicker({picker:e,titleText:t,backgroundColor:n,showMenuIcon:o,showBackButton:i=!0,showBorderBottom:r=!1,rightSideComponent:a,onBackClick:s,onClickMenuIcon:l}){const c=useTheme(),d=useWindowSizeContext(),p=n??c.colors.grey5;/* @__PURE__ */
42175
- return jsxRuntimeExports.jsxs(Container$4U,{bgColor:p,showBorderBottom:r,windowSize:d,children:[o?/* @__PURE__ */jsxRuntimeExports.jsx(StyledMenuIcon,{onClick:l,"data-testid":generateDataTestId("nav-bar-menu-button")}):/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$3,{showBackButton:i,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{style:{marginTop:Space.sp1,height:Space.sp4},title:back$a,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$3,{"data-testid":generateDataTestId("nav-bar-back-button"),onClick:s})})}),null!=t&&/* @__PURE__ */jsxRuntimeExports.jsx(TitleText$6,{windowSize:d,children:t}),
42175
+ return jsxRuntimeExports.jsxs(Container$4U,{bgColor:p,showBorderBottom:r,windowSize:d,children:[o?/* @__PURE__ */jsxRuntimeExports.jsx(StyledMenuIcon,{onClick:l,"data-testid":generateDataTestId("nav-bar-menu-button")}):/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$4,{showBackButton:i,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{style:{marginTop:Space.sp1,height:Space.sp4},title:back$b,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$4,{"data-testid":generateDataTestId("nav-bar-back-button"),onClick:s})})}),null!=t&&/* @__PURE__ */jsxRuntimeExports.jsx(TitleText$6,{windowSize:d,children:t}),
42176
42176
  /* @__PURE__ */jsxRuntimeExports.jsx(PickerTitle,{...e,backgroundColor:p}),null!=a?/* @__PURE__ */jsxRuntimeExports.jsx(RightSideComponent$2,{children:a}):null]})}const dimensions$1P={nav:{title:{width:120,height:sp[4]},subtitle:{width:160,height:sp[4]}},filter:{label:{width:50,height:sp[2]},dropdown:{width:140,height:sp[5]},toggle:{width:100,height:sp[4]}},table:{header:{name:{width:100,height:sp[2]},value:{width:60,height:sp[2]}},row:{name:{width:140,height:sp[3]},value:{width:70,height:sp[3]}},columnCount:6,rowCount:3}},tableColumns$2=Array.from({length:dimensions$1P.table.columnCount},(e,t)=>t),tableRows$2=Array.from({length:dimensions$1P.table.rowCount},(e,t)=>t),Wrapper$6=styled$2.div`
42177
42177
  display: flex;
42178
42178
  flex: 1 1 auto;
@@ -45202,8 +45202,8 @@ return jsxRuntimeExports.jsxs(Container$4p,{windowSize:e,children:[
45202
45202
  align-items: center;
45203
45203
  justify-content: space-between;
45204
45204
  padding: ${Space.sp3} ${Space.sp4};
45205
- `,{common:{back:back$9}}=appLocale.getLocalizedStrings(),D$3g={formTitleMarginTopBottom:new ResponsiveSized(sp[0],sp[3]),formTitlePaddingLeftRight:new ResponsiveSized(sp[3],sp[5])},fontStyles$Y={formTitle:new ResponsiveSizedStyle("largeSemiBold","largeSemiBold")},BankAccountPageNavSection=({header:e,isDirty:t,hideBackIcon:n=!1,hideTopBar:o=!1,isMagicLink:i,onBackClick:r,setShowConfirmationPopup:a})=>{const s=useWindowSizeContext(),l=useTheme(),c=!n&&!1===Boolean(i),d=!o,p=()=>t?a?.(!0):r?.();/* @__PURE__ */
45206
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["small"===s?d?/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{source:"BankAccountPageNavSection_Mobile",title:e,hideSearchBtn:!0,keepBackgroundOnScroll:!0,backgroundColor:l.colors.grey4,leftSideComponent:c?/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$9,{onClick:p,"data-testid":generateDataTestId("bank-account-page-back-click-mobile")}):/* @__PURE__ */jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),rightSideComponent:null}):null:d?/* @__PURE__ */jsxRuntimeExports.jsx(NavSectionContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainerWeb$1,{children:c?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$9,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$9,{onClick:p,"data-testid":generateDataTestId("bank-account-page-back-click")})}):null})}):null,"small"!==s?/* @__PURE__ */jsxRuntimeExports.jsx(FormTitle$c,{windowSize:s,children:e}):null]})},FormTitle$c=styled$2(StyledText$c)`
45205
+ `,{common:{back:back$a}}=appLocale.getLocalizedStrings(),D$3g={formTitleMarginTopBottom:new ResponsiveSized(sp[0],sp[3]),formTitlePaddingLeftRight:new ResponsiveSized(sp[3],sp[5])},fontStyles$Y={formTitle:new ResponsiveSizedStyle("largeSemiBold","largeSemiBold")},BankAccountPageNavSection=({header:e,isDirty:t,hideBackIcon:n=!1,hideTopBar:o=!1,isMagicLink:i,onBackClick:r,setShowConfirmationPopup:a})=>{const s=useWindowSizeContext(),l=useTheme(),c=!n&&!1===Boolean(i),d=!o,p=()=>t?a?.(!0):r?.();/* @__PURE__ */
45206
+ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["small"===s?d?/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{source:"BankAccountPageNavSection_Mobile",title:e,hideSearchBtn:!0,keepBackgroundOnScroll:!0,backgroundColor:l.colors.grey4,leftSideComponent:c?/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$9,{onClick:p,"data-testid":generateDataTestId("bank-account-page-back-click-mobile")}):/* @__PURE__ */jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),rightSideComponent:null}):null:d?/* @__PURE__ */jsxRuntimeExports.jsx(NavSectionContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainerWeb$1,{children:c?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$a,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$9,{onClick:p,"data-testid":generateDataTestId("bank-account-page-back-click")})}):null})}):null,"small"!==s?/* @__PURE__ */jsxRuntimeExports.jsx(FormTitle$c,{windowSize:s,children:e}):null]})},FormTitle$c=styled$2(StyledText$c)`
45207
45207
  ${e=>`${fontStyles$Y.formTitle.style(e.windowSize)}`};
45208
45208
  display: flex;
45209
45209
  flex-direction: column;
@@ -61032,10 +61032,10 @@ return jsxRuntimeExports.jsx(TransferContainer$5,{windowSize:R,children:"Complet
61032
61032
  margin-right: ${Space.sp2};
61033
61033
  padding: 12px ${Space.sp0};
61034
61034
  box-sizing: content-box;
61035
- `,{common:{back:back$8},spendManagement:{zeniAccounts:{zeniAccountList:{transferDrawer:strings$2Q}}}}=appLocale.getLocalizedStrings(),dimensions$1o={pageTitleMarginXAxis:new ResponsiveSized(sp[0],sp[8]),navBarContainerPaddingXaxis:new ResponsiveSized(sp[2],sp[3]),pageContentPaddingLeftRight:new ResponsiveSized(sp[3],sp[0]),navBarContainerMarginLeftRight:new ResponsiveSized(sp[0],sp[8]),descriptionMarginLeftRight:new ResponsiveSized(sp[0],sp[8]),accountInfoPageWrapperMarginLeft:new ResponsiveSized(sp[0],sp[8]),accountInfoPageWrapperMarginRight:new ResponsiveSized(sp[0],sp[5]),accountInfoPageWrapperMarginBottom:new ResponsiveSized(sp[5],sp[8])},WireTransferAccountInfoPage=({authParams:e,downloadAccountDetailEndPoint:t,depositAccount:n,zeniAccountsConfigDetail:o,currentTenant:i,onDismissClick:r,fireTrackTransferBetweenAccountsFormClicked:a,setShowWireAccountInfo:s,fromAutoTransferRule:l})=>{const c=useWindowSizeContext();/* @__PURE__ */
61035
+ `,{common:{back:back$9},spendManagement:{zeniAccounts:{zeniAccountList:{transferDrawer:strings$2Q}}}}=appLocale.getLocalizedStrings(),dimensions$1o={pageTitleMarginXAxis:new ResponsiveSized(sp[0],sp[8]),navBarContainerPaddingXaxis:new ResponsiveSized(sp[2],sp[3]),pageContentPaddingLeftRight:new ResponsiveSized(sp[3],sp[0]),navBarContainerMarginLeftRight:new ResponsiveSized(sp[0],sp[8]),descriptionMarginLeftRight:new ResponsiveSized(sp[0],sp[8]),accountInfoPageWrapperMarginLeft:new ResponsiveSized(sp[0],sp[8]),accountInfoPageWrapperMarginRight:new ResponsiveSized(sp[0],sp[5]),accountInfoPageWrapperMarginBottom:new ResponsiveSized(sp[5],sp[8])},WireTransferAccountInfoPage=({authParams:e,downloadAccountDetailEndPoint:t,depositAccount:n,zeniAccountsConfigDetail:o,currentTenant:i,onDismissClick:r,fireTrackTransferBetweenAccountsFormClicked:a,setShowWireAccountInfo:s,fromAutoTransferRule:l})=>{const c=useWindowSizeContext();/* @__PURE__ */
61036
61036
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
61037
61037
  /* @__PURE__ */jsxRuntimeExports.jsxs(PageContent$k,{windowSize:c,children:[
61038
- /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$h,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$8,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIconWrapper,{"data-testid":generateDataTestId("wire-transfer-account-info-back-button"),onClick:()=>{a("Back","Wire Transfer Details"),s(!1)},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$4,{})})})}),
61038
+ /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$h,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$9,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIconWrapper,{"data-testid":generateDataTestId("wire-transfer-account-info-back-button"),onClick:()=>{a("Back","Wire Transfer Details"),s(!1)},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$4,{})})})}),
61039
61039
  /* @__PURE__ */jsxRuntimeExports.jsx(PageTitle$4,{windowSize:c,children:strings$2Q.wireInstruction.replace("__accountName__",n.accountName)}),
61040
61040
  /* @__PURE__ */jsxRuntimeExports.jsx(Description$e,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(Line1,{children:strings$2Q.wireTransferDescriptionLine1})}),
61041
61041
  /* @__PURE__ */jsxRuntimeExports.jsx(AccountInfoPageWrapper,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(AccountInfoPageContent,{authParams:e,downloadAccountDetailEndPoint:t,currentTab:"wireDetails",zeniAccountsConfigDetail:o,currentTenant:i,depositAccount:n})})]}),
@@ -61090,10 +61090,10 @@ return jsxRuntimeExports.jsx(TransferContainer$4,{children:(()=>{const L=(n,o)=>
61090
61090
  overflow-x: hidden;
61091
61091
  height: 100%;
61092
61092
  width: 100%;
61093
- `,SvgExternalAccount=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("rect",{width:32,height:32,rx:16,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M9.92822 22.9733L10.4553 21.3897C10.475 21.3305 10.5128 21.279 10.5634 21.2425C10.6141 21.206 10.6749 21.1863 10.7373 21.1863H21.6117C21.6741 21.1863 21.7349 21.206 21.7855 21.2425C21.8361 21.279 21.8739 21.3305 21.8936 21.3897L22.4207 22.9709",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M11.1182 14.645H21.2311V21.1887H11.1182V14.645Z",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M23.0157 22.9734H9.3335",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M12.9038 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M14.6885 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M17.6626 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M19.4473 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M22.3432 13.0918C22.3649 13.0266 22.3634 12.9559 22.3389 12.8917C22.3143 12.8275 22.2684 12.7738 22.2087 12.7396L16.3218 9.37322C16.2766 9.34712 16.2253 9.33337 16.1731 9.33337C16.1209 9.33337 16.0696 9.34712 16.0244 9.37322L10.135 12.7373C10.0754 12.7714 10.0294 12.8251 10.0049 12.8893C9.9804 12.9535 9.97888 13.0242 10.0006 13.0894L10.4551 14.4416C10.4748 14.5008 10.5126 14.5523 10.5633 14.5888C10.6139 14.6253 10.6747 14.645 10.7371 14.645H21.6115C21.6739 14.645 21.7347 14.6253 21.7853 14.5888C21.8359 14.5523 21.8737 14.5008 21.8934 14.4416L22.3432 13.0918Z",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M22.3212 12.8604H10.0244",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),dimensions$1n={largeLabelWidth:new ResponsiveSized(120,120,160),containerPaddingLeft:new ResponsiveSized(sp[3],sp[5],sp[5]),containerPaddingRight:new ResponsiveSized(sp[3],sp[5],sp[5]),reviewContentWrapperPaddingBottom:new ResponsiveSized(sp[5],sp[8])},fontStyles$D={pageTitle:new ResponsiveSizedStyle("h7Medium","h7Medium")},{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$8}},common:{edit:edit$1,labels:labels$4,back:back$7,to:to$1,zeniInc:zeniInc,texts:{reviewAndConfirm:reviewAndConfirm,pay:pay}},spendManagement:{chargeCard:{payEarly:payEarlyStrings$3}}}=appLocale.getLocalizedStrings(),CreditCardPaymentReviewPage=({paymentDetails:e,isCashbackInfoFetchStateCompleted:t,isCreditCardInfoFetchStateCompleted:n,isDebitCardInfoFetchStateCompleted:o,controllerEmails:i,productInformation:r,cashbackInformation:a,paymentSourceInformation:s,creditAccountInformation:l,debitAccountInformation:c,setShowReviewContent:d,onTransferClick:p})=>{const u=useWindowSizeContext(),m=useTheme(),h=useToolkitContext().analytics,[g,x]=useState(!1);useEffect(()=>{null!=e.error?x(!0):x(!1)},[e.error]);const f=dimensions$1n.largeLabelWidth.value(u),y="depositAccount"===e.chargeCardRepaymentDetailLocalData.transferFrom?.accType,S=y?1:3,C=zeniDate(getNextNthWorkingDay(dateNow().toDate(),[0,6],S).toDateString()).format(MMMDCommaYYYYformat$8),$=y?payEarlyStrings$3.timeline01BusinessDay:payEarlyStrings$3.timeline23BusinessDays,b=y?payEarlyStrings$3.estimatedPaymentCompleteWithoutTimeline.replace("__date__",C):payEarlyStrings$3.estimatedPaymentCompleteWithTimeline.replace("__date__",C).replace("__timeline__",$);/* @__PURE__ */
61093
+ `,SvgExternalAccount=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("rect",{width:32,height:32,rx:16,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M9.92822 22.9733L10.4553 21.3897C10.475 21.3305 10.5128 21.279 10.5634 21.2425C10.6141 21.206 10.6749 21.1863 10.7373 21.1863H21.6117C21.6741 21.1863 21.7349 21.206 21.7855 21.2425C21.8361 21.279 21.8739 21.3305 21.8936 21.3897L22.4207 22.9709",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M11.1182 14.645H21.2311V21.1887H11.1182V14.645Z",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M23.0157 22.9734H9.3335",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M12.9038 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M14.6885 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M17.6626 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M19.4473 14.645V21.1887",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M22.3432 13.0918C22.3649 13.0266 22.3634 12.9559 22.3389 12.8917C22.3143 12.8275 22.2684 12.7738 22.2087 12.7396L16.3218 9.37322C16.2766 9.34712 16.2253 9.33337 16.1731 9.33337C16.1209 9.33337 16.0696 9.34712 16.0244 9.37322L10.135 12.7373C10.0754 12.7714 10.0294 12.8251 10.0049 12.8893C9.9804 12.9535 9.97888 13.0242 10.0006 13.0894L10.4551 14.4416C10.4748 14.5008 10.5126 14.5523 10.5633 14.5888C10.6139 14.6253 10.6747 14.645 10.7371 14.645H21.6115C21.6739 14.645 21.7347 14.6253 21.7853 14.5888C21.8359 14.5523 21.8737 14.5008 21.8934 14.4416L22.3432 13.0918Z",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M22.3212 12.8604H10.0244",stroke:"#757D7E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),dimensions$1n={largeLabelWidth:new ResponsiveSized(120,120,160),containerPaddingLeft:new ResponsiveSized(sp[3],sp[5],sp[5]),containerPaddingRight:new ResponsiveSized(sp[3],sp[5],sp[5]),reviewContentWrapperPaddingBottom:new ResponsiveSized(sp[5],sp[8])},fontStyles$D={pageTitle:new ResponsiveSizedStyle("h7Medium","h7Medium")},{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$8}},common:{edit:edit$1,labels:labels$4,back:back$8,to:to$1,zeniInc:zeniInc,texts:{reviewAndConfirm:reviewAndConfirm,pay:pay}},spendManagement:{chargeCard:{payEarly:payEarlyStrings$3}}}=appLocale.getLocalizedStrings(),CreditCardPaymentReviewPage=({paymentDetails:e,isCashbackInfoFetchStateCompleted:t,isCreditCardInfoFetchStateCompleted:n,isDebitCardInfoFetchStateCompleted:o,controllerEmails:i,productInformation:r,cashbackInformation:a,paymentSourceInformation:s,creditAccountInformation:l,debitAccountInformation:c,setShowReviewContent:d,onTransferClick:p})=>{const u=useWindowSizeContext(),m=useTheme(),h=useToolkitContext().analytics,[g,x]=useState(!1);useEffect(()=>{null!=e.error?x(!0):x(!1)},[e.error]);const f=dimensions$1n.largeLabelWidth.value(u),y="depositAccount"===e.chargeCardRepaymentDetailLocalData.transferFrom?.accType,S=y?1:3,C=zeniDate(getNextNthWorkingDay(dateNow().toDate(),[0,6],S).toDateString()).format(MMMDCommaYYYYformat$8),$=y?payEarlyStrings$3.timeline01BusinessDay:payEarlyStrings$3.timeline23BusinessDays,b=y?payEarlyStrings$3.estimatedPaymentCompleteWithoutTimeline.replace("__date__",C):payEarlyStrings$3.estimatedPaymentCompleteWithTimeline.replace("__date__",C).replace("__timeline__",$);/* @__PURE__ */
61094
61094
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
61095
61095
  /* @__PURE__ */jsxRuntimeExports.jsxs(PageContent$j,{windowSize:u,children:[
61096
- /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$g,{windowSize:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$7,enterTouchDelay:600,placement:"bottom",display:"flex",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackIconWrapper,{"data-testid":generateDataTestId("nav-bar-back-credit-card-payment-review"),onClick:()=>{t&&n&&o&&null!=a&&h.trackCardsPayEarlyFormClick(i,r,a,"Back",e.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:e.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:e.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:e.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:e.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},s,l,c),d(!1)},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$3,{})})})}),
61096
+ /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$g,{windowSize:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$8,enterTouchDelay:600,placement:"bottom",display:"flex",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackIconWrapper,{"data-testid":generateDataTestId("nav-bar-back-credit-card-payment-review"),onClick:()=>{t&&n&&o&&null!=a&&h.trackCardsPayEarlyFormClick(i,r,a,"Back",e.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:e.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:e.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:e.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:e.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},s,l,c),d(!1)},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$3,{})})})}),
61097
61097
  /* @__PURE__ */jsxRuntimeExports.jsx(PageTitle$3,{windowSize:u,children:reviewAndConfirm}),
61098
61098
  /* @__PURE__ */jsxRuntimeExports.jsxs(TransferAmount$3,{children:[pay," ",
61099
61099
  /* @__PURE__ */jsxRuntimeExports.jsx(PrimaryText,{children:/* @__PURE__ */jsxRuntimeExports.jsx(AmountBalance,{amount:e.chargeCardRepaymentDetailLocalData.amount,style:{display:"inline-flex"}})})," ",to$1," ",
@@ -64480,13 +64480,13 @@ return jsxRuntimeExports.jsxs(StepRow$1,{type:"button",onClick:m?()=>s?.(o):void
64480
64480
  `,FooterSlot=styled$2.div`
64481
64481
  flex-shrink: 0;
64482
64482
  padding: ${Space.sp3} ${Space.sp1};
64483
- `,{customerOnboardingPage:{sections:{activateSubscription:activateSubscription,connectLedgerPage:connectLedgerPage,officerVerifyPage:officerVerifyPage,companyVerifyPage:companyVerifyPage}},common:{back:back$6,texts:{connectYourLedger:connectYourLedger,documentsAreEncryptedAndStoredWithSoc2:documentsAreEncryptedAndStoredWithSoc2,requiredFoundationForBothAiAgents:requiredFoundationForBothAiAgents,verifyYourIdentity:verifyYourIdentity}}}=appLocale.getLocalizedStrings(),buildSidebarStepStatuses=(e,t,n)=>{const o={};for(const i of t)o[i]="complete";return n&&(o.connect_ledger="complete"),o[e]="active",o},CustomerOnboardingPage=e=>{const{onboardingCustomerView:t,cardPaymentView:n,signedInUser:o,currentTenant:i,isOnAddressPage:r,stripeKey:a,googleAPIKey:s,onUpdateStep:l,onUpdateSubStep:c,onZeniLogoClick:d,handleLogOutClick:p,handleCockpitClick:u,handleReferralsClick:m,meetingUrl:h,analytics:g,handleCreateCardSetupIntent:x,handleConfirmCardSetupIntent:f,handleFetchPaymentSources:y,updateCardPaymentModalState:S,resetCardPaymentViewState:C,handleResetCardPaymentErrorStatuses:$,redirectToProductSuitePage:b,onAcknowledgeAiFinanceTeam:v,integrationsSectionProps:A,aiAgentsActivationProps:E,...w}=e,R=e.onSkipSetupClick,j=useToolkitContext().analytics,T=useRef(j);T.current=j;const I=useRef(!1),k=!0===i?.productSettings?.isOtherProductsEnabled&&!isTenantBookkeepingEnabled(i),{allSteps:L,completedSteps:D,currentStep:_,currentSubStep:P,fetchStatus:B,saveStatus:M}=t,O=t.companyView?.company.company.companyOnboardingInfo,F=O?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiFinanceTeamAcknowledged??!1,N=O?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1,z=t.externalConnections?.accounting[0]?.isValid??!1,H=O?.onboardingInfo?.bankAccountLinked?.pendingVerification??!1,V=t.paymentAccount?.isLoginRequired??!1,W=useRef(_),U=useRef(P),G=useRef(L),q=useRef(null),[,Q]=useState([]),Y=buildSidebarStepStatuses(_,D,z);useEffect(()=>{if(W.current!==_){const e=W.current,t=U.current,n="verification"===_||"connect_data_source"===_?P:"default";g?.trackOnboardingCurrentStep({step:_,sub_step:n},{step:e,sub_step:t}),W.current=_}U.current=P},[_,g,P]),useEffect(()=>{"Completed"===B.fetchState&&!1===F&&!1===I.current&&(I.current=!0,T.current.trackOnboardingAiFinanceTeamViewed())},[B.fetchState,F]),useEffect(()=>{L.length!==G.current.length&&(G.current=L)},[L]);const K=(e,t,n)=>{const o=G.current.length,i=G.current.indexOf(e);switch(t){case"next":{const t=(i+1)%o,r=G.current[t],a="verification"===r?"unlock-stack":"default";l(r),c(a);const s={step:e,sub_step:P},d={step:r,sub_step:a};!0===n&&g.trackOnboardingNext(s,d);break}case"previous":{const t=(i+o-1)%o,r=G.current[t];l(r),c("default");const a={step:e,sub_step:P},s={step:r,sub_step:"default"};!0===n&&g.trackOnboardingBack(a,s);break}}},Z="small"===useWindowSizeContext(),X="In-Progress"===B.fetchState||"Not-Started"===B.fetchState,J="In-Progress"===M.fetchState,ee=/* @__PURE__ */jsxRuntimeExports.jsx(OnboardingSidebar,{steps:L,stepStatuses:Y,allRequiredStepsCompleted:t.allRequiredStepsCompleted,warningStep:H&&!V?"setup_billing":void 0,errorStep:V?"setup_billing":void 0,onLogoClick:d,onStepClick:e=>{const t="verification"===e?"unlock-stack":"default";e!==_&&l(e),P!==t&&c(t)},footerSlot:/* @__PURE__ */jsxRuntimeExports.jsx(LogoutButton,{signedInUser:o,currentTenant:i,onLogOutClick:p,onCockpitClick:u,onReferralsClick:m,isSettingsFeatureEnabled:!1})}),te=i?.companyName??"your company",ne=0===L.indexOf(_),oe=/* @__PURE__ */jsxRuntimeExports.jsx(CustomerOnboardingDetailPage,{ref:q,onboardingCustomerView:t,analytics:g,updateStepHandler:K,onUpdateStep:l,onUpdateSubStep:c,handleCreateCardSetupIntent:x,handleConfirmCardSetupIntent:f,updateCardPaymentModalState:S,handleFetchPaymentSources:y,cardPaymentView:n,resetCardPaymentViewState:C,stripeKey:a,googleAPIKey:s,handleResetCardPaymentErrorStatuses:$,redirectToProductSuitePage:b,isProductSuiteTenant:k,integrationsSectionProps:A,onFormErrorsChange:Q,...w}),ie=()=>q.current?.triggerNext(),re=()=>q.current?.triggerPrevious(),ae=L.indexOf(_)+1,se=L.length;if(X)/* @__PURE__ */
64483
+ `,{customerOnboardingPage:{sections:{activateSubscription:activateSubscription,connectLedgerPage:connectLedgerPage,officerVerifyPage:officerVerifyPage,companyVerifyPage:companyVerifyPage}},common:{back:back$7,texts:{connectYourLedger:connectYourLedger,documentsAreEncryptedAndStoredWithSoc2:documentsAreEncryptedAndStoredWithSoc2,requiredFoundationForBothAiAgents:requiredFoundationForBothAiAgents,verifyYourIdentity:verifyYourIdentity}}}=appLocale.getLocalizedStrings(),buildSidebarStepStatuses=(e,t,n)=>{const o={};for(const i of t)o[i]="complete";return n&&(o.connect_ledger="complete"),o[e]="active",o},CustomerOnboardingPage=e=>{const{onboardingCustomerView:t,cardPaymentView:n,signedInUser:o,currentTenant:i,isOnAddressPage:r,stripeKey:a,googleAPIKey:s,onUpdateStep:l,onUpdateSubStep:c,onZeniLogoClick:d,handleLogOutClick:p,handleCockpitClick:u,handleReferralsClick:m,meetingUrl:h,analytics:g,handleCreateCardSetupIntent:x,handleConfirmCardSetupIntent:f,handleFetchPaymentSources:y,updateCardPaymentModalState:S,resetCardPaymentViewState:C,handleResetCardPaymentErrorStatuses:$,redirectToProductSuitePage:b,onAcknowledgeAiFinanceTeam:v,integrationsSectionProps:A,aiAgentsActivationProps:E,...w}=e,R=e.onSkipSetupClick,j=useToolkitContext().analytics,T=useRef(j);T.current=j;const I=useRef(!1),k=!0===i?.productSettings?.isOtherProductsEnabled&&!isTenantBookkeepingEnabled(i),{allSteps:L,completedSteps:D,currentStep:_,currentSubStep:P,fetchStatus:B,saveStatus:M}=t,O=t.companyView?.company.company.companyOnboardingInfo,F=O?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiFinanceTeamAcknowledged??!1,N=O?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1,z=t.externalConnections?.accounting[0]?.isValid??!1,H=O?.onboardingInfo?.bankAccountLinked?.pendingVerification??!1,V=t.paymentAccount?.isLoginRequired??!1,W=useRef(_),U=useRef(P),G=useRef(L),q=useRef(null),[,Q]=useState([]),Y=buildSidebarStepStatuses(_,D,z);useEffect(()=>{if(W.current!==_){const e=W.current,t=U.current,n="verification"===_||"connect_data_source"===_?P:"default";g?.trackOnboardingCurrentStep({step:_,sub_step:n},{step:e,sub_step:t}),W.current=_}U.current=P},[_,g,P]),useEffect(()=>{"Completed"===B.fetchState&&!1===F&&!1===I.current&&(I.current=!0,T.current.trackOnboardingAiFinanceTeamViewed())},[B.fetchState,F]),useEffect(()=>{L.length!==G.current.length&&(G.current=L)},[L]);const K=(e,t,n)=>{const o=G.current.length,i=G.current.indexOf(e);switch(t){case"next":{const t=(i+1)%o,r=G.current[t],a="verification"===r?"unlock-stack":"default";l(r),c(a);const s={step:e,sub_step:P},d={step:r,sub_step:a};!0===n&&g.trackOnboardingNext(s,d);break}case"previous":{const t=(i+o-1)%o,r=G.current[t];l(r),c("default");const a={step:e,sub_step:P},s={step:r,sub_step:"default"};!0===n&&g.trackOnboardingBack(a,s);break}}},Z="small"===useWindowSizeContext(),X="In-Progress"===B.fetchState||"Not-Started"===B.fetchState,J="In-Progress"===M.fetchState,ee=/* @__PURE__ */jsxRuntimeExports.jsx(OnboardingSidebar,{steps:L,stepStatuses:Y,allRequiredStepsCompleted:t.allRequiredStepsCompleted,warningStep:H&&!V?"setup_billing":void 0,errorStep:V?"setup_billing":void 0,onLogoClick:d,onStepClick:e=>{const t="verification"===e?"unlock-stack":"default";e!==_&&l(e),P!==t&&c(t)},footerSlot:/* @__PURE__ */jsxRuntimeExports.jsx(LogoutButton,{signedInUser:o,currentTenant:i,onLogOutClick:p,onCockpitClick:u,onReferralsClick:m,isSettingsFeatureEnabled:!1})}),te=i?.companyName??"your company",ne=0===L.indexOf(_),oe=/* @__PURE__ */jsxRuntimeExports.jsx(CustomerOnboardingDetailPage,{ref:q,onboardingCustomerView:t,analytics:g,updateStepHandler:K,onUpdateStep:l,onUpdateSubStep:c,handleCreateCardSetupIntent:x,handleConfirmCardSetupIntent:f,updateCardPaymentModalState:S,handleFetchPaymentSources:y,cardPaymentView:n,resetCardPaymentViewState:C,stripeKey:a,googleAPIKey:s,handleResetCardPaymentErrorStatuses:$,redirectToProductSuitePage:b,isProductSuiteTenant:k,integrationsSectionProps:A,onFormErrorsChange:Q,...w}),ie=()=>q.current?.triggerNext(),re=()=>q.current?.triggerPrevious(),ae=L.indexOf(_)+1,se=L.length;if(X)/* @__PURE__ */
64484
64484
  return jsxRuntimeExports.jsx(OnboardingContainer$1,{isOnAddressPage:r,children:/* @__PURE__ */jsxRuntimeExports.jsx(OnboardingInitialLoader,{})});if(!F){const e=o?.firstName??"there";/* @__PURE__ */
64485
64485
  return jsxRuntimeExports.jsx(OnboardingContainer$1,{isOnAddressPage:r,children:/* @__PURE__ */jsxRuntimeExports.jsx(AiFinanceTeamReadyPage,{userFirstName:e,companyName:te,isConnecting:"In-Progress"===t.aiFinanceTeamAcknowledgementStatus?.fetchState,onConnectClick:v??(()=>{}),onLogoClick:d})})}/* @__PURE__ */
64486
64486
  return jsxRuntimeExports.jsx(OnboardingContainer$1,{isOnAddressPage:r,children:r?ee:/* @__PURE__ */jsxRuntimeExports.jsxs(OnboardingWrapper,{children:[Z?null:ee,(()=>{if("connect_ledger"===_&&"ai-activating"===P){const{onContinueClicked:e,...t}=E??{};/* @__PURE__ */
64487
64487
  return jsxRuntimeExports.jsx(AIAgentsActivatingPage,{tenantName:te,stepNumber:ae,totalSteps:se,alreadyViewed:N,...t,onContinueClick:()=>{j.trackOnboardingButtonClicked("activation_continue",{step:_,sub_step:P},!0,"acknowledge_ai_activation"),e?.(),K("connect_ledger","next",!0)}})}if("connect_data_source"===_)return null==A?null:/* @__PURE__ */jsxRuntimeExports.jsx(ConnectDataSourcesPage,{stepNumber:ae,totalSteps:se,isContinueEnabled:!0,integrationsContent:/* @__PURE__ */jsxRuntimeExports.jsx(IntegrationsSection,{...A,hideLedger:!0}),onContinueClick:()=>{j.trackOnboardingButtonClicked("connect_data_sources_continue",{step:_,sub_step:P},!1,""),K("connect_data_source","next",!0)},onSkipClick:()=>{j.trackOnboardingButtonClicked("connect_data_sources_skip",{step:_,sub_step:P},!1,""),j.trackOnboardingStepSkipped("connect_data_source"),K("connect_data_source","next",!0)}});if("verification"===_&&"unlock-stack"===P)/* @__PURE__ */
64488
64488
  return jsxRuntimeExports.jsx(VerifyUnlockFinancialStackPage,{stepNumber:ae,totalSteps:se,onStartVerificationClick:()=>{j.trackOnboardingButtonClicked("start_verification",{step:_,sub_step:P},!1,""),c("company_officer")},onStartKycClick:()=>{j.trackOnboardingButtonClicked("start_kyc",{step:_,sub_step:P},!1,""),c("company_officer")},onStartKybClick:()=>{j.trackOnboardingButtonClicked("start_kyb",{step:_,sub_step:P},!1,""),c("company_details")},skipDisabled:V||H||!k&&!z,skipDisabledReason:V?"login-required":H?"pending-verification":"qbo",onSkipToDashboardClick:()=>{j.trackOnboardingButtonClicked("skip_to_dashboard",{step:_,sub_step:P},!k,k?"":"skip_setup"),k?b():R()}});const e=(()=>{switch(_){case"setup_billing":return{title:activateSubscription.pageTitle,subtitle:activateSubscription.pageSubtitle,ctaLabel:L.includes("connect_ledger")?activateSubscription.ctaLabel:activateSubscription.ctaLabelWithoutLedger};case"connect_ledger":return{title:connectYourLedger,subtitle:requiredFoundationForBothAiAgents,ctaLabel:connectLedgerPage.ctaLabel};case"verification":return"company_details"===P?{title:companyVerifyPage.pageTitle,subtitle:documentsAreEncryptedAndStoredWithSoc2,ctaLabel:companyVerifyPage.ctaLabel}:{title:verifyYourIdentity,subtitle:documentsAreEncryptedAndStoredWithSoc2,ctaLabel:officerVerifyPage.ctaLabel};default:return{title:activateSubscription.pageTitle,subtitle:activateSubscription.pageSubtitle,ctaLabel:activateSubscription.ctaLabel}}})(),n="verification"===_&&("company_officer"===P||"company_details"===P),o="connect_ledger"!==_&&(n||!ne),i="connect_ledger"===_?()=>{N?K("connect_ledger","next",!0):c("ai-activating")}:ie,r=t.subscriptionBillingAddress,a=null!=r&&Boolean(r.street?.join("").trim())&&Boolean(r.city)&&Boolean(r.state)&&Boolean(r.country)&&Boolean(r.postalCode),s=null!=t.companyView?.company.company.companyOnboardingInfo.subscriptionBillingAddressId||a,l=J||"connect_ledger"===_&&!z||"setup_billing"===_&&!s,d=n?()=>c("unlock-stack"):re;/* @__PURE__ */
64489
- return jsxRuntimeExports.jsx(OnboardingStepFrame,{title:e.title,subtitle:e.subtitle,stepNumber:ae,totalSteps:se,ctaLabel:e.ctaLabel,onCtaClick:()=>{const e="connect_ledger"!==_;j.trackOnboardingButtonClicked("primary_continue",{step:_,sub_step:P},e,e?"save":""),i()},ctaLoading:J,ctaDisabled:l,backLabel:o?back$6:void 0,onBackClick:o?()=>{j.trackOnboardingButtonClicked("back",{step:_,sub_step:P},!1,""),d()}:void 0,backDisabled:J,children:oe})})(),
64489
+ return jsxRuntimeExports.jsx(OnboardingStepFrame,{title:e.title,subtitle:e.subtitle,stepNumber:ae,totalSteps:se,ctaLabel:e.ctaLabel,onCtaClick:()=>{const e="connect_ledger"!==_;j.trackOnboardingButtonClicked("primary_continue",{step:_,sub_step:P},e,e?"save":""),i()},ctaLoading:J,ctaDisabled:l,backLabel:o?back$7:void 0,onBackClick:o?()=>{j.trackOnboardingButtonClicked("back",{step:_,sub_step:P},!1,""),d()}:void 0,backDisabled:J,children:oe})})(),
64490
64490
  /* @__PURE__ */jsxRuntimeExports.jsx(HelpButton,{isFooterRendered:!0,meetingUrl:h,analytics:g,productType:"onboarding"})]})})},OnboardingContainer$1=styled$2.div`
64491
64491
  display: flex;
64492
64492
  flex-direction: column;
@@ -67934,7 +67934,7 @@ return jsxRuntimeExports.jsxs(Container$2a,{children:[
67934
67934
  background-color: ${e=>e.theme.colors.grey4};
67935
67935
  `,TableContainer$b=styled$2.div`
67936
67936
  display: flex;
67937
- `,uniqueFormName$d=e=>`${e}_form`,getDefaultValues$l=(e,t)=>({[globalReviewListTableSectionId]:e.map(e=>{const{merchant:n}=e;let o=n.oldMerchantName;return"originalVendor"===e.currentSelection&&null!=e.selectedMerchantId&&(o=e.selectedMerchantId),{tenantId:n.tenantId,merchantId:n.tenantMerchantId,originalVendor:getDefaultMerchantValue(o,n,t),recommendedFirst:e.recommendations[0],recommendedSecond:e.recommendations[1],currentSelection:{recommendedFirst:"recommendedFirst"===e.currentSelection,recommendedSecond:"recommendedSecond"===e.currentSelection,requested:"requested"===e.currentSelection,originalVendor:"originalVendor"===e.currentSelection},requested:n.tenantMerchantId}})}),getAllMerchantOptions=e=>e.map(e=>({label:e.globalMerchantName,value:e.globalMerchantId})).sort((e,t)=>e.label.localeCompare(t.label)),{common:{back:back$5}}=appLocale.getLocalizedStrings(),NavbarContainer$2=styled$2.div`
67937
+ `,uniqueFormName$d=e=>`${e}_form`,getDefaultValues$l=(e,t)=>({[globalReviewListTableSectionId]:e.map(e=>{const{merchant:n}=e;let o=n.oldMerchantName;return"originalVendor"===e.currentSelection&&null!=e.selectedMerchantId&&(o=e.selectedMerchantId),{tenantId:n.tenantId,merchantId:n.tenantMerchantId,originalVendor:getDefaultMerchantValue(o,n,t),recommendedFirst:e.recommendations[0],recommendedSecond:e.recommendations[1],currentSelection:{recommendedFirst:"recommendedFirst"===e.currentSelection,recommendedSecond:"recommendedSecond"===e.currentSelection,requested:"requested"===e.currentSelection,originalVendor:"originalVendor"===e.currentSelection},requested:n.tenantMerchantId}})}),getAllMerchantOptions=e=>e.map(e=>({label:e.globalMerchantName,value:e.globalMerchantId})).sort((e,t)=>e.label.localeCompare(t.label)),{common:{back:back$6}}=appLocale.getLocalizedStrings(),NavbarContainer$3=styled$2.div`
67938
67938
  position: -webkit-sticky;
67939
67939
  position: sticky;
67940
67940
  z-index: 3;
@@ -67949,7 +67949,7 @@ return jsxRuntimeExports.jsxs(Container$2a,{children:[
67949
67949
  &:hover {
67950
67950
  color: ${e=>e.theme.colors.primary};
67951
67951
  }
67952
- `,BackButtonWrapper$2=styled$2.div`
67952
+ `,BackButtonWrapper$3=styled$2.div`
67953
67953
  display: flex;
67954
67954
  align-items: center;
67955
67955
  justify-content: center;
@@ -67962,7 +67962,7 @@ return jsxRuntimeExports.jsxs(Container$2a,{children:[
67962
67962
  &:hover {
67963
67963
  background-color: ${e=>e.theme.colors.grey3};
67964
67964
  }
67965
- `,Back$2=styled$2(SvgArrowLeft)`
67965
+ `,Back$3=styled$2(SvgArrowLeft)`
67966
67966
  width: ${Space.sp3};
67967
67967
  height: ${Space.sp3};
67968
67968
  color: ${e=>e.theme.colors.champion};
@@ -67970,7 +67970,7 @@ return jsxRuntimeExports.jsxs(Container$2a,{children:[
67970
67970
  color: ${e=>e.theme.colors.primary};
67971
67971
  }
67972
67972
  `;function NavBarWithLaunch({title:e,tooltipTextOnLaunch:t,backgroundColor:n,style:o,onLaunchClick:i,onBackClick:r,showLaunchIcon:a=!0}){const s=useTheme();/* @__PURE__ */
67973
- return jsxRuntimeExports.jsx(NavbarContainer$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:e,style:o,backgroundColor:n??s.colors.grey5,onBackClick:r,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$5,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$2,{onClick:r,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$2,{})})}),source:"NavBarWithLaunch",rightSideComponent:null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,style:{padding:`2px ${Space.sp2}`},title:t,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Launch,{onClick:i,showLaunchIcon:a})}):/* @__PURE__ */jsxRuntimeExports.jsx(Launch,{onClick:i,showLaunchIcon:a}),enableTitleOnScroll:!0})})}const strings$2l=appLocale.getLocalizedStrings(),transactionDetailsForAnalytics=e=>({transactionDate:e.date.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),scheduledTransactionDetailsForAnalytics=e=>({currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,endMonth:e.endDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null}),scheduledAccruedDetailsForAnalytics=e=>({scheduleCreateDate:e.createTime.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,endMonth:e.endDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null}),journalEntryDetailsForAnalytics=(e,t)=>{const n=null!=e.jeLink.recommendedTransactionID?getThirdPartyIdFromTransactionId(e.jeLink.recommendedTransactionID):void 0;return{journalEntryMonth:e.postingDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryPostingDate:e.postingDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryTransactionAmount:e.amount??null,journalEntryPostingStatus:e.postingStatus,journalEntryMemo:e.memo,journalEntryQBOLink:t??null,wasRecommendationAvailable:Boolean(e.jeLink.recommendedTransactionID),wasRecommendationSelected:!0===Boolean(n)&&e.jeLink.thirdPartyTransactionId===n}},scheduleJournalEntryDetailsForAnalytics=e=>({journalEntryMonth:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryPostingDate:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryTransactionAmount:e.amount??null,journalEntryPostingStatus:e.status.label,journalEntryMemo:e.memo,wasRecommendationAvailable:!1,wasRecommendationSelected:!1,journalEntryQBOLink:null}),scheduleAccruedJournalEntryDetailsForAnalytics=e=>({journalEntryAmount:e.amount??null,journalEntryBalance:e.runningBalance??null,journalEntryPostingStatus:e.status.label,journalEntryMonth:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)}),{common:common$1D}=appLocale.getLocalizedStrings(),getVendorOptions$1=e=>e?.vendor.map(e=>({label:e.name,value:e.id}))??[],getScheduleAccruedDetailsAnalyticsProps=({jeScheduleTransaction:e,scheduleTab:t,controllerEmails:n,controllerUserIds:o,vendor:i})=>({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},schedule:{...scheduledAccruedDetailsForAnalytics(e)},controllerEmails:n,controllerUserIds:o,vendorName:null!=i?i.name:common$1D.strings.hyphen}),getScheduleDetailsAnalyticsProps=({jeScheduleTransaction:e,scheduleTab:t,transaction:n,controllerEmails:o,controllerUserIds:i,vendor:r})=>({scheduleType:t,transaction:{...transactionDetailsForAnalytics(n)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},scheduledTransaction:{...scheduledTransactionDetailsForAnalytics(e)},controllerEmails:o,controllerUserIds:i,vendorName:null!=r?r.name:common$1D.strings.hyphen,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),getTagTypeForPostingStatus=e=>{switch(e){case"pending":return"warning";case"posted":return"success";case"unknown":return"attention";case"canceled":case"recorded":return"default"}},dimensions$Z={containerPadding:new ResponsiveSized(sp[3],sp[5]),containerMarginTop:new ResponsiveSized(sp[3],sp[3]),containerMarginBottom:new ResponsiveSized(sp[2],sp[2]),transactionTitleContainerWidth:new ResponsiveSized(187,480)},pillStyle$1={padding:"2px 8px 4px 8px",textTransform:"capitalize"},fontStyles$v={transactionTitle:new ResponsiveSizedStyle("h7SemiBold","h7SemiBold")},TransactionTitleEllipsisContainer$1=styled$2.div`
67973
+ return jsxRuntimeExports.jsx(NavbarContainer$3,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:e,style:o,backgroundColor:n??s.colors.grey5,onBackClick:r,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$6,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$3,{onClick:r,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$3,{})})}),source:"NavBarWithLaunch",rightSideComponent:null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,style:{padding:`2px ${Space.sp2}`},title:t,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(Launch,{onClick:i,showLaunchIcon:a})}):/* @__PURE__ */jsxRuntimeExports.jsx(Launch,{onClick:i,showLaunchIcon:a}),enableTitleOnScroll:!0})})}const strings$2l=appLocale.getLocalizedStrings(),transactionDetailsForAnalytics=e=>({transactionDate:e.date.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),scheduledTransactionDetailsForAnalytics=e=>({currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,endMonth:e.endDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null}),scheduledAccruedDetailsForAnalytics=e=>({scheduleCreateDate:e.createTime.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null,endMonth:e.endDate?.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)??null}),journalEntryDetailsForAnalytics=(e,t)=>{const n=null!=e.jeLink.recommendedTransactionID?getThirdPartyIdFromTransactionId(e.jeLink.recommendedTransactionID):void 0;return{journalEntryMonth:e.postingDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryPostingDate:e.postingDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryTransactionAmount:e.amount??null,journalEntryPostingStatus:e.postingStatus,journalEntryMemo:e.memo,journalEntryQBOLink:t??null,wasRecommendationAvailable:Boolean(e.jeLink.recommendedTransactionID),wasRecommendationSelected:!0===Boolean(n)&&e.jeLink.thirdPartyTransactionId===n}},scheduleJournalEntryDetailsForAnalytics=e=>({journalEntryMonth:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryPostingDate:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat),journalEntryTransactionAmount:e.amount??null,journalEntryPostingStatus:e.status.label,journalEntryMemo:e.memo,wasRecommendationAvailable:!1,wasRecommendationSelected:!1,journalEntryQBOLink:null}),scheduleAccruedJournalEntryDetailsForAnalytics=e=>({journalEntryAmount:e.amount??null,journalEntryBalance:e.runningBalance??null,journalEntryPostingStatus:e.status.label,journalEntryMonth:e.expectedPostDate.format(strings$2l.dateFormat.analytics.YYYYDashMMDashDDFormat)}),{common:common$1D}=appLocale.getLocalizedStrings(),getVendorOptions$1=e=>e?.vendor.map(e=>({label:e.name,value:e.id}))??[],getScheduleAccruedDetailsAnalyticsProps=({jeScheduleTransaction:e,scheduleTab:t,controllerEmails:n,controllerUserIds:o,vendor:i})=>({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},schedule:{...scheduledAccruedDetailsForAnalytics(e)},controllerEmails:n,controllerUserIds:o,vendorName:null!=i?i.name:common$1D.strings.hyphen}),getScheduleDetailsAnalyticsProps=({jeScheduleTransaction:e,scheduleTab:t,transaction:n,controllerEmails:o,controllerUserIds:i,vendor:r})=>({scheduleType:t,transaction:{...transactionDetailsForAnalytics(n)},scheduleExpenseCategoryAndClass:{expenseCategory:e.jeDebit.account?.accountName??null,expenseClass:e.jeDebit.accountingClass?.className??null},scheduledTransaction:{...scheduledTransactionDetailsForAnalytics(e)},controllerEmails:o,controllerUserIds:i,vendorName:null!=r?r.name:common$1D.strings.hyphen,fixedAssetsDetails:{accumulatedDepreciationCategory:e.jeCredit.account?.accountName??null,assetId:e.otherAttributes.assetId??null}}),getTagTypeForPostingStatus=e=>{switch(e){case"pending":return"warning";case"posted":return"success";case"unknown":return"attention";case"canceled":case"recorded":return"default"}},dimensions$Z={containerPadding:new ResponsiveSized(sp[3],sp[5]),containerMarginTop:new ResponsiveSized(sp[3],sp[3]),containerMarginBottom:new ResponsiveSized(sp[2],sp[2]),transactionTitleContainerWidth:new ResponsiveSized(187,480)},pillStyle$1={padding:"2px 8px 4px 8px",textTransform:"capitalize"},fontStyles$v={transactionTitle:new ResponsiveSizedStyle("h7SemiBold","h7SemiBold")},TransactionTitleEllipsisContainer$1=styled$2.div`
67974
67974
  max-width: ${e=>dimensions$Z.transactionTitleContainerWidth.valuePx(e.windowSize)};
67975
67975
  `,AmountContainer$7=styled$2.div`
67976
67976
  display: flex;
@@ -83659,9 +83659,9 @@ return jsxRuntimeExports.jsxs(StyledContainer$1,{windowSize:t,children:[
83659
83659
  z-index: -1;
83660
83660
  `,ContentTitle=styled$2.div`
83661
83661
  padding-bottom: ${Space.sp4};
83662
- `,{common:{back:back$4},rewardsPage:{referAndEarn:referAndEarn}}=appLocale.getLocalizedStrings(),dimensions$j={navBarContainerPaddingXaxis:new ResponsiveSized(10,sp[3]),containerPaddingLeft:new ResponsiveSized(sp[3],sp[6],sp[8]),containerPaddingRight:new ResponsiveSized(sp[3],sp[6],sp[8])},fontStyles$e={title:new ResponsiveSizedStyle("largeRegular","extraLargeRegular")};function DrawerPage({rewardsPlan:e,onDismissClick:t}){const n=useWindowSizeContext();/* @__PURE__ */
83662
+ `,{common:{back:back$5},rewardsPage:{referAndEarn:referAndEarn}}=appLocale.getLocalizedStrings(),dimensions$j={navBarContainerPaddingXaxis:new ResponsiveSized(10,sp[3]),containerPaddingLeft:new ResponsiveSized(sp[3],sp[6],sp[8]),containerPaddingRight:new ResponsiveSized(sp[3],sp[6],sp[8])},fontStyles$e={title:new ResponsiveSizedStyle("largeRegular","extraLargeRegular")};function DrawerPage({rewardsPlan:e,onDismissClick:t}){const n=useWindowSizeContext();/* @__PURE__ */
83663
83663
  return jsxRuntimeExports.jsxs(PageContainer$6,{windowSize:n,children:[
83664
- /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$4,{windowSize:n,children:/* @__PURE__ */jsxRuntimeExports.jsxs(PageTitleContainer,{windowSize:n,children:["small"===n&&/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,title:back$4,placement:"bottom",style:{padding:`${Space.sp1} ${Space.sp2}`},children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$1,{onClick:t})})}),
83664
+ /* @__PURE__ */jsxRuntimeExports.jsx(NavBarContainer$4,{windowSize:n,children:/* @__PURE__ */jsxRuntimeExports.jsxs(PageTitleContainer,{windowSize:n,children:["small"===n&&/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,title:back$5,placement:"bottom",style:{padding:`${Space.sp1} ${Space.sp2}`},children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$2,{onClick:t})})}),
83665
83665
  /* @__PURE__ */jsxRuntimeExports.jsx(PageTitle$2,{windowSize:n,children:referAndEarn}),"small"!==n&&/* @__PURE__ */jsxRuntimeExports.jsx(CloseIconWrapper$5,{onClick:t,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$f,{})})]})}),
83666
83666
  /* @__PURE__ */jsxRuntimeExports.jsx(PageContent$8,{windowSize:n,children:/* @__PURE__ */jsxRuntimeExports.jsx(DrawerContentItems,{rewardsPlan:e})})]})}const PageContainer$6=styled$2.div`
83667
83667
  display: flex;
@@ -83711,7 +83711,7 @@ return jsxRuntimeExports.jsxs(PageContainer$6,{windowSize:n,children:[
83711
83711
  `,StyledCloseIcon$f=styled$2(SvgClose)`
83712
83712
  width: ${Space.sp3};
83713
83713
  height: ${Space.sp3};
83714
- `,BackButtonWrapper$1=styled$2.div`
83714
+ `,BackButtonWrapper$2=styled$2.div`
83715
83715
  height: ${Space.sp4};
83716
83716
  width: ${Space.sp4};
83717
83717
  display: flex;
@@ -83723,7 +83723,7 @@ return jsxRuntimeExports.jsxs(PageContainer$6,{windowSize:n,children:[
83723
83723
  background-color: ${e=>e.theme.colors.grey3};
83724
83724
  color: ${e=>e.theme.colors.primary};
83725
83725
  }
83726
- `,Back$1=styled$2(SvgArrowLeft)`
83726
+ `,Back$2=styled$2(SvgArrowLeft)`
83727
83727
  height: ${Space.sp3};
83728
83728
  width: ${Space.sp3};
83729
83729
  cursor: pointer;
@@ -84443,7 +84443,7 @@ return jsxRuntimeExports.jsxs(Container$P,{children:[
84443
84443
  /* @__PURE__ */jsxRuntimeExports.jsx(FeatureImage,{src:r,alt:"feature-preview",loading:"lazy"}),
84444
84444
  /* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopup,{titleComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpTitle$3,{children:a.title}),descriptionComponent:/* @__PURE__ */jsxRuntimeExports.jsx(ConfirmationPopUpDescription$2,{children:a.text}),primaryButtonText:featurePreview.scheduleDemo,secondaryButtonText:goBack,action:c,useLegacyStyles:!0,primaryButtonWidth:dimensions$i.buttonWidth.value(i),secondaryButtonWidth:dimensions$i.buttonWidth.value(i),style:{background:`radial-gradient(50% 50% at 50% 50%, ${s} 0%, ${l} 100%)`,backdropFilter:"blur(2px)",width:dimensions$i.popupContainerWidth.valuePercentage(i),left:dimensions$i.popupContainerLeft.value(i)},containerStyle:{border:`1px solid ${o.colors.grey1}`,minWidth:dimensions$i.popupWidth.valuePx(i)}})]})}var uniq_1,hasRequiredUniq;function requireUniq(){if(hasRequiredUniq)return uniq_1;hasRequiredUniq=1;var e=require_baseUniq();return uniq_1=function(t){return t&&t.length?e(t):[]}}var uniqExports=requireUniq();const uniq=/* @__PURE__ */getDefaultExportFromCjs(uniqExports),SvgLoader=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M20 12.4922C20 16.9105 16.4183 20.4922 12 20.4922C7.58172 20.4922 4 16.9105 4 12.4922C4 8.07391 7.58172 4.49219 12 4.49219C16.4183 4.49219 20 8.07391 20 12.4922ZM5.6 12.4922C5.6 16.0268 8.46538 18.8922 12 18.8922C15.5346 18.8922 18.4 16.0268 18.4 12.4922C18.4 8.95756 15.5346 6.09219 12 6.09219C8.46538 6.09219 5.6 8.95756 5.6 12.4922Z",fill:"currentColor",stroke:"currentColor"})),dimensions$h={containerMarginTop:new ResponsiveSized(0,sp[2]),containerMarginLeft:new ResponsiveSized(sp[3],sp[8]),containerMarginRight:new ResponsiveSized(sp[3],sp[8]),subTitleMarginBottom:new ResponsiveSized(sp[2],sp[2]),titleMarginBotom:new ResponsiveSized(sp[0],sp[2]),titleMarginRight:new ResponsiveSized(sp[0],sp[3]),customTitleFont:new ResponsiveSized(sp[4],sp[5]),navBarHeight:new ResponsiveSized(62,62,62),navBarPaddingLeft:new ResponsiveSized(sp[3],sp[3],sp[8]),navBarPaddingRight:new ResponsiveSized(sp[3],sp[3],sp[8])},fontStyles$c={title:new ResponsiveSizedStyle("h6Regular","h5Regular")},ReviewOverlayPage=({title:e,description:t,reviewItems:n,showFooter:o,footerProps:{primaryButton:i,cancelButton:r,hideCancel:a},onCloseOverlay:s,onCloseReviewItem:l})=>{const c=useWindowSizeContext();/* @__PURE__ */
84445
84445
  return jsxRuntimeExports.jsxs(Container$O,{children:[
84446
- /* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer$1,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContentContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Content$5,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(OverlayCloseIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$e,{onClick:s,"data-testid":generateDataTestId("review-overlay-close",e)})})})})}),
84446
+ /* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer$2,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContentContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Content$5,{windowSize:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(OverlayCloseIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$e,{onClick:s,"data-testid":generateDataTestId("review-overlay-close",e)})})})})}),
84447
84447
  /* @__PURE__ */jsxRuntimeExports.jsxs(ReviewContainer$1,{windowSize:c,children:[
84448
84448
  /* @__PURE__ */jsxRuntimeExports.jsxs(ReviewHeaderContainer,{windowSize:c,children:[
84449
84449
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitleContainer$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$b,{windowSize:c,children:e})}),
@@ -84497,7 +84497,7 @@ return jsxRuntimeExports.jsxs(ReviewItemContainer,{isLoading:!1,isActive:!0,isWa
84497
84497
  margin-top: ${Space.sp3};
84498
84498
  margin-left: ${e=>dimensions$h.containerMarginLeft.valuePx(e.windowSize)};
84499
84499
  margin-right: ${e=>dimensions$h.containerMarginRight.valuePx(e.windowSize)};
84500
- `,NavbarContainer$1=styled$2.div`
84500
+ `,NavbarContainer$2=styled$2.div`
84501
84501
  min-height: ${e=>dimensions$h.navBarHeight.valuePx(e.windowSize)};
84502
84502
  position: sticky;
84503
84503
  border-bottom: 1px solid transparent;
@@ -86754,7 +86754,7 @@ return jsxRuntimeExports.jsxs(PreviewPaper,{children:[
86754
86754
  color: #aaaaaa;
86755
86755
  font-size: 10px;
86756
86756
  text-align: center;
86757
- `,{dateFormat:{visual:{defaultInput:invoicingDateFormat$6}},common:{cancel:cancel$5,next:next,back:back$3,strings:{closingBrace:closingBrace$1,dividerDot:dividerDot},labels:{total:total$3},texts:{name:name$3,invoiceNumber:invoiceNumber,invoiceDate:invoiceDateLabel,selectDueDate:selectDueDate,dueDate2:dueDate2,memo:memoLabel$1,addMemo:addMemo,lineItems:lineItemsLabel,description2:description2$6,qty:qty$4,addDescription:addDescription$2,clearAll:clearAll$1},currency:{currencySymbol:currencySymbolText$1}},invoicingCommon:invoicingCommon$x,invoicingCreateInvoice:strings$1l}=appLocale.getLocalizedStrings(),lineItemMenuPortalTarget="undefined"!=typeof document?document.body:null,DESCRIPTION_MENU_STYLE={control:e=>({...e,backgroundColor:"transparent"}),menuPortal:e=>({...e,zIndex:30}),valueContainer:e=>({...e,backgroundColor:"transparent"})},EMPTY_PLAN_NAMES=[],planNameOptionLabel=e=>""!==e.planName?`${e.planName} ${dividerDot} ${e.subFamilyName}`:e.subFamilyName,NET_TERM_OPTIONS=[{label:invoicingCommon$x.dueOnReceipt,value:"0"},{label:strings$1l.net7,value:"7"},{label:strings$1l.net15,value:"15"},{label:strings$1l.net30,value:"30"},{label:strings$1l.net45,value:"45"},{label:strings$1l.net60,value:"60"}],DEFAULT_CURRENCY="USD",isKnownNetTerm=e=>NET_TERM_OPTIONS.some(t=>t.value===String(e)),defaultNetTermsFromSettings=e=>{const t=e?.net_term_days;return null!=t&&isKnownNetTerm(t)?String(t):""},resolveNetTermsSelected=(e,t)=>0!==e?isKnownNetTerm(e)?String(e):void 0:defaultNetTermsFromSettings(t)||void 0,lineFieldToString=e=>null==e?"":"number"==typeof e?Number.isFinite(e)?String(e):"":String(e),lineDescriptionToString=e=>"string"==typeof e?e:null==e?"":e.selectedOption??"",toDescriptionValue=(e,t)=>({defaultOptions:t,selectedOption:""!==e?e:void 0}),resolveCurrency=e=>{const t=e?.currency_code?.trim();return null!=t&&""!==t?t:DEFAULT_CURRENCY},lineItemToDraft=(e,t)=>({currencyCode:e.unitAmount.currencyCode,currencySymbol:e.unitAmount.currencySymbol,description:toDescriptionValue(e.description,t),quantity:e.quantity,taxAmount:0!==e.taxAmount.amount?String(e.taxAmount.amount):"",unitAmount:0!==e.unitAmount.amount?String(e.unitAmount.amount):""}),localDataToInvoiceFormValues=(e,t,n,o,i,r)=>{const{customerId:a,dueDate:s,invoiceDate:l,lineItems:c,memo:d,netTermDays:p,...u}=e,m=c.length>0?c.map(e=>lineItemToDraft(e,n)):[{currencyCode:o,currencySymbol:i,description:toDescriptionValue("",n),quantity:"1",taxAmount:"",unitAmount:""}];return{...u,customerId:{defaultOptions:t,selectedOption:""!==a?a:void 0},dueDate:parseInvoicingIsoDate(s)?.toDate(),invoiceDate:parseInvoicingIsoDate(l)?.toDate()??parseInvoicingIsoDate(todayInvoicingIsoDate())?.toDate(),lineItems:m,memo:""!==d?d:r?.default_memo??"",netTerms:{allOptions:NET_TERM_OPTIONS,selectedOption:resolveNetTermsSelected(p,r)}}},invoiceFormValuesToLocalData=(e,t)=>{const{customerId:n,dueDate:o,invoiceDate:i,lineItems:r,netTerms:a,...s}=e;return{...s,customerId:n.selectedOption??"",dueDate:formatInvoicingIsoDate(o)||void 0,invoiceDate:formatInvoicingIsoDate(i)||void 0,lineItems:r.map(e=>({catalogLine:t.get(lineDescriptionToString(e.description)),description:lineDescriptionToString(e.description),quantity:lineFieldToString(e.quantity),taxAmount:toAmount(Number(lineFieldToString(e.taxAmount))||0,e.currencyCode,e.currencySymbol),unitAmount:toAmount(Number(lineFieldToString(e.unitAmount))||0,e.currencyCode,e.currencySymbol)})),netTermDays:parseInt(a.selectedOption??"",10)||0}};function InvoicingCreateInvoicePage({customers:e,fieldHelp:t,errorMessage:n,isSubmitting:o,localData:i,onBack:r,onCancel:a,onChange:s,onSubmit:l,planNames:c=EMPTY_PLAN_NAMES,settings:d}){useSentryPerformanceTracking({componentName:"invoicing.invoice.create"});const p=useTheme(),[u,m]=useState(1),[h,g]=useState(),x=resolveCurrency(d),f=resolveInvoicingCurrencySymbol(x,d?.currency_symbol),y=useMemo(()=>[...e].sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=useMemo(()=>y.map(e=>({label:e.name,value:e.id})),[y]),C=useMemo(()=>{const t=/* @__PURE__ */new Map;return e.forEach(e=>{null!=e.email&&""!==e.email&&t.set(e.id,e.email)}),t},[e]),$=useCallback((e,t)=>{const n=e.trim().toLowerCase();t(y.filter(e=>e.name.toLowerCase().includes(n)||(e.email??"").toLowerCase().includes(n)).map(e=>({label:e.name,value:e.id})))},[y]),b=useMemo(()=>c.map(e=>{const t=planNameOptionLabel(e);return{label:t,value:t}}),[c]),v=useMemo(()=>{const e=/* @__PURE__ */new Map;return c.forEach(t=>{null!=t.price&&e.set(planNameOptionLabel(t),t.price)}),e},[c]),A=useMemo(()=>new Map(c.map(e=>[planNameOptionLabel(e),e.catalogLine])),[c]),E=useCallback((e,t)=>{const n=e.trim().toLowerCase();t(b.filter(e=>e.label.toLowerCase().includes(n)))},[b]),w=useMemo(()=>localDataToInvoiceFormValues(i,S,b,x,f,d),[i,S,b,x,f,d]),R=useForm({defaultValues:w}),{control:j,getValues:T,reset:I,setValue:k,watch:L}=R,D=useRef(!1);useEffect(()=>{D.current||I(w)},[w,I]);const _=useRef(!1);useEffect(()=>{_.current||D.current||(_.current=!0,s(invoiceFormValuesToLocalData(w,A)))},[w,s,A]);const P=useCallback(()=>{D.current=!0,s(invoiceFormValuesToLocalData(T(),A))},[T,s,A]);useEffect(()=>{const e=L((e,{type:t})=>{"change"===t&&P()});return()=>e.unsubscribe()},[L,P]);const B=useCallback(()=>({currencyCode:x,currencySymbol:f,description:toDescriptionValue("",b),quantity:"1",taxAmount:"",unitAmount:""}),[x,f,b]),M=useCallback((e,t)=>{const n=v.get(t);null!=n&&(k(`lineItems.${e}.unitAmount`,String(n),{shouldDirty:!0}),""===lineFieldToString(T(`lineItems.${e}.quantity`))&&k(`lineItems.${e}.quantity`,"1",{shouldDirty:!0}),P())},[T,P,v,k]),{append:O,fields:F,remove:N,replace:z}=useFieldArray({control:j,name:"lineItems"}),H=useWatch({control:j}),V=H.customerId?.selectedOption??"",W=H.netTerms?.selectedOption??"",U=H.memo??"",G=H.poNumber??"",q=H.lineItems??[],Q=e.find(e=>e.id===V),Y=amountValueToString("0,0.00",q.reduce((e,t)=>e+(Number(lineFieldToString(t?.quantity))||0)*(Number(lineFieldToString(t?.unitAmount))||0),0),f),K=q.map((e,t)=>({id:F[t]?.id??String(t),description:lineDescriptionToString(e?.description),quantity:lineFieldToString(e?.quantity),taxAmount:lineFieldToString(e?.taxAmount),unitAmount:lineFieldToString(e?.unitAmount)})),Z=d?.invoice_prefix??"INV",X=h??n,J=1===u?strings$1l.step1CustomerAndType:strings$1l.step2InvoiceDetails,ee=1===u?strings$1l.step1Subtitle:strings$1l.step2Subtitle;/* @__PURE__ */
86757
+ `,{dateFormat:{visual:{defaultInput:invoicingDateFormat$6}},common:{cancel:cancel$5,next:next,back:back$4,strings:{closingBrace:closingBrace$1,dividerDot:dividerDot},labels:{total:total$3},texts:{name:name$3,invoiceNumber:invoiceNumber,invoiceDate:invoiceDateLabel,selectDueDate:selectDueDate,dueDate2:dueDate2,memo:memoLabel$1,addMemo:addMemo,lineItems:lineItemsLabel,description2:description2$6,qty:qty$4,addDescription:addDescription$2,clearAll:clearAll$1},currency:{currencySymbol:currencySymbolText$1}},invoicingCommon:invoicingCommon$x,invoicingCreateInvoice:strings$1l}=appLocale.getLocalizedStrings(),lineItemMenuPortalTarget="undefined"!=typeof document?document.body:null,DESCRIPTION_MENU_STYLE={control:e=>({...e,backgroundColor:"transparent"}),menuPortal:e=>({...e,zIndex:30}),valueContainer:e=>({...e,backgroundColor:"transparent"})},EMPTY_PLAN_NAMES=[],planNameOptionLabel=e=>""!==e.planName?`${e.planName} ${dividerDot} ${e.subFamilyName}`:e.subFamilyName,NET_TERM_OPTIONS=[{label:invoicingCommon$x.dueOnReceipt,value:"0"},{label:strings$1l.net7,value:"7"},{label:strings$1l.net15,value:"15"},{label:strings$1l.net30,value:"30"},{label:strings$1l.net45,value:"45"},{label:strings$1l.net60,value:"60"}],DEFAULT_CURRENCY="USD",isKnownNetTerm=e=>NET_TERM_OPTIONS.some(t=>t.value===String(e)),defaultNetTermsFromSettings=e=>{const t=e?.net_term_days;return null!=t&&isKnownNetTerm(t)?String(t):""},resolveNetTermsSelected=(e,t)=>0!==e?isKnownNetTerm(e)?String(e):void 0:defaultNetTermsFromSettings(t)||void 0,lineFieldToString=e=>null==e?"":"number"==typeof e?Number.isFinite(e)?String(e):"":String(e),lineDescriptionToString=e=>"string"==typeof e?e:null==e?"":e.selectedOption??"",toDescriptionValue=(e,t)=>({defaultOptions:t,selectedOption:""!==e?e:void 0}),resolveCurrency=e=>{const t=e?.currency_code?.trim();return null!=t&&""!==t?t:DEFAULT_CURRENCY},lineItemToDraft=(e,t)=>({currencyCode:e.unitAmount.currencyCode,currencySymbol:e.unitAmount.currencySymbol,description:toDescriptionValue(e.description,t),quantity:e.quantity,taxAmount:0!==e.taxAmount.amount?String(e.taxAmount.amount):"",unitAmount:0!==e.unitAmount.amount?String(e.unitAmount.amount):""}),localDataToInvoiceFormValues=(e,t,n,o,i,r)=>{const{customerId:a,dueDate:s,invoiceDate:l,lineItems:c,memo:d,netTermDays:p,...u}=e,m=c.length>0?c.map(e=>lineItemToDraft(e,n)):[{currencyCode:o,currencySymbol:i,description:toDescriptionValue("",n),quantity:"1",taxAmount:"",unitAmount:""}];return{...u,customerId:{defaultOptions:t,selectedOption:""!==a?a:void 0},dueDate:parseInvoicingIsoDate(s)?.toDate(),invoiceDate:parseInvoicingIsoDate(l)?.toDate()??parseInvoicingIsoDate(todayInvoicingIsoDate())?.toDate(),lineItems:m,memo:""!==d?d:r?.default_memo??"",netTerms:{allOptions:NET_TERM_OPTIONS,selectedOption:resolveNetTermsSelected(p,r)}}},invoiceFormValuesToLocalData=(e,t)=>{const{customerId:n,dueDate:o,invoiceDate:i,lineItems:r,netTerms:a,...s}=e;return{...s,customerId:n.selectedOption??"",dueDate:formatInvoicingIsoDate(o)||void 0,invoiceDate:formatInvoicingIsoDate(i)||void 0,lineItems:r.map(e=>({catalogLine:t.get(lineDescriptionToString(e.description)),description:lineDescriptionToString(e.description),quantity:lineFieldToString(e.quantity),taxAmount:toAmount(Number(lineFieldToString(e.taxAmount))||0,e.currencyCode,e.currencySymbol),unitAmount:toAmount(Number(lineFieldToString(e.unitAmount))||0,e.currencyCode,e.currencySymbol)})),netTermDays:parseInt(a.selectedOption??"",10)||0}};function InvoicingCreateInvoicePage({customers:e,fieldHelp:t,errorMessage:n,isSubmitting:o,localData:i,onBack:r,onCancel:a,onChange:s,onSubmit:l,planNames:c=EMPTY_PLAN_NAMES,settings:d}){useSentryPerformanceTracking({componentName:"invoicing.invoice.create"});const p=useTheme(),[u,m]=useState(1),[h,g]=useState(),x=resolveCurrency(d),f=resolveInvoicingCurrencySymbol(x,d?.currency_symbol),y=useMemo(()=>[...e].sort((e,t)=>e.name.localeCompare(t.name)),[e]),S=useMemo(()=>y.map(e=>({label:e.name,value:e.id})),[y]),C=useMemo(()=>{const t=/* @__PURE__ */new Map;return e.forEach(e=>{null!=e.email&&""!==e.email&&t.set(e.id,e.email)}),t},[e]),$=useCallback((e,t)=>{const n=e.trim().toLowerCase();t(y.filter(e=>e.name.toLowerCase().includes(n)||(e.email??"").toLowerCase().includes(n)).map(e=>({label:e.name,value:e.id})))},[y]),b=useMemo(()=>c.map(e=>{const t=planNameOptionLabel(e);return{label:t,value:t}}),[c]),v=useMemo(()=>{const e=/* @__PURE__ */new Map;return c.forEach(t=>{null!=t.price&&e.set(planNameOptionLabel(t),t.price)}),e},[c]),A=useMemo(()=>new Map(c.map(e=>[planNameOptionLabel(e),e.catalogLine])),[c]),E=useCallback((e,t)=>{const n=e.trim().toLowerCase();t(b.filter(e=>e.label.toLowerCase().includes(n)))},[b]),w=useMemo(()=>localDataToInvoiceFormValues(i,S,b,x,f,d),[i,S,b,x,f,d]),R=useForm({defaultValues:w}),{control:j,getValues:T,reset:I,setValue:k,watch:L}=R,D=useRef(!1);useEffect(()=>{D.current||I(w)},[w,I]);const _=useRef(!1);useEffect(()=>{_.current||D.current||(_.current=!0,s(invoiceFormValuesToLocalData(w,A)))},[w,s,A]);const P=useCallback(()=>{D.current=!0,s(invoiceFormValuesToLocalData(T(),A))},[T,s,A]);useEffect(()=>{const e=L((e,{type:t})=>{"change"===t&&P()});return()=>e.unsubscribe()},[L,P]);const B=useCallback(()=>({currencyCode:x,currencySymbol:f,description:toDescriptionValue("",b),quantity:"1",taxAmount:"",unitAmount:""}),[x,f,b]),M=useCallback((e,t)=>{const n=v.get(t);null!=n&&(k(`lineItems.${e}.unitAmount`,String(n),{shouldDirty:!0}),""===lineFieldToString(T(`lineItems.${e}.quantity`))&&k(`lineItems.${e}.quantity`,"1",{shouldDirty:!0}),P())},[T,P,v,k]),{append:O,fields:F,remove:N,replace:z}=useFieldArray({control:j,name:"lineItems"}),H=useWatch({control:j}),V=H.customerId?.selectedOption??"",W=H.netTerms?.selectedOption??"",U=H.memo??"",G=H.poNumber??"",q=H.lineItems??[],Q=e.find(e=>e.id===V),Y=amountValueToString("0,0.00",q.reduce((e,t)=>e+(Number(lineFieldToString(t?.quantity))||0)*(Number(lineFieldToString(t?.unitAmount))||0),0),f),K=q.map((e,t)=>({id:F[t]?.id??String(t),description:lineDescriptionToString(e?.description),quantity:lineFieldToString(e?.quantity),taxAmount:lineFieldToString(e?.taxAmount),unitAmount:lineFieldToString(e?.unitAmount)})),Z=d?.invoice_prefix??"INV",X=h??n,J=1===u?strings$1l.step1CustomerAndType:strings$1l.step2InvoiceDetails,ee=1===u?strings$1l.step1Subtitle:strings$1l.step2Subtitle;/* @__PURE__ */
86758
86758
  return jsxRuntimeExports.jsx(FieldHelpProvider,{fieldHelp:t,children:/* @__PURE__ */jsxRuntimeExports.jsxs(WizardPage,{children:[
86759
86759
  /* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{backgroundColor:p.colors.grey5,source:"invoicing-create-invoice",title:invoicingCommon$x.createInvoice,showBackButton:!0,showBorderBottom:!0,showMenuIcon:!1,hideSearchBtn:!0,onBackClick:r??a}),
86760
86760
  /* @__PURE__ */jsxRuntimeExports.jsxs(WizardBody,{children:[
@@ -86799,7 +86799,7 @@ return jsxRuntimeExports.jsx(FieldHelpProvider,{fieldHelp:t,children:/* @__PURE_
86799
86799
  /* @__PURE__ */jsxRuntimeExports.jsxs(LineItemsTotalValues,{children:[
86800
86800
  /* @__PURE__ */jsxRuntimeExports.jsx(LineItemsTotalAmount,{children:Y}),
86801
86801
  /* @__PURE__ */jsxRuntimeExports.jsx(LineItemsTotalHint,{children:strings$1l.unitPriceInDollars})]})]})]})})]})]})}),
86802
- /* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{isDisabled:o,label:1===u?cancel$5:back$3,onClick:1===u?a:()=>m(1),reverseSpinnerColor:!1},primaryBtn:{isLoading:o,label:1===u?next:invoicingCommon$x.createInvoice,onClick:1===u?()=>{""!==(R.getValues("customerId").selectedOption??"")?(g(void 0),m(2)):g(strings$1l.pleaseSelectCustomer)}:R.handleSubmit(e=>{if(""===(e.customerId.selectedOption??""))return g(strings$1l.pleaseSelectCustomer),void m(1);e.lineItems.some(e=>""!==lineDescriptionToString(e.description).trim()||""!==lineFieldToString(e.unitAmount))?(g(void 0),l()):g(strings$1l.addAtLeastOneLineItem)}),type:"button"},separatorStyle:{marginRight:Space.sp4},showCancel:!0})]})]})]})})}function LockedInvoiceTypeCard(){/* @__PURE__ */
86802
+ /* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{isDisabled:o,label:1===u?cancel$5:back$4,onClick:1===u?a:()=>m(1),reverseSpinnerColor:!1},primaryBtn:{isLoading:o,label:1===u?next:invoicingCommon$x.createInvoice,onClick:1===u?()=>{""!==(R.getValues("customerId").selectedOption??"")?(g(void 0),m(2)):g(strings$1l.pleaseSelectCustomer)}:R.handleSubmit(e=>{if(""===(e.customerId.selectedOption??""))return g(strings$1l.pleaseSelectCustomer),void m(1);e.lineItems.some(e=>""!==lineDescriptionToString(e.description).trim()||""!==lineFieldToString(e.unitAmount))?(g(void 0),l()):g(strings$1l.addAtLeastOneLineItem)}),type:"button"},separatorStyle:{marginRight:Space.sp4},showCancel:!0})]})]})]})})}function LockedInvoiceTypeCard(){/* @__PURE__ */
86803
86803
  return jsxRuntimeExports.jsxs(TypeCardShell,{"aria-disabled":"true","data-testid":"invoicing-create-invoice-type-one-time-locked",children:[
86804
86804
  /* @__PURE__ */jsxRuntimeExports.jsx(RadioField,{checked:!0,id:"invoicing-invoice-type-one-time",name:"invoiceType",radioSize:"small",style:{marginTop:"2px"},value:"one_time"}),
86805
86805
  /* @__PURE__ */jsxRuntimeExports.jsxs(TypeCardText,{children:[
@@ -91123,7 +91123,7 @@ return jsxRuntimeExports.jsx(components.Option,{...e,children:/* @__PURE__ */jsx
91123
91123
  /* @__PURE__ */jsxRuntimeExports.jsx(SmallRegular,{children:e.label}),!0===t?/* @__PURE__ */jsxRuntimeExports.jsx(CheckMarkStyled,{}):null]})})},AmountMatchingOperatorDropdown=({onChange:e,value:t,categoryIndex:n})=>{const o=useTheme(),i=getAmountMatchingOperatorOptions({greaterThan:greaterThan,inBetween:strings$x.inBetween,isEqual:strings$x.isEqual,lessThan:lessThan}),r={...getDropdownStyles$1(o),control:e=>({...e,minWidth:`${sp[12]+sp[4]}px`,height:Space.sp5,minHeight:Space.sp5,border:"none",boxShadow:"none",outline:"none",backgroundColor:o.colors.background}),menu:e=>({...e,boxShadow:`${Space.sp0} 2px ${Space.sp2} ${o.colors.dropShadowHover}`,width:`${sp[12]+sp[4]}px`}),option:(e,t)=>({...e,...textStyles.standardRegular.cssObject,padding:`${Space.sp2} ${Space.sp3}`,cursor:"pointer",color:o.colors.hero,background:t.isSelected||t.isFocused?o.colors.grey3:o.colors.grey5,":hover":{color:o.colors.hero,backgroundColor:o.colors.grey3}})},a=i.find(e=>e.value===t);/* @__PURE__ */
91124
91124
  return jsxRuntimeExports.jsx(StateManagedSelect$1,{isSearchable:!1,isMulti:!1,value:a,onChange:t=>{t&&e(t,n)},placeholder:strings$x.placeholder,options:i,styles:r,menuPosition:"fixed",components:{Option:AmountOperatorOption,SingleValue:SingleValueLabel$1}})},{expenseAutomation:{transactions:{filters:{categoryLabels:categoryLabels}}},common:{texts:{payee:payee$2,category:categoryText$1,class:classText$3,amount:amount$a}}}=appLocale.getLocalizedStrings(),getTransactionFilterCategories=()=>TRANSACTION_FILTER_CATEGORIES,getTransactionFilterCategoryLabel=e=>{const t=e;return{payment_account_name:categoryLabels.paymentAccountName,payment_account_type:categoryLabels.paymentAccountType,payee:payee$2,category:categoryText$1,class:classText$3,amount:amount$a}[t]||e},getUpdatedTransactionFiltersOnCategoryChange=({currentFilters:e,selectedOption:t,categoryIndex:n})=>{const o="amount"===t.value?DEFAULT_AMOUNT_MATCHING_OPERATOR:"equal";if(null==e.categories||0===e.categories.length){return{categoryCombinationOperator:"AND",categories:[{...NEW_CATEGORY_BODY,field:t.value,matchingOperator:o}]}}return{...e,categories:e.categories.map((e,i)=>i!==n?e:{...e,field:t.value,matchingOperator:o,values:[]})}},getUpdatedTransactionFiltersOnMatchingOperatorChange=({currentFilters:e,selectedOption:t,categoryIndex:n})=>{if(null==e.categories||0===e.categories.length)return e;const o=t.value;return{...e,categories:e.categories.map((e,t)=>{if(t!==n)return e;const i="in_between"===e.matchingOperator!==("in_between"===o);return{...e,matchingOperator:o,values:i?[]:e.values}})}},getUpdatedTransactionFiltersOnValueChange=({categoryIndex:e,currentFilters:t,selectedOptions:n})=>{if(null==t.categories||0===t.categories.length)return t;return{...t,categories:t.categories.map((t,o)=>o!==e?t:{...t,values:n.map(e=>e.value)})}},getTransactionAppliedFiltersCount=e=>null==e?.categories||0===e.categories.length?0:e.categories.filter(e=>{const t=e;return!(null==t.field||!Array.isArray(t.values))&&("amount"===t.field&&"in_between"===t.matchingOperator?t.values.length>=2&&""!==String(t.values[0]??"").trim()&&""!==String(t.values[1]??"").trim():t.values.length>0&&""!==String(t.values[0]??"").trim())}).length,hasActiveSearchOrFilters=(e,t)=>e.trim().length>0||getTransactionAppliedFiltersCount(t)>0,{common:{strings:{empty:empty$9},texts:{addFilter:addFilter,category:category$4,clearAll:clearAll,filterBy:filterBy,select:select$1}},expenseAutomation:{transactions:{filters:transactionFilters}},spendManagement:{filters:{searchPlaceholder:searchPlaceholder}}}=appLocale.getLocalizedStrings(),TransactionFiltersComponent=({entity:e,filters:t,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:o,disableFilters:i=!1,transactionsLoaded:r=!0,createdByUserListLoaded:a=!0,onFiltersChange:s,categoryWiseOptions:l})=>{const c={filterByLabel:filterBy,categoryPlaceholder:category$4,addFilterBtnText:addFilter,clearAllBtnText:clearAll,searchPlaceholder:searchPlaceholder,select:select$1,empty:empty$9,getValuePlaceholder:(e,t)=>"payment_account_name"===e?transactionFilters.selectPaymentAccountNamePlaceholder:"payee"===e?transactionFilters.searchForPayeePlaceholder:void 0};
91125
91125
  /* @__PURE__ */
91126
- return jsxRuntimeExports.jsx(GenericFilters,{entity:e,filters:t,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:o,disableFilters:i,transactionsLoaded:r,createdByUserListLoaded:a,onFiltersChange:s,categoryWiseOptions:l,renderCustomCategoryValueSection:(e,{categoryIndex:t,filter:n,onMatchingOperatorChange:o,onValueChange:i})=>"amount"!==e?null:{operatorDropdown:/* @__PURE__ */jsxRuntimeExports.jsx(AmountMatchingOperatorDropdown,{categoryIndex:t,value:n.matchingOperator,onChange:(e,t)=>o(e,t)}),valueField:/* @__PURE__ */jsxRuntimeExports.jsx(AmountFilterValueField,{matchingOperator:n.matchingOperator??"equal",value:(n.values??[]).map(e=>"string"==typeof e?e:String(e)),onChange:e=>i(e,t)})},helpers:{getFilterCategories:()=>getTransactionFilterCategories(),getFilterCategoryLabel:(e,t)=>getTransactionFilterCategoryLabel(t),getUpdatedFiltersOnCategoryChange:getUpdatedTransactionFiltersOnCategoryChange,getUpdatedFiltersOnMatchingOperatorChange:getUpdatedTransactionFiltersOnMatchingOperatorChange,getUpdatedFiltersOnValueChange:getUpdatedTransactionFiltersOnValueChange,getDefaultEmptyFilters:()=>({categories:[],categoryCombinationOperator:"AND"}),getAppliedFiltersCount:getTransactionAppliedFiltersCount},filterStrings:c})},{common:{back:back$2,close:close$1,texts:{refresh:refresh$1,filter:filter},strings:{percentage:percentageSign},updated:updated,completeText:completeTag},expenseAutomation:{common:{numbers:{maximumCount:maximumCount}}}}=appLocale.getLocalizedStrings(),StyledCommentIcon$1=styled$2(SvgComment)`
91126
+ return jsxRuntimeExports.jsx(GenericFilters,{entity:e,filters:t,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:o,disableFilters:i,transactionsLoaded:r,createdByUserListLoaded:a,onFiltersChange:s,categoryWiseOptions:l,renderCustomCategoryValueSection:(e,{categoryIndex:t,filter:n,onMatchingOperatorChange:o,onValueChange:i})=>"amount"!==e?null:{operatorDropdown:/* @__PURE__ */jsxRuntimeExports.jsx(AmountMatchingOperatorDropdown,{categoryIndex:t,value:n.matchingOperator,onChange:(e,t)=>o(e,t)}),valueField:/* @__PURE__ */jsxRuntimeExports.jsx(AmountFilterValueField,{matchingOperator:n.matchingOperator??"equal",value:(n.values??[]).map(e=>"string"==typeof e?e:String(e)),onChange:e=>i(e,t)})},helpers:{getFilterCategories:()=>getTransactionFilterCategories(),getFilterCategoryLabel:(e,t)=>getTransactionFilterCategoryLabel(t),getUpdatedFiltersOnCategoryChange:getUpdatedTransactionFiltersOnCategoryChange,getUpdatedFiltersOnMatchingOperatorChange:getUpdatedTransactionFiltersOnMatchingOperatorChange,getUpdatedFiltersOnValueChange:getUpdatedTransactionFiltersOnValueChange,getDefaultEmptyFilters:()=>({categories:[],categoryCombinationOperator:"AND"}),getAppliedFiltersCount:getTransactionAppliedFiltersCount},filterStrings:c})},{common:{back:back$3,close:close$1,texts:{refresh:refresh$1,filter:filter},strings:{percentage:percentageSign},updated:updated,completeText:completeTag},expenseAutomation:{common:{numbers:{maximumCount:maximumCount}}}}=appLocale.getLocalizedStrings(),StyledCommentIcon$1=styled$2(SvgComment)`
91127
91127
  display: flex;
91128
91128
  width: ${Space.sp3};
91129
91129
  height: ${Space.sp3};
@@ -91260,7 +91260,7 @@ return jsxRuntimeExports.jsx(Tooltip$6,{display:"block",placement:"bottom",title
91260
91260
  return jsxRuntimeExports.jsx(ExpenseAutomationCommentingNavSlot,{currentSelectedView:S,onCommentDrawerClick:v},`${y}-${c}`);case"close":/* @__PURE__ */
91261
91261
  return jsxRuntimeExports.jsx(Tooltip$6,{display:"block",placement:"bottom",title:close$1,enterDelay:600,style:{marginTop:"2px"},children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBarIconWrapper$1,{onClick:l,"data-testid":generateDataTestId("close-icon"),children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$d,{})})},y+c);default:return null}}),null!=w&&/* @__PURE__ */jsxRuntimeExports.jsx(ActionButtonSlot,{children:w}),null!=R?/* @__PURE__ */jsxRuntimeExports.jsx(ActionButtonSlot,{children:R}):null,
91262
91262
  /* @__PURE__ */jsxRuntimeExports.jsx(AskAiCfoNavButtonWhenEnabled,{dataTestId:`month-end-close-${S}-ask-ai-cfo-button`,isAiCfoAccessEnabled:$,onAskAiCfoClick:b})]})},LeftSideComponent=({headerData:e,onBack:t,headerOverride:n})=>{const o=null!=n?[]:e.leftSection;/* @__PURE__ */
91263
- return jsxRuntimeExports.jsx(LeftSideWrapper,{children:o.map((e,n)=>/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"block",placement:"bottom",title:back$2,enterDelay:600,style:{marginTop:"-14px"},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$1,{onClick:t,"data-testid":generateDataTestId("back-button")})},n+e))})};function NavBarWithHeader(e){const{headerData:t,currentTab:n,currentJeTab:o,onUpdateTab:i,onJeTabUpdate:r,getTabCountAndFetchState:a,currentSelectedView:s,currentMissingReceiptsTab:l,onMissingReceiptsTabUpdate:c,onReconTabUpdate:d,currentRecontab:p,navBarCustomElement:u,completionPercentage:m,completionProgressRaw:h,isCompletionLoading:g,titleStyle:x={},belowTabsSlot:f,selectedGenericTab:y,onGenericTabChange:S,headerOverride:C,hideTabSwitcher:$,isReconV3Enabled:b,lastRefreshTime:v}=e,A=!0===$||null!=C,E=t.tabs.length>0&&!0!==A,w=useTheme(),R=useWindowSizeContext();let j=[];t.tabs.length>0&&(j=t.tabs.map(e=>({label:e.label,id:e.id,countDetails:a(e.id)})));const T="reconciliation"!==s||!0!==b,I=T&&null!=m&&m>=0?getProgressColor(h??m,w.colors):void 0;/* @__PURE__ */
91263
+ return jsxRuntimeExports.jsx(LeftSideWrapper,{children:o.map((e,n)=>/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"block",placement:"bottom",title:back$3,enterDelay:600,style:{marginTop:"-14px"},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledBackIcon$1,{onClick:t,"data-testid":generateDataTestId("back-button")})},n+e))})};function NavBarWithHeader(e){const{headerData:t,currentTab:n,currentJeTab:o,onUpdateTab:i,onJeTabUpdate:r,getTabCountAndFetchState:a,currentSelectedView:s,currentMissingReceiptsTab:l,onMissingReceiptsTabUpdate:c,onReconTabUpdate:d,currentRecontab:p,navBarCustomElement:u,completionPercentage:m,completionProgressRaw:h,isCompletionLoading:g,titleStyle:x={},belowTabsSlot:f,selectedGenericTab:y,onGenericTabChange:S,headerOverride:C,hideTabSwitcher:$,isReconV3Enabled:b,lastRefreshTime:v}=e,A=!0===$||null!=C,E=t.tabs.length>0&&!0!==A,w=useTheme(),R=useWindowSizeContext();let j=[];t.tabs.length>0&&(j=t.tabs.map(e=>({label:e.label,id:e.id,countDetails:a(e.id)})));const T="reconciliation"!==s||!0!==b,I=T&&null!=m&&m>=0?getProgressColor(h??m,w.colors):void 0;/* @__PURE__ */
91264
91264
  return jsxRuntimeExports.jsxs(Container$E,{children:[
91265
91265
  /* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:null!=C?C.title:T&&!0===g?/* @__PURE__ */jsxRuntimeExports.jsxs(TitleWithPercentage,{children:[
91266
91266
  /* @__PURE__ */jsxRuntimeExports.jsx(TitleText$1,{children:t.title}),
@@ -92466,8 +92466,8 @@ return jsxRuntimeExports.jsxs(CreatedByCell,{children:[i&&(null!=o&&""!==o?/* @_
92466
92466
  width: ${Space.sp3};
92467
92467
  height: ${Space.sp3};
92468
92468
  flex-shrink: 0;
92469
- `,TEST_ID_PREFIX$3="actual-matching-reverses";function ReversesGroupedPill({label:e}){/* @__PURE__ */
92470
- return jsxRuntimeExports.jsx(ReadOnlyPill,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"pill"),children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:e,type:"default"})})}const ReadOnlyPill=styled$2.span`
92469
+ `,TEST_ID_PREFIX$4="actual-matching-reverses";function ReversesGroupedPill({label:e}){/* @__PURE__ */
92470
+ return jsxRuntimeExports.jsx(ReadOnlyPill,{"data-testid":generateDataTestId(TEST_ID_PREFIX$4,"pill"),children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:e,type:"default"})})}const ReadOnlyPill=styled$2.span`
92471
92471
  display: inline-flex;
92472
92472
  align-items: center;
92473
92473
  max-width: 100%;
@@ -92689,26 +92689,116 @@ return jsxRuntimeExports.jsx(GroupHeaderButton,{type:"button",onClick:o,children
92689
92689
  color: ${e=>e.theme.colors.hero};
92690
92690
  `,GroupHeaderCount=styled$2(StandardMedium)`
92691
92691
  color: ${e=>e.theme.colors.hero};
92692
- `;function transactionLineLabel(e){const t=(e.lineDescription??"").trim();if(""!==t)return t;const n=(e.transactionMemo??"").trim();return""!==n?n:(e.accountName??"").trim()}const{dateFormat:dateFormat$o,common:{strings:{hyphen:hyphen$h}}}=appLocale.getLocalizedStrings();function formatServiceMonthLabel(e){return""===e?hyphen$h:zeniDate(`${e}-01`).format(dateFormat$o.visual.MMMYYYYFormat)}function formatAccrualJeDate(e,t){const n=formatServiceMonthLabel(e);return n===hyphen$h?t:`${n}, ${t}`}function formatJeShortDate(e){if(""===e)return hyphen$h;const t=zeniDate(e);return null!=t&&"function"==typeof t.isValid&&t.isValid()?t.format(dateFormat$o.visual.MMMDFormat):e}function sumAccruedAmount(e){return e.reduce((e,t)=>e+(t.estimatedAmount?.amount??0),0)}function variancePercent(e,t){return 0===t?null:(e-t)/t*100}function transactionListMeta(e,t){return{dateLabel:t,memo:(e.transactionMemo??"").trim()}}function transactionMatchedLineCopy(e){const t=transactionLineLabel(e),n=(e.transactionIntegrationId??"").trim(),o=""===n?e.vendorName:`${e.vendorName} — ${n}`;return""===t?o:`${o} · ${t}`}function creditAccountName(e,t){return null!=e.jeCreditAccountName&&""!==e.jeCreditAccountName?e.jeCreditAccountName:t}function debitAccountName(e,t){return null!=e.jeDebitAccountName&&""!==e.jeDebitAccountName?e.jeDebitAccountName:t}const DOCUMENT_ID_TYPE_SYMBOL="A",DOCUMENT_ID_REVERSAL_SYMBOL="R",DOCUMENT_ID_VENDOR_NAME_MAX_LENGTH=7,DOCUMENT_ID_REVERSAL_VENDOR_NAME_MAX_LENGTH=6,SERVICE_MONTH_PATTERN=/^(\d{4})-(\d{2})$/;function sanitizeVendorNameForDocId(e){const t=e.replace(/[^\p{L}\p{N}]/gu,"");return""===t?"V":t}function buildAccrualDocumentId(e,t=!1){const n=sanitizeVendorNameForDocId(e.vendorName??"").slice(0,t?DOCUMENT_ID_REVERSAL_VENDOR_NAME_MAX_LENGTH:DOCUMENT_ID_VENDOR_NAME_MAX_LENGTH),o=SERVICE_MONTH_PATTERN.exec(e.serviceMonth??""),i=null==o?`${DOCUMENT_ID_TYPE_SYMBOL}_${n}`:`${DOCUMENT_ID_TYPE_SYMBOL}_${o[1]}/${o[2]}_${n}`;return t?`${i}_${DOCUMENT_ID_REVERSAL_SYMBOL}`:i}function reversalJeGroupTitle(e){return`# ${buildAccrualDocumentId(e,!0)}`}const{common:{strings:{hyphen:hyphen$g},texts:{transaction:transactionFallback}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$5}}}=appLocale.getLocalizedStrings(),detailStrings$1=actualMatchingStrings$5.matchDetail;function getMatchServiceMonthsLabel(e){return formatActualMatchingServiceMonths(e.map(e=>e.serviceMonth))}function matchTierFromMatch(e){const t=e.matchTier??"";if(""!==t)return t.toLowerCase();const n=e.members[0];return(n?.cleared?.matchTier??n?.matchSuggestion?.matchTier??"").toLowerCase()}function getMatchMethodKey(e){const t=matchTierFromMatch(e);return"tier_1"===t||"deterministic"===t||"exact"===t?"exact":"tier_2"===t||"fuzzy"===t?"fuzzy":"manual"===t?"manual":"ai"}function getMatchSourceLabel(e){return"manual"===getMatchMethodKey(e)?detailStrings$1.sourceManual:detailStrings$1.sourceJeAgent}function getMatchMethodLabel(e){const t=getMatchMethodKey(e);return"exact"===t?detailStrings$1.matchMethodExact:"fuzzy"===t?detailStrings$1.matchMethodFuzzy:"manual"===t?detailStrings$1.matchMethodManual:detailStrings$1.matchMethodAi}function getWhyThisMatchedCopy(e){const t=getMatchServiceMonthsLabel(e.members),n=getMatchMethodKey(e);if("exact"===n)return detailStrings$1.whyExact.replace("{service}",t);if("fuzzy"===n){const t=getMatchVariancePercent(e),n=null==t?hyphen$g:`${(Math.round(10*Math.abs(t))/10).toFixed(1)}%`;return(isVarianceAboveReviewThreshold(t)?detailStrings$1.whyFuzzyAboveThreshold:detailStrings$1.whyFuzzy).replace("{variance}",n)}return"manual"===n?detailStrings$1.whyManual.replace("{service}",t):detailStrings$1.whyAi.replace("{service}",t)}function getMatchSourceTxnLabel(e){const t=formatTransactionTypeLabel(e);return""===t?transactionFallback:t}function getTxnMatchedTitle(e){return detailStrings$1.txnMatched.replace("{type}",getMatchSourceTxnLabel(e))}function getMatchedTxnMemo(e,t){return detailStrings$1.matchedMemo.replace("{vendor}",e).replace("{service}",t)}function getMatchedTxnTotalLabel(e){const t=e.toLowerCase();return"bill"===t?detailStrings$1.totalBilled:t.includes("payroll")?detailStrings$1.totalPaid:detailStrings$1.totalPosted}function getMatchStatusLabel(e,t){return"pending_review"===e?t.statusPendingReview:"manually_reversed"===e?t.statusManuallyReversed:t.statusAutoReversed}function getMatchVariancePercent(e){return variancePercent(e.actualAmount.amount,e.accruedAmount.amount)}function formatMatchVarianceLabel(e){const t=getMatchVariancePercent(e);return null==t?null:formatVariancePercent(t)}function isMatchRefreshSpinning(e,t,n){return"In-Progress"===n||null==e&&("In-Progress"===t||"Not-Started"===t)}const{common:{back:back$1,ignore:ignoreText$1,texts:{refresh:refresh},strings:{hyphen:hyphen$f}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$4}}}=appLocale.getLocalizedStrings(),previewStrings$5=actualMatchingStrings$4.matchModal,detailStrings=actualMatchingStrings$4.matchDetail,{reversalFailed:reversalFailed,undoFailed:undoFailed}=detailStrings,TEST_ID_PREFIX$2="actual-matching-match-detail",AMOUNT_FORMAT$2="0,0.[00]",WHY_BODY_OPAL_FILL=`${Colors.brandColorOpalLight}57`;function groupedJeLinkLabel(e,t,n){const o=formatServiceMonthLabel(n);return t<=1||o===hyphen$f?e:`${e} · ${o}`}function ActualMatchingOpenBillActionButton({match:e,transaction:t,onOpenBill:n}){const[o,i]=useState(null),[r,a]=useState(!0),[s,l]=useState(!0),c=t??(null!=e?getMatchedBillTransaction(e):null);if(null==e&&null==c)return null;const d=detailStrings.openLinkedRecords,p=e?.members??[],u="pending_review"===e?.kind,m=null!=e?.transactionDate&&""!==e.transactionDate?formatJeShortDate(e.transactionDate):hyphen$f,h=getMatchSourceTxnLabel(c?.type??e?.transactionType??"bill"),g=e?.vendorName??"",x=""===g?m:`${g} · ${m}`,f=Boolean(o),y=e=>{null!=e&&(i(null),n?.(e))};/* @__PURE__ */
92692
+ `;function LinkedRecordsMenuButton({buttonTestId:e,label:t,menuTestId:n,sections:o,onOpenRecord:i}){const[r,a]=useState(null),[s,l]=useState(/* @__PURE__ */new Set),c=Boolean(r);/* @__PURE__ */
92693
92693
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
92694
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:f?"":d,enterDelay:TOOLTIP_ENTER_DELAY_MS,placement:"bottom",display:"flex",disableIntersectionObserver:!0,children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIconButton,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"open-bill"),type:"button","aria-label":d,"aria-expanded":f,$active:f,onClick:e=>{i(f?null:e.currentTarget)},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIcon,{})})}),
92695
- /* @__PURE__ */jsxRuntimeExports.jsx(Popover,{open:f,anchorEl:o,onClose:()=>i(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{component:LinksMenuPaper,sx:{backgroundColor:e=>"dark"===e.palette.mode?Colors.neutralGrey5Dark:Colors.neutralGrey5Light,backgroundImage:"none"}}},children:/* @__PURE__ */jsxRuntimeExports.jsxs(LinksMenu,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"links-menu"),children:[
92696
- /* @__PURE__ */jsxRuntimeExports.jsxs(LinksSectionToggle,{type:"button","aria-expanded":r,onClick:()=>a(e=>!e),children:[
92697
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionChevron,{$collapsed:!r}),
92698
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionTitle,{children:detailStrings.journalEntries})]}),r?p.map(e=>{const t=getAccrualJournalEntryTransaction(e);/* @__PURE__ */
92699
- return jsxRuntimeExports.jsxs(LinksItem,{type:"button",disabled:null==t,onClick:()=>y(t),children:[
92700
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemLabel,{children:groupedJeLinkLabel(detailStrings.accrualJeShort,p.length,e.serviceMonth)}),
92701
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemDescription,{children:buildAccrualDocumentId(e,!1)})]},`accrual-link-${e.accrualId}`)}):null,r?p.map(e=>{const t=getReversalJournalEntryTransaction(e),n=u?detailStrings.pendingReversalJeShort:detailStrings.reversalJeShort;/* @__PURE__ */
92702
- return jsxRuntimeExports.jsxs(LinksItem,{type:"button",disabled:null==t,onClick:()=>y(t),children:[
92703
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemLabel,{children:groupedJeLinkLabel(n,p.length,e.serviceMonth)}),
92704
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemDescription,{children:buildAccrualDocumentId(e,!0)})]},`reversal-link-${e.accrualId}`)}):null,
92705
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksDivider,{}),
92706
- /* @__PURE__ */jsxRuntimeExports.jsxs(LinksSectionToggle,{type:"button","aria-expanded":s,onClick:()=>l(e=>!e),children:[
92707
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionChevron,{$collapsed:!s}),
92708
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionTitle,{children:detailStrings.source})]}),s?/* @__PURE__ */jsxRuntimeExports.jsxs(LinksItem,{type:"button",disabled:null==c,onClick:()=>y(c),children:[
92709
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemLabel,{children:h}),
92710
- /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemDescription,{children:x})]}):null]})})]})}function formatMemberAmount(e){return amountToString(AMOUNT_FORMAT$2,e.estimatedAmount)??hyphen$f}function ActualMatchingMatchDetailPage({detailFetchState:e,isRenderedInPanel:t=!1,isApproveInFlight:n=!1,isIgnoreInFlight:o=!1,isUndoInFlight:i=!1,match:r,onNavigateBack:a,onRefresh:s,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:d,onUndoReversal:p,lastMatchResults:u,lastUndoResults:m,refreshStatus:h}){const g=useTheme(),[x,f]=useState(!1),y=null!=r?getMatchedBillTransaction(r):null,S=r?.leftovers??[],C=null!=r?getApproveAndReverseParams(r):null,$=null!=r&&"pending_review"===r.kind&&null!=d,b=null!=r&&"pending_review"===r.kind&&null!=c,v=null!=r&&"pending_review"!==r.kind&&null!=p,A=isMatchRefreshSpinning(r,e,h),E=()=>{A||s()},w=null!=l?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingOpenBillActionButton,{match:r,transaction:y??void 0,onOpenBill:l}):null,R=/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(RefreshButtonWrapper,{"data-testid":generateDataTestId("refresh-icon"),onClick:E,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon$1,{$spinning:A})})});/* @__PURE__ */
92711
- return jsxRuntimeExports.jsxs(PageRoot$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"page"),children:[t?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:"",hideMiddleSection:!0,source:"ActualMatchingMatchDetail",backgroundColor:g.colors.grey5,onBackClick:a,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$1,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"back"),onClick:a,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back,{})})}),rightSideComponent:/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,R]})})}),null==r?"In-Progress"===e||"Not-Started"===e?/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailSkeleton,{}):/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailLoadError,{onRefresh:E}):/* @__PURE__ */jsxRuntimeExports.jsxs(Content$1,{children:[
92694
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:c?"":t,enterDelay:TOOLTIP_ENTER_DELAY_MS,placement:"bottom",display:"flex",disableIntersectionObserver:!0,children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenLinksIconButton,{"data-testid":e,type:"button","aria-label":t,"aria-expanded":c,$active:c,onClick:e=>{a(c?null:e.currentTarget)},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenLinksIcon,{})})}),
92695
+ /* @__PURE__ */jsxRuntimeExports.jsx(Popover,{open:c,anchorEl:r,onClose:()=>a(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{component:LinksMenuPaper,sx:{backgroundColor:e=>"dark"===e.palette.mode?Colors.neutralGrey5Dark:Colors.neutralGrey5Light,backgroundImage:"none"}}},children:/* @__PURE__ */jsxRuntimeExports.jsx(LinksMenu,{"data-testid":n,children:o.map((e,t)=>{const n=!s.has(e.key);/* @__PURE__ */
92696
+ return jsxRuntimeExports.jsxs(Fragment,{children:[t>0?/* @__PURE__ */jsxRuntimeExports.jsx(LinksDivider,{}):null,
92697
+ /* @__PURE__ */jsxRuntimeExports.jsxs(LinksSectionToggle,{type:"button","aria-expanded":n,onClick:()=>{return t=e.key,void l(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},children:[
92698
+ /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionChevron,{$collapsed:!n}),
92699
+ /* @__PURE__ */jsxRuntimeExports.jsx(LinksSectionTitle,{children:e.title})]}),n?e.items.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(LinksItem,{type:"button",disabled:null==e.target,onClick:()=>{var t;null!=(t=e.target)&&(a(null),i(t))},children:[
92700
+ /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemLabel,{children:e.label}),
92701
+ /* @__PURE__ */jsxRuntimeExports.jsx(LinksItemDescription,{children:e.description})]},e.key)):null]},e.key)})})})]})}const OpenLinksIconButton=styled$2.button`
92702
+ display: flex;
92703
+ align-items: center;
92704
+ justify-content: center;
92705
+ width: ${Space.sp4};
92706
+ height: ${Space.sp4};
92707
+ padding: ${Space.sp1};
92708
+ border: none;
92709
+ border-radius: ${Space.sp1};
92710
+ background: ${e=>!0===e.$active?e.theme.colors.grey3:"none"};
92711
+ cursor: pointer;
92712
+ color: ${e=>e.theme.colors.champion};
92713
+ &:hover:not(:disabled) {
92714
+ background: ${e=>e.theme.colors.grey3};
92715
+ color: ${e=>e.theme.colors.primary};
92716
+ }
92717
+ &:disabled {
92718
+ cursor: default;
92719
+ opacity: 0.4;
92720
+ }
92721
+ `,OpenLinksIcon=styled$2(SvgOpenLink)`
92722
+ width: ${Space.sp3};
92723
+ height: ${Space.sp3};
92724
+ flex-shrink: 0;
92725
+ color: inherit;
92726
+ `,LinksMenuPaper=styled$2.div`
92727
+ margin-top: ${Space.sp1};
92728
+ width: 260px;
92729
+ border-radius: ${Space.sp2};
92730
+ box-shadow: 0 ${Space.sp2} ${Space.sp4} ${Colors.brandColorOnyx}1F;
92731
+ overflow: hidden;
92732
+ background-color: ${e=>"dark"===e.theme.palette.mode?Colors.neutralGrey5Dark:Colors.neutralGrey5Light};
92733
+ border: ${BorderStroke.hairline} solid ${e=>e.theme.colors.grey2};
92734
+ padding: ${Space.sp1} ${Space.sp0};
92735
+ `,LinksMenu=styled$2.div`
92736
+ display: flex;
92737
+ flex-direction: column;
92738
+ `,LinksSectionToggle=styled$2.button`
92739
+ display: flex;
92740
+ align-items: center;
92741
+ gap: ${Space.sp1};
92742
+ width: 100%;
92743
+ height: ${Space.sp4};
92744
+ padding: ${Space.sp0} ${Space.sp2};
92745
+ box-sizing: border-box;
92746
+ border: none;
92747
+ background: none;
92748
+ cursor: pointer;
92749
+ text-align: left;
92750
+ color: ${e=>e.theme.colors.hero};
92751
+ &:hover {
92752
+ background: ${e=>e.theme.colors.background};
92753
+ color: ${e=>e.theme.colors.primary};
92754
+ }
92755
+ `,LinksSectionChevron=styled$2(SvgArrow1Bottom,{shouldForwardProp:e=>"$collapsed"!==e})`
92756
+ width: ${sp[3]}px;
92757
+ height: ${sp[3]}px;
92758
+ flex-shrink: 0;
92759
+ transform: rotate(${e=>e.$collapsed?"-90deg":"0deg"});
92760
+ transition: transform 150ms ease;
92761
+ `,LinksSectionTitle=styled$2(ExtraSmallMedium)`
92762
+ color: inherit;
92763
+ `,LinksItem=styled$2.button`
92764
+ display: flex;
92765
+ flex-direction: column;
92766
+ align-items: flex-start;
92767
+ gap: ${Space.sp0};
92768
+ width: 100%;
92769
+ min-height: ${Space.sp7};
92770
+ padding: ${Space.sp1} ${Space.sp2};
92771
+ box-sizing: border-box;
92772
+ border: none;
92773
+ background: none;
92774
+ cursor: pointer;
92775
+ text-align: left;
92776
+ color: ${e=>e.theme.colors.champion};
92777
+ &:hover:not(:disabled) {
92778
+ background: ${e=>e.theme.colors.background};
92779
+ color: ${e=>e.theme.colors.primary};
92780
+ }
92781
+ &:hover:not(:disabled) > *:last-child {
92782
+ color: ${e=>e.theme.colors.primary};
92783
+ }
92784
+ &:disabled {
92785
+ cursor: default;
92786
+ opacity: 0.55;
92787
+ }
92788
+ `,LinksItemLabel=styled$2(StandardSemiBold)`
92789
+ color: inherit;
92790
+ line-height: 1.3;
92791
+ `,LinksItemDescription=styled$2(SmallSemiBold)`
92792
+ color: ${e=>e.theme.colors.hero};
92793
+ white-space: nowrap;
92794
+ line-height: 1.3;
92795
+ `,LinksDivider=styled$2.div`
92796
+ height: ${BorderStroke.hairline};
92797
+ margin: ${Space.sp1} ${Space.sp0};
92798
+ background: ${e=>e.theme.colors.grey2};
92799
+ `;function transactionLineLabel(e){const t=(e.lineDescription??"").trim();if(""!==t)return t;const n=(e.transactionMemo??"").trim();return""!==n?n:(e.accountName??"").trim()}const{dateFormat:dateFormat$o,common:{strings:{hyphen:hyphen$h}}}=appLocale.getLocalizedStrings();function formatServiceMonthLabel(e){return""===e?hyphen$h:zeniDate(`${e}-01`).format(dateFormat$o.visual.MMMYYYYFormat)}function formatAccrualJeDate(e,t){const n=formatServiceMonthLabel(e);return n===hyphen$h?t:`${n}, ${t}`}function formatJeShortDate(e){if(""===e)return hyphen$h;const t=zeniDate(e);return null!=t&&"function"==typeof t.isValid&&t.isValid()?t.format(dateFormat$o.visual.MMMDFormat):e}function sumAccruedAmount(e){return e.reduce((e,t)=>e+(t.estimatedAmount?.amount??0),0)}function variancePercent(e,t){return 0===t?null:(e-t)/t*100}function transactionListMeta(e,t){return{dateLabel:t,memo:(e.transactionMemo??"").trim()}}function transactionMatchedLineCopy(e){const t=transactionLineLabel(e),n=(e.transactionIntegrationId??"").trim(),o=""===n?e.vendorName:`${e.vendorName} — ${n}`;return""===t?o:`${o} · ${t}`}function creditAccountName(e,t){return null!=e.jeCreditAccountName&&""!==e.jeCreditAccountName?e.jeCreditAccountName:t}function debitAccountName(e,t){return null!=e.jeDebitAccountName&&""!==e.jeDebitAccountName?e.jeDebitAccountName:t}const DOCUMENT_ID_TYPE_SYMBOL="A",DOCUMENT_ID_REVERSAL_SYMBOL="R",DOCUMENT_ID_VENDOR_NAME_MAX_LENGTH=7,DOCUMENT_ID_REVERSAL_VENDOR_NAME_MAX_LENGTH=6,SERVICE_MONTH_PATTERN=/^(\d{4})-(\d{2})$/;function sanitizeVendorNameForDocId(e){const t=e.replace(/[^\p{L}\p{N}]/gu,"");return""===t?"V":t}function buildAccrualDocumentId(e,t=!1){const n=sanitizeVendorNameForDocId(e.vendorName??"").slice(0,t?DOCUMENT_ID_REVERSAL_VENDOR_NAME_MAX_LENGTH:DOCUMENT_ID_VENDOR_NAME_MAX_LENGTH),o=SERVICE_MONTH_PATTERN.exec(e.serviceMonth??""),i=null==o?`${DOCUMENT_ID_TYPE_SYMBOL}_${n}`:`${DOCUMENT_ID_TYPE_SYMBOL}_${o[1]}/${o[2]}_${n}`;return t?`${i}_${DOCUMENT_ID_REVERSAL_SYMBOL}`:i}function reversalJeGroupTitle(e){return`# ${buildAccrualDocumentId(e,!0)}`}const{common:{strings:{hyphen:hyphen$g},texts:{transaction:transactionFallback}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$5}}}=appLocale.getLocalizedStrings(),detailStrings$1=actualMatchingStrings$5.matchDetail;function getMatchServiceMonthsLabel(e){return formatActualMatchingServiceMonths(e.map(e=>e.serviceMonth))}function matchTierFromMatch(e){const t=e.matchTier??"";if(""!==t)return t.toLowerCase();const n=e.members[0];return(n?.cleared?.matchTier??n?.matchSuggestion?.matchTier??"").toLowerCase()}function getMatchMethodKey(e){const t=matchTierFromMatch(e);return"tier_1"===t||"deterministic"===t||"exact"===t?"exact":"tier_2"===t||"fuzzy"===t?"fuzzy":"manual"===t?"manual":"ai"}function getMatchSourceLabel(e){return"manual"===getMatchMethodKey(e)?detailStrings$1.sourceManual:detailStrings$1.sourceJeAgent}function getMatchMethodLabel(e){const t=getMatchMethodKey(e);return"exact"===t?detailStrings$1.matchMethodExact:"fuzzy"===t?detailStrings$1.matchMethodFuzzy:"manual"===t?detailStrings$1.matchMethodManual:detailStrings$1.matchMethodAi}function getWhyThisMatchedCopy(e){const t=getMatchServiceMonthsLabel(e.members),n=getMatchMethodKey(e);if("exact"===n)return detailStrings$1.whyExact.replace("{service}",t);if("fuzzy"===n){const t=getMatchVariancePercent(e),n=null==t?hyphen$g:`${(Math.round(10*Math.abs(t))/10).toFixed(1)}%`;return(isVarianceAboveReviewThreshold(t)?detailStrings$1.whyFuzzyAboveThreshold:detailStrings$1.whyFuzzy).replace("{variance}",n)}return"manual"===n?detailStrings$1.whyManual.replace("{service}",t):detailStrings$1.whyAi.replace("{service}",t)}function getMatchSourceTxnLabel(e){const t=formatTransactionTypeLabel(e);return""===t?transactionFallback:t}function getTxnMatchedTitle(e){return detailStrings$1.txnMatched.replace("{type}",getMatchSourceTxnLabel(e))}function getMatchedTxnMemo(e,t){return detailStrings$1.matchedMemo.replace("{vendor}",e).replace("{service}",t)}function getMatchedTxnTotalLabel(e){const t=e.toLowerCase();return"bill"===t?detailStrings$1.totalBilled:t.includes("payroll")?detailStrings$1.totalPaid:detailStrings$1.totalPosted}function getMatchStatusLabel(e,t){return"pending_review"===e?t.statusPendingReview:"manually_reversed"===e?t.statusManuallyReversed:t.statusAutoReversed}function getMatchVariancePercent(e){return variancePercent(e.actualAmount.amount,e.accruedAmount.amount)}function formatMatchVarianceLabel(e){const t=getMatchVariancePercent(e);return null==t?null:formatVariancePercent(t)}function isMatchRefreshSpinning(e,t,n){return"In-Progress"===n||null==e&&("In-Progress"===t||"Not-Started"===t)}const{common:{back:back$2,ignore:ignoreText$1,texts:{refresh:refresh},strings:{hyphen:hyphen$f}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$4}}}=appLocale.getLocalizedStrings(),previewStrings$5=actualMatchingStrings$4.matchModal,detailStrings=actualMatchingStrings$4.matchDetail,{reversalFailed:reversalFailed,undoFailed:undoFailed}=detailStrings,TEST_ID_PREFIX$3="actual-matching-match-detail",AMOUNT_FORMAT$2="0,0.[00]",WHY_BODY_OPAL_FILL=`${Colors.brandColorOpalLight}57`;function groupedJeLinkLabel(e,t,n){const o=formatServiceMonthLabel(n);return t<=1||o===hyphen$f?e:`${e} · ${o}`}function ActualMatchingOpenBillActionButton({match:e,transaction:t,onOpenBill:n}){const o=t??(null!=e?getMatchedBillTransaction(e):null);if(null==e&&null==o)return null;const i=e?.members??[],r="pending_review"===e?.kind,a=null!=e?.transactionDate&&""!==e.transactionDate?formatJeShortDate(e.transactionDate):hyphen$f,s=e?.vendorName??"",l=r?detailStrings.pendingReversalJeShort:detailStrings.reversalJeShort,c=[{key:"journal-entries",title:detailStrings.journalEntries,items:[...i.map(e=>({key:`accrual-link-${e.accrualId}`,label:groupedJeLinkLabel(detailStrings.accrualJeShort,i.length,e.serviceMonth),description:buildAccrualDocumentId(e,!1),target:getAccrualJournalEntryTransaction(e)})),...i.map(e=>({key:`reversal-link-${e.accrualId}`,label:groupedJeLinkLabel(l,i.length,e.serviceMonth),description:buildAccrualDocumentId(e,!0),target:getReversalJournalEntryTransaction(e)}))]},{key:"source",title:detailStrings.source,items:[{key:"source-link",label:getMatchSourceTxnLabel(o?.type??e?.transactionType??"bill"),description:""===s?a:`${s} · ${a}`,target:o}]}];/* @__PURE__ */
92800
+ return jsxRuntimeExports.jsx(LinkedRecordsMenuButton,{buttonTestId:generateDataTestId(TEST_ID_PREFIX$3,"open-bill"),label:detailStrings.openLinkedRecords,menuTestId:generateDataTestId(TEST_ID_PREFIX$3,"links-menu"),sections:c,onOpenRecord:e=>n?.(e)})}function formatMemberAmount(e){return amountToString(AMOUNT_FORMAT$2,e.estimatedAmount)??hyphen$f}function ActualMatchingMatchDetailPage({detailFetchState:e,isRenderedInPanel:t=!1,isApproveInFlight:n=!1,isIgnoreInFlight:o=!1,isUndoInFlight:i=!1,match:r,onNavigateBack:a,onRefresh:s,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:d,onUndoReversal:p,lastMatchResults:u,lastUndoResults:m,refreshStatus:h}){const g=useTheme(),[x,f]=useState(!1),y=null!=r?getMatchedBillTransaction(r):null,S=r?.leftovers??[],C=null!=r?getApproveAndReverseParams(r):null,$=null!=r&&"pending_review"===r.kind&&null!=d,b=null!=r&&"pending_review"===r.kind&&null!=c,v=null!=r&&"pending_review"!==r.kind&&null!=p,A=isMatchRefreshSpinning(r,e,h),E=()=>{A||s()},w=null!=l?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingOpenBillActionButton,{match:r,transaction:y??void 0,onOpenBill:l}):null,R=/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(RefreshButtonWrapper,{"data-testid":generateDataTestId("refresh-icon"),onClick:E,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon$1,{$spinning:A})})});/* @__PURE__ */
92801
+ return jsxRuntimeExports.jsxs(PageRoot$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"page"),children:[t?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:"",hideMiddleSection:!0,source:"ActualMatchingMatchDetail",backgroundColor:g.colors.grey5,onBackClick:a,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$2,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"back"),onClick:a,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back$1,{})})}),rightSideComponent:/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,R]})})}),null==r?"In-Progress"===e||"Not-Started"===e?/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailSkeleton,{}):/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailLoadError,{onRefresh:E}):/* @__PURE__ */jsxRuntimeExports.jsxs(Content$1,{children:[
92712
92802
  /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
92713
92803
  /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
92714
92804
  /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:r.vendorName??"",size:Space.sp4}),
@@ -92722,7 +92812,7 @@ return jsxRuntimeExports.jsxs(PageRoot$1,{"data-testid":generateDataTestId(TEST_
92722
92812
  /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRow$1,{children:[
92723
92813
  /* @__PURE__ */jsxRuntimeExports.jsx(SummaryLabel,{children:detailStrings.billDate}),
92724
92814
  /* @__PURE__ */jsxRuntimeExports.jsx(SummaryValue,{$isPanel:t,children:null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen$f})]})]})]}),
92725
- /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{$isPanel:t,children:[isVarianceAboveReviewThreshold(getMatchVariancePercent(r))?/* @__PURE__ */jsxRuntimeExports.jsxs(VarianceBanner,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"variance-threshold-banner"),children:[
92815
+ /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{$isPanel:t,children:[isVarianceAboveReviewThreshold(getMatchVariancePercent(r))?/* @__PURE__ */jsxRuntimeExports.jsxs(VarianceBanner,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"variance-threshold-banner"),children:[
92726
92816
  /* @__PURE__ */jsxRuntimeExports.jsx(VarianceBannerIcon,{}),
92727
92817
  /* @__PURE__ */jsxRuntimeExports.jsx(VarianceBannerText,{children:detailStrings.varianceAboveThreshold.replace("{percent}",String(VARIANCE_REVIEW_THRESHOLD_PERCENT))})]}):null,
92728
92818
  /* @__PURE__ */jsxRuntimeExports.jsxs(MetricsRow,{$compact:t,children:[
@@ -92740,7 +92830,7 @@ return jsxRuntimeExports.jsxs(PageRoot$1,{"data-testid":generateDataTestId(TEST_
92740
92830
  /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.matchMethod,value:getMatchMethodLabel(r)}),
92741
92831
  /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.source,value:getMatchSourceLabel(r)})]}),r.members.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(AccrualJeBlock,{accrual:e,onOpenJe:l,testIdSuffix:`accrual-je-${e.accrualId}`},`accrual-je-${e.accrualId}`)),r.members.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,isPending:"pending_review"===r.kind,postingDateLabel:formatJeShortDate(r.transactionDate??""),failureReason:undoFailureReason(m,e.accrualId),onOpenJe:l,testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),S.filter(e=>shouldShowLeftoverReversalFailure(e.accrualId,u,m)).map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,isPending:!0,postingDateLabel:formatJeShortDate(r.transactionDate??""),failureReason:leftoverReversalFailureReason(u,e.accrualId),onOpenJe:l,testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),
92742
92832
  /* @__PURE__ */jsxRuntimeExports.jsx(BillMatchedBlock,{match:r}),
92743
- /* @__PURE__ */jsxRuntimeExports.jsxs(WhyCard,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"why"),children:[
92833
+ /* @__PURE__ */jsxRuntimeExports.jsxs(WhyCard,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"why"),children:[
92744
92834
  /* @__PURE__ */jsxRuntimeExports.jsx(CardSectionHeader,{children:detailStrings.whyThisMatched}),
92745
92835
  /* @__PURE__ */jsxRuntimeExports.jsxs(WhyBody,{children:[
92746
92836
  /* @__PURE__ */jsxRuntimeExports.jsxs(WhyHead,{children:[
@@ -92752,7 +92842,7 @@ return jsxRuntimeExports.jsxs(FieldRowRoot,{children:[
92752
92842
  /* @__PURE__ */jsxRuntimeExports.jsx(FieldValue,{children:t})]})}function VarianceValue({match:e}){const t=formatMatchVarianceLabel(e),n=getMatchVariancePercent(e);return null==t||null==n?/* @__PURE__ */jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:hyphen$f}):/* @__PURE__ */jsxRuntimeExports.jsx(FitContentCapsule,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:t,type:getVarianceCapsuleType(n)})})}function AccrualJeBlock({accrual:e,onOpenJe:t,testIdSuffix:n}){const o=formatMemberAmount(e),i=buildAccrualDocumentId(e,!1),r=getAccrualJournalEntryTransaction(e);/* @__PURE__ */
92753
92843
  return jsxRuntimeExports.jsx(JeBlock$1,{creditAccount:creditAccountName(e,previewStrings$5.accruedExpensesFallback),creditAmount:o,dateLabel:formatAccrualJeDate(e.serviceMonth,previewStrings$5.lastDayOfMonth),debitAccount:debitAccountName(e,hyphen$f),debitAmount:o,documentId:i,note:formatServiceMonthLabel(e.serviceMonth),title:detailStrings.accrualJournalEntry,onOpenDocument:null==r||null==t?void 0:()=>t(r),testIdSuffix:n})}function ReversalJeBlock({accrual:e,isPending:t=!1,postingDateLabel:n,testIdSuffix:o,failureReason:i,onOpenJe:r}){const a=formatMemberAmount(e),s=buildAccrualDocumentId(e,!0),l=getReversalJournalEntryTransaction(e);/* @__PURE__ */
92754
92844
  return jsxRuntimeExports.jsx(JeBlock$1,{creditAccount:debitAccountName(e,hyphen$f),creditAmount:a,dateLabel:n,debitAccount:creditAccountName(e,previewStrings$5.accruedExpensesFallback),debitAmount:a,documentId:s,failureReason:i,note:detailStrings.mirrorsTheAccrual,title:t?detailStrings.pendingReversalJe:detailStrings.reversalJournalEntry,onOpenDocument:null==l||null==r?void 0:()=>r(l),testIdSuffix:o})}function JeDocId({documentId:e,onOpen:t}){return null==t?/* @__PURE__ */jsxRuntimeExports.jsx(JeDocIdText,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(JeDocIdButton,{type:"button",onClick:t,children:/* @__PURE__ */jsxRuntimeExports.jsx("span",{children:e})})}function JeBlock$1({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,documentId:r,note:a,title:s,testIdSuffix:l,failureReason:c,onOpenDocument:d}){const p=null!=c&&""!==c;/* @__PURE__ */
92755
- return jsxRuntimeExports.jsxs(JeCard$1,{$hasFailure:p,"data-testid":generateDataTestId(TEST_ID_PREFIX$2,l),children:[
92845
+ return jsxRuntimeExports.jsxs(JeCard$1,{$hasFailure:p,"data-testid":generateDataTestId(TEST_ID_PREFIX$3,l),children:[
92756
92846
  /* @__PURE__ */jsxRuntimeExports.jsxs(JeCardHeader,{children:[
92757
92847
  /* @__PURE__ */jsxRuntimeExports.jsxs(JeCardTitle,{children:[s,
92758
92848
  /* @__PURE__ */jsxRuntimeExports.jsx(JeDocId,{documentId:r,onOpen:d})]}),a!==hyphen$f&&""!==a?/* @__PURE__ */jsxRuntimeExports.jsx(JeCardNote,{children:a}):null]}),
@@ -92768,8 +92858,8 @@ return jsxRuntimeExports.jsxs(JeCard$1,{$hasFailure:p,"data-testid":generateData
92768
92858
  /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$withTopBorder:!0,children:n}),
92769
92859
  /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$withTopBorder:!0,children:e}),
92770
92860
  /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$muted:!0,$withTopBorder:!0,children:hyphen$f}),
92771
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$isFailureAmount:p,$withTopBorder:!0,children:t})]}),p?/* @__PURE__ */jsxRuntimeExports.jsx(JeFailureReason,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,`${l}-reason`),children:c}):null]})}function BillMatchedBlock({match:e}){const t=e.transactionType??"bill",n=getMatchServiceMonthsLabel(e.members),o=null!=e.transactionDate&&""!==e.transactionDate?formatJeShortDate(e.transactionDate):hyphen$f,i=e.vendorName??"",r=getMatchedTxnMemo(""===i?hyphen$f:i,n);/* @__PURE__ */
92772
- return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"bill-matched"),children:[
92861
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$isFailureAmount:p,$withTopBorder:!0,children:t})]}),p?/* @__PURE__ */jsxRuntimeExports.jsx(JeFailureReason,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,`${l}-reason`),children:c}):null]})}function BillMatchedBlock({match:e}){const t=e.transactionType??"bill",n=getMatchServiceMonthsLabel(e.members),o=null!=e.transactionDate&&""!==e.transactionDate?formatJeShortDate(e.transactionDate):hyphen$f,i=e.vendorName??"",r=getMatchedTxnMemo(""===i?hyphen$f:i,n);/* @__PURE__ */
92862
+ return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"bill-matched"),children:[
92773
92863
  /* @__PURE__ */jsxRuntimeExports.jsx(JeCardHeader,{children:/* @__PURE__ */jsxRuntimeExports.jsx(JeCardTitle,{children:getTxnMatchedTitle(t)})}),
92774
92864
  /* @__PURE__ */jsxRuntimeExports.jsxs(JeTable$1,{children:[
92775
92865
  /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{children:previewStrings$5.columnDate}),
@@ -92781,11 +92871,11 @@ return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID
92781
92871
  /* @__PURE__ */jsxRuntimeExports.jsx(BillMatchedTotalCell,{children:getMatchedTxnTotalLabel(t)}),
92782
92872
  /* @__PURE__ */jsxRuntimeExports.jsx(BillMatchedTotalCell,{$muted:!0,$span:2,children:previewStrings$5.vsAccrued.replace("{amount}",formatAmount$1(e.accruedAmount))}),
92783
92873
  /* @__PURE__ */jsxRuntimeExports.jsx(BillMatchedTotalCell,{children:formatAmount$1(e.actualAmount)})]})]})}function MatchDetailLoadError({onRefresh:e}){/* @__PURE__ */
92784
- return jsxRuntimeExports.jsxs(LoadErrorRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"load-error"),children:[
92874
+ return jsxRuntimeExports.jsxs(LoadErrorRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"load-error"),children:[
92785
92875
  /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorIconButton,{type:"button","aria-label":refresh,onClick:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertIcon$2,{})})}),
92786
92876
  /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorTitle,{children:detailStrings.loadErrorTitle}),
92787
92877
  /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorSubTitle,{children:detailStrings.loadErrorSubTitle})]})}function MatchDetailSkeleton(){/* @__PURE__ */
92788
- return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"skeleton"),children:[
92878
+ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$3,"skeleton"),children:[
92789
92879
  /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
92790
92880
  /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
92791
92881
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:sp[5],height:sp[5]}),
@@ -92813,12 +92903,12 @@ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_I
92813
92903
  min-height: 0;
92814
92904
  overflow: hidden;
92815
92905
  background-color: ${e=>e.theme.colors.grey4};
92816
- `,NavbarContainer=styled$2.div`
92906
+ `,NavbarContainer$1=styled$2.div`
92817
92907
  position: sticky;
92818
92908
  z-index: 3;
92819
92909
  top: ${Space.sp0};
92820
92910
  width: 100%;
92821
- `,BackButtonWrapper=styled$2.div`
92911
+ `,BackButtonWrapper$1=styled$2.div`
92822
92912
  display: flex;
92823
92913
  align-items: center;
92824
92914
  justify-content: center;
@@ -92831,7 +92921,7 @@ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_I
92831
92921
  &:hover {
92832
92922
  background-color: ${e=>e.theme.colors.grey3};
92833
92923
  }
92834
- `,Back=styled$2(SvgArrowLeft)`
92924
+ `,Back$1=styled$2(SvgArrowLeft)`
92835
92925
  width: ${Space.sp3};
92836
92926
  height: ${Space.sp3};
92837
92927
  color: ${e=>e.theme.colors.champion};
@@ -93027,31 +93117,6 @@ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_I
93027
93117
  ${textStyles.standardSemiBold.css}
93028
93118
  color: ${e=>e.theme.colors.primary};
93029
93119
  text-align: right;
93030
- `,OpenBillIconButton=styled$2.button`
93031
- display: flex;
93032
- align-items: center;
93033
- justify-content: center;
93034
- width: ${Space.sp4};
93035
- height: ${Space.sp4};
93036
- padding: ${Space.sp1};
93037
- border: none;
93038
- border-radius: ${Space.sp1};
93039
- background: ${e=>!0===e.$active?e.theme.colors.grey3:"none"};
93040
- cursor: pointer;
93041
- color: ${e=>e.theme.colors.champion};
93042
- &:hover:not(:disabled) {
93043
- background: ${e=>e.theme.colors.grey3};
93044
- color: ${e=>e.theme.colors.primary};
93045
- }
93046
- &:disabled {
93047
- cursor: default;
93048
- opacity: 0.4;
93049
- }
93050
- `,OpenBillIcon=styled$2(SvgOpenLink)`
93051
- width: ${Space.sp3};
93052
- height: ${Space.sp3};
93053
- flex-shrink: 0;
93054
- color: inherit;
93055
93120
  `,VendorName=styled$2(H7SemiBold)`
93056
93121
  color: ${e=>e.theme.colors.primary};
93057
93122
  min-width: 0;
@@ -93138,79 +93203,6 @@ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_I
93138
93203
  text-decoration: underline;
93139
93204
  text-underline-offset: ${BorderStroke.regular};
93140
93205
  }
93141
- `,LinksMenuPaper=styled$2.div`
93142
- margin-top: ${Space.sp1};
93143
- width: 260px;
93144
- border-radius: ${Space.sp2};
93145
- box-shadow: 0 ${Space.sp2} ${Space.sp4} ${Colors.brandColorOnyx}1F;
93146
- overflow: hidden;
93147
- background-color: ${e=>"dark"===e.theme.palette.mode?Colors.neutralGrey5Dark:Colors.neutralGrey5Light};
93148
- border: ${BorderStroke.hairline} solid ${e=>e.theme.colors.grey2};
93149
- padding: ${Space.sp1} ${Space.sp0};
93150
- `,LinksMenu=styled$2.div`
93151
- display: flex;
93152
- flex-direction: column;
93153
- `,LinksSectionToggle=styled$2.button`
93154
- display: flex;
93155
- align-items: center;
93156
- gap: ${Space.sp1};
93157
- width: 100%;
93158
- height: ${Space.sp4};
93159
- padding: ${Space.sp0} ${Space.sp2};
93160
- box-sizing: border-box;
93161
- border: none;
93162
- background: none;
93163
- cursor: pointer;
93164
- text-align: left;
93165
- color: ${e=>e.theme.colors.hero};
93166
- &:hover {
93167
- background: ${e=>e.theme.colors.background};
93168
- color: ${e=>e.theme.colors.primary};
93169
- }
93170
- `,LinksSectionChevron=styled$2(SvgArrow1Bottom,{shouldForwardProp:e=>"$collapsed"!==e})`
93171
- width: ${sp[3]}px;
93172
- height: ${sp[3]}px;
93173
- flex-shrink: 0;
93174
- transform: rotate(${e=>e.$collapsed?"-90deg":"0deg"});
93175
- transition: transform 150ms ease;
93176
- `,LinksSectionTitle=styled$2(ExtraSmallMedium)`
93177
- color: inherit;
93178
- `,LinksItem=styled$2.button`
93179
- display: flex;
93180
- flex-direction: column;
93181
- align-items: flex-start;
93182
- gap: ${Space.sp0};
93183
- width: 100%;
93184
- min-height: ${Space.sp7};
93185
- padding: ${Space.sp1} ${Space.sp2};
93186
- box-sizing: border-box;
93187
- border: none;
93188
- background: none;
93189
- cursor: pointer;
93190
- text-align: left;
93191
- color: ${e=>e.theme.colors.champion};
93192
- &:hover:not(:disabled) {
93193
- background: ${e=>e.theme.colors.background};
93194
- color: ${e=>e.theme.colors.primary};
93195
- }
93196
- &:hover:not(:disabled) > *:last-child {
93197
- color: ${e=>e.theme.colors.primary};
93198
- }
93199
- &:disabled {
93200
- cursor: default;
93201
- opacity: 0.55;
93202
- }
93203
- `,LinksItemLabel=styled$2(StandardSemiBold)`
93204
- color: inherit;
93205
- line-height: 1.3;
93206
- `,LinksItemDescription=styled$2(SmallSemiBold)`
93207
- color: ${e=>e.theme.colors.hero};
93208
- white-space: nowrap;
93209
- line-height: 1.3;
93210
- `,LinksDivider=styled$2.div`
93211
- height: ${BorderStroke.hairline};
93212
- margin: ${Space.sp1} ${Space.sp0};
93213
- background: ${e=>e.theme.colors.grey2};
93214
93206
  `,JeFailureReason=styled$2(ExtraSmallMedium)`
93215
93207
  color: ${e=>e.theme.colors.important};
93216
93208
  padding: ${Space.sp2} ${Space.sp3} ${Space.sp3};
@@ -93311,9 +93303,9 @@ return jsxRuntimeExports.jsx(ListFill,{children:/* @__PURE__ */jsxRuntimeExports
93311
93303
  background: ${e=>e.theme.colors.grey5};
93312
93304
  border: 1px solid ${e=>e.theme.colors.grey2};
93313
93305
  border-radius: ${Space.sp2};
93314
- `,{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$2}}}=appLocale.getLocalizedStrings(),UNMATCHED_LIST_AMOUNT_FORMAT="0,0.[00]";function getVisualDateFormat(){return MMMDCommaYYYYformat$2}function formatUnmatchedListZeniDate(e){return e.format(getVisualDateFormat())}function formatUnmatchedListTransactionDate(e){if(null==e||""===String(e).trim())return"";const t=String(e).trim(),n=getVisualDateFormat(),o=zeniDate(t);return null!=o&&"function"==typeof o.isValid&&o.isValid()?o.format(n):t}function currencySymbolForListAmount(e){if(null==e||""===e)return"";if(!/^[A-Z]{3}$/.test(e))return e;try{const t=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0);return t.find(e=>"currency"===e.type)?.value??e}catch{return e}}function formatUnmatchedListAmount(e,t){return amountValueToString(UNMATCHED_LIST_AMOUNT_FORMAT,e,currencySymbolForListAmount(t))}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$3}}}=appLocale.getLocalizedStrings(),COLUMN_WIDTH_PX={date:sp[11]+sp[3],account:sp[12]+sp[11],debit:sp[12],credit:sp[12]},NUMERIC_COLUMNS=/* @__PURE__ */new Set(["debit","credit"]);function isMatchNewPreviewJeNumericColumn(e){return NUMERIC_COLUMNS.has(e)}function getMatchNewPreviewJeColumns(){const e=actualMatchingStrings$3.matchModal;return[{key:"date",value:e.columnDate,width:COLUMN_WIDTH_PX.date},{key:"account",value:e.columnAccount,width:COLUMN_WIDTH_PX.account},{key:"debit",value:e.columnDebit,width:COLUMN_WIDTH_PX.debit},{key:"credit",value:e.columnCredit,width:COLUMN_WIDTH_PX.credit}]}function buildMatchNewPreviewJeGridTemplate(e){return e.map(e=>isMatchNewPreviewJeNumericColumn(e.key)?`${e.width}px`:"account"===e.key?`minmax(${e.width}px, 1.4fr)`:`minmax(${e.width}px, 1fr)`).join(" ")}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$2}},common:{strings:{hyphen:hyphen$e},currency:currency$8}}=appLocale.getLocalizedStrings(),previewStrings$4=actualMatchingStrings$2.matchModal,TEST_ID_PREFIX$1="actual-matching-match-new",AMOUNT_FORMAT$1="0,0.[00]",MATCHED_AMOUNT_FORMAT="0,0.00";function formatMatchedAmount(e,t,n){const o=`${n||currency$8.currencySymbol}${numeral(Math.abs(e)).format(MATCHED_AMOUNT_FORMAT)}`;return e>=0||Math.abs(e)<.005?o:getShowNegativeAmountInParenthesisDefaultValue()?`(${o})`:`-${o}`}function formatAccrualAmount$1(e){return amountToString(AMOUNT_FORMAT$1,e.estimatedAmount)??formatUnmatchedListAmount(e.estimatedAmount.amount,e.estimatedAmount.currencySymbol??currency$8.currencySymbol)}function formatSignedAmount(e,t){return`${e>=0?"+":"−"}${formatUnmatchedListAmount(Math.abs(e),t)}`}function MatchNewPreview({selectedAccruals:e,selectedTransactions:t}){const n=t[0]??null;if(null==n||0===e.length)/* @__PURE__ */
93315
- return jsxRuntimeExports.jsx(EmptyPreview,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"preview-empty"),children:/* @__PURE__ */jsxRuntimeExports.jsx(EmptyPreviewCopy,{children:previewStrings$4.previewEmpty})});const o=sumAccruedAmount(e),i=t.reduce((e,t)=>e+t.amount,0),r=variancePercent(i,o),a=i-o,s=n.currencySymbol||currency$8.currencySymbol,l=formatUnmatchedListAmount(o,s),c=formatMatchedAmount(i,n.currencyCode,n.currencySymbol),d=null==r?void 0:getVarianceCapsuleType(r),p=formatUnmatchedListTransactionDate(n.transactionDate),u=""===p?hyphen$e:p,m=e.length>1,h=t.length>1;/* @__PURE__ */
93316
- return jsxRuntimeExports.jsxs(PreviewRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"preview"),children:[
93306
+ `,{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$2}}}=appLocale.getLocalizedStrings(),UNMATCHED_LIST_AMOUNT_FORMAT="0,0.[00]";function getVisualDateFormat(){return MMMDCommaYYYYformat$2}function formatUnmatchedListZeniDate(e){return e.format(getVisualDateFormat())}function formatUnmatchedListTransactionDate(e){if(null==e||""===String(e).trim())return"";const t=String(e).trim(),n=getVisualDateFormat(),o=zeniDate(t);return null!=o&&"function"==typeof o.isValid&&o.isValid()?o.format(n):t}function currencySymbolForListAmount(e){if(null==e||""===e)return"";if(!/^[A-Z]{3}$/.test(e))return e;try{const t=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0);return t.find(e=>"currency"===e.type)?.value??e}catch{return e}}function formatUnmatchedListAmount(e,t){return amountValueToString(UNMATCHED_LIST_AMOUNT_FORMAT,e,currencySymbolForListAmount(t))}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$3}}}=appLocale.getLocalizedStrings(),COLUMN_WIDTH_PX={date:sp[11]+sp[3],account:sp[12]+sp[11],debit:sp[12],credit:sp[12]},NUMERIC_COLUMNS=/* @__PURE__ */new Set(["debit","credit"]);function isMatchNewPreviewJeNumericColumn(e){return NUMERIC_COLUMNS.has(e)}function getMatchNewPreviewJeColumns(){const e=actualMatchingStrings$3.matchModal;return[{key:"date",value:e.columnDate,width:COLUMN_WIDTH_PX.date},{key:"account",value:e.columnAccount,width:COLUMN_WIDTH_PX.account},{key:"debit",value:e.columnDebit,width:COLUMN_WIDTH_PX.debit},{key:"credit",value:e.columnCredit,width:COLUMN_WIDTH_PX.credit}]}function buildMatchNewPreviewJeGridTemplate(e){return e.map(e=>isMatchNewPreviewJeNumericColumn(e.key)?`${e.width}px`:"account"===e.key?`minmax(${e.width}px, 1.4fr)`:`minmax(${e.width}px, 1fr)`).join(" ")}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$2}},common:{strings:{hyphen:hyphen$e},currency:currency$8}}=appLocale.getLocalizedStrings(),previewStrings$4=actualMatchingStrings$2.matchModal,TEST_ID_PREFIX$2="actual-matching-match-new",AMOUNT_FORMAT$1="0,0.[00]",MATCHED_AMOUNT_FORMAT="0,0.00";function formatMatchedAmount(e,t,n){const o=`${n||currency$8.currencySymbol}${numeral(Math.abs(e)).format(MATCHED_AMOUNT_FORMAT)}`;return e>=0||Math.abs(e)<.005?o:getShowNegativeAmountInParenthesisDefaultValue()?`(${o})`:`-${o}`}function formatAccrualAmount$1(e){return amountToString(AMOUNT_FORMAT$1,e.estimatedAmount)??formatUnmatchedListAmount(e.estimatedAmount.amount,e.estimatedAmount.currencySymbol??currency$8.currencySymbol)}function formatSignedAmount(e,t){return`${e>=0?"+":"−"}${formatUnmatchedListAmount(Math.abs(e),t)}`}function MatchNewPreview({selectedAccruals:e,selectedTransactions:t}){const n=t[0]??null;if(null==n||0===e.length)/* @__PURE__ */
93307
+ return jsxRuntimeExports.jsx(EmptyPreview,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"preview-empty"),children:/* @__PURE__ */jsxRuntimeExports.jsx(EmptyPreviewCopy,{children:previewStrings$4.previewEmpty})});const o=sumAccruedAmount(e),i=t.reduce((e,t)=>e+t.amount,0),r=variancePercent(i,o),a=i-o,s=n.currencySymbol||currency$8.currencySymbol,l=formatUnmatchedListAmount(o,s),c=formatMatchedAmount(i,n.currencyCode,n.currencySymbol),d=null==r?void 0:getVarianceCapsuleType(r),p=formatUnmatchedListTransactionDate(n.transactionDate),u=""===p?hyphen$e:p,m=e.length>1,h=t.length>1;/* @__PURE__ */
93308
+ return jsxRuntimeExports.jsxs(PreviewRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"preview"),children:[
93317
93309
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
93318
93310
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:m?previewStrings$4.accrualJeTitlePlural:previewStrings$4.accrualJeTitle}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock,{creditAccount:creditAccountName(e,previewStrings$4.accruedExpensesFallback),creditAmount:formatAccrualAmount$1(e),dateLabel:formatAccrualJeDate(e.serviceMonth,previewStrings$4.lastDayOfMonth),debitAccount:debitAccountName(e,hyphen$e),debitAmount:formatAccrualAmount$1(e),subtitle:`${e.vendorName} · ${formatServiceMonthLabel(e.serviceMonth)}`,testIdSuffix:`accrual-je-${e.accrualId}`},`accrual-je-${e.accrualId}`))]}),
93319
93311
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
@@ -93322,17 +93314,17 @@ return jsxRuntimeExports.jsxs(PreviewRoot,{"data-testid":generateDataTestId(TEST
93322
93314
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionNote,{children:previewStrings$4.reversalJeNote})]}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock,{creditAccount:debitAccountName(e,hyphen$e),creditAmount:formatAccrualAmount$1(e),dateLabel:u,debitAccount:creditAccountName(e,previewStrings$4.accruedExpensesFallback),debitAmount:formatAccrualAmount$1(e),subtitle:reversalJeGroupTitle(e),testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`))]}),
93323
93315
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
93324
93316
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:h?previewStrings$4.transactionsMatchedTitle:previewStrings$4.transactionMatchedTitle}),
93325
- /* @__PURE__ */jsxRuntimeExports.jsxs(MatchedLines,{children:[t.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(TxnMatchedRow,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`matched-line-${e.lineId}`),children:[
93317
+ /* @__PURE__ */jsxRuntimeExports.jsxs(MatchedLines,{children:[t.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(TxnMatchedRow,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,`matched-line-${e.lineId}`),children:[
93326
93318
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchedDate,{children:formatJeShortDate(e.transactionDate)}),
93327
93319
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchedName,{children:transactionMatchedLineCopy(e)}),
93328
93320
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchedAmount,{children:formatMatchedAmount(e.amount,e.currencyCode,e.currencySymbol)})]},`${e.transactionId}:${e.lineId}`)),
93329
- /* @__PURE__ */jsxRuntimeExports.jsxs(TotalCard,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"matched-total"),children:[
93321
+ /* @__PURE__ */jsxRuntimeExports.jsxs(TotalCard,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"matched-total"),children:[
93330
93322
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchedName,{children:previewStrings$4.matchedTotal}),
93331
93323
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchedAmount,{children:c})]})]}),
93332
- /* @__PURE__ */jsxRuntimeExports.jsxs(VarianceRow,{$tone:d,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"variance-row"),children:[
93324
+ /* @__PURE__ */jsxRuntimeExports.jsxs(VarianceRow,{$tone:d,"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"variance-row"),children:[
93333
93325
  /* @__PURE__ */jsxRuntimeExports.jsx(VarianceCopy,{children:previewStrings$4.vsAccrued.replace("{amount}",l)}),
93334
- /* @__PURE__ */jsxRuntimeExports.jsx(VarianceAmount,{children:formatSignedAmount(a,s)}),null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"variance"),label:formatVariancePercent(r),type:getVarianceCapsuleType(r)}):null]})]})]})}function previewJeCellValue(e,t){switch(e){case"date":return t.dateLabel;case"account":return t.account;case"credit":return t.credit;case"debit":return t.debit}}function JeBlock({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,subtitle:r,testIdSuffix:a}){const s=getMatchNewPreviewJeColumns(),l=s[0]?.key,c=s[s.length-1]?.key,d=[{account:o,credit:hyphen$e,dateLabel:n,debit:i},{account:e,credit:t,dateLabel:n,debit:hyphen$e}];/* @__PURE__ */
93335
- return jsxRuntimeExports.jsxs(JeGroup,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,a),children:[
93326
+ /* @__PURE__ */jsxRuntimeExports.jsx(VarianceAmount,{children:formatSignedAmount(a,s)}),null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{dataTestId:generateDataTestId(TEST_ID_PREFIX$2,"variance"),label:formatVariancePercent(r),type:getVarianceCapsuleType(r)}):null]})]})]})}function previewJeCellValue(e,t){switch(e){case"date":return t.dateLabel;case"account":return t.account;case"credit":return t.credit;case"debit":return t.debit}}function JeBlock({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,subtitle:r,testIdSuffix:a}){const s=getMatchNewPreviewJeColumns(),l=s[0]?.key,c=s[s.length-1]?.key,d=[{account:o,credit:hyphen$e,dateLabel:n,debit:i},{account:e,credit:t,dateLabel:n,debit:hyphen$e}];/* @__PURE__ */
93327
+ return jsxRuntimeExports.jsxs(JeGroup,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,a),children:[
93336
93328
  /* @__PURE__ */jsxRuntimeExports.jsx(JeSubtitle,{children:r}),
93337
93329
  /* @__PURE__ */jsxRuntimeExports.jsx(JeCard,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(JeTable,{$gridTemplateColumns:buildMatchNewPreviewJeGridTemplate(s),children:[s.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{$align:isMatchNewPreviewJeNumericColumn(e.key)?"right":void 0,$isFirst:e.key===l,$isLast:e.key===c,children:e.value},e.key)),d.map((e,t)=>s.map(n=>/* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{$align:isMatchNewPreviewJeNumericColumn(n.key)?"right":void 0,$isFirst:n.key===l,$isLast:n.key===c,$showTopBorder:t>0,children:previewJeCellValue(n.key,e)},`${t}-${n.key}`)))]})})]})}const PreviewRoot=styled$2.div`
93338
93330
  display: flex;
@@ -93490,29 +93482,29 @@ return jsxRuntimeExports.jsxs(JeGroup,{"data-testid":generateDataTestId(TEST_ID_
93490
93482
  flex-shrink: 0;
93491
93483
  color: ${e=>e.theme.colors.primary};
93492
93484
  font-variant-numeric: tabular-nums;
93493
- `,SvgNothingToMatchDark=e=>/* @__PURE__ */React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 104",fill:"none","xmlns:c2pa":"http://c2pa.org/manifest",...e},/* @__PURE__ */React.createElement("metadata",null,/* @__PURE__ */React.createElement("c2pa:manifest",null,"AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpiODlhOTc4OS0yMDJkLTQxNzYtYmNhMy0xZThhMzU1OWYzMGIAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaJ1sFql/L87TPGpkcu5mUZUAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo5M2QxODM0MC1hZGFhLTQ2YTYtOGEyZC1hYTBjNDhkZTc4N2RscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoYFbynM4U4Jtuz/uK7+GVkAAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggipNRQuBrc19VsQZCGZtbrwqMu4lgWs3wSNmwVqixYsGkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaH4W2w/9B64mRGXvIO8aLKsAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRNAAAAAAAAAAAAAAAAAGRoYXNoWCBy8CWAfeFm/4J21pD8An8PjJxeDPKD5+zM5eCHNhkEIWRuYW1lbmp1bWJmIG1hbmlmZXN0amV4Y2x1c2lvbnOBomVzdGFydBiiZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmI4OWE5Nzg5LTIwMmQtNDE3Ni1iY2EzLTFlOGEzNTU5ZjMwYi9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjY2N2Q3Y2VhLTRmZWEtNDA4NC05MTQ4LTdlNjVmNDQxZjljYXJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCCKk1FC4GtzX1WxBkIZm1uvCoy7iWBazfBI2bBWqLFiwaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggsfXywzw4Y61ztpNkCVc5jU7uDN+n+4GkW8ksnrYg56yiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggxh6IN81f8NKPDhuIq6C3uTtvCsjwyIBQ4hEzZaNE07l0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAsPtsDX8hRqiUshstO8YwUw1Lz4bqlJGmGwfT8VVuCpi3nUo6zOUxbesPpxYgd4oBelkfGru9Yej3VXkFRP/FI=")),/* @__PURE__ */React.createElement("g",{transform:"rotate(-4 80 52)"},/* @__PURE__ */React.createElement("rect",{x:12,y:24,width:140,height:56,rx:8,fill:"#2C2F2F",stroke:"#545B5C"}),/* @__PURE__ */React.createElement("rect",{x:24,y:36,width:32,height:32,rx:6,fill:"#3E4343"}),/* @__PURE__ */React.createElement("path",{d:"M35 45h6l4 4v10h-10z M41 45v4h4 M38 53h4 M38 56h4",stroke:"#D4DBDB",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:68,y:45,width:68,height:6,rx:3,fill:"#3E4343"}),/* @__PURE__ */React.createElement("rect",{x:68,y:57,width:40,height:6,rx:3,fill:"#3E4343"})),/* @__PURE__ */React.createElement("g",{transform:"rotate(4 240 52)"},/* @__PURE__ */React.createElement("rect",{x:168,y:24,width:140,height:56,rx:8,fill:"#2C2F2F",stroke:"#545B5C"}),/* @__PURE__ */React.createElement("rect",{x:180,y:36,width:32,height:32,rx:6,fill:"#3E4343"}),/* @__PURE__ */React.createElement("path",{d:"M190 46h12v11h-12z M190 50h12 M193 44v3 M199 44v3",stroke:"#D4DBDB",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:224,y:45,width:68,height:6,rx:3,fill:"#3E4343"}),/* @__PURE__ */React.createElement("rect",{x:224,y:57,width:40,height:6,rx:3,fill:"#3E4343"})),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:20,fill:"#2C2F2F"}),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:16,fill:"#97C3B9"}),/* @__PURE__ */React.createElement("path",{d:"M153 52.5l4.5 4.5 9-9",stroke:"#FAFAFA",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),SvgNothingToMatchLight=e=>/* @__PURE__ */React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 104",fill:"none","xmlns:c2pa":"http://c2pa.org/manifest",...e},/* @__PURE__ */React.createElement("metadata",null,/* @__PURE__ */React.createElement("c2pa:manifest",null,"AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTplMTc3MDUzNC1lOTdiLTRjZGMtOTE5MS1lZjAwMzVjNTA0NjUAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaHE7vENrw4A2VhyAtgM0RAYAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDphZmQ0N2IzMy02MWQwLTQxNWItYTI3OS1lYjNlZmM2OWY0MzFscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoiNTu1DPPlvt69iQchK0c2QAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFgglBChhxc+M9KaFx8UaD5ma3lRu4FUwdeWw+tf+DLekcWkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaPFoSVXWKQp374LZfh0eF6kAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRNAAAAAAAAAAAAAAAAAGRoYXNoWCDn0910KScDN5727SB9unV5hS7ISHQjkxu/qRJUk0XIoWRuYW1lbmp1bWJmIG1hbmlmZXN0amV4Y2x1c2lvbnOBomVzdGFydBiiZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmUxNzcwNTM0LWU5N2ItNGNkYy05MTkxLWVmMDAzNWM1MDQ2NS9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjM5NDE5NzYzLWMyNjAtNDA5OC1iZTM1LTExMGZhMGM4OWE0Y3JjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCCUEKGHFz4z0poXHxRoPmZreVG7gVTB15bD61/4Mt6RxaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggxRSde6W484/IOzNUlm3HsHV06gwFFKAHlvzT1wb0zJeiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggoWF4gpygRG3KWJsRbxsrQUPwxHUMfo7sd4ULbZP+I0J0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQHQy2siEMQ7cWU/vqHPF8/G+gbg6EFmclcq4+VZDl7dQdiyvDgcO869PKGfgUSpwYQkhSAMyajMJwlepuuoI5Zc=")),/* @__PURE__ */React.createElement("g",{transform:"rotate(-4 80 52)"},/* @__PURE__ */React.createElement("rect",{x:12,y:24,width:140,height:56,rx:8,fill:"#FFFFFF",stroke:"#D4DCDD"}),/* @__PURE__ */React.createElement("rect",{x:24,y:36,width:32,height:32,rx:6,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M35 45h6l4 4v10h-10z M41 45v4h4 M38 53h4 M38 56h4",stroke:"#4B5253",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:68,y:45,width:68,height:6,rx:3,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("rect",{x:68,y:57,width:40,height:6,rx:3,fill:"#E9F0F0"})),/* @__PURE__ */React.createElement("g",{transform:"rotate(4 240 52)"},/* @__PURE__ */React.createElement("rect",{x:168,y:24,width:140,height:56,rx:8,fill:"#FFFFFF",stroke:"#D4DCDD"}),/* @__PURE__ */React.createElement("rect",{x:180,y:36,width:32,height:32,rx:6,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M190 46h12v11h-12z M190 50h12 M193 44v3 M199 44v3",stroke:"#4B5253",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:224,y:45,width:68,height:6,rx:3,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("rect",{x:224,y:57,width:40,height:6,rx:3,fill:"#E9F0F0"})),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:20,fill:"#FFFFFF"}),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:16,fill:"#97C3B9"}),/* @__PURE__ */React.createElement("path",{d:"M153 52.5l4.5 4.5 9-9",stroke:"#162324",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$1}},common:{cancel:cancel$1,close:close,strings:{hyphen:hyphen$d},currency:currency$7}}=appLocale.getLocalizedStrings(),TEST_ID_PREFIX="actual-matching-match-new",SET_VALUE_OPTS={shouldDirty:!0,shouldTouch:!0},MATCH_NEW_DRAWER_WIDTH=new ResponsiveSized(100,100,55),modalStrings=actualMatchingStrings$1.matchModal;function formatPaneCount(e){return modalStrings.selectedCount.replace("{count}",String(e))}function MatchNewModal({initialFormValues:e,matchModal:t,onClearMatchNewModal:n,onCloseMatchNewModal:o,onMatchAndReverse:i,onSearchMatchAccruals:r,onSearchMatchTransactions:a}){const s=useTheme(),l=useWindowSizeContext(),c=useForm({mode:"all",defaultValues:{selectedTransactionLines:[],selectedAccrualIds:[],...e}}),d=c.watch("selectedTransactionLines")??[],p=c.watch("selectedAccrualIds")??[],u=t.transactionSearch.results,m=t.accrualSearch.results,h="In-Progress"===t.confirmStatus.fetchState,g=useMemo(()=>new Set(u.map(e=>getTransactionLineKey(e.transactionId,e.lineId))),[u]),x=useMemo(()=>new Set(m.map(e=>e.accrualId)),[m]);useEffect(()=>{const e=c.getValues("selectedTransactionLines")??[],n=c.getValues("selectedAccrualIds")??[],o=pruneSelectionToVisibleResults(e,g,t.transactionSearch.fetchState.fetchState);o.length!==e.length&&c.setValue("selectedTransactionLines",o,SET_VALUE_OPTS);const i=pruneSelectionToVisibleResults(n,x,t.accrualSearch.fetchState.fetchState);i.length!==n.length&&c.setValue("selectedAccrualIds",i,SET_VALUE_OPTS)},[c,t.accrualSearch.fetchState.fetchState,t.transactionSearch.fetchState.fetchState,g,x]);const f=d.filter(e=>g.has(e)).map(e=>u.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)??null).filter(e=>null!=e),y=f[0]??null;useEffect(()=>{if(null==y)return;const e=c.getValues("selectedAccrualIds")??[],t=e.filter(e=>{const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(y,t)});t.length!==e.length&&c.setValue("selectedAccrualIds",t,SET_VALUE_OPTS)},[c,m,y]),useEffect(()=>{t.isOpen||c.reset({selectedTransactionLines:[],selectedAccrualIds:[]})},[c,t.isOpen]);const S=p.filter(e=>{if(!x.has(e))return!1;if(null==y)return!0;const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(y,t)}),C=S.map(e=>m.find(t=>t.accrualId===e)).filter(e=>null!=e),$=f.length>0&&C.length>=1,b=$&&!h,v=useCallback(()=>{c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}),o(),n()},[c,n,o]),A=e=>{if(h)return;const t=c.getValues("selectedTransactionLines")??[];c.setValue("selectedTransactionLines",nextSelectedTransactionLines(t,e,u),SET_VALUE_OPTS)},E=()=>{if(h)return;const e=c.getValues(),t=(e.selectedTransactionLines??[]).map(e=>u.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)).filter(e=>null!=e&&!isPendingReviewSearchRow(e)),n=t[0],o=(e.selectedAccrualIds??[]).filter(e=>{if(!x.has(e))return!1;if(null==n)return!1;const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(n,t)});null!=n&&0!==t.length&&0!==o.length&&i({transactionId:n.transactionId,transactionIntegrationId:n.transactionIntegrationId,transactionType:n.transactionType,lineIds:t.map(e=>e.lineId),transactionSyncToken:n.syncToken,accrualIds:o})},w=f.length,R=modalStrings.emptyRight,j="Completed"===t.accrualSearch.fetchState.fetchState&&""===t.accrualSearch.query.trim()&&0===m.length,T=groupTransactionSearchResults(u);/* @__PURE__ */
93485
+ `,SvgNothingToMatchDark=e=>/* @__PURE__ */React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 104",fill:"none","xmlns:c2pa":"http://c2pa.org/manifest",...e},/* @__PURE__ */React.createElement("metadata",null,/* @__PURE__ */React.createElement("c2pa:manifest",null,"AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpiODlhOTc4OS0yMDJkLTQxNzYtYmNhMy0xZThhMzU1OWYzMGIAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaJ1sFql/L87TPGpkcu5mUZUAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo5M2QxODM0MC1hZGFhLTQ2YTYtOGEyZC1hYTBjNDhkZTc4N2RscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoYFbynM4U4Jtuz/uK7+GVkAAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggipNRQuBrc19VsQZCGZtbrwqMu4lgWs3wSNmwVqixYsGkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaH4W2w/9B64mRGXvIO8aLKsAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRNAAAAAAAAAAAAAAAAAGRoYXNoWCBy8CWAfeFm/4J21pD8An8PjJxeDPKD5+zM5eCHNhkEIWRuYW1lbmp1bWJmIG1hbmlmZXN0amV4Y2x1c2lvbnOBomVzdGFydBiiZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmI4OWE5Nzg5LTIwMmQtNDE3Ni1iY2EzLTFlOGEzNTU5ZjMwYi9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjY2N2Q3Y2VhLTRmZWEtNDA4NC05MTQ4LTdlNjVmNDQxZjljYXJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCCKk1FC4GtzX1WxBkIZm1uvCoy7iWBazfBI2bBWqLFiwaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggsfXywzw4Y61ztpNkCVc5jU7uDN+n+4GkW8ksnrYg56yiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggxh6IN81f8NKPDhuIq6C3uTtvCsjwyIBQ4hEzZaNE07l0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAsPtsDX8hRqiUshstO8YwUw1Lz4bqlJGmGwfT8VVuCpi3nUo6zOUxbesPpxYgd4oBelkfGru9Yej3VXkFRP/FI=")),/* @__PURE__ */React.createElement("g",{transform:"rotate(-4 80 52)"},/* @__PURE__ */React.createElement("rect",{x:12,y:24,width:140,height:56,rx:8,fill:"#2C2F2F",stroke:"#545B5C"}),/* @__PURE__ */React.createElement("rect",{x:24,y:36,width:32,height:32,rx:6,fill:"#3E4343"}),/* @__PURE__ */React.createElement("path",{d:"M35 45h6l4 4v10h-10z M41 45v4h4 M38 53h4 M38 56h4",stroke:"#D4DBDB",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:68,y:45,width:68,height:6,rx:3,fill:"#3E4343"}),/* @__PURE__ */React.createElement("rect",{x:68,y:57,width:40,height:6,rx:3,fill:"#3E4343"})),/* @__PURE__ */React.createElement("g",{transform:"rotate(4 240 52)"},/* @__PURE__ */React.createElement("rect",{x:168,y:24,width:140,height:56,rx:8,fill:"#2C2F2F",stroke:"#545B5C"}),/* @__PURE__ */React.createElement("rect",{x:180,y:36,width:32,height:32,rx:6,fill:"#3E4343"}),/* @__PURE__ */React.createElement("path",{d:"M190 46h12v11h-12z M190 50h12 M193 44v3 M199 44v3",stroke:"#D4DBDB",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:224,y:45,width:68,height:6,rx:3,fill:"#3E4343"}),/* @__PURE__ */React.createElement("rect",{x:224,y:57,width:40,height:6,rx:3,fill:"#3E4343"})),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:20,fill:"#2C2F2F"}),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:16,fill:"#97C3B9"}),/* @__PURE__ */React.createElement("path",{d:"M153 52.5l4.5 4.5 9-9",stroke:"#FAFAFA",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),SvgNothingToMatchLight=e=>/* @__PURE__ */React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 104",fill:"none","xmlns:c2pa":"http://c2pa.org/manifest",...e},/* @__PURE__ */React.createElement("metadata",null,/* @__PURE__ */React.createElement("c2pa:manifest",null,"AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTplMTc3MDUzNC1lOTdiLTRjZGMtOTE5MS1lZjAwMzVjNTA0NjUAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaHE7vENrw4A2VhyAtgM0RAYAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDphZmQ0N2IzMy02MWQwLTQxNWItYTI3OS1lYjNlZmM2OWY0MzFscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoiNTu1DPPlvt69iQchK0c2QAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFgglBChhxc+M9KaFx8UaD5ma3lRu4FUwdeWw+tf+DLekcWkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaPFoSVXWKQp374LZfh0eF6kAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRNAAAAAAAAAAAAAAAAAGRoYXNoWCDn0910KScDN5727SB9unV5hS7ISHQjkxu/qRJUk0XIoWRuYW1lbmp1bWJmIG1hbmlmZXN0amV4Y2x1c2lvbnOBomVzdGFydBiiZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmUxNzcwNTM0LWU5N2ItNGNkYy05MTkxLWVmMDAzNWM1MDQ2NS9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjM5NDE5NzYzLWMyNjAtNDA5OC1iZTM1LTExMGZhMGM4OWE0Y3JjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCCUEKGHFz4z0poXHxRoPmZreVG7gVTB15bD61/4Mt6RxaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggxRSde6W484/IOzNUlm3HsHV06gwFFKAHlvzT1wb0zJeiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggoWF4gpygRG3KWJsRbxsrQUPwxHUMfo7sd4ULbZP+I0J0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQHQy2siEMQ7cWU/vqHPF8/G+gbg6EFmclcq4+VZDl7dQdiyvDgcO869PKGfgUSpwYQkhSAMyajMJwlepuuoI5Zc=")),/* @__PURE__ */React.createElement("g",{transform:"rotate(-4 80 52)"},/* @__PURE__ */React.createElement("rect",{x:12,y:24,width:140,height:56,rx:8,fill:"#FFFFFF",stroke:"#D4DCDD"}),/* @__PURE__ */React.createElement("rect",{x:24,y:36,width:32,height:32,rx:6,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M35 45h6l4 4v10h-10z M41 45v4h4 M38 53h4 M38 56h4",stroke:"#4B5253",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:68,y:45,width:68,height:6,rx:3,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("rect",{x:68,y:57,width:40,height:6,rx:3,fill:"#E9F0F0"})),/* @__PURE__ */React.createElement("g",{transform:"rotate(4 240 52)"},/* @__PURE__ */React.createElement("rect",{x:168,y:24,width:140,height:56,rx:8,fill:"#FFFFFF",stroke:"#D4DCDD"}),/* @__PURE__ */React.createElement("rect",{x:180,y:36,width:32,height:32,rx:6,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("path",{d:"M190 46h12v11h-12z M190 50h12 M193 44v3 M199 44v3",stroke:"#4B5253",strokeWidth:1.4,strokeLinejoin:"round",strokeLinecap:"round"}),/* @__PURE__ */React.createElement("rect",{x:224,y:45,width:68,height:6,rx:3,fill:"#E9F0F0"}),/* @__PURE__ */React.createElement("rect",{x:224,y:57,width:40,height:6,rx:3,fill:"#E9F0F0"})),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:20,fill:"#FFFFFF"}),/* @__PURE__ */React.createElement("circle",{cx:160,cy:52,r:16,fill:"#97C3B9"}),/* @__PURE__ */React.createElement("path",{d:"M153 52.5l4.5 4.5 9-9",stroke:"#162324",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$1}},common:{cancel:cancel$1,close:close,strings:{hyphen:hyphen$d},currency:currency$7}}=appLocale.getLocalizedStrings(),TEST_ID_PREFIX$1="actual-matching-match-new",SET_VALUE_OPTS={shouldDirty:!0,shouldTouch:!0},MATCH_NEW_DRAWER_WIDTH=new ResponsiveSized(100,100,55),modalStrings=actualMatchingStrings$1.matchModal;function formatPaneCount(e){return modalStrings.selectedCount.replace("{count}",String(e))}function MatchNewModal({initialFormValues:e,matchModal:t,onClearMatchNewModal:n,onCloseMatchNewModal:o,onMatchAndReverse:i,onSearchMatchAccruals:r,onSearchMatchTransactions:a}){const s=useTheme(),l=useWindowSizeContext(),c=useForm({mode:"all",defaultValues:{selectedTransactionLines:[],selectedAccrualIds:[],...e}}),d=c.watch("selectedTransactionLines")??[],p=c.watch("selectedAccrualIds")??[],u=t.transactionSearch.results,m=t.accrualSearch.results,h="In-Progress"===t.confirmStatus.fetchState,g=useMemo(()=>new Set(u.map(e=>getTransactionLineKey(e.transactionId,e.lineId))),[u]),x=useMemo(()=>new Set(m.map(e=>e.accrualId)),[m]);useEffect(()=>{const e=c.getValues("selectedTransactionLines")??[],n=c.getValues("selectedAccrualIds")??[],o=pruneSelectionToVisibleResults(e,g,t.transactionSearch.fetchState.fetchState);o.length!==e.length&&c.setValue("selectedTransactionLines",o,SET_VALUE_OPTS);const i=pruneSelectionToVisibleResults(n,x,t.accrualSearch.fetchState.fetchState);i.length!==n.length&&c.setValue("selectedAccrualIds",i,SET_VALUE_OPTS)},[c,t.accrualSearch.fetchState.fetchState,t.transactionSearch.fetchState.fetchState,g,x]);const f=d.filter(e=>g.has(e)).map(e=>u.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)??null).filter(e=>null!=e),y=f[0]??null;useEffect(()=>{if(null==y)return;const e=c.getValues("selectedAccrualIds")??[],t=e.filter(e=>{const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(y,t)});t.length!==e.length&&c.setValue("selectedAccrualIds",t,SET_VALUE_OPTS)},[c,m,y]),useEffect(()=>{t.isOpen||c.reset({selectedTransactionLines:[],selectedAccrualIds:[]})},[c,t.isOpen]);const S=p.filter(e=>{if(!x.has(e))return!1;if(null==y)return!0;const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(y,t)}),C=S.map(e=>m.find(t=>t.accrualId===e)).filter(e=>null!=e),$=f.length>0&&C.length>=1,b=$&&!h,v=useCallback(()=>{c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}),o(),n()},[c,n,o]),A=e=>{if(h)return;const t=c.getValues("selectedTransactionLines")??[];c.setValue("selectedTransactionLines",nextSelectedTransactionLines(t,e,u),SET_VALUE_OPTS)},E=()=>{if(h)return;const e=c.getValues(),t=(e.selectedTransactionLines??[]).map(e=>u.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)).filter(e=>null!=e&&!isPendingReviewSearchRow(e)),n=t[0],o=(e.selectedAccrualIds??[]).filter(e=>{if(!x.has(e))return!1;if(null==n)return!1;const t=m.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(n,t)});null!=n&&0!==t.length&&0!==o.length&&i({transactionId:n.transactionId,transactionIntegrationId:n.transactionIntegrationId,transactionType:n.transactionType,lineIds:t.map(e=>e.lineId),transactionSyncToken:n.syncToken,accrualIds:o})},w=f.length,R=modalStrings.emptyRight,j="Completed"===t.accrualSearch.fetchState.fetchState&&""===t.accrualSearch.query.trim()&&0===m.length,T=groupTransactionSearchResults(u);/* @__PURE__ */
93494
93486
  return jsxRuntimeExports.jsx(Drawer,{anchor:"right",open:t.isOpen,PaperProps:{role:"dialog",style:{width:MATCH_NEW_DRAWER_WIDTH.valuePercentage(l),height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column",boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:v,children:/* @__PURE__ */jsxRuntimeExports.jsx(FormProvider,{...c,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Panel,{id:MATCH_NEW_FORM,onSubmit:e=>{e.preventDefault(),E()},children:[
93495
93487
  /* @__PURE__ */jsxRuntimeExports.jsxs(Header$5,{children:[
93496
93488
  /* @__PURE__ */jsxRuntimeExports.jsx(TitleBlock$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(PanelTitle,{children:modalStrings.title})}),
93497
- /* @__PURE__ */jsxRuntimeExports.jsx(CloseIconButton$2,{"aria-label":close,"data-testid":generateDataTestId(TEST_ID_PREFIX,"close"),type:"button",onClick:v,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$c,{})})]}),
93489
+ /* @__PURE__ */jsxRuntimeExports.jsx(CloseIconButton$2,{"aria-label":close,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"close"),type:"button",onClick:v,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$c,{})})]}),
93498
93490
  /* @__PURE__ */jsxRuntimeExports.jsx(DrawerBody,{children:j?/* @__PURE__ */jsxRuntimeExports.jsx(NoAccrualsScreen,{}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93499
93491
  /* @__PURE__ */jsxRuntimeExports.jsx(PanelSubtitle,{children:modalStrings.subtitle}),
93500
93492
  /* @__PURE__ */jsxRuntimeExports.jsxs(Panes,{$isExpanded:!$,children:[
93501
93493
  /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{isExpanded:!$,emptyText:modalStrings.emptyLeft,isLoading:"In-Progress"===t.transactionSearch.fetchState.fetchState,searchPlaceholder:modalStrings.leftSearchPlaceholder,searchValue:t.transactionSearch.query,selectedCount:w,testIdSuffix:"transactions",title:modalStrings.leftTitle,onSearchChange:a,children:T.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(TransactionMatchGroup,{group:e,isConfirmInFlight:h,selectedKeys:d,onSelectGroup:()=>(e=>{if(h||0===e.length)return;const t=c.getValues("selectedTransactionLines")??[];c.setValue("selectedTransactionLines",nextSelectedTransactionGroup(t,e),SET_VALUE_OPTS)})(e),onSelectLine:A},transactionGroupKey(e[0])))}),
93502
93494
  /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{isExpanded:!$,emptyText:R,isLoading:"In-Progress"===t.accrualSearch.fetchState.fetchState,searchPlaceholder:modalStrings.rightSearchPlaceholder,searchValue:t.accrualSearch.query,selectedCount:S.length,testIdSuffix:"accruals",title:modalStrings.rightTitle,onSearchChange:r,children:m.map(e=>{const t=null!=y&&!isSameMatchVendor(y,e);/* @__PURE__ */
93503
93495
  return jsxRuntimeExports.jsx(AccrualMatchRow,{isDisabled:h||t,isSelected:p.includes(e.accrualId),row:e,vendorLockReason:t?modalStrings.vendorLock:void 0,onToggle:()=>(e=>{if(h)return;if(null!=y){const t=m.find(t=>t.accrualId===e);if(null==t||!isSameMatchVendor(y,t))return}const t=c.getValues("selectedAccrualIds")??[];t.includes(e)?c.setValue("selectedAccrualIds",t.filter(t=>t!==e),SET_VALUE_OPTS):t.length>=MATCH_ACCRUAL_SELECTION_CAP||c.setValue("selectedAccrualIds",[...t,e],SET_VALUE_OPTS)})(e.accrualId)},e.accrualId)})})]}),
93504
- /* @__PURE__ */jsxRuntimeExports.jsx(PreviewSlot,{$isReady:$,children:/* @__PURE__ */jsxRuntimeExports.jsx(MatchNewPreview,{selectedAccruals:C,selectedTransactions:f})})]})}),j?/* @__PURE__ */jsxRuntimeExports.jsx(DialogActions$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX,"go-back"),label:modalStrings.goBack,size:"standard",style:{minWidth:120},type:"button",variant:"outline",onClick:v})}):/* @__PURE__ */jsxRuntimeExports.jsx(DialogActions$1,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(FooterCtas,{children:[
93505
- /* @__PURE__ */jsxRuntimeExports.jsx(FooterButton,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX,"cancel"),label:cancel$1,type:"button",variant:"outline",onClick:v})}),
93506
- /* @__PURE__ */jsxRuntimeExports.jsx(FooterButton,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX,"confirm"),disabled:!b,label:modalStrings.confirm,loading:h,type:"button",variant:"primary",onClick:()=>E()})})]})})]})})})}function MatchPane({children:e,emptyText:t,isExpanded:n,isLoading:o,searchPlaceholder:i,searchValue:r,selectedCount:a,testIdSuffix:s,title:l,onSearchChange:c}){const[d,p]=useState(r);useEffect(()=>{p(r)},[r]);const u=Array.isArray(e)?e.length:0;/* @__PURE__ */
93496
+ /* @__PURE__ */jsxRuntimeExports.jsx(PreviewSlot,{$isReady:$,children:/* @__PURE__ */jsxRuntimeExports.jsx(MatchNewPreview,{selectedAccruals:C,selectedTransactions:f})})]})}),j?/* @__PURE__ */jsxRuntimeExports.jsx(DialogActions$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"go-back"),label:modalStrings.goBack,size:"standard",style:{minWidth:120},type:"button",variant:"outline",onClick:v})}):/* @__PURE__ */jsxRuntimeExports.jsx(DialogActions$1,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(FooterCtas,{children:[
93497
+ /* @__PURE__ */jsxRuntimeExports.jsx(FooterButton,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"cancel"),label:cancel$1,type:"button",variant:"outline",onClick:v})}),
93498
+ /* @__PURE__ */jsxRuntimeExports.jsx(FooterButton,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$3,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"confirm"),disabled:!b,label:modalStrings.confirm,loading:h,type:"button",variant:"primary",onClick:()=>E()})})]})})]})})})}function MatchPane({children:e,emptyText:t,isExpanded:n,isLoading:o,searchPlaceholder:i,searchValue:r,selectedCount:a,testIdSuffix:s,title:l,onSearchChange:c}){const[d,p]=useState(r);useEffect(()=>{p(r)},[r]);const u=Array.isArray(e)?e.length:0;/* @__PURE__ */
93507
93499
  return jsxRuntimeExports.jsxs(Pane,{$isExpanded:n,children:[
93508
93500
  /* @__PURE__ */jsxRuntimeExports.jsxs(PaneHeader,{children:[
93509
93501
  /* @__PURE__ */jsxRuntimeExports.jsx(LargeSemiBold,{children:l}),
93510
93502
  /* @__PURE__ */jsxRuntimeExports.jsx(PaneSelectedCount,{children:formatPaneCount(a)})]}),
93511
93503
  /* @__PURE__ */jsxRuntimeExports.jsxs(SearchRow,{children:[
93512
93504
  /* @__PURE__ */jsxRuntimeExports.jsx(PaneSearchIcon,{}),
93513
- /* @__PURE__ */jsxRuntimeExports.jsx(SearchInput$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`search-${s}`),placeholder:i,value:d,onChange:e=>{const t=e.target.value;p(t),c(t)}})]}),
93505
+ /* @__PURE__ */jsxRuntimeExports.jsx(SearchInput$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`search-${s}`),placeholder:i,value:d,onChange:e=>{const t=e.target.value;p(t),c(t)}})]}),
93514
93506
  /* @__PURE__ */jsxRuntimeExports.jsx(ScrollableRows,{children:o?/* @__PURE__ */jsxRuntimeExports.jsx(MatchPaneLoader,{testIdSuffix:s}):0===u?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyPaneText,{children:/* @__PURE__ */jsxRuntimeExports.jsx(SmallMedium,{children:t})}):e})]})}const MATCH_PANE_LOADER_ROW_COUNT=3;function MatchPaneLoader({testIdSuffix:e}){/* @__PURE__ */
93515
- return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`loader-${e}`),children:Array.from({length:MATCH_PANE_LOADER_ROW_COUNT},(e,t)=>/* @__PURE__ */jsxRuntimeExports.jsxs(LoaderRow,{children:[
93507
+ return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`loader-${e}`),children:Array.from({length:MATCH_PANE_LOADER_ROW_COUNT},(e,t)=>/* @__PURE__ */jsxRuntimeExports.jsxs(LoaderRow,{children:[
93516
93508
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{height:16,width:16}),
93517
93509
  /* @__PURE__ */jsxRuntimeExports.jsx(CircularContentLoader,{height:24,width:24}),
93518
93510
  /* @__PURE__ */jsxRuntimeExports.jsxs(LoaderTexts,{children:[
@@ -93521,14 +93513,14 @@ return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_I
93521
93513
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{height:14,width:48})]},t))})}const noop=()=>{};function DisplayRadio({checked:e,name:t}){/* @__PURE__ */
93522
93514
  return jsxRuntimeExports.jsx(CheckCell,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TxnRadio,{"aria-checked":e,checked:e,name:t,readOnly:!0,type:"radio",onChange:noop})})}function DisplayCheckBox({checked:e,name:t}){/* @__PURE__ */
93523
93515
  return jsxRuntimeExports.jsx(CheckCell,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCheckBox$1,{checkBoxStyle:{backgroundColor:"transparent"},checkBoxValue:t,isDisabled:"readonly",name:t,value:e,onChange:()=>{}})})}function formatSearchAmount(e,t,n){return amountToString("0,0.[00]",{amount:e,currencySymbol:n||currency$7.currencySymbol})??formatUnmatchedListAmount(e,n||currency$7.currencySymbol)}function NoAccrualsScreen(){const e="dark"===useTheme().mode?SvgNothingToMatchDark:SvgNothingToMatchLight;/* @__PURE__ */
93524
- return jsxRuntimeExports.jsxs(NoAccrualsBox,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"no-accruals"),children:[
93516
+ return jsxRuntimeExports.jsxs(NoAccrualsBox,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"no-accruals"),children:[
93525
93517
  /* @__PURE__ */jsxRuntimeExports.jsx(e,{"aria-hidden":"true",width:320,height:104}),
93526
93518
  /* @__PURE__ */jsxRuntimeExports.jsxs(NoAccrualsCopy,{children:[
93527
93519
  /* @__PURE__ */jsxRuntimeExports.jsx(NoAccrualsTitle,{children:modalStrings.noAccrualsLeft}),
93528
93520
  /* @__PURE__ */jsxRuntimeExports.jsx(NoAccrualsSubtitle,{children:modalStrings.noAccrualsLeftSubtitle})]})]})}const PENDING_REVIEW_STATUS="pending_review";function isPendingReviewSearchRow(e){return e.categorizationStatus===PENDING_REVIEW_STATUS}function PendingReviewMark({inCheckSlot:e=!1,title:t}){const n=/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewIcon,{"aria-label":t});/* @__PURE__ */
93529
93521
  return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:e?"flex":"block",placement:"bottom",style:e?{width:Space.sp5,height:Space.sp5}:{width:"fit-content"},title:t,children:e?/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewCell,{children:n}):n})}function TransactionMatchGroup({group:e,isConfirmInFlight:t,selectedKeys:n,onSelectGroup:o,onSelectLine:i}){const r=e[0],a=e.map(e=>getTransactionLineKey(e.transactionId,e.lineId)),s=e.filter(e=>!isPendingReviewSearchRow(e)).map(e=>getTransactionLineKey(e.transactionId,e.lineId)),l=s.filter(e=>n.includes(e)).length,c=s.length>0&&l===s.length,d=e.filter(isPendingReviewSearchRow).length,p=d>0,u=p&&0===s.length,m=t||u;if(1===e.length)/* @__PURE__ */
93530
93522
  return jsxRuntimeExports.jsx(TransactionMatchRow,{isDisabled:t,isSelected:1===l,row:r,onSelect:()=>i(a[0])});const h=partialLineSelectionLabel(l,s.length,modalStrings.linesSelected),g=matchableGroupAmount(e);/* @__PURE__ */
93531
- return jsxRuntimeExports.jsxs(GroupCard,{"aria-disabled":m,"data-testid":generateDataTestId(TEST_ID_PREFIX,`txn-group-${transactionGroupKey(r)}`),$isDisabled:m,children:[
93523
+ return jsxRuntimeExports.jsxs(GroupCard,{"aria-disabled":m,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`txn-group-${transactionGroupKey(r)}`),$isDisabled:m,children:[
93532
93524
  /* @__PURE__ */jsxRuntimeExports.jsxs(GroupLine,{$isDisabled:m,$isSelected:c,onClick:m?void 0:o,children:[
93533
93525
  /* @__PURE__ */jsxRuntimeExports.jsx(DisplayRadio,{checked:l>0,name:`txn-group-${transactionGroupKey(r)}`}),
93534
93526
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAvatar,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:r.vendorName})}),
@@ -93538,11 +93530,11 @@ return jsxRuntimeExports.jsxs(GroupCard,{"aria-disabled":m,"data-testid":generat
93538
93530
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:formatTransactionTypeLabel(r.transactionType),style:{flexShrink:0},type:"info"}),p?/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewMark,{title:u?modalStrings.pendingReview:pendingReviewGroupTooltip(d,modalStrings.pendingReviewLine,modalStrings.pendingReviewLines)}):null]}),
93539
93531
  /* @__PURE__ */jsxRuntimeExports.jsx(GroupMeta,{dateLabel:formatUnmatchedListTransactionDate(r.transactionDate),isSelected:c,memo:r.transactionMemo??"",partialLabel:h})]}),
93540
93532
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAmount,{children:formatSearchAmount(g,r.currencyCode,r.currencySymbol)})]}),e.map(e=>{const o=getTransactionLineKey(e.transactionId,e.lineId),r=n.includes(o),a=isPendingReviewSearchRow(e),s=t||a;/* @__PURE__ */
93541
- return jsxRuntimeExports.jsxs(GroupLine,{"aria-disabled":s,"data-testid":generateDataTestId(TEST_ID_PREFIX,`txn-row-${o}`),$isChild:!0,$isDisabled:s,$isMuted:a&&!m,$isSelected:r,onClick:s?void 0:e=>{e.stopPropagation(),i(o)},children:[a&&!u?/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewMark,{inCheckSlot:!0,title:modalStrings.pendingReview}):/* @__PURE__ */jsxRuntimeExports.jsx(DisplayCheckBox,{checked:r,name:`txn-select-${o}`}),
93533
+ return jsxRuntimeExports.jsxs(GroupLine,{"aria-disabled":s,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`txn-row-${o}`),$isChild:!0,$isDisabled:s,$isMuted:a&&!m,$isSelected:r,onClick:s?void 0:e=>{e.stopPropagation(),i(o)},children:[a&&!u?/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewMark,{inCheckSlot:!0,title:modalStrings.pendingReview}):/* @__PURE__ */jsxRuntimeExports.jsx(DisplayCheckBox,{checked:r,name:`txn-select-${o}`}),
93542
93534
  /* @__PURE__ */jsxRuntimeExports.jsx(ChildLabelSpacer,{}),
93543
93535
  /* @__PURE__ */jsxRuntimeExports.jsx(RowBody,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{maxWidth:"220px",text:transactionLineLabel(e),withNoHover:!0,itemTextStyle:{fontWeight:500,color:"inherit"}})}),
93544
93536
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAmount,{children:formatSearchAmount(e.amount,e.currencyCode,e.currencySymbol)})]},o)})]})}function TransactionMatchRow({isDisabled:e,isSelected:t,row:n,onSelect:o}){const i=getTransactionLineKey(n.transactionId,n.lineId),r=isPendingReviewSearchRow(n),a=e||r,{dateLabel:s,memo:l}=transactionListMeta(n,formatUnmatchedListTransactionDate(n.transactionDate));/* @__PURE__ */
93545
- return jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":a,"data-testid":generateDataTestId(TEST_ID_PREFIX,`txn-row-${i}`),$isDisabled:a,$isSelected:t,onClick:a?void 0:o,children:[
93537
+ return jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":a,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`txn-row-${i}`),$isDisabled:a,$isSelected:t,onClick:a?void 0:o,children:[
93546
93538
  /* @__PURE__ */jsxRuntimeExports.jsx(DisplayRadio,{checked:t,name:`txn-select-${i}`}),
93547
93539
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAvatar,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:n.vendorName})}),
93548
93540
  /* @__PURE__ */jsxRuntimeExports.jsxs(RowBody,{children:[
@@ -93551,7 +93543,7 @@ return jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":a,"data-testid":genera
93551
93543
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:formatTransactionTypeLabel(n.transactionType),style:{flexShrink:0},type:"info"}),r?/* @__PURE__ */jsxRuntimeExports.jsx(PendingReviewMark,{title:modalStrings.pendingReview}):null]}),
93552
93544
  /* @__PURE__ */jsxRuntimeExports.jsx(RowMetaLine,{dateLabel:s,isSelected:t,memo:l})]}),
93553
93545
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAmount,{children:formatSearchAmount(n.amount,n.currencyCode,n.currencySymbol)})]})}function AccrualMatchRow({isDisabled:e,isSelected:t,row:n,vendorLockReason:o,onToggle:i}){const r=null!=n.jeDebitAccountName&&""!==n.jeDebitAccountName?n.jeDebitAccountName:hyphen$d,a=`${formatServiceMonthLabel(n.serviceMonth)} · ${r}`;/* @__PURE__ */
93554
- return jsxRuntimeExports.jsx(AccrualRowBlock,{title:o,children:/* @__PURE__ */jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":e,"data-testid":generateDataTestId(TEST_ID_PREFIX,`accrual-row-${n.accrualId}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:i,children:[
93546
+ return jsxRuntimeExports.jsx(AccrualRowBlock,{title:o,children:/* @__PURE__ */jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":e,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`accrual-row-${n.accrualId}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:i,children:[
93555
93547
  /* @__PURE__ */jsxRuntimeExports.jsx(DisplayCheckBox,{checked:t,name:`accrual-select-${n.accrualId}`}),
93556
93548
  /* @__PURE__ */jsxRuntimeExports.jsx(RowAvatar,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:n.vendorName})}),
93557
93549
  /* @__PURE__ */jsxRuntimeExports.jsxs(RowBody,{children:[
@@ -94736,11 +94728,11 @@ return jsxRuntimeExports.jsx(GroupSection,{$isQuickViewMode:a,"data-testid":gene
94736
94728
  z-index: 2;
94737
94729
  background: ${e.theme.colors.grey5};
94738
94730
  `}
94739
- `;function useJEScheduleRowClick(e){return useCallback((t,n,o,i)=>{isInteractiveCellClick(t.target)||e(n,o,i)},[e])}const DEFAULT_SORT_STATE={columnKey:"vendor",direction:"asc"};function JEExistingSection({isAccountingClassesEnabled:e,jeSchedules:t,isPanelOpen:n=!1,panelContent:o,pendingDiscardConfirmation:i,vendorSearchAutoCompleteActions:r,vendorSearchAutoCompleteData:a,handleJeScheduleClick:s,onOneTimeAccrualClick:l,onOneTimeAccrualFeedback:c,ignoreRecommendedJeSchedule:d,onJESchedulesFormDataChange:p,onPostJESchedule:u,onUpdateJEScheduleTypeFilter:m}){const{uiState:h}=t,g=n,x=useMemo(()=>getColumnsForGroupKey("existing",e,g),[e,g]),f=useJEScheduleRowClick(s),y=useCallback((e,t,n)=>{s(e,t,n)},[s]),[S,C]=useState(void 0),$=useRef(!1),[b,v]=useState(!1),A=useRef(e=>{e&&!$.current&&($.current=!0,v(!0))});useSentryPerformanceTracking({componentName:"expense_automation.je_schedules.existing",enabled:b});const[E,w]=useState(void 0),R=t.createdSchedules.find(e=>isOneTimeAccrualRow(e)&&e.accrualId===E?.accrualId),j=null!=R&&isOneTimeAccrualRow(R)?R:void 0,T=useMemo(()=>({accountListNestedAccountHierarchy:t.accountListNestedAccountHierarchy,allAccountList:t.allAccountList,allDepreciationAccountList:t.allDepreciationAccountList,allDepreciationAccountListNestedAccountHierarchy:t.allDepreciationAccountListNestedAccountHierarchy,classListNestedAccountHierarchy:t.classListNestedAccountHierarchy,forcePostedLabel:!0,ignoreStatusById:t.ignoreStatusById,oneTimeAccrualActionStatusById:t.oneTimeAccrualActionStatusById,revertStatusById:t.revertStatusById,localDataByID:t.jeScheduleLocalDataById,postStatusById:t.postStatusById,uncategorizedAccounts:t.uncategorizedAccounts,vendorSearchAutoCompleteActions:r,vendorSearchAutoCompleteData:a,handleJeScheduleClick:s,ignoreRecommendedJeSchedule:(e,t)=>C({jeScheduleTransactionKey:e,scheduleType:t}),jeScheduleClickHandler:f,onOneTimeAccrualClick:l,onIgnoreOneTimeAccrual:e=>w({accrualId:e,mode:"skip"}),onRevertOneTimeAccrual:e=>w({accrualId:e,mode:"revert"}),onJESchedulesFormDataChange:p,onPostJESchedule:u,onReviewClickHandler:y}),[s,f,l,t.accountListNestedAccountHierarchy,t.allDepreciationAccountList,t.allDepreciationAccountListNestedAccountHierarchy,t.allAccountList,t.classListNestedAccountHierarchy,t.ignoreStatusById,t.oneTimeAccrualActionStatusById,t.revertStatusById,t.jeScheduleLocalDataById,t.postStatusById,t.uncategorizedAccounts,p,u,y,r,a]),I=useMemo(()=>t.createdSchedules.filter(e=>isExistingTabRow(e)),[t.createdSchedules]),k=useMemo(()=>{const e=h.selectedJETypeFilter;return null==e?I:I.filter(t=>getJEScheduleRowType(t)===e)},[I,h.selectedJETypeFilter]),L=useMemo(()=>[{data:k,groupKey:"existing",isPendingReview:!1}],[k]);/* @__PURE__ */
94740
- return jsxRuntimeExports.jsx(SectionWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent$1,{ref:A.current,$isPanelOpen:n,children:[
94741
- /* @__PURE__ */jsxRuntimeExports.jsx(JETypeFilterBar,{counts:t.jeScheduleTypeCounts.ongoing,selectedFilter:h.selectedJETypeFilter,onFilterChange:m}),
94742
- /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingKpiStrip,{kpiSummary:t.kpiSummary,ongoingSchedules:I}),
94743
- /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:n,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE$1,panelContent:o,pendingDiscardConfirmation:i,listContent:/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleGroupList,{activeHeaderItems:x,groups:L,listItemData:T,sortState:DEFAULT_SORT_STATE,testIdSuffix:"existing-je-schedules",onHeaderClick:()=>{}})}),null!=S&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"ignoreSchedule",vendorName:"",onClose:()=>C(void 0),onSubmit:(e,t)=>{d(S.jeScheduleTransactionKey,S.scheduleType,e,t),C(void 0)}}),null!=j&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",j.estimatedAmount),isOpen:!0,isSubmitting:!1,mode:E?.mode??"skip",vendorName:j.vendorName,onClose:()=>w(void 0),onSubmit:(e,t)=>{c(j.accrualId,"revert"===E?.mode?"revert":"ignore",e,t),w(void 0)}})]})})}const PANEL_FLUSH_WITH_LIST_STYLE$1={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper$1=styled$2.div`
94731
+ `;function useJEScheduleRowClick(e){return useCallback((t,n,o,i)=>{isInteractiveCellClick(t.target)||e(n,o,i)},[e])}const DEFAULT_SORT_STATE={columnKey:"vendor",direction:"asc"};function JEExistingSection({isAccountingClassesEnabled:e,jeSchedules:t,isPanelOpen:n=!1,panelActionBarContent:o,panelContent:i,pendingDiscardConfirmation:r,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:s,handleJeScheduleClick:l,onOneTimeAccrualClick:c,onOneTimeAccrualFeedback:d,ignoreRecommendedJeSchedule:p,onJESchedulesFormDataChange:u,onPostJESchedule:m,onUpdateJEScheduleTypeFilter:h}){const{uiState:g}=t,x=n,f=useMemo(()=>getColumnsForGroupKey("existing",e,x),[e,x]),y=useJEScheduleRowClick(l),S=useCallback((e,t,n)=>{l(e,t,n)},[l]),[C,$]=useState(void 0),b=useRef(!1),[v,A]=useState(!1),E=useRef(e=>{e&&!b.current&&(b.current=!0,A(!0))});useSentryPerformanceTracking({componentName:"expense_automation.je_schedules.existing",enabled:v});const[w,R]=useState(void 0),j=t.createdSchedules.find(e=>isOneTimeAccrualRow(e)&&e.accrualId===w?.accrualId),T=null!=j&&isOneTimeAccrualRow(j)?j:void 0,I=useMemo(()=>({accountListNestedAccountHierarchy:t.accountListNestedAccountHierarchy,allAccountList:t.allAccountList,allDepreciationAccountList:t.allDepreciationAccountList,allDepreciationAccountListNestedAccountHierarchy:t.allDepreciationAccountListNestedAccountHierarchy,classListNestedAccountHierarchy:t.classListNestedAccountHierarchy,forcePostedLabel:!0,ignoreStatusById:t.ignoreStatusById,oneTimeAccrualActionStatusById:t.oneTimeAccrualActionStatusById,revertStatusById:t.revertStatusById,localDataByID:t.jeScheduleLocalDataById,postStatusById:t.postStatusById,uncategorizedAccounts:t.uncategorizedAccounts,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:s,handleJeScheduleClick:l,ignoreRecommendedJeSchedule:(e,t)=>$({jeScheduleTransactionKey:e,scheduleType:t}),jeScheduleClickHandler:y,onOneTimeAccrualClick:c,onIgnoreOneTimeAccrual:e=>R({accrualId:e,mode:"skip"}),onRevertOneTimeAccrual:e=>R({accrualId:e,mode:"revert"}),onJESchedulesFormDataChange:u,onPostJESchedule:m,onReviewClickHandler:S}),[l,y,c,t.accountListNestedAccountHierarchy,t.allDepreciationAccountList,t.allDepreciationAccountListNestedAccountHierarchy,t.allAccountList,t.classListNestedAccountHierarchy,t.ignoreStatusById,t.oneTimeAccrualActionStatusById,t.revertStatusById,t.jeScheduleLocalDataById,t.postStatusById,t.uncategorizedAccounts,u,m,S,a,s]),k=useMemo(()=>t.createdSchedules.filter(e=>isExistingTabRow(e)),[t.createdSchedules]),L=useMemo(()=>{const e=g.selectedJETypeFilter;return null==e?k:k.filter(t=>getJEScheduleRowType(t)===e)},[k,g.selectedJETypeFilter]),D=useMemo(()=>[{data:L,groupKey:"existing",isPendingReview:!1}],[L]);/* @__PURE__ */
94732
+ return jsxRuntimeExports.jsx(SectionWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent$1,{ref:E.current,$isPanelOpen:n,children:[
94733
+ /* @__PURE__ */jsxRuntimeExports.jsx(JETypeFilterBar,{counts:t.jeScheduleTypeCounts.ongoing,selectedFilter:g.selectedJETypeFilter,onFilterChange:h}),
94734
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingKpiStrip,{kpiSummary:t.kpiSummary,ongoingSchedules:k}),
94735
+ /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:n,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE$1,panelActionBarContent:o,panelContent:i,pendingDiscardConfirmation:r,listContent:/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleGroupList,{activeHeaderItems:f,groups:D,listItemData:I,sortState:DEFAULT_SORT_STATE,testIdSuffix:"existing-je-schedules",onHeaderClick:()=>{}})}),null!=C&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"ignoreSchedule",vendorName:"",onClose:()=>$(void 0),onSubmit:(e,t)=>{p(C.jeScheduleTransactionKey,C.scheduleType,e,t),$(void 0)}}),null!=T&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",T.estimatedAmount),isOpen:!0,isSubmitting:!1,mode:w?.mode??"skip",vendorName:T.vendorName,onClose:()=>R(void 0),onSubmit:(e,t)=>{d(T.accrualId,"revert"===w?.mode?"revert":"ignore",e,t),R(void 0)}})]})})}const PANEL_FLUSH_WITH_LIST_STYLE$1={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper$1=styled$2.div`
94744
94736
  display: flex;
94745
94737
  flex-direction: column;
94746
94738
  background-color: ${e=>e.theme.colors.grey4};
@@ -94862,12 +94854,12 @@ return jsxRuntimeExports.jsxs(Strip$1,{children:[
94862
94854
  flex-shrink: 0;
94863
94855
  color: ${e=>e.theme.colors.hero};
94864
94856
  `;function JESummarySection({kpiSummary:e,schedules:t}){/* @__PURE__ */
94865
- return jsxRuntimeExports.jsx(JEKpiStrip,{kpiSummary:e,schedules:t})}const{common:{pendingReviewText:pendingReviewText,texts:{created:createdText,highFive:highFive,allSchedulesReviewed:allSchedulesReviewed}},expenseAutomation:{jeSchedules:{groups:{failedPostings:failedPostingsText}}}}=appLocale.getLocalizedStrings();function JESchedulesSection({isAccountingClassesEnabled:e,jeSchedules:t,isPanelOpen:n=!1,panelContent:o,pendingDiscardConfirmation:i,vendorSearchAutoCompleteData:r,handleJeScheduleClick:a,onOneTimeAccrualClick:s,onOneTimeAccrualFeedback:l,onConfirmCategoryRecommendation:c,onJESchedulesFormDataChange:d,onPostJESchedule:p,onRevertJeSchedule:u,ignoreRecommendedJeSchedule:m,onUpdateJESchedulesUIState:h,onTogglePendingGroupCollapsed:g,onToggleCreatedGroupCollapsed:x,onUpdateJEScheduleTypeFilter:f,vendorSearchAutoCompleteActions:y,setCurrentFooterFormId:S}){const C=t.jeScheduleLocalDataById,$=t.postStatusById,b=t.ignoreStatusById,v=t.oneTimeAccrualActionStatusById,A=t.revertStatusById,{uiState:E}=t,w=n,R=useRef(!1),[j,T]=useState(!1),I=useRef(e=>{e&&!R.current&&(R.current=!0,T(!0))});useSentryPerformanceTracking({componentName:"expense_automation.je_schedules.review",enabled:j});const k=useMemo(()=>getColumnsForGroupKey("pending_review",e,w),[e,w]),L=useMemo(()=>({columnKey:E.sortKey,direction:"ascending"===E.sortOrder?"asc":"desc"}),[E.sortKey,E.sortOrder]),D=useCallback(e=>{null!=e&&h({sortKey:e.columnKey,sortOrder:"asc"===e.direction?"ascending":"descending"})},[h]),_=useCallback(()=>{h({failedGroupCollapsed:!E.failedGroupCollapsed})},[h,E.failedGroupCollapsed]),P=useCallback(e=>{e.sortable&&D(L.columnKey===e.key&&"asc"===L.direction?{columnKey:e.key,direction:"desc"}:{columnKey:e.key,direction:"asc"})},[L,D]),B=t.failedPostings,M="Not-Started"!==t.failedPostingsFetchState.fetchState&&"In-Progress"!==t.failedPostingsFetchState.fetchState,O=t.uncategorizedAccounts,{allAccountList:F,allDepreciationAccountList:N}=t,z=useCallback((e,t,n)=>{a(e,t,n)},[a]),H=useJEScheduleRowClick(a);useEffect(()=>{if(0!==B.length){for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const{updatedAccumulatedDepreciationCategoryID:t,updatedCategoryId:n,updatedVendor:o}=C[e];if(null!=t||null!=n||null!=o&&""!==o?.id){S("expenseAutomationJESchedulePage");break}S("expenseAutomationPage")}}else S("expenseAutomationPage")},[B.length,C,S]),useEffect(()=>()=>{S("expenseAutomationPage")},[]);const V=useMemo(()=>t.pendingReviewSchedules??[],[t.pendingReviewSchedules]),W=t.createdSchedules,U=0===V.length&&0===W.length&&0===B.length,G=M?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:"je_schedules",title:highFive,subTitle:allSchedulesReviewed}):null,q=useMemo(()=>[{data:B,groupKey:"failed_postings",isPendingReview:!0,groupRow:{isCollapsed:E.failedGroupCollapsed,title:failedPostingsText,onToggle:_}},{data:V,groupKey:"pending_review",isPendingReview:!0,groupRow:{isCollapsed:E.pendingGroupCollapsed,title:pendingReviewText,onToggle:g}},{data:W,groupKey:"created",isPendingReview:!1,groupRow:{isCollapsed:E.createdGroupCollapsed,title:createdText,onToggle:x}}],[B,V,W,E.failedGroupCollapsed,E.pendingGroupCollapsed,E.createdGroupCollapsed,_,g,x]),Q=useMemo(()=>[...V,...W],[V,W]),Y=useMemo(()=>[...Q,...B].map(e=>getStableTransactionId(getJEScheduleRowKey(e))),[Q,B]);useExpenseAutomationTabEntityIdRegistration("je_schedules.list",Y);const[K,Z]=useState(void 0),[X,J]=useState(void 0),[ee,te]=useState(void 0),ne=[...t.pendingReviewSchedules,...t.createdSchedules].find(e=>isOneTimeAccrualRow(e)&&e.accrualId===ee?.accrualId),oe=null!=ne&&isOneTimeAccrualRow(ne)?ne:void 0,ie=useMemo(()=>({accountListNestedAccountHierarchy:t.accountListNestedAccountHierarchy,allAccountList:F,allDepreciationAccountList:N,allDepreciationAccountListNestedAccountHierarchy:t.allDepreciationAccountListNestedAccountHierarchy,classListNestedAccountHierarchy:t.classListNestedAccountHierarchy,ignoreStatusById:b,oneTimeAccrualActionStatusById:v,revertStatusById:A,localDataByID:C,postStatusById:$,uncategorizedAccounts:O,vendorSearchAutoCompleteActions:y,vendorSearchAutoCompleteData:r,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:(e,t)=>J({jeScheduleTransactionKey:e,scheduleType:t}),jeScheduleClickHandler:H,onOneTimeAccrualClick:s,onIgnoreOneTimeAccrual:e=>te({accrualId:e,mode:"skip"}),onRevertOneTimeAccrual:e=>te({accrualId:e,mode:"revert"}),onConfirmCategoryRecommendation:c,onJESchedulesFormDataChange:d,onPostJESchedule:p,onRevertJeSchedule:(e,t,n)=>Z({jeScheduleId:e,jeScheduleTransactionKey:t,scheduleType:n}),onReviewClickHandler:z}),[F,N,a,b,v,A,H,s,t.accountListNestedAccountHierarchy,t.allDepreciationAccountListNestedAccountHierarchy,t.classListNestedAccountHierarchy,C,c,d,p,z,$,O,y,r]);/* @__PURE__ */
94857
+ return jsxRuntimeExports.jsx(JEKpiStrip,{kpiSummary:e,schedules:t})}const{common:{pendingReviewText:pendingReviewText,texts:{created:createdText,highFive:highFive,allSchedulesReviewed:allSchedulesReviewed}},expenseAutomation:{jeSchedules:{groups:{failedPostings:failedPostingsText}}}}=appLocale.getLocalizedStrings();function JESchedulesSection({isAccountingClassesEnabled:e,jeSchedules:t,isPanelOpen:n=!1,panelActionBarContent:o,panelContent:i,pendingDiscardConfirmation:r,vendorSearchAutoCompleteData:a,handleJeScheduleClick:s,onOneTimeAccrualClick:l,onOneTimeAccrualFeedback:c,onConfirmCategoryRecommendation:d,onJESchedulesFormDataChange:p,onPostJESchedule:u,onRevertJeSchedule:m,ignoreRecommendedJeSchedule:h,onUpdateJESchedulesUIState:g,onTogglePendingGroupCollapsed:x,onToggleCreatedGroupCollapsed:f,onUpdateJEScheduleTypeFilter:y,vendorSearchAutoCompleteActions:S,setCurrentFooterFormId:C}){const $=t.jeScheduleLocalDataById,b=t.postStatusById,v=t.ignoreStatusById,A=t.oneTimeAccrualActionStatusById,E=t.revertStatusById,{uiState:w}=t,R=n,j=useRef(!1),[T,I]=useState(!1),k=useRef(e=>{e&&!j.current&&(j.current=!0,I(!0))});useSentryPerformanceTracking({componentName:"expense_automation.je_schedules.review",enabled:T});const L=useMemo(()=>getColumnsForGroupKey("pending_review",e,R),[e,R]),D=useMemo(()=>({columnKey:w.sortKey,direction:"ascending"===w.sortOrder?"asc":"desc"}),[w.sortKey,w.sortOrder]),_=useCallback(e=>{null!=e&&g({sortKey:e.columnKey,sortOrder:"asc"===e.direction?"ascending":"descending"})},[g]),P=useCallback(()=>{g({failedGroupCollapsed:!w.failedGroupCollapsed})},[g,w.failedGroupCollapsed]),B=useCallback(e=>{e.sortable&&_(D.columnKey===e.key&&"asc"===D.direction?{columnKey:e.key,direction:"desc"}:{columnKey:e.key,direction:"asc"})},[D,_]),M=t.failedPostings,O="Not-Started"!==t.failedPostingsFetchState.fetchState&&"In-Progress"!==t.failedPostingsFetchState.fetchState,F=t.uncategorizedAccounts,{allAccountList:N,allDepreciationAccountList:z}=t,H=useCallback((e,t,n)=>{s(e,t,n)},[s]),V=useJEScheduleRowClick(s);useEffect(()=>{if(0!==M.length){for(const e in $)if(Object.prototype.hasOwnProperty.call($,e)){const{updatedAccumulatedDepreciationCategoryID:t,updatedCategoryId:n,updatedVendor:o}=$[e];if(null!=t||null!=n||null!=o&&""!==o?.id){C("expenseAutomationJESchedulePage");break}C("expenseAutomationPage")}}else C("expenseAutomationPage")},[M.length,$,C]),useEffect(()=>()=>{C("expenseAutomationPage")},[]);const W=useMemo(()=>t.pendingReviewSchedules??[],[t.pendingReviewSchedules]),U=t.createdSchedules,G=0===W.length&&0===U.length&&0===M.length,q=O?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:"je_schedules",title:highFive,subTitle:allSchedulesReviewed}):null,Q=useMemo(()=>[{data:M,groupKey:"failed_postings",isPendingReview:!0,groupRow:{isCollapsed:w.failedGroupCollapsed,title:failedPostingsText,onToggle:P}},{data:W,groupKey:"pending_review",isPendingReview:!0,groupRow:{isCollapsed:w.pendingGroupCollapsed,title:pendingReviewText,onToggle:x}},{data:U,groupKey:"created",isPendingReview:!1,groupRow:{isCollapsed:w.createdGroupCollapsed,title:createdText,onToggle:f}}],[M,W,U,w.failedGroupCollapsed,w.pendingGroupCollapsed,w.createdGroupCollapsed,P,x,f]),Y=useMemo(()=>[...W,...U],[W,U]),K=useMemo(()=>[...Y,...M].map(e=>getStableTransactionId(getJEScheduleRowKey(e))),[Y,M]);useExpenseAutomationTabEntityIdRegistration("je_schedules.list",K);const[Z,X]=useState(void 0),[J,ee]=useState(void 0),[te,ne]=useState(void 0),oe=[...t.pendingReviewSchedules,...t.createdSchedules].find(e=>isOneTimeAccrualRow(e)&&e.accrualId===te?.accrualId),ie=null!=oe&&isOneTimeAccrualRow(oe)?oe:void 0,re=useMemo(()=>({accountListNestedAccountHierarchy:t.accountListNestedAccountHierarchy,allAccountList:N,allDepreciationAccountList:z,allDepreciationAccountListNestedAccountHierarchy:t.allDepreciationAccountListNestedAccountHierarchy,classListNestedAccountHierarchy:t.classListNestedAccountHierarchy,ignoreStatusById:v,oneTimeAccrualActionStatusById:A,revertStatusById:E,localDataByID:$,postStatusById:b,uncategorizedAccounts:F,vendorSearchAutoCompleteActions:S,vendorSearchAutoCompleteData:a,handleJeScheduleClick:s,ignoreRecommendedJeSchedule:(e,t)=>ee({jeScheduleTransactionKey:e,scheduleType:t}),jeScheduleClickHandler:V,onOneTimeAccrualClick:l,onIgnoreOneTimeAccrual:e=>ne({accrualId:e,mode:"skip"}),onRevertOneTimeAccrual:e=>ne({accrualId:e,mode:"revert"}),onConfirmCategoryRecommendation:d,onJESchedulesFormDataChange:p,onPostJESchedule:u,onRevertJeSchedule:(e,t,n)=>X({jeScheduleId:e,jeScheduleTransactionKey:t,scheduleType:n}),onReviewClickHandler:H}),[N,z,s,v,A,E,V,l,t.accountListNestedAccountHierarchy,t.allDepreciationAccountListNestedAccountHierarchy,t.classListNestedAccountHierarchy,$,d,p,u,H,b,F,S,a]);/* @__PURE__ */
94866
94858
  return jsxRuntimeExports.jsxs(SectionWrapper,{children:[
94867
- /* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent,{ref:I.current,$isPanelOpen:n,children:[
94868
- /* @__PURE__ */jsxRuntimeExports.jsx(JETypeFilterBar,{counts:t.jeScheduleTypeCounts.active,selectedFilter:E.selectedJETypeFilter,onFilterChange:f}),
94869
- /* @__PURE__ */jsxRuntimeExports.jsx(JESummarySection,{kpiSummary:t.kpiSummary,schedules:Q}),
94870
- /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:n,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE,panelContent:o,pendingDiscardConfirmation:i,listContent:U?G:/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleGroupList,{activeHeaderItems:k,groups:q,listItemData:ie,sortState:L,testIdSuffix:"je-schedules",onHeaderClick:P})})]}),null!=K&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"revertSchedule",vendorName:"",onClose:()=>Z(void 0),onSubmit:(e,t)=>{u?.(K.jeScheduleId,K.jeScheduleTransactionKey,K.scheduleType,e,t),Z(void 0)}}),null!=X&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"ignoreSchedule",vendorName:"",onClose:()=>J(void 0),onSubmit:(e,t)=>{m(X.jeScheduleTransactionKey,X.scheduleType,e,t),J(void 0)}}),null!=oe&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",oe.estimatedAmount),isOpen:!0,isSubmitting:!1,mode:ee?.mode??"skip",vendorName:oe.vendorName,onClose:()=>te(void 0),onSubmit:(e,t)=>{l(oe.accrualId,"revert"===ee?.mode?"revert":"ignore",e,t),te(void 0)}})]})}const PANEL_FLUSH_WITH_LIST_STYLE={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper=styled$2.div`
94859
+ /* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent,{ref:k.current,$isPanelOpen:n,children:[
94860
+ /* @__PURE__ */jsxRuntimeExports.jsx(JETypeFilterBar,{counts:t.jeScheduleTypeCounts.active,selectedFilter:w.selectedJETypeFilter,onFilterChange:y}),
94861
+ /* @__PURE__ */jsxRuntimeExports.jsx(JESummarySection,{kpiSummary:t.kpiSummary,schedules:Y}),
94862
+ /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:n,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE,panelActionBarContent:o,panelContent:i,pendingDiscardConfirmation:r,listContent:G?q:/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleGroupList,{activeHeaderItems:L,groups:Q,listItemData:re,sortState:D,testIdSuffix:"je-schedules",onHeaderClick:B})})]}),null!=Z&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"revertSchedule",vendorName:"",onClose:()=>X(void 0),onSubmit:(e,t)=>{m?.(Z.jeScheduleId,Z.jeScheduleTransactionKey,Z.scheduleType,e,t),X(void 0)}}),null!=J&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:"",isOpen:!0,isSubmitting:!1,mode:"ignoreSchedule",vendorName:"",onClose:()=>ee(void 0),onSubmit:(e,t)=>{h(J.jeScheduleTransactionKey,J.scheduleType,e,t),ee(void 0)}}),null!=ie&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",ie.estimatedAmount),isOpen:!0,isSubmitting:!1,mode:te?.mode??"skip",vendorName:ie.vendorName,onClose:()=>ne(void 0),onSubmit:(e,t)=>{c(ie.accrualId,"revert"===te?.mode?"revert":"ignore",e,t),ne(void 0)}})]})}const PANEL_FLUSH_WITH_LIST_STYLE={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper=styled$2.div`
94871
94863
  display: flex;
94872
94864
  flex-direction: column;
94873
94865
  background-color: ${e=>e.theme.colors.grey4};
@@ -95488,10 +95480,10 @@ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95488
95480
  height: 100%;
95489
95481
  min-width: 0;
95490
95482
  background-color: ${e=>e.theme.colors.grey4};
95491
- `;function JESchedulePage({accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,expenseAutomationViewSelector:i,currentFooterFormId:r,isAccountingClassesEnabled:a,isCreatingNewSchedule:s,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,closeMonth:d,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,setResetJeAccountSettingsForm:x,vendorSearchAutoCompleteData:f,onJESchedulesFormDataChange:y,onPostJESchedule:S,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:A,onSaveSchedule:E,onScheduleTypeChange:w,onSearchBaseTransaction:R,onViewTransaction:j,newScheduleLocalData:T,initialSelectedBaseTransaction:I,isAccrualEnabled:k,onNewScheduleFormChange:L,ignoreRecommendedJeSchedule:D,vendorSearchAutoCompleteActions:_,isMatchPanelOpen:P,isSchedulePanelOpen:B,matchPanelContent:M,schedulePanelContent:O,schedulePendingDiscardConfirmation:F,setCurrentFooterFormId:N,setIsCreatingNewSchedule:z,setIsJeAccountSettingsOpened:H,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,onClearMatchNewModal:Q,onCloseMatchNewModal:Y,onIgnoreMatchSuggestion:K,onMatchAndReverse:Z,onOpenBill:X,onOpenMatch:J,onOpenMatchNewModal:ee,onSearchMatchAccruals:te,onSearchMatchTransactions:ne,onUndoReversal:oe,onUpdateActualMatchingUIState:ie}){const{jeSchedules:re}=i,ae=useCallback(()=>{z(!1),"schedules"!==re.uiState.selectedPageTab&&q({selectedPageTab:"schedules"})},[re.uiState.selectedPageTab,q,z]),se={isAccountingClassesEnabled:a,setCurrentFooterFormId:N,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,jeSchedules:re,onJESchedulesFormDataChange:y,onPostJESchedule:S,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F},le=/* @__PURE__ */jsxRuntimeExports.jsx(NewJEScheduleDrawer,{isOpen:s,closeMonth:d,accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,isAccountingClassesEnabled:a,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,onCancel:()=>z(!1),onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,onCreationComplete:ae,onSaveSchedule:E,onScheduleTypeChange:w,onSearchBaseTransaction:R,onViewTransaction:j,isAccrualEnabled:k,newScheduleLocalData:T,initialSelectedBaseTransaction:I,onNewScheduleFormChange:L});return isActualMatchingPageTab(re.uiState.selectedPageTab)?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95492
- /* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingPage,{actualMatching:getActualMatchingFromSelector(i),isMatchPanelOpen:P,matchPanelContent:M,selectedPeriod:i.selectedPeriod,onClearMatchNewModal:Q??(()=>{}),onCloseMatchNewModal:Y??(()=>{}),onIgnoreMatchSuggestion:K??(()=>{}),onMatchAndReverse:Z??(()=>{}),onOpenBill:X,onOpenMatch:J??(()=>{}),onOpenMatchNewModal:ee??(()=>{}),onSearchMatchAccruals:te??(()=>{}),onSearchMatchTransactions:ne??(()=>{}),onUndoReversal:oe,onUpdateActualMatchingUIState:ie}),le]}):re.hasLoadedForSelectedTab&&re.accountSettingsView.hasLoaded?"Completed"===re.accountSettingsView.fetchState&&0===re.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length&&0===re.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length?/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleAccountSettings,{setIsJeAccountSettingsOpened:H,setResetJeAccountSettingsForm:x,currentFooterFormId:r,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:A,accountSettings:re.accountSettingsView,setCurrentFooterFormId:N}):"existing_schedules"===re.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95493
- /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSection,{isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,isAccountingClassesEnabled:a,jeSchedules:re,onJESchedulesFormDataChange:y,onPostJESchedule:S,onUpdateJEScheduleTypeFilter:G,setCurrentFooterFormId:N,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f}),le]}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95494
- /* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesSection,{...se}),le]}):"existing_schedules"===re.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSchedulesTabSkeleton,{isAccountingClassesEnabled:a}):/* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesTabSkeleton,{isAccountingClassesEnabled:a})}const MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS=[15,22,23,16,15,9],MissingReceiptsListEmptyTable=e=>/* @__PURE__ */jsxRuntimeExports.jsx(Container$t,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS})}),Container$t=styled$2.div``,DEFAULT_LIST_ITEM_HEIGHT_REGULAR=48,DEFAULT_LIST_HEADER_HEIGHT_REGULAR$1=32,OVERSCAN_COUNT=1,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS=["receipts"],toMissingReceiptsColumnNonSortableKeyStrict=e=>stringToUnionStrict(e,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS),{common:{texts:{vendor:vendor$4,amount:amount$6,receipts:receipts$1,category:category$3,date:date$4,class:classText$2}}}=appLocale.getLocalizedStrings(),missingReceiptsVendorHeaderItem={key:"vendor",value:vendor$4,sortOrder:"ascending",width:new ResponsiveSized(25,25)},missingReceiptsCategoryHeaderItem={key:"category",value:category$3,sortOrder:"ascending",width:new ResponsiveSized(21,21)},missingReceiptsClassHeaderItem={key:"class",value:classText$2,sortOrder:"ascending",width:new ResponsiveSized(20,20)},missingReceiptsDateHeaderItem={key:"date",value:date$4,sortOrder:"descending",width:new ResponsiveSized(8,8)},missingReceiptsLabelHeaderItem={key:"receipts",value:receipts$1,sortOrder:"descending",width:new ResponsiveSized(14,14)},missingReceiptsAmountHeaderItem={key:"amount",value:amount$6,sortOrder:"ascending",width:new ResponsiveSized(12,12)};function getMissingReceiptsHeaderItemsData(e){return[missingReceiptsVendorHeaderItem,missingReceiptsCategoryHeaderItem,...e?[missingReceiptsClassHeaderItem]:[],missingReceiptsLabelHeaderItem,missingReceiptsDateHeaderItem,missingReceiptsAmountHeaderItem]}const compressedMissingReceiptsHeaderItemsData=[{...missingReceiptsVendorHeaderItem,width:new ResponsiveSized(65,65)},{...missingReceiptsAmountHeaderItem,width:new ResponsiveSized(30,30)}],defaultSortOption$1={sortKey:"date",sortOrder:"descending"},MissingReceiptsHeader=({isAccountingClassesEnabled:e,sortConfig:t,isDisabled:n,onColumnSortConfigChanged:o})=>{const i=useWindowSizeContext(),r=useQuickViewMode(),a=r?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(e),[s,l]=useState(a);useEffect(()=>{const e=[...a];for(const n of e)n.key===t.sortKey?n.sortOrder=t.sortOrder:n.sortOrder="ascending";l(e)},[t.sortKey,t.sortOrder,r]);const c=(e,n)=>{let i=n;t.sortKey===e&&(i="ascending"===n?"descending":"ascending"),o(e,i)};/* @__PURE__ */
95483
+ `;function JESchedulePage({accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,expenseAutomationViewSelector:i,currentFooterFormId:r,isAccountingClassesEnabled:a,isCreatingNewSchedule:s,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,closeMonth:d,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,setResetJeAccountSettingsForm:x,vendorSearchAutoCompleteData:f,onJESchedulesFormDataChange:y,onPostJESchedule:S,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:A,onSaveSchedule:E,onScheduleTypeChange:w,onSearchBaseTransaction:R,onViewTransaction:j,newScheduleLocalData:T,initialSelectedBaseTransaction:I,isAccrualEnabled:k,onNewScheduleFormChange:L,ignoreRecommendedJeSchedule:D,vendorSearchAutoCompleteActions:_,isMatchPanelOpen:P,isSchedulePanelOpen:B,matchPanelContent:M,schedulePanelActionBarContent:O,schedulePanelContent:F,schedulePendingDiscardConfirmation:N,setCurrentFooterFormId:z,setIsCreatingNewSchedule:H,setIsJeAccountSettingsOpened:V,onRevertJeSchedule:W,onToggleCreatedGroupCollapsed:U,onTogglePendingGroupCollapsed:G,onUpdateJEScheduleTypeFilter:q,onUpdateJESchedulesUIState:Q,onClearMatchNewModal:Y,onCloseMatchNewModal:K,onIgnoreMatchSuggestion:Z,onMatchAndReverse:X,onOpenBill:J,onOpenMatch:ee,onOpenMatchNewModal:te,onSearchMatchAccruals:ne,onSearchMatchTransactions:oe,onUndoReversal:ie,onUpdateActualMatchingUIState:re}){const{jeSchedules:ae}=i,se=useCallback(()=>{H(!1),"schedules"!==ae.uiState.selectedPageTab&&Q({selectedPageTab:"schedules"})},[ae.uiState.selectedPageTab,Q,H]),le={isAccountingClassesEnabled:a,setCurrentFooterFormId:z,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,jeSchedules:ae,onJESchedulesFormDataChange:y,onPostJESchedule:S,onRevertJeSchedule:W,onToggleCreatedGroupCollapsed:U,onTogglePendingGroupCollapsed:G,onUpdateJEScheduleTypeFilter:q,onUpdateJESchedulesUIState:Q,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,isPanelOpen:B,panelActionBarContent:O,panelContent:F,pendingDiscardConfirmation:N},ce=/* @__PURE__ */jsxRuntimeExports.jsx(NewJEScheduleDrawer,{isOpen:s,closeMonth:d,accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,isAccountingClassesEnabled:a,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,onCancel:()=>H(!1),onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,onCreationComplete:se,onSaveSchedule:E,onScheduleTypeChange:w,onSearchBaseTransaction:R,onViewTransaction:j,isAccrualEnabled:k,newScheduleLocalData:T,initialSelectedBaseTransaction:I,onNewScheduleFormChange:L});return isActualMatchingPageTab(ae.uiState.selectedPageTab)?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95484
+ /* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingPage,{actualMatching:getActualMatchingFromSelector(i),isMatchPanelOpen:P,matchPanelContent:M,selectedPeriod:i.selectedPeriod,onClearMatchNewModal:Y??(()=>{}),onCloseMatchNewModal:K??(()=>{}),onIgnoreMatchSuggestion:Z??(()=>{}),onMatchAndReverse:X??(()=>{}),onOpenBill:J,onOpenMatch:ee??(()=>{}),onOpenMatchNewModal:te??(()=>{}),onSearchMatchAccruals:ne??(()=>{}),onSearchMatchTransactions:oe??(()=>{}),onUndoReversal:ie,onUpdateActualMatchingUIState:re}),ce]}):ae.hasLoadedForSelectedTab&&ae.accountSettingsView.hasLoaded?"Completed"===ae.accountSettingsView.fetchState&&0===ae.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length&&0===ae.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length?/* @__PURE__ */jsxRuntimeExports.jsx(JEScheduleAccountSettings,{setIsJeAccountSettingsOpened:V,setResetJeAccountSettingsForm:x,currentFooterFormId:r,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:A,accountSettings:ae.accountSettingsView,setCurrentFooterFormId:z}):"existing_schedules"===ae.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95485
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSection,{isPanelOpen:B,panelActionBarContent:O,panelContent:F,pendingDiscardConfirmation:N,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,isAccountingClassesEnabled:a,jeSchedules:ae,onJESchedulesFormDataChange:y,onPostJESchedule:S,onUpdateJEScheduleTypeFilter:q,setCurrentFooterFormId:z,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f}),ce]}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
95486
+ /* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesSection,{...le}),ce]}):"existing_schedules"===ae.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSchedulesTabSkeleton,{isAccountingClassesEnabled:a}):/* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesTabSkeleton,{isAccountingClassesEnabled:a})}const MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS=[15,22,23,16,15,9],MissingReceiptsListEmptyTable=e=>/* @__PURE__ */jsxRuntimeExports.jsx(Container$t,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS})}),Container$t=styled$2.div``,DEFAULT_LIST_ITEM_HEIGHT_REGULAR=48,DEFAULT_LIST_HEADER_HEIGHT_REGULAR$1=32,OVERSCAN_COUNT=1,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS=["receipts"],toMissingReceiptsColumnNonSortableKeyStrict=e=>stringToUnionStrict(e,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS),{common:{texts:{vendor:vendor$4,amount:amount$6,receipts:receipts$1,category:category$3,date:date$4,class:classText$2}}}=appLocale.getLocalizedStrings(),missingReceiptsVendorHeaderItem={key:"vendor",value:vendor$4,sortOrder:"ascending",width:new ResponsiveSized(25,25)},missingReceiptsCategoryHeaderItem={key:"category",value:category$3,sortOrder:"ascending",width:new ResponsiveSized(21,21)},missingReceiptsClassHeaderItem={key:"class",value:classText$2,sortOrder:"ascending",width:new ResponsiveSized(20,20)},missingReceiptsDateHeaderItem={key:"date",value:date$4,sortOrder:"descending",width:new ResponsiveSized(8,8)},missingReceiptsLabelHeaderItem={key:"receipts",value:receipts$1,sortOrder:"descending",width:new ResponsiveSized(14,14)},missingReceiptsAmountHeaderItem={key:"amount",value:amount$6,sortOrder:"ascending",width:new ResponsiveSized(12,12)};function getMissingReceiptsHeaderItemsData(e){return[missingReceiptsVendorHeaderItem,missingReceiptsCategoryHeaderItem,...e?[missingReceiptsClassHeaderItem]:[],missingReceiptsLabelHeaderItem,missingReceiptsDateHeaderItem,missingReceiptsAmountHeaderItem]}const compressedMissingReceiptsHeaderItemsData=[{...missingReceiptsVendorHeaderItem,width:new ResponsiveSized(65,65)},{...missingReceiptsAmountHeaderItem,width:new ResponsiveSized(30,30)}],defaultSortOption$1={sortKey:"date",sortOrder:"descending"},MissingReceiptsHeader=({isAccountingClassesEnabled:e,sortConfig:t,isDisabled:n,onColumnSortConfigChanged:o})=>{const i=useWindowSizeContext(),r=useQuickViewMode(),a=r?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(e),[s,l]=useState(a);useEffect(()=>{const e=[...a];for(const n of e)n.key===t.sortKey?n.sortOrder=t.sortOrder:n.sortOrder="ascending";l(e)},[t.sortKey,t.sortOrder,r]);const c=(e,n)=>{let i=n;t.sortKey===e&&(i="ascending"===n?"descending":"ascending"),o(e,i)};/* @__PURE__ */
95495
95487
  return jsxRuntimeExports.jsx(HeaderContainer$3,{windowSize:i,isQuickViewMode:r,children:s.map((e,o)=>{const a=null!=n||null!=toMissingReceiptsColumnNonSortableKeyStrict(e.key);/* @__PURE__ */
95496
95488
  return jsxRuntimeExports.jsxs(HeaderWrapper$3,{sortDataValue:t.sortKey,actualDataValue:e.key,wrapperWidth:e.width,isSortDisabled:a,windowSize:i,isQuickViewMode:r,isLastItem:o===s.length-1,style:"receipts"===e.key?{justifyContent:"center"}:void 0,children:[
95497
95489
  /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderNameWrapper$3,{onClick:()=>a?null:(e=>{null==toMissingReceiptsColumnNonSortableKeyStrict(e.key)&&c(toExpenseAutomationMissingReceiptsSortKey(e.key),e.sortOrder)})(e),isSortDisabled:a,children:[
@@ -97289,7 +97281,7 @@ return jsxRuntimeExports.jsx(Container$o,{ref:W,"data-testid":generateDataTestId
97289
97281
  `,ListTable=e=>{const{accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,currentFooterFormId:r,filters:a,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,newScheduleLocalData:m,initialSelectedBaseTransaction:h,isAccrualEnabled:g,onNewScheduleFormChange:x,setResetJeAccountSettingsForm:f,expenseAutomationViewSelector:y,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,authParams:b,receiptUploadEndpoint:v,companyId:A,vendorSearchAutoCompleteActions:E,vendorSearchAutoCompleteData:w,enableMonthEndInsightsZeniGPTFeature:R,monthEndInsightsPreviewMode:j,monthEndInsightsCustomerRequestData:T,allThreadsSectionOpen:I,loggedInUser:k,isCOTEnabled:L,setCurrentFooterFormId:D,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,onTransactionCategorizationRowClick:B,onFetchMissingReceiptsList:M,onMissingReceiptsRowClick:O,onUploadReceiptAttachment:F,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onReconTabColumnSortConfigChanged:H,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:W,onUpdateMissingReceiptsUIState:U,onUpdateJESchedulesUIState:G,onFetchTransactionCategorizationList:q,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOpenMatch:X,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,improveMonthEndInsightsUsingZeniGPTClick:pe,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,onCloseAllThreadsSection:he,onEditMonthEndInsightsClick:ge,previewMonthEndReport:xe,saveMonthEndReport:fe,onOpenFileAttachmentSnackBar:ye,onCloseFileAttachmentSnackBar:Se,onClickCustomerRequest:Ce,sendMonthEndReport:$e,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ae,onFetchReimbursementView:Ee,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Re,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onReviewClicked:Pe,onViewReportClicked:Be,setOpenDrawerClicked:Me,onEstablishConnectionClick:Oe,onFetchLinkTokenClick:Fe,updateReconReviewTabLocalData:Ne,onReconReviewTabColumnSortConfigChanged:ze,onSaveReconciliation:He,onSaveReconciliationReview:Ve,onReconListPageScroll:We,onReconMatchedTransactionClick:Ue,onAddStatementClick:Ge,redirectToVendorDetailPage:qe,onOpenTransferRightPanel:Qe,isCreateTransferEntryFromExpenseEnabled:Ye,setActivityLogTransactionId:Ke,onReconNodeCollapseToggled:Ze,onExcludeAccountFromReconciliation:Xe,onIncludeAccountIntoReconciliation:Je,isReconReportEnabled:et,isReconV3Enabled:tt,onClearMatchNewModal:nt,onCloseMatchNewModal:ot,onIgnoreMatchSuggestion:it,onMatchAndReverse:rt,onOpenBill:at,onOpenMatchNewModal:st,onSearchMatchAccruals:lt,onSearchMatchTransactions:ct,onUndoReversal:dt,onUpdateActualMatchingUIState:pt}=e,{currentSelectedView:ut,missingReceipts:mt,transactionView:ht,selectedPeriod:gt,monthEndInsights:xt,selectedTransactionCategorizationTab:ft,reconciliation:yt}=y;switch(ut){case"transaction_categorization":if("Completed"===ht.fetchState&&0===ht.transactionLocalData.length){const{title:e,subTitle:t}=getNavBarHeaderData(ut).allDoneText,n=hasActiveSearchOrFilters(ht.uiState.searchString??"",a);/* @__PURE__ */
97290
97282
  return jsxRuntimeExports.jsx(EmptyTableSection,{tab:ut,title:n&&emptyStates?.noSearchResults?.title?emptyStates.noSearchResults.title:e,subTitle:n&&emptyStates?.noSearchResults?.subTitle?emptyStates.noSearchResults.subTitle:t,useNoSearchResultIcon:n})}/* @__PURE__ */
97291
97283
  return jsxRuntimeExports.jsx(TransactionCategorizationListPage,{companyId:A,setCurrentFooterFormId:D,selectedPeriod:gt,selectedTab:ft,sectionId:transactionCategorizationListTableSectionId,transactionView:ht,authParams:b,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,onFetchTransactionCategorizationList:q,onTransactionCategorizationRowClick:B,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,vendorSearchAutoCompleteActions:E,vendorSearchAutoCompleteData:w,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,isCOTEnabled:L,isCreateTransferEntryFromExpenseEnabled:Ye,onOpenTransferRightPanel:Qe,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":/* @__PURE__ */
97292
- return jsxRuntimeExports.jsx(JESchedulePage,{closeMonth:e.closeMonth,isMatchPanelOpen:e.isMatchPanelOpen,isSchedulePanelOpen:e.isSchedulePanelOpen,matchPanelContent:e.matchPanelContent,schedulePanelContent:e.schedulePanelContent,schedulePendingDiscardConfirmation:e.schedulePendingDiscardConfirmation,accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,allDepreciationAccountListNestedAccountHierarchy:e.allDepreciationAccountListNestedAccountHierarchy,newAccrualAccountsView:e.newAccrualAccountsView,newScheduleSaveStatus:e.newScheduleSaveStatus,onCreateAccruedSchedule:e.onCreateAccruedSchedule,onCreateOneTimeAccrual:e.onCreateOneTimeAccrual,isAccountingClassesEnabled:S,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,isAccrualEnabled:g,newScheduleLocalData:m,initialSelectedBaseTransaction:h,onNewScheduleFormChange:x,expenseAutomationViewSelector:y,setResetJeAccountSettingsForm:f,currentFooterFormId:r,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,setCurrentFooterFormId:D,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onRevertJeSchedule:e.onRevertJeSchedule,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,onUpdateJESchedulesUIState:G,vendorSearchAutoCompleteActions:E,vendorSearchAutoCompleteData:w,onClearMatchNewModal:nt,onCloseMatchNewModal:ot,onIgnoreMatchSuggestion:it,onMatchAndReverse:rt,onOpenBill:at,onOpenMatch:X,onOpenMatchNewModal:st,onSearchMatchAccruals:lt,onSearchMatchTransactions:ct,onUndoReversal:dt,onUpdateActualMatchingUIState:pt});case"missing_receipts":return"Completed"===mt.fetchState&&0===mt.transactions.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:ut,title:getNavBarHeaderData(ut).allDoneText.title,subTitle:getNavBarHeaderData(ut).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(MissingReceiptsListTable,{onUpdateMissingReceiptsUIState:U,onFetchMissingReceiptsList:M,missingReceipts:mt,receiptUploadEndpoint:v,authParams:b,isAccountingClassesEnabled:S,selectedPeriod:gt,onMissingReceiptsRowClick:O,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onUploadReceiptAttachment:F});case"month_end_insights":if(null!=xt&&null!=y.monthEndCloseChecksView.monthEndCloseChecks){if("Not-Started"===xt.fetchState||"In-Progress"===xt.fetchState||"Not-Started"===xt.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===xt.companyMonthEndReportTemplatesData.fetchState)/* @__PURE__ */
97284
+ return jsxRuntimeExports.jsx(JESchedulePage,{closeMonth:e.closeMonth,isMatchPanelOpen:e.isMatchPanelOpen,isSchedulePanelOpen:e.isSchedulePanelOpen,matchPanelContent:e.matchPanelContent,schedulePanelActionBarContent:e.schedulePanelActionBarContent,schedulePanelContent:e.schedulePanelContent,schedulePendingDiscardConfirmation:e.schedulePendingDiscardConfirmation,accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,allDepreciationAccountListNestedAccountHierarchy:e.allDepreciationAccountListNestedAccountHierarchy,newAccrualAccountsView:e.newAccrualAccountsView,newScheduleSaveStatus:e.newScheduleSaveStatus,onCreateAccruedSchedule:e.onCreateAccruedSchedule,onCreateOneTimeAccrual:e.onCreateOneTimeAccrual,isAccountingClassesEnabled:S,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,isAccrualEnabled:g,newScheduleLocalData:m,initialSelectedBaseTransaction:h,onNewScheduleFormChange:x,expenseAutomationViewSelector:y,setResetJeAccountSettingsForm:f,currentFooterFormId:r,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,setCurrentFooterFormId:D,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onRevertJeSchedule:e.onRevertJeSchedule,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,onUpdateJESchedulesUIState:G,vendorSearchAutoCompleteActions:E,vendorSearchAutoCompleteData:w,onClearMatchNewModal:nt,onCloseMatchNewModal:ot,onIgnoreMatchSuggestion:it,onMatchAndReverse:rt,onOpenBill:at,onOpenMatch:X,onOpenMatchNewModal:st,onSearchMatchAccruals:lt,onSearchMatchTransactions:ct,onUndoReversal:dt,onUpdateActualMatchingUIState:pt});case"missing_receipts":return"Completed"===mt.fetchState&&0===mt.transactions.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:ut,title:getNavBarHeaderData(ut).allDoneText.title,subTitle:getNavBarHeaderData(ut).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(MissingReceiptsListTable,{onUpdateMissingReceiptsUIState:U,onFetchMissingReceiptsList:M,missingReceipts:mt,receiptUploadEndpoint:v,authParams:b,isAccountingClassesEnabled:S,selectedPeriod:gt,onMissingReceiptsRowClick:O,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onUploadReceiptAttachment:F});case"month_end_insights":if(null!=xt&&null!=y.monthEndCloseChecksView.monthEndCloseChecks){if("Not-Started"===xt.fetchState||"In-Progress"===xt.fetchState||"Not-Started"===xt.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===xt.companyMonthEndReportTemplatesData.fetchState)/* @__PURE__ */
97293
97285
  return jsxRuntimeExports.jsx(BusyIndication,{fetchState:"In-Progress"});{const e={application:"cockpit",companyId:A,entityId:A,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:xt.companyName,url:window.location.href},{url:t,...n}=e,o={...n};/* @__PURE__ */
97294
97286
  return jsxRuntimeExports.jsx(MonthEndInsightsContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(MonthEndInsightsForm,{allThreadsSectionOpen:I,customerRequestData:T,companyId:A,enableZeniGPTFeature:R,filterMetaData:o,selectedPeriod:y.selectedPeriod,improveUsingZeniGPTClick:pe,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:xt,newThreadMetadata:e,onClickCustomerRequest:Ce,onCloseAllThreadsSection:he,onCloseFileAttachmentSnackBar:Se,onOpenFileAttachmentSnackBar:ye,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,previewMode:j,previewMonthEndReport:xe,saveMonthEndReport:fe,onEditClick:ge,sendMonthEndReport:$e})})}}return null;case"flux_analysis":{const e=y.fluxAnalysis,t=e.fetchStatus.fetchState,n=e.sections.generalExpense.vendors.length>0||e.sections.reimbursement.vendors.length>0;return"Not-Started"===t||"In-Progress"===t&&!n?/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTableSkeleton,{}):"Completed"===t&&0===e.sections.generalExpense.vendors.length&&0===e.sections.reimbursement.vendors.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:ut,title:getNavBarHeaderData(ut).allDoneText.title,subTitle:getNavBarHeaderData(ut).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTable,{isAccountingClassesEnabled:S,fluxAnalysis:e,selectedPeriod:y.selectedPeriod,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ae,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Re,setCurrentFooterFormId:D,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,onFetchReimbursementView:Ee,redirectToVendorDetailPage:qe})}case"reconciliation":/* @__PURE__ */
97295
97287
  return jsxRuntimeExports.jsx(AccountReconciliationPage,{onReloadReconciliationListPage:V,currentFooterFormId:r,isAccountingClassesEnabled:S,reconciliation:yt,companyId:A,vendorSearchAutoCompleteActions:E,vendorSearchAutoCompleteData:w,onReviewClicked:Pe,onViewReportClicked:!0===et?Be:void 0,setOpenDrawerClicked:Me,setCurrentFooterFormId:D,onReconTabColumnSortConfigChanged:H,onUpdateReconcileTabLocalData:W,onEstablishConnectionClick:Oe,onFetchLinkTokenClick:Fe,updateReconReviewTabLocalData:Ne,onReconReviewTabColumnSortConfigChanged:ze,onSaveReconciliation:He,onSaveReconciliationReview:Ve,onReconListPageScroll:We,onReconMatchedTransactionClick:Ue,onAddStatementClick:Ge,onReconNodeCollapseToggled:Ze,onExcludeAccountFromReconciliation:Xe,onIncludeAccountIntoReconciliation:Je,isReconV3Enabled:tt});default:/* @__PURE__ */
@@ -99492,10 +99484,11 @@ return jsxRuntimeExports.jsxs(Card$1,{children:[
99492
99484
  min-width: 0;
99493
99485
  text-align: right;
99494
99486
  color: ${e=>e.theme.colors.hero};
99495
- `,{common:{strings:{hyphen:hyphen},texts:{revert:revertText}},dateFormat:dateFormat$7,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings,oneTimeAccrualType:oneTimeAccrualType}}}=appLocale.getLocalizedStrings(),detailsStrings=accrualDetailStrings.details,previewStrings=accrualDetailStrings.journalEntryPreview,JEOneTimeAccrualDetailPage=({accrual:e,actionFetchState:t,isAccountingClassesEnabled:n,isRenderedInPanel:o=!1,localData:i,newAccrualAccountsView:r,onAccrualFormChange:a,onAccrualFormClear:s,onApproveAndPost:l,onNavigateBack:c,onRevert:d,onSkip:p})=>{const[u,m]=useState(!1),[h,g]=useState(void 0),[x,f]=useState(void 0),y="In-Progress"===t,S=y&&"promote"===x,C=y&&"skip"===x,$=y&&"revert"===x,b=accrualActions(e.accrualStatus);useEffect(()=>{"In-Progress"!==t&&f(void 0)},[t]);const v=useForm({mode:"all",defaultValues:{amount:e.estimatedAmount.amount}}),{accrualId:A}=e,E=useRef(()=>{});E.current=()=>a(A,buildAccrualEdits(v.getValues(),e,r));const w=useRef(!0);useEffect(()=>(w.current=!0,()=>{w.current=!1}),[]),useEffect(()=>{const e=v.watch(()=>{defer(()=>{w.current&&E.current()})});return()=>e.unsubscribe()},[v]);const R=useRef(s);R.current=s,useEffect(()=>()=>R.current(A),[A]);const j=v.watch("amount"),T=u?j:e.estimatedAmount.amount,I=formatAccrualAmount(T),k=e.profileSnapshot?.monthlyTotals??[],L=resolveAccrualPreviewFields({creditAccount:v.watch("creditAccount"),debitAccount:v.watch("debitAccount"),debitClass:v.watch("debitClass"),reversalPolicy:v.watch("reversalPolicy")},e,r),D=L.reversalPolicy===REVERSAL_ON_BILL_MATCH,_=L.expectedReversalDate?.format(dateFormat$7.visual.MMMDCommaYYYYformat)??hyphen,P=D?detailsStrings.onInvoiceMatch:detailsStrings.onDate.replace("{date}",_),B=e.actualPostDate??e.postingDate,M=B?.format(dateFormat$7.visual.MMMDCommaYYYYformat)??hyphen;/* @__PURE__ */
99496
- return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavBarWithLaunch,{showLaunchIcon:!1,title:""!==e.vendorName?e.vendorName:oneTimeAccrualType,onBackClick:c,onLaunchClick:()=>{}}),
99497
- /* @__PURE__ */jsxRuntimeExports.jsxs(FormProvider,{...v,children:[
99498
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualHeader,{accrual:e,isEditingAmount:u,onEditAmount:()=>m(!0)}),
99487
+ `,{expenseAutomation:{jeSchedules:{actualMatching:{matchDetail:linkStrings}}}}=appLocale.getLocalizedStrings(),TEST_ID_PREFIX="je-one-time-accrual-detail";function JEOneTimeAccrualLinkedEntriesButton({accrual:e,onOpenJournalEntry:t}){const n=getAccrualJournalEntryTransaction(e);if(null==n)return null;const o=getReversalJournalEntryTransaction(e);/* @__PURE__ */
99488
+ return jsxRuntimeExports.jsx(LinkedRecordsMenuButton,{buttonTestId:generateDataTestId(TEST_ID_PREFIX,"open-links"),label:linkStrings.openLinkedRecords,menuTestId:generateDataTestId(TEST_ID_PREFIX,"links-menu"),sections:[{key:"journal-entries",title:linkStrings.journalEntries,items:[{key:"accrual-je",label:linkStrings.accrualJeShort,description:buildAccrualDocumentId(e,!1),target:n},{key:"reversal-je",label:null==o?linkStrings.pendingReversalJeShort:linkStrings.reversalJeShort,description:buildAccrualDocumentId(e,!0),target:o}]}],onOpenRecord:t})}const{common:{back:back$1,strings:{hyphen:hyphen},texts:{revert:revertText}},dateFormat:dateFormat$7,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings,oneTimeAccrualType:oneTimeAccrualType}}}=appLocale.getLocalizedStrings(),detailsStrings=accrualDetailStrings.details,previewStrings=accrualDetailStrings.journalEntryPreview,JEOneTimeAccrualDetailPage=({accrual:e,actionFetchState:t,isAccountingClassesEnabled:n,isRenderedInPanel:o=!1,localData:i,newAccrualAccountsView:r,onAccrualFormChange:a,onAccrualFormClear:s,onApproveAndPost:l,onNavigateBack:c,onOpenJournalEntry:d,onRevert:p,onSkip:u})=>{const m=useTheme(),[h,g]=useState(!1),[x,f]=useState(void 0),[y,S]=useState(void 0),C="In-Progress"===t,$=C&&"promote"===y,b=C&&"skip"===y,v=C&&"revert"===y,A=accrualActions(e.accrualStatus);useEffect(()=>{"In-Progress"!==t&&S(void 0)},[t]);const E=useForm({mode:"all",defaultValues:{amount:e.estimatedAmount.amount}}),{accrualId:w}=e,R=useRef(()=>{});R.current=()=>a(w,buildAccrualEdits(E.getValues(),e,r));const j=useRef(!0);useEffect(()=>(j.current=!0,()=>{j.current=!1}),[]),useEffect(()=>{const e=E.watch(()=>{defer(()=>{j.current&&R.current()})});return()=>e.unsubscribe()},[E]);const T=useRef(s);T.current=s,useEffect(()=>()=>T.current(w),[w]);const I=E.watch("amount"),k=h?I:e.estimatedAmount.amount,L=formatAccrualAmount(k),D=e.profileSnapshot?.monthlyTotals??[],_=resolveAccrualPreviewFields({creditAccount:E.watch("creditAccount"),debitAccount:E.watch("debitAccount"),debitClass:E.watch("debitClass"),reversalPolicy:E.watch("reversalPolicy")},e,r),P=_.reversalPolicy===REVERSAL_ON_BILL_MATCH,B=_.expectedReversalDate?.format(dateFormat$7.visual.MMMDCommaYYYYformat)??hyphen,M=P?detailsStrings.onInvoiceMatch:detailsStrings.onDate.replace("{date}",B),O=e.actualPostDate??e.postingDate,F=O?.format(dateFormat$7.visual.MMMDCommaYYYYformat)??hyphen;/* @__PURE__ */
99489
+ return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:""!==e.vendorName?e.vendorName:oneTimeAccrualType,source:"JEOneTimeAccrualDetail",backgroundColor:m.colors.grey5,enableTitleOnScroll:!0,onBackClick:c,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$1,enterDelay:TOOLTIP_ENTER_DELAY_MS,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper,{onClick:c,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back,{})})}),rightSideComponent:null==d?null:/* @__PURE__ */jsxRuntimeExports.jsx(JEOneTimeAccrualLinkedEntriesButton,{accrual:e,onOpenJournalEntry:d})})}),
99490
+ /* @__PURE__ */jsxRuntimeExports.jsxs(FormProvider,{...E,children:[
99491
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualHeader,{accrual:e,isEditingAmount:h,onEditAmount:()=>g(!0)}),
99499
99492
  /* @__PURE__ */jsxRuntimeExports.jsxs(ContentColumn$2,{children:[
99500
99493
  /* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
99501
99494
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionHeading$1,{children:detailsStrings.title}),
@@ -99503,13 +99496,13 @@ return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?n
99503
99496
  /* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
99504
99497
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionHeading$1,{children:accrualDetailStrings.billingPattern.title}),null!=e.profileSnapshot?/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualBillingPatternCard,{profileSnapshot:e.profileSnapshot,serviceMonth:e.serviceMonth}):/* @__PURE__ */jsxRuntimeExports.jsxs(EmptyStateCard,{children:[
99505
99498
  /* @__PURE__ */jsxRuntimeExports.jsx(EmptyStateTitle,{children:accrualDetailStrings.billingPattern.noHistoryTitle}),
99506
- /* @__PURE__ */jsxRuntimeExports.jsx(EmptyStateDescription,{children:accrualDetailStrings.billingPattern.noHistoryDescription})]})]}),k.length>0&&/* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
99499
+ /* @__PURE__ */jsxRuntimeExports.jsx(EmptyStateDescription,{children:accrualDetailStrings.billingPattern.noHistoryDescription})]})]}),D.length>0&&/* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
99507
99500
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionHeading$1,{children:accrualDetailStrings.calculationBreakdown.title}),
99508
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualCalculationBreakdownCard,{recommendedAccrual:formatAccrualAmount(e.aiSuggestion?.estimatedAmount?.amount??e.estimatedAmount.amount),rows:calculationRows(k)})]}),
99501
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualCalculationBreakdownCard,{recommendedAccrual:formatAccrualAmount(e.aiSuggestion?.estimatedAmount?.amount??e.estimatedAmount.amount),rows:calculationRows(D)})]}),
99509
99502
  /* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
99510
99503
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionHeading$1,{children:journalEntryTitle(e.accrualStatus)}),
99511
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualJournalEntryCard,{amount:I,autoReversalDetail:P,creditAccountName:""!==L.jeCreditAccountName?L.jeCreditAccountName:hyphen,debitAccountName:""!==L.jeDebitAccountName?L.jeDebitAccountName:hyphen,debitClassName:L.jeDebitAccountingClassName,postingDate:M})]})]}),b.canPromote&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{label:accrualDetailStrings.actions.skipThisMonth,isDisabled:y,isLoading:C,onClick:()=>g("skip")},primaryBtn:{label:accrualDetailStrings.actions.approveAndPost,isDisabled:y,isLoading:S,type:"button",onClick:()=>{y||(f("promote"),l(T))}},showCancel:!0}),b.canRevert&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{label:revertText,isDisabled:y,isLoading:$,type:"button",variant:"destructive",onClick:()=>g("revert")}})]}),
99512
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:I,isOpen:null!=h,isSubmitting:C||$,mode:h??"skip",vendorName:""!==e.vendorName?e.vendorName:hyphen,onClose:()=>g(void 0),onSubmit:(e,t)=>{const n="revert"===h;g(void 0),f(n?"revert":"skip"),n?d(e,t):p(e,t)}})]})};function journalEntryTitle(e){switch(e){case"posting":case"posted":case"reversing":return previewStrings.postedTitle;case"reversed":case"reverted":return previewStrings.reversedTitle;default:return previewStrings.title}}function calculationRows(e){return e.map(e=>({month:e.month,invoiceAmount:formatAccrualAmount(e.amount.amount)}))}const OuterContainer=styled$2.div`
99504
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualJournalEntryCard,{amount:L,autoReversalDetail:M,creditAccountName:""!==_.jeCreditAccountName?_.jeCreditAccountName:hyphen,debitAccountName:""!==_.jeDebitAccountName?_.jeDebitAccountName:hyphen,debitClassName:_.jeDebitAccountingClassName,postingDate:F})]})]}),A.canPromote&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{label:accrualDetailStrings.actions.skipThisMonth,isDisabled:C,isLoading:b,onClick:()=>f("skip")},primaryBtn:{label:accrualDetailStrings.actions.approveAndPost,isDisabled:C,isLoading:$,type:"button",onClick:()=>{C||(S("promote"),l(k))}},showCancel:!0}),A.canRevert&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{label:revertText,isDisabled:C,isLoading:v,type:"button",variant:"destructive",onClick:()=>f("revert")}})]}),
99505
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:L,isOpen:null!=x,isSubmitting:b||v,mode:x??"skip",vendorName:""!==e.vendorName?e.vendorName:hyphen,onClose:()=>f(void 0),onSubmit:(e,t)=>{const n="revert"===x;f(void 0),S(n?"revert":"skip"),n?p(e,t):u(e,t)}})]})};function journalEntryTitle(e){switch(e){case"posting":case"posted":case"reversing":return previewStrings.postedTitle;case"reversed":case"reverted":return previewStrings.reversedTitle;default:return previewStrings.title}}function calculationRows(e){return e.map(e=>({month:e.month,invoiceAmount:formatAccrualAmount(e.amount.amount)}))}const OuterContainer=styled$2.div`
99513
99506
  display: flex;
99514
99507
  flex-direction: column;
99515
99508
  width: 100%;
@@ -99518,6 +99511,30 @@ return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?n
99518
99511
  min-height: 100vh;
99519
99512
  `}
99520
99513
  background: ${e=>e.theme.colors.grey4};
99514
+ `,NavbarContainer=styled$2.div`
99515
+ position: sticky;
99516
+ z-index: 3;
99517
+ top: ${Space.sp0};
99518
+ width: 100%;
99519
+ `,BackButtonWrapper=styled$2.div`
99520
+ display: flex;
99521
+ align-items: center;
99522
+ justify-content: center;
99523
+ padding: ${Space.sp1};
99524
+ width: ${Space.sp4};
99525
+ height: ${Space.sp4};
99526
+ border-radius: ${Space.sp1};
99527
+ box-sizing: border-box;
99528
+ cursor: pointer;
99529
+ color: ${e=>e.theme.colors.champion};
99530
+ &:hover {
99531
+ background-color: ${e=>e.theme.colors.grey3};
99532
+ color: ${e=>e.theme.colors.primary};
99533
+ }
99534
+ `,Back=styled$2(SvgArrowLeft)`
99535
+ width: ${Space.sp3};
99536
+ height: ${Space.sp3};
99537
+ color: inherit;
99521
99538
  `,ContentColumn$2=styled$2.div`
99522
99539
  display: flex;
99523
99540
  flex-direction: column;
@@ -106880,5 +106897,5 @@ return jsxRuntimeExports.jsx(ModalContainer,{children:/* @__PURE__ */jsxRuntimeE
106880
106897
  padding: ${Space.sp3} ${Space.sp0};
106881
106898
  `,StyledButton=styled$2(Button$3)`
106882
106899
  min-width: 140px;
106883
- `;export{BillPayApprovalRuleDetailPage as $,AIAgentsActivatingPage as A,AiCfoScopeModalScrollBody as B,AiCfoSidePanel as C,AiCfoSkillsBrowser as D,AiFinanceTeamReadyPage as E,AllThreadsDrawer as F,AllThreadsSection as G,AllowBlockChipPicker as H,AnalyticsOnLoad as I,ApAgingDetailPage as J,AppBasePage as K,AppDrawerContent as L,AppDrawerHeightMobile as M,ApprovalRulesSettingsPage as N,ArAgingDetailPage as O,AskAiCfoNavButton as P,AskAiCfoNavButtonWhenEnabled as Q,AttachmentView as R,AutoSizer as S,AutoTransferRulePage as T,AvatarSVG$1 as U,BORDER_RADIUS_SELECT_FIELD as V,BackNavigationProvider as W,BankConnectionsSettingsPage as X,BillDetailPage as Y,BillDetailPageSkeleton as Z,BillPayApprovalRuleDetailPage$1 as _,AIIconButton as a,CompanyPassportCard as a$,BillPayApprovalRulesPage$1 as a0,BillPayApprovalRulesPage as a1,BillPayPromoPage as a2,BillPaySetUpPage as a3,BillingSettingsPage as a4,BillsBulkReviewDrawerPage as a5,BusinessVerificationPage as a6,BusyIndication as a7,Button$3 as a8,ButtonBase as a9,ChargeCardListPage as aA,ChargeCardListSkeletonRow as aB,ChargeCardPaymentHistoryPage as aC,ChargeCardPromoPage as aD,ChargeCardPromoPageSkeleton as aE,ChargeCardSetUpPage as aF,ChargeCardStatementsLoading as aG,ChargeCardStatementsPage as aH,ChargeCardUserOnboardingPromoPage as aI,ChargeCardUserOnboardingPromoPageSkeleton as aJ,CheckDepositDrawerPage as aK,Checkbox as aL,CircleWithAttachmentSuccessIcon as aM,CircularProgress as aN,ClickAwayListener as aO,ClickableRow as aP,CollaborationGlobalStyles as aQ,CollaborationProvider as aR,CollaborationRoomProvider as aS,Color$1 as aT,Colors as aU,CombinationOperatorButton as aV,CommentsAndNotesCount as aW,CommentsDrawerProvider as aX,CommonDot as aY,CompanyOfficerOnboardingDetailsSection as aZ,CompanyOnboardingDetailsSection as a_,ButtonWithDropDown as aa,CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT as ab,CARD_POLICY_LIMIT_ROW_ID_TRANSACTION as ac,COMMAND_CENTER_SUBMENU_TYPES as ad,COMMENTS_DRAWER_MAXIMUM_WIDTH as ae,COMMENTS_SECTION_MINIMUM_WIDTH as af,COMMENT_NOTIFICATION_KINDS as ag,CapitalizationOnboardingPopup as ah,CapitalizationSettingsSection as ai,CardPolicyCreatePage as aj,CardPolicyEditPage as ak,CardPolicyFormPageSkeleton as al,CardPolicyFormSections as am,CardPolicyListPage as an,CardPolicyListPageSkeleton as ao,CardPolicyListRow as ap,CardPolicyListSkeletonRow as aq,CardPolicyManualEmptyState as ar,CardsAiCfoHero as as,CardsShutdownBanner as at,CashbackDetailLoading as au,CashbackDetailPage as av,ChargeCardCVVActivate as aw,ChargeCardDetailLoading as ax,ChargeCardDetailPage as ay,ChargeCardListLoading as az,AIPerformancePage as b,FeaturePreviewPage as b$,CompanyPassportPage as b0,CompleteProfile as b1,ConfettiBurst as b2,ConfirmationPopUpDescription$2 as b3,ConfirmationPopUpTitle$3 as b4,ConfirmationPopup as b5,ConnectDataSourcesPage as b6,ContentLoaderSkeleton$1 as b7,ControlledComponent as b8,Controller as b9,DynamicConfigNames as bA,EMPTY_HTML_CHECKER as bB,EditPeoplePage as bC,EditReimbursementDetailPage as bD,EditableBillDetailPage as bE,Editor as bF,EmptySearchResults as bG,EntityAvatar as bH,EntityAvatarWithInitials as bI,EntityDetailPage as bJ,ErrorBoundaryWrapper as bK,ExcludedAccountReconDetailsDrawerPage as bL,ExpenseAutomationOverviewPage as bM,ExpenseAutomationOverviewPageSkeleton as bN,ExpenseAutomationPage as bO,ExpressPayPage as bP,ExtraLargeMedium as bQ,ExtraLargeRegular as bR,ExtraLargeSemiBold as bS,ExtraSmallBoldSp as bT,ExtraSmallRegular as bU,ExtraSmallRegularSp as bV,ExtraSmallSemiBold as bW,ExtraSmallSemiBoldSp as bX,EyebrowSmallSemiBoldSp as bY,FORM_MINIMUM_WIDTH as bZ,FeatureGatesNames as b_,CreateOrEditVendorPage as ba,CreateOrEditVendorPageSkeleton as bb,CreateTransactionButton as bc,CreateTransactionPage as bd,CreatedEntitiesAnswer as be,CreatingEntitiesAnswerLoading as bf,CreditCardPaymentDrawerPage as bg,CustomerOnboardingContainerPage as bh,CustomerOnboardingNoStepsPage as bi,CustomerOnboardingPage as bj,CustomerOnboardingProductSuitePage as bk,DIGITS_PATTERN as bl,DOMAIN_PATTERN as bm,Dashboard as bn,DashboardReportPage as bo,DashboardSidebarLogoAnimation as bp,DataListTable as bq,DataListTableHeader as br,DataListTableRow as bs,DataListTableSortIndicator as bt,DateRangeFilterField as bu,DebitCardSetPin as bv,Drawer as bw,DrawerPage as bx,DropdownOption$1 as by,DropdownPortalContext as bz,ALL_AI_CFO_MENU_OPTIONS as c,InvoicingDunningSettingsPage as c$,FeatureProvider as c0,FieldHelpIcon as c1,FieldHelpProvider as c2,FileAttachment as c3,FileInputElement as c4,FiltersPopover as c5,FirstReviewVendorDetailPage as c6,FixedSizeList as c7,FloatingThreads as c8,FontWeight as c9,InvoiceUploadSection as cA,InvoiceUploadSectionSkeleton as cB,InvoicingAddPaymentMethodDialog as cC,InvoicingAuditLogPage as cD,InvoicingBrandingSettingsPage as cE,InvoicingCatalogItemDetailPage as cF,InvoicingCatalogItemFormPage as cG,InvoicingCatalogPage as cH,InvoicingCouponFormPage as cI,InvoicingCreateInvoicePage as cJ,InvoicingCreateInvoiceSkeleton as cK,InvoicingCreatePromotionalCreditsDialog as cL,InvoicingCreditDetailPage as cM,InvoicingCreditListPage as cN,InvoicingCustomerDetailPage as cO,InvoicingCustomerFormPage as cP,InvoicingCustomerListPage as cQ,InvoicingDashboardSkeleton as cR,InvoicingDataImportDetailPage as cS,InvoicingDataImportHubPage as cT,InvoicingDataImportMigratePage as cU,InvoicingDetailScaffold as cV,InvoicingDiscountDetailPage as cW,InvoicingDiscountListPage as cX,InvoicingDunningDetailPage as cY,InvoicingDunningEmailComposerDialog as cZ,InvoicingDunningListPage as c_,Footer$7 as ca,FormProvider as cb,GlobalInfoProvider as cc,GlobalReviewListPage as cd,H5Regular as ce,H6Regular as cf,INPUT_BG_COLOR as cg,INPUT_BORDER_COLOR_SELECT_FIELD as ch,INPUT_COLOR as ci,INPUT_ERROR_BG_COLOR as cj,INPUT_HOVER_FOCUS_COLOR as ck,INPUT_PLACEHOLDER_COLOR as cl,INVOICING_SETTINGS_NAV_SECTIONS as cm,INVOICING_SETTINGS_TABS as cn,InfiniteLoader as co,InformationCardStack as cp,InitialCollaborationProvider as cq,InsightCardStack as cr,IntegrationCardView as cs,IntegrationsCardGrid as ct,IntegrationsSection as cu,IntegrationsSettingsPage as cv,InternationalWireVerificationPage as cw,InviteFormPage as cx,InvitePageListView as cy,InvitePeoplePage as cz,ALL_INVOICING_MENU_GROUPS as d,MatchingOperatorDropdown as d$,InvoicingEmptyState as d0,InvoicingIntegrationsSettingsPage as d1,InvoicingInvoiceDetailPage as d2,InvoicingInvoiceListPage as d3,InvoicingIssueCreditNotePage as d4,InvoicingOverviewPage as d5,InvoicingPaymentDestinationSettingsPage as d6,InvoicingPaymentLinkEmailComposerDialog as d7,InvoicingPaymentLinkPage as d8,InvoicingPaymentListPage as d9,LargeBoldSp as dA,LargeMedium as dB,LargeMediumSp as dC,LargeRegular as dD,LargeRegularA as dE,LargeRegularLabel as dF,LargeRegularSp as dG,LargeRegularTA as dH,LargeSemiBold as dI,LinkBillExpensePage as dJ,LinkJETransactionPage as dK,ListTableSkeleton as dL,Loader as dM,LogoutButton as dN,Lottie as dO,MCC_CHIP_ID_PREFIX as dP,MEETING_LINK_DEFAULTS as dQ,MENU_BG_COLOR as dR,MONTH_END_EDITOR_PLACEHOLDER as dS,MONTH_END_EMAIL_BODY_SECTION as dT,MONTH_END_EMAIL_EDITOR_SECTION as dU,MONTH_END_EMAIL_HEADER_SECTION as dV,MONTH_END_REPORT_CANVAS as dW,MagicLinkDomesticWireDetailsPage as dX,MagicLinkInternationalWireDetailsPage as dY,MagicLinkSuccessPage as dZ,MagicLinkVendorACHDetailsPage as d_,InvoicingPromoPage as da,InvoicingQBOSettingsPage as db,InvoicingRecordPaymentPage as dc,InvoicingSettingsHubPage as dd,InvoicingSubscriptionDetailPage as de,InvoicingSubscriptionFormPage as df,InvoicingSubscriptionListPage as dg,InvoicingTransactionDetailPage as dh,InvoicingVoidInvoiceDialog as di,IssueChargeCardPage as dj,IssueChargeCardPageSkeleton as dk,JEOneTimeAccrualDetailPage as dl,Label$g as dm,LabeledDatePickerField as dn,LabeledGroupedMultiSelectField as dp,LabeledGroupedSingleSelectField as dq,LabeledItemWithButton as dr,LabeledNameField as ds,LabeledRadioField as dt,LabeledReadOnlyTextField as du,LabeledSingleSelectNumericField as dv,LabeledSingleSelectPickerField as dw,LabeledSingleSelectWithoutClearableField as dx,LabeledTextField as dy,LabeledUnSafeCheckBoxField as dz,ALL_INVOICING_MENU_OPTIONS as e,ResponsiveSizedStyle as e$,Modal as e0,Modal$1 as e1,MonthCalendar as e2,MonthEndEmailDrawerCustomerRequestPage as e3,MonthEndReportCustomerRequestSection as e4,MonthEndReportSection as e5,MoreMenuButton$1 as e6,MyBankConnectionsSettingsPage as e7,MyPendingActivationChargeCardListPage as e8,MyProfileSettingsPage as e9,PeoplePage as eA,Picker as eB,PolicyLimitsRowList as eC,PolicyModeSelector as eD,Popover as eE,PortfolioAllocationFormPage as eF,PropTypes as eG,QBOConnectionDialog as eH,QBOSetupSectionWithForm as eI,QuickResponsesPage as eJ,QuickViewModeContext as eK,REALM_ID as eL,RIGHT_SIDE_PANEL_WIDTH_PX as eM,RecommendationFeedbackPopup as eN,ReconciliationReportPage as eO,ReimbursementApprovalRuleDetailPage$1 as eP,ReimbursementApprovalRuleDetailPage as eQ,ReimbursementApprovalRulesPage$1 as eR,ReimbursementApprovalRulesPage as eS,ReimbursementDetailPage as eT,ReimbursementDetailPageSkeleton as eU,ReimbursementPromoPage as eV,ReimbursementsBulkReviewDrawerPage as eW,ReloadContainer as eX,RemiSetupPage as eY,ReportsPage as eZ,ResponsiveSized as e_,NEW_CATEGORY_BODY$2 as ea,NEW_THREAD_SUFFIX as eb,NavBar as ec,NavBarRightRowStyled as ed,NavBarWithClose as ee,NewGlobalMerchantPage as ef,NewUpdateAvailablePage as eg,NotFoundPage as eh,NotificationSettingsPage as ei,NotificationsPage as ej,OAuthConsentPage as ek,OPTION_BG_COLOR as el,OPTION_DISABLED_BG_COLOR as em,OPTION_HOVER_FOCUS_BG_COLOR as en,OPTION_LABEL_COLOR as eo,OPTION_LABEL_DISABLED_COLOR as ep,OPTION_LABEL_HOVER_FOCUS_COLOR as eq,OnboardingInitialLoader as er,OnboardingSidebar as es,OnboardingStepFrame as et,OpExByVendorPage as eu,OverlayContainerPage as ev,PandLWithForecastPage as ew,PanelDirtyGuardContext as ex,PanelInternalContext as ey,PaymentAccountSetupBillingAddressSection as ez,ALL_SETTINGS_MENU_OPTIONS as f,SvgArrowTailTop as f$,ReviewBillDetailsPage as f0,ReviewConfirmTransferPanel as f1,ReviewDetailsPageSkeleton as f2,SUPPORTED_CREATE_TRANSACTION_TYPES as f3,ScheduleDetailSkeleton as f4,ScheduleDetailsAccruedExpensesPage as f5,ScheduleDetailsFixedAssetsPage as f6,ScheduleDetailsPage as f7,SearchBoxWithFilterButton as f8,SearchableCheckboxCardList as f9,StandardMedium as fA,StandardMediumA as fB,StandardMediumSp as fC,StandardMediumTA as fD,StandardRegular as fE,StandardRegularLabel as fF,StandardRegularLi as fG,StandardRegularSp as fH,StandardSemiBold as fI,StandardSemiBoldSp as fJ,StateManagedSelect$1 as fK,StatementParseInfoEntry as fL,StatementProcessingPage as fM,StatementsPage as fN,StickyThread as fO,StyledCapsule as fP,StyledCheckBox$1 as fQ,StyledText$c as fR,SubscriptionDetailPage as fS,SubscriptionSnackBar as fT,SubscriptionSummaryPage as fU,SvgAddRound as fV,SvgAlert as fW,SvgArrowBottom as fX,SvgArrowLeft as fY,SvgArrowRight as fZ,SvgArrowTailRight as f_,SessionTimeoutPopup as fa,SidePanelContext as fb,SidePanelLayout$1 as fc,SidePanelProvider as fd,SignIn as fe,SimpleDownloadMenuButton as ff,SingleSelectNumeric as fg,SingleSelectPickerField as fh,SingleSelectWithoutClearableField as fi,SmallMedium as fj,SmallMediumBtn as fk,SmallMediumSp as fl,SmallRegular as fm,SmallRegularA as fn,SmallRegularBtn as fo,SmallRegularInput as fp,SmallRegularP as fq,SmallRegularSp as fr,SmallRegularUl as fs,SmallSemiBoldSp as ft,SomethingWrongPage as fu,Space as fv,SpendManagementListLoading as fw,SpendManagementListViewPage as fx,SpendManagementSetUpLoading as fy,StandardBold as fz,ALPHA_NUMERIC_PATTERN as g,UserMultiSelectField as g$,SvgAvatar as g0,SvgClock as g1,SvgClose as g2,SvgCloseRound as g3,SvgComment as g4,SvgCompanyDetails as g5,SvgDelete as g6,SvgDoubleTick as g7,SvgEdit as g8,SvgEmail as g9,TenantsDropDown as gA,TextHighlightSection as gB,TextStyle as gC,ThreadComponent as gD,ThreadDotComponent as gE,ThreadsContext as gF,ToolkitProvider as gG,Tooltip$6 as gH,TopExDetailPage as gI,TransactionActivityLogPage as gJ,TransactionActivityLogPanel as gK,TransactionDetailPage as gL,TransactionDetailSkeleton as gM,TransactionListBig as gN,TransactionListComments as gO,TransactionListPage as gP,TransactionVendorDetailPage as gQ,TransferDrawerPage as gR,TreasuryOverviewPage as gS,TreasuryPromoPage as gT,TreasurySetUpPage as gU,TreasuryStatementsPage as gV,TreasuryTaxLetterPage as gW,TreasuryTransferOrReviewPage as gX,TrendChart as gY,UncategorizedAccountsMappingPage as gZ,UnitIntegrationPage as g_,SvgFlag as ga,SvgHighImportance as gb,SvgHighImportanceFill as gc,SvgHighImportanceFilled as gd,SvgInfinite as ge,SvgInfo as gf,SvgIntuitQuickBooksLogo as gg,SvgLoader as gh,SvgMore as gi,SvgNotification as gj,SvgOpenLink as gk,SvgPlayButtonSmall as gl,SvgQueryRound as gm,SvgRefresh as gn,SvgReload as go,SvgSearch as gp,SvgTick as gq,SvgTickRound as gr,SvgTickRoundFill as gs,SvgWarning as gt,SvgZeniLogoFull as gu,SyntheticAiCfoAnswerView as gv,THREAD_RESOLVED_NOTIFICATION_KIND as gw,THREAD_UNRESOLVED_NOTIFICATION_KIND as gx,TaskDetailPage as gy,TaskManagementPage as gz,APP_DRAWER_CONTENT_WIDTH_PX as h,darkTheme as h$,UserWithTimestamp as h0,VENDOR_CHIP_ID_PREFIX as h1,VariableSizeList as h2,Vendor2FAPopup as h3,VendorACHDetailsPage as h4,VendorAccruedSchedulesPage as h5,VendorDetailPage as h6,VendorDomesticWireDetailsPage as h7,VendorFiling1099DetailsEditablePage as h8,VendorFiling1099EditableFormSkeleton as h9,amountToString as hA,amountValueToString as hB,appLocale as hC,applyExtractedPolicyRulesToFormValues as hD,base64FileSize as hE,buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm as hF,buildCardPolicyFormValuesFromRequest as hG,buildCreateCardPolicyTemplateRequest as hH,buildCreateCardPolicyTemplateRequestFromInteractiveForm as hI,buildMccCategoryChipId as hJ,buildStickyKeySet as hK,buildVendorChipId as hL,capitaliseWords as hM,capitalize as hN,cellVerticalAlignToFlexAlign as hO,clearAutoLogoutContext as hP,clickableRowStyles as hQ,cloneDeep as hR,clsx$1 as hS,components as hT,composeClasses as hU,computeRecommendationSelectionFeedback as hV,computeStatementProcessingStepsFromElapsedTime as hW,computeStickyLeftOffsets as hX,createSvgIcon as hY,currencyAmountCompactFormatter as hZ,darkColors as h_,VendorFiling1099ListPage as ha,VendorFirstReviewPage as hb,VendorInternationalSwiftBasedDetailsPage as hc,VendorInternationalWireDetailsPage as hd,VendorListPage as he,VendorSchedulesPage as hf,VerificationFrame as hg,VerifyDevice as hh,VerifyUnlockFinancialStackPage as hi,WebV2MicroService as hj,WebV2MicroServiceProvider as hk,WelcomeAnimation as hl,WindowSizeProvider as hm,ZeniAccountDetailLoading as hn,ZeniAccountDetailNavBarTitleShimmer as ho,ZeniAccountDetailPage as hp,ZeniAccountListLoading as hq,ZeniAccountListViewPage as hr,ZeniAccountPromoPage as hs,ZeniAccountSetUpPage as ht,ZeniAvatar as hu,ZeniDatePickerField as hv,ZeniText as hw,ZeniThemeProvider as hx,activeElement as hy,alignToJustify$1 as hz,AccountInfoPage as i,lightColors as i$,debounce$1 as i0,debounce as i1,defaultCardPolicyFormValues as i2,defer as i3,describeSchedule as i4,designDimension as i5,fetchRequest as i6,fileDownload as i7,formHasDirtyFields as i8,formatReconAccountDisplayName as i9,getRichLabel as iA,getSelectionData as iB,getShowNegativeAmountInParenthesisDefaultValue as iC,getShowNegativeAmountInParenthesisForPercentDefaultValue as iD,getStableTransactionId as iE,getStatementParseTransactionCount as iF,getTagLabel as iG,getTemplatesFromTemplatedData as iH,getTransactionAppliedFiltersCount as iI,getTransactionTagColor$1 as iJ,getUpdatedFiltersOnCategoryChange$1 as iK,getUpdatedFiltersOnMatchingOperatorChange$1 as iL,getUpdatedFiltersOnValueChange$1 as iM,has as iN,hasAgentInsights as iO,invoicingMenuList as iP,isCloseManagementMenu as iQ,isClosedCardStatus as iR,isCollaborationEntityType as iS,isCommentNotificationKind as iT,isEqual$5 as iU,isLayoutSupported as iV,isMobileOrTabletView as iW,isMobilePhoneScreen as iX,isRecommendationFeedbackDimension as iY,isZeniAIUser as iZ,jsxRuntimeExports as i_,generateDataTestId as ia,generateUtilityClass as ib,generateUtilityClasses as ic,getAlpha2 as id,getAlpha3 as ie,getCockpitColor as ig,getColorForALabel as ih,getCountries$1 as ii,getCreateTransactionFieldConfig as ij,getCustomerDataFromAutoComplete as ik,getDefaultExportFromCjs as il,getDropdownStyles$1 as im,getFileNameFromResponseHeaders as io,getFilteredThreads as ip,getFullName$1 as iq,getHTMLWithCommentingSections as ir,getHistoricMonthsList as is,getInitialOpenThreadRequestFromSearch as it,getLabelColor as iu,getMonthIndex as iv,getMultiSelectDropdownStyles as iw,getRecipientTotalAmount as ix,getReconAccountDisplayName as iy,getReviewVendorTagColor as iz,AccountLockedInfoModal as j,useFormContext as j$,lightTheme as j0,memoTheme as j1,menuList as j2,mergeColumnDeclarativeWithRenderers as j3,mergeLayoutDefaults as j4,nanoid as j5,ownerDocument as j6,ownerWindow as j7,percentValueToString as j8,reactIsExports$1 as j9,toInstitutionLogoDataUri as jA,toInvoicingMenuOptionType as jB,toInvoicingMenuOptionTypeStrict as jC,toMccCategoryChipFieldValue as jD,toMenuOptionType as jE,toSettingsMenuOptionTypeStrict as jF,toSupportedLocaleStrict as jG,toVendorChipFieldValue as jH,trackTreasuryTransferAnalytics as jI,uploadAttachmentReceipts as jJ,useAgentInsightEdits as jK,useAnimation as jL,useApprovalRulesV3Config as jM,useBackNavigation as jN,useCollaborationInfoContext as jO,useCommentsDrawer as jP,useDefaultProps as jQ,useDelayUnmount as jR,useDropdownPortal as jS,useEnhancedEffect as jT,useEventCallback as jU,useExpenseAutomationEnabledForUser as jV,useFieldArray as jW,useFieldHelp as jX,useFilteredThreads as jY,useFloatingThreads as jZ,useForm as j_,refType as ja,requireToInteger as jb,requireToString as jc,require_baseProperty as jd,require_baseToString as je,require_castSlice as jf,require_hasUnicode as jg,require_stringToArray as jh,resolveBackgroundStatementProcessingCompletedSteps as ji,resolveColumnWidth as jj,roundAmountIfNeeded as jk,roundOffNumberToTwoDecimal as jl,routineIdFromSession as jm,scrollContainerToTargetAdjusted as jn,setAutoLogoutContext as jo,setShowNegativeAmountInParenthesisDefaultValue as jp,setShowNegativeAmountInParenthesisForPercentDefaultValue as jq,settingMenuList as jr,shortCadence as js,sp as jt,styled as ju,textAlignForCell as jv,textStyles as jw,toCollaborationEntityType as jx,toGroupedAccountingClassOptions as jy,toGroupedQboAccountOptions as jz,AccountReconDetailsDrawerPage$1 as k,useGlobalInfoContext as k0,useHandleSelection as k1,useIsCreateTransactionTypeAllowed as k2,useIsFeatureGateLoading as k3,useLockBodyScroll as k4,useMeetingLinks as k5,usePanelDirtyGuardRegistry as k6,usePanelInternal as k7,usePrevious$1 as k8,useQuickViewMode as k9,useRegisterBackHandler as ka,useRegisterPanelDirtyGuard as kb,useRequestCloseAllCommentDrawers as kc,useRtl as kd,useSessionAutoLogoutConfig as ke,useSidePanelContext as kf,useSlot as kg,useSlotProps as kh,useTheme as ki,useToolkitContext as kj,useWindowSizeContext as kk,useZeniCardsVisibilityConfig as kl,useZeniFeatureContext as km,useZeniThemeContext as kn,waitFor as ko,AccountReconDetailsDrawerPage as l,ActivityIndicator as m,ActualMatchingMatchDetailPage as n,AddAddressForCardDrawer as o,AddThreadFloating as p,AddThreadsComponent as q,AddToWalletPage as r,AddressFormPage as s,AgentInsightsEditor as t,AgingReportsPage as u,AiCfoChatHeader as v,AiCfoMenuContent as w,AiCfoOnboardingPage as x,AiCfoPage as y,AiCfoScopeModal as z};
106884
- //# sourceMappingURL=SessionTimeoutPopup-BDrzUHmk.js.map
106900
+ `;export{BillPayApprovalRuleDetailPage as $,AIAgentsActivatingPage as A,AiCfoScopeModalScrollBody as B,AiCfoSidePanel as C,AiCfoSkillsBrowser as D,AiFinanceTeamReadyPage as E,AllThreadsDrawer as F,AllThreadsSection as G,AllowBlockChipPicker as H,AnalyticsOnLoad as I,ApAgingDetailPage as J,AppBasePage as K,AppDrawerContent as L,AppDrawerHeightMobile as M,ApprovalRulesSettingsPage as N,ArAgingDetailPage as O,AskAiCfoNavButton as P,AskAiCfoNavButtonWhenEnabled as Q,AttachmentView as R,AutoSizer as S,AutoTransferRulePage as T,AvatarSVG$1 as U,BORDER_RADIUS_SELECT_FIELD as V,BackNavigationProvider as W,BankConnectionsSettingsPage as X,BillDetailPage as Y,BillDetailPageSkeleton as Z,BillPayApprovalRuleDetailPage$1 as _,AIIconButton as a,CompanyPassportCard as a$,BillPayApprovalRulesPage$1 as a0,BillPayApprovalRulesPage as a1,BillPayPromoPage as a2,BillPaySetUpPage as a3,BillingSettingsPage as a4,BillsBulkReviewDrawerPage as a5,BusinessVerificationPage as a6,BusyIndication as a7,Button$3 as a8,ButtonBase as a9,ChargeCardListPage as aA,ChargeCardListSkeletonRow as aB,ChargeCardPaymentHistoryPage as aC,ChargeCardPromoPage as aD,ChargeCardPromoPageSkeleton as aE,ChargeCardSetUpPage as aF,ChargeCardStatementsLoading as aG,ChargeCardStatementsPage as aH,ChargeCardUserOnboardingPromoPage as aI,ChargeCardUserOnboardingPromoPageSkeleton as aJ,CheckDepositDrawerPage as aK,Checkbox as aL,CircleWithAttachmentSuccessIcon as aM,CircularProgress as aN,ClickAwayListener as aO,ClickableRow as aP,CollaborationGlobalStyles as aQ,CollaborationProvider as aR,CollaborationRoomProvider as aS,Color$1 as aT,Colors as aU,CombinationOperatorButton as aV,CommentsAndNotesCount as aW,CommentsDrawerProvider as aX,CommonDot as aY,CompanyOfficerOnboardingDetailsSection as aZ,CompanyOnboardingDetailsSection as a_,ButtonWithDropDown as aa,CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT as ab,CARD_POLICY_LIMIT_ROW_ID_TRANSACTION as ac,COMMAND_CENTER_SUBMENU_TYPES as ad,COMMENTS_DRAWER_MAXIMUM_WIDTH as ae,COMMENTS_SECTION_MINIMUM_WIDTH as af,COMMENT_NOTIFICATION_KINDS as ag,CapitalizationOnboardingPopup as ah,CapitalizationSettingsSection as ai,CardPolicyCreatePage as aj,CardPolicyEditPage as ak,CardPolicyFormPageSkeleton as al,CardPolicyFormSections as am,CardPolicyListPage as an,CardPolicyListPageSkeleton as ao,CardPolicyListRow as ap,CardPolicyListSkeletonRow as aq,CardPolicyManualEmptyState as ar,CardsAiCfoHero as as,CardsShutdownBanner as at,CashbackDetailLoading as au,CashbackDetailPage as av,ChargeCardCVVActivate as aw,ChargeCardDetailLoading as ax,ChargeCardDetailPage as ay,ChargeCardListLoading as az,AIPerformancePage as b,FeaturePreviewPage as b$,CompanyPassportPage as b0,CompleteProfile as b1,ConfettiBurst as b2,ConfirmationPopUpDescription$2 as b3,ConfirmationPopUpTitle$3 as b4,ConfirmationPopup as b5,ConnectDataSourcesPage as b6,ContentLoaderSkeleton$1 as b7,ControlledComponent as b8,Controller as b9,DynamicConfigNames as bA,EMPTY_HTML_CHECKER as bB,EditPeoplePage as bC,EditReimbursementDetailPage as bD,EditableBillDetailPage as bE,Editor as bF,EmptySearchResults as bG,EntityAvatar as bH,EntityAvatarWithInitials as bI,EntityDetailPage as bJ,ErrorBoundaryWrapper as bK,ExcludedAccountReconDetailsDrawerPage as bL,ExpenseAutomationOverviewPage as bM,ExpenseAutomationOverviewPageSkeleton as bN,ExpenseAutomationPage as bO,ExpressPayPage as bP,ExtraLargeMedium as bQ,ExtraLargeRegular as bR,ExtraLargeSemiBold as bS,ExtraSmallBoldSp as bT,ExtraSmallRegular as bU,ExtraSmallRegularSp as bV,ExtraSmallSemiBold as bW,ExtraSmallSemiBoldSp as bX,EyebrowSmallSemiBoldSp as bY,FORM_MINIMUM_WIDTH as bZ,FeatureGatesNames as b_,CreateOrEditVendorPage as ba,CreateOrEditVendorPageSkeleton as bb,CreateTransactionButton as bc,CreateTransactionPage as bd,CreatedEntitiesAnswer as be,CreatingEntitiesAnswerLoading as bf,CreditCardPaymentDrawerPage as bg,CustomerOnboardingContainerPage as bh,CustomerOnboardingNoStepsPage as bi,CustomerOnboardingPage as bj,CustomerOnboardingProductSuitePage as bk,DIGITS_PATTERN as bl,DOMAIN_PATTERN as bm,Dashboard as bn,DashboardReportPage as bo,DashboardSidebarLogoAnimation as bp,DataListTable as bq,DataListTableHeader as br,DataListTableRow as bs,DataListTableSortIndicator as bt,DateRangeFilterField as bu,DebitCardSetPin as bv,Drawer as bw,DrawerPage as bx,DropdownOption$1 as by,DropdownPortalContext as bz,ALL_AI_CFO_MENU_OPTIONS as c,InvoicingDunningSettingsPage as c$,FeatureProvider as c0,FieldHelpIcon as c1,FieldHelpProvider as c2,FileAttachment as c3,FileInputElement as c4,FiltersPopover as c5,FirstReviewVendorDetailPage as c6,FixedSizeList as c7,FloatingThreads as c8,FontWeight as c9,InvoiceUploadSection as cA,InvoiceUploadSectionSkeleton as cB,InvoicingAddPaymentMethodDialog as cC,InvoicingAuditLogPage as cD,InvoicingBrandingSettingsPage as cE,InvoicingCatalogItemDetailPage as cF,InvoicingCatalogItemFormPage as cG,InvoicingCatalogPage as cH,InvoicingCouponFormPage as cI,InvoicingCreateInvoicePage as cJ,InvoicingCreateInvoiceSkeleton as cK,InvoicingCreatePromotionalCreditsDialog as cL,InvoicingCreditDetailPage as cM,InvoicingCreditListPage as cN,InvoicingCustomerDetailPage as cO,InvoicingCustomerFormPage as cP,InvoicingCustomerListPage as cQ,InvoicingDashboardSkeleton as cR,InvoicingDataImportDetailPage as cS,InvoicingDataImportHubPage as cT,InvoicingDataImportMigratePage as cU,InvoicingDetailScaffold as cV,InvoicingDiscountDetailPage as cW,InvoicingDiscountListPage as cX,InvoicingDunningDetailPage as cY,InvoicingDunningEmailComposerDialog as cZ,InvoicingDunningListPage as c_,Footer$7 as ca,FormProvider as cb,GlobalInfoProvider as cc,GlobalReviewListPage as cd,H5Regular as ce,H6Regular as cf,INPUT_BG_COLOR as cg,INPUT_BORDER_COLOR_SELECT_FIELD as ch,INPUT_COLOR as ci,INPUT_ERROR_BG_COLOR as cj,INPUT_HOVER_FOCUS_COLOR as ck,INPUT_PLACEHOLDER_COLOR as cl,INVOICING_SETTINGS_NAV_SECTIONS as cm,INVOICING_SETTINGS_TABS as cn,InfiniteLoader as co,InformationCardStack as cp,InitialCollaborationProvider as cq,InsightCardStack as cr,IntegrationCardView as cs,IntegrationsCardGrid as ct,IntegrationsSection as cu,IntegrationsSettingsPage as cv,InternationalWireVerificationPage as cw,InviteFormPage as cx,InvitePageListView as cy,InvitePeoplePage as cz,ALL_INVOICING_MENU_GROUPS as d,MagicLinkVendorACHDetailsPage as d$,InvoicingEmptyState as d0,InvoicingIntegrationsSettingsPage as d1,InvoicingInvoiceDetailPage as d2,InvoicingInvoiceListPage as d3,InvoicingIssueCreditNotePage as d4,InvoicingOverviewPage as d5,InvoicingPaymentDestinationSettingsPage as d6,InvoicingPaymentLinkEmailComposerDialog as d7,InvoicingPaymentLinkPage as d8,InvoicingPaymentListPage as d9,LabeledUnSafeCheckBoxField as dA,LargeBoldSp as dB,LargeMedium as dC,LargeMediumSp as dD,LargeRegular as dE,LargeRegularA as dF,LargeRegularLabel as dG,LargeRegularSp as dH,LargeRegularTA as dI,LargeSemiBold as dJ,LinkBillExpensePage as dK,LinkJETransactionPage as dL,ListTableSkeleton as dM,Loader as dN,LogoutButton as dO,Lottie as dP,MCC_CHIP_ID_PREFIX as dQ,MEETING_LINK_DEFAULTS as dR,MENU_BG_COLOR as dS,MONTH_END_EDITOR_PLACEHOLDER as dT,MONTH_END_EMAIL_BODY_SECTION as dU,MONTH_END_EMAIL_EDITOR_SECTION as dV,MONTH_END_EMAIL_HEADER_SECTION as dW,MONTH_END_REPORT_CANVAS as dX,MagicLinkDomesticWireDetailsPage as dY,MagicLinkInternationalWireDetailsPage as dZ,MagicLinkSuccessPage as d_,InvoicingPromoPage as da,InvoicingQBOSettingsPage as db,InvoicingRecordPaymentPage as dc,InvoicingSettingsHubPage as dd,InvoicingSubscriptionDetailPage as de,InvoicingSubscriptionFormPage as df,InvoicingSubscriptionListPage as dg,InvoicingTransactionDetailPage as dh,InvoicingVoidInvoiceDialog as di,IssueChargeCardPage as dj,IssueChargeCardPageSkeleton as dk,JEOneTimeAccrualDetailPage as dl,JEOneTimeAccrualLinkedEntriesButton as dm,Label$g as dn,LabeledDatePickerField as dp,LabeledGroupedMultiSelectField as dq,LabeledGroupedSingleSelectField as dr,LabeledItemWithButton as ds,LabeledNameField as dt,LabeledRadioField as du,LabeledReadOnlyTextField as dv,LabeledSingleSelectNumericField as dw,LabeledSingleSelectPickerField as dx,LabeledSingleSelectWithoutClearableField as dy,LabeledTextField as dz,ALL_INVOICING_MENU_OPTIONS as e,ResponsiveSized as e$,MatchingOperatorDropdown as e0,Modal as e1,Modal$1 as e2,MonthCalendar as e3,MonthEndEmailDrawerCustomerRequestPage as e4,MonthEndReportCustomerRequestSection as e5,MonthEndReportSection as e6,MoreMenuButton$1 as e7,MyBankConnectionsSettingsPage as e8,MyPendingActivationChargeCardListPage as e9,PaymentAccountSetupBillingAddressSection as eA,PeoplePage as eB,Picker as eC,PolicyLimitsRowList as eD,PolicyModeSelector as eE,Popover as eF,PortfolioAllocationFormPage as eG,PropTypes as eH,QBOConnectionDialog as eI,QBOSetupSectionWithForm as eJ,QuickResponsesPage as eK,QuickViewModeContext as eL,REALM_ID as eM,RIGHT_SIDE_PANEL_WIDTH_PX as eN,RecommendationFeedbackPopup as eO,ReconciliationReportPage as eP,ReimbursementApprovalRuleDetailPage$1 as eQ,ReimbursementApprovalRuleDetailPage as eR,ReimbursementApprovalRulesPage$1 as eS,ReimbursementApprovalRulesPage as eT,ReimbursementDetailPage as eU,ReimbursementDetailPageSkeleton as eV,ReimbursementPromoPage as eW,ReimbursementsBulkReviewDrawerPage as eX,ReloadContainer as eY,RemiSetupPage as eZ,ReportsPage as e_,MyProfileSettingsPage as ea,NEW_CATEGORY_BODY$2 as eb,NEW_THREAD_SUFFIX as ec,NavBar as ed,NavBarRightRowStyled as ee,NavBarWithClose as ef,NewGlobalMerchantPage as eg,NewUpdateAvailablePage as eh,NotFoundPage as ei,NotificationSettingsPage as ej,NotificationsPage as ek,OAuthConsentPage as el,OPTION_BG_COLOR as em,OPTION_DISABLED_BG_COLOR as en,OPTION_HOVER_FOCUS_BG_COLOR as eo,OPTION_LABEL_COLOR as ep,OPTION_LABEL_DISABLED_COLOR as eq,OPTION_LABEL_HOVER_FOCUS_COLOR as er,OnboardingInitialLoader as es,OnboardingSidebar as et,OnboardingStepFrame as eu,OpExByVendorPage as ev,OverlayContainerPage as ew,PandLWithForecastPage as ex,PanelDirtyGuardContext as ey,PanelInternalContext as ez,ALL_SETTINGS_MENU_OPTIONS as f,SvgArrowTailRight as f$,ResponsiveSizedStyle as f0,ReviewBillDetailsPage as f1,ReviewConfirmTransferPanel as f2,ReviewDetailsPageSkeleton as f3,SUPPORTED_CREATE_TRANSACTION_TYPES as f4,ScheduleDetailSkeleton as f5,ScheduleDetailsAccruedExpensesPage as f6,ScheduleDetailsFixedAssetsPage as f7,ScheduleDetailsPage as f8,SearchBoxWithFilterButton as f9,StandardBold as fA,StandardMedium as fB,StandardMediumA as fC,StandardMediumSp as fD,StandardMediumTA as fE,StandardRegular as fF,StandardRegularLabel as fG,StandardRegularLi as fH,StandardRegularSp as fI,StandardSemiBold as fJ,StandardSemiBoldSp as fK,StateManagedSelect$1 as fL,StatementParseInfoEntry as fM,StatementProcessingPage as fN,StatementsPage as fO,StickyThread as fP,StyledCapsule as fQ,StyledCheckBox$1 as fR,StyledText$c as fS,SubscriptionDetailPage as fT,SubscriptionSnackBar as fU,SubscriptionSummaryPage as fV,SvgAddRound as fW,SvgAlert as fX,SvgArrowBottom as fY,SvgArrowLeft as fZ,SvgArrowRight as f_,SearchableCheckboxCardList as fa,SessionTimeoutPopup as fb,SidePanelContext as fc,SidePanelLayout$1 as fd,SidePanelProvider as fe,SignIn as ff,SimpleDownloadMenuButton as fg,SingleSelectNumeric as fh,SingleSelectPickerField as fi,SingleSelectWithoutClearableField as fj,SmallMedium as fk,SmallMediumBtn as fl,SmallMediumSp as fm,SmallRegular as fn,SmallRegularA as fo,SmallRegularBtn as fp,SmallRegularInput as fq,SmallRegularP as fr,SmallRegularSp as fs,SmallRegularUl as ft,SmallSemiBoldSp as fu,SomethingWrongPage as fv,Space as fw,SpendManagementListLoading as fx,SpendManagementListViewPage as fy,SpendManagementSetUpLoading as fz,ALPHA_NUMERIC_PATTERN as g,UnitIntegrationPage as g$,SvgArrowTailTop as g0,SvgAvatar as g1,SvgClock as g2,SvgClose as g3,SvgCloseRound as g4,SvgComment as g5,SvgCompanyDetails as g6,SvgDelete as g7,SvgDoubleTick as g8,SvgEdit as g9,TaskManagementPage as gA,TenantsDropDown as gB,TextHighlightSection as gC,TextStyle as gD,ThreadComponent as gE,ThreadDotComponent as gF,ThreadsContext as gG,ToolkitProvider as gH,Tooltip$6 as gI,TopExDetailPage as gJ,TransactionActivityLogPage as gK,TransactionActivityLogPanel as gL,TransactionDetailPage as gM,TransactionDetailSkeleton as gN,TransactionListBig as gO,TransactionListComments as gP,TransactionListPage as gQ,TransactionVendorDetailPage as gR,TransferDrawerPage as gS,TreasuryOverviewPage as gT,TreasuryPromoPage as gU,TreasurySetUpPage as gV,TreasuryStatementsPage as gW,TreasuryTaxLetterPage as gX,TreasuryTransferOrReviewPage as gY,TrendChart as gZ,UncategorizedAccountsMappingPage as g_,SvgEmail as ga,SvgFlag as gb,SvgHighImportance as gc,SvgHighImportanceFill as gd,SvgHighImportanceFilled as ge,SvgInfinite as gf,SvgInfo as gg,SvgIntuitQuickBooksLogo as gh,SvgLoader as gi,SvgMore as gj,SvgNotification as gk,SvgOpenLink as gl,SvgPlayButtonSmall as gm,SvgQueryRound as gn,SvgRefresh as go,SvgReload as gp,SvgSearch as gq,SvgTick as gr,SvgTickRound as gs,SvgTickRoundFill as gt,SvgWarning as gu,SvgZeniLogoFull as gv,SyntheticAiCfoAnswerView as gw,THREAD_RESOLVED_NOTIFICATION_KIND as gx,THREAD_UNRESOLVED_NOTIFICATION_KIND as gy,TaskDetailPage as gz,APP_DRAWER_CONTENT_WIDTH_PX as h,darkColors as h$,UserMultiSelectField as h0,UserWithTimestamp as h1,VENDOR_CHIP_ID_PREFIX as h2,VariableSizeList as h3,Vendor2FAPopup as h4,VendorACHDetailsPage as h5,VendorAccruedSchedulesPage as h6,VendorDetailPage as h7,VendorDomesticWireDetailsPage as h8,VendorFiling1099DetailsEditablePage as h9,alignToJustify$1 as hA,amountToString as hB,amountValueToString as hC,appLocale as hD,applyExtractedPolicyRulesToFormValues as hE,base64FileSize as hF,buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm as hG,buildCardPolicyFormValuesFromRequest as hH,buildCreateCardPolicyTemplateRequest as hI,buildCreateCardPolicyTemplateRequestFromInteractiveForm as hJ,buildMccCategoryChipId as hK,buildStickyKeySet as hL,buildVendorChipId as hM,capitaliseWords as hN,capitalize as hO,cellVerticalAlignToFlexAlign as hP,clearAutoLogoutContext as hQ,clickableRowStyles as hR,cloneDeep as hS,clsx$1 as hT,components as hU,composeClasses as hV,computeRecommendationSelectionFeedback as hW,computeStatementProcessingStepsFromElapsedTime as hX,computeStickyLeftOffsets as hY,createSvgIcon as hZ,currencyAmountCompactFormatter as h_,VendorFiling1099EditableFormSkeleton as ha,VendorFiling1099ListPage as hb,VendorFirstReviewPage as hc,VendorInternationalSwiftBasedDetailsPage as hd,VendorInternationalWireDetailsPage as he,VendorListPage as hf,VendorSchedulesPage as hg,VerificationFrame as hh,VerifyDevice as hi,VerifyUnlockFinancialStackPage as hj,WebV2MicroService as hk,WebV2MicroServiceProvider as hl,WelcomeAnimation as hm,WindowSizeProvider as hn,ZeniAccountDetailLoading as ho,ZeniAccountDetailNavBarTitleShimmer as hp,ZeniAccountDetailPage as hq,ZeniAccountListLoading as hr,ZeniAccountListViewPage as hs,ZeniAccountPromoPage as ht,ZeniAccountSetUpPage as hu,ZeniAvatar as hv,ZeniDatePickerField as hw,ZeniText as hx,ZeniThemeProvider as hy,activeElement as hz,AccountInfoPage as i,jsxRuntimeExports as i$,darkTheme as i0,debounce$1 as i1,debounce as i2,defaultCardPolicyFormValues as i3,defer as i4,describeSchedule as i5,designDimension as i6,fetchRequest as i7,fileDownload as i8,formHasDirtyFields as i9,getReviewVendorTagColor as iA,getRichLabel as iB,getSelectionData as iC,getShowNegativeAmountInParenthesisDefaultValue as iD,getShowNegativeAmountInParenthesisForPercentDefaultValue as iE,getStableTransactionId as iF,getStatementParseTransactionCount as iG,getTagLabel as iH,getTemplatesFromTemplatedData as iI,getTransactionAppliedFiltersCount as iJ,getTransactionTagColor$1 as iK,getUpdatedFiltersOnCategoryChange$1 as iL,getUpdatedFiltersOnMatchingOperatorChange$1 as iM,getUpdatedFiltersOnValueChange$1 as iN,has as iO,hasAgentInsights as iP,invoicingMenuList as iQ,isCloseManagementMenu as iR,isClosedCardStatus as iS,isCollaborationEntityType as iT,isCommentNotificationKind as iU,isEqual$5 as iV,isLayoutSupported as iW,isMobileOrTabletView as iX,isMobilePhoneScreen as iY,isRecommendationFeedbackDimension as iZ,isZeniAIUser as i_,formatReconAccountDisplayName as ia,generateDataTestId as ib,generateUtilityClass as ic,generateUtilityClasses as id,getAlpha2 as ie,getAlpha3 as ig,getCockpitColor as ih,getColorForALabel as ii,getCountries$1 as ij,getCreateTransactionFieldConfig as ik,getCustomerDataFromAutoComplete as il,getDefaultExportFromCjs as im,getDropdownStyles$1 as io,getFileNameFromResponseHeaders as ip,getFilteredThreads as iq,getFullName$1 as ir,getHTMLWithCommentingSections as is,getHistoricMonthsList as it,getInitialOpenThreadRequestFromSearch as iu,getLabelColor as iv,getMonthIndex as iw,getMultiSelectDropdownStyles as ix,getRecipientTotalAmount as iy,getReconAccountDisplayName as iz,AccountLockedInfoModal as j,useForm as j$,lightColors as j0,lightTheme as j1,memoTheme as j2,menuList as j3,mergeColumnDeclarativeWithRenderers as j4,mergeLayoutDefaults as j5,nanoid as j6,ownerDocument as j7,ownerWindow as j8,percentValueToString as j9,toGroupedQboAccountOptions as jA,toInstitutionLogoDataUri as jB,toInvoicingMenuOptionType as jC,toInvoicingMenuOptionTypeStrict as jD,toMccCategoryChipFieldValue as jE,toMenuOptionType as jF,toSettingsMenuOptionTypeStrict as jG,toSupportedLocaleStrict as jH,toVendorChipFieldValue as jI,trackTreasuryTransferAnalytics as jJ,uploadAttachmentReceipts as jK,useAgentInsightEdits as jL,useAnimation as jM,useApprovalRulesV3Config as jN,useBackNavigation as jO,useCollaborationInfoContext as jP,useCommentsDrawer as jQ,useDefaultProps as jR,useDelayUnmount as jS,useDropdownPortal as jT,useEnhancedEffect as jU,useEventCallback as jV,useExpenseAutomationEnabledForUser as jW,useFieldArray as jX,useFieldHelp as jY,useFilteredThreads as jZ,useFloatingThreads as j_,reactIsExports$1 as ja,refType as jb,requireToInteger as jc,requireToString as jd,require_baseProperty as je,require_baseToString as jf,require_castSlice as jg,require_hasUnicode as jh,require_stringToArray as ji,resolveBackgroundStatementProcessingCompletedSteps as jj,resolveColumnWidth as jk,roundAmountIfNeeded as jl,roundOffNumberToTwoDecimal as jm,routineIdFromSession as jn,scrollContainerToTargetAdjusted as jo,setAutoLogoutContext as jp,setShowNegativeAmountInParenthesisDefaultValue as jq,setShowNegativeAmountInParenthesisForPercentDefaultValue as jr,settingMenuList as js,shortCadence as jt,sp as ju,styled as jv,textAlignForCell as jw,textStyles as jx,toCollaborationEntityType as jy,toGroupedAccountingClassOptions as jz,AccountReconDetailsDrawerPage$1 as k,useFormContext as k0,useGlobalInfoContext as k1,useHandleSelection as k2,useIsCreateTransactionTypeAllowed as k3,useIsFeatureGateLoading as k4,useLockBodyScroll as k5,useMeetingLinks as k6,usePanelDirtyGuardRegistry as k7,usePanelInternal as k8,usePrevious$1 as k9,useQuickViewMode as ka,useRegisterBackHandler as kb,useRegisterPanelDirtyGuard as kc,useRequestCloseAllCommentDrawers as kd,useRtl as ke,useSessionAutoLogoutConfig as kf,useSidePanelContext as kg,useSlot as kh,useSlotProps as ki,useTheme as kj,useToolkitContext as kk,useWindowSizeContext as kl,useZeniCardsVisibilityConfig as km,useZeniFeatureContext as kn,useZeniThemeContext as ko,waitFor as kp,AccountReconDetailsDrawerPage as l,ActivityIndicator as m,ActualMatchingMatchDetailPage as n,AddAddressForCardDrawer as o,AddThreadFloating as p,AddThreadsComponent as q,AddToWalletPage as r,AddressFormPage as s,AgentInsightsEditor as t,AgingReportsPage as u,AiCfoChatHeader as v,AiCfoMenuContent as w,AiCfoOnboardingPage as x,AiCfoPage as y,AiCfoScopeModal as z};
106901
+ //# sourceMappingURL=SessionTimeoutPopup-DEfBJy53.js.map