1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7e20ed1f-e6c5-4c23-a78b-5bb4aeb86674",e._sentryDebugIdIdentifier="sentry-dbid-7e20ed1f-e6c5-4c23-a78b-5bb4aeb86674")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"2b92991d99f92e33e079a8241d5dc3965c249983"},(self.webpackChunkkudos_portal=self.webpackChunkkudos_portal||[]).push([[5255],{7675:(e,t,r)=>{r.d(t,{o:()=>o});var n=r(85608),a=r(14041);function o({sendMessage:e,isDisabled:t}){const[r,o]=(0,a.useState)(""),[l,i]=(0,a.useState)(!1),s=(0,a.useCallback)(()=>(0,n.sH)(this,void 0,void 0,function*(){const n=r.trim();if(n&&!t){i(!0),o("");try{yield e(n)}finally{i(!1)}}}),[r,t,e]);return{text:r,setText:o,isEmpty:0===r.trim().length,submit:s,isSubmitting:l,isDisabled:t}}},7771:(e,t,r)=>{r.d(t,{z:()=>j});var n,a,o=r(14041),l=r(76990),i=r(48774),s=r(12243);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(null,arguments)}const d=function(e){return o.createElement("svg",c({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=o.createElement("circle",{cx:8,cy:8,r:5.83,fill:"#6055F6",stroke:"#fff"})),a||(a=o.createElement("path",{d:"m5.5 8 1.55 1.5 3.12-3.33",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round"})))};var m,p;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(null,arguments)}const h=function(e){return o.createElement("svg",u({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),m||(m=o.createElement("path",{d:"M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z",fill:"#434A55",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round"})),p||(p=o.createElement("path",{d:"M6.58 6.46a1.587 1.587 0 0 1 1.27-1.08 1.58 1.58 0 0 1 1.54.64c.17.24.28.52.3.81.02.29-.03.59-.17.85-.13.26-.34.48-.59.64-.25.15-.54.23-.83.23v.64m.02 1.3v.04h-.04v-.04h.04Z",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round"})))};var g=r(32268);const y=l.Ay.div` 2 display: flex; 3 flex-direction: column; 4 gap: 6px; 5 align-items: center; 6 justify-content: center; 7 overflow: hidden; 8 padding: 10px; 9 background-color: ${({theme:e})=>e.colors.bg.accent.purpleSecondary}; 10 border-radius: 5px; 11 width: 100%; 12`,x=l.Ay.div` 13 display: flex; 14 align-items: center; 15 justify-content: space-between; 16 width: 100%; 17`,f=l.Ay.div` 18 display: flex; 19 align-items: center; 20 gap: 2px; 21`,b=l.Ay.div` 22 position: relative; 23 height: 22px; 24`,v=l.Ay.div` 25 position: absolute; 26 bottom: 0; 27 display: flex; 28 align-items: center; 29 justify-content: flex-end; 30`,E=l.Ay.img` 31 width: 29px; 32 height: 18px; 33 border-radius: 1.68px; 34 border: 1px solid ${({theme:e})=>e.colors.bg.accent.purpleSecondary}; 35 object-fit: cover; 36 flex-shrink: 0; 37 38 &:not(:last-child) { 39 margin-right: -24px; 40 } 41`,w=l.Ay.div` 42 width: 29px; 43 height: 18px; 44 border-radius: 1.68px; 45 border: 1px solid ${({theme:e})=>e.colors.bg.accent.purpleSecondary}; 46 background-color: ${({theme:e})=>e.colors.bg.tertiary||"#ddd"}; 47 flex-shrink: 0; 48 49 &:not(:last-child) { 50 margin-right: -24px; 51 } 52`,$=l.Ay.div` 53 position: absolute; 54 top: -4px; 55 right: 0; 56 width: 16px; 57 height: 16px; 58 z-index: 10; 59`,A=l.Ay.button` 60 background: none; 61 border: none; 62 padding: 0; 63 cursor: pointer; 64 display: flex; 65 align-items: center; 66 justify-content: center; 67 width: 20px; 68 height: 20px; 69 border-radius: 100px; 70 flex-shrink: 0; 71 color: ${({theme:e})=>e.colors.icon.inactive}; 72`,k=l.Ay.div` 73 display: flex; 74 align-items: center; 75 width: 100%; 76`,C=l.Ay.p` 77 ${s.hm} 78 color: ${({theme:e})=>e.colors.text.accent.purple}; 79 margin: 0; 80 flex: 1; 81 min-width: 0; 82`,S=l.Ay.button` 83 all: unset; 84 text-decoration: underline; 85 cursor: pointer; 86 color: inherit; 87 font: inherit; 88`,j=({unconnectedCards:e=[],connectedCards:t=[],onConnect:r,onDismiss:n})=>{const a=1===e.length&&0===t.length,l=t.length+e.length,s=t.slice(0,3),c=e.slice(0,3);return o.createElement(y,{"data-testid":"plaid-connection-prompt"},o.createElement(x,null,o.createElement(f,null,s.length>0&&o.createElement(b,{style:{width:29+5*(s.length-1)+8}},o.createElement(v,null,s.map(e=>e.imageUri?o.createElement(E,{key:e.id,src:e.imageUri,alt:e.name}):o.createElement(w,{key:e.id}))),o.createElement($,null,o.createElement(i.A,{icon:d,size:16}))),o.createElement(b,{style:{width:29+5*(c.length-1)+8}},o.createElement(v,null,c.map(e=>e.imageUri?o.createElement(E,{key:e.id,src:e.imageUri,alt:e.name}):o.createElement(w,{key:e.id}))),o.createElement($,null,o.createElement(i.A,{icon:h,size:16})))),o.createElement(A,{onClick:n,"aria-label":"Dismiss"},o.createElement(i.A,{icon:g.A,size:20}))),o.createElement(k,null,o.createElement(C,null,a?o.createElement(o.Fragment,null,`We don't have data on your ${e[0].name} card, `,o.createElement(S,{onClick:r},"Connect now to unlock insights.")):o.createElement(o.Fragment,null,`Insights are from ${t.length} of ${l} cards. For a complete view, `,o.createElement(S,{onClick:r}
88,"Connect your remaining cards.")))))}},9189:(e,t,r)=>{r.d(t,{q:()=>l,u:()=>i});var n=r(85608),a=r(14041);class o{constructor(){this.dataRenderers={},this.toolCallRenderers={},this.listeners=new Set}getDataRenderers(){return this.dataRenderers}getToolRenderers(){return this.toolCallRenderers}registerDataRenderer(e,t){return this.dataRenderers=Object.assign(Object.assign({},this.dataRenderers),{[e]:t}),this.notify(),()=>{const t=this.dataRenderers,r=e,a=(t[r],(0,n.Tt)(t,["symbol"==typeof r?r:r+""]));this.dataRenderers=a,this.notify()}}registerToolRenderer(e,t){return this.toolCallRenderers=Object.assign(Object.assign({},this.toolCallRenderers),{[e]:t}),this.notify(),()=>{const t=this.toolCallRenderers,r=e,a=(t[r],(0,n.Tt)(t,["symbol"==typeof r?r:r+""]));this.toolCallRenderers=a,this.notify()}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(){this.listeners.forEach(e=>e())}}function l(){const e=(0,a.useRef)(null);return e.current||(e.current=new o),e.current}function i(e){const t=(0,a.useSyncExternalStore)((0,a.useCallback)(t=>e.subscribe(t),[e]),()=>e.getDataRenderers()),r=(0,a.useSyncExternalStore)((0,a.useCallback)(t=>e.subscribe(t),[e]),()=>e.getToolRenderers());return(0,a.useMemo)(()=>({dataRenderers:t,toolRenderers:r}),[t,r])}},12193:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(14041),a=r(79390);function o(e){return(0,n.useMemo)(()=>{const t=e[e.length-1];if(!t||t.role!==a.MWS.Assistant||"complete"!==t.status.type)return[];const r=t.parts.find(e=>"action"===e.type);return r&&"action"===r.type?r.actions:[]},[e])}},15551:(e,t,r)=>{r.d(t,{CI:()=>l,E4:()=>a,r_:()=>o});var n=r(14041);const a=(0,n.createContext)(null),o=(0,n.createContext)({renderers:{},toolRenderers:{}}),l=()=>(0,n.useContext)(o)},36246:(e,t,r)=>{r.d(t,{S:()=>n});const n=(0,r(14041).createContext)(null)},53049:(e,t,r)=>{r.d(t,{U:()=>c});var n=r(85608),a=r(14041),o=r(79390);const l={thread:{id:"",messages:[],createdAt:new Date},status:"idle",error:null};function i(e,t){switch(t.type){case"INIT_SESSION":return{thread:{id:t.sessionId,messages:t.messages,createdAt:new Date},status:"idle",error:null};case"ADD_MESSAGE":return Object.assign(Object.assign({},e),{thread:Object.assign(Object.assign({},e.thread),{messages:[...e.thread.messages,t.message]})});case"UPDATE_STREAMING_PARTS":{const r=e.thread.messages.map(e=>e.id===t.messageId?Object.assign(Object.assign({},e),{parts:t.parts,status:{type:"streaming"}}):e);return Object.assign(Object.assign({},e),{thread:Object.assign(Object.assign({},e.thread),{messages:r}),status:"streaming"})}case"COMPLETE_MESSAGE":{const r=e.thread.messages.map(e=>e.id===t.message.id?Object.assign(Object.assign({},t.message),{status:{type:"complete"}}):e);return Object.assign(Object.assign({},e),{thread:Object.assign(Object.assign({},e.thread),{messages:r}),status:"idle"})}case"SET_STATUS":return Object.assign(Object.assign({},e),{status:t.status});case"SET_ERROR":return Object.assign(Object.assign({},e),{status:"error",error:t.error});case"RESET":return l;default:return e}}function s(){return`msg-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}function c({adapter:e,sessionId:t,onSessionStart:r,onError:c}){const[d,m]=(0,a.useReducer)(i,l),p=(0,a.useRef)(!1),u=(0,a.useCallback)(()=>(0,n.sH)(this,void 0,void 0,function*(){m({type:"SET_STATUS",status:"loading"});try{if(t&&e.loadHistory){const r=yield e.loadHistory(t);m({type:"INIT_SESSION",sessionId:t,messages:r})}else{const t=yield e.startSession();m({type:"INIT_SESSION",sessionId:t.sessionId,messages:t.messages}),null==r||r(t.sessionId)}}catch(e){const t=e instanceof Error?e.message:"Failed to initialize session";m({type:"SET_ERROR",error:t}),null==c||c(t)}}),[e,t,r,c]);(0,a.useEffect)(()=>{p.current=!0,u()},[u]);const h=(0,a.useCallback)(t=>(0,n.sH)(this,void 0,void 0,function*(){const r={id:s(),role:o.MWS.User,parts:t,status:{type:"complete"},createdAt:new Date,sessionId:d.thread.id};m({type:"ADD_MESSAGE",message:r}),m({type:"SET_STATUS",status:"loading"});try{if(e.capabilities.streaming){const t=s(),n={id:t,role:o.MWS.Assistant,parts:[],status:{type:"streaming"},createdAt:new Date,sessionId:d.thread.id};m({type:"ADD_MESSAGE",message:n});const a={onPart:(e,r)=>{m({type:"UPDATE_STREAMING_PARTS",messageId:t,parts:r})},onComplete:e=>{m({type:"COMPLETE_MESSAGE",message:Object.assign(Object.assign({},e),{id:t})})},onError:e=>{m({type:"COMPLETE_MESSAGE",message:Object.assign(Object.assign({},n),{parts:[{type:"text",text:e}],status:{type:"error",error:e}})}),null==c||c(e)}};yield e.sendMessage(r,a)}else{const t=yield e.sendMessage(r);m({type:"ADD_MESSAGE",message:t}),m({type:"SET_STATUS",status:"idle"})}}catch(e){const t=e instanceof Error?e.message:"Failed to send message";m({type:"SET_ERROR",error:t}),null==c||c(t)}}),[e,d.thread.id,c]),g=(0,a.useCallback)(e=>(0,n.sH)(this,void 0,void 0,function*(){yield h([{type:"text",text:e}])}),[h]),y=(0,a.useCallback)(()=>(0,n.sH)(this,void 0,void 0,function*(){m({type:"RESET"}),p.current=!1,yield u()}),[u]),x=(0,a.useCallback)(()=>{var t;null===(t=e.abort)||void 0===t||t.call(e),m({type:"SET_STATUS",status:"idle"})},[e]);return{state:d,dispatch:m,sendMessage:g,sendParts:h,resetSession:y,abort:x,isLoading:"loading"===d.status||"streaming"===d.status}}},56313:(e,t,r)=>{r.d(t,{V:()=>h,q:()=>p});var n=r(14041),a=r(76990),o=r(12243),l=r(95798),i=r(70600);const s=a.Ay.div` 89 display: flex; 90 flex-direction: column; 91 align-items: center; 92 gap: 8px; 93 padding: 16px; 94 background-color: ${({theme:e})=>e.colors.bg.primary}; 95 box-shadow: 0 -2px 4px rgba(11, 19, 31, 0.08); 96`,c=a.Ay.div` 97 display: flex; 98 align-items: center; 99 gap: 10px; 100 width: 100%; 101 padding: 4px 4px 4px 16px; 102 border-radius: 48px; 103 border: 1.5px solid ${({theme:e})=>e.colors.border.primary}; 104 backdrop-filter: blur(8px); 105 box-shadow: 0 2px 16px rgba(11, 19, 31, 0.16); 106 transition: all 150ms ease-out; 107 108 ${({$focused:e})=>e&&a.AH` 109 ${l.Oc} 110 `} 111`,d=a.Ay.textarea` 112 ${o.RS} 113 flex: 1; 114 resize: none; 115 border: none; 116 background: transparent; 117 color: ${({theme:e})=>e.colors.text.primary}; 118 font-family: ${({theme:e})=>e.fonts.body}; 119 outline: none; 120 min-height: 20px; 121 max-height: ${({$maxRows:e})=>20*e+4}px; 122 overflow-y: auto; 123 line-height: 20px; 124 padding: 10px 0; 125 126 &::placeholder { 127 color: ${({theme:e})=>e.colors.text.tertiary}; 128 } 129 130 &:disabled { 131 opacity: 0.5;
132 cursor: not-allowed; 133 } 134`,m=a.Ay.button` 135 width: 40px; 136 height: 40px; 137 min-width: 40px; 138 border-radius: 100px; 139 border: none; 140 display: flex; 141 align-items: center; 142 justify-content: center; 143 transition: all 150ms ease-out; 144 145 background-color: ${({theme:e,$canSend:t})=>t?e.colors.button.primary:e.colors.button.disabled}; 146 color: ${({theme:e,$canSend:t})=>t?e.colors.icon.inverse:e.colors.icon.disabled}; 147 cursor: ${({$canSend:e})=>e?"pointer":"default"}; 148 149 ${({$canSend:e})=>e&&a.AH` 150 &:hover { 151 background-color: ${({theme:e})=>e.colors.button.primaryHover}; 152 transform: scale(1.05); 153 } 154 &:active { 155 background-color: ${({theme:e})=>e.colors.button.primaryPressed}; 156 transform: scale(0.95); 157 } 158 `} 159`,p=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),n.createElement("polyline",{points:"5 12 12 5 19 12"})),u=a.Ay.span` 160 ${o.R$} 161 color: ${({theme:e})=>e.colors.text.tertiary}; 162 text-align: center; 163`,h=({text:e,onTextChange:t,onSubmit:r,placeholder:a="Ask me anything...",disabled:o=!1,maxRows:l=5,showDisclosure:h=!1,quickReplies:g,onQuickReplySelect:y})=>{const x=(0,n.useRef)(null),[f,b]=n.useState(!1),v=e.trim().length>0&&!o,E=(0,n.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&r())},[v,r]),w=(0,n.useCallback)(e=>{t(e.target.value);const r=e.target;r.style.height="auto",r.style.height=`${Math.min(r.scrollHeight,20*l+4)}px`},[t,l]),$=(0,n.useCallback)(()=>{v&&(r(),x.current&&(x.current.style.height="auto"))},[v,r]);return n.createElement(s,null,g&&g.length>0&&y&&n.createElement(i.y,{actions:g,onSelect:y,disabled:o}),n.createElement(c,{$focused:f},n.createElement(d,{ref:x,value:e,onChange:w,onKeyDown:E,onFocus:()=>b(!0),onBlur:()=>b(!1),placeholder:a,disabled:o,$maxRows:l,rows:1,"aria-label":a}),n.createElement(m,{$canSend:v,onClick:$,disabled:!v,"aria-label":"Send message"},n.createElement(p,null))),h&&n.createElement(u,null,"Responses are AI generated"))}},70600:(e,t,r)=>{r.d(t,{y:()=>u});var n=r(14041),a=r(76990),o=r(48774),l=r(95798),i=r(73443);const s=a.Ay.div` 164 position: relative; 165 width: 100%; 166 margin: -10px 0; 167`,c=a.Ay.div` 168 display: flex; 169 gap: 8px; 170 overflow-x: auto; 171 scroll-behavior: smooth; 172 scrollbar-width: none; 173 padding: 10px 0; 174 175 &::-webkit-scrollbar {
176 display: none; 177 } 178`,d=(0,a.Ay)(l.G5)` 179 &:active { 180 box-shadow: 0 0 0 rgba(11, 19, 31, 0); 181 } 182`,m=a.Ay.div` 183 position: absolute; 184 top: 0; 185 ${({$side:e})=>e}: 0; 186 width: 40px; 187 height: 100%; 188 background: linear-gradient(${({$side:e})=>"left"===e?"to right":"to left"}, ${({theme:e})=>e.colors.bg.primary}, transparent); 189 pointer-events: none; 190 opacity: ${({$visible:e})=>e?1:0}; 191 transition: opacity 150ms ease-out; 192 z-index: 1; 193`,p=a.Ay.button` 194 width: 24px; 195 height: 24px; 196 border-radius: 100px; 197 border: 1.5px solid ${({theme:e})=>e.colors.border.secondary}; 198 background-color: ${({theme:e})=>e.colors.bg.primary}; 199 display: flex; 200 align-items: center; 201 justify-content: center; 202 cursor: pointer; 203 pointer-events: auto; 204 position: absolute; 205 top: 50%; 206 transform: translateY(-50%); 207 ${({$side:e})=>"left"===e?"left: 8px;":"right: 8px;"} 208 z-index: 2; 209 210 &:hover { 211 background-color: ${({theme:e})=>e.colors.bg.secondary}; 212 } 213`,u=({actions:e,onSelect:t,disabled:r})=>{const a=(0,n.useRef)(null),[l,u]=(0,n.useState)(!1),[h,g]=(0,n.useState)(!1),y=(0,n.useCallback)(()=>{const e=a.current;e&&(u(e.scrollLeft>0),g(e.scrollLeft+e.clientWidth<e.scrollWidth-1))},[]);(0,n.useEffect)(()=>{y();const e=a.current;if(!e)return;const t=new ResizeObserver(y);return t.observe(e),()=>t.disconnect()},[y,e]);const x=(0,n.useCallback)(e=>{const t=a.current;t&&t.scrollBy({left:"left"===e?-200:200,behavior:"smooth"})},[]);return n.createElement(s,null,l&&n.createElement(p,{$side:"left",onClick:()=>x("left"),"aria-label":"Scroll left"},n.createElement(o.A,{icon:i.A,size:12,flipHorizontal:!0})),n.createElement(m,{$visible:l,$side:"left"}),n.createElement(c,{ref:a,onScroll:y},e.map(e=>n.createElement(d,{key:e.value,disabled:r,onClick:()=>t(e)},e.label))),n.createElement(m,{$visible:h,$side:"right"}),h&&n.createElement(p,{$side:"right",onClick:()=>x("right"),"aria-label":"Scroll right"},n.createElement(o.A,{icon:i.A,size:12})))}},75006:(e,t,r)=>{r.d(t,{j:()=>f});var n,a=r(57490),o=r(97268),l=r(14041),i=r(76990),s=r(48774),c=r(12243);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(null,arguments)}const m=function(e){return l.createElement("svg",d({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=l.createElement("path",{d:"m10 2 1.5 5.5L17 9l-5.5 1.5L10 16l-1.5-5.5L3 9l5.5-1.5L10 2ZM18 12l1 3 3 1-3 1-1 3-1-3-3-1 3-1 1-3Z"})))},p=i.i7` 214 0%, 100% { opacity: 0.7; transform: scale(1); } 215 50% { opacity: 1; transform: scale(1.1); } 216`,u=i.i7` 217 0% { background-position: -200% center; } 218 100% { background-position: 200% center; } 219`,h=i.Ay.div` 220 display: inline-flex; 221 gap: 8px; 222 align-items: center; 223`,g=i.Ay.div` 224 display: flex; 225 align-items: center; 226 justify-content: center; 227 color: ${({theme:e})=>e.colors.primitives.purple600}; 228 animation: ${p} 2s ease-in-out infinite; 229`,y=i.Ay.div` 230 overflow: hidden; 231 height: 24px; 232 display: flex; 233 align-items: center; 234`,x=(0,i.Ay)(a.P.div)` 235 ${c.t1} 236 background: linear-gradient( 237 90deg, 238 ${({theme:e})=>e.colors.text.tertiary} 0%, 239 ${({theme:e})=>e.colors.primitives.purple600} 40%, 240 ${({theme:e})=>e.colors.primitives.purple400} 60%, 241 ${({theme:e})=>e.colors.primitives.purple600} 80%, 242 ${({theme:e})=>e.colors.text.tertiary} 100% 243 ); 244 background-size: 200% 100%; 245 -webkit-background-clip: text; 246 -webkit-text-fill-color: transparent; 247 background-clip: text; 248 animation: ${u} 3s ease-in-out infinite; 249 white-space: nowrap; 250`;const f=({text:e})=>{const t=function(e){const[t,r]=(0,l.useState)(e),n=(0,l.useRef)(Date.now()),a=(0,l.useRef)(void 0),o=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{if(e===t)return void(a.current=void 0);const l=1500-(Date.now()-n.current);return l<=0?(r(e),n.current=Date.now(),a.current=void 0):(a.current=e,clearTimeout(o.current),o.current=setTimeout(()=>{r(a.current),n.current=Date.now(),a.current=void 0},l)),()=>clearTimeout(o.current)},[e]),t}(e);return l.createElement(h,null,l.createElement(g,null,l.createElement(s.A,{icon:m,size:24})),l.createElement(y,null,l.createElement(o.N,{mode:"wait"},t&&l.createElement(x,{key:t,initial:{y:-24},animate:{y:0},exit:{y:24},transition:{duration:.2,ease:[.4,0,.2,1]}},t))))}},85435:(e,t,r)=>{r.d(t,{R:()=>h});var n=r(14041),a=r(76990),o=r(12243),l=r(48774),i=r(32268);const s=a.Ay.div` 251 display: flex; 252 flex-direction: column; 253 align-items: center; 254 gap: 10px; 255 width: 100%; 256 padding: 0 16px; 257`,c=a.Ay.span` 258 ${o.hm} 259 color: ${({theme:e})=>e.colors.text.primary}; 260`,d=a.Ay.div` 261 display: flex; 262 flex-direction: column; 263 gap: 8px; 264 width: 100%; 265`,m=a.Ay.div` 266 display: flex; 267 align-items: center; 268 gap: 8px; 269 padding: 10px 12px; 270 border-radius: 8px; 271 background-color: ${({theme:e})=>e.colors.bg.secondary}; 272 cursor: pointer; 273 width: 100%; 274 text-align: left; 275 transition: opacity 150ms ease-out; 276 277 &:hover { 278 opacity: 0.8; 279 } 280 281 &:active { 282 opacity: 0.7; 283 } 284`,p=a.Ay.span` 285 ${o.hm} 286 color: ${({theme:e})=>e.colors.text.secondary}; 287 flex: 1; 288 min-width: 0; 289 overflow: hidden; 290 text-overflow: ellipsis; 291 white-space: nowrap; 292`,u=a.Ay.button` 293 display: flex; 294 align-items: center; 295 justify-content: center;
296 width: 20px; 297 height: 20px; 298 border: none; 299 background: none; 300 cursor: pointer; 301 padding: 0; 302 border-radius: 100px; 303 flex-shrink: 0; 304 color: ${({theme:e})=>e.colors.text.tertiary}; 305 306 &:hover { 307 color: ${({theme:e})=>e.colors.text.primary}; 308 } 309`,h=({chats:e,onSelect:t,onDismiss:r})=>{const a=(0,n.useCallback)((e,t)=>{e.stopPropagation(),null==r||r(t)},[r]);return 0===e.length?null:n.createElement(s,null,n.createElement(c,null,"Recent chats"),n.createElement(d,null,e.map(e=>n.createElement(m,{key:e.id,onClick:()=>t(e)},n.createElement(p,null,e.title),r&&n.createElement(u,{onClick:t=>a(t,e),"aria-label":`Dismiss ${e.title}`},n.createElement(l.A,{icon:i.A,size:12}))))))}},95798:(e,t,r)=>{r.d(t,{DL:()=>f,G5:()=>u,Hl:()=>x,IT:()=>c,LN:()=>g,Oc:()=>o,Xn:()=>i,ZJ:()=>b,f:()=>y,gl:()=>p,o4:()=>s,rS:()=>d,ry:()=>E,vu:()=>v,zJ:()=>h});var n=r(76990),a=r(12243);const o=n.AH` 310 border: 1.5px solid transparent; 311 background-image: linear-gradient(${({theme:e})=>e.colors.bg.primary}, ${({theme:e})=>e.colors.bg.primary}), 312 linear-gradient(160deg, #ffc6f7, #6055f6); 313 background-origin: padding-box, border-box; 314 background-clip: padding-box, border-box; 315`,l=n.AH` 316 display: inline-block; 317 padding: 10px 14px; 318 max-width: 100%; 319 word-wrap: break-word; 320 white-space: pre-wrap; 321 overflow: hidden; 322`,i=n.AH` 323 ${l} 324 ${a.hm} 325 border-radius: 12px; 326 align-self: flex-end; 327 background-color: ${({theme:e})=>e.colors.bg.secondary}; 328 color: ${({theme:e})=>e.colors.text.secondary}; 329 box-shadow: inset 0 0 8px rgba(11, 19, 31, 0.02); 330`,s=n.AH` 331 ${l} 332 ${a.RS} 333 white-space: normal; 334 padding: 0; 335 background-color: transparent; 336 color: ${({theme:e})=>e.colors.text.secondary}; 337`,c=n.AH` 338 ${l} 339 ${a.L} 340 border-radius: 20px 20px 20px 0; 341 background-color: #fef2f2; 342 border: 1px solid ${({theme:e})=>e.colors.border.danger}; 343 color: ${({theme:e})=>e.colors.text.danger}; 344`,d=n.AH` 345 ${l} 346 ${a.RS} 347 border-radius: 12px; 348 align-self: center; 349 background-color: ${({theme:e})=>e.colors.bg.tertiary}; 350 color: ${({theme:e})=>e.colors.text.tertiary}; 351 text-align: center; 352 max-width: 90%; 353`,m=n.i7` 354 0%, 100% { opacity: 1; } 355 50% { opacity: 0.7; } 356`,p=n.AH` 357 animation: ${m} 1.5s ease-in-out infinite; 358`,u=n.Ay.button` 359 ${a.RS} 360 font-weight: 600; 361 display: flex; 362 align-items: center; 363 justify-content: center; 364 padding: 10px 12px; 365 border-radius: 1000px; 366 cursor: pointer; 367 transition: all 150ms ease-out; 368 outline: none; 369 white-space: nowrap; 370 background-color: ${({theme:e})=>e.colors.bg.primary}; 371 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 372 color: ${({theme:e})=>e.colors.text.secondary}; 373 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 374 375 &:hover { 376 background-color: ${({theme:e})=>e.colors.bg.secondary}; 377 border-color: ${({theme:e})=>e.colors.border.accent.purple}; 378 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 379 } 380 381 &:active { 382 transform: scale(0.97); 383 } 384 385 &:disabled { 386 opacity: 0.5; 387 cursor: default; 388 } 389`,h=n.Ay.div` 390 display: flex; 391 flex-direction: column; 392 align-items: center; 393 gap: 8px; 394`,g=n.Ay.div` 395 display: flex; 396 align-items: center; 397 gap: 6px; 398 padding: 4px 12px 4px 6px; 399 border-radius: 31px; 400 border: 1px solid rgba(255, 255, 255, 0.8); 401 background-color: rgba(222, 222, 222, 0.2); 402`,y=n.Ay.div` 403 width: 24px; 404 height: 24px; 405 border-radius: 12px; 406 display: flex; 407 align-items: center; 408 justify-content: center; 409 background: linear-gradient(135deg, #cec6ff 14%, #6055f6 63%); 410 color: white; 411`,x=n.Ay.span` 412 font-weight: 700; 413 font-size: 16px; 414 line-height: 24px; 415 color: ${({theme:e})=>e.colors.text.primary}; 416`,f=n.Ay.span` 417 ${a.hm} 418 color: ${({theme:e})=>{var t,r;return null!==(r=null===(t=e.colors.primitives)||void 0===t?void 0:t.purple600)&&void 0!==r?r:"#6055F6"}}; 419`,b=n.Ay.button` 420 display: flex; 421 flex-direction: column; 422 align-items: flex-start; 423 padding: 12px 16px; 424 border-radius: 12px; 425 ${o} 426 box-shadow: 0px 0px 6px rgba(96, 85, 246, 0.25); 427 cursor: pointer; 428 text-align: left; 429 transition: all 150ms ease-out; 430 width: 100%; 431 overflow: hidden; 432 433 &:hover { 434 box-shadow: 0px 0px 10px rgba(96, 85, 246, 0.35); 435 } 436 437 &:active { 438 transform: scale(0.98); 439 } 440`,v=n.Ay.span` 441 ${a.hm} 442 color: ${({theme:e})=>e.colors.text.primary}; 443`,E=n.Ay.span` 444 ${a.DE} 445 color: ${({theme:e})=>e.colors.text.tertiary}; 446 margin-top: 2px; 447`},99563:(e,t,r)=>{r.d(t,{a:()=>rs});var n=r(14041),a=r(76990),o=r(12243),l=r(79390),i=r(57490),s=r(95798);const c=a.Ay.div` 448 ${({$variant:e})=>{switch(e){case"user":return s.Xn;case"assistant":return s.o4;case"system":return s.rS;case"error":return s.IT}}} 449 450 ${({$isStreaming:e})=>e&&s.gl} 451`,d=({variant:e,isStreaming:t,children:r})=>n.createElement(c,{$variant:e,$isStreaming:t},r);var m=r(48774),p=r(57315),u=r(82591);const h=a.Ay.div` 452 display: flex; 453 align-items: center; 454 justify-content: space-between; 455 width: 100%; 456`,g=a.Ay.div` 457 width: 28px; 458 height: 28px; 459 min-width: 28px; 460 border-radius: 50%; 461 display: flex; 462 align-items: center; 463 justify-content: center; 464 background: linear-gradient(135deg, #6055f6, #7c6ff7); 465 color: white; 466`,y=a.Ay.div` 467 display: flex; 468 gap: 8px; 469 align-items: center; 470`,x=a.Ay.button` 471 width: 32px; 472 height: 32px; 473 border-radius: 100px; 474 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 475 background: transparent; 476 color: ${({theme:e})=>e.colors.icon.secondary}; 477 cursor: pointer; 478 display: flex; 479 align-items: center; 480 justify-content: center; 481 transition: all 150ms ease-out; 482 483 &:hover { 484 background-color: ${({theme:e})=>e.colors.bg.secondary}; 485 border-color: ${({theme:e})=>e.colors.border.primary}; 486 } 487`,f=a.Ay.div` 488 transform: rotate(180deg) scaleX(-1); 489 display: flex; 490 align-items: center; 491 justify-content: center; 492`,b=({onThumbsUp:e,onThumbsDown:t,showButtons:r=!1})=>n.createElement(h,null,n.createElement(g,null,n.createElement(m.A,{icon:p.A,size:14}
492)),r&&n.createElement(y,null,n.createElement(x,{onClick:t,"aria-label":"Thumbs down"},n.createElement(f,null,n.createElement(m.A,{icon:u.A,size:16}))),n.createElement(x,{onClick:e,"aria-label":"Thumbs up"},n.createElement(m.A,{icon:u.A,size:16}))));var v=r(85608),E=r(5879),w=r(63717),$=r(36017),A=r(4848),k=r(15551),C=r(30431),S=r(28255),j=r(12012),I=r(98331),D=r(51492),R=r(93849),O=r(11794),z=r(57821),P=r(67393);const M=["#FD6855","#198CFB","#FFA14A","#6055F6","#19B86E","#8B5CF6","#34D399","#DD72D9","#00C2D4","#F43F7A"],T=["#f1eeff","#e6e1ff","#cec6ff","#9189fa","#6055f6","#3d3fbe"],L=["#686c73","#686c73","#686c73","#ffffff","#ffffff","#ffffff"],U=a.Ay.div` 493 width: 100%; 494 height: 200px; 495`,Y=a.Ay.div` 496 padding: 8px 12px; 497 background-color: ${({theme:e})=>e.colors.bg.primary}; 498 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 499 border-radius: 8px; 500 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 501 display: flex; 502 flex-direction: column; 503 gap: 4px; 504`,F=a.Ay.div` 505 display: flex; 506 align-items: center; 507 gap: 6px; 508`,N=a.Ay.div` 509 width: 8px; 510 height: 8px; 511 border-radius: 50%; 512 background-color: ${({$color:e})=>e}; 513`,W=a.Ay.span` 514 ${o.DE} 515 color: ${({theme:e})=>e.colors.text.tertiary}; 516`,K=a.Ay.span` 517 ${o.hm} 518 color: ${({theme:e})=>e.colors.text.primary}; 519 margin-left: auto; 520`,B=({active:e,payload:t,label:r,areas:a})=>e&&(null==t?void 0:t.length)?n.createElement(Y,null,n.createElement(W,null,r),t.map(e=>{var t;const r=null==a?void 0:a.find(t=>t.dataKey===e.dataKey);return n.createElement(F,{key:e.dataKey},n.createElement(N,{$color:e.color}),n.createElement(W,null,(null==r?void 0:r.label)||e.dataKey),n.createElement(K,null,null===(t=e.value)||void 0===t?void 0:t.toLocaleString()))})):null,H=({data:e,xKey:t,areas:r,referenceLines:o,showMaxLine:l=!0,showYAxis:i=!1,showLegend:s=!1})=>{const c=(0,a.DP)(),d=(0,n.useId)();if(!e.length||!r.length)return null;const m=Math.max(...e.flatMap(e=>r.map(t=>Number(e[t.dataKey])||0))),p=m.toLocaleString();return n.createElement(U,null,n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(S.Q,{data:e,margin:{top:16,right:12,bottom:0,left:12}},n.createElement("defs",null,r.map((e,t)=>{const r=M[t%M.length];return n.createElement("linearGradient",{key:e.dataKey,id:`areaGrad-${d}-${e.dataKey}`,x1:"0",y1:"0",x2:"0",y2:"1"},n.createElement("stop",{offset:"5%",stopColor:r,stopOpacity:.3}),n.createElement("stop",{offset:"95%",stopColor:r,stopOpacity:.05}))})),n.createElement(j.d,{strokeDasharray:"3 3",stroke:c.colors.border.primary,vertical:!1,strokeOpacity:.5}),n.createElement(I.W,{dataKey:t,tick:{fontSize:12,fill:c.colors.text.tertiary},axisLine:!1,tickLine:!1,tickMargin:8}),i?n.createElement(D.h,{width:44,tick:{fontSize:12,fill:c.colors.text.tertiary},axisLine:!1,tickLine:!1}):n.createElement(D.h,{hide:!0}),s&&n.createElement(R.s,{wrapperStyle:{fontSize:12,paddingTop:4}}),n.createElement(O.m,{content:n.createElement(B,{areas:r})}),r.map((e,t)=>{var r;const a=M[t%M.length];return n.createElement(z.Gk,{key:e.dataKey,type:"natural",dataKey:e.dataKey,name:null!==(r=e.label)&&void 0!==r?r:e.dataKey,stroke:a,strokeWidth:2,fill:`url(#areaGrad-${d}-${e.dataKey})`,dot:!1,activeDot:{r:4,strokeWidth:2,fill:a,stroke:c.colors.bg.primary},isAnimationActive:!1})}),l&&n.createElement(P.e_,{y:m,stroke:c.colors.text.tertiary,strokeDasharray:"4 4",strokeOpacity:.7,label:{value:`Max: ${p}`,position:"insideTop",fill:c.colors.text.secondary,fontSize:11,offset:-14}}),null==o?void 0:o.map(e=>n.createElement(P.e_,{key:`${e.x}-${e.label}`,x:e.x,stroke:c.colors.text.tertiary,strokeDasharray:"4 4",strokeOpacity:.7,label:{value:e.label,position:"insideTopRight",fill:c.colors.text.secondary,fontSize:11}})))))};var _=r(46421),G=r(15392),V=r(7639);function Z(e,t,r="USD",n){var a;const o=null!==(a=null==n?void 0:n.compact)&&void 0!==a&&a;switch(t){case"currency":return new Intl.NumberFormat("en-US",{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:o?1:0,notation:o?"compact":"standard"}).format(e);case"percent":return`${e}%`;case"points":return q(e,o)+" pts";case"miles":return q(e,o)+" mi";case"multiplier":return`${e}x`;default:return q(e,o)}}function q(e,t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:t?1:0,notation:t?"compact":"standard"}).format(e)}var J=r(94398),X=r(73443);const Q=a.Ay.div` 521 display: flex; 522 flex-direction: column; 523 gap: 4px; 524 width: 100%; 525`,ee=a.Ay.div` 526 display: flex; 527 flex-direction: column; 528 gap: 2px; 529 margin-bottom: 8px; 530`,te=a.Ay.div` 531 ${o.hm} 532 color: ${({theme:e})=>e.colors.text.primary}; 533`,re=a.Ay.div` 534 ${o.DE} 535 color: ${({theme:e})=>e.colors.text.tertiary}; 536`,ne=a.Ay.div` 537 padding: 8px 12px; 538 background-color: ${({theme:e})=>e.colors.bg.primary}; 539 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 540 border-radius: 8px; 541 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 542`,ae=a.Ay.div` 543 ${o.DE} 544 color: ${({theme:e})=>e.colors.text.tertiary}; 545 margin-bottom: 2px; 546`,oe=a.Ay.div` 547 ${o.hm} 548 color: ${({theme:e})=>e.colors.text.primary}; 549`,le=a.Ay.div` 550 display: flex; 551 flex-wrap: wrap; 552 gap: 12px; 553 padding: 8px 0 0; 554 justify-content: center; 555`,ie=a.Ay.div` 556 display: flex; 557 align-items: center; 558 gap: 6px; 559`,se=a.Ay.div` 560 width: 8px; 561 height: 8px; 562 border-radius: 50%; 563 background-color: ${({$color:e})=>e}; 564`,ce=a.Ay.span` 565 ${o.DE} 566 color: ${({theme:e})=>e.colors.text.tertiary}; 567`,de=({active:e,payload:t,label:r,valueFormat:a,currencyCode:o})=>{var l;return e&&(null==t?void 0:t.length)?n.createElement(ne,null,n.createElement(ae,null,r),n.createElement(oe,null,Z(null!==(l=t[0].value)&&void 0!==l?l:0,a,o))):null},me=({active:e,payload:t,label:r,bars:a,valueFormat:o,currencyCode:l})=>e&&(null==t?void 0:t.length)?n.createElement(Y,null,n.createElement(W,null,r),t.map(e=>{const t=a.find(t=>t.dataKey===e.dataKey);return n.createElement(F,{key:e.dataKey},n.createElement(N,{$color:e.color}),n.createElement(W,null,(null==t?void 0:t.label)||e.dataKey),n.createElement(K,null,Z(Number(e.value),o,l)))})):null,pe=({data:e,title:t,description:r,color:o,orientation:l="vertical",valueFormat:i,currencyCode:s,labelMode:c="all",showYAxis:d=!1,maxVisibleBars:m})=>{const p=(0,a.DP)(),u=(0,n.useId)(),h=o||p.colors.bg.accent.purple;if(!Array.isArray(e)||0===e.length)return null;const g=e.map(e=>({name:e.label,value:e.value})),y=Math.max(...e.map(e=>e.value)),x="horizontal"===l,f=!x&&!!m&&e.length>m,b=f?85*e.length+12*(e.length-1)+(d?36:0):void 0,v=n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(_.E,{data:g,layout:x?"vertical":"horizontal",margin:{top:x||d?8:36,right:12,bottom:0,left:x?40:d?4:12},barCategoryGap:!x&&f?12:void 0},n.createElement("defs",null,n.createElement("linearGradient",{id:u,x1:"0",y1:"0",x2:x?"1":"0",y2:x?"0":"1"},n.createElement("stop",{offset:"0%",stopColor:h,stopOpacity:1}),n.createElement("stop",{offset:"100%",stopColor:h,stopOpacity:.8}))),n.createElement(j.d,{strokeDasharray:"3 3",stroke:p.colors.border.primary,vertical:!1,horizontal:!x,strokeOpacity:.5}),x?n.createElement(n.Fragment,null,n.createElement(I.W,{type:"number",hide:!0}),n.createElement(D.h,{type:"category",dataKey:"name",tick:{fontSize:12,fill:p.colors.text.tertiary}
567,axisLine:!1,tickLine:!1,width:60})):n.createElement(n.Fragment,null,n.createElement(I.W,{dataKey:"name",tick:d?{fontSize:12,fontWeight:600,fill:p.colors.text.tertiary}:{fontSize:12,fill:p.colors.text.tertiary},axisLine:!1,tickLine:!1,tickMargin:8}),d?n.createElement(D.h,{domain:[0,y],tickFormatter:e=>Z(e,i,s,{compact:!0}),tick:{fontSize:12,fontWeight:600,fill:p.colors.text.tertiary},axisLine:!1,tickLine:!1,width:40}):n.createElement(D.h,{hide:!0,domain:[0,y]})),n.createElement(O.m,{content:n.createElement(de,{valueFormat:i,currencyCode:s}),cursor:{fill:p.colors.bg.secondary,radius:4}}),n.createElement(G.yP,Object.assign({dataKey:"value",fill:`url(#${u})`,radius:x?[0,6,6,0]:[6,6,0,0]},!x&&f?{barSize:85}:{maxBarSize:x?32:48},{isAnimationActive:!1,label:x||d||"all"!==c?void 0:{position:"top",fontSize:11,fill:p.colors.text.secondary,formatter:e=>Z(Number(e),i,s)}})),!x&&!d&&"all"!==c&&n.createElement(P.e_,{y,stroke:p.colors.text.tertiary,strokeDasharray:"4 4",strokeOpacity:.7})));return n.createElement(Q,null,(t||r)&&n.createElement(ee,null,t&&n.createElement(te,null,t),r&&n.createElement(re,null,r)),n.createElement(ue,null,!x&&!d&&"all"!==c&&n.createElement(ge,null,"Max: ",Z(y,i,s)),f?n.createElement(be,{innerWidthPx:b},v):n.createElement(U,null,v)))},ue=a.Ay.div` 568 position: relative; 569 570 .recharts-tooltip-wrapper { 571 z-index: 2 !important; 572 } 573`,he=a.Ay.div` 574 width: 100%; 575 height: 220px; 576 overflow-x: ${({$minWidth:e})=>e?"auto":"hidden"}; 577 overflow-y: hidden; 578 579 ${({$hideScrollbar:e})=>e&&"\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n "} 580`,ge=a.Ay.div` 581 position: absolute; 582 top: 14px; 583 left: 12px; 584 font-size: 11px; 585 color: ${({theme:e})=>e.colors.text.secondary}; 586 pointer-events: none; 587 z-index: 1; 588`,ye=a.Ay.div` 589 min-width: ${({$minWidth:e})=>e?`${e}px`:"100%"}; 590 height: 100%; 591`,xe=a.Ay.div` 592 position: absolute; 593 top: 50%; 594 ${({$side:e})=>"left"===e?"left: 0;":"right: 0;"} 595 transform: translateY(-50%); 596 display: flex; 597 align-items: center; 598 z-index: 2; 599`,fe=a.Ay.div` 600 position: absolute; 601 top: 0; 602 ${({$side:e})=>"left"===e?"left: 0;":"right: 0;"} 603 width: 56px; 604 height: 220px; 605 background: linear-gradient(${({$side:e})=>"left"===e?"to left":"to right"}, transparent, ${({theme:e})=>e.colors.bg.primary}); 606 pointer-events: none; 607 z-index: 1; 608`,be=({innerWidthPx:e,children:t})=>{const r=(0,a.DP)(),o=(0,n.useRef)(null),[l,i]=(0,n.useState)(!1),[s,c]=(0,n.useState)(!1),d=(0,n.useCallback)(()=>{const e=o.current;e&&(i(e.scrollLeft>1),c(e.scrollLeft<e.scrollWidth-e.clientWidth-1))},[]),m=e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.scrollBy({left:e*o.current.clientWidth,behavior:"smooth"})};return(0,n.useEffect)(()=>{const e=o.current;if(!e)return;if(d(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>d());return t.observe(e),()=>t.disconnect()},[e,d]),n.createElement(n.Fragment,null,n.createElement(he,{ref:o,$minWidth:1,$hideScrollbar:!0,onScroll:d},n.createElement(ye,{style:e?{minWidth:`${e}px`,width:`${e}px`}:void 0,$minWidth:e},t)),l&&n.createElement(n.Fragment,null,n.createElement(fe,{$side:"left"}),n.createElement(xe,{$side:"left"},n.createElement(V.A,{icon:J.A,"aria-label":"Scroll left",size:"small",iconSize:16,backgroundColor:r.colors.bg.primary,iconColor:r.colors.icon.secondary,borderColor:r.colors.border.secondary,onClick:()=>m(-1)}))),s&&n.createElement(n.Fragment,null,n.createElement(fe,{$side:"right"}),n.createElement(xe,{$side:"right"},n.createElement(V.A,{icon:X.A,"aria-label":"Scroll right",size:"small",iconSize:16,backgroundColor:r.colors.bg.primary,iconColor:r.colors.icon.secondary,borderColor:r.colors.border.secondary,onClick:()=>m(1)}))))},ve=({data:e,xKey:t,bars:r,mode:o="grouped",title:l,description:i,orientation:s="vertical",valueFormat:c,currencyCode:d})=>{const m=(0,a.DP)();if(!Array.isArray(e)||0===e.length||!(null==r?void 0:r.length))return null;const p="horizontal"===s,u="stacked"===o,h=!p&&!u&&e.length*r.length>12,g=h?e.length*r.length*28:void 0,y=u?Math.max(...e.map(e=>r.reduce((t,r)=>t+(Number(e[r.dataKey])||0),0))):Math.max(...e.flatMap(e=>r.map(t=>Number(e[t.dataKey])||0))),x=Z(y,c,d),f=n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(_.E,{data:e,layout:p?"vertical":"horizontal",margin:{top:p?8:36,right:12,bottom:p?0:20,left:p?40:12}},n.createElement(j.d,{strokeDasharray:"3 3",stroke:m.colors.border.primary,vertical:!1,horizontal:!p,strokeOpacity:.5}),p?n.createElement(n.Fragment,null,n.createElement(I.W,{type:"number",hide:!0}),n.createElement(D.h,{type:"category",dataKey:t,tick:{fontSize:12,fill:m.colors.text.tertiary}
608,axisLine:!1,tickLine:!1,width:60})):n.createElement(n.Fragment,null,n.createElement(I.W,{dataKey:t,tick:{fontSize:12,fill:m.colors.text.tertiary},axisLine:!1,tickLine:!1,tickMargin:8}),n.createElement(D.h,{hide:!0,domain:[0,y]})),n.createElement(O.m,{content:n.createElement(me,{bars:r,valueFormat:c,currencyCode:d}),cursor:{fill:m.colors.bg.secondary,radius:4}}),r.map((e,t)=>{const a=M[t%M.length],o=t===r.length-1,l=u?o?p?[0,6,6,0]:[6,6,0,0]:[0,0,0,0]:p?[0,6,6,0]:[6,6,0,0];return n.createElement(G.yP,{key:e.dataKey,dataKey:e.dataKey,fill:a,radius:l,maxBarSize:p?24:36,stackId:u?"stack":void 0,isAnimationActive:!1})}),n.createElement(P.e_,Object.assign({},p?{x:y}:{y},{stroke:m.colors.text.tertiary,strokeDasharray:"4 4",strokeOpacity:.7}))));return n.createElement(Q,null,(l||i)&&n.createElement(ee,null,l&&n.createElement(te,null,l),i&&n.createElement(re,null,i)),n.createElement(ue,null,!p&&n.createElement(ge,null,"Max: ",x),h?n.createElement(be,{innerWidthPx:g},f):n.createElement(U,null,f)),n.createElement(le,null,r.map((e,t)=>n.createElement(ie,{key:e.dataKey},n.createElement(se,{$color:M[t%M.length]}),n.createElement(ce,null,e.label||e.dataKey)))))},Ee=e=>function(e){return"bars"in e&&Array.isArray(e.bars)}(e)?n.createElement(ve,Object.assign({},e)):n.createElement(pe,Object.assign({},e)),we=a.Ay.div` 609 display: flex; 610 flex-direction: column; 611 border-radius: 8px; 612 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 613 background-color: ${({theme:e})=>e.colors.bg.primary}; 614 width: 100%; 615 overflow: hidden; 616`,$e=a.Ay.div` 617 display: flex; 618 align-items: center; 619 justify-content: space-between; 620 padding: 16px; 621`,Ae=a.Ay.div` 622 ${o.hm} 623 font-weight: 700; 624 color: ${({theme:e})=>e.colors.text.primary}; 625`,ke=a.Ay.div` 626 ${o.DE} 627 color: ${({theme:e})=>e.colors.text.tertiary}; 628`,Ce=a.Ay.div` 629 padding: 0 16px 16px; 630`,Se=a.Ay.div` 631 display: flex; 632 flex-direction: column; 633 gap: 2px; 634 padding: 12px 16px 16px; 635`,je=a.Ay.div` 636 ${o.hm} 637 display: flex; 638 align-items: center; 639 gap: 4px; 640 color: ${({$direction:e,theme:t})=>{switch(e){case"up":return t.colors.text.success;case"down":return t.colors.text.danger;default:return t.colors.text.primary}}}; 641`,Ie=a.Ay.div` 642 ${o.RS} 643 color: ${({theme:e})=>e.colors.text.tertiary}; 644`,De=({direction:e})=>"up"===e?n.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"}),n.createElement("polyline",{points:"16 7 22 7 22 13"})):"down"===e?n.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7"}),n.createElement("polyline",{points:"16 17 22 17 22 11"})):n.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),n.createElement("polyline",{points:"12 5 19 12 12 19"})),Re=({title:e,subtitle:t,headerRight:r,footer:a,children:o})=>n.createElement(we,null,e&&n.createElement($e,null,n.createElement(Ae,null,e),null!=r?r:t&&n.createElement(ke,null,t)),n.createElement(Ce,null,o),a&&n.createElement(Se,null,a.trend&&n.createElement(je,{$direction:a.trend.direction},a.trend.value,n.createElement(De,{direction:a.trend.direction})),a.description&&n.createElement(Ie,null,a.description)));var Oe,ze,Pe;function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Me.apply(null,arguments)}const Te=function(e){return n.createElement("svg",Me({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none"},e),Oe||(Oe=n.createElement("path",{d:"M12.007 6.9v-.75.75Zm10.815 9.952v.75a.75.75 0 0 0 .748-.812l-.748.062Zm-5.407 0-.747.062a.75.75 0 0 0 .747.688v-.75Zm-5.408-4.976v-.75.75ZM6.6 16.852v.75c.39 0 .715-.3.747-.688l-.747-.062Zm-5.409 0-.747-.062a.75.75 0 0 0 .747.812v-.75Zm10.816-9.951v.75c5.297 0 9.64 4.076 10.068 9.263l.747-.062.748-.062c-.492-5.957-5.479-10.639-11.563-10.64v.75Zm10.815 9.951v-.75h-5.407v1.5h5.407v-.75Zm-5.407 0 .748-.062a6.177 6.177 0 0 0-6.156-5.663v1.5a4.678 4.678 0 0 1 4.66 4.287l.748-.062Zm-5.408-4.976v-.75a6.177 6.177 0 0 0-6.155 5.664l.748.062.747.062a4.677 4.677 0 0 1 4.66-4.288v-.75ZM6.6 16.852v-.75H1.19v1.5H6.6v-.75Zm-5.409 0 .748.062c.428-5.187 4.77-9.263 10.068-9.263v-1.5C5.922 6.15.936 10.833.444
64416.79l.747.061Z",fill:"currentColor"})),ze||(ze=n.createElement("path",{d:"M11.996 6.448v5.927M20.144 10.067l-4.77 3.808M3.749 10.067l4.77 3.808",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round"})),Pe||(Pe=n.createElement("path",{d:"M12.981 18.162c-.044.55-.582.957-1.201.907-.62-.05-1.086-.537-1.041-1.087.03-.386.596-2.4.932-3.57a.245.245 0 0 1 .473.004c.322 1.218.869 3.357.837 3.746Z",fill:"currentColor"})))},Le=a.Ay.div` 645 display: flex; 646 flex-direction: column; 647 gap: 8px; 648 padding: 16px; 649`,Ue=a.Ay.div` 650 display: flex; 651 flex-direction: column; 652 gap: 4px; 653`,Ye=a.Ay.p` 654 ${o.hm} 655 color: ${({theme:e})=>e.colors.text.primary}; 656`,Fe=a.Ay.p` 657 ${o.DE} 658 color: ${({theme:e})=>e.colors.text.secondary}; 659`,Ne=a.Ay.button` 660 ${o.hm} 661 width: 100%; 662 border: none; 663 border-radius: 4px; 664 padding: 6px 12px; 665 background: ${({theme:e})=>e.colors.button.primary}; 666 color: ${({theme:e})=>e.colors.text.inverse}; 667 cursor: pointer; 668 text-align: center; 669`,We=({onConnect:e})=>n.createElement(Le,null,n.createElement(Ue,null,n.createElement(m.A,{icon:Te,size:24}
669),n.createElement(Ye,null,"Sync your credit score for free"),n.createElement(Fe,null,"Securely connect your credit score to get personal credit insights")),n.createElement(Ne,{onClick:e,"aria-label":"Sync credit score"},"Sync my credit score"));var Ke=r(98620);const Be=a.Ay.div` 670 display: flex; 671 flex-direction: ${({$horizontal:e})=>e?"row":"column"}; 672 width: 100%; 673`,He=a.Ay.div` 674 display: flex; 675 align-items: center; 676 justify-content: center; 677 flex: 1; 678 align-self: stretch; 679 680 ${({$horizontal:e,theme:t})=>e&&`border-right: 1px solid ${t.colors.border.primary};`} 681`,_e=a.Ay.div` 682 transform: scale(0.55); 683 transform-origin: center center; 684 685 & > div { 686 margin-top: 0; 687 } 688`,Ge=a.Ay.div` 689 display: flex; 690 flex-direction: column; 691 flex: 1; 692 gap: 10px; 693 padding: 16px; 694`,Ve=a.Ay.div` 695 ${o.hm} 696 display: flex; 697 align-items: center; 698 justify-content: space-between; 699 gap: 12px; 700 padding-bottom: 10px; 701 color: ${({theme:e})=>e.colors.text.primary}; 702 703 &:not(:last-child) { 704 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 705 } 706 707 &:last-child { 708 padding-bottom: 0; 709 } 710`,Ze=a.Ay.span` 711 overflow: hidden; 712 text-overflow: ellipsis; 713 white-space: nowrap; 714`,qe=a.Ay.span` 715 text-align: right; 716 flex-shrink: 0; 717 min-width: 80px; 718`,Je=({value:e,stats:t})=>{const r=(0,n.useRef)(null),[a,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const e=r.current;if(!e)return;const t=new ResizeObserver(e=>{for(const t of e)o(t.contentRect.width>=500)});return t.observe(e),()=>t.disconnect()},[]),n.createElement(Be,{ref:r,$horizontal:a},n.createElement(He,{$horizontal:a},n.createElement(_e,null,n.createElement(Ke.A,{value:e}))),t&&t.length>0&&n.createElement(Ge,null,t.map(e=>n.createElement(Ve,{key:e.label},n.createElement(Ze,null,e.label),n.createElement(qe,null,e.value)))))},Xe=[{color:"#FD6855"},{color:"#FFA14A"},{color:"#FFD059"},{color:"#CEDE6C"},{color:"#00B86E"}],Qe=["M5.10899 189.754C0.228802 170.407 -0.793016 150.289 2.10185 130.547C4.99675 110.806 11.7516 91.8281 21.9809 74.6972C32.2101 57.5664 45.7133 42.6181 61.7196 30.7058C77.7259 18.7935 95.9217 10.1506 115.268 5.27037L117.498 14.1096C99.3122 18.697 82.2081 26.8214 67.1622 38.0189C52.1164 49.2165 39.4233 63.2679 29.8078 79.3709C20.1924 95.4739 13.8428 113.313 11.1216 131.87C8.40037 150.427 9.36088 169.338 13.9483 187.524L5.10899 189.754Z","M119.149 4.34547C143.489 -1.11882 168.8 -0.506024 192.846 6.12972L190.421 14.9174C167.817 8.6798 144.025 8.10378 121.146 13.2402L119.149 4.34547Z","M196.673 7.23989C220.538 14.5039 242.247 27.5322 259.883 45.1744L253.436 51.6194C236.858 35.0358 216.451 22.7891 194.019 15.961L196.673 7.23989Z","M262.287 47.6345C279.52 65.6714 292.046 87.6739 298.76 111.699L289.98 114.153C283.669 91.5689 271.894 70.8866 255.696 53.932L262.287 47.6345Z","M299.647 115.018C305.816 139.189 305.939 164.507 300.004 188.736L291.15 186.567C296.728 163.792 296.613 139.993 290.814 117.272L299.647 115.018Z"],et=[150,90,60,30,0],tt=a.Ay.div` 719 display: flex; 720 flex-direction: column; 721 align-items: center; 722 width: 100%; 723 position: relative; 724`,rt=a.Ay.div` 725 ${o.DE} 726 color: ${({theme:e})=>e.colors.text.tertiary}; 727 text-transform: uppercase; 728 letter-spacing: 0.5px; 729 margin-bottom: 4px; 730`,nt=a.Ay.div` 731 ${o.od} 732 color: ${({theme:e})=>e.colors.text.primary}; 733 text-align: center; 734 margin-top: -4px; 735`,at=a.Ay.div` 736 position: relative; 737 width: 100%; 738 max-width: 168px; 739`,ot=a.Ay.svg` 740 width: 100%; 741 height: auto; 742 display: block; 743`,lt=a.Ay.div` 744 position: absolute; 745 background-color: ${({theme:e})=>e.colors.bg.primary}; 746 border-radius: 50%; 747 height: 18px; 748 width: 18px; 749 top: ${({$topPct:e})=>e}%; 750 left: ${({$leftPct:e})=>e}%; 751 border: 6px solid ${({$color:e})=>e}; 752`;const it=({value:e,min:t,max:r,label:a,valueFormat:o,currencyCode:l,segments:i,colorDirection:s="ascending"})=>{const c=(0,n.useId)(),d=i||Xe,m=Math.max(t,Math.min(r,e)),p=r-t,u=0===p?.5:(m-t)/p,h="descending"===s?[...d].reverse():d,g="descending"===s?1-u:u,y=Math.min(Math.floor(g*d.length),d.length-1),x=d.length?d[y].color:Xe[0].color,f=Math.min(Math.floor(u*et.length),et.length-1),b=et[f],{xPct:v,yPct:E}=function(e){const t=e*Math.PI/180;return{xPct:(138+148*Math.cos(t))/305*100,yPct:(135-148*Math.sin(t))/186*100}}(b);return n.createElement(tt,null,a&&n.createElement(rt,null,a),n.createElement(at,null,n.createElement(ot,{viewB
752ox:"0 0 305 186",fill:"none"},n.createElement("g",{clipPath:`url(#${c})`},Qe.map((e,t)=>{var r,a;return n.createElement("path",{key:t,d:e,fill:null!==(a=null===(r=h[t])||void 0===r?void 0:r.color)&&void 0!==a?a:Xe[t].color})})),n.createElement("defs",null,n.createElement("clipPath",{id:c},n.createElement("rect",{width:"303.872",height:"185.024",transform:"translate(0.491 0.655)"})))),n.createElement(lt,{$leftPct:v,$topPct:E,$color:x})),n.createElement(nt,null,Z(e,o,l)))};var st=r(37142),ct=r(89936),dt=r(73001);const mt=({active:e,payload:t,label:r,lines:a})=>e&&(null==t?void 0:t.length)?n.createElement(Y,null,n.createElement(W,null,r),t.map((e,t)=>{var r,o;return n.createElement(F,{key:e.dataKey},n.createElement(N,{$color:e.color}),n.createElement(W,null,(null===(r=null==a?void 0:a[t])||void 0===r?void 0:r.label)||e.dataKey),n.createElement(K,null,null===(o=e.value)||void 0===o?void 0:o.toLocaleString()))})):null,pt=({data:e,xKey:t,lines:r,showLabels:o=!1})=>{const l=(0,a.DP)();return n.createElement(U,null,n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(st.b,{data:e,margin:{top:8,right:12,bottom:0,left:12}},n.createElement(j.d,{strokeDasharray:"3 3",stroke:l.colors.border.primary,vertical:!1,strokeOpacity:.5}),n.createElement(I.W,{dataKey:t,tick:{fontSize:12,fill:l.colors.text.tertiary},axisLine:!1,tickLine:!1,tickMargin:8}),n.createElement(D.h,{hide:!0}),n.createElement(O.m,{content:n.createElement(mt,{lines:r})}),r.map((e,t)=>n.createElement(ct.N1,{key:e.dataKey,type:"natural",dataKey:e.dataKey,stroke:M[t%M.length],strokeWidth:2,dot:!!o&&{r:3,fill:M[t%M.length]},activeDot:{r:4,strokeWidth:2,fill:M[t%M.length],stroke:l.colors.bg.primary},isAnimationActive:!1},o&&n.createElement(dt.Ze,{dataKey:e.dataKey,position:"top",offset:8,style:{fontSize:11,fill:l.colors.text.secondary,fontWeight:500}}))))))};var ut=r(65340),ht=r(2411),gt=r(87183),yt=r(94437);const xt=a.Ay.div` 753 display: flex; 754 flex-direction: column; 755 gap: 12px; 756 width: 100%; 757`,ft=a.Ay.div` 758 ${o.hm} 759 color: ${({theme:e})=>e.colors.text.primary}; 760`,bt=a.Ay.div` 761 width: 100%; 762 height: 200px; 763 display: flex; 764 align-items: center; 765 justify-content: center; 766`,vt=a.Ay.div` 767 display: flex; 768 flex-direction: column; 769 gap: 10px; 770 width: 100%; 771 padding: 12px; 772`,Et=a.Ay.div` 773 display: flex; 774 align-items: center; 775 justify-content: space-between; 776 width: 100%; 777`,wt=a.Ay.div` 778 display: flex; 779 align-items: center; 780 gap: 7px; 781`,$t=a.Ay.div` 782 width: 10px; 783 height: 10px; 784 border-radius: 50%; 785 background-color: ${({$color:e})=>e}; 786`,At=a.Ay.span` 787 ${o.hm} 788 color: ${({theme:e})=>e.colors.text.primary}; 789`,kt=a.Ay.span` 790 ${o.hm} 791 color: ${({theme:e})=>e.colors.text.primary}; 792 text-align: right; 793 width: 80px; 794`,Ct=a.Ay.div` 795 padding: 8px 12px; 796 background-color: ${({theme:e})=>e.colors.bg.primary}; 797 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 798 border-radius: 8px; 799 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 800`,St=a.Ay.div` 801 ${o.DE} 802 color: ${({theme:e})=>e.colors.text.tertiary}; 803 margin-bottom: 2px; 804`,jt=a.Ay.div` 805 ${o.hm} 806 color: ${({theme:e})=>e.colors.text.primary}; 807`,It=({active:e,payload:t,valuePrefix:r=""})=>e&&(null==t?void 0:t.length)?n.createElement(Ct,null,n.createElement(St,null,t[0].name),n.createElement(jt,null,r,t[0].value.toLocaleString())):null;const Dt=({segments:e,centerLabel:t,title:r,valuePrefix:o=""})=>{const l=(0,a.DP)(),i=e.map((e,t)=>({name:e.label,value:e.value,color:M[t%M.length]}));return n.createElement(xt,null,r&&n.createElement(ft,null,r),n.createElement(bt,null,n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(ut.r,null,n.createElement(ht.Fq,{data:i,cx:"50%",cy:"50%",innerRadius:"73%",outerRadius:"90%",paddingAngle:2,dataKey:"value",strokeWidth:0,isAnimationActive:!1},i.map(e=>n.createElement(gt.f,{key:e.name,fill:e.color})),t&&n.createElement(yt.JU,{value:t,position:"center",style:{fontSize:(s=t,s.length>8?14:s.length>6?16:18),fontWeight:700,fill:l.colors.text.primary}})),n.createElement(O.m,{content:n.createElement(It,{valuePrefix:o})})))),n.createElement(vt,null,i.map(e=>n.createElement(Et,{key:e.name},n.createElement(wt,null,n.createElement($t,{$color:e.color}),n.createElement(At,null,e.name)),n.createElement(kt,null,o,e.value.toLocaleStr
807ing())))));var s};function Rt(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function Ot(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function zt(e,t){if(!e)return null!=t?t:"";const r=new Date(e);return isNaN(r.getTime())?null!=t?t:e:r.toLocaleDateString("en-US",{month:"short",day:"numeric"})}a.Ay.div` 808 display: flex; 809 align-items: center; 810 gap: 6px; 811`,a.Ay.span` 812 font-size: 10px; 813 line-height: 14px; 814 color: ${({theme:e})=>e.colors.text.secondary}; 815`,a.Ay.div` 816 display: flex; 817 gap: 2px; 818`,a.Ay.div` 819 width: 12px; 820 height: 12px; 821 border-radius: 2px; 822 background: ${({$color:e})=>e}; 823`;const Pt=a.Ay.div` 824 padding: 12px; 825`,Mt=a.Ay.div` 826 display: flex; 827 align-items: center; 828 margin-bottom: 12px; 829`,Tt=a.Ay.span` 830 font-size: 14px; 831 font-weight: 700; 832 line-height: 20px; 833 color: ${({theme:e})=>e.colors.text.primary}; 834`,Lt=a.Ay.div` 835 display: flex; 836 flex-direction: column; 837 gap: 12px; 838`,Ut=a.Ay.div` 839 height: 1px; 840 background: ${({theme:e})=>e.colors.border.primary}; 841`,Yt=a.Ay.div` 842 display: flex; 843 align-items: center; 844 gap: 10px; 845`,Ft=a.Ay.div` 846 width: 42px; 847 height: 42px; 848 border-radius: 50%; 849 background: ${({theme:e})=>e.colors.bg.tertiary}; 850 display: flex; 851 align-items: center; 852 justify-content: center; 853 font-size: 14px; 854 flex-shrink: 0; 855`,Nt=a.Ay.div` 856 flex: 1; 857 min-width: 0; 858`,Wt=a.Ay.div` 859 ${o.hm} 860 color: ${({theme:e})=>e.colors.text.primary}; 861 white-space: nowrap; 862 overflow: hidden; 863 text-overflow: ellipsis; 864`,Kt=a.Ay.div` 865 ${o.DE} 866 color: ${({theme:e})=>e.colors.text.secondary}; 867`,Bt=a.Ay.div` 868 text-align: right; 869 flex-shrink: 0; 870`,Ht=a.Ay.div` 871 ${o.hm} 872 color: ${({theme:e})=>e.colors.text.primary}; 873 text-align: right; 874 width: 80px; 875`,_t=a.Ay.div` 876 ${o.DE} 877 color: ${({theme:e})=>e.colors.text.secondary}; 878`,Gt=a.Ay.button` 879 width: 100%; 880 display: flex; 881 align-items: center; 882 justify-content: center; 883 margin-top: 8px; 884 padding: 8px 12px; 885 border: 1.5px solid ${({theme:e})=>e.colors.border.secondary}; 886 border-radius: 4px; 887 background: ${({theme:e})=>e.colors.bg.primary}; 888 cursor: pointer; 889 font-size: 14px; 890 font-weight: 600; 891 line-height: 20px; 892 color: ${({theme:e})=>e.colors.text.secondary}; 893 894 &:hover { 895 background: ${({theme:e})=>e.colors.bg.secondary}; 896 } 897`;a.Ay.div` 898 display: flex; 899 justify-content: center; 900 gap: 8px; 901 padding-top: 8px; 902`,a.Ay.button` 903 ${o.DE} 904 border: 1px solid ${({$active:e,theme:t})=>e?t.colors.bg.accent.purple:t.colors.border.primary}; 905 background: ${({$active:e,theme:t})=>e?t.colors.bg.accent.purple:t.colors.bg.primary}; 906 color: ${({$active:e,theme:t})=>e?"#ffffff":t.colors.text.secondary}; 907 border-radius: 6px; 908 padding: 4px 10px; 909 cursor: pointer; 910 font-weight: 500; 911 912 &:hover { 913 background: ${({$active:e,theme:t})=>e?t.colors.bg.accent.purple:t.colors.bg.secondary}; 914 } 915 916 &:focus-visible { 917 outline: 2px solid ${({theme:e})=>e.colors.bg.accent.purple}; 918 outline-offset: 1px; 919 } 920`;var Vt=r(53970);const Zt=a.Ay.div` 921 width: ${({$size:e})=>e}px; 922 height: ${({$size:e})=>e}px; 923 border-radius: 50%; 924 overflow: hidden; 925 background: ${({theme:e})=>e.colors.bg.primary}; 926 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 927 display: flex; 928 align-items: center; 929 justify-content: center; 930 flex-shrink: 0; 931`,qt=({iconSlug:e,size:t=40})=>n.createElement(Zt,{$size:t},n.createElement(Vt.A,{categoryIconSlug:e,size:24})),Jt=a.Ay.div` 932 display: flex; 933 flex-direction: column; 934 gap: 8px; 935 width: 100%; 936`,Xt=a.Ay.div` 937 display: flex; 938 flex-direction: column; 939 gap: 8px; 940 /* 8px Wrapper gap + 16px = 24px between the chart and the list */ 941 margin-top: 16px; 942`,Qt=a.Ay.div` 943 display: flex; 944 justify-content: space-between; 945`,er=a.Ay.span` 946 ${o.R$} 947 color: ${({theme:e})=>e.colors.text.tertiary}; 948`,tr=a.Ay.div` 949 ${o.hm} 950 color: ${({theme:e})=>e.colors.text.secondary}; 951 text-align: center; 952 padding: 12px 0 0; 953`,rr=({title:e,categories:t,currencyCode:r})=>{const o=(0,a.DP)();return t&&0!==t.length?n.createElement(Jt,null,e&&n.createElement(tr,null,e),n.createElement(Ee,{data:t.map(e=>({label:e.name,value:e.amount})),color:o.colors.primitives.green600,valueFormat:"currency",currencyCode:r,showYAxis:!0,maxVisibleBars:3}),n.createElement(Xt,null,n.createElement(Qt,null,n.createElement(er,null,"Category"),n.createElement(er,null,"Amount")),n.createElement(Lt,null,t.map((e,t)=>n.createElement(n.Fragment,{key:`${e.name}-${t}`},t>0&&n.createElement(Ut,null),n.createElement(Yt,null,n.createElement(qt,{iconSlug:e.iconSlug}),n.createElement(Nt,null,n.createElement(Wt,null,e.name)),n.createElement(Bt,null,n.createElement(Ht,null,Ot(e.amount,r))))))))):null};function nr(e,t,r){if(0===e||0===t)return-1;const n=e/t;return Math.min(r-1,Math.max(0,Math.floor(n*r)))}const ar=["Su","Mo","Tu","We","Th","Fr","Sa"];const or=a.Ay.div` 954 display: flex; 955 flex-direction: column; 956 gap: 8px; 957`,lr=a.Ay.div` 958 display: grid; 959 grid-template-columns: repeat(7, 1fr); 960 gap: 3px; 961`,ir=a.Ay.span` 962 text-align: center; 963 font-size: 10px; 964 font-weight: 600; 965 line-height: 14px; 966 color: ${({theme:e})=>e.colors.text.tertiary}; 967 text-transform: uppercase; 968 padding: 4px 0; 969`,sr=a.Ay.div` 970 display: grid; 971 grid-template-columns: repeat(7, 1fr); 972 gap: 3px; 973`,cr=a.Ay.div` 974 aspect-ratio: 1; 975 min-width: 0; 976 border-radius: 4px; 977 display: flex; 978 align-items: center; 979 justify-content: center; 980 font-size: 11px; 981 font-weight: 600; 982 cursor: ${({$empty:e})=>e?"default":"pointer"}; 983 transition: transform 100ms ease, box-shadow 100ms ease; 984 background: ${({$bg:e,$empty:t})=>t?"transparent":e}; 985 color: ${({$color:e,$empty:t,theme:r})=>t?r.colors.text.tertiary:e}; 986 opacity: ${({$empty:e})=>e?.5:1}; 987 border: 2px solid ${({$isToday:e,$active:t,theme:r})=>t||e?r.colors.bg.accent.purple:"transparent"}; 988 box-shadow: ${({$active:e})=>e?"0 0 0 2px rgba(124, 92, 252, 0.2)":"none"}; 989 transform: ${({$active:e})=>e?"scale(1.08)":"none"}; 990 991 &:hover { 992 transform: ${({$empty:e})=>e?"none":"scale(1.1)"}; 993 } 994 995 &:focus-visible { 996 outline: 2px solid ${({theme:e})=>e.colors.bg.accent.purple}; 997 outline-offset: 1px; 998 } 999`,dr=a.Ay.div` 1000 display: flex; 1001 align-items: center; 1002 gap: 6px; 1003`,mr=a.Ay.span` 1004 font-size: 10px; 1005 line-height: 14px; 1006 color: ${({theme:e})=>e.colors.text.secondary}; 1007`,pr=a.Ay.div` 1008 display: flex; 1009 gap: 2px; 1010`,ur=a.Ay.div` 1011 width: 12px; 1012 height: 12px; 1013 border-radius: 2px; 1014 background: ${({$color:e})=>e}; 1015`,hr=({month:e,year:t,days:r,today:a,colors:o=T,textColors:l=L,onDayCl
1015ick:i,selectedDay:s=null})=>{if(!r||0===r.length)return null;const{startDay:c,daysInMonth:d,prevMonthDays:m}=function(e,t){const r=e-1,n=new Date(t,r,1),a=new Date(t,r+1,0).getDate(),o=new Date(t,r,0).getDate();return{startDay:n.getDay(),daysInMonth:a,prevMonthDays:o}}(e,t),p=new Map(r.map(e=>[e.day,e])),u=Array.from({length:d},(e,t)=>{var r;const n=t+1;return null!==(r=p.get(n))&&void 0!==r?r:{day:n,value:0}}),h=Math.max(...u.map(e=>e.value)),g=Array.from({length:c},(e,t)=>m-c+t+1),y=c+d,x=y%7==0?0:7-y%7,f=Array.from({length:x},(e,t)=>t+1);return n.createElement(or,null,n.createElement(lr,null,ar.map(e=>n.createElement(ir,{key:e},e))),n.createElement(sr,null,g.map(e=>n.createElement(cr,{key:`lead-${e}`,$bg:"transparent",$color:"",$isToday:!1,$active:!1,$empty:!0},e)),u.map(e=>{const t=nr(e.value,h,o.length),r=0===e.value;return n.createElement(cr,Object.assign({key:e.day},i&&{role:"button",tabIndex:0,"aria-pressed":s===e.day},{$bg:r?"transparent":o[t],$color:r?"inherit":l[t],$isToday:e.day===a,$active:s===e.day,$empty:!1,onClick:()=>null==i?void 0:i(e.day),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||null==i||i(e.day)}}),e.day)}),f.map(e=>n.createElement(cr,{key:`trail-${e}`,$bg:"transparent",$color:"",$isToday:!1,$active:!1,$empty:!0},e))),n.createElement(dr,null,n.createElement(mr,null,"Less"),n.createElement(pr,null,o.map((e,t)=>n.createElement(ur,{key:t,$color:e}))),n.createElement(mr,null,"More")))};var gr=r(97303);const yr=({transactions:e,currencyCode:t,title:r="Transactions"})=>{const[a,o]=(0,n.useState)(0);if(0===e.length)return null;const l=Math.ceil(e.length/4),i=e.slice(0,4*(a+1));return n.createElement(Pt,null,n.createElement(Mt,null,n.createElement(Tt,null,r)),n.createElement(Lt,null,i.map((e,r)=>n.createElement(n.Fragment,{key:`${e.merchantName}-${e.amount}-${r}`},r>0&&n.createElement(Ut,null),n.createElement(Yt,null,e.logoUrl?n.createElement(gr.A,{logoUrl:e.logoUrl,name:e.merchantName,size:42}):n.createElement(Ft,null,e.merchantName.charAt(0)),n.createElement(Nt,null,n.createElement(Wt,null,e.merchantName),e.categoryName&&n.createElement(Kt,null,e.categoryName)),n.createElement(Bt,null,n.createElement(Ht,null,Ot(e.amount,t)),e.time&&n.createElement(_t,null,e.time)))))),l>1&&a<l-1&&n.createElement(Gt,{onClick:()=>o(e=>e+1)},"View more"))};const xr=a.Ay.div` 1016 display: flex; 1017 flex-direction: ${({$horizontal:e})=>e?"row":"column"}; 1018 width: 100%; 1019`,fr=a.Ay.div` 1020 padding: 12px; 1021 display: flex; 1022 flex-direction: column; 1023 gap: 12px; 1024 ${({$horizontal:e,theme:t})=>e?`border-right: 1px solid ${t.colors.border.primary}; flex: 1;`:`border-bottom: 1px solid ${t.colors.border.primary};`} 1025`,br=a.Ay.div` 1026 ${({$horizontal:e})=>e?"flex: 1; min-width: 0; overflow-y: auto; max-height: 360px;":""} 1027`,vr=a.Ay.div` 1028 display: flex; 1029 align-items: center; 1030 justify-content: center; 1031 padding: 24px 12px; 1032 ${o.RS} 1033 color: ${({theme:e})=>e.colors.text.secondary}; 1034`,Er=a.Ay.div` 1035 display: flex; 1036 justify-content: space-between; 1037 align-items: center; 1038`,wr=a.Ay.span` 1039 font-size: 14px; 1040 font-weight: 700; 1041 line-height: 20px; 1042 color: ${({theme:e})=>e.colors.text.primary}; 1043`,$r=a.Ay.span` 1044 ${o.RS} 1045 color: ${({theme:e})=>e.colors.text.secondary}; 1046`,Ar=a.Ay.span` 1047 font-weight: 700; 1048 color: ${({theme:e})=>e.colors.text.primary}; 1049`,kr=({month:e,year:t,days:r,today:a,currencyCode:o})=>{var l;const i=(0,n.useRef)(null),[s,c]=(0,n.useState)(!1),[d,m]=(0,n.use
1049State)(null!=a?a:null);if((0,n.useEffect)(()=>{const e=i.current;if(!e)return;const t=new ResizeObserver(e=>{for(const t of e)c(t.contentRect.width>=500)});return t.observe(e),()=>t.disconnect()},[]),!r||0===r.length)return null;const p=r.reduce((e,t)=>e+t.amount,0),u=function(e,t){return new Date(t,e-1,1).toLocaleDateString("en-US",{month:"long",year:"numeric"})}(e,t),h=r.map(e=>({day:e.day,value:e.amount})),g=r=>new Date(t,e-1,r).toLocaleDateString("en-US",{month:"short",day:"numeric"}),y=null!==d?r.find(e=>e.day===d):null,x=null!==d?(null!==(l=null==y?void 0:y.transactions)&&void 0!==l?l:[]).map(e=>Object.assign(Object.assign({},e),{time:e.time||g(d)})):r.flatMap(e=>{var t;return(null!==(t=e.transactions)&&void 0!==t?t:[]).map(t=>Object.assign(Object.assign({},t),{time:t.time||g(e.day)}))});return n.createElement(xr,{ref:i,$horizontal:s},n.createElement(fr,{$horizontal:s},n.createElement(Er,null,n.createElement(wr,null,u),n.createElement($r,null,"Total: ",n.createElement(Ar,null,Rt(p,o)))),n.createElement(hr,{month:e,year:t,days:h,today:a,onDayClick:e=>m(t=>t===e?null:e),selectedDay:d})),n.createElement(br,{$horizontal:s},null!==d&&0===x.length?n.createElement(vr,null,"No transactions"):n.createElement(yr,{transactions:x,currencyCode:o})))},Cr=a.Ay.div` 1050 display: flex; 1051 gap: 3px; 1052`,Sr=a.Ay.div` 1053 flex: 1; 1054 min-width: 0; 1055 border-radius: 4px; 1056 display: flex; 1057 flex-direction: column; 1058 align-items: center; 1059 justify-content: center; 1060 padding: 12px 4px; 1061 cursor: pointer; 1062 transition: transform 120ms ease, box-shadow 120ms ease; 1063 position: relative; 1064 border: 2px solid ${({$active:e,theme:t})=>e?t.colors.bg.accent.purple:"transparent"}; 1065 background: ${({$bg:e})=>e}; 1066 color: ${({$color:e})=>e}; 1067 box-shadow: ${({$active:e})=>e?"0 0 0 2px rgba(124, 92, 252, 0.2)":"none"}; 1068 transform: ${({$active:e})=>e?"scale(1.04)":"none"}; 1069 1070 &:hover { 1071 transform: scale(1.06); 1072 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 1073 } 1074 1075 &:focus-visible { 1076 outline: 2px solid ${({theme:e})=>e.colors.bg.accent.purple}; 1077 outline-offset: 2px; 1078 } 1079 1080 ${({$isToday:e})=>e&&"\n &::after {\n content: '';\n position: absolute;\n bottom: 4px;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n }\n "} 1081`,jr=a.Ay.span` 1082 font-size: 12px; 1083 font-weight: 600; 1084 line-height: 18px; 1085`,Ir=a.Ay.span` 1086 font-size: 12px; 1087 font-weight: 600; 1088 line-height: 18px; 1089`,Dr=a.Ay.div` 1090 display: flex; 1091 align-items: center; 1092 gap: 6px; 1093`,Rr=a.Ay.span` 1094 font-size: 10px; 1095 line-height: 14px; 1096 color: ${({theme:e})=>e.colors.text.secondary}; 1097`,Or=a.Ay.div` 1098 display: flex; 1099 gap: 2px; 1100`,zr=a.Ay.div` 1101 width: 12px; 1102 height: 12px; 1103 border-radius: 2px; 1104 background: ${({$color:e})=>e}; 1105`,Pr=a.Ay.div` 1106 display: flex; 1107 flex-direction: column; 1108 gap: 12px; 1109`,Mr=e=>`${e}`,Tr=({days:e,colors:t=T,textColors:r=L,formatValue:a=Mr,onDayClick:o,selectedIndex:l=null})=>{if(!e||0===e.length)return null;const i=Math.max(...e.map(e=>e.value));return n.createElement(Pr,null,n.createElement(Cr,null,e.slice(0,7).map((e,s)=>{const c=nr(e.value,i,t.length),d=0===e.value;return n.createElement(Sr,Object.assign({key:e.label},o&&{role:"button",tabIndex:0,"aria-pressed":l===s},{$bg:d?"transparent":t[c],$color:d?"inherit":r[c],$active:l===s,$isToday:!!e.isToday,onClick:()=>null==o?void 0:o(s),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||null==o||o(s)}}),n.createElement(jr,null,e.label),n.createElement(Ir,null,a(e.value)))})),n.createElement(Dr,null,n.createElement(Rr,null,"Less"),n.createElement(Or,null,t.map((e,t)=>n.createElement(zr,{key:t,$color:e}))),n.createElement(Rr,null,"More")))},Lr=a.Ay.div` 1110 display: flex; 1111 flex-direction: column; 1112 width: 100%; 1113`,Ur=a.Ay.div` 1114 padding: 12px; 1115 display: flex; 1116 flex-direction: column; 1117 gap: 12px; 1118 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1119`,Yr=a.Ay.div` 1120 display: flex; 1121 justify-content: space-between; 1122 align-items: center; 1123`,Fr=a.Ay.span` 1124 font-size: 14px; 1125 font-weight: 700; 1126 line-height: 20px; 1127 color: ${({theme:e})=>e.colors.text.primary}; 1128`,Nr=a.Ay.span` 1129 ${o.RS} 1130 color: ${({theme:e})=>e.colors.text.secondary}; 1131`,Wr=a.Ay.span` 1132 font-weight: 700; 1133 color: ${({theme:e})=>e.colors.text.primary}; 1134`,Kr=({title:e="Spent last 7 days",days:t,currencyCode:r,total:a})=>{var o;
1134const[l,i]=(0,n.useState)(null);if(!t||0===t.length)return null;const s=null!=a?a:t.reduce((e,t)=>e+t.amount,0),c=null!==l?t[l]:null,d=c?(null!==(o=c.transactions)&&void 0!==o?o:[]).map(e=>Object.assign(Object.assign({},e),{time:e.time||zt(c.date,c.label)})):t.flatMap(e=>{var t;return(null!==(t=e.transactions)&&void 0!==t?t:[]).map(t=>Object.assign(Object.assign({},t),{time:t.time||zt(e.date,e.label)}))}),m=t.slice(0,7).map(e=>({label:e.label,value:e.amount,isToday:e.isToday}));return n.createElement(Lr,null,n.createElement(Ur,null,n.createElement(Yr,null,n.createElement(Fr,null,e),n.createElement(Nr,null,"Total: ",n.createElement(Wr,null,Rt(s,r)))),n.createElement(Tr,{days:m,formatValue:e=>function(e,t="USD"){return e>=1e4?new Intl.NumberFormat("en-US",{style:"currency",currency:t,notation:"compact",maximumFractionDigits:0}).format(e):e>=1e3?new Intl.NumberFormat("en-US",{style:"currency",currency:t,notation:"compact",maximumFractionDigits:1}).format(e):Rt(e,t)}(e,r),onDayClick:e=>i(t=>t===e?null:e),selectedIndex:l})),n.createElement(yr,{transactions:d,currencyCode:r}))};var Br=r(41845);const Hr=a.Ay.div` 1135 display: flex; 1136 gap: 8px; 1137`,_r=a.Ay.div` 1138 display: flex; 1139 flex-direction: column; 1140 flex: 1; 1141 min-width: 0; 1142 gap: 4px; 1143 padding: 12px; 1144 border-radius: 8px; 1145 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1146 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1147 overflow: hidden; 1148`,Gr=a.Ay.span` 1149 ${o.DE} 1150 color: ${({theme:e})=>e.colors.text.tertiary}; 1151 display: -webkit-box; 1152 -webkit-line-clamp: 2; 1153 -webkit-box-orient: vertical; 1154 overflow: hidden; 1155`,Vr=a.Ay.div` 1156 display: flex; 1157 align-items: baseline; 1158 gap: 4px 6px; 1159 flex-wrap: wrap; 1160 min-width: 0; 1161`,Zr=a.Ay.span` 1162 ${({$compact:e})=>e?o.t1:o.kR} 1163 color: ${({theme:e})=>e.colors.text.primary}; 1164 white-space: nowrap; 1165`,qr=a.Ay.span` 1166 ${o.hm} 1167 font-size: 12px; 1168 line-height: 16px; 1169 overflow: hidden; 1170 text-overflow: ellipsis; 1171 white-space: nowrap; 1172 max-width: 100%; 1173 color: ${({theme:e,$direction:t})=>"up"===t?e.colors.text.success:"down"===t?e.colors.text.danger:e.colors.text.tertiary}; 1174`,Jr=a.Ay.span` 1175 ${o.DE} 1176 color: ${({theme:e})=>e.colors.text.tertiary}; 1177 display: -webkit-box; 1178 -webkit-line-clamp: 2; 1179 -webkit-box-orient: vertical; 1180 overflow: hidden; 1181`,Xr=a.Ay.div` 1182 height: 32px; 1183 width: 100%; 1184 margin-top: 4px; 1185`;function Qr({data:e,color:t="#6055F6"}){const r=e.map((e,t)=>({i:t,v:e})),a=`spark-${t.replace("#","")}`;return n.createElement(Xr,null,n.createElement(C.u,{width:"100%",height:"100%"},n.createElement(S.Q,{data:r,margin:{top:2,right:0,bottom:0,left:0}},n.createElement("defs",null,n.createElement("linearGradient",{id:a,x1:"0",y1:"0",x2:"0",y2:"1"},n.createElement("stop",{offset:"0%",stopColor:t,stopOpacity:.3}),n.createElement("stop",{offset:"100%",stopColor:t,stopOpacity:.05}))),n.createElement(z.Gk,{type:"monotone",dataKey:"v",stroke:t,strokeWidth:1.5,fill:`url(#${a})`,dot:!1}))))}function en({label:e,value:t,valueFormat:r,currencyCode:a,subtitle:o,trend:l,sparkline:i}){const s=Z(t,r,a,{compact:!0}),c=s.length>7;return n.createElement(_r,null,n.createElement(Gr,{title:e},e),n.createElement(Vr,null,n.createElement(Zr,{$compact:c,title:s},s),l&&n.createElement(qr,{$direction:l.direction},"up"===l.direction?"â":"down"===l.direction?"â":""," ",l.value)),o&&n.createElement(Jr,{title:o},o),i&&n.createElement(Qr,{data:i.data,color:i.color}))}const tn=({cards:e})=>{if(e.length<2)return null;const t=e.slice(0,4),r=[];for(let e=0;e<t.length;e+=2)r.push(t.slice(e,e+2));return n.createElement("div",{style:{display:"flex",flexDirection:"column",gap:8,width:"100%"}},r.map((e,t)=>n.createElement(Hr,{key:t},e.map((e,t)=>n.createElement(en,Object.assign({key:`${e.label}-${t}`},e))))))};var rn=r(76818);const nn=a.i7` 1186 0%, 100% { opacity: 0.4; } 1187 50% { opacity: 1; } 1188`,an=a.Ay.div` 1189 display: flex; 1190 flex-direction: column; 1191 gap: 10px; 1192 width: 100%; 1193 padding: 12px 16px 16px; 1194 border-radius: 8px; 1195 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1196 background-color: ${({theme:e})=>e.colors.bg.primary}; 1197`,on=a.Ay.div` 1198 width: ${({$width:e})=>e}; 1199 height: ${({$height:e})=>e}; 1200 border-radius: 4px; 1201 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1202 animation: ${nn} 1.5s ease-in-out infinite; 1203`,ln=a.Ay.div` 1204 display: flex; 1205 align-items: center; 1206 gap: 8px; 1207 width: 100%; 1208`,sn=a.Ay.div` 1209 margin-left: auto; 1210`,cn=a.Ay.div` 1211 width: 100%; 1212 height: 1px; 1213 background-color: ${({theme:e})=>e.colors.border.primary}; 1214`,dn=({numCards:e=2})=>
1214n.createElement(an,null,n.createElement(on,{$width:"140px",$height:"20px"}),Array.from({length:e}).map((e,t)=>n.createElement(n.Fragment,{key:t},n.createElement(cn,null),n.createElement(ln,null,n.createElement(on,{$width:"70px",$height:"44px"}),n.createElement(on,{$width:"160px",$height:"20px"}),n.createElement(sn,null,n.createElement(on,{$width:"56px",$height:"46px"})))))),mn=a.Ay.div` 1215 display: flex; 1216 flex-direction: column; 1217 gap: 10px; 1218 width: 100%; 1219 padding: 12px 16px 16px; 1220 border-radius: 8px; 1221 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1222 background-color: ${({theme:e})=>e.colors.bg.primary}; 1223`,pn=a.Ay.p` 1224 ${o.Zc} 1225 color: ${({theme:e})=>e.colors.text.primary}; 1226 margin: 0; 1227`,un=a.Ay.div` 1228 display: flex; 1229 flex-direction: column; 1230 gap: 12px; 1231 width: 100%; 1232`,hn=a.Ay.div` 1233 width: 100%; 1234 height: 1px; 1235 background-color: ${({theme:e})=>e.colors.border.primary}; 1236`,gn=a.Ay.div` 1237 display: flex; 1238 align-items: center; 1239 gap: 8px; 1240 width: 100%; 1241`,yn=a.Ay.img` 1242 width: 70px; 1243 height: 44px; 1244 border-radius: 4px; 1245 object-fit: cover; 1246 flex-shrink: 0; 1247`,xn=(0,a.Ay)(o.a6)` 1248 color: ${({theme:e})=>e.colors.text.primary}; 1249 flex: 1; 1250 min-width: 0; 1251`,fn=a.Ay.div` 1252 display: flex; 1253 flex-direction: column; 1254 align-items: center; 1255 justify-content: center; 1256 min-width: 56px; 1257 height: 46px; 1258 padding: 2px 8px 4px; 1259 border-radius: 5px; 1260 background-color: ${({theme:e})=>e.colors.bg.accent.purpleTertiary}; 1261 flex-shrink: 0; 1262 white-space: nowrap; 1263`,bn=a.Ay.span` 1264 font-family: ${({theme:e})=>e.fonts.title}; 1265 font-size: 18px; 1266 font-weight: 700; 1267 line-height: 28px; 1268 color: ${({theme:e})=>e.colors.text.accent.purple}; 1269`,vn=a.Ay.span` 1270 font-family: ${({theme:e})=>e.fonts.body}; 1271 font-size: 10px; 1272 font-weight: 400; 1273 line-height: 14px; 1274 color: ${({theme:e})=>e.colors.text.secondary}; 1275`,En=({title:e,cards:t})=>n.createElement(mn,null,n.createElement(pn,null,e),n.createElement(un,null,t.map(e=>n.createElement(n.Fragment,{key:e.cardId},n.createElement(hn,null),n.createElement(gn,null,e.imageUri&&n.createElement(yn,{src:e.imageUri,alt:e.name}),n.createElement(xn,null,e.name),e.reward&&n.createElement(fn,null,n.createElement(bn,null,e.reward.rate),n.createElement(vn,null,e.reward.label)))))));var wn=r(8909),$n=r(31385),An=r(62976);const kn=a.Ay.div` 1276 display: flex; 1277 background-color: ${({theme:e})=>e.colors.bg.primary}; 1278 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1279 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 1280`,Cn=a.Ay.div` 1281 flex: 1; 1282 min-width: 160px; 1283 display: flex; 1284 flex-direction: column; 1285 gap: 8px; 1286 padding: 12px; 1287 justify-content: space-between; 1288 ${({$isFirst:e,theme:t})=>!e&&`border-left: 1px solid ${t.colors.border.primary};`} 1289`,Sn=a.Ay.div` 1290 display: flex; 1291 flex-direction: row; 1292 align-items: center; 1293 gap: 8px; 1294 flex: 1; 1295`,jn=a.Ay.div` 1296 display: flex; 1297 flex-direction: column; 1298 gap: 4px; 1299`,In=a.Ay.img` 1300 width: 50.4px; 1301 height: 32px; 1302 border-radius: 1.6px; 1303 object-fit: contain; 1304`,Dn=(0,a.Ay)(o.OJ)` 1305 color: ${({theme:e})=>e.colors.text.primary}; 1306 word-break: break-word; 1307`,Rn=a.Ay.button.attrs({type:"button"})` 1308 width: 100%; 1309 display: flex; 1310 align-items: center; 1311 justify-content: center; 1312 gap: 6px; 1313 background-color: ${({theme:e})=>e.colors.button.primary}; 1314 color: ${({theme:e})=>e.colors.text.inverse}; 1315 border: none; 1316 border-radius: 6px; 1317 padding: 10px 16px; 1318 cursor: pointer; 1319 font-family: ${({theme:e})=>e.fonts.subtitle}; 1320 font-size: 14px; 1321 font-weight: 600; 1322 line-height: 20px; 1323 transition: opacity 0.2s; 1324 1325 &:hover { 1326 opacity: 0.9; 1327 } 1328 1329 &:active { 1330 opacity: 0.8; 1331 } 1332`,On=(0,a.Ay)(o.Uy)` 1333 color: ${({theme:e})=>e.colors.text.secondary}; 1334 text-align: center; 1335`,zn=({cards:e})=>{const t=(0,wn.R)();return n.createElement(kn,null,e.map((e,r)=>{var a;return n.createElement(Cn,{key:e.id,$isFirst:0===r},n.createElement(Sn,null,e.imageUri&&n.createElement(In,{src:e.imageUri,alt:e.name}),n.createElement(Dn,null,e.name)),n.createElement(jn,null,n.createElement(Rn,{onClick:()=>(e=>{e.applyUrl&&t($n.c.CardApply,{cardId:e.id,url:e.applyUrl,bank:e.bank})})(e)},n.createElement(m.A,{icon:An.A,size:16}),e.ctaLabel||"Apply now"),n.createElement(On,null,e.ctaSecureSiteText||`On ${null!==(a=e.bank)&&void 0!==a?a:"bank"}'s secure site`)))}))},Pn=a.Ay.div` 1336 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1337 border-top: 1px solid ${({theme:e})=>e.colors.border.primary}; 1338 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1339 padding: 8px 12px; 1340`,Mn=(0,a.Ay)(o.OJ)` 1341 color: ${({theme:e})=>e.colors.text.secondary}; 1342`,Tn=({title:e})=>n.createElement(Pn,null,n.createElement(Mn,null,e)),Ln=a.Ay.div` 1343 display: flex; 1344`,Un=a.Ay.div` 1345 flex: 1; 1346 min-width: 160px; 1347 padding: 12px; 1348 ${({$isFirst:e,theme:t})=>!e&&`border-left: 1px solid ${t.colors.border.primary};`} 1349`,Yn=({children:e})=>n.createElement(Ln,null,n.Children.map(e,(e,t)=>n.createElement(Un,{key:t,$isFirst:0===t},e))),Fn=a.Ay.div` 1350 display: flex; 1351 flex-direction: column; 1352 gap: 2px; 1353`,Nn=a.Ay.div` 1354 display: flex; 1355 align-items: baseline; 1356 gap: 4px; 1357`,Wn=(0,a.Ay)(o.a6)` 1358 color: ${({theme:e})=>e.colors.text.link}; 1359`,Kn=(0,a.Ay)(o.a6)` 1360 color: ${({theme:e})=>e.colors.text.primary}; 1361`,Bn=(0,a.Ay)(o.gJ)` 1362 color: ${({theme:e})=>e.colors.text.secondary}; 1363`,Hn=({multiplier:e,category:t,description:r})=>
1363n.createElement(Fn,null,n.createElement(Nn,null,n.createElement(Wn,null,e),n.createElement(Kn,null,"on ",t)),n.createElement(Bn,null,r)),_n=a.Ay.div` 1364 position: relative; 1365 overflow: visible; 1366`,Gn=a.Ay.div` 1367 overflow-x: auto; 1368 -webkit-overflow-scrolling: touch; 1369 border-radius: 8px; 1370 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1371 1372 &::-webkit-scrollbar { 1373 display: none; 1374 } 1375 -ms-overflow-style: none; 1376 scrollbar-width: none; 1377`,Vn=a.Ay.div` 1378 background-color: ${({theme:e})=>e.colors.bg.primary}; 1379 min-width: ${({$numCards:e,$maxVisible:t})=>e>t?e/t*100+"%":"100%"}; 1380`,Zn=a.Ay.button` 1381 position: absolute; 1382 top: ${({$top:e})=>e}px; 1383 transform: translateY(-50%); 1384 ${({$position:e})=>"left"===e?"left: -12px;":"right: -12px;"} 1385 z-index: 20; 1386 width: 24px; 1387 height: 24px; 1388 border-radius: 100px; 1389 border: 1.5px solid ${({theme:e})=>e.colors.border.secondary}; 1390 background-color: ${({theme:e})=>e.colors.bg.primary}; 1391 color: ${({theme:e})=>e.colors.icon.secondary}; 1392 display: flex; 1393 align-items: center; 1394 justify-content: center; 1395 cursor: pointer; 1396 padding: 0; 1397 transition: opacity 0.2s; 1398 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 1399 1400 &:hover { 1401 opacity: 0.8; 1402 } 1403 1404 &:active { 1405 opacity: 0.6; 1406 } 1407`,qn=a.Ay.div` 1408 display: flex; 1409 flex-direction: column; 1410 gap: 4px; 1411`,Jn=(0,a.Ay)(o.a6)` 1412 color: ${({theme:e})=>e.colors.text.primary}; 1413`,Xn=(0,a.Ay)(o.gJ)` 1414 color: ${({theme:e})=>e.colors.text.secondary}; 1415`,Qn=a.Ay.div` 1416 display: flex; 1417 flex-direction: column; 1418 gap: 12px; 1419`,ea=a.Ay.ul` 1420 margin: 0; 1421 padding-left: 20px; 1422`,ta=a.Ay.li` 1423 color: ${({theme:e})=>e.colors.text.secondary}; 1424 font-family: ${({theme:e})=>e.fonts.body}; 1425 font-size: 14px; 1426 font-weight: 400; 1427 line-height: 20px; 1428 margin-bottom: 4px; 1429 1430 &:last-child { 1431 margin-bottom: 0; 1432 } 1433`,ra=({cards:e,maxVisibleCards:t})=>{const r=(0,n.useRef)(null),a=(0,n.useRef)(null),o=(0,n.useRef)(null),[l,i]=(0,n.useState)(!1),[s,c]=(0,n.useState)(e.length>(null!=t?t:3)),[d,p]=(0,n.useState)(3),[u,h]=(0,n.useState)(60);(0,n.useEffect)(()=>{const e=a.current;if(!e||void 0!==t)return;const r=new ResizeObserver(e=>{var t,r;const n=null!==(r=null===(t=e[0])||void 0===t?void 0:t.contentRect.width)&&void 0!==r?r:0;p(n>=700?3:2)});return r.observe(e),()=>r.disconnect()},[t]),(0,n.useEffect)(()=>{const e=o.current;if(!e)return;const t=new ResizeObserver(e=>{var t,r;const n=null!==(r=null===(t=e[0])||void 0===t?void 0:t.contentRect.height)&&void 0!==r?r:120;h(Math.round(n/2))});return t.observe(e),()=>t.disconnect()},[]);const g=null!=t?t:Math.min(d,e.length),y=e.length>g,x=(0,n.useCallback)(()=>{const e=r.current;e&&(i(e.scrollLeft>1),c(e.scrollLeft<e.scrollWidth-e.clientWidth-1))},[]);(0,n.useEffect)(()=>{requestAnimationFrame(x)},[g,e.length,x]);const f=(0,n.useCallback)(e=>{r.current=e,e&&requestAnimationFrame(x)},[x]),b=(0,n.useCallback)(e=>{const t=r.current;if(!t)return;const n=t.clientWidth/g;t.scrollBy({left:"right"===e?n:-n,behavior:"smooth"})},[g]);return n.createElement(_n,{ref:a},y&&l&&n.createElement(Zn,{$position:"left",$top:u,onClick:()=>b("left"),"aria-label":"Scroll left"},n.createElement(m.A,{icon:J.A,size:16})),y&&s&&n.createElement(Zn,{$position:"right",$top:u,onClick:()=>b("right"),"aria-label":"Scroll right"},n.createElement(m.A,{icon:X.A,size:16})),n.createElement(Gn,{ref:f,onScroll:x},n.createElement(Vn,{$numCards:e.length,$maxVisible:g},n.createElement("div",{ref:o},n.createElement(zn,{cards:e})),n.createElement(Tn,{title:"Welcome offer"}),n.createElement(Yn,null,e.map(e=>n.createElement(qn,{key:e.id},e.welcomeOfferTitle&&n.createElement(Jn,null,e.welcomeOfferTitle),e.welcomeOfferDescription&&n.createElement(Xn,null,e.welcomeOfferDescription),!e.welcomeOfferTitle&&!e.welcomeOfferDescription&&n.createElement(Xn,null,"None")))),n.createElement(Tn,{title:"Annual fee"}),n.createElement(Yn,null,e.map(e=>n.createElement(qn,{key:e.id},n.createElement(Jn,null,e.annualFee||"$0")))),n.createElement(Tn,{title:"Potential earnings"}),n.createElement(Yn,null,e.map(e=>n.createElement(qn,{key:e.id},e.potentialEarningsYear1?n.createElement(n.Fragment,null,n.createElement(Jn,null,e.potentialEarningsYear1," on year 1"),e.potentialEarningsYear2&&n.createElement(Jn,null,e.potentialEarningsYear2," on year 2")):n.createElement(Xn,null,"Not available")))),n.createElement(Tn,{title:"Rewards"}),n.createElement(Yn,null,e.map(e=>n.createElement(qn,{key:e.id},e.rewards.length>0?n.createElement(Qn,null,e.rewards.map((e,t)=>n.createElement(Hn,{key:t,multiplier:e.multiplier,category:e.category,description:e.description}))):n.createElement(Xn,null,"No rewards information")))),n.createElement(Tn,{title:"Credits"}),n.createElement(Yn,null,e.map(e=>n.createElement(qn,{key:e.id},e.credits.length>0?n.createElement(ea,null,e.credits.map((e,t)=>n.createElement(ta,{key:t},e))):n.createElement(Xn,null,"No credits available")))))))},na=a.i7` 1434 0%, 100% { 1435 opacity: 1; 1436 } 1437 50% { 1438 opacity: 0.5; 1439 } 1440`,aa=a.Ay.div` 1441 background-color: ${({theme:e})=>e.colors.bg.primary}; 1442 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1443 border-radius: 8px; 1444 overflow: hidden; 1445`,oa=a.Ay.div` 1446 display: flex; 1447 background-color: ${({theme:e})=>e.colors.bg.primary}; 1448 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1449 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 1450`,la=a.Ay.div` 1451 flex: 1; 1452 display: flex; 1453 flex-direction: column; 1454 gap: 8px; 1455 padding: 12px; 1456 ${({$isFirst:e,theme:t})=>!e&&`border-left: 1px solid ${t.colors.border.primary};`} 1457`,ia=a.Ay.div` 1458 width: ${({$width:e})=>e||"100%"}; 1459 height: ${({$height:e})=>e||"20px"}; 1460 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1461 border-radius: 4px; 1462 animation: ${na} 2s ease-in-out infinite; 1463`,sa=a.Ay.div` 1464 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1465 border-top: 1px solid ${({theme:e})=>e.colors.border.primary}; 1466 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1467 padding: 8px 12px; 1468`,ca=a.Ay.div` 1469 display: flex; 1470`,da=a.Ay.div` 1471 flex: 1; 1472 padding: 12px; 1473 display: flex; 1474 flex-direction: column; 1475 gap: 8px; 1476 ${({$isFirst:e,theme:t})=>!e&&`border-left: 1px solid ${t.colors.border.primary};`} 1477`,ma=({numCards:e=2})=>{const t=Array.from({length:e},(e,t)=>t);return n.createElement(aa,null,n.createElement(oa,null,t.map(e=>n.createElement(la,{key:e,$isFirst:0===e},n.createElement(ia,{$width:"50.4px",$height:"32px"}),n.createElement(ia,{$width:"80%",$height:"18px"}),n.createElement(ia,{$width:"100%",$height:"40px"}),n.createElement(ia,{$width:"60%",$height:"14px"})))),[1,2,3,4,5].map(e=>n.createElement("div",{key:e},n.createElement(sa,null,n.createElement(ia,{$width:"30%",$height:"18px"})),n.createElement(ca,null,t.map(e=>n.createElement(da,{key:e,$isFirst:0===e},n.createElement(ia,{$width:"90%"}),n.createElement(ia,{$width:"70%"})))))))};var pa=r(7771),ua=r(62089),ha=r(50228),ga=r(77643),ya=r(95062);const xa=a.Ay.div` 1478 display: flex; 1479 flex-direction: column; 1480 gap: 12px; 1481 padding: 16px; 1482 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1483 border-radius: 8px; 1484 background-color: ${({theme:e})=>e.colors.bg.primary}; 1485`,fa=a.Ay.div` 1486 display: flex; 1487 flex-direction: column; 1488 align-items: center; 1489 gap: 8px; 1490`,ba=a.Ay.div` 1491 ${o.Zc} 1492 color: ${({theme:e})=>e.colors.text.primary}; 1493 text-align: center; 1494`,va=a.Ay.div` 1495 display: flex; 1496 flex-direction: column; 1497 align-items: center; 1498 justify-content: center; 1499 gap: 2px; 1500 padding: 8px 12px; 1501 border-radius: 6px; 1502 background-color: ${({theme:e})=>e.colors.bg.accent.purpleSecondary}; 1503`,Ea=a.Ay.div` 1504 ${o.R$} 1505 color: ${({theme:e})=>e.colors.text.link};
1506`,wa=a.Ay.div` 1507 ${o.kR} 1508 color: ${({theme:e})=>e.colors.text.link}; 1509 text-align: center; 1510`,$a=a.Ay.div` 1511 display: flex; 1512 flex-direction: column; 1513 gap: 8px; 1514`,Aa=a.Ay.div` 1515 display: flex; 1516 align-items: center; 1517 justify-content: space-between; 1518 gap: 8px; 1519`,ka=a.Ay.div` 1520 ${o.R$} 1521 color: ${({theme:e})=>e.colors.text.tertiary}; 1522`,Ca=a.Ay.div` 1523 ${o.Zc} 1524 color: ${({theme:e})=>e.colors.text.primary}; 1525 text-align: right; 1526`,Sa=a.Ay.div` 1527 display: flex; 1528 align-items: center; 1529 gap: 4px; 1530`,ja=a.Ay.div` 1531 ${o.R$} 1532 display: inline-flex; 1533 align-items: center; 1534 padding: 2px 14px 2px 8px; 1535 color: ${({theme:e})=>e.colors.text.inverse}; 1536 background-color: ${({theme:e})=>e.colors.bg.accent.purple}; 1537 clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); 1538`,Ia=({value:e,onViewBreakdown:t})=>{const r=(0,a.DP)(),{currencyCode:o}=e;return n.createElement(xa,null,n.createElement(fa,null,n.createElement(ua.A,{size:"custom",width:"65px",height:"40px",cardImageSrc:e.cardImageUri,cardImageAlt:e.cardName}),n.createElement(ba,null,e.cardName)),n.createElement(va,null,n.createElement(Ea,null,"Additional earnings"),n.createElement(wa,null,Ot(e.additionalEarnings,o))),n.createElement($a,null,n.createElement(Aa,null,n.createElement(Sa,null,n.createElement(ja,null,"Welcome offer"),n.createElement(m.A,{icon:ga.A,size:16,color:r.colors.icon.inactive})),n.createElement(Ca,null,Ot(e.welcomeOfferValue,o))),n.createElement(Aa,null,n.createElement(ka,null,"Rewards"),n.createElement(Ca,null,Ot(e.rewardsValue,o))),n.createElement(Aa,null,n.createElement(ka,null,"Credits & benef
1538its"),n.createElement(Ca,null,Ot(e.creditsValue,o))),n.createElement(Aa,null,n.createElement(ka,null,"Annual fee"),n.createElement(Ca,null,e.annualFee>0?"-":"",Ot(e.annualFee,o)))),n.createElement(ha.A,{variant:"primary",size:"40px",stretch:!0,onClick:t},"See detailed breakdown",n.createElement(m.A,{icon:ya.A,size:16})))},Da=a.i7` 1539 0%, 100% { opacity: 1; } 1540 50% { opacity: 0.5; } 1541`,Ra=a.Ay.div` 1542 display: flex; 1543 flex-direction: column; 1544 gap: 12px; 1545 padding: 16px; 1546 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1547 border-radius: 8px; 1548 align-items: center; 1549`,Oa=a.Ay.div` 1550 width: ${({$width:e})=>e||"100%"}; 1551 height: ${({$height:e})=>e||"16px"}; 1552 border-radius: 4px; 1553 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1554 animation: ${Da} 2s ease-in-out infinite; 1555`,za=()=>n.createElement(Ra,null,n.createElement(Oa,{$width:"65px",$height:"40px"}),n.createElement(Oa,{$width:"60%",$height:"18px"}),n.createElement(Oa,{$height:"56px"}),n.createElement(Oa,{$height:"96px"}),n.createElement(Oa,{$height:"40px"}));const Pa=a.Ay.div` 1556 display: flex; 1557 border-radius: 8px; 1558 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1559 background-color: ${({$bg:e})=>e}; 1560 overflow: hidden; 1561 width: 100%; 1562`,Ma=a.Ay.div` 1563 width: 4px; 1564 flex-shrink: 0; 1565 background-color: ${({$color:e})=>e}; 1566`,Ta=a.Ay.div` 1567 display: flex; 1568 flex-direction: column; 1569 gap: 4px; 1570 padding: 12px; 1571 flex: 1; 1572 min-width: 0; 1573`,La=a.Ay.div` 1574 display: flex; 1575 align-items: center; 1576 gap: 8px; 1577`,Ua=a.Ay.div` 1578 width: 20px; 1579 height: 20px; 1580 border-radius: 50%; 1581 display: flex; 1582 align-items: center; 1583 justify-content: center; 1584 flex-shrink: 0; 1585 background-color: ${({$color:e})=>e}; 1586`,Ya=a.Ay.span` 1587 color: ${({theme:e})=>e.colors.primitives.white}; 1588 font-size: 10px; 1589 font-weight: 700; 1590 line-height: 1; 1591`;function Fa({severity:e,color:t}){if("positive"===e)return n.createElement(Ua,{$color:t},n.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",role:"img","aria-hidden":"true"},n.createElement("path",{d:"M2 5.5L4 7.5L8 3",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})));const r="critical"===e?"!!":"warning"===e?"!":"i";return n.createElement(Ua,{$color:t},n.createElement(Ya,null,r))}const Na=a.Ay.div` 1592 ${o.hm} 1593 font-weight: 700; 1594 color: ${({theme:e})=>e.colors.text.primary}; 1595`,Wa=a.Ay.div` 1596 ${o.RS} 1597 color: ${({theme:e})=>e.colors.text.secondary}; 1598`,Ka=a.Ay.div` 1599 display: flex; 1600 align-items: center; 1601 gap: 6px; 1602 margin-top: 4px; 1603`,Ba=a.Ay.span` 1604 ${o.DE} 1605 color: ${({theme:e})=>e.colors.text.tertiary}; 1606`,Ha=a.Ay.span` 1607 ${o.hm} 1608 font-weight: 700; 1609 color: ${({$color:e})=>e}; 1610`,_a=a.Ay.button` 1611 ${o.DE} 1612 font-weight: 600; 1613 margin-top: 8px; 1614 padding: 6px 12px; 1615 border-radius: 6px; 1616 border: none; 1617 cursor: pointer;
1618 align-self: flex-start; 1619 background-color: ${({$color:e})=>e}; 1620 color: ${({theme:e})=>e.colors.primitives.white}; 1621 1622 &:hover { 1623 opacity: 0.9; 1624 } 1625`,Ga=({severity:e,title:t,body:r,metric:o,cta:l,onCtaPress:i})=>{const{accent:s,bg:c}=function(e){const t=(0,a.DP)();return{positive:{accent:t.colors.primitives.green500,bg:t.colors.primitives.green100},warning:{accent:t.colors.primitives.yellow500,bg:t.colors.primitives.yellow100},critical:{accent:t.colors.primitives.red500,bg:t.colors.primitives.red100},info:{accent:t.colors.primitives.purple500,bg:t.colors.primitives.purple100}}[e]}(e);return n.createElement(Pa,{$bg:c},n.createElement(Ma,{$color:s}),n.createElement(Ta,null,n.createElement(La,null,n.createElement(Fa,{severity:e,color:s}),n.createElement(Na,null,t)),n.createElement(Wa,null,r),o&&n.createElement(Ka,null,n.createElement(Ba,null,o.label,":"),n.createElement(Ha,{$color:s},o.value)),l&&n.createElement(_a,{$color:s,onClick:i},l.label)))};const Va=a.Ay.div` 1626 display: flex; 1627 flex-direction: column; 1628 gap: 12px; 1629 width: 100%; 1630`,Za=a.Ay.div` 1631 display: flex; 1632 flex-direction: column; 1633 gap: 4px; 1634`,qa=a.Ay.div` 1635 display: flex; 1636 justify-content: space-between; 1637 align-items: center; 1638`,Ja=a.Ay.span` 1639 ${o.RS} 1640 color: ${({theme:e})=>e.colors.text.primary}; 1641`,Xa=a.Ay.span` 1642 ${o.DE} 1643 color: ${({theme:e})=>e.colors.text.tertiary}; 1644`,Qa=a.Ay.div` 1645 height: 8px; 1646 border-radius: 4px; 1647 background-color: ${({theme:e})=>e.colors.primitives.gray200}; 1648 overflow: hidden; 1649 width: 100%; 1650`,eo=a.Ay.div` 1651 height: 100%; 1652 border-radius: 4px; 1653 width: ${({$width:e})=>Math.min(e,100)}%; 1654 background-color: ${({$color:e})=>e}; 1655 transition: width 0.3s ease-out; 1656`,to=a.Ay.span` 1657 ${o.hm} 1658 font-weight: 700; 1659 color: ${({$color:e})=>e}; 1660`,ro=({items:e})=>{const t=(0,a.DP)();return n.createElement(Va,null,e.map(e=>{const r=e.target>0?e.current/e.target:0,a=Math.round(100*r),o=function(e,t,r){return"ascending"===t?e>=.6?r.colors.primitives.green500:e>=.3?r.colors.primitives.yellow500:r.colors.primitives.red500:e<.6?r.colors.primitives.green500:e<.9?r.colors.primitives.yellow500:r.colors.primitives.red500}(r,e.colorDirection||"ascending",t),l=Z(e.current,e.valueFormat,e.currencyCode),i=Z(e.target,e.valueFormat,e.currencyCode);return n.createElement(Za,{key:e.label},n.createElement(qa,null,n.createElement(Ja,null,e.label),n.createElement(Xa,null,l," / ",i)),n.createElement(Qa,null,n.createElement(eo,{$width:a,$color:o})),n.createElement(to,{$color:o},a,"%"))}))};var no=r(88885);const ao=a.Ay.div` 1661 display: flex; 1662 flex-direction: column; 1663 gap: 16px; 1664`,oo=({payments:e,currencyCode:t,onViewCalendar:r})=>e&&0!==e.length?n.createElement(ao,null,n.createElement(Lt,null,e.map((e,r)=>n.createElement(n.Fragment,{key:e.id},r>0&&n.createElement(Ut,null),n.createElement(Yt,null,e.merchantLogoUrl?n.createElement(gr.A,{logoUrl:e.merchantLogoUrl,name:e.merchantName,size:42}):n.createElement(Ft,null,e.merchantName.charAt(0)),n.createElement(Nt,null,n.createElement(Wt,null,e.merchantName),n.createElement(Kt,null,e.nextPaymentDate)),n.createElement(Bt,null,n.createElement(Ht,null,Ot(e.amount,t)),n.createElement(_t,null,e.frequency)))))),r&&n.createElement(ha.A,{variant:"secondary",size:"40px",stretch:!0,onClick:r},n.createElement(m.A,{icon:no.A,size:16}),"See calendar view")):null;var lo=r(73499),io=r(58380),so=r(9704),co=r(3320);const mo=a.Ay.div` 1665 display: flex; 1666 flex-direction: column; 1667 gap: 16px; 1668 padding: 16px; 1669 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1670 border-radius: 8px; 1671 background-color: ${({theme:e})=>e.colors.bg.primary}; 1672`,po=a.Ay.div` 1673 display: flex; 1674 align-items: center; 1675 gap: 12px; 1676`,uo=a.Ay.div` 1677 display: flex; 1678 flex-direction: column; 1679 gap: 2px; 1680 min-width: 0; 1681`,ho=a.Ay.div` 1682 ${o.Bq} 1683 color: ${({theme:e})=>e.colors.text.primary}; 1684 white-space: nowrap; 1685 overflow: hidden; 1686 text-overflow: ellipsis; 1687`,go=a.Ay.a` 1688 ${o.RS} 1689 display: inline-flex; 1690 align-items: center; 1691 gap: 4px; 1692 color: ${({theme:e})=>e.colors.text.link}; 1693 text-decoration: none; 1694 white-space: nowrap; 1695 overflow: hidden; 1696 text-overflow: ellipsis; 1697 1698 &:hover { 1699 text-decoration: underline; 1700 } 1701`,yo=a.Ay.div` 1702 display: flex; 1703 gap: 12px; 1704`,xo=a.Ay.div` 1705 flex: 1; 1706 min-width: 0; 1707 display: flex; 1708 flex-direction: column; 1709 align-items: center; 1710 gap: 4px; 1711 padding: 10px 12px; 1712 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1713 border-radius: 8px; 1714`,fo=a.Ay.div` 1715 ${o.DE} 1716 color: ${({theme:e})=>e.colors.text.tertiary}; 1717 text-align: center; 1718`,bo=a.Ay.div` 1719 ${o.FI} 1720 color: ${({theme:e})=>e.colors.text.primary}; 1721 text-align: center; 1722`,vo=a.Ay.div` 1723 position: relative; 1724`,Eo=a.Ay.button` 1725 width: 100%; 1726 display: flex; 1727 align-items: center; 1728 justify-content: space-between; 1729 gap: 8px; 1730 padding: 10px 12px; 1731 border-radius: 8px; 1732 border: 1.5px solid ${({theme:e,$open:t})=>t?e.colors.border.accent.purple:e.colors.border.primary}; 1733 background: ${({theme:e})=>e.colors.bg.primary}; 1734 cursor: pointer; 1735 text-align: left; 1736`,wo=a.Ay.span` 1737 ${o.hm} 1738 color: ${({theme:e})=>e.colors.text.primary}; 1739`,$o=a.Ay.ul` 1740 position: absolute; 1741 top: calc(100% + 4px); 1742 left: 0; 1743 right: 0; 1744 z-index: 5; 1745 margin: 0; 1746 padding: 8px; 1747 list-style: none; 1748 max-height: 240px; 1749 overflow-y: auto; 1750 background: ${({theme:e})=>e.colors.bg.primary}; 1751 border: 1.5px solid ${({theme:e})=>e.colors.border.secondary}; 1752 border-radius: 8px; 1753 box-shadow: ${({theme:e})=>e.shadows.primary}; 1754`,Ao=a.Ay.li` 1755 ${o.RS} 1756 padding: 10px 8px; 1757 border-radius: 8px; 1758 color: ${({theme:e})=>e.colors.text.primary}; 1759 background: ${({theme:e,$selected:t})=>t?e.colors.bg.secondary:"transparent"}; 1760 cursor: pointer; 1761 1762 &:hover { 1763 background: ${({theme:e})=>e.colors.button.secondaryHover}; 1764 } 1765`,ko=({categoryId:e,categoryName:t,options:r,onChange:a})=>
1765{const[o,l]=(0,n.useState)(!1),i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!o)return;const e=e=>{i.current&&!i.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o]),n.createElement(vo,{ref:i},n.createElement(Eo,{type:"button",$open:o,onClick:()=>l(e=>!e)},n.createElement(wo,null,"Category: ",null!=t?t:"Uncategorized"),n.createElement(m.A,{icon:lo.A,size:12,flipVertical:o})),o&&n.createElement($o,null,r.map(t=>n.createElement(Ao,{key:t.id,$selected:t.id===e,onClick:()=>{a(t),l(!1)}},t.name))))},Co=a.Ay.div` 1766 display: flex; 1767 flex-direction: column; 1768 border-radius: 8px; 1769 overflow: hidden; 1770 background: ${({theme:e})=>e.colors.bg.secondary}; 1771`,So=a.Ay.div` 1772 display: flex; 1773 align-items: center; 1774 justify-content: space-between; 1775 padding: 10px 12px; 1776 1777 &:not(:last-child) { 1778 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 1779 } 1780`,jo=a.Ay.div` 1781 ${o.RS} 1782 color: ${({theme:e})=>e.colors.text.secondary}; 1783`,Io=a.Ay.div` 1784 ${o.hm} 1785 color: ${({theme:e})=>e.colors.text.primary}; 1786 text-align: right; 1787`,Do=a.Ay.div` 1788 ${o.hm} 1789 display: flex; 1790 align-items: center; 1791 gap: 8px; 1792 color: ${({theme:e})=>e.colors.text.primary}; 1793 margin-bottom: 8px; 1794`,Ro=a.Ay.div` 1795 display: flex; 1796 align-items: center; 1797 justify-content: center; 1798 width: 24px; 1799 height: 24px; 1800 flex-shrink: 0; 1801 border-radius: 8px; 1802 background-color: ${({theme:e})=>e.colors.bg.accent.purpleTertiary}; 1803 color: ${({theme:e})=>e.colors.icon.accent.purple}; 1804`,Oo=a.Ay.div` 1805 display: flex; 1806 flex-direction: column; 1807 gap: 12px; 1808 padding: 12px; 1809 border-radius: 8px; 1810 background: ${({theme:e})=>e.colors.bg.secondary}; 1811`,zo=a.Ay.div` 1812 display: flex; 1813 align-items: center; 1814 gap: 12px; 1815`,Po=a.Ay.img` 1816 width: 42px; 1817 height: 26px; 1818 object-fit: cover; 1819 border-radius: 4px; 1820 flex-shrink: 0; 1821`,Mo=a.Ay.div` 1822 width: 42px; 1823 height: 26px; 1824 border-radius: 4px; 1825 background: ${({theme:e})=>e.colors.bg.tertiary}; 1826 flex-shrink: 0; 1827`,To=a.Ay.div` 1828 display: flex; 1829 flex-direction: column; 1830 gap: 2px; 1831 min-width: 0; 1832`,Lo=a.Ay.div` 1833 ${o.hm} 1834 color: ${({theme:e})=>e.colors.text.primary}; 1835 white-space: nowrap; 1836 overflow: hidden; 1837 text-overflow: ellipsis; 1838`,Uo=a.Ay.div` 1839 ${o.DE} 1840 color: ${({theme:e})=>e.colors.text.tertiary}; 1841`,Yo=a.Ay.div` 1842 display: flex; 1843 align-items: flex-start; 1844 justify-content: space-between; 1845 gap: 8px; 1846 padding: 8px; 1847 background: ${({theme:e})=>e.colors.bg.primary}; 1848 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1849 border-radius: 6px; 1850`,Fo=a.Ay.div` 1851 display: flex; 1852 align-items: center; 1853 gap: 8px; 1854 min-width: 0; 1855`,No=a.Ay.div` 1856 min-width: 0; 1857`,Wo=a.Ay.div` 1858 ${o.hm} 1859 color: ${({theme:e})=>e.colors.text.primary}; 1860`,Ko=a.Ay.div` 1861 ${o.DE} 1862 color: ${({theme:e})=>e.colors.text.link}; 1863`,Bo=a.Ay.div` 1864 flex-shrink: 1; 1865 max-width: 55%; 1866 text-align: right; 1867`,Ho=a.Ay.div` 1868 ${o.hm} 1869 color: ${({theme:e})=>e.colors.text.primary}; 1870`,_o=a.Ay.div` 1871 ${o.DE} 1872 color: ${({theme:e})=>e.colors.text.tertiary}; 1873`,Go=({card:e,currencyCode:t})=>n.createElement(Oo,null,n.createElement(zo,null,e.imageUri?n.createElement(Po,{src:e.imageUri,alt:e.name}):n.createElement(Mo,null),n.createElement(To,null,n.createElement(Lo,null,e.name),e.lastFour&&n.createElement(Uo,null,"â¢â¢â¢â¢ ",e.lastFour))),(e.rewardRate||null!=e.rewardCashValue)&&n.createElement(Yo,null,n.createElement(Fo,null,n.createElement(Ro,null,n.createElement(m.A,{icon:io.A,size:18})),n.createElement(No,null,n.createElement(Wo,null,"Card rewards"),e.rewardRate&&n.createElement(Ko,null,e.rewardRate))),null!=e.rewardCashValue&&n.createElement(Bo,null,n.createElement(Ho,null,Ot(e.rewardCashValue,t),e.hasCustomRedemption?"*":""),e.hasCustomRedemption&&n.createElement(_o,null,"*With custom redemption")))),Vo=({payment:e,totalAmountPaid:t,totalTransactions:r,currencyCode:a,categories:o,onCategoryChange:l})=>{var i,s;const c=null!==(i=e.nextPaymentDateWithYear)&&void 0!==i?i:e.nextPaymentDate,[d,p]=(0,n.use
1873State)(e.categoryId?{id:e.categoryId,name:null!==(s=e.categoryName)&&void 0!==s?s:""}:void 0);(0,n.useEffect)(()=>{var t;return p(e.categoryId?{id:e.categoryId,name:null!==(t=e.categoryName)&&void 0!==t?t:""}:void 0)},[e.categoryId,e.categoryName]);return n.createElement(mo,null,n.createElement(po,null,n.createElement(gr.A,{logoUrl:e.merchantLogoUrl,name:e.merchantName,size:48}),n.createElement(uo,null,n.createElement(ho,null,e.merchantName),e.merchantWebsiteUrl&&n.createElement(go,{href:(u=e.merchantWebsiteUrl,/^https?:\/\//i.test(u)?u:`https://${u}`),target:"_blank",rel:"noopener noreferrer"},e.merchantWebsiteUrl,n.createElement(m.A,{icon:so.A,size:12})))),(null!=t||null!=r)&&n.createElement(yo,null,null!=t&&n.createElement(xo,null,n.createElement(fo,null,"Total amount paid"),n.createElement(bo,null,Ot(t,a))),null!=r&&n.createElement(xo,null,n.createElement(fo,null,"Total transactions"),n.createElement(bo,null,r))),o&&o.length>0&&n.createElement(ko,{categoryId:null==d?void 0:d.id,categoryName:null==d?void 0:d.name,options:o,onChange:e=>{p(e),l(e)}}),n.createElement(Co,null,n.createElement(So,null,n.createElement(jo,null,"Frequency"),n.createElement(Io,null,e.frequency)),c&&n.createElement(So,null,n.createElement(jo,null,"Next due date"),n.createElement(Io,null,c)),n.createElement(So,null,n.createElement(jo,null,"Amount due"),n.createElement(Io,null,Ot(e.amount,a))),e.recurringPaymentType&&n.createElement(So,null,n.createElement(jo,null,"Recurring type"),n.createElement(Io,null,e.recurringPaymentType))),e.usedCard&&n.createElement("div",null,n.createElement(Do,null,n.createElement(Ro,null,n.createElement(m.A,{icon:io.A,size:20})),"Card used"),n.createElement(Go,{card:e.usedCard,currencyCode:a})),e.betterCard&&n.createElement("div",null,n.createElement(Do,null,n.createElement(Ro,null,n.createElement(m.A,{icon:co.A,size:20})),"Better card in your wallet"),n.createElement(Go,{card:e.betterCard,currencyCode:a})));var u},Zo=a.i7` 1874 0%, 100% { 1875 opacity: 1; 1876 } 1877 50% { 1878 opacity: 0.5; 1879 } 1880`,qo=a.Ay.div` 1881 display: flex; 1882 flex-direction: column; 1883 gap: 16px; 1884 padding: 16px; 1885 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1886 border-radius: 8px; 1887`,Jo=a.Ay.div` 1888 display: flex; 1889 align-items: center; 1890 gap: 12px; 1891`,Xo=a.Ay.div` 1892 width: ${({$width:e,$flex:t})=>e||(t?"auto":"100%")}; 1893 height: ${({$height:e})=>e||"16px"}; 1894 border-radius: ${({$round:e})=>e?"50%":"4px"}; 1895 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1896 animation: ${Zo} 2s ease-in-out infinite; 1897 flex: ${({$flex:e})=>e?"1":"0 0 auto"}; 1898 min-width: 0; 1899`,Qo=()=>n.createElement(qo,null,n.createElement(Jo,null,n.createElement(Xo,{$width:"48px",$height:"48px",$round:!0}),n.createElement("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6}},n.createElement(Xo,{$width:"60%",$height:"18px"}),n.createElement(Xo,{$width:"40%",$height:"14px"}))),n.createElement(Jo,null,n.createElement(Xo,{$flex:!0,$height:"52px"}),n.createElement(Xo,{$flex:!0,$height:"52px"})),n.createElement(Xo,{$height:"128px"})),el="#0B131F",tl=({size:e=30})=>n.createElement("svg",{width:e,height:e,viewBox:"0 0 30.76 29.22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},n.createElement("path",{d:"M11.1865 0.25C11.4315 0.192018 11.7156 0.264343 12.0547 0.455078C12.3922 0.645049 12.7472 0.931353 13.1221 1.24512C13.4902 1.55322 13.8785 1.88851 14.2627 2.15039C14.6448 2.41082 15.055 2.62115 15.4727 2.65137C15.8899 2.68152 16.3268 2.53334 16.7441 2.33105C17.164 2.12752 17.5984 1.85132 18.0098 1.59961C18.4285 1.34339 18.8234 1.11201 19.1865 0.972656C19.5519 0.832518 19.8449 0.80185 20.0781 0.894531C20.3233 0.99203 20.5162 1.21739 20.6787 1.56543C20.841 1.91307 20.9565 2.34776 21.0693 2.81543C21.18 3.27402 21.2881 3.76655 21.4346 4.19434C21.5801 4.61923 21.777 5.0226 22.0898 5.28027C22.4038 5.53876 22.8439 5.66236 23.2988 5.7334C23.7578 5.80504 24.2756 5.82927 24.7607 5.86035C25.2547 5.892 25.7166 5.93067 26.0977 6.02832C26.4811 6.1266 26.7391 6.27365 26.875 6.48633C27.0075 6.69404 27.0276 6.97709 26.9473 7.34961C26.8673 7.7206 26.698 8.13682 26.5068 8.58008C26.3194 9.01477 26.1103 9.47668 25.9717 9.91016C25.8342 10.3402 25.7512 10.7837 25.8506 11.1787C25.9474 11.5635 26.2315 11.9106 26.5557 12.2227C26.8831 12.5378 27.2882 12.8505 27.6611 13.1514C28.0414 13.4581 28.3906 13.7545 28.6387 14.0537C28.8876 14.3539 29.0079 14.6243 28.9883 14.8818C28.9684 15.1397 28.8
1899082 15.3909 28.5156 15.6523C28.2242 15.9127 27.8332 16.1557 27.4102 16.4043C26.9952 16.6482 26.5468 16.8986 26.1748 17.1631C25.8066 17.4249 25.4728 17.7267 25.3184 18.0928C25.1598 18.4689 25.1739 18.9198 25.2441 19.3652C25.3149 19.814 25.4515 20.301 25.5703 20.7578C25.6914 21.2234 25.795 21.659 25.8174 22.0371C25.8398 22.4167 25.7768 22.6947 25.6133 22.8818C25.4457 23.0734 25.1666 23.1817 24.7725 23.2236C24.3807 23.2652 23.918 23.2371 23.4248 23.1973C22.9403 23.1581 22.4248 23.1066 21.96 23.1113C21.4989 23.116 21.0448 23.1747 20.6953 23.3848C20.3473 23.594 20.0917 23.9641 19.8828 24.3633C19.6725 24.7652 19.4902 25.2371 19.3105 25.6748C19.1274 26.121 18.9462 26.5339 18.7324 26.8545C18.5182 27.1756 18.2925 27.3714 18.0342 27.4326C17.7891 27.4906 17.5051 27.4183 17.166 27.2275C16.8284 27.0375 16.4736 26.7513 16.0986 26.4375C15.7305 26.1293 15.3422 25.7941 14.958 25.5322C14.576 25.2719 14.1665 25.0616 13.749 25.0313C13.3316 25.001 12.894 25.1502 12.4766 25.3525C12.0568 25.556 11.6221 25.8314 11.2109 26.083C10.7921 26.3393 10.3974 26.5716 10.0342 26.7109C9.66884 26.8511 9.37585 26.8808 9.14258 26.7881C8.89758 26.6906 8.7054 26.4659 8.54297 26.1182C8.38061 25.7704 8.26424 25.3351 8.15137 24.8672C8.04074 24.4086 7.93263 23.916 7.78613 23.4883C7.64061 23.0634 7.4437 22.66 7.13086 22.4023C6.81689 22.1439 6.37681 22.0202 5.92187 21.9492C5.46286 21.8776 4.94511 21.8543 4.45996 21.8232C3.96595 21.7916 3.50409 21.752 3.12305 21.6543C2.7876 21.5683 2.548 21.4453 2.40234 21.2734L2.3457 21.1963C2.21316 20.9886 2.19311 20.7056 2.27344 20.333C2.35343 19.962 2.52274 19.5458 2.71387 19.1025C2.90124 18.668 3.11044 18.2068 3.24902 17.7734C3.38656 17.3433 3.46952 16.899
18991 3.37012 16.5039C3.27322 16.1191 2.98919 15.772 2.66504 15.46C2.33755 15.1447 1.93251 14.8321 1.55957 14.5313C1.17931 14.2245 0.830104 13.9281 0.582031 13.6289C0.333078 13.3286 0.212696 13.0583 0.232422 12.8008C0.252281 12.5429 0.412474 12.2918 0.705078 12.0303C0.996457 11.7699 1.3875 11.5269 1.81055 11.2783C2.22554 11.0344 2.67389 10.784 3.0459 10.5195C3.41418 10.2577 3.74792 9.95588 3.90234 9.58984C4.06095 9.21368 4.04681 8.76288 3.97656 8.31738C3.9058 7.86867 3.77019 7.38159 3.65137 6.9248C3.53023 6.45911 3.42663 6.02365 3.4043 5.64551C3.38191 5.26609 3.44404 4.98886 3.60742 4.80176C3.77503 4.61005 4.05393 4.50188 4.44824 4.45996C4.84001 4.41836 5.30268 4.44547 5.7959 4.48535C6.28042 4.52453 6.79588 4.576 7.26074 4.57129C7.72182 4.5666 8.17589 4.50798 8.52539 4.29785C8.87344 4.08861 9.129 3.71849 9.33789 3.31934C9.54812 2.91758 9.73058 2.44638 9.91016 2.00879C10.0933 1.56246 10.2744 1.1488 10.4883 0.828125C10.7025 0.506982 10.9282 0.311225 11.1865 0.25Z",transform:"translate(0 1.54)",fill:el}),n.createElement("path",{d:"M11.1895 0.250977C11.4299 0.190945 11.7112 0.265065 12.0508 0.466797C12.3882 0.667289 12.7431 0.969468 13.1182 1.30078C13.4862 1.62592 13.8738 1.97956 14.2578 2.25586C14.6393 2.53031 15.0509 2.754 15.4717 2.78613C15.8924 2.81823 16.331 2.65967 16.748 2.44629C17.1682 2.23133 17.6034 1.94045 18.0146 1.6748C18.4335 1.40423 18.8279 1.15953 19.1904 1.0127C19.5552 0.864997 19.8447 0.834403 20.0742 0.930664C20.3182 1.03312 20.5127 1.27164 20.6768 1.64258C20.8399 2.01155 20.9555 2.47223 21.0684 2.96582C21.1792 3.45079 21.2875 3.96952 21.4336 4.41992C21.5785 4.86649 21.7737 5.28897 22.085 5.55957C22.3991 5.8327 22.8405 5.96384 23.2969 6.03906C23.7565 6.1148 24.275 6.14006 24.7598 6.17285C25.2538 6.20627 25.7148 6.24779 26.0947 6.35059C26.4754 6.45358 26.7343 6.60733 26.8721 6.83496C27.0084 7.0605 27.0271 7.36672 26.9463 7.7627C26.8658 8.15665 26.6959 8.59792 26.5049 9.06543C26.3172 9.52487 26.1089 10.0115 25.9707 10.4678C25.8335 10.9209 25.7528 11.3837 25.8506 11.7939C25.9461 12.1943 26.2269 12.5586 26.5518 12.8887C26.8791 13.2212 27.2842 13.5505 27.6572 13.8682C28.0374 14.1919 28.3871 14.5057 28.6357 14.8223C28.8845 15.1391 29.0088 15.4296 28.9883 15.7109C28.9678 15.9922 28.8027 16.2608 28.5107 16.5361C28.2191 16.8111 27.8281 17.0678 27.4053 17.3301C26.9904 17.5874 26.5419 17.8517 26.1699 18.1309C25.8007 18.4079 25.47 18.7256 25.3174 19.1074C25.1611 19.4986 25.1741 19.9686 25.2441 20.4375C25.3147 20.9096 25.4504 21.4215 25.5693 21.9043C25.6905 22.3958 25.7939 22.8587 25.8164 23.2607C25.8389 23.6649 25.7764 23.9643 25.6094 24.166C25.4408 24.3696 25.163 24.4824 24.7715 24.5264C24.381 24.5702 23.9192 24.5412 23.4258 24.499C22.9417 24.4577 22.4255 24.4033 21.96 24.4082C21.4977 24.4131 21.0413 24.4755 20.6904 24.6982C20.3429 24.9189 20.0888 25.308 19.8809 25.7275C19.6711 26.1506 19.4894 26.6469 19.3096 27.1094C19.1264 27.5805 18.9443 28.0184 18.7295 28.3584C18.5135 28.7002 18.2868 28.9058 18.0312 28.9697C17.7908 29.0297 17.5095 28.9556 17.1699 28.7539C16.8325 28.5534 16.4775 28.2512 16.1025 27.9199C15.7345 27.5948 15.3469 27.2411 14.9629 26.9648C14.5814 26.6904 14.1698 26.4667 13.749 26.4346C13.3283 26.4025 12.8897 26.561 12.4727 26.7744C12.0525 26.9894 11.6173 27.2802 11.2061 27.5459C10.7871 27.8165 10.3928 28.0612 10.0303 28.208C9.6657 28.3556 9.37693 28.3861 9.14746 28.29C8.90333 28.1877 8.70908 27.9492 8.54492 27.5781C8.38169 27.2091 8.26519 26.7486 8.15234 26.2549C8.0415 25.7699 7.93325 25.2512 7.78711 24.8008C7.64221 24.3542 7.44698 23.9317 7.13574 23.6611C6.82158 23.388 6.3802 23.2569 5.92383 23.1816C5.46414 23.1059 4.94568 23.0806 4.46094 23.0479C3.96687 23.0144 3.5059 22.9729 3.12598 22.8701C2.74535 22.7671 2.4864 22.6134 2.34863 22.3857C2.2123 22.1602 2.19356 21.854 2.27441 21.458C2.35489 21.064 2.52483 20.6228 2.71582 20.1553C2.90351 19.6958 3.11179 19.2092 3.25 18.7529C3.38723 18.2998 3.46884 17.837 3.37109 17.4268C3.27561 17.0264 2.99383 16.6621 2.66895 16.332C2.34165 15.9996 1.93649 15.6702 1.56348 15.3525C1.1834 15.0289 0.833582 14.7159 0.584961 14.3994C0.335954 14.0824 0.211904 13.7912 0.232422 13.5098C0.25294 13.2285 0.418045 12.9599 0.709961 12.6846C1.00156 12.4096 1.39262 12.1529 1.81543 11.8906C2.23033 11.6333 2.67882 11.369 3.05078 11.0898C3.41999 10.8128 3.7507 10.4951 3.90332 10.1133C4.05957 9.72213 4.04661 9.25213 3.97656 8.7832C3.90603 8.31114 3.77035 7.7992 3.65137 7.31641C3.53029 6.82508 3.42683 6.36284 3.4043 5.96094C3.38169 5.55656 3.44424 5.25645 3.61133 5.05469C3.77993 4.85112 4.05771 4.73828 4.44922 4.69434C4.83972 4.65051 5.30148 4.67954 5.79492 4.72168C6.27901 4.76303 6.79515 4.81745 7.26074 4.8125C7.66515 4.8082 8.06487 4.75976 8.39355 4.59863L8.53027 4.52246C8.87782 4.30185 9.13185 3.91268 9.33984 3.49316C9.54963 3.06997 9.73226 2.57392 9.91211 2.11133C10.0953 1.64022 10.2764 1.20226 10.4912 0.862305C10.7072 0.520482 10.9339 0.314897 11.1895 0.250977Z",transform:"translate(1.54 0)",fill:"white"}),n.createElement("text",{x:"16.27",y:"13.87",transform:"rotate(-18.67 16.27 13.87)",fill:el,fontSize:"5.89",fontWeight:500,letterSpacing:"1.18",textAnchor:"middle",dominantBaseline:"central"},"BEST")),rl=a.Ay.div` 1900 display: flex; 1901 flex-direction: column; 1902 gap: 12px; 1903 width: 100%; 1904`,nl=a.Ay.div` 1905 display: flex; 1906 flex-direction: column; 1907 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1908 border-radius: 8px; 1909 overflow: hidden; 1910 background-color: ${({theme:e})=>e.colors.bg.primary}; 1911`,al=a.Ay.div` 1912 display: flex; 1913 flex-direction: column; 1914 align-items: center; 1915 gap: 12px; 1916 padding: 16px; 1917 background-color: ${({theme:e,$variant:t})=>"recommended"===t?e.colors.bg.accent.purpleTertiary:e.colors.bg.secondary}; 1918`,ol=a.Ay.div` 1919 ${o.R$} 1920 color: ${({theme:e,$variant:t})=>"recommended"===t?e.colors.text.link:e.colors.text.tertiary}; 1921 text-align: center; 1922`,ll=a.Ay.div` 1923 position: relative; 1924 display: flex; 1925 justify-content: center; 1926`,il=a.Ay.div` 1927 position: absolute; 1928 top: -10px; 1929 right: -12px; 1930`,sl=a.Ay.div` 1931 ${o.Zc} 1932 color: ${({theme:e})=>e.colors.text.primary}; 1933 text-align: center; 1934`,cl=a.Ay.div` 1935 display: flex; 1936 flex-direction: column; 1937 padding: 16px; 1938`,dl=a.Ay.div` 1939 display: flex; 1940 align-items: center; 1941 justify-content: space-between; 1942 gap: 8px; 1943 padding: 12px 0; 1944`,ml=a.Ay.span` 1945 ${o.hm} 1946 color: ${({theme:e})=>e.colors.text.tertiary}; 1947`,pl=a.Ay.span` 1948 ${o.hm} 1949 color: ${({theme:e})=>e.colors.text.primary}; 1950 text-align: right; 1951 white-space: nowrap; 1952`,ul=a.Ay.div` 1953 height: 1px; 1954 background-color: ${({theme:e})=>e.colors.border.primary}; 1955`,hl=a.Ay.div` 1956 display: flex; 1957 flex-direction: column; 1958 gap: 6px; 1959 padding: 12px; 1960 border-radius: 8px; 1961 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1962`,gl=a.Ay.div` 1963 ${o.hm} 1964 color: ${({theme:e})=>e.colors.text.primary}; 1965`,yl=a.Ay.span` 1966 color: ${({theme:e})=>e.colors.text.link}; 1967`,xl=a.Ay.div` 1968 ${o.DE} 1969 color: ${({theme:e})=>e.colors.text.tertiary}; 1970`,fl=({variant:e,card:t,contextLabel:r,windowLabel:a,currencyCode:o})=>n.createElement(nl,null,n.createElement(al,{$variant:e},n.createElement(ol,{$variant:e},"recommended"===e?"Recommended card":"Current card"),n.createElement(ll,null,n.createElement(ua.A,{size:"custom",width:"66px",height:"40px",cardImageSrc:t.imageUri,cardImageAlt:t.name}),"recommended"===e&&n.createElement(il,null,n.createElement(tl,null))),n.createElement(sl,null,t.name)),n.createElement(cl,null,n.createElement(dl,null,n.createElement(ml,null,"Est. earnings from spend ",a),n.createElement(pl,null,Ot(t.earnings,o))),t.rewardRate&&n.createElement(n.Fragment,null,n.createElement(ul,null),n.createElement(dl,null,n.createElement(ml,null,"Rewards rate on ",r," purchases"),n.createElement(pl,null,t.rewardRate))))),bl=({usedCard:e,recommendedCard:t,contextLabel:r,windowLabel:a,cadence
1970Label:o,averageAnnualSpend:l,annualDelta:i,currencyCode:s})=>n.createElement(rl,null,n.createElement(fl,{variant:"used",card:e,contextLabel:r,windowLabel:a,currencyCode:s}),n.createElement(fl,{variant:"recommended",card:t,contextLabel:r,windowLabel:a,currencyCode:s}),n.createElement(hl,null,n.createElement(gl,null,"An extra ",Ot(t.earnings-e.earnings,s)," per ",o," stacks over time!"," ",n.createElement(yl,null,"That equals ~",Ot(i,s)," a year.")),n.createElement(xl,null,"Estimated rewards based on your average annual spend of ",Ot(l,s)," across ",r," purchases."))),vl=a.i7` 1971 0%, 100% { opacity: 1; } 1972 50% { opacity: 0.5; } 1973`,El=a.Ay.div` 1974 display: flex; 1975 flex-direction: column; 1976 gap: 12px; 1977 width: 100%; 1978`,wl=a.Ay.div` 1979 height: ${({$height:e})=>null!=e?e:156}px; 1980 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1981 border-radius: 8px; 1982 background-color: ${({theme:e})=>e.colors.bg.secondary}; 1983 animation: ${vl} 2s ease-in-out infinite; 1984`,$l=()=>n.createElement(El,null,n.createElement(wl,null),n.createElement(wl,null),n.createElement(wl,{$height:64}));var Al=r(59284),kl=r(72044),Cl=r(6148),Sl=r(51766),jl=r(17229),Il=r(19027);const Dl=a.Ay.div` 1985 display: flex; 1986 flex-direction: column; 1987 gap: 12px; 1988 width: 100%; 1989`,Rl=a.Ay.div` 1990 display: flex; 1991 flex-direction: column; 1992 gap: 12px; 1993 padding: 16px; 1994 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 1995 border-radius: 8px; 1996 background-color: ${({theme:e})=>e.colors.bg.primary}; 1997`,Ol=a.Ay.div` 1998 display: flex; 1999 flex-direction: column; 2000 align-items: center; 2001 gap: 8px; 2002`,zl=(0,a.Ay)(o.MP)` 2003 text-align: center; 2004`,Pl=a.Ay.div` 2005 display: flex; 2006 flex-direction: column; 2007 gap: 12px; 2008 padding: 12px; 2009 border-radius: 6px; 2010 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2011`,Ml=a.Ay.div` 2012 display: flex; 2013 flex-wrap: wrap; 2014 align-items: center; 2015 gap: 4px; 2016`,Tl=a.Ay.div` 2017 width: 100%; 2018 height: 1px; 2019 background-color: ${({theme:e})=>e.colors.border.primary}; 2020`,Ll=a.Ay.div` 2021 display: flex; 2022 align-items: center; 2023 justify-content: space-between; 2024 gap: 8px; 2025`,Ul=a.Ay.div` 2026 display: flex; 2027 flex-direction: column; 2028 gap: 4px; 2029`,Yl=a.Ay.div` 2030 position: relative; 2031 margin: 8px 0; 2032`,Fl=a.Ay.div` 2033 height: 16px; 2034 width: 100%; 2035 border-radius: 100px; 2036 overflow: hidden; 2037 background-color: ${({theme:e})=>e.colors.bg.tertiary}; 2038`,Nl=a.Ay.div` 2039 height: 100%; 2040 width: ${({$percentage:e})=>`${e}%`}; 2041 border-radius: 100px; 2042 background-color: ${({theme:e})=>e.colors.bg.accent.purple}; 2043 transition: width 0.3s ease-out; 2044`,Wl=a.Ay.div` 2045 position: absolute; 2046 right: -6px; 2047 top: 50%; 2048 transform: translateY(-50%); 2049 line-height: 0; 2050 color: ${({theme:e})=>e.colors.bg.tertiary}; 2051`,Kl=a.Ay.div` 2052 display: flex; 2053 align-items: center; 2054 gap: 8px; 2055`,Bl=a.Ay.div` 2056 display: flex; 2057 flex-direction: column; 2058 gap: 8px; 2059`,Hl=({cardName:e,cardImageUri:t,offerTitle:r,offerDescription:a,spendRequired:l,spendProgress:i,rewardCashValue:s,deadline:c,currencyCode:d})=>{const{goal:p,spent:u,spendRemaining:h,percentage:g,daysRemaining:y,deadlineLabel:x,hasMet:f}=(0,Cl.v6)({spendRequired:l,spendProgress:i,deadline:c}),b=e=>(0,Sl.A)(e,d),v=null!=r?r:null!=s?b(s):"";return n.createElement(Dl,null,n.createElement(Rl,null,n.createElement(Ol,null,n.createElement(ua.A,{size:"custom",width:"64px",height:"40px",cardImageSrc:t,cardImageAlt:e}),n.createElement(zl,null,e)),n.createElement(Pl,null,f?n.createElement(Kl,null,n.createElement(m.A,{icon:jl.A,size:40}),n.createElement(o.aL,null,"You've reached your welcome offer!")):n.createElement(n.Fragment,null,n.createElement(Ml,null,n.createElement(o.aL,null,"Reach your"),null!=s&&n.createElement(o.aL,{accent:!0},b(s)),n.createElement(o.aL,null,"welcome offer goal")),n.createElement(Tl,null),n.createElement(Ul,null,n.createElement(Ll,null,n.createElement(o.aL,{accent:!0},b(h)),null!=y&&n.createElement(o.aL,{accent:!0},y," days remaining")),n.createElement(Ll,null,n.createElement(o.a6,{tertiary:!0},"Left to spend"),x&&n.createElement(o.a6,{tertiary:!0},"Deadline ",x))),n.createElement("div",null,n.createElement(Yl,null,n.createElement(Fl,null,n.createElement(Nl,{$percentage:g})),n.createElement(Wl,null,n.createElement(m.A,{icon:Il.A,size:32}))),n.createElement(Ll,null,n.createElement(o.a6,{tertiary:!0},"Spent ",b(u)),n.createElement(o.a6,{tertiary:!0}
2059,"Goal ",b(p))))))),(v||a)&&n.createElement(Bl,null,v&&n.createElement(o.aL,null,v),a&&n.createElement(o.Us,{secondary:!0},a)))},_l=a.i7` 2060 0%, 100% { opacity: 1; } 2061 50% { opacity: 0.5; } 2062`,Gl=a.Ay.div` 2063 width: ${({$width:e})=>e||"100%"}; 2064 height: ${({$height:e})=>e||"16px"}; 2065 border-radius: ${({$radius:e})=>e||"4px"}; 2066 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2067 animation: ${_l} 2s ease-in-out infinite; 2068`,Vl=()=>n.createElement(Dl,null,n.createElement(Rl,null,n.createElement(Ol,null,n.createElement(Gl,{$width:"64px",$height:"40px"}),n.createElement(Gl,{$width:"160px",$height:"20px"})),n.createElement(Pl,null,n.createElement(Gl,{$width:"70%",$height:"20px"}),n.createElement(Tl,null),n.createElement(Ll,null,n.createElement(Gl,{$width:"80px",$height:"20px"}),n.createElement(Gl,{$width:"110px",$height:"20px"})),n.createElement(Gl,{$height:"16px",$radius:"100px"}),n.createElement(Ll,null,n.createElement(Gl,{$width:"90px",$height:"16px"}),n.createElement(Gl,{$width:"90px",$height:"16px"})))),n.createElement(Bl,null,n.createElement(Gl,{$width:"120px",$height:"20px"}),n.createElement(Gl,{$height:"16px"}))),Zl=a.Ay.div` 2069 font-family: ${({theme:e})=>e.fonts.body}; 2070 font-size: 14px; 2071 line-height: 20px; 2072 overflow-wrap: break-word; 2073 word-break: break-word; 2074 min-width: 0; 2075 2076 * { 2077 margin: 0; 2078 padding: 0; 2079 } 2080 2081 h1, 2082 h2, 2083 h3, 2084 h4, 2085 h5, 2086 h6 { 2087 font-family: ${({theme:e})=>e.fonts.title}; 2088 font-weight: 700; 2089 margin: 8px 0 2px; 2090 } 2091 h1 { 2092 font-size: 18px; 2093 line-height: 28px; 2094 } 2095 h2 { 2096 font-size: 16px; 2097 line-height: 24px; 2098 } 2099 h3 { 2100 font-size: 14px; 2101 line-height: 20px; 2102 } 2103 h4, 2104 h5, 2105 h6 { 2106 font-size: 12px; 2107 line-height: 18px; 2108 font-weight: 600; 2109 } 2110 p { 2111 margin: 0; 2112 } 2113 p + p { 2114 margin-top: 6px; 2115 } 2116 strong { 2117 font-weight: 600; 2118 } 2119 a { 2120 color: ${({theme:e})=>e.colors.text.link}; 2121 text-decoration: none; 2122 &:hover { 2123 text-decoration: underline; 2124 } 2125 } 2126 code { 2127 font-size: 12px; 2128 padding: 1px 4px; 2129 border-radius: 3px; 2130 background-color: ${({theme:e})=>e.colors.bg.tertiary}; 2131 } 2132 pre { 2133 margin: 6px 0; 2134 padding: 8px 10px; 2135 border-radius: 6px; 2136 background-color: ${({theme:e})=>e.colors.bg.tertiary}; 2137 overflow-x: auto; 2138 code { 2139 padding: 0; 2140 background: none; 2141 } 2142 } 2143 ul, 2144 ol { 2145 margin: 4px 0; 2146 padding-left: 16px; 2147 } 2148 li { 2149 margin: 2px 0; 2150 line-height: 20px; 2151 p { 2152 margin: 0; 2153 } 2154 } 2155 blockquote { 2156 margin: 6px 0; 2157 padding: 6px 10px; 2158 border-left: 3px solid ${({theme:e})=>e.colors.border.accent.purple}; 2159 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2160 border-radius: 0 6px 6px 0; 2161 color: ${({theme:e})=>e.colors.text.secondary}; 2162 } 2163 em { 2164 font-style: italic; 2165 } 2166 table { 2167 width: 100%; 2168 border-collapse: collapse; 2169 margin: 6px 0; 2170 font-size: 12px; 2171 } 2172 th, 2173 td { 2174 padding: 4px 8px; 2175 text-align: left; 2176 border-bottom: 1px solid ${({theme:e})=>e.colors.border.primary}; 2177 } 2178 th { 2179 font-weight: 700; 2180 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2181 } 2182 hr { 2183 margin: 8px 0; 2184 border: none; 2185 border-top: 1px solid ${({theme:e})=>e.colors.border.primary}; 2186 } 2187`;var ql=r(81144),Jl=r(18967);const Xl={title:ql.Yj(),subtitle:ql.Yj().optional(),footer:ql.Ik({trend:ql.Ik({value:ql.Yj(),direction:ql.k5(["up","down","neutral"])}).optional(),description:ql.Yj().optional()}).optional()},Ql=e=>Object.assign(Object.assign({},e),{description:e.toolHints?`${e.description} Data: ${e.toolHints}`:e.description}),ei={CardValue:Ql({summary:"One owned card's realized value this card-year â welcome offer, rewards, credits and annual fee netted into additional earnings, with whether it beats the fee.",toolHints:"On a card_value_overperforming or card_value_underperforming tap, cardId is the card id already on the feed card, so do not look it up. Otherwise it is a wallet card
2187id from GetUserProfile (Users_getCards), never a card-catalog search id. Every value figure â welcome offer, rewards earned, credits, annual fee and the net â is resolved client-side from the card, the user's transaction aggregates and completed perks, so never pass them inline.",description:'Single-card value card for ONE owned credit card â "is my Sapphire Preferred worth the annual fee?", "what has this card earned me?", "is this card underperforming?". Renders the card, an additional-earnings figure and a welcome offer / rewards / credits / annual fee breakdown, plus a detailed-breakdown action. All figures resolve from the entity store via cardId â pass only cardId (NOT a card-catalog search id; use a wallet card id from GetUserProfile).',props:ql.Ik({cardId:ql.Yj().describe("Wallet card id from GetUserProfile (Users_getCards). NOT a card-catalog search id.")})}),RecurringPaymentDetails:Ql({summary:"One specific subscription in depth, including the card it is charged to and whether a better card is available.",toolHints:"recurringPaymentId is the groupId, not the id: GetUserRecurringPayments returns one row per charge and id is groupId plus the date. totalAmountPaid (statistics.paidTotalAmount.amount) and totalTransactions (statistics.paidCount) are per-subscription, so take them from a groupId-filtered call; a merchantIds filter sums across every subscription at that merchant, and an unfiltered one is household-wide. Money is {amount, currencyCode} and carries float artifacts, so round. On a new_recurring_subscription_detected tap, filter by the merchant id on the card and take the most recent firstSeen. With no merchant id, call unfiltered and take the most recent firstSeen anyway, silently: they tapped a specific card, so asking which merchant is a dead end. Nothing back means it is no longer showing up, so say that and render nothing.",description:'Single-subscription detail card for ONE specific recurring payment in depth: "what\'s my Netflix subscription costing me?", "is this a subscription I should cancel?", "what card is my Spotify charged to?". Use RecurringPayments instead when showing several at once. Category, card-used and better-card reward details resolve automatically from the groupId via the entity store, so never supply a card ID or category data yourself. Renders an editable category control.',props:ql.Ik({recurringPaymentId:ql.Yj().describe("The groupId from GetUserRecurringPayments (NOT the id, which is a single charge; NOT a transaction ID)"),totalAmountPaid:ql.ai().optional().describe("statistics.paidTotalAmount.amount from a GetUserRecurringPayments call filtered by this groupId (not merchantIds, which can span subscriptions). Round it."),totalTransactions:ql.ai().optional().describe("statistics.paidCount from the same groupId-filtered call."),currencyCode:ql.Yj().optional().describe('ISO 4217 currency code (e.g. "USD", "EUR"). Defaults to USD.')})}),WelcomeOffer:Ql({summary:"One card's welcome-offer spend progress â how much more to spend, days left, and the bonus.",toolHints:"cardId is the only input. The card art, name, offer title and terms, plus the spend threshold, current spend, cash value and deadline, all resolve from the user's record via the entity store, so none of them can be supplied or guessed.",description:'Welcome-offer progress card for ONE card the user is earning the sign-up bonus on â "how close am I to my welcome offer?", "when does my bonus deadline hit?", "how much more do I need to spend?". Shows spend remaining, days left, deadline, a spent/goal bar, and the offer title plus terms. Pass ONLY the cardId; everything else resolves automatically from the entity store.',props:ql.Ik({cardId:ql.Yj().describe("Card entity id â resolves the card and its welcome-offer progress.")})}),SpendRecap:Ql({summary:"A finished week of spending, day by day, for a tap on a weekly spending feed card.",toolHints:`Pass only the window; every amount resolves client-side from it. Derive it from the card's expires field, not its copy: startDate is expires minus 14 days, endDate is expires minus 7 (exclusive). Expires 2026-09-21 means 202
21876-09-07 to 2026-09-14, although the copy says "September 7th to September 13th". For the breakdown, call GetUserSpendingAggregates three times together, every call with partnerName "${Jl.CM}", filter.accountTypes ${JSON.stringify(Jl.iB.accountTypes)}, filter.spendOnly ${Jl.iB.spendOnly}: AggregateType CATEGORY and AggregateType MERCHANT with filter.startDate and filter.endDate set to the window above, and AggregateType CATEGORY with filter.startDate minus 7 days and filter.endDate equal to the window's startDate. Any other partnerName drops the account-type filter and counts transfers as spending. Name the biggest category and top merchant, and what changed against the prior week; if a rollup comes back empty, leave that item out. Rollups omit uncategorised and unscored rows and never sum to the card; that is expected. The card total is the truth: if currentSpend differs, use the card and say nothing about it.`,description:'Weekly spend recap for a tap on a "You spent X from A to B" feed card. Renders the finished week day by day, resolving every amount client-side from the window it is given.',props:ql.Ik({startDate:ql.Yj().optional().describe("Monday the finished week starts on, YYYY-MM-DD in UTC. When omitted, the card renders the last complete Monday-Sunday week."),endDate:ql.Yj().optional().describe("Exclusive end, YYYY-MM-DD in UTC: the Monday after startDate."),title:ql.Yj().optional(),currencyCode:ql.Yj().optional().describe('ISO 4217 currency code (e.g. "USD", "EUR"). Defaults to USD.')})}),SpendByCategory:Ql({summary:"Top spending categories over a date range, as a bar chart plus an itemized category list.",toolHints:"Data comes from GetUserSpendingAggregates (transactionAggregates.categoryAggregates, where category.name is the label, totalAmount the spend, and category.id the id). Pass category.id through as categoryId; the client resolves the category icon from it. Sort by totalAmount descending and pass the top categories (typically five). Amounts are plain numbers with float artifacts, so round. currencyCode is optional ISO 4217.",description:"Top-categories spend breakdown card: a bar chart of the highest-spend categories over a date range, plus a Category/Amount list with per-category icons. Use when the user asks where their money went, top categories, or a category breakdown for a period.",props:ql.Ik({title:ql.Yj().describe("Format: 'Top N categories between MM/DD - MM/DD', e.g. 'Top 5 categories between 06/30 - 07/06'"),categories:ql.YO(ql.Ik({categoryId:ql.Yj().optional().describe("The category id from categoryAggregates.category.id; the client resolves the icon from it."),name:ql.Yj(),amount:ql.ai()})),currencyCode:ql.Yj().optional()})}),MissedRewards:Ql({summary:"Compares the card a user actually used against the best wallet card for one category or merchant over a window, with earnings each way and the annualized gap",toolHints:"cardUsedId is a wallet card id from GetUserProfile (Users_getCards). Pass exactly one of categoryId (categoryAggregates.category.id from GetUserSpendingAggregates) or merchantId (a Merchant.id); timeframe defaults to lastWeek (last full Monday-Sunday). The client resolves card art/name, both reward rates and both dollar figures, so pass only ids. To write the prose, read the SAME values over the same window: GetUserSpendingAggregates filtered to creditCardIds:[cardUsedId] plus this context gives currentCashValueEarned (earned) and potentialCashValueEarned (best-card potential); GetCardRecommendationsForMerchant gives the recommended card and its rewardMultiplier vs the used card. Amounts are numbers with float artifacts, so round.",description:'Missed-rewards / better-card card for ONE spending context â "am I using the best card for groceries?", "how much did I leave on the table last week?". Shows the used card and the recommended wallet card side by side, each with the window earnings and a rate, plus the annualized gap. Pass cardUsedId and ONE of categoryId/merchantId; timeframe defaults to lastWeek. All display values resolve client-side.',props:ql.Ik({cardUsedId:ql.Yj().describe("Wallet card
2187id from GetUserProfile (Users_getCards) â the card the user actually used."),categoryId:ql.Yj().optional().describe("Spending category id from categoryAggregates.category.id. Provide this OR merchantId."),merchantId:ql.Yj().optional().describe("Merchant id. Provide this OR categoryId."),timeframe:ql.k5(["lastWeek","thisWeek","lastMonth","thisMonth"]).default("lastWeek").optional().describe("Window to compare over. Weeks are Monday-Sunday. Defaults to lastWeek."),currencyCode:ql.Yj().optional().describe('ISO 4217 (e.g. "USD"). Defaults to USD.')}).refine(e=>Boolean(e.categoryId)!==Boolean(e.merchantId),{message:"Provide exactly one of categoryId or merchantId"})})},ti={Gauge:Ql({summary:"One bounded metric, such as utilization or a score, shown against its minimum and maximum where the position in that range is what matters.",description:'Semicircular gauge card with needle. Use for a single bounded metric with meaningful zones or thresholds (min/max known, performance ranges are meaningful). Renders inside a card with title and optional trend footer. Set colorDirection to "descending" when lower values are good (e.g., utilization, debt ratio). Use valueFormat to display currency, percent, points, miles, or multiplier.',props:ql.Ik(Object.assign(Object.assign({},Xl),{value:ql.ai(),min:ql.ai(),max:ql.ai(),label:ql.Yj().optional(),valueFormat:ql.k5(["currency","percent","points","miles","multiplier","number"]).optional(),currencyCode:ql.Yj().optional().describe('ISO 4217 currency code (e.g. "USD", "EUR"). Only used when valueFormat is "currency". Defaults to USD.'),colorDirection:ql.k5(["ascending","descending"]).default("ascending").optional()}))}),BarChart:Ql({summary:"Ranked or grouped comparison across discrete categories, including multi-series comparisons such as year-over-year spend.",description:'Bar chart card (vertical by default). Use for ranked comparisons, discrete category values, or multi-series comparisons (YoY spend, category breakdowns). For multi-series, provide `xKey` and `bars` array; for single-series, provide `data` as [{label, value}]. Supports "grouped" (side-by-side, default) and "stacked" display modes.',props:ql.Ik(Object.assign(Object.assign({},Xl),{data:ql.KC([ql.YO(ql.Ik({label:ql.Yj(),value:ql.ai()})),ql.YO(ql.g1(ql.Yj(),ql.KC([ql.Yj(),ql.ai()])))]),valueFormat:ql.k5(["currency","percent","number"]).optional(),currencyCode:ql.Yj().optional(),xKey:ql.Yj().optional(),bars:ql.YO(ql.Ik({dataKey:ql.Yj(),label:ql.Yj().optional()})).optional(),mode:ql.k5(["grouped","stacked"]).default("grouped").optional()})).refine(e=>!e.bars||e.xKey,{message:"xKey is required when bars is provided"})}),LineChart:Ql({summary:"Two or more series over a shared time axis, where the rate of change matters more than the magnitude.",description:"Line chart card with smooth curves. Use for comparing 2+ series over the same time axis, or when rate of change matters more than magnitude. For a single metric where volume/accumulation is the story, prefer AreaChart.",props:ql.Ik(Object.assign(Object.assign({},Xl),{data:ql.YO(ql.g1(ql.Yj(),ql.KC([ql.Yj(),ql.ai()]))),xKey:ql.Yj(),lines:ql.YO(ql.Ik({dataKey:ql.Yj(),label:ql.Yj().optional()})),showLabels:ql.zM().optional()}))}),AreaChart:Ql({summary:"A single metric over time where magnitude and accumulation matter; preferred over LineChart when the question is how much rather than which direction.",description:'Area chart card with gradient fill under smooth curves. PREFERRED over LineChart when showing a single metric over time where the magnitude matters â the filled area emphasizes volume and accumulation. Best for values where "how much" is as important as "which direction." For comparing multiple overlapping series, prefer LineChart instead (fills would obscure each other).',props:ql.Ik(Object.assign(Object.assign({},Xl),{data:ql.YO(ql.g1(ql.Yj(),ql.KC([ql.Yj(),ql.ai()]))),xKey:ql.Yj(),areas:ql.YO(ql.Ik({dataKey:ql.Yj(),label:ql.Yj().optional()}))}))}),PieChart:Ql({summary:"How a total divides into parts, for segments that differ enough in size to be read at a glance.",description:"Donut/pie chart card with labeled segments and legend. Use when showing how a total divides into parts (part-to-whole relationship
2187). Works best when segments have meaningfully different sizes. Set centerLabel to display the total. If segments are similar in size, prefer BarChart for precision.",props:ql.Ik(Object.assign(Object.assign({},Xl),{segments:ql.YO(ql.Ik({label:ql.Yj(),value:ql.ai()})),centerLabel:ql.Yj().optional()}))}),SpendHeatmap:Ql({summary:"Daily spending across seven days or fewer, with the transactions behind each day.",description:'Seven-day spending heatmap card with transaction list. Cells colored by relative spend intensity (auto-computed). Click a day to filter transactions. PREFERRED over text tables or bar charts when showing daily spending for 7 days or less. Use whenever the user asks about "this week", "last 7 days", weekly spending, or daily breakdowns with transactions. Has its own built-in header with title and total.',props:ql.Ik({title:ql.Yj().optional(),days:ql.YO(ql.Ik({label:ql.Yj(),amount:ql.ai(),date:ql.Yj(),isToday:ql.zM().optional(),transactions:ql.YO(ql.Ik({merchantName:ql.Yj(),merchantId:ql.Yj().optional().describe("Merchant ID for logo resolution"),categoryName:ql.Yj().optional(),amount:ql.ai(),time:ql.Yj().optional().describe('Display date or time, e.g. "May 12" or "8:15 AM"'),logoUrl:ql.Yj().optional().describe("Merchant logo URL (fallback if merchantId not provided)")})).optional()})),currencyCode:ql.Yj().optional()})}),SpendCalendar:Ql({summary:"Daily spending across a full month, with the transactions behind each day.",description:'Monthly calendar heatmap card showing daily spend intensity (auto-computed). Click a day to filter transactions. PREFERRED over text tables, bar charts, or line charts when showing a full month of spending. Use whenever the user asks about "this month", "the damage this month", monthly spending, or spending patterns over 2+ weeks. Missing days are filled as $0 automatically. Only include days that have spend > 0. Has its own built-in header with month/year and total.',props:ql.Ik({month:ql.ai().min(1).max(12).describe("Month number (1=January, 12=December)"),year:ql.ai().describe("Full year, e.g. 2026"),days:ql.YO(ql.Ik({day:ql.ai(),amount:ql.ai(),transactions:ql.YO(ql.Ik({merchantName:ql.Yj(),merchantId:ql.Yj().optional().describe("Merchant ID for logo resolution"),categoryName:ql.Yj().optional(),amount:ql.ai(),time:ql.Yj().optional().describe('Display date or time, e.g. "May 12" or "8:15 AM"'),logoUrl:ql.Yj().optional().describe("Merchant logo URL (fallback if merchantId not provided)")})).optional()})),today:ql.ai().optional(),currencyCode:ql.Yj().optional()})}),CreditScore:Ql({summary:"A credit score with its supporting metrics, such as total limit and utilization.",description:"Credit score widget with colored semicircular gauge and stats table. Use when showing a user's credit score with related metrics (total limit, utilization, etc.). Renders inside a ChartCard. When isSpinwheelConnected is explicitly false, shows a connect CTA instead of the gauge. When null/undefined, renders normally.",props:ql.Ik({value:ql.ai().min(300).max(850).nullable().optional(),stats:ql.YO(ql.Ik({label:ql.Yj(),value:ql.Yj()})).optional(),isSpinwheelConnected:ql.zM().nullable().optional()})}),StatsGrid:Ql({summary:"Two to four headline numbers at a glance; always placed above other charts.",description:"Responsive 2x2 grid of metric cards. Use for showing 2â4 key numbers at a glance â spend totals, credit stats, reward summaries. Each card has a label, formatted value, optional trend indicator, optional subtitle, and optional mini sparkline. ONLY use when you have 2â4 discrete numeric metrics to highlight. IMPORTANT: When used alongside other charts, StatsGrid MUST be the FIRST child in the Stack â always render it above other visualizations.",props:ql.Ik({cards:ql.YO(ql.Ik({label:ql.Yj().describe('Short metric name, e.g. "Total Spend", "Credit Score"'),value:ql.ai(),valueFormat:ql.k5(["currency","percent","points","miles","multiplier","number"]).optional(),currencyCode:ql.Yj().optional(),subtitle:ql.Yj().optional().describe('Gray helper text below value, e.g. "vs $4,800 last month"'),trend:ql.Ik({value:ql.Yj().describe('Trend label, e.g. "12%", "+3", "$75 gap"'),direction:ql.k5(["up","down","neutral"])}).optional(),sparkline:ql.Ik({data:ql.YO(ql.ai()).describe("6â12 numeric values for mini area chart"),color:ql.Yj().optional()}).optional().describe("PREFERRED: include sparklines whenever you have historical data or can infer a trend. Only omit for truly static one-time values.")})).min(2).max(4)})}),CardComparison:Ql({summary:"Full detail on one to five cards, for deciding whether to apply, keep or cancel. Covers fees, welcome offers and perks.",description:'Detailed credit card comparison with apply CTA. Shows 1â5 cards with welcome offer, annual fee, potential earnings, rewards breakdown, and credits/perks. Use ONLY when the user is considering card acquisition, retention, or needs full c
2187ard details â "should I get this card?", "compare these two cards", "is the annual fee worth it?", "what perks does X have?". Best for cards NOT in the user\'s wallet that they might apply for. NEVER use alongside CardRewardList in the same response â if showing category-specific reward rates, use CardRewardList instead. Use CardComparison when the user needs actionable detail to make an apply/keep/cancel decision.',props:ql.Ik({cardIds:ql.YO(ql.Yj()).min(1).max(5).describe("Array of 1-5 card IDs to display or compare")})}),Markdown:Ql({summary:"Explanatory prose placed between components inside a Stack, so text and charts read together.",description:'Inline markdown text block. Use to interleave explanatory prose between chart/widget components within a Stack. Supports full markdown (headings, bold, italic, lists, tables, links, code). PREFERRED over placing all text in the message when text directly relates to adjacent visualizations â keeps text and charts visually cohesive. Always wrap Markdown alongside other components in a Stack with direction "column".',props:ql.Ik({content:ql.Yj().min(1).describe("Markdown-formatted text content")})}),Stack:Ql({summary:"Layout container arranging child components in a row or column.",description:"Flex layout container. Use to arrange multiple child components in a row or column.",props:ql.Ik({direction:ql.k5(["row","column"]),gap:ql.ai().optional()})}),CardRewardList:Ql({summary:"Each card's reward rate in one spending category, answering which card is best for dining or travel.",toolHints:"Wallet card ids come from GetUserProfile. Cards outside the wallet come from GetCardRecommendationsForMerchant or CreditCard_searchCards.",description:'Compact card list with contextual reward rates for a spending category. Use when the user asks "best card for dining/travel/groceries?" or "which card earns most at X?" â shows each card\'s rate for that specific category at a glance. ALWAYS render two SEPARATE instances: one for wallet cards (title: "Cards in your wallet"), one for non-wallet cards (title: "Looking outside your wallet"). NEVER mix wallet and non-wallet cards. NEVER use alongside CardComparison in the same response â CardRewardList is for quick category-rate answers, CardComparison is for detailed card-level decisions (apply, keep, cancel). The reward field is optional â omit when the rate is unknown.',props:ql.Ik({title:ql.Yj().describe('Section heading, e.g. "Cards in your wallet" or "Looking outside your wallet"'),cards:ql.YO(ql.Ik({cardId:ql.Yj().describe("Card ID from GetUserProfile or recommendation tools"),reward:ql.Ik({rate:ql.Yj().describe('Reward multiplier or percentage for the discussed category, e.g. "3x", "4x", "3%", "1.5%"'),label:ql.k5(["Points","Miles","Back"]).describe("Type of reward currency")}).optional().describe("Contextual reward rate for the category being discussed. Omit if unknown or not applicable.")}))})}),Progress:Ql({summary:"One to four current-versus-target values as horizontal bars, such as budgets, savings goals or utilization.",description:"Horizontal progress bars showing 1-4 items with utilization-based coloring (green <60%, amber 60-90%, red >90%). Use for budget tracking, savings goals, reward milestones, credit utilization, or any current-vs-target metric. Renders inside a ChartCard. Each item shows label, current/target values, colored bar, and percentage. PREFERRED over Gauge when comparing multiple items side by side.",props:ql.Ik(Object.assign(Object.assign({},Xl),{items:ql.YO(ql.Ik({label:ql.Yj().describe("Category or goal name"),current:ql.ai().describe("Current value"),target:ql.ai().describe("Target/budget value"),valueFormat:ql.k5(["currency","percent","number"]).optional(),currencyCode:ql.Yj().optional(),colorDirection:ql.k5(["ascending","descending"]).default("ascending").optional().describe("ascending (default): higher ratio = green (goals, savings, rewards). descending: higher ratio = red (spending limits, debt).")})).min(1).max(4)}))}),InsightCard:Ql({summary:"A single finding, warning or recommendation that deserves visual emphasis over plain prose.",description:"Proactive insight or alert card with severity-colored accent, icon, and optional CTA. Use whenever the AI has a key finding, warning, or recommendation to surface with visual emphasis. Prefer over plain Markdown when the insight is actionable or has a severity level. Examples: budget overages, upcoming annual fees, reward milestones, unusual spending patterns. NEVER stack more than 3 InsightCards in one response.",props:ql.Ik({severity:ql.k5(["positive","warning","critical","info"]).describe("Visual emphasis: positive=green, warning=amber, critical=red, info=purple"),title:ql.Yj().describe('Short headline, e.g. "Over budget on Dining"'),body:ql.Yj().describe("1-2 sentence explanation with specific numbers"),metric:ql.Ik({label:ql.Yj(),value:ql.Yj()}).optional().describe('Optional key metric to highlight, e.g. { label: "Over by", value: "$142" }')})}),RecurringPayments:Ql({summary:"A user's recurring payments as a list, with the total and a link to the calendar view.",toolHints:"recurringPaymentIds are the groupId values from GetUserRecurringPayments, not the id values. That tool returns one row per charge and id is groupId plus the payment date, so deduplicate on groupId: one entry per subscription, not one per charge.",description:'Recurring payments list card. Resolves payment details from recurringPaymentIds (NOT transaction IDs). Use when user asks about recurring payments, subscriptions, or upcoming charges. Includes a "See calendar view" CTA for viewing the full month. If you mention a total in your text response, pass it so the card header matches.',props:ql.Ik({title:ql.Yj().optional().describe('Header title, e.g. "June recurring payments", "Upcoming payments"'),total:ql.ai().optional().describe("Total recurring spend shown in header. Only include if mentioned in your text response."),recurringPaymentIds:ql.YO(ql.Yj()).min(1).describe("groupId values from GetUserRecurringPayments (NOT id, which is one charge; NOT transaction IDs), deduplicated"),currencyCode:ql.Yj().optional().describe('ISO 4217 currency code (e.g. "USD", "EUR"). Defaults to USD.')})}),PlaidConnectionPrompt:Ql({summary:"A prompt to link cards that have no Plaid connection, shown only when incomplete transaction data would otherwise be misleading.",toolHints:"Needs GetUserProfile: emit only when a card in the wallet has no matching plaidAccounts linkedCard entry.",description:"Inline prompt nudging the user to link unconnected cards to Plaid. ONLY emit when the user asks transaction-related questions (recurring payments, spending, transactions) AND GetUserProfile shows cards in the wallet without a corresponding plaidAccounts linkedCard entry. Do NOT emit for general questions. Limit to once per conversation.",props:ql.Ik({})})},ri=(0,A.xI)($.wQ,{components:Object.assign(Object.assign({},ti),ei),actions:{"CardValue:viewBreakdown":{description:"Navigate to the card's detailed earnings/value breakdown. cardId comes from the rendered component, not from anything you supply.",params:ql.Ik({cardId:ql.Yj()})},"CreditScore:sync":{description:"Navigate the user to the Spinwheel credit score connection flow."},"PlaidConnectionPrompt:connect":{description:"Navigate the user to the Plaid account connection flow."},"PlaidConnectionPrompt:dismiss":{description:"Dismiss the Plaid connection prompt and record that it was shown today."},"RecurringPayments:viewCalendar":{description:"Navigate to the calendar view of recurring payments."}
2187,"RecurringPaymentDetails:categoryChange":{description:"User changed the merchant category via the card's own dropdown â fires automatically inside the card; you never construct or bind this yourself. transactionId/categoryId come from the resolved payment and the user's selection, not from anything you supply.",params:ql.Ik({transactionId:ql.Yj(),categoryId:ql.Yj()})}}}),ni=(Object.keys(ei),[w.A]),ai=a.Ay.div` 2188 border-radius: 8px; 2189 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 2190 background-color: ${({theme:e})=>e.colors.bg.primary}; 2191 width: 100%; 2192 overflow: hidden; 2193`,oi=a.Ay.div` 2194 display: flex; 2195 flex-direction: ${({$direction:e})=>e}; 2196 flex-wrap: ${({$direction:e})=>"row"===e?"wrap":"nowrap"}; 2197 gap: ${({$gap:e})=>e}px; 2198 width: 100%; 2199 align-items: stretch; 2200`,li=a.Ay.div` 2201 flex: 1 1 auto; 2202 min-width: ${({$row:e})=>e?"calc(50% - 8px)":"0"}; 2203`,ii=a.Ay.span` 2204 ${o.Zc} 2205 color: ${({theme:e})=>e.colors.text.primary}; 2206`,si=a.Ay.div` 2207 display: flex; 2208 flex-direction: column; 2209 gap: 12px; 2210 min-height: ${({$count:e})=>54*e}px; 2211`,{registry:ci}=(0,$.Z8)(ri,{actions:{"CardValue:viewBreakdown":()=>(0,v.sH)(void 0,void 0,void 0,function*(){}),"CreditScore:sync":()=>(0,v.sH)(void 0,void 0,void 0,function*(){}),"PlaidConnectionPrompt:connect":()=>(0,v.sH)(void 0,void 0,void 0,function*(){}),"PlaidConnectionPrompt:dismiss":()=>(0,v.sH)(void 0,void 0,void 0,function*(){}),"RecurringPayments:viewCalendar":()=>(0,v.sH)(void 0,void 0,void 0,function*(){}),"RecurringPaymentDetails:categoryChange":()=>(0,v.sH)(void 0,void 0,void 0,function*(){})},components:{Gauge:e=>{var t=e.props,{title:r,subtitle:a,footer:o,colorDirection:l}=t,i=(0,v.Tt)(t,["title","subtitle","footer","colorDirection"]);return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(it,Object.assign({},i,{colorDirection:l})))},BarChart:e=>{var t=e.props,{title:r,subtitle:a,footer:o}=t,l=(0,v.Tt)(t,["title","subtitle","footer"]);if("bars"in l&&l.bars&&l.xKey)return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(Ee,{data:l.data,xKey:l.xKey,bars:l.bars,mode:l.mode,orientation:"vertical",valueFormat:l.valueFormat,currencyCode:l.currencyCode}));const i=l.data;return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(Ee,{data:i,orientation:"vertical",valueFormat:l.valueFormat,currencyCode:l.currencyCode,labelMode:i.length<=3?"all":"none"}))},LineChart:e=>{var t=e.props,{title:r,subtitle:a,footer:o}=t,l=(0,v.Tt)(t,["title","subtitle","footer"]);return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(pt,Object.assign({},l)))},AreaChart:e=>{var t=e.props,{title:r,subtitle:a,footer:o}=t,l=(0,v.Tt)(t,["title","subtitle","footer"]);return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(H,Object.assign({},l)))},PieChart:e=>{var t=e.props,{title:r,subtitle:a,footer:o}=t,l=(0,v.Tt)(t,["title","subtitle","footer"]);return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(Dt,Object.assign({},l)))},CreditScore:({props:{value:e,stats:t,isSpinwheelConnected:r},emit:a})=>!1===r?n.createElement(Re,null,n.createElement(We,{onConnect:()=>a("CreditScore:sync")})):n.createElement(Re,{title:"Credit score",subtitle:"VantageScore 3.0"},n.createElement(Je,{value:null!=e?e:700,stats:t})),SpendHeatmap:({props:e})=>{const t=n.useMemo(()=>{const t=new Set;return e.days.forEach(e=>{var r;return null===(r=e.transactions)||void 0===r?void 0:r.forEach(e=>{e.merchantId&&t.add(e.merchantId)})}),[...t]},[e.days]),{data:r}=(0,rn.b)("merchant",t),a=n.useMemo(()=>{if(0===t.length)return e;const n=new Map;return t.forEach((e,t)=>{const a=r[t];(null==a?void 0:a.logoUrl)&&n.set(e,a.logoUrl)}),0===n.size?e:Object.assign(Object.assign({},e),{days:e.days.map(e=>{var t;return Object.assign(Object.assign({},e),{transactions:null===(t=e.transactions)||void 0===t?void 0:t.map(e=>Object.assign(Object.assign({},e),{logoUrl:e.logoUrl||(e.merchantId?n.get(e.merchantId):void 0)}))})})})},[e,t,r]);
2211return n.createElement(ai,null,n.createElement(Kr,Object.assign({},a)))},SpendCalendar:({props:e})=>n.createElement(ai,null,n.createElement(kr,Object.assign({},e))),SpendByCategory:e=>{var t=e.props,{title:r,categories:a}=t,o=(0,v.Tt)(t,["title","categories"]);const{data:l}=(0,rn.b)("categories",["all"]),i=n.useMemo(()=>{var e;const t=new Map((null!==(e=l[0])&&void 0!==e?e:[]).map(e=>[e.id,e.iconSlug]));return(null!=a?a:[]).map(e=>({name:e.name,amount:e.amount,iconSlug:e.categoryId?t.get(e.categoryId):void 0}))},[l,a]);return n.createElement(Re,null,n.createElement(rr,Object.assign({title:r,categories:i},o)))},MissedRewards:({props:e})=>{var t,r;const a=(0,Al.ju)(e),{data:o,loading:l}=(0,rn.b)("missedRewards",[a]);if(l)return n.createElement($l,null);const i=null!==(t=o[0])&&void 0!==t?t:null;return i?n.createElement(bl,Object.assign({},i,{currencyCode:null!==(r=e.currencyCode)&&void 0!==r?r:i.currencyCode})):null},CardRewardList:({props:e})=>{const t=e.cards.map(e=>e.cardId),r=[...t].sort(),{data:a,loading:o}=(0,rn.b)("card",t);if(o)return n.createElement(dn,{numCards:e.cards.length});const l=new Map;r.forEach((e,t)=>{const r=a[t];r&&l.set(e,r)});const i=[];return e.cards.forEach(e=>{const t=l.get(e.cardId);t&&i.push({cardId:e.cardId,name:t.name,imageUri:t.imageUri,reward:e.reward})}),0===i.length?null:n.createElement(En,{title:e.title,cards:i})},CardComparison:({props:e})=>{const{data:t,loading:r}=(0,rn.b)("card",e.cardIds);if(r)return n.createElement(ma,{numCards:e.cardIds.length});const a=t.filter(e=>null!==e);return 0===a.length?null:n.createElement(ra,{cards:a})},StatsGrid:({props:e})=>n.createElement(tn,{cards:e.cards}),RecurringPayments:({props:e})=>{const{data:t,loading:r}=(0,rn.b)("recurringPayment",e.recurringPaymentIds),{execute:a}=(0,$.dN)();if(r)return n.createElement(Re,{title:e.title},n.createElement(si,{$count:e.recurringPaymentIds.length}));const o=t.filter(e=>null!==e);return 0===o.length?null:n.createElement(Re,{title:e.title,headerRight:null!=e.total?n.createElement(ii,null,Rt(e.total,e.currencyCode)):void 0},n.createElement(oo,{payments:o,currencyCode:e.currencyCode,onViewCalendar:()=>a({action:"RecurringPayments:viewCalendar"})}))},SpendRecap:({props:e})=>{var t,r,a;const o=(0,kl.W3)({startDate:e.startDate,endDate:e.endDate}),{data:l,loading:i}=(0,rn.b)("spendRecap",[(0,kl.hw)(o)]);if(i)return n.createElement(Br.A,{height:220});const s=null!==(t=l[0])&&void 0!==t?t:null;
2211return(null==s?void 0:s.days.length)?n.createElement(ai,null,n.createElement(Kr,{title:null!==(r=e.title)&&void 0!==r?r:(0,kl.m)(o),days:s.days,total:s.totalSpend,currencyCode:null!==(a=e.currencyCode)&&void 0!==a?a:s.currencyCode})):null},CardValue:({props:e})=>{var t;const{data:r,loading:a}=(0,rn.b)("cardValueDetail",[e.cardId]),{execute:o}=(0,$.dN)();if(a)return n.createElement(za,null);const l=null!==(t=r[0])&&void 0!==t?t:null;return l?n.createElement(Ia,{value:l,onViewBreakdown:()=>o({action:"CardValue:viewBreakdown",params:{cardId:e.cardId}})}):null},RecurringPaymentDetails:({props:e})=>{var t,r;const{data:a,loading:o}=(0,rn.b)("recurringPaymentDetail",[e.recurringPaymentId]),{execute:l}=(0,$.dN)(),{data:i}=(0,rn.b)("categories",["all"]);if(o)return n.createElement(Qo,null);const s=null!==(t=a[0])&&void 0!==t?t:null;return s?n.createElement(Vo,{payment:s,totalAmountPaid:e.totalAmountPaid,totalTransactions:e.totalTransactions,currencyCode:e.currencyCode,categories:null!==(r=i[0])&&void 0!==r?r:void 0,onCategoryChange:e=>{s.transactionId&&l({action:"RecurringPaymentDetails:categoryChange",params:{transactionId:s.transactionId,categoryId:e.id}})}}):null},WelcomeOffer:({props:e})=>{const{data:t,loading:r}=(0,rn.b)("welcomeOffer",[e.cardId]);if(r)return n.createElement(Vl,null);const a=t[0];return a?n.createElement(Hl,Object.assign({},a)):null},PlaidConnectionPrompt:({emit:e})=>{var t;const[r,a]=n.useState(!1),{data:o,loading:l}=(0,rn.b)("plaidUnconnectedCards",["all"]);if(l||r)return null;const i=null==o?void 0:o[0];return(null===(t=null==i?void 0:i.unconnectedCards)||void 0===t?void 0:t.length)?n.createElement(pa.z,{unconnectedCards:i.unconnectedCards,connectedCards:i.connectedCards||[],onConnect:()=>e("PlaidConnectionPrompt:connect"),onDismiss:()=>{a(!0),e("PlaidConnectionPrompt:dismiss")}}):null},Progress:e=>{var t=e.props,{title:r,subtitle:a,footer:o}=t,l=(0,v.Tt)(t,["title","subtitle","footer"]);return n.createElement(Re,{title:r,subtitle:a,footer:o},n.createElement(ro,{items:l.items}))},InsightCard:({props:e})=>n.createElement(Ga,{severity:e.severity,title:e.title,body:e.body,metric:e.metric}),Markdown:({props:e})=>{var t;return(null===(t=e.content)||void 0===t?void 0:t.trim())?n.createElement(Zl,null,n.createElement(E.oz,{remarkPlugins:ni},e.content)):null},Stack:({props:e,children:t})=>{var r;const a=e.direction||"column",o=Math.max(null!==(r=e.gap)&&void 0!==r?r:12,12),l="row"===a;
2211return n.createElement(oi,{$direction:a,$gap:o},l?n.Children.map(t,e=>n.createElement(li,{$row:!0},e)):t)}}}),di=a.Ay.div` 2212 display: flex; 2213 gap: 8px; 2214 padding: 4px 0; 2215 overflow-x: auto; 2216 scrollbar-width: none; 2217 2218 &::-webkit-scrollbar { 2219 display: none; 2220 } 2221`,mi=({actions:e,onSelect:t,disabled:r})=>n.createElement(di,null,e.map(e=>n.createElement(s.G5,{key:e.value,$variant:e.variant||"primary",disabled:r,onClick:()=>t({label:e.label,value:e.value})},e.label)));var pi=r(48510);const ui=a.i7` 2222 to { transform: rotate(360deg); } 2223`,hi=a.i7` 2224 from { opacity: 0; transform: translateY(4px); } 2225 to { opacity: 1; transform: translateY(0); } 2226`,gi=a.Ay.div` 2227 display: flex; 2228 flex-direction: column; 2229 gap: 6px; 2230 padding: 10px 14px; 2231 border-radius: 12px; 2232 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 2233 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2234 animation: ${hi} 200ms ease-out; 2235`,yi=a.Ay.div` 2236 display: flex; 2237 align-items: center; 2238 gap: 8px; 2239`,xi=a.Ay.div` 2240 width: 16px; 2241 height: 16px; 2242 min-width: 16px; 2243 display: flex; 2244 align-items: center; 2245 justify-content: center; 2246 2247 ${({$status:e,theme:t})=>{switch(e){case"pending":case"running":return a.AH` 2248 color: ${t.colors.text.tertiary}; 2249 animation: ${ui} 1s linear infinite; 2250 `;case"complete":return a.AH` 2251 color: ${t.colors.text.success}; 2252 `;case"error":return a.AH` 2253 color: ${t.colors.text.danger}; 2254 `}}} 2255`,fi=a.Ay.span` 2256 ${o.hm} 2257 color: ${({theme:e})=>e.colors.text.primary}; 2258`,bi=a.Ay.span` 2259 ${o.DE} 2260 color: ${({theme:e})=>e.colors.text.tertiary}; 2261 margin-left: auto; 2262`,vi=a.Ay.div` 2263 ${o.RS} 2264 color: ${({theme:e})=>e.colors.text.secondary}; 2265 padding: 8px 10px; 2266 border-radius: 8px; 2267 background-color: ${({theme:e})=>e.colors.bg.primary}; 2268 border: 1px solid ${({theme:e})=>e.colors.border.primary}; 2269`,Ei=a.Ay.div` 2270 ${o.RS} 2271 color: ${({theme:e})=>e.colors.text.danger}; 2272 padding: 8px 10px; 2273 border-radius: 8px; 2274 background-color: #fef2f2; 2275 border: 1px solid ${({theme:e})=>e.colors.border.danger}; 2276`,wi=a.Ay.div` 2277 ${o.DE} 2278 color: ${({theme:e})=>e.colors.text.tertiary}; 2279 margin-bottom: 4px; 2280`,$i=a.Ay.div` 2281 display: flex; 2282 flex-direction: column; 2283 gap: 12px; 2284`,Ai=a.Ay.div` 2285 display: flex; 2286 flex-direction: column; 2287`,ki=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2"},n.createElement("path",{d:"M8 1.5a6.5 6.5 0 1 0 6.5 6.5",strokeLinecap:"round"})),Ci=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("polyline",{points:"3.5 8.5 6.5 11.5 12.5 4.5"})),Si=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("circle",{cx:"8",cy:"8",r:"6"}),n.createElement("line",{x1:"6",y1:"6",x2:"10",y2:"10"}),n.createElement("line",{x1:"10",y1:"6",x2:"6",y2:"10"}));function ji({status:e}){switch(e){case"pending":case"running":return n.createElement(ki,null);case"complete":return n.createElement(Ci,null);case"error":return n.createElement(Si,null)}}const Ii={pending:"Waiting...",running:"Running...",complete:"Done",error:"Failed"};function Di(e){return"string"==typeof e?e:JSON.stringify(e,null,2)}function Ri({toolCall:e}){const t=null!=e.input&&("object"!=typeof e.input||Object.keys(e.input).length>0),r="complete"===e.toolCallStatus&&null!=e.result,a="error"===e.toolCallStatus&&!!e.error,o=t||r||a?n.createElement($i,null,t&&n.createElement(Ai,null,n.createElement(wi,null,"Input"),n.createElement(vi,null,Di(e.input))),r&&n.createElement(Ai,null,n.createElement(wi,null,"Result"),n.createElement(vi,null,Di(e.result))),a&&n.createElement(Ei,null,e.error)):void 0;return n.createElement(gi,null,n.createElement(pi.n,{summary:n.createElement(yi,null,n.createElement(xi,{$status:e.toolCallStatus},n.createElement(ji,{status:e.toolCallStatus})),n.createElement(fi,null,e.label||(i=e.toolName,i.replace(/[_-]/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase()))),n.createElement(bi,null,Ii[e.toolCallStatus],"running"!==e.toolCallStatus&&null!=e.durationMs&&" · "+(l=e.durationMs,l<1e3?`${Math.round(l)}ms`:`${(l/1e3).toFixed(1)}s`))),details:o}));var l,i}const Oi=({toolCall:e,message:t,addResult:r})=>{const{toolRenderers:a}=(0,k.CI)(),o=a[e.toolName];return o?n.createElement(o,{toolCall:e,message:t,addResult:r}):n.createElement(Ri,{toolCall:e})},zi=[w.A],Pi=a.Ay.div` 2288 display: flex; 2289 flex-direction: column; 2290 gap: 8px; 2291 width: 100%; 2292 overflow: hidden; 2293`,Mi=a.Ay.img` 2294 max-width: 100%; 2295 border-radius: 12px; 2296`,Ti=(a.Ay.pre` 2297 font-size: 12px; 2298 font-family: ${({theme:e})=>e.fonts.body}; 2299 padding: 8px; 2300 border-radius: 8px; 2301 background-color: ${({theme:e})=>e.colors.bg.tertiary}; 2302 color: ${({theme:e})=>e.colors.text.tertiary}; 2303 overflow-x: auto; 2304 white-space: pre-wrap; 2305 margin: 0; 2306`,{a:e=>{var{node:t,rel:r,children:a}=e,o=(0,v.Tt)(e,["node","rel","children"]);return n.createElement("a",Object.assign({}
2306,o,{target:"_blank",rel:[r,"noopener","noreferrer"].filter(Boolean).join(" ")}),a)}}),Li=({part:e})=>n.createElement(Zl,null,n.createElement(E.oz,{remarkPlugins:zi,components:Ti},e.text)),Ui=({part:e})=>n.createElement(Mi,{src:e.url,alt:e.alt||"Image"}),Yi=({part:e,message:t})=>{const{specHandlers:r,registry:a}=(0,k.CI)(),o=null!=a?a:ci,l=n.useMemo(()=>{const t=e.value;if(!(null==t?void 0:t.root)||!(null==t?void 0:t.elements))return null;const r={};for(const[e,n]of Object.entries(t.elements))(null==n?void 0:n.type)&&null!=(null==n?void 0:n.props)&&(r[e]=n);return{root:t.root,elements:r,state:t.state}},[e.value]);if(!l)return null;const i="streaming"===t.status.type;return n.createElement($.yW,{registry:o,initialState:l.state,handlers:r},n.createElement($.A4,{spec:l,registry:o,loading:i}))},Fi=({part:e,message:t})=>{const{renderers:r}=(0,k.CI)();if(e.dataType===A.Qk||"ui_spec"===e.dataType)return n.createElement(Yi,{part:e,message:t});const a=r[e.dataType];return a?n.createElement(a,{part:e,message:t,status:t.status}):null},Ni=({part:e,onAction:t})=>t?n.createElement(mi,{actions:e.actions,onSelect:t}):null,Wi=({part:e,message:t})=>n.createElement(Oi,{toolCall:e,message:t});const Ki=({parts:e,message:t,onAction:r})=>n.createElement(Pi,null,e.map((e,a)=>function(e,t,r,a){const o=`${r.id}-part-${t}`;switch(e.type){case"text":return n.createElement(Li,{key:o,part:e});case"image":return n.createElement(Ui,{key:o,part:e});case"data":return n.createElement(Fi,{key:o,part:e,message:r});case"action":return n.createElement(Ni,{key:o,part:e,onAction:a});case"toolCall":return n.createElement(Wi,{key:o,part:e,message:r});default:return null}}(e,a,t,r)));var Bi=r(75006);const Hi=(0,a.Ay)(i.P.div)` 2307 display: flex; 2308 flex-direction: ${({$isUser:e})=>e?"row-reverse":"row"}; 2309 align-items: flex-start; 2310 gap: 8px; 2311 padding: 2px 0; 2312`,_i={hidden:{},visible:{transition:{staggerChildren:.12}}},Gi={hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}}},Vi=(0,a.Ay)(i.P.div)` 2313 display: flex; 2314 flex-direction: column; 2315 align-items: ${({$isUser:e})=>e?"flex-end":"flex-start"}; 2316 gap: 12px; 2317 max-width: ${({$isUser:e})=>e?"85%":"100%"}; 2318 min-width: 0; 2319 overflow: hidden; 2320 flex: 1; 2321`,Zi=a.Ay.div` 2322 position: relative; 2323 min-width: 0; 2324 max-width: 100%; 2325 overflow: hidden; 2326`,qi=a.Ay.div` 2327 ${o.DE} 2328 display: flex; 2329 align-items: center; 2330 gap: 6px; 2331 padding: 8px 12px; 2332 border-radius: 10px; 2333 background-color: #fef2f2; 2334 border: 1px solid ${({theme:e})=>e.colors.border.danger}; 2335 color: ${({theme:e})=>e.colors.text.danger}; 2336`,Ji=()=>n.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"},n.createElement("circle",{cx:"12",cy:"12",r:"10"}),n.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),n.createElement("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}));const Xi=n.memo(({message:e,onAction:t,isLatest:r=!0,showFeedback:a=!0,components:o})=>{var s;const c=e.role===l.MWS.User,m=e.role===l.MWS.Assistant,p="streaming"===e.status.type,u="error"===e.status.type,h=0===e.parts.length,g=function(e){if("error"===e.status.type)return"error";switch(e.role){case l.MWS.User:return"user";case l.MWS.System:return"system";default:return"assistant"}}(e),y=(null==o?void 0:o.MessageBubble)||d,{textParts:x,reasoningParts:f,dataParts:v,actionParts:E,toolCallParts:w}=(0,n.useMemo)(()=>({textParts:e.parts.filter(e=>"text"===e.type||"image"===e.type),reasoningParts:e.parts.filter(e=>"reasoning"===e.type),dataParts:e.parts.filter(e=>"data"===e.type),actionParts:e.parts.filter(e=>"action"===e.type),toolCallParts:e.parts.filter(e=>"toolCall"===e.type)}),[e.parts]);if(p&&h)return n.createElement(Hi,{$isUser:!1},n.createElement(Bi.j,{text:"Thinking..."}));const $=v.length>0||w.length>0;return n.createElement(Hi,{$isUser:c,initial:{opacity:0}
2336,animate:{opacity:1},transition:{duration:.2}},n.createElement(Vi,{$isUser:c,$wide:$,variants:_i,initial:"hidden",animate:"visible"},x.length>0&&n.createElement(i.P.div,{variants:Gi,style:{minWidth:0,maxWidth:"100%",overflow:"hidden"}},n.createElement(Zi,null,n.createElement(y,{variant:g,isStreaming:p},n.createElement(Ki,{parts:x,message:e,onAction:t})))),w.length>0&&n.createElement(i.P.div,{variants:Gi,style:{width:"100%"}},n.createElement(Ki,{parts:w,message:e,onAction:t})),u&&n.createElement(i.P.div,{variants:Gi},n.createElement(qi,{role:"alert"},n.createElement(Ji,null),"error"===e.status.type&&e.status.error)),v.length>0&&n.createElement(i.P.div,{variants:Gi,style:{width:"100%"}},n.createElement(Ki,{parts:v,message:e,onAction:t})),f.length>0&&p&&n.createElement(i.P.div,{variants:Gi},n.createElement(Bi.j,{text:null===(s=f[f.length-1])||void 0===s?void 0:s.text})),m&&!p&&!u&&"complete"===e.status.type&&n.createElement(i.P.div,{variants:Gi,style:{width:"100%"}},n.createElement(b,{showButtons:a}))))},(e,t)=>e.message.id===t.message.id&&(e.isLatest===t.isLatest&&(e.showFeedback===t.showFeedback&&(e.message.status.type===t.message.status.type&&(e.message.parts===t.message.parts||"complete"===e.message.status.type&&e.message.parts.length===t.message.parts.length)))));Xi.displayName="ChatMessage";const Qi=a.Ay.div` 2337 flex: 1; 2338 overflow-y: auto; 2339 overflow-x: hidden; 2340 padding: 16px; 2341 display: flex; 2342 flex-direction: column; 2343 gap: 16px; 2344 2345 scrollbar-width: thin; 2346 scrollbar-color: ${({theme:e})=>e.colors.border.secondary} transparent; 2347 2348 &::-webkit-scrollbar {
2349 width: 6px; 2350 } 2351 &::-webkit-scrollbar-thumb { 2352 background: ${({theme:e})=>e.colors.border.secondary}; 2353 border-radius: 3px; 2354 } 2355`,es=a.Ay.div` 2356 height: 1px; 2357 flex-shrink: 0; 2358`,ts=a.Ay.button` 2359 position: absolute; 2360 bottom: 80px; 2361 left: 50%; 2362 transform: translateX(-50%); 2363 z-index: 10; 2364 padding: 6px 16px; 2365 border-radius: 100px; 2366 border: 1px solid ${({theme:e})=>e.colors.border.secondary}; 2367 background-color: ${({theme:e})=>e.colors.bg.primary}; 2368 color: ${({theme:e})=>e.colors.text.secondary}; 2369 ${o.DE} 2370 cursor: pointer; 2371 transition: all 200ms ease-out; 2372 box-shadow: ${({theme:e})=>e.shadows.elevation.z2}; 2373 opacity: ${({$visible:e})=>e?1:0}; 2374 pointer-events: ${({$visible:e})=>e?"auto":"none"}; 2375 2376 &:hover { 2377 background-color: ${({theme:e})=>e.colors.bg.secondary}; 2378 } 2379`,rs=n.forwardRef(({messages:e,onAction:t,components:r,showFeedback:a,footer:o,onScroll:i},s)=>{const c=(0,n.useRef)(null),d=(0,n.useRef)(null),[m,p]=(0,n.useState)(!1),u=(0,n.useRef)(!1),h=(0,n.useCallback)((e="smooth")=>{var t;null===(t=d.current)||void 0===t||t.scrollIntoView({behavior:e}),u.current=!1,p(!1)},[]),g=(0,n.useCallback)(()=>{const e=c.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight<100;u.current=!t,p(!t),null==i||i(e.scrollTop)},[i]),y=(0,n.useRef)(e.length);return(0,n.useEffect)(()=>{const t=y.current;if(y.current=e.length,e.length<=t)return;e.slice(t).some(e=>e.role===l.MWS.User)&&h("smooth")},[e.length,e,h]),n.useImperativeHandle(s,()=>c.current,[]),n.createElement(n.Fragment,null,n.createElement(Qi,{ref:c,onScroll:g,role:"log","aria-live":"polite","aria-label":"Chat messages"},e.map((o,l)=>n.createElement(Xi,{key:o.id,message:o,onAction:t,isLatest:l===e.length-1,components:r,showFeedback:a})),o,n.createElement(es,{ref:d})),n.createElement(ts,{type:"button",$visible:m,onClick:()=>h()},"â New messages"))});rs.displayName="ChatMessageList"}}]); 2380//# sourceMappingURL=5255.9fd3ecf396cf7a7450f7.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.