@npm-zenwork/tax-remittance-ui 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dashboard/dashboardUtils.d.ts +1 -5
- package/dist/components/entities/EntityQuickActions.d.ts +13 -0
- package/dist/components/onboarding/EntityPrimaryTaxpayerFields.d.ts +3 -2
- package/dist/components/onboarding/entityHelpContent.d.ts +24 -0
- package/dist/components/payments/useJurisdictionLabel.d.ts +17 -0
- package/dist/embedded/ThemeProvider.d.ts +18 -0
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7217 -7056
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var V1=Object.defineProperty;var wl=e=>{throw TypeError(e)};var Z1=(e,t,n)=>t in e?V1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zr=(e,t,n)=>Z1(e,typeof t!="symbol"?t+"":t,n),Ua=(e,t,n)=>t.has(e)||wl("Cannot "+n);var S=(e,t,n)=>(Ua(e,t,"read from private field"),n?n.call(e):t.get(e)),ae=(e,t,n)=>t.has(e)?wl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),J=(e,t,n,s)=>(Ua(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),de=(e,t,n)=>(Ua(e,t,"access private method"),n);var ws=(e,t,n,s)=>({set _(a){J(e,t,a,n)},get _(){return S(e,t,s)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),x=require("react"),ft=require("react-dom");function U1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const I=U1(x);/**
|
|
2
2
|
* react-router v7.18.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
@@ -7,70 +7,70 @@
|
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var Ki=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,O1=/^[\\/]{2}/;function z1(e,t){return t+e.replace(/\\/g,"/")}function vl(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function q1(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:s=!1}=e,a;a=t.map((f,g)=>d(f,typeof f=="string"?null:f.state,g===0?"default":void 0,typeof f=="string"?void 0:f.mask));let i=c(n??a.length-1),o="POP",l=null;function c(f){return Math.min(Math.max(f,0),a.length-1)}function u(){return a[i]}function d(f,g=null,p,v){let y=Z1(a?u().pathname:"/",f,g,p,v);return kt(y.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),y}function m(f){return typeof f=="string"?f:qs(f)}return{get index(){return i},get action(){return o},get location(){return u()},createHref:m,createURL(f){return new URL(m(f),"http://localhost")},encodeLocation(f){let g=typeof f=="string"?rr(f):f;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(f,g){o="PUSH";let p=vl(f)?f:d(f,g);i+=1,a.splice(i,a.length,p),s&&l&&l({action:o,location:p,delta:1})},replace(f,g){o="REPLACE";let p=vl(f)?f:d(f,g);a[i]=p,s&&l&&l({action:o,location:p,delta:0})},go(f){o="POP";let g=c(i+f),p=a[g];i=g,l&&l({action:o,location:p,delta:f})},listen(f){return l=f,()=>{l=null}}}}function qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function V1(){return Math.random().toString(36).substring(2,10)}function Z1(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?rr(t):t,state:n,key:t&&t.key||s||V1(),mask:a}}function qs({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function rr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function nu(e,t,n="/"){return U1(e,t,n,!1)}function U1(e,t,n,s,a){let i=typeof t=="string"?rr(t):t,o=cn(i.pathname||"/",n);if(o==null)return null;let l=B1(e),c=null,u=e0(o);for(let d=0;c==null&&d<l.length;++d)c=$1(l[d],u,s);return c}function B1(e){let t=ru(e);return Y1(t),t}function ru(e,t=[],n=[],s="",a=!1){let i=(o,l,c=a,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(s)&&c)return;qe(d.relativePath.startsWith(s),`Absolute route path "${d.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(s.length)}let m=Ut([s,d.relativePath]),h=n.concat(d);o.children&&o.children.length>0&&(qe(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),ru(o.children,t,h,m,c)),!(o.path==null&&!o.index)&&t.push({path:m,score:X1(m,o.index),routesMeta:h.map((f,g)=>{let[p,v]=iu(f.relativePath,f.caseSensitive,g===h.length-1);return{...f,matcher:p,compiledParams:v}})})};return e.forEach((o,l)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))i(o,l);else for(let u of su(o.path))i(o,l,!0,u)}),t}function su(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(s.length===0)return a?[i,""]:[i];let o=su(s.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Y1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_1(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var H1=/^:[\w-]+$/,W1=3,K1=2,Q1=1,G1=10,J1=-2,Cl=e=>e==="*";function X1(e,t){let n=e.split("/"),s=n.length;return n.some(Cl)&&(s+=J1),t&&(s+=K1),n.filter(a=>!Cl(a)).reduce((a,i)=>a+(H1.test(i)?W1:i===""?Q1:G1),s)}function _1(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function $1(e,t,n=!1){let{routesMeta:s}=e,a={},i="/",o=[];for(let l=0;l<s.length;++l){let c=s[l],u=l===s.length-1,d=i==="/"?t:t.slice(i.length)||"/",m={path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h=c.matcher&&c.compiledParams?au(m,d,c.matcher,c.compiledParams):Vs(m,d),f=c.route;if(!h&&u&&n&&!s[s.length-1].route.index&&(h=Vs({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;Object.assign(a,h.params),o.push({params:a,pathname:Ut([i,h.pathname]),pathnameBase:r0(Ut([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Ut([i,h.pathnameBase]))}return o}function Vs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=iu(e.path,e.caseSensitive,e.end);return au(e,t,n,s)}function au(e,t,n,s){let a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:s.reduce((u,{paramName:d,isOptional:m},h)=>{if(d==="*"){let g=l[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const f=l[h];return m&&!f?u[d]=void 0:u[d]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function iu(e,t=!1,n=!0){kt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c,u,d)=>{if(s.push({paramName:l,isOptional:c!=null}),c){let m=d.charAt(u+o.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function e0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return kt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function cn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function t0(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?rr(e):e,i;return n?(n=ou(n),n.startsWith("/")?i=jl(n.substring(1),"/"):i=jl(n,t)):i=t,{pathname:i,search:s0(s),hash:a0(a)}}function jl(e,t){let n=Zs(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function qa(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function n0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qi(e){let t=n0(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function ma(e,t,n,s=!1){let a;typeof e=="string"?a=rr(e):(a={...e},qe(!a.pathname||!a.pathname.includes("?"),qa("?","pathname","search",a)),qe(!a.pathname||!a.pathname.includes("#"),qa("#","pathname","hash",a)),qe(!a.search||!a.search.includes("#"),qa("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let m=t.length-1;if(!s&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),m-=1;a.pathname=h.join("/")}l=m>=0?t[m]:"/"}let c=t0(a,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var ou=e=>e.replace(/[\\/]{2,}/g,"/"),Ut=e=>ou(e.join("/")),Zs=e=>e.replace(/\/+$/,""),r0=e=>Zs(e).replace(/^\/*/,"/"),s0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,a0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,i0=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function o0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function l0(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ut(t)||"/"}var lu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cu(e,t){let n=e;if(typeof n!="string"||!Ki.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(lu)try{let i=new URL(window.location.href),o=O1.test(n)?new URL(z1(n,i.protocol)):new URL(n),l=cn(o.pathname,t);o.origin===i.origin&&l!=null?n=l+o.search+o.hash:a=!0}catch{kt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var uu=["POST","PUT","PATCH","DELETE"];new Set(uu);var c0=["GET",...uu];new Set(c0);var u0=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function d0(e){try{return u0.includes(new URL(e).protocol)}catch{return!1}}var Fr=E.createContext(null);Fr.displayName="DataRouter";var ha=E.createContext(null);ha.displayName="DataRouterState";var du=E.createContext(!1);function m0(){return E.useContext(du)}var mu=E.createContext({isTransitioning:!1});mu.displayName="ViewTransition";var h0=E.createContext(new Map);h0.displayName="Fetchers";var f0=E.createContext(null);f0.displayName="Await";var Pt=E.createContext(null);Pt.displayName="Navigation";var as=E.createContext(null);as.displayName="Location";var Ot=E.createContext({outlet:null,matches:[],isDataRoute:!1});Ot.displayName="Route";var Gi=E.createContext(null);Gi.displayName="RouteError";var hu="REACT_ROUTER_ERROR",p0="REDIRECT",x0="ROUTE_ERROR_RESPONSE";function g0(e){if(e.startsWith(`${hu}:${p0}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function y0(e){if(e.startsWith(`${hu}:${x0}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new i0(t.status,t.statusText,t.data)}catch{}}function b0(e,{relative:t}={}){qe(Rr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=E.useContext(Pt),{hash:a,pathname:i,search:o}=is(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Ut([n,i])),s.createHref({pathname:l,search:o,hash:a})}function Rr(){return E.useContext(as)!=null}function ke(){return qe(Rr(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(as).location}var fu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pu(e){E.useContext(Pt).static||E.useLayoutEffect(e)}function Pe(){let{isDataRoute:e}=E.useContext(Ot);return e?F0():v0()}function v0(){qe(Rr(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Fr),{basename:t,navigator:n}=E.useContext(Pt),{matches:s}=E.useContext(Ot),{pathname:a}=ke(),i=JSON.stringify(Qi(s)),o=E.useRef(!1);return pu(()=>{o.current=!0}),E.useCallback((c,u={})=>{if(kt(o.current,fu),!o.current)return;if(typeof c=="number"){n.go(c);return}let d=ma(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ut([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,i,a,e])}var xu=E.createContext(null);function yt(){return E.useContext(xu)}function C0(e){let t=E.useContext(Ot).outlet;return E.useMemo(()=>t&&E.createElement(xu.Provider,{value:e},t),[t,e])}function fa(){let{matches:e}=E.useContext(Ot),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function is(e,{relative:t}={}){let{matches:n}=E.useContext(Ot),{pathname:s}=ke(),a=JSON.stringify(Qi(n));return E.useMemo(()=>ma(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function j0(e,t){return gu(e,t)}function gu(e,t,n){var v;qe(Rr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=E.useContext(Pt),{matches:a}=E.useContext(Ot),i=a[a.length-1],o=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";bu(l,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
*/var Ji=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,B1=/^[\\/]{2}/;function H1(e,t){return t+e.replace(/\\/g,"/")}function Nl(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Y1(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:s=!1}=e,a;a=t.map((f,y)=>d(f,typeof f=="string"?null:f.state,y===0?"default":void 0,typeof f=="string"?void 0:f.mask));let i=c(n??a.length-1),o="POP",l=null;function c(f){return Math.min(Math.max(f,0),a.length-1)}function u(){return a[i]}function d(f,y=null,p,b){let C=K1(a?u().pathname:"/",f,y,p,b);return Pt(C.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),C}function m(f){return typeof f=="string"?f:Bs(f)}return{get index(){return i},get action(){return o},get location(){return u()},createHref:m,createURL(f){return new URL(m(f),"http://localhost")},encodeLocation(f){let y=typeof f=="string"?ar(f):f;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(f,y){o="PUSH";let p=Nl(f)?f:d(f,y);i+=1,a.splice(i,a.length,p),s&&l&&l({action:o,location:p,delta:1})},replace(f,y){o="REPLACE";let p=Nl(f)?f:d(f,y);a[i]=p,s&&l&&l({action:o,location:p,delta:0})},go(f){o="POP";let y=c(i+f),p=a[y];i=y,l&&l({action:o,location:p,delta:f})},listen(f){return l=f,()=>{l=null}}}}function Ve(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function W1(){return Math.random().toString(36).substring(2,10)}function K1(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ar(t):t,state:n,key:t&&t.key||s||W1(),mask:a}}function Bs({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ar(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function ou(e,t,n="/"){return Q1(e,t,n,!1)}function Q1(e,t,n,s,a){let i=typeof t=="string"?ar(t):t,o=dn(i.pathname||"/",n);if(o==null)return null;let l=G1(e),c=null,u=i0(o);for(let d=0;c==null&&d<l.length;++d)c=a0(l[d],u,s);return c}function G1(e){let t=lu(e);return J1(t),t}function lu(e,t=[],n=[],s="",a=!1){let i=(o,l,c=a,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(s)&&c)return;Ve(d.relativePath.startsWith(s),`Absolute route path "${d.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(s.length)}let m=Ht([s,d.relativePath]),h=n.concat(d);o.children&&o.children.length>0&&(Ve(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),lu(o.children,t,h,m,c)),!(o.path==null&&!o.index)&&t.push({path:m,score:r0(m,o.index),routesMeta:h.map((f,y)=>{let[p,b]=du(f.relativePath,f.caseSensitive,y===h.length-1);return{...f,matcher:p,compiledParams:b}})})};return e.forEach((o,l)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))i(o,l);else for(let u of cu(o.path))i(o,l,!0,u)}),t}function cu(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(s.length===0)return a?[i,""]:[i];let o=cu(s.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function J1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:s0(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var X1=/^:[\w-]+$/,_1=3,$1=2,e0=1,t0=10,n0=-2,Sl=e=>e==="*";function r0(e,t){let n=e.split("/"),s=n.length;return n.some(Sl)&&(s+=n0),t&&(s+=$1),n.filter(a=>!Sl(a)).reduce((a,i)=>a+(X1.test(i)?_1:i===""?e0:t0),s)}function s0(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function a0(e,t,n=!1){let{routesMeta:s}=e,a={},i="/",o=[];for(let l=0;l<s.length;++l){let c=s[l],u=l===s.length-1,d=i==="/"?t:t.slice(i.length)||"/",m={path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h=c.matcher&&c.compiledParams?uu(m,d,c.matcher,c.compiledParams):Hs(m,d),f=c.route;if(!h&&u&&n&&!s[s.length-1].route.index&&(h=Hs({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;Object.assign(a,h.params),o.push({params:a,pathname:Ht([i,h.pathname]),pathnameBase:c0(Ht([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Ht([i,h.pathnameBase]))}return o}function Hs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=du(e.path,e.caseSensitive,e.end);return uu(e,t,n,s)}function uu(e,t,n,s){let a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:s.reduce((u,{paramName:d,isOptional:m},h)=>{if(d==="*"){let y=l[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const f=l[h];return m&&!f?u[d]=void 0:u[d]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function du(e,t=!1,n=!0){Pt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c,u,d)=>{if(s.push({paramName:l,isOptional:c!=null}),c){let m=d.charAt(u+o.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function i0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function dn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function o0(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?ar(e):e,i;return n?(n=mu(n),n.startsWith("/")?i=Al(n.substring(1),"/"):i=Al(n,t)):i=t,{pathname:i,search:u0(s),hash:d0(a)}}function Al(e,t){let n=Ys(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ba(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function l0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xi(e){let t=l0(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function xa(e,t,n,s=!1){let a;typeof e=="string"?a=ar(e):(a={...e},Ve(!a.pathname||!a.pathname.includes("?"),Ba("?","pathname","search",a)),Ve(!a.pathname||!a.pathname.includes("#"),Ba("#","pathname","hash",a)),Ve(!a.search||!a.search.includes("#"),Ba("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let m=t.length-1;if(!s&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),m-=1;a.pathname=h.join("/")}l=m>=0?t[m]:"/"}let c=o0(a,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var mu=e=>e.replace(/[\\/]{2,}/g,"/"),Ht=e=>mu(e.join("/")),Ys=e=>e.replace(/\/+$/,""),c0=e=>Ys(e).replace(/^\/*/,"/"),u0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,d0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,m0=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function h0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function f0(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ht(t)||"/"}var hu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fu(e,t){let n=e;if(typeof n!="string"||!Ji.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(hu)try{let i=new URL(window.location.href),o=B1.test(n)?new URL(H1(n,i.protocol)):new URL(n),l=dn(o.pathname,t);o.origin===i.origin&&l!=null?n=l+o.search+o.hash:a=!0}catch{Pt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var pu=["POST","PUT","PATCH","DELETE"];new Set(pu);var p0=["GET",...pu];new Set(p0);var x0=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function g0(e){try{return x0.includes(new URL(e).protocol)}catch{return!1}}var Dr=I.createContext(null);Dr.displayName="DataRouter";var ga=I.createContext(null);ga.displayName="DataRouterState";var xu=I.createContext(!1);function y0(){return I.useContext(xu)}var gu=I.createContext({isTransitioning:!1});gu.displayName="ViewTransition";var b0=I.createContext(new Map);b0.displayName="Fetchers";var v0=I.createContext(null);v0.displayName="Await";var It=I.createContext(null);It.displayName="Navigation";var cs=I.createContext(null);cs.displayName="Location";var zt=I.createContext({outlet:null,matches:[],isDataRoute:!1});zt.displayName="Route";var _i=I.createContext(null);_i.displayName="RouteError";var yu="REACT_ROUTER_ERROR",C0="REDIRECT",j0="ROUTE_ERROR_RESPONSE";function w0(e){if(e.startsWith(`${yu}:${C0}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function N0(e){if(e.startsWith(`${yu}:${j0}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new m0(t.status,t.statusText,t.data)}catch{}}function S0(e,{relative:t}={}){Ve(Or(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=I.useContext(It),{hash:a,pathname:i,search:o}=us(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:Ht([n,i])),s.createHref({pathname:l,search:o,hash:a})}function Or(){return I.useContext(cs)!=null}function Ie(){return Ve(Or(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(cs).location}var bu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vu(e){I.useContext(It).static||I.useLayoutEffect(e)}function Ae(){let{isDataRoute:e}=I.useContext(zt);return e?q0():A0()}function A0(){Ve(Or(),"useNavigate() may be used only in the context of a <Router> component.");let e=I.useContext(Dr),{basename:t,navigator:n}=I.useContext(It),{matches:s}=I.useContext(zt),{pathname:a}=Ie(),i=JSON.stringify(Xi(s)),o=I.useRef(!1);return vu(()=>{o.current=!0}),I.useCallback((c,u={})=>{if(Pt(o.current,bu),!o.current)return;if(typeof c=="number"){n.go(c);return}let d=xa(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ht([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,i,a,e])}var Cu=I.createContext(null);function vt(){return I.useContext(Cu)}function k0(e){let t=I.useContext(zt).outlet;return I.useMemo(()=>t&&I.createElement(Cu.Provider,{value:e},t),[t,e])}function ya(){let{matches:e}=I.useContext(zt),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function us(e,{relative:t}={}){let{matches:n}=I.useContext(zt),{pathname:s}=Ie(),a=JSON.stringify(Xi(n));return I.useMemo(()=>xa(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function P0(e,t){return ju(e,t)}function ju(e,t,n){var b;Ve(Or(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=I.useContext(It),{matches:a}=I.useContext(zt),i=a[a.length-1],o=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let C=u&&u.path||"";Nu(l,!u||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
11
|
|
|
12
|
-
Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let d=ke(),m;if(t){let y=typeof t=="string"?rr(t):t;qe(c==="/"||((v=y.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),m=y}else m=d;let h=m.pathname||"/",f=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):nu(e,{pathname:f});kt(u||g!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),kt(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=k0(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:Ut([c,s.encodeLocation?s.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Ut([c,s.encodeLocation?s.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&p?E.createElement(as.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...m},navigationType:"POP"}},p):p}function w0(){let e=L0(),t=o0(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},i={padding:"2px 4px",backgroundColor:s},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:a},n):null,o)}var N0=E.createElement(w0,null),yu=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=y0(e.digest);n&&(e=n)}let t=e!==void 0?E.createElement(Ot.Provider,{value:this.props.routeContext},E.createElement(Gi.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(S0,{error:e},t):t}};yu.contextType=du;var Va=new WeakMap;function S0({children:e,error:t}){let{basename:n}=E.useContext(Pt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=g0(t.digest);if(s){let a=Va.get(t);if(a)throw a;let i=cu(s.location,n),o=i.absoluteURL||i.to;if(d0(o))throw new Error("Invalid redirect location");if(lu&&!Va.get(t))if(i.isExternal||s.reloadDocument)window.location.href=o;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:s.replace}));throw Va.set(t,l),l}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function A0({routeContext:e,match:t,children:n}){let s=E.useContext(Fr);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Ot.Provider,{value:e},n)}function k0(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let a=e,i=s==null?void 0:s.errors;if(i!=null){let d=a.findIndex(m=>m.route.id&&(i==null?void 0:i[m.route.id])!==void 0);qe(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let o=!1,l=-1;if(n&&s){o=s.renderFallback;for(let d=0;d<a.length;d++){let m=a[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(l=d),m.route.id){let{loaderData:h,errors:f}=s,g=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!f||f[m.route.id]===void 0);if(m.route.lazy||g){n.isStatic&&(o=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=s&&c?(d,m)=>{var h,f;c(d,{location:s.location,params:((f=(h=s.matches)==null?void 0:h[0])==null?void 0:f.params)??{},pattern:l0(s.matches),errorInfo:m})}:void 0;return a.reduceRight((d,m,h)=>{let f,g=!1,p=null,v=null;s&&(f=i&&m.route.id?i[m.route.id]:void 0,p=m.route.errorElement||N0,o&&(l<0&&h===0?(bu("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,v=null):l===h&&(g=!0,v=m.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),b=()=>{let S;return f?S=p:g?S=v:m.route.Component?S=E.createElement(m.route.Component,null):m.route.element?S=m.route.element:S=d,E.createElement(A0,{match:m,routeContext:{outlet:d,matches:y,isDataRoute:s!=null},children:S})};return s&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?E.createElement(yu,{location:s.location,revalidation:s.revalidation,component:p,error:f,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):b()},null)}function Ji(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function P0(e){let t=E.useContext(Fr);return qe(t,Ji(e)),t}function E0(e){let t=E.useContext(ha);return qe(t,Ji(e)),t}function I0(e){let t=E.useContext(Ot);return qe(t,Ji(e)),t}function Xi(e){let t=I0(e),n=t.matches[t.matches.length-1];return qe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function T0(){return Xi("useRouteId")}function L0(){var s;let e=E.useContext(Gi),t=E0("useRouteError"),n=Xi("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function F0(){let{router:e}=P0("useNavigate"),t=Xi("useNavigate"),n=E.useRef(!1);return pu(()=>{n.current=!0}),E.useCallback(async(a,i={})=>{kt(n.current,fu),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var wl={};function bu(e,t,n){!t&&!wl[e]&&(wl[e]=!0,kt(!1,n))}E.memo(R0);function R0({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:i}){return gu(e,void 0,{manifest:t,state:s,isStatic:a,onError:i})}function M0({basename:e,children:t,initialEntries:n,initialIndex:s,useTransitions:a}){let i=E.useRef();i.current==null&&(i.current=q1({initialEntries:n,initialIndex:s,v5Compat:!0}));let o=i.current,[l,c]=E.useState({action:o.action,location:o.location}),u=E.useCallback(d=>{a===!1?c(d):E.startTransition(()=>c(d))},[a]);return E.useLayoutEffect(()=>o.listen(u),[o,u]),E.createElement(O0,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:a})}function He({to:e,replace:t,state:n,relative:s}){qe(Rr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=E.useContext(Pt);kt(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext(Ot),{pathname:o}=ke(),l=Pe(),c=ma(e,Qi(i),o,s==="path"),u=JSON.stringify(c);return E.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:s})},[l,u,s,t,n]),null}function D0(e){return C0(e.context)}function ie(e){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function O0({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:a,static:i=!1,useTransitions:o}){qe(!Rr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:a,static:i,useTransitions:o,future:{}}),[l,a,i,o]);typeof n=="string"&&(n=rr(n));let{pathname:u="/",search:d="",hash:m="",state:h=null,key:f="default",mask:g}=n,p=E.useMemo(()=>{let v=cn(u,l);return v==null?null:{location:{pathname:v,search:d,hash:m,state:h,key:f,mask:g},navigationType:s}},[l,u,d,m,h,f,s,g]);return kt(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:E.createElement(Pt.Provider,{value:c},E.createElement(as.Provider,{children:t,value:p}))}function _i({children:e,location:t}){return j0(ui(e),t)}function ui(e,t=[]){let n=[];return E.Children.forEach(e,(s,a)=>{if(!E.isValidElement(s))return;let i=[...t,a];if(s.type===E.Fragment){n.push.apply(n,ui(s.props.children,i));return}qe(s.type===ie,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!s.props.index||!s.props.children,"An index route cannot have child routes.");let o={id:s.props.id||i.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(o.children=ui(s.props.children,i)),n.push(o)}),n}var Ls="get",Fs="application/x-www-form-urlencoded";function pa(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function z0(e){return pa(e)&&e.tagName.toLowerCase()==="button"}function q0(e){return pa(e)&&e.tagName.toLowerCase()==="form"}function V0(e){return pa(e)&&e.tagName.toLowerCase()==="input"}function Z0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function U0(e,t){return e.button===0&&(!t||t==="_self")&&!Z0(e)}function di(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(a=>[n,a]):[[n,s]])},[]))}function B0(e,t){let n=di(e);return t&&t.forEach((s,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var vs=null;function Y0(){if(vs===null)try{new FormData(document.createElement("form"),0),vs=!1}catch{vs=!0}return vs}var H0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Za(e){return e!=null&&!H0.has(e)?(kt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fs}"`),null):e}function W0(e,t){let n,s,a,i,o;if(q0(e)){let l=e.getAttribute("action");s=l?cn(l,t):null,n=e.getAttribute("method")||Ls,a=Za(e.getAttribute("enctype"))||Fs,i=new FormData(e)}else if(z0(e)||V0(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(s=c?cn(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||Ls,a=Za(e.getAttribute("formenctype"))||Za(l.getAttribute("enctype"))||Fs,i=new FormData(l,e),!Y0()){let{name:u,type:d,value:m}=e;if(d==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,m)}}else{if(pa(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ls,s=null,a=Fs,o=e}return i&&a==="text/plain"&&(o=i,i=void 0),{action:s,method:n.toLowerCase(),encType:a,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $i(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vu(e,t,n,s){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${s}`:a.pathname=`${a.pathname}.${s}`:a.pathname==="/"?a.pathname=`_root.${s}`:t&&cn(a.pathname,t)==="/"?a.pathname=`${Zs(t)}/_root.${s}`:a.pathname=`${Zs(a.pathname)}.${s}`,a}async function K0(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Q0(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function G0(e,t,n){let s=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let o=await K0(i,n);return o.links?o.links():[]}return[]}));return $0(s.flat(1).filter(Q0).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Nl(e,t,n,s,a,i){let o=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,l=(c,u)=>{var d;return n[u].pathname!==c.pathname||((d=n[u].route.path)==null?void 0:d.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>o(c,u)||l(c,u)):i==="data"?t.filter((c,u)=>{var m;let d=s.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(o(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function J0(e,t,{includeHydrateFallback:n}={}){return X0(e.map(s=>{let a=t.routes[s.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function X0(e){return[...new Set(e)]}function _0(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function $0(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let i=JSON.stringify(_0(a));return n.has(i)||(n.add(i),s.push({key:i,link:a})),s},[])}function eo(){let e=E.useContext(Fr);return $i(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eh(){let e=E.useContext(ha);return $i(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var to=E.createContext(void 0);to.displayName="FrameworkContext";function xa(){let e=E.useContext(to);return $i(e,"You must render this element inside a <HydratedRouter> element"),e}function th(e,t){let n=E.useContext(to),[s,a]=E.useState(!1),[i,o]=E.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:m}=t,h=E.useRef(null);E.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let p=y=>{y.forEach(b=>{o(b.isIntersecting)})},v=new IntersectionObserver(p,{threshold:.5});return h.current&&v.observe(h.current),()=>{v.disconnect()}}},[e]),E.useEffect(()=>{if(s){let p=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(p)}}},[s]);let f=()=>{a(!0)},g=()=>{a(!1),o(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:qr(l,f),onBlur:qr(c,g),onMouseEnter:qr(u,f),onMouseLeave:qr(d,g),onTouchStart:qr(m,f)}]:[!1,h,{}]}function qr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function nh({page:e,...t}){let n=m0(),{nonce:s}=xa(),{router:a}=eo(),i=E.useMemo(()=>nu(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?(t.nonce==null&&s&&(t={...t,nonce:s}),n?E.createElement(sh,{page:e,matches:i,...t}):E.createElement(ah,{page:e,matches:i,...t})):null}function rh(e){let{manifest:t,routeModules:n}=xa(),[s,a]=E.useState([]);return E.useEffect(()=>{let i=!1;return G0(e,t,n).then(o=>{i||a(o)}),()=>{i=!0}},[e,t,n]),s}function sh({page:e,matches:t,...n}){let s=ke(),{future:a}=xa(),{basename:i}=eo(),o=E.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let l=vu(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?c=!0:u.push(d.route.id);return c&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[i,a.v8_trailingSlashAwareDataRequests,e,s,t]);return E.createElement(E.Fragment,null,o.map(l=>E.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function ah({page:e,matches:t,...n}){let s=ke(),{future:a,manifest:i,routeModules:o}=xa(),{basename:l}=eo(),{loaderData:c,matches:u}=eh(),d=E.useMemo(()=>Nl(e,t,u,i,s,"data"),[e,t,u,i,s]),m=E.useMemo(()=>Nl(e,t,u,i,s,"assets"),[e,t,u,i,s]),h=E.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let p=new Set,v=!1;if(t.forEach(b=>{var A;let S=i.routes[b.route.id];!S||!S.hasLoader||(!d.some(w=>w.route.id===b.route.id)&&b.route.id in c&&((A=o[b.route.id])!=null&&A.shouldRevalidate)||S.hasClientLoader?v=!0:p.add(b.route.id))}),p.size===0)return[];let y=vu(e,l,a.v8_trailingSlashAwareDataRequests,"data");return v&&p.size>0&&y.searchParams.set("_routes",t.filter(b=>p.has(b.route.id)).map(b=>b.route.id).join(",")),[y.pathname+y.search]},[l,a.v8_trailingSlashAwareDataRequests,c,s,i,d,t,e,o]),f=E.useMemo(()=>J0(m,i),[m,i]),g=rh(m);return E.createElement(E.Fragment,null,h.map(p=>E.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),f.map(p=>E.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),g.map(({key:p,link:v})=>E.createElement("link",{key:p,nonce:n.nonce,...v,crossOrigin:v.crossOrigin??n.crossOrigin})))}function ih(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oh&&(window.__reactRouterVersion="7.18.1")}catch{}var Cu=E.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:a,reloadDocument:i,replace:o,mask:l,state:c,target:u,to:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:f,...g},p){let{basename:v,navigator:y,useTransitions:b}=E.useContext(Pt),S=typeof d=="string"&&Ki.test(d),A=cu(d,v);d=A.to;let w=b0(d,{relative:a}),k=ke(),M=null;if(l){let z=ma(l,[],k.mask?k.mask.pathname:"/",!0);v!=="/"&&(z.pathname=z.pathname==="/"?v:Ut([v,z.pathname])),M=y.createHref(z)}let[O,Z,_]=th(s,g),F=dh(d,{replace:o,mask:l,state:c,target:u,preventScrollReset:m,relative:a,viewTransition:h,defaultShouldRevalidate:f,useTransitions:b});function W(z){t&&t(z),z.defaultPrevented||F(z)}let H=!(A.isExternal||i),ee=E.createElement("a",{...g,..._,href:(H?M:void 0)||A.absoluteURL||w,onClick:H?W:t,ref:ih(p,Z),target:u,"data-discover":!S&&n==="render"?"true":void 0});return O&&!S?E.createElement(E.Fragment,null,ee,E.createElement(nh,{page:w})):ee});Cu.displayName="Link";var lh=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:a=!1,style:i,to:o,viewTransition:l,children:c,...u},d){let m=is(o,{relative:u.relative}),h=ke(),f=E.useContext(ha),{navigator:g,basename:p}=E.useContext(Pt),v=f!=null&&gh(m)&&l===!0,y=g.encodeLocation?g.encodeLocation(m).pathname:m.pathname,b=h.pathname,S=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,y=y.toLowerCase()),S&&p&&(S=cn(S,p)||S);const A=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let w=b===y||!a&&b.startsWith(y)&&b.charAt(A)==="/",k=S!=null&&(S===y||!a&&S.startsWith(y)&&S.charAt(y.length)==="/"),M={isActive:w,isPending:k,isTransitioning:v},O=w?t:void 0,Z;typeof s=="function"?Z=s(M):Z=[s,w?"active":null,k?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let _=typeof i=="function"?i(M):i;return E.createElement(Cu,{...u,"aria-current":O,className:Z,ref:d,style:_,to:o,viewTransition:l},typeof c=="function"?c(M):c)});lh.displayName="NavLink";var ch=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:i,method:o=Ls,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...f},g)=>{let{useTransitions:p}=E.useContext(Pt),v=ph(),y=xh(l,{relative:u}),b=o.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&Ki.test(l),A=w=>{if(c&&c(w),w.defaultPrevented)return;w.preventDefault();let k=w.nativeEvent.submitter,M=(k==null?void 0:k.getAttribute("formmethod"))||o,O=()=>v(k||w.currentTarget,{fetcherKey:t,method:M,navigate:n,replace:a,state:i,relative:u,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h});p&&n!==!1?E.startTransition(()=>O()):O()};return E.createElement("form",{ref:g,method:b,action:y,onSubmit:s?c:A,...f,"data-discover":!S&&e==="render"?"true":void 0})});ch.displayName="Form";function uh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ju(e){let t=E.useContext(Fr);return qe(t,uh(e)),t}function dh(e,{target:t,replace:n,mask:s,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Pe(),m=ke(),h=is(e,{relative:o});return E.useCallback(f=>{if(U0(f,t)){f.preventDefault();let g=n!==void 0?n:qs(m)===qs(h),p=()=>d(e,{replace:g,mask:s,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:c});u?E.startTransition(()=>p()):p()}},[m,d,h,n,s,a,t,e,i,o,l,c,u])}function mh(e){kt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=E.useRef(di(e)),n=E.useRef(!1),s=ke(),a=E.useMemo(()=>B0(s.search,n.current?null:t.current),[s.search]),i=Pe(),o=E.useCallback((l,c)=>{const u=di(typeof l=="function"?l(new URLSearchParams(a)):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}var hh=0,fh=()=>`__${String(++hh)}__`;function ph(){let{router:e}=ju("useSubmit"),{basename:t}=E.useContext(Pt),n=T0(),s=e.fetch,a=e.navigate;return E.useCallback(async(i,o={})=>{let{action:l,method:c,encType:u,formData:d,body:m}=W0(i,t);if(o.navigate===!1){let h=o.fetcherKey||fh();await s(h,n,o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:m,formMethod:o.method||c,formEncType:o.encType||u,flushSync:o.flushSync})}else await a(o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:m,formMethod:o.method||c,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[s,a,t,n])}function xh(e,{relative:t}={}){let{basename:n}=E.useContext(Pt),s=E.useContext(Ot);qe(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),i={...is(e||".",{relative:t})},o=ke();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Ut([n,i.pathname])),qs(i)}function gh(e,{relative:t}={}){let n=E.useContext(mu);qe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=ju("useViewTransitionState"),a=is(e,{relative:t});if(!n.isTransitioning)return!1;let i=cn(n.currentLocation.pathname,s)||n.currentLocation.pathname,o=cn(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Vs(a.pathname,o)!=null||Vs(a.pathname,i)!=null}var Mr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bn,bn,hr,Hc,yh=(Hc=class extends Mr{constructor(){super();se(this,Bn);se(this,bn);se(this,hr);X(this,hr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,bn)||this.setEventListener(N(this,hr))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,bn))==null||t.call(this),X(this,bn,void 0))}setEventListener(t){var n;X(this,hr,t),(n=N(this,bn))==null||n.call(this),X(this,bn,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){N(this,Bn)!==t&&(X(this,Bn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof N(this,Bn)=="boolean"?N(this,Bn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bn=new WeakMap,bn=new WeakMap,hr=new WeakMap,Hc),no=new yh,bh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wt,Yn,Wc,vh=(Wc=class{constructor(){se(this,Wt,bh);se(this,Yn,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&N(this,Yn)&&e!==N(this,Wt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:N(this,Wt),provider:e}),X(this,Wt,e),process.env.NODE_ENV!=="production"&&X(this,Yn,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&X(this,Yn,!0),N(this,Wt).setTimeout(e,t)}clearTimeout(e){N(this,Wt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&X(this,Yn,!0),N(this,Wt).setInterval(e,t)}clearInterval(e){N(this,Wt).clearInterval(e)}},Wt=new WeakMap,Yn=new WeakMap,Wc),Un=new vh;function Ch(e){setTimeout(e,0)}var jh=typeof window>"u"||"Deno"in globalThis;function mt(){}function wh(e,t){return typeof e=="function"?e(t):e}function mi(e){return typeof e=="number"&&e>=0&&e!==1/0}function wu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tn(e,t){return typeof e=="function"?e(t):e}function Nt(e,t){return typeof e=="function"?e(t):e}function Sl(e,t){const{type:n="all",exact:s,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(s){if(t.queryHash!==ro(o,t.options))return!1}else if(!Kr(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function Al(e,t){const{exact:n,status:s,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(er(t.options.mutationKey)!==er(i))return!1}else if(!Kr(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||a&&!a(t))}function ro(e,t){return((t==null?void 0:t.queryKeyHashFn)||er)(e)}function er(e){return JSON.stringify(e,(t,n)=>fi(n)?Object.keys(n).sort().reduce((s,a)=>(s[a]=n[a],s),{}):n)}function Kr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kr(e[n],t[n])):!1}var Nh=Object.prototype.hasOwnProperty;function hi(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=kl(e)&&kl(t);if(!s&&!(fi(e)&&fi(t)))return t;const i=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),l=o.length,c=s?new Array(l):{};let u=0;for(let d=0;d<l;d++){const m=s?d:o[d],h=e[m],f=t[m];if(h===f){c[m]=h,(s?d<i:Nh.call(e,m))&&u++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){c[m]=f;continue}const g=hi(h,f,n+1);c[m]=g,g===h&&u++}return i===l&&u===i?e:c}function Us(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fi(e){if(!Pl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Pl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pl(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sh(e){return new Promise(t=>{Un.setTimeout(t,e)})}function pi(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return hi(e,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${s}`),s}return hi(e,t)}return t}function Ua(e){return e}function Ah(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function kh(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Bs=Symbol();function Nu(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Bs&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bs?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function so(e,t){return typeof e=="function"?e(...t):!!e}function Ph(e,t,n){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),s||(s=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Qr=(()=>{let e=()=>jh;return{isServer(){return e()},setIsServer(t){e=t}}})();function xi(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function s(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},n.reject=a=>{s({status:"rejected",reason:a}),t(a)},n}var Eh=Ch;function Ih(){let e=[],t=0,n=l=>{l()},s=l=>{l()},a=Eh;const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{s(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{s=l},setScheduler:l=>{a=l}}}var Ge=Ih(),fr,vn,pr,Kc,Th=(Kc=class extends Mr{constructor(){super();se(this,fr,!0);se(this,vn);se(this,pr);X(this,pr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){N(this,vn)||this.setEventListener(N(this,pr))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,vn))==null||t.call(this),X(this,vn,void 0))}setEventListener(t){var n;X(this,pr,t),(n=N(this,vn))==null||n.call(this),X(this,vn,t(this.setOnline.bind(this)))}setOnline(t){N(this,fr)!==t&&(X(this,fr,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return N(this,fr)}},fr=new WeakMap,vn=new WeakMap,pr=new WeakMap,Kc),Ys=new Th;function Lh(e){return Math.min(1e3*2**e,3e4)}function Su(e){return(e??"online")==="online"?Ys.isOnline():!0}var gi=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Au(e){let t=!1,n=0,s;const a=xi(),i=()=>a.status!=="pending",o=p=>{var v;if(!i()){const y=new gi(p);h(y),(v=e.onCancel)==null||v.call(e,y)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>no.isFocused()&&(e.networkMode==="always"||Ys.isOnline())&&e.canRun(),d=()=>Su(e.networkMode)&&e.canRun(),m=p=>{i()||(s==null||s(),a.resolve(p))},h=p=>{i()||(s==null||s(),a.reject(p))},f=()=>new Promise(p=>{var v;s=y=>{(i()||u())&&p(y)},(v=e.onPause)==null||v.call(e)}).then(()=>{var p;s=void 0,i()||(p=e.onContinue)==null||p.call(e)}),g=()=>{if(i())return;let p;const v=n===0?e.initialPromise:void 0;try{p=v??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(m).catch(y=>{var k;if(i())return;const b=e.retry??(Qr.isServer()?0:3),S=e.retryDelay??Lh,A=typeof S=="function"?S(n,y):S,w=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,y);if(t||!w){h(y);return}n++,(k=e.onFail)==null||k.call(e,n,y),Sh(A).then(()=>u()?void 0:f()).then(()=>{t?h(y):g()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?g():f().then(g),a)}}var Hn,Qc,ku=(Qc=class{constructor(){se(this,Hn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mi(this.gcTime)&&X(this,Hn,Un.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qr.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,Hn)!==void 0&&(Un.clearTimeout(N(this,Hn)),X(this,Hn,void 0))}},Hn=new WeakMap,Qc);function Fh(e){return{onFetch:(t,n)=>{var d,m,h,f,g;const s=t.options,a=(h=(m=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:m.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const v=S=>{Ph(S,()=>t.signal,()=>p=!0)},y=Nu(t.options,t.fetchOptions),b=async(S,A,w)=>{if(p)return Promise.reject(t.signal.reason);if(A==null&&S.pages.length)return Promise.resolve(S);const M=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:A,direction:w?"backward":"forward",meta:t.options.meta};return v(F),F})(),O=await y(M),{maxPages:Z}=t.options,_=w?kh:Ah;return{pages:_(S.pages,O,Z),pageParams:_(S.pageParams,A,Z)}};if(a&&i.length){const S=a==="backward",A=S?Rh:El,w={pages:i,pageParams:o},k=A(s,w);l=await b(w,k,S)}else{const S=e??i.length;do{const A=c===0?o[0]??s.initialPageParam:El(s,l);if(c>0&&A==null)break;l=await b(l,A),c++}while(c<S)}return l};t.options.persister?t.fetchFn=()=>{var p,v;return(v=(p=t.options).persister)==null?void 0:v.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function El(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function Rh(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var xr,Wn,gr,Mt,Kn,$e,es,Qn,wt,Pu,tn,Gc,Mh=(Gc=class extends ku{constructor(t){super();se(this,wt);se(this,xr);se(this,Wn);se(this,gr);se(this,Mt);se(this,Kn);se(this,$e);se(this,es);se(this,Qn);X(this,Qn,!1),X(this,es,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,Kn,t.client),X(this,Mt,N(this,Kn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Wn,Tl(this.options)),this.state=t.state??N(this,Wn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,xr)}get promise(){var t;return(t=N(this,$e))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,es),...t},t!=null&&t._type&&X(this,xr,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Tl(this.options);n.data!==void 0&&(this.setState(Il(n.data,n.dataUpdatedAt)),X(this,Wn,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Mt).remove(this)}setData(t,n){const s=pi(this.state.data,t,this.options);return de(this,wt,tn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t){de(this,wt,tn).call(this,{type:"setState",state:t})}cancel(t){var s,a;const n=(s=N(this,$e))==null?void 0:s.promise;return(a=N(this,$e))==null||a.cancel(t),n?n.then(mt).catch(mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,Wn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bs||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Tn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!wu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,$e))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,$e))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,Mt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(N(this,$e)&&(N(this,Qn)||de(this,wt,Pu).call(this)?N(this,$e).cancel({revert:!0}):N(this,$e).cancelRetry()),this.scheduleGc()),N(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,wt,tn).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,m,h,f,g,p,v,y,b,S;if(this.state.fetchStatus!=="idle"&&((u=N(this,$e))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,$e))return N(this,$e).continueRetry(),N(this,$e).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(w=>w.options.queryFn);A&&this.setOptions(A.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(X(this,Qn,!0),s.signal)})},i=()=>{const A=Nu(this.options,n),k=(()=>{const M={client:N(this,Kn),queryKey:this.queryKey,meta:this.meta};return a(M),M})();return X(this,Qn,!1),this.options.persister?this.options.persister(A,k,this):A(k)},l=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,Kn),state:this.state,fetchFn:i};return a(A),A})(),c=N(this,xr)==="infinite"?Fh(this.options.pages):this.options.behavior;c==null||c.onFetch(l,this),X(this,gr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&de(this,wt,tn).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),X(this,$e,Au({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof gi&&A.revert&&this.setState({...N(this,gr),fetchStatus:"idle"}),s.abort()},onFail:(A,w)=>{de(this,wt,tn).call(this,{type:"failed",failureCount:A,error:w})},onPause:()=>{de(this,wt,tn).call(this,{type:"pause"})},onContinue:()=>{de(this,wt,tn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await N(this,$e).start();if(A===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(A),(f=(h=N(this,Mt).config).onSuccess)==null||f.call(h,A,this),(p=(g=N(this,Mt).config).onSettled)==null||p.call(g,A,this.state.error,this),A}catch(A){if(A instanceof gi){if(A.silent)return N(this,$e).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw de(this,wt,tn).call(this,{type:"error",error:A}),(y=(v=N(this,Mt).config).onError)==null||y.call(v,A,this),(S=(b=N(this,Mt).config).onSettled)==null||S.call(b,this.state.data,A,this),A}finally{this.scheduleGc()}}},xr=new WeakMap,Wn=new WeakMap,gr=new WeakMap,Mt=new WeakMap,Kn=new WeakMap,$e=new WeakMap,es=new WeakMap,Qn=new WeakMap,wt=new WeakSet,Pu=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},tn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Eu(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Il(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,gr,t.manual?a:void 0),a;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),Ge.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),N(this,Mt).notify({query:this,type:"updated",action:t})})},Gc);function Eu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Su(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Il(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tl(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xt,pe,ts,dt,Gn,yr,nn,Cn,ns,br,vr,Jn,Xn,jn,Cr,je,Br,yi,bi,vi,Ci,ji,wi,Ni,Iu,Jc,Dh=(Jc=class extends Mr{constructor(t,n){super();se(this,je);se(this,xt);se(this,pe);se(this,ts);se(this,dt);se(this,Gn);se(this,yr);se(this,nn);se(this,Cn);se(this,ns);se(this,br);se(this,vr);se(this,Jn);se(this,Xn);se(this,jn);se(this,Cr,new Set);this.options=n,X(this,xt,t),X(this,Cn,null),X(this,nn,xi()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,pe).addObserver(this),Ll(N(this,pe),this.options)?de(this,je,Br).call(this):this.updateResult(),de(this,je,Ci).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Si(N(this,pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Si(N(this,pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,je,ji).call(this),de(this,je,wi).call(this),N(this,pe).removeObserver(this)}setOptions(t){const n=this.options,s=N(this,pe);if(this.options=N(this,xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,N(this,pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,je,Ni).call(this),N(this,pe).setOptions(this.options),n._defaulted&&!Us(this.options,n)&&N(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,pe),observer:this});const a=this.hasListeners();a&&Fl(N(this,pe),s,this.options,n)&&de(this,je,Br).call(this),this.updateResult(),a&&(N(this,pe)!==s||Nt(this.options.enabled,N(this,pe))!==Nt(n.enabled,N(this,pe))||Tn(this.options.staleTime,N(this,pe))!==Tn(n.staleTime,N(this,pe)))&&de(this,je,yi).call(this);const i=de(this,je,bi).call(this);a&&(N(this,pe)!==s||Nt(this.options.enabled,N(this,pe))!==Nt(n.enabled,N(this,pe))||i!==N(this,jn))&&de(this,je,vi).call(this,i)}getOptimisticResult(t){const n=N(this,xt).getQueryCache().build(N(this,xt),t),s=this.createResult(n,t);return zh(this,s)&&(X(this,dt,s),X(this,yr,this.options),X(this,Gn,N(this,pe).state)),s}getCurrentResult(){return N(this,dt)}trackResult(t,n){return new Proxy(t,{get:(s,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,nn).status==="pending"&&N(this,nn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(t){N(this,Cr).add(t)}getCurrentQuery(){return N(this,pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=N(this,xt).defaultQueryOptions(t),s=N(this,xt).getQueryCache().build(N(this,xt),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return de(this,je,Br).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,dt)))}createResult(t,n){var Z;const s=N(this,pe),a=this.options,i=N(this,dt),o=N(this,Gn),l=N(this,yr),u=t!==s?t.state:N(this,ts),{state:d}=t;let m={...d},h=!1,f;if(n._optimisticResults){const _=this.hasListeners(),F=!_&&Ll(t,n),W=_&&Fl(t,s,n,a);(F||W)&&(m={...m,...Eu(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:p,status:v}=m;f=m.data;let y=!1;if(n.placeholderData!==void 0&&f===void 0&&v==="pending"){let _;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(_=i.data,y=!0):_=typeof n.placeholderData=="function"?n.placeholderData((Z=N(this,vr))==null?void 0:Z.state.data,N(this,vr)):n.placeholderData,_!==void 0&&(v="success",f=pi(i==null?void 0:i.data,_,n),h=!0)}if(n.select&&f!==void 0&&!y)if(i&&f===(o==null?void 0:o.data)&&n.select===N(this,ns))f=N(this,br);else try{X(this,ns,n.select),f=n.select(f),f=pi(i==null?void 0:i.data,f,n),X(this,br,f),X(this,Cn,null)}catch(_){X(this,Cn,_)}N(this,Cn)&&(g=N(this,Cn),f=N(this,br),p=Date.now(),v="error");const b=m.fetchStatus==="fetching",S=v==="pending",A=v==="error",w=S&&b,k=f!==void 0,O={status:v,fetchStatus:m.fetchStatus,isPending:S,isSuccess:v==="success",isError:A,isInitialLoading:w,isLoading:w,data:f,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:p,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:A&&!k,isPaused:m.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:A&&k,isStale:ao(t,n),refetch:this.refetch,promise:N(this,nn),isEnabled:Nt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=O.data!==void 0,F=O.status==="error"&&!_,W=z=>{F?z.reject(O.error):_&&z.resolve(O.data)},H=()=>{const z=X(this,nn,O.promise=xi());W(z)},ee=N(this,nn);switch(ee.status){case"pending":t.queryHash===s.queryHash&&W(ee);break;case"fulfilled":(F||O.data!==ee.value)&&H();break;case"rejected":(!F||O.error!==ee.reason)&&H();break}}return O}updateResult(){const t=N(this,dt),n=this.createResult(N(this,pe),this.options);if(X(this,Gn,N(this,pe).state),X(this,yr,this.options),N(this,Gn).data!==void 0&&X(this,vr,N(this,pe)),Us(n,t))return;X(this,dt,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!N(this,Cr).size)return!0;const o=new Set(i??N(this,Cr));return this.options.throwOnError&&o.add("error"),Object.keys(N(this,dt)).some(l=>{const c=l;return N(this,dt)[c]!==t[c]&&o.has(c)})};de(this,je,Iu).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,je,Ci).call(this)}},xt=new WeakMap,pe=new WeakMap,ts=new WeakMap,dt=new WeakMap,Gn=new WeakMap,yr=new WeakMap,nn=new WeakMap,Cn=new WeakMap,ns=new WeakMap,br=new WeakMap,vr=new WeakMap,Jn=new WeakMap,Xn=new WeakMap,jn=new WeakMap,Cr=new WeakMap,je=new WeakSet,Br=function(t){de(this,je,Ni).call(this);let n=N(this,pe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(mt)),n},yi=function(){de(this,je,ji).call(this);const t=Tn(this.options.staleTime,N(this,pe));if(Qr.isServer()||N(this,dt).isStale||!mi(t))return;const s=wu(N(this,dt).dataUpdatedAt,t)+1;X(this,Jn,Un.setTimeout(()=>{N(this,dt).isStale||this.updateResult()},s))},bi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,pe)):this.options.refetchInterval)??!1},vi=function(t){de(this,je,wi).call(this),X(this,jn,t),!(Qr.isServer()||Nt(this.options.enabled,N(this,pe))===!1||!mi(N(this,jn))||N(this,jn)===0)&&X(this,Xn,Un.setInterval(()=>{(this.options.refetchIntervalInBackground||no.isFocused())&&de(this,je,Br).call(this)},N(this,jn)))},Ci=function(){de(this,je,yi).call(this),de(this,je,vi).call(this,de(this,je,bi).call(this))},ji=function(){N(this,Jn)!==void 0&&(Un.clearTimeout(N(this,Jn)),X(this,Jn,void 0))},wi=function(){N(this,Xn)!==void 0&&(Un.clearInterval(N(this,Xn)),X(this,Xn,void 0))},Ni=function(){const t=N(this,xt).getQueryCache().build(N(this,xt),this.options);if(t===N(this,pe))return;const n=N(this,pe);X(this,pe,t),X(this,ts,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Iu=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(N(this,dt))}),N(this,xt).getQueryCache().notify({query:N(this,pe),type:"observerResultsUpdated"})})},Jc);function Oh(e,t){return Nt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Nt(t.retryOnMount,e)===!1)}function Ll(e,t){return Oh(e,t)||e.state.data!==void 0&&Si(e,t,t.refetchOnMount)}function Si(e,t,n){if(Nt(t.enabled,e)!==!1&&Tn(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&ao(e,t)}return!1}function Fl(e,t,n,s){return(e!==t||Nt(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ao(e,n)}function ao(e,t){return Nt(t.enabled,e)!==!1&&e.isStaleByTime(Tn(t.staleTime,e))}function zh(e,t){return!Us(e.getCurrentResult(),t)}var rs,Kt,it,_n,Qt,gn,Xc,qh=(Xc=class extends ku{constructor(t){super();se(this,Qt);se(this,rs);se(this,Kt);se(this,it);se(this,_n);X(this,rs,t.client),this.mutationId=t.mutationId,X(this,it,t.mutationCache),X(this,Kt,[]),this.state=t.state||Tu(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,Kt).includes(t)||(N(this,Kt).push(t),this.clearGcTimeout(),N(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,Kt,N(this,Kt).filter(n=>n!==t)),this.scheduleGc(),N(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,Kt).length||(this.state.status==="pending"?this.scheduleGc():N(this,it).remove(this))}continue(){var t;return((t=N(this,_n))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,u,d,m,h,f,g,p,v,y,b,S,A,w,k,M;const n=()=>{de(this,Qt,gn).call(this,{type:"continue"})},s={client:N(this,rs),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,_n,Au({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(O,Z)=>{de(this,Qt,gn).call(this,{type:"failed",failureCount:O,error:Z})},onPause:()=>{de(this,Qt,gn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,it).canRun(this)}));const a=this.state.status==="pending",i=!N(this,_n).canStart();try{if(a)n();else{de(this,Qt,gn).call(this,{type:"pending",variables:t,isPaused:i}),N(this,it).config.onMutate&&await N(this,it).config.onMutate(t,this,s);const Z=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,s));Z!==this.state.context&&de(this,Qt,gn).call(this,{type:"pending",context:Z,variables:t,isPaused:i})}const O=await N(this,_n).start();return await((u=(c=N(this,it).config).onSuccess)==null?void 0:u.call(c,O,t,this.state.context,this,s)),await((m=(d=this.options).onSuccess)==null?void 0:m.call(d,O,t,this.state.context,s)),await((f=(h=N(this,it).config).onSettled)==null?void 0:f.call(h,O,null,this.state.variables,this.state.context,this,s)),await((p=(g=this.options).onSettled)==null?void 0:p.call(g,O,null,t,this.state.context,s)),de(this,Qt,gn).call(this,{type:"success",data:O}),O}catch(O){try{await((y=(v=N(this,it).config).onError)==null?void 0:y.call(v,O,t,this.state.context,this,s))}catch(Z){Promise.reject(Z)}try{await((S=(b=this.options).onError)==null?void 0:S.call(b,O,t,this.state.context,s))}catch(Z){Promise.reject(Z)}try{await((w=(A=N(this,it).config).onSettled)==null?void 0:w.call(A,void 0,O,this.state.variables,this.state.context,this,s))}catch(Z){Promise.reject(Z)}try{await((M=(k=this.options).onSettled)==null?void 0:M.call(k,void 0,O,t,this.state.context,s))}catch(Z){Promise.reject(Z)}throw de(this,Qt,gn).call(this,{type:"error",error:O}),O}finally{N(this,it).runNext(this)}}},rs=new WeakMap,Kt=new WeakMap,it=new WeakMap,_n=new WeakMap,Qt=new WeakSet,gn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ge.batch(()=>{N(this,Kt).forEach(s=>{s.onMutationUpdate(t)}),N(this,it).notify({mutation:this,type:"updated",action:t})})},Xc);function Tu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rn,Vt,ss,_c,Vh=(_c=class extends Mr{constructor(t={}){super();se(this,rn);se(this,Vt);se(this,ss);this.config=t,X(this,rn,new Set),X(this,Vt,new Map),X(this,ss,0)}build(t,n,s){const a=new qh({client:t,mutationCache:this,mutationId:++bs(this,ss)._,options:t.defaultMutationOptions(n),state:s});return this.add(a),a}add(t){N(this,rn).add(t);const n=Cs(t);if(typeof n=="string"){const s=N(this,Vt).get(n);s?s.push(t):N(this,Vt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,rn).delete(t)){const n=Cs(t);if(typeof n=="string"){const s=N(this,Vt).get(n);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&N(this,Vt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Cs(t);if(typeof n=="string"){const s=N(this,Vt).get(n),a=s==null?void 0:s.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var s;const n=Cs(t);if(typeof n=="string"){const a=(s=N(this,Vt).get(n))==null?void 0:s.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ge.batch(()=>{N(this,rn).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,rn).clear(),N(this,Vt).clear()})}getAll(){return Array.from(N(this,rn))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Al(n,s))}findAll(t={}){return this.getAll().filter(n=>Al(t,n))}notify(t){Ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ge.batch(()=>Promise.all(t.map(n=>n.continue().catch(mt))))}},rn=new WeakMap,Vt=new WeakMap,ss=new WeakMap,_c);function Cs(e){var t;return(t=e.options.scope)==null?void 0:t.id}var sn,wn,gt,an,ln,Rs,Ai,$c,Zh=($c=class extends Mr{constructor(t,n){super();se(this,ln);se(this,sn);se(this,wn);se(this,gt);se(this,an);X(this,sn,t),this.setOptions(n),this.bindMethods(),de(this,ln,Rs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=N(this,sn).defaultMutationOptions(t),Us(this.options,n)||N(this,sn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,gt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&er(n.mutationKey)!==er(this.options.mutationKey)?this.reset():((s=N(this,gt))==null?void 0:s.state.status)==="pending"&&N(this,gt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,gt))==null||t.removeObserver(this)}onMutationUpdate(t){de(this,ln,Rs).call(this),de(this,ln,Ai).call(this,t)}getCurrentResult(){return N(this,wn)}reset(){var t;(t=N(this,gt))==null||t.removeObserver(this),X(this,gt,void 0),de(this,ln,Rs).call(this),de(this,ln,Ai).call(this)}mutate(t,n){var s;return X(this,an,n),(s=N(this,gt))==null||s.removeObserver(this),X(this,gt,N(this,sn).getMutationCache().build(N(this,sn),this.options)),N(this,gt).addObserver(this),N(this,gt).execute(t)}},sn=new WeakMap,wn=new WeakMap,gt=new WeakMap,an=new WeakMap,ln=new WeakSet,Rs=function(){var n;const t=((n=N(this,gt))==null?void 0:n.state)??Tu();X(this,wn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ai=function(t){Ge.batch(()=>{var n,s,a,i,o,l,c,u;if(N(this,an)&&this.hasListeners()){const d=N(this,wn).variables,m=N(this,wn).context,h={client:N(this,sn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=N(this,an)).onSuccess)==null||s.call(n,t.data,d,m,h)}catch(f){Promise.reject(f)}try{(i=(a=N(this,an)).onSettled)==null||i.call(a,t.data,null,d,m,h)}catch(f){Promise.reject(f)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=N(this,an)).onError)==null||l.call(o,t.error,d,m,h)}catch(f){Promise.reject(f)}try{(u=(c=N(this,an)).onSettled)==null||u.call(c,void 0,t.error,d,m,h)}catch(f){Promise.reject(f)}}}this.listeners.forEach(d=>{d(N(this,wn))})})},$c),Gt,eu,Uh=(eu=class extends Mr{constructor(t={}){super();se(this,Gt);this.config=t,X(this,Gt,new Map)}build(t,n,s){const a=n.queryKey,i=n.queryHash??ro(a,n);let o=this.get(i);return o||(o=new Mh({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){N(this,Gt).has(t.queryHash)||(N(this,Gt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=N(this,Gt).get(t.queryHash);n&&(t.destroy(),n===t&&N(this,Gt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,Gt).get(t)}getAll(){return[...N(this,Gt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Sl(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>Sl(t,s)):n}notify(t){Ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Gt=new WeakMap,eu),Be,Nn,Sn,jr,wr,An,Nr,Sr,tu,Bh=(tu=class{constructor(e={}){se(this,Be);se(this,Nn);se(this,Sn);se(this,jr);se(this,wr);se(this,An);se(this,Nr);se(this,Sr);X(this,Be,e.queryCache||new Uh),X(this,Nn,e.mutationCache||new Vh),X(this,Sn,e.defaultOptions||{}),X(this,jr,new Map),X(this,wr,new Map),X(this,An,0)}mount(){bs(this,An)._++,N(this,An)===1&&(X(this,Nr,no.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Be).onFocus())})),X(this,Sr,Ys.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Be).onOnline())})))}unmount(){var e,t;bs(this,An)._--,N(this,An)===0&&((e=N(this,Nr))==null||e.call(this),X(this,Nr,void 0),(t=N(this,Sr))==null||t.call(this),X(this,Sr,void 0))}isFetching(e){return N(this,Be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Nn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,Be).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=N(this,Be).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Tn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return N(this,Be).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),a=N(this,Be).get(s.queryHash),i=a==null?void 0:a.state.data,o=wh(t,i);if(o!==void 0)return N(this,Be).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Ge.batch(()=>N(this,Be).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,Be).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=N(this,Be);Ge.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=N(this,Be);return Ge.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Ge.batch(()=>N(this,Be).findAll(e).map(a=>a.cancel(n)));return Promise.all(s).then(mt).catch(mt)}invalidateQueries(e,t={}){return Ge.batch(()=>(N(this,Be).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Ge.batch(()=>N(this,Be).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(mt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(mt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=N(this,Be).build(this,t);return n.isStaleByTime(Tn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mt).catch(mt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mt).catch(mt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ys.isOnline()?N(this,Nn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Be)}getMutationCache(){return N(this,Nn)}getDefaultOptions(){return N(this,Sn)}setDefaultOptions(e){X(this,Sn,e)}setQueryDefaults(e,t){N(this,jr).set(er(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,jr).values()],n={};return t.forEach(s=>{Kr(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){N(this,wr).set(er(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,wr).values()],n={};return t.forEach(s=>{Kr(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,Sn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ro(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bs&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Sn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,Be).clear(),N(this,Nn).clear()}},Be=new WeakMap,Nn=new WeakMap,Sn=new WeakMap,jr=new WeakMap,wr=new WeakMap,An=new WeakMap,Nr=new WeakMap,Sr=new WeakMap,tu),Lu=E.createContext(void 0),ht=e=>{const t=E.useContext(Lu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yh=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(Lu.Provider,{value:e,children:t})),Fu=E.createContext(!1),Hh=()=>E.useContext(Fu);Fu.Provider;function Wh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Kh=E.createContext(Wh()),Qh=()=>E.useContext(Kh),Gh=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?so(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},Jh=e=>{E.useEffect(()=>{e.clearReset()},[e])},Xh=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||so(n,[e.error,s])),_h=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>n(s(...a)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$h=(e,t)=>e.isLoading&&e.isFetching&&!t,ef=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Rl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tf(e,t,n){var f,g,p,v;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=Hh(),a=Qh(),i=ht(),o=i.defaultQueryOptions(e);(g=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||g.call(f,o);const l=i.getQueryCache().get(o.queryHash);process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));const c=e.subscribed!==!1;o._optimisticResults=s?"isRestoring":c?"optimistic":void 0,_h(o),Gh(o,a,l),Jh(a);const u=!i.getQueryCache().get(o.queryHash),[d]=E.useState(()=>new t(i,o)),m=d.getOptimisticResult(o),h=!s&&c;if(E.useSyncExternalStore(E.useCallback(y=>{const b=h?d.subscribe(Ge.batchCalls(y)):mt;return d.updateResult(),b},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),E.useEffect(()=>{d.setOptions(o)},[o,d]),ef(o,m))throw Rl(o,d,a);if(Xh({result:m,errorResetBoundary:a,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw m.error;if((v=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,m),o.experimental_prefetchInRender&&!Qr.isServer()&&$h(m,s)){const y=u?Rl(o,d,a):l==null?void 0:l.promise;y==null||y.catch(mt).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?m:d.trackResult(m)}function ce(e,t){return tf(e,Dh)}function nf(e,t){const n=ht(),[s]=E.useState(()=>new Zh(n,e));E.useEffect(()=>{s.setOptions(e)},[s,e]);const a=E.useSyncExternalStore(E.useCallback(o=>s.subscribe(Ge.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i=E.useCallback((o,l)=>{s.mutate(o,l).catch(mt)},[s]);if(a.error&&so(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}function Ru(e){return e.trim().replace(/\/+$/,"")}const ga=new Map;function Mu(e,t){ga.set(e,t)}function rf(e){return ga.get(e)}function sf(e){ga.delete(e)}function af(e){for(const[t,n]of ga)if(n.accessToken===e)return t}let ki=null;function Du(e){ki=Ru(e)}let Ou=null;function of(e){Ou=e}function lf(){return Ou}let zu=null;function cf(e){zu=e.trim()}function uf(){return zu}function df(){return ki!==null?ki:Ru("")}const Ml={get apiBaseUrl(){return df()},apiVersion:"v1"};function mf(e){const t=e.startsWith("/")?e:`/${e}`;return`${Ml.apiBaseUrl}/api/${Ml.apiVersion}${t}`}const qu="auth:session-expired";function hf(){window.dispatchEvent(new CustomEvent(qu))}function Vu(e){return`${qu}:${e}`}const Zu=x.createContext(null);function ff({instanceId:e,accessToken:t,onSessionExpired:n,children:s}){const a=rf(e);return a&&Mu(e,{...a,accessToken:t}),of(t),x.useEffect(()=>{if(!n)return;const i=Vu(e),o=()=>n();return window.addEventListener(i,o),()=>window.removeEventListener(i,o)},[e,n]),r.jsx(Zu.Provider,{value:{accessToken:t},children:s})}function pf(){const e=x.useContext(Zu);if(!e)throw new Error("useEmbeddedAuth must be used inside EmbeddedAuthProvider");return e}class dn extends Error{constructor(n,s,a,i,o){super(a??s);zr(this,"status");zr(this,"title");zr(this,"details");zr(this,"extensions");this.name="ApiError",this.status=n,this.title=s,this.details=i,this.extensions=o}}const Uu="tax-remittance.auth";function Bu(){var t;const e=localStorage.getItem(Uu);if(!e)return null;try{const n=JSON.parse(e);return!n.accessToken||!((t=n.user)!=null&&t.userId)?null:new Date(n.user.expiresAt)<=new Date?(Pi(),null):n}catch{return Pi(),null}}function Pi(){localStorage.removeItem(Uu)}function xf(){var e;return((e=Bu())==null?void 0:e.accessToken)??null}async function gf(e){let t=null;try{t=await e.json()}catch{}const n=(t==null?void 0:t.title)??"Request failed",s=t==null?void 0:t.detail,a=t==null?void 0:t.errors;return new dn(e.status,n,s,a,t??void 0)}async function os(e,t={}){const{body:n,auth:s=!0,headers:a,responseType:i="json",...o}=t,l=new Headers(a);i==="blob"?l.set("Accept","application/pdf"):i==="text"?l.set("Accept","text/html"):l.set("Accept","application/json"),n!==void 0&&l.set("Content-Type","application/json");let c=null;if(s){const m=lf()??xf();m&&(c=m,l.set("Authorization",`Bearer ${m}`))}const u=uf();u&&l.set("X-Client-ID",u);const d=await fetch(mf(e),{...o,headers:l,body:n!==void 0?JSON.stringify(n):void 0});if(!d.ok){const m=await gf(d);if(s&&m.status===401){Pi();const h=c?af(c):void 0;h?window.dispatchEvent(new CustomEvent(Vu(h))):hf()}throw m}if(d.status!==204)return i==="blob"?await d.blob():i==="text"?await d.text():await d.json()}async function he(e,t={}){return(await os(e,t)).data}const yf=1e3;async function io(){const e=await he(`/portal/entities/mine?pageSize=${yf}`);return(e==null?void 0:e.items)??[]}function bf(e){return he("/portal/entities",{method:"POST",body:e})}function vf(e,t){return he(`/portal/entities/${e}`,{method:"PATCH",body:t})}function Cf(e,t){return he(`/portal/entities/${e}`,{method:"PATCH",body:{status:t}})}const jf=["unique_name","name","given_name","preferred_username","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"];function wf(e){const t=e==null?void 0:e.split(".")[1];if(!t)return null;try{const n=t.replace(/-/g,"+").replace(/_/g,"/"),s=n.padEnd(n.length+(4-n.length%4)%4,"="),a=Uint8Array.from(atob(s),o=>o.charCodeAt(0)),i=JSON.parse(new TextDecoder().decode(a));return typeof i=="object"&&i!==null?i:null}catch{return null}}function Nf(e){if(!e)return;const t=wf(e);if(t)for(const n of jf){const s=t[n];if(typeof s=="string"&&s.trim())return s.trim()}}const Yu=x.createContext(null);function Sf({onOrganizationCreated:e,enabledPayments:t=["federal","state"],onPaymentRequired:n,userName:s,children:a}){var b;const[i,o]=x.useState(null),{accessToken:l}=pf(),c=x.useMemo(()=>(s==null?void 0:s.trim())||Nf(l),[s,l]),{data:u=[],isLoading:d,isError:m,refetch:h}=ce({queryKey:["entities","mine"],queryFn:io}),f=x.useRef(new Set),g=x.useRef(!1);x.useEffect(()=>{if(d)return;if(!g.current){u.forEach(A=>f.current.add(A.entityId)),g.current=!0;return}u.filter(A=>!f.current.has(A.entityId)).forEach(A=>{f.current.add(A.entityId),e==null||e(A)})},[u,d,e]);const p=i!==null&&u.some(S=>S.entityId===i)?i:((b=u[0])==null?void 0:b.entityId)??null,v=u.find(S=>S.entityId===p)??null,y=async()=>{await h()};return r.jsx(Yu.Provider,{value:{entities:u,isLoading:d,isError:m,selectedEntity:v,setSelectedEntityId:o,refetchEntities:y,enabledPayments:t,onPaymentRequired:n,userName:c},children:a})}function Yt(){const e=x.useContext(Yu);if(!e)throw new Error("useEmbeddedContext must be used inside EmbeddedContextProvider");return e}const Af=x.createContext(null);function kf({theme:e,children:t}){const n={},s=n,a=(e==null?void 0:e.primaryColor)??"#2563eb";s["--embedded-primary"]=a,s["--embedded-primary-dark"]=`color-mix(in srgb, ${a} 82%, black)`,s["--embedded-primary-light"]=`color-mix(in srgb, ${a} 15%, white)`;const i=(e==null?void 0:e.secondaryColor)??"#0891b2";s["--embedded-secondary"]=i,s["--embedded-secondary-dark"]=`color-mix(in srgb, ${i} 82%, black)`,s["--embedded-secondary-light"]=`color-mix(in srgb, ${i} 15%, white)`;const o=(e==null?void 0:e.tertiaryColor)??"#7c3aed";return s["--embedded-tertiary"]=o,s["--embedded-tertiary-dark"]=`color-mix(in srgb, ${o} 82%, black)`,s["--embedded-tertiary-light"]=`color-mix(in srgb, ${o} 15%, white)`,e!=null&&e.borderRadius&&(s["--embedded-radius"]=e.borderRadius),e!=null&&e.fontFamily&&(n.fontFamily=e.fontFamily),s.minHeight="100%",r.jsx("div",{className:"tax-remittance-embedded",style:n,children:t})}const Hu=x.createContext(null),Pf=6e3;function Ef(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function If({toast:e}){const t=e.variant==="success";return r.jsxs("div",{role:"alert",className:`tr-toast-enter flex max-w-full gap-2.5 rounded-lg border px-4 py-2.5 shadow-md ${e.message?"items-start":"items-center"} ${t?"border-emerald-100 bg-emerald-50":"border-red-100 bg-red-50"}`,children:[r.jsx("span",{"aria-hidden":"true",className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${t?"bg-emerald-600":"bg-red-500"} ${e.message?"mt-0.5":""}`,children:t?r.jsx(Tf,{}):r.jsx(Lf,{})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:`text-sm font-medium ${t?"text-emerald-800":"text-red-800"}`,children:e.title}),e.message?r.jsx("p",{className:`mt-0.5 text-xs ${t?"text-emerald-700":"text-red-700"}`,children:e.message}):null]})]})}function Tf(){return r.jsx("svg",{className:"h-3 w-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function Lf(){return r.jsx("svg",{className:"h-3 w-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75v6m0 4.25h.01"})})}function Ff({children:e}){const[t,n]=x.useState([]),s=x.useCallback(o=>{n(l=>l.filter(c=>c.id!==o))},[]),a=x.useCallback((o,l,c)=>{const u=Ef();n(d=>[...d,{id:u,variant:o,title:l,message:c}]),window.setTimeout(()=>{s(u)},Pf)},[s]),i=x.useMemo(()=>({showSuccess:(o,l)=>a("success",o,l),showError:(o,l)=>a("error",o,l)}),[a]);return r.jsxs(Hu.Provider,{value:i,children:[e,un.createPortal(r.jsx("div",{className:"pointer-events-none fixed left-1/2 top-4 z-[200] flex max-w-[calc(100vw-2rem)] -translate-x-1/2 flex-col items-center gap-2",children:t.map(o=>r.jsx(If,{toast:o},o.id))}),document.body)]})}function ya(){const e=x.useContext(Hu);if(!e)throw new Error("useToast must be used within ToastProvider");return e}class Rf extends x.Component{constructor(t){super(t),this.state={hasError:!1,message:""}}static getDerivedStateFromError(t){return{hasError:!0,message:t instanceof Error?t.message:"Unexpected error"}}render(){return this.state.hasError?r.jsxs("div",{className:"flex min-h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[r.jsx("p",{className:"text-sm font-medium text-red-600",children:"Something went wrong loading this widget."}),r.jsx("p",{className:"text-xs text-slate-400",children:this.state.message}),r.jsx("button",{type:"button",className:"rounded-md bg-slate-100 px-4 py-2 text-sm text-slate-600 hover:bg-slate-200",onClick:()=>this.setState({hasError:!1,message:""}),children:"Try again"})]}):this.props.children}}function Mf(e){return e.startsWith("/dashboard")?"dashboard":e.startsWith("/payments")?"payments":e.startsWith("/tax-forms")?"tax-forms":e.startsWith("/settings")?"settings":e.startsWith("/create-entity/form")?"create-entity-form":e.startsWith("/create-entity")?"create-entity":"other"}function Df({navigateFnRef:e,onNavigate:t}){const n=Pe(),s=ke();return x.useEffect(()=>(e.current=n,()=>{e.current=null}),[n,e]),x.useEffect(()=>{t==null||t(Mf(s.pathname),s.pathname)},[s.pathname,t]),null}function Of({selectEntityFnRef:e,onEntityChange:t}){const{setSelectedEntityId:n,selectedEntity:s}=Yt();return x.useEffect(()=>(e.current=n,()=>{e.current=null}),[n,e]),x.useEffect(()=>{s&&(t==null||t(s))},[s,t]),null}function oo({appKey:e,accessToken:t,apiBaseUrl:n,theme:s,onSessionExpired:a,onOrganizationCreated:i,onNavigate:o,onPaymentRequired:l,onEntityChange:c,navigateFnRef:u,selectEntityFnRef:d,enabledPayments:m,userName:h,children:f}){const[g]=x.useState(()=>crypto.randomUUID());Mu(g,{apiBaseUrl:n.trim().replace(/\/+$/,""),clientId:e.trim(),accessToken:t}),Du(n),cf(e),x.useEffect(()=>()=>{sf(g)},[g]);const[p]=x.useState(()=>new Bh({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}));return r.jsx(Af.Provider,{value:g,children:r.jsx(kf,{theme:s,children:r.jsx(Yh,{client:p,children:r.jsx(Ff,{children:r.jsx(ff,{instanceId:g,accessToken:t,onSessionExpired:a,children:r.jsx(M0,{initialEntries:["/dashboard"],initialIndex:0,children:r.jsxs(Sf,{onOrganizationCreated:i,enabledPayments:m,onPaymentRequired:l,userName:h,children:[r.jsx(Df,{navigateFnRef:u,onNavigate:o}),r.jsx(Of,{selectEntityFnRef:d,onEntityChange:c}),r.jsx(Rf,{children:f})]})})})})})})})}function lo(){const{isLoading:e,isError:t,refetchEntities:n}=Yt(),s=Pe();return x.useEffect(()=>{e||t||s("/dashboard",{replace:!0})},[e,t,s]),e?r.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:r.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-200 border-t-slate-600"})}):t?r.jsxs("div",{className:"flex min-h-[200px] flex-col items-center justify-center gap-3 px-4 text-center",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-50",children:r.jsx("svg",{className:"h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),r.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Unable to load your account"}),r.jsx("p",{className:"text-xs text-slate-500",children:"Check your connection and try again."}),r.jsx("button",{type:"button",onClick:n,className:"mt-1 rounded-md bg-slate-100 px-4 py-1.5 text-xs font-medium text-slate-600 hover:bg-slate-200",children:"Retry"})]}):null}function co(){const{entities:e,selectedEntity:t,setSelectedEntityId:n}=Yt();return r.jsx("div",{className:"flex min-h-full flex-col bg-slate-50",children:r.jsx("main",{className:"flex-1 p-5",children:r.jsx(D0,{context:{entities:e,selectedEntity:t,setSelectedEntityId:n}})})})}const zf=["Entity name & EIN","Business type & primary state","Automatic dashboard access","Start managing tax payments"];function qf({onCreateClick:e}){return r.jsxs("div",{className:"mx-auto w-full max-w-[528px]",children:[r.jsxs("div",{className:"overflow-hidden rounded-[20px] border border-[#f3f4f6] bg-white shadow-[0_20px_25px_-5px_rgba(0,0,0,0.1),0_8px_10px_-6px_rgba(0,0,0,0.1)] sm:rounded-[24px]",children:[r.jsxs("div",{className:"bg-[#bccadb] px-5 pb-6 pt-6 text-center sm:px-8 sm:pb-8 sm:pt-8",children:[r.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-white/20 sm:h-16 sm:w-16",children:r.jsx(Dl,{className:"h-6 w-6 text-white sm:h-8 sm:w-8"})}),r.jsx("h2",{className:"mt-3 text-xl font-black tracking-tight text-[#1e2939] sm:mt-4 sm:text-2xl",children:"Add Your Entity"}),r.jsx("p",{className:"mt-1 text-sm text-[#1e2939]/80",children:"Get set up in under 1 minute"})]}),r.jsxs("div",{className:"bg-white px-5 py-5 sm:px-8 sm:py-6",children:[r.jsx("ul",{className:"space-y-2.5 sm:space-y-3",children:zf.map(t=>r.jsxs("li",{className:"flex items-center gap-3 text-sm text-[#4a5565]",children:[r.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-[#dfeeff] text-[#156bd5]",children:r.jsx(js,{})}),t]},t))}),r.jsxs("button",{type:"button",onClick:e,className:"mt-5 flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#156bd5] text-sm font-black text-white transition hover:bg-[#125bb8] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#156bd5] focus-visible:ring-offset-2 sm:mt-6 sm:h-14 sm:text-base",children:[r.jsx(Dl,{className:"h-4 w-4 sm:h-[18px] sm:w-[18px]"}),"Add Entity",r.jsx(Vf,{})]})]})]}),r.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 text-xs text-[#99a1af] sm:mt-5 sm:gap-x-4",children:[r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(js,{className:"h-3 w-3 text-emerald-500"}),"SOC 2 Certified"]}),r.jsx("span",{className:"hidden h-3 w-px bg-[#e5e7eb] sm:block","aria-hidden":!0}),r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(js,{className:"h-3 w-3 text-emerald-500"}),"Bank-grade encryption"]}),r.jsx("span",{className:"hidden h-3 w-px bg-[#e5e7eb] sm:block","aria-hidden":!0}),r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(js,{className:"h-3 w-3 text-emerald-500"}),"Free to start"]})]})]})}function Dl({className:e="h-5 w-5"}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 21h18M12 3l9 4.5v1.5H3V7.5L12 3z"})})}function js({className:e="h-3 w-3"}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 16 16",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.5 8.5l3 3 6-6"})})}function Vf(){return r.jsx("svg",{className:"h-4 w-4 sm:h-[18px] sm:w-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})}function uo(){const e=Pe(),t=()=>{e("/create-entity/form",{state:{from:"/create-entity"}})};return r.jsx("div",{className:"flex items-center justify-center bg-transparent px-0 py-0",children:r.jsx(qf,{onCreateClick:t})})}function Wu({open:e,onClose:t,enabledPayments:n,onSelectFederal:s,onSelectState:a}){return x.useEffect(()=>{if(!e)return;const i=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",i),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=""}},[e,t]),e?un.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:t}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"add-first-payment-title",className:"relative z-10 max-h-[90vh] w-full max-w-4xl overflow-y-auto rounded-2xl bg-white p-6 shadow-xl sm:p-8",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,className:"absolute right-4 top-4 rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(Yf,{})}),r.jsx("h2",{id:"add-first-payment-title",className:"text-lg font-semibold text-slate-900",children:"Add Your First Payment"}),r.jsxs("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[n.includes("federal")?r.jsx(Ba,{icon:r.jsx(Zf,{}),title:"Federal Payment",description:"Make payments for federal tax obligations, including income tax and estimated tax.",actionLabel:"Federal Tax Payment",variant:"primary",onSelect:s}):null,n.includes("state")?r.jsx(Ba,{icon:r.jsx(Uf,{}),title:"State Payment",description:"Pay state tax obligations, including withholding, income, and estimated taxes.",actionLabel:"State Tax Payment",variant:"outline",onSelect:a}):null,r.jsx(Ba,{icon:r.jsx(Bf,{}),title:"Local Payment",description:"Pay municipal and county taxes based on your local jurisdiction.",actionLabel:"Local Tax Payment",variant:"disabled",comingSoon:!0})]})]})]}),document.body):null}function Ba({icon:e,title:t,description:n,actionLabel:s,variant:a,comingSoon:i=!1,onSelect:o}){const l=a==="primary"?"bg-gov-700 text-white shadow-sm hover:bg-gov-700":a==="outline"?"border border-gov-500 bg-white text-gov-700 hover:bg-gov-50":"cursor-not-allowed border border-gov-200 bg-white text-slate-300";return r.jsxs("div",{className:"relative flex flex-col rounded-xl border border-slate-200 p-5 text-center",children:[i?r.jsx("span",{className:"absolute -top-2.5 right-4 inline-flex items-center rounded-full bg-gov-100 px-2.5 py-0.5 text-[11px] font-semibold text-gov-600",children:"Coming Soon"}):null,r.jsx("span",{className:"mx-auto flex h-[104px] w-[104px] items-center justify-center rounded-2xl bg-gov-50 text-gov-600",children:e}),r.jsx("h3",{className:"mt-5 text-sm font-bold text-slate-900",children:t}),r.jsx("p",{className:"mt-2 flex-1 text-xs leading-relaxed text-slate-500",children:n}),r.jsx("button",{type:"button",onClick:o,disabled:a==="disabled",className:`mt-5 inline-flex h-11 w-full items-center justify-center rounded-lg px-4 text-sm font-semibold transition ${l}`,children:s})]})}function Zf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M62.0432 6.53906C62.2466 6.58126 62.4611 6.61019 62.622 6.75213C62.9915 7.07829 62.8142 11.1504 62.8097 11.9086C64.8335 12.4737 65.2559 13.3107 65.5546 15.2975C65.9278 15.3554 66.3978 15.2472 66.6622 15.5573C67.1866 16.1729 66.3725 16.5641 66.3546 16.6859C66.1661 17.987 66.2421 20.6145 66.2436 21.8325C69.1665 22.4843 71.8413 23.9686 73.9486 26.1082C77.6864 29.8757 78.8394 34.2964 78.8156 39.4295C81.597 40.1678 81.3832 41.2697 81.3407 43.759C82.461 44.2702 83.0852 44.9927 81.9076 45.948L81.8927 54.2555C82.9094 54.3688 86.204 54.6451 87.0316 55.3779C87.3936 55.6986 87.2387 56.9965 87.2632 57.5347C87.2982 58.2777 87.1686 58.5558 86.6539 59.0725L86.6517 64.9197L101.774 64.9275C104.115 64.9269 106.453 64.9142 108.797 64.9374C109.925 64.9484 110.126 65.0763 110.148 66.2891C110.159 66.8192 110.157 67.4111 110.142 67.9405C110.102 69.3077 110.305 69.6929 108.803 69.7327C108.685 75.0298 108.796 80.7968 108.786 86.1277C109.628 86.5466 110.234 86.8704 111.002 87.4235C113.519 89.2401 115.214 91.9891 115.715 95.0641C116.278 98.5708 115.592 102.056 113.492 104.941C111.577 107.523 108.729 109.24 105.564 109.721C102.062 110.261 98.9518 109.338 96.1362 107.243L67.9151 107.258L33.0921 107.259C28.416 107.317 23.7395 107.333 19.0631 107.307C18.0288 107.308 12.6089 107.405 12.134 107.166C11.5865 106.556 11.7691 105.32 11.7565 104.537C11.7235 102.48 12.4007 102.739 13.9282 102.76C13.8415 101.892 13.9105 100.959 13.901 100.088C13.8849 98.6083 14.1926 98.4764 15.5226 98.5686C15.3898 89.0505 15.498 79.2604 15.5031 69.7319C14.9199 69.7222 14.2733 69.7559 14.2175 68.9622C14.1741 68.3469 14.189 67.7038 14.1921 67.0865C14.1952 66.4781 14.1094 65.6334 14.5032 65.1354C14.6292 64.9764 15.3336 64.9422 15.5469 64.9406C18.3443 64.9184 21.1429 64.9275 23.9404 64.9291L37.6786 64.9371L37.6979 59.0793C37.3965 58.842 37.0909 58.5219 37.0614 58.1598C37.0201 57.6549 36.9293 55.7092 37.2514 55.4017C38.0358 54.6529 41.3929 54.3956 42.4073 54.2731L42.3921 45.9165C41.1657 45.2012 41.9615 44.2519 42.9468 43.8167C42.9238 41.3094 42.7104 40.2809 45.4592 39.4412C45.4697 35.6803 45.9025 33.056 47.8274 29.716C50.0718 25.8492 53.7602 23.0461 58.0708 21.9315C58.0686 21.1723 58.1162 17.2145 58.0205 16.7113C57.8462 16.5749 57.5924 16.4164 57.529 16.1864C57.2377 15.1286 58.692 15.3846 58.7547 15.2625C59.0438 14.6989 58.892 13.9227 59.373 13.259C59.9448 12.4698 60.5267 12.1681 61.4779 11.9447C61.4816 10.4876 61.3535 8.4722 61.5591 7.02733C61.5948 6.77477 61.8317 6.65283 62.0432 6.53906ZM16.7834 98.5746C18.2815 98.4209 21.4252 98.5214 23.0207 98.5229L35.0265 98.5289C35.2595 98.1474 35.4334 97.7299 35.8696 97.6632C36.3869 97.5845 37.0094 97.6145 37.5361 97.6205C37.801 96.3337 37.0673 95.3924 38.7427 94.8221L38.7325 75.5012C37.5453 74.9751 37.6879 74.2976 37.6989 73.1367C37.3951 72.9748 37.127 72.8286 37.0363 72.4637C36.8502 71.7157 36.9645 70.6762 36.9549 69.8803C35.0672 69.6105 32.5473 69.7109 30.593 69.7124L20.9921 69.7192C19.6586 69.7184 18.0932 69.7716 16.7796 69.7259C16.7659 79.2859 16.6867 89.0273 16.7834 98.5746ZM87.328 69.8668C87.3251 71.0427 87.6878 72.4479 86.6353 73.1187C86.6189 74.3343 86.7336 74.8941 85.5731 75.4952C85.4264 81.8371 85.585 88.472 85.5463 94.8475C86.1243 94.9839 86.2241 95.0686 86.6174 95.5221C86.7649 96.2183 86.7321 96.9115 86.7329 97.6258C88.5027 97.6018 89.3474 97.4969 89.1962 99.6081C89.1582 100.137 89.1701 100.91 89.1798 101.442C90.1154 101.422 91.1664 101.398 92.1005 101.431C91.3474 99.0392 91.1999 96.7556 91.8398 94.3049C91.5828 94.2562 91.2297 94.2225 91.0904 93.9624C90.8617 93.533 90.9049 87.8184 91.1187 87.341C91.1373 87.2991 91.1582 87.2578 91.1776 87.2159C91.9686 86.4357 93.4174 86.6635 94.4699 86.7595C95.2409 87.2908 95.3019 87.5569 95.22 88.4899C98.2181 85.376 103.431 84.2818 107.483 85.6608C107.385 81.0621 107.531 76.4208 107.475 71.8184C107.467 71.1311 107.461 70.4012 107.481 69.7147L94.2457 69.7192L90.5616 69.7102C90.1504 69.7087 88.9109 69.6877 88.5586 69.7387C88.1616 69.7814 87.7228 69.8376 87.328 69.8668ZM104.779 108.418C110.812 107.807 115.205 102.384 114.583 96.3157C113.961 90.2474 108.56 85.8406 102.531 86.4814C96.522 87.1207 92.1608 92.531 92.7805 98.5783C93.4003 104.625 98.7679 109.026 104.779 108.418ZM43.6248 54.1264C50.5823 53.2332 58.6456 53.1748 65.6618 53.2251C70.6741 53.3448 75.6908 53.4686 80.6726 54.1055L80.6607 48.393C80.6599 47.516 80.6294 46.5066 80.7113 45.6316C80.7322 45.4036 80.8864 45.2348 81.0398 45.0778C75.086 42.8305 65.3058 42.3267 58.9736 42.6119C54.3156 42.8247 49.609 43.2238 45.0988 44.4781C44.6703 44.5972 43.6004 44.8336 43.3477 45.1639C43.4128 45.2466 43.6008 45.483 43.603 45.5788C43.6691 48.4164 43.569 51.2896 43.6248 54.1264ZM36.6599 68.6062C39.1965 68.3949 43.2791 68.523 45.9332 68.5208L62.4589 68.5335L79.2499 68.5245L84.0908 68.5193C85.1724 68.5178 86.5102 68.4691 87.5619 68.628C85.7303 67.5921 62.5051 56.6228 62.1021 56.5825L43.6613 65.2987C41.3396 66.3908 38.9866 67.5523 36.6599 68.6062ZM32.9001 105.917L70.9572 105.904L84.5333 105.897C86.6554 105.897 89.331 105.83 91.4092 105.915L91.4234 102.682L32.9265 102.685C32.9295 103.614 32.9735 105.027 32.9001 105.917ZM87.924 101.43C87.9284 100.695 87.9023 99.5781 87.9493 98.8736L54.7343 98.8818C48.674 98.8826 42.4058 98.9643 36.3645 98.8803C36.3647 99.7242 36.3517 100.619 36.3725 101.458C38.0079 101.334 40.8965 101.425 42.6011 101.425L54.7259 101.426L76.6294 101.425C80.3575 101.426 84.2085 101.372 87.924 101.43ZM38.3037 56.1781L38.2823 57.9352L51.9697 57.881C52.7891 57.8715 55.7672 57.968 56.3477 57.796C58.0633 57.2873 60.3881 55.7614 62.1416 55.2056C63.0145 55.4373 64.3978 56.1823 65.2924 56.5636C65.8898 56.8573 67.6939 57.7969 68.216 57.8509C69.5449 57.9885 71.2491 57.8701 72.6227 57.8762L80.8707 57.9029C82.5176 57.9005 84.4215 57.8466 86.0446 57.9221L86.0558 56.1713C79.7013 55.0049 73.0994 54.6403 66.6414 54.5212C63.8771 54.4701 60.5915 54.4148 57.8282 54.5287C51.1466 54.713 44.8868 54.9854 38.3037 56.1781ZM69.5106 75.4772C68.3173 74.9736 68.4596 74.2346 68.5021 73.1022L66.0961 73.0977C66.1177 74.4677 66.2272 74.8072 65.028 75.5641C65.0026 81.9045 65.1456 88.5327 65.0131 94.8498C66.5207 95.2897 66.254 96.3277 66.2384 97.6512C66.7739 97.607 67.8011 97.5913 68.3374 97.6512C68.3069 96.3472 68.044 95.3137 69.5166 94.8273L69.5106 75.4772ZM75.3281 75.5094V94.8423C75.8488 94.9914 76.0201 95.1241 76.397 95.5191C76.546 96.324 76.5043 96.8396 76.5095 97.6505C77.1694 97.6377 77.915 97.607 78.5683 97.6333L78.5743 97.5711C78.6852 96.243 78.2137 95.274 79.7973 94.8303L79.8026 75.4944C78.5795 75.0508 78.7247 74.2361 78.7493 73.1029C77.9709 73.0955 77.2335 73.0894 76.4543 73.1149C76.064 73.8172 76.9393 74.7173 75.3281 75.5094ZM44.5554 75.5079L44.5569 94.8663C45.9879 95.1586 45.6907 96.5106 45.697 97.6407C46.3801 97.64 47.0633 97.631 47.7462 97.6138L47.7973 97.5591C47.7657 96.3172 47.5252 95.2403 48.9863 94.8468L48.9745 82.3609C48.9744 80.2212 48.9096 77.6259 48.9977 75.5154C47.7868 74.9796 47.9065 74.3171 47.9225 73.1194C47.1418 73.0992 46.3608 73.0917 45.5798 73.0984C45.5861 74.2548 45.7113 74.9511 44.5554 75.5079ZM65.0421 16.6271C63.5263 16.5805 61.7684 16.5984 60.235 16.6092L59.3209 16.6404C59.3053 18.3011 59.3028 19.9619 59.3135 21.6226L60.242 21.5044C60.233 20.7063 60.1013 18.1639 60.3896 17.5984C60.5922 17.4419 60.479 17.4792 60.7486 17.5013C60.9907 17.6615 60.993 17.6128 61.0734 17.9151C61.2306 18.5069 61.0079 21.0447 61.1449 21.4415C61.4071 21.448 61.5181 21.471 61.7624 21.3685C61.8436 20.4347 61.5315 17.9735 62.0589 17.4959C62.3121 17.4637 62.1892 17.4477 62.4365 17.5753C62.701 17.9478 62.6332 18.388 62.6257 18.8562C62.625 19.5139 62.362 21.3632 63.0265 21.5133C63.8093 21.2058 62.5654 17.7399 63.7572 17.4973C64.3926 17.9089 64.0946 20.639 64.1535 21.5045C64.435 21.5286 64.7322 21.5487 65.0116 21.5845C65.0555 19.9669 64.9676 18.1876 65.0421 16.6271ZM79.8003 97.6438C81.6417 97.577 83.5322 97.652 85.3914 97.6145L85.5038 97.5448C85.5426 96.9902 85.5307 96.6545 85.5024 96.0954C83.7206 96.0774 81.6052 96.0347 79.8376 96.0946C79.7728 96.6215 79.7929 97.1146 79.8003 97.6438ZM54.7685 75.5199L54.7751 87.6266C54.7744 89.9776 54.8167 92.4755 54.7635 94.8161C55.3936 95.0521 55.5115 95.0956 55.9022 95.6652L55.9427 95.7229C55.9558 96.3202 55.9917 97.0577 55.9665 97.6438C56.6681 97.6288 57.37 97.6243 58.0717 97.631C58.0497 96.4281 57.7828 95.202 59.2348 94.8558L59.2365 81.6962C59.2355 80.2347 59.3378 76.8869 59.1968 75.5611L59.1097 75.5004C58.1062 74.7862 58.1852 74.2129 58.2038 73.0954C57.4112 73.0924 56.604 73.0805 55.813 73.1074C55.8606 74.3043 55.9631 74.9421 54.7685 75.5199ZM94.7306 105.963L94.6673 105.87C94.2904 105.32 93.8777 104.919 93.4547 104.243C93.2141 103.858 92.8081 103.097 92.6062 102.807C92.6256 103.825 92.6018 104.984 92.6457 105.977C93.2722 105.921 94.1087 105.889 94.7306 105.963ZM38.2222 71.8708L86.058 71.8379C86.061 71.293 86.0402 70.3712 86.0997 69.8586C81.4093 69.7431 76.3218 69.8481 71.6015 69.8451L38.2265 69.8406L38.2222 71.8708ZM54.1161 97.6198C54.4915 97.6303 54.4841 97.6977 54.6987 97.5171C54.859 97.1124 54.7461 96.5713 54.7234 96.1074C52.8804 96.0587 50.9371 96.0901 49.0845 96.0946C48.9791 96.5376 49.0154 97.1761 49.025 97.6475C50.6851 97.5853 52.4462 97.6318 54.1161 97.6198ZM35.1528 99.8344L21.6774 99.8336C19.5465 99.8336 17.2692 99.8734 15.1517 99.8284L15.1581 102.769C20.5054 102.7 26.3782 102.676 31.7193 102.763C31.7349 101.192 32.5821 101.419 33.8184 101.424L35.1364 101.423C35.1268 100.916 35.1145 100.34 35.1528 99.8344ZM69.6693 73.0969C69.676 73.4619 69.673 73.9138 69.6961 74.2713C70.4663 74.2818 74.5624 74.3478 75.156 74.2234C75.1702 73.8501 75.1821 73.4769 75.191 73.1037L69.6693 73.0969ZM75.2648 96.0939C73.4078 96.0901 71.4525 96.0594 69.603 96.1036C69.5866 96.6327 69.5702 97.1304 69.5799 97.6595C71.2767 97.5778 73.3594 97.6235 75.0845 97.6228L75.2462 97.58C75.34 97.2398 75.2819 96.4821 75.2648 96.0939ZM59.2731 97.6468C61.1174 97.616 62.9617 97.6063 64.806 97.616L64.9386 97.607C65.0347 97.2968 64.9877 96.4551 64.9825 96.0931C63.0913 96.0849 61.2008 96.0856 59.3099 96.0969C59.2831 96.6125 59.2709 97.1296 59.2731 97.6468ZM38.7843 97.6348L44.1399 97.6258L44.4019 97.6138C44.6172 97.299 44.4965 96.5068 44.484 96.0961C42.7436 96.0849 40.5467 96.0249 38.8339 96.1006C38.7788 96.6747 38.7773 97.0539 38.7843 97.6348ZM60.1003 15.3022L62.7099 15.2906C63.209 15.2976 63.7497 15.2949 64.2443 15.3225C64.114 13.7292 63.3609 13.0171 61.7237 13.1393C60.4998 13.623 60.2637 13.9897 60.1003 15.3022ZM79.9255 73.0939C79.9299 73.4672 79.9255 73.9011 79.9419 74.2698C80.6748 74.2893 84.8968 74.344 85.3973 74.2339C85.4212 73.8569 85.4383 73.4792 85.4487 73.1007C83.6834 73.0977 81.6692 73.1442 79.9255 73.0939ZM38.8797 73.0992L38.9125 74.2781C39.7431 74.2893 43.7674 74.3455 44.3912 74.2331L44.4054 73.1149C42.5644 73.0707 40.7218 73.1112 38.8797 73.0992ZM94.0193 89.788L94.0148 87.9968C93.3601 87.9091 92.8424 87.9278 92.1861 87.9368C92.1913 89.6898 92.1422 91.547 92.1645 93.2774C92.3373 92.8255 92.5437 92.2387 92.7426 91.8115C93.1269 91.101 93.5209 90.425 94.0193 89.788ZM59.384 73.0925C59.3917 73.4664 59.3891 73.8959 59.4182 74.2646C60.1078 74.2983 64.3442 74.3403 64.8857 74.2369L64.9378 73.1074C63.0816 73.0565 61.2283 73.1239 59.384 73.0925ZM13.0432 104.041C13.041 104.704 13.0489 105.391 13.0353 106.05C19.1618 105.89 25.5959 106.188 31.6982 105.993C31.6953 105.465 31.681 104.563 31.7505 104.046L13.0432 104.041ZM61.6075 37.6299C61.6075 36.3081 61.6581 22.8896 61.5471 22.7515L61.4913 22.7553C60.7345 22.7933 60.3373 22.7003 59.8064 23.3011C56.4124 27.1418 55.2031 32.6316 54.9825 37.6455C54.9898 37.7162 54.9971 37.787 55.0043 37.8577L55.1005 37.8815C57.3006 37.7598 59.3904 37.6126 61.6075 37.6299ZM54.6532 73.1082C52.8037 73.0924 50.9542 73.0902 49.1047 73.1014C49.1105 73.4709 49.1077 73.9019 49.126 74.2653C50.1049 74.3103 53.7297 74.3515 54.6227 74.2414L54.6532 73.1082ZM46.8264 39.0743C48.8918 38.6171 51.7836 38.1072 53.893 37.995C53.9769 33.2546 55.0536 28.406 57.6383 24.3756C57.777 24.1592 58.3839 23.4496 58.3716 23.2834L58.3367 23.2574C54.2039 24.4634 50.8821 27.0387 48.7888 30.8481C47.4365 33.3392 46.74 36.137 46.7653 38.9753L46.8264 39.0743ZM58.892 38.9385C56.4888 39.0517 45.9402 39.6585 44.4265 41.3883C44.0371 41.8333 44.1796 42.8869 44.1895 43.4545C50.9324 41.4509 58.1291 41.1957 65.1121 41.3096C69.606 41.4781 75.8219 41.9997 80.0923 43.4195C80.108 42.835 80.2316 41.6938 79.8309 41.319C79.1731 40.7037 77.6812 40.3734 76.8052 40.1928C71.2871 39.0553 64.9952 38.7427 59.3851 38.921L58.892 38.9385ZM39.9609 75.4974C40.0234 76.3383 39.9756 77.5509 39.974 78.4285L39.9685 83.8598L39.9769 91.7373C39.9752 92.6981 40.0181 93.9242 39.9825 94.8565C40.8955 94.8663 41.9316 94.9015 42.8318 94.8468L43.2057 94.8453C43.3544 94.601 43.2963 90.7263 43.2963 90.1455L43.3036 75.5064C42.2219 75.5072 41.0342 75.5319 39.9609 75.4974ZM63.9978 22.8214L62.6674 22.7111C62.7658 24.5464 62.7017 26.8503 62.7002 28.7315C62.7114 31.6956 62.7017 34.6597 62.6719 37.6236C64.549 37.6374 66.9937 37.649 68.8521 37.862L69.2246 37.86C69.4972 37.5742 69.2872 36.1484 69.2372 35.6631C68.7724 31.1188 67.4198 26.0229 63.9978 22.8214ZM15.4745 66.2263C15.4722 66.9795 15.4651 67.7329 15.4532 68.4863C16.9429 68.3754 19.4435 68.4533 20.9953 68.4541L31.319 68.4533C31.8763 68.4533 35.166 68.4983 35.5051 68.3739C35.6768 67.8279 35.6377 67.745 36.1311 67.4844C36.2964 67.3953 36.4651 67.3127 36.6368 67.2368C37.0012 67.0616 37.7816 66.7603 37.9249 66.4046C37.7425 66.2063 37.2057 66.2154 36.9303 66.2137C34.3069 66.1968 31.6778 66.2114 29.0548 66.2122L15.4745 66.2263ZM86.8379 66.2152C86.5005 66.2318 86.1452 66.2556 85.8092 66.2613C86.6346 66.78 87.5225 67.0693 88.35 67.5662C88.5876 67.7087 88.5511 68.1648 88.905 68.4076C89.626 68.4938 90.6964 68.4563 91.4591 68.4548L95.6185 68.4481C99.8159 68.4451 104.158 68.5051 108.343 68.4369C108.609 68.4309 108.702 68.4788 108.879 68.3522C108.927 67.6371 108.912 66.9169 108.909 66.1997L94.1578 66.2128C91.8658 66.212 89.1038 66.141 86.8379 66.2152ZM70.7717 59.1653C71.4406 59.5909 72.5385 59.9966 73.2968 60.3473C74.6071 60.9539 75.9165 61.6249 77.238 62.1994C79.956 63.3809 82.6383 64.901 85.3489 66.0644L85.4465 66.0409L85.4361 65.9054L85.4331 59.1817C81.1143 59.0916 76.7538 59.2255 72.4305 59.1693C71.9143 59.1626 71.2782 59.1336 70.7717 59.1653ZM81.013 94.8326C82.1653 94.8828 83.1836 94.8618 84.3336 94.855C84.2212 88.5162 84.3269 81.8625 84.3299 75.4967C83.2201 75.5072 82.1102 75.5087 80.9996 75.4997C81.0875 81.915 80.9221 88.4112 81.013 94.8326ZM38.8911 59.1642C38.9069 61.1404 38.9848 64.2007 38.8752 66.1331C42.1732 64.643 45.5342 62.8866 48.8317 61.4457C50.4686 60.6642 52.111 59.8943 53.7586 59.136C52.0693 59.2322 49.8665 59.1694 48.1373 59.166L38.8911 59.1642ZM70.7732 94.8805C71.7713 94.8206 72.7404 94.9053 73.7437 94.8445L74.032 94.84C74.213 94.4886 73.9583 77.6139 74.1125 75.5177L70.7225 75.5132C70.8253 76.5519 70.7359 77.7668 70.7486 78.8295C70.8112 84.1626 70.648 89.5534 70.7732 94.8805ZM60.4842 75.5042C60.5058 81.8633 60.3673 88.5274 60.5043 94.8655C61.6052 94.8528 62.7062 94.849 63.8078 94.8535L63.7944 81.7306L63.7937 77.7615C63.7937 77.102 63.7669 76.1367 63.8317 75.5162C62.7159 75.5244 61.6 75.5207 60.4842 75.5042ZM70.4834 37.9848C72.5937 38.1166 75.5121 38.5663 77.5486 39.088C77.5262 31.4815 73.445 24.9184 65.8257 23.1409C69.0354 27.0752 70.3821 32.9788 70.4834 37.9848ZM50.2212 75.5027C50.2198 81.9232 50.1563 88.4555 50.2282 94.867C51.3146 94.8355 52.4407 94.8603 53.5335 94.8535C53.6273 93.0151 53.5442 90.4445 53.543 88.5529L53.5589 75.5192C52.4463 75.5222 51.3337 75.5169 50.2212 75.5027Z",fill:"#013A9A"}),r.jsx("path",{d:"M20.8306 87.3741C21.7975 87.3931 22.9716 87.2834 23.7808 87.6627C24.0167 87.9389 24.1978 88.3692 24.2019 88.7133C24.2189 90.3084 24.2811 91.9224 24.1834 93.5143C24.1531 94.0079 23.337 93.9863 22.8942 93.989C22.0866 93.989 20.4435 94.1417 19.7401 93.9171C19.5898 93.8695 19.5357 93.7957 19.4778 93.684C19.1935 93.1343 19.1211 88.377 19.4804 87.9422C19.7993 87.5563 20.271 87.4525 20.8306 87.3741ZM20.7075 92.9149C21.4023 92.9077 22.0971 92.9038 22.792 92.9038C22.7912 91.4452 22.7685 89.9467 22.7949 88.4913C22.0999 88.4789 21.4046 88.4763 20.7095 88.4828L20.7075 92.9149Z",fill:"#013A9A"}),r.jsx("path",{d:"M20.3361 74.9483C21.2571 74.8873 22.6797 74.7512 23.5021 75.1234C23.805 75.261 23.9175 75.4361 24.0125 75.7134C24.2485 76.4042 24.377 81.6982 23.9934 82.1212C23.7865 82.35 23.406 82.3338 23.1049 82.339C22.4202 82.3456 19.8439 82.5082 19.4548 82.0594C19.1169 81.1575 19.2481 76.9531 19.3475 75.7392C19.3736 75.4228 19.9875 75.0962 20.3361 74.9483ZM20.6722 76.1541C20.671 76.9715 20.6027 80.4395 20.7189 81.0596C21.1142 81.1472 21.2323 81.1295 21.6502 81.1229L22.7457 81.12L22.7582 76.1556L22.1168 76.1497L20.6722 76.1541Z",fill:"#013A9A"}),r.jsx("path",{d:"M28.4596 74.9508C29.2074 74.8807 30.3356 74.7746 31.0301 75.0679C31.2627 75.166 31.4269 75.2692 31.5163 75.5213C31.6171 75.805 31.6607 76.1095 31.6822 76.4094C31.7337 77.1281 31.8113 81.6951 31.5777 82.0762C31.4349 82.3084 31.2117 82.3334 30.9725 82.3585C30.0372 82.3474 29.1034 82.4211 28.1771 82.3142C27.5629 82.3002 27.5735 81.3243 27.5815 80.8062C27.6073 79.1499 27.5021 77.4023 27.6581 75.7527C27.6923 75.3915 28.1896 75.1041 28.4596 74.9508ZM28.7652 81.143L30.5236 81.1371C30.4975 79.4802 30.4921 77.8224 30.5073 76.1655C29.8668 76.1271 29.4257 76.119 28.785 76.1426C28.7912 77.7509 28.8134 79.5406 28.7652 81.143Z",fill:"#013A9A"}),r.jsx("path",{d:"M28.4275 87.4501C29.1907 87.3828 30.2533 87.2867 30.9787 87.5266C31.2033 87.6005 31.4083 87.7019 31.5012 87.9124C31.6095 88.1576 31.6603 88.442 31.6822 88.7054C31.735 89.3383 31.8103 93.4127 31.5762 93.7566C31.4369 93.9619 31.2128 93.9848 30.9776 94.0109C30.0962 94.0005 29.1777 94.0874 28.303 94.0011C28.1437 93.9854 27.9503 93.9613 27.8498 93.839C27.4879 93.3983 27.5292 88.8891 27.685 88.1863C27.7677 87.813 28.1023 87.6397 28.4275 87.4501ZM28.7681 92.9185L30.5109 92.9191C30.5234 91.4455 30.5236 89.9718 30.5113 88.4988C29.9408 88.4858 29.3702 88.4792 28.7995 88.4792C28.8021 89.9404 28.8265 91.4618 28.7681 92.9185Z",fill:"#013A9A"}),r.jsx("path",{d:"M90.9327 74.9628C91.5906 74.8965 93.0511 74.7432 93.6054 75.1028C93.8658 75.2715 94.092 75.5876 94.1455 75.9022C94.2632 76.5984 94.3061 81.8301 94.0342 82.141C93.8837 82.3134 93.706 82.3289 93.4984 82.3502C92.5566 82.3443 91.6341 82.421 90.6959 82.3222C90.0859 82.3274 90.0744 81.4507 90.0823 80.9217C90.1087 79.2212 89.9988 77.4294 90.1629 75.7349C90.1972 75.3835 90.6673 75.1124 90.9327 74.9628ZM91.2388 81.1523L93.0118 81.1471L93.0104 76.1342C92.4439 76.1504 91.8981 76.1696 91.3309 76.1541C91.1604 76.899 91.2403 80.1812 91.2388 81.1523Z",fill:"#013A9A"}),r.jsx("path",{d:"M99.2878 74.9366C103.274 74.6226 102.448 75.3933 102.543 79.0362C102.561 79.7146 102.649 81.703 102.37 82.1612C102.153 82.3467 102.102 82.3304 101.824 82.3511C101.083 82.3481 100.34 82.3814 99.5995 82.371C99.3788 82.3681 98.7948 82.3555 98.6544 82.1604C98.3413 81.7267 98.3542 76.4965 98.5147 75.7746C98.6057 75.3637 98.9604 75.1383 99.2878 74.9366ZM99.6482 76.1544C99.6461 76.7367 99.5701 80.9811 99.7371 81.1614L100.069 81.1415L101.386 81.1355C101.384 80.3944 101.468 76.6561 101.339 76.1817C101.119 76.1418 101.083 76.1359 100.861 76.1381L99.6482 76.1544Z",fill:"#013A9A"}),r.jsx("path",{d:"M102.278 89.0396C103.503 89.0106 103.266 90.1429 103.257 91.0539C104.795 91.3165 105.793 91.9213 106.431 93.4064C106.491 93.6309 106.608 94.3165 106.398 94.499C104.836 95.8589 105.072 93.5957 104.206 93.0903C103.405 92.6214 102.795 92.4603 102.026 92.6115C100.94 92.8246 99.974 93.6782 100.234 94.8556C100.512 96.0155 102.045 96.2796 103.03 96.5293C104.573 96.905 106.382 97.4891 106.673 99.3361C107.069 101.86 105.592 103.323 103.278 103.69C103.251 104.608 103.555 105.429 102.474 105.706C101.491 105.463 101.708 104.544 101.731 103.724C100.279 103.355 99.1292 102.861 98.5047 101.324C98.2889 100.793 98.4006 99.6087 99.0176 99.5454C100.154 99.4285 99.9672 101.352 101.033 101.822C101.849 102.299 102.562 102.146 103.431 102.019C104.418 101.873 105.401 100.707 105.016 99.6881C104.366 97.9663 101.418 98.2183 100.058 97.2723C99.4234 96.8806 98.7415 96.2086 98.611 95.4069C98.206 92.9162 99.4732 91.541 101.732 91.0867C101.699 90.1529 101.499 89.6375 102.278 89.0396Z",fill:"#013A9A"}),r.jsx("path",{d:"M60.9254 44.886C61.4512 44.8298 62.2251 44.942 62.3545 45.5221C62.5741 46.5069 62.6877 51.5463 62.3914 52.1598C62.1928 52.3478 62.1123 52.3279 61.8453 52.35C61.2895 52.3631 60.6644 52.4563 60.2109 52.1433C60.0063 51.5611 60.056 46.6424 60.1658 45.6788C60.2049 45.3376 60.6539 45.0531 60.9254 44.886Z",fill:"#013A9A"}),r.jsx("path",{d:"M67.3348 44.8801C67.6645 44.8336 68.2433 45.0121 68.2778 45.556C68.3617 46.874 68.5073 51.0847 68.2896 52.1737C68.1538 52.3612 68.0478 52.3403 67.8642 52.3654C67.5421 52.3686 67.1053 52.4303 66.8491 52.1404C66.6824 51.4851 66.7313 46.6823 66.8064 45.6716C66.8321 45.3212 67.1418 45.0431 67.3348 44.8801Z",fill:"#013A9A"}),r.jsx("path",{d:"M53.9908 44.8915C54.5286 44.8239 54.6418 44.9216 55.0108 45.5312C55.0789 46.3005 55.1103 51.4813 54.9844 52.1049C54.8192 52.3305 54.9148 52.2512 54.6742 52.3072C54.2691 52.3289 53.8481 52.5041 53.5216 52.1745C53.3422 51.4406 53.4014 46.7016 53.4777 45.6709C53.5017 45.3469 53.8154 45.0536 53.9908 44.8915Z",fill:"#013A9A"}),r.jsx("path",{d:"M72.3236 44.8736C72.6871 44.8665 73.0882 44.9261 73.402 45.0689C73.7655 45.2328 74.0196 45.5052 74.0992 45.8179C74.3467 46.8242 74.1997 50.8448 74.1268 52.0773C74.0683 52.1386 74.0097 52.1999 73.9522 52.2611C73.6208 52.3809 73.6462 52.3853 73.2827 52.3618C72.5788 52.3498 71.7214 52.3902 71.1292 52.1256C70.8076 51.5687 70.8596 46.5136 71.0993 45.6101C71.1833 45.2929 71.938 45.0138 72.3236 44.8736Z",fill:"#013A9A"}),r.jsx("path",{d:"M49.5105 44.873C49.9458 44.8977 50.6954 45.1421 50.7428 45.6087C50.8483 46.6455 51.0578 51.5059 50.7166 52.1254C50.4794 52.3155 50.3242 52.2983 50.0205 52.3295C49.5244 52.3598 48.9619 52.463 48.5608 52.1812C48.3574 51.6724 48.3453 46.444 48.5608 45.5411C48.6379 45.2182 49.1776 44.9829 49.5105 44.873Z",fill:"#013A9A"}),r.jsx("path",{d:"M76.4545 45.707C76.5542 45.7088 76.6547 45.7101 76.7535 45.7185C77.0093 45.7401 77.1583 45.8213 77.3109 46.0251C77.6196 46.4387 77.6214 51.9402 77.4794 52.6615C77.4238 52.9433 77.2077 53.048 76.9978 53.207C76.6459 53.2042 76.3592 53.1725 76.092 52.942C75.7806 52.3349 75.9456 47.3526 75.9615 46.3145C75.965 46.0463 76.2419 45.8666 76.4545 45.707Z",fill:"#013A9A"}),r.jsx("path",{d:"M45.3396 45.7089C45.5469 45.7031 45.6525 45.6918 45.8052 46.0079C45.9712 46.7423 45.8785 51.4627 45.8732 52.5756C45.8719 52.8485 45.7334 53.0364 45.6247 53.2061C45.4317 53.2111 45.3268 53.2036 45.1703 52.9886C45.0059 52.5357 45.0931 47.523 45.097 46.6304C45.099 46.1682 45.1695 45.9878 45.3396 45.7089Z",fill:"#013A9A"}),r.jsx("path",{d:"M61.9591 59.8796C63.5655 59.7724 64.9544 60.986 65.0635 62.5916C65.1733 64.1972 63.961 65.5879 62.3559 65.6993C60.7475 65.8109 59.3534 64.5963 59.2439 62.9878C59.1344 61.3793 60.3507 59.9871 61.9591 59.8796ZM62.4875 64.5283C63.4401 64.3398 64.0619 63.4163 63.8771 62.4624C63.693 61.5084 62.7719 60.8832 61.8173 61.0636C60.8566 61.2451 60.2268 62.1727 60.4124 63.1323C60.5982 64.092 61.5282 64.718 62.4875 64.5283Z",fill:"#013A9A"})]})}function Uf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M61.0831 6.26953C62.455 6.44182 62.1158 7.58499 62.0885 8.70912C66.4975 7.61502 68.0582 10.3258 72.1763 10.2735C73.0545 10.2623 74.793 9.48525 75.3881 9.90135C75.6151 10.5948 75.5347 16.2794 75.5012 17.2984C74.325 19.1281 70.8184 19.0327 69.0331 18.3712C66.0467 17.2643 65.3143 16.6419 62.0932 17.2538L62.0877 22.973C68.1065 23.323 72.9898 26.8237 75.4918 32.266C76.6212 34.7233 76.9215 37.1336 76.8653 39.8088C78.511 39.7984 79.7316 39.545 79.3214 41.8538C79.1638 42.7377 78.8214 43.1113 78.1039 43.5994C78.2341 45.8748 78.132 49.0067 78.1296 51.3618C78.7754 51.346 79.794 51.2619 80.3556 51.488C80.8313 51.967 80.6972 53.7277 80.6956 54.4092L80.7104 57.6615C83.4215 58.8859 86.1389 60.3934 88.8765 61.5806C89.4349 61.8228 89.6221 62.5434 89.9583 62.5891C90.8178 62.7056 91.9565 62.6635 92.8261 62.6619L98.5065 62.6639C100.306 62.6557 102.331 62.5535 104.121 62.7751C105.302 62.9213 104.851 66.7807 104.684 67.624C104.645 67.8207 103.86 68.1335 103.646 68.2214C103.557 68.7134 103.591 69.659 103.591 70.2018L103.592 73.7155L103.602 86.7367C107.25 87.377 110.142 88.9439 112.348 91.9904C114.324 94.7412 115.112 98.1699 114.537 101.508C113.999 104.693 112.113 107.766 109.463 109.628C106.643 111.64 103.131 112.429 99.72 111.817C96.6299 111.256 93.6404 109.394 91.852 106.801L90.3865 106.799L40.3051 106.795L24.8158 106.797C22.0855 106.799 19.3544 106.808 16.6243 106.797C15.9725 106.763 15.1392 106.857 15.1484 105.938C15.1627 104.511 15.152 103.13 15.0862 101.705C15.0213 100.302 16.2792 100.414 17.2536 100.44C17.2613 99.7454 17.2425 99.0013 17.2249 98.3095C17.1747 96.337 17.0066 95.6234 19.2011 95.6647L19.2107 68.1786C17.7863 67.9397 17.9251 66.9346 17.9268 65.7248C17.9279 64.9292 17.9588 64.1257 17.9769 63.33C18.1995 63.0314 18.4813 62.682 18.8793 62.6694C20.29 62.6246 21.7371 62.6576 23.1491 62.6585L32.9719 62.6526C33.0147 62.5089 33.1899 62.0884 33.3061 62.0154C34.2669 61.4111 35.4065 60.9141 36.4243 60.4222L42.1239 57.6499C42.1244 56.6692 41.9175 52.013 42.4095 51.5329C43.0374 51.2341 43.9398 51.3421 44.6588 51.3601C44.62 48.8533 44.6733 46.1619 44.671 43.6357C43.6779 42.9296 43.5607 42.25 43.5045 41.0666C43.4894 40.7482 43.5777 40.213 43.8645 40.0235C44.3741 39.6869 45.4447 39.8057 46.0572 39.8141C46.0461 38.8414 46.0675 37.7633 46.1772 36.8034C46.994 29.6521 53.0915 23.3627 60.4225 23.0253C60.5465 19.1474 60.3757 15.0541 60.4389 11.1509C60.4599 9.84761 60.3765 8.23757 60.4888 6.92671C60.5153 6.61692 60.8328 6.43566 61.0831 6.26953ZM20.746 95.6655C23.4106 95.6366 26.0754 95.6351 28.74 95.6616C30.1334 95.6725 31.5591 95.6764 32.9489 95.6374C33.1072 95.6335 33.8285 95.0407 34.4591 95.2318C34.5128 95.2482 35.6136 95.2459 35.7756 95.2521C35.7644 94.9081 35.7483 94.5938 35.7685 94.2491C35.7687 92.5449 35.6148 92.5472 37.0848 91.7751C37.2063 89.6575 37.1295 86.8841 37.1293 84.7267L37.1262 71.8576C35.762 71.1947 36.0186 70.0591 36.0392 68.751C35.2291 68.7444 35.0003 68.7698 34.4449 68.1297C32.9836 68.1779 31.5086 68.1626 30.0459 68.1404C26.9522 68.0935 23.8287 68.2035 20.7383 68.1328L20.7296 85.4084C20.7279 88.7224 20.6578 92.3686 20.746 95.6655ZM61.5425 63.9146L78.7177 63.9154C81.8398 63.9153 85.1062 63.9605 88.2213 63.8984L88.2182 63.088C83.9823 60.9366 79.0687 58.6151 74.8515 56.5234C73.198 55.7033 61.9309 49.9607 61.2477 49.9391C55.2418 53.0275 48.9087 56.0629 42.8345 59.0407L37.5352 61.6242C36.8308 61.9674 34.849 62.7652 34.3628 63.4523C34.2805 63.5688 34.3979 63.6925 34.4712 63.8122C34.804 64.0451 59.1152 63.915 61.5425 63.9146ZM103.229 110.395C109.33 109.751 113.751 104.28 113.102 98.18C112.452 92.0793 106.977 87.6632 100.877 88.3184C94.7853 88.972 90.3755 94.4386 91.0244 100.531C91.6734 106.624 97.1361 111.038 103.229 110.395ZM47.6377 39.823L62.4597 39.8242L75.2703 39.8159C75.3429 35.4832 74.2299 31.9201 71.1608 28.7303C68.7024 26.1526 65.3159 24.6637 61.7539 24.5943C61.4208 24.5886 60.7587 24.5935 60.4334 24.6364C56.8713 24.9094 53.5634 26.5852 51.2362 29.2955C48.4459 32.5319 47.65 35.6845 47.6377 39.823ZM87.7073 68.6934C87.698 70.0154 87.9881 71.2017 86.5912 71.86L86.5827 91.8726C88.3212 92.3382 87.9366 93.7304 87.9171 95.2349L90.1236 95.2451C90.6181 93.7842 91.3739 92.4248 92.3535 91.2338C92.2739 89.4891 92.3168 87.6952 92.3137 85.9458C92.3121 85.2298 92.1756 83.216 92.6038 82.7075C93.1397 82.3846 97.7468 82.1982 97.9379 82.8907C98.274 84.1121 98.1204 86.0433 98.1001 87.37C99.2536 86.9433 100.807 86.6571 102.036 86.6836L102.04 68.1451L88.2666 68.1459L87.7073 68.6934ZM32.7613 100.437C32.9236 100.165 32.8539 97.6777 32.8494 97.2113L18.7794 97.2027C18.772 98.2564 18.805 99.4264 18.7763 100.46C23.4011 100.404 28.1349 100.413 32.7613 100.437ZM81.6526 91.8944C82.6775 91.8266 83.9745 91.8601 85.0236 91.8625C85.0165 85.3172 84.9019 78.4076 85.0173 71.8912C83.8965 71.8787 82.7765 71.8795 81.6557 71.892C81.6394 78.4685 81.5364 85.3304 81.6526 91.8944ZM88.4483 65.4899L88.4553 66.6336L102.611 66.64L103.317 66.6393C103.298 65.8705 103.27 64.9704 103.335 64.2114C100.169 64.0791 96.7734 64.2472 93.5835 64.1891C92.4198 64.1678 90.9246 64.2576 89.8015 64.1665C89.5995 65.0426 89.3725 65.3572 88.4483 65.4899ZM43.2309 70.3508C43.3433 70.1535 43.3018 69.0491 43.3008 68.7428L37.5205 68.7437L37.5298 70.3804C39.234 70.2782 41.4705 70.3609 43.2309 70.3508ZM44.7798 68.745C44.8015 70.0497 45.0615 71.2126 43.6785 71.8623L43.6792 91.8882C44.3037 92.0145 44.5016 92.1495 44.8944 92.6705C45.0311 93.5581 45.0107 94.3598 45.006 95.2552C45.3155 95.2466 46.188 95.281 46.365 95.1296L46.3478 95.0727C46.3685 94.3232 46.2164 92.8467 46.6809 92.4162C47.5029 91.6542 47.7641 92.2236 47.7631 91.0474C47.7617 89.3674 47.7326 87.6702 47.7378 85.9848L47.7439 71.8732C46.2673 71.2641 46.565 70.0864 46.6325 68.7482L44.7798 68.745ZM74.4233 71.8779C73.3891 71.8795 71.9868 71.9247 70.983 71.8732L70.9853 91.8703C72.1365 91.8547 73.2659 91.8788 74.421 91.85L74.4233 71.8779ZM76.5908 51.3664L76.59 45.4265C76.59 44.9309 76.5635 43.8382 76.5869 43.4084C76.6118 42.9345 77.8403 42.2061 77.8293 41.5329C77.3894 41.2877 48.9446 41.4554 45.0559 41.4402C45.0703 42.8139 46.1718 42.1774 46.1901 44.0651C46.2137 46.4859 46.1343 48.9557 46.2008 51.3697C47.7283 51.3596 54.0509 51.5414 55.0762 51.2439C55.7863 51.0379 56.4722 50.6299 57.1328 50.2994C58.3011 49.7028 59.4764 49.1204 60.6588 48.5523C60.6596 46.9659 60.5645 45.3231 60.7095 43.7547C60.7563 43.2483 61.8225 42.9477 61.9894 43.6285C62.3256 44.9974 62.186 47.1199 62.1735 48.5395C64.082 49.3984 66.1723 50.6047 68.1213 51.3409C68.2937 51.4059 69.3771 51.359 69.6485 51.3497L76.5908 51.3664ZM19.4894 64.1872C19.479 65.0047 19.4783 65.8223 19.4875 66.6399L33.8322 66.6382L34.2051 66.616C34.4532 66.2748 34.3132 65.9635 34.3328 65.4853L34.2417 65.4726C33.3691 65.3426 33.1438 65.0866 32.9549 64.2557C32.4345 64.0676 21.7886 64.1841 20.416 64.1866L19.4894 64.1872ZM43.6359 52.9188C43.6295 54.1987 43.6598 55.663 43.6154 56.9227C45.4535 56.03 47.2864 55.1267 49.1142 54.2129C49.9438 53.8155 50.9952 53.3432 51.7841 52.9097C49.1506 52.9678 46.2788 52.9444 43.6359 52.9188ZM79.1708 52.9173C76.4972 52.9212 73.7299 52.8844 71.0641 52.9295C73.7019 54.2862 76.4902 55.5831 79.1591 56.9165L79.1708 52.9173ZM95.5544 88.4767L96.5745 87.9479C96.5667 86.6384 96.5761 85.3281 96.6034 84.0185L93.8486 84.024C93.8291 85.9208 93.8517 87.8512 93.8205 89.7379C94.3603 89.2668 94.9398 88.8448 95.5544 88.4767ZM68.3304 68.7392L55.4532 68.7459C55.4785 70.1589 55.7151 71.1105 54.2978 71.892L54.2941 84.7611C54.294 86.9067 54.2148 89.6622 54.3392 91.7673C54.8479 92.0988 55.4506 92.3718 55.5329 92.9684C55.6338 93.7 55.5855 94.5057 55.5631 95.2435C55.9378 95.2381 56.3126 95.2349 56.6873 95.2349L56.6895 86.4255C56.688 85.4942 56.6324 82.5686 56.7808 81.8363C56.9191 81.178 57.2474 80.5759 57.7251 80.1024C58.6792 79.1501 59.8251 79.0285 61.0901 79.0269C63.3216 79.0246 64.9524 78.8202 66.2877 80.997C66.7362 82.0141 66.694 83.1879 66.6839 84.2822C66.6512 87.937 66.7268 91.6066 66.6738 95.2599C67.1371 95.2482 67.6027 95.2303 68.0652 95.2412C68.0613 94.4449 67.8889 92.814 68.4653 92.3101C68.8405 91.9818 69.2289 92.0356 69.4083 91.7369C69.5206 85.1456 69.3381 78.4739 69.4488 71.8818C68.0075 71.2641 68.3023 70.0864 68.3304 68.7392ZM80.1762 95.2622C82.2446 95.2217 84.3122 95.2794 86.3799 95.2248L86.4072 93.4021C84.3302 93.3849 82.254 93.3795 80.177 93.3873C80.1777 94.005 80.1879 94.6461 80.1762 95.2622ZM49.288 91.896C50.2598 91.8274 51.7287 91.8367 52.7332 91.8547L52.7452 71.8771L49.2754 71.8857L49.288 91.896ZM75.4552 70.35C75.6775 70.1051 75.5979 69.1341 75.5924 68.7488C73.6909 68.7449 71.7286 68.7175 69.8318 68.7443C69.831 69.2791 69.8388 69.8415 69.8263 70.3742C70.9861 70.3172 74.3141 70.2892 75.4552 70.35ZM80.4227 70.3695C82.3109 70.2946 84.2818 70.4147 86.1701 70.3414C86.2067 69.8103 86.2091 69.2776 86.2176 68.7451L80.4234 68.7367C80.4234 69.276 80.4312 69.8321 80.4227 70.3695ZM54.0664 95.2069L54.0621 93.3997C52.0027 93.3724 49.9376 93.4208 47.8848 93.3833L47.8758 95.2537C49.9175 95.2498 52.0368 95.2794 54.0664 95.2069ZM69.5798 95.2537C71.6217 95.2412 73.7674 95.2856 75.7929 95.2334C75.7937 94.657 75.7765 93.973 75.8007 93.406C73.7307 93.3857 71.6615 93.3795 69.5915 93.3865C69.5908 93.9847 69.6048 94.6625 69.5798 95.2537ZM86.9336 67.1595C86.918 66.5948 86.9212 66.0298 86.9407 65.4653L35.8378 65.4609C35.8432 66.0219 35.8623 66.6375 35.8478 67.1936L75.587 67.1841L83.5518 67.1965C84.0369 67.1979 86.6014 67.261 86.9336 67.1595ZM48.0697 68.7471L48.0755 70.3734C50.0055 70.3289 51.981 70.3586 53.9161 70.3539L53.9425 68.7433L48.0697 68.7471ZM59.9522 80.6141C59.3563 80.7919 58.815 81.0649 58.4957 81.6241C57.8534 82.748 58.3796 93.1369 58.2104 95.2427L63.5571 95.2474C64.0758 95.242 64.6147 95.2287 65.131 95.2373L65.1342 86.3857C65.1349 85.1058 65.2075 83.4983 65.0671 82.2488C64.8253 80.1001 61.4575 80.586 59.9522 80.6141ZM62.1142 10.353C62.09 12.1027 62.1259 13.9164 62.0822 15.6499C64.2778 15.2224 65.9235 15.3626 67.9544 16.3099C69.388 16.9786 71.0422 17.3686 72.638 17.1647C73.1684 17.0894 73.4648 17.0248 73.9842 16.8889C74.0084 15.1289 73.946 13.2758 73.9889 11.5494C68.5332 12.6804 67.8499 9.88536 63.5766 10.0408C63.008 10.1335 62.6633 10.1909 62.1142 10.353ZM37.2292 93.3966C37.2672 93.9231 37.2672 94.6983 37.2464 95.2412L43.2832 95.2342L43.4197 95.1835C43.4896 94.7334 43.4599 93.8958 43.4567 93.4083C41.4647 93.3763 39.2138 93.3506 37.2292 93.3966ZM77.2935 95.2693C77.5556 95.2654 78.4283 95.2802 78.6303 95.192L78.6522 95.0766C78.6545 94.3669 78.5258 92.9762 78.9758 92.4115C79.2239 92.1019 80.0498 92.0418 79.9937 91.5848C80.1154 85.0247 79.9679 78.4334 80.035 71.8748C78.6951 71.1947 78.9337 70.0372 78.9618 68.7441L77.1266 68.7477C77.136 70.1519 77.416 71.1066 76.0339 71.8686C76.0027 78.4653 75.9614 85.2704 76.0378 91.8601C77.6772 92.3593 77.2966 93.8544 77.2935 95.2693ZM38.6419 91.889C39.4892 91.8227 41.0887 91.8422 41.9838 91.8578L42.1165 91.7891C42.2112 90.0717 42.1233 87.3559 42.1237 85.5753L42.1425 71.8896L38.6664 71.8881C38.5818 78.5082 38.7778 85.3093 38.6419 91.889ZM16.6457 101.975L16.6822 105.252L90.8817 105.249C90.3662 104.182 89.9044 103.17 89.7375 101.978L16.6457 101.975ZM89.392 100.433C89.2906 99.5465 89.3569 97.7035 89.3717 96.7621L34.3499 96.7605C34.3612 97.9772 34.3337 99.2649 34.3779 100.47C36.0279 100.361 38.5776 100.433 40.2916 100.434L51.0877 100.433H89.392Z",fill:"#0147A5"}),r.jsx("path",{d:"M25.3467 82.4823C26.0279 82.4418 30.2276 82.2015 30.3252 82.9565C30.6555 85.5124 30.5562 88.5207 30.3899 91.0992C30.3759 91.316 29.9574 91.5024 29.785 91.557C28.4265 91.589 27.0474 91.5819 25.6895 91.5554C24.9026 91.5398 24.6831 91.0204 24.6754 90.2911C24.6505 87.9224 24.6057 85.5241 24.7183 83.1601C24.733 82.8497 25.1212 82.6289 25.3467 82.4823ZM26.2093 90.0587L28.9561 90.0665C28.9545 88.1042 28.9159 85.9687 28.9787 84.0211L26.1969 84.025C26.1942 86.01 26.1652 88.0808 26.2093 90.0587Z",fill:"#0147A5"}),r.jsx("path",{d:"M25.6153 71.1209C26.7972 71.1841 28.8616 70.9018 29.8909 71.2684C30.0881 71.3386 30.2449 71.4259 30.3265 71.6295C30.5801 72.262 30.6384 79.3088 30.3791 79.7752C30.2247 80.0529 30.0148 80.1246 29.7299 80.2081C28.735 80.2159 25.6669 80.375 24.957 79.9897C24.8769 79.8696 24.828 79.7721 24.7919 79.6309C24.6122 78.929 24.5497 71.9258 24.838 71.5468C25.0411 71.2793 25.3011 71.195 25.6153 71.1209ZM28.9534 78.6919L28.966 72.6793C28.0429 72.6847 27.1199 72.684 26.1969 72.6777C26.192 74.6229 26.1417 76.7818 26.2108 78.7153C27.1099 78.702 28.0583 78.6732 28.9534 78.6919Z",fill:"#0147A5"}),r.jsx("path",{d:"M61.0257 53.5886C63.3297 53.3858 65.3606 55.0922 65.5587 57.397C65.7561 59.7016 64.0449 61.7288 61.7393 61.9208C59.4416 62.1122 57.4231 60.4079 57.2262 58.1108C57.0294 55.8138 58.729 53.7909 61.0257 53.5886ZM61.8938 60.3743C63.3429 60.0935 64.2874 58.6874 63.9988 57.2397C63.7103 55.7921 62.2986 54.8554 60.8526 55.1517C59.4175 55.4458 58.4895 56.844 58.7759 58.2807C59.0623 59.7174 60.4556 60.653 61.8938 60.3743Z",fill:"#0147A5"}),r.jsx("path",{d:"M101.959 91.0469C103.131 91.2419 102.893 92.1365 102.87 93.1005C104.232 93.4241 104.817 93.5879 105.74 94.7469C106.671 95.9153 105.831 97.8979 104.598 96.5073C104.272 96.1399 104.169 95.4239 103.579 95.0316C102.613 94.3889 100.727 94.5785 100.03 95.5573C98.9678 97.242 100.514 97.9775 101.956 98.3253C102.897 98.5531 104.264 98.8884 105.057 99.4453C105.733 99.9156 106.182 100.648 106.294 101.465C106.618 103.828 105.063 105.206 102.869 105.546C102.898 106.504 103.145 107.644 101.863 107.679C101.025 107.221 101.238 106.491 101.274 105.63C99.9311 105.289 98.6972 104.851 98.0732 103.475C97.7831 102.836 97.7223 101.879 98.4656 101.534C99.6776 101.446 99.474 103.007 100.465 103.631C101.899 104.532 105.05 103.862 104.586 101.715C104.351 100.629 102.698 100.296 101.796 100.072C100.113 99.6614 98.2324 99.099 98.0101 97.0782C97.7613 94.8124 99.1106 93.4967 101.247 93.1356C101.266 92.2254 100.996 91.4696 101.959 91.0469Z",fill:"#0147A5"}),r.jsx("path",{d:"M93.4615 71.1186C94.4848 71.1397 96.7903 70.919 97.6412 71.3159C97.8456 71.4111 97.9275 71.5094 97.9899 71.7262C98.1965 72.4508 98.255 79.443 97.9282 79.8891C97.7457 80.1379 97.4938 80.1831 97.2068 80.2104C96.2514 80.2159 93.4147 80.3516 92.6355 80.0295C92.0537 79.4937 92.4047 72.9998 92.3485 71.9508C92.3181 71.3729 92.9467 71.1584 93.4615 71.1186ZM96.5922 78.7083C96.5189 76.891 96.5493 74.5044 96.5953 72.6723C95.7101 72.6816 94.7094 72.7128 93.8351 72.6847C93.8335 74.6908 93.8171 76.7186 93.839 78.7223C94.509 78.709 95.9854 78.6482 96.5922 78.7083Z",fill:"#0147A5"}),r.jsx("path",{d:"M72.7069 43.2349C74.0523 43.2031 73.6826 44.5801 73.7099 45.5872C73.745 46.9034 73.7045 48.2716 73.6569 49.5856C73.6467 49.8496 73.3605 50.0293 73.1647 50.1698C72.756 50.1628 72.2436 50.0763 72.2109 49.5501C72.0978 47.7095 72.1485 45.826 72.1867 43.9812C72.1945 43.6165 72.4503 43.4349 72.7069 43.2349Z",fill:"#0147A5"}),r.jsx("path",{d:"M49.6362 43.2402C49.9342 43.2448 50.229 43.2282 50.4453 43.4737C50.8343 43.9152 50.7218 48.6229 50.6525 49.3771C50.6149 49.7865 50.4907 49.9056 50.1855 50.1555C49.746 50.1679 49.2679 50.1299 49.1924 49.572C49.0953 48.7558 49.134 47.9145 49.1361 47.0903C49.1389 46.0685 49.1249 45.0393 49.1597 44.0185C49.1739 43.6019 49.3394 43.486 49.6362 43.2402Z",fill:"#0147A5"}),r.jsx("path",{d:"M66.9481 43.2445C67.182 43.2315 67.6913 43.2315 67.8013 43.5045C68.0119 44.1445 68.079 45.3795 67.9971 46.0659C67.8645 47.1664 68.3574 49.4818 67.4948 50.1523C67.0799 50.1896 66.5612 50.1562 66.5082 49.6167C66.4348 48.8727 66.4614 48.0955 66.4598 47.3464C66.4582 46.2339 66.4465 45.1167 66.477 44.0051C66.4887 43.5995 66.6634 43.4785 66.9481 43.2445Z",fill:"#0147A5"}),r.jsx("path",{d:"M55.4025 43.2391C56.513 43.2104 56.4087 43.9682 56.408 44.8402C56.4066 46.4127 56.43 47.9941 56.3751 49.5643C56.3648 49.8578 56.1148 50.0127 55.9008 50.1655C54.6786 50.1843 54.9049 49.3194 54.8946 48.346C54.8787 46.8295 54.868 45.2911 54.9373 43.778C54.9469 43.5692 55.2471 43.3626 55.4025 43.2391Z",fill:"#0147A5"})]})}function Bf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M60.4647 6.45508C62.2783 6.46707 61.9811 7.78406 61.9579 9.17742C64.1179 8.61059 66.7507 8.19853 68.678 9.52663C69.5821 10.1496 70.1962 10.5332 71.3832 10.6936C72.6302 10.8621 74.4125 10.1475 75.5628 10.5169C75.7132 10.5653 75.9263 10.9282 75.9343 11.1041C76.0606 13.6548 75.9925 16.2639 75.9863 18.8258C75.9845 19.651 75.5038 19.9611 74.7635 20.0867C72.2158 20.5187 69.8471 20.8956 67.6745 19.1713C66.2852 18.0678 63.562 18.6558 61.9677 18.9923L61.9695 23.8401C65.0731 25.661 68.2367 27.4281 71.3161 29.2831C72.4682 29.3113 76.3936 29.1264 77.1249 29.4944C77.7972 30.2628 77.5663 31.9705 77.5833 32.9734C77.6182 35.0207 76.8134 34.768 75.3023 34.7394C75.3623 42.5903 75.2272 50.4779 75.3229 58.3278C76.6057 58.2574 78.3469 58.3074 79.6574 58.3075L87.6747 58.3089L97.1036 58.3098C98.074 58.3089 102.89 58.1873 103.492 58.5207C104.041 59.2005 103.891 60.9275 103.838 61.8243C103.762 63.0965 104.322 65.0499 103.455 65.9981C103.12 66.3636 102.4 66.2869 101.933 66.2788C102.015 72.6963 101.86 79.2499 101.928 85.7033C107.255 86.8393 111.445 92.4396 111.529 97.816C111.712 109.615 98.0561 115.638 89.3343 107.521L84.6624 107.526L38.3784 107.524L23.2507 107.526C20.6466 107.528 18.0438 107.542 15.4363 107.514C13.5854 107.463 13.4067 106.931 13.3546 105.282C13.255 102.129 13.7844 102.17 16.6878 102.083C16.7204 101.12 16.4396 99.3343 17.1039 98.6154C17.4669 98.2216 18.1708 98.3111 18.6752 98.3335C18.756 94.7572 18.7015 91.0126 18.6989 87.4248L18.7068 66.2987C17.8653 66.2978 16.91 66.4478 16.8331 65.2934C16.78 64.4964 16.7873 63.9221 16.827 62.9537C16.8743 61.7998 16.5503 59.7741 17.1289 58.7267C17.6446 58.3078 20.6714 58.4442 21.4299 58.4447L27.3268 58.4459L45.5801 58.4407L45.5834 34.7479C44.8122 34.7495 44.0503 34.8849 43.4613 34.444C43.03 33.7264 43.0406 30.1747 43.6509 29.4552C44.3904 29.1486 48.3976 29.2939 49.4864 29.301C52.6156 27.321 56.3145 25.3329 59.557 23.5086C59.5758 21.5722 59.3941 7.73528 59.6805 7.09504C59.8381 6.74413 60.138 6.6112 60.4647 6.45508ZM47.3969 58.4178C47.6922 58.4242 48.6489 58.4636 48.8735 58.3688C49.911 57.9308 51.0207 57.2678 52.0178 56.7172L57.2369 53.8467C58.3145 53.2546 59.2365 52.7 60.3546 52.1867L60.4208 52.1567C61.3491 52.487 62.9202 53.3981 63.8243 53.8937L68.9734 56.7296C71.1684 57.8695 71.1048 58.3022 73.5111 58.3252C73.4905 50.6042 73.3795 42.4433 73.5075 34.7506L47.3788 34.7479L47.3779 49.9248C47.3771 52.6979 47.3264 55.6572 47.3969 58.4178ZM37.0762 66.3149C31.6261 66.2678 26.1756 66.2631 20.7253 66.3006L20.5757 66.3725C20.4846 66.899 20.5324 68.9462 20.5353 69.606L20.5443 75.8993C20.5483 83.3168 20.4317 90.967 20.5594 98.3603C25.2575 98.1114 30.2231 98.4704 34.9464 98.3281C35.8416 98.3012 36.8835 98.3111 37.7784 98.3549L37.7445 96.7803C37.7635 95.3811 37.8091 94.8843 39.3862 94.8942L39.404 68.6741C37.0954 68.7161 36.9875 68.6327 37.0762 66.3149ZM15.1808 103.92C15.186 104.465 15.2133 105.197 15.1781 105.724L83.3196 105.729C84.7447 105.725 86.4008 105.68 87.8063 105.729C86.7464 104.059 85.8315 102.2 85.6596 100.195L42.5227 100.189C34.6535 100.189 26.3869 100.058 18.545 100.207C18.6093 103.868 18.9566 103.966 15.1808 103.92ZM68.8033 82.2658C68.9421 83.2272 68.874 86.4965 68.8732 87.5922L68.8561 98.3612C69.5061 98.3406 70.1022 98.3236 70.7512 98.337C70.7333 96.6962 70.2249 94.9165 72.3491 94.8834C72.3823 86.1751 72.2623 77.3602 72.3635 68.6721C64.4554 68.6746 56.1227 68.807 48.2443 68.6702C48.1591 77.2931 48.15 86.2745 48.2338 94.8977C50.4558 94.9058 49.8469 96.7006 49.8571 98.38C50.4882 98.346 51.1202 98.3299 51.7522 98.3335L51.7542 87.6235C51.7523 82.6284 51.0119 78.5956 57.7336 78.797C59.9025 78.8623 62.247 78.7558 64.4295 78.8104C65.6398 78.8167 66.9369 79.361 67.7381 80.2454C68.2546 80.821 68.6207 81.5148 68.8033 82.2658ZM81.2204 68.6687L81.207 85.2924C81.207 88.4471 81.1613 91.7333 81.2311 94.8798C83.5255 94.9201 82.8452 96.6451 82.9007 98.3782C83.7063 98.295 84.6749 98.3039 85.485 98.3567C85.5361 95.4134 86.1851 93.3034 87.8286 90.8605C87.2047 90.8712 85.2478 90.9715 85.0581 90.5633C84.6284 89.6439 84.7922 85.7329 84.7922 84.835L84.7958 75.7945C84.7823 75.0641 84.5845 73.6676 85.152 73.1305C85.5173 72.784 94.1549 72.8172 95.2014 72.9353C95.6185 72.9819 96.101 73.0526 96.4116 73.3561C96.5934 74.0928 96.5191 76.8616 96.5164 77.7317C96.5039 80.2785 96.5056 82.8253 96.5218 85.3721C97.5754 85.2217 99.0542 85.0928 100.095 85.3444L100.106 66.3084C94.8639 66.1667 89.0121 66.2687 83.7251 66.2835C83.7627 67.7126 83.9552 68.6822 82.1648 68.682C81.8506 68.6806 81.5355 68.6762 81.2204 68.6687ZM60.3528 54.1589C55.4446 56.954 50.4212 59.5819 45.4888 62.3378C43.4908 63.4542 41.4584 64.5138 39.4629 65.6347C39.1127 65.8293 38.7983 66.1177 38.7516 66.5303C39.0497 67.0121 40.4957 66.8481 41.1126 66.8487L45.3129 66.8476L60.5372 66.8421L75.5458 66.8481C76.4643 66.8475 81.1998 66.9014 81.7432 66.7357C82.2266 65.978 81.3323 65.6063 80.8059 65.315L65.6827 57.0152C64.7204 56.4874 61.0475 54.3291 60.3528 54.1589ZM79.4139 94.904C79.3548 92.2068 79.4202 89.3252 79.4211 86.6128L79.4238 68.6841L74.1789 68.6702C74.0795 74.9611 74.2147 81.3223 74.161 87.6181C74.1413 89.916 74.2532 92.6508 74.1691 94.896C75.8395 94.8968 77.7659 94.8476 79.4139 94.904ZM60.582 29.2954C62.5585 29.2874 66.0121 29.1789 67.8634 29.3537C66.8599 28.8204 60.7288 25.1538 60.3465 25.1553C57.892 26.5228 55.4464 27.9067 53.0103 29.3066C55.534 29.283 58.0585 29.2794 60.582 29.2954ZM99.4356 109.419C105.572 108.906 110.146 103.535 109.675 97.3953C109.204 91.2543 103.866 86.6442 97.7222 87.0721C91.5177 87.5044 86.852 92.9069 87.3273 99.1078C87.8027 105.31 93.2373 109.938 99.4356 109.419ZM72.5765 98.38C74.784 98.2135 78.7408 98.3406 81.0754 98.346C81.0772 97.7946 81.0745 97.2619 81.1076 96.7105C78.2547 96.6926 75.4017 96.6908 72.5488 96.7042C72.5747 97.2619 72.5837 97.8214 72.5765 98.38ZM48.0765 96.7132C45.2443 96.6917 42.4118 96.6872 39.5795 96.6997L39.5771 98.3934C42.1187 98.26 45.3283 98.3567 47.9424 98.3451L48.0586 98.2591C48.0755 97.7435 48.0815 97.2288 48.0765 96.7132ZM91.5222 81.0528C92.3323 81.0591 94.0126 81.0251 94.7529 81.0976C94.6902 79.0029 94.726 76.8097 94.7314 74.7078C93.6616 74.6935 92.5919 74.6899 91.5231 74.6953C91.5356 76.747 91.5795 79.0154 91.5222 81.0528ZM56.3522 98.3236L59.3788 98.3487C59.4361 92.6293 59.4773 86.3828 59.369 80.6706C58.5105 80.633 57.7457 80.5954 56.8836 80.6241C55.5457 80.6608 54.0317 80.8568 53.6773 82.4896C53.4745 83.4242 53.5386 84.6846 53.5484 85.663C53.591 89.8964 53.4953 94.1592 53.5651 98.389C54.4497 98.3066 55.4551 98.3272 56.3522 98.3236ZM86.596 81.0896C87.5413 81.0457 88.7596 81.0537 89.713 81.0851C89.8876 79.9983 89.722 76.1052 89.7694 74.7015L86.5897 74.6944C86.5888 76.8124 86.5673 78.9751 86.596 81.0896ZM61.1979 80.6097C61.1629 86.3443 61.0752 92.6705 61.2131 98.3863C62.5147 98.2609 65.6559 98.3021 67.072 98.3558C67.0479 94.8494 67.0488 91.3421 67.0747 87.8356C67.0774 86.3998 67.1822 84.0795 67.0013 82.7036C66.6459 79.9912 63.1762 80.7297 61.1979 80.6097ZM91.5759 82.8665C91.4595 83.5603 91.5159 86.4535 91.5195 87.2645C92.3036 86.8071 92.7199 86.594 93.5265 86.2207L94.7224 85.7624L94.7394 82.8933C93.6849 82.8907 92.6304 82.8817 91.5759 82.8665ZM89.7739 82.9104C88.7077 82.8808 87.6406 82.871 86.5745 82.8799C86.5861 84.7947 86.6443 87.1714 86.5664 89.0674C87.4697 89.0808 89.0264 89.2867 89.6297 88.7461C89.9117 88.1293 89.7058 84.0025 89.7739 82.9104ZM73.9121 18.1949C73.9318 16.4029 73.8835 14.3328 73.9399 12.5723C72.7296 12.7096 71.2964 12.8911 70.1148 12.5624C68.0004 11.9746 67.226 10.3736 64.6801 10.7957C63.7366 10.8698 62.8942 11.061 61.9704 11.2496L61.965 16.9437C63.7223 16.3934 66.304 16.0527 67.9923 16.9737C69.3959 17.7396 69.541 18.1665 71.1693 18.3648C72.2077 18.4343 72.8764 18.3418 73.9121 18.1949ZM75.8386 31.1488L44.9601 31.1038L44.9493 32.9556C52.0675 32.8782 59.2535 33.0207 66.3765 32.9564C69.2966 32.93 72.9534 33.0688 75.8305 32.9228L75.8386 31.1488ZM18.6406 60.2616L18.6496 64.4718L37.8479 64.4569C39.13 63.7474 41.4205 62.3908 42.6677 61.8164C43.6124 61.287 44.5603 60.7631 45.5111 60.2447C36.6429 60.2996 27.4748 60.0796 18.6406 60.2616ZM102.062 60.1556C96.0034 60.0897 89.8732 60.1487 83.8093 60.1454L78.0926 60.1387C77.5 60.1396 75.7875 60.1119 75.2594 60.1833C75.8878 60.5835 82.7279 64.335 82.9356 64.3483C87.1376 64.6186 92.8318 64.389 97.2218 64.46C98.0722 64.4737 101.456 64.5535 102.015 64.4248C102.052 63.002 102.067 61.5789 102.062 60.1556ZM41.2041 68.675C41.1677 77.3862 41.2945 86.2154 41.1986 94.9031C42.8501 94.9031 44.7947 94.9541 46.4209 94.8951L46.4152 77.6207C46.4125 75.1984 46.2803 70.9847 46.4533 68.6779L41.2041 68.675Z",fill:"#0146A3"}),r.jsx("path",{d:"M24.9559 72.9043C26.6109 72.907 34.5446 72.7307 35.5586 73.1433C36.2296 74.1961 35.7086 88.006 35.7827 90.2485C35.7902 90.475 35.3166 90.7364 35.1114 90.8348C33.1411 90.9073 31.1567 90.8187 29.1341 90.8527C28.5863 90.7874 24.3923 91.0676 24.3548 90.5009C23.9881 84.9624 24.1712 79.0542 24.2468 73.4808C24.25 73.2391 24.8022 72.975 24.9559 72.9043ZM30.8257 81.0791C31.8266 81.0648 33.0136 81.0514 34.0089 81.0863C34.1667 80.2001 34.0426 75.9023 34.0608 74.6983C32.9807 74.6947 31.9006 74.6992 30.8206 74.7117C30.8471 76.7384 30.8873 79.056 30.8257 81.0791ZM25.9472 82.8623C25.9317 84.4173 26.0421 87.6856 25.931 89.0749L29.0799 89.0543C29.1444 87.1144 29.1174 84.8586 29.0842 82.908C28.051 82.8946 26.9771 82.8946 25.9472 82.8623ZM29.1048 81.0899C29.0808 78.9638 29.0772 76.8369 29.0943 74.7108C28.035 74.692 26.9755 74.6911 25.9162 74.709C26.0679 76.016 25.9147 79.5099 25.9517 81.1042C27.0027 81.0935 28.0538 81.0881 29.1048 81.0899ZM30.8274 82.8704C30.8499 84.9347 30.8524 86.9981 30.835 89.0624C31.9057 89.057 32.9763 89.0597 34.0471 89.0686L34.0572 82.8811C33.3102 82.8865 31.489 82.942 30.8274 82.8704Z",fill:"#0146A3"}),r.jsx("path",{d:"M59.906 36.6388C63.6918 36.3029 67.0379 39.0873 67.396 42.871C67.7532 46.6546 64.9889 50.0171 61.2076 50.3971C57.3944 50.7802 53.998 47.9875 53.6372 44.1725C53.2762 40.3576 56.0886 36.9775 59.906 36.6388ZM61.1584 48.5741C63.9433 48.2168 65.9127 45.6711 65.5582 42.8859C65.2037 40.1006 62.6605 38.1288 59.8747 38.48C57.0849 38.8317 55.1095 41.38 55.4642 44.1696C55.819 46.9592 58.3699 48.9319 61.1584 48.5741Z",fill:"#0146A3"}),r.jsx("path",{d:"M60.0957 39.4857C61.5745 39.3905 61.3364 40.6109 61.3463 41.689C61.3507 42.1785 61.3382 42.6749 61.3346 43.1648C61.8619 43.1585 62.4375 43.1216 62.9585 43.1415C64.1616 43.1876 64.4328 44.3286 63.398 44.9592C58.9328 45.2885 59.4306 44.9933 59.5326 40.7826C59.5478 40.1502 59.6221 39.8909 60.0957 39.4857Z",fill:"#0146A3"}),r.jsx("path",{d:"M98.2232 89.8789C99.566 89.9702 99.3995 90.7956 99.3941 91.8868C100.396 92.1392 101.355 92.4633 102.009 93.3272C102.369 93.7694 102.925 94.8812 102.57 95.4407C101.987 96.3743 101.295 95.8193 100.86 95.0754C99.8453 93.3352 98.1427 93.0855 96.6057 94.3029C96.235 94.5974 96.0847 95.3897 96.2413 95.848C96.5636 96.7987 97.9735 97.1666 98.9474 97.3573C101.864 97.9275 103.879 99.7698 102.285 102.851C101.753 103.879 100.5 104.344 99.3583 104.615C99.4094 105.682 99.5794 106.265 98.4685 106.729C97.363 106.388 97.5778 105.613 97.6047 104.655C96.2019 104.274 95.1626 103.814 94.4017 102.481C94.1734 102.082 93.9461 101.46 94.2567 101.033C95.6147 99.1825 95.9101 102.008 96.9431 102.586C98.0496 103.206 99.9572 103.113 100.735 101.956C101.466 100.869 100.781 99.7841 99.5786 99.401C97.6629 98.7904 94.9236 98.6884 94.3856 96.266C93.9183 93.9708 95.381 92.3022 97.5859 91.9119C97.568 90.9737 97.397 90.4715 98.2232 89.8789Z",fill:"#0146A3"})]})}function Yf(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function Ku({onCancel:e,isSubmitting:t,submitLabel:n,submittingLabel:s,cancelLabel:a="Cancel",className:i=""}){return r.jsxs("div",{className:` flex flex-col gap-3 py-4 justify-end sm:flex-row sm:items-center ${i}`,children:[r.jsx("button",{type:"button",onClick:e,disabled:t,className:"inline-flex h-11 w-full items-center justify-center rounded-lg border border-slate-300 bg-white px-6 text-sm font-medium text-slate-700 transition hover:bg-slate-50 disabled:opacity-60 sm:w-auto",children:a}),r.jsx("button",{type:"submit",disabled:t,className:"inline-flex h-11 w-full items-center justify-center rounded-lg bg-gov-700 px-8 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:opacity-60 sm:w-auto",children:t?s:n})]})}function Ht({variant:e="error",title:t,message:n}){const s=e==="error"?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-white text-slate-700";return r.jsxs("div",{className:`rounded-lg border px-4 py-3 text-sm ${s}`,role:"alert",children:[t?r.jsx("p",{className:"font-medium",children:t}):null,r.jsx("p",{className:t?"mt-1":void 0,children:n})]})}function ls({label:e,required:t=!1,htmlFor:n,tooltip:s}){return r.jsxs("label",{htmlFor:n,className:"mb-1.5 flex items-center text-sm text-slate-600",children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null,s?r.jsx(Hf,{text:s}):null]})}function Hf({text:e}){return r.jsxs("span",{className:"group relative ml-1.5 inline-flex items-center",children:[r.jsxs("svg",{className:"h-4 w-4 cursor-help text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16v-4M12 8h.01"})]}),r.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-20 mb-1.5 w-max max-w-xs -translate-x-1/2 rounded-md bg-slate-800 px-2.5 py-1.5 text-xs font-normal leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100",children:e})]})}const Oe=x.forwardRef(function({label:t,required:n=!1,error:s,tooltip:a,id:i,className:o="",...l},c){const u=i??l.name;return r.jsxs("div",{children:[r.jsx(ls,{label:t,required:n,htmlFor:u,tooltip:a}),r.jsx("input",{ref:c,id:u,className:`block w-full rounded-sm border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${s?"border-red-300":"border-slate-200"} ${o}`,...l}),s?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:s}):null]})});function mo({label:e,required:t=!1,htmlFor:n,info:s}){return r.jsxs("label",{htmlFor:n,className:"mb-1.5 flex items-center gap-1.5 text-sm text-slate-600",children:[r.jsxs("span",{children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null]}),s?r.jsxs("span",{className:"group relative inline-flex items-center",children:[r.jsx("span",{className:"inline-flex h-4 w-4 shrink-0 cursor-help items-center justify-center rounded-full border border-slate-300 text-[10px] font-semibold leading-none text-slate-400","aria-label":s,role:"img",children:"i"}),r.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-20 mb-1.5 w-max max-w-xs -translate-x-1/2 rounded-md bg-slate-800 px-2.5 py-1.5 text-xs font-normal leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100",children:s})]}):null]})}function $({label:e,required:t,error:n,info:s,children:a}){return r.jsxs("div",{children:[r.jsx(mo,{label:e,required:t,info:s}),a,n?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:n}):null]})}const Wf="disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] disabled:text-slate-700",Qu=e=>`block w-full rounded-lg border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${Wf} ${e?"border-red-300":"border-slate-200"}`;function oe(e,t=!1){return t?`block w-full cursor-default rounded-lg border bg-[#F9FAFB] px-3 py-2.5 text-sm text-slate-700 focus:outline-none ${e?"border-red-300":"border-[#E5E7EB]"}`:Qu(e)}function Kf(e,t=!1){return t?`block w-full cursor-default appearance-none rounded-lg border bg-[#F9FAFB] px-3 py-2.5 text-sm text-slate-700 focus:outline-none ${e?"border-red-300":"border-[#E5E7EB]"}`:`${Qu(e)} appearance-none`}function Qf({className:e}){return r.jsx("svg",{className:e??"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}const Gf=4,Ol=96;function Gu({open:e,anchorRef:t,layerRef:n,onDismiss:s,width:a="anchor",align:i="start",gap:o=Gf,maxHeight:l}){const[c,u]=x.useState(null),d=x.useCallback(()=>{var w;const m=t.current;if(!m)return;const h=m.getBoundingClientRect(),f=a==="anchor"?h.width:a,g=window.innerHeight-h.bottom-o,p=h.top-o,v=((w=n.current)==null?void 0:w.offsetHeight)??0,y=l?Math.min(l,Ol):v,b=g<y&&p>g,S=Math.max(b?p:g,Ol),A=l?Math.min(l,S):v;u({position:"fixed",top:b?h.top-o-A:h.bottom+o,left:i==="end"?Math.max(o,Math.min(h.right-f,window.innerWidth-f-o)):Math.max(o,Math.min(h.left,window.innerWidth-f-o)),width:f,...l?{maxHeight:A}:{},zIndex:50})},[i,t,o,n,l,a]);return x.useLayoutEffect(()=>{if(!e){u(null);return}d();const m=requestAnimationFrame(d);return()=>cancelAnimationFrame(m)},[e,d]),x.useEffect(()=>{if(!e)return;const m=g=>{var v,y;const p=g.target;(v=t.current)!=null&&v.contains(p)||(y=n.current)!=null&&y.contains(p)||s()},h=g=>{g.key==="Escape"&&s()},f=()=>d();return document.addEventListener("mousedown",m),document.addEventListener("keydown",h),window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",h),window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[e,d,s,t,n]),c}function Ju(e){return typeof document>"u"?null:(e==null?void 0:e.closest(".tax-remittance-embedded"))??document.body}const Jf=240;function we({value:e,onChange:t,options:n,placeholder:s,disabled:a=!1,hasError:i=!1,loading:o=!1,loadingLabel:l="Loading…",label:c,required:u=!1,error:d,id:m,ariaLabel:h,size:f="md",leadingIcon:g}){const[p,v]=x.useState(!1),y=x.useRef(null),b=x.useRef(null),S=x.useCallback(()=>v(!1),[]),A=Gu({open:p,anchorRef:y,layerRef:b,onDismiss:S,width:"anchor",maxHeight:Jf}),w=n.find(F=>F.value===e),k=i||!!d,M=f==="sm",O=`disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] ${w?"disabled:text-slate-700":""}`,Z=M?`inline-flex w-auto items-center rounded-lg border bg-white py-1.5 pr-7 text-xs font-medium ${g?"pl-8":"pl-3"} focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${k?"border-red-300":"border-slate-200"} ${O}`:`${Kf(k)} text-left ${O}`,_=r.jsxs("div",{className:"relative",ref:y,children:[g,r.jsx("button",{type:"button",id:m,"aria-label":h,disabled:a,className:`${Z} ${w||o?"":"text-slate-400"}`,onClick:()=>v(F=>!F),"aria-haspopup":"listbox","aria-expanded":p,children:o?l:(w==null?void 0:w.label)??s}),r.jsx(Qf,{className:M?"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-slate-500":void 0}),p&&A?un.createPortal(r.jsxs("ul",{ref:b,role:"listbox",style:A,className:"overflow-y-auto overscroll-contain rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-lg",children:[n.length===0?r.jsx("li",{className:"px-3 py-2 text-slate-400",children:"No options"}):null,n.map(F=>{const W=F.value===e;return r.jsxs("li",{role:"option","aria-selected":W,"aria-disabled":F.disabled,onClick:F.disabled?void 0:()=>{t(F.value),v(!1)},className:F.disabled?"flex cursor-not-allowed items-center justify-between gap-3 border border-transparent px-3 py-2 text-slate-400":`flex cursor-pointer items-center justify-between gap-3 border px-3 py-2 ${W?"border-gov-400 bg-gov-50 text-slate-900":"border-transparent text-slate-900 hover:border-gov-400 hover:bg-gov-50"}`,children:[r.jsx("span",{children:F.label}),F.badge?r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-amber-200 bg-linear-to-b from-amber-50 to-orange-100 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-amber-700",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500"}),F.badge]}):null]},F.value)})]}),Ju(y.current)):null]});return c?r.jsxs("div",{children:[r.jsx(ls,{label:c,required:u,htmlFor:m}),_,d?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:d}):null]}):_}function Xf({label:e,required:t=!1,options:n,value:s,onChange:a,fullWidth:i=!0,onFocus:o}){const l=x.useId(),c=x.useRef([]),u=n.findIndex(h=>h.value===s),d=h=>{var g;const f=(h+n.length)%n.length;a(n[f].value),(g=c.current[f])==null||g.focus()},m=h=>{h.key==="ArrowRight"||h.key==="ArrowDown"?(h.preventDefault(),d(u+1)):(h.key==="ArrowLeft"||h.key==="ArrowUp")&&(h.preventDefault(),d(u-1))};return r.jsxs("div",{children:[r.jsx(ls,{label:e,required:t,htmlFor:l}),r.jsx("div",{id:l,role:"radiogroup","aria-label":e,onKeyDown:m,onFocus:o,className:`gap-1.5 rounded-sm border border-slate-200 bg-white p-1 ${i?"flex":"inline-flex flex-wrap"}`,children:n.map((h,f)=>{const g=h.value===s;return r.jsxs("button",{ref:p=>{c.current[f]=p},type:"button",role:"radio","aria-checked":g,tabIndex:g?0:-1,onClick:()=>{o==null||o(),a(h.value)},className:`flex items-center justify-center gap-2 rounded-sm px-5 py-[5px] text-sm font-medium transition focus:outline-none focus-visible:ring-2 focus-visible:ring-gov-500 focus-visible:ring-offset-1 ${i?"flex-1":""} ${g?"border border-gov-500 bg-gov-50 text-gov-600":"border border-transparent text-slate-800"}`,children:[h.icon?r.jsx("span",{className:g?"text-gov-600":"text-slate-700",children:h.icon}):null,h.label]},h.value)})})]})}function _f(){return r.jsx("svg",{width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:r.jsx("path",{d:"M18 4.37695C18 3.50462 17.2903 2.79492 16.418 2.79492H13.6055V1.66018C13.6055 0.74475 12.8607 0 11.9453 0H6.05472C5.13928 0 4.39453 0.74475 4.39453 1.66018V2.79492H1.58203C0.709699 2.79492 0 3.50462 0 4.37695V6.87294C0 7.33806 0.151453 7.9181 0.703125 8.48707V14.291C0.703125 15.1633 1.41282 15.873 2.28516 15.873H15.7148C16.5872 15.873 17.2969 15.1633 17.2969 14.291V8.48707C17.8483 7.91842 18 7.33855 18 6.87294V4.37695ZM5.44922 1.66018C5.44922 1.3263 5.72084 1.05469 6.05472 1.05469H11.9454C12.2792 1.05469 12.5508 1.3263 12.5508 1.66018V2.79492H5.44922V1.66018ZM1.05469 4.37695C1.05469 4.08618 1.29125 3.84961 1.58203 3.84961H16.418C16.7087 3.84961 16.9453 4.08618 16.9453 4.37695V6.87294C16.9453 8.17049 14.456 9.22936 10.8281 9.50678V9.01758C10.8281 8.72634 10.592 8.49023 10.3008 8.49023H7.69922C7.40798 8.49023 7.17188 8.72634 7.17188 9.01758V9.5066C3.5473 9.22883 1.05469 8.16718 1.05469 6.87294V4.37695ZM9.77344 9.54492V10.2305C9.77344 10.6085 9.46589 10.916 9.08789 10.916H8.91211C8.53411 10.916 8.22656 10.6085 8.22656 10.2305V9.54492H9.77344ZM15.7148 14.8184H2.28516C1.99438 14.8184 1.75781 14.5818 1.75781 14.291V9.26103C3.32803 10.0657 4.9782 10.3759 7.20478 10.5667C7.36189 11.3658 8.06759 11.9707 8.91211 11.9707H9.08789C9.93248 11.9707 10.6382 11.3658 10.7953 10.5665C12.6345 10.4333 14.2949 10.0957 15.5073 9.60514C15.7799 9.49482 16.0238 9.37958 16.2422 9.26093V14.291C16.2422 14.5818 16.0056 14.8184 15.7148 14.8184Z",fill:"currentColor"})})}function $f(){return r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M12 12.375C12.7664 12.375 13.5156 12.1477 14.1528 11.7219C14.7901 11.2962 15.2867 10.691 15.58 9.9829C15.8733 9.27484 15.9501 8.4957 15.8005 7.74403C15.651 6.99235 15.282 6.30189 14.74 5.75996C14.1981 5.21803 13.5077 4.84898 12.756 4.69946C12.0043 4.54994 11.2252 4.62668 10.5171 4.91997C9.80904 5.21326 9.20385 5.70993 8.77806 6.34717C8.35226 6.98441 8.125 7.7336 8.125 8.5C8.12615 9.52736 8.53478 10.5123 9.26123 11.2388C9.98769 11.9652 10.9726 12.3739 12 12.375ZM12 5.375C12.6181 5.375 13.2223 5.55828 13.7362 5.90166C14.2501 6.24504 14.6506 6.7331 14.8871 7.30412C15.1236 7.87514 15.1855 8.50347 15.065 9.10966C14.9444 9.71585 14.6467 10.2727 14.2097 10.7097C13.7727 11.1467 13.2158 11.4444 12.6097 11.565C12.0035 11.6855 11.3751 11.6236 10.8041 11.3871C10.2331 11.1506 9.74504 10.7501 9.40166 10.2362C9.05828 9.72226 8.875 9.11807 8.875 8.5C8.87593 7.67148 9.20546 6.87717 9.79131 6.29132C10.3772 5.70547 11.1715 5.37593 12 5.375Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5"}),r.jsx("path",{d:"M18.875 19C18.8732 17.4424 18.2537 15.9491 17.1523 14.8477C16.0509 13.7463 14.5576 13.1268 13 13.125H11C10.2284 13.1246 9.46423 13.2763 8.75126 13.5714C8.03829 13.8665 7.39048 14.2992 6.84485 14.8449C6.29923 15.3905 5.8665 16.0383 5.57139 16.7513C5.27629 17.4642 5.1246 18.2284 5.125 19C5.125 19.2071 5.29289 19.375 5.5 19.375H18.5C18.7071 19.375 18.875 19.2071 18.875 19ZM6.96389 18.625C6.38301 18.625 5.91613 18.1262 6.07814 17.5684C6.33473 16.685 6.82664 15.8801 7.51021 15.2449C8.45855 14.3636 9.70542 13.8742 11 13.875H13C14.2939 13.8765 15.5394 14.3668 16.4872 15.2476C17.1698 15.8819 17.6617 16.6851 17.9195 17.5669C18.0826 18.1251 17.6156 18.625 17.034 18.625H6.96389Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5"})]})}var zl;function D(e,t,n){function s(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=o.prototype,d=Object.keys(u);for(let m=0;m<d.length;m++){const h=d[m];h in l||(l[h]=u[h].bind(l))}}const a=(n==null?void 0:n.Parent)??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function o(l){var c;const u=n!=null&&n.Parent?new i:this;s(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(o,"init",{value:s}),Object.defineProperty(o,Symbol.hasInstance,{value:l=>{var c,u;return n!=null&&n.Parent&&l instanceof n.Parent?!0:(u=(c=l==null?void 0:l._zod)==null?void 0:c.traits)==null?void 0:u.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class dr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Xu extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(zl=globalThis).__zod_globalConfig??(zl.__zod_globalConfig={});const ho=globalThis.__zod_globalConfig;function tr(e){return ho}function _u(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,a])=>t.indexOf(+s)===-1).map(([s,a])=>a)}function Ei(e,t){return typeof t=="bigint"?t.toString():t}function fo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function po(e){return e==null}function xo(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const ql=Symbol("evaluating");function Ae(e,t,n){let s;Object.defineProperty(e,t,{get(){if(s!==ql)return s===void 0&&(s=ql,s=n()),s},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function sr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Dn(...e){const t={};for(const n of e){const s=Object.getOwnPropertyDescriptors(n);Object.assign(t,s)}return Object.defineProperties({},t)}function Vl(e){return JSON.stringify(e)}function e5(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $u="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const t5=fo(()=>{var e;if(ho.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Gr(e){if(Hs(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Hs(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ed(e){return Gr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const n5=new Set(["string","number","symbol"]);function Ar(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function On(e,t,n){const s=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(s._zod.parent=e),s}function le(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function r5(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function s5(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Dn(e._zod.def,{get shape(){const o={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(o[l]=n.shape[l])}return sr(this,"shape",o),o},checks:[]});return On(e,i)}function a5(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Dn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete o[l]}return sr(this,"shape",o),o},checks:[]});return On(e,i)}function i5(e,t){if(!Gr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Dn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return sr(this,"shape",i),i}});return On(e,a)}function o5(e,t){if(!Gr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Dn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return sr(this,"shape",s),s}});return On(e,n)}function l5(e,t){var s;if((s=e._zod.def.checks)!=null&&s.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Dn(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return sr(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return On(e,n)}function c5(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Dn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return sr(this,"shape",c),c},checks:[]});return On(t,o)}function u5(e,t,n){const s=Dn(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new e({type:"nonoptional",innerType:a[o]}))}else for(const o in a)i[o]=new e({type:"nonoptional",innerType:a[o]});return sr(this,"shape",i),i}});return On(t,s)}function cr(e,t=0){var n;if(e.aborted===!0)return!0;for(let s=t;s<e.issues.length;s++)if(((n=e.issues[s])==null?void 0:n.continue)!==!0)return!0;return!1}function d5(e,t=0){var n;if(e.aborted===!0)return!0;for(let s=t;s<e.issues.length;s++)if(((n=e.issues[s])==null?void 0:n.continue)===!1)return!0;return!1}function td(e,t){return t.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(e),n})}function ws(e){return typeof e=="string"?e:e==null?void 0:e.message}function nr(e,t,n){var c,u,d,m,h,f;const s=e.message?e.message:ws((d=(u=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:u.error)==null?void 0:d.call(u,e))??ws((m=t==null?void 0:t.error)==null?void 0:m.call(t,e))??ws((h=n.customError)==null?void 0:h.call(n,e))??ws((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input",{inst:a,continue:i,input:o,...l}=e;return l.path??(l.path=[]),l.message=s,t!=null&&t.reportInput&&(l.input=o),l}function go(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Jr(...e){const[t,n,s]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:s}:{...t}}const nd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ei,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},yo=D("$ZodError",nd),ba=D("$ZodError",nd,{Parent:Error});function m5(e,t=n=>n.message){const n={},s=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):s.push(t(a));return{formErrors:s,fieldErrors:n}}function h5(e,t=n=>n.message){const n={_errors:[]},s=(a,i=[])=>{for(const o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(l=>s({issues:l},[...i,...o.path]));else if(o.code==="invalid_key")s({issues:o.issues},[...i,...o.path]);else if(o.code==="invalid_element")s({issues:o.issues},[...i,...o.path]);else{const l=[...i,...o.path];if(l.length===0)n._errors.push(t(o));else{let c=n,u=0;for(;u<l.length;){const d=l[u];u===l.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(o))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return s(e),n}const va=e=>(t,n,s,a)=>{const i=s?{...s,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new dr;if(o.issues.length){const l=new((a==null?void 0:a.Err)??e)(o.issues.map(c=>nr(c,i,tr())));throw $u(l,a==null?void 0:a.callee),l}return o.value},f5=va(ba),Ca=e=>async(t,n,s,a)=>{const i=s?{...s,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const l=new((a==null?void 0:a.Err)??e)(o.issues.map(c=>nr(c,i,tr())));throw $u(l,a==null?void 0:a.callee),l}return o.value},p5=Ca(ba),ja=e=>(t,n,s)=>{const a=s?{...s,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new dr;return i.issues.length?{success:!1,error:new(e??yo)(i.issues.map(o=>nr(o,a,tr())))}:{success:!0,data:i.value}},x5=ja(ba),wa=e=>async(t,n,s)=>{const a=s?{...s,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(o=>nr(o,a,tr())))}:{success:!0,data:i.value}},g5=wa(ba),y5=e=>(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return va(e)(t,n,a)},b5=e=>(t,n,s)=>va(e)(t,n,s),v5=e=>async(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Ca(e)(t,n,a)},C5=e=>async(t,n,s)=>Ca(e)(t,n,s),j5=e=>(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return ja(e)(t,n,a)},w5=e=>(t,n,s)=>ja(e)(t,n,s),N5=e=>async(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return wa(e)(t,n,a)},S5=e=>async(t,n,s)=>wa(e)(t,n,s),A5=/^[cC][0-9a-z]{6,}$/,k5=/^[0-9a-z]+$/,P5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,E5=/^[0-9a-vA-V]{20}$/,I5=/^[A-Za-z0-9]{27}$/,T5=/^[a-zA-Z0-9_-]{21}$/,L5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,F5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zl=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,R5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,M5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function D5(){return new RegExp(M5,"u")}const O5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,q5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,V5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Z5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,rd=/^[A-Za-z0-9_-]*$/,U5=/^https?$/,B5=/^\+[1-9]\d{6,14}$/,sd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Y5=new RegExp(`^${sd}$`);function ad(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function H5(e){return new RegExp(`^${ad(e)}$`)}function W5(e){const t=ad({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${n.join("|")})`;return new RegExp(`^${sd}T(?:${s})$`)}const K5=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Q5=/^(?:true|false)$/i,G5=/^[^A-Z]*$/,J5=/^[^a-z]*$/,Jt=D("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),X5=D("$ZodCheckMaxLength",(e,t)=>{var n;Jt.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!po(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const a=s.value;if(a.length<=t.maximum)return;const o=go(a);s.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),_5=D("$ZodCheckMinLength",(e,t)=>{var n;Jt.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!po(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const a=s.value;if(a.length>=t.minimum)return;const o=go(a);s.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),$5=D("$ZodCheckLengthEquals",(e,t)=>{var n;Jt.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!po(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=s=>{const a=s.value,i=a.length;if(i===t.length)return;const o=go(a),l=i>t.length;s.issues.push({origin:o,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),Na=D("$ZodCheckStringFormat",(e,t)=>{var n,s;Jt.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),e2=D("$ZodCheckRegex",(e,t)=>{Na.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),t2=D("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=G5),Na.init(e,t)}),n2=D("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=J5),Na.init(e,t)}),r2=D("$ZodCheckIncludes",(e,t)=>{Jt.init(e,t);const n=Ar(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=s,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(s)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),s2=D("$ZodCheckStartsWith",(e,t)=>{Jt.init(e,t);const n=new RegExp(`^${Ar(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),a2=D("$ZodCheckEndsWith",(e,t)=>{Jt.init(e,t);const n=new RegExp(`.*${Ar(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),i2=D("$ZodCheckOverwrite",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class o2{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const s=t.split(`
|
|
12
|
+
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let d=Ie(),m;if(t){let C=typeof t=="string"?ar(t):t;Ve(c==="/"||((b=C.pathname)==null?void 0:b.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${C.pathname}" was given in the \`location\` prop.`),m=C}else m=d;let h=m.pathname||"/",f=h;if(c!=="/"){let C=c.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(C.length).join("/")}let y=n&&n.state.matches.length?n.state.matches.map(C=>Object.assign(C,{route:n.manifest[C.route.id]||C.route})):ou(e,{pathname:f});Pt(u||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Pt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=F0(y&&y.map(C=>Object.assign({},C,{params:Object.assign({},o,C.params),pathname:Ht([c,s.encodeLocation?s.encodeLocation(C.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?c:Ht([c,s.encodeLocation?s.encodeLocation(C.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),a,n);return t&&p?I.createElement(cs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...m},navigationType:"POP"}},p):p}function I0(){let e=z0(),t=h0(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},i={padding:"2px 4px",backgroundColor:s},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:i},"ErrorBoundary")," or"," ",I.createElement("code",{style:i},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:a},n):null,o)}var E0=I.createElement(I0,null),wu=class extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=N0(e.digest);n&&(e=n)}let t=e!==void 0?I.createElement(zt.Provider,{value:this.props.routeContext},I.createElement(_i.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?I.createElement(T0,{error:e},t):t}};wu.contextType=xu;var Ha=new WeakMap;function T0({children:e,error:t}){let{basename:n}=I.useContext(It);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=w0(t.digest);if(s){let a=Ha.get(t);if(a)throw a;let i=fu(s.location,n),o=i.absoluteURL||i.to;if(g0(o))throw new Error("Invalid redirect location");if(hu&&!Ha.get(t))if(i.isExternal||s.reloadDocument)window.location.href=o;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:s.replace}));throw Ha.set(t,l),l}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o}`})}}return e}function L0({routeContext:e,match:t,children:n}){let s=I.useContext(Dr);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),I.createElement(zt.Provider,{value:e},n)}function F0(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let a=e,i=s==null?void 0:s.errors;if(i!=null){let d=a.findIndex(m=>m.route.id&&(i==null?void 0:i[m.route.id])!==void 0);Ve(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let o=!1,l=-1;if(n&&s){o=s.renderFallback;for(let d=0;d<a.length;d++){let m=a[d];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(l=d),m.route.id){let{loaderData:h,errors:f}=s,y=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!f||f[m.route.id]===void 0);if(m.route.lazy||y){n.isStatic&&(o=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=s&&c?(d,m)=>{var h,f;c(d,{location:s.location,params:((f=(h=s.matches)==null?void 0:h[0])==null?void 0:f.params)??{},pattern:f0(s.matches),errorInfo:m})}:void 0;return a.reduceRight((d,m,h)=>{let f,y=!1,p=null,b=null;s&&(f=i&&m.route.id?i[m.route.id]:void 0,p=m.route.errorElement||E0,o&&(l<0&&h===0?(Nu("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,b=null):l===h&&(y=!0,b=m.route.hydrateFallbackElement||null)));let C=t.concat(a.slice(0,h+1)),g=()=>{let A;return f?A=p:y?A=b:m.route.Component?A=I.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=d,I.createElement(L0,{match:m,routeContext:{outlet:d,matches:C,isDataRoute:s!=null},children:A})};return s&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?I.createElement(wu,{location:s.location,revalidation:s.revalidation,component:p,error:f,children:g(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):g()},null)}function $i(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R0(e){let t=I.useContext(Dr);return Ve(t,$i(e)),t}function M0(e){let t=I.useContext(ga);return Ve(t,$i(e)),t}function D0(e){let t=I.useContext(zt);return Ve(t,$i(e)),t}function eo(e){let t=D0(e),n=t.matches[t.matches.length-1];return Ve(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function O0(){return eo("useRouteId")}function z0(){var s;let e=I.useContext(_i),t=M0("useRouteError"),n=eo("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function q0(){let{router:e}=R0("useNavigate"),t=eo("useNavigate"),n=I.useRef(!1);return vu(()=>{n.current=!0}),I.useCallback(async(a,i={})=>{Pt(n.current,bu),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var kl={};function Nu(e,t,n){!t&&!kl[e]&&(kl[e]=!0,Pt(!1,n))}I.memo(V0);function V0({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:i}){return ju(e,void 0,{manifest:t,state:s,isStatic:a,onError:i})}function Z0({basename:e,children:t,initialEntries:n,initialIndex:s,useTransitions:a}){let i=I.useRef();i.current==null&&(i.current=Y1({initialEntries:n,initialIndex:s,v5Compat:!0}));let o=i.current,[l,c]=I.useState({action:o.action,location:o.location}),u=I.useCallback(d=>{a===!1?c(d):I.startTransition(()=>c(d))},[a]);return I.useLayoutEffect(()=>o.listen(u),[o,u]),I.createElement(B0,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:a})}function Ye({to:e,replace:t,state:n,relative:s}){Ve(Or(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=I.useContext(It);Pt(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=I.useContext(zt),{pathname:o}=Ie(),l=Ae(),c=xa(e,Xi(i),o,s==="path"),u=JSON.stringify(c);return I.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:s})},[l,u,s,t,n]),null}function U0(e){return k0(e.context)}function oe(e){Ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function B0({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:a,static:i=!1,useTransitions:o}){Ve(!Or(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=I.useMemo(()=>({basename:l,navigator:a,static:i,useTransitions:o,future:{}}),[l,a,i,o]);typeof n=="string"&&(n=ar(n));let{pathname:u="/",search:d="",hash:m="",state:h=null,key:f="default",mask:y}=n,p=I.useMemo(()=>{let b=dn(u,l);return b==null?null:{location:{pathname:b,search:d,hash:m,state:h,key:f,mask:y},navigationType:s}},[l,u,d,m,h,f,s,y]);return Pt(p!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${m}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:I.createElement(It.Provider,{value:c},I.createElement(cs.Provider,{children:t,value:p}))}function to({children:e,location:t}){return P0(hi(e),t)}function hi(e,t=[]){let n=[];return I.Children.forEach(e,(s,a)=>{if(!I.isValidElement(s))return;let i=[...t,a];if(s.type===I.Fragment){n.push.apply(n,hi(s.props.children,i));return}Ve(s.type===oe,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ve(!s.props.index||!s.props.children,"An index route cannot have child routes.");let o={id:s.props.id||i.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(o.children=hi(s.props.children,i)),n.push(o)}),n}var Ds="get",Os="application/x-www-form-urlencoded";function ba(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function H0(e){return ba(e)&&e.tagName.toLowerCase()==="button"}function Y0(e){return ba(e)&&e.tagName.toLowerCase()==="form"}function W0(e){return ba(e)&&e.tagName.toLowerCase()==="input"}function K0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Q0(e,t){return e.button===0&&(!t||t==="_self")&&!K0(e)}function fi(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(a=>[n,a]):[[n,s]])},[]))}function G0(e,t){let n=fi(e);return t&&t.forEach((s,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var Ns=null;function J0(){if(Ns===null)try{new FormData(document.createElement("form"),0),Ns=!1}catch{Ns=!0}return Ns}var X0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ya(e){return e!=null&&!X0.has(e)?(Pt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Os}"`),null):e}function _0(e,t){let n,s,a,i,o;if(Y0(e)){let l=e.getAttribute("action");s=l?dn(l,t):null,n=e.getAttribute("method")||Ds,a=Ya(e.getAttribute("enctype"))||Os,i=new FormData(e)}else if(H0(e)||W0(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(s=c?dn(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||Ds,a=Ya(e.getAttribute("formenctype"))||Ya(l.getAttribute("enctype"))||Os,i=new FormData(l,e),!J0()){let{name:u,type:d,value:m}=e;if(d==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,m)}}else{if(ba(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ds,s=null,a=Os,o=e}return i&&a==="text/plain"&&(o=i,i=void 0),{action:s,method:n.toLowerCase(),encType:a,formData:i,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function no(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Su(e,t,n,s){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${s}`:a.pathname=`${a.pathname}.${s}`:a.pathname==="/"?a.pathname=`_root.${s}`:t&&dn(a.pathname,t)==="/"?a.pathname=`${Ys(t)}/_root.${s}`:a.pathname=`${Ys(a.pathname)}.${s}`,a}async function $0(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function eh(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function th(e,t,n){let s=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let o=await $0(i,n);return o.links?o.links():[]}return[]}));return ah(s.flat(1).filter(eh).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Pl(e,t,n,s,a,i){let o=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,l=(c,u)=>{var d;return n[u].pathname!==c.pathname||((d=n[u].route.path)==null?void 0:d.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>o(c,u)||l(c,u)):i==="data"?t.filter((c,u)=>{var m;let d=s.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(o(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function nh(e,t,{includeHydrateFallback:n}={}){return rh(e.map(s=>{let a=t.routes[s.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function rh(e){return[...new Set(e)]}function sh(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function ah(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let i=JSON.stringify(sh(a));return n.has(i)||(n.add(i),s.push({key:i,link:a})),s},[])}function ro(){let e=I.useContext(Dr);return no(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ih(){let e=I.useContext(ga);return no(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var so=I.createContext(void 0);so.displayName="FrameworkContext";function va(){let e=I.useContext(so);return no(e,"You must render this element inside a <HydratedRouter> element"),e}function oh(e,t){let n=I.useContext(so),[s,a]=I.useState(!1),[i,o]=I.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:m}=t,h=I.useRef(null);I.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let p=C=>{C.forEach(g=>{o(g.isIntersecting)})},b=new IntersectionObserver(p,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),I.useEffect(()=>{if(s){let p=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(p)}}},[s]);let f=()=>{a(!0)},y=()=>{a(!1),o(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ur(l,f),onBlur:Ur(c,y),onMouseEnter:Ur(u,f),onMouseLeave:Ur(d,y),onTouchStart:Ur(m,f)}]:[!1,h,{}]}function Ur(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function lh({page:e,...t}){let n=y0(),{nonce:s}=va(),{router:a}=ro(),i=I.useMemo(()=>ou(a.routes,e,a.basename),[a.routes,e,a.basename]);return i?(t.nonce==null&&s&&(t={...t,nonce:s}),n?I.createElement(uh,{page:e,matches:i,...t}):I.createElement(dh,{page:e,matches:i,...t})):null}function ch(e){let{manifest:t,routeModules:n}=va(),[s,a]=I.useState([]);return I.useEffect(()=>{let i=!1;return th(e,t,n).then(o=>{i||a(o)}),()=>{i=!0}},[e,t,n]),s}function uh({page:e,matches:t,...n}){let s=Ie(),{future:a}=va(),{basename:i}=ro(),o=I.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let l=Su(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?c=!0:u.push(d.route.id);return c&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[i,a.v8_trailingSlashAwareDataRequests,e,s,t]);return I.createElement(I.Fragment,null,o.map(l=>I.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...n})))}function dh({page:e,matches:t,...n}){let s=Ie(),{future:a,manifest:i,routeModules:o}=va(),{basename:l}=ro(),{loaderData:c,matches:u}=ih(),d=I.useMemo(()=>Pl(e,t,u,i,s,"data"),[e,t,u,i,s]),m=I.useMemo(()=>Pl(e,t,u,i,s,"assets"),[e,t,u,i,s]),h=I.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let p=new Set,b=!1;if(t.forEach(g=>{var j;let A=i.routes[g.route.id];!A||!A.hasLoader||(!d.some(k=>k.route.id===g.route.id)&&g.route.id in c&&((j=o[g.route.id])!=null&&j.shouldRevalidate)||A.hasClientLoader?b=!0:p.add(g.route.id))}),p.size===0)return[];let C=Su(e,l,a.v8_trailingSlashAwareDataRequests,"data");return b&&p.size>0&&C.searchParams.set("_routes",t.filter(g=>p.has(g.route.id)).map(g=>g.route.id).join(",")),[C.pathname+C.search]},[l,a.v8_trailingSlashAwareDataRequests,c,s,i,d,t,e,o]),f=I.useMemo(()=>nh(m,i),[m,i]),y=ch(m);return I.createElement(I.Fragment,null,h.map(p=>I.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),f.map(p=>I.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),y.map(({key:p,link:b})=>I.createElement("link",{key:p,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function mh(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var hh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hh&&(window.__reactRouterVersion="7.18.1")}catch{}var Au=I.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:a,reloadDocument:i,replace:o,mask:l,state:c,target:u,to:d,preventScrollReset:m,viewTransition:h,defaultShouldRevalidate:f,...y},p){let{basename:b,navigator:C,useTransitions:g}=I.useContext(It),A=typeof d=="string"&&Ji.test(d),j=fu(d,b);d=j.to;let k=S0(d,{relative:a}),N=Ie(),T=null;if(l){let V=xa(l,[],N.mask?N.mask.pathname:"/",!0);b!=="/"&&(V.pathname=V.pathname==="/"?b:Ht([b,V.pathname])),T=C.createHref(V)}let[D,q,$]=oh(s,y),F=gh(d,{replace:o,mask:l,state:c,target:u,preventScrollReset:m,relative:a,viewTransition:h,defaultShouldRevalidate:f,useTransitions:g});function W(V){t&&t(V),V.defaultPrevented||F(V)}let B=!(j.isExternal||i),ne=I.createElement("a",{...y,...$,href:(B?T:void 0)||j.absoluteURL||k,onClick:B?W:t,ref:mh(p,q),target:u,"data-discover":!A&&n==="render"?"true":void 0});return D&&!A?I.createElement(I.Fragment,null,ne,I.createElement(lh,{page:k})):ne});Au.displayName="Link";var fh=I.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:a=!1,style:i,to:o,viewTransition:l,children:c,...u},d){let m=us(o,{relative:u.relative}),h=Ie(),f=I.useContext(ga),{navigator:y,basename:p}=I.useContext(It),b=f!=null&&wh(m)&&l===!0,C=y.encodeLocation?y.encodeLocation(m).pathname:m.pathname,g=h.pathname,A=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(g=g.toLowerCase(),A=A?A.toLowerCase():null,C=C.toLowerCase()),A&&p&&(A=dn(A,p)||A);const j=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let k=g===C||!a&&g.startsWith(C)&&g.charAt(j)==="/",N=A!=null&&(A===C||!a&&A.startsWith(C)&&A.charAt(C.length)==="/"),T={isActive:k,isPending:N,isTransitioning:b},D=k?t:void 0,q;typeof s=="function"?q=s(T):q=[s,k?"active":null,N?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let $=typeof i=="function"?i(T):i;return I.createElement(Au,{...u,"aria-current":D,className:q,ref:d,style:$,to:o,viewTransition:l},typeof c=="function"?c(T):c)});fh.displayName="NavLink";var ph=I.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:i,method:o=Ds,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h,...f},y)=>{let{useTransitions:p}=I.useContext(It),b=Ch(),C=jh(l,{relative:u}),g=o.toLowerCase()==="get"?"get":"post",A=typeof l=="string"&&Ji.test(l),j=k=>{if(c&&c(k),k.defaultPrevented)return;k.preventDefault();let N=k.nativeEvent.submitter,T=(N==null?void 0:N.getAttribute("formmethod"))||o,D=()=>b(N||k.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:a,state:i,relative:u,preventScrollReset:d,viewTransition:m,defaultShouldRevalidate:h});p&&n!==!1?I.startTransition(()=>D()):D()};return I.createElement("form",{ref:y,method:g,action:C,onSubmit:s?c:j,...f,"data-discover":!A&&e==="render"?"true":void 0})});ph.displayName="Form";function xh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ku(e){let t=I.useContext(Dr);return Ve(t,xh(e)),t}function gh(e,{target:t,replace:n,mask:s,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:c,useTransitions:u}={}){let d=Ae(),m=Ie(),h=us(e,{relative:o});return I.useCallback(f=>{if(Q0(f,t)){f.preventDefault();let y=n!==void 0?n:Bs(m)===Bs(h),p=()=>d(e,{replace:y,mask:s,state:a,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:c});u?I.startTransition(()=>p()):p()}},[m,d,h,n,s,a,t,e,i,o,l,c,u])}function yh(e){Pt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=I.useRef(fi(e)),n=I.useRef(!1),s=Ie(),a=I.useMemo(()=>G0(s.search,n.current?null:t.current),[s.search]),i=Ae(),o=I.useCallback((l,c)=>{const u=fi(typeof l=="function"?l(new URLSearchParams(a)):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}var bh=0,vh=()=>`__${String(++bh)}__`;function Ch(){let{router:e}=ku("useSubmit"),{basename:t}=I.useContext(It),n=O0(),s=e.fetch,a=e.navigate;return I.useCallback(async(i,o={})=>{let{action:l,method:c,encType:u,formData:d,body:m}=_0(i,t);if(o.navigate===!1){let h=o.fetcherKey||vh();await s(h,n,o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:m,formMethod:o.method||c,formEncType:o.encType||u,flushSync:o.flushSync})}else await a(o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:d,body:m,formMethod:o.method||c,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[s,a,t,n])}function jh(e,{relative:t}={}){let{basename:n}=I.useContext(It),s=I.useContext(zt);Ve(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),i={...us(e||".",{relative:t})},o=Ie();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Ht([n,i.pathname])),Bs(i)}function wh(e,{relative:t}={}){let n=I.useContext(gu);Ve(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=ku("useViewTransitionState"),a=us(e,{relative:t});if(!n.isTransitioning)return!1;let i=dn(n.currentLocation.pathname,s)||n.currentLocation.pathname,o=dn(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Hs(a.pathname,o)!=null||Hs(a.pathname,i)!=null}var zr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yn,vn,xr,Jc,Nh=(Jc=class extends zr{constructor(){super();ae(this,Yn);ae(this,vn);ae(this,xr);J(this,xr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,vn)||this.setEventListener(S(this,xr))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,vn))==null||t.call(this),J(this,vn,void 0))}setEventListener(t){var n;J(this,xr,t),(n=S(this,vn))==null||n.call(this),J(this,vn,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){S(this,Yn)!==t&&(J(this,Yn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,Yn)=="boolean"?S(this,Yn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Yn=new WeakMap,vn=new WeakMap,xr=new WeakMap,Jc),ao=new Nh,Sh={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Qt,Wn,Xc,Ah=(Xc=class{constructor(){ae(this,Qt,Sh);ae(this,Wn,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&S(this,Wn)&&e!==S(this,Qt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:S(this,Qt),provider:e}),J(this,Qt,e),process.env.NODE_ENV!=="production"&&J(this,Wn,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&J(this,Wn,!0),S(this,Qt).setTimeout(e,t)}clearTimeout(e){S(this,Qt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&J(this,Wn,!0),S(this,Qt).setInterval(e,t)}clearInterval(e){S(this,Qt).clearInterval(e)}},Qt=new WeakMap,Wn=new WeakMap,Xc),Hn=new Ah;function kh(e){setTimeout(e,0)}var Ph=typeof window>"u"||"Deno"in globalThis;function ht(){}function Ih(e,t){return typeof e=="function"?e(t):e}function pi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tn(e,t){return typeof e=="function"?e(t):e}function St(e,t){return typeof e=="function"?e(t):e}function Il(e,t){const{type:n="all",exact:s,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(s){if(t.queryHash!==io(o,t.options))return!1}else if(!Xr(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function El(e,t){const{exact:n,status:s,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(nr(t.options.mutationKey)!==nr(i))return!1}else if(!Xr(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||a&&!a(t))}function io(e,t){return((t==null?void 0:t.queryKeyHashFn)||nr)(e)}function nr(e){return JSON.stringify(e,(t,n)=>gi(n)?Object.keys(n).sort().reduce((s,a)=>(s[a]=n[a],s),{}):n)}function Xr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xr(e[n],t[n])):!1}var Eh=Object.prototype.hasOwnProperty;function xi(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=Tl(e)&&Tl(t);if(!s&&!(gi(e)&&gi(t)))return t;const i=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),l=o.length,c=s?new Array(l):{};let u=0;for(let d=0;d<l;d++){const m=s?d:o[d],h=e[m],f=t[m];if(h===f){c[m]=h,(s?d<i:Eh.call(e,m))&&u++;continue}if(h===null||f===null||typeof h!="object"||typeof f!="object"){c[m]=f;continue}const y=xi(h,f,n+1);c[m]=y,y===h&&u++}return i===l&&u===i?e:c}function Ws(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Tl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gi(e){if(!Ll(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ll(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ll(e){return Object.prototype.toString.call(e)==="[object Object]"}function Th(e){return new Promise(t=>{Hn.setTimeout(t,e)})}function yi(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return xi(e,t)}catch(s){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${s}`),s}return xi(e,t)}return t}function Wa(e){return e}function Lh(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Fh(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Ks=Symbol();function Iu(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Ks&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ks?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oo(e,t){return typeof e=="function"?e(...t):!!e}function Rh(e,t,n){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),s||(s=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var _r=(()=>{let e=()=>Ph;return{isServer(){return e()},setIsServer(t){e=t}}})();function bi(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function s(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},n.reject=a=>{s({status:"rejected",reason:a}),t(a)},n}var Mh=kh;function Dh(){let e=[],t=0,n=l=>{l()},s=l=>{l()},a=Mh;const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{s(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{s=l},setScheduler:l=>{a=l}}}var Xe=Dh(),gr,Cn,yr,_c,Oh=(_c=class extends zr{constructor(){super();ae(this,gr,!0);ae(this,Cn);ae(this,yr);J(this,yr,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){S(this,Cn)||this.setEventListener(S(this,yr))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Cn))==null||t.call(this),J(this,Cn,void 0))}setEventListener(t){var n;J(this,yr,t),(n=S(this,Cn))==null||n.call(this),J(this,Cn,t(this.setOnline.bind(this)))}setOnline(t){S(this,gr)!==t&&(J(this,gr,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return S(this,gr)}},gr=new WeakMap,Cn=new WeakMap,yr=new WeakMap,_c),Qs=new Oh;function zh(e){return Math.min(1e3*2**e,3e4)}function Eu(e){return(e??"online")==="online"?Qs.isOnline():!0}var vi=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Tu(e){let t=!1,n=0,s;const a=bi(),i=()=>a.status!=="pending",o=p=>{var b;if(!i()){const C=new vi(p);h(C),(b=e.onCancel)==null||b.call(e,C)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>ao.isFocused()&&(e.networkMode==="always"||Qs.isOnline())&&e.canRun(),d=()=>Eu(e.networkMode)&&e.canRun(),m=p=>{i()||(s==null||s(),a.resolve(p))},h=p=>{i()||(s==null||s(),a.reject(p))},f=()=>new Promise(p=>{var b;s=C=>{(i()||u())&&p(C)},(b=e.onPause)==null||b.call(e)}).then(()=>{var p;s=void 0,i()||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(i())return;let p;const b=n===0?e.initialPromise:void 0;try{p=b??e.fn()}catch(C){p=Promise.reject(C)}Promise.resolve(p).then(m).catch(C=>{var N;if(i())return;const g=e.retry??(_r.isServer()?0:3),A=e.retryDelay??zh,j=typeof A=="function"?A(n,C):A,k=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,C);if(t||!k){h(C);return}n++,(N=e.onFail)==null||N.call(e,n,C),Th(j).then(()=>u()?void 0:f()).then(()=>{t?h(C):y()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?y():f().then(y),a)}}var Kn,$c,Lu=($c=class{constructor(){ae(this,Kn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pi(this.gcTime)&&J(this,Kn,Hn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(_r.isServer()?1/0:300*1e3))}clearGcTimeout(){S(this,Kn)!==void 0&&(Hn.clearTimeout(S(this,Kn)),J(this,Kn,void 0))}},Kn=new WeakMap,$c);function qh(e){return{onFetch:(t,n)=>{var d,m,h,f,y;const s=t.options,a=(h=(m=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:m.fetchMore)==null?void 0:h.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const b=A=>{Rh(A,()=>t.signal,()=>p=!0)},C=Iu(t.options,t.fetchOptions),g=async(A,j,k)=>{if(p)return Promise.reject(t.signal.reason);if(j==null&&A.pages.length)return Promise.resolve(A);const T=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:j,direction:k?"backward":"forward",meta:t.options.meta};return b(F),F})(),D=await C(T),{maxPages:q}=t.options,$=k?Fh:Lh;return{pages:$(A.pages,D,q),pageParams:$(A.pageParams,j,q)}};if(a&&i.length){const A=a==="backward",j=A?Vh:Fl,k={pages:i,pageParams:o},N=j(s,k);l=await g(k,N,A)}else{const A=e??i.length;do{const j=c===0?o[0]??s.initialPageParam:Fl(s,l);if(c>0&&j==null)break;l=await g(l,j),c++}while(c<A)}return l};t.options.persister?t.fetchFn=()=>{var p,b;return(b=(p=t.options).persister)==null?void 0:b.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Fl(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function Vh(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var br,Qn,vr,Dt,Gn,et,ss,Jn,Nt,Fu,rn,eu,Zh=(eu=class extends Lu{constructor(t){super();ae(this,Nt);ae(this,br);ae(this,Qn);ae(this,vr);ae(this,Dt);ae(this,Gn);ae(this,et);ae(this,ss);ae(this,Jn);J(this,Jn,!1),J(this,ss,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,Gn,t.client),J(this,Dt,S(this,Gn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,Qn,Ml(this.options)),this.state=t.state??S(this,Qn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return S(this,br)}get promise(){var t;return(t=S(this,et))==null?void 0:t.promise}setOptions(t){if(this.options={...S(this,ss),...t},t!=null&&t._type&&J(this,br,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ml(this.options);n.data!==void 0&&(this.setState(Rl(n.data,n.dataUpdatedAt)),J(this,Qn,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Dt).remove(this)}setData(t,n){const s=yi(this.state.data,t,this.options);return de(this,Nt,rn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t){de(this,Nt,rn).call(this,{type:"setState",state:t})}cancel(t){var s,a;const n=(s=S(this,et))==null?void 0:s.promise;return(a=S(this,et))==null||a.cancel(t),n?n.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return S(this,Qn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>St(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ks||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Tn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Pu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,et))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,et))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Dt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,et)&&(S(this,Jn)||de(this,Nt,Fu).call(this)?S(this,et).cancel({revert:!0}):S(this,et).cancelRetry()),this.scheduleGc()),S(this,Dt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,Nt,rn).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,m,h,f,y,p,b,C,g,A;if(this.state.fetchStatus!=="idle"&&((u=S(this,et))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,et))return S(this,et).continueRetry(),S(this,et).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(k=>k.options.queryFn);j&&this.setOptions(j.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,a=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(J(this,Jn,!0),s.signal)})},i=()=>{const j=Iu(this.options,n),N=(()=>{const T={client:S(this,Gn),queryKey:this.queryKey,meta:this.meta};return a(T),T})();return J(this,Jn,!1),this.options.persister?this.options.persister(j,N,this):j(N)},l=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,Gn),state:this.state,fetchFn:i};return a(j),j})(),c=S(this,br)==="infinite"?qh(this.options.pages):this.options.behavior;c==null||c.onFetch(l,this),J(this,vr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&de(this,Nt,rn).call(this,{type:"fetch",meta:(m=l.fetchOptions)==null?void 0:m.meta}),J(this,et,Tu({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:j=>{j instanceof vi&&j.revert&&this.setState({...S(this,vr),fetchStatus:"idle"}),s.abort()},onFail:(j,k)=>{de(this,Nt,rn).call(this,{type:"failed",failureCount:j,error:k})},onPause:()=>{de(this,Nt,rn).call(this,{type:"pause"})},onContinue:()=>{de(this,Nt,rn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const j=await S(this,et).start();if(j===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(j),(f=(h=S(this,Dt).config).onSuccess)==null||f.call(h,j,this),(p=(y=S(this,Dt).config).onSettled)==null||p.call(y,j,this.state.error,this),j}catch(j){if(j instanceof vi){if(j.silent)return S(this,et).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw de(this,Nt,rn).call(this,{type:"error",error:j}),(C=(b=S(this,Dt).config).onError)==null||C.call(b,j,this),(A=(g=S(this,Dt).config).onSettled)==null||A.call(g,this.state.data,j,this),j}finally{this.scheduleGc()}}},br=new WeakMap,Qn=new WeakMap,vr=new WeakMap,Dt=new WeakMap,Gn=new WeakMap,et=new WeakMap,ss=new WeakMap,Jn=new WeakMap,Nt=new WeakSet,Fu=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},rn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ru(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Rl(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,vr,t.manual?a:void 0),a;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),Xe.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),S(this,Dt).notify({query:this,type:"updated",action:t})})},eu);function Ru(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Eu(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ml(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var yt,fe,as,mt,Xn,Cr,sn,jn,is,jr,wr,_n,$n,wn,Nr,Ne,Kr,Ci,ji,wi,Ni,Si,Ai,ki,Mu,tu,Uh=(tu=class extends zr{constructor(t,n){super();ae(this,Ne);ae(this,yt);ae(this,fe);ae(this,as);ae(this,mt);ae(this,Xn);ae(this,Cr);ae(this,sn);ae(this,jn);ae(this,is);ae(this,jr);ae(this,wr);ae(this,_n);ae(this,$n);ae(this,wn);ae(this,Nr,new Set);this.options=n,J(this,yt,t),J(this,jn,null),J(this,sn,bi()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,fe).addObserver(this),Dl(S(this,fe),this.options)?de(this,Ne,Kr).call(this):this.updateResult(),de(this,Ne,Ni).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pi(S(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pi(S(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,Ne,Si).call(this),de(this,Ne,Ai).call(this),S(this,fe).removeObserver(this)}setOptions(t){const n=this.options,s=S(this,fe);if(this.options=S(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof St(this.options.enabled,S(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,Ne,ki).call(this),S(this,fe).setOptions(this.options),n._defaulted&&!Ws(this.options,n)&&S(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,fe),observer:this});const a=this.hasListeners();a&&Ol(S(this,fe),s,this.options,n)&&de(this,Ne,Kr).call(this),this.updateResult(),a&&(S(this,fe)!==s||St(this.options.enabled,S(this,fe))!==St(n.enabled,S(this,fe))||Tn(this.options.staleTime,S(this,fe))!==Tn(n.staleTime,S(this,fe)))&&de(this,Ne,Ci).call(this);const i=de(this,Ne,ji).call(this);a&&(S(this,fe)!==s||St(this.options.enabled,S(this,fe))!==St(n.enabled,S(this,fe))||i!==S(this,wn))&&de(this,Ne,wi).call(this,i)}getOptimisticResult(t){const n=S(this,yt).getQueryCache().build(S(this,yt),t),s=this.createResult(n,t);return Hh(this,s)&&(J(this,mt,s),J(this,Cr,this.options),J(this,Xn,S(this,fe).state)),s}getCurrentResult(){return S(this,mt)}trackResult(t,n){return new Proxy(t,{get:(s,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&S(this,sn).status==="pending"&&S(this,sn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(t){S(this,Nr).add(t)}getCurrentQuery(){return S(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=S(this,yt).defaultQueryOptions(t),s=S(this,yt).getQueryCache().build(S(this,yt),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return de(this,Ne,Kr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,mt)))}createResult(t,n){var q;const s=S(this,fe),a=this.options,i=S(this,mt),o=S(this,Xn),l=S(this,Cr),u=t!==s?t.state:S(this,as),{state:d}=t;let m={...d},h=!1,f;if(n._optimisticResults){const $=this.hasListeners(),F=!$&&Dl(t,n),W=$&&Ol(t,s,n,a);(F||W)&&(m={...m,...Ru(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:b}=m;f=m.data;let C=!1;if(n.placeholderData!==void 0&&f===void 0&&b==="pending"){let $;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?($=i.data,C=!0):$=typeof n.placeholderData=="function"?n.placeholderData((q=S(this,wr))==null?void 0:q.state.data,S(this,wr)):n.placeholderData,$!==void 0&&(b="success",f=yi(i==null?void 0:i.data,$,n),h=!0)}if(n.select&&f!==void 0&&!C)if(i&&f===(o==null?void 0:o.data)&&n.select===S(this,is))f=S(this,jr);else try{J(this,is,n.select),f=n.select(f),f=yi(i==null?void 0:i.data,f,n),J(this,jr,f),J(this,jn,null)}catch($){J(this,jn,$)}S(this,jn)&&(y=S(this,jn),f=S(this,jr),p=Date.now(),b="error");const g=m.fetchStatus==="fetching",A=b==="pending",j=b==="error",k=A&&g,N=f!==void 0,D={status:b,fetchStatus:m.fetchStatus,isPending:A,isSuccess:b==="success",isError:j,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>u.dataUpdateCount||m.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!A,isLoadingError:j&&!N,isPaused:m.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:j&&N,isStale:lo(t,n),refetch:this.refetch,promise:S(this,sn),isEnabled:St(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=D.data!==void 0,F=D.status==="error"&&!$,W=V=>{F?V.reject(D.error):$&&V.resolve(D.data)},B=()=>{const V=J(this,sn,D.promise=bi());W(V)},ne=S(this,sn);switch(ne.status){case"pending":t.queryHash===s.queryHash&&W(ne);break;case"fulfilled":(F||D.data!==ne.value)&&B();break;case"rejected":(!F||D.error!==ne.reason)&&B();break}}return D}updateResult(){const t=S(this,mt),n=this.createResult(S(this,fe),this.options);if(J(this,Xn,S(this,fe).state),J(this,Cr,this.options),S(this,Xn).data!==void 0&&J(this,wr,S(this,fe)),Ws(n,t))return;J(this,mt,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!S(this,Nr).size)return!0;const o=new Set(i??S(this,Nr));return this.options.throwOnError&&o.add("error"),Object.keys(S(this,mt)).some(l=>{const c=l;return S(this,mt)[c]!==t[c]&&o.has(c)})};de(this,Ne,Mu).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,Ne,Ni).call(this)}},yt=new WeakMap,fe=new WeakMap,as=new WeakMap,mt=new WeakMap,Xn=new WeakMap,Cr=new WeakMap,sn=new WeakMap,jn=new WeakMap,is=new WeakMap,jr=new WeakMap,wr=new WeakMap,_n=new WeakMap,$n=new WeakMap,wn=new WeakMap,Nr=new WeakMap,Ne=new WeakSet,Kr=function(t){de(this,Ne,ki).call(this);let n=S(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ht)),n},Ci=function(){de(this,Ne,Si).call(this);const t=Tn(this.options.staleTime,S(this,fe));if(_r.isServer()||S(this,mt).isStale||!pi(t))return;const s=Pu(S(this,mt).dataUpdatedAt,t)+1;J(this,_n,Hn.setTimeout(()=>{S(this,mt).isStale||this.updateResult()},s))},ji=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(S(this,fe)):this.options.refetchInterval)??!1},wi=function(t){de(this,Ne,Ai).call(this),J(this,wn,t),!(_r.isServer()||St(this.options.enabled,S(this,fe))===!1||!pi(S(this,wn))||S(this,wn)===0)&&J(this,$n,Hn.setInterval(()=>{(this.options.refetchIntervalInBackground||ao.isFocused())&&de(this,Ne,Kr).call(this)},S(this,wn)))},Ni=function(){de(this,Ne,Ci).call(this),de(this,Ne,wi).call(this,de(this,Ne,ji).call(this))},Si=function(){S(this,_n)!==void 0&&(Hn.clearTimeout(S(this,_n)),J(this,_n,void 0))},Ai=function(){S(this,$n)!==void 0&&(Hn.clearInterval(S(this,$n)),J(this,$n,void 0))},ki=function(){const t=S(this,yt).getQueryCache().build(S(this,yt),this.options);if(t===S(this,fe))return;const n=S(this,fe);J(this,fe,t),J(this,as,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Mu=function(t){Xe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(S(this,mt))}),S(this,yt).getQueryCache().notify({query:S(this,fe),type:"observerResultsUpdated"})})},tu);function Bh(e,t){return St(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&St(t.retryOnMount,e)===!1)}function Dl(e,t){return Bh(e,t)||e.state.data!==void 0&&Pi(e,t,t.refetchOnMount)}function Pi(e,t,n){if(St(t.enabled,e)!==!1&&Tn(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&lo(e,t)}return!1}function Ol(e,t,n,s){return(e!==t||St(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lo(e,n)}function lo(e,t){return St(t.enabled,e)!==!1&&e.isStaleByTime(Tn(t.staleTime,e))}function Hh(e,t){return!Ws(e.getCurrentResult(),t)}var os,Gt,it,er,Jt,yn,nu,Yh=(nu=class extends Lu{constructor(t){super();ae(this,Jt);ae(this,os);ae(this,Gt);ae(this,it);ae(this,er);J(this,os,t.client),this.mutationId=t.mutationId,J(this,it,t.mutationCache),J(this,Gt,[]),this.state=t.state||Du(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,Gt).includes(t)||(S(this,Gt).push(t),this.clearGcTimeout(),S(this,it).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,Gt,S(this,Gt).filter(n=>n!==t)),this.scheduleGc(),S(this,it).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,Gt).length||(this.state.status==="pending"?this.scheduleGc():S(this,it).remove(this))}continue(){var t;return((t=S(this,er))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,u,d,m,h,f,y,p,b,C,g,A,j,k,N,T;const n=()=>{de(this,Jt,yn).call(this,{type:"continue"})},s={client:S(this,os),meta:this.options.meta,mutationKey:this.options.mutationKey};J(this,er,Tu({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(D,q)=>{de(this,Jt,yn).call(this,{type:"failed",failureCount:D,error:q})},onPause:()=>{de(this,Jt,yn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,it).canRun(this)}));const a=this.state.status==="pending",i=!S(this,er).canStart();try{if(a)n();else{de(this,Jt,yn).call(this,{type:"pending",variables:t,isPaused:i}),S(this,it).config.onMutate&&await S(this,it).config.onMutate(t,this,s);const q=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,s));q!==this.state.context&&de(this,Jt,yn).call(this,{type:"pending",context:q,variables:t,isPaused:i})}const D=await S(this,er).start();return await((u=(c=S(this,it).config).onSuccess)==null?void 0:u.call(c,D,t,this.state.context,this,s)),await((m=(d=this.options).onSuccess)==null?void 0:m.call(d,D,t,this.state.context,s)),await((f=(h=S(this,it).config).onSettled)==null?void 0:f.call(h,D,null,this.state.variables,this.state.context,this,s)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,D,null,t,this.state.context,s)),de(this,Jt,yn).call(this,{type:"success",data:D}),D}catch(D){try{await((C=(b=S(this,it).config).onError)==null?void 0:C.call(b,D,t,this.state.context,this,s))}catch(q){Promise.reject(q)}try{await((A=(g=this.options).onError)==null?void 0:A.call(g,D,t,this.state.context,s))}catch(q){Promise.reject(q)}try{await((k=(j=S(this,it).config).onSettled)==null?void 0:k.call(j,void 0,D,this.state.variables,this.state.context,this,s))}catch(q){Promise.reject(q)}try{await((T=(N=this.options).onSettled)==null?void 0:T.call(N,void 0,D,t,this.state.context,s))}catch(q){Promise.reject(q)}throw de(this,Jt,yn).call(this,{type:"error",error:D}),D}finally{S(this,it).runNext(this)}}},os=new WeakMap,Gt=new WeakMap,it=new WeakMap,er=new WeakMap,Jt=new WeakSet,yn=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Xe.batch(()=>{S(this,Gt).forEach(s=>{s.onMutationUpdate(t)}),S(this,it).notify({mutation:this,type:"updated",action:t})})},nu);function Du(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var an,Zt,ls,ru,Wh=(ru=class extends zr{constructor(t={}){super();ae(this,an);ae(this,Zt);ae(this,ls);this.config=t,J(this,an,new Set),J(this,Zt,new Map),J(this,ls,0)}build(t,n,s){const a=new Yh({client:t,mutationCache:this,mutationId:++ws(this,ls)._,options:t.defaultMutationOptions(n),state:s});return this.add(a),a}add(t){S(this,an).add(t);const n=Ss(t);if(typeof n=="string"){const s=S(this,Zt).get(n);s?s.push(t):S(this,Zt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,an).delete(t)){const n=Ss(t);if(typeof n=="string"){const s=S(this,Zt).get(n);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&S(this,Zt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ss(t);if(typeof n=="string"){const s=S(this,Zt).get(n),a=s==null?void 0:s.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var s;const n=Ss(t);if(typeof n=="string"){const a=(s=S(this,Zt).get(n))==null?void 0:s.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Xe.batch(()=>{S(this,an).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,an).clear(),S(this,Zt).clear()})}getAll(){return Array.from(S(this,an))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>El(n,s))}findAll(t={}){return this.getAll().filter(n=>El(t,n))}notify(t){Xe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Xe.batch(()=>Promise.all(t.map(n=>n.continue().catch(ht))))}},an=new WeakMap,Zt=new WeakMap,ls=new WeakMap,ru);function Ss(e){var t;return(t=e.options.scope)==null?void 0:t.id}var on,Nn,bt,ln,un,zs,Ii,su,Kh=(su=class extends zr{constructor(t,n){super();ae(this,un);ae(this,on);ae(this,Nn);ae(this,bt);ae(this,ln);J(this,on,t),this.setOptions(n),this.bindMethods(),de(this,un,zs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=S(this,on).defaultMutationOptions(t),Ws(this.options,n)||S(this,on).getMutationCache().notify({type:"observerOptionsUpdated",mutation:S(this,bt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&nr(n.mutationKey)!==nr(this.options.mutationKey)?this.reset():((s=S(this,bt))==null?void 0:s.state.status)==="pending"&&S(this,bt).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=S(this,bt))==null||t.removeObserver(this)}onMutationUpdate(t){de(this,un,zs).call(this),de(this,un,Ii).call(this,t)}getCurrentResult(){return S(this,Nn)}reset(){var t;(t=S(this,bt))==null||t.removeObserver(this),J(this,bt,void 0),de(this,un,zs).call(this),de(this,un,Ii).call(this)}mutate(t,n){var s;return J(this,ln,n),(s=S(this,bt))==null||s.removeObserver(this),J(this,bt,S(this,on).getMutationCache().build(S(this,on),this.options)),S(this,bt).addObserver(this),S(this,bt).execute(t)}},on=new WeakMap,Nn=new WeakMap,bt=new WeakMap,ln=new WeakMap,un=new WeakSet,zs=function(){var n;const t=((n=S(this,bt))==null?void 0:n.state)??Du();J(this,Nn,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ii=function(t){Xe.batch(()=>{var n,s,a,i,o,l,c,u;if(S(this,ln)&&this.hasListeners()){const d=S(this,Nn).variables,m=S(this,Nn).context,h={client:S(this,on),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(n=S(this,ln)).onSuccess)==null||s.call(n,t.data,d,m,h)}catch(f){Promise.reject(f)}try{(i=(a=S(this,ln)).onSettled)==null||i.call(a,t.data,null,d,m,h)}catch(f){Promise.reject(f)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=S(this,ln)).onError)==null||l.call(o,t.error,d,m,h)}catch(f){Promise.reject(f)}try{(u=(c=S(this,ln)).onSettled)==null||u.call(c,void 0,t.error,d,m,h)}catch(f){Promise.reject(f)}}}this.listeners.forEach(d=>{d(S(this,Nn))})})},su),Xt,au,Qh=(au=class extends zr{constructor(t={}){super();ae(this,Xt);this.config=t,J(this,Xt,new Map)}build(t,n,s){const a=n.queryKey,i=n.queryHash??io(a,n);let o=this.get(i);return o||(o=new Zh({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){S(this,Xt).has(t.queryHash)||(S(this,Xt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,Xt).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,Xt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Xe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,Xt).get(t)}getAll(){return[...S(this,Xt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>Il(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>Il(t,s)):n}notify(t){Xe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Xe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Xe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xt=new WeakMap,au),He,Sn,An,Sr,Ar,kn,kr,Pr,iu,Gh=(iu=class{constructor(e={}){ae(this,He);ae(this,Sn);ae(this,An);ae(this,Sr);ae(this,Ar);ae(this,kn);ae(this,kr);ae(this,Pr);J(this,He,e.queryCache||new Qh),J(this,Sn,e.mutationCache||new Wh),J(this,An,e.defaultOptions||{}),J(this,Sr,new Map),J(this,Ar,new Map),J(this,kn,0)}mount(){ws(this,kn)._++,S(this,kn)===1&&(J(this,kr,ao.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,He).onFocus())})),J(this,Pr,Qs.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,He).onOnline())})))}unmount(){var e,t;ws(this,kn)._--,S(this,kn)===0&&((e=S(this,kr))==null||e.call(this),J(this,kr,void 0),(t=S(this,Pr))==null||t.call(this),J(this,Pr,void 0))}isFetching(e){return S(this,He).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,Sn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,He).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,He).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Tn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return S(this,He).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),a=S(this,He).get(s.queryHash),i=a==null?void 0:a.state.data,o=Ih(t,i);if(o!==void 0)return S(this,He).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Xe.batch(()=>S(this,He).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,He).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,He);Xe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,He);return Xe.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Xe.batch(()=>S(this,He).findAll(e).map(a=>a.cancel(n)));return Promise.all(s).then(ht).catch(ht)}invalidateQueries(e,t={}){return Xe.batch(()=>(S(this,He).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Xe.batch(()=>S(this,He).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(ht)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,He).build(this,t);return n.isStaleByTime(Tn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ht).catch(ht)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ht).catch(ht)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Qs.isOnline()?S(this,Sn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,He)}getMutationCache(){return S(this,Sn)}getDefaultOptions(){return S(this,An)}setDefaultOptions(e){J(this,An,e)}setQueryDefaults(e,t){S(this,Sr).set(nr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Sr).values()],n={};return t.forEach(s=>{Xr(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Ar).set(nr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Ar).values()],n={};return t.forEach(s=>{Xr(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,An).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=io(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ks&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,An).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,He).clear(),S(this,Sn).clear()}},He=new WeakMap,Sn=new WeakMap,An=new WeakMap,Sr=new WeakMap,Ar=new WeakMap,kn=new WeakMap,kr=new WeakMap,Pr=new WeakMap,iu),Ou=I.createContext(void 0),pt=e=>{const t=I.useContext(Ou);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jh=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(Ou.Provider,{value:e,children:t})),zu=I.createContext(!1),Xh=()=>I.useContext(zu);zu.Provider;function _h(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $h=I.createContext(_h()),ef=()=>I.useContext($h),tf=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?oo(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},nf=e=>{I.useEffect(()=>{e.clearReset()},[e])},rf=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||oo(n,[e.error,s])),sf=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>n(s(...a)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},af=(e,t)=>e.isLoading&&e.isFetching&&!t,of=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lf(e,t,n){var f,y,p,b;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=Xh(),a=ef(),i=pt(),o=i.defaultQueryOptions(e);(y=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||y.call(f,o);const l=i.getQueryCache().get(o.queryHash);process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));const c=e.subscribed!==!1;o._optimisticResults=s?"isRestoring":c?"optimistic":void 0,sf(o),tf(o,a,l),nf(a);const u=!i.getQueryCache().get(o.queryHash),[d]=I.useState(()=>new t(i,o)),m=d.getOptimisticResult(o),h=!s&&c;if(I.useSyncExternalStore(I.useCallback(C=>{const g=h?d.subscribe(Xe.batchCalls(C)):ht;return d.updateResult(),g},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),I.useEffect(()=>{d.setOptions(o)},[o,d]),of(o,m))throw zl(o,d,a);if(rf({result:m,errorResetBoundary:a,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw m.error;if((b=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||b.call(p,o,m),o.experimental_prefetchInRender&&!_r.isServer()&&af(m,s)){const C=u?zl(o,d,a):l==null?void 0:l.promise;C==null||C.catch(ht).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?m:d.trackResult(m)}function ue(e,t){return lf(e,Uh)}function cf(e,t){const n=pt(),[s]=I.useState(()=>new Kh(n,e));I.useEffect(()=>{s.setOptions(e)},[s,e]);const a=I.useSyncExternalStore(I.useCallback(o=>s.subscribe(Xe.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i=I.useCallback((o,l)=>{s.mutate(o,l).catch(ht)},[s]);if(a.error&&oo(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}function qu(e){return e.trim().replace(/\/+$/,"")}const Ca=new Map;function Vu(e,t){Ca.set(e,t)}function uf(e){return Ca.get(e)}function df(e){Ca.delete(e)}function mf(e){for(const[t,n]of Ca)if(n.accessToken===e)return t}let Ei=null;function Zu(e){Ei=qu(e)}let Uu=null;function hf(e){Uu=e}function ff(){return Uu}let Bu=null;function pf(e){Bu=e.trim()}function xf(){return Bu}function gf(){return Ei!==null?Ei:qu("")}const ql={get apiBaseUrl(){return gf()},apiVersion:"v1"};function yf(e){const t=e.startsWith("/")?e:`/${e}`;return`${ql.apiBaseUrl}/api/${ql.apiVersion}${t}`}const Hu="auth:session-expired";function bf(){window.dispatchEvent(new CustomEvent(Hu))}function Yu(e){return`${Hu}:${e}`}const Wu=x.createContext(null);function vf({instanceId:e,accessToken:t,onSessionExpired:n,children:s}){const a=uf(e);return a&&Vu(e,{...a,accessToken:t}),hf(t),x.useEffect(()=>{if(!n)return;const i=Yu(e),o=()=>n();return window.addEventListener(i,o),()=>window.removeEventListener(i,o)},[e,n]),r.jsx(Wu.Provider,{value:{accessToken:t},children:s})}function Cf(){const e=x.useContext(Wu);if(!e)throw new Error("useEmbeddedAuth must be used inside EmbeddedAuthProvider");return e}class mn extends Error{constructor(n,s,a,i,o){super(a??s);Zr(this,"status");Zr(this,"title");Zr(this,"details");Zr(this,"extensions");this.name="ApiError",this.status=n,this.title=s,this.details=i,this.extensions=o}}const Ku="tax-remittance.auth";function Qu(){var t;const e=localStorage.getItem(Ku);if(!e)return null;try{const n=JSON.parse(e);return!n.accessToken||!((t=n.user)!=null&&t.userId)?null:new Date(n.user.expiresAt)<=new Date?(Ti(),null):n}catch{return Ti(),null}}function Ti(){localStorage.removeItem(Ku)}function jf(){var e;return((e=Qu())==null?void 0:e.accessToken)??null}async function wf(e){let t=null;try{t=await e.json()}catch{}const n=(t==null?void 0:t.title)??"Request failed",s=t==null?void 0:t.detail,a=t==null?void 0:t.errors;return new mn(e.status,n,s,a,t??void 0)}async function ds(e,t={}){const{body:n,auth:s=!0,headers:a,responseType:i="json",...o}=t,l=new Headers(a);i==="blob"?l.set("Accept","application/pdf"):i==="text"?l.set("Accept","text/html"):l.set("Accept","application/json"),n!==void 0&&l.set("Content-Type","application/json");let c=null;if(s){const m=ff()??jf();m&&(c=m,l.set("Authorization",`Bearer ${m}`))}const u=xf();u&&l.set("X-Client-ID",u);const d=await fetch(yf(e),{...o,headers:l,body:n!==void 0?JSON.stringify(n):void 0});if(!d.ok){const m=await wf(d);if(s&&m.status===401){Ti();const h=c?mf(c):void 0;h?window.dispatchEvent(new CustomEvent(Yu(h))):bf()}throw m}if(d.status!==204)return i==="blob"?await d.blob():i==="text"?await d.text():await d.json()}async function me(e,t={}){return(await ds(e,t)).data}const Nf=1e3;async function co(){const e=await me(`/portal/entities/mine?pageSize=${Nf}`);return(e==null?void 0:e.items)??[]}function Sf(e){return me("/portal/entities",{method:"POST",body:e})}function Af(e,t){return me(`/portal/entities/${e}`,{method:"PATCH",body:t})}function kf(e,t){return me(`/portal/entities/${e}`,{method:"PATCH",body:{status:t}})}const Pf=["unique_name","name","given_name","preferred_username","http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"];function If(e){const t=e==null?void 0:e.split(".")[1];if(!t)return null;try{const n=t.replace(/-/g,"+").replace(/_/g,"/"),s=n.padEnd(n.length+(4-n.length%4)%4,"="),a=Uint8Array.from(atob(s),o=>o.charCodeAt(0)),i=JSON.parse(new TextDecoder().decode(a));return typeof i=="object"&&i!==null?i:null}catch{return null}}function Ef(e){if(!e)return;const t=If(e);if(t)for(const n of Pf){const s=t[n];if(typeof s=="string"&&s.trim())return s.trim()}}const Gu=x.createContext(null);function Tf({onOrganizationCreated:e,enabledPayments:t=["federal","state"],onPaymentRequired:n,userName:s,children:a}){var g;const[i,o]=x.useState(null),{accessToken:l}=Cf(),c=x.useMemo(()=>(s==null?void 0:s.trim())||Ef(l),[s,l]),{data:u=[],isLoading:d,isError:m,refetch:h}=ue({queryKey:["entities","mine"],queryFn:co}),f=x.useRef(new Set),y=x.useRef(!1);x.useEffect(()=>{if(d)return;if(!y.current){u.forEach(j=>f.current.add(j.entityId)),y.current=!0;return}u.filter(j=>!f.current.has(j.entityId)).forEach(j=>{f.current.add(j.entityId),e==null||e(j)})},[u,d,e]);const p=i!==null&&u.some(A=>A.entityId===i)?i:((g=u[0])==null?void 0:g.entityId)??null,b=u.find(A=>A.entityId===p)??null,C=async()=>{await h()};return r.jsx(Gu.Provider,{value:{entities:u,isLoading:d,isError:m,selectedEntity:b,setSelectedEntityId:o,refetchEntities:C,enabledPayments:t,onPaymentRequired:n,userName:c},children:a})}function Wt(){const e=x.useContext(Gu);if(!e)throw new Error("useEmbeddedContext must be used inside EmbeddedContextProvider");return e}const Lf=x.createContext(null),Ju=x.createContext(null);function Xu(){const e=document.createElement("div");return e.className="tax-remittance-embedded",e.setAttribute("data-tax-remittance-portal-root",""),e.style.minHeight="0",e.style.background="transparent",e}let Br=null;function Ff(){return(!Br||!Br.isConnected)&&(Br=Xu(),document.body.appendChild(Br)),Br}function ir(){return x.useContext(Ju)??Ff()}function Vl(e){const t={},n=(e==null?void 0:e.primaryColor)??"#2563eb";t["--embedded-primary"]=n,t["--embedded-primary-dark"]=`color-mix(in srgb, ${n} 82%, black)`,t["--embedded-primary-light"]=`color-mix(in srgb, ${n} 15%, white)`;const s=(e==null?void 0:e.secondaryColor)??"#0891b2";t["--embedded-secondary"]=s,t["--embedded-secondary-dark"]=`color-mix(in srgb, ${s} 82%, black)`,t["--embedded-secondary-light"]=`color-mix(in srgb, ${s} 15%, white)`;const a=(e==null?void 0:e.tertiaryColor)??"#7c3aed";return t["--embedded-tertiary"]=a,t["--embedded-tertiary-dark"]=`color-mix(in srgb, ${a} 82%, black)`,t["--embedded-tertiary-light"]=`color-mix(in srgb, ${a} 15%, white)`,e!=null&&e.borderRadius&&(t["--embedded-radius"]=e.borderRadius),t}function Rf({theme:e,children:t}){const n=Vl(e),s=e==null?void 0:e.fontFamily,a=JSON.stringify(n),i={...n};s&&(i.fontFamily=s),i.minHeight="100%";const[o]=x.useState(()=>typeof document>"u"?null:Xu());return x.useEffect(()=>{if(o)return document.body.appendChild(o),()=>{o.remove()}},[o]),x.useEffect(()=>{if(o){for(const[l,c]of Object.entries(Vl(e)))o.style.setProperty(l,c);o.style.fontFamily=s??""}},[o,a,s]),r.jsx(Ju.Provider,{value:o,children:r.jsx("div",{className:"tax-remittance-embedded",style:i,children:t})})}const _u=x.createContext(null),Mf=6e3;function Df(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Of({toast:e}){const t=e.variant==="success";return r.jsxs("div",{role:"alert",className:`tr-toast-enter flex max-w-full gap-2.5 rounded-lg border px-4 py-2.5 shadow-md ${e.message?"items-start":"items-center"} ${t?"border-emerald-100 bg-emerald-50":"border-red-100 bg-red-50"}`,children:[r.jsx("span",{"aria-hidden":"true",className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${t?"bg-emerald-600":"bg-red-500"} ${e.message?"mt-0.5":""}`,children:t?r.jsx(zf,{}):r.jsx(qf,{})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:`text-sm font-medium ${t?"text-emerald-800":"text-red-800"}`,children:e.title}),e.message?r.jsx("p",{className:`mt-0.5 text-xs ${t?"text-emerald-700":"text-red-700"}`,children:e.message}):null]})]})}function zf(){return r.jsx("svg",{className:"h-3 w-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function qf(){return r.jsx("svg",{className:"h-3 w-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75v6m0 4.25h.01"})})}function Vf({children:e}){const t=ir(),[n,s]=x.useState([]),a=x.useCallback(l=>{s(c=>c.filter(u=>u.id!==l))},[]),i=x.useCallback((l,c,u)=>{const d=Df();s(m=>[...m,{id:d,variant:l,title:c,message:u}]),window.setTimeout(()=>{a(d)},Mf)},[a]),o=x.useMemo(()=>({showSuccess:(l,c)=>i("success",l,c),showError:(l,c)=>i("error",l,c)}),[i]);return r.jsxs(_u.Provider,{value:o,children:[e,ft.createPortal(r.jsx("div",{className:"pointer-events-none fixed left-1/2 top-4 z-[200] flex max-w-[calc(100vw-2rem)] -translate-x-1/2 flex-col items-center gap-2",children:n.map(l=>r.jsx(Of,{toast:l},l.id))}),t)]})}function ja(){const e=x.useContext(_u);if(!e)throw new Error("useToast must be used within ToastProvider");return e}class Zf extends x.Component{constructor(t){super(t),this.state={hasError:!1,message:""}}static getDerivedStateFromError(t){return{hasError:!0,message:t instanceof Error?t.message:"Unexpected error"}}render(){return this.state.hasError?r.jsxs("div",{className:"flex min-h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[r.jsx("p",{className:"text-sm font-medium text-red-600",children:"Something went wrong loading this widget."}),r.jsx("p",{className:"text-xs text-slate-400",children:this.state.message}),r.jsx("button",{type:"button",className:"rounded-md bg-slate-100 px-4 py-2 text-sm text-slate-600 hover:bg-slate-200",onClick:()=>this.setState({hasError:!1,message:""}),children:"Try again"})]}):this.props.children}}function Uf(e){return e.startsWith("/dashboard")?"dashboard":e.startsWith("/payments")?"payments":e.startsWith("/tax-forms")?"tax-forms":e.startsWith("/settings")?"settings":e.startsWith("/create-entity/form")?"create-entity-form":e.startsWith("/create-entity")?"create-entity":"other"}function Bf({navigateFnRef:e,onNavigate:t}){const n=Ae(),s=Ie();return x.useEffect(()=>(e.current=n,()=>{e.current=null}),[n,e]),x.useEffect(()=>{t==null||t(Uf(s.pathname),s.pathname)},[s.pathname,t]),null}function Hf({selectEntityFnRef:e,onEntityChange:t}){const{setSelectedEntityId:n,selectedEntity:s}=Wt();return x.useEffect(()=>(e.current=n,()=>{e.current=null}),[n,e]),x.useEffect(()=>{s&&(t==null||t(s))},[s,t]),null}function uo({appKey:e,accessToken:t,apiBaseUrl:n,theme:s,onSessionExpired:a,onOrganizationCreated:i,onNavigate:o,onPaymentRequired:l,onEntityChange:c,navigateFnRef:u,selectEntityFnRef:d,enabledPayments:m,userName:h,children:f}){const[y]=x.useState(()=>crypto.randomUUID());Vu(y,{apiBaseUrl:n.trim().replace(/\/+$/,""),clientId:e.trim(),accessToken:t}),Zu(n),pf(e),x.useEffect(()=>()=>{df(y)},[y]);const[p]=x.useState(()=>new Gh({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}));return r.jsx(Lf.Provider,{value:y,children:r.jsx(Rf,{theme:s,children:r.jsx(Jh,{client:p,children:r.jsx(Vf,{children:r.jsx(vf,{instanceId:y,accessToken:t,onSessionExpired:a,children:r.jsx(Z0,{initialEntries:["/dashboard"],initialIndex:0,children:r.jsxs(Tf,{onOrganizationCreated:i,enabledPayments:m,onPaymentRequired:l,userName:h,children:[r.jsx(Bf,{navigateFnRef:u,onNavigate:o}),r.jsx(Hf,{selectEntityFnRef:d,onEntityChange:c}),r.jsx(Zf,{children:f})]})})})})})})})}function mo(){const{isLoading:e,isError:t,refetchEntities:n}=Wt(),s=Ae();return x.useEffect(()=>{e||t||s("/dashboard",{replace:!0})},[e,t,s]),e?r.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:r.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-slate-200 border-t-slate-600"})}):t?r.jsxs("div",{className:"flex min-h-[200px] flex-col items-center justify-center gap-3 px-4 text-center",children:[r.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-red-50",children:r.jsx("svg",{className:"h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),r.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Unable to load your account"}),r.jsx("p",{className:"text-xs text-slate-500",children:"Check your connection and try again."}),r.jsx("button",{type:"button",onClick:n,className:"mt-1 rounded-md bg-slate-100 px-4 py-1.5 text-xs font-medium text-slate-600 hover:bg-slate-200",children:"Retry"})]}):null}function ho(){const{entities:e,selectedEntity:t,setSelectedEntityId:n}=Wt();return r.jsx("div",{className:"flex min-h-full flex-col bg-slate-50",children:r.jsx("main",{className:"flex-1 p-5",children:r.jsx(U0,{context:{entities:e,selectedEntity:t,setSelectedEntityId:n}})})})}const Yf=["Entity name & EIN","Business type & primary state","Automatic dashboard access","Start managing tax payments"];function Wf({onCreateClick:e}){return r.jsxs("div",{className:"mx-auto w-full max-w-[528px]",children:[r.jsxs("div",{className:"overflow-hidden rounded-[20px] border border-[#f3f4f6] bg-white shadow-[0_20px_25px_-5px_rgba(0,0,0,0.1),0_8px_10px_-6px_rgba(0,0,0,0.1)] sm:rounded-[24px]",children:[r.jsxs("div",{className:"bg-[#bccadb] px-5 pb-6 pt-6 text-center sm:px-8 sm:pb-8 sm:pt-8",children:[r.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-white/20 sm:h-16 sm:w-16",children:r.jsx(Zl,{className:"h-6 w-6 text-white sm:h-8 sm:w-8"})}),r.jsx("h2",{className:"mt-3 text-xl font-black tracking-tight text-[#1e2939] sm:mt-4 sm:text-2xl",children:"Add Your Entity"}),r.jsx("p",{className:"mt-1 text-sm text-[#1e2939]/80",children:"Get set up in under 1 minute"})]}),r.jsxs("div",{className:"bg-white px-5 py-5 sm:px-8 sm:py-6",children:[r.jsx("ul",{className:"space-y-2.5 sm:space-y-3",children:Yf.map(t=>r.jsxs("li",{className:"flex items-center gap-3 text-sm text-[#4a5565]",children:[r.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-[#dfeeff] text-[#156bd5]",children:r.jsx(As,{})}),t]},t))}),r.jsxs("button",{type:"button",onClick:e,className:"mt-5 flex h-12 w-full items-center justify-center gap-2 rounded-2xl bg-[#156bd5] text-sm font-black text-white transition hover:bg-[#125bb8] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#156bd5] focus-visible:ring-offset-2 sm:mt-6 sm:h-14 sm:text-base",children:[r.jsx(Zl,{className:"h-4 w-4 sm:h-[18px] sm:w-[18px]"}),"Add Entity",r.jsx(Kf,{})]})]})]}),r.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-x-3 gap-y-2 text-xs text-[#99a1af] sm:mt-5 sm:gap-x-4",children:[r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(As,{className:"h-3 w-3 text-emerald-500"}),"SOC 2 Certified"]}),r.jsx("span",{className:"hidden h-3 w-px bg-[#e5e7eb] sm:block","aria-hidden":!0}),r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(As,{className:"h-3 w-3 text-emerald-500"}),"Bank-grade encryption"]}),r.jsx("span",{className:"hidden h-3 w-px bg-[#e5e7eb] sm:block","aria-hidden":!0}),r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(As,{className:"h-3 w-3 text-emerald-500"}),"Free to start"]})]})]})}function Zl({className:e="h-5 w-5"}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 21h18M12 3l9 4.5v1.5H3V7.5L12 3z"})})}function As({className:e="h-3 w-3"}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 16 16",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.5 8.5l3 3 6-6"})})}function Kf(){return r.jsx("svg",{className:"h-4 w-4 sm:h-[18px] sm:w-[18px]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})}function fo(){const e=Ae(),t=()=>{e("/create-entity/form",{state:{from:"/create-entity"}})};return r.jsx("div",{className:"flex items-center justify-center bg-transparent px-0 py-0",children:r.jsx(Wf,{onCreateClick:t})})}function $u({open:e,onClose:t,enabledPayments:n,onSelectFederal:s,onSelectState:a}){const i=ir();return x.useEffect(()=>{if(!e)return;const o=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",o),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=""}},[e,t]),e?ft.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:t}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"add-first-payment-title",className:"relative z-10 max-h-[90vh] w-full max-w-4xl overflow-y-auto rounded-2xl bg-white p-6 shadow-xl sm:p-8",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,className:"absolute right-4 top-4 rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(Xf,{})}),r.jsx("h2",{id:"add-first-payment-title",className:"text-lg font-semibold text-slate-900",children:"Add Your First Payment"}),r.jsxs("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[n.includes("federal")?r.jsx(Ka,{icon:r.jsx(Qf,{}),title:"Federal Payment",description:"Make payments for federal tax obligations, including income tax and estimated tax.",actionLabel:"Federal Tax Payment",variant:"primary",onSelect:s}):null,n.includes("state")?r.jsx(Ka,{icon:r.jsx(Gf,{}),title:"State Payment",description:"Pay state tax obligations, including withholding, income, and estimated taxes.",actionLabel:"State Tax Payment",variant:"outline",onSelect:a}):null,r.jsx(Ka,{icon:r.jsx(Jf,{}),title:"Local Payment",description:"Pay municipal and county taxes based on your local jurisdiction.",actionLabel:"Local Tax Payment",variant:"disabled",comingSoon:!0})]})]})]}),i):null}function Ka({icon:e,title:t,description:n,actionLabel:s,variant:a,comingSoon:i=!1,onSelect:o}){const l=a==="primary"?"bg-gov-700 text-white shadow-sm hover:bg-gov-700":a==="outline"?"border border-gov-500 bg-white text-gov-700 hover:bg-gov-50":"cursor-not-allowed border border-gov-200 bg-white text-slate-300";return r.jsxs("div",{className:"relative flex flex-col rounded-xl border border-slate-200 p-5 text-center",children:[i?r.jsx("span",{className:"absolute -top-2.5 right-4 inline-flex items-center rounded-full bg-gov-100 px-2.5 py-0.5 text-[11px] font-semibold text-gov-600",children:"Coming Soon"}):null,r.jsx("span",{className:"mx-auto flex h-[104px] w-[104px] items-center justify-center rounded-2xl bg-gov-50 text-gov-600",children:e}),r.jsx("h3",{className:"mt-5 text-sm font-bold text-slate-900",children:t}),r.jsx("p",{className:"mt-2 flex-1 text-xs leading-relaxed text-slate-500",children:n}),r.jsx("button",{type:"button",onClick:o,disabled:a==="disabled",className:`mt-5 inline-flex h-11 w-full items-center justify-center rounded-lg px-4 text-sm font-semibold transition ${l}`,children:s})]})}function Qf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M62.0432 6.53906C62.2466 6.58126 62.4611 6.61019 62.622 6.75213C62.9915 7.07829 62.8142 11.1504 62.8097 11.9086C64.8335 12.4737 65.2559 13.3107 65.5546 15.2975C65.9278 15.3554 66.3978 15.2472 66.6622 15.5573C67.1866 16.1729 66.3725 16.5641 66.3546 16.6859C66.1661 17.987 66.2421 20.6145 66.2436 21.8325C69.1665 22.4843 71.8413 23.9686 73.9486 26.1082C77.6864 29.8757 78.8394 34.2964 78.8156 39.4295C81.597 40.1678 81.3832 41.2697 81.3407 43.759C82.461 44.2702 83.0852 44.9927 81.9076 45.948L81.8927 54.2555C82.9094 54.3688 86.204 54.6451 87.0316 55.3779C87.3936 55.6986 87.2387 56.9965 87.2632 57.5347C87.2982 58.2777 87.1686 58.5558 86.6539 59.0725L86.6517 64.9197L101.774 64.9275C104.115 64.9269 106.453 64.9142 108.797 64.9374C109.925 64.9484 110.126 65.0763 110.148 66.2891C110.159 66.8192 110.157 67.4111 110.142 67.9405C110.102 69.3077 110.305 69.6929 108.803 69.7327C108.685 75.0298 108.796 80.7968 108.786 86.1277C109.628 86.5466 110.234 86.8704 111.002 87.4235C113.519 89.2401 115.214 91.9891 115.715 95.0641C116.278 98.5708 115.592 102.056 113.492 104.941C111.577 107.523 108.729 109.24 105.564 109.721C102.062 110.261 98.9518 109.338 96.1362 107.243L67.9151 107.258L33.0921 107.259C28.416 107.317 23.7395 107.333 19.0631 107.307C18.0288 107.308 12.6089 107.405 12.134 107.166C11.5865 106.556 11.7691 105.32 11.7565 104.537C11.7235 102.48 12.4007 102.739 13.9282 102.76C13.8415 101.892 13.9105 100.959 13.901 100.088C13.8849 98.6083 14.1926 98.4764 15.5226 98.5686C15.3898 89.0505 15.498 79.2604 15.5031 69.7319C14.9199 69.7222 14.2733 69.7559 14.2175 68.9622C14.1741 68.3469 14.189 67.7038 14.1921 67.0865C14.1952 66.4781 14.1094 65.6334 14.5032 65.1354C14.6292 64.9764 15.3336 64.9422 15.5469 64.9406C18.3443 64.9184 21.1429 64.9275 23.9404 64.9291L37.6786 64.9371L37.6979 59.0793C37.3965 58.842 37.0909 58.5219 37.0614 58.1598C37.0201 57.6549 36.9293 55.7092 37.2514 55.4017C38.0358 54.6529 41.3929 54.3956 42.4073 54.2731L42.3921 45.9165C41.1657 45.2012 41.9615 44.2519 42.9468 43.8167C42.9238 41.3094 42.7104 40.2809 45.4592 39.4412C45.4697 35.6803 45.9025 33.056 47.8274 29.716C50.0718 25.8492 53.7602 23.0461 58.0708 21.9315C58.0686 21.1723 58.1162 17.2145 58.0205 16.7113C57.8462 16.5749 57.5924 16.4164 57.529 16.1864C57.2377 15.1286 58.692 15.3846 58.7547 15.2625C59.0438 14.6989 58.892 13.9227 59.373 13.259C59.9448 12.4698 60.5267 12.1681 61.4779 11.9447C61.4816 10.4876 61.3535 8.4722 61.5591 7.02733C61.5948 6.77477 61.8317 6.65283 62.0432 6.53906ZM16.7834 98.5746C18.2815 98.4209 21.4252 98.5214 23.0207 98.5229L35.0265 98.5289C35.2595 98.1474 35.4334 97.7299 35.8696 97.6632C36.3869 97.5845 37.0094 97.6145 37.5361 97.6205C37.801 96.3337 37.0673 95.3924 38.7427 94.8221L38.7325 75.5012C37.5453 74.9751 37.6879 74.2976 37.6989 73.1367C37.3951 72.9748 37.127 72.8286 37.0363 72.4637C36.8502 71.7157 36.9645 70.6762 36.9549 69.8803C35.0672 69.6105 32.5473 69.7109 30.593 69.7124L20.9921 69.7192C19.6586 69.7184 18.0932 69.7716 16.7796 69.7259C16.7659 79.2859 16.6867 89.0273 16.7834 98.5746ZM87.328 69.8668C87.3251 71.0427 87.6878 72.4479 86.6353 73.1187C86.6189 74.3343 86.7336 74.8941 85.5731 75.4952C85.4264 81.8371 85.585 88.472 85.5463 94.8475C86.1243 94.9839 86.2241 95.0686 86.6174 95.5221C86.7649 96.2183 86.7321 96.9115 86.7329 97.6258C88.5027 97.6018 89.3474 97.4969 89.1962 99.6081C89.1582 100.137 89.1701 100.91 89.1798 101.442C90.1154 101.422 91.1664 101.398 92.1005 101.431C91.3474 99.0392 91.1999 96.7556 91.8398 94.3049C91.5828 94.2562 91.2297 94.2225 91.0904 93.9624C90.8617 93.533 90.9049 87.8184 91.1187 87.341C91.1373 87.2991 91.1582 87.2578 91.1776 87.2159C91.9686 86.4357 93.4174 86.6635 94.4699 86.7595C95.2409 87.2908 95.3019 87.5569 95.22 88.4899C98.2181 85.376 103.431 84.2818 107.483 85.6608C107.385 81.0621 107.531 76.4208 107.475 71.8184C107.467 71.1311 107.461 70.4012 107.481 69.7147L94.2457 69.7192L90.5616 69.7102C90.1504 69.7087 88.9109 69.6877 88.5586 69.7387C88.1616 69.7814 87.7228 69.8376 87.328 69.8668ZM104.779 108.418C110.812 107.807 115.205 102.384 114.583 96.3157C113.961 90.2474 108.56 85.8406 102.531 86.4814C96.522 87.1207 92.1608 92.531 92.7805 98.5783C93.4003 104.625 98.7679 109.026 104.779 108.418ZM43.6248 54.1264C50.5823 53.2332 58.6456 53.1748 65.6618 53.2251C70.6741 53.3448 75.6908 53.4686 80.6726 54.1055L80.6607 48.393C80.6599 47.516 80.6294 46.5066 80.7113 45.6316C80.7322 45.4036 80.8864 45.2348 81.0398 45.0778C75.086 42.8305 65.3058 42.3267 58.9736 42.6119C54.3156 42.8247 49.609 43.2238 45.0988 44.4781C44.6703 44.5972 43.6004 44.8336 43.3477 45.1639C43.4128 45.2466 43.6008 45.483 43.603 45.5788C43.6691 48.4164 43.569 51.2896 43.6248 54.1264ZM36.6599 68.6062C39.1965 68.3949 43.2791 68.523 45.9332 68.5208L62.4589 68.5335L79.2499 68.5245L84.0908 68.5193C85.1724 68.5178 86.5102 68.4691 87.5619 68.628C85.7303 67.5921 62.5051 56.6228 62.1021 56.5825L43.6613 65.2987C41.3396 66.3908 38.9866 67.5523 36.6599 68.6062ZM32.9001 105.917L70.9572 105.904L84.5333 105.897C86.6554 105.897 89.331 105.83 91.4092 105.915L91.4234 102.682L32.9265 102.685C32.9295 103.614 32.9735 105.027 32.9001 105.917ZM87.924 101.43C87.9284 100.695 87.9023 99.5781 87.9493 98.8736L54.7343 98.8818C48.674 98.8826 42.4058 98.9643 36.3645 98.8803C36.3647 99.7242 36.3517 100.619 36.3725 101.458C38.0079 101.334 40.8965 101.425 42.6011 101.425L54.7259 101.426L76.6294 101.425C80.3575 101.426 84.2085 101.372 87.924 101.43ZM38.3037 56.1781L38.2823 57.9352L51.9697 57.881C52.7891 57.8715 55.7672 57.968 56.3477 57.796C58.0633 57.2873 60.3881 55.7614 62.1416 55.2056C63.0145 55.4373 64.3978 56.1823 65.2924 56.5636C65.8898 56.8573 67.6939 57.7969 68.216 57.8509C69.5449 57.9885 71.2491 57.8701 72.6227 57.8762L80.8707 57.9029C82.5176 57.9005 84.4215 57.8466 86.0446 57.9221L86.0558 56.1713C79.7013 55.0049 73.0994 54.6403 66.6414 54.5212C63.8771 54.4701 60.5915 54.4148 57.8282 54.5287C51.1466 54.713 44.8868 54.9854 38.3037 56.1781ZM69.5106 75.4772C68.3173 74.9736 68.4596 74.2346 68.5021 73.1022L66.0961 73.0977C66.1177 74.4677 66.2272 74.8072 65.028 75.5641C65.0026 81.9045 65.1456 88.5327 65.0131 94.8498C66.5207 95.2897 66.254 96.3277 66.2384 97.6512C66.7739 97.607 67.8011 97.5913 68.3374 97.6512C68.3069 96.3472 68.044 95.3137 69.5166 94.8273L69.5106 75.4772ZM75.3281 75.5094V94.8423C75.8488 94.9914 76.0201 95.1241 76.397 95.5191C76.546 96.324 76.5043 96.8396 76.5095 97.6505C77.1694 97.6377 77.915 97.607 78.5683 97.6333L78.5743 97.5711C78.6852 96.243 78.2137 95.274 79.7973 94.8303L79.8026 75.4944C78.5795 75.0508 78.7247 74.2361 78.7493 73.1029C77.9709 73.0955 77.2335 73.0894 76.4543 73.1149C76.064 73.8172 76.9393 74.7173 75.3281 75.5094ZM44.5554 75.5079L44.5569 94.8663C45.9879 95.1586 45.6907 96.5106 45.697 97.6407C46.3801 97.64 47.0633 97.631 47.7462 97.6138L47.7973 97.5591C47.7657 96.3172 47.5252 95.2403 48.9863 94.8468L48.9745 82.3609C48.9744 80.2212 48.9096 77.6259 48.9977 75.5154C47.7868 74.9796 47.9065 74.3171 47.9225 73.1194C47.1418 73.0992 46.3608 73.0917 45.5798 73.0984C45.5861 74.2548 45.7113 74.9511 44.5554 75.5079ZM65.0421 16.6271C63.5263 16.5805 61.7684 16.5984 60.235 16.6092L59.3209 16.6404C59.3053 18.3011 59.3028 19.9619 59.3135 21.6226L60.242 21.5044C60.233 20.7063 60.1013 18.1639 60.3896 17.5984C60.5922 17.4419 60.479 17.4792 60.7486 17.5013C60.9907 17.6615 60.993 17.6128 61.0734 17.9151C61.2306 18.5069 61.0079 21.0447 61.1449 21.4415C61.4071 21.448 61.5181 21.471 61.7624 21.3685C61.8436 20.4347 61.5315 17.9735 62.0589 17.4959C62.3121 17.4637 62.1892 17.4477 62.4365 17.5753C62.701 17.9478 62.6332 18.388 62.6257 18.8562C62.625 19.5139 62.362 21.3632 63.0265 21.5133C63.8093 21.2058 62.5654 17.7399 63.7572 17.4973C64.3926 17.9089 64.0946 20.639 64.1535 21.5045C64.435 21.5286 64.7322 21.5487 65.0116 21.5845C65.0555 19.9669 64.9676 18.1876 65.0421 16.6271ZM79.8003 97.6438C81.6417 97.577 83.5322 97.652 85.3914 97.6145L85.5038 97.5448C85.5426 96.9902 85.5307 96.6545 85.5024 96.0954C83.7206 96.0774 81.6052 96.0347 79.8376 96.0946C79.7728 96.6215 79.7929 97.1146 79.8003 97.6438ZM54.7685 75.5199L54.7751 87.6266C54.7744 89.9776 54.8167 92.4755 54.7635 94.8161C55.3936 95.0521 55.5115 95.0956 55.9022 95.6652L55.9427 95.7229C55.9558 96.3202 55.9917 97.0577 55.9665 97.6438C56.6681 97.6288 57.37 97.6243 58.0717 97.631C58.0497 96.4281 57.7828 95.202 59.2348 94.8558L59.2365 81.6962C59.2355 80.2347 59.3378 76.8869 59.1968 75.5611L59.1097 75.5004C58.1062 74.7862 58.1852 74.2129 58.2038 73.0954C57.4112 73.0924 56.604 73.0805 55.813 73.1074C55.8606 74.3043 55.9631 74.9421 54.7685 75.5199ZM94.7306 105.963L94.6673 105.87C94.2904 105.32 93.8777 104.919 93.4547 104.243C93.2141 103.858 92.8081 103.097 92.6062 102.807C92.6256 103.825 92.6018 104.984 92.6457 105.977C93.2722 105.921 94.1087 105.889 94.7306 105.963ZM38.2222 71.8708L86.058 71.8379C86.061 71.293 86.0402 70.3712 86.0997 69.8586C81.4093 69.7431 76.3218 69.8481 71.6015 69.8451L38.2265 69.8406L38.2222 71.8708ZM54.1161 97.6198C54.4915 97.6303 54.4841 97.6977 54.6987 97.5171C54.859 97.1124 54.7461 96.5713 54.7234 96.1074C52.8804 96.0587 50.9371 96.0901 49.0845 96.0946C48.9791 96.5376 49.0154 97.1761 49.025 97.6475C50.6851 97.5853 52.4462 97.6318 54.1161 97.6198ZM35.1528 99.8344L21.6774 99.8336C19.5465 99.8336 17.2692 99.8734 15.1517 99.8284L15.1581 102.769C20.5054 102.7 26.3782 102.676 31.7193 102.763C31.7349 101.192 32.5821 101.419 33.8184 101.424L35.1364 101.423C35.1268 100.916 35.1145 100.34 35.1528 99.8344ZM69.6693 73.0969C69.676 73.4619 69.673 73.9138 69.6961 74.2713C70.4663 74.2818 74.5624 74.3478 75.156 74.2234C75.1702 73.8501 75.1821 73.4769 75.191 73.1037L69.6693 73.0969ZM75.2648 96.0939C73.4078 96.0901 71.4525 96.0594 69.603 96.1036C69.5866 96.6327 69.5702 97.1304 69.5799 97.6595C71.2767 97.5778 73.3594 97.6235 75.0845 97.6228L75.2462 97.58C75.34 97.2398 75.2819 96.4821 75.2648 96.0939ZM59.2731 97.6468C61.1174 97.616 62.9617 97.6063 64.806 97.616L64.9386 97.607C65.0347 97.2968 64.9877 96.4551 64.9825 96.0931C63.0913 96.0849 61.2008 96.0856 59.3099 96.0969C59.2831 96.6125 59.2709 97.1296 59.2731 97.6468ZM38.7843 97.6348L44.1399 97.6258L44.4019 97.6138C44.6172 97.299 44.4965 96.5068 44.484 96.0961C42.7436 96.0849 40.5467 96.0249 38.8339 96.1006C38.7788 96.6747 38.7773 97.0539 38.7843 97.6348ZM60.1003 15.3022L62.7099 15.2906C63.209 15.2976 63.7497 15.2949 64.2443 15.3225C64.114 13.7292 63.3609 13.0171 61.7237 13.1393C60.4998 13.623 60.2637 13.9897 60.1003 15.3022ZM79.9255 73.0939C79.9299 73.4672 79.9255 73.9011 79.9419 74.2698C80.6748 74.2893 84.8968 74.344 85.3973 74.2339C85.4212 73.8569 85.4383 73.4792 85.4487 73.1007C83.6834 73.0977 81.6692 73.1442 79.9255 73.0939ZM38.8797 73.0992L38.9125 74.2781C39.7431 74.2893 43.7674 74.3455 44.3912 74.2331L44.4054 73.1149C42.5644 73.0707 40.7218 73.1112 38.8797 73.0992ZM94.0193 89.788L94.0148 87.9968C93.3601 87.9091 92.8424 87.9278 92.1861 87.9368C92.1913 89.6898 92.1422 91.547 92.1645 93.2774C92.3373 92.8255 92.5437 92.2387 92.7426 91.8115C93.1269 91.101 93.5209 90.425 94.0193 89.788ZM59.384 73.0925C59.3917 73.4664 59.3891 73.8959 59.4182 74.2646C60.1078 74.2983 64.3442 74.3403 64.8857 74.2369L64.9378 73.1074C63.0816 73.0565 61.2283 73.1239 59.384 73.0925ZM13.0432 104.041C13.041 104.704 13.0489 105.391 13.0353 106.05C19.1618 105.89 25.5959 106.188 31.6982 105.993C31.6953 105.465 31.681 104.563 31.7505 104.046L13.0432 104.041ZM61.6075 37.6299C61.6075 36.3081 61.6581 22.8896 61.5471 22.7515L61.4913 22.7553C60.7345 22.7933 60.3373 22.7003 59.8064 23.3011C56.4124 27.1418 55.2031 32.6316 54.9825 37.6455C54.9898 37.7162 54.9971 37.787 55.0043 37.8577L55.1005 37.8815C57.3006 37.7598 59.3904 37.6126 61.6075 37.6299ZM54.6532 73.1082C52.8037 73.0924 50.9542 73.0902 49.1047 73.1014C49.1105 73.4709 49.1077 73.9019 49.126 74.2653C50.1049 74.3103 53.7297 74.3515 54.6227 74.2414L54.6532 73.1082ZM46.8264 39.0743C48.8918 38.6171 51.7836 38.1072 53.893 37.995C53.9769 33.2546 55.0536 28.406 57.6383 24.3756C57.777 24.1592 58.3839 23.4496 58.3716 23.2834L58.3367 23.2574C54.2039 24.4634 50.8821 27.0387 48.7888 30.8481C47.4365 33.3392 46.74 36.137 46.7653 38.9753L46.8264 39.0743ZM58.892 38.9385C56.4888 39.0517 45.9402 39.6585 44.4265 41.3883C44.0371 41.8333 44.1796 42.8869 44.1895 43.4545C50.9324 41.4509 58.1291 41.1957 65.1121 41.3096C69.606 41.4781 75.8219 41.9997 80.0923 43.4195C80.108 42.835 80.2316 41.6938 79.8309 41.319C79.1731 40.7037 77.6812 40.3734 76.8052 40.1928C71.2871 39.0553 64.9952 38.7427 59.3851 38.921L58.892 38.9385ZM39.9609 75.4974C40.0234 76.3383 39.9756 77.5509 39.974 78.4285L39.9685 83.8598L39.9769 91.7373C39.9752 92.6981 40.0181 93.9242 39.9825 94.8565C40.8955 94.8663 41.9316 94.9015 42.8318 94.8468L43.2057 94.8453C43.3544 94.601 43.2963 90.7263 43.2963 90.1455L43.3036 75.5064C42.2219 75.5072 41.0342 75.5319 39.9609 75.4974ZM63.9978 22.8214L62.6674 22.7111C62.7658 24.5464 62.7017 26.8503 62.7002 28.7315C62.7114 31.6956 62.7017 34.6597 62.6719 37.6236C64.549 37.6374 66.9937 37.649 68.8521 37.862L69.2246 37.86C69.4972 37.5742 69.2872 36.1484 69.2372 35.6631C68.7724 31.1188 67.4198 26.0229 63.9978 22.8214ZM15.4745 66.2263C15.4722 66.9795 15.4651 67.7329 15.4532 68.4863C16.9429 68.3754 19.4435 68.4533 20.9953 68.4541L31.319 68.4533C31.8763 68.4533 35.166 68.4983 35.5051 68.3739C35.6768 67.8279 35.6377 67.745 36.1311 67.4844C36.2964 67.3953 36.4651 67.3127 36.6368 67.2368C37.0012 67.0616 37.7816 66.7603 37.9249 66.4046C37.7425 66.2063 37.2057 66.2154 36.9303 66.2137C34.3069 66.1968 31.6778 66.2114 29.0548 66.2122L15.4745 66.2263ZM86.8379 66.2152C86.5005 66.2318 86.1452 66.2556 85.8092 66.2613C86.6346 66.78 87.5225 67.0693 88.35 67.5662C88.5876 67.7087 88.5511 68.1648 88.905 68.4076C89.626 68.4938 90.6964 68.4563 91.4591 68.4548L95.6185 68.4481C99.8159 68.4451 104.158 68.5051 108.343 68.4369C108.609 68.4309 108.702 68.4788 108.879 68.3522C108.927 67.6371 108.912 66.9169 108.909 66.1997L94.1578 66.2128C91.8658 66.212 89.1038 66.141 86.8379 66.2152ZM70.7717 59.1653C71.4406 59.5909 72.5385 59.9966 73.2968 60.3473C74.6071 60.9539 75.9165 61.6249 77.238 62.1994C79.956 63.3809 82.6383 64.901 85.3489 66.0644L85.4465 66.0409L85.4361 65.9054L85.4331 59.1817C81.1143 59.0916 76.7538 59.2255 72.4305 59.1693C71.9143 59.1626 71.2782 59.1336 70.7717 59.1653ZM81.013 94.8326C82.1653 94.8828 83.1836 94.8618 84.3336 94.855C84.2212 88.5162 84.3269 81.8625 84.3299 75.4967C83.2201 75.5072 82.1102 75.5087 80.9996 75.4997C81.0875 81.915 80.9221 88.4112 81.013 94.8326ZM38.8911 59.1642C38.9069 61.1404 38.9848 64.2007 38.8752 66.1331C42.1732 64.643 45.5342 62.8866 48.8317 61.4457C50.4686 60.6642 52.111 59.8943 53.7586 59.136C52.0693 59.2322 49.8665 59.1694 48.1373 59.166L38.8911 59.1642ZM70.7732 94.8805C71.7713 94.8206 72.7404 94.9053 73.7437 94.8445L74.032 94.84C74.213 94.4886 73.9583 77.6139 74.1125 75.5177L70.7225 75.5132C70.8253 76.5519 70.7359 77.7668 70.7486 78.8295C70.8112 84.1626 70.648 89.5534 70.7732 94.8805ZM60.4842 75.5042C60.5058 81.8633 60.3673 88.5274 60.5043 94.8655C61.6052 94.8528 62.7062 94.849 63.8078 94.8535L63.7944 81.7306L63.7937 77.7615C63.7937 77.102 63.7669 76.1367 63.8317 75.5162C62.7159 75.5244 61.6 75.5207 60.4842 75.5042ZM70.4834 37.9848C72.5937 38.1166 75.5121 38.5663 77.5486 39.088C77.5262 31.4815 73.445 24.9184 65.8257 23.1409C69.0354 27.0752 70.3821 32.9788 70.4834 37.9848ZM50.2212 75.5027C50.2198 81.9232 50.1563 88.4555 50.2282 94.867C51.3146 94.8355 52.4407 94.8603 53.5335 94.8535C53.6273 93.0151 53.5442 90.4445 53.543 88.5529L53.5589 75.5192C52.4463 75.5222 51.3337 75.5169 50.2212 75.5027Z",fill:"#013A9A"}),r.jsx("path",{d:"M20.8306 87.3741C21.7975 87.3931 22.9716 87.2834 23.7808 87.6627C24.0167 87.9389 24.1978 88.3692 24.2019 88.7133C24.2189 90.3084 24.2811 91.9224 24.1834 93.5143C24.1531 94.0079 23.337 93.9863 22.8942 93.989C22.0866 93.989 20.4435 94.1417 19.7401 93.9171C19.5898 93.8695 19.5357 93.7957 19.4778 93.684C19.1935 93.1343 19.1211 88.377 19.4804 87.9422C19.7993 87.5563 20.271 87.4525 20.8306 87.3741ZM20.7075 92.9149C21.4023 92.9077 22.0971 92.9038 22.792 92.9038C22.7912 91.4452 22.7685 89.9467 22.7949 88.4913C22.0999 88.4789 21.4046 88.4763 20.7095 88.4828L20.7075 92.9149Z",fill:"#013A9A"}),r.jsx("path",{d:"M20.3361 74.9483C21.2571 74.8873 22.6797 74.7512 23.5021 75.1234C23.805 75.261 23.9175 75.4361 24.0125 75.7134C24.2485 76.4042 24.377 81.6982 23.9934 82.1212C23.7865 82.35 23.406 82.3338 23.1049 82.339C22.4202 82.3456 19.8439 82.5082 19.4548 82.0594C19.1169 81.1575 19.2481 76.9531 19.3475 75.7392C19.3736 75.4228 19.9875 75.0962 20.3361 74.9483ZM20.6722 76.1541C20.671 76.9715 20.6027 80.4395 20.7189 81.0596C21.1142 81.1472 21.2323 81.1295 21.6502 81.1229L22.7457 81.12L22.7582 76.1556L22.1168 76.1497L20.6722 76.1541Z",fill:"#013A9A"}),r.jsx("path",{d:"M28.4596 74.9508C29.2074 74.8807 30.3356 74.7746 31.0301 75.0679C31.2627 75.166 31.4269 75.2692 31.5163 75.5213C31.6171 75.805 31.6607 76.1095 31.6822 76.4094C31.7337 77.1281 31.8113 81.6951 31.5777 82.0762C31.4349 82.3084 31.2117 82.3334 30.9725 82.3585C30.0372 82.3474 29.1034 82.4211 28.1771 82.3142C27.5629 82.3002 27.5735 81.3243 27.5815 80.8062C27.6073 79.1499 27.5021 77.4023 27.6581 75.7527C27.6923 75.3915 28.1896 75.1041 28.4596 74.9508ZM28.7652 81.143L30.5236 81.1371C30.4975 79.4802 30.4921 77.8224 30.5073 76.1655C29.8668 76.1271 29.4257 76.119 28.785 76.1426C28.7912 77.7509 28.8134 79.5406 28.7652 81.143Z",fill:"#013A9A"}),r.jsx("path",{d:"M28.4275 87.4501C29.1907 87.3828 30.2533 87.2867 30.9787 87.5266C31.2033 87.6005 31.4083 87.7019 31.5012 87.9124C31.6095 88.1576 31.6603 88.442 31.6822 88.7054C31.735 89.3383 31.8103 93.4127 31.5762 93.7566C31.4369 93.9619 31.2128 93.9848 30.9776 94.0109C30.0962 94.0005 29.1777 94.0874 28.303 94.0011C28.1437 93.9854 27.9503 93.9613 27.8498 93.839C27.4879 93.3983 27.5292 88.8891 27.685 88.1863C27.7677 87.813 28.1023 87.6397 28.4275 87.4501ZM28.7681 92.9185L30.5109 92.9191C30.5234 91.4455 30.5236 89.9718 30.5113 88.4988C29.9408 88.4858 29.3702 88.4792 28.7995 88.4792C28.8021 89.9404 28.8265 91.4618 28.7681 92.9185Z",fill:"#013A9A"}),r.jsx("path",{d:"M90.9327 74.9628C91.5906 74.8965 93.0511 74.7432 93.6054 75.1028C93.8658 75.2715 94.092 75.5876 94.1455 75.9022C94.2632 76.5984 94.3061 81.8301 94.0342 82.141C93.8837 82.3134 93.706 82.3289 93.4984 82.3502C92.5566 82.3443 91.6341 82.421 90.6959 82.3222C90.0859 82.3274 90.0744 81.4507 90.0823 80.9217C90.1087 79.2212 89.9988 77.4294 90.1629 75.7349C90.1972 75.3835 90.6673 75.1124 90.9327 74.9628ZM91.2388 81.1523L93.0118 81.1471L93.0104 76.1342C92.4439 76.1504 91.8981 76.1696 91.3309 76.1541C91.1604 76.899 91.2403 80.1812 91.2388 81.1523Z",fill:"#013A9A"}),r.jsx("path",{d:"M99.2878 74.9366C103.274 74.6226 102.448 75.3933 102.543 79.0362C102.561 79.7146 102.649 81.703 102.37 82.1612C102.153 82.3467 102.102 82.3304 101.824 82.3511C101.083 82.3481 100.34 82.3814 99.5995 82.371C99.3788 82.3681 98.7948 82.3555 98.6544 82.1604C98.3413 81.7267 98.3542 76.4965 98.5147 75.7746C98.6057 75.3637 98.9604 75.1383 99.2878 74.9366ZM99.6482 76.1544C99.6461 76.7367 99.5701 80.9811 99.7371 81.1614L100.069 81.1415L101.386 81.1355C101.384 80.3944 101.468 76.6561 101.339 76.1817C101.119 76.1418 101.083 76.1359 100.861 76.1381L99.6482 76.1544Z",fill:"#013A9A"}),r.jsx("path",{d:"M102.278 89.0396C103.503 89.0106 103.266 90.1429 103.257 91.0539C104.795 91.3165 105.793 91.9213 106.431 93.4064C106.491 93.6309 106.608 94.3165 106.398 94.499C104.836 95.8589 105.072 93.5957 104.206 93.0903C103.405 92.6214 102.795 92.4603 102.026 92.6115C100.94 92.8246 99.974 93.6782 100.234 94.8556C100.512 96.0155 102.045 96.2796 103.03 96.5293C104.573 96.905 106.382 97.4891 106.673 99.3361C107.069 101.86 105.592 103.323 103.278 103.69C103.251 104.608 103.555 105.429 102.474 105.706C101.491 105.463 101.708 104.544 101.731 103.724C100.279 103.355 99.1292 102.861 98.5047 101.324C98.2889 100.793 98.4006 99.6087 99.0176 99.5454C100.154 99.4285 99.9672 101.352 101.033 101.822C101.849 102.299 102.562 102.146 103.431 102.019C104.418 101.873 105.401 100.707 105.016 99.6881C104.366 97.9663 101.418 98.2183 100.058 97.2723C99.4234 96.8806 98.7415 96.2086 98.611 95.4069C98.206 92.9162 99.4732 91.541 101.732 91.0867C101.699 90.1529 101.499 89.6375 102.278 89.0396Z",fill:"#013A9A"}),r.jsx("path",{d:"M60.9254 44.886C61.4512 44.8298 62.2251 44.942 62.3545 45.5221C62.5741 46.5069 62.6877 51.5463 62.3914 52.1598C62.1928 52.3478 62.1123 52.3279 61.8453 52.35C61.2895 52.3631 60.6644 52.4563 60.2109 52.1433C60.0063 51.5611 60.056 46.6424 60.1658 45.6788C60.2049 45.3376 60.6539 45.0531 60.9254 44.886Z",fill:"#013A9A"}),r.jsx("path",{d:"M67.3348 44.8801C67.6645 44.8336 68.2433 45.0121 68.2778 45.556C68.3617 46.874 68.5073 51.0847 68.2896 52.1737C68.1538 52.3612 68.0478 52.3403 67.8642 52.3654C67.5421 52.3686 67.1053 52.4303 66.8491 52.1404C66.6824 51.4851 66.7313 46.6823 66.8064 45.6716C66.8321 45.3212 67.1418 45.0431 67.3348 44.8801Z",fill:"#013A9A"}),r.jsx("path",{d:"M53.9908 44.8915C54.5286 44.8239 54.6418 44.9216 55.0108 45.5312C55.0789 46.3005 55.1103 51.4813 54.9844 52.1049C54.8192 52.3305 54.9148 52.2512 54.6742 52.3072C54.2691 52.3289 53.8481 52.5041 53.5216 52.1745C53.3422 51.4406 53.4014 46.7016 53.4777 45.6709C53.5017 45.3469 53.8154 45.0536 53.9908 44.8915Z",fill:"#013A9A"}),r.jsx("path",{d:"M72.3236 44.8736C72.6871 44.8665 73.0882 44.9261 73.402 45.0689C73.7655 45.2328 74.0196 45.5052 74.0992 45.8179C74.3467 46.8242 74.1997 50.8448 74.1268 52.0773C74.0683 52.1386 74.0097 52.1999 73.9522 52.2611C73.6208 52.3809 73.6462 52.3853 73.2827 52.3618C72.5788 52.3498 71.7214 52.3902 71.1292 52.1256C70.8076 51.5687 70.8596 46.5136 71.0993 45.6101C71.1833 45.2929 71.938 45.0138 72.3236 44.8736Z",fill:"#013A9A"}),r.jsx("path",{d:"M49.5105 44.873C49.9458 44.8977 50.6954 45.1421 50.7428 45.6087C50.8483 46.6455 51.0578 51.5059 50.7166 52.1254C50.4794 52.3155 50.3242 52.2983 50.0205 52.3295C49.5244 52.3598 48.9619 52.463 48.5608 52.1812C48.3574 51.6724 48.3453 46.444 48.5608 45.5411C48.6379 45.2182 49.1776 44.9829 49.5105 44.873Z",fill:"#013A9A"}),r.jsx("path",{d:"M76.4545 45.707C76.5542 45.7088 76.6547 45.7101 76.7535 45.7185C77.0093 45.7401 77.1583 45.8213 77.3109 46.0251C77.6196 46.4387 77.6214 51.9402 77.4794 52.6615C77.4238 52.9433 77.2077 53.048 76.9978 53.207C76.6459 53.2042 76.3592 53.1725 76.092 52.942C75.7806 52.3349 75.9456 47.3526 75.9615 46.3145C75.965 46.0463 76.2419 45.8666 76.4545 45.707Z",fill:"#013A9A"}),r.jsx("path",{d:"M45.3396 45.7089C45.5469 45.7031 45.6525 45.6918 45.8052 46.0079C45.9712 46.7423 45.8785 51.4627 45.8732 52.5756C45.8719 52.8485 45.7334 53.0364 45.6247 53.2061C45.4317 53.2111 45.3268 53.2036 45.1703 52.9886C45.0059 52.5357 45.0931 47.523 45.097 46.6304C45.099 46.1682 45.1695 45.9878 45.3396 45.7089Z",fill:"#013A9A"}),r.jsx("path",{d:"M61.9591 59.8796C63.5655 59.7724 64.9544 60.986 65.0635 62.5916C65.1733 64.1972 63.961 65.5879 62.3559 65.6993C60.7475 65.8109 59.3534 64.5963 59.2439 62.9878C59.1344 61.3793 60.3507 59.9871 61.9591 59.8796ZM62.4875 64.5283C63.4401 64.3398 64.0619 63.4163 63.8771 62.4624C63.693 61.5084 62.7719 60.8832 61.8173 61.0636C60.8566 61.2451 60.2268 62.1727 60.4124 63.1323C60.5982 64.092 61.5282 64.718 62.4875 64.5283Z",fill:"#013A9A"})]})}function Gf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M61.0831 6.26953C62.455 6.44182 62.1158 7.58499 62.0885 8.70912C66.4975 7.61502 68.0582 10.3258 72.1763 10.2735C73.0545 10.2623 74.793 9.48525 75.3881 9.90135C75.6151 10.5948 75.5347 16.2794 75.5012 17.2984C74.325 19.1281 70.8184 19.0327 69.0331 18.3712C66.0467 17.2643 65.3143 16.6419 62.0932 17.2538L62.0877 22.973C68.1065 23.323 72.9898 26.8237 75.4918 32.266C76.6212 34.7233 76.9215 37.1336 76.8653 39.8088C78.511 39.7984 79.7316 39.545 79.3214 41.8538C79.1638 42.7377 78.8214 43.1113 78.1039 43.5994C78.2341 45.8748 78.132 49.0067 78.1296 51.3618C78.7754 51.346 79.794 51.2619 80.3556 51.488C80.8313 51.967 80.6972 53.7277 80.6956 54.4092L80.7104 57.6615C83.4215 58.8859 86.1389 60.3934 88.8765 61.5806C89.4349 61.8228 89.6221 62.5434 89.9583 62.5891C90.8178 62.7056 91.9565 62.6635 92.8261 62.6619L98.5065 62.6639C100.306 62.6557 102.331 62.5535 104.121 62.7751C105.302 62.9213 104.851 66.7807 104.684 67.624C104.645 67.8207 103.86 68.1335 103.646 68.2214C103.557 68.7134 103.591 69.659 103.591 70.2018L103.592 73.7155L103.602 86.7367C107.25 87.377 110.142 88.9439 112.348 91.9904C114.324 94.7412 115.112 98.1699 114.537 101.508C113.999 104.693 112.113 107.766 109.463 109.628C106.643 111.64 103.131 112.429 99.72 111.817C96.6299 111.256 93.6404 109.394 91.852 106.801L90.3865 106.799L40.3051 106.795L24.8158 106.797C22.0855 106.799 19.3544 106.808 16.6243 106.797C15.9725 106.763 15.1392 106.857 15.1484 105.938C15.1627 104.511 15.152 103.13 15.0862 101.705C15.0213 100.302 16.2792 100.414 17.2536 100.44C17.2613 99.7454 17.2425 99.0013 17.2249 98.3095C17.1747 96.337 17.0066 95.6234 19.2011 95.6647L19.2107 68.1786C17.7863 67.9397 17.9251 66.9346 17.9268 65.7248C17.9279 64.9292 17.9588 64.1257 17.9769 63.33C18.1995 63.0314 18.4813 62.682 18.8793 62.6694C20.29 62.6246 21.7371 62.6576 23.1491 62.6585L32.9719 62.6526C33.0147 62.5089 33.1899 62.0884 33.3061 62.0154C34.2669 61.4111 35.4065 60.9141 36.4243 60.4222L42.1239 57.6499C42.1244 56.6692 41.9175 52.013 42.4095 51.5329C43.0374 51.2341 43.9398 51.3421 44.6588 51.3601C44.62 48.8533 44.6733 46.1619 44.671 43.6357C43.6779 42.9296 43.5607 42.25 43.5045 41.0666C43.4894 40.7482 43.5777 40.213 43.8645 40.0235C44.3741 39.6869 45.4447 39.8057 46.0572 39.8141C46.0461 38.8414 46.0675 37.7633 46.1772 36.8034C46.994 29.6521 53.0915 23.3627 60.4225 23.0253C60.5465 19.1474 60.3757 15.0541 60.4389 11.1509C60.4599 9.84761 60.3765 8.23757 60.4888 6.92671C60.5153 6.61692 60.8328 6.43566 61.0831 6.26953ZM20.746 95.6655C23.4106 95.6366 26.0754 95.6351 28.74 95.6616C30.1334 95.6725 31.5591 95.6764 32.9489 95.6374C33.1072 95.6335 33.8285 95.0407 34.4591 95.2318C34.5128 95.2482 35.6136 95.2459 35.7756 95.2521C35.7644 94.9081 35.7483 94.5938 35.7685 94.2491C35.7687 92.5449 35.6148 92.5472 37.0848 91.7751C37.2063 89.6575 37.1295 86.8841 37.1293 84.7267L37.1262 71.8576C35.762 71.1947 36.0186 70.0591 36.0392 68.751C35.2291 68.7444 35.0003 68.7698 34.4449 68.1297C32.9836 68.1779 31.5086 68.1626 30.0459 68.1404C26.9522 68.0935 23.8287 68.2035 20.7383 68.1328L20.7296 85.4084C20.7279 88.7224 20.6578 92.3686 20.746 95.6655ZM61.5425 63.9146L78.7177 63.9154C81.8398 63.9153 85.1062 63.9605 88.2213 63.8984L88.2182 63.088C83.9823 60.9366 79.0687 58.6151 74.8515 56.5234C73.198 55.7033 61.9309 49.9607 61.2477 49.9391C55.2418 53.0275 48.9087 56.0629 42.8345 59.0407L37.5352 61.6242C36.8308 61.9674 34.849 62.7652 34.3628 63.4523C34.2805 63.5688 34.3979 63.6925 34.4712 63.8122C34.804 64.0451 59.1152 63.915 61.5425 63.9146ZM103.229 110.395C109.33 109.751 113.751 104.28 113.102 98.18C112.452 92.0793 106.977 87.6632 100.877 88.3184C94.7853 88.972 90.3755 94.4386 91.0244 100.531C91.6734 106.624 97.1361 111.038 103.229 110.395ZM47.6377 39.823L62.4597 39.8242L75.2703 39.8159C75.3429 35.4832 74.2299 31.9201 71.1608 28.7303C68.7024 26.1526 65.3159 24.6637 61.7539 24.5943C61.4208 24.5886 60.7587 24.5935 60.4334 24.6364C56.8713 24.9094 53.5634 26.5852 51.2362 29.2955C48.4459 32.5319 47.65 35.6845 47.6377 39.823ZM87.7073 68.6934C87.698 70.0154 87.9881 71.2017 86.5912 71.86L86.5827 91.8726C88.3212 92.3382 87.9366 93.7304 87.9171 95.2349L90.1236 95.2451C90.6181 93.7842 91.3739 92.4248 92.3535 91.2338C92.2739 89.4891 92.3168 87.6952 92.3137 85.9458C92.3121 85.2298 92.1756 83.216 92.6038 82.7075C93.1397 82.3846 97.7468 82.1982 97.9379 82.8907C98.274 84.1121 98.1204 86.0433 98.1001 87.37C99.2536 86.9433 100.807 86.6571 102.036 86.6836L102.04 68.1451L88.2666 68.1459L87.7073 68.6934ZM32.7613 100.437C32.9236 100.165 32.8539 97.6777 32.8494 97.2113L18.7794 97.2027C18.772 98.2564 18.805 99.4264 18.7763 100.46C23.4011 100.404 28.1349 100.413 32.7613 100.437ZM81.6526 91.8944C82.6775 91.8266 83.9745 91.8601 85.0236 91.8625C85.0165 85.3172 84.9019 78.4076 85.0173 71.8912C83.8965 71.8787 82.7765 71.8795 81.6557 71.892C81.6394 78.4685 81.5364 85.3304 81.6526 91.8944ZM88.4483 65.4899L88.4553 66.6336L102.611 66.64L103.317 66.6393C103.298 65.8705 103.27 64.9704 103.335 64.2114C100.169 64.0791 96.7734 64.2472 93.5835 64.1891C92.4198 64.1678 90.9246 64.2576 89.8015 64.1665C89.5995 65.0426 89.3725 65.3572 88.4483 65.4899ZM43.2309 70.3508C43.3433 70.1535 43.3018 69.0491 43.3008 68.7428L37.5205 68.7437L37.5298 70.3804C39.234 70.2782 41.4705 70.3609 43.2309 70.3508ZM44.7798 68.745C44.8015 70.0497 45.0615 71.2126 43.6785 71.8623L43.6792 91.8882C44.3037 92.0145 44.5016 92.1495 44.8944 92.6705C45.0311 93.5581 45.0107 94.3598 45.006 95.2552C45.3155 95.2466 46.188 95.281 46.365 95.1296L46.3478 95.0727C46.3685 94.3232 46.2164 92.8467 46.6809 92.4162C47.5029 91.6542 47.7641 92.2236 47.7631 91.0474C47.7617 89.3674 47.7326 87.6702 47.7378 85.9848L47.7439 71.8732C46.2673 71.2641 46.565 70.0864 46.6325 68.7482L44.7798 68.745ZM74.4233 71.8779C73.3891 71.8795 71.9868 71.9247 70.983 71.8732L70.9853 91.8703C72.1365 91.8547 73.2659 91.8788 74.421 91.85L74.4233 71.8779ZM76.5908 51.3664L76.59 45.4265C76.59 44.9309 76.5635 43.8382 76.5869 43.4084C76.6118 42.9345 77.8403 42.2061 77.8293 41.5329C77.3894 41.2877 48.9446 41.4554 45.0559 41.4402C45.0703 42.8139 46.1718 42.1774 46.1901 44.0651C46.2137 46.4859 46.1343 48.9557 46.2008 51.3697C47.7283 51.3596 54.0509 51.5414 55.0762 51.2439C55.7863 51.0379 56.4722 50.6299 57.1328 50.2994C58.3011 49.7028 59.4764 49.1204 60.6588 48.5523C60.6596 46.9659 60.5645 45.3231 60.7095 43.7547C60.7563 43.2483 61.8225 42.9477 61.9894 43.6285C62.3256 44.9974 62.186 47.1199 62.1735 48.5395C64.082 49.3984 66.1723 50.6047 68.1213 51.3409C68.2937 51.4059 69.3771 51.359 69.6485 51.3497L76.5908 51.3664ZM19.4894 64.1872C19.479 65.0047 19.4783 65.8223 19.4875 66.6399L33.8322 66.6382L34.2051 66.616C34.4532 66.2748 34.3132 65.9635 34.3328 65.4853L34.2417 65.4726C33.3691 65.3426 33.1438 65.0866 32.9549 64.2557C32.4345 64.0676 21.7886 64.1841 20.416 64.1866L19.4894 64.1872ZM43.6359 52.9188C43.6295 54.1987 43.6598 55.663 43.6154 56.9227C45.4535 56.03 47.2864 55.1267 49.1142 54.2129C49.9438 53.8155 50.9952 53.3432 51.7841 52.9097C49.1506 52.9678 46.2788 52.9444 43.6359 52.9188ZM79.1708 52.9173C76.4972 52.9212 73.7299 52.8844 71.0641 52.9295C73.7019 54.2862 76.4902 55.5831 79.1591 56.9165L79.1708 52.9173ZM95.5544 88.4767L96.5745 87.9479C96.5667 86.6384 96.5761 85.3281 96.6034 84.0185L93.8486 84.024C93.8291 85.9208 93.8517 87.8512 93.8205 89.7379C94.3603 89.2668 94.9398 88.8448 95.5544 88.4767ZM68.3304 68.7392L55.4532 68.7459C55.4785 70.1589 55.7151 71.1105 54.2978 71.892L54.2941 84.7611C54.294 86.9067 54.2148 89.6622 54.3392 91.7673C54.8479 92.0988 55.4506 92.3718 55.5329 92.9684C55.6338 93.7 55.5855 94.5057 55.5631 95.2435C55.9378 95.2381 56.3126 95.2349 56.6873 95.2349L56.6895 86.4255C56.688 85.4942 56.6324 82.5686 56.7808 81.8363C56.9191 81.178 57.2474 80.5759 57.7251 80.1024C58.6792 79.1501 59.8251 79.0285 61.0901 79.0269C63.3216 79.0246 64.9524 78.8202 66.2877 80.997C66.7362 82.0141 66.694 83.1879 66.6839 84.2822C66.6512 87.937 66.7268 91.6066 66.6738 95.2599C67.1371 95.2482 67.6027 95.2303 68.0652 95.2412C68.0613 94.4449 67.8889 92.814 68.4653 92.3101C68.8405 91.9818 69.2289 92.0356 69.4083 91.7369C69.5206 85.1456 69.3381 78.4739 69.4488 71.8818C68.0075 71.2641 68.3023 70.0864 68.3304 68.7392ZM80.1762 95.2622C82.2446 95.2217 84.3122 95.2794 86.3799 95.2248L86.4072 93.4021C84.3302 93.3849 82.254 93.3795 80.177 93.3873C80.1777 94.005 80.1879 94.6461 80.1762 95.2622ZM49.288 91.896C50.2598 91.8274 51.7287 91.8367 52.7332 91.8547L52.7452 71.8771L49.2754 71.8857L49.288 91.896ZM75.4552 70.35C75.6775 70.1051 75.5979 69.1341 75.5924 68.7488C73.6909 68.7449 71.7286 68.7175 69.8318 68.7443C69.831 69.2791 69.8388 69.8415 69.8263 70.3742C70.9861 70.3172 74.3141 70.2892 75.4552 70.35ZM80.4227 70.3695C82.3109 70.2946 84.2818 70.4147 86.1701 70.3414C86.2067 69.8103 86.2091 69.2776 86.2176 68.7451L80.4234 68.7367C80.4234 69.276 80.4312 69.8321 80.4227 70.3695ZM54.0664 95.2069L54.0621 93.3997C52.0027 93.3724 49.9376 93.4208 47.8848 93.3833L47.8758 95.2537C49.9175 95.2498 52.0368 95.2794 54.0664 95.2069ZM69.5798 95.2537C71.6217 95.2412 73.7674 95.2856 75.7929 95.2334C75.7937 94.657 75.7765 93.973 75.8007 93.406C73.7307 93.3857 71.6615 93.3795 69.5915 93.3865C69.5908 93.9847 69.6048 94.6625 69.5798 95.2537ZM86.9336 67.1595C86.918 66.5948 86.9212 66.0298 86.9407 65.4653L35.8378 65.4609C35.8432 66.0219 35.8623 66.6375 35.8478 67.1936L75.587 67.1841L83.5518 67.1965C84.0369 67.1979 86.6014 67.261 86.9336 67.1595ZM48.0697 68.7471L48.0755 70.3734C50.0055 70.3289 51.981 70.3586 53.9161 70.3539L53.9425 68.7433L48.0697 68.7471ZM59.9522 80.6141C59.3563 80.7919 58.815 81.0649 58.4957 81.6241C57.8534 82.748 58.3796 93.1369 58.2104 95.2427L63.5571 95.2474C64.0758 95.242 64.6147 95.2287 65.131 95.2373L65.1342 86.3857C65.1349 85.1058 65.2075 83.4983 65.0671 82.2488C64.8253 80.1001 61.4575 80.586 59.9522 80.6141ZM62.1142 10.353C62.09 12.1027 62.1259 13.9164 62.0822 15.6499C64.2778 15.2224 65.9235 15.3626 67.9544 16.3099C69.388 16.9786 71.0422 17.3686 72.638 17.1647C73.1684 17.0894 73.4648 17.0248 73.9842 16.8889C74.0084 15.1289 73.946 13.2758 73.9889 11.5494C68.5332 12.6804 67.8499 9.88536 63.5766 10.0408C63.008 10.1335 62.6633 10.1909 62.1142 10.353ZM37.2292 93.3966C37.2672 93.9231 37.2672 94.6983 37.2464 95.2412L43.2832 95.2342L43.4197 95.1835C43.4896 94.7334 43.4599 93.8958 43.4567 93.4083C41.4647 93.3763 39.2138 93.3506 37.2292 93.3966ZM77.2935 95.2693C77.5556 95.2654 78.4283 95.2802 78.6303 95.192L78.6522 95.0766C78.6545 94.3669 78.5258 92.9762 78.9758 92.4115C79.2239 92.1019 80.0498 92.0418 79.9937 91.5848C80.1154 85.0247 79.9679 78.4334 80.035 71.8748C78.6951 71.1947 78.9337 70.0372 78.9618 68.7441L77.1266 68.7477C77.136 70.1519 77.416 71.1066 76.0339 71.8686C76.0027 78.4653 75.9614 85.2704 76.0378 91.8601C77.6772 92.3593 77.2966 93.8544 77.2935 95.2693ZM38.6419 91.889C39.4892 91.8227 41.0887 91.8422 41.9838 91.8578L42.1165 91.7891C42.2112 90.0717 42.1233 87.3559 42.1237 85.5753L42.1425 71.8896L38.6664 71.8881C38.5818 78.5082 38.7778 85.3093 38.6419 91.889ZM16.6457 101.975L16.6822 105.252L90.8817 105.249C90.3662 104.182 89.9044 103.17 89.7375 101.978L16.6457 101.975ZM89.392 100.433C89.2906 99.5465 89.3569 97.7035 89.3717 96.7621L34.3499 96.7605C34.3612 97.9772 34.3337 99.2649 34.3779 100.47C36.0279 100.361 38.5776 100.433 40.2916 100.434L51.0877 100.433H89.392Z",fill:"#0147A5"}),r.jsx("path",{d:"M25.3467 82.4823C26.0279 82.4418 30.2276 82.2015 30.3252 82.9565C30.6555 85.5124 30.5562 88.5207 30.3899 91.0992C30.3759 91.316 29.9574 91.5024 29.785 91.557C28.4265 91.589 27.0474 91.5819 25.6895 91.5554C24.9026 91.5398 24.6831 91.0204 24.6754 90.2911C24.6505 87.9224 24.6057 85.5241 24.7183 83.1601C24.733 82.8497 25.1212 82.6289 25.3467 82.4823ZM26.2093 90.0587L28.9561 90.0665C28.9545 88.1042 28.9159 85.9687 28.9787 84.0211L26.1969 84.025C26.1942 86.01 26.1652 88.0808 26.2093 90.0587Z",fill:"#0147A5"}),r.jsx("path",{d:"M25.6153 71.1209C26.7972 71.1841 28.8616 70.9018 29.8909 71.2684C30.0881 71.3386 30.2449 71.4259 30.3265 71.6295C30.5801 72.262 30.6384 79.3088 30.3791 79.7752C30.2247 80.0529 30.0148 80.1246 29.7299 80.2081C28.735 80.2159 25.6669 80.375 24.957 79.9897C24.8769 79.8696 24.828 79.7721 24.7919 79.6309C24.6122 78.929 24.5497 71.9258 24.838 71.5468C25.0411 71.2793 25.3011 71.195 25.6153 71.1209ZM28.9534 78.6919L28.966 72.6793C28.0429 72.6847 27.1199 72.684 26.1969 72.6777C26.192 74.6229 26.1417 76.7818 26.2108 78.7153C27.1099 78.702 28.0583 78.6732 28.9534 78.6919Z",fill:"#0147A5"}),r.jsx("path",{d:"M61.0257 53.5886C63.3297 53.3858 65.3606 55.0922 65.5587 57.397C65.7561 59.7016 64.0449 61.7288 61.7393 61.9208C59.4416 62.1122 57.4231 60.4079 57.2262 58.1108C57.0294 55.8138 58.729 53.7909 61.0257 53.5886ZM61.8938 60.3743C63.3429 60.0935 64.2874 58.6874 63.9988 57.2397C63.7103 55.7921 62.2986 54.8554 60.8526 55.1517C59.4175 55.4458 58.4895 56.844 58.7759 58.2807C59.0623 59.7174 60.4556 60.653 61.8938 60.3743Z",fill:"#0147A5"}),r.jsx("path",{d:"M101.959 91.0469C103.131 91.2419 102.893 92.1365 102.87 93.1005C104.232 93.4241 104.817 93.5879 105.74 94.7469C106.671 95.9153 105.831 97.8979 104.598 96.5073C104.272 96.1399 104.169 95.4239 103.579 95.0316C102.613 94.3889 100.727 94.5785 100.03 95.5573C98.9678 97.242 100.514 97.9775 101.956 98.3253C102.897 98.5531 104.264 98.8884 105.057 99.4453C105.733 99.9156 106.182 100.648 106.294 101.465C106.618 103.828 105.063 105.206 102.869 105.546C102.898 106.504 103.145 107.644 101.863 107.679C101.025 107.221 101.238 106.491 101.274 105.63C99.9311 105.289 98.6972 104.851 98.0732 103.475C97.7831 102.836 97.7223 101.879 98.4656 101.534C99.6776 101.446 99.474 103.007 100.465 103.631C101.899 104.532 105.05 103.862 104.586 101.715C104.351 100.629 102.698 100.296 101.796 100.072C100.113 99.6614 98.2324 99.099 98.0101 97.0782C97.7613 94.8124 99.1106 93.4967 101.247 93.1356C101.266 92.2254 100.996 91.4696 101.959 91.0469Z",fill:"#0147A5"}),r.jsx("path",{d:"M93.4615 71.1186C94.4848 71.1397 96.7903 70.919 97.6412 71.3159C97.8456 71.4111 97.9275 71.5094 97.9899 71.7262C98.1965 72.4508 98.255 79.443 97.9282 79.8891C97.7457 80.1379 97.4938 80.1831 97.2068 80.2104C96.2514 80.2159 93.4147 80.3516 92.6355 80.0295C92.0537 79.4937 92.4047 72.9998 92.3485 71.9508C92.3181 71.3729 92.9467 71.1584 93.4615 71.1186ZM96.5922 78.7083C96.5189 76.891 96.5493 74.5044 96.5953 72.6723C95.7101 72.6816 94.7094 72.7128 93.8351 72.6847C93.8335 74.6908 93.8171 76.7186 93.839 78.7223C94.509 78.709 95.9854 78.6482 96.5922 78.7083Z",fill:"#0147A5"}),r.jsx("path",{d:"M72.7069 43.2349C74.0523 43.2031 73.6826 44.5801 73.7099 45.5872C73.745 46.9034 73.7045 48.2716 73.6569 49.5856C73.6467 49.8496 73.3605 50.0293 73.1647 50.1698C72.756 50.1628 72.2436 50.0763 72.2109 49.5501C72.0978 47.7095 72.1485 45.826 72.1867 43.9812C72.1945 43.6165 72.4503 43.4349 72.7069 43.2349Z",fill:"#0147A5"}),r.jsx("path",{d:"M49.6362 43.2402C49.9342 43.2448 50.229 43.2282 50.4453 43.4737C50.8343 43.9152 50.7218 48.6229 50.6525 49.3771C50.6149 49.7865 50.4907 49.9056 50.1855 50.1555C49.746 50.1679 49.2679 50.1299 49.1924 49.572C49.0953 48.7558 49.134 47.9145 49.1361 47.0903C49.1389 46.0685 49.1249 45.0393 49.1597 44.0185C49.1739 43.6019 49.3394 43.486 49.6362 43.2402Z",fill:"#0147A5"}),r.jsx("path",{d:"M66.9481 43.2445C67.182 43.2315 67.6913 43.2315 67.8013 43.5045C68.0119 44.1445 68.079 45.3795 67.9971 46.0659C67.8645 47.1664 68.3574 49.4818 67.4948 50.1523C67.0799 50.1896 66.5612 50.1562 66.5082 49.6167C66.4348 48.8727 66.4614 48.0955 66.4598 47.3464C66.4582 46.2339 66.4465 45.1167 66.477 44.0051C66.4887 43.5995 66.6634 43.4785 66.9481 43.2445Z",fill:"#0147A5"}),r.jsx("path",{d:"M55.4025 43.2391C56.513 43.2104 56.4087 43.9682 56.408 44.8402C56.4066 46.4127 56.43 47.9941 56.3751 49.5643C56.3648 49.8578 56.1148 50.0127 55.9008 50.1655C54.6786 50.1843 54.9049 49.3194 54.8946 48.346C54.8787 46.8295 54.868 45.2911 54.9373 43.778C54.9469 43.5692 55.2471 43.3626 55.4025 43.2391Z",fill:"#0147A5"})]})}function Jf(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120",fill:"none",children:[r.jsx("path",{d:"M60.4647 6.45508C62.2783 6.46707 61.9811 7.78406 61.9579 9.17742C64.1179 8.61059 66.7507 8.19853 68.678 9.52663C69.5821 10.1496 70.1962 10.5332 71.3832 10.6936C72.6302 10.8621 74.4125 10.1475 75.5628 10.5169C75.7132 10.5653 75.9263 10.9282 75.9343 11.1041C76.0606 13.6548 75.9925 16.2639 75.9863 18.8258C75.9845 19.651 75.5038 19.9611 74.7635 20.0867C72.2158 20.5187 69.8471 20.8956 67.6745 19.1713C66.2852 18.0678 63.562 18.6558 61.9677 18.9923L61.9695 23.8401C65.0731 25.661 68.2367 27.4281 71.3161 29.2831C72.4682 29.3113 76.3936 29.1264 77.1249 29.4944C77.7972 30.2628 77.5663 31.9705 77.5833 32.9734C77.6182 35.0207 76.8134 34.768 75.3023 34.7394C75.3623 42.5903 75.2272 50.4779 75.3229 58.3278C76.6057 58.2574 78.3469 58.3074 79.6574 58.3075L87.6747 58.3089L97.1036 58.3098C98.074 58.3089 102.89 58.1873 103.492 58.5207C104.041 59.2005 103.891 60.9275 103.838 61.8243C103.762 63.0965 104.322 65.0499 103.455 65.9981C103.12 66.3636 102.4 66.2869 101.933 66.2788C102.015 72.6963 101.86 79.2499 101.928 85.7033C107.255 86.8393 111.445 92.4396 111.529 97.816C111.712 109.615 98.0561 115.638 89.3343 107.521L84.6624 107.526L38.3784 107.524L23.2507 107.526C20.6466 107.528 18.0438 107.542 15.4363 107.514C13.5854 107.463 13.4067 106.931 13.3546 105.282C13.255 102.129 13.7844 102.17 16.6878 102.083C16.7204 101.12 16.4396 99.3343 17.1039 98.6154C17.4669 98.2216 18.1708 98.3111 18.6752 98.3335C18.756 94.7572 18.7015 91.0126 18.6989 87.4248L18.7068 66.2987C17.8653 66.2978 16.91 66.4478 16.8331 65.2934C16.78 64.4964 16.7873 63.9221 16.827 62.9537C16.8743 61.7998 16.5503 59.7741 17.1289 58.7267C17.6446 58.3078 20.6714 58.4442 21.4299 58.4447L27.3268 58.4459L45.5801 58.4407L45.5834 34.7479C44.8122 34.7495 44.0503 34.8849 43.4613 34.444C43.03 33.7264 43.0406 30.1747 43.6509 29.4552C44.3904 29.1486 48.3976 29.2939 49.4864 29.301C52.6156 27.321 56.3145 25.3329 59.557 23.5086C59.5758 21.5722 59.3941 7.73528 59.6805 7.09504C59.8381 6.74413 60.138 6.6112 60.4647 6.45508ZM47.3969 58.4178C47.6922 58.4242 48.6489 58.4636 48.8735 58.3688C49.911 57.9308 51.0207 57.2678 52.0178 56.7172L57.2369 53.8467C58.3145 53.2546 59.2365 52.7 60.3546 52.1867L60.4208 52.1567C61.3491 52.487 62.9202 53.3981 63.8243 53.8937L68.9734 56.7296C71.1684 57.8695 71.1048 58.3022 73.5111 58.3252C73.4905 50.6042 73.3795 42.4433 73.5075 34.7506L47.3788 34.7479L47.3779 49.9248C47.3771 52.6979 47.3264 55.6572 47.3969 58.4178ZM37.0762 66.3149C31.6261 66.2678 26.1756 66.2631 20.7253 66.3006L20.5757 66.3725C20.4846 66.899 20.5324 68.9462 20.5353 69.606L20.5443 75.8993C20.5483 83.3168 20.4317 90.967 20.5594 98.3603C25.2575 98.1114 30.2231 98.4704 34.9464 98.3281C35.8416 98.3012 36.8835 98.3111 37.7784 98.3549L37.7445 96.7803C37.7635 95.3811 37.8091 94.8843 39.3862 94.8942L39.404 68.6741C37.0954 68.7161 36.9875 68.6327 37.0762 66.3149ZM15.1808 103.92C15.186 104.465 15.2133 105.197 15.1781 105.724L83.3196 105.729C84.7447 105.725 86.4008 105.68 87.8063 105.729C86.7464 104.059 85.8315 102.2 85.6596 100.195L42.5227 100.189C34.6535 100.189 26.3869 100.058 18.545 100.207C18.6093 103.868 18.9566 103.966 15.1808 103.92ZM68.8033 82.2658C68.9421 83.2272 68.874 86.4965 68.8732 87.5922L68.8561 98.3612C69.5061 98.3406 70.1022 98.3236 70.7512 98.337C70.7333 96.6962 70.2249 94.9165 72.3491 94.8834C72.3823 86.1751 72.2623 77.3602 72.3635 68.6721C64.4554 68.6746 56.1227 68.807 48.2443 68.6702C48.1591 77.2931 48.15 86.2745 48.2338 94.8977C50.4558 94.9058 49.8469 96.7006 49.8571 98.38C50.4882 98.346 51.1202 98.3299 51.7522 98.3335L51.7542 87.6235C51.7523 82.6284 51.0119 78.5956 57.7336 78.797C59.9025 78.8623 62.247 78.7558 64.4295 78.8104C65.6398 78.8167 66.9369 79.361 67.7381 80.2454C68.2546 80.821 68.6207 81.5148 68.8033 82.2658ZM81.2204 68.6687L81.207 85.2924C81.207 88.4471 81.1613 91.7333 81.2311 94.8798C83.5255 94.9201 82.8452 96.6451 82.9007 98.3782C83.7063 98.295 84.6749 98.3039 85.485 98.3567C85.5361 95.4134 86.1851 93.3034 87.8286 90.8605C87.2047 90.8712 85.2478 90.9715 85.0581 90.5633C84.6284 89.6439 84.7922 85.7329 84.7922 84.835L84.7958 75.7945C84.7823 75.0641 84.5845 73.6676 85.152 73.1305C85.5173 72.784 94.1549 72.8172 95.2014 72.9353C95.6185 72.9819 96.101 73.0526 96.4116 73.3561C96.5934 74.0928 96.5191 76.8616 96.5164 77.7317C96.5039 80.2785 96.5056 82.8253 96.5218 85.3721C97.5754 85.2217 99.0542 85.0928 100.095 85.3444L100.106 66.3084C94.8639 66.1667 89.0121 66.2687 83.7251 66.2835C83.7627 67.7126 83.9552 68.6822 82.1648 68.682C81.8506 68.6806 81.5355 68.6762 81.2204 68.6687ZM60.3528 54.1589C55.4446 56.954 50.4212 59.5819 45.4888 62.3378C43.4908 63.4542 41.4584 64.5138 39.4629 65.6347C39.1127 65.8293 38.7983 66.1177 38.7516 66.5303C39.0497 67.0121 40.4957 66.8481 41.1126 66.8487L45.3129 66.8476L60.5372 66.8421L75.5458 66.8481C76.4643 66.8475 81.1998 66.9014 81.7432 66.7357C82.2266 65.978 81.3323 65.6063 80.8059 65.315L65.6827 57.0152C64.7204 56.4874 61.0475 54.3291 60.3528 54.1589ZM79.4139 94.904C79.3548 92.2068 79.4202 89.3252 79.4211 86.6128L79.4238 68.6841L74.1789 68.6702C74.0795 74.9611 74.2147 81.3223 74.161 87.6181C74.1413 89.916 74.2532 92.6508 74.1691 94.896C75.8395 94.8968 77.7659 94.8476 79.4139 94.904ZM60.582 29.2954C62.5585 29.2874 66.0121 29.1789 67.8634 29.3537C66.8599 28.8204 60.7288 25.1538 60.3465 25.1553C57.892 26.5228 55.4464 27.9067 53.0103 29.3066C55.534 29.283 58.0585 29.2794 60.582 29.2954ZM99.4356 109.419C105.572 108.906 110.146 103.535 109.675 97.3953C109.204 91.2543 103.866 86.6442 97.7222 87.0721C91.5177 87.5044 86.852 92.9069 87.3273 99.1078C87.8027 105.31 93.2373 109.938 99.4356 109.419ZM72.5765 98.38C74.784 98.2135 78.7408 98.3406 81.0754 98.346C81.0772 97.7946 81.0745 97.2619 81.1076 96.7105C78.2547 96.6926 75.4017 96.6908 72.5488 96.7042C72.5747 97.2619 72.5837 97.8214 72.5765 98.38ZM48.0765 96.7132C45.2443 96.6917 42.4118 96.6872 39.5795 96.6997L39.5771 98.3934C42.1187 98.26 45.3283 98.3567 47.9424 98.3451L48.0586 98.2591C48.0755 97.7435 48.0815 97.2288 48.0765 96.7132ZM91.5222 81.0528C92.3323 81.0591 94.0126 81.0251 94.7529 81.0976C94.6902 79.0029 94.726 76.8097 94.7314 74.7078C93.6616 74.6935 92.5919 74.6899 91.5231 74.6953C91.5356 76.747 91.5795 79.0154 91.5222 81.0528ZM56.3522 98.3236L59.3788 98.3487C59.4361 92.6293 59.4773 86.3828 59.369 80.6706C58.5105 80.633 57.7457 80.5954 56.8836 80.6241C55.5457 80.6608 54.0317 80.8568 53.6773 82.4896C53.4745 83.4242 53.5386 84.6846 53.5484 85.663C53.591 89.8964 53.4953 94.1592 53.5651 98.389C54.4497 98.3066 55.4551 98.3272 56.3522 98.3236ZM86.596 81.0896C87.5413 81.0457 88.7596 81.0537 89.713 81.0851C89.8876 79.9983 89.722 76.1052 89.7694 74.7015L86.5897 74.6944C86.5888 76.8124 86.5673 78.9751 86.596 81.0896ZM61.1979 80.6097C61.1629 86.3443 61.0752 92.6705 61.2131 98.3863C62.5147 98.2609 65.6559 98.3021 67.072 98.3558C67.0479 94.8494 67.0488 91.3421 67.0747 87.8356C67.0774 86.3998 67.1822 84.0795 67.0013 82.7036C66.6459 79.9912 63.1762 80.7297 61.1979 80.6097ZM91.5759 82.8665C91.4595 83.5603 91.5159 86.4535 91.5195 87.2645C92.3036 86.8071 92.7199 86.594 93.5265 86.2207L94.7224 85.7624L94.7394 82.8933C93.6849 82.8907 92.6304 82.8817 91.5759 82.8665ZM89.7739 82.9104C88.7077 82.8808 87.6406 82.871 86.5745 82.8799C86.5861 84.7947 86.6443 87.1714 86.5664 89.0674C87.4697 89.0808 89.0264 89.2867 89.6297 88.7461C89.9117 88.1293 89.7058 84.0025 89.7739 82.9104ZM73.9121 18.1949C73.9318 16.4029 73.8835 14.3328 73.9399 12.5723C72.7296 12.7096 71.2964 12.8911 70.1148 12.5624C68.0004 11.9746 67.226 10.3736 64.6801 10.7957C63.7366 10.8698 62.8942 11.061 61.9704 11.2496L61.965 16.9437C63.7223 16.3934 66.304 16.0527 67.9923 16.9737C69.3959 17.7396 69.541 18.1665 71.1693 18.3648C72.2077 18.4343 72.8764 18.3418 73.9121 18.1949ZM75.8386 31.1488L44.9601 31.1038L44.9493 32.9556C52.0675 32.8782 59.2535 33.0207 66.3765 32.9564C69.2966 32.93 72.9534 33.0688 75.8305 32.9228L75.8386 31.1488ZM18.6406 60.2616L18.6496 64.4718L37.8479 64.4569C39.13 63.7474 41.4205 62.3908 42.6677 61.8164C43.6124 61.287 44.5603 60.7631 45.5111 60.2447C36.6429 60.2996 27.4748 60.0796 18.6406 60.2616ZM102.062 60.1556C96.0034 60.0897 89.8732 60.1487 83.8093 60.1454L78.0926 60.1387C77.5 60.1396 75.7875 60.1119 75.2594 60.1833C75.8878 60.5835 82.7279 64.335 82.9356 64.3483C87.1376 64.6186 92.8318 64.389 97.2218 64.46C98.0722 64.4737 101.456 64.5535 102.015 64.4248C102.052 63.002 102.067 61.5789 102.062 60.1556ZM41.2041 68.675C41.1677 77.3862 41.2945 86.2154 41.1986 94.9031C42.8501 94.9031 44.7947 94.9541 46.4209 94.8951L46.4152 77.6207C46.4125 75.1984 46.2803 70.9847 46.4533 68.6779L41.2041 68.675Z",fill:"#0146A3"}),r.jsx("path",{d:"M24.9559 72.9043C26.6109 72.907 34.5446 72.7307 35.5586 73.1433C36.2296 74.1961 35.7086 88.006 35.7827 90.2485C35.7902 90.475 35.3166 90.7364 35.1114 90.8348C33.1411 90.9073 31.1567 90.8187 29.1341 90.8527C28.5863 90.7874 24.3923 91.0676 24.3548 90.5009C23.9881 84.9624 24.1712 79.0542 24.2468 73.4808C24.25 73.2391 24.8022 72.975 24.9559 72.9043ZM30.8257 81.0791C31.8266 81.0648 33.0136 81.0514 34.0089 81.0863C34.1667 80.2001 34.0426 75.9023 34.0608 74.6983C32.9807 74.6947 31.9006 74.6992 30.8206 74.7117C30.8471 76.7384 30.8873 79.056 30.8257 81.0791ZM25.9472 82.8623C25.9317 84.4173 26.0421 87.6856 25.931 89.0749L29.0799 89.0543C29.1444 87.1144 29.1174 84.8586 29.0842 82.908C28.051 82.8946 26.9771 82.8946 25.9472 82.8623ZM29.1048 81.0899C29.0808 78.9638 29.0772 76.8369 29.0943 74.7108C28.035 74.692 26.9755 74.6911 25.9162 74.709C26.0679 76.016 25.9147 79.5099 25.9517 81.1042C27.0027 81.0935 28.0538 81.0881 29.1048 81.0899ZM30.8274 82.8704C30.8499 84.9347 30.8524 86.9981 30.835 89.0624C31.9057 89.057 32.9763 89.0597 34.0471 89.0686L34.0572 82.8811C33.3102 82.8865 31.489 82.942 30.8274 82.8704Z",fill:"#0146A3"}),r.jsx("path",{d:"M59.906 36.6388C63.6918 36.3029 67.0379 39.0873 67.396 42.871C67.7532 46.6546 64.9889 50.0171 61.2076 50.3971C57.3944 50.7802 53.998 47.9875 53.6372 44.1725C53.2762 40.3576 56.0886 36.9775 59.906 36.6388ZM61.1584 48.5741C63.9433 48.2168 65.9127 45.6711 65.5582 42.8859C65.2037 40.1006 62.6605 38.1288 59.8747 38.48C57.0849 38.8317 55.1095 41.38 55.4642 44.1696C55.819 46.9592 58.3699 48.9319 61.1584 48.5741Z",fill:"#0146A3"}),r.jsx("path",{d:"M60.0957 39.4857C61.5745 39.3905 61.3364 40.6109 61.3463 41.689C61.3507 42.1785 61.3382 42.6749 61.3346 43.1648C61.8619 43.1585 62.4375 43.1216 62.9585 43.1415C64.1616 43.1876 64.4328 44.3286 63.398 44.9592C58.9328 45.2885 59.4306 44.9933 59.5326 40.7826C59.5478 40.1502 59.6221 39.8909 60.0957 39.4857Z",fill:"#0146A3"}),r.jsx("path",{d:"M98.2232 89.8789C99.566 89.9702 99.3995 90.7956 99.3941 91.8868C100.396 92.1392 101.355 92.4633 102.009 93.3272C102.369 93.7694 102.925 94.8812 102.57 95.4407C101.987 96.3743 101.295 95.8193 100.86 95.0754C99.8453 93.3352 98.1427 93.0855 96.6057 94.3029C96.235 94.5974 96.0847 95.3897 96.2413 95.848C96.5636 96.7987 97.9735 97.1666 98.9474 97.3573C101.864 97.9275 103.879 99.7698 102.285 102.851C101.753 103.879 100.5 104.344 99.3583 104.615C99.4094 105.682 99.5794 106.265 98.4685 106.729C97.363 106.388 97.5778 105.613 97.6047 104.655C96.2019 104.274 95.1626 103.814 94.4017 102.481C94.1734 102.082 93.9461 101.46 94.2567 101.033C95.6147 99.1825 95.9101 102.008 96.9431 102.586C98.0496 103.206 99.9572 103.113 100.735 101.956C101.466 100.869 100.781 99.7841 99.5786 99.401C97.6629 98.7904 94.9236 98.6884 94.3856 96.266C93.9183 93.9708 95.381 92.3022 97.5859 91.9119C97.568 90.9737 97.397 90.4715 98.2232 89.8789Z",fill:"#0146A3"})]})}function Xf(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function ed({onCancel:e,isSubmitting:t,submitLabel:n,submittingLabel:s,cancelLabel:a="Cancel",className:i=""}){return r.jsxs("div",{className:` flex flex-col gap-3 py-4 justify-end sm:flex-row sm:items-center ${i}`,children:[r.jsx("button",{type:"button",onClick:e,disabled:t,className:"inline-flex h-11 w-full items-center justify-center rounded-lg border border-slate-300 bg-white px-6 text-sm font-medium text-slate-700 transition hover:bg-slate-50 disabled:opacity-60 sm:w-auto",children:a}),r.jsx("button",{type:"submit",disabled:t,className:"inline-flex h-11 w-full items-center justify-center rounded-lg bg-gov-700 px-8 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:opacity-60 sm:w-auto",children:t?s:n})]})}function Kt({variant:e="error",title:t,message:n}){const s=e==="error"?"border-red-200 bg-red-50 text-red-800":"border-slate-200 bg-white text-slate-700";return r.jsxs("div",{className:`rounded-lg border px-4 py-3 text-sm ${s}`,role:"alert",children:[t?r.jsx("p",{className:"font-medium",children:t}):null,r.jsx("p",{className:t?"mt-1":void 0,children:n})]})}function ms({label:e,required:t=!1,htmlFor:n,tooltip:s}){return r.jsxs("label",{htmlFor:n,className:"mb-1.5 flex items-center text-sm text-slate-600",children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null,s?r.jsx(_f,{text:s}):null]})}function _f({text:e}){return r.jsxs("span",{className:"group relative ml-1.5 inline-flex items-center",children:[r.jsxs("svg",{className:"h-4 w-4 cursor-help text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16v-4M12 8h.01"})]}),r.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-20 mb-1.5 w-max max-w-xs -translate-x-1/2 rounded-md bg-slate-800 px-2.5 py-1.5 text-xs font-normal leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100",children:e})]})}const ze=x.forwardRef(function({label:t,required:n=!1,error:s,tooltip:a,id:i,className:o="",...l},c){const u=i??l.name;return r.jsxs("div",{children:[r.jsx(ms,{label:t,required:n,htmlFor:u,tooltip:a}),r.jsx("input",{ref:c,id:u,className:`block w-full rounded-sm border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${s?"border-red-300":"border-slate-200"} ${o}`,...l}),s?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:s}):null]})});function po({label:e,required:t=!1,htmlFor:n,info:s}){return r.jsxs("label",{htmlFor:n,className:"mb-1.5 flex items-center gap-1.5 text-sm text-slate-600",children:[r.jsxs("span",{children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null]}),s?r.jsxs("span",{className:"group relative inline-flex items-center",children:[r.jsx("span",{className:"inline-flex h-4 w-4 shrink-0 cursor-help items-center justify-center rounded-full border border-slate-300 text-[10px] font-semibold leading-none text-slate-400","aria-label":s,role:"img",children:"i"}),r.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 z-20 mb-1.5 w-max max-w-xs -translate-x-1/2 rounded-md bg-slate-800 px-2.5 py-1.5 text-xs font-normal leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100",children:s})]}):null]})}function _({label:e,required:t,error:n,info:s,children:a}){return r.jsxs("div",{children:[r.jsx(po,{label:e,required:t,info:s}),a,n?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:n}):null]})}const $f="disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] disabled:text-slate-700",td=e=>`block w-full rounded-lg border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${$f} ${e?"border-red-300":"border-slate-200"}`;function le(e,t=!1){return t?`block w-full cursor-default rounded-lg border bg-[#F9FAFB] px-3 py-2.5 text-sm text-slate-700 focus:outline-none ${e?"border-red-300":"border-[#E5E7EB]"}`:td(e)}function e5(e,t=!1){return t?`block w-full cursor-default appearance-none rounded-lg border bg-[#F9FAFB] px-3 py-2.5 text-sm text-slate-700 focus:outline-none ${e?"border-red-300":"border-[#E5E7EB]"}`:`${td(e)} appearance-none`}function t5({className:e}){return r.jsx("svg",{className:e??"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}const n5=4,Ul=96;function Dn({open:e,anchorRef:t,layerRef:n,onDismiss:s,width:a="anchor",align:i="start",gap:o=n5,maxHeight:l}){const[c,u]=x.useState(null),d=x.useCallback(()=>{var k;const m=t.current;if(!m)return;const h=m.getBoundingClientRect(),f=a==="anchor"?h.width:a,y=window.innerHeight-h.bottom-o,p=h.top-o,b=((k=n.current)==null?void 0:k.offsetHeight)??0,C=l?Math.min(l,Ul):b,g=y<C&&p>y,A=Math.max(g?p:y,Ul),j=Math.min(l??b,A);u({position:"fixed",top:Math.max(o,g?h.top-o-j:h.bottom+o),left:i==="end"?Math.max(o,Math.min(h.right-f,window.innerWidth-f-o)):Math.max(o,Math.min(h.left,window.innerWidth-f-o)),width:f,...l||b?{maxHeight:j,overflowY:"auto"}:{},zIndex:50})},[i,t,o,n,l,a]);return x.useLayoutEffect(()=>{if(!e){u(null);return}d();const m=requestAnimationFrame(d);return()=>cancelAnimationFrame(m)},[e,d]),x.useEffect(()=>{if(!e)return;const m=y=>{var b,C;const p=y.target;(b=t.current)!=null&&b.contains(p)||(C=n.current)!=null&&C.contains(p)||s()},h=y=>{y.key==="Escape"&&s()},f=()=>d();return document.addEventListener("mousedown",m),document.addEventListener("keydown",h),window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",h),window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[e,d,s,t,n]),c}function On(e){return typeof document>"u"?null:(e==null?void 0:e.closest(".tax-remittance-embedded"))??document.body}const r5=240;function Se({value:e,onChange:t,options:n,placeholder:s,disabled:a=!1,hasError:i=!1,loading:o=!1,loadingLabel:l="Loading…",label:c,required:u=!1,error:d,id:m,ariaLabel:h,size:f="md",leadingIcon:y}){const[p,b]=x.useState(!1),C=x.useRef(null),g=x.useRef(null),A=x.useCallback(()=>b(!1),[]),j=Dn({open:p,anchorRef:C,layerRef:g,onDismiss:A,width:"anchor",maxHeight:r5}),k=n.find(F=>F.value===e),N=i||!!d,T=f==="sm",D=`disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] ${k?"disabled:text-slate-700":""}`,q=T?`inline-flex w-auto items-center rounded-lg border bg-white py-1.5 pr-7 text-xs font-medium ${y?"pl-8":"pl-3"} focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${N?"border-red-300":"border-slate-200"} ${D}`:`${e5(N)} text-left ${D}`,$=r.jsxs("div",{className:"relative",ref:C,children:[y,r.jsx("button",{type:"button",id:m,"aria-label":h,disabled:a,className:`${q} ${k||o?"":"text-slate-400"}`,onClick:()=>b(F=>!F),"aria-haspopup":"listbox","aria-expanded":p,children:o?l:(k==null?void 0:k.label)??s}),r.jsx(t5,{className:T?"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-slate-500":void 0}),p&&j?ft.createPortal(r.jsxs("ul",{ref:g,role:"listbox",style:j,className:"overflow-y-auto overscroll-contain rounded-lg border border-slate-200 bg-white py-1 text-sm shadow-lg",children:[n.length===0?r.jsx("li",{className:"px-3 py-2 text-slate-400",children:"No options"}):null,n.map(F=>{const W=F.value===e;return r.jsxs("li",{role:"option","aria-selected":W,"aria-disabled":F.disabled,onClick:F.disabled?void 0:()=>{t(F.value),b(!1)},className:F.disabled?"flex cursor-not-allowed items-center justify-between gap-3 border border-transparent px-3 py-2 text-slate-400":`flex cursor-pointer items-center justify-between gap-3 border px-3 py-2 ${W?"border-gov-400 bg-gov-50 text-slate-900":"border-transparent text-slate-900 hover:border-gov-400 hover:bg-gov-50"}`,children:[r.jsx("span",{children:F.label}),F.badge?r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full border border-amber-200 bg-linear-to-b from-amber-50 to-orange-100 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-amber-700",children:[r.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500"}),F.badge]}):null]},F.value)})]}),On(C.current)):null]});return c?r.jsxs("div",{children:[r.jsx(ms,{label:c,required:u,htmlFor:m}),$,d?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:d}):null]}):$}function s5({label:e,required:t=!1,options:n,value:s,onChange:a,fullWidth:i=!0,onFocus:o}){const l=x.useId(),c=x.useRef([]),u=n.findIndex(h=>h.value===s),d=h=>{var y;const f=(h+n.length)%n.length;a(n[f].value),(y=c.current[f])==null||y.focus()},m=h=>{h.key==="ArrowRight"||h.key==="ArrowDown"?(h.preventDefault(),d(u+1)):(h.key==="ArrowLeft"||h.key==="ArrowUp")&&(h.preventDefault(),d(u-1))};return r.jsxs("div",{children:[r.jsx(ms,{label:e,required:t,htmlFor:l}),r.jsx("div",{id:l,role:"radiogroup","aria-label":e,onKeyDown:m,onFocus:o,className:`gap-1.5 rounded-sm border border-slate-200 bg-white p-1 ${i?"flex":"inline-flex flex-wrap"}`,children:n.map((h,f)=>{const y=h.value===s;return r.jsxs("button",{ref:p=>{c.current[f]=p},type:"button",role:"radio","aria-checked":y,tabIndex:y?0:-1,onClick:()=>{o==null||o(),a(h.value)},className:`flex items-center justify-center gap-2 rounded-sm px-5 py-[5px] text-sm font-medium transition focus:outline-none focus-visible:ring-2 focus-visible:ring-gov-500 focus-visible:ring-offset-1 ${i?"flex-1":""} ${y?"border border-gov-500 bg-gov-50 text-gov-600":"border border-transparent text-slate-800"}`,children:[h.icon?r.jsx("span",{className:y?"text-gov-600":"text-slate-700",children:h.icon}):null,h.label]},h.value)})})]})}function a5(){return r.jsx("svg",{width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:r.jsx("path",{d:"M18 4.37695C18 3.50462 17.2903 2.79492 16.418 2.79492H13.6055V1.66018C13.6055 0.74475 12.8607 0 11.9453 0H6.05472C5.13928 0 4.39453 0.74475 4.39453 1.66018V2.79492H1.58203C0.709699 2.79492 0 3.50462 0 4.37695V6.87294C0 7.33806 0.151453 7.9181 0.703125 8.48707V14.291C0.703125 15.1633 1.41282 15.873 2.28516 15.873H15.7148C16.5872 15.873 17.2969 15.1633 17.2969 14.291V8.48707C17.8483 7.91842 18 7.33855 18 6.87294V4.37695ZM5.44922 1.66018C5.44922 1.3263 5.72084 1.05469 6.05472 1.05469H11.9454C12.2792 1.05469 12.5508 1.3263 12.5508 1.66018V2.79492H5.44922V1.66018ZM1.05469 4.37695C1.05469 4.08618 1.29125 3.84961 1.58203 3.84961H16.418C16.7087 3.84961 16.9453 4.08618 16.9453 4.37695V6.87294C16.9453 8.17049 14.456 9.22936 10.8281 9.50678V9.01758C10.8281 8.72634 10.592 8.49023 10.3008 8.49023H7.69922C7.40798 8.49023 7.17188 8.72634 7.17188 9.01758V9.5066C3.5473 9.22883 1.05469 8.16718 1.05469 6.87294V4.37695ZM9.77344 9.54492V10.2305C9.77344 10.6085 9.46589 10.916 9.08789 10.916H8.91211C8.53411 10.916 8.22656 10.6085 8.22656 10.2305V9.54492H9.77344ZM15.7148 14.8184H2.28516C1.99438 14.8184 1.75781 14.5818 1.75781 14.291V9.26103C3.32803 10.0657 4.9782 10.3759 7.20478 10.5667C7.36189 11.3658 8.06759 11.9707 8.91211 11.9707H9.08789C9.93248 11.9707 10.6382 11.3658 10.7953 10.5665C12.6345 10.4333 14.2949 10.0957 15.5073 9.60514C15.7799 9.49482 16.0238 9.37958 16.2422 9.26093V14.291C16.2422 14.5818 16.0056 14.8184 15.7148 14.8184Z",fill:"currentColor"})})}function i5(){return r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M12 12.375C12.7664 12.375 13.5156 12.1477 14.1528 11.7219C14.7901 11.2962 15.2867 10.691 15.58 9.9829C15.8733 9.27484 15.9501 8.4957 15.8005 7.74403C15.651 6.99235 15.282 6.30189 14.74 5.75996C14.1981 5.21803 13.5077 4.84898 12.756 4.69946C12.0043 4.54994 11.2252 4.62668 10.5171 4.91997C9.80904 5.21326 9.20385 5.70993 8.77806 6.34717C8.35226 6.98441 8.125 7.7336 8.125 8.5C8.12615 9.52736 8.53478 10.5123 9.26123 11.2388C9.98769 11.9652 10.9726 12.3739 12 12.375ZM12 5.375C12.6181 5.375 13.2223 5.55828 13.7362 5.90166C14.2501 6.24504 14.6506 6.7331 14.8871 7.30412C15.1236 7.87514 15.1855 8.50347 15.065 9.10966C14.9444 9.71585 14.6467 10.2727 14.2097 10.7097C13.7727 11.1467 13.2158 11.4444 12.6097 11.565C12.0035 11.6855 11.3751 11.6236 10.8041 11.3871C10.2331 11.1506 9.74504 10.7501 9.40166 10.2362C9.05828 9.72226 8.875 9.11807 8.875 8.5C8.87593 7.67148 9.20546 6.87717 9.79131 6.29132C10.3772 5.70547 11.1715 5.37593 12 5.375Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5"}),r.jsx("path",{d:"M18.875 19C18.8732 17.4424 18.2537 15.9491 17.1523 14.8477C16.0509 13.7463 14.5576 13.1268 13 13.125H11C10.2284 13.1246 9.46423 13.2763 8.75126 13.5714C8.03829 13.8665 7.39048 14.2992 6.84485 14.8449C6.29923 15.3905 5.8665 16.0383 5.57139 16.7513C5.27629 17.4642 5.1246 18.2284 5.125 19C5.125 19.2071 5.29289 19.375 5.5 19.375H18.5C18.7071 19.375 18.875 19.2071 18.875 19ZM6.96389 18.625C6.38301 18.625 5.91613 18.1262 6.07814 17.5684C6.33473 16.685 6.82664 15.8801 7.51021 15.2449C8.45855 14.3636 9.70542 13.8742 11 13.875H13C14.2939 13.8765 15.5394 14.3668 16.4872 15.2476C17.1698 15.8819 17.6617 16.6851 17.9195 17.5669C18.0826 18.1251 17.6156 18.625 17.034 18.625H6.96389Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5"})]})}var Bl;function O(e,t,n){function s(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);const u=o.prototype,d=Object.keys(u);for(let m=0;m<d.length;m++){const h=d[m];h in l||(l[h]=u[h].bind(l))}}const a=(n==null?void 0:n.Parent)??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function o(l){var c;const u=n!=null&&n.Parent?new i:this;s(u,l),(c=u._zod).deferred??(c.deferred=[]);for(const d of u._zod.deferred)d();return u}return Object.defineProperty(o,"init",{value:s}),Object.defineProperty(o,Symbol.hasInstance,{value:l=>{var c,u;return n!=null&&n.Parent&&l instanceof n.Parent?!0:(u=(c=l==null?void 0:l._zod)==null?void 0:c.traits)==null?void 0:u.has(e)}}),Object.defineProperty(o,"name",{value:e}),o}class fr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class nd extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Bl=globalThis).__zod_globalConfig??(Bl.__zod_globalConfig={});const xo=globalThis.__zod_globalConfig;function rr(e){return xo}function rd(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,a])=>t.indexOf(+s)===-1).map(([s,a])=>a)}function Li(e,t){return typeof t=="bigint"?t.toString():t}function go(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function yo(e){return e==null}function bo(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Hl=Symbol("evaluating");function Pe(e,t,n){let s;Object.defineProperty(e,t,{get(){if(s!==Hl)return s===void 0&&(s=Hl,s=n()),s},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function or(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zn(...e){const t={};for(const n of e){const s=Object.getOwnPropertyDescriptors(n);Object.assign(t,s)}return Object.defineProperties({},t)}function Yl(e){return JSON.stringify(e)}function o5(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gs(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const l5=go(()=>{var e;if(xo.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function $r(e){if(Gs(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Gs(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ad(e){return $r(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const c5=new Set(["string","number","symbol"]);function Ir(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qn(e,t,n){const s=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(s._zod.parent=e),s}function ce(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function u5(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function d5(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=zn(e._zod.def,{get shape(){const o={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(o[l]=n.shape[l])}return or(this,"shape",o),o},checks:[]});return qn(e,i)}function m5(e,t){const n=e._zod.def,s=n.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=zn(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete o[l]}return or(this,"shape",o),o},checks:[]});return qn(e,i)}function h5(e,t){if(!$r(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=zn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return or(this,"shape",i),i}});return qn(e,a)}function f5(e,t){if(!$r(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=zn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return or(this,"shape",s),s}});return qn(e,n)}function p5(e,t){var s;if((s=e._zod.def.checks)!=null&&s.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=zn(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return or(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return qn(e,n)}function x5(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=zn(t._zod.def,{get shape(){const l=t._zod.def.shape,c={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return or(this,"shape",c),c},checks:[]});return qn(t,o)}function g5(e,t,n){const s=zn(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new e({type:"nonoptional",innerType:a[o]}))}else for(const o in a)i[o]=new e({type:"nonoptional",innerType:a[o]});return or(this,"shape",i),i}});return qn(t,s)}function mr(e,t=0){var n;if(e.aborted===!0)return!0;for(let s=t;s<e.issues.length;s++)if(((n=e.issues[s])==null?void 0:n.continue)!==!0)return!0;return!1}function y5(e,t=0){var n;if(e.aborted===!0)return!0;for(let s=t;s<e.issues.length;s++)if(((n=e.issues[s])==null?void 0:n.continue)===!1)return!0;return!1}function id(e,t){return t.map(n=>{var s;return(s=n).path??(s.path=[]),n.path.unshift(e),n})}function ks(e){return typeof e=="string"?e:e==null?void 0:e.message}function sr(e,t,n){var c,u,d,m,h,f;const s=e.message?e.message:ks((d=(u=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:u.error)==null?void 0:d.call(u,e))??ks((m=t==null?void 0:t.error)==null?void 0:m.call(t,e))??ks((h=n.customError)==null?void 0:h.call(n,e))??ks((f=n.localeError)==null?void 0:f.call(n,e))??"Invalid input",{inst:a,continue:i,input:o,...l}=e;return l.path??(l.path=[]),l.message=s,t!=null&&t.reportInput&&(l.input=o),l}function vo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function es(...e){const[t,n,s]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:s}:{...t}}const od=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Li,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Co=O("$ZodError",od),wa=O("$ZodError",od,{Parent:Error});function b5(e,t=n=>n.message){const n={},s=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):s.push(t(a));return{formErrors:s,fieldErrors:n}}function v5(e,t=n=>n.message){const n={_errors:[]},s=(a,i=[])=>{for(const o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(l=>s({issues:l},[...i,...o.path]));else if(o.code==="invalid_key")s({issues:o.issues},[...i,...o.path]);else if(o.code==="invalid_element")s({issues:o.issues},[...i,...o.path]);else{const l=[...i,...o.path];if(l.length===0)n._errors.push(t(o));else{let c=n,u=0;for(;u<l.length;){const d=l[u];u===l.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(o))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return s(e),n}const Na=e=>(t,n,s,a)=>{const i=s?{...s,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new fr;if(o.issues.length){const l=new((a==null?void 0:a.Err)??e)(o.issues.map(c=>sr(c,i,rr())));throw sd(l,a==null?void 0:a.callee),l}return o.value},C5=Na(wa),Sa=e=>async(t,n,s,a)=>{const i=s?{...s,async:!0}:{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const l=new((a==null?void 0:a.Err)??e)(o.issues.map(c=>sr(c,i,rr())));throw sd(l,a==null?void 0:a.callee),l}return o.value},j5=Sa(wa),Aa=e=>(t,n,s)=>{const a=s?{...s,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new fr;return i.issues.length?{success:!1,error:new(e??Co)(i.issues.map(o=>sr(o,a,rr())))}:{success:!0,data:i.value}},w5=Aa(wa),ka=e=>async(t,n,s)=>{const a=s?{...s,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(o=>sr(o,a,rr())))}:{success:!0,data:i.value}},N5=ka(wa),S5=e=>(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Na(e)(t,n,a)},A5=e=>(t,n,s)=>Na(e)(t,n,s),k5=e=>async(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Sa(e)(t,n,a)},P5=e=>async(t,n,s)=>Sa(e)(t,n,s),I5=e=>(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return Aa(e)(t,n,a)},E5=e=>(t,n,s)=>Aa(e)(t,n,s),T5=e=>async(t,n,s)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return ka(e)(t,n,a)},L5=e=>async(t,n,s)=>ka(e)(t,n,s),F5=/^[cC][0-9a-z]{6,}$/,R5=/^[0-9a-z]+$/,M5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,D5=/^[0-9a-vA-V]{20}$/,O5=/^[A-Za-z0-9]{27}$/,z5=/^[a-zA-Z0-9_-]{21}$/,q5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,V5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wl=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Z5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,U5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function B5(){return new RegExp(U5,"u")}const H5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Y5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,W5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,K5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Q5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ld=/^[A-Za-z0-9_-]*$/,G5=/^https?$/,J5=/^\+[1-9]\d{6,14}$/,cd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",X5=new RegExp(`^${cd}$`);function ud(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _5(e){return new RegExp(`^${ud(e)}$`)}function $5(e){const t=ud({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${n.join("|")})`;return new RegExp(`^${cd}T(?:${s})$`)}const e2=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},t2=/^(?:true|false)$/i,n2=/^[^A-Z]*$/,r2=/^[^a-z]*$/,_t=O("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),s2=O("$ZodCheckMaxLength",(e,t)=>{var n;_t.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!yo(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const a=s.value;if(a.length<=t.maximum)return;const o=vo(a);s.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),a2=O("$ZodCheckMinLength",(e,t)=>{var n;_t.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!yo(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const a=s.value;if(a.length>=t.minimum)return;const o=vo(a);s.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),i2=O("$ZodCheckLengthEquals",(e,t)=>{var n;_t.init(e,t),(n=e._zod.def).when??(n.when=s=>{const a=s.value;return!yo(a)&&a.length!==void 0}),e._zod.onattach.push(s=>{const a=s._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=s=>{const a=s.value,i=a.length;if(i===t.length)return;const o=vo(a),l=i>t.length;s.issues.push({origin:o,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),Pa=O("$ZodCheckStringFormat",(e,t)=>{var n,s;_t.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),o2=O("$ZodCheckRegex",(e,t)=>{Pa.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),l2=O("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=n2),Pa.init(e,t)}),c2=O("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=r2),Pa.init(e,t)}),u2=O("$ZodCheckIncludes",(e,t)=>{_t.init(e,t);const n=Ir(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=s,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(s)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),d2=O("$ZodCheckStartsWith",(e,t)=>{_t.init(e,t);const n=new RegExp(`^${Ir(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),m2=O("$ZodCheckEndsWith",(e,t)=>{_t.init(e,t);const n=new RegExp(`.*${Ir(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(s=>{const a=s._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),h2=O("$ZodCheckOverwrite",(e,t)=>{_t.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class f2{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const s=t.split(`
|
|
13
13
|
`).filter(o=>o),a=Math.min(...s.map(o=>o.length-o.trimStart().length)),i=s.map(o=>o.slice(a)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
|
|
14
|
-
`))}}const
|
|
15
|
-
if (${
|
|
16
|
-
if (${
|
|
17
|
-
payload.issues = payload.issues.concat(${
|
|
14
|
+
`))}}const p2={major:4,minor:4,patch:3},We=O("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=p2;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const i of s)for(const o of i._zod.onattach)o(e);if(s.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,c,u)=>{let d=mr(l),m;for(const h of c){if(h._zod.def.when){if(y5(l)||!h._zod.def.when(l))continue}else if(d)continue;const f=l.issues.length,y=h._zod.check(l);if(y instanceof Promise&&(u==null?void 0:u.async)===!1)throw new fr;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,l.issues.length!==f&&(d||(d=mr(l,f)))});else{if(l.issues.length===f)continue;d||(d=mr(l,f))}}return m?m.then(()=>l):l},o=(l,c,u)=>{if(mr(l))return l.aborted=!0,l;const d=i(c,s,u);if(d instanceof Promise){if(u.async===!1)throw new fr;return d.then(m=>e._zod.parse(m,u))}return e._zod.parse(d,u)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const d=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return d instanceof Promise?d.then(m=>o(m,l,c)):o(d,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new fr;return u.then(d=>i(d,s,c))}return i(u,s,c)}}Pe(e,"~standard",()=>({validate:i=>{var o;try{const l=w5(e,i);return l.success?{value:l.data}:{issues:(o=l.error)==null?void 0:o.issues}}catch{return N5(e,i).then(c=>{var u;return c.success?{value:c.data}:{issues:(u=c.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),jo=O("$ZodString",(e,t)=>{var n;We.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??e2(e._zod.bag),e._zod.parse=(s,a)=>{if(t.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),Me=O("$ZodStringFormat",(e,t)=>{Pa.init(e,t),jo.init(e,t)}),x2=O("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=V5),Me.init(e,t)}),g2=O("$ZodUUID",(e,t)=>{if(t.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Wl(s))}else t.pattern??(t.pattern=Wl());Me.init(e,t)}),y2=O("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Z5),Me.init(e,t)}),b2=O("$ZodURL",(e,t)=>{Me.init(e,t),e._zod.check=n=>{var s;try{const a=n.value.trim();if(!t.normalize&&((s=t.protocol)==null?void 0:s.source)===G5.source&&!/^https?:\/\//i.test(a)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}const i=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),v2=O("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=B5()),Me.init(e,t)}),C2=O("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=z5),Me.init(e,t)}),j2=O("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=F5),Me.init(e,t)}),w2=O("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=R5),Me.init(e,t)}),N2=O("$ZodULID",(e,t)=>{t.pattern??(t.pattern=M5),Me.init(e,t)}),S2=O("$ZodXID",(e,t)=>{t.pattern??(t.pattern=D5),Me.init(e,t)}),A2=O("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=O5),Me.init(e,t)}),k2=O("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$5(t)),Me.init(e,t)}),P2=O("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=X5),Me.init(e,t)}),I2=O("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_5(t)),Me.init(e,t)}),E2=O("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=q5),Me.init(e,t)}),T2=O("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=H5),Me.init(e,t),e._zod.bag.format="ipv4"}),L2=O("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Y5),Me.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),F2=O("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=W5),Me.init(e,t)}),R2=O("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=K5),Me.init(e,t),e._zod.check=n=>{const s=n.value.split("/");try{if(s.length!==2)throw new Error;const[a,i]=s;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function dd(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const M2=O("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Q5),Me.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{dd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function D2(e){if(!ld.test(e))return!1;const t=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return dd(n)}const O2=O("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ld),Me.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{D2(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),z2=O("$ZodE164",(e,t)=>{t.pattern??(t.pattern=J5),Me.init(e,t)});function q2(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[s]=n;if(!s)return!1;const a=JSON.parse(atob(s));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const V2=O("$ZodJWT",(e,t)=>{Me.init(e,t),e._zod.check=n=>{q2(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Z2=O("$ZodBoolean",(e,t)=>{We.init(e,t),e._zod.pattern=t2,e._zod.parse=(n,s)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),U2=O("$ZodUnknown",(e,t)=>{We.init(e,t),e._zod.parse=n=>n}),B2=O("$ZodNever",(e,t)=>{We.init(e,t),e._zod.parse=(n,s)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Kl(e,t,n){e.issues.length&&t.issues.push(...id(n,e.issues)),t.value[n]=e.value}const H2=O("$ZodArray",(e,t)=>{We.init(e,t),e._zod.parse=(n,s)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let o=0;o<a.length;o++){const l=a[o],c=t.element._zod.run({value:l,issues:[]},s);c instanceof Promise?i.push(c.then(u=>Kl(u,n,o))):Kl(c,n,o)}return i.length?Promise.all(i).then(()=>n):n}});function Js(e,t,n,s,a,i){const o=n in s;if(e.issues.length){if(a&&i&&!o)return;t.issues.push(...id(n,e.issues))}if(!o&&!a){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function md(e){var s,a,i,o;const t=Object.keys(e.shape);for(const l of t)if(!((o=(i=(a=(s=e.shape)==null?void 0:s[l])==null?void 0:a._zod)==null?void 0:i.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const n=u5(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function hd(e,t,n,s,a,i){const o=[],l=a.keySet,c=a.catchall._zod,u=c.def.type,d=c.optin==="optional",m=c.optout==="optional";for(const h in t){if(h==="__proto__"||l.has(h))continue;if(u==="never"){o.push(h);continue}const f=c.run({value:t[h],issues:[]},s);f instanceof Promise?e.push(f.then(y=>Js(y,n,h,t,d,m))):Js(f,n,h,t,d,m)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Y2=O("$ZodObject",(e,t)=>{We.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}const s=go(()=>md(t));Pe(e._zod,"propValues",()=>{const l=t.shape,c={};for(const u in l){const d=l[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(const m of d.values)c[u].add(m)}}return c});const a=Gs,i=t.catchall;let o;e._zod.parse=(l,c)=>{o??(o=s.value);const u=l.value;if(!a(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const d=[],m=o.shape;for(const h of o.keys){const f=m[h],y=f._zod.optin==="optional",p=f._zod.optout==="optional",b=f._zod.run({value:u[h],issues:[]},c);b instanceof Promise?d.push(b.then(C=>Js(C,l,h,u,y,p))):Js(b,l,h,u,y,p)}return i?hd(d,u,l,c,s.value,e):d.length?Promise.all(d).then(()=>l):l}}),W2=O("$ZodObjectJIT",(e,t)=>{Y2.init(e,t);const n=e._zod.parse,s=go(()=>md(t)),a=h=>{var A,j;const f=new f2(["shape","payload","ctx"]),y=s.value,p=k=>{const N=Yl(k);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};f.write("const input = payload.value;");const b=Object.create(null);let C=0;for(const k of y.keys)b[k]=`key_${C++}`;f.write("const newResult = {};");for(const k of y.keys){const N=b[k],T=Yl(k),D=h[k],q=((A=D==null?void 0:D._zod)==null?void 0:A.optin)==="optional",$=((j=D==null?void 0:D._zod)==null?void 0:j.optout)==="optional";f.write(`const ${N} = ${p(k)};`),q&&$?f.write(`
|
|
15
|
+
if (${N}.issues.length) {
|
|
16
|
+
if (${T} in input) {
|
|
17
|
+
payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
|
|
18
18
|
...iss,
|
|
19
|
-
path: iss.path ? [${
|
|
19
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
20
20
|
})));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
if (${
|
|
25
|
-
if (${
|
|
26
|
-
newResult[${
|
|
24
|
+
if (${N}.value === undefined) {
|
|
25
|
+
if (${T} in input) {
|
|
26
|
+
newResult[${T}] = undefined;
|
|
27
27
|
}
|
|
28
28
|
} else {
|
|
29
|
-
newResult[${
|
|
29
|
+
newResult[${T}] = ${N}.value;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
`):
|
|
33
|
-
if (${
|
|
34
|
-
payload.issues = payload.issues.concat(${
|
|
32
|
+
`):q?f.write(`
|
|
33
|
+
if (${N}.issues.length) {
|
|
34
|
+
payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
|
|
35
35
|
...iss,
|
|
36
|
-
path: iss.path ? [${
|
|
36
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
37
37
|
})));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
if (${
|
|
41
|
-
if (${
|
|
42
|
-
newResult[${
|
|
40
|
+
if (${N}.value === undefined) {
|
|
41
|
+
if (${T} in input) {
|
|
42
|
+
newResult[${T}] = undefined;
|
|
43
43
|
}
|
|
44
44
|
} else {
|
|
45
|
-
newResult[${
|
|
45
|
+
newResult[${T}] = ${N}.value;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
`):f.write(`
|
|
49
|
-
const ${
|
|
50
|
-
if (${
|
|
51
|
-
payload.issues = payload.issues.concat(${
|
|
49
|
+
const ${N}_present = ${T} in input;
|
|
50
|
+
if (${N}.issues.length) {
|
|
51
|
+
payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
|
|
52
52
|
...iss,
|
|
53
|
-
path: iss.path ? [${
|
|
53
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
54
54
|
})));
|
|
55
55
|
}
|
|
56
|
-
if (!${
|
|
56
|
+
if (!${N}_present && !${N}.issues.length) {
|
|
57
57
|
payload.issues.push({
|
|
58
58
|
code: "invalid_type",
|
|
59
59
|
expected: "nonoptional",
|
|
60
60
|
input: undefined,
|
|
61
|
-
path: [${
|
|
61
|
+
path: [${T}]
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
if (${
|
|
66
|
-
if (${
|
|
67
|
-
newResult[${
|
|
65
|
+
if (${N}_present) {
|
|
66
|
+
if (${N}.value === undefined) {
|
|
67
|
+
newResult[${T}] = undefined;
|
|
68
68
|
} else {
|
|
69
|
-
newResult[${
|
|
69
|
+
newResult[${T}] = ${N}.value;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");const b=f.compile();return(w,k)=>b(h,w,k)};let i;const o=Hs,l=!ho.jitless,u=l&&t5.value,d=t.catchall;let m;e._zod.parse=(h,f)=>{m??(m=s.value);const g=h.value;return o(g)?l&&u&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(i||(i=a(t.shape)),h=i(h,f),d?ld([],g,h,f,m,e):h):n(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function Bl(e,t,n,s){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!cr(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(o=>nr(o,s,tr())))}),t)}const V2=D("$ZodUnion",(e,t)=>{We.init(e,t),Ae(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Ae(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Ae(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Ae(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>xo(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(s,a)=>{if(n)return n(s,a);let i=!1;const o=[];for(const l of t.options){const c=l._zod.run({value:s.value,issues:[]},a);if(c instanceof Promise)o.push(c),i=!0;else{if(c.issues.length===0)return c;o.push(c)}}return i?Promise.all(o).then(l=>Bl(l,s,e,a)):Bl(o,s,e,a)}}),Z2=D("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(n,s)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},s),o=t.right._zod.run({value:a,issues:[]},s);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([c,u])=>Yl(n,c,u)):Yl(n,i,o)}});function Ii(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Gr(e)&&Gr(t)){const n=Object.keys(t),s=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of s){const o=Ii(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};a[i]=o.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<e.length;s++){const a=e[s],i=t[s],o=Ii(a,i);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Yl(e,t,n){const s=new Map;let a;for(const l of t.issues)if(l.code==="unrecognized_keys"){a??(a=l);for(const c of l.keys)s.has(c)||s.set(c,{}),s.get(c).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const c of l.keys)s.has(c)||s.set(c,{}),s.get(c).r=!0;else e.issues.push(l);const i=[...s].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(i.length&&a&&e.issues.push({...a,keys:i}),cr(e))return e;const o=Ii(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const U2=D("$ZodEnum",(e,t)=>{We.init(e,t);const n=_u(t.entries),s=new Set(n);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.filter(a=>n5.has(typeof a)).map(a=>typeof a=="string"?Ar(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const o=a.value;return s.has(o)||a.issues.push({code:"invalid_value",values:n,input:o,inst:e}),a}}),B2=D("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(s=>typeof s=="string"?Ar(s):s?Ar(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,a)=>{const i=s.value;return n.has(i)||s.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),s}}),Y2=D("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new Xu(e.constructor.name);const a=t.transform(n.value,n);if(s.async)return(a instanceof Promise?a:Promise.resolve(a)).then(o=>(n.value=o,n.fallback=!0,n));if(a instanceof Promise)throw new dr;return n.value=a,n.fallback=!0,n}});function Hl(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const cd=D("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ae(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xo(n.source)})?$`):void 0}),e._zod.parse=(n,s)=>{if(t.innerType._zod.optin==="optional"){const a=n.value,i=t.innerType._zod.run(n,s);return i instanceof Promise?i.then(o=>Hl(o,a)):Hl(i,a)}return n.value===void 0?n:t.innerType._zod.run(n,s)}}),H2=D("$ZodExactOptional",(e,t)=>{cd.init(e,t),Ae(e._zod,"values",()=>t.innerType._zod.values),Ae(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,s)=>t.innerType._zod.run(n,s)}),W2=D("$ZodNullable",(e,t)=>{We.init(e,t),Ae(e._zod,"optin",()=>t.innerType._zod.optin),Ae(e._zod,"optout",()=>t.innerType._zod.optout),Ae(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xo(n.source)}|null)$`):void 0}),Ae(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,s)=>n.value===null?n:t.innerType._zod.run(n,s)}),K2=D("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>Wl(i,t)):Wl(a,t)}});function Wl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Q2=D("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,s))}),G2=D("$ZodNonOptional",(e,t)=>{We.init(e,t),Ae(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),e._zod.parse=(n,s)=>{const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>Kl(i,e)):Kl(a,e)}});function Kl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const J2=D("$ZodCatch",(e,t)=>{We.init(e,t),e._zod.optin="optional",Ae(e._zod,"optout",()=>t.innerType._zod.optout),Ae(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>nr(o,s,tr()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>nr(i,s,tr()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),X2=D("$ZodPipe",(e,t)=>{We.init(e,t),Ae(e._zod,"values",()=>t.in._zod.values),Ae(e._zod,"optin",()=>t.in._zod.optin),Ae(e._zod,"optout",()=>t.out._zod.optout),Ae(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,s)=>{if(s.direction==="backward"){const i=t.out._zod.run(n,s);return i instanceof Promise?i.then(o=>Ns(o,t.in,s)):Ns(i,t.in,s)}const a=t.in._zod.run(n,s);return a instanceof Promise?a.then(i=>Ns(i,t.out,s)):Ns(a,t.out,s)}});function Ns(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const _2=D("$ZodReadonly",(e,t)=>{We.init(e,t),Ae(e._zod,"propValues",()=>t.innerType._zod.propValues),Ae(e._zod,"values",()=>t.innerType._zod.values),Ae(e._zod,"optin",()=>{var n,s;return(s=(n=t.innerType)==null?void 0:n._zod)==null?void 0:s.optin}),Ae(e._zod,"optout",()=>{var n,s;return(s=(n=t.innerType)==null?void 0:n._zod)==null?void 0:s.optout}),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(Ql):Ql(a)}});function Ql(e){return e.value=Object.freeze(e.value),e}const $2=D("$ZodCustom",(e,t)=>{Jt.init(e,t),We.init(e,t),e._zod.parse=(n,s)=>n,e._zod.check=n=>{const s=n.value,a=t.fn(s);if(a instanceof Promise)return a.then(i=>Gl(i,n,s,e));Gl(a,n,s,e)}});function Gl(e,t,n,s){if(!e){const a={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(a.params=s._zod.def.params),t.issues.push(Jr(a))}}var Jl;class e6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const s=n[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const s={...this.get(n)??{}};delete s.id;const a={...s,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function t6(){return new e6}(Jl=globalThis).__zod_globalRegistry??(Jl.__zod_globalRegistry=t6());const Yr=globalThis.__zod_globalRegistry;function n6(e,t){return new e({type:"string",...le(t)})}function r6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...le(t)})}function Xl(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...le(t)})}function s6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...le(t)})}function a6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(t)})}function i6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(t)})}function o6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(t)})}function l6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...le(t)})}function c6(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...le(t)})}function u6(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(t)})}function d6(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...le(t)})}function m6(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(t)})}function h6(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...le(t)})}function f6(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...le(t)})}function p6(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(t)})}function x6(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(t)})}function g6(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(t)})}function y6(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(t)})}function b6(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(t)})}function v6(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...le(t)})}function C6(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...le(t)})}function j6(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...le(t)})}function w6(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...le(t)})}function N6(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(t)})}function S6(e,t){return new e({type:"string",format:"date",check:"string_format",...le(t)})}function A6(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...le(t)})}function k6(e,t){return new e({type:"string",format:"duration",check:"string_format",...le(t)})}function P6(e,t){return new e({type:"boolean",...le(t)})}function E6(e){return new e({type:"unknown"})}function I6(e,t){return new e({type:"never",...le(t)})}function ud(e,t){return new X5({check:"max_length",...le(t),maximum:e})}function Ks(e,t){return new _5({check:"min_length",...le(t),minimum:e})}function dd(e,t){return new $5({check:"length_equals",...le(t),length:e})}function T6(e,t){return new e2({check:"string_format",format:"regex",...le(t),pattern:e})}function L6(e){return new t2({check:"string_format",format:"lowercase",...le(e)})}function F6(e){return new n2({check:"string_format",format:"uppercase",...le(e)})}function R6(e,t){return new r2({check:"string_format",format:"includes",...le(t),includes:e})}function M6(e,t){return new s2({check:"string_format",format:"starts_with",...le(t),prefix:e})}function D6(e,t){return new a2({check:"string_format",format:"ends_with",...le(t),suffix:e})}function Dr(e){return new i2({check:"overwrite",tx:e})}function O6(e){return Dr(t=>t.normalize(e))}function z6(){return Dr(e=>e.trim())}function q6(){return Dr(e=>e.toLowerCase())}function V6(){return Dr(e=>e.toUpperCase())}function Z6(){return Dr(e=>e5(e))}function U6(e,t,n){return new e({type:"array",element:t,...le(n)})}function B6(e,t,n){return new e({type:"custom",check:"custom",fn:t,...le(n)})}function Y6(e,t){const n=H6(s=>(s.addIssue=a=>{if(typeof a=="string")s.issues.push(Jr(a,s.value,n._zod.def));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=s.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),s.issues.push(Jr(i))}},e(s.value,s)),t);return n}function H6(e,t){const n=new Jt({check:"custom",...le(t)});return n._zod.check=e,n}function md(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Yr,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function st(e,t,n={path:[],schemaPath:[]}){var d,m;var s;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const l=(m=(d=e._zod).toJSONSchema)==null?void 0:m.call(d);if(l)o.schema=l;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,h);else{const g=o.schema,p=t.processors[a.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);p(e,t,g,h)}const f=e._zod.parent;f&&(o.ref||(o.ref=f),st(f,t,h),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&ut(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((s=o.schema).default??(s.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function hd(e,t){var o,l,c,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const d of e.seen.entries()){const m=(o=e.metadataRegistry.get(d[0]))==null?void 0:o.id;if(m){const h=s.get(m);if(h&&h!==d[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(m,d[0])}}const a=d=>{var p;const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=(p=e.external.registry.get(d[0]))==null?void 0:p.id,y=e.external.uri??(S=>S);if(v)return{ref:y(v)};const b=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=b,{defId:b,ref:`${y("__shared")}#/${m}/${b}`}}if(d[1]===n)return{ref:"#"};const f=`#/${m}/`,g=d[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:f+g}},i=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:h,defId:f}=a(d);m.def={...m.schema},f&&(m.defId=f);const g=m.schema;for(const p in g)delete g[p];g.$ref=h};if(e.cycles==="throw")for(const d of e.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${(l=m.cycle)==null?void 0:l.join("/")}/<root>
|
|
73
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");const g=f.compile();return(k,N)=>g(h,k,N)};let i;const o=Gs,l=!xo.jitless,u=l&&l5.value,d=t.catchall;let m;e._zod.parse=(h,f)=>{m??(m=s.value);const y=h.value;return o(y)?l&&u&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(i||(i=a(t.shape)),h=i(h,f),d?hd([],y,h,f,m,e):h):n(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),h)}});function Ql(e,t,n,s){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!mr(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(o=>sr(o,s,rr())))}),t)}const K2=O("$ZodUnion",(e,t)=>{We.init(e,t),Pe(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Pe(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Pe(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Pe(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${s.map(a=>bo(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(s,a)=>{if(n)return n(s,a);let i=!1;const o=[];for(const l of t.options){const c=l._zod.run({value:s.value,issues:[]},a);if(c instanceof Promise)o.push(c),i=!0;else{if(c.issues.length===0)return c;o.push(c)}}return i?Promise.all(o).then(l=>Ql(l,s,e,a)):Ql(o,s,e,a)}}),Q2=O("$ZodIntersection",(e,t)=>{We.init(e,t),e._zod.parse=(n,s)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},s),o=t.right._zod.run({value:a,issues:[]},s);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([c,u])=>Gl(n,c,u)):Gl(n,i,o)}});function Fi(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($r(e)&&$r(t)){const n=Object.keys(t),s=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of s){const o=Fi(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};a[i]=o.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<e.length;s++){const a=e[s],i=t[s],o=Fi(a,i);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Gl(e,t,n){const s=new Map;let a;for(const l of t.issues)if(l.code==="unrecognized_keys"){a??(a=l);for(const c of l.keys)s.has(c)||s.set(c,{}),s.get(c).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const c of l.keys)s.has(c)||s.set(c,{}),s.get(c).r=!0;else e.issues.push(l);const i=[...s].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(i.length&&a&&e.issues.push({...a,keys:i}),mr(e))return e;const o=Fi(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const G2=O("$ZodEnum",(e,t)=>{We.init(e,t);const n=rd(t.entries),s=new Set(n);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.filter(a=>c5.has(typeof a)).map(a=>typeof a=="string"?Ir(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const o=a.value;return s.has(o)||a.issues.push({code:"invalid_value",values:n,input:o,inst:e}),a}}),J2=O("$ZodLiteral",(e,t)=>{if(We.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(s=>typeof s=="string"?Ir(s):s?Ir(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,a)=>{const i=s.value;return n.has(i)||s.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),s}}),X2=O("$ZodTransform",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new nd(e.constructor.name);const a=t.transform(n.value,n);if(s.async)return(a instanceof Promise?a:Promise.resolve(a)).then(o=>(n.value=o,n.fallback=!0,n));if(a instanceof Promise)throw new fr;return n.value=a,n.fallback=!0,n}});function Jl(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const fd=O("$ZodOptional",(e,t)=>{We.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Pe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${bo(n.source)})?$`):void 0}),e._zod.parse=(n,s)=>{if(t.innerType._zod.optin==="optional"){const a=n.value,i=t.innerType._zod.run(n,s);return i instanceof Promise?i.then(o=>Jl(o,a)):Jl(i,a)}return n.value===void 0?n:t.innerType._zod.run(n,s)}}),_2=O("$ZodExactOptional",(e,t)=>{fd.init(e,t),Pe(e._zod,"values",()=>t.innerType._zod.values),Pe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,s)=>t.innerType._zod.run(n,s)}),$2=O("$ZodNullable",(e,t)=>{We.init(e,t),Pe(e._zod,"optin",()=>t.innerType._zod.optin),Pe(e._zod,"optout",()=>t.innerType._zod.optout),Pe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${bo(n.source)}|null)$`):void 0}),Pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,s)=>n.value===null?n:t.innerType._zod.run(n,s)}),e6=O("$ZodDefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>Xl(i,t)):Xl(a,t)}});function Xl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const t6=O("$ZodPrefault",(e,t)=>{We.init(e,t),e._zod.optin="optional",Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,s))}),n6=O("$ZodNonOptional",(e,t)=>{We.init(e,t),Pe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),e._zod.parse=(n,s)=>{const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>_l(i,e)):_l(a,e)}});function _l(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const r6=O("$ZodCatch",(e,t)=>{We.init(e,t),e._zod.optin="optional",Pe(e._zod,"optout",()=>t.innerType._zod.optout),Pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>sr(o,s,rr()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>sr(i,s,rr()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),s6=O("$ZodPipe",(e,t)=>{We.init(e,t),Pe(e._zod,"values",()=>t.in._zod.values),Pe(e._zod,"optin",()=>t.in._zod.optin),Pe(e._zod,"optout",()=>t.out._zod.optout),Pe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,s)=>{if(s.direction==="backward"){const i=t.out._zod.run(n,s);return i instanceof Promise?i.then(o=>Ps(o,t.in,s)):Ps(i,t.in,s)}const a=t.in._zod.run(n,s);return a instanceof Promise?a.then(i=>Ps(i,t.out,s)):Ps(a,t.out,s)}});function Ps(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const a6=O("$ZodReadonly",(e,t)=>{We.init(e,t),Pe(e._zod,"propValues",()=>t.innerType._zod.propValues),Pe(e._zod,"values",()=>t.innerType._zod.values),Pe(e._zod,"optin",()=>{var n,s;return(s=(n=t.innerType)==null?void 0:n._zod)==null?void 0:s.optin}),Pe(e._zod,"optout",()=>{var n,s;return(s=(n=t.innerType)==null?void 0:n._zod)==null?void 0:s.optout}),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then($l):$l(a)}});function $l(e){return e.value=Object.freeze(e.value),e}const i6=O("$ZodCustom",(e,t)=>{_t.init(e,t),We.init(e,t),e._zod.parse=(n,s)=>n,e._zod.check=n=>{const s=n.value,a=t.fn(s);if(a instanceof Promise)return a.then(i=>ec(i,n,s,e));ec(a,n,s,e)}});function ec(e,t,n,s){if(!e){const a={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(a.params=s._zod.def.params),t.issues.push(es(a))}}var tc;class o6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const s=n[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const s={...this.get(n)??{}};delete s.id;const a={...s,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function l6(){return new o6}(tc=globalThis).__zod_globalRegistry??(tc.__zod_globalRegistry=l6());const Qr=globalThis.__zod_globalRegistry;function c6(e,t){return new e({type:"string",...ce(t)})}function u6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ce(t)})}function nc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ce(t)})}function d6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ce(t)})}function m6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ce(t)})}function h6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ce(t)})}function f6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ce(t)})}function p6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ce(t)})}function x6(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ce(t)})}function g6(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ce(t)})}function y6(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ce(t)})}function b6(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ce(t)})}function v6(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ce(t)})}function C6(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ce(t)})}function j6(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ce(t)})}function w6(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ce(t)})}function N6(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ce(t)})}function S6(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ce(t)})}function A6(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ce(t)})}function k6(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ce(t)})}function P6(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ce(t)})}function I6(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ce(t)})}function E6(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ce(t)})}function T6(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ce(t)})}function L6(e,t){return new e({type:"string",format:"date",check:"string_format",...ce(t)})}function F6(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ce(t)})}function R6(e,t){return new e({type:"string",format:"duration",check:"string_format",...ce(t)})}function M6(e,t){return new e({type:"boolean",...ce(t)})}function D6(e){return new e({type:"unknown"})}function O6(e,t){return new e({type:"never",...ce(t)})}function pd(e,t){return new s2({check:"max_length",...ce(t),maximum:e})}function Xs(e,t){return new a2({check:"min_length",...ce(t),minimum:e})}function xd(e,t){return new i2({check:"length_equals",...ce(t),length:e})}function z6(e,t){return new o2({check:"string_format",format:"regex",...ce(t),pattern:e})}function q6(e){return new l2({check:"string_format",format:"lowercase",...ce(e)})}function V6(e){return new c2({check:"string_format",format:"uppercase",...ce(e)})}function Z6(e,t){return new u2({check:"string_format",format:"includes",...ce(t),includes:e})}function U6(e,t){return new d2({check:"string_format",format:"starts_with",...ce(t),prefix:e})}function B6(e,t){return new m2({check:"string_format",format:"ends_with",...ce(t),suffix:e})}function qr(e){return new h2({check:"overwrite",tx:e})}function H6(e){return qr(t=>t.normalize(e))}function Y6(){return qr(e=>e.trim())}function W6(){return qr(e=>e.toLowerCase())}function K6(){return qr(e=>e.toUpperCase())}function Q6(){return qr(e=>o5(e))}function G6(e,t,n){return new e({type:"array",element:t,...ce(n)})}function J6(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ce(n)})}function X6(e,t){const n=_6(s=>(s.addIssue=a=>{if(typeof a=="string")s.issues.push(es(a,s.value,n._zod.def));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=s.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),s.issues.push(es(i))}},e(s.value,s)),t);return n}function _6(e,t){const n=new _t({check:"custom",...ce(t)});return n._zod.check=e,n}function gd(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Qr,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function at(e,t,n={path:[],schemaPath:[]}){var d,m;var s;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const l=(m=(d=e._zod).toJSONSchema)==null?void 0:m.call(d);if(l)o.schema=l;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,h);else{const y=o.schema,p=t.processors[a.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);p(e,t,y,h)}const f=e._zod.parent;f&&(o.ref||(o.ref=f),at(f,t,h),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&dt(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&"_prefault"in o.schema&&((s=o.schema).default??(s.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function yd(e,t){var o,l,c,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const d of e.seen.entries()){const m=(o=e.metadataRegistry.get(d[0]))==null?void 0:o.id;if(m){const h=s.get(m);if(h&&h!==d[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(m,d[0])}}const a=d=>{var p;const m=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const b=(p=e.external.registry.get(d[0]))==null?void 0:p.id,C=e.external.uri??(A=>A);if(b)return{ref:C(b)};const g=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=g,{defId:g,ref:`${C("__shared")}#/${m}/${g}`}}if(d[1]===n)return{ref:"#"};const f=`#/${m}/`,y=d[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:f+y}},i=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:h,defId:f}=a(d);m.def={...m.schema},f&&(m.defId=f);const y=m.schema;for(const p in y)delete y[p];y.$ref=h};if(e.cycles==="throw")for(const d of e.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${(l=m.cycle)==null?void 0:l.join("/")}/<root>
|
|
74
74
|
|
|
75
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const m=d[1];if(t===d[0]){i(d);continue}if(e.external){const f=(c=e.external.registry.get(d[0]))==null?void 0:c.id;if(t!==d[0]&&f){i(d);continue}}if((u=e.metadataRegistry.get(d[0]))==null?void 0:u.id){i(d);continue}if(m.cycle){i(d);continue}if(m.count>1&&e.reused==="ref"){i(d);continue}}}function fd(e,t){var l,c,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=m=>{const h=e.seen.get(m);if(h.ref===null)return;const f=h.def??h.schema,g={...f},p=h.ref;if(h.ref=null,p){s(p);const y=e.seen.get(p),b=y.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(b)):Object.assign(f,b),Object.assign(f,g),m._zod.parent===p)for(const A in f)A==="$ref"||A==="allOf"||A in g||delete f[A];if(b.$ref&&y.def)for(const A in f)A==="$ref"||A==="allOf"||A in y.def&&JSON.stringify(f[A])===JSON.stringify(y.def[A])&&delete f[A]}const v=m._zod.parent;if(v&&v!==p){s(v);const y=e.seen.get(v);if(y!=null&&y.schema.$ref&&(f.$ref=y.schema.$ref,y.def))for(const b in f)b==="$ref"||b==="allOf"||b in y.def&&JSON.stringify(f[b])===JSON.stringify(y.def[b])&&delete f[b]}e.override({zodSchema:m,jsonSchema:f,path:h.path??[]})};for(const m of[...e.seen.entries()].reverse())s(m[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const m=(c=e.external.registry.get(t))==null?void 0:c.id;if(!m)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(m)}Object.assign(a,n.def??n.schema);const i=(u=e.metadataRegistry.get(t))==null?void 0:u.id;i!==void 0&&a.id===i&&delete a.id;const o=((d=e.external)==null?void 0:d.defs)??{};for(const m of e.seen.entries()){const h=m[1];h.def&&h.defId&&(h.def.id===h.defId&&delete h.def.id,o[h.defId]=h.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?a.$defs=o:a.definitions=o);try{const m=JSON.parse(JSON.stringify(a));return Object.defineProperty(m,"~standard",{value:{...t["~standard"],jsonSchema:{input:Qs(t,"input",e.processors),output:Qs(t,"output",e.processors)}},enumerable:!1,writable:!1}),m}catch{throw new Error("Error converting schema to JSON.")}}function ut(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return ut(s.element,n);if(s.type==="set")return ut(s.valueType,n);if(s.type==="lazy")return ut(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return ut(s.innerType,n);if(s.type==="intersection")return ut(s.left,n)||ut(s.right,n);if(s.type==="record"||s.type==="map")return ut(s.keyType,n)||ut(s.valueType,n);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ut(s.in,n)||ut(s.out,n);if(s.type==="object"){for(const a in s.shape)if(ut(s.shape[a],n))return!0;return!1}if(s.type==="union"){for(const a of s.options)if(ut(a,n))return!0;return!1}if(s.type==="tuple"){for(const a of s.items)if(ut(a,n))return!0;return!!(s.rest&&ut(s.rest,n))}return!1}const W6=(e,t={})=>n=>{const s=md({...n,processors:t});return st(e,s),hd(s,e),fd(s,e)},Qs=(e,t,n={})=>s=>{const{libraryOptions:a,target:i}=s??{},o=md({...a??{},target:i,io:t,processors:n});return st(e,o),hd(o,e),fd(o,e)},K6={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Q6=(e,t,n,s)=>{const a=n;a.type="string";const{minimum:i,maximum:o,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof o=="number"&&(a.maxLength=o),l&&(a.format=K6[l]??l,a.format===""&&delete a.format,l==="time"&&delete a.format),u&&(a.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?a.pattern=d[0].source:d.length>1&&(a.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},G6=(e,t,n,s)=>{n.type="boolean"},J6=(e,t,n,s)=>{n.not={}},X6=(e,t,n,s)=>{},_6=(e,t,n,s)=>{const a=e._zod.def,i=_u(a.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},$6=(e,t,n,s)=>{const a=e._zod.def,i=[];for(const o of a.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(o))}else i.push(o);if(i.length!==0)if(i.length===1){const o=i[0];n.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[o]:n.const=o}else i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),i.every(o=>typeof o=="boolean")&&(n.type="boolean"),i.every(o=>o===null)&&(n.type="null"),n.enum=i},e4=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},t4=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},n4=(e,t,n,s)=>{const a=n,i=e._zod.def,{minimum:o,maximum:l}=e._zod.bag;typeof o=="number"&&(a.minItems=o),typeof l=="number"&&(a.maxItems=l),a.type="array",a.items=st(i.element,t,{...s,path:[...s.path,"items"]})},r4=(e,t,n,s)=>{var u;const a=n,i=e._zod.def;a.type="object",a.properties={};const o=i.shape;for(const d in o)a.properties[d]=st(o[d],t,{...s,path:[...s.path,"properties",d]});const l=new Set(Object.keys(o)),c=new Set([...l].filter(d=>{const m=i.shape[d]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));c.size>0&&(a.required=Array.from(c)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=st(i.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},s4=(e,t,n,s)=>{const a=e._zod.def,i=a.inclusive===!1,o=a.options.map((l,c)=>st(l,t,{...s,path:[...s.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=o:n.anyOf=o},a4=(e,t,n,s)=>{const a=e._zod.def,i=st(a.left,t,{...s,path:[...s.path,"allOf",0]}),o=st(a.right,t,{...s,path:[...s.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(i)?i.allOf:[i],...l(o)?o.allOf:[o]];n.allOf=c},i4=(e,t,n,s)=>{const a=e._zod.def,i=st(a.innerType,t,s),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},o4=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType},l4=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},c4=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},u4=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType;let o;try{o=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},d4=(e,t,n,s)=>{const a=e._zod.def,i=a.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?i?a.out:a.in:a.out;st(o,t,s);const l=t.seen.get(e);l.ref=o},m4=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},pd=(e,t,n,s)=>{const a=e._zod.def;st(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType},h4=D("ZodISODateTime",(e,t)=>{v2.init(e,t),Ve.init(e,t)});function f4(e){return N6(h4,e)}const p4=D("ZodISODate",(e,t)=>{C2.init(e,t),Ve.init(e,t)});function x4(e){return S6(p4,e)}const g4=D("ZodISOTime",(e,t)=>{j2.init(e,t),Ve.init(e,t)});function y4(e){return A6(g4,e)}const b4=D("ZodISODuration",(e,t)=>{w2.init(e,t),Ve.init(e,t)});function v4(e){return k6(b4,e)}const C4=(e,t)=>{yo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>h5(e,n)},flatten:{value:n=>m5(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ei,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ei,2)}},isEmpty:{get(){return e.issues.length===0}}})},zt=D("ZodError",C4,{Parent:Error}),j4=va(zt),w4=Ca(zt),N4=ja(zt),S4=wa(zt),A4=y5(zt),k4=b5(zt),P4=v5(zt),E4=C5(zt),I4=j5(zt),T4=w5(zt),L4=N5(zt),F4=S5(zt),_l=new WeakMap;function Sa(e,t,n){const s=Object.getPrototypeOf(e);let a=_l.get(s);if(a||(a=new Set,_l.set(s,a)),!a.has(t)){a.add(t);for(const i in n){const o=n[i];Object.defineProperty(s,i,{configurable:!0,enumerable:!1,get(){const l=o.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const Ke=D("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Qs(e,"input"),output:Qs(e,"output")}}),e.toJSONSchema=W6(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,s)=>j4(e,n,s,{callee:e.parse}),e.safeParse=(n,s)=>N4(e,n,s),e.parseAsync=async(n,s)=>w4(e,n,s,{callee:e.parseAsync}),e.safeParseAsync=async(n,s)=>S4(e,n,s),e.spa=e.safeParseAsync,e.encode=(n,s)=>A4(e,n,s),e.decode=(n,s)=>k4(e,n,s),e.encodeAsync=async(n,s)=>P4(e,n,s),e.decodeAsync=async(n,s)=>E4(e,n,s),e.safeEncode=(n,s)=>I4(e,n,s),e.safeDecode=(n,s)=>T4(e,n,s),e.safeEncodeAsync=async(n,s)=>L4(e,n,s),e.safeDecodeAsync=async(n,s)=>F4(e,n,s),Sa(e,"ZodType",{check(...n){const s=this.def;return this.clone(Dn(s,{checks:[...s.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,s){return On(this,n,s)},brand(){return this},register(n,s){return n.add(this,s),this},refine(n,s){return this.check(Sp(n,s))},superRefine(n,s){return this.check(Ap(n,s))},overwrite(n){return this.check(Dr(n))},optional(){return tc(this)},exactOptional(){return mp(this)},nullable(){return nc(this)},nullish(){return tc(nc(this))},nonoptional(n){return yp(this,n)},array(){return rp(this)},or(n){return gd([this,n])},and(n){return op(this,n)},transform(n){return rc(this,up(n))},default(n){return pp(this,n)},prefault(n){return gp(this,n)},catch(n){return vp(this,n)},pipe(n){return rc(this,n)},readonly(){return wp(this)},describe(n){const s=this.clone();return Yr.add(s,{description:n}),s},meta(...n){if(n.length===0)return Yr.get(this);const s=this.clone();return Yr.add(s,n[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Yr.get(e))==null?void 0:n.description},configurable:!0}),e)),xd=D("_ZodString",(e,t)=>{bo.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(s,a,i)=>Q6(e,s,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Sa(e,"_ZodString",{regex(...s){return this.check(T6(...s))},includes(...s){return this.check(R6(...s))},startsWith(...s){return this.check(M6(...s))},endsWith(...s){return this.check(D6(...s))},min(...s){return this.check(Ks(...s))},max(...s){return this.check(ud(...s))},length(...s){return this.check(dd(...s))},nonempty(...s){return this.check(Ks(1,...s))},lowercase(s){return this.check(L6(s))},uppercase(s){return this.check(F6(s))},trim(){return this.check(z6())},normalize(...s){return this.check(O6(...s))},toLowerCase(){return this.check(q6())},toUpperCase(){return this.check(V6())},slugify(){return this.check(Z6())}})}),R4=D("ZodString",(e,t)=>{bo.init(e,t),xd.init(e,t),e.email=n=>e.check(r6(M4,n)),e.url=n=>e.check(l6(D4,n)),e.jwt=n=>e.check(w6(X4,n)),e.emoji=n=>e.check(c6(O4,n)),e.guid=n=>e.check(Xl($l,n)),e.uuid=n=>e.check(s6(Ss,n)),e.uuidv4=n=>e.check(a6(Ss,n)),e.uuidv6=n=>e.check(i6(Ss,n)),e.uuidv7=n=>e.check(o6(Ss,n)),e.nanoid=n=>e.check(u6(z4,n)),e.guid=n=>e.check(Xl($l,n)),e.cuid=n=>e.check(d6(q4,n)),e.cuid2=n=>e.check(m6(V4,n)),e.ulid=n=>e.check(h6(Z4,n)),e.base64=n=>e.check(v6(Q4,n)),e.base64url=n=>e.check(C6(G4,n)),e.xid=n=>e.check(f6(U4,n)),e.ksuid=n=>e.check(p6(B4,n)),e.ipv4=n=>e.check(x6(Y4,n)),e.ipv6=n=>e.check(g6(H4,n)),e.cidrv4=n=>e.check(y6(W4,n)),e.cidrv6=n=>e.check(b6(K4,n)),e.e164=n=>e.check(j6(J4,n)),e.datetime=n=>e.check(f4(n)),e.date=n=>e.check(x4(n)),e.time=n=>e.check(y4(n)),e.duration=n=>e.check(v4(n))});function U(e){return n6(R4,e)}const Ve=D("ZodStringFormat",(e,t)=>{De.init(e,t),xd.init(e,t)}),M4=D("ZodEmail",(e,t)=>{d2.init(e,t),Ve.init(e,t)}),$l=D("ZodGUID",(e,t)=>{c2.init(e,t),Ve.init(e,t)}),Ss=D("ZodUUID",(e,t)=>{u2.init(e,t),Ve.init(e,t)}),D4=D("ZodURL",(e,t)=>{m2.init(e,t),Ve.init(e,t)}),O4=D("ZodEmoji",(e,t)=>{h2.init(e,t),Ve.init(e,t)}),z4=D("ZodNanoID",(e,t)=>{f2.init(e,t),Ve.init(e,t)}),q4=D("ZodCUID",(e,t)=>{p2.init(e,t),Ve.init(e,t)}),V4=D("ZodCUID2",(e,t)=>{x2.init(e,t),Ve.init(e,t)}),Z4=D("ZodULID",(e,t)=>{g2.init(e,t),Ve.init(e,t)}),U4=D("ZodXID",(e,t)=>{y2.init(e,t),Ve.init(e,t)}),B4=D("ZodKSUID",(e,t)=>{b2.init(e,t),Ve.init(e,t)}),Y4=D("ZodIPv4",(e,t)=>{N2.init(e,t),Ve.init(e,t)}),H4=D("ZodIPv6",(e,t)=>{S2.init(e,t),Ve.init(e,t)}),W4=D("ZodCIDRv4",(e,t)=>{A2.init(e,t),Ve.init(e,t)}),K4=D("ZodCIDRv6",(e,t)=>{k2.init(e,t),Ve.init(e,t)}),Q4=D("ZodBase64",(e,t)=>{P2.init(e,t),Ve.init(e,t)}),G4=D("ZodBase64URL",(e,t)=>{I2.init(e,t),Ve.init(e,t)}),J4=D("ZodE164",(e,t)=>{T2.init(e,t),Ve.init(e,t)}),X4=D("ZodJWT",(e,t)=>{F2.init(e,t),Ve.init(e,t)}),_4=D("ZodBoolean",(e,t)=>{R2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>G6(e,n,s)});function mr(e){return P6(_4,e)}const $4=D("ZodUnknown",(e,t)=>{M2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>X6()});function ec(){return E6($4)}const ep=D("ZodNever",(e,t)=>{D2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>J6(e,n,s)});function tp(e){return I6(ep,e)}const np=D("ZodArray",(e,t)=>{O2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>n4(e,n,s,a),e.element=t.element,Sa(e,"ZodArray",{min(n,s){return this.check(Ks(n,s))},nonempty(n){return this.check(Ks(1,n))},max(n,s){return this.check(ud(n,s))},length(n,s){return this.check(dd(n,s))},unwrap(){return this.element}})});function rp(e,t){return U6(np,e,t)}const sp=D("ZodObject",(e,t)=>{q2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>r4(e,n,s,a),Ae(e,"shape",()=>t.shape),Sa(e,"ZodObject",{keyof(){return vo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ec()})},loose(){return this.clone({...this._zod.def,catchall:ec()})},strict(){return this.clone({...this._zod.def,catchall:tp()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return i5(this,n)},safeExtend(n){return o5(this,n)},merge(n){return l5(this,n)},pick(n){return s5(this,n)},omit(n){return a5(this,n)},partial(...n){return c5(yd,this,n[0])},required(...n){return u5(bd,this,n[0])}})});function mn(e,t){const n={type:"object",shape:e??{},...le(t)};return new sp(n)}const ap=D("ZodUnion",(e,t)=>{V2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>s4(e,n,s,a),e.options=t.options});function gd(e,t){return new ap({type:"union",options:e,...le(t)})}const ip=D("ZodIntersection",(e,t)=>{Z2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>a4(e,n,s,a)});function op(e,t){return new ip({type:"intersection",left:e,right:t})}const Ti=D("ZodEnum",(e,t)=>{U2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(s,a,i)=>_6(e,s,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(s,a)=>{const i={};for(const o of s)if(n.has(o))i[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Ti({...t,checks:[],...le(a),entries:i})},e.exclude=(s,a)=>{const i={...t.entries};for(const o of s)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Ti({...t,checks:[],...le(a),entries:i})}});function vo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new Ti({type:"enum",entries:n,...le(t)})}const lp=D("ZodLiteral",(e,t)=>{B2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>$6(e,n,s),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ya(e,t){return new lp({type:"literal",values:Array.isArray(e)?e:[e],...le(t)})}const cp=D("ZodTransform",(e,t)=>{Y2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>t4(e,n),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new Xu(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Jr(i,n.value,t));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(Jr(o))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function up(e){return new cp({type:"transform",transform:e})}const yd=D("ZodOptional",(e,t)=>{cd.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>pd(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function tc(e){return new yd({type:"optional",innerType:e})}const dp=D("ZodExactOptional",(e,t)=>{H2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>pd(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function mp(e){return new dp({type:"optional",innerType:e})}const hp=D("ZodNullable",(e,t)=>{W2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>i4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function nc(e){return new hp({type:"nullable",innerType:e})}const fp=D("ZodDefault",(e,t)=>{K2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>l4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function pp(e,t){return new fp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ed(t)}})}const xp=D("ZodPrefault",(e,t)=>{Q2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>c4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function gp(e,t){return new xp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ed(t)}})}const bd=D("ZodNonOptional",(e,t)=>{G2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>o4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function yp(e,t){return new bd({type:"nonoptional",innerType:e,...le(t)})}const bp=D("ZodCatch",(e,t)=>{J2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>u4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vp(e,t){return new bp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Cp=D("ZodPipe",(e,t)=>{X2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>d4(e,n,s,a),e.in=t.in,e.out=t.out});function rc(e,t){return new Cp({type:"pipe",in:e,out:t})}const jp=D("ZodReadonly",(e,t)=>{_2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>m4(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function wp(e){return new jp({type:"readonly",innerType:e})}const Np=D("ZodCustom",(e,t)=>{$2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>e4(e,n)});function Sp(e,t={}){return B6(Np,e,t)}function Ap(e,t){return Y6(e,t)}const Dt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function kp(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}function cs(e){return e.tradeName.trim()?e.tradeName:e.accountType==="Business"?(e.lastName||e.firstName).trim():`${e.firstName} ${e.lastName}`.trim()}function et(e){return e.replace(/\D/g,"")}const Bt=9,vd=Bt+2;function Cd(e){return e==="Individual"?"SSN":"EIN"}function Co(e){return e==="Individual"?{label:"SSN",placeholder:`${on(3)}-${on(2)}-${on(4)}`,maxLength:Bt+2}:{label:"EIN",placeholder:`${on(2)}-${on(7)}`,maxLength:Bt+1}}function us(e,t="SSN"){const n=et(e);if(!n)return`${t} is required`;if(n.length!==Bt)return`${t} must be ${Bt} digits`}function jd(e,t="SSN"){if(e.trim())return us(e,t)}function Aa(e){const t=et(e);return t.length!==Bt?e:`${t.slice(0,2)}-${t.slice(2)}`}function wd(e){const t=et(e);return t.length!==Bt?e:`${t.slice(0,3)}-${t.slice(3,5)}-${t.slice(5)}`}const jo="X",on=e=>jo.repeat(e);function Nd(e){const t=et(e);return t.length!==Bt?e:`${on(2)}-${on(3)}${t.slice(5)}`}function Sd(e){const t=et(e);return t.length!==Bt?e:`${on(3)}-${on(2)}-${t.slice(5)}`}function Hr(e,t){return t==="Individual"?Sd(e):Nd(e)}function $n(e,t){return t==="Individual"?wd(e):Aa(e)}function Xr(e,t){const n=et(e).slice(0,Bt);return t==="Individual"?n.length<=3?n:n.length<=5?`${n.slice(0,3)}-${n.slice(3)}`:`${n.slice(0,3)}-${n.slice(3,5)}-${n.slice(5)}`:n.length<=2?n:`${n.slice(0,2)}-${n.slice(2)}`}const kr=10,Pr="+1";function Er(e){const t=et(e);return t.length===kr+1&&t.startsWith("1")?t.slice(1):t}function wo(e,t="Phone number"){const n=Er(e);if(!n)return`${t} is required`;if(n.length!==kr)return`${t} must be ${kr} digits`}function _r(e){const t=Er(e);return t.length!==kr?e:`${Pr} (${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}function Ad(e){const t=et(e).slice(0,kr);return t.length<=3?t:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}const Pp=14,Ep="(999) 999-9999";function Ln(e){const t=et(e).replace(/^1/,"");return Ad(t)}const Li=50,kd=/^[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/,Pd="Enter a valid email address";function No(e,t="Email"){const n=e.trim();if(!n)return`${t} is required`;if(n.length>Li)return`${t} must not exceed ${Li} characters`;if(!kd.test(n))return Pd}const Ip=50;function So(e,t){if(!e.trim())return`${t} is required`}const Tp=["All","LLP","LLC","Corporation","S-Corp","Sole Proprietorship","Partnership"];function ds(e){return U().superRefine((t,n)=>{const s=e(t);s&&n.addIssue({code:"custom",message:s})})}const Fi=(e="SSN")=>ds(t=>us(t,e)),Ed=(e="SSN")=>ds(t=>jd(t,e)).optional(),Gs=(e="Phone number")=>ds(t=>wo(t,e)),Lp=(e="Email")=>ds(t=>No(t,e)),Js=e=>ds(t=>So(t,e)),Fp=["LLP","LLC","Corporation","S-Corp","Sole Proprietorship","Partnership"],Id=/^[A-Za-z][A-Za-z\s'.-]*$/,Xs=/^[A-Za-z0-9][A-Za-z0-9\s,.'#/&-]*$/,Td=/^(?=.*[A-Za-z])[A-Za-z0-9 &-]*$/,Ld=/^\d{5}(-\d{4})?$/,Fd=/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,Rd="City can only contain letters, spaces, apostrophes, and hyphens",_s="Address can only contain letters, numbers, spaces, and , . ' # / & -",Md="Enter a 5-digit ZIP or ZIP+4 (e.g. 12345 or 12345-6789)",Dd="Enter a valid postal code (e.g. A1A 1A1)",Od=e=>`${e} can only contain letters, numbers, spaces, & and -, and must include a letter`;function Ri(e,t){const n=So(e,t);if(n)return n;if(!Td.test(e.trim()))return Od(t)}function Rp(e){const t=e.replace(/\D/g,"").slice(0,9);return t.length<=5?t:`${t.slice(0,5)}-${t.slice(5)}`}function Mp(e){const t=e.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6);return t.length<=3?t:`${t.slice(0,3)} ${t.slice(3)}`}const ka=["United States","Canada"],Dp=["Single","Married Filing Jointly","Married Filing Separately","Head of Household","Qualifying Surviving Spouse"],sc="Married Filing Jointly",Ha={firstName:"",lastName:"",ssn:"",email:"",phone:"",address1:"",address2:"",city:"",state:"",zipCode:"",country:"United States",sameAsPrimaryAddress:!1};function Ms(e){return`${[e.address1,e.address2,e.city].map(n=>n.trim()).filter(n=>n.length>0).join(", ")}, ${e.state} ${e.zipCode}`.trim()}const zd=mn({accountType:vo(["Business","Individual"]),firstName:U(),lastName:U(),tradeName:U(),ein:U(),entityType:U(),email:Lp(),phoneNumber:Gs(),address1:U().min(1,"Address is required"),address2:U(),city:U().min(1,"City is required"),state:U().min(1,"State is required"),zipCode:U().min(1,"ZIP code is required"),country:U().min(1,"Country is required")}).superRefine((e,t)=>{Id.test(e.city.trim())||t.addIssue({code:"custom",path:["city"],message:Rd}),Xs.test(e.address1.trim())||t.addIssue({code:"custom",path:["address1"],message:_s}),e.address2.trim()&&!Xs.test(e.address2.trim())&&t.addIssue({code:"custom",path:["address2"],message:_s}),e.country==="United States"&&!Ld.test(e.zipCode.trim())?t.addIssue({code:"custom",path:["zipCode"],message:Md}):e.country==="Canada"&&!Fd.test(e.zipCode.trim())&&t.addIssue({code:"custom",path:["zipCode"],message:Dd});const n=us(e.ein,Cd(e.accountType));n&&t.addIssue({code:"custom",path:["ein"],message:n});const s=(a,i)=>{const o=Ri(e[a],i);o&&t.addIssue({code:"custom",path:[a],message:o})};if(e.accountType==="Business"){e.entityType||t.addIssue({code:"custom",path:["entityType"],message:"Entity type is required"}),s("lastName","Business name");const a=e.tradeName.trim();a&&!Td.test(a)&&t.addIssue({code:"custom",path:["tradeName"],message:Od("Business display name")});return}s("firstName","First name"),s("lastName","Last name")});function Op(e){const t=e.accountType==="Individual",n=(e.lastName||e.firstName||"").trim();return{accountType:t?"Individual":"Business",firstName:t?e.firstName??"":"",lastName:t?e.lastName??"":n,tradeName:t?"":e.tradeName??"",ein:$n(e.idNumber,e.accountType),entityType:e.entityType??"",email:e.email,phoneNumber:Ln(e.phoneNumber),address1:e.address1,address2:e.address2??"",city:e.city,state:e.state,zipCode:e.zipCode,country:e.country}}function qd(e,t,n,s){if(e!==t){if(e==="Business"&&t==="Individual"){n("firstName",""),n("lastName",s),n("tradeName","");return}e==="Individual"&&t==="Business"&&(n("firstName",""),n("lastName",s))}}function zp(e,t){const n={},s=(i,o)=>{o&&(n[i]=o)};if(s("firstName",Ri(e.firstName,"First name")),s("lastName",Ri(e.lastName,"Last name")),s("ssn",us(e.ssn,"SSN")),s("email",No(e.email)),s("phone",wo(e.phone)),e.sameAsPrimaryAddress)return n;t.address1.trim()?Xs.test(t.address1.trim())||(n.address1=_s):n.address1="Address is required",t.address2.trim()&&!Xs.test(t.address2.trim())&&(n.address2=_s),t.city.trim()?Id.test(t.city.trim())||(n.city=Rd):n.city="City is required",t.state||(n.state="State is required"),t.country||(n.country="Country is required");const a=t.zipCode.trim();return a?t.country==="United States"&&!Ld.test(a)?n.zipCode=Md:t.country==="Canada"&&!Fd.test(a)&&(n.zipCode=Dd):n.zipCode="ZIP code is required",n}function qp(e){const t=e==null?void 0:e.secondary;return t?{secondaryFirstName:t.firstName.trim(),secondaryLastName:t.lastName.trim(),secondarySsn:et(t.ssn),secondaryEmail:t.email.trim(),secondaryPhoneNumber:Er(t.phone),secondaryAddress1:t.address1,secondaryAddress2:t.address2||null,secondaryCity:t.city,secondaryState:t.state,secondaryCountry:t.country,secondaryZipCode:t.zipCode}:{}}function Vd(e,t){const n=e.lastName.trim(),s=t==null?void 0:t.filingStatus,a=qp(t);return e.accountType==="Business"?{accountType:e.accountType,firstName:"",lastName:n,idNumber:et(e.ein),entityType:e.entityType,tradeName:e.tradeName.trim(),phoneNumber:`${Pr}${Er(e.phoneNumber)}`,email:e.email,address1:e.address1,address2:e.address2||null,city:e.city,state:e.state,country:e.country,zipCode:e.zipCode}:{accountType:e.accountType,firstName:e.firstName.trim(),lastName:n,idNumber:et(e.ein),entityType:null,tradeName:"",phoneNumber:`${Pr}${Er(e.phoneNumber)}`,email:e.email,address1:e.address1,address2:e.address2||null,city:e.city,state:e.state,country:e.country,zipCode:e.zipCode,filingStatus:s,...a}}function Vp(e,t){return Vd(e,{filingStatus:e.accountType==="Individual"&&t||void 0})}function Zd({accountType:e,onAccountTypeChange:t,isIndividual:n,filingStatus:s="",onFilingStatusChange:a=()=>{},focusHelp:i,resetHelp:o,showFilingStatus:l=!0}){return r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx("div",{className:"sm:col-span-2",children:r.jsx(Xf,{label:"Account Type",required:!0,fullWidth:!1,value:e,onChange:t,onFocus:i("accountType"),options:[{label:"Business",value:"Business",icon:r.jsx(_f,{})},{label:"Individual",value:"Individual",icon:r.jsx($f,{})}]})}),n&&l?r.jsx(we,{id:"entity-filing-status",label:"Filing Status",required:!0,placeholder:"Select Filing Status",value:s,onChange:c=>{o(),a(c)},options:Dp.map(c=>({value:c,label:c}))}):null]})}var ms=e=>e.type==="checkbox",kn=e=>e instanceof Date,rt=e=>e==null;const Ao=e=>typeof e=="object";var ze=e=>!rt(e)&&!Array.isArray(e)&&Ao(e)&&!kn(e),Mi=e=>ze(e)&&e.target?ms(e.target)?e.target.checked:e.target.value:e,Ud=(e,t)=>t.split(".").some((n,s,a)=>!isNaN(Number(n))&&e.has(a.slice(0,s).join("."))),Bd=e=>{const t=e.constructor&&e.constructor.prototype;return ze(t)&&t.hasOwnProperty("isPrototypeOf")},Pa=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ue(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Pa&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(ze(e)&&Bd(e)))return e;const s=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=Ue(e[a]));return s}const yn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Zt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},qt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Yd="root",ko=["__proto__","constructor","prototype"],Zp=/^\w*$/;var hs=e=>Zp.test(e),Te=e=>e===void 0;const Up=/[.[\]'"]/;var Ea=e=>e.split(Up).filter(Boolean),K=(e,t,n)=>{if(!t||!ze(e))return n;const s=hs(t)?[t]:Ea(t);if(s.some(i=>ko.includes(i)))return n;const a=s.reduce((i,o)=>rt(i)?void 0:i[o],e);return Te(a)||a===e?Te(e[t])?n:e[t]:a},St=e=>typeof e=="boolean",ot=e=>typeof e=="function",Ce=(e,t,n)=>{let s=-1;const a=hs(t)?[t]:Ea(t),i=a.length,o=i-1;for(;++s<i;){const l=a[s];let c=n;if(s!==o){const u=e[l];c=ze(u)||Array.isArray(u)?u:isNaN(+a[s+1])?{}:[]}if(ko.includes(l))return;e[l]=c,e=e[l]}};const Hd=x.createContext(null);Hd.displayName="HookFormControlContext";const Po=()=>x.useContext(Hd);var Wd=(e,t,n,s=!0)=>{const a={};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Zt.all&&(t._proxyFormState[o]=!s||Zt.all),n&&(n[o]=!0),e[o]}});return a};const Eo=Pa?x.useLayoutEffect:x.useEffect;function Bp(e){const t=Po(),{control:n=t,disabled:s,name:a,exact:i}=e||{},[o,l]=x.useState(()=>({...n._formState,defaultValues:n._defaultValues})),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Eo(()=>n._subscribe({name:a,formState:c.current,exact:i,callback:u=>{!s&&l({...n._formState,...u,defaultValues:n._defaultValues})}}),[a,s,i]),x.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>Wd(o,n,c.current,!1),[o,n])}var lt=e=>typeof e=="string",Di=(e,t,n,s,a)=>lt(e)?(s&&t.watch.add(e),K(n,e,a)):Array.isArray(e)?e.map(i=>(s&&t.watch.add(i),K(n,i))):(s&&(t.watchAll=!0),n),Oi=e=>rt(e)||!Ao(e);const ac=(e,t)=>t.length===0&&!Array.isArray(e)&&!Bd(e);function At(e,t,n=new WeakMap){if(e===t)return!0;if(Oi(e)||Oi(t))return Object.is(e,t);if(kn(e)&&kn(t))return Object.is(e.getTime(),t.getTime());const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;if(ac(e,s)||ac(t,a))return Object.is(e,t);if(!s.length&&Array.isArray(e)!==Array.isArray(t))return!1;const i=n.get(e);if(i&&i.has(t))return!0;if(i)i.add(t);else{const o=new WeakSet;o.add(t),n.set(e,o)}for(const o of s){const l=e[o];if(!(o in t))return!1;if(o!=="ref"){const c=t[o];if(kn(l)&&kn(c)||(ze(l)||Array.isArray(l))&&(ze(c)||Array.isArray(c))?!At(l,c,n):!Object.is(l,c))return!1}}return!0}function Yp(e){const t=Po(),{control:n=t,name:s,defaultValue:a,disabled:i,exact:o,compute:l}=e||{},c=x.useRef(a),u=x.useRef(l),d=x.useRef(void 0),m=x.useRef(n),h=x.useRef(s);u.current=l;const[f,g]=x.useState(()=>{const A=n._getWatch(s,c.current);return u.current?u.current(A):A}),p=x.useCallback(A=>{const w=Di(s,n._names,A||n._formValues,!1,c.current);return u.current?u.current(w):w},[n._formValues,n._names,s]),v=x.useCallback(A=>{if(!i){const w=Di(s,n._names,A||n._formValues,!1,c.current);if(u.current){const k=u.current(w);At(k,d.current)||(g(k),d.current=k)}else g(w)}},[n._formValues,n._names,i,s]);Eo(()=>((m.current!==n||!At(h.current,s))&&(m.current=n,h.current=s,v()),n._subscribe({name:s,formState:{values:!0},exact:o,callback:A=>{v(A.values)}})),[n,o,s,v]),x.useEffect(()=>n._removeUnmounted());const y=m.current!==n,b=h.current,S=x.useMemo(()=>{if(i)return null;const A=!y&&!At(b,s);return y||A?p():null},[i,y,s,b,p]);return S!==null?S:f}function Hp(e){const t=Po(),{name:n,disabled:s,control:a=t,shouldUnregister:i,defaultValue:o,exact:l=!0}=e,c=Ud(a._names.array,n),u=x.useMemo(()=>K(a._formValues,n,K(a._defaultValues,n,o)),[a,n,o]),d=Yp({control:a,name:n,defaultValue:u,exact:l}),m=Bp({control:a,name:n,exact:l}),h=x.useRef(e),f=x.useRef(null),g=x.useRef(a.register(n,{...e.rules,value:d,...St(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const p=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!K(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!K(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!K(m.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!K(m.validatingFields,n)},error:{enumerable:!0,get:()=>K(m.errors,n)}}),[m,n]),v=x.useCallback(A=>{const w=Mi(A);return K(a._fields,n)||(g.current=a.register(n,{...h.current.rules,value:w})),g.current.onChange({target:{value:Mi(A),name:n},type:yn.CHANGE})},[n,a]),y=x.useCallback(()=>g.current.onBlur({target:{value:K(a._formValues,n),name:n},type:yn.BLUR}),[n,a._formValues]),b=x.useCallback(A=>{A&&(f.current={focus:()=>ot(A.focus)&&A.focus(),select:()=>ot(A.select)&&A.select(),setCustomValidity:k=>ot(A.setCustomValidity)&&A.setCustomValidity(k),reportValidity:()=>ot(A.reportValidity)&&A.reportValidity()});const w=K(a._fields,n);w&&w._f&&A&&(w._f.ref=f.current)},[a._fields,n]),S=x.useMemo(()=>({name:n,value:d,...St(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:v,onBlur:y,ref:b}),[n,s,m.disabled,v,y,b,d]);return x.useEffect(()=>{const A=a._options.shouldUnregister||i;a.register(n,{...h.current.rules,...St(h.current.disabled)?{disabled:h.current.disabled}:{}});const w=(k,M)=>{const O=K(a._fields,k);O&&O._f&&(O._f.mount=M)};if(w(n,!0),A){const k=Ue(K(i?a._defaultValues:a._options.values||a._defaultValues,n,K(a._options.defaultValues,n,h.current.defaultValue)));Ce(a._defaultValues,n,k),Te(K(a._formValues,n))&&Ce(a._formValues,n,k)}if(!c&&a.register(n),f.current){const k=K(a._fields,n);k&&k._f&&(k._f.ref=f.current)}return()=>{(c?A&&!a._state.action:A)?a.unregister(n):w(n,!1)}},[n,a,c,i]),x.useEffect(()=>{a._setDisabledField({disabled:s,name:n})},[s,n,a]),x.useMemo(()=>({field:S,formState:m,fieldState:p}),[S,m,p])}const Ee=e=>e.render(Hp(e)),Kd=e=>{const t={};for(const n of Object.keys(e))if(Ao(e[n])&&e[n]!==null&&!kn(e[n])){const s=Kd(e[n]);for(const a of Object.keys(s))t[`${n}.${a}`]=s[a]}else t[n]=e[n];return t},Wp=x.createContext(null);Wp.displayName="HookFormContext";var Io=(e,t,n,s,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[s]:a||!0}}:{},Qd=e=>Array.isArray(e)?e.filter(Boolean):[],Ds=e=>Array.isArray(e)?e:[e],ic=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function Gd(e,t){const n={};for(const s in e)if(e.hasOwnProperty(s)){const a=e[s],i=t[s];if(a&&ze(a)&&i){const o=Gd(a,i);ze(o)&&(n[s]=o)}else e[s]&&(n[s]=i)}return n}var nt=e=>ze(e)&&!Object.keys(e).length,To=e=>e.type==="file",$s=e=>{if(!Pa)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Jd=e=>e.type==="select-multiple",Lo=e=>e.type==="radio",Kp=e=>Lo(e)||ms(e),Wa=e=>$s(e)&&e.isConnected;function Qp(e,t){const n=t.slice(0,-1).length;let s=0;for(;s<n;){if(rt(e)){e=void 0;break}e=e[t[s]],s++}return e}function Gp(e){for(const t in e)if(e.hasOwnProperty(t)&&!Te(e[t]))return!1;return!0}function Qe(e,t){if(lt(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:hs(t)?[t]:Ea(t);if(n.some(o=>ko.includes(String(o))))return e;const s=n.length===1?e:Qp(e,n),a=n.length-1,i=n[a];return s&&delete s[i],a!==0&&(ze(s)&&nt(s)||Array.isArray(s)&&Gp(s))&&Qe(e,n.slice(0,-1)),e}var Jp=e=>{for(const t in e)if(ot(e[t]))return!0;return!1};function Xd(e){return Array.isArray(e)||ze(e)&&!Jp(e)}function zi(e,t={}){for(const n in e){const s=e[n];Xd(s)?(t[n]=Array.isArray(s)?[]:{},zi(s,t[n])):Te(s)||(t[n]=!0)}return t}function qi(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>qi(n));return t.some(n=>n!==void 0)?t:void 0}if(ze(e)){const t={};for(const n in e){const s=qi(e[n]);Te(s)||(t[n]=s)}return Object.keys(t).length?t:void 0}}}function Zn(e,t,n){n||(n=zi(t));for(const s in e){const a=e[s];if(Xd(a))Te(t)||Oi(n[s])?n[s]=zi(a,Array.isArray(a)?[]:{}):Zn(a,rt(t)?{}:t[s],n[s]);else{const i=t[s];n[s]=!At(a,i)}}return qi(n)||{}}const oc={value:!1,isValid:!1},lc={value:!0,isValid:!0};var _d=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Te(e[0].attributes.value)?Te(e[0].value)||e[0].value===""?lc:{value:e[0].value,isValid:!0}:lc:oc}return oc},$d=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:s})=>Te(e)?e:t?e===""?NaN:e&&+e:n&<(e)?new Date(e):s?s(e):e;const cc={isValid:!1,value:null};var em=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,cc):cc;function uc(e){const t=e.ref;return To(t)?t.files:Lo(t)?em(e.refs).value:Jd(t)?[...t.selectedOptions].map(({value:n})=>n):ms(t)?_d(e.refs).value:$d(Te(t.value)?e.ref.value:t.value,e)}var Xp=(e,t,n,s)=>{const a={};for(const i of e){const o=K(t,i);o&&Ce(a,i,o._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:s}},ea=e=>e instanceof RegExp,Vr=e=>Te(e)?e:ea(e)?e.source:ze(e)?ea(e.value)?e.value.source:e.value:e,As=e=>({isOnSubmit:!e||e===Zt.onSubmit,isOnBlur:e===Zt.onBlur,isOnChange:e===Zt.onChange,isOnAll:e===Zt.all,isOnTouch:e===Zt.onTouched});const dc="AsyncFunction";var _p=e=>{if(!e||!e.validate)return!1;if(ot(e.validate))return e.validate.constructor.name===dc;if(ze(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===dc)return!0}return!1},$p=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ka=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const s of t.watch)if(e.startsWith(s)&&e.charAt(s.length)===".")return!0;return!1};const Wr=(e,t,n,s)=>{for(const a of n||Object.keys(e)){const i=K(e,a);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(Wr(l,t))break}else if(ze(l)&&Wr(l,t))break}}};function mc(e,t,n){const s=K(e,n);if(s||hs(n))return{error:s,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),o=K(t,i),l=K(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};a.pop()}return{name:n}}var e9=(e,t,n,s)=>{n(e);const{name:a,...i}=e,o=Object.keys(i);return!o.length||s&&o.length>=Object.keys(t).length||o.find(l=>t[l]===(!s||Zt.all))},t9=(e,t,n)=>!e||!t||e===t||Ds(e).some(s=>s&&(n?s===t||s.startsWith(t+"."):s.startsWith(t)||t.startsWith(s))),n9=(e,t,n,s,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?s.isOnBlur:a.isOnBlur)?!e:(n?s.isOnChange:a.isOnChange)?e:!0,r9=(e,t)=>!Qd(K(e,t)).length&&Qe(e,t),hc=(e,t,n)=>{const s=K(e,n),a=Array.isArray(s)?s:[];return Ce(a,Yd,t[n]),Ce(e,n,a),e};function fc(e,t,n="validate"){if(lt(e)||Array.isArray(e)&&e.every(lt)||St(e)&&!e)return{type:n,message:lt(e)?e:"",ref:t}}var lr=e=>ze(e)&&!ea(e)?e:{value:e,message:""},pc=async(e,t,n,s,a,i)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:d,min:m,max:h,pattern:f,validate:g,name:p,valueAsNumber:v,mount:y}=e._f,b=K(n,p);if(!y||t.has(p))return{};const S=l?l[0]:o,A=W=>{if(a&&S.reportValidity){const H=St(W)?"":W||"";l?l.forEach(ee=>ee.setCustomValidity(H)):S.setCustomValidity(H),S.reportValidity()}},w={},k=Lo(o),M=ms(o),O=k||M,Z=(v||To(o))&&Te(o.value)&&Te(b)||$s(o)&&o.value===""||b===""||Array.isArray(b)&&!b.length,_=Io.bind(null,p,s,w),F=(W,H,ee,z=qt.maxLength,re=qt.minLength)=>{const te=W?H:ee;w[p]={type:W?z:re,message:te,ref:o,..._(W?z:re,te)}};if(i?!Array.isArray(b)||!b.length:c&&(!O&&(Z||rt(b))||St(b)&&!b||M&&!_d(l).isValid||k&&!em(l).isValid)){const{value:W,message:H}=lt(c)?{value:!!c,message:c}:lr(c);if(W&&(w[p]={type:qt.required,message:H,ref:S,..._(qt.required,H)},!s))return A(H),w}if(!Z&&(!rt(m)||!rt(h))){let W,H;const ee=lr(h),z=lr(m);if(!rt(b)&&!isNaN(b)){const re=o.valueAsNumber||b&&+b;rt(ee.value)||(W=re>ee.value),rt(z.value)||(H=re<z.value)}else{const re=o.valueAsDate||new Date(b),te=Ne=>new Date(new Date().toDateString()+" "+Ne),ne=o.type=="time",J=o.type=="week";lt(ee.value)&&b&&(W=ne?te(b)>te(ee.value):J?b>ee.value:re>new Date(ee.value)),lt(z.value)&&b&&(H=ne?te(b)<te(z.value):J?b<z.value:re<new Date(z.value))}if((W||H)&&(F(!!W,ee.message,z.message,qt.max,qt.min),!s))return A(w[p].message),w}if((u||d)&&!Z&&(lt(b)||i&&Array.isArray(b))){const W=lr(u),H=lr(d),ee=!rt(W.value)&&b.length>+W.value,z=!rt(H.value)&&b.length<+H.value;if((ee||z)&&(F(ee,W.message,H.message),!s))return A(w[p].message),w}if(f&&!Z&<(b)){const{value:W,message:H}=lr(f);if(ea(W)&&!b.match(W)&&(w[p]={type:qt.pattern,message:H,ref:o,..._(qt.pattern,H)},!s))return A(H),w}if(g){if(ot(g)){const W=await g(b,n),H=fc(W,S);if(H&&(w[p]={...H,..._(qt.validate,H.message)},!s))return A(H.message),w}else if(ze(g)){let W={};for(const H in g){if(!nt(W)&&!s)break;const ee=fc(await g[H](b,n),S,H);ee&&(W={...ee,..._(H,ee.message)},A(ee.message),s&&(w[p]=W))}if(!nt(W)&&(w[p]={ref:S,...W},!s))return w}}return A(!0),w};const s9={mode:Zt.onSubmit,reValidateMode:Zt.onChange,shouldFocusError:!0},Qa="form",tm={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function a9(e={}){let t={...s9,...e},n={...Ue(tm),isLoading:ot(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},s={},a=ze(t.defaultValues)||ze(t.values)?Ue(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ue(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,u=0,d=0,m=As(t.mode),h=As(t.reValidateMode);const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={...f};let p={...g};const v={array:ic(),state:ic()},y=t.criteriaMode===Zt.all,b=j=>P=>{clearTimeout(u),u=setTimeout(j,P)},S=async j=>{if(!o.keepIsValid&&!t.disabled&&(g.isValid||p.isValid||j)){let P;t.resolver?(P=nt((await H()).errors),A()):P=await re({fields:s,onlyCheckValid:!0,eventType:yn.VALID}),P!==n.isValid&&v.state.next({isValid:P})}},A=(j,P)=>{!t.disabled&&(g.isValidating||g.validatingFields||p.isValidating||p.validatingFields)&&((j||Array.from(l.mount)).forEach(C=>{C&&(P?Ce(n.validatingFields,C,P):Qe(n.validatingFields,C))}),v.state.next({validatingFields:n.validatingFields,isValidating:!nt(n.validatingFields)}))},w=()=>{n.dirtyFields=Zn(a,i)},k=(j,P=[],C,I,R=!0,Y=!0)=>{if(I&&C&&!t.disabled){if(o.action=!0,Y&&Array.isArray(K(s,j))){const B=C(K(s,j),I.argA,I.argB);R&&Ce(s,j,B)}if(Y&&Array.isArray(K(n.errors,j))){const B=C(K(n.errors,j),I.argA,I.argB);R&&Ce(n.errors,j,B),r9(n.errors,j)}if((g.touchedFields||p.touchedFields)&&Y&&Array.isArray(K(n.touchedFields,j))){const B=C(K(n.touchedFields,j),I.argA,I.argB);R&&Ce(n.touchedFields,j,B)}(g.dirtyFields||p.dirtyFields)&&w(),v.state.next({name:j,isDirty:ne(j,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ce(i,j,P)},M=(j,P)=>{Ce(n.errors,j,P),n.errors={...n.errors},v.state.next({errors:n.errors})},O=j=>{n.errors=j,v.state.next({errors:n.errors,isValid:!1})},Z=j=>{const P=hs(j)?[j]:Ea(j);let C=i,I=a;for(let R=0;R<P.length-1;R++){const Y=P[R];if(C=rt(C)?C:C[Y],I=rt(I)?I:I[Y],C===null&&I!==null)return!0}return!1},_=(j,P,C,I)=>{const R=K(s,j);if(R){if(Z(j))return;const Y=Te(K(i,j)),B=K(i,j,Te(C)?K(a,j):C);Te(B)||I&&I.defaultChecked||P?Ce(i,j,P?B:uc(R._f)):ae(j,B),o.mount&&!o.action&&(S(),Y&&n.isDirty&&(g.isDirty||p.isDirty)&&(ne()||(n.isDirty=!1,v.state.next({...n}))),e.shouldUnregister&&Y&&!Te(K(i,j))&&Ka(j,l)&&(o.watch=!0))}},F=(j,P,C,I,R)=>{let Y=!1,B=!1;const G={name:j};if(!t.disabled){if(!C||I){const L=At(K(a,j),P);(g.isDirty||p.isDirty)&&(B=n.isDirty,n.isDirty=G.isDirty=!L||ne(),Y=B!==G.isDirty),B=!!K(n.dirtyFields,j),L!==n.isDirty?n.dirtyFields=Zn(a,i):L?Qe(n.dirtyFields,j):Ce(n.dirtyFields,j,!0),G.dirtyFields=n.dirtyFields,Y=Y||(g.dirtyFields||p.dirtyFields)&&B!==!L}if(C){const L=K(n.touchedFields,j);L||(Ce(n.touchedFields,j,C),G.touchedFields=n.touchedFields,Y=Y||(g.touchedFields||p.touchedFields)&&L!==C)}Y&&R&&v.state.next(G)}return Y?G:{}},W=(j,P,C,I)=>{const R=K(n.errors,j),Y=(g.isValid||p.isValid)&&St(P)&&n.isValid!==P;if(t.delayError&&C?(c=b(()=>M(j,C)),c(t.delayError)):(clearTimeout(u),c=null,C?Ce(n.errors,j,C):Qe(n.errors,j),n.errors={...n.errors}),(C?!At(R,C):R)||!nt(I)||Y){const B={...I,...Y&&St(P)?{isValid:P}:{},errors:n.errors,name:j};n={...n,...B},v.state.next(B)}},H=async j=>(A(j,!0),await t.resolver(i,t.context,Xp(j||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation))),ee=async j=>{const{errors:P}=await H(j);if(A(j),j){for(const C of j){const I=K(P,C);I?l.array.has(C)&&ze(I)&&!Object.keys(I).some(R=>!Number.isNaN(Number(R)))?hc(n.errors,{[C]:I},C):Ce(n.errors,C,I):Qe(n.errors,C)}n.errors={...n.errors}}else n.errors=P;return P},z=async({name:j,eventType:P})=>{if(e.validate){const C=await e.validate({formValues:i,formState:n,name:j,eventType:P});if(ze(C))for(const I in C){const R=C[I];R&&be(`${Qa}.${I}`,{message:lt(R.message)?R.message:"",type:R.type||qt.validate})}else lt(C)||!C?be(Qa,{message:C||"",type:qt.validate}):fe(Qa);return C}return!0},re=async({fields:j,onlyCheckValid:P,name:C,eventType:I,context:R={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(R.runRootValidation=!0,!await z({name:C,eventType:I})&&(R.valid=!1,P)))return R.valid;for(const Y in j){const B=j[Y];if(B){const{_f:G,...L}=B;if(G){const Q=l.array.has(G.name),Se=B._f&&_p(B._f),ft=g.validatingFields||g.isValidating||p.validatingFields||p.isValidating;Se&&ft&&A([G.name],!0);const Ft=await pc(B,l.disabled,i,y,t.shouldUseNativeValidation&&!P,Q);if(Se&&ft&&A([G.name]),Ft[G.name]&&(R.valid=!1,P)||(!P&&(K(Ft,G.name)?Q?hc(n.errors,Ft,G.name):Ce(n.errors,G.name,Ft[G.name]):Qe(n.errors,G.name)),e.shouldUseNativeValidation&&Ft[G.name]))break}!nt(L)&&await re({context:R,onlyCheckValid:P,fields:L,name:Y,eventType:I})}}return R.valid},te=()=>{for(const j of l.unMount){const P=K(s,j);P&&(P._f.refs?P._f.refs.every(C=>!Wa(C)):!Wa(P._f.ref))&&at(j)}l.unMount=new Set},ne=(j,P)=>!t.disabled&&(j&&P&&Ce(i,j,P),!At(o.mount?i:a,a)),J=(j,P,C)=>Di(j,l,{...o.mount?i:Te(P)?a:lt(j)?{[j]:P}:P},C,P),Ne=j=>Qd(K(o.mount?i:a,j,t.shouldUnregister?K(a,j,[]):[])),ae=(j,P,C={},I=!1,R=!1)=>{const Y=K(s,j);let B=P;if(Y){const G=Y._f;G&&(!G.disabled&&Ce(i,j,$d(P,G)),B=$s(G.ref)&&rt(P)?"":P,Jd(G.ref)?[...G.ref.options].forEach(L=>L.selected=B.includes(L.value)):G.refs?ms(G.ref)?G.refs.forEach(L=>{(!L.defaultChecked||!L.disabled)&&(Array.isArray(B)?L.checked=!!B.find(Q=>Q===L.value):L.checked=B===L.value||!!B)}):G.refs.forEach(L=>L.checked=L.value===B):To(G.ref)?G.ref.value="":(G.ref.value=B,!G.ref.type&&!R&&v.state.next({name:j,values:I?i:Ue(i)})))}(C.shouldDirty||C.shouldTouch)&&F(j,B,C.shouldTouch,C.shouldDirty,!R),C.shouldValidate&&V(j)},ge=(j,P,C,I=!1,R=!1)=>{for(const Y in P){if(!P.hasOwnProperty(Y))return;const B=P[Y],G=j+"."+Y,L=K(s,G);(l.array.has(j)||ze(B)||L&&!L._f)&&!kn(B)?ge(G,B,C,I,R):ae(G,B,C,I,R)}},Le=(j,P,C,I,R=!1)=>{const Y=K(s,j),B=l.array.has(j),G=I?P:Ue(P),L=K(i,j),Q=At(L,G);if(Q||Ce(i,j,G),B)v.array.next({name:j,values:I?i:Ue(i)}),(g.isDirty||g.dirtyFields||p.isDirty||p.dirtyFields)&&C.shouldDirty&&(w(),R||v.state.next({name:j,dirtyFields:n.dirtyFields,isDirty:ne(j,G)}));else{const Se=Array.isArray(G)&&!G.length||nt(G);!Y||Y._f||rt(G)||Se?ae(j,G,C,I,R):ge(j,G,C,I,R)}if(!Q&&!R){const Se=Ka(j,l),ft=I?i:Ue(i);v.state.next({...Se&&n,name:o.mount||Se?j:void 0,values:ft})}},Ie=(j,P,C={})=>Le(j,P,C,!1),Fe=(j,P={})=>{const C=ot(j)?j(i):j;if(!At(i,C)){i={...i,...C};const I=Kd(C);for(const R of l.mount)R in I&&Le(R,I[R],P,!0,!0);v.state.next({...n,name:void 0,type:void 0,...d?{values:i}:{}}),P.shouldValidate&&S()}},Re=async j=>{o.mount=!0;const P=j.target;let C=P.name,I=!0;const R=K(s,C),Y=B=>{I=Number.isNaN(B)||kn(B)&&isNaN(B.getTime())||At(B,K(i,C,B))};if(R){let B,G;const L=P.type?uc(R._f):Mi(j),Q=j.type===yn.BLUR||j.type===yn.FOCUS_OUT,Se=!$p(R._f)&&!e.validate&&!t.resolver&&!K(n.errors,C)&&!R._f.deps,ft=Se||n9(Q,K(n.touchedFields,C),n.isSubmitted,h,m),Ft=Ka(C,l,Q);Ce(i,C,L),Q?(!P||!P.readOnly)&&(R._f.onBlur&&R._f.onBlur(j),c&&c(0)):R._f.onChange&&R._f.onChange(j);const zn=F(C,L,Q),Oa=!nt(zn)||Ft;if(!Q&&v.state.next({name:C,type:j.type,...d?{values:Ue(i)}:{}}),ft)return(!Se||!n.isValid)&&(g.isValid||p.isValid)&&(t.mode==="onBlur"?Q&&S():Q||S()),Oa&&v.state.next({name:C,...Ft?{}:zn});if(!t.resolver&&e.validate&&await z({name:C,eventType:j.type}),!Q&&Ft&&v.state.next({...n}),t.resolver){const{errors:Or}=await H([C]);if(A([C]),Y(L),!I){!nt(zn)&&v.state.next(zn);return}const gs=mc(n.errors,s,C),ys=mc(Or,s,gs.name||C);B=ys.error,C=ys.name,G=nt(Or)}else A([C],!0),B=(await pc(R,l.disabled,i,y,t.shouldUseNativeValidation))[C],A([C]),Y(L),I&&(B?G=!1:(g.isValid||p.isValid)&&(G=await re({fields:s,onlyCheckValid:!0,name:C,eventType:j.type})));I&&(R._f.deps&&(!Array.isArray(R._f.deps)||R._f.deps.length>0)&&V(R._f.deps),W(C,G,B,zn))}},ye=(j,P)=>{if(K(n.errors,P)&&j.focus)return j.focus(),1},V=async(j,P={})=>{let C,I;const R=Ds(j);if(t.resolver){const Y=await ee(Te(j)?j:R);C=nt(Y),I=j?!R.some(B=>K(Y,B)):C}else j?(I=(await Promise.all(R.map(async Y=>{const B=K(s,Y);return await re({fields:B&&B._f?{[Y]:B}:B,eventType:yn.TRIGGER})}))).every(Boolean),!(!I&&!n.isValid)&&S()):I=C=await re({fields:s,name:j,eventType:yn.TRIGGER});return v.state.next({...!lt(j)||(g.isValid||p.isValid)&&C!==n.isValid?{}:{name:j},...t.resolver||!j?{isValid:C}:{},errors:n.errors}),P.shouldFocus&&!I&&Wr(s,ye,j?R:l.mount),I},me=(j,P)=>{let C={...o.mount?i:a};return P&&(C=Gd(P.dirtyFields?n.dirtyFields:n.touchedFields,C)),Te(j)?C:lt(j)?K(C,j):j.map(I=>K(C,I))},q=(j,P)=>({invalid:!!K((P||n).errors,j),isDirty:!!K((P||n).dirtyFields,j),error:K((P||n).errors,j),isValidating:!!K(n.validatingFields,j),isTouched:!!K((P||n).touchedFields,j)}),fe=j=>{const P=j?Ds(j):void 0;P==null||P.forEach(C=>Qe(n.errors,C)),P?P.forEach(C=>{v.state.next({name:C,errors:n.errors})}):v.state.next({errors:{}})},be=(j,P,C)=>{const I=(K(s,j,{_f:{}})._f||{}).ref,R=K(n.errors,j)||{},{ref:Y,message:B,type:G,...L}=R;Ce(n.errors,j,{...L,...P,ref:I}),v.state.next({name:j,errors:n.errors,isValid:!1}),C&&C.shouldFocus&&I&&I.focus&&I.focus()},Ye=(j,P)=>{if(ot(j)){d++;const{unsubscribe:C}=v.state.subscribe({next:R=>"values"in R&&j(R.values||J(void 0,P),R)});let I=!1;return{unsubscribe:()=>{I||(I=!0,d--,C())}}}return J(j,P,!0)},ue=j=>{var P;const C=!!(!((P=j.formState)===null||P===void 0)&&P.values);C&&d++;const{unsubscribe:I}=v.state.subscribe({next:Y=>{if(t9(j.name,Y.name,j.exact)&&e9(Y,j.formState||g,Tt,j.reRenderRoot)){const B={...i};j.callback({values:B,...n,...Y,defaultValues:a})}}});if(!C)return I;let R=!1;return()=>{R||(R=!0,d--,I())}},ve=j=>(o.mount=!0,p={...p,...j.formState},ue({...j,formState:{...f,...j.formState}})),at=(j,P={})=>{for(const C of j?Ds(j):l.mount)l.mount.delete(C),l.array.delete(C),P.keepValue||(Qe(s,C),Qe(i,C)),!P.keepError&&Qe(n.errors,C),!P.keepDirty&&Qe(n.dirtyFields,C),!P.keepTouched&&Qe(n.touchedFields,C),!P.keepIsValidating&&Qe(n.validatingFields,C),!t.shouldUnregister&&!P.keepDefaultValue&&Qe(a,C);v.state.next({values:Ue(i)}),v.state.next({...n,...P.keepDirty?{isDirty:ne()}:{}}),!P.keepIsValid&&S()},Ze=({disabled:j,name:P})=>{if(St(j)&&o.mount||j||l.disabled.has(P)){const R=l.disabled.has(P)!==!!j;j?l.disabled.add(P):l.disabled.delete(P),R&&o.mount&&!o.action&&S()}},Xe=(j,P={})=>{let C=K(s,j);const I=St(P.disabled)||St(t.disabled),R=!l.registerName.has(j)&&C&&C._f&&!C._f.mount;return Ce(s,j,{...C||{},_f:{...C&&C._f?C._f:{ref:{name:j}},name:j,mount:!0,...P}}),l.mount.add(j),C&&!R?Ze({disabled:St(P.disabled)?P.disabled:t.disabled,name:j}):_(j,!0,P.value),{...I?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:Vr(P.min),max:Vr(P.max),minLength:Vr(P.minLength),maxLength:Vr(P.maxLength),pattern:Vr(P.pattern)}:{},name:j,onChange:Re,onBlur:Re,ref:Y=>{if(Y){l.registerName.add(j),Xe(j,P),l.registerName.delete(j),C=K(s,j);const B=Te(Y.value)&&Y.querySelectorAll&&Y.querySelectorAll("input,select,textarea")[0]||Y,G=Kp(B),L=C._f.refs||[];if(G?L.find(Q=>Q===B):B===C._f.ref)return;Ce(s,j,{_f:{...C._f,...G?{refs:[...L.filter(Wa),B,...Array.isArray(K(a,j))?[{}]:[]],ref:{type:B.type,name:j}}:{ref:B}}}),_(j,!1,void 0,B)}else C=K(s,j,{}),C._f&&(C._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(Ud(l.array,j)&&o.action)&&l.unMount.add(j)}}},bt=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Wr(s,ye,l.mount),Et=j=>{St(j)&&(v.state.next({disabled:j}),Wr(s,(P,C)=>{const I=K(s,C);I&&(P.disabled=I._f.disabled||j,Array.isArray(I._f.refs)&&I._f.refs.forEach(R=>{R.disabled=I._f.disabled||j}))},0,!1))},vt=(j,P)=>async C=>{let I;C&&(C.preventDefault&&C.preventDefault(),C.persist&&C.persist());let R=Ue(i);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:B}=await H();A(),n.errors=Y,R=Ue(B)}else await re({fields:s,eventType:yn.SUBMIT});if(l.disabled.size)for(const Y of l.disabled)Qe(R,Y);if(Qe(n.errors,Yd),nt(n.errors)){v.state.next({errors:{}});try{await j(R,C)}catch(Y){I=Y}}else P&&await P({...n.errors},C),bt(),setTimeout(bt);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nt(n.errors)&&!I,submitCount:n.submitCount+1,errors:n.errors}),I)throw I},Ct=(j,P={})=>{K(s,j)&&(Te(P.defaultValue)?Ie(j,Ue(K(a,j))):(Ie(j,P.defaultValue),Ce(a,j,Ue(P.defaultValue))),P.keepTouched||Qe(n.touchedFields,j),P.keepDirty||(Qe(n.dirtyFields,j),n.isDirty=P.defaultValue?ne(j,Ue(K(a,j))):ne()),P.keepError||(Qe(n.errors,j),g.isValid&&S()),v.state.next({...n}))},ct=(j,P={})=>{const C=j?Ue(j):a,I=Ue(C),R=nt(j),Y=I;if(P.keepDefaultValues||(a=C),!P.keepValues){if(P.keepDirtyValues){const B=new Set([...l.mount,...Object.keys(Zn(a,i))]);for(const G of Array.from(B)){const L=K(n.dirtyFields,G),Q=K(i,G),Se=K(Y,G);L&&!Te(Q)?Ce(Y,G,Q):!L&&!Te(Se)&&Ie(G,Se)}}else{if(Pa&&Te(j))for(const B of l.mount){const G=K(s,B);if(G&&G._f){const L=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if($s(L)){const Q=L.closest("form");if(Q){Q.reset();break}}}}if(P.keepFieldsRef)for(const B of l.mount)Ie(B,K(Y,B));else s={}}if(t.shouldUnregister){if(i=P.keepDefaultValues?Ue(a):{},P.keepFieldsRef)for(const B of l.mount)Ce(i,B,K(Y,B))}else i=Ue(Y);v.array.next({values:{...Y}}),v.state.next({name:void 0,type:void 0,values:{...Y}})}l={mount:P.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!g.isValid||!!P.keepIsValid||!!P.keepDirtyValues||!t.shouldUnregister&&!nt(Y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!P.keepIsValid,o.action=!1,P.keepErrors||(n.errors={}),v.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:R?!1:P.keepDirty?n.isDirty:P.keepValues?ne():!!(P.keepDefaultValues&&!At(j,a)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:R?{}:P.keepDirtyValues?P.keepDefaultValues&&i?Zn(a,i):n.dirtyFields:P.keepDefaultValues&&j?Zn(a,j):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Me=(j,P)=>ct(ot(j)?j(i):j,{...t.resetOptions,...P}),It=(j,P={})=>{const C=K(s,j),I=C&&C._f;if(I){const R=I.refs?I.refs[0]:I.ref;R.focus&&setTimeout(()=>{R.focus(),P.shouldSelect&&ot(R.select)&&R.select()})}},Tt=j=>{const{name:P,type:C,values:I,...R}=j;n={...n,...R}},jt={control:{register:Xe,unregister:at,getFieldState:q,handleSubmit:vt,setError:be,_subscribe:ue,_runSchema:H,_updateIsValidating:A,_focusError:bt,_getWatch:J,_getDirty:ne,_setValid:S,_setFieldArray:k,_setDisabledField:Ze,_setErrors:O,_getFieldArray:Ne,_reset:ct,_resetDefaultValues:()=>ot(t.defaultValues)&&t.defaultValues().then(j=>{Me(j,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:te,_disableForm:Et,_subjects:v,_proxyFormState:g,get _fields(){return s},get _formValues(){return i},get _state(){return o},set _state(j){o=j},get _defaultValues(){return a},get _names(){return l},set _names(j){l=j},get _formState(){return n},get _options(){return t},set _options(j){t={...t,...j},m=As(t.mode),h=As(t.reValidateMode)}},subscribe:ve,trigger:V,register:Xe,handleSubmit:vt,watch:Ye,setValue:Ie,setValues:Fe,getValues:me,reset:Me,resetField:Ct,resetDefaultValues:(j,P={})=>{if(a=Ue(j),!P.keepDirty){const C=Zn(a,i);n.dirtyFields=C,n.isDirty=!nt(C)}P.keepIsValid||S(),v.state.next({...n,defaultValues:a})},clearErrors:fe,unregister:at,setError:be,setFocus:It,getFieldState:q};return{...jt,formControl:jt}}function Xt(e={}){const t=x.useRef(void 0),n=x.useRef(void 0),s=x.useRef(e.formControl),[a,i]=x.useState(()=>({...Ue(tm),isLoading:ot(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ot(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&s.current!==e.formControl)if(s.current=e.formControl,e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!ot(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=a9(e);t.current={...c,formState:a}}const o=t.current.control;return o._options=e,Eo(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return i(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),x.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),x.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),x.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),x.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),x.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==a.isDirty&&o._subjects.state.next({isDirty:l})}},[o,a.isDirty]),x.useEffect(()=>{var l;e.values&&!At(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((l=o._options.resetOptions)===null||l===void 0)&&l.keepIsValid||o._setValid(),n.current=e.values,i(c=>({...c}))):o._resetDefaultValues()},[o,e.values]),x.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=x.useMemo(()=>Wd(a,o),[o,a]),t.current}function nm({register:e,control:t,errors:n,zipRegister:s,isUS:a,state:i,stateOptions:o,zipStateMismatch:l,focusHelp:c}){var u,d,m,h;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mt-6 h-px bg-slate-200"}),r.jsxs("div",{className:"border-t border-slate-100 pt-6",children:[r.jsx("h3",{className:"mb-5 text-sm font-semibold text-slate-900",children:"Address Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Oe,{label:"Address Line 1",required:!0,maxLength:50,placeholder:"Enter Address Line 1",error:(u=n.address1)==null?void 0:u.message,...e("address1"),onFocus:c("address1")}),r.jsx(Oe,{label:"Address Line 2",maxLength:50,placeholder:"Enter Address Line 2",error:(d=n.address2)==null?void 0:d.message,...e("address2"),onFocus:c("address2")}),r.jsx(Oe,{label:"City",required:!0,maxLength:50,placeholder:"Enter City",error:(m=n.city)==null?void 0:m.message,...e("city"),onFocus:c("city")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Ee,{name:"state",control:t,render:({field:f})=>{var g;return r.jsx(we,{id:"entity-state",label:a?"State":"Province",required:!0,error:(g=n.state)==null?void 0:g.message,placeholder:a?"Select State":"Select Province",value:f.value??"",onChange:f.onChange,options:o.map(p=>({value:p.code,label:p.name}))})}}),r.jsx(Oe,{label:a?"ZIP Code":"Postal Code",required:!0,maxLength:10,placeholder:a?"Enter ZIP Code":"A1A 1A1",error:((h=n.zipCode)==null?void 0:h.message)??(l?`ZIP code does not match the selected state (${i}).`:void 0),...s,onChange:f=>{f.target.value=a?Rp(f.target.value):Mp(f.target.value),s.onChange(f)},onFocus:c("zipCode")}),r.jsx(Ee,{name:"country",control:t,render:({field:f})=>{var g;return r.jsx(we,{id:"entity-country",label:"Country",required:!0,error:(g=n.country)==null?void 0:g.message,placeholder:"Select Country",value:f.value??"",onChange:f.onChange,options:ka.map(p=>({value:p,label:p}))})}})]})]})]})}function Ir({label:e="Phone Number",required:t=!1,error:n,variant:s="default",placeholder:a=Ep,id:i,name:o,readOnly:l,disabled:c,onFocus:u,register:d,value:m,onChange:h}){const f=i??(d==null?void 0:d.name)??o,g=n&&f?`${f}-error`:void 0,p=y=>{y.target.value=Ln(y.target.value),d&&d.onChange(y),h==null||h(y)},v=r.jsx("input",{type:"tel",inputMode:"numeric",autoComplete:"tel",maxLength:Pp,placeholder:a,readOnly:l,disabled:c,"aria-invalid":n?!0:void 0,"aria-describedby":g,...d,...m===void 0?{}:{value:m},name:(d==null?void 0:d.name)??o,id:f,onFocus:u,onChange:p,className:s==="payment"?oe(!!n,l):`block w-full rounded-sm border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${n?"border-red-300":"border-slate-200"}`});return s==="payment"?r.jsx($,{label:e,required:t,error:n,children:v}):r.jsxs("div",{children:[r.jsx(ls,{label:e,required:t,htmlFor:f}),v,n?r.jsx("p",{id:g,className:"mt-1 text-xs text-red-600",children:n}):null]})}function rm({label:e,placeholder:t,maxLength:n,accountType:s,register:a,error:i,onFocus:o}){return r.jsx(Oe,{label:e,required:!0,inputMode:"numeric",placeholder:t,maxLength:n,error:i,...a,onChange:l=>{l.target.value=Xr(l.target.value,s),a.onChange(l)},onFocus:o})}function sm({register:e,control:t,errors:n,einRegister:s,phoneRegister:a,accountType:i,idLabel:o,idPlaceholder:l,idMaxLength:c,focusHelp:u}){var d,m,h,f,g;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Oe,{label:"Legal Business Name",required:!0,maxLength:50,placeholder:"Enter Legal Business Name",error:(d=n.lastName)==null?void 0:d.message,...e("lastName"),onFocus:u("legalBusinessName")},"entity-business-name"),r.jsx(Oe,{label:"Business Display Name",maxLength:50,placeholder:"Enter Business Display Name",error:(m=n.tradeName)==null?void 0:m.message,...e("tradeName"),onFocus:u("businessDisplayName")},"entity-trade-name"),r.jsx(Oe,{label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",error:(h=n.email)==null?void 0:h.message,...e("email"),onFocus:u("email")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Ir,{required:!0,register:a,error:(f=n.phoneNumber)==null?void 0:f.message,onFocus:u("phoneNumber")}),r.jsx(Ee,{name:"entityType",control:t,render:({field:p})=>{var v;return r.jsx(we,{id:"entity-type",label:"Entity Type",required:!0,error:(v=n.entityType)==null?void 0:v.message,placeholder:"Select Entity Type",value:p.value??"",onChange:p.onChange,options:Fp.map(y=>({value:y,label:y}))})}}),r.jsx(rm,{label:o,placeholder:l,maxLength:c,accountType:i,register:s,error:(g=n.ein)==null?void 0:g.message,onFocus:u("ein")})]})]})}const i9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZMAAACoCAMAAAASCPOJAAADAFBMVEUAljEC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IuA4PSlgMJeBjGIaER+HRwfDxi2XgJ+ML49Z4GBeU6hfnAo3jMsiN4C4K/sdft+CbL/ylGOOA2cAA8HxhGjAhqSxCSQnTsODh4e/Bt+GlOoPy/QXfxpNY+BGGOgt8U0kum3CPKcuVMR9pUYaM+8akhoTFEIbA88K3gyHmIcV1U1rUpYLrLwYsi5QGvLbgQayXxM0tsqwLvlkeaCwh/ILvaCiLlPjxeKlhBIYhlJIGedaBxxprshReD5hYzCDWMV+U5xlLQSYH9zfwfeC+eTr46RM/4aKQXI+HTAY489Ir0zrHFfEQqOzHJWQB8yrKA/YU1n3Gmso8HkNJuW6xIsuj3kmRtV+3A38nzx5PSVrwtNXVybPNk8MjgUcceJEPvJNkA/EW5TWXsfbr5TEsZZB1mIa63wqvq4Irp8xXh6xzqrfCd5hlLLGNeNCL7ArZcfiXDOl034mnmycMXy7PVmS58xpJJQWM2lAHmxcKPw02FX6Psa77S+abx38xlPL/A0Q84jHd4l56AAAAAElFTkSuQmCC";function o9(){return r.jsx("img",{src:i9,alt:"",width:403,height:168,className:"h-32 w-auto"})}const l9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPIAAACoCAMAAADto0MHAAADAFBMVEUCoEIDplcCqFsCqFwCqV0EqV0CrVYErV0Gr10JsV4GtlgKtGAOtmESv18SumYYvGgdwWojxmwFtZAjvYEmyG4px3cRuKUcxKcOtawfwaoqxqsFYfYPafgacvUkd/QqfPYtf/Usfvctfvcufvcvf/cvf/gwgfgwgvgvgvoNsrAVob4wg/kau7UtxLM/xX04y6o4zK89zbFDzrVUyY5y0p78wQL8xRD800T944lK0rZM07dQ0rWG2bFQ07lV1bpZ17pa17tt2blS0r5Z1r1c171e2L5f2L9m2cN43MyI4M+q5Mcygvkzgvk0g/k1hflKkfh6vuyO4tWf6dir7Ny37ty/8ObX9Ozt+fQzg/o2hfs4hvtJkPtjov1+sPyqzP2z0v2+1/3Q4f3l8P3o8f3p8v36/PwYb/44iP6Xwf6ozf6y0v6/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cUWBz7pXmxcs7oNetGectBuqaih+MJm4FrWw3Xw243YDlQ92rYAUA1ODCK0V5whWVJccCVQmI5asxZ0ywSrkQ5sYs6xBoh0lGuY/DlnA32PLciUA44DrNsGyJRZ54tLRtcB6vhCl53TJBRmPKEFsNQOHdQh2waTyLzEWdXWTVoRByVLND0jMRxQe/XemFh/4JW+xcWFhbUgsZ/9cJALywo80j8hY+bpwzMwwsLAz0Y4HdqQQ32q4FS+9V+fLcBvhRfqBfUfrUwWFDmNYPkRfj8/QsDfGChtqC0GuAP5jmDwYJKXqDw5fsH5pOVWtAL+xf2L8Q/6lr81PgXw+fGl20+KfkOLw1fpc0n7zfXg7+kULN1hIvCVY24jLrbAC5cNERCRij8BVONV2NUvclNWEhESB/BnMlbl5b0GnWmZFPZqF9nKJaNsCKYQ2zJsbCaFWsKBRbD5XWBwXwJcwL2gXSJBwwlpsAczwNSB89SHOpYPM/2jHhWokTcNv3scBFEv41ONjMN7lA6j04wcnJNrBODgfTIjjtQuFBvmsZ5jkm3xzx1/OX/B5ZUR0aL50DQAAAAAElFTkSuQmCC";function c9(){return r.jsx("img",{src:l9,alt:"",width:242,height:168,className:"h-32 w-auto"})}function Fo(){return r.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12s3.75-7.5 9.75-7.5 9.75 7.5 9.75 7.5-3.75 7.5-9.75 7.5S2.25 12 2.25 12z"}),r.jsx("circle",{cx:"12",cy:"12",r:"2.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function am(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 002.25 12s3.75 7.5 9.75 7.5c1.632 0 3.106-.328 4.396-.87M6.228 6.228A10.45 10.45 0 0112 4.5c6 0 9.75 7.5 9.75 7.5a10.49 10.49 0 01-4.293 4.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.243L9.88 9.88"})})}function u9({open:e,entityName:t,description:n,illustration:s,pages:a,onClose:i,onGoToDashboard:o,onStartPayment:l}){const[c,u]=x.useState(0),[d,m]=x.useState({});if(x.useEffect(()=>{if(!e)return;u(0),m({});const g=p=>{p.key==="Escape"&&i()};return document.addEventListener("keydown",g),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow=""}},[e,i]),!e||a.length===0)return null;const h=a[Math.min(c,a.length-1)],f=a.length>1;return un.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:i}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"entity-success-title",className:"relative z-10 max-h-[90vh] w-full max-w-md overflow-y-auto rounded-2xl bg-white p-6 text-center shadow-xl sm:p-8",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:i,className:"absolute right-4 top-4 rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(d9,{})}),r.jsx("div",{className:"flex justify-center",children:s}),r.jsxs("h2",{id:"entity-success-title",className:"mt-2 text-xl font-bold text-slate-900",children:[t," Added Successfully!"]}),r.jsx("p",{className:"mt-2 text-sm text-slate-500",children:n}),r.jsxs("div",{className:"mt-6 overflow-hidden rounded-xl border border-slate-200 text-left",children:[h.title?r.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200 bg-slate-50 px-4 py-3 bg-[#F0F0F0]",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:h.title}),f?r.jsxs("div",{className:"flex items-center gap-1 rounded-md border border-slate-200 bg-white px-1 py-0.5",children:[r.jsx("button",{type:"button","aria-label":"Previous details",disabled:c===0,onClick:()=>u(g=>Math.max(0,g-1)),className:"rounded p-0.5 text-slate-500 transition hover:bg-slate-100 hover:text-slate-700 disabled:opacity-40 disabled:hover:bg-transparent",children:r.jsx(m9,{})}),r.jsxs("span",{className:"text-xs text-slate-500",children:[c+1," / ",a.length]}),r.jsx("button",{type:"button","aria-label":"Next details",disabled:c>=a.length-1,onClick:()=>u(g=>Math.min(a.length-1,g+1)),className:"rounded p-0.5 text-slate-500 transition hover:bg-slate-100 hover:text-slate-700 disabled:opacity-40 disabled:hover:bg-transparent",children:r.jsx(h9,{})})]}):null]}):null,r.jsx("div",{className:"divide-y divide-slate-100",children:h.rows.map(g=>{const p=`${c}:${g.label}`,v=d[p]===!0;return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[r.jsx("span",{className:"shrink-0 text-sm text-slate-500",children:g.label}),r.jsxs("span",{className:"flex items-center gap-2 text-right text-sm font-medium text-slate-900",children:[g.masked!==void 0&&!v?g.masked:g.value,g.masked!==void 0?r.jsx("button",{type:"button","aria-label":v?`Hide ${g.label}`:`Show ${g.label}`,onClick:()=>m(y=>({...y,[p]:!v})),className:"shrink-0 text-slate-400 transition hover:text-slate-600",children:v?r.jsx(Fo,{}):r.jsx(am,{})}):null]})]},g.label)})})]}),r.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[r.jsx("button",{type:"button",onClick:o,className:"inline-flex h-11 w-full items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 sm:w-1/2",children:"Go to Dashboard"}),r.jsx("button",{type:"button",onClick:l,className:"inline-flex h-11 w-full items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 sm:w-1/2",children:"Start Payment"})]})]})]}),document.body)}function d9(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function m9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function h9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}const f9="Your entity has been created successfully. Review the details below and create your first payment.",p9="Review the details below and create your first payment.";function x9({created:e,onClose:t,onGoToDashboard:n,onStartPayment:s}){const a=(e==null?void 0:e.values)??null,i=(e==null?void 0:e.secondary)??null,o=(a==null?void 0:a.accountType)==="Individual";return r.jsx(u9,{open:a!==null,entityName:a?g9(a,o):"",description:o?p9:f9,illustration:o?r.jsx(c9,{}):r.jsx(o9,{}),pages:y9(a,i,o),onClose:t,onGoToDashboard:n,onStartPayment:s})}function g9(e,t){return t?`${e.firstName.trim()} ${e.lastName.trim()}`.trim():e.lastName.trim()}function y9(e,t,n){return e?n?[{title:"Primary Taxpayer Details",rows:[{label:"First Name",value:e.firstName.trim()},{label:"Last Name",value:e.lastName.trim()},{label:"Email",value:e.email},{label:"Phone Number",value:_r(`${Pr}${e.phoneNumber}`)},{label:"SSN",value:$n(e.ein,"Individual"),masked:Hr(e.ein,"Individual")},{label:"Address",value:Ms(e)}]},...t?[{title:"Secondary Taxpayer Details",rows:[{label:"First Name",value:t.firstName.trim()},{label:"Last Name",value:t.lastName.trim()},{label:"Email",value:t.email},{label:"Phone Number",value:t.phone},{label:"SSN",value:$n(t.ssn,"Individual"),masked:Hr(t.ssn,"Individual")},{label:"Address",value:Ms(t)}]}]:[]]:[{rows:[{label:"Entity Name",value:e.lastName.trim()},{label:"Email",value:e.email},{label:"Phone Number",value:_r(`${Pr}${e.phoneNumber}`)},{label:"Entity Type",value:e.entityType},{label:"EIN",value:$n(e.ein,"Business"),masked:Hr(e.ein,"Business")},{label:"Address",value:Ms(e)}]}]:[]}function b9(){return r.jsxs("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.5 12.5l2.5 2.5 5-5"})]})}function v9(){return r.jsxs("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.5 9.5l5 5M14.5 9.5l-5 5"})]})}const im={accountType:{title:"Account Type",required:!0,description:"Choose who the tax account and payments belong to. Your selection controls the identity fields and validation used on the form.",tips:[r.jsxs(r.Fragment,{children:["Choose ",r.jsx("strong",{children:"Business"})," for a registered organization using an EIN."]}),r.jsxs(r.Fragment,{children:["Choose ",r.jsx("strong",{children:"Individual"})," for personal obligations using an SSN or ITIN."]}),"Select the taxpayer that is legally responsible for the payment."],correct:"Business - ABC Consulting, LLC",mistake:"Individual - when the obligation belongs to the company EIN"},legalBusinessName:{title:"Legal Business Name",required:!0,description:r.jsxs(r.Fragment,{children:["Enter the exact legal name associated with the EIN in the business's ",r.jsx("strong",{children:"IRS records"}),"."]}),tips:[r.jsxs(r.Fragment,{children:["Use the name shown on ",r.jsx("strong",{children:"IRS Letter CP 575"}),", ",r.jsx("strong",{children:"Letter 147C"}),", or the latest tax return."]}),"Include punctuation and the full legal suffix, such as LLC, Inc., or Corp.","Do not enter a DBA, trade name, or shortened name here."],correct:"John's Consulting Services, LLC",mistake:`John's Consulting - when the IRS name includes "Services, LLC"`},businessDisplayName:{title:"Business Display Name",required:!1,description:"Add a familiar name to identify this entity in GovPay. This name is for your workspace and does not replace the legal business name.",tips:["Use a short name your team will easily recognize.","Add a location or division when managing similar entities.","Leave it blank if the legal name is already clear."],correct:"John's Consulting - West Office",mistake:"Using the legal name of a different business or taxpayer"},email:{title:"Email",required:!0,description:"Enter the primary email address for payment updates, verification messages, and action-required alerts.",tips:["Use an inbox that is actively monitored.","Prefer a business email accessible to the responsible user or team.","Check the spelling before continuing."],correct:"tax@johnsconsulting.com",mistake:"taxx@johnsconsulting.com - misspelled or inaccessible inbox"},phoneNumber:{title:"Phone Number",required:!0,description:"Provide the best contact number for account or payment-related questions.",tips:["Use an active number for the responsible contact.","Include the country code and area code.","Avoid shared numbers that your team cannot reliably access."],correct:"+1 (512) 555-0184",mistake:"555-0184 - missing the country code and area code"},entityType:{title:"Entity Type",required:!0,description:"Select the legal structure under which the business is registered.",tips:["Use formation or registration documents as your source.","Choose the full entity type, such as LLC, Corporation, or Partnership.","Do not guess from the business name or tax form alone."],correct:"Limited Liability Company (LLC)",mistake:"Corporation - when registration documents identify an LLC"},ein:{title:"EIN",required:!0,description:r.jsxs(r.Fragment,{children:["Enter the nine-digit ",r.jsx("strong",{children:"Employer Identification Number"})," assigned to the business by the IRS."]}),tips:["Use an IRS-issued document or the latest filed tax return.","Enter all nine digits in XX-XXXXXXX format.","Do not enter a state tax ID, account number, SSN, or ITIN."],correct:"12-3456789",mistake:"12345678 - incomplete, or a state account number"},address1:{title:"Address Line 1",required:!0,description:"Enter the primary street address used for the business's official mailing or tax correspondence.",tips:["Include the street number and full street name.","Use the address shown on current business or tax records.","Place suite, unit, floor, or attention details in Address Line 2."],correct:"245 Market Street",mistake:"Austin, Texas - city and state entered as the street address"},address2:{title:"Address Line 2",required:!1,description:"Add secondary delivery details needed to locate the business within the main street address.",tips:["Use this field for a suite, unit, floor, building, or attention line.","Leave it blank if no additional address information is required.","Do not repeat the city, state, ZIP Code, or country."],correct:"Suite 400",mistake:"Austin, TX 78701 - belongs in the city, state, and ZIP fields"},city:{title:"City",required:!0,description:"Enter the city associated with the business address and ZIP Code.",tips:["Use the official or USPS-recognized city name.","Make sure it matches the selected state and ZIP Code.","Do not include the state abbreviation or ZIP Code in this field."],correct:"Austin",mistake:"Austin, TX 78701"},state:{title:"State",required:!0,description:"Select the state in which this business address is physically located.",tips:["Match the state to the city and ZIP Code entered above.","Use the address state - not automatically the state of incorporation.","Select the state from the list instead of typing an abbreviation."],correct:"Texas (TX)",mistake:"Delaware - selected only because the business was incorporated there"},zipCode:{title:"ZIP Code",required:!0,description:"Enter the postal ZIP Code for the business address.",tips:["Use a five-digit ZIP Code or ZIP+4 when available.","Keep any leading zero.","Confirm that it matches the selected city and state."],correct:"78701 or 78701-1234",mistake:"7871 - fewer than five digits"},country:{title:"Country",required:!0,description:"Select the country where the business address is located. This controls the address format and available location fields.",tips:["Choose the country for the address entered - not the owner's residence.","Confirm that the state or region and postal code use that country's format.","Do not select United States only because the business has an EIN."],correct:"United States - for an address in Austin, Texas",mistake:"United States - when the entered business address is in Canada"}},C9=[r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"font-medium text-slate-700",children:"Business:"})," Have your IRS EIN confirmation letter (CP-575) on hand."]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"font-medium text-slate-700",children:"Individual:"})," Have your Social Security card on hand for your name and SSN."]}),"Select any field and this box shows exactly how to write it."];function om({active:e}){return r.jsxs("aside",{className:"w-full shrink-0 rounded-xl border border-slate-200 bg-white p-5 lg:sticky lg:top-6 lg:w-80 shadow-lg",children:[r.jsx("h3",{className:"border-l-2 border-gov-600 pl-2 text-xs font-semibold italic text-gov-700",children:"How to fill this"}),e?r.jsxs("div",{className:"mt-3",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsx("h4",{className:"text-base font-semibold text-slate-900",children:e.title}),r.jsx("span",{className:`mt-0.5 shrink-0 rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${e.required?"bg-red-50 text-red-600":"bg-gov-50 text-gov-700"}`,children:e.required?"Required":"Optional"})]}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:e.description}),r.jsx("ul",{className:"mt-3 list-disc space-y-2 pl-5 text-sm text-slate-600",children:e.tips.map((t,n)=>r.jsx("li",{children:t},n))}),e.correct?r.jsx(xc,{tone:"correct",label:"Correct format",value:e.correct}):null,e.mistake?r.jsx(xc,{tone:"mistake",label:"Common mistake",value:e.mistake}):null]}):r.jsxs("div",{className:"mt-3",children:[r.jsx("p",{className:"text-sm text-slate-600",children:"We verify these details against IRS records, so accuracy here determines whether your filings are accepted."}),r.jsx("ul",{className:"mt-3 list-disc space-y-2 pl-5 text-sm text-slate-600",children:C9.map((t,n)=>r.jsx("li",{children:t},n))})]})]})}function xc({tone:e,label:t,value:n}){const s=e==="correct";return r.jsxs("div",{className:s?"mt-4 rounded-lg border border-emerald-200 bg-emerald-50 p-3":"mt-3 rounded-lg border border-red-200 bg-red-50 p-3",children:[r.jsxs("p",{className:`flex items-center gap-1.5 text-xs font-semibold ${s?"text-emerald-700":"text-red-700"}`,children:[s?r.jsx(b9,{}):r.jsx(v9,{}),t]}),r.jsx("p",{className:`mt-1 text-sm ${s?"text-emerald-900":"text-red-900"}`,children:n})]})}function lm({register:e,errors:t,einRegister:n,phoneRegister:s,accountType:a,idLabel:i,idPlaceholder:o,idMaxLength:l,resetHelp:c}){var u,d,m,h,f;return r.jsxs(r.Fragment,{children:[r.jsx("h3",{className:"mb-5 text-sm font-semibold text-slate-900",children:"Primary Taxpayer Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Oe,{label:"First Name",required:!0,maxLength:50,placeholder:"Enter First Name",error:(u=t.firstName)==null?void 0:u.message,...e("firstName"),onFocus:c},"entity-first-name"),r.jsx(Oe,{label:"Last Name",required:!0,maxLength:50,placeholder:"Enter Last Name",error:(d=t.lastName)==null?void 0:d.message,...e("lastName"),onFocus:c},"entity-last-name"),r.jsx(rm,{label:i,placeholder:o,maxLength:l,accountType:a,register:n,error:(m=t.ein)==null?void 0:m.message,onFocus:c})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Oe,{label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",error:(h=t.email)==null?void 0:h.message,...e("email"),onFocus:c}),r.jsx(Ir,{required:!0,register:s,error:(f=t.phoneNumber)==null?void 0:f.message,onFocus:c})]})]})}function j9({checked:e,onChange:t}){return r.jsx("section",{className:"rounded-xl border border-slate-200 bg-white p-6",children:r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 shrink-0 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:e,onChange:n=>t(n.target.checked)}),r.jsxs("span",{children:[r.jsx("span",{className:"block text-sm font-semibold text-slate-900",children:"Add Secondary Taxpayer Details"}),r.jsx("span",{className:"mt-0.5 block text-sm text-slate-500",children:"Tick this to enter your spouse's name, SSN and contact details for the joint return."})]})]})})}function w9({values:e,address:t,stateOptions:n,errors:s,onFieldChange:a,onFieldValueChange:i,onSsnChange:o,onSameAsPrimaryChange:l}){const c=e.sameAsPrimaryAddress;return r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:"Secondary Taxpayer Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(Oe,{id:"secondary-first-name",error:s.firstName,label:"First Name",required:!0,maxLength:50,placeholder:"Enter First Name",value:e.firstName,onChange:a("firstName")}),r.jsx(Oe,{id:"secondary-last-name",error:s.lastName,label:"Last Name",required:!0,maxLength:50,placeholder:"Enter Last Name",value:e.lastName,onChange:a("lastName")})]}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(Oe,{id:"secondary-ssn",error:s.ssn,label:"SSN",required:!0,inputMode:"numeric",placeholder:"Enter SSN",maxLength:vd,value:e.ssn,onChange:u=>o(u.target.value)}),r.jsx(Oe,{id:"secondary-email",error:s.email,label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",value:e.email,onChange:a("email")})]}),r.jsx("div",{className:"grid gap-5 sm:grid-cols-2",children:r.jsx(Ir,{id:"secondary-phone",error:s.phone,required:!0,value:e.phone,onChange:a("phone")})}),r.jsxs("div",{className:"border-t border-slate-100 pt-6",children:[r.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:"Address Details"}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:c,onChange:u=>l(u.target.checked)}),"Same as Primary Taxpayer's Address"]})]}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(Oe,{id:"secondary-address1",error:s.address1,label:"Address Line 1",required:!0,maxLength:50,placeholder:"Enter Address Line 1",value:t.address1,disabled:c,onChange:a("address1")}),r.jsx(Oe,{id:"secondary-address2",error:s.address2,label:"Address Line 2",maxLength:50,placeholder:"Enter Address Line 2",value:t.address2,disabled:c,onChange:a("address2")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2",children:[r.jsx(Oe,{id:"secondary-city",error:s.city,label:"City",required:!0,maxLength:50,placeholder:"Enter City",value:t.city,disabled:c,onChange:a("city")}),r.jsx(we,{id:"secondary-state",error:s.state,label:"State",required:!0,placeholder:"Select State",value:t.state,disabled:c,onChange:u=>i("state",u),options:n.map(u=>({value:u.code,label:u.name}))})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2",children:[r.jsx(Oe,{id:"secondary-zip",error:s.zipCode,label:"ZIP Code",required:!0,maxLength:10,placeholder:"Enter ZIP Code",value:t.zipCode,disabled:c,onChange:a("zipCode")}),r.jsx(we,{id:"secondary-country",error:s.country,label:"Country",required:!0,placeholder:"Select Country",value:t.country,disabled:c,onChange:u=>i("country",u),options:ka.map(u=>({value:u,label:u}))})]})]})]})}const gc=(e,t,n)=>{if(e&&"reportValidity"in e){const s=K(n,t);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Vi=(e,t)=>{for(const n in t.fields){const s=t.fields[n];s&&s.ref&&"reportValidity"in s.ref?gc(s.ref,n,e):s&&s.refs&&s.refs.forEach(a=>gc(a,n,e))}},yc=(e,t)=>{t.shouldUseNativeValidation&&Vi(e,t);const n={};for(const s in e){const a=K(t.fields,s),i=Object.assign(e[s]||{},{ref:a&&a.ref});if(N9(t.names||Object.keys(e),s)){const o=Object.assign({},K(n,s));Ce(o,"root",i),Ce(n,s,o)}else Ce(n,s,i)}return n},N9=(e,t)=>{const n=bc(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(s=>bc(s).match(`^${n}\\.\\d+`))};function bc(e){return e.replace(/[\[\]]/g,"")}function Zi(){return Zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Zi.apply(null,arguments)}function vc(e,t){try{var n=e()}catch(s){return t(s)}return n&&n.then?n.then(void 0,t):n}function S9(e,t){for(var n={};e.length;){var s=e[0],a=s.code,i=s.message,o=s.path.join(".");if(!n[o])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];n[o]={message:l.message,type:l.code}}else n[o]={message:i,type:a};if("unionErrors"in s&&s.unionErrors.forEach(function(d){return d.errors.forEach(function(m){return e.push(m)})}),t){var c=n[o].types,u=c&&c[s.code];n[o]=Io(o,t,n,a,u?[].concat(u,s.message):s.message)}e.shift()}return n}function A9(e,t){for(var n={},s=function(){var a=e[0],i=a.code,o=a.message,l=a.path.join(".");if(!n[l])if(a.code==="invalid_union"&&a.errors.length>0){var c=a.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:i};if(a.code==="invalid_union"&&a.errors.forEach(function(m){return m.forEach(function(h){return e.push(Zi({},h,{path:[].concat(a.path,h.path)}))})}),t){var u=n[l].types,d=u&&u[a.code];n[l]=Io(l,t,n,i,d?[].concat(d,a.message):a.message)}e.shift()};e.length;)s();return n}function _t(e,t,n){if(n===void 0&&(n={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,a,i){try{return Promise.resolve(vc(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](s,t)).then(function(o){return i.shouldUseNativeValidation&&Vi({},i),{errors:{},values:n.raw?Object.assign({},s):o}})},function(o){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(o))return{values:{},errors:yc(S9(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,a,i){try{return Promise.resolve(vc(function(){return Promise.resolve((n.mode==="sync"?f5:p5)(e,s,t)).then(function(o){return i.shouldUseNativeValidation&&Vi({},i),{errors:{},values:n.raw?Object.assign({},s):o}})},function(o){if((function(l){return l instanceof yo})(o))return{values:{},errors:yc(A9(o.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function tt(e,t){var n;if(e instanceof dn){if(e.details){const s=(n=Object.values(e.details)[0])==null?void 0:n[0];if(s)return s}return e.message||t}return e instanceof Error&&e.message?e.message:t}function k9(e){return he(`/portal/reference/states?country=${encodeURIComponent(e)}`)}function Tr(e){const{data:t}=ce({queryKey:["reference","states",e],queryFn:()=>k9(e),enabled:!!e,staleTime:1/0});return t??[]}function ta(e,t,n){const s=e.find(o=>o.code===t);if(!s||s.zipRanges.length===0)return!0;const a=n.replace(/\D/g,"");if(a.length<5)return!0;const i=Number(a.slice(0,3));return s.zipRanges.some(o=>i>=o.from&&i<=o.to)}function $t(e,t){const n=e==null?void 0:e.from;return n&&n.startsWith("/")&&!n.startsWith("//")?n:t}function P9(){const e=Pe(),t=ke(),n=ht(),{data:s=[]}=ce({queryKey:["entities","mine"],queryFn:io}),[a,i]=x.useState(null),[o,l]=x.useState(!1),[c,u]=x.useState(null),d=L=>()=>u(L),m=()=>u(null),[h,f]=x.useState(""),[g,p]=x.useState(!1),[v,y]=x.useState({}),[b,S]=x.useState(Ha),[A,w]=x.useState(null),[k,M]=x.useState(!1),{enabledPayments:O}=Yt(),Z=L=>{y(Q=>{if(!(L in Q))return Q;const{[L]:Se,...ft}=Q;return ft})},_=(L,Q)=>{S(Se=>({...Se,[L]:Q})),Z(L)},F=L=>Q=>{_(L,Q.target.value)},W=L=>{S(Q=>({...Q,ssn:Xr(L,"Individual")})),Z("ssn")},H=L=>{S(Q=>({...Q,sameAsPrimaryAddress:L})),L&&["address1","address2","city","state","zipCode","country"].forEach(Z)},z=s.length===0?"/create-entity":"/dashboard",re=$t(t.state,z),te=()=>{e(re)},{register:ne,control:J,handleSubmit:Ne,watch:ae,setValue:ge,getValues:Le,formState:{errors:Ie}}=Xt({resolver:_t(zd),shouldUnregister:!1,defaultValues:{accountType:"Business",firstName:"",lastName:"",tradeName:"",ein:"",entityType:"",email:"",phoneNumber:"",address1:"",address2:"",city:"",state:"",zipCode:"",country:"United States"}}),Fe=ae("accountType"),Re=Fe==="Individual",{label:ye,placeholder:V,maxLength:me}=Co(Fe),q=ae("country"),fe=ae("state"),be=ae("zipCode"),Ye=ae("address1"),ue=ae("address2"),ve=ae("city"),at=q==="United States",Ze=Tr(q),Xe=fe.length>0&&be.trim().length>0&&!ta(Ze,fe,be),bt=ne("ein"),Et=ne("phoneNumber"),vt=ne("zipCode"),Ct=Re&&h===sc,ct=Ct&&g,Me=b.sameAsPrimaryAddress,It=Me?q:b.country,Tt=Tr(It),_e={address1:Me?Ye:b.address1,address2:Me?ue:b.address2,city:Me?ve:b.city,state:Me?fe:b.state,zipCode:Me?be:b.zipCode,country:It},Lt=ct;x.useEffect(()=>{fe&&Ze.length>0&&!Ze.some(L=>L.code===fe)&&ge("state","")},[q,Ze]);const jt=L=>{const Q=Le("accountType");if(Q===L)return;u("accountType"),L==="Business"&&(f(""),p(!1),y({}),S(Ha));const Se=Le("lastName");qd(Q,L,ge,Se),ge("accountType",L),ge("ein",Xr(Le("ein"),L)),ge("entityType",""),queueMicrotask(()=>{ge("lastName",Se),ge("firstName",""),Q==="Business"&&L==="Individual"&&ge("tradeName","")})},j=L=>{f(L),L!==sc&&(p(!1),y({}),S(Ha))},P=L=>{p(L),L||y({})},C=Ne(async L=>{if(i(null),!ta(Ze,L.state,L.zipCode)){i(`ZIP code does not match the selected state (${L.state}).`);return}const Q=ct?zp(b,_e):{};if(y(Q),!(Object.keys(Q).length>0)){l(!0);try{await bf(Vd(L,{filingStatus:Re&&h||void 0,secondary:Lt?{...b,..._e}:null})),await n.invalidateQueries({queryKey:["entities","mine"]}),w({values:L,secondary:Lt?{...b,..._e}:null})}catch(Se){i(tt(Se,"Unable to save entity. Please try again."))}finally{l(!1)}}}),I=()=>{w(null),e("/dashboard",{replace:!0})},R=()=>{w(null),M(!0)},Y=()=>{M(!1),e("/dashboard",{replace:!0})},B=()=>{e("/payments/federal/new",{state:{from:"/dashboard",resetDraft:!0}})},G=()=>{e("/payments/state/new",{state:{from:"/dashboard",resetDraft:!0}})};return{register:ne,control:J,errors:Ie,onSubmit:C,error:a,isSubmitting:o,einRegister:bt,phoneRegister:Et,zipRegister:vt,accountType:Fe,isIndividual:Re,isUS:at,idLabel:ye,idPlaceholder:V,idMaxLength:me,stateOptions:Ze,state:fe,zipStateMismatch:Xe,activeHelp:c?im[c]:null,focusHelp:d,resetHelp:m,filingStatus:h,setFilingStatus:j,canAddSecondaryTaxpayer:Ct,includeSecondaryTaxpayer:g,setIncludeSecondaryTaxpayer:P,secondaryErrors:v,showSecondaryTaxpayer:ct,secondaryTaxpayer:b,secondaryAddress:_e,secondaryStateOptions:Tt,updateSecondaryField:F,setSecondaryField:_,setSecondarySsn:W,setSecondarySameAsPrimary:H,createdEntity:A,handleAccountTypeChange:jt,handleCancel:te,goToDashboard:I,enabledPayments:O,isPaymentPickerOpen:k,startPayment:R,closePaymentPicker:Y,startFederalPayment:B,startStatePayment:G}}function E9(){const e=P9();return r.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-start bg-white p-3 rounded-sm",children:[r.jsxs("form",{onSubmit:e.onSubmit,noValidate:!0,className:"min-w-0 flex-1 space-y-6",children:[e.error?r.jsx(Ht,{message:e.error}):null,r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx(Zd,{accountType:e.accountType,onAccountTypeChange:e.handleAccountTypeChange,isIndividual:e.isIndividual,filingStatus:e.filingStatus,onFilingStatusChange:e.setFilingStatus,focusHelp:e.focusHelp,resetHelp:e.resetHelp}),r.jsxs("div",{className:"",children:[e.isIndividual?r.jsx(lm,{register:e.register,errors:e.errors,einRegister:e.einRegister,phoneRegister:e.phoneRegister,accountType:e.accountType,idLabel:e.idLabel,idPlaceholder:e.idPlaceholder,idMaxLength:e.idMaxLength,resetHelp:e.resetHelp}):r.jsx(sm,{register:e.register,control:e.control,errors:e.errors,einRegister:e.einRegister,phoneRegister:e.phoneRegister,accountType:e.accountType,idLabel:e.idLabel,idPlaceholder:e.idPlaceholder,idMaxLength:e.idMaxLength,focusHelp:e.focusHelp}),r.jsx(nm,{register:e.register,control:e.control,errors:e.errors,zipRegister:e.zipRegister,isUS:e.isUS,state:e.state,stateOptions:e.stateOptions,zipStateMismatch:e.zipStateMismatch,focusHelp:e.focusHelp})]})]}),e.canAddSecondaryTaxpayer?r.jsx(j9,{checked:e.includeSecondaryTaxpayer,onChange:e.setIncludeSecondaryTaxpayer}):null,e.showSecondaryTaxpayer?r.jsx(w9,{values:e.secondaryTaxpayer,address:e.secondaryAddress,stateOptions:e.secondaryStateOptions,errors:e.secondaryErrors,onFieldChange:e.updateSecondaryField,onFieldValueChange:e.setSecondaryField,onSsnChange:e.setSecondarySsn,onSameAsPrimaryChange:e.setSecondarySameAsPrimary}):null,r.jsx(Ku,{onCancel:e.handleCancel,isSubmitting:e.isSubmitting,submitLabel:"Save",submittingLabel:"Creating…"})]}),r.jsx(om,{active:e.activeHelp}),r.jsx(x9,{created:e.createdEntity,onClose:e.goToDashboard,onGoToDashboard:e.goToDashboard,onStartPayment:e.startPayment}),r.jsx(Wu,{open:e.isPaymentPickerOpen,onClose:e.closePaymentPicker,enabledPayments:e.enabledPayments,onSelectFederal:e.startFederalPayment,onSelectState:e.startStatePayment})]})}function Ro(){const e=Pe(),t=ke(),n=$t(t.state,"/create-entity");return r.jsx("div",{className:"min-h-full bg-slate-50 px-4 py-6 sm:px-8 sm:py-8",children:r.jsxs("div",{className:"w-full",children:[r.jsxs("button",{type:"button",onClick:()=>e(n),className:"inline-flex items-center gap-1.5 rounded-lg py-1 text-sm font-medium text-slate-600 transition hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-500",children:[r.jsx(I9,{}),"Back"]}),r.jsxs("div",{className:"mb-6 mt-4",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Add Entity"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Everything here is matched against IRS records, so enter it exactly as the IRS has it."})]}),r.jsx(E9,{})]})})}function I9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}function T9({entity:e,onCancel:t,onSaved:n}){const s=ht(),[a,i]=x.useState(null),[o,l]=x.useState(!1),[c,u]=x.useState(null),[d,m]=x.useState(e.filingStatus??""),h=ae=>()=>u(ae),f=()=>u(null),{register:g,control:p,handleSubmit:v,watch:y,setValue:b,getValues:S,formState:{errors:A}}=Xt({resolver:_t(zd),defaultValues:Op(e),shouldUnregister:!1}),w=y("accountType"),k=w==="Individual",{label:M,placeholder:O,maxLength:Z}=Co(w),_=y("country"),F=y("state"),W=y("zipCode"),H=_==="United States",ee=Tr(_),z=F.length>0&&W.trim().length>0&&!ta(ee,F,W),re=g("ein"),te=g("phoneNumber"),ne=g("zipCode");x.useEffect(()=>{F&&ee.length>0&&!ee.some(ae=>ae.code===F)&&b("state","")},[_,ee]);const J=ae=>{const ge=S("accountType");if(ge===ae)return;u("accountType");const Le=S("lastName");qd(ge,ae,b,Le),b("accountType",ae),b("ein",Xr(S("ein"),ae)),b("entityType",""),ae==="Business"&&m(""),queueMicrotask(()=>{b("lastName",Le),b("firstName",""),ge==="Business"&&ae==="Individual"&&b("tradeName","")})},Ne=v(async ae=>{if(i(null),!ta(ee,ae.state,ae.zipCode)){i(`ZIP code does not match the selected state (${ae.state}).`);return}l(!0);try{await vf(e.entityId,Vp(ae,d)),await s.invalidateQueries({queryKey:["entities","mine"]}),n()}catch(ge){i(tt(ge,"Unable to update entity. Please try again."))}finally{l(!1)}});return r.jsxs("div",{className:"flex flex-col gap-6 rounded-sm bg-white p-3 lg:flex-row lg:items-start",children:[r.jsxs("form",{onSubmit:Ne,noValidate:!0,className:"min-w-0 flex-1 space-y-6",children:[a?r.jsx(Ht,{message:a}):null,r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx(Zd,{accountType:w,onAccountTypeChange:J,isIndividual:k,filingStatus:d,onFilingStatusChange:m,focusHelp:h,resetHelp:f}),r.jsxs("div",{children:[k?r.jsx(lm,{register:g,errors:A,einRegister:re,phoneRegister:te,accountType:w,idLabel:M,idPlaceholder:O,idMaxLength:Z,resetHelp:f}):r.jsx(sm,{register:g,control:p,errors:A,einRegister:re,phoneRegister:te,accountType:w,idLabel:M,idPlaceholder:O,idMaxLength:Z,focusHelp:h}),r.jsx(nm,{register:g,control:p,errors:A,zipRegister:ne,isUS:H,state:F,stateOptions:ee,zipStateMismatch:z,focusHelp:h})]})]}),r.jsx(Ku,{onCancel:t,isSubmitting:o,submitLabel:"Save Changes",submittingLabel:"Saving…"})]}),r.jsx(om,{active:c?im[c]:null})]})}function L9(){const e=Pe(),t=ke(),{entityId:n}=fa(),{entities:s,isLoading:a}=Yt(),i=$t(t.state,"/entities"),o=()=>e(i),l=s.find(c=>String(c.entityId)===n)??null;return r.jsx("div",{className:"min-h-full bg-slate-50 px-4 py-6 sm:px-8 sm:py-8",children:r.jsxs("div",{className:"w-full",children:[r.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1.5 rounded-lg py-1 text-sm font-medium text-slate-600 transition hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-500",children:[r.jsx(F9,{}),"Back"]}),r.jsxs("div",{className:"mb-6 mt-4",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Edit Entity"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Update your entity profile details."})]}),l?r.jsx(T9,{entity:l,onCancel:o,onSaved:o},l.entityId):r.jsx("p",{className:"rounded-sm bg-white p-6 text-sm text-slate-500",children:a?"Loading entity…":"That entity could not be found."})]})})}function F9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}const Fn=10;function R9(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),he(`/portal/dashboard?${n}`)}function M9({entityId:e,search:t,taxYear:n,status:s,page:a=1,pageSize:i=Fn}){const o=new URLSearchParams({entityId:String(e),page:String(a),pageSize:String(i)});return t&&o.set("search",t),n&&o.set("taxYear",n),s&&s!=="all"&&o.set("status",s),he(`/portal/dashboard/payments?${o}`)}function D9(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),he(`/portal/dashboard/overview?${n}`)}function Ga(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),he(`/portal/dashboard/charts?${n}`)}function Ja({entityCount:e,showPaymentActions:t=!0}){const n=Pe(),{enabledPayments:s}=Yt();return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1.5",children:[r.jsxs("button",{type:"button",onClick:()=>n("/entities"),className:"inline-flex items-center gap-1.5 rounded-[14px] border border-solid border-[#e5e7eb] bg-[#f9fafb] px-[15px] py-[9px] text-xs font-bold text-[#364153] transition hover:bg-slate-100",title:"View Entities",children:[r.jsx(O9,{}),"Entities (",e,")"]}),r.jsxs("button",{type:"button",onClick:()=>n("/create-entity/form",{state:{from:"/dashboard"}}),className:"inline-flex items-center gap-1.5 rounded-[14px] border-[1.5px] border-dashed border-[#16a34a] bg-[#f0fdf4] px-[15.5px] py-[9.5px] text-xs font-bold text-[#16a34a] transition hover:bg-green-50",children:[r.jsx(z9,{}),"Add Entity"]})]}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"self-stretch inline-flex flex-col justify-start items-start",children:[r.jsx("div",{className:"size- flex flex-col justify-start items-start",children:r.jsx("div",{className:"self-stretch justify-center text-zinc-900 text-xl font-bold leading-7",children:"Dashboard"})}),r.jsx("div",{className:"size- max-w-[576px] flex flex-col justify-start items-start",children:r.jsx("div",{className:"justify-center text-gray-700 text-sm font-normal leading-5",children:"Manage your tax payments and filings from one place."})})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[t&&s.includes("federal")&&r.jsxs("button",{type:"button",onClick:()=>n("/payments/federal/new",{state:{from:"/",resetDraft:!0}}),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:[r.jsx(Xa,{}),"Add Federal Payment"]}),t&&s.includes("state")&&r.jsxs("button",{type:"button",onClick:()=>n("/payments/state/new",{state:{from:"/",resetDraft:!0}}),className:"inline-flex items-center gap-2 rounded-lg border border-gov-600 bg-white px-4 py-2.5 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:[r.jsx(Xa,{}),"Add State Payment"]}),t&&r.jsxs("button",{type:"button",disabled:!0,title:"Coming soon",className:"inline-flex cursor-not-allowed items-center gap-2 rounded-lg border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm font-semibold text-slate-400",children:[r.jsx(Xa,{}),"Add Local Payment",r.jsx("span",{className:"text-xs font-medium",children:"(Coming Soon)"})]})]})]})]})}function Xa(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})}function O9(){return r.jsx("svg",{className:"h-[13px] w-[13px] shrink-0 text-[#364153]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})})}function z9(){return r.jsx("svg",{className:"h-[13px] w-[13px] shrink-0 text-[#16a34a]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.356 0-4.564-.64-6.374-1.766z"})})}function q9({items:e}){return r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:e.map(t=>r.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white px-5 py-4 shadow-sm",children:[r.jsx("p",{className:"text-[13px] leading-5 text-gray-600",children:t.label}),r.jsx("p",{className:`mt-1.5 text-2xl font-bold leading-8 ${t.tone==="danger"?"text-red-600":"text-zinc-900"}`,children:t.value}),r.jsx("p",{className:"mt-1.5 text-[13px] leading-5 text-gray-600",children:t.caption})]},t.key))})}function Ia({label:e="Loading…"}){return r.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] bg-white/75","aria-live":"polite","aria-busy":"true",children:r.jsxs("div",{className:"flex items-center gap-2.5 text-sm text-slate-500",children:[r.jsx(V9,{}),r.jsx("span",{children:e})]})})}function V9(){return r.jsxs("svg",{className:"h-5 w-5 animate-spin text-gov-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}const cm={Draft:"Draft"};function um(e){switch((e??cm.Draft).trim().toLowerCase()){case"draft":case"pending":return"drafts";case"scheduled":return"scheduled";case"processing":return"submitted";case"rejected":return"rejected";case"accepted":return"paid";default:return"drafts"}}function dm(e){const t=(e??cm.Draft).trim().toLowerCase();return t==="draft"||t==="pending"||t==="rejected"}const Z9=[0,1,3,4,6,7,9,10],U9=[0,1,2,3,4,5,6,7,8,9,10],B9=[0,1,2,3,4,5,6,8,9,10,11],Y9=[0,1,2,3,4,5,6,7,9,10,11],mm=["720","941"],hm=["706-GS (D)","706-GS (T)","926","940","943","944","945","1042","2438","3520","6069","8752","CT-1"],fm=["7200D"],pm=["8963"];function xm(e){return mm.includes(e)?Z9:hm.includes(e)?U9:fm.includes(e)?B9:pm.includes(e)?Y9:[]}function H9(e){return e.length!==6?"":`${e.slice(0,4)}-${e.slice(4,6)}`}function na(e){if(e.length!==6)return null;const t=Number.parseInt(e.slice(0,4),10),n=Number.parseInt(e.slice(4,6),10);return Number.isNaN(t)||Number.isNaN(n)||n<1||n>12?null:{year:t,month:n-1}}function W9(e,t){return`${e}${String(t+1).padStart(2,"0")}`}function gm(){const e=new Date().getFullYear();return{minYear:e-2,maxYear:e}}function K9(e){const t=(e==null?void 0:e.trim())??"";return mm.includes(t)?"quarterly":hm.includes(t)||fm.includes(t)||pm.includes(t)?"annual":"monthly"}function _a(e){const[t,n,s]=e.split("-").map(i=>Number.parseInt(i,10));return new Date(Date.UTC(t,n-1,s)).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"})}const Q9=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ym(e,t){if(!(e!=null&&e.trim()))return"—";const n=/^(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})$/.exec(e);if(n){const[,l,c]=n;return l===c?_a(l):`${_a(l)} – ${_a(c)}`}const s=/^(\d{4})-Q([1-4])$/.exec(e);if(s)return`Q${s[2]} ${s[1]}`;if(/^(Q[1-4]|ANNUAL|MONTHLY|ACCOUNT_ASSIGNED)$/i.test(e))return e.toUpperCase()==="ACCOUNT_ASSIGNED"?"Assigned schedule":e.toUpperCase();if(e.length!==6)return e;const a=e.slice(0,4),i=Number.parseInt(e.slice(4,6),10);if(Number.isNaN(i)||i<1||i>12)return e;const o=K9(t);return o==="quarterly"?`Q${Math.ceil(i/3)} ${a}`:o==="annual"?a:`${Q9[i-1]} ${a}`}function Cc(e){var t;return{id:e.id,category:e.category,referenceNo:e.referenceNumber??"—",jurisdiction:e.jurisdiction,period:ym(e.taxPeriod,e.formType),amount:e.amount,paymentDate:e.paymentDate,status:e.status,reason:e.reason,formType:((t=e.formType)==null?void 0:t.trim())||"—",tab:um(e.status),isAuthorized:e.isAuthorized}}function Mo(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:e%1===0?0:2,maximumFractionDigits:2}).format(e)}function Pn(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function G9(e){return[{value:e,label:`${e}`},{value:e-1,label:`${e-1}`},{value:e-2,label:`${e-2}`}]}function jc(e){return`$${(e/1e3).toFixed(1)}k`}const bm="drafts",Ta="all";function Je(){return Rn(bm)}function Rn(e){return`/payments?tab=${e}`}function vm(e){return e.trim().toLowerCase()==="federal"?"federal":"state"}function Cm(e,t){return`/payments/${vm(e)}/${t}/edit`}function jm(e,t){return`/payments/${vm(e)}/${t}/view`}function J9(e){return e==="failed"?"rejected":e}function X9(e,t){return e==="draft"||t.trim().toLowerCase()==="draft"?bm:J9(e)}const _9=5;function $9({alerts:e}){const t=Pe(),[n,s]=x.useState(0),a=e.slice(0,_9),i=Rn("rejected"),o=Math.min(n,a.length-1),l=a[o];if(!l)return null;const c=u=>{s(d=>{const m=Math.min(d,a.length-1)+u;return Math.min(Math.max(m,0),a.length-1)})};return r.jsxs("section",{className:"rounded-xl border border-red-200 bg-white p-4",children:[r.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx("span",{"aria-hidden":"true",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-red-500 text-sm font-bold text-white",children:"!"}),r.jsx("h2",{className:"text-base font-bold text-red-500",children:"Need Attention"})]}),r.jsx("button",{type:"button",onClick:()=>t(i),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(wc,{direction:"previous",disabled:o===0,onClick:()=>c(-1)}),r.jsx("div",{className:"min-w-0 flex-1 rounded-lg border border-red-300 bg-red-50 px-4 py-3","aria-live":"polite",children:r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("p",{className:"truncate text-sm font-bold text-zinc-900",children:[Pn(l.amount)," ",l.reason]}),r.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-600",children:l.details.join(" · ")})]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx("button",{type:"button",onClick:()=>t(jm(l.category,l.paymentId),{state:{from:"/dashboard"}}),className:"rounded-md border border-gov-600 bg-white px-4 py-1.5 text-sm font-medium text-gov-600 transition hover:bg-gov-50",children:"View"}),r.jsx("button",{type:"button",onClick:()=>t(Cm(l.category,l.paymentId),{state:{from:"/dashboard"}}),className:"rounded-md bg-red-500 px-4 py-1.5 text-sm font-medium text-white transition hover:bg-red-600",children:l.actionLabel})]})]})}),r.jsx(wc,{direction:"next",disabled:o===a.length-1,onClick:()=>c(1)})]}),a.length>1?r.jsx("div",{className:"mt-3 flex items-center justify-center gap-1.5",children:a.map((u,d)=>r.jsx("button",{type:"button","aria-label":`Show alert ${d+1} of ${a.length}`,"aria-current":d===o,onClick:()=>s(d),className:`h-1.5 rounded-full transition-all ${d===o?"w-5 bg-gov-700":"w-1.5 bg-slate-300 hover:bg-slate-400"}`},u.id))}):null]})}function wc({direction:e,disabled:t,onClick:n}){return r.jsx("button",{type:"button",onClick:n,disabled:t,"aria-label":e==="next"?"Next alert":"Previous alert",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-500 transition hover:bg-slate-50 hover:text-slate-700 disabled:cursor-not-allowed disabled:opacity-40",children:r.jsx("svg",{className:`h-4 w-4 ${e==="previous"?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})}const Nc=["#c7d2fe","#a7f3d0","#fcd34d","#bfdbfe","#fbcfe8","#fdba74","#93c5fd","#fda4af"];function e7(e){return Nc[e%Nc.length]}const Sc=["#6366f1","#10b981","#f59e0b","#3b82f6","#ec4899","#f97316","#0ea5e9","#f43f5e"];function t7(e){return Sc[e%Sc.length]}function n7(e){const[t,n,s]=e.split("-");return!t||!n||!s?e:`${n}-${s}-${t}`}function r7(e){return{id:`${e.category}-${e.id}`,jurisdiction:e.jurisdiction,period:e.period,paymentDate:n7(e.paymentDate),status:e.status,statusLabel:e.statusLabel,formType:e.formType,amount:e.amount}}const s7=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function a7(e,t){const s=Math.round((e.getTime()-t.getTime())/864e5);return s<=0?"Due today":s===1?"Due in 1 day":`Due in ${s} days`}function i7(e,t=new Date){const[n,s,a]=e.dueDate.split("-").map(Number),i=new Date(n,(s??1)-1,a??1),o=new Date(t.getFullYear(),t.getMonth(),t.getDate());return{id:`${e.category}-${e.id}`,month:s7[i.getMonth()]??"",day:String(i.getDate()).padStart(2,"0"),title:e.formType,dueLabel:a7(i,o),jurisdiction:e.jurisdiction,amount:e.amount}}function o7(e){return e.map(t=>({id:`${t.category}-${t.id}`,paymentId:t.id,category:t.category,amount:t.amount,reason:"Payment Rejected",details:[t.jurisdiction,t.formType,t.period],actionLabel:"Re-Submit"}))}function l7(e){return e.map(t=>({label:`Quarter ${t.quarter}`,amount:t.amount}))}function c7(e){return e.map((t,n)=>({state:t.state,count:t.count,amount:t.amount,color:e7(n)}))}function u7(e){const t=e.reduce((n,s)=>n+s.amount,0);return e.map((n,s)=>({label:n.paymentType,amount:n.amount,percent:t>0?Math.round(n.amount/t*100):0,color:t7(s)}))}function Do({value:e,options:t,onChange:n}){return r.jsx(we,{size:"sm",ariaLabel:"Tax year",leadingIcon:r.jsx(d7,{className:"pointer-events-none absolute left-2.5 top-1/2 z-10 h-3.5 w-3.5 -translate-y-1/2 text-slate-500"}),placeholder:"Select year",value:String(e),onChange:s=>n(Number(s)),options:t.map(s=>({value:String(s.value),label:s.label}))})}function d7({className:e}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})})}function m7(){const e=x.useRef(null),[t,n]=x.useState(0);return x.useEffect(()=>{const s=e.current;if(!s||(n(s.clientWidth),typeof ResizeObserver>"u"))return;const a=new ResizeObserver(i=>{var l;const o=(l=i[0])==null?void 0:l.contentRect.width;o!==void 0&&n(o)});return a.observe(s),()=>a.disconnect()},[]),[e,t]}const ks={left:46,right:10,top:14,bottom:34},h7=.52,f7=170,p7=240,x7=140,$a=3e4;function g7(e){return e<=0?$a:Math.ceil(e/$a)*$a}function y7(e){return`$${Math.round(e/1e3)}k`}function b7({points:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){const[a,i]=m7(),o=Math.round(Math.min(Math.max((i||340)*h7,f7),p7)),l=g7(Math.max(...e.map(y=>y.amount),0)),c=[0,l/3,l*2/3,l],u=ks.left,d=i-ks.right,m=ks.top,h=o-ks.bottom,f=(d-u)/Math.max(e.length,1),g=y=>u+f*(y+.5),p=y=>h-y/l*(h-m),v=e.map((y,b)=>`${g(b)},${p(y.amount)}`).join(" ");return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Federal Payments"}),r.jsx(Do,{value:t,options:n,onChange:s})]}),r.jsx("div",{ref:a,className:"w-full",children:i>=x7?r.jsxs("svg",{width:i,height:o,className:"block",role:"img","aria-label":`Federal payments by quarter for tax year ${t}`,children:[c.map(y=>{const b=p(y);return r.jsxs("g",{children:[r.jsx("line",{x1:u,y1:b,x2:d,y2:b,className:"stroke-slate-200",strokeWidth:"1",strokeDasharray:"3 3"}),r.jsx("text",{x:u-10,y:b,textAnchor:"end",dominantBaseline:"middle",className:"fill-slate-400",fontSize:"11",children:y7(y)})]},y)}),r.jsx("polyline",{points:v,fill:"none",className:"stroke-slate-600",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.map((y,b)=>r.jsx("circle",{cx:g(b),cy:p(y.amount),r:"5",className:"fill-gov-600"},y.label)),e.map((y,b)=>r.jsx("text",{x:g(b),y:o-12,textAnchor:"middle",className:"fill-slate-500",fontSize:"11",children:y.label},y.label))]}):r.jsx("div",{style:{height:o}})})]})}function v7({bars:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[r.jsxs("h2",{className:"text-base font-bold text-zinc-900",children:["Payment Types ",t]}),r.jsx(Do,{value:t,options:n,onChange:s})]}),r.jsx("div",{className:"flex flex-col gap-5",children:e.map(a=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 text-[13px]",children:[r.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-gray-700",children:[r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:a.color}}),r.jsx("span",{className:"truncate",children:a.label})]}),r.jsx("span",{className:"shrink-0 font-semibold text-zinc-900",children:Pn(a.amount)})]}),r.jsx("div",{className:"mt-2 h-2.5 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(Math.max(a.percent,0),100)}%`,backgroundColor:a.color}})})]},a.label))})]})}function wm({label:e,actions:t}){const[n,s]=x.useState(!1),a=x.useRef(null);return x.useEffect(()=>{if(!n)return;function i(l){var c;(c=a.current)!=null&&c.contains(l.target)||s(!1)}function o(l){l.key==="Escape"&&s(!1)}return document.addEventListener("mousedown",i),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",o)}},[n]),r.jsxs("div",{ref:a,className:"relative",children:[r.jsx("button",{type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":n,onClick:()=>s(i=>!i),className:"flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(C7,{})}),n?r.jsx("div",{role:"menu",className:"absolute right-0 top-8 z-10 min-w-[160px] overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:t.map(i=>r.jsx("button",{type:"button",role:"menuitem",onClick:()=>{s(!1),i.onSelect()},className:"block w-full px-3 py-2 text-left text-sm text-slate-700 transition hover:bg-slate-50",children:i.label},i.key))}):null]})}function C7(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.75"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.75"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.75"})]})}const j7={draft:"bg-slate-100 text-slate-600",scheduled:"bg-yellow-100 text-yellow-800",submitted:"bg-orange-100 text-orange-800",paid:"bg-green-100 text-green-800",failed:"bg-red-100 text-red-700"};function w7({payments:e}){const t=Pe();return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-6 pb-3 pt-5",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Recent Payments"}),r.jsx("button",{type:"button",onClick:()=>t(Rn(Ta)),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsx("div",{className:"flex-1 overflow-x-auto px-6 pb-5",children:r.jsxs("table",{className:"w-full min-w-[680px] text-left",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-y border-slate-200 text-sm text-gray-700",children:[r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Jurisdiction / Type"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Period"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Settlement Date"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Status"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Form Type"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Amount"}),r.jsx("th",{className:"w-10 py-3"})]})}),r.jsx("tbody",{children:e.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:7,className:"py-12 text-center text-sm text-slate-500",children:"No payments yet."})}):e.map(n=>r.jsxs("tr",{className:"text-sm",children:[r.jsx("td",{className:"py-4 pr-4 text-zinc-900",children:n.jurisdiction}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.period}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.paymentDate}),r.jsx("td",{className:"py-4 pr-4",children:r.jsx("span",{className:`inline-flex rounded-md px-2 py-1 text-xs font-medium ${j7[n.status]}`,children:n.statusLabel})}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.formType}),r.jsx("td",{className:"py-4 pr-4 font-medium text-zinc-900",children:Pn(n.amount)}),r.jsx("td",{className:"py-4",children:r.jsx(wm,{label:`Actions for ${n.jurisdiction} ${n.period}`,actions:[{key:"view",label:"View details",onSelect:()=>t(Rn(X9(n.status,n.statusLabel)))}]})})]},n.id))})]})})]})}const fn=70,Ui=50,Ac=22,kc=2*Math.PI*Ui;function N7({slices:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){const a=Pe(),i=e.reduce((d,m)=>d+m.amount,0),o=e.reduce((d,m)=>d+m.count,0),l=`TY '${String(t).slice(-2)}`;let c=0;const u=e.map(d=>{const m=i>0?d.amount/i*kc:0,h=-c;return c+=m,{...d,length:m,offset:h}});return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"State Payments"}),r.jsx(Do,{value:t,options:n,onChange:s})]}),r.jsxs("div",{className:"flex flex-1 flex-wrap gap-4",children:[r.jsxs("div",{className:"flex flex-1 flex-col items-center gap-3",children:[r.jsx("div",{className:"flex flex-1 items-center",children:r.jsxs("svg",{viewBox:"0 0 140 140",className:"h-[120px] w-[120px] shrink-0 sm:h-[130px] sm:w-[130px]",role:"img","aria-label":`State payments split for tax year ${t}`,children:[r.jsx("circle",{cx:fn,cy:fn,r:Ui,fill:"none",className:"stroke-slate-100",strokeWidth:Ac}),r.jsx("g",{transform:`rotate(-90 ${fn} ${fn})`,children:u.map(d=>r.jsx("circle",{cx:fn,cy:fn,r:Ui,fill:"none",stroke:d.color,strokeWidth:Ac,strokeDasharray:`${d.length} ${kc-d.length}`,strokeDashoffset:d.offset},d.state))}),r.jsx("text",{x:fn,y:fn,textAnchor:"middle",dominantBaseline:"middle",className:"fill-slate-600",fontSize:"13",fontWeight:"600",children:l})]})}),r.jsx("button",{type:"button",onClick:()=>a(Rn(Ta)),className:"text-xs font-medium text-gov-600 hover:text-gov-700",children:"View Full State Report"})]}),r.jsxs("div",{className:"min-w-[170px] flex-1",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] font-semibold uppercase tracking-wide text-slate-400",children:[r.jsx("span",{children:"State & Count"}),r.jsx("span",{children:"Amount"})]}),r.jsx("ul",{className:"mt-2 space-y-1.5",children:e.map(d=>r.jsxs("li",{className:"flex items-center justify-between gap-2 text-xs",children:[r.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-gray-700",children:[r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:d.color}}),r.jsxs("span",{className:"truncate",children:[d.state," (",d.count,")"]})]}),r.jsx("span",{className:"shrink-0 text-gray-700",children:jc(d.amount)})]},d.state))}),r.jsxs("div",{className:"mt-2.5 flex items-center justify-between border-t border-slate-200 pt-2.5 text-xs font-bold text-zinc-900",children:[r.jsxs("span",{children:["Total (",o,")"]}),r.jsx("span",{children:jc(i)})]})]})]})]})}function S7({payments:e}){const t=Pe(),n=Rn(Ta);return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-5 pb-3 pt-5",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Upcoming Payments"}),r.jsx("button",{type:"button",onClick:()=>t(n),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsx("div",{className:"flex flex-col gap-3 px-5 pb-5",children:e.length===0?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:"No upcoming payments."}):e.map(s=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex h-12 w-12 shrink-0 flex-col items-center justify-center rounded-lg bg-red-50",children:[r.jsx("span",{className:"text-[10px] font-semibold uppercase leading-3 tracking-wide text-red-600",children:s.month}),r.jsx("span",{className:"text-base font-bold leading-5 text-zinc-900",children:s.day})]}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"truncate text-sm font-semibold text-zinc-900",children:s.title}),r.jsxs("p",{className:"truncate text-xs text-gray-600",children:[s.dueLabel," ",r.jsx("span",{className:"text-slate-400",children:"•"})," ",s.jurisdiction]})]}),r.jsx("p",{className:"shrink-0 text-sm font-semibold text-zinc-900",children:Pn(s.amount)}),r.jsx(wm,{label:`Actions for ${s.title} due ${s.month} ${s.day}`,actions:[{key:"view",label:"View details",onSelect:()=>t(n)}]})]},s.id))})]})}function A7({userName:e,steps:t}){const n=t.filter(i=>i.done).length,s=t.findIndex(i=>!i.done),a=Math.round(n/t.length*100);return r.jsxs("section",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-10",children:[r.jsxs("h2",{className:"text-2xl font-bold text-slate-900",children:["Welcome",e?r.jsxs("span",{className:"italic",children:[", ",e,"!"]}):"!",r.jsx("span",{"aria-hidden":"true",children:" 👋"})]}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"New here? Take the five-minute tour to see how GovPay works."}),r.jsx("h3",{className:"mt-8 text-xl font-bold text-slate-900",children:"Complete your setup"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Four quick steps, then you're ready to make your first payment."}),r.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t.length,"aria-valuenow":n,"aria-label":"Setup progress",className:"mt-5 h-2 w-full overflow-hidden rounded-full bg-slate-200",children:r.jsx("div",{className:"h-full rounded-full bg-gov-700 transition-all",style:{width:`${Math.max(a,1.5)}%`}})}),r.jsx("ol",{className:"mt-6 space-y-4",children:t.map((i,o)=>r.jsx(k7,{step:i,stepNumber:o+1,active:o===s},i.title))})]})}function k7({step:e,stepNumber:t,active:n}){return r.jsxs("li",{className:`flex flex-wrap items-center justify-between gap-4 rounded-sm border p-4 ${n?"border-gov-400 bg-gov-50/40":"border-slate-200 bg-slate-50/60"}`,children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[r.jsx("span",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-sm text-sm font-semibold ${e.done?"bg-gov-700 text-white":n?"border border-gov-400 bg-white text-gov-600":"bg-slate-200 text-slate-500"}`,children:e.done?r.jsx(P7,{}):t}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:`text-sm font-semibold ${e.done?"text-slate-400 line-through":n?"text-gov-700":"text-slate-900"}`,children:e.title}),r.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:e.description})]})]}),e.done?r.jsx("button",{type:"button",onClick:e.onView,disabled:!e.onView,className:"inline-flex h-10 min-w-[120px] items-center justify-center rounded-sm border border-gov-300 bg-white px-5 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:"View"}):n?r.jsxs("button",{type:"button",onClick:e.onAction,disabled:!e.onAction,className:"inline-flex h-10 min-w-[140px] items-center justify-center gap-2 rounded-sm bg-gov-700 px-5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:[e.actionLabel,r.jsx(E7,{})]}):r.jsx("button",{type:"button",disabled:!0,className:"inline-flex h-10 min-w-[140px] cursor-not-allowed items-center justify-center rounded-sm border border-gov-200 bg-white px-5 text-sm font-medium text-gov-400",children:e.actionLabel})]})}function P7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function E7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})}const I7=1e3;async function hn(e){const t=await he(`/portal/bank-accounts?entityId=${e}&pageSize=${I7}`);return(t==null?void 0:t.items)??[]}function T7(e){return he("/portal/bank-accounts",{method:"POST",body:e})}function Nm(e,t){return he(`/portal/bank-accounts/${e}`,{method:"PATCH",body:t})}function L7({entityId:e,entityCount:t,entitiesLoading:n,dashboard:s,dashboardLoading:a,userName:i}){const{data:o=[],isLoading:l}=ce({queryKey:["bank-accounts",e],queryFn:()=>hn(e),enabled:e!==null}),c=t>0,u=(s==null?void 0:s.hasPayments)??!1,d=o.length>0,m=u;return{hasEntity:c,hasPayment:u,hasBankAccount:d,hasAuthorizedPayment:m,isComplete:c&&u&&d&&m,isLoading:n||e!==null&&(a||l),userName:F7(i)}}function F7(e){var n,s;const t=(s=e??((n=Bu())==null?void 0:n.user.name))==null?void 0:s.trim();if(t)return t.split(/\s+/)[0]}const pn=new Date().getFullYear(),R7=5,M7={1:"grid gap-5",2:"grid gap-5 lg:grid-cols-2",3:"grid gap-5 lg:grid-cols-3"};function Oo(){const e=Pe(),{entities:t,isLoading:n,selectedEntity:s,enabledPayments:a,userName:i}=Yt(),o=(s==null?void 0:s.entityId)??null,[l,c]=x.useState(!1),u=G9(pn),[d,m]=x.useState(pn),[h,f]=x.useState(pn),[g,p]=x.useState(pn),v=a.includes("federal"),y=a.includes("state"),b=1+Number(v)+Number(y),{data:S,isLoading:A}=ce({queryKey:["dashboard",o,pn],queryFn:()=>R9(o,pn),enabled:o!==null}),{data:w}=ce({queryKey:["dashboard","overview",o,pn],queryFn:()=>D9(o,pn),enabled:o!==null}),{data:k}=ce({queryKey:["dashboard","charts",o,d],queryFn:()=>Ga(o,d),enabled:o!==null,placeholderData:Ua}),{data:M}=ce({queryKey:["dashboard","charts",o,h],queryFn:()=>Ga(o,h),enabled:o!==null,placeholderData:Ua}),{data:O}=ce({queryKey:["dashboard","charts",o,g],queryFn:()=>Ga(o,g),enabled:o!==null,placeholderData:Ua}),{data:Z}=ce({queryKey:["dashboard","payments","recent",o],queryFn:()=>M9({entityId:o,page:1,pageSize:R7}),enabled:o!==null}),_=L7({entityId:o,entityCount:t.length,entitiesLoading:n,dashboard:S,dashboardLoading:A,userName:i});if(_.isLoading)return r.jsxs("div",{className:"space-y-6",children:[r.jsx(Ja,{entityCount:t.length,showPaymentActions:!1}),r.jsx("div",{className:"relative min-h-80 rounded-xl border border-slate-200 bg-white",children:r.jsx(Ia,{label:"Loading your dashboard…"})})]});if(!_.isComplete)return r.jsxs("div",{className:"space-y-6",children:[r.jsx(Ja,{entityCount:t.length,showPaymentActions:!1}),r.jsx(A7,{userName:_.userName,steps:[{title:"Add your first entity",description:"Add the business or individual you'll be filing and paying taxes for.",actionLabel:"Add Entity",done:_.hasEntity,onAction:()=>e("/create-entity/form",{state:{from:"/dashboard"}}),onView:()=>e("/entities")},{title:"Create your first payment",description:"Choose the tax authority, payment type, and amount.",actionLabel:"Create Payment",done:_.hasPayment,onAction:()=>c(!0),onView:()=>e("/payments")},{title:"Connect your bank account",description:"Link an account so payments can be sent securely and on time.",actionLabel:"Connect Bank",done:_.hasBankAccount,onAction:()=>e("/settings"),onView:()=>e("/settings")},{title:"Review & Authorize",description:"Check the details, then submit. You can still cancel before it processes.",actionLabel:"Review Payment",done:_.hasAuthorizedPayment,onAction:()=>e(Je()),onView:()=>e("/payments")}]}),r.jsx(Wu,{open:l,onClose:()=>c(!1),enabledPayments:a,onSelectFederal:()=>e("/payments/federal/new",{state:{from:"/dashboard",resetDraft:!0}}),onSelectState:()=>e("/payments/state/new",{state:{from:"/dashboard",resetDraft:!0}})})]});const F=[{key:"taxes-paid-ytd",label:"Taxes paid - YTD",value:w?Pn(w.taxesPaidYtd.amount):"—",caption:w?`Across ${w.taxesPaidYtd.count} successful payments`:"Loading…",tone:"default"},{key:"upcoming-liability",label:`Payments Due - ${(w==null?void 0:w.upcomingLiability.windowDays)??60} days`,value:w?Pn(w.upcomingLiability.amount):"—",caption:w?`${w.upcomingLiability.count} payments scheduled`:"Loading…",tone:"default"},{key:"filling-progress",label:"Filing Progress - Current Year",value:w?Pn(w.draftTotal.amount):"—",caption:w?`${w.draftTotal.count} draft${w.draftTotal.count===1?"":"s"} in progress`:"Loading…",tone:"default"},{key:"rejected-payments",label:"Payment Requiring Action",value:w?Pn(w.rejectedTotal.amount):"—",caption:w?`${w.rejectedTotal.count} rejected payment${w.rejectedTotal.count===1?"":"s"}`:"Loading…",tone:w&&w.rejectedTotal.count>0?"danger":"default"}],W=((Z==null?void 0:Z.items)??[]).map(r7),H=((w==null?void 0:w.upcomingPayments)??[]).map(ne=>i7(ne)),ee=o7((w==null?void 0:w.needsAttention)??[]),z=l7((k==null?void 0:k.federalByQuarter)??[]),re=c7((M==null?void 0:M.stateByJurisdiction)??[]),te=u7((O==null?void 0:O.statePaymentTypes)??[]);return r.jsxs("div",{className:"space-y-6",children:[r.jsx(Ja,{entityCount:t.length}),r.jsx($9,{alerts:ee}),r.jsx(q9,{items:F}),r.jsxs("div",{className:"grid gap-5 lg:grid-cols-3",children:[r.jsx("div",{className:"lg:col-span-2",children:r.jsx(w7,{payments:W})}),r.jsx(S7,{payments:H})]}),r.jsxs("div",{className:M7[b],children:[v&&r.jsx(b7,{points:z,taxYear:d,taxYearOptions:u,onTaxYearChange:m}),y&&r.jsx(N7,{slices:re,taxYear:h,taxYearOptions:u,onTaxYearChange:f}),r.jsx(v7,{bars:te,taxYear:g,taxYearOptions:u,onTaxYearChange:p})]})]})}const zo="Active",Sm="Inactive";function fs(e){return(e.status??zo).trim().toLowerCase()==="active"}function D7(e){return fs(e)?Sm:zo}function O7(e){return fs(e)?Sm:zo}const Pc=160,z7=88,Ps=8;function q7({entity:e,onEdit:t,variant:n="button"}){const s=ht(),{showSuccess:a,showError:i}=ya(),o=x.useRef(null),l=x.useRef(null),[c,u]=x.useState(!1),[d,m]=x.useState(!1),[h,f]=x.useState({}),g=()=>{var w;const v=o.current;if(!v)return;const y=v.getBoundingClientRect(),b=((w=l.current)==null?void 0:w.offsetHeight)??z7,A=window.innerHeight-y.bottom<b+Ps;f({position:"fixed",top:A?y.top-b-Ps:y.bottom+Ps,left:Math.max(Ps,y.right-Pc),width:Pc,zIndex:50})};x.useLayoutEffect(()=>{c&&(g(),requestAnimationFrame(g))},[c]),x.useEffect(()=>{if(!c)return;const v=b=>{var A,w;const S=b.target;(A=o.current)!=null&&A.contains(S)||(w=l.current)!=null&&w.contains(S)||u(!1)},y=()=>g();return document.addEventListener("mousedown",v),window.addEventListener("resize",y),window.addEventListener("scroll",y,!0),()=>{document.removeEventListener("mousedown",v),window.removeEventListener("resize",y),window.removeEventListener("scroll",y,!0)}},[c]);const p=async()=>{const v=fs(e);m(!0);try{await Cf(e.entityId,D7(e)),await s.invalidateQueries({queryKey:["entities","mine"]}),u(!1),a(v?"Entity Deactivated Successfully":"Entity Activated Successfully")}catch(y){i("Action Not Completed",tt(y,"Unable to update this entity."))}finally{m(!1)}};return r.jsxs("div",{className:"inline-block text-left",children:[r.jsx("button",{ref:o,type:"button",disabled:d,"aria-label":n==="kebab"?"Entity actions":void 0,"aria-haspopup":"menu","aria-expanded":c,onClick:()=>u(v=>!v),className:n==="kebab"?"inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-60":"inline-flex items-center gap-1.5 rounded-lg bg-gov-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:n==="kebab"?r.jsx(V7,{}):r.jsxs(r.Fragment,{children:["Actions",r.jsx(Z7,{})]})}),c?un.createPortal(r.jsxs("div",{ref:l,role:"menu",style:h,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("button",{type:"button",onClick:()=>{u(!1),t(e)},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50",children:"Edit"}),r.jsx("button",{type:"button",disabled:d,onClick:()=>void p(),className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50 disabled:opacity-60",children:O7(e)})]}),document.body):null]})}function V7(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.6"})]})}function Z7(){return r.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function qo({active:e,variant:t="filled",activeLabel:n="Active",inactiveLabel:s="Inactive"}){const a=t==="outline"?e?"border border-emerald-200 bg-white text-emerald-700":"border border-slate-200 bg-slate-50 text-slate-500":e?"bg-emerald-50 text-emerald-700":"bg-red-50 text-red-600",i=e?"bg-emerald-500":t==="outline"?"bg-slate-400":"bg-red-500";return r.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium ${a}`,children:[r.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${i}`}),e?n:s]})}function U7({entity:e,selected:t,onEdit:n,onSelect:s}){const[a,i]=x.useState(!1),o=cs(e),l=fs(e),c=e.accountType==="Individual",u=c?"SSN":"EIN";return r.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,onClick:s?()=>s(e):void 0,onKeyDown:s?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),s(e))}:void 0,className:`rounded-xl border bg-white p-5 shadow-sm transition ${t?"border-gov-400 ring-1 ring-gov-200":"border-slate-200"} ${s?"cursor-pointer hover:border-gov-300 hover:shadow-md":""}`,children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[r.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gov-50 text-sm font-semibold text-gov-700",children:kp(o)}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"truncate text-base font-bold text-slate-900",children:o}),r.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[r.jsx(qo,{active:l}),r.jsx("span",{className:"text-xs text-slate-500",children:e.accountType})]})]})]}),r.jsx("div",{onClick:d=>d.stopPropagation(),children:r.jsx(q7,{variant:"kebab",entity:e,onEdit:n})})]}),r.jsx("div",{className:"my-4 h-px bg-slate-200"}),r.jsxs("ul",{className:"space-y-3 text-sm text-slate-700",children:[r.jsx(Es,{label:"Email ID",icon:r.jsx(Y7,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:e.email||"—"})}),r.jsx(Es,{label:"Phone Number",icon:r.jsx(H7,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:_r(e.phoneNumber)||"—"})}),r.jsxs(Es,{label:`${u} Number`,icon:r.jsx(W7,{}),children:[r.jsx("span",{className:"shrink-0 whitespace-nowrap",children:a?$n(e.idNumber,e.accountType):Hr(e.idNumber,e.accountType)}),r.jsx("button",{type:"button","aria-label":a?`Hide ${u}`:`Show ${u}`,onClick:d=>{d.stopPropagation(),i(m=>!m)},className:"shrink-0 text-slate-400 transition hover:text-slate-600",children:a?r.jsx(Fo,{}):r.jsx(am,{})})]}),c?null:r.jsx(Es,{label:"Business Type",icon:r.jsx(K7,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:e.entityType||"—"})})]})]})}function Es({label:e,icon:t,children:n}){return r.jsxs("li",{className:"group/row relative flex flex-nowrap items-center gap-3 w-max",children:[r.jsx(B7,{label:e}),r.jsxs("span",{className:"sr-only",children:[e,":"]}),r.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-slate-400",children:t}),n]})}function B7({label:e}){return r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-full left-0 z-20 mb-2 w-max rounded-md bg-slate-700 px-2.5 py-1.5 text-xs font-medium text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover/row:opacity-100",children:[e,r.jsx("span",{className:"absolute left-3 top-full h-0 w-0 border-x-4 border-t-4 border-x-transparent border-t-slate-700"})]})}function Y7(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",children:r.jsx("path",{d:"M13.8345 2.4998L7.83998 6.31742C7.63656 6.43555 7.40551 6.49777 7.17026 6.49777C6.93502 6.49777 6.70396 6.43555 6.50054 6.31742L0.500061 2.4998M1.8335 0.5H12.501C13.2375 0.5 13.8345 1.09689 13.8345 1.8332V9.8324C13.8345 10.5687 13.2375 11.1656 12.501 11.1656H1.8335C1.09706 11.1656 0.500061 10.5687 0.500061 9.8324V1.8332C0.500061 1.09689 1.09706 0.5 1.8335 0.5Z",stroke:"#8E8E92","stroke-linecap":"round"})})}function H7(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[r.jsx("g",{"clip-path":"url(#clip0_953_35331)",children:r.jsx("path",{d:"M9.66126 11.0858C9.51426 11.1225 9.35913 11.108 9.22143 11.0448C7.36957 10.1359 5.87095 8.63919 4.95976 6.78847C4.89228 6.65004 4.87479 6.49252 4.91028 6.34267C4.94577 6.19281 5.03204 6.05986 5.15444 5.9664L5.46647 5.73238C5.63207 5.60818 5.76649 5.44712 5.85907 5.26196C5.95164 5.07681 5.99984 4.87264 5.99984 4.66563V2.66547C5.99984 2.31182 5.85935 1.97266 5.60929 1.72259C5.35922 1.47252 5.02005 1.33203 4.6664 1.33203H2.66624C2.31259 1.33203 1.97343 1.47252 1.72336 1.72259C1.47329 1.97266 1.3328 2.31182 1.3328 2.66547C1.3328 5.84832 2.59719 8.90082 4.8478 11.1514C7.09842 13.402 10.1509 14.6664 13.3338 14.6664C13.6874 14.6664 14.0266 14.5259 14.2766 14.2759C14.5267 14.0258 14.6672 13.6866 14.6672 13.333V11.3328C14.6672 10.9792 14.5267 10.64 14.2766 10.3899C14.0266 10.1399 13.6874 9.99939 13.3338 9.99939H11.3336C11.1266 9.99939 10.9224 10.0476 10.7373 10.1402C10.5521 10.2327 10.3911 10.3672 10.2669 10.5328L10.0302 10.8428C9.93838 10.9634 9.80827 11.0491 9.66126 11.0858Z",stroke:"#8E8E92","stroke-linecap":"round"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_953_35331",children:r.jsx("rect",{width:"16",height:"16",fill:"white"})})})]})}function W7(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[r.jsx("path",{d:"M14.5271 2.25781H1.47294C0.649906 2.25781 0 2.92625 0 3.73075V12.2662C0 13.0892 0.668437 13.7391 1.47294 13.7391H14.5271C15.3501 13.7391 16 13.0706 16 12.2661V3.73075C16 2.90769 15.3316 2.25781 14.5271 2.25781ZM15.0625 12.2661C15.0625 12.5616 14.8232 12.8016 14.5271 12.8016H1.47294C1.17744 12.8016 0.9375 12.5622 0.9375 12.2661V3.73075C0.9375 3.43525 1.17681 3.19531 1.47294 3.19531H14.5271C14.8226 3.19531 15.0625 3.43462 15.0625 3.73075V12.2661Z",fill:"#8E8E92"}),r.jsx("path",{d:"M6.27309 8.14438C6.54547 7.83941 6.71144 7.4375 6.71144 6.99741C6.71144 6.04681 5.93806 5.27344 4.98747 5.27344C4.03688 5.27344 3.26353 6.04681 3.26353 6.99741C3.26353 7.4375 3.4295 7.83941 3.70184 8.14434C2.988 8.57953 2.51038 9.3655 2.51038 10.2609C2.51038 10.5198 2.72025 10.7297 2.97913 10.7297H6.99578C7.25466 10.7297 7.46453 10.5198 7.46453 10.2609C7.46453 9.3655 6.98691 8.57956 6.27309 8.14438ZM4.98747 6.21094C5.42113 6.21094 5.77394 6.56375 5.77394 6.99741C5.77394 7.43106 5.42113 7.78387 4.98747 7.78387C4.55381 7.78387 4.20103 7.43106 4.20103 6.99741C4.20103 6.56375 4.55381 6.21094 4.98747 6.21094ZM3.52081 9.79222C3.71956 9.17178 4.30191 8.72137 4.98747 8.72137C5.67303 8.72137 6.25534 9.17175 6.45413 9.79222H3.52081Z",fill:"#8E8E92"}),r.jsx("path",{d:"M13.0208 5.77734H9.50623C9.24735 5.77734 9.03748 5.98722 9.03748 6.24609C9.03748 6.50497 9.24735 6.71484 9.50623 6.71484H13.0208C13.2797 6.71484 13.4896 6.50497 13.4896 6.24609C13.4896 5.98722 13.2797 5.77734 13.0208 5.77734Z",fill:"#8E8E92"}),r.jsx("path",{d:"M13.0208 7.78516H9.50623C9.24735 7.78516 9.03748 7.99503 9.03748 8.25391C9.03748 8.51278 9.24735 8.72266 9.50623 8.72266H13.0208C13.2797 8.72266 13.4896 8.51278 13.4896 8.25391C13.4896 7.99503 13.2797 7.78516 13.0208 7.78516Z",fill:"#8E8E92"}),r.jsx("path",{d:"M12.0166 9.79297H9.50623C9.24735 9.79297 9.03748 10.0028 9.03748 10.2617C9.03748 10.5206 9.24735 10.7305 9.50623 10.7305H12.0166C12.2755 10.7305 12.4854 10.5206 12.4854 10.2617C12.4854 10.0028 12.2755 9.79297 12.0166 9.79297Z",fill:"#8E8E92"})]})}function K7(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:r.jsx("path",{d:"M10.6669 13.332V2.66536C10.6669 2.31174 10.5264 1.9726 10.2763 1.72256C10.0263 1.47251 9.68709 1.33203 9.33344 1.33203H6.66656C6.31291 1.33203 5.97375 1.47251 5.72368 1.72256C5.47361 1.9726 5.33312 2.31174 5.33312 2.66536V13.332M2.66624 3.9987H13.3338C14.0702 3.9987 14.6672 4.59565 14.6672 5.33203V11.9987C14.6672 12.7351 14.0702 13.332 13.3338 13.332H2.66624C1.9298 13.332 1.3328 12.7351 1.3328 11.9987V5.33203C1.3328 4.59565 1.9298 3.9987 2.66624 3.9987Z",stroke:"#8E8E92","stroke-linecap":"round"})})}const Os="All";function Q7({value:e,onChange:t}){const[n,s]=x.useState(!1),a=x.useRef(null),i=e!==Os;return x.useEffect(()=>{if(!n)return;const o=c=>{var u;(u=a.current)!=null&&u.contains(c.target)||s(!1)},l=c=>{c.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",o),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("keydown",l)}},[n]),r.jsxs("div",{ref:a,className:"relative",children:[r.jsxs("button",{type:"button","aria-label":i?`Filter by entity type: ${e}`:"Filter by entity type","aria-haspopup":"menu","aria-expanded":n,onClick:()=>s(o=>!o),className:`relative inline-flex h-10 w-10 items-center justify-center rounded-lg border transition ${i?"border-gov-300 bg-gov-50 text-gov-700":"border-slate-200 bg-white text-slate-500 hover:bg-slate-50"}`,children:[r.jsx(G7,{}),i?r.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-gov-700"}):null]}),n?r.jsxs("div",{role:"menu",className:"absolute right-0 z-20 mt-2 w-52 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("p",{className:"px-4 py-2 text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Entity Type"}),Tp.map(o=>r.jsxs("button",{type:"button",onClick:()=>{t(o),s(!1)},className:`flex w-full items-center justify-between px-4 py-2 text-left text-sm transition hover:bg-slate-50 ${o===e?"font-semibold text-gov-700":"text-slate-700"}`,children:[o,o===e?r.jsx(J7,{}):null]},o))]}):null]})}function G7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M7 12h10M10 17h4"})})}function J7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}const X7={primary:"bg-brand-600 text-white hover:bg-brand-700 focus-visible:ring-brand-500 disabled:bg-brand-600/60",secondary:"border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 focus-visible:ring-slate-400",ghost:"text-slate-600 hover:bg-slate-100 focus-visible:ring-slate-400"};function _7({variant:e="primary",isLoading:t=!1,className:n="",children:s,disabled:a,...i}){return r.jsx("button",{type:"button",className:`inline-flex h-10 items-center justify-center rounded-lg px-4 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed ${X7[e]} ${n}`,disabled:a||t,...i,children:t?"Please wait…":s})}const $7=[10,20,50,100];function e3(e,t){const n=e.trim();if(!/^\d+$/.test(n))return null;const s=Number(n);return!Number.isInteger(s)||s<1||s>t?null:s}function t3(){return r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M12.5 4.5 7 10l5.5 5.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function n3(){return r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M7.5 4.5 13 10l-5.5 5.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function La({page:e,pageSize:t,totalCount:n,onPageChange:s,onPageSizeChange:a,pageSizeOptions:i=$7,disabled:o=!1,className:l=""}){const c=t>0?Math.max(1,Math.ceil(n/t)):1,u=n===0?0:c,d=e>1,m=u>0&&e<u,h=n===0?0:(e-1)*t+1,f=Math.min(e*t,n),[g,p]=x.useState(String(e)),v=x.useRef(g);v.current=g,x.useEffect(()=>{p(String(e))},[e]);function y(S=v.current){if(o||u===0){p(String(e));return}const A=e3(S,u);if(A===null){p(String(e));return}if(A===e){p(String(e));return}s(A)}function b(S){S.key==="Enter"&&(S.preventDefault(),y(S.currentTarget.value))}return n===0?null:r.jsxs("div",{className:`flex flex-wrap items-center justify-between gap-3 border-t border-slate-200 bg-white px-6 py-3 ${l}`,children:[r.jsxs("p",{className:"text-sm text-slate-500",children:["Showing ",r.jsx("span",{className:"font-medium text-slate-700",children:h}),"–",r.jsx("span",{className:"font-medium text-slate-700",children:f})," of ",r.jsx("span",{className:"font-medium text-slate-700",children:n})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("span",{className:"whitespace-nowrap",children:"Rows per page"}),r.jsx(we,{size:"sm",ariaLabel:"Rows per page",placeholder:String(t),value:String(t),disabled:o,onChange:S=>a(Number(S)),options:i.map(S=>({value:String(S),label:String(S)}))})]}):null,r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{type:"button",disabled:o||!d,onClick:()=>s(e-1),"aria-label":"Previous page",className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-700 transition hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",children:r.jsx(t3,{})}),r.jsx("span",{className:"min-w-[5.5rem] text-center text-sm text-slate-600",children:u===0?"—":`Page ${e} of ${u}`}),r.jsx("button",{type:"button",disabled:o||!m,onClick:()=>s(e+1),"aria-label":"Next page",className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-700 transition hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",children:r.jsx(n3,{})})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("label",{htmlFor:"pagination-go-to-page",className:"whitespace-nowrap text-sm text-slate-600",children:"Go to page"}),r.jsx("input",{id:"pagination-go-to-page",type:"text",inputMode:"numeric",pattern:"[0-9]*",value:g,disabled:o||u===0,onChange:S=>p(S.target.value),onKeyDown:b,"aria-label":"Go to page number",className:"h-9 w-14 rounded-lg border border-slate-200 bg-white px-2 text-center text-sm text-slate-900 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:opacity-60"}),r.jsx(_7,{type:"button",variant:"secondary",disabled:o||u===0,className:"h-9 px-3",onMouseDown:S=>{S.preventDefault()},onClick:()=>y(),children:"Go"})]})]})]})}const r3=[{id:"all",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}];function s3(e,t){const n=t.toLowerCase();return cs(e).toLowerCase().includes(n)||(e.email??"").toLowerCase().includes(n)||(e.idNumber??"").toLowerCase().includes(n)}function Vo(){const{selectedEntity:e,setSelectedEntityId:t}=Yt(),n=Pe(),[s,a]=x.useState(""),[i,o]=x.useState(""),[l,c]=x.useState("all"),[u,d]=x.useState(Os),[m,h]=x.useState(1),[f,g]=x.useState(Fn);x.useEffect(()=>{const M=window.setTimeout(()=>o(s.trim()),300);return()=>window.clearTimeout(M)},[s]),x.useEffect(()=>{h(1)},[i,l,u,f]);const{data:p=[],isLoading:v,isFetching:y,isError:b}=ce({queryKey:["entities","mine"],queryFn:io}),S=x.useMemo(()=>p.filter(M=>i&&!s3(M,i)||l!=="all"&&fs(M)!==(l==="active")?!1:u===Os||M.entityType===u),[p,i,l,u]),A=S.length,w=S.slice((m-1)*f,m*f),k=b?"Unable to load entities.":v?"Loading entities…":S.length===0?i?"No entities match your search.":u!==Os?`No ${u} entities${l==="all"?"":` that are ${l}`}.`:l==="all"?"No entities yet.":`No ${l} entities.`:null;return r.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"All Entities"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Manage tax payments and filings for each entity."})]}),r.jsx("button",{type:"button",onClick:()=>n("/create-entity/form",{state:{from:"/entities"}}),className:"inline-flex shrink-0 items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Entity"})]}),r.jsxs("div",{className:"relative rounded-2xl border border-slate-200 bg-white p-6",children:[y?r.jsx(Ia,{label:"Loading entities…"}):null,r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-slate-200",children:[r.jsx("div",{className:"flex items-center gap-6",children:r3.map(M=>{const O=l===M.id;return r.jsx("button",{type:"button",onClick:()=>c(M.id),className:`-mb-px border-b-2 pb-3 text-sm transition ${O?"border-gov-600 font-semibold text-gov-600":"border-transparent text-slate-600 hover:text-slate-900"}`,children:M.label},M.id)})}),r.jsxs("div",{className:"flex items-center gap-2 pb-3",children:[r.jsxs("div",{className:"relative",children:[r.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:r.jsx(a3,{})}),r.jsx("input",{type:"search",value:s,onChange:M=>a(M.target.value),placeholder:"Search","aria-label":"Search entities by name, email or EIN",className:"h-10 w-full rounded-lg border border-slate-200 bg-white pl-9 pr-3 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 sm:w-64"})]}),r.jsx(Q7,{value:u,onChange:d})]})]}),k?r.jsx("p",{className:"py-16 text-center text-sm text-slate-500",children:k}):r.jsx("div",{className:"mt-6 grid gap-5 sm:grid-cols-2 xl:grid-cols-3",children:w.map(M=>r.jsx(U7,{entity:M,selected:M.entityId===(e==null?void 0:e.entityId),onEdit:O=>n(`/entities/${O.entityId}/edit`,{state:{from:"/entities"}}),onSelect:O=>{t(O.entityId),n("/dashboard")}},M.entityId))}),A>f?r.jsx(La,{page:m,pageSize:f,totalCount:A,onPageChange:h,onPageSizeChange:g,disabled:v||y}):null]})]})}function a3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-4.35-4.35M17 10.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0z"})})}function Zo(e){return he(`/portal/federal-payments/${e}`)}function i3(e){return he(`/portal/federal-payments/form-types?entityId=${e}`)}function Am(e){const t=new URLSearchParams({formType:e});return he(`/portal/federal-payments/tax-type-codes?${t.toString()}`)}function Uo(e){return he("/portal/federal-payments",{method:"POST",body:e})}function Bo(e,t){return he(`/portal/federal-payments/${e}`,{method:"PATCH",body:t})}function km(e){return he(`/portal/federal-payments/${e}/submit`,{method:"POST"})}function o3(e){return os(`/portal/federal-payments/${e}/pdf`,{responseType:"blob"})}function l3(e){return os(`/portal/state-payments/${e}/pdf`,{responseType:"blob"})}function c3(e){return os(`/portal/federal-payments/${e}/pdf-html`,{responseType:"text"})}function u3(e){return os(`/portal/state-payments/${e}/pdf-html`,{responseType:"text"})}function Ec({entityId:e,status:t,category:n="all",pageNumber:s=1,pageSize:a=Fn}){const i=new URLSearchParams({entityId:String(e),pageNumber:String(s),pageSize:String(a)});return t&&i.set("status",t),n&&n!=="all"?i.set("category",n):n==="all"&&i.set("category","all"),he(`/portal/remittance-payments?${i}`)}function d3(e,t="all"){const n=new URLSearchParams({entityId:String(e)});return t&&n.set("category",t),he(`/portal/remittance-payments/status-counts?${n}`)}function Pm(e){return he("/portal/state-payments/states",{signal:e})}function Yo(e,t,n){const s=new URLSearchParams({entityId:String(e),state:t});return he(`/portal/state-payments/payment-reasons?${s}`,{signal:n})}function Ho(e,t,n,s){const a=new URLSearchParams({entityId:String(e),state:t,reason:n});return he(`/portal/state-payments/validation-metadata?${a}`,{signal:s})}function m3(e,t,n,s){const a=new URLSearchParams({entityId:String(e),state:t,reason:n});return he(`/portal/state-payments/form-references?${a}`,{signal:s})}function h3(e,t,n,s,a,i){const o=new URLSearchParams({entityId:String(e),state:t,reason:n,frequencyCode:s,taxYear:String(a)});return he(`/portal/state-payments/tax-periods?${o}`,{signal:i})}function Em(e){return he(`/portal/state-payments/${e}`)}function f3(e){return he("/portal/state-payments",{method:"POST",body:e})}function p3(e,t){return he(`/portal/state-payments/${e}`,{method:"PATCH",body:t})}function Im(e,t){return he(`/portal/state-payments/${e}/submit`,{method:"POST",body:t??null})}function x3({open:e,title:t,html:n,isLoading:s=!1,error:a=null,downloadFileName:i="payment.pdf",onDownload:o,onClose:l}){const[c,u]=x.useState(!1);x.useEffect(()=>{if(!e)return;const m=h=>{h.key==="Escape"&&l()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,l]);const d=async()=>{if(!(!o||c)){u(!0);try{const m=await o(),h=URL.createObjectURL(m),f=document.createElement("a");f.href=h,f.download=i,document.body.appendChild(f),f.click(),document.body.removeChild(f),setTimeout(()=>URL.revokeObjectURL(h),1e3)}finally{u(!1)}}};return e?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:l}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"payment-pdf-title",className:"relative flex h-[90vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl bg-white shadow-xl",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-slate-200 px-5 py-4",children:[r.jsx("h2",{id:"payment-pdf-title",className:"text-base font-semibold text-slate-900",children:t}),r.jsxs("div",{className:"flex items-center gap-2",children:[o?r.jsx("button",{type:"button",onClick:()=>void d(),disabled:c||s||!!a,className:"rounded-lg border border-gov-200 bg-gov-50 px-3 py-1.5 text-sm font-medium text-gov-600 hover:bg-gov-100 disabled:opacity-60",children:c?"Downloading…":"Download"}):null,r.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-600 hover:bg-slate-50",children:"Close"})]})]}),r.jsx("div",{className:"flex-1 overflow-hidden bg-white",children:s?r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-slate-500",children:"Loading…"}):a?r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-red-600",children:a}):n?r.jsx("iframe",{title:t,srcDoc:n,sandbox:"",className:"h-full w-full border-0 bg-white"}):r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-slate-500",children:"No content available."})})]})]}):null}function g3({onClick:e,disabled:t=!1,children:n}){return r.jsx("button",{type:"button",onClick:e,disabled:t,className:"rounded-md border border-gov-200 bg-white px-3 py-1.5 text-xs font-medium text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60",children:n})}function ei({onView:e,onEdit:t,button:n}){return r.jsxs("div",{className:"flex items-center gap-3",children:[e?r.jsx("button",{type:"button",onClick:e,"aria-label":"View payment",title:"View",className:"text-slate-400 transition hover:text-slate-600",children:r.jsx(Fo,{})}):null,t?r.jsx("button",{type:"button",onClick:t,"aria-label":"Edit payment",title:"Edit",className:"text-slate-400 transition hover:text-slate-600",children:r.jsx(y3,{})}):null,n?r.jsx(g3,{onClick:n.onClick,disabled:n.disabled,children:n.label}):null]})}function y3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zM19.5 15v4.125A1.875 1.875 0 0117.625 21H4.875A1.875 1.875 0 013 19.125V6.375A1.875 1.875 0 014.875 4.5H9"})})}const b3=152;function v3(e){const{actionType:t,onView:n,onViewPdf:s,onEdit:a,onSubmit:i,onResubmit:o}=e,l={label:e.isViewPdfLoading?"Loading PDF…":"View PDF",onSelect:s,disabled:e.isViewPdfLoading};return t==="draft-actions"?[{label:"View",onSelect:n},{label:"Edit",onSelect:a},{label:e.isSubmitting?"Submitting…":"Submit",onSelect:i,disabled:e.isSubmitting}]:t==="view-pdf"?[l]:t==="rejected-actions"?[{label:"View",onSelect:n},l,{label:"Re-Submit",onSelect:o,tone:"danger"}]:[{label:"View",onSelect:n},l]}function C3(e){const[t,n]=x.useState(!1),s=x.useRef(null),a=x.useRef(null),i=x.useCallback(()=>n(!1),[]),o=Gu({open:t,anchorRef:s,layerRef:a,onDismiss:i,width:b3,align:"end",gap:4}),l=v3(e);return r.jsxs("div",{ref:s,className:"relative flex justify-end",children:[r.jsx("button",{type:"button",onClick:()=>n(c=>!c),"aria-label":"Payment actions","aria-haspopup":"menu","aria-expanded":t,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(j3,{})}),t&&o?un.createPortal(r.jsx("div",{ref:a,role:"menu",style:o,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:l.map(c=>r.jsx("button",{type:"button",role:"menuitem",disabled:c.disabled,onClick:()=>{var u;n(!1),(u=c.onSelect)==null||u.call(c)},className:`block w-full px-4 py-2 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-60 ${c.tone==="danger"?"text-red-600 hover:bg-red-50":"text-slate-700 hover:bg-slate-50"}`,children:c.label},c.label))}),Ju(s.current)):null]})}function j3(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"10",cy:"4.5",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"15.5",r:"1.5"})]})}const w3={drafts:"bg-slate-100 text-slate-600",scheduled:"bg-amber-50 text-amber-700",submitted:"bg-orange-50 text-orange-700",rejected:"bg-red-50 text-red-600",paid:"bg-emerald-50 text-emerald-700"};function N3(e,t){switch(e){case"drafts":return"Draft";case"scheduled":return"Scheduled";case"submitted":return t==="federal"?"Submitted to Federal":"Submitted to State";case"rejected":return"Failed";case"paid":return"Paid"}}function S3({status:e,category:t}){const n=um(e);return r.jsx("span",{className:`inline-flex rounded-full px-2.5 py-1 text-xs font-medium ${w3[n]}`,children:N3(n,t)})}function A3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsx("path",{d:"M9.375 1.25H3.75C3.41848 1.25 3.10054 1.3817 2.86612 1.61612C2.6317 1.85054 2.5 2.16848 2.5 2.5V12.5C2.5 12.8315 2.6317 13.1495 2.86612 13.3839C3.10054 13.6183 3.41848 13.75 3.75 13.75H11.25C11.5815 13.75 11.8995 13.6183 12.1339 13.3839C12.3683 13.1495 12.5 12.8315 12.5 12.5V4.375L9.375 1.25Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M8.75 1.25V3.75C8.75 4.08152 8.8817 4.39946 9.11612 4.63388C9.35054 4.8683 9.66848 5 10 5H12.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M6.25 5.625H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M10 8.125H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M10 10.625H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function k3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#scheduled-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 3.75V7.5L10 8.75",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"scheduled-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}function P3({className:e,...t}){return r.jsx("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:r.jsx("path",{d:"M0 10V0L11.875 5L0 10ZM1.25 8.125L8.65625 5L1.25 1.875V4.0625L5 5L1.25 5.9375V8.125Z",fill:"currentColor"})})}function E3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#rejected-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 5V7.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 10H7.50625",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"rejected-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}function I3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#paid-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M5.625 7.5L6.875 8.75L9.375 6.25",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"paid-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}const Tm=[{key:"all",label:"All"},{key:"drafts",label:"Draft",Icon:A3,iconClassName:"text-gray-500"},{key:"scheduled",label:"Scheduled",Icon:k3,iconClassName:"text-yellow-500"},{key:"submitted",label:"Submitted to Fed/State",Icon:P3,iconClassName:"text-[#FF733D]"},{key:"rejected",label:"Rejected",Icon:E3,iconClassName:"text-red-500"},{key:"paid",label:"Paid",Icon:I3,iconClassName:"text-green-500"}],T3={all:"default",drafts:"draft",scheduled:"view-action",submitted:"view-action",rejected:"rejected",paid:"view-action"},Ic=["Jurisdiction / Type","Period","Amount","Settlement Date","Status","Form Type"],L3={default:Ic,"view-action":[...Ic,"Actions"],draft:["ID","Jurisdiction / Type","Period","Amount","Settlement Date","Form Type","Actions"],rejected:["ID","Jurisdiction / Type","Period","Amount","Form Type","Rejected Date","Reason for Reject","Actions"]},F3={all:"No payments to display yet.",drafts:"No draft payments to display yet.",scheduled:"No scheduled payments to display yet.",submitted:"No submitted to fed/state payments to display yet.",rejected:"No rejected payments to display yet.",paid:"No paid payments to display yet."},R3={drafts:"draft-actions",scheduled:"view-pdf",submitted:"view-link",rejected:"rejected-actions",paid:"view-link"},xn="px-6 py-4 text-slate-700";function M3(e){return e.referenceNo==="—"?`#${e.id}`:e.referenceNo}function D3({row:e,layout:t,isSubmitting:n,isViewPdfLoading:s,onView:a,onEdit:i,onViewPdf:o,onSubmit:l}){const c=t==="draft"||t==="rejected";return r.jsxs("tr",{className:"border-b border-slate-100 last:border-0",children:[c?r.jsx("td",{className:xn,children:M3(e)}):null,r.jsx("td",{className:xn,children:e.jurisdiction}),r.jsx("td",{className:xn,children:e.period}),r.jsx("td",{className:"px-6 py-4 font-semibold text-slate-900",children:Mo(e.amount)}),t==="rejected"?r.jsxs(r.Fragment,{children:[r.jsx("td",{className:xn,children:e.formType}),r.jsx("td",{className:xn,children:e.paymentDate}),r.jsx("td",{className:xn,children:e.reason??"—"})]}):r.jsxs(r.Fragment,{children:[r.jsx("td",{className:xn,children:e.paymentDate}),t==="draft"?null:r.jsx("td",{className:"px-6 py-4",children:r.jsx(S3,{status:e.status,category:e.category})}),r.jsx("td",{className:xn,children:e.formType})]}),r.jsx("td",{className:"px-6 py-4",children:t==="draft"?r.jsx(ei,{onView:a,onEdit:i,button:{label:n?"Submitting…":"Submit & Pay",onClick:l,disabled:n}}):t==="rejected"?r.jsx(ei,{onView:a,button:{label:"Re-Submit",onClick:i}}):t==="view-action"?r.jsx(ei,{button:{label:"View",onClick:a}}):r.jsx(C3,{actionType:R3[e.tab],onView:a,onViewPdf:o,onEdit:i,onSubmit:l,onResubmit:i,isSubmitting:n,isViewPdfLoading:s})})]})}function O3(e){return[e.jurisdiction,e.formType,`Tax ${e.period}`].filter(t=>t&&t!=="—").join(" · ")}function z3({rows:e,onViewAll:t,onView:n,onResubmit:s}){const[a,i]=x.useState(0);if(x.useEffect(()=>{i(c=>c<e.length?c:0)},[e.length]),e.length===0)return null;const o=e[Math.min(a,e.length-1)],l=c=>i(u=>(u+c+e.length)%e.length);return r.jsxs("section",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900",children:[r.jsx(q3,{}),"Need Attention"]}),r.jsx("button",{type:"button",onClick:t,className:"text-xs font-medium text-gov-600 transition hover:text-gov-700",children:"View All"})]}),r.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[r.jsx(Tc,{direction:"previous",disabled:e.length<2,onClick:()=>l(-1)}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center justify-between gap-3 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[Mo(o.amount)," Payment Rejected"]}),r.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:O3(o)})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",onClick:()=>n(o),className:"rounded-md border border-gov-200 bg-white px-3 py-1.5 text-xs font-medium text-gov-600 transition hover:bg-gov-50",children:"View"}),r.jsx("button",{type:"button",onClick:()=>s(o),className:"rounded-md bg-red-500 px-3 py-1.5 text-xs font-semibold text-white transition hover:bg-red-600",children:"Re-Submit"})]})]}),r.jsx(Tc,{direction:"next",disabled:e.length<2,onClick:()=>l(1)})]}),e.length>1?r.jsx("div",{className:"mt-3 flex items-center justify-center gap-1.5",children:e.map((c,u)=>r.jsx("button",{type:"button","aria-label":`Show rejected payment ${u+1}`,"aria-current":u===a,onClick:()=>i(u),className:`h-1.5 rounded-full transition-all ${u===a?"w-5 bg-gov-700":"w-1.5 bg-slate-300 hover:bg-slate-400"}`},`${c.category}-${c.id}`))}):null]})}function Tc({direction:e,disabled:t,onClick:n}){return r.jsx("button",{type:"button",onClick:n,disabled:t,"aria-label":e==="previous"?"Previous payment":"Next payment",className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-400 transition hover:bg-slate-50 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-50",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="previous"?"M15 19.5L7.5 12l7.5-7.5":"M9 4.5l7.5 7.5L9 19.5"})})})}function q3(){return r.jsx("span",{className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-red-500 text-white",children:r.jsx("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M10 5a1 1 0 011 1v5a1 1 0 01-2 0V6a1 1 0 011-1zm0 8.25a1.15 1.15 0 110 2.3 1.15 1.15 0 010-2.3z"})})})}const V3=5;function Lc(e){return e!==null&&Tm.some(t=>t.key===e)}function Wo({paymentsMode:e="all"}){var ye;const t=Pe(),n=ht(),[s]=mh(),{selectedEntity:a}=yt(),{onPaymentRequired:i}=Yt(),o=(a==null?void 0:a.entityId)??null,l=s.get("tab"),[c,u]=x.useState(Lc(l)?l:Ta),[d,m]=x.useState(e==="all"?"all":e),h=e!=="all"?e:d,[f,g]=x.useState(1),[p,v]=x.useState(Fn),[y,b]=x.useState(null),[S,A]=x.useState(null),[w,k]=x.useState(null);x.useEffect(()=>{Lc(l)&&u(l)},[l]),x.useEffect(()=>{g(1),v(Fn)},[c,o,d]),x.useEffect(()=>{g(1)},[p]);const M=ce({queryKey:["remittance-payments","list",o,c,h,f,p],queryFn:()=>Ec({entityId:o,status:c==="all"?void 0:c,category:h,pageNumber:f,pageSize:p}),enabled:o!==null,placeholderData:V=>V}),O=ce({queryKey:["remittance-payments","need-attention",o,h],queryFn:()=>Ec({entityId:o,status:"rejected",category:h,pageNumber:1,pageSize:V3}),enabled:o!==null}),Z=ce({queryKey:["remittance-payments","status-counts",o,h],queryFn:()=>d3(o,h),enabled:o!==null}),_=M.isLoading,F=M.isFetching,W=o!==null&&F,H=x.useMemo(()=>{var me,q,fe,be,Ye;const V={drafts:((me=Z.data)==null?void 0:me.drafts)??0,scheduled:((q=Z.data)==null?void 0:q.scheduled)??0,submitted:((fe=Z.data)==null?void 0:fe.submitted)??0,rejected:((be=Z.data)==null?void 0:be.rejected)??0,paid:((Ye=Z.data)==null?void 0:Ye.paid)??0};return{...V,all:Object.values(V).reduce((ue,ve)=>ue+ve,0)}},[Z.data]),ee=x.useMemo(()=>{var V;return(((V=M.data)==null?void 0:V.items)??[]).map(Cc)},[M.data]),z=x.useMemo(()=>{var V;return(((V=O.data)==null?void 0:V.items)??[]).map(Cc)},[O.data]),re=((ye=M.data)==null?void 0:ye.totalCount)??0,te=nf({mutationFn:async V=>{try{V.category==="federal"?await km(V.id):await Im(V.id)}catch(me){if(me instanceof dn&&me.status===402&&i){const q=me.extensions,fe={paymentType:(q==null?void 0:q.paymentType)??V.category,paymentId:(q==null?void 0:q.paymentId)??V.id,expectedAmount:(q==null?void 0:q.expectedAmount)??"0.00",currency:(q==null?void 0:q.currency)??"USD",federalRecordCount:(q==null?void 0:q.federalRecordCount)??0,stateRecordCount:(q==null?void 0:q.stateRecordCount)??0,feePerFederal:(q==null?void 0:q.feePerFederal)??null,feePerState:(q==null?void 0:q.feePerState)??null};i(fe);return}throw me}},onSuccess:async()=>{await n.invalidateQueries({queryKey:["remittance-payments"]}),await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["federal-payments"]}),await n.invalidateQueries({queryKey:["state-payments"]})},onError:()=>b(null),onSettled:()=>b(null)});x.useEffect(()=>{const V=async()=>{await n.invalidateQueries({queryKey:["remittance-payments"]}),await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["federal-payments"]}),await n.invalidateQueries({queryKey:["state-payments"]})};return window.addEventListener(Wi,V),()=>window.removeEventListener(Wi,V)},[n]);const ne=V=>{t(jm(V.category,V.id))},J=V=>{t(Cm(V.category,V.id))},Ne=V=>{if(V.category==="state"&&!V.isAuthorized){J(V);return}b(`${V.category}-${V.id}`),te.mutate(V)},ae=async V=>{const me=`${V.category}-${V.id}`,q=`payment-${V.referenceNo}.pdf`;A(me),k({title:`Payment PDF — ${V.referenceNo}`,html:null,category:V.category,paymentId:V.id,downloadFileName:q,isLoading:!0,error:null});try{const fe=V.category==="federal"?await c3(V.id):await u3(V.id);k({title:`Payment PDF — ${V.referenceNo}`,html:fe,category:V.category,paymentId:V.id,downloadFileName:q,isLoading:!1,error:null})}catch(fe){k({title:`Payment PDF — ${V.referenceNo}`,html:null,category:V.category,paymentId:V.id,downloadFileName:q,isLoading:!1,error:tt(fe,"Unable to load payment PDF.")})}finally{A(null)}},ge=async()=>{if(!w)throw new Error("No payment selected");return w.category==="federal"?o3(w.paymentId):l3(w.paymentId)},Le=()=>k(null),Ie=T3[c],Fe=L3[Ie],Re=Ie==="default"?Fe.length+1:Fe.length;return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold text-slate-900",children:"Tax Payments"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"View, file, and track every tax payment in one place"})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[e!=="state"&&r.jsx("button",{type:"button",onClick:()=>t("/payments/federal/new",{state:{from:"/payments",resetDraft:!0}}),className:"inline-flex items-center rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Federal Payment"}),e!=="federal"&&r.jsx("button",{type:"button",onClick:()=>t("/payments/state/new",{state:{from:"/payments",resetDraft:!0}}),className:"inline-flex items-center rounded-lg border border-gov-600 bg-white px-4 py-2.5 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:"Add State Payment"}),e==="all"&&r.jsx("button",{type:"button",disabled:!0,title:"Coming soon",className:"inline-flex cursor-not-allowed items-center rounded-lg border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm font-semibold text-slate-400",children:"Add Local Payment"})]})]}),r.jsx(z3,{rows:z,onViewAll:()=>{u("rejected"),t(Rn("rejected"),{replace:!0})},onView:ne,onResubmit:J}),r.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[W?r.jsx(Ia,{label:"Loading payments…"}):null,r.jsx("div",{className:"flex flex-wrap gap-1 border-b border-slate-200 px-4 pt-4",children:Tm.map(V=>{const me=c===V.key,q=V.Icon;return r.jsxs("button",{type:"button",onClick:()=>{u(V.key),t(Rn(V.key),{replace:!0})},className:`mb-[-1px] flex items-center gap-2 border-b-2 px-4 py-3 text-sm font-medium transition ${me?"border-gov-600 text-gov-600":"border-transparent text-slate-500 hover:text-slate-700"}`,children:[q?r.jsx(q,{className:`shrink-0 ${V.iconClassName??""}`}):null,V.label," (",H[V.key],")"]},V.key)})}),r.jsx("div",{className:"border-b border-slate-200 px-6 py-4",children:r.jsx("div",{className:"max-w-xs",children:r.jsx(we,{id:"payments-type-filter",label:"Select Payment Type",placeholder:"All",value:d,onChange:m,disabled:e!=="all",options:[{value:"all",label:"All"},{value:"federal",label:"Federal"},{value:"state",label:"State"},{value:"local",label:"Local",disabled:!0,badge:"Coming Soon"}]})})}),r.jsx("div",{className:"overflow-x-auto px-4 pt-4",children:r.jsxs("table",{className:"w-full min-w-[860px] overflow-hidden rounded-xl border border-slate-200 text-left text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-200 bg-slate-50/80 text-sm font-medium text-slate-500",children:[Fe.map(V=>r.jsx("th",{className:"px-6 py-3 font-medium",children:V},V)),Ie==="default"?r.jsx("th",{className:"px-6 py-3",children:r.jsx("span",{className:"sr-only",children:"Actions"})}):null]})}),r.jsx("tbody",{children:_&&!M.data?r.jsx("tr",{children:r.jsx("td",{colSpan:Re,className:"px-6 py-12 text-center text-slate-500",children:"Loading payments…"})}):ee.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:Re,className:"px-6 py-12 text-center text-slate-500",children:F3[c]})}):ee.map(V=>r.jsx(D3,{row:V,layout:Ie,isSubmitting:y===`${V.category}-${V.id}`,isViewPdfLoading:S===`${V.category}-${V.id}`,onView:()=>ne(V),onEdit:()=>J(V),onViewPdf:()=>ae(V),onSubmit:()=>Ne(V)},`${V.category}-${V.id}`))})]})}),r.jsx(La,{page:f,pageSize:p,totalCount:re,onPageChange:g,onPageSizeChange:v,disabled:_||o===null||F})]}),r.jsx(x3,{open:w!==null,title:(w==null?void 0:w.title)??"Payment PDF",html:(w==null?void 0:w.html)??null,downloadFileName:w==null?void 0:w.downloadFileName,isLoading:(w==null?void 0:w.isLoading)??!1,error:(w==null?void 0:w.error)??null,onDownload:w&&!w.error?ge:void 0,onClose:Le})]})}function ar({back:e,draft:t,submit:n}){const s=!!(n&&(n.isSubmitting||n.disabled&&n.blocksDraft!==!1));return r.jsxs("div",{className:"sticky bottom-0 z-20 mt-6 flex flex-wrap items-center justify-between gap-3 border-t border-slate-200 bg-white px-1 py-4",children:[e?r.jsxs("button",{type:"button",onClick:e.onClick,disabled:e.disabled,className:"inline-flex h-11 min-w-[120px] items-center justify-center gap-2 rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:[e.showArrow?r.jsx(U3,{}):null,e.label]}):r.jsx("span",{}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t?r.jsx(Z3,{...t,disabled:t.disabled||s}):null,n?r.jsx("button",{type:n.onClick?"button":"submit",onClick:n.onClick,disabled:n.disabled||n.isSubmitting,className:"inline-flex h-11 min-w-[120px] items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:n.isSubmitting?"Submitting…":n.label}):null]})]})}function Z3({onSave:e,onDiscard:t,isSaving:n=!1,disabled:s=!1}){const[a,i]=x.useState(!1),o=x.useRef(null);x.useEffect(()=>{if(!a)return;const c=d=>{var m;(m=o.current)!=null&&m.contains(d.target)||i(!1)},u=d=>{d.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",u)}},[a]);const l=s||n;return r.jsxs("div",{ref:o,className:"relative",children:[r.jsxs("div",{className:"inline-flex h-11 items-stretch overflow-hidden rounded-lg border border-gov-300 bg-white",children:[r.jsx("button",{type:"button",onClick:e,disabled:l,className:"inline-flex min-w-[120px] items-center justify-center px-5 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:n?"Saving…":"Save as Draft"}),r.jsx("button",{type:"button",onClick:()=>i(c=>!c),disabled:l,"aria-label":"More payment actions","aria-haspopup":"menu","aria-expanded":a,className:"inline-flex w-9 items-center justify-center border-l border-gov-200 text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:r.jsx(B3,{})})]}),a?r.jsx("div",{role:"menu",className:"absolute bottom-[calc(100%+0.5rem)] right-0 z-30 min-w-[170px] overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:r.jsx("button",{type:"button",role:"menuitem",onClick:()=>{i(!1),t()},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 transition hover:bg-slate-50",children:"Discard Payment"})}):null]})}function U3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})})}function B3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function En({title:e,children:t,isFirst:n=!1,headerAction:s}){return r.jsxs("section",{className:n?"":"mt-8 border-t border-slate-100 pt-8",children:[r.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h3",{className:"text-base font-semibold text-gov-600",children:e}),s]}),t]})}function ra(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:r.jsx("path",{d:"M2.23556 11.5817V5.95669H3.36056V11.5817H2.23556ZM6.36056 11.5817V5.95669H7.48556V11.5817H6.36056ZM0 14.2067V13.0817H13.8461V14.2067H0ZM10.4856 11.5817V5.95669H11.6106V11.5817H10.4856ZM0 4.45669V3.38944L6.92306 0L13.8461 3.38944V4.45669H0ZM2.6595 3.33169H11.1866L6.92306 1.26919L2.6595 3.33169Z",fill:"#185BA5"})})}function Lm({open:e,title:t,onClose:n,children:s,footer:a,labelledById:i="side-drawer-title",closeOnEscape:o=!0}){return x.useEffect(()=>{if(!e)return;const l=c=>{c.key==="Escape"&&o&&n()};return document.addEventListener("keydown",l),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",l),document.body.style.overflow=""}},[e,n,o]),e?un.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-slate-900/40",onClick:n}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":i,className:"relative z-10 flex h-full w-full max-w-[640px] flex-col bg-white shadow-xl",children:[r.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-slate-200 px-6 py-4",children:[r.jsx("h2",{id:i,className:"text-lg font-semibold text-slate-900",children:t}),r.jsx("button",{type:"button","aria-label":"Close panel",onClick:n,className:"rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(Y3,{})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:s}),a?r.jsx("div",{className:"flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4",children:a}):null]})]}),document.body):null}function Y3(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}const sa=17,H3=9;function zs(e,t){return e.replace(/\D/g,"").slice(0,t)}const Fm=["Checking","Savings"],W3=mn({accountNumber:U().min(1,"Account number is required").regex(/^\d{1,17}$/,`Account number must be 1 to ${sa} digits`),confirmAccountNumber:U().regex(/^\d{0,17}$/,`Account number must be 1 to ${sa} digits`),routingNumber:U().min(1,"Routing number is required").regex(/^\d{9}$/,"Routing number must be exactly 9 digits"),accountType:vo(Fm,{message:"Account type is required"}),bankName:U().min(1,"Account name is required")});function K3(e){return W3.superRefine((t,n)=>{if(e){if(!t.confirmAccountNumber){n.addIssue({code:"custom",path:["confirmAccountNumber"],message:"Please confirm the account number"});return}t.confirmAccountNumber!==t.accountNumber&&n.addIssue({code:"custom",path:["confirmAccountNumber"],message:"Account numbers do not match"})}})}const Fc={accountNumber:"",confirmAccountNumber:"",routingNumber:"",accountType:"Checking",bankName:""};function Q3(e){return{accountNumber:e.accountNumber,confirmAccountNumber:e.accountNumber,routingNumber:e.routingNumber,accountType:e.accountType==="Savings"?"Savings":"Checking",bankName:e.bankName}}function $r({open:e,entityId:t,account:n=null,onClose:s,onSaved:a}){const i=ht(),{showSuccess:o,showError:l}=ya(),[c,u]=x.useState(null),[d,m]=x.useState(!1),[h,f]=x.useState(!1),g=n!==null,p=x.useMemo(()=>K3(!g),[g]),{control:v,handleSubmit:y,reset:b,formState:{errors:S}}=Xt({resolver:_t(p),defaultValues:Fc});x.useEffect(()=>{e&&(b(n?Q3(n):Fc),f((n==null?void 0:n.isPrimary)??!1),u(null))},[e,n,b]);const A=y(async w=>{if(t){u(null),m(!0);try{const k=n?await Nm(n.bankAccountDetailId,{bankName:w.bankName.trim(),accountNumber:w.accountNumber,routingNumber:w.routingNumber,accountType:w.accountType,isPrimary:h}):await T7({entityId:t,bankName:w.bankName.trim(),accountNumber:w.accountNumber,routingNumber:w.routingNumber,accountType:w.accountType,isPrimary:h});await i.invalidateQueries({queryKey:["bank-accounts",t]}),o(g?"Bank Account Updated Successfully":"Bank Account Added Successfully"),a==null||a(k.bankAccountDetailId),s()}catch(k){const M=tt(k,"Unable to save bank account.");u(M),l("Action Not Completed",M)}finally{m(!1)}}});return r.jsx(Lm,{open:e,title:g?"Edit Bank Account":"Add Bank Account Manually",onClose:s,labelledById:"bank-account-drawer-title",footer:r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:s,disabled:d,className:"inline-flex h-11 min-w-[110px] items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:opacity-60",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>void A(),disabled:d||!t,className:"inline-flex h-11 min-w-[110px] items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:d?"Saving…":"Save"})]}),children:r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"grid gap-x-6 gap-y-5 sm:grid-cols-2",children:[r.jsx(Ee,{name:"accountNumber",control:v,render:({field:w})=>{var k;return r.jsx(Oe,{label:"Account Number",required:!0,placeholder:"Enter account number",inputMode:"numeric",autoComplete:"off",value:w.value,onChange:M=>w.onChange(zs(M.target.value,sa)),onBlur:w.onBlur,error:(k=S.accountNumber)==null?void 0:k.message})}}),g?null:r.jsx(Ee,{name:"confirmAccountNumber",control:v,render:({field:w})=>{var k;return r.jsx(Oe,{label:"Confirm Account Number",required:!0,placeholder:"Re-enter account number",inputMode:"numeric",autoComplete:"off",value:w.value,onChange:M=>w.onChange(zs(M.target.value,sa)),onBlur:w.onBlur,error:(k=S.confirmAccountNumber)==null?void 0:k.message})}}),r.jsx(Ee,{name:"routingNumber",control:v,render:({field:w})=>{var k;return r.jsx(Oe,{label:"Routing Number",required:!0,placeholder:"Enter routing number",inputMode:"numeric",autoComplete:"off",value:w.value,onChange:M=>w.onChange(zs(M.target.value,H3)),onBlur:w.onBlur,error:(k=S.routingNumber)==null?void 0:k.message})}}),r.jsx(Ee,{name:"accountType",control:v,render:({field:w})=>{var k;return r.jsx(we,{id:"bank-account-type",label:"Account Type",required:!0,placeholder:"Select Account Type",value:w.value,onChange:w.onChange,error:(k=S.accountType)==null?void 0:k.message,options:Fm.map(M=>({value:M,label:M}))})}}),r.jsx(Ee,{name:"bankName",control:v,render:({field:w})=>{var k;return r.jsx(Oe,{label:"Account Name",required:!0,placeholder:"Enter account name",value:w.value,onChange:w.onChange,onBlur:w.onBlur,error:(k=S.bankName)==null?void 0:k.message})}})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:h,onChange:w=>f(w.target.checked)}),"Set As Primary Account"]}),c?r.jsx(Ht,{message:c}):null]})})}function Ko({open:e,onClose:t,onAddManually:n}){return x.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t]),e?un.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:t}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"bank-connection-method-title",className:"relative z-10 w-full max-w-[420px] rounded-2xl bg-white p-6 shadow-xl",children:[r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsx("h2",{id:"bank-connection-method-title",className:"text-lg font-semibold text-slate-900",children:"Connect Your Bank Account"}),r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,className:"rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(J3,{})})]}),r.jsxs("div",{className:"mt-5 space-y-3",children:[r.jsxs("div",{className:"relative rounded-xl border border-slate-200 bg-slate-50 p-4",children:[r.jsxs("span",{className:"absolute -top-2.5 right-4 inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-[11px] font-semibold text-slate-500",children:[r.jsx(G3,{}),"Coming Soon"]}),r.jsx("p",{className:"text-sm font-semibold text-slate-400",children:"Connect with Plaid"}),r.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"Securely sign in to your bank using Plaid."})]}),r.jsxs("button",{type:"button",onClick:n,className:"block w-full rounded-xl border border-slate-200 bg-white p-4 text-left transition hover:border-gov-300 hover:bg-gov-50/40",children:[r.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Add Manually"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Enter your bank account details yourself."}),r.jsxs("p",{className:"mt-2 text-xs italic text-slate-500",children:[r.jsx("span",{className:"font-semibold",children:"Note:"})," Payments will not be processed until the deposits are verified."]})]})]})]})]}),document.body):null}function G3(){return r.jsxs("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5V12l3 2"})]})}function J3(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}const X3=12,_3=["January","February","March","April","May","June","July","August","September","October","November","December"];function In(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${s}`}function aa(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const n=Number.parseInt(t[1],10),s=Number.parseInt(t[2],10)-1,a=Number.parseInt(t[3],10),i=new Date(n,s,a);return i.getFullYear()!==n||i.getMonth()!==s||i.getDate()!==a?null:i}function Rm(e=new Date){const t=new Date(e);return e.getHours()>=X3&&t.setDate(t.getDate()+1),t.setHours(0,0,0,0),In(t)}function Mm(e=new Date){const t=new Date(e);return t.setFullYear(t.getFullYear()+1),t.setHours(0,0,0,0),In(t)}function $3(e=18,t=new Date){const n=new Date(t);return n.setFullYear(n.getFullYear()-e),n.setHours(0,0,0,0),In(n)}function e8(e,t,n=new Date){const s=aa(e);if(!s)return!1;const a=new Date(n);return a.setFullYear(a.getFullYear()-t),a.setHours(0,0,0,0),s.setHours(0,0,0,0),s<=a}function t8(e){const t=e.getDay();return t!==0&&t!==6}function Bi(e,t=new Date){if(!t8(e))return!1;const n=In(e);return n>=Rm(t)&&n<=Mm(t)}function Fa(e,t=new Date){const n=aa(e);return n?Bi(n,t):!1}function n8(e,t){return`${_3[t]} ${e}`}function r8(e,t){const n=new Date(e,t,1),s=new Date(e,t+1,0).getDate(),a=n.getDay(),i=[];for(let o=0;o<a;o+=1)i.push(null);for(let o=1;o<=s;o+=1)i.push(new Date(e,t,o));return i}function ia(e){return`XXXX-${e.replace(/\D/g,"").slice(-4)||e.slice(-4)}`}function Qo(e){const[t,n,s]=e.split("-");return!t||!n||!s?e:`${n}/${s}/${t}`}function Yi(e){const t=Number.parseFloat(e);return!e||Number.isNaN(t)?"—":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(t)}function Dm({value:e,onChange:t,entityId:n,bankAccounts:s,isLoading:a=!1,disabled:i=!1,error:o,label:l="Bank Account Number",info:c}){const[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,g]=x.useState(!1),p=x.useRef(null),v=s.find(b=>String(b.bankAccountDetailId)===e);x.useEffect(()=>{if(!u)return;const b=S=>{var A;(A=p.current)!=null&&A.contains(S.target)||d(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[u]);const y=b=>{t(String(b)),g(!1),d(!1)};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:"relative",children:[r.jsx(mo,{label:l,required:!0,info:c}),r.jsxs("button",{type:"button",disabled:i||!n,onClick:()=>d(b=>!b),className:`flex w-full items-center justify-between rounded-lg border bg-white px-3 py-2.5 text-left text-sm transition focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] ${o?"border-red-300":"border-slate-200"}`,children:[r.jsx("span",{className:v?"text-slate-900":"text-slate-400",children:a?"Loading accounts…":v?`${ia(v.accountNumber)}`:"Select bank"}),r.jsx(s8,{className:`shrink-0 text-slate-400 transition ${u?"rotate-180":""}`})]}),o?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:o}):null,u?r.jsxs("div",{className:"absolute left-0 right-0 z-20 mt-2 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsx("div",{className:"max-h-64 overflow-y-auto py-1",children:s.length===0?r.jsx("p",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No bank accounts yet."}):s.map(b=>{const S=String(b.bankAccountDetailId)===e;return r.jsxs("button",{type:"button",onClick:()=>{t(String(b.bankAccountDetailId)),d(!1)},className:`block w-full px-4 py-3 text-left transition hover:bg-slate-50 ${S?"bg-gov-50":""}`,children:[r.jsx("span",{className:"block truncate text-sm font-semibold text-slate-900",children:b.bankName}),r.jsx("span",{className:"mt-0.5 block truncate text-xs text-slate-400",children:ia(b.accountNumber)})]},b.bankAccountDetailId)})}),r.jsxs("button",{type:"button",onClick:()=>{d(!1),h(!0)},className:"flex w-full items-center justify-center gap-2 border-t border-slate-200 px-4 py-3 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:[r.jsx(ra,{}),"Add New Account"]})]}):null]}),r.jsx(Ko,{open:m,onClose:()=>h(!1),onAddManually:()=>{h(!1),g(!0)}}),r.jsx($r,{open:f,entityId:n,onClose:()=>g(!1),onSaved:y})]})}function s8({className:e=""}){return r.jsx("svg",{className:`h-4 w-4 ${e}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function ir({steps:e,current:t,completed:n,className:s=""}){const a=n??t-1;return r.jsx("ol",{className:`flex flex-wrap items-center gap-3 ${s}`,children:e.map((i,o)=>{const l=o+1,c=l<=a,u=l===t;return r.jsxs("li",{className:"flex items-center gap-3",children:[r.jsx("span",{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${c?"bg-gov-700 text-white":u?"border border-gov-500 bg-white text-gov-600":"bg-slate-100 text-slate-400"}`,children:c?r.jsx(a8,{}):String(l).padStart(2,"0")}),r.jsx("span",{className:c||u?"text-sm font-semibold text-gov-600":"text-sm text-slate-500",children:i}),l<e.length?r.jsx("span",{className:"hidden h-px w-10 bg-slate-200 sm:block"}):null]},i)})})}function a8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}const Ra=["Payment & Bank Details","Address & Authorize","Review & Submit"],oa={941:"94105",944:"94405","CT-1":"10005"},Zr={socialSecurity:"Social Security",medicare:"Medicare",withheld:"Withheld",tier1:"Tier 1(FICA)",tier2:"Tier 2 (Industry)"},la={regex:/^(?!0+(?:\.0+)?$)(?:100000000(?:\.00?)?|(?:\d{1,8}|\d{1,7}\d)(?:\.\d{1,2})?)$/,errorMessage:"Payment amount must be a number greater than 0, can include up to 2 decimal places, and must not exceed 100,000,000 (one hundred million)."};function Ma(e,t){return!e||!t?!1:oa[e]===t}function ps(e,t){return e==="CT-1"&&t===oa["CT-1"]}function i8(e,t){return e==="941"&&t===oa[941]||e==="944"&&t===oa[944]}function o8(e){return e==="CT-1"?{code1:Zr.tier1,code2:Zr.tier2,code3:""}:{code1:Zr.socialSecurity,code2:Zr.medicare,code3:Zr.withheld}}function ca(e){return la.regex.test(e)}const l8=/^(?:\d{0,8}(?:\.\d{0,2})?|100000000(?:\.\d{0,2})?)$/,Is=1e8;function c8(e){if(!e)return"";let t="",n=!1;for(const c of e)c>="0"&&c<="9"?t+=c:c==="."&&!n&&(t+=c,n=!0);const s=t.indexOf(".");let a=s===-1?t:t.slice(0,s);const i=s===-1?"":t.slice(s+1,s+3),o=s!==-1&&t.endsWith(".");if(a.length>9&&(a=a.slice(0,9)),a.length===9&&a!=="100000000"&&(a=a.slice(0,8)),a.length>0&&!o&&i===""){const c=Number.parseInt(a,10);!Number.isNaN(c)&&c>Is&&(a=String(Is))}let l=s===-1?a:`${a}.${i}`;if(o&&(l=`${a}.`),l8.test(l)){if(!l.endsWith(".")&&l!==""){const c=Number.parseFloat(l);if(!Number.isNaN(c)&&c>Is)return String(Is)}return l}return""}function Om(e){return ca(e)?Number.parseFloat(e):null}function u8(e){if(!e)return"";const t=Number.parseFloat(e);return Number.isNaN(t)?e:t.toFixed(2)}function d8(e,t,n,s){const a=[e,t];return s&&a.push(n),a.reduce((i,o)=>{const l=Om(o);return l===null?i:i+l},0)}function m8(e,t){return Math.abs(e-t)<.005}function h8(e,t,n,s,a){if(!Ma(e,t))return{subcategoryCode1:null,subcategoryCode2:null,subcategoryCode3:null};const i=ps(e,t);return{subcategoryCode1:n.trim()?"1":null,subcategoryCode2:s.trim()?"2":null,subcategoryCode3:!i&&a.trim()?"3":null}}const f8=["Su","Mo","Tu","We","Th","Fr","Sa"];function p8(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M3 9h18",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M8 3v4M16 3v4",className:"stroke-gov-600",strokeWidth:"1.5",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"15",r:"1.5",className:"fill-gov-600"})]})}function Go({value:e,onChange:t,disabled:n=!1,hasError:s=!1}){const a=aa(e),i=Rm(),o=Mm(),[l,c]=x.useState(!1),[u,d]=x.useState(()=>a??aa(i)??new Date),m=x.useRef(null),h=x.useId();x.useEffect(()=>{a&&d(a)},[e]),x.useEffect(()=>{if(!l)return;const y=b=>{var S;(S=m.current)!=null&&S.contains(b.target)||c(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[l]);const f=x.useMemo(()=>r8(u.getFullYear(),u.getMonth()),[u]),g=x.useMemo(()=>{const y=new Date(u.getFullYear(),u.getMonth()-1,1),b=new Date(y.getFullYear(),y.getMonth()+1,0);return In(b)>=i},[u,i]),p=x.useMemo(()=>{const y=new Date(u.getFullYear(),u.getMonth()+1,1);return In(y)<=o},[u,o]),v=y=>{Bi(y)&&(t(In(y)),c(!1))};return r.jsxs("div",{ref:m,className:"relative",children:[r.jsxs("div",{className:`flex items-center gap-2 rounded-lg border bg-white px-3 py-2.5 transition ${s?"border-red-300":"border-slate-200 focus-within:border-gov-400 focus-within:ring-2 focus-within:ring-gov-200"} ${n?"cursor-not-allowed border-[#E5E7EB] bg-[#F9FAFB] text-slate-700":""}`,children:[r.jsx("input",{id:h,type:"text",readOnly:!0,disabled:n,value:e,placeholder:"YYYY-MM-DD",onClick:()=>!n&&c(y=>!y),className:"w-full cursor-pointer border-0 bg-transparent p-0 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-0 disabled:cursor-not-allowed"}),r.jsx("button",{type:"button",disabled:n,onClick:()=>c(y=>!y),className:"shrink-0 rounded p-0.5 text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60","aria-label":"Open settlement date picker",children:r.jsx(p8,{})})]}),l?r.jsxs("div",{className:"absolute left-0 top-[calc(100%+8px)] z-50 w-[300px] rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsx("div",{className:"absolute -top-2 left-8 h-4 w-4 rotate-45 border-l border-t border-slate-200 bg-white"}),r.jsxs("div",{className:"flex items-center justify-between rounded-t-xl bg-slate-50 px-4 py-3",children:[r.jsx("button",{type:"button",disabled:!g,onClick:()=>d(y=>new Date(y.getFullYear(),y.getMonth()-1,1)),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Previous month",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),r.jsx("span",{className:"text-sm font-semibold text-slate-900",children:n8(u.getFullYear(),u.getMonth())}),r.jsx("button",{type:"button",disabled:!p,onClick:()=>d(y=>new Date(y.getFullYear(),y.getMonth()+1,1)),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Next month",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 px-3 pt-2 text-center text-xs font-medium text-slate-500",children:f8.map(y=>r.jsx("div",{className:"py-1",children:y},y))}),r.jsx("div",{className:"grid grid-cols-7 gap-1 p-3 pt-1",children:f.map((y,b)=>{if(!y)return r.jsx("div",{},`empty-${b}`);const S=In(y),A=e===S,w=!Bi(y);return r.jsx("button",{type:"button","aria-disabled":w,onClick:()=>v(y),className:`rounded-lg px-1 py-2 text-sm transition ${w?"cursor-not-allowed text-slate-300 hover:bg-sky-50":A?"bg-sky-100 font-semibold text-slate-900":"font-medium text-slate-800 hover:bg-slate-50"}`,children:y.getDate()},S)})})]}):null]})}function ur({value:e,onChange:t,onBlur:n,name:s,disabled:a=!1,readOnly:i=!1,placeholder:o="0.00",hasError:l=!1}){return r.jsx("input",{type:"text",inputMode:"decimal",autoComplete:"off",name:s,value:e,disabled:a,readOnly:i,placeholder:o,className:oe(l,i),onChange:c=>t(c8(c.target.value)),onBlur:()=>{const c=u8(e);c!==e&&t(c),n==null||n()}})}const x8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function g8(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M3 9h18",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M8 3v4M16 3v4",className:"stroke-gov-600",strokeWidth:"1.5",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"15",r:"1.5",className:"fill-gov-600"})]})}function y8({value:e,onChange:t,disabled:n=!1,hasError:s=!1,disabledMonths:a=[]}){const{minYear:i,maxYear:o}=gm(),l=na(e),[c,u]=x.useState(!1),[d,m]=x.useState((l==null?void 0:l.year)??o),h=x.useRef(null),f=x.useId();x.useEffect(()=>{l&&m(l.year)},[e]),x.useEffect(()=>{if(!c)return;const S=A=>{var w;(w=h.current)!=null&&w.contains(A.target)||u(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[c]);const g=H9(e),p=S=>!!a.includes(S),v=S=>{p(S)||(t(W9(d,S)),u(!1))},y=d>i,b=d<o;return r.jsxs("div",{ref:h,className:"relative",children:[r.jsxs("div",{className:`flex items-center gap-2 rounded-lg border bg-white px-3 py-2.5 transition ${s?"border-red-300":"border-slate-200 focus-within:border-gov-400 focus-within:ring-2 focus-within:ring-gov-200"} ${n?"cursor-not-allowed border-[#E5E7EB] bg-[#F9FAFB] text-slate-700":""}`,children:[r.jsx("input",{id:f,type:"text",readOnly:!0,disabled:n,value:g,placeholder:"YYYY-MM",onClick:()=>!n&&u(S=>!S),className:"w-full cursor-pointer border-0 bg-transparent p-0 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-0 disabled:cursor-not-allowed"}),r.jsx("button",{type:"button",disabled:n,onClick:()=>u(S=>!S),className:"shrink-0 rounded p-0.5 text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60","aria-label":"Open tax period picker",children:r.jsx(g8,{})})]}),c?r.jsxs("div",{className:"absolute left-0 top-[calc(100%+8px)] z-50 w-[280px] rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsx("div",{className:"absolute -top-2 left-8 h-4 w-4 rotate-45 border-l border-t border-slate-200 bg-white"}),r.jsxs("div",{className:"flex items-center justify-between rounded-t-xl bg-slate-50 px-4 py-3",children:[r.jsx("button",{type:"button",disabled:!y,onClick:()=>m(S=>S-1),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Previous year",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),r.jsx("span",{className:"text-sm font-semibold text-slate-900",children:d}),r.jsx("button",{type:"button",disabled:!b,onClick:()=>m(S=>S+1),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Next year",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-3 gap-1 p-3",children:x8.map((S,A)=>{const w=(l==null?void 0:l.year)===d&&l.month===A&&e.length===6,k=p(A);return r.jsx("button",{type:"button","aria-disabled":k,onClick:()=>v(A),className:`rounded-lg px-2 py-2.5 text-sm transition ${k?"cursor-not-allowed text-slate-300 hover:bg-sky-50":w?"bg-sky-100 font-semibold text-slate-900":"font-medium text-slate-800 hover:bg-slate-50"}`,children:S},S)})})]}):null]})}const zm="Active",b8="Inactive";function or(e){return(e.status??zm).trim().toLowerCase()==="active"}function v8(e){return or(e)?b8:zm}function C8(e){return or(e)?"Deactivate":"Activate"}function Jo(e){var t;return((t=e==null?void 0:e.accountType)==null?void 0:t.trim().toLowerCase())==="individual"}function j8(e){return Jo(e)?"/payments/federal/individual-enrollment":"/payments/federal/authorization"}function qm(e){return Number.parseInt(e,10)||0}function Vm(e){return Number.parseFloat(e)||0}function Zm(e){return e||"0001-01-01"}function Um(e){const t=h8(e.taxFormType,e.taxTypeCode,e.subcategoryAmount1??"",e.subcategoryAmount2??"",e.subcategoryAmount3??""),n=ps(e.taxFormType,e.taxTypeCode);return{subcategoryCode1:t.subcategoryCode1,subcategoryAmount1:e.subcategoryAmount1?Number.parseFloat(e.subcategoryAmount1):null,subcategoryCode2:t.subcategoryCode2,subcategoryAmount2:e.subcategoryAmount2?Number.parseFloat(e.subcategoryAmount2):null,subcategoryCode3:t.subcategoryCode3,subcategoryAmount3:!n&&e.subcategoryAmount3?Number.parseFloat(e.subcategoryAmount3):null}}function Xo(e,t){return{entityId:e,taxpayerPin:t.taxpayerPin||null,secondaryTin:t.secondaryTin||null,bankAccountDetailId:qm(t.bankAccountDetailId),taxFormType:t.taxFormType,taxTypeCode:t.taxTypeCode,taxPeriod:t.taxPeriod,settlementDate:Zm(t.settlementDate),paymentAmount:Vm(t.paymentAmount),...Um(t)}}function _o(e){return{taxpayerPin:e.taxpayerPin||null,secondaryTin:e.secondaryTin||null,bankAccountDetailId:qm(e.bankAccountDetailId),taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:Zm(e.settlementDate),paymentAmount:Vm(e.paymentAmount),...Um(e)}}const $o="federal-payment-draft";function el(e){sessionStorage.setItem($o,JSON.stringify(e))}function xs(){const e=sessionStorage.getItem($o);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Mn(){sessionStorage.removeItem($o)}function w8(e,t={}){return{federalPaymentId:e.federalPaymentId,enrollmentId:e.enrollmentId,taxpayerPin:e.taxpayerPin??"",secondaryTin:e.secondaryTin??"",bankAccountDetailId:e.bankAccountDetailId?String(e.bankAccountDetailId):"",routingNumber:t.routingNumber??"",accountNumber:t.accountNumber??"",accountType:t.accountType??"",bankName:t.bankName??"",taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:e.settlementDate,paymentAmount:String(e.paymentAmount),subcategoryAmount1:e.subcategoryAmount1!=null?String(e.subcategoryAmount1):"",subcategoryAmount2:e.subcategoryAmount2!=null?String(e.subcategoryAmount2):"",subcategoryAmount3:e.subcategoryAmount3!=null?String(e.subcategoryAmount3):""}}const N8=mn({taxpayerPin:U().min(1,"Taxpayer PIN is required").regex(/^\d{4}$/,"Taxpayer PIN must be exactly 4 digits"),secondaryTin:Ed("Secondary TIN"),bankAccountDetailId:U().min(1,"Bank account is required"),routingNumber:U().optional(),accountType:U().optional(),bankName:U().optional(),taxFormType:U().min(1,"Tax form type is required"),taxTypeCode:U().min(1,"Payment type is required"),taxPeriod:U().min(1,"This field is required").regex(/^\d{6}$/,"Tax period must be in YYYY-MM format").refine(e=>{const t=na(e);if(!t)return!1;const{minYear:n,maxYear:s}=gm();return t.year>=n&&t.year<=s},"Tax period must be within the last 3 years"),settlementDate:U().min(1,"This field is required").refine(e=>Fa(e),"Settlement date must be a weekday within the allowed range"),paymentAmount:U().min(1,"This field is required").refine(e=>ca(e),la.errorMessage),subcategoryCode1:U().optional(),subcategoryAmount1:U().optional(),subcategoryCode2:U().optional(),subcategoryAmount2:U().optional(),subcategoryCode3:U().optional(),subcategoryAmount3:U().optional()}).superRefine((e,t)=>{var l;if(e.taxPeriod&&e.taxFormType){const c=na(e.taxPeriod);c&&xm(e.taxFormType).includes(c.month)&&t.addIssue({code:Dt.custom,message:"Tax period must be a valid month for the selected tax form",path:["taxPeriod"]})}if(!Ma(e.taxFormType,e.taxTypeCode))return;const n=ps(e.taxFormType,e.taxTypeCode),s=i8(e.taxFormType,e.taxTypeCode),a=(c,u,d)=>{if(!(c!=null&&c.trim())){d&&t.addIssue({code:Dt.custom,message:"This field is required",path:[u]});return}ca(c)||t.addIssue({code:Dt.custom,message:la.errorMessage,path:[u]})};a(e.subcategoryAmount1,"subcategoryAmount1",!0),a(e.subcategoryAmount2,"subcategoryAmount2",!0),a(e.subcategoryAmount3,"subcategoryAmount3",s);const i=Om(e.paymentAmount),o=d8(e.subcategoryAmount1??"",e.subcategoryAmount2??"",e.subcategoryAmount3??"",s);i!==null&&!m8(i,o)&&t.addIssue({code:Dt.custom,message:"Payment amount must equal the sum of subcategory amounts",path:["paymentAmount"]}),n&&((l=e.subcategoryAmount3)!=null&&l.trim())&&t.addIssue({code:Dt.custom,message:"Subcategory amount 3 is not used for CT-1 payments",path:["subcategoryAmount3"]})}),S8={TaxpayerPin:"taxpayerPin",SecondaryTin:"secondaryTin",BankAccountDetailId:"bankAccountDetailId",TaxFormType:"taxFormType",TaxTypeCode:"taxTypeCode",TaxPeriod:"taxPeriod",SettlementDate:"settlementDate",PaymentAmount:"paymentAmount",SubcategoryCode1:"subcategoryCode1",SubcategoryCode2:"subcategoryCode2",SubcategoryCode3:"subcategoryCode3",SubcategoryAmount1:"subcategoryAmount1",SubcategoryAmount2:"subcategoryAmount2",SubcategoryAmount3:"subcategoryAmount3"},Ur="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3";function ti(e){return{taxpayerPin:e.taxpayerPin??"",secondaryTin:e.secondaryTin??"",bankAccountDetailId:e.bankAccountDetailId,routingNumber:e.routingNumber??"",accountType:e.accountType??"",bankName:e.bankName??"",taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:e.settlementDate,paymentAmount:e.paymentAmount,subcategoryCode1:e.subcategoryCode1??"",subcategoryAmount1:e.subcategoryAmount1??"",subcategoryCode2:e.subcategoryCode2??"",subcategoryAmount2:e.subcategoryAmount2??"",subcategoryCode3:e.subcategoryCode3??"",subcategoryAmount3:e.subcategoryAmount3??""}}const Rc={taxpayerPin:"",secondaryTin:"",bankAccountDetailId:"",routingNumber:"",accountType:"",bankName:"",taxFormType:"",taxTypeCode:"",taxPeriod:"",settlementDate:"",paymentAmount:"",subcategoryCode1:"",subcategoryAmount1:"",subcategoryCode2:"",subcategoryAmount2:"",subcategoryCode3:"",subcategoryAmount3:""};function A8(e,t,n){if(e)return ti(e);if(t!=null&&t.paymentDraft)return ti(t.paymentDraft);if(t!=null&&t.resetDraft)return Mn(),Rc;const s=xs();return s&&s.entityId===n?ti(s):Rc}function Bm({entity:e,initialDraft:t,readonly:n=!1,onCancel:s}){var bt,Et,vt,Ct,ct,Me,It,Tt,_e,Lt,jt,j,P;const a=Pe(),i=ke(),o=ht(),l=$t(i.state,Je()),c=i.state,u=c!=null&&c.resetDraft?null:xs(),d=t??(c==null?void 0:c.paymentDraft)??(u&&u.entityId===(e==null?void 0:e.entityId)?u:null),m=x.useRef(d==null?void 0:d.federalPaymentId),h=x.useRef(d==null?void 0:d.enrollmentId),[f,g]=x.useState(null),[p,v]=x.useState(!1),y=x.useMemo(()=>A8(t,c,e==null?void 0:e.entityId),[t,c==null?void 0:c.paymentDraft,c==null?void 0:c.resetDraft,e==null?void 0:e.entityId,i.key]);x.useEffect(()=>{d!=null&&d.federalPaymentId&&(m.current=d.federalPaymentId),d!=null&&d.enrollmentId&&(h.current=d.enrollmentId)},[d==null?void 0:d.federalPaymentId,d==null?void 0:d.enrollmentId]);const{data:b=[],isLoading:S}=ce({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>hn(e.entityId),enabled:e!==null}),A=x.useMemo(()=>b.filter(or),[b]),{data:w=[],isLoading:k}=ce({queryKey:["federal-form-types",e==null?void 0:e.entityId],queryFn:()=>i3(e.entityId),enabled:e!==null}),{register:M,control:O,handleSubmit:Z,watch:_,setValue:F,setError:W,getValues:H,trigger:ee,formState:{errors:z}}=Xt({resolver:_t(N8),defaultValues:y}),re=M("taxpayerPin"),te=_("bankAccountDetailId"),ne=_("taxFormType"),J=_("taxTypeCode"),Ne=_("taxPeriod"),ae=_("settlementDate"),ge=_("subcategoryAmount1"),Le=_("subcategoryAmount2"),Ie=_("subcategoryAmount3"),Fe=x.useRef(ne),Re=x.useMemo(()=>ne?xm(ne):[],[ne]),ye=x.useMemo(()=>Ma(ne,J),[ne,J]),V=x.useMemo(()=>ps(ne,J),[ne,J]),{data:me=[],isLoading:q}=ce({queryKey:["federal-tax-type-codes",ne],queryFn:()=>Am(ne),enabled:!!ne});x.useEffect(()=>{Fe.current&&Fe.current!==ne&&F("taxTypeCode",""),Fe.current=ne},[ne,F]),x.useEffect(()=>{if(!Ne||!ne)return;const C=na(Ne);C&&Re.includes(C.month)&&F("taxPeriod","")},[ne,Ne,Re,F]),x.useEffect(()=>{ae&&(Fa(ae)||F("settlementDate",""))},[ae,F]),x.useEffect(()=>{if(!ye){F("subcategoryCode1",""),F("subcategoryCode2",""),F("subcategoryCode3",""),F("subcategoryAmount1",""),F("subcategoryAmount2",""),F("subcategoryAmount3","");return}const C=o8(ne);F("subcategoryCode1",C.code1),F("subcategoryCode2",C.code2),F("subcategoryCode3",V?"":C.code3),V&&F("subcategoryAmount3","")},[ye,ne,V,F]),x.useEffect(()=>{ye&&(ee("paymentAmount"),ee("subcategoryAmount1"),ee("subcategoryAmount2"),ee("subcategoryAmount3"))},[ge,Le,Ie,ye,ee]),x.useEffect(()=>{if(S)return;const C=A.find(I=>String(I.bankAccountDetailId)===te);if(!C){te&&(F("bankAccountDetailId",""),F("routingNumber",""),F("accountType",""),F("bankName",""));return}F("routingNumber",C.routingNumber),F("accountType",C.accountType),F("bankName",C.bankName)},[A,te,S,F]);const fe=C=>{const I=A.find(R=>String(R.bankAccountDetailId)===C.bankAccountDetailId);return{federalPaymentId:m.current,enrollmentId:h.current??(d==null?void 0:d.enrollmentId),form8655AuthorizationId:d==null?void 0:d.form8655AuthorizationId,form9783EnrollmentId:d==null?void 0:d.form9783EnrollmentId,taxpayerPin:C.taxpayerPin??"",secondaryTin:C.secondaryTin??"",bankAccountDetailId:C.bankAccountDetailId,routingNumber:C.routingNumber??(I==null?void 0:I.routingNumber)??"",accountNumber:(I==null?void 0:I.accountNumber)??"",accountType:C.accountType??(I==null?void 0:I.accountType)??"",bankName:C.bankName??(I==null?void 0:I.bankName)??"",taxFormType:C.taxFormType,taxTypeCode:C.taxTypeCode,taxPeriod:C.taxPeriod,settlementDate:C.settlementDate,paymentAmount:C.paymentAmount,subcategoryCode1:C.subcategoryCode1,subcategoryAmount1:C.subcategoryAmount1,subcategoryCode2:C.subcategoryCode2,subcategoryAmount2:C.subcategoryAmount2,subcategoryCode3:C.subcategoryCode3,subcategoryAmount3:C.subcategoryAmount3}},be=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]}),m.current&&o.removeQueries({queryKey:["federal-payment",m.current],exact:!0})},Ye=async C=>{if(!e)return null;if(C.federalPaymentId){const R=await Bo(C.federalPaymentId,_o(C));return m.current=R.federalPaymentId,h.current=R.enrollmentId,R}const I=await Uo(Xo(e.entityId,C));return m.current=I.federalPaymentId,h.current=I.enrollmentId,I},ue=C=>{if(!(C instanceof dn)||!C.details)return!1;let I=!1;for(const[R,Y]of Object.entries(C.details)){const B=S8[R],G=Y[0];B&&G&&(W(B,{type:"server",message:G}),I=!0)}return I},ve=Z(async C=>{if(!(n||!e)){g(null),v(!0);try{const I=fe(C),R=await Ye(I);if(!R)return;const Y={...I,entityId:e.entityId,federalPaymentId:R.federalPaymentId,enrollmentId:R.enrollmentId};await be(),el(Y),a(j8(e),{state:{from:l,paymentDraft:Y}})}catch(I){const R=ue(I);g(R?"Please review the highlighted fields below.":tt(I,"Failed to save payment details."))}finally{v(!1)}}}),at=async()=>{if(!(!e||n)){g(null),v(!0);try{const C=fe(H());await Ye(C),await be(),Mn(),a(Je())}catch(C){const I=ue(C);g(I?"Please review the highlighted fields below.":tt(C,"Failed to save draft."))}finally{v(!1)}}},Ze=()=>{if(s){s();return}a(l)},Xe=()=>{Mn(),Ze()};return r.jsxs("form",{onSubmit:ve,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!n&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:Ra,current:1})})]}),f?r.jsx(Ht,{message:f}):null,r.jsx("div",{className:"w-full",children:r.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:[r.jsx(En,{title:"Enrollment Details",isFirst:!0,children:r.jsxs("div",{className:"space-y-5 w-3/4",children:[r.jsxs("div",{className:Ur,children:[r.jsx($,{label:"Taxpayer PIN",required:!0,info:"The 4-digit PIN assigned by the IRS for EFTPS enrollment.",error:(bt=z.taxpayerPin)==null?void 0:bt.message,children:r.jsx("input",{placeholder:"Enter Taxpayer PIN",className:oe(!!z.taxpayerPin),inputMode:"numeric",maxLength:4,disabled:n,...re,onChange:C=>{C.target.value=C.target.value.replace(/\D/g,"").slice(0,4),re.onChange(C)}})}),r.jsx($,{label:"Secondary TIN",info:"An additional Taxpayer Identification Number, if the payment requires one.",error:(Et=z.secondaryTin)==null?void 0:Et.message,children:r.jsx("input",{placeholder:"Enter Secondary TIN",className:oe(!!z.secondaryTin),maxLength:9,disabled:n,...M("secondaryTin")})}),r.jsx(Ee,{name:"bankAccountDetailId",control:O,render:({field:C})=>{var I;return r.jsx(Dm,{value:C.value,onChange:C.onChange,entityId:(e==null?void 0:e.entityId)??null,bankAccounts:A,isLoading:S,disabled:!e||n,label:"Account Number",info:"Select the bank account to debit for this payment, or add a new one.",error:(I=z.bankAccountDetailId)==null?void 0:I.message})}})]}),r.jsxs("div",{className:Ur,children:[r.jsx($,{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",error:(vt=z.routingNumber)==null?void 0:vt.message,children:r.jsx("input",{readOnly:!0,placeholder:"Enter Routing Number",className:oe(!!z.routingNumber,!0),...M("routingNumber")})}),r.jsx($,{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",error:(Ct=z.accountType)==null?void 0:Ct.message,children:r.jsx("input",{readOnly:!0,placeholder:"Select Account Type",className:oe(!!z.accountType,!0),...M("accountType")})}),r.jsx($,{label:"Bank Name",required:!0,info:"The name of the bank, auto-filled from the selected bank account.",error:(ct=z.bankName)==null?void 0:ct.message,children:r.jsx("input",{readOnly:!0,placeholder:"Bank Name",className:oe(!!z.bankName,!0),...M("bankName")})})]})]})}),r.jsx(En,{title:"Federal Payment",children:r.jsxs("div",{className:"space-y-5 w-3/4",children:[r.jsxs("div",{className:Ur,children:[r.jsx($,{label:"Tax Form Type",required:!0,info:"The federal tax form this payment applies to (e.g. 941, 944, CT-1).",error:(Me=z.taxFormType)==null?void 0:Me.message,children:r.jsx(Ee,{name:"taxFormType",control:O,render:({field:C})=>r.jsx(we,{hasError:!!z.taxFormType,disabled:k||!e||n,loading:k,loadingLabel:"Loading form types…",placeholder:"Select form type",value:C.value??"",onChange:C.onChange,options:w.map(I=>({value:I.value,label:I.value}))})})}),r.jsx($,{label:"Payment Type",required:!0,info:"The type of payment for the selected tax form.",error:(It=z.taxTypeCode)==null?void 0:It.message,children:r.jsx(Ee,{name:"taxTypeCode",control:O,render:({field:C})=>r.jsx(we,{hasError:!!z.taxTypeCode,disabled:!ne||q||n,loading:q,loadingLabel:"Loading payment types…",placeholder:ne?"Select payment type":"Select tax form first",value:C.value??"",onChange:C.onChange,options:me.map(I=>({value:I.code,label:`${I.code} - ${I.codeName}`}))})})}),r.jsx($,{label:"Tax Period",required:!0,info:"The tax period (month and year) this payment covers.",error:(Tt=z.taxPeriod)==null?void 0:Tt.message,children:r.jsx(Ee,{name:"taxPeriod",control:O,render:({field:C})=>r.jsx(y8,{value:C.value,onChange:C.onChange,hasError:!!z.taxPeriod,disabled:!ne||n,disabledMonths:Re})})})]}),r.jsxs("div",{className:"grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",children:[r.jsx($,{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the IRS.",error:(_e=z.settlementDate)==null?void 0:_e.message,children:r.jsx(Ee,{name:"settlementDate",control:O,render:({field:C})=>r.jsx(Go,{value:C.value,onChange:C.onChange,hasError:!!z.settlementDate,disabled:n})})}),r.jsx($,{label:"Payment Amount",required:!0,info:"The total amount to remit. Must equal the sum of subcategory amounts when applicable.",error:(Lt=z.paymentAmount)==null?void 0:Lt.message,children:r.jsx(Ee,{name:"paymentAmount",control:O,render:({field:C})=>r.jsx(ur,{name:C.name,value:C.value,onChange:C.onChange,onBlur:C.onBlur,disabled:n,hasError:!!z.paymentAmount})})})]}),ye?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"h-px bg-slate-200"}),r.jsxs("div",{className:Ur,children:[r.jsx($,{label:"Subcategory Code 1",info:"The first subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:oe(!1,!0),...M("subcategoryCode1")})}),r.jsx($,{label:"Subcategory Code 2",info:"The second subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:oe(!1,!0),...M("subcategoryCode2")})}),V?null:r.jsx($,{label:"Subcategory Code 3",info:"The third subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:oe(!1,!0),...M("subcategoryCode3")})})]}),r.jsxs("div",{className:Ur,children:[r.jsx($,{label:"Subcategory Amount 1",required:!0,info:"The amount allocated to Subcategory Code 1.",error:(jt=z.subcategoryAmount1)==null?void 0:jt.message,children:r.jsx(Ee,{name:"subcategoryAmount1",control:O,render:({field:C})=>r.jsx(ur,{name:C.name,value:C.value??"",onChange:C.onChange,onBlur:C.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!z.subcategoryAmount1})})}),r.jsx($,{label:"Subcategory Amount 2",required:!0,info:"The amount allocated to Subcategory Code 2.",error:(j=z.subcategoryAmount2)==null?void 0:j.message,children:r.jsx(Ee,{name:"subcategoryAmount2",control:O,render:({field:C})=>r.jsx(ur,{name:C.name,value:C.value??"",onChange:C.onChange,onBlur:C.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!z.subcategoryAmount2})})}),V?null:r.jsx($,{label:"Subcategory Amount 3",required:!0,info:"The amount allocated to Subcategory Code 3.",error:(P=z.subcategoryAmount3)==null?void 0:P.message,children:r.jsx(Ee,{name:"subcategoryAmount3",control:O,render:({field:C})=>r.jsx(ur,{name:C.name,value:C.value??"",onChange:C.onChange,onBlur:C.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!z.subcategoryAmount3})})})]})]}):null]})})]})}),r.jsx(ar,{back:n?{label:"Back",onClick:Ze,showArrow:!0}:void 0,draft:n?void 0:{onSave:at,onDiscard:Xe,isSaving:p,disabled:!e},submit:n?void 0:{label:"Next",disabled:!e||p}})]},i.key)}function Ym(){const{selectedEntity:e}=yt();return r.jsx(Bm,{entity:e})}function Hm({mode:e}){const t=Pe(),{federalPaymentId:n}=fa(),{selectedEntity:s}=yt(),a=Number.parseInt(n??"",10),{data:i,isLoading:o,isError:l}=ce({queryKey:["federal-payment",a],queryFn:()=>Zo(a),enabled:Number.isFinite(a)}),{data:c=[]}=ce({queryKey:["bank-accounts",s==null?void 0:s.entityId],queryFn:()=>hn(s.entityId),enabled:s!==null&&i!==void 0}),u=x.useMemo(()=>{if(!i)return null;const m=c.find(h=>h.bankAccountDetailId===i.bankAccountDetailId);return w8(i,{routingNumber:m==null?void 0:m.routingNumber,accountNumber:m==null?void 0:m.accountNumber,accountType:m==null?void 0:m.accountType,bankName:m==null?void 0:m.bankName})},[i,c]);if(!Number.isFinite(a))return r.jsx(He,{to:Je(),replace:!0});if(o)return r.jsx("p",{className:"text-sm text-slate-600",children:"Loading federal payment…"});if(l||!i||!u)return r.jsx(He,{to:Je(),replace:!0});if(!s||i.entityId!==s.entityId)return r.jsx(He,{to:Je(),replace:!0});const d=e==="view"||!dm(i.status);return r.jsx(Bm,{entity:s,initialDraft:u,readonly:d,onCancel:()=>t(Je())})}function Wm(){return yt(),r.jsx(Hm,{mode:"edit"})}function Km(){return yt(),r.jsx(Hm,{mode:"view"})}function Qm({entityId:e,state:t,reasonForPayment:n,status:s,pageNumber:a=1,pageSize:i=Fn}){const o=new URLSearchParams({entityId:String(e),pageNumber:String(a),pageSize:String(i)});return t&&o.set("state",t),n&&o.set("reasonForPayment",n),s&&o.set("status",s),he(`/portal/tax-accounts?${o}`)}function k8(e){return he("/portal/tax-accounts",{method:"POST",body:e})}function P8(e,t){return he(`/portal/tax-accounts/${e}`,{method:"PATCH",body:t})}function E8({enabled:e,onChange:t,disabled:n=!1,helperText:s="Add each tax period below as its own row - GovPay submits and schedules the whole series together. Ideal for monthly or quarterly payments."}){return r.jsxs("div",{className:"rounded-xl border border-slate-200 p-5",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsx("h5",{className:"text-sm font-semibold text-slate-900",children:"Make This a Recurring Payment"}),r.jsxs("button",{type:"button",role:"switch","aria-checked":e,"aria-label":"Make this a recurring payment",disabled:n,onClick:()=>t(!e),className:`relative inline-flex h-6 w-[52px] shrink-0 items-center rounded-full text-[10px] font-semibold text-white transition focus:outline-none focus-visible:ring-2 focus-visible:ring-gov-300 disabled:cursor-not-allowed disabled:opacity-60 ${e?"bg-gov-700":"bg-slate-500"}`,children:[r.jsx("span",{className:`absolute h-4 w-4 rounded-full bg-white transition-all ${e?"left-[32px]":"left-1"}`}),r.jsx("span",{className:`w-full text-center ${e?"pr-5":"pl-5"}`,children:e?"Yes":"No"})]})]}),r.jsx("p",{className:"mt-3 text-sm text-slate-600",children:s})]})}function I8(e){return{id:e,taxPeriod:"",taxAmount:"",paymentDate:""}}function T8({rows:e,taxPeriodOptions:t,onChange:n,onRemove:s,onAdd:a,disabled:i=!1}){return r.jsxs(r.Fragment,{children:[e.map(o=>r.jsxs("div",{className:"mt-5 flex items-start gap-3",children:[r.jsxs("div",{className:"grid flex-1 gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx($,{label:"Tax Period",required:!0,children:r.jsx(we,{placeholder:"Select Tax Period",value:o.taxPeriod,onChange:l=>n(o.id,{taxPeriod:l}),options:t.map(l=>({value:l.value,label:l.label}))})}),r.jsx($,{label:"Tax Amount",required:!0,children:r.jsx(ur,{value:o.taxAmount,onChange:l=>n(o.id,{taxAmount:l}),disabled:i,placeholder:"$"})}),r.jsx($,{label:"Settlement Date",required:!0,children:r.jsx(Go,{value:o.paymentDate,onChange:l=>n(o.id,{paymentDate:l}),disabled:i})})]}),r.jsx(Gm,{onClick:()=>s(o.id),label:`Remove tax period row ${o.id}`})]},o.id)),r.jsxs("button",{type:"button",onClick:a,disabled:i,className:"mt-4 inline-flex items-center gap-2 text-sm font-semibold text-gov-600 transition hover:text-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:[r.jsx(F8,{}),"Add New"]})]})}function Gm({onClick:e,label:t,disabled:n=!1,title:s}){return r.jsx("button",{type:"button",onClick:e,disabled:n,"aria-label":t,title:s,className:"mt-[26px] inline-flex h-[42px] w-[42px] shrink-0 items-center justify-center rounded-lg border border-slate-200 text-slate-400 transition hover:bg-slate-50 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",children:r.jsx(L8,{})})}function L8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 7.5h12M9.5 7.5V6a1 1 0 011-1h3a1 1 0 011 1v1.5M7.5 7.5l.6 11a1 1 0 001 .95h5.8a1 1 0 001-.95l.6-11M10.5 11v5M13.5 11v5"})})}function F8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14m-7-7h14"})})}function R8(e){const t=[];return e.includes("\\d")&&t.push("0-9"),/[A-Z]/.test(e)&&t.push("A-Z"),e.includes("-")&&t.push("\\-"),e.includes(" ")&&t.push(" "),e.includes("/")&&t.push("/"),t.length?t.join(""):null}function Jm(e,t){const n=e.toUpperCase();if(!t)return n;const s=R8(t);return s?n.replace(new RegExp(`[^${s}]`,"g"),""):n}function Xm(e){if(!e)return null;const t=[];let n=0;try{for(;n<e.length;){if(e.startsWith("(?:",n))return null;const s=e[n];if(s==="-"||s===" "||s==="/"){t.push({type:"separator",char:s}),n+=1;continue}let a;if(s==="\\")a=e[n+1]==="d"?"digit":"letter",n+=2;else if(s==="["){const o=e.indexOf("]",n);if(o===-1)return null;a="letter",n=o+1}else a=s>="0"&&s<="9"?"digit":"letter",n+=1;const i=M8(e,n);if(i===null)return null;for(let o=0;o<i.count;o+=1)t.push({type:"slot",kind:a});n=i.nextIndex}}catch{return null}return t}function M8(e,t){if(e[t]!=="{")return{count:1,nextIndex:t};const n=e.indexOf("}",t);if(n===-1)throw new Error("Unterminated quantifier");const s=e.slice(t+1,n);if(s.includes(","))return null;const a=Number.parseInt(s,10);if(Number.isNaN(a))throw new Error("Bad quantifier");return{count:a,nextIndex:n+1}}function _m(e,t){const n=e.toUpperCase().replace(/[^0-9A-Z]/g,"").split("");let s="",a=0;for(const i of t){if(a>=n.length)break;if(i.type==="separator"){s+=i.char;continue}for(;a<n.length;){const o=n[a];a+=1;const l=o>="0"&&o<="9";if(i.kind==="digit"?l:!l){s+=o;break}}}return s}function $m(e){if(e)try{const t=e1(e,0);return t.index===e.length?t.length:void 0}catch{return}}function e1(e,t){let n=t,s=0;for(;;){const a=D8(e,n);if(s=Math.max(s,a.length),n=a.index,e[n]==="|"){n+=1;continue}return{length:s,index:n}}}function D8(e,t){let n=t,s=0;for(;n<e.length&&e[n]!=="|"&&e[n]!==")";){const a=O8(e,n);s+=a.length,n=a.index}return{length:s,index:n}}function O8(e,t){let n=t,s;if(e.startsWith("(?:",n)){const a=e1(e,n+3);if(e[a.index]!==")")throw new Error("Unbalanced group");s=a.length,n=a.index+1}else if(e[n]==="\\")s=1,n+=2;else if(e[n]==="["){const a=e.indexOf("]",n);if(a===-1)throw new Error("Unterminated class");s=1,n=a+1}else s=1,n+=1;if(e[n]==="{"){const a=e.indexOf("}",n);if(a===-1)throw new Error("Unterminated quantifier");const i=e.slice(n+1,a).split(","),o=i.length===2?i[1]:i[0],l=Number.parseInt(o,10);if(Number.isNaN(l))throw new Error("Bad quantifier");s*=l,n=a+1}return{length:s,index:n}}const tl="state-payment-draft";function Da(e){sessionStorage.setItem(tl,JSON.stringify(e))}function ua(){const e=sessionStorage.getItem(tl);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Lr(){sessionStorage.removeItem(tl)}function t1(e,t){if(!(e!=null&&e.trim()))return null;const n=t(e);return Number.isNaN(n)?null:n}const Hi=e=>t1(e,t=>Number.parseInt(t,10)),n1=e=>t1(e,Number.parseFloat),r1=e=>e!=null&&e.trim()?e:null;function z8(e,t){var n,s,a,i,o,l,c,u;if(t.isRecurring&&((n=t.additionalOccurrences)!=null&&n.length)){const d=[{taxPeriod:t.taxPeriod,taxAmount:t.taxAmount,paymentDate:t.paymentDate},...t.additionalOccurrences].map(m=>{var h;return{taxPeriod:(h=m.taxPeriod)!=null&&h.trim()?m.taxPeriod.trim():null,taxAmount:Number.parseFloat(m.taxAmount),paymentDate:m.paymentDate}});return{entityId:e,state:t.state,reasonForPayment:t.reasonForPayment,stateAccountId:t.stateAccountId,accountId:t.accountId,letterId:(s=t.letterId)!=null&&s.trim()?t.letterId.trim().toUpperCase():null,taxYear:t.taxYear,taxPeriod:null,taxAmount:null,paymentDate:null,bankAccountDetailId:Hi(t.bankAccountDetailId),formName:(a=t.formName)!=null&&a.trim()?t.formName.trim():null,depositFrequency:(i=t.depositFrequency)!=null&&i.trim()?t.depositFrequency.trim():null,occurrences:d}}return{entityId:e,state:t.state,reasonForPayment:t.reasonForPayment,stateAccountId:t.stateAccountId,accountId:t.accountId,letterId:(o=t.letterId)!=null&&o.trim()?t.letterId.trim().toUpperCase():null,taxYear:t.taxYear,taxPeriod:(l=t.taxPeriod)!=null&&l.trim()?t.taxPeriod.trim():null,taxAmount:n1(t.taxAmount),paymentDate:r1(t.paymentDate),bankAccountDetailId:Hi(t.bankAccountDetailId),isRecurring:t.isRecurring??!1,frequency:t.isRecurring?t.frequency:void 0,recurringEndDate:t.isRecurring?t.recurringEndDate:void 0,formName:(c=t.formName)!=null&&c.trim()?t.formName.trim():null,depositFrequency:(u=t.depositFrequency)!=null&&u.trim()?t.depositFrequency.trim():null}}function q8(e){var t,n,s,a;return{state:e.state,reasonForPayment:e.reasonForPayment,stateAccountId:e.stateAccountId,accountId:e.accountId,letterId:(t=e.letterId)!=null&&t.trim()?e.letterId.trim().toUpperCase():null,taxYear:e.taxYear,taxPeriod:(n=e.taxPeriod)!=null&&n.trim()?e.taxPeriod.trim():null,taxAmount:n1(e.taxAmount)??void 0,paymentDate:r1(e.paymentDate)??void 0,bankAccountDetailId:Hi(e.bankAccountDetailId)??void 0,formName:(s=e.formName)!=null&&s.trim()?e.formName.trim():null,depositFrequency:(a=e.depositFrequency)!=null&&a.trim()?e.depositFrequency.trim():null}}function nl(e){const t=Pe(),n=ht(),s=async o=>{await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["state-payments"]}),await n.invalidateQueries({queryKey:["remittance-payments"]}),o&&n.removeQueries({queryKey:["state-payments",o],exact:!0})},a=async o=>{if(!e)return null;if(o.statePaymentDetailId){const c=await p3(o.statePaymentDetailId,q8(o));return await s(c.statePaymentDetailId),c}const l=await f3(z8(e.entityId,o));return Da({...o,statePaymentDetailId:l.statePaymentDetailId}),await s(l.statePaymentDetailId),l};return{upsertPayment:a,saveAsDraft:async o=>{e&&(await a(o),Lr(),t(Je()))}}}const V8="Enter the letter or notice ID in this format: L1234567890 (the letter L followed by 10 digits).",Mc=/^L\d{10}$/,s1=10,Z8=s1+1;function U8(e){const t=e.toUpperCase().replace(/[^A-Z0-9]/g,"");if(!t)return"";const n=t.replace(/\D/g,"").slice(0,s1);return!n&&!t.startsWith("L")?"":`L${n}`}function B8(e,t){return mn({state:U().min(1,"State is required"),reasonForPayment:U().min(1,"Reason for payment is required"),formName:U().optional(),stateAccountId:U().min(1,"State ID is required"),accountId:U().min(1,"Account ID is required").refine(n=>/^\d{10,12}$/.test(n.trim()),"Account ID must be 10 to 12 digits"),letterId:U().optional(),taxYear:U().min(1,"Tax year is required"),taxPeriod:U().optional(),taxAmount:U().min(1,"Tax amount is required").refine(n=>ca(n),la.errorMessage),paymentDate:U().min(1,"Settlement date is required").refine(n=>Fa(n),"Settlement date must be a weekday within the allowed range"),bankAccountDetailId:U().optional(),routingNumber:U().optional(),accountType:U().optional(),bankName:U().optional()}).superRefine((n,s)=>{var m,h,f;const a=e(),i=a==null?void 0:a.stateId.pattern;if(i)try{new RegExp(`^(?:${i})$`).test(n.stateAccountId.trim().toUpperCase())||s.addIssue({code:Dt.custom,path:["stateAccountId"],message:a.stateId.message})}catch{s.addIssue({code:Dt.custom,path:["stateAccountId"],message:"State ID validation is temporarily unavailable"})}const o=((m=n.letterId)==null?void 0:m.trim().toUpperCase())??"",l=(a==null?void 0:a.letterIdRequired)??!1,c=(a==null?void 0:a.letterId.message)??V8;if(l&&!o)s.addIssue({code:Dt.custom,path:["letterId"],message:"Letter ID is required for a bill payment"});else if(o)try{(a!=null&&a.letterId.pattern?new RegExp(`^(?:${a.letterId.pattern})$`):Mc).test(o)||s.addIssue({code:Dt.custom,path:["letterId"],message:c})}catch{Mc.test(o)||s.addIssue({code:Dt.custom,path:["letterId"],message:c})}((a==null?void 0:a.taxPeriodRequired)??!0)&&!((h=n.taxPeriod)!=null&&h.trim())&&s.addIssue({code:Dt.custom,path:["taxPeriod"],message:"Tax period is required"}),t().length>1&&!((f=n.formName)!=null&&f.trim())&&s.addIssue({code:Dt.custom,path:["formName"],message:"Select a form"})})}const Dc="grid gap-x-6 gap-y-5 sm:grid-cols-3",Y8="grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",H8="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",Oc="mt-6 min-w-0 rounded-xl border border-slate-200 p-5 lg:p-6",ni="text-sm font-semibold text-slate-900",W8=["Payment Details","Bank Account","Review & Authorize"],zc={state:"",reasonForPayment:"",formName:"",stateAccountId:"",accountId:"",letterId:"",taxYear:"",taxPeriod:"",taxAmount:"",paymentDate:"",bankAccountDetailId:"",routingNumber:"",accountType:"",bankName:""};function ri(e){return{state:e.state,reasonForPayment:a1(e.reasonForPayment),formName:e.formName??"",stateAccountId:e.stateAccountId,accountId:e.accountId,letterId:e.letterId??"",taxYear:e.taxYear,taxPeriod:e.taxPeriod,taxAmount:e.taxAmount,paymentDate:e.paymentDate,bankAccountDetailId:e.bankAccountDetailId,routingNumber:e.routingNumber??"",accountType:e.accountType??"",bankName:e.bankName??""}}const K8={MAKE_A_BILL_PAYMENT:"BILL_PAYMENT"};function a1(e){const t=e.trim().toUpperCase().replaceAll(" ","_");return K8[t]??t}const qc=new Set(["WITHHOLDING_TAX"]);function i1({entity:e,initialDraft:t,readonly:n=!1,onCancel:s}){var ll,cl,ul,dl,ml,hl,fl,pl,xl,gl,yl;const a=Pe(),i=ke(),o=$t(i.state,Je()),l=i.state,c=x.useMemo(()=>t??(l==null?void 0:l.paymentDraft)??(l!=null&&l.resetDraft?null:ua())??null,[t,l==null?void 0:l.paymentDraft,l==null?void 0:l.resetDraft]),u=x.useRef(c==null?void 0:c.statePaymentDetailId),d=x.useMemo(()=>{if(t)return ri(t);if(l!=null&&l.paymentDraft)return ri(l.paymentDraft);if(l!=null&&l.resetDraft)return Lr(),zc;const T=ua();return T?ri(T):zc},[t,l==null?void 0:l.paymentDraft,l==null?void 0:l.resetDraft,i.key]),{data:m=[],isLoading:h,isError:f}=ce({queryKey:["state-payment-states"],queryFn:({signal:T})=>Pm(T)}),{data:g=[],isLoading:p}=ce({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>hn(e.entityId),enabled:e!==null}),v=x.useMemo(()=>g.filter(or),[g]),y=x.useRef(null),b=x.useRef([]),S=x.useMemo(()=>B8(()=>y.current,()=>b.current),[]),{register:A,control:w,handleSubmit:k,getValues:M,watch:O,setValue:Z,clearErrors:_,formState:{errors:F}}=Xt({resolver:_t(S),defaultValues:d}),W=O("state"),H=O("reasonForPayment"),ee=O("paymentDate"),z=O("bankAccountDetailId"),{data:re=[],isLoading:te,isError:ne}=ce({queryKey:["state-payment-reasons",e==null?void 0:e.entityId,W],queryFn:({signal:T})=>Yo(e.entityId,W,T),enabled:e!==null&&!!W}),{data:J}=ce({queryKey:["state-payment-validation-metadata",e==null?void 0:e.entityId,W,H],queryFn:({signal:T})=>Ho(e.entityId,W,H,T),enabled:e!==null&&!!(W&&H)}),{data:Ne}=ce({queryKey:["state-payment-form-references",e==null?void 0:e.entityId,W,H],queryFn:({signal:T})=>m3(e.entityId,W,H,T),enabled:e!==null&&!!(W&&H)}),{data:ae}=ce({queryKey:["tax-accounts","lookup",e==null?void 0:e.entityId,W,H],queryFn:()=>Qm({entityId:e.entityId,state:W,reasonForPayment:H,status:"Active"}),enabled:e!==null&&!!(W&&H)}),ge=O("stateAccountId"),Le=O("accountId"),Ie=O("taxYear");x.useEffect(()=>{if(n)return;const T=ae==null?void 0:ae.items[0];T&&(ge||Z("stateAccountId",T.stateAccountId,{shouldValidate:!0}),Le||Z("accountId",T.accountId,{shouldValidate:!0}),!Ie&&T.taxYear&&(J!=null&&J.taxYearOptions.some(xe=>String(xe)===T.taxYear))&&Z("taxYear",T.taxYear,{shouldValidate:!0}))},[ae,ge,Le,Ie,J,Z,n]),y.current=J??null;const Fe=(J==null?void 0:J.taxYearOptions)??[],Re=(J==null?void 0:J.frequencyMode)??null,ye=(J==null?void 0:J.frequencyOptions)??[],V=Re!==null&&Re!=="NotApplicable",[me,q]=x.useState((c==null?void 0:c.depositFrequency)??""),fe=H==="BILL_PAYMENT",be=x.useMemo(()=>{const T=(Ne==null?void 0:Ne.forms)??[],xe=me?T.filter(pt=>!pt.frequency||pt.frequency.toLowerCase()===me.toLowerCase()):T,en=xe.length>0?xe:T;return[...new Set(en.map(pt=>pt.formName))]},[Ne,me]);b.current=be,x.useEffect(()=>{ye.length===1&&me!==ye[0].code&&q(ye[0].code)},[ye,me]);const Ye=Number(Ie),{data:ue}=ce({queryKey:["state-payment-tax-periods",e==null?void 0:e.entityId,W,H,me,Ye],queryFn:({signal:T})=>h3(e.entityId,W,H,me,Ye,T),enabled:e!==null&&V&&!!me&&Number.isInteger(Ye)}),ve=V&&me?ue??((ll=ye.find(T=>T.code===me))==null?void 0:ll.taxPeriodOptions)??[]:(J==null?void 0:J.taxPeriodOptions)??[],at=fe?ve.filter(T=>T.value==="ANNUAL").map(T=>({...T,label:Number.isInteger(Ye)?`Annual ${Ye} (Jan 1–Dec 31)`:T.label})):ve,Ze=!!(J&&W&&H),Xe=(J==null?void 0:J.stateId.pattern)??null,bt=$m(Xe),Et=x.useMemo(()=>Xm(Xe),[Xe]),vt=A("stateAccountId"),Ct=A("accountId"),ct=A("letterId"),[Me,It]=x.useState((c==null?void 0:c.isRecurring)??!1),[Tt,_e]=x.useState(null),[Lt,jt]=x.useState(null),[j,P]=x.useState(!1),{saveAsDraft:C}=nl(e),I=x.useRef(1),[R,Y]=x.useState(()=>((c==null?void 0:c.additionalOccurrences)??[]).map(T=>({id:I.current++,...T}))),B=()=>{Y(T=>[...T,I8(I.current++)])},G=(T,xe)=>{Y(en=>en.map(pt=>pt.id===T?{...pt,...xe}:pt))},L=T=>{Y(xe=>xe.filter(en=>en.id!==T))},Q=T=>{It(T),T||(Y([]),_e(null))};x.useEffect(()=>{fe&&Me&&Q(!1)},[fe,Me]);const Se=!!(J!=null&&J.letterIdRequired),ft=["stateAccountId","accountId","letterId","taxYear","taxPeriod","taxAmount","paymentDate","formName"],Ft=()=>{ft.forEach(T=>Z(T,"")),q(""),Y([]),_e(null),_([...ft,"bankAccountDetailId"])},zn=T=>{Z("state",T,{shouldValidate:!0}),Z("reasonForPayment",""),_("reasonForPayment"),Ft()},Oa=T=>{T!==H&&(Z("reasonForPayment",T,{shouldValidate:!0}),Ft())};x.useEffect(()=>{c!=null&&c.statePaymentDetailId&&(u.current=c.statePaymentDetailId)},[c==null?void 0:c.statePaymentDetailId]),x.useEffect(()=>{if(!H||te||ne||re.some(xe=>xe.code===H))return;const T=re.find(xe=>a1(xe.label)===H);Z("reasonForPayment",(T==null?void 0:T.code)??"")},[te,ne,re,H,Z]);const Or=x.useRef(!1);x.useEffect(()=>{if(!n){if(!Or.current){Or.current=!0;return}ee&&!Fa(ee)&&Z("paymentDate","")}},[ee,Z,n]),x.useEffect(()=>{if(n||p)return;const T=v.find(xe=>String(xe.bankAccountDetailId)===z);if(!T){z&&(Z("bankAccountDetailId",""),Z("routingNumber",""),Z("accountType",""),Z("bankName",""));return}Z("routingNumber",T.routingNumber),Z("accountType",T.accountType),Z("bankName",T.bankName)},[v,z,Z,n,p]);const gs=T=>{var xe,en;return{authorizedPersonName:c==null?void 0:c.authorizedPersonName,authorizedTitle:c==null?void 0:c.authorizedTitle,authorizationSignature:c==null?void 0:c.authorizationSignature,authorizationDate:c==null?void 0:c.authorizationDate,statePaymentDetailId:u.current,state:T.state,reasonForPayment:T.reasonForPayment,stateAccountId:T.stateAccountId.trim().toUpperCase(),accountId:T.accountId.trim(),letterId:(xe=T.letterId)!=null&&xe.trim()?T.letterId.trim().toUpperCase():"",taxYear:T.taxYear,taxPeriod:T.taxPeriod??"",taxAmount:T.taxAmount,paymentDate:T.paymentDate,bankAccountDetailId:T.bankAccountDetailId??"",routingNumber:T.routingNumber,accountType:T.accountType,bankName:T.bankName,isRecurring:Me,formName:((en=T.formName)==null?void 0:en.trim())||void 0,depositFrequency:V&&me?me:void 0,additionalOccurrences:Me&&R.length>0?R.map(({taxPeriod:pt,taxAmount:L1,paymentDate:F1})=>({taxPeriod:pt,taxAmount:L1,paymentDate:F1})):void 0}},ys=k(T=>{if(n||!J)return;if(Me){if(R.length===0){_e("Add at least one tax period below for this recurring payment.");return}if(R.some(pt=>!!(!pt.taxAmount.trim()||!pt.paymentDate.trim()||J.taxPeriodRequired&&!pt.taxPeriod.trim()))){_e("Fill in the Tax Period, Tax Amount, and Settlement Date for every added row.");return}_e(null)}const xe=gs(T);Da(xe),a("/payments/state/bank-details",{state:{from:o,paymentDraft:xe}})}),ol=()=>{if(s){s();return}a(o)},I1=async()=>{if(e){jt(null),P(!0);try{await C(gs(M()))}catch(T){jt(tt(T,"Failed to save draft."))}finally{P(!1)}}},T1=()=>{Lr(),ol()};return r.jsxs("form",{onSubmit:ys,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),!n&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:W8,current:1})})]}),r.jsxs("section",{className:H8,children:[r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Payment Details"}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx($,{label:"State",required:!0,info:"The tax jurisdiction this payment is for.",error:(cl=F.state)==null?void 0:cl.message,children:r.jsx(we,{disabled:n||h||f,hasError:!!F.state,loading:h,loadingLabel:"Loading states…",placeholder:"Select State",value:W,onChange:zn,options:m.map(T=>({value:T.code,label:T.name}))})}),r.jsx($,{label:"Reason for Payment",required:!0,info:"The reason for this state tax payment, filtered by the selected state and entity.",error:(ul=F.reasonForPayment)==null?void 0:ul.message,children:r.jsx(we,{disabled:n||!W||te||ne,hasError:!!F.reasonForPayment,loading:te,loadingLabel:"Loading reasons…",placeholder:"Select Reason for Payment",value:H,onChange:Oa,options:re.map(T=>({value:T.code,label:T.label,disabled:qc.has(T.code),badge:qc.has(T.code)?"Coming Soon":void 0}))})}),V?r.jsx($,{label:"Frequency",required:!0,info:ye.length===1?"The deposit frequency for this state tax account - only one applies here.":"The deposit frequency for this state tax account - narrows the Tax Period choices below.",children:ye.length===1?r.jsx("input",{readOnly:!0,className:oe(!1,!0),value:ye[0].label}):r.jsx(we,{disabled:n||!H,placeholder:H?"Select Frequency":"Select a reason first",value:me,onChange:q,options:ye.map(T=>({value:T.code,label:T.label}))})}):null,be.length>0?r.jsx($,{label:"Forms",required:be.length>1,info:be.length>1?"Select the agency form this payment is for.":"The agency form this payment is for - only one applies here.",error:(dl=F.formName)==null?void 0:dl.message,children:be.length===1?r.jsx("input",{readOnly:!0,className:oe(!1,!0),value:be[0]}):r.jsx(Ee,{name:"formName",control:w,render:({field:T})=>r.jsx(we,{disabled:n,hasError:!!F.formName,placeholder:"Select Form",value:T.value??"",onChange:T.onChange,options:be.map(xe=>({value:xe,label:xe}))})})}):null]}),f?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Unable to load states."}):null,ne?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Unable to load payment reasons."}):null,W&&!te&&!ne&&re.length===0?r.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"No supported payment reasons are available for this entity and state."}):null,Ne&&Ne.notes.length>0?r.jsx("div",{className:"mt-5 rounded-lg bg-slate-50 px-4 py-3 text-xs text-slate-700",children:Ne.notes.map(T=>r.jsx("p",{className:"text-slate-500",children:T},T))}):null,r.jsxs("fieldset",{disabled:!Ze||n,className:Oc,children:[r.jsx("h4",{className:ni,children:"Account Information"}),r.jsxs("div",{className:`mt-5 ${Y8}`,children:[r.jsx($,{label:"State Tax ID",required:(J==null?void 0:J.stateId.required)??!0,info:"Your state-issued tax account identifier for the selected state.",error:(ml=F.stateAccountId)==null?void 0:ml.message,children:r.jsx("input",{placeholder:(J==null?void 0:J.stateId.example)??"Enter State Tax ID",maxLength:bt,className:oe(!!F.stateAccountId),...vt,onChange:T=>{T.target.value=Et?_m(T.target.value,Et):Jm(T.target.value,Xe),vt.onChange(T)}})}),r.jsx($,{label:"Account ID",required:(J==null?void 0:J.accountIdRequired)??!0,info:"Your 10 to 12 digit state tax account number.",error:(hl=F.accountId)==null?void 0:hl.message,children:r.jsx("input",{inputMode:"numeric",placeholder:"Enter Account ID",maxLength:12,className:oe(!!F.accountId),...Ct,onChange:T=>{T.target.value=T.target.value.replace(/\D/g,"").slice(0,12),Ct.onChange(T)}})}),Se?r.jsx($,{label:"Letter ID",required:(J==null?void 0:J.letterIdRequired)??!1,info:"The letter or notice ID from the state bill (format L1234567890).",error:(fl=F.letterId)==null?void 0:fl.message,children:r.jsx("input",{placeholder:(J==null?void 0:J.letterId.example)??"L1234567890",maxLength:Z8,autoComplete:"off",className:oe(!!F.letterId),...ct,onChange:T=>{T.target.value=U8(T.target.value),ct.onChange(T)}})}):null,r.jsx($,{label:"Tax Year",required:!0,info:"The tax year this payment applies to.",error:(pl=F.taxYear)==null?void 0:pl.message,children:r.jsx(Ee,{name:"taxYear",control:w,render:({field:T})=>r.jsx(we,{hasError:!!F.taxYear,placeholder:"Select Tax Year",value:T.value??"",onChange:T.onChange,options:Fe.map(xe=>({value:String(xe),label:`TY ${xe}`}))})})})]}),r.jsx("h4",{className:`mt-6 ${ni}`,children:"Tax Periods & Amounts"}),r.jsxs("div",{className:"mt-4 grid items-start gap-5 lg:grid-cols-[minmax(0,1fr)_320px]",children:[r.jsxs("div",{className:"rounded-xl border border-slate-200 p-4 lg:p-5",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsxs("div",{className:"grid flex-1 gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx($,{label:"Tax Period",required:(J==null?void 0:J.taxPeriodRequired)??!0,info:(J==null?void 0:J.taxPeriodRequired)===!1?"Optional for a bill payment - the notice already states the billed period.":V&&!me?"The tax period this payment covers. Select a Frequency above to narrow this list.":"The tax period this payment covers.",error:(xl=F.taxPeriod)==null?void 0:xl.message,children:r.jsx(Ee,{name:"taxPeriod",control:w,render:({field:T})=>r.jsx(we,{hasError:!!F.taxPeriod,placeholder:"Select Tax Period",value:T.value??"",onChange:T.onChange,options:at.map(xe=>({value:xe.value,label:xe.label}))})})}),r.jsx($,{label:"Tax Amount",required:!0,info:"The total amount to remit to the state.",error:(gl=F.taxAmount)==null?void 0:gl.message,children:r.jsx(Ee,{name:"taxAmount",control:w,render:({field:T})=>r.jsx(ur,{name:T.name,value:T.value,onChange:T.onChange,onBlur:T.onBlur,disabled:n,placeholder:"$",hasError:!!F.taxAmount})})}),r.jsx($,{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the state.",error:(yl=F.paymentDate)==null?void 0:yl.message,children:r.jsx(Ee,{name:"paymentDate",control:w,render:({field:T})=>r.jsx(Go,{value:T.value,onChange:T.onChange,hasError:!!F.paymentDate,disabled:n})})})]}),Me?r.jsx(Gm,{label:"Remove tax period row 1",title:"The first tax period can't be removed",disabled:!0}):null]}),Me?r.jsxs(r.Fragment,{children:[r.jsx(T8,{rows:R,taxPeriodOptions:at,onChange:(T,xe)=>{_e(null),G(T,xe)},onRemove:L,onAdd:B,disabled:n}),Tt?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:Tt}):null]}):null]}),r.jsx(E8,{enabled:Me,onChange:Q,disabled:n||fe,helperText:fe?"Not available for a bill payment - the notice you received already covers a single, fixed period.":void 0})]})]}),n?r.jsxs("fieldset",{disabled:!0,className:Oc,children:[r.jsx("h4",{className:ni,children:"Bank Account"}),r.jsxs("div",{className:"mt-5 space-y-5",children:[r.jsxs("div",{className:Dc,children:[r.jsx(Ee,{name:"bankAccountDetailId",control:w,render:({field:T})=>{var xe;return r.jsx(Dm,{value:T.value??"",onChange:T.onChange,entityId:(e==null?void 0:e.entityId)??null,bankAccounts:v,isLoading:p,disabled:!e||!Ze||n,error:(xe=F.bankAccountDetailId)==null?void 0:xe.message,label:"Account Number",info:"Select the bank account to debit for this payment, or add a new one."})}}),r.jsx($,{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"9-digit",className:oe(!1,!0),...A("routingNumber")})}),r.jsx($,{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"Select",className:oe(!1,!0),...A("accountType")})})]}),r.jsx("div",{className:Dc,children:r.jsx($,{label:"Bank Name",info:"The name of the bank, auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"e.g. Chase Bank",className:oe(!1,!0),...A("bankName")})})})]})]}):null,J!=null&&J.notes.length?r.jsx("div",{className:"mt-5 rounded-lg bg-amber-50 px-4 py-3 text-xs text-amber-800",children:J.notes.map(T=>r.jsx("p",{children:T},T))}):null]}),Lt?r.jsx("div",{className:"mt-4",children:r.jsx(Ht,{message:Lt})}):null,r.jsx(ar,{back:n?{label:"Back",onClick:ol,showArrow:!0}:void 0,draft:n?void 0:{onSave:I1,onDiscard:T1,isSaving:j,disabled:!e},submit:n?void 0:{label:"Next",disabled:!e||!Ze}})]},i.key)}function o1(){const{selectedEntity:e}=yt();return r.jsx(i1,{entity:e})}function l1(){const{statePaymentId:e}=fa(),{selectedEntity:t}=yt(),n=Number.parseInt(e??"",10),{data:s,isLoading:a,isError:i}=ce({queryKey:["state-payments",n],queryFn:()=>Em(n),enabled:t!==null&&Number.isFinite(n)}),o=x.useMemo(()=>s?{statePaymentDetailId:s.statePaymentDetailId,state:s.state,reasonForPayment:s.reasonForPayment??"",stateAccountId:s.stateAccountId??"",accountId:s.accountId??"",letterId:s.letterId??"",taxYear:s.taxYear??"",taxPeriod:s.taxPeriod??"",taxAmount:String(s.taxAmount),paymentDate:s.paymentDate,bankAccountDetailId:s.bankAccountDetailId?String(s.bankAccountDetailId):"",formName:s.formName??"",depositFrequency:s.frequency??"",authorizedPersonName:s.authorizedPersonName??"",authorizedTitle:s.authorizedTitle??"",authorizationSignature:s.authorizationSignature??"",authorizationDate:s.authorizationDate??""}:null,[s]);return Number.isFinite(n)?a?r.jsx("p",{className:"px-6 py-12 text-sm text-slate-500",children:"Loading state payment…"}):i||!s||!o?r.jsx(He,{to:Je(),replace:!0}):!t||s.entityId!==t.entityId?r.jsx(He,{to:Je(),replace:!0}):dm(s.status)?r.jsx(i1,{entity:t,initialDraft:o}):r.jsx(He,{to:`/payments/state/${n}/view`,replace:!0}):r.jsx(He,{to:Je(),replace:!0})}function c1(){var l,c;const{statePaymentId:e}=fa(),t=Pe(),{selectedEntity:n}=yt(),s=Number.parseInt(e??"",10),{data:a,isLoading:i,isError:o}=ce({queryKey:["state-payments",s],queryFn:()=>Em(s),enabled:n!==null&&Number.isFinite(s)});return Number.isFinite(s)?i?r.jsx("p",{className:"px-6 py-12 text-sm text-slate-500",children:"Loading state payment…"}):o||!a?r.jsx(He,{to:"/payments",replace:!0}):!n||a.entityId!==n.entityId?r.jsx(He,{to:"/payments",replace:!0}):r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{type:"button",onClick:()=>t("/payments"),className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm font-medium text-slate-600 transition hover:bg-slate-50",children:[r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),"Back to Payments"]}),r.jsxs("h1",{className:"text-lg font-semibold text-slate-900",children:["State Payment ST-",a.statePaymentDetailId]})]}),r.jsx("div",{className:"w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("dl",{className:"grid gap-x-8 gap-y-5 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"State"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.state})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Tax Period"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:ym(a.taxPeriod,a.formName)})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Amount"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:Mo(a.taxAmount)})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Settlement Date"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.paymentDate})]}),a.formName&&r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Form"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.formName})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Status"}),r.jsx("dd",{className:"mt-1",children:r.jsx("span",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold ${((l=a.status)==null?void 0:l.toLowerCase())==="paid"?"bg-green-100 text-green-800":((c=a.status)==null?void 0:c.toLowerCase())==="rejected"?"bg-red-100 text-red-800":"bg-slate-100 text-slate-700"}`,children:a.status??"—"})})]}),a.reason&&r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Rejection Reason"}),r.jsx("dd",{className:"mt-1 text-sm text-slate-700",children:a.reason})]})]})})]}):r.jsx(He,{to:"/payments",replace:!0})}const Vc=160,Q8=88,Ts=8;function G8({account:e,entityId:t,onEdit:n,variant:s="button"}){const a=ht(),{showSuccess:i,showError:o}=ya(),l=x.useRef(null),c=x.useRef(null),[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,g]=x.useState({}),p=()=>{var k;const y=l.current;if(!y)return;const b=y.getBoundingClientRect(),S=((k=c.current)==null?void 0:k.offsetHeight)??Q8,w=window.innerHeight-b.bottom<S+Ts;g({position:"fixed",top:w?b.top-S-Ts:b.bottom+Ts,left:Math.max(Ts,b.right-Vc),width:Vc,zIndex:50})};x.useLayoutEffect(()=>{u&&(p(),requestAnimationFrame(p))},[u]),x.useEffect(()=>{if(!u)return;const y=S=>{var w,k;const A=S.target;(w=l.current)!=null&&w.contains(A)||(k=c.current)!=null&&k.contains(A)||d(!1)},b=()=>p();return document.addEventListener("mousedown",y),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),()=>{document.removeEventListener("mousedown",y),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0)}},[u]);const v=async()=>{const y=or(e);h(!0);try{await Nm(e.bankAccountDetailId,{status:v8(e)}),await a.invalidateQueries({queryKey:["bank-accounts",t]}),d(!1),i(y?"Bank Account Deactivated Successfully":"Bank Account Activated Successfully")}catch(b){o("Action Not Completed",tt(b,"Cannot deactivate this bank account because it is linked to a payment that has not been accepted yet."))}finally{h(!1)}};return r.jsxs("div",{className:"inline-block text-left",children:[r.jsx("button",{ref:l,type:"button",disabled:m,"aria-label":s==="kebab"?"Bank account actions":void 0,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>d(y=>!y),className:s==="kebab"?"inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-60":"inline-flex items-center gap-1.5 rounded-lg bg-gov-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:s==="kebab"?r.jsx(J8,{}):r.jsxs(r.Fragment,{children:["Actions",r.jsx(X8,{})]})}),u?un.createPortal(r.jsxs("div",{ref:c,role:"menu",style:f,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("button",{type:"button",onClick:()=>{d(!1),n(e)},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50",children:"Edit"}),r.jsx("button",{type:"button",disabled:m,onClick:()=>void v(),className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50 disabled:opacity-60",children:C8(e)})]}),document.body):null]})}function J8(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.6"})]})}function X8(){return r.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function u1({account:e,onEdit:t,onSelect:n,selected:s=!1}){const a=or(e),i=r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500",children:r.jsx(ra,{})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm font-semibold text-slate-900",children:e.bankName}),r.jsxs("span",{className:"mt-0.5 flex items-center gap-2",children:[r.jsx("span",{className:"text-xs text-slate-500",children:ia(e.accountNumber)}),r.jsx(qo,{active:a})]}),r.jsx("span",{className:"mt-0.5 block truncate text-xs text-slate-400",children:e.accountType})]})]});return r.jsxs("div",{className:`relative flex items-start gap-2 rounded-xl border p-4 transition ${s||e.isPrimary?"border-gov-500 bg-gov-50/30 ring-1 ring-gov-200":"border-slate-200 bg-white"} ${a&&n?"hover:border-gov-300":""} ${a?"":"opacity-60"}`,children:[e.isPrimary?r.jsx("span",{className:"absolute -top-2.5 right-10 z-10 rounded-full bg-gov-700 px-3 py-0.5 text-[11px] font-medium text-white shadow-sm",children:"Primary"}):null,n?r.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:!a,onClick:()=>n(e.bankAccountDetailId),className:`flex min-w-0 flex-1 items-center gap-3 text-left ${a?"":"cursor-not-allowed"}`,children:i}):r.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:i}),r.jsx(G8,{variant:"kebab",account:e,entityId:e.entityId,onEdit:t})]})}function d1({onAddManually:e,disabled:t=!1}){return r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Connect Your Bank Account"}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-4",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("span",{className:"absolute -top-2.5 right-3 z-10 inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-[11px] font-semibold text-slate-500",children:[r.jsx(_8,{}),"Coming Soon"]}),r.jsx("button",{type:"button",disabled:!0,"aria-label":"Connect with Plaid — coming soon",className:"flex h-[52px] w-[264px] cursor-not-allowed items-center rounded-lg border border-slate-200 bg-slate-50 px-4 text-sm font-semibold text-slate-400",children:"Connect with Plaid"})]}),r.jsx("button",{type:"button",onClick:e,disabled:t,className:"flex h-[52px] w-[264px] items-center rounded-lg border border-slate-400 bg-gov-50/40 px-4 text-sm font-semibold text-slate-900 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:"Add Manually"})]})]})}function _8(){return r.jsxs("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5V12l3 2"})]})}const $8=mn({bankAccountDetailId:U().min(1,"Select a bank account")}),ex=["Payment Details","Bank Account","Review & Authorize"],tx="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8";function nx({entity:e,paymentDraft:t}){const n=Pe(),s=ke(),a=$t(s.state,Je()),[i,o]=x.useState(null),[l,c]=x.useState(!1),[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,g]=x.useState(null),{saveAsDraft:p}=nl(e),{data:v=[],isLoading:y}=ce({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>hn(e.entityId),enabled:e!==null}),b=x.useMemo(()=>v.filter(or),[v]),S=v.length>0,{handleSubmit:A,watch:w,setValue:k,formState:{errors:M}}=Xt({resolver:_t($8),defaultValues:{bankAccountDetailId:t.bankAccountDetailId}}),O=w("bankAccountDetailId"),Z=b.find(z=>String(z.bankAccountDetailId)===O);x.useEffect(()=>{y||O&&!Z&&k("bankAccountDetailId","")},[y,Z,O,k]);const _=z=>({...t,bankAccountDetailId:z.bankAccountDetailId,routingNumber:(Z==null?void 0:Z.routingNumber)??t.routingNumber,accountType:(Z==null?void 0:Z.accountType)??t.accountType,bankName:(Z==null?void 0:Z.bankName)??t.bankName}),F=A(z=>{const re=_(z);Da(re),n("/payments/state/authorization",{state:{from:"/payments/state/bank-details",paymentDraft:re}})}),W=A(async z=>{if(e){o(null),c(!0);try{await p(_(z))}catch(re){o(tt(re,"Failed to save draft."))}finally{c(!1)}}}),H=()=>{n("/payments/state/new",{state:{from:a,paymentDraft:t}})},ee=()=>{Lr(),n(a)};return r.jsxs("form",{onSubmit:F,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:ex,current:2,completed:O?2:1})})]}),i?r.jsx("div",{className:"mb-4",children:r.jsx(Ht,{message:i})}):null,r.jsxs("section",{className:`${tx} min-h-[420px]`,children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-slate-50 text-slate-500",children:r.jsx(ra,{})}),r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Bank Details"})]}),S?r.jsxs("button",{type:"button",onClick:()=>d(!0),disabled:!e,className:"inline-flex h-10 items-center gap-2 rounded-lg border border-gov-300 bg-white px-4 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:[r.jsx(ra,{}),"Add Bank"]}):null]}),S?r.jsxs(r.Fragment,{children:[r.jsx("div",{role:"radiogroup","aria-label":"Bank account to debit",className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:v.map(z=>r.jsx(u1,{account:z,selected:String(z.bankAccountDetailId)===O,onSelect:re=>k("bankAccountDetailId",String(re),{shouldValidate:!0}),onEdit:g},z.bankAccountDetailId))}),M.bankAccountDetailId?r.jsx("p",{className:"mt-3 text-xs text-red-600",children:M.bankAccountDetailId.message}):null]}):r.jsx("div",{className:"mt-6",children:r.jsx(d1,{onAddManually:()=>h(!0),disabled:!e})})]}),r.jsx(Ko,{open:u,onClose:()=>d(!1),onAddManually:()=>{d(!1),h(!0)}}),r.jsx($r,{open:m,entityId:(e==null?void 0:e.entityId)??null,onClose:()=>h(!1),onSaved:z=>k("bankAccountDetailId",String(z),{shouldValidate:!0})}),r.jsx($r,{open:f!==null,entityId:(e==null?void 0:e.entityId)??null,account:f,onClose:()=>g(null)}),r.jsx(ar,{back:{label:"Back",onClick:H,showArrow:!0},draft:{onSave:W,onDiscard:ee,isSaving:l,disabled:!e},submit:{label:"Next",disabled:!e||!O}})]})}function m1(){const{selectedEntity:e}=yt(),t=ke(),{paymentDraft:n}=t.state??{},s=n??ua();return s?r.jsx(nx,{entity:e,paymentDraft:s}):r.jsx(He,{to:"/payments/state/new",replace:!0})}function rx({entity:e,paymentDraft:t}){var g,p,v;const n=(e==null?void 0:e.entityId)??null,{data:s=[]}=ce({queryKey:["state-payment-states"],queryFn:({signal:y})=>Pm(y)}),{data:a=[]}=ce({queryKey:["state-payment-reasons",n,t.state],queryFn:({signal:y})=>Yo(n,t.state,y),enabled:n!==null&&!!t.state}),{data:i}=ce({queryKey:["state-payment-validation-metadata",n,t.state,t.reasonForPayment],queryFn:({signal:y})=>Ho(n,t.state,t.reasonForPayment,y),enabled:n!==null&&!!(t.state&&t.reasonForPayment)}),{data:o=[]}=ce({queryKey:["bank-accounts",n],queryFn:()=>hn(n),enabled:n!==null}),l=(g=s.find(y=>y.code===t.state))==null?void 0:g.name,c=((p=a.find(y=>y.code===t.reasonForPayment))==null?void 0:p.label)??(i==null?void 0:i.reasonLabel),u=[l??t.state,c].filter(Boolean).join(" "),d=((v=i==null?void 0:i.taxPeriodOptions.find(y=>y.value===t.taxPeriod))==null?void 0:v.label)??t.taxPeriod,m=o.find(y=>String(y.bankAccountDetailId)===t.bankAccountDetailId),h=[(m==null?void 0:m.bankName)??t.bankName,m?`${jo.repeat(3)}${m.accountNumber.replace(/\D/g,"").slice(-4)}`:null].filter(Boolean).join(", "),f=[["Jurisdiction",u||"-"],["Tax Period",d||"-"],["Payment amount",Yi(t.taxAmount)],["Settlement Date",t.paymentDate?Qo(t.paymentDate):"-"],["Bank Details",h||"-"]];return r.jsxs("aside",{className:"rounded-2xl bg-gov-50/70 p-5",children:[r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Review Payment"}),r.jsx("div",{className:"mt-4 rounded-xl bg-white p-4",children:r.jsx("dl",{className:"divide-y divide-slate-100",children:f.map(([y,b])=>r.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 first:pt-0 last:pb-0",children:[r.jsx("dt",{className:"text-xs text-slate-500",children:y}),r.jsx("dd",{className:"text-right text-sm font-semibold text-slate-900",children:b})]},y))})})]})}const sx="By signing below, you authorize Govpay Payments to initiate this tax payment using the payment details you provided.",ax=["The payment information has been reviewed and is accurate.","You are responsible for ensuring the tax return, payment amount, tax period, and jurisdiction are correct.","Authorizing this payment does not replace any filing requirements. If a tax form is required, it must be submitted separately.","Once submitted, the payment may not be canceled or modified, subject to the receiving tax authority's rules.","This authorization applies only to the payment shown on this page."],ix="By signing, you confirm that you are authorized to act on behalf of the taxpayer or business listed above.",h1=/^[a-zA-Z\s]+$/;function ox(e){return e.replace(/[^a-zA-Z\s]/g,"")}const rl=U().min(1,"Signature is required").regex(h1,"Signature must contain only letters").refine(e=>e.trim().length>0,{message:"Signature is required"}),lx=U().optional().refine(e=>!e||!e.trim()||h1.test(e),{message:"Signature must contain only letters"}),f1="absolute inset-x-0 top-full mt-1 text-xs text-red-600",p1="flex flex-1 flex-col rounded-lg border border-slate-200 bg-[#F9FAFB] px-4 py-6",x1="flex h-16 items-center justify-center";function si({caption:e,error:t,children:n}){return r.jsxs("div",{className:"relative flex flex-col",children:[r.jsxs("div",{className:p1,children:[r.jsx("div",{className:x1,children:n}),r.jsx("div",{className:"border-t border-slate-400"}),r.jsx("p",{className:"mt-2 text-center text-xs text-slate-500",children:e})]}),r.jsx("p",{className:f1,children:t??""})]})}const ai="w-full border-0 bg-transparent text-center text-sm text-slate-700 placeholder:text-slate-400 focus:outline-none";function da({label:e,required:t=!1,signature:n,title:s,date:a,signerName:i,signerNameCaption:o="Name of authorized person",signerNamePlaceholder:l="Enter name",signatureValue:c,dateValue:u="",dateReadOnly:d=!0,errors:m,signatureCaption:h="Signature of taxpayer"}){const f=!!(c!=null&&c.trim()),{onChange:g,onBlur:p,name:v,ref:y}=n,b=i?"sm:grid-cols-2 lg:grid-cols-[minmax(0,1.2fr)_repeat(3,minmax(0,1fr))]":"lg:grid-cols-[minmax(0,1.4fr)_minmax(0,0.8fr)_minmax(0,0.8fr)]";return r.jsxs("div",{children:[e?r.jsxs("p",{className:"mb-3 text-sm font-medium text-gov-600",children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null]}):null,r.jsxs("div",{className:`grid gap-6 pb-5 ${b}`,children:[r.jsxs("div",{className:"relative flex flex-col",children:[r.jsxs("div",{className:p1,children:[r.jsx("div",{className:x1,children:r.jsx("input",{ref:y,name:v,placeholder:"Sign here",autoComplete:"off",spellCheck:!1,className:`w-full border-0 bg-transparent text-center focus:outline-none ${f?"text-4xl leading-tight tracking-wide text-slate-800":"text-sm text-slate-400 placeholder:text-slate-400"}`,style:f?{fontFamily:"'Great Vibes', 'Segoe Script', cursive"}:void 0,onBlur:p,onChange:S=>{const A=ox(S.target.value);S.target.value=A,g(S)}})}),r.jsx("div",{className:"border-t border-slate-400"}),r.jsx("p",{className:"mt-2 text-center text-xs text-slate-500",children:h})]}),r.jsx("p",{className:f1,children:(m==null?void 0:m.signature)??""})]}),i?r.jsx(si,{caption:o,error:m==null?void 0:m.signerName,children:r.jsx("input",{placeholder:l,className:ai,...i})}):null,r.jsx(si,{caption:"Title",error:m==null?void 0:m.title,children:r.jsx("input",{placeholder:"Enter title",className:ai,...s})}),r.jsx(si,{caption:"Date",error:m==null?void 0:m.date,children:d?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-center text-sm text-slate-700",children:Qo(u)}),r.jsx("input",{type:"hidden",...a})]}):r.jsx("input",{type:"date",className:ai,...a})})]})]})}const cx=mn({agreementDate:U().min(1,"Date is required"),agreementAccepted:mr().refine(e=>e,{message:"You must accept the authorization agreement"}),authorizationPersonName:Js("Name of authorization person"),signature:rl,title:U().min(1,"Title is required")}),ux="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",dx=["Payment Details","Bank Account","Review & Authorize"];function mx(e){return{agreementDate:new Date().toISOString().slice(0,10),agreementAccepted:!1,authorizationPersonName:e.authorizedPersonName??"",signature:e.authorizationSignature??"",title:e.authorizedTitle??""}}function hx({entity:e,paymentDraft:t}){var F,W,H,ee;const n=Pe(),s=ke(),a=ht(),{onPaymentRequired:i}=Yt(),o=$t(s.state,Je()),[l,c]=x.useState(null),[u,d]=x.useState(!1),m=x.useMemo(()=>mx(t),[t]),{register:h,handleSubmit:f,watch:g,formState:{errors:p}}=Xt({resolver:_t(cx),defaultValues:m}),v=g("agreementDate"),y=g("agreementAccepted"),b=g("signature"),S=h("signature"),{saveAsDraft:A,upsertPayment:w}=nl(e),k=()=>A(t),M=()=>{Lr(),n(o)},O=async()=>{await a.invalidateQueries({queryKey:["remittance-payments"]}),await a.invalidateQueries({queryKey:["dashboard"]}),await a.invalidateQueries({queryKey:["state-payments"]})},Z=f(async z=>{if(e){c(null),d(!0);try{const re=await w(t);if(!re)return;await Im(re.statePaymentDetailId,{authorizedPersonName:z.authorizationPersonName.trim(),authorizedTitle:z.title.trim(),authorizationSignature:z.signature.trim(),authorizationDate:z.agreementDate}),await O(),Lr(),n("/payments")}catch(re){if(re instanceof dn&&re.status===402&&i){const te=re.extensions;i({paymentType:(te==null?void 0:te.paymentType)??"state",paymentId:(te==null?void 0:te.paymentId)??t.statePaymentDetailId??0,expectedAmount:(te==null?void 0:te.expectedAmount)??"0.00",currency:(te==null?void 0:te.currency)??"USD",federalRecordCount:(te==null?void 0:te.federalRecordCount)??0,stateRecordCount:(te==null?void 0:te.stateRecordCount)??0,feePerFederal:(te==null?void 0:te.feePerFederal)??null,feePerState:(te==null?void 0:te.feePerState)??null});return}c(tt(re,"Failed to submit state payment."))}finally{d(!1)}}}),_=f(async()=>{if(e){c(null),d(!0);try{await k()}catch(z){c(tt(z,"Failed to save draft."))}finally{d(!1)}}});return r.jsxs("form",{onSubmit:Z,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:dx,current:3})})]}),r.jsxs("div",{className:"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_390px]",children:[r.jsxs("section",{className:`${ux} min-h-125`,children:[r.jsx("h3",{className:"text-base font-bold text-slate-900",children:"Authorization Agreement"}),r.jsx("hr",{className:"mt-3 border-slate-200"}),r.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 shrink-0 rounded border-slate-400 text-gov-600 focus:ring-gov-200",...h("agreementAccepted")}),r.jsxs("span",{className:"text-sm leading-relaxed text-slate-600",children:[sx,r.jsx("span",{className:"mt-3 block font-bold text-slate-900",children:"You acknowledge that:"}),r.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-5",children:ax.map(z=>r.jsx("li",{children:z},z))}),r.jsx("span",{className:"mt-3 block",children:ix})]})]}),p.agreementAccepted?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:p.agreementAccepted.message}):null,r.jsx("div",{className:"mt-6",children:r.jsx(da,{label:"Taxpayer's Signature",required:!0,signature:S,signatureValue:b,signerName:h("authorizationPersonName"),signerNameCaption:"Name of authorized person",title:h("title"),date:h("agreementDate"),dateValue:v,errors:{signature:(F=p.signature)==null?void 0:F.message,signerName:(W=p.authorizationPersonName)==null?void 0:W.message,title:(H=p.title)==null?void 0:H.message,date:(ee=p.agreementDate)==null?void 0:ee.message}})})]}),r.jsx(rx,{entity:e,paymentDraft:t})]}),l?r.jsx("div",{className:"mt-5",children:r.jsx(Ht,{message:l})}):null,r.jsx(ar,{back:{label:"Back",showArrow:!0,disabled:u,onClick:()=>{Da(t),n("/payments/state/bank-details",{state:{from:o,paymentDraft:t}})}},draft:{onSave:_,onDiscard:M,disabled:u||!e},submit:{label:"Submit Payment",disabled:!e||!y,blocksDraft:!1,isSubmitting:u}})]})}function g1(){const{selectedEntity:e}=yt(),t=ke(),{paymentDraft:n}=t.state??{},s=n??ua();return s?s.bankAccountDetailId?r.jsx(hx,{entity:e,paymentDraft:s}):r.jsx(He,{to:"/payments/state/bank-details",replace:!0,state:{paymentDraft:s}}):r.jsx(He,{to:"/payments/state/new",replace:!0})}const sl="/portal/federal-payments/form-8655-authorizations";function fx(e){return he(sl,{method:"POST",body:e})}function px(e){return he(`${sl}/by-enrolment/${e}`)}function xx(e,t){return he(`${sl}/${e}`,{method:"PATCH",body:t})}async function y1(e){try{return await px(e)}catch(t){if(t instanceof dn&&t.status===404)return null;throw t}}const b1=["720","940","941","943","944","945","990-PF","990-T","1041","1042","1120","CT-1"],ii="Other";function gx(e){return e.trim()}function yx(e){const t=e.trim();return t!==""&&!b1.includes(t)}const bx="I understand that this agreement does not relieve me, as the taxpayer, of the responsibility to ensure that all tax returns are filed and that all deposits and payments are made and that I may enroll in the Electronic Federal Tax Payment System (EFTPS) to view deposits and payments made on my behalf.",vx="I further understand that this agreement does not authorize the reporting agent to sign any tax returns, to otherwise act as a legal representative of the taxpayer, or to represent the taxpayer before the IRS. I also understand that the reporting agent is not responsible for any penalties or interest that may be assessed against the taxpayer. I authorize the reporting agent to complete Form 8655, Reporting Agent Authorization, and to make deposits and payments on my behalf for the tax return(s) indicated above. I also authorize the reporting agent to receive confidential information and to perform acts as specified on Form 2848, Power of Attorney and Declaration of Representative, or Form 8821, Tax Information Authorization, as applicable.";function v1(e,t){var n,s;return{enrollmentId:e,taxpayerName:t.taxpayerName.trim(),tradeName:t.tradeName.trim(),ein:et(t.ein),address:t.address.trim(),city:t.city.trim(),state:t.state.trim(),zipCode:t.zipCode.trim(),country:t.country.trim(),isSeasonalEmployer:t.isSeasonalEmployer,otherIdentificationNumber:((n=t.otherIdentificationNumber)==null?void 0:n.trim())||null,contactPerson:t.contactPerson.trim(),daytimePhone:t.daytimePhone.trim(),faxNumber:t.faxNumber.trim(),authorizedTaxForm:t.authorizedTaxForm,authorizationStartMonth:((s=t.authorizationMonth)==null?void 0:s.trim())||null,agreementAccepted:t.agreementAccepted,taxpayerSignature:t.signature.trim()||null,taxpayerTitle:t.title.trim(),signatureDate:t.signatureDate}}function Cx(e){const{enrollmentId:t,...n}=v1(0,e);return n}function jx(e){return{taxpayerName:e.taxpayerName,tradeName:e.tradeName,ein:Aa(e.ein),address:e.address,city:e.city,state:e.state,zipCode:e.zipCode,country:e.country,isSeasonalEmployer:e.isSeasonalEmployer,otherIdentificationNumber:e.otherIdentificationNumber??"",contactPerson:e.contactPerson,daytimePhone:Ln(e.daytimePhone),faxNumber:e.faxNumber,authorizedTaxForm:e.authorizedTaxForm,authorizationMonth:e.authorizationStartMonth??"",agreementAccepted:e.agreementAccepted,signature:e.taxpayerSignature??"",title:e.taxpayerTitle,signatureDate:e.signatureDate}}const wx=mn({taxpayerName:Js("Taxpayer name"),tradeName:U().optional(),ein:Fi("EIN"),address:U().min(1,"Address is required"),city:U().min(1,"City is required"),state:U().min(1,"State is required"),zipCode:U().min(1,"ZIP code is required"),country:U().min(1,"Country is required"),isSeasonalEmployer:mr(),otherIdentificationNumber:U().optional(),contactPerson:U().optional(),daytimePhone:Gs("Daytime telephone number"),faxNumber:U().default(""),authorizedTaxForm:U().min(1,"Select a tax form"),authorizationMonth:U().optional().refine(e=>!e||/^\d{4}\/(0[1-9]|1[0-2])$/.test(e),"Enter the month as YYYY/MM (e.g. 2024/08)"),agreementAccepted:mr().refine(e=>e,{message:"You must accept the authorization agreement"}),signature:rl,title:U().min(1,"Title is required"),signatureDate:U().min(1,"Date is required")}),oi="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3";function Nx(e,t){const n=new Date().toISOString().slice(0,10);return{taxpayerName:e?cs(e):"",tradeName:(e==null?void 0:e.tradeName)??"",ein:e?Aa(e.idNumber):"",address:[e==null?void 0:e.address1,e==null?void 0:e.address2].filter(Boolean).join(", "),city:(e==null?void 0:e.city)??"",state:(e==null?void 0:e.state)??"",zipCode:(e==null?void 0:e.zipCode)??"",country:(e==null?void 0:e.country)??"United States",isSeasonalEmployer:!1,otherIdentificationNumber:"",contactPerson:"",daytimePhone:e?Ln(e.phoneNumber):"",faxNumber:"",authorizedTaxForm:gx(t.taxFormType),authorizationMonth:"",agreementAccepted:!1,signature:"",title:"",signatureDate:n}}function Sx({entity:e,paymentDraft:t,initialAuthorization:n=null,readonly:s=!1}){var Ne,ae,ge,Le,Ie,Fe,Re,ye,V,me,q,fe,be,Ye;const a=Pe(),i=ke(),o=ht(),l=$t(i.state,Je()),[c,u]=x.useState(null),[d,m]=x.useState(!1),h=x.useMemo(()=>n?jx(n):Nx(e,t),[e,n,t]),{register:f,handleSubmit:g,watch:p,setValue:v,reset:y,formState:{errors:b}}=Xt({resolver:_t(wx),defaultValues:h});x.useEffect(()=>{y(h)},[h,y]);const S=p("authorizedTaxForm"),A=yx(S),w=p("signature"),k=p("signatureDate"),M=p("state"),O=p("country"),Z=p("isSeasonalEmployer"),_=Tr(O),F=!0,W=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]})},H=async()=>{if(!e)return null;if(t.federalPaymentId){const ve=await Bo(t.federalPaymentId,_o(t));return await W(),ve}const ue=await Uo(Xo(e.entityId,t));return el({...t,federalPaymentId:ue.federalPaymentId,enrollmentId:ue.enrollmentId}),await W(),ue},ee=async(ue,ve)=>{var Xe;const at=t.form8655AuthorizationId??((Xe=await y1(ue))==null?void 0:Xe.form8655AuthorizationId),Ze=ve;return at?xx(at,Cx(Ze)):fx(v1(ue,Ze))},z=async ue=>{if(!e)return;const ve=await H();if(ve)return await ee(ve.enrollmentId,ue),await o.invalidateQueries({queryKey:["form-8655",ve.enrollmentId]}),{...t,entityId:e.entityId,federalPaymentId:ve.federalPaymentId,enrollmentId:ve.enrollmentId}},re=g(async ue=>{if(!(!e||s)){u(null),m(!0);try{const ve=await z(ue);if(!ve)return;a("/payments/federal/review",{state:{from:"/payments/federal/authorization",paymentDraft:ve}})}catch(ve){u(tt(ve,"Failed to save federal payment draft."))}finally{m(!1)}}}),te=()=>{a("/payments/federal/new",{state:{from:l,paymentDraft:t}})},ne=()=>{Mn(),a(l)},J=g(async ue=>{if(!(!e||s)){u(null),m(!0);try{await z(ue),Mn(),a(Je())}catch(ve){u(tt(ve,"Failed to save draft."))}finally{m(!1)}}});return r.jsxs("form",{onSubmit:re,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"w-full",children:[r.jsxs("div",{className:"mb-4 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!s&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:Ra,current:2})})]}),r.jsx("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("fieldset",{disabled:s,className:"min-w-0 border-0 p-0",children:[r.jsx(En,{title:"Enrollment Details",isFirst:!0,children:r.jsxs("div",{className:"w-3/4",children:[r.jsxs("div",{className:oi,children:[r.jsx($,{label:"1a) Name of the Taxpayer",required:!0,info:"The taxpayer's legal name as registered with the IRS.",error:(Ne=b.taxpayerName)==null?void 0:Ne.message,children:r.jsx("input",{placeholder:"Enter Name of the Taxpayer",className:oe(!!b.taxpayerName),...f("taxpayerName")})}),r.jsx($,{label:"1b) Trade Name, if any",error:(ae=b.tradeName)==null?void 0:ae.message,children:r.jsx("input",{placeholder:"Enter Trade Name, if any",className:oe(!!b.tradeName),...f("tradeName")})}),r.jsx($,{label:"2. Employer Identification Number (EIN)",required:!0,error:(ge=b.ein)==null?void 0:ge.message,children:r.jsx("input",{placeholder:"Enter EIN",className:oe(!!b.ein),...f("ein")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",children:[r.jsx("div",{className:"sm:col-span-2",children:r.jsx($,{label:"3a) Address (Number, Street, and Room/Suite No)",required:!0,error:(Le=b.address)==null?void 0:Le.message,children:r.jsx("input",{placeholder:"Enter Address",className:oe(!!b.address),...f("address")})})}),r.jsx($,{label:"3b) City or Town",required:!0,error:(Ie=b.city)==null?void 0:Ie.message,children:r.jsx("input",{placeholder:"Enter City or Town",className:oe(!!b.city),...f("city")})})]}),r.jsxs("div",{className:`mt-5 ${oi}`,children:[r.jsx($,{label:"3c) State",required:!0,error:(Fe=b.state)==null?void 0:Fe.message,children:r.jsx(we,{hasError:!!b.state,placeholder:"Select State",value:M,onChange:ue=>v("state",ue,{shouldValidate:!0}),options:_.map(ue=>({value:ue.code,label:ue.name}))})}),r.jsx($,{label:"3d) ZIP Code",required:!0,error:(Re=b.zipCode)==null?void 0:Re.message,children:r.jsx("input",{placeholder:"Enter ZIP Code",className:oe(!!b.zipCode),...f("zipCode")})}),r.jsx($,{label:"3e) Country",required:!0,error:(ye=b.country)==null?void 0:ye.message,children:r.jsx(we,{hasError:!!b.country,placeholder:"Select Country",value:O,onChange:ue=>v("country",ue,{shouldValidate:!0}),options:ka.map(ue=>({value:ue,label:ue}))})})]}),r.jsxs("div",{className:`mt-5 ${oi}`,children:[r.jsx($,{label:"4. Are you a Seasonal Employer",children:r.jsxs("div",{className:"flex items-center gap-6 py-2.5",children:[r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:Z===!0,onChange:()=>v("isSeasonalEmployer",!0),className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"Yes"]}),r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:Z===!1,onChange:()=>v("isSeasonalEmployer",!1),className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"No"]})]})}),r.jsx($,{label:"5. Other Identification Number (Optional)",children:r.jsx("input",{placeholder:"Enter Other Identification Number",className:oe(!1),...f("otherIdentificationNumber")})}),r.jsx($,{label:"6. Contact Person",error:(V=b.contactPerson)==null?void 0:V.message,children:r.jsx("input",{placeholder:"Enter Contact Person",className:oe(!!b.contactPerson),...f("contactPerson")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2",children:[r.jsx(Ir,{variant:"payment",label:"7. Daytime Telephone Number",required:!0,error:(me=b.daytimePhone)==null?void 0:me.message,register:f("daytimePhone")}),r.jsx($,{label:"7. Fax Number",error:(q=b.faxNumber)==null?void 0:q.message,children:r.jsx("input",{placeholder:"Enter Fax Number",className:oe(!!b.faxNumber),...f("faxNumber")})})]})]})}),r.jsxs(En,{title:r.jsxs(r.Fragment,{children:["Authorization of Reporting Agent To Make and Deposits and Payments"," ",r.jsx("span",{className:"font-normal",children:"(Caution: See Authorization Agreement.)"})]}),children:[r.jsx("p",{className:"mb-5 text-sm leading-6 text-slate-600",children:"Indicate the tax return(s) for which the reporting agent is authorized to make deposits or payments. Use the 'YYYY/MM' format to enter the month in which the authorization begins (for example, '2024/8' for August 2024)"}),r.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-3 sm:grid-cols-3 lg:grid-cols-6",children:[b1.map(ue=>r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:ue,checked:S===ue,disabled:F,onChange:()=>v("authorizedTaxForm",ue,{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),ue]},ue)),r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:ii,checked:A,disabled:F,onChange:()=>v("authorizedTaxForm",t.taxFormType.trim(),{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),A?`${ii} (${S})`:ii]})]}),b.authorizedTaxForm?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:b.authorizedTaxForm.message}):null]}),r.jsxs("section",{className:"mt-8 border-t border-slate-100 pt-8",children:[r.jsx("h3",{className:"mb-4 text-base font-semibold text-slate-900",children:"Authorization Agreement"}),r.jsxs("div",{className:"border-t border-slate-200 pt-5",children:[r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...f("agreementAccepted")}),r.jsxs("span",{className:"text-sm leading-6 text-slate-700",children:[r.jsx("span",{className:"font-semibold text-slate-900",children:bx})," ",vx]})]}),b.agreementAccepted?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:b.agreementAccepted.message}):null]})]}),r.jsx("section",{className:"mt-8 border-t border-slate-100 pt-8",children:r.jsx(da,{label:"Taxpayer's Signature",required:!0,signature:f("signature"),title:f("title"),date:f("signatureDate"),signatureValue:w,dateValue:k,errors:{signature:(fe=b.signature)==null?void 0:fe.message,title:(be=b.title)==null?void 0:be.message,date:(Ye=b.signatureDate)==null?void 0:Ye.message}})})]})})]}),c?r.jsx(Ht,{message:c}):null,r.jsx(ar,{back:{label:"Back",showArrow:!0,onClick:te,disabled:d},draft:{onSave:J,onDiscard:ne,disabled:s||!e},submit:{label:"Review and Submit",disabled:!e||s,isSubmitting:d}})]})}function C1(){const{selectedEntity:e}=yt(),t=ke(),{paymentDraft:n}=t.state??{},s=n??xs(),{data:a,isLoading:i}=ce({queryKey:["federal-payment",s==null?void 0:s.federalPaymentId],queryFn:()=>Zo(s.federalPaymentId),enabled:(s==null?void 0:s.federalPaymentId)!=null&&s.enrollmentId==null}),o=(s==null?void 0:s.enrollmentId)??(a==null?void 0:a.enrollmentId),{data:l,isLoading:c}=ce({queryKey:["form-8655",o],queryFn:()=>y1(o),enabled:o!=null}),u=x.useMemo(()=>s?{...s,enrollmentId:o??s.enrollmentId,form8655AuthorizationId:s.form8655AuthorizationId??(l==null?void 0:l.form8655AuthorizationId)}:null,[s,o,l]);return s?Jo(e)?r.jsx(He,{to:"/payments/federal/individual-enrollment",replace:!0,state:t.state}):s.federalPaymentId!=null&&s.enrollmentId==null&&i||o!=null&&c?r.jsx("p",{className:"text-sm text-slate-600",children:"Loading authorization form…"}):r.jsx(Sx,{entity:e,paymentDraft:u??s,initialAuthorization:l}):r.jsx(He,{to:"/payments/federal/new",replace:!0})}const al="/portal/federal-payments/form-9783-enrollments";function Ax(e){return he(al,{method:"POST",body:e})}function kx(e){return he(`${al}/by-enrolment/${e}`)}function Px(e,t){return he(`${al}/${e}`,{method:"PATCH",body:t})}async function j1(e){try{return await kx(e)}catch(t){if(t instanceof dn&&t.status===404)return null;throw t}}const Ex="I hereby authorize the contact person listed in item 5 on this form and financial institutions involved in the processing of my Electronic Federal Tax Payment System (EFTPS) payments to receive confidential information necessary to effect enrollment in EFTPS, electronic payment of taxes, answer inquiries and resolve issues related to enrollment and payments. This information includes, but is not limited to, passwords, payment instructions, taxpayer name and identifying number, and payment transaction details. This authorization is to remain in full force and effect until the designated Financial Agents of the U.S. Treasury have received written notification from me of termination in such time and in such manner to afford a reasonable opportunity to act on it.",Ix="By completing the financial institution information in items 9-11 on this form, I authorize designated Financial Agents of the U.S. Treasury to initiate EFTPS debit entries to the financial institution account indicated above, for payment of federal taxes owed to the IRS upon request by Taxpayer or his/her representative, using the Electronic Federal Tax Payment System (EFTPS). I further authorize the financial institution named above to debit such entries to the financial institution account indicated above. All debits initiated by the U.S. Treasury designated Financial Agents pursuant to this authorization shall be made under U.S. Treasury regulations. This authorization is to remain in full force and effect until the designated Financial Agents of the U.S. Treasury have received written notification of termination in such time and in such manner as to afford a reasonable opportunity to act on it.",Tx="If signed by a corporate officer, partner, or fiduciary on behalf of the taxpayer, I certify that I have the authority to have payments made from the taxpayer’s account. If signed by a representative of the taxpayer, I certify that I have the authority to execute this authorization on behalf of the taxpayer (i.e., authority provided by Form 2848, Power of Attorney and Declaration of Representative, or Form 8655, Reporting Agent Authorization for Magnetic Tape/Electronic Filers)",li=new Date().getFullYear(),Lx=[String(li-1),String(li-2),String(li-3)];function w1(e,t){var n,s,a,i;return{enrollmentId:e,primarySsn:et(t.primarySsn),jointFilerSsn:t.jointFilerSsn?et(t.jointFilerSsn):null,taxpayerNames:t.taxpayerNames.trim(),primaryAddress:t.primaryAddress.trim(),city:t.city.trim(),state:t.state.trim(),zipCode:t.zipCode.trim(),country:t.country.trim(),internationalAddress:((n=t.internationalAddress)==null?void 0:n.trim())||null,primaryPhone:t.primaryPhone.trim(),primaryContactName:t.primaryContactName.trim(),primaryContactAddress:t.primaryContactAddress.trim(),contactCity:t.contactCity.trim(),contactState:t.contactState.trim(),contactZipCode:t.contactZipCode.trim(),contactCountry:t.contactCountry.trim(),contactPhone:t.contactPhone.trim(),contactInternationalAddress:((s=t.contactInternationalAddress)==null?void 0:s.trim())||null,primaryTaxpayerPin:t.primaryTaxpayerPin.trim()||null,dateOfBirth:t.dateOfBirth||null,priorYearAgi:t.priorYearAgi.trim()?Number(t.priorYearAgi):null,agiTaxYear:t.agiTaxYear.trim()||null,financialPrimarySsn:et(t.financialPrimarySsn),routingTransitNumber:et(t.routingTransitNumber),accountNumber:t.accountNumber.trim(),accountType:t.accountType,disclosureAgreementOne:t.disclosureAgreementOne,disclosureAgreementTwo:t.disclosureAgreementTwo,authorityAgreement:t.authorityAgreement,taxpayerSignature:t.taxpayerSignature.trim()||null,taxpayerTitle:t.taxpayerTitle.trim(),taxpayerSignatureDate:t.taxpayerSignatureDate,jointFilerSignature:((a=t.jointFilerSignature)==null?void 0:a.trim())||null,jointFilerTitle:((i=t.jointFilerTitle)==null?void 0:i.trim())||null,jointFilerSignatureDate:t.jointFilerSignatureDate||null}}function Fx(e){const{enrollmentId:t,...n}=w1(0,e);return n}function Rx(e){var n;const t=((n=e.accountType)==null?void 0:n.toLowerCase())==="savings"?"Savings":"Checking";return{primarySsn:e.primarySsn,jointFilerSsn:e.jointFilerSsn??"",taxpayerNames:e.taxpayerNames,primaryAddress:e.primaryAddress,city:e.city,state:e.state,zipCode:e.zipCode,country:e.country,internationalAddress:e.internationalAddress??"",primaryPhone:Ln(e.primaryPhone),primaryContactName:e.primaryContactName,primaryContactAddress:e.primaryContactAddress,contactCity:e.contactCity,contactState:e.contactState,contactZipCode:e.contactZipCode,contactCountry:e.contactCountry,contactPhone:Ln(e.contactPhone),contactInternationalAddress:e.contactInternationalAddress??"",primaryTaxpayerPin:e.primaryTaxpayerPin??"",dateOfBirth:e.dateOfBirth??"",priorYearAgi:e.priorYearAgi!==null&&e.priorYearAgi!==void 0?String(e.priorYearAgi):"",agiTaxYear:e.agiTaxYear??"",financialPrimarySsn:e.financialPrimarySsn,routingTransitNumber:e.routingTransitNumber,accountNumber:e.accountNumber,accountType:t,disclosureAgreementOne:e.disclosureAgreementOne,disclosureAgreementTwo:e.disclosureAgreementTwo,authorityAgreement:e.authorityAgreement,taxpayerSignature:e.taxpayerSignature??"",taxpayerTitle:e.taxpayerTitle,taxpayerSignatureDate:e.taxpayerSignatureDate,jointFilerSignature:e.jointFilerSignature??"",jointFilerTitle:e.jointFilerTitle??"",jointFilerSignatureDate:e.jointFilerSignatureDate??""}}const Mx=mn({primarySsn:Fi("Primary SSN"),jointFilerSsn:Ed("Joint filer's SSN"),taxpayerNames:Js("Taxpayer name"),primaryAddress:U().min(1,"Primary address is required"),city:U().min(1,"City is required"),state:U().min(1,"State is required"),zipCode:U().min(1,"ZIP code is required"),country:U().min(1,"Country is required"),internationalAddress:U().optional(),primaryPhone:Gs("Primary phone number"),primaryContactName:Js("Primary contact name"),primaryContactAddress:U().min(1,"Primary contact address is required"),contactCity:U().min(1,"Contact city is required"),contactState:U().min(1,"Contact state is required"),contactZipCode:U().min(1,"Contact ZIP code is required"),contactCountry:U().min(1,"Contact country is required"),contactPhone:Gs("Contact phone number"),contactInternationalAddress:U().optional(),primaryTaxpayerPin:U().min(1,"Primary taxpayer PIN is required").regex(/^\d{5}$/,"Primary taxpayer PIN must be exactly 5 digits"),dateOfBirth:U().min(1,"Date of birth is required").refine(e=>e8(e,N1),{message:"You must be at least 18 years old"}),priorYearAgi:U().min(1,"Prior year adjusted gross income is required").refine(e=>!Number.isNaN(Number(e))&&Number(e)>=0,{message:"Enter a valid amount"}),agiTaxYear:U().min(1,"Prior tax year is required"),financialPrimarySsn:Fi("Primary SSN"),routingTransitNumber:U().min(1,"Routing transit number is required"),accountNumber:U().min(1,"Account number is required"),accountType:gd([Ya("Checking"),Ya("Savings"),Ya("")]).refine(e=>e==="Checking"||e==="Savings",{message:"Account type is required"}),disclosureAgreementOne:mr().refine(e=>e,{message:"You must accept the disclosure authorization agreement"}),disclosureAgreementTwo:mr().refine(e=>e,{message:"You must accept the disclosure authorization agreement"}),authorityAgreement:mr().refine(e=>e,{message:"You must accept the authority agreement"}),taxpayerSignature:rl,taxpayerTitle:U().min(1,"Title is required"),taxpayerSignatureDate:U().min(1,"Date is required"),jointFilerSignature:lx,jointFilerTitle:U().optional(),jointFilerSignatureDate:U().optional()}),qn="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",Dx="grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",Ox=5,N1=18;function S1(e){return e?e.toLowerCase()==="savings"?"Savings":"Checking":""}function A1(e,t){return{financialPrimarySsn:(e==null?void 0:e.idNumber)??"",routingTransitNumber:t.routingNumber??"",accountNumber:t.accountNumber??"",accountType:S1(t.accountType)}}function zx(e,t){const n=new Date().toISOString().slice(0,10),s=e?cs(e):"";return{primarySsn:(e==null?void 0:e.idNumber)??"",jointFilerSsn:"",taxpayerNames:s,primaryAddress:(e==null?void 0:e.address1)??"",city:(e==null?void 0:e.city)??"",state:(e==null?void 0:e.state)??"",zipCode:(e==null?void 0:e.zipCode)??"",country:(e==null?void 0:e.country)??"United States",internationalAddress:"",primaryPhone:e?Ln(e.phoneNumber):"",primaryContactName:"",primaryContactAddress:"",contactCity:"",contactState:"",contactZipCode:"",contactCountry:"",contactPhone:"",contactInternationalAddress:"",...A1(e,t),primaryTaxpayerPin:"",dateOfBirth:"",priorYearAgi:"",agiTaxYear:"",disclosureAgreementOne:!1,disclosureAgreementTwo:!1,authorityAgreement:!1,taxpayerSignature:"",taxpayerTitle:"",taxpayerSignatureDate:n,jointFilerSignature:"",jointFilerTitle:"",jointFilerSignatureDate:n}}function qx({entity:e,paymentDraft:t,initialEnrollment:n=null,readonly:s=!1}){var Ye,ue,ve,at,Ze,Xe,bt,Et,vt,Ct,ct,Me,It,Tt,_e,Lt,jt,j,P,C,I,R,Y,B,G;const a=Pe(),i=ke(),o=ht(),l=$t(i.state,Je()),[c,u]=x.useState(null),[d,m]=x.useState(!1),[h,f]=x.useState(!1),{data:g=[]}=ce({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>hn(e.entityId),enabled:(e==null?void 0:e.entityId)!=null}),p=x.useMemo(()=>{if(n)return Rx(n);const L=g.find(Se=>String(Se.bankAccountDetailId)===t.bankAccountDetailId),Q=A1(e,t);return{...zx(e,t),financialPrimarySsn:Q.financialPrimarySsn,routingTransitNumber:Q.routingTransitNumber||(L==null?void 0:L.routingNumber)||"",accountNumber:Q.accountNumber||(L==null?void 0:L.accountNumber)||"",accountType:S1(t.accountType||(L==null?void 0:L.accountType))}},[e,n,t,g]),{register:v,handleSubmit:y,watch:b,setValue:S,reset:A,control:w,formState:{errors:k}}=Xt({resolver:_t(Mx),defaultValues:p});x.useEffect(()=>{A(p)},[p,A]);const M=b("taxpayerSignature"),O=b("jointFilerSignature"),Z=b("taxpayerSignatureDate"),_=b("jointFilerSignatureDate"),F=b("accountType"),W=b("taxpayerNames"),H=b("primaryAddress"),ee=b("city"),z=b("state"),re=b("zipCode"),te=b("country"),ne=b("primaryPhone"),J=b("internationalAddress"),Ne=Tr(te),ae=!0,ge=x.useMemo(()=>$3(N1),[]),Le=()=>{S("primaryContactName",W,{shouldValidate:!0}),S("primaryContactAddress",H,{shouldValidate:!0}),S("contactCity",ee,{shouldValidate:!0}),S("contactState",z,{shouldValidate:!0}),S("contactZipCode",re,{shouldValidate:!0}),S("contactCountry",te,{shouldValidate:!0}),S("contactPhone",ne,{shouldValidate:!0}),S("contactInternationalAddress",J??"",{shouldValidate:!0})},Ie=()=>{S("primaryContactName","",{shouldValidate:!0}),S("primaryContactAddress","",{shouldValidate:!0}),S("contactCity","",{shouldValidate:!0}),S("contactState","",{shouldValidate:!0}),S("contactZipCode","",{shouldValidate:!0}),S("contactCountry","",{shouldValidate:!0}),S("contactPhone","",{shouldValidate:!0}),S("contactInternationalAddress","",{shouldValidate:!0})};x.useEffect(()=>{h&&Le()},[h,W,H,ee,z,re,te,ne,J]);const Fe=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]})},Re=async()=>{if(!e)return null;if(t.federalPaymentId){const Q=await Bo(t.federalPaymentId,_o(t));return await Fe(),Q}const L=await Uo(Xo(e.entityId,t));return el({...t,federalPaymentId:L.federalPaymentId,enrollmentId:L.enrollmentId}),await Fe(),L},ye=async(L,Q)=>{var ft;const Se=t.form9783EnrollmentId??((ft=await j1(L))==null?void 0:ft.form9783EnrollmentId);return Se?Px(Se,Fx(Q)):Ax(w1(L,Q))},V=async L=>{if(!e)return;const Q=await Re();if(Q)return await ye(Q.enrollmentId,L),await o.invalidateQueries({queryKey:["form-9783",Q.enrollmentId]}),{...t,entityId:e.entityId,federalPaymentId:Q.federalPaymentId,enrollmentId:Q.enrollmentId}},me=y(async L=>{if(!(!e||s)){u(null),m(!0);try{const Q=await V(L);if(!Q)return;a("/payments/federal/review",{state:{from:"/payments/federal/individual-enrollment",paymentDraft:Q}})}catch(Q){u(tt(Q,"Failed to save federal payment draft."))}finally{m(!1)}}}),q=()=>{a("/payments/federal/new",{state:{from:l,paymentDraft:t}})},fe=()=>{Mn(),a(l)},be=y(async L=>{if(!(!e||s)){u(null),m(!0);try{await V(L),Mn(),a(Je())}catch(Q){u(tt(Q,"Failed to save draft."))}finally{m(!1)}}});return r.jsxs("form",{onSubmit:me,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"w-full",children:[r.jsxs("div",{className:"mb-4 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!s&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:Ra,current:2})})]}),r.jsx("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("fieldset",{disabled:s,className:"min-w-0 border-0 p-0",children:[r.jsxs(En,{title:"1. Taxpayer Information",isFirst:!0,children:[r.jsxs("div",{className:qn,children:[r.jsx($,{label:"1a) Primary SSN",required:!0,info:"The primary taxpayer's Social Security Number.",error:(Ye=k.primarySsn)==null?void 0:Ye.message,children:r.jsx("input",{placeholder:"Enter Primary SSN",className:oe(!!k.primarySsn),...v("primarySsn")})}),r.jsx($,{label:"b) Joint Filer's Taxpayer ID No (SSN)",children:r.jsx("input",{placeholder:"Enter Joint Filer's Taxpayer ID No",className:oe(!1),...v("jointFilerSsn")})}),r.jsx($,{label:"2. Taxpayer(s) Name(s)",required:!0,error:(ue=k.taxpayerNames)==null?void 0:ue.message,children:r.jsx("input",{placeholder:"Enter Taxpayer(s) Name(s)",className:oe(!!k.taxpayerNames),...v("taxpayerNames")})})]}),r.jsxs("div",{className:`mt-5 ${qn}`,children:[r.jsx("div",{className:"sm:col-span-2 xl:col-span-2",children:r.jsx($,{label:"3a) Primary Address (Number, Street, and Room/Suite No)",required:!0,error:(ve=k.primaryAddress)==null?void 0:ve.message,children:r.jsx("input",{placeholder:"Enter Primary Address",className:oe(!!k.primaryAddress),...v("primaryAddress")})})}),r.jsx($,{label:"3b) City or Town",required:!0,error:(at=k.city)==null?void 0:at.message,children:r.jsx("input",{placeholder:"Enter City or Town",className:oe(!!k.city),...v("city")})})]}),r.jsxs("div",{className:`mt-5 ${qn}`,children:[r.jsx($,{label:"3c) State",required:!0,error:(Ze=k.state)==null?void 0:Ze.message,children:r.jsx(Ee,{name:"state",control:w,render:({field:L})=>r.jsx(we,{hasError:!!k.state,placeholder:"Select State",value:L.value??"",onChange:L.onChange,options:Ne.map(Q=>({value:Q.code,label:Q.name}))})})}),r.jsx($,{label:"3d) ZIP Code",required:!0,error:(Xe=k.zipCode)==null?void 0:Xe.message,children:r.jsx("input",{placeholder:"Enter ZIP Code",className:oe(!!k.zipCode),...v("zipCode")})}),r.jsx($,{label:"3e) Country",required:!0,error:(bt=k.country)==null?void 0:bt.message,children:r.jsx(Ee,{name:"country",control:w,render:({field:L})=>r.jsx(we,{hasError:!!k.country,placeholder:"Select Country",value:L.value??"",onChange:L.onChange,options:ka.map(Q=>({value:Q,label:Q}))})})})]}),r.jsxs("div",{className:`mt-5 ${qn}`,children:[r.jsx("div",{className:"sm:col-span-2 xl:col-span-2",children:r.jsx($,{label:"3. International Address",children:r.jsx("input",{placeholder:"Enter International Address",className:oe(!1),...v("internationalAddress")})})}),r.jsx(Ir,{variant:"payment",label:"4. Primary Taxpayer Phone Number",required:!0,error:(Et=k.primaryPhone)==null?void 0:Et.message,register:v("primaryPhone")})]})]}),r.jsxs(En,{title:"2. Contact Information",headerAction:r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:h,disabled:s,onChange:L=>{const Q=L.target.checked;f(Q),Q?Le():Ie()},className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"Same as Taxpayer Information"]}),children:[r.jsxs("div",{className:qn,children:[r.jsx($,{label:"5. Primary contact name",required:!0,error:(vt=k.primaryContactName)==null?void 0:vt.message,children:r.jsx("input",{placeholder:"Payer Name",readOnly:h,className:oe(!!k.primaryContactName,h),...v("primaryContactName")})}),r.jsx($,{label:"6a) Primary contact address",required:!0,error:(Ct=k.primaryContactAddress)==null?void 0:Ct.message,children:r.jsx("input",{placeholder:"Payer Address",readOnly:h,className:oe(!!k.primaryContactAddress,h),...v("primaryContactAddress")})}),r.jsx($,{label:"6b) City or Town",required:!0,error:(ct=k.contactCity)==null?void 0:ct.message,children:r.jsx("input",{placeholder:"City",readOnly:h,className:oe(!!k.contactCity,h),...v("contactCity")})})]}),r.jsxs("div",{className:`mt-5 ${qn}`,children:[r.jsx($,{label:"6c) State",required:!0,error:(Me=k.contactState)==null?void 0:Me.message,children:r.jsx("input",{placeholder:"Payer State",readOnly:h,className:oe(!!k.contactState,h),...v("contactState")})}),r.jsx($,{label:"6d) ZIP code",required:!0,error:(It=k.contactZipCode)==null?void 0:It.message,children:r.jsx("input",{placeholder:"ZIP code",readOnly:h,className:oe(!!k.contactZipCode,h),...v("contactZipCode")})}),r.jsx($,{label:"6f) Country",required:!0,error:(Tt=k.contactCountry)==null?void 0:Tt.message,children:r.jsx("input",{placeholder:"Country",readOnly:h,className:oe(!!k.contactCountry,h),...v("contactCountry")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx(Ir,{variant:"payment",label:"7. Primary taxpayer phone number",required:!0,error:(_e=k.contactPhone)==null?void 0:_e.message,readOnly:h,register:v("contactPhone")}),r.jsx("div",{className:"sm:col-span-2",children:r.jsx($,{label:"8. International address",children:r.jsx("input",{placeholder:"Phone Number (International number)",readOnly:h,className:oe(!1,h),...v("contactInternationalAddress")})})})]})]}),r.jsx(En,{title:"Taxpayer Details *",children:r.jsxs("div",{className:Dx,children:[r.jsx($,{label:"1. Primary Taxpayer Pin",required:!0,error:(Lt=k.primaryTaxpayerPin)==null?void 0:Lt.message,children:r.jsx(Ee,{name:"primaryTaxpayerPin",control:w,render:({field:L})=>r.jsx("input",{placeholder:"Primary Taxpayer Pin",inputMode:"numeric",className:oe(!!k.primaryTaxpayerPin),value:L.value,onChange:Q=>L.onChange(zs(Q.target.value,Ox)),onBlur:L.onBlur})})}),r.jsx($,{label:"2. Date of Birth",required:!0,error:(jt=k.dateOfBirth)==null?void 0:jt.message,children:r.jsx("input",{type:"date",max:ge,className:oe(!!k.dateOfBirth),...v("dateOfBirth")})}),r.jsx($,{label:"3. Prior year adjusted gross income",required:!0,error:(j=k.priorYearAgi)==null?void 0:j.message,children:r.jsx("input",{placeholder:"Prior Year Adjusted Gross Income",inputMode:"decimal",className:oe(!!k.priorYearAgi),...v("priorYearAgi")})}),r.jsx($,{label:"4. Prior Tax Year",required:!0,error:(P=k.agiTaxYear)==null?void 0:P.message,children:r.jsx(Ee,{name:"agiTaxYear",control:w,render:({field:L})=>r.jsx(we,{hasError:!!k.agiTaxYear,placeholder:"Select Tax Year",value:L.value??"",onChange:L.onChange,options:Lx.map(Q=>({value:String(Q),label:String(Q)}))})})})]})}),r.jsxs(En,{title:"3. Social Security Number and Financial Institution Information",children:[r.jsxs("div",{className:qn,children:[r.jsx($,{label:"9. Primary SSN",required:!0,error:(C=k.financialPrimarySsn)==null?void 0:C.message,children:r.jsx("input",{placeholder:"Enter number",readOnly:ae,className:oe(!!k.financialPrimarySsn,ae),...v("financialPrimarySsn")})}),r.jsx($,{label:"10. Routing Transit Number (RTN)",required:!0,error:(I=k.routingTransitNumber)==null?void 0:I.message,children:r.jsx("input",{placeholder:"Enter number",readOnly:ae,className:oe(!!k.routingTransitNumber,ae),...v("routingTransitNumber")})}),r.jsx($,{label:"11. Account Number",required:!0,error:(R=k.accountNumber)==null?void 0:R.message,children:r.jsx("input",{placeholder:"Enter",readOnly:ae,className:oe(!!k.accountNumber,ae),...v("accountNumber")})})]}),r.jsxs("div",{className:"mt-5",children:[r.jsx("p",{className:"mb-3 text-sm text-slate-600",children:"12. Type of Account"}),r.jsx("div",{className:"flex flex-wrap gap-6",children:["Checking","Savings"].map(L=>r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:L,checked:F===L,disabled:ae,onChange:()=>S("accountType",L,{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),L]},L))}),k.accountType?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:k.accountType.message}):null]})]}),r.jsxs("section",{className:"mt-8 border-t border-slate-100 pt-8",children:[r.jsx("h3",{className:"mb-4 text-base font-semibold text-slate-900",children:"Authorization Agreement"}),r.jsx("p",{className:"mb-5 text-sm text-slate-600",children:"Read the following authorization agreements"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Disclosure Authorization Agreement"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...v("disclosureAgreementOne")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Ex})]}),k.disclosureAgreementOne?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:k.disclosureAgreementOne.message}):null]}),r.jsxs("div",{children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Debit Authorization Agreement"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...v("disclosureAgreementTwo")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Ix})]}),k.disclosureAgreementTwo?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:k.disclosureAgreementTwo.message}):null]}),r.jsxs("div",{className:"border-t border-slate-200 pt-6",children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Authority to Execute an Authorization"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...v("authorityAgreement")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Tx})]}),k.authorityAgreement?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:k.authorityAgreement.message}):null]})]})]}),r.jsxs("section",{className:"mt-8 space-y-8 border-t border-slate-100 pt-8",children:[r.jsx(da,{label:"Taxpayer's Signature",required:!0,signature:v("taxpayerSignature"),title:v("taxpayerTitle"),date:v("taxpayerSignatureDate"),signatureValue:M,dateValue:Z,errors:{signature:(Y=k.taxpayerSignature)==null?void 0:Y.message,title:(B=k.taxpayerTitle)==null?void 0:B.message,date:(G=k.taxpayerSignatureDate)==null?void 0:G.message}}),r.jsx(da,{label:"Joint filer(s) Signature (Optional)",signature:v("jointFilerSignature"),title:v("jointFilerTitle"),date:v("jointFilerSignatureDate"),signatureValue:O??"",dateValue:_??"",signatureCaption:"Signature of joint filer"})]})]})})]}),c?r.jsx(Ht,{message:c}):null,r.jsx(ar,{back:{label:"Back",showArrow:!0,onClick:q,disabled:d},draft:{onSave:be,onDiscard:fe,disabled:s||!e},submit:{label:"Review and Submit",disabled:!e||s,isSubmitting:d}})]})}function k1(){const{selectedEntity:e}=yt(),t=ke(),{paymentDraft:n}=t.state??{},s=n??xs(),{data:a,isLoading:i}=ce({queryKey:["federal-payment",s==null?void 0:s.federalPaymentId],queryFn:()=>Zo(s.federalPaymentId),enabled:(s==null?void 0:s.federalPaymentId)!=null&&s.enrollmentId==null}),o=(s==null?void 0:s.enrollmentId)??(a==null?void 0:a.enrollmentId),{data:l,isLoading:c}=ce({queryKey:["form-9783",o],queryFn:()=>j1(o),enabled:o!=null}),u=x.useMemo(()=>s?{...s,enrollmentId:o??s.enrollmentId,form9783EnrollmentId:s.form9783EnrollmentId??(l==null?void 0:l.form9783EnrollmentId)}:null,[s,o,l]);return s?e&&!Jo(e)?r.jsx(He,{to:"/payments/federal/authorization",replace:!0,state:t.state}):s.federalPaymentId!=null&&s.enrollmentId==null&&i||o!=null&&c?r.jsx("p",{className:"text-sm text-slate-600",children:"Loading enrollment form…"}):r.jsx(qx,{entity:e,paymentDraft:u??s,initialEnrollment:l}):r.jsx(He,{to:"/payments/federal/new",replace:!0})}const Rt="—";function Vx({entityId:e,paymentDraft:t}){const{data:n=[]}=ce({queryKey:["bank-accounts",e],queryFn:()=>hn(e),enabled:e!==null}),{data:s=[]}=ce({queryKey:["federal-tax-type-codes",t.taxFormType],queryFn:()=>Am(t.taxFormType),enabled:!!t.taxFormType}),a=n.find(v=>String(v.bankAccountDetailId)===t.bankAccountDetailId),i=(a==null?void 0:a.accountNumber)??t.accountNumber,o=(a==null?void 0:a.routingNumber)??t.routingNumber,l=(a==null?void 0:a.accountType)??t.accountType,c=(a==null?void 0:a.bankName)??t.bankName,u=s.find(v=>v.code===t.taxTypeCode),d=[{label:"Taxpayer PIN",required:!0,info:"The 4-digit PIN assigned by the IRS for EFTPS enrollment.",value:t.taxpayerPin||Rt},{label:"Secondary TIN",info:"An additional Taxpayer Identification Number, if the payment requires one.",value:t.secondaryTin||Rt},{label:"Account Number",required:!0,info:"The bank account debited for this payment.",value:i?ia(i):Rt},{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",value:o||Rt},{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",value:l||Rt},{label:"Bank Name",required:!0,info:"The name of the bank, auto-filled from the selected bank account.",value:c||Rt}],m=[{label:"Tax Form Type",required:!0,info:"The federal tax form this payment applies to (e.g. 941, 944, CT-1).",value:t.taxFormType||Rt},{label:"Payment Type",required:!0,info:"The type of payment for the selected tax form.",value:u?`${u.code} - ${u.codeName}`:t.taxTypeCode||Rt},{label:"Tax Period",required:!0,info:"The tax period (month and year) this payment covers.",value:t.taxPeriod||Rt},{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the IRS.",value:t.settlementDate?Qo(t.settlementDate):Rt},{label:"Payment Amount",required:!0,info:"The total amount to remit. Must equal the sum of subcategory amounts when applicable.",value:Yi(t.paymentAmount)}],h=Ma(t.taxFormType,t.taxTypeCode),g=ps(t.taxFormType,t.taxTypeCode)?[1,2]:[1,2,3],p=[...g.map(v=>({label:`Subcategory Code ${v}`,info:`Subcategory code ${v} for the selected tax form, set automatically.`,value:t[`subcategoryCode${v}`]||Rt})),...g.map(v=>({label:`Subcategory Amount ${v}`,required:!0,info:`The amount allocated to Subcategory Code ${v}.`,value:t[`subcategoryAmount${v}`]?Yi(t[`subcategoryAmount${v}`]):Rt}))];return r.jsxs("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[r.jsx("div",{className:"border-b border-slate-200 px-6 py-4",children:r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Payment & Bank Details"})}),r.jsxs("div",{className:"px-6 py-6",children:[r.jsx(Zc,{title:"Enrollment Details",rows:d}),r.jsx(Zc,{title:"Federal Payment",rows:m,className:"mt-8"}),h?r.jsx("div",{className:"mt-8 border-t border-slate-100 pt-8",children:r.jsx(P1,{rows:p})}):null]})]})}function Zc({title:e,rows:t,className:n=""}){return r.jsxs("section",{className:n,children:[r.jsx("h4",{className:"mb-5 text-sm font-semibold text-slate-900",children:e}),r.jsx(P1,{rows:t})]})}function P1({rows:e}){return r.jsx("dl",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2 lg:grid-cols-3",children:e.map(t=>r.jsxs("div",{children:[r.jsx("dt",{children:r.jsx(mo,{label:t.label,required:t.required,info:t.info})}),r.jsx("dd",{className:"text-sm text-slate-900",children:t.value})]},t.label))})}function Zx({entity:e,paymentDraft:t}){const n=Pe(),s=ke(),a=ht(),{onPaymentRequired:i}=Yt(),[o,l]=x.useState(null),[c,u]=x.useState(!1),d=$t(s.state,Je()),m=t.federalPaymentId??null,h=async()=>{await a.invalidateQueries({queryKey:["remittance-payments"]}),await a.invalidateQueries({queryKey:["dashboard"]}),await a.invalidateQueries({queryKey:["federal-payments"]})},f=async()=>{if(m===null){l("This payment has not been saved yet. Go back and save the previous step.");return}l(null),u(!0);try{await km(m),await h(),Mn(),n("/payments")}catch(g){if(g instanceof dn&&g.status===402&&i){const p=g.extensions;i({paymentType:(p==null?void 0:p.paymentType)??"federal",paymentId:(p==null?void 0:p.paymentId)??m,expectedAmount:(p==null?void 0:p.expectedAmount)??"0.00",currency:(p==null?void 0:p.currency)??"USD",federalRecordCount:(p==null?void 0:p.federalRecordCount)??0,stateRecordCount:(p==null?void 0:p.stateRecordCount)??0,feePerFederal:(p==null?void 0:p.feePerFederal)??null,feePerState:(p==null?void 0:p.feePerState)??null});return}l(tt(g,"Failed to submit this payment. Please try again."))}finally{u(!1)}};return r.jsxs("div",{className:"w-full space-y-6",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(ir,{steps:Ra,current:3})})]}),o?r.jsx(Ht,{message:o}):null,r.jsx(Vx,{entityId:(e==null?void 0:e.entityId)??null,paymentDraft:t}),r.jsx(ar,{back:{label:"Back",showArrow:!0,onClick:()=>n(d),disabled:c},submit:{label:"Submit Payment",disabled:!e,isSubmitting:c,onClick:f}})]})}function Ux(){const{selectedEntity:e}=yt(),t=ke(),{paymentDraft:n}=t.state??{},s=n??xs();return s?r.jsx(Zx,{entity:e,paymentDraft:s}):r.jsx(He,{to:"/payments/federal/new",replace:!0})}function Bx(){return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold text-slate-900",children:"Tax Forms"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"View and download the forms filed for each entity"})]}),r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-slate-200 bg-white px-6 py-20 text-center shadow-sm",children:[r.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-gov-50 text-gov-600",children:r.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m-7 4h8a2 2 0 0 0 2-2V6.828a2 2 0 0 0-.586-1.414l-2.828-2.828A2 2 0 0 0 13.172 2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2Z"})})}),r.jsx("h2",{className:"text-base font-semibold text-slate-900",children:"Coming Soon"}),r.jsx("p",{className:"max-w-sm text-sm text-slate-500",children:"Tax Forms is still in progress. You'll be able to view and download filed forms here once it's ready."})]})]})}function Yx({entityId:e}){const[t,n]=x.useState(!1),[s,a]=x.useState(!1),[i,o]=x.useState(null),[l,c]=x.useState(1),[u,d]=x.useState(Fn);x.useEffect(()=>{c(1)},[e,u]);const{data:m=[],isLoading:h,isError:f,isFetching:g}=ce({queryKey:["bank-accounts",e],queryFn:()=>hn(e),enabled:e!==null}),p=m.length,v=m.slice((l-1)*u,l*u),y=e!==null&&g,b=f?"error":e?h?"loading":p===0?"empty":"ready":"no-entity",S=b==="error"?"Unable to load bank accounts.":b==="no-entity"?"Create an entity to manage bank accounts.":b==="loading"?"Loading bank accounts…":null;return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Bank Accounts"}),b==="ready"?r.jsx("button",{type:"button",onClick:()=>n(!0),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Bank"}):null]}),r.jsx(Ko,{open:t,onClose:()=>n(!1),onAddManually:()=>{n(!1),a(!0)}}),r.jsx($r,{open:s,entityId:e,onClose:()=>a(!1)}),r.jsx($r,{open:i!==null,entityId:e,account:i,onClose:()=>o(null)}),r.jsxs("div",{className:"relative min-h-[120px]",children:[y?r.jsx(Ia,{label:"Loading bank accounts…"}):null,S?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:S}):b==="empty"?r.jsx(d1,{onAddManually:()=>a(!0)}):r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3",children:v.map(A=>r.jsx(u1,{account:A,onEdit:o},A.bankAccountDetailId))}),b==="ready"&&p>u?r.jsx(La,{page:l,pageSize:u,totalCount:p,onPageChange:c,onPageSizeChange:d,disabled:h||g}):null]})]})}function Vn({label:e,value:t,icon:n,wide:s=!1}){return r.jsxs("div",{className:`flex items-center gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3.5 ${s?"sm:col-span-2":""}`,children:[r.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500",children:r.jsx(Wx,{icon:n})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-xs text-slate-500",children:e}),r.jsx("p",{className:"mt-0.5 break-words text-sm font-semibold text-slate-900",children:t||"—"})]})]})}function Hx({entity:e}){const t=Pe();return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Entity Details"}),e?r.jsxs("button",{type:"button",onClick:()=>t(`/entities/${e.entityId}/edit`,{state:{from:"/settings"}}),className:"inline-flex items-center gap-2 rounded-lg border border-gov-300 bg-white px-4 py-2.5 text-sm font-medium text-gov-700 transition hover:bg-gov-50",children:[r.jsx(Kx,{}),"Edit"]}):null]}),e?r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsx(Vn,{label:"Entity Name",value:cs(e),icon:"entity"}),e.entityType?r.jsx(Vn,{label:"Entity Type",value:e.entityType,icon:"type"}):null,r.jsx(Vn,{label:"Account Type",value:e.accountType,icon:"account"}),r.jsx(Vn,{label:e.accountType==="Individual"?"SSN":"Tax ID",value:$n(e.idNumber,e.accountType),icon:"tax"}),r.jsx(Vn,{label:"Email Address",value:e.email,icon:"email"}),r.jsx(Vn,{label:"Phone Number",value:_r(e.phoneNumber),icon:"phone"}),r.jsx(Vn,{label:"Address",value:Ms({address1:e.address1,address2:e.address2??"",city:e.city,state:e.state,zipCode:e.zipCode}),icon:"address",wide:!0})]}):r.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50/50 px-6 py-16 text-center",children:r.jsx("p",{className:"text-sm text-slate-500",children:"Select an entity to view its details."})})]})}function Wx({icon:e}){const n={className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.75};return e==="entity"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 21h16.5M4.5 21V6.75A1.5 1.5 0 016 5.25h6a1.5 1.5 0 011.5 1.5V21m0 0V11.25a1.5 1.5 0 011.5-1.5h2.25a1.5 1.5 0 011.5 1.5V21M7.5 8.25h3m-3 3h3m-3 3h3"})}):e==="type"||e==="account"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.075c0 1.313-.937 2.438-2.234 2.632A50.7 50.7 0 0112 21.5c-2.036 0-4.037-.12-6.016-.643A2.625 2.625 0 013.75 18.225V14.15M20.25 14.15A2.625 2.625 0 0021.75 11.7V8.7a2.625 2.625 0 00-2.625-2.625H4.875A2.625 2.625 0 002.25 8.7v3c0 1.09.663 2.03 1.5 2.45M14.25 6.075V4.5A1.5 1.5 0 0012.75 3h-1.5a1.5 1.5 0 00-1.5 1.5v1.575"})}):e==="tax"?r.jsxs("svg",{...n,children:[r.jsx("rect",{x:"2.75",y:"5.25",width:"18.5",height:"13.5",rx:"2"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.5 9.75h4.5M6.5 13h7M16 9.75h1.5"})]}):e==="phone"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})}):e==="address"?r.jsxs("svg",{...n,children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"})]}):r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})}function Kx(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zM19.5 15v4.125A1.875 1.875 0 0117.625 21H4.875A1.875 1.875 0 013 19.125V6.375A1.875 1.875 0 014.875 4.5H9"})})}function Qx({activeSection:e,onSectionChange:t,items:n}){return r.jsx("nav",{className:"space-y-2",children:n.map(s=>{const a=e===s.id,i=s.icon;return r.jsxs("button",{type:"button",onClick:()=>t(s.id),className:`flex w-full items-center gap-3 rounded-xl border px-4 py-3.5 text-left transition ${a?"border-gov-200 bg-gov-50 shadow-sm":"border-slate-200 bg-white hover:border-slate-300 hover:bg-slate-50"}`,children:[r.jsx("span",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg ${a?"bg-gov-700 text-white":"bg-slate-100 text-slate-500"}`,children:r.jsx(i,{className:"h-5 w-5"})}),r.jsx("span",{className:`min-w-0 flex-1 text-sm font-semibold ${a?"text-gov-700":"text-slate-700"}`,children:s.title}),r.jsx(Gx,{className:`h-4 w-4 shrink-0 ${a?"text-gov-600":"text-slate-300"}`})]},s.id)})})}function Gx({className:e}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}function Jx(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"97",height:"104",viewBox:"0 0 97 104",fill:"none",children:[r.jsx("path",{d:"M45.8724 102.399C69.5702 102.399 88.7823 83.1872 88.7823 59.4047C88.7823 35.6223 69.5702 16.4102 45.8724 16.4102C22.1746 16.4102 2.9624 35.6223 2.9624 59.4047C2.9624 83.1872 22.1746 102.399 45.8724 102.399Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M14.3034 31.5605H75.3253C77.7797 31.5605 79.6417 33.4225 79.6417 35.8769V74.5551C79.6417 77.0096 77.7797 78.8715 75.3253 78.8715H14.3034C11.849 78.8715 9.98706 77.0096 9.98706 74.5551V35.8769C9.98706 33.4225 12.0183 31.5605 14.3034 31.5605Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M75.4946 45.6934H55.69C53.7434 45.6934 51.8814 46.3704 50.4426 47.5553L45.2799 51.7871C43.8411 52.972 41.9791 53.6491 40.0325 53.6491H17.6889C15.4037 53.6491 13.5417 55.511 13.5417 57.7962C13.5417 57.9654 13.5417 58.2193 13.6264 58.3886L17.7735 80.2245C18.112 82.2557 19.8047 83.7791 21.9206 83.7791H69.7394C71.7706 83.7791 73.548 82.3403 73.8865 80.3091L79.6417 50.4329C80.0649 48.1478 78.5414 46.1165 76.2563 45.6934C75.9178 45.6934 75.6639 45.6934 75.4946 45.6934Z",fill:"white"}),r.jsx("path",{d:"M84.3811 39.8542H58.652C56.113 39.8542 53.7432 40.7005 51.7966 42.3086L45.0258 47.8099C43.1638 49.3333 40.7094 50.2643 38.1703 50.2643H9.05588C6.09366 50.2643 3.72388 52.7187 3.72388 55.5963C3.72388 55.8502 3.72388 56.1041 3.80851 56.358L9.14052 84.88C9.56369 87.5883 11.8488 89.5349 14.4725 89.5349H76.7639C79.4722 89.5349 81.6727 87.673 82.0959 84.9646L89.6284 45.9479C90.1362 42.9857 88.1896 40.362 85.2274 39.7695C84.9735 39.8542 84.6349 39.8542 84.3811 39.8542Z",fill:"white",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M34.616 69.3926C36.1394 69.3926 37.4089 68.123 37.4089 66.5996C37.4089 65.0762 36.1394 63.8066 34.616 63.8066C33.0925 63.8066 31.823 65.0762 31.823 66.5996C31.823 68.123 33.0925 69.3926 34.616 69.3926Z",fill:"#467CB7"}),r.jsx("path",{d:"M56.3672 69.3086C57.8906 69.3086 59.1601 68.039 59.1601 66.5156C59.1601 64.9922 57.8906 63.7227 56.3672 63.7227C54.8437 63.7227 53.5742 64.9922 53.5742 66.5156C53.5742 68.1237 54.8437 69.3086 56.3672 69.3086Z",fill:"#467CB7"}),r.jsx("path",{d:"M88.5285 87.5881C88.1899 89.0269 87.6821 90.5503 87.0897 91.8198C85.4816 94.9513 82.9426 97.4057 79.8111 99.0138C76.595 100.622 72.7864 101.299 68.9778 100.453C60.0065 98.5906 54.2513 89.7886 56.1133 80.8173C57.9753 71.846 66.6927 66.0062 75.664 67.9528C78.8801 68.6298 81.6731 70.2379 84.0428 72.4384C88.0207 76.4163 89.7134 82.1714 88.5285 87.5881Z",fill:"#B7CCE3",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M77.6105 82.763H73.802V78.9544C73.802 78.1927 73.2095 77.5156 72.3632 77.5156C71.6015 77.5156 70.9244 78.1081 70.9244 78.9544V82.763H67.1158C66.3541 82.763 65.677 83.3554 65.677 84.2018C65.677 85.0481 66.2695 85.6406 67.1158 85.6406H70.9244V89.4492C70.9244 90.2109 71.5168 90.888 72.3632 90.888C73.1249 90.888 73.802 90.2955 73.802 89.4492V85.6406H77.6105C78.3723 85.6406 79.0493 85.0481 79.0493 84.2018C79.0493 83.3554 78.3723 82.763 77.6105 82.763Z",fill:"white",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M42.0637 49.334C39.0169 43.4095 38.3398 36.3002 40.371 29.8679C42.3177 23.4356 46.9726 17.9344 52.7278 14.8029C54.5051 13.8719 56.5363 13.1102 58.5676 13.0255C60.5988 12.9409 62.7993 13.618 64.1535 15.3107C65.5076 16.8341 65.7616 19.3732 64.6613 21.0659C63.4764 22.6739 61.1066 23.351 59.16 22.8432C56.0285 22.2508 53.4895 19.7963 52.7278 16.8341C51.966 13.8719 52.9817 10.4019 55.3514 8.45525C56.8749 7.10109 58.9908 6.33937 60.9374 5.74692C70.4165 2.95397 80.742 2.61543 90.3903 4.7313",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10","stroke-dasharray":"3.39 3.39"}),r.jsx("path",{d:"M48.1573 72.3535H42.9099V73.623H48.1573V72.3535Z",fill:"#467CB7"}),r.jsx("path",{d:"M95.4683 2.53033C95.3836 3.79985 95.299 4.98474 94.368 5.23865C93.437 5.49255 93.0138 4.6462 92.4214 3.46131C91.829 2.36106 92.1675 1.17617 93.1831 0.922262C94.1141 0.668357 95.6375 1.0069 95.4683 2.53033Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M94.4527 8.62515C94.7066 7.10172 94.9605 6.25537 94.1141 5.83219C93.1832 5.40902 92.5907 6.17073 91.5751 7.18635C90.7287 8.11734 91.2366 9.4715 92.0829 9.89468C93.0985 10.4025 94.1988 9.89468 94.4527 8.62515Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M95.6377 5.83066C95.5531 6.42311 95.1299 6.84628 94.5375 6.93092C94.2836 6.93092 94.0297 6.93092 93.6911 6.93092C92.5062 6.76165 91.5753 5.99993 91.6599 5.23822C91.7445 4.4765 92.8448 4.05333 94.1989 4.2226C94.4528 4.2226 94.7067 4.30723 94.876 4.39187C95.3838 4.56114 95.7224 5.15358 95.6377 5.83066C95.6377 5.83066 95.6377 5.74603 95.6377 5.83066Z",fill:"#F1F3FA"}),r.jsx("path",{d:"M95.6377 5.83066C95.5531 6.42311 95.1299 6.84628 94.5375 6.93092C94.2836 6.93092 94.0297 6.93092 93.6911 6.93092C92.5062 6.76165 91.5753 5.99993 91.6599 5.23822C91.7445 4.4765 92.8448 4.05333 94.1989 4.2226C94.4528 4.2226 94.7067 4.30723 94.876 4.39187C95.3838 4.56114 95.7224 5.15358 95.6377 5.83066ZM95.6377 5.83066C95.6377 5.74603 95.6377 5.83066 95.6377 5.83066Z",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M1.18481 29.6144C1.18481 28.1756 1.18481 26.7368 2.20043 26.3137C3.30069 25.8905 3.89314 26.9061 4.73949 28.3449C5.5012 29.6144 5.16266 30.9686 4.06241 31.3918C3.13142 31.8149 1.18481 31.561 1.18481 29.6144Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M1.77747 22.5051C1.6082 24.2824 1.35429 25.298 2.45455 25.7212C3.5548 26.1444 4.14725 25.2134 5.2475 23.8592C6.09385 22.6744 5.50141 21.1509 4.40115 20.7278C3.3009 20.3046 1.94674 21.0663 1.77747 22.5051Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M0.846436 25.8896C0.846436 25.2126 1.35425 24.7048 1.94669 24.6201C2.2006 24.5355 2.53914 24.5355 2.87768 24.6201C4.23184 24.7048 5.41673 25.4665 5.33209 26.3128C5.24746 27.1592 4.1472 27.7516 2.70841 27.5823C2.4545 27.5823 2.2006 27.4977 1.94669 27.4131C1.26961 27.3284 0.846436 26.6514 0.846436 25.8896Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M6.60156 26.1445C15.4882 26.1445 31.9074 31.3073 32.1613 50.2655",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10","stroke-dasharray":"3.39 3.39"})]})}const Xx=["Active","Inactive"],_x="United States",$x=mn({state:U().min(1,"State is required"),reasonForPayment:U().min(1,"Reason for payment is required"),stateAccountId:U().min(1,"State ID is required"),accountId:U().min(1,"Account ID is required").refine(e=>/^\d{10,12}$/.test(e.trim()),"Account ID must be 10 to 12 digits"),taxYear:U().min(1,"Tax year is required"),frequency:U().optional(),status:U().min(1,"Status is required"),notes:U().optional()}),Uc={state:"",reasonForPayment:"",accountId:"",stateAccountId:"",taxYear:"",frequency:"",status:"Active",notes:""};function Bc(e){return{state:e.state,reasonForPayment:e.reasonForPayment,accountId:e.accountId,stateAccountId:e.stateAccountId,taxYear:e.taxYear??"",frequency:e.frequency??"",status:e.status,notes:e.notes??""}}const ci=e=>{const t=e==null?void 0:e.trim();return t||null};function eg({open:e,entityId:t,account:n,readOnly:s=!1,onClose:a}){var Ie,Fe,Re,ye,V,me;const{showSuccess:i,showError:o}=ya(),l=ht(),c=n!=null,[u,d]=x.useState(null),[m,h]=x.useState(!1),{register:f,handleSubmit:g,watch:p,reset:v,setValue:y,formState:{errors:b}}=Xt({resolver:_t($x),defaultValues:n?Bc(n):Uc});x.useEffect(()=>{e&&(d(null),v(n?Bc(n):Uc))},[e,n,v]);const S=p("state"),A=p("reasonForPayment"),w=p("taxYear"),k=p("frequency"),M=p("status"),O=Tr(_x),{data:Z=[],isLoading:_}=ce({queryKey:["state-payment-reasons",t,S],queryFn:()=>Yo(t,S),enabled:e&&t!==null&&S.length>0}),{data:F}=ce({queryKey:["state-payment-validation-metadata",t,S,A],queryFn:()=>Ho(t,S,A),enabled:e&&t!==null&&S.length>0&&A.length>0}),W=(F==null?void 0:F.taxYearOptions)??[],H=(F==null?void 0:F.frequencyMode)??null,ee=(F==null?void 0:F.frequencyOptions)??[],z=H!==null&&H!=="NotApplicable",re=(F==null?void 0:F.stateId.pattern)??null,te=$m(re),ne=Xm(re),J=q=>{q!==S&&(y("state",q,{shouldValidate:!0}),y("reasonForPayment",""),y("stateAccountId",""),y("taxYear",""),y("frequency",""))},Ne=q=>{q!==A&&(y("reasonForPayment",q,{shouldValidate:!0}),y("stateAccountId",""),y("taxYear",""),y("frequency",""))},ae=f("stateAccountId"),ge=f("accountId"),Le=g(async q=>{if(t!==null){d(null),h(!0);try{const fe={state:q.state,reasonForPayment:q.reasonForPayment,stateAccountId:q.stateAccountId.trim().toUpperCase(),accountId:q.accountId.trim(),taxYear:ci(q.taxYear),frequency:ci(q.frequency),notes:ci(q.notes)};c?await P8(n.taxAccountDetailId,{...fe,status:q.status}):await k8({entityId:t,...fe,status:q.status}),await l.invalidateQueries({queryKey:["tax-accounts",t]}),i(c?"Tax Account Updated Successfully":"Tax Account Added Successfully"),a()}catch(fe){const be=tt(fe,"Unable to save tax account. Please try again.");d(be),o("Action Not Completed",be)}finally{h(!1)}}});return r.jsx(Lm,{open:e,title:s?"View Tax Account":c?"Edit Tax Account":"Add Tax Account",onClose:a,labelledById:"tax-account-drawer-title",footer:s?r.jsx("button",{type:"button",onClick:a,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50",children:"Close"}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:a,disabled:m,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:opacity-60",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>void Le(),disabled:m||t===null,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:m?"Saving…":c?"Save":"Add"})]}),children:r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx($,{label:"State",required:!0,info:"The tax jurisdiction this account is registered in.",error:(Ie=b.state)==null?void 0:Ie.message,children:r.jsx(we,{disabled:s,hasError:!!b.state,placeholder:"Select State",value:S,onChange:J,options:O.map(q=>({value:q.code,label:q.name}))})}),r.jsx($,{label:"Reason for Payment",required:!0,info:"The reason for this state tax payment, filtered by the selected state and entity.",error:(Fe=b.reasonForPayment)==null?void 0:Fe.message,children:r.jsx(we,{disabled:s||!S||_,hasError:!!b.reasonForPayment,loading:_,loadingLabel:"Loading reasons…",placeholder:"Select Reason for Payment",value:A,onChange:Ne,options:Z.map(q=>({value:q.label,label:q.label}))})})]}),r.jsxs("div",{className:"rounded-xl border border-slate-200 p-5",children:[r.jsx("h4",{className:"mb-4 text-sm font-semibold text-slate-900",children:"Account Information"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx($,{label:"State Tax ID",required:!0,info:"Your state-issued tax account identifier for the selected state.",error:(Re=b.stateAccountId)==null?void 0:Re.message,children:r.jsx("input",{disabled:s,placeholder:(F==null?void 0:F.stateId.example)??"Enter State Tax ID",maxLength:te,className:oe(!!b.stateAccountId,s),...ae,onChange:q=>{q.target.value=ne?_m(q.target.value,ne):Jm(q.target.value,re),ae.onChange(q)}})}),r.jsx($,{label:"Account ID",required:!0,info:"Your 10 to 12 digit state tax account number.",error:(ye=b.accountId)==null?void 0:ye.message,children:r.jsx("input",{disabled:s,inputMode:"numeric",placeholder:"Enter Account ID",maxLength:12,className:oe(!!b.accountId,s),...ge,onChange:q=>{q.target.value=q.target.value.replace(/\D/g,"").slice(0,12),ge.onChange(q)}})}),r.jsx($,{label:"Tax Year",required:!0,info:"The tax year this account applies to.",error:(V=b.taxYear)==null?void 0:V.message,children:r.jsx(we,{disabled:s||!A,hasError:!!b.taxYear,placeholder:A?"Select Tax Year":"Select a reason first",value:w,onChange:q=>y("taxYear",q,{shouldValidate:!0}),options:W.map(q=>({value:String(q),label:`TY ${q}`}))})}),z?r.jsxs($,{label:"Frequency",info:"How often this account's payments are deposited.",children:[r.jsx(we,{disabled:s||!A,placeholder:A?"Select Frequency":"Select a reason first",value:k??"",onChange:q=>y("frequency",q,{shouldValidate:!0}),options:ee.map(q=>({value:q.code,label:q.label}))}),c&&(n==null?void 0:n.frequencyValid)===!1?r.jsx("p",{className:"mt-1.5 text-xs text-amber-700",children:n.frequencyValidationMessage??"Please confirm the deposit frequency for this state tax account."}):null]}):null]})]}),r.jsx(we,{id:"tax-account-status",label:"Status",required:!0,disabled:s,error:(me=b.status)==null?void 0:me.message,placeholder:"Select Status",value:M,onChange:q=>y("status",q,{shouldValidate:!0}),options:Xx.map(q=>({value:q,label:q}))}),r.jsxs("div",{children:[r.jsx(ls,{label:"Notes",htmlFor:"tax-account-notes"}),r.jsx("textarea",{id:"tax-account-notes",rows:4,disabled:s,placeholder:"Enter Notes",className:"block w-full resize-y rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:cursor-default disabled:bg-slate-50 disabled:text-slate-500",...f("notes")})]}),u?r.jsx(Ht,{message:u}):null]})})}const tg={Monthly:"Monthly",Quarterly:"Quarterly","Semi-annually":"SemiAnnually",Annually:"Annually"},ng=Object.fromEntries(Object.entries(tg).map(([e,t])=>[t,e])),rg={ANNUAL:"Annual",MONTHLY:"Monthly",QUARTERLY:"Quarterly",SEMI_ANNUAL:"Semi-annual",WEEKLY:"Weekly",SEMI_WEEKLY:"Semi-weekly",SEMI_MONTHLY:"Semi-monthly",EARLY:"Early",ACCELERATED:"Accelerated",DEPOSITORY:"Depository",NEXT_BANKING_DAY:"Next banking day"};function sg(e){return e?ng[e]??rg[e]??e:null}const E1="—";function ag(e){return e.status.trim().toLowerCase()==="active"}function ig(e){return sg(e)??E1}function og(e){const t=new Map;for(const n of e){const s=n.state||"Other",a=t.get(s);a?a.push(n):t.set(s,[n])}return[...t.entries()].map(([n,s])=>({state:n,accounts:s}))}function lg({entityId:e}){const[t,n]=x.useState(1),[s,a]=x.useState(Fn),[i,o]=x.useState({}),[l,c]=x.useState(null);x.useEffect(()=>{n(1)},[e,s]);const{data:u,isLoading:d,isError:m}=ce({queryKey:["tax-accounts",e,t,s],queryFn:()=>Qm({entityId:e,pageNumber:t,pageSize:s}),enabled:e!==null}),h=x.useMemo(()=>(u==null?void 0:u.items)??[],[u]),f=(u==null?void 0:u.totalCount)??0,g=x.useMemo(()=>og(h),[h]),p=m?"Unable to load tax accounts.":e?d?"Loading tax accounts…":null:"Create an entity to manage tax accounts.",v=p===null&&h.length===0,y=b=>{o(S=>({...S,[b]:!S[b]}))};return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Tax Accounts"}),r.jsx("button",{type:"button",disabled:!e,onClick:()=>c({mode:"create"}),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:"Add Tax Account"})]}),p?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:p}):v?r.jsxs("div",{className:"flex flex-col items-center justify-center py-24",children:[r.jsx(Jx,{}),r.jsx("p",{className:"mt-4 text-base text-slate-700",children:"No Tax Accounts Yet"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"mb-4 text-sm text-slate-700",children:["State Tax Accounts (",g.length,")"]}),r.jsx("div",{className:"space-y-4",children:g.map(b=>{const S=i[b.state]===!0;return r.jsxs("div",{className:"overflow-hidden rounded-xl border border-slate-200",children:[r.jsxs("button",{type:"button","aria-expanded":!S,onClick:()=>y(b.state),className:"flex w-full items-center justify-between gap-3 bg-slate-50/70 px-4 py-3.5 text-left transition hover:bg-slate-100/70",children:[r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(cg,{expanded:!S}),r.jsx("span",{className:"text-base font-bold text-slate-900",children:b.state})]}),r.jsxs("span",{className:"text-sm text-slate-500",children:[b.accounts.length," ",b.accounts.length===1?"Account":"Accounts"]})]}),S?null:r.jsx("div",{className:"overflow-x-auto border-t border-slate-200",children:r.jsxs("table",{className:"w-full min-w-190 text-left text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-200 text-xs font-semibold text-slate-700",children:[r.jsx("th",{className:"px-5 py-3",children:"Reason for Payment"}),r.jsx("th",{className:"px-5 py-3",children:"Account ID"}),r.jsx("th",{className:"px-5 py-3",children:"State Tax ID"}),r.jsx("th",{className:"px-5 py-3",children:"Tax Year"}),r.jsx("th",{className:"px-5 py-3",children:"Frequency"}),r.jsx("th",{className:"px-5 py-3",children:"Status"}),r.jsx("th",{className:"px-5 py-3",children:"Action"})]})}),r.jsx("tbody",{children:b.accounts.map(A=>{var w,k;return r.jsxs("tr",{className:"border-b border-slate-100 last:border-0",children:[r.jsx("td",{className:"px-5 py-4 text-slate-700",children:A.reasonForPayment}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:A.accountId}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:A.stateAccountId}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:A.taxYear??E1}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:r.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[ig(A.frequency),A.frequencyValid?null:r.jsx("span",{title:A.frequencyValidationMessage??"Please confirm the deposit frequency for this state tax account.",children:r.jsx(ug,{})})]})}),r.jsx("td",{className:"px-5 py-4",children:r.jsx(qo,{active:ag(A),variant:"outline"})}),r.jsx("td",{className:"px-5 py-4",children:r.jsxs("div",{className:"flex items-center justify-end gap-2",children:[r.jsx("span",{title:((w=A.notes)==null?void 0:w.trim())||"No notes added",className:`rounded-md p-1 ${(k=A.notes)!=null&&k.trim()?"text-slate-400":"text-slate-300"}`,children:r.jsx(hg,{})}),r.jsx("button",{type:"button","aria-label":`View ${b.state} tax account`,onClick:()=>c({mode:"view",account:A}),className:"rounded-md p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(mg,{})}),r.jsx("button",{type:"button","aria-label":`Edit ${b.state} tax account`,onClick:()=>c({mode:"edit",account:A}),className:"rounded-md p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(dg,{})})]})})]},A.taxAccountDetailId)})})]})})]},b.state)})}),f>s?r.jsx(La,{page:t,pageSize:s,totalCount:f,onPageChange:n,onPageSizeChange:a,disabled:d}):null]}),r.jsx(eg,{open:l!==null,entityId:e,account:(l==null?void 0:l.mode)==="edit"||(l==null?void 0:l.mode)==="view"?l.account:null,readOnly:(l==null?void 0:l.mode)==="view",onClose:()=>c(null)})]})}function cg({expanded:e}){return r.jsx("svg",{className:`h-4 w-4 shrink-0 text-slate-500 transition ${e?"":"-rotate-90"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function ug(){return r.jsx("svg",{className:"h-4 w-4 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}function dg(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931z"})})}function mg(){return r.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function hg(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}const fg=[{id:"bank-accounts",title:"Bank Accounts",subtitle:"Connected bank accounts",icon:pg},{id:"tax-accounts",title:"Tax Accounts",subtitle:"IRS & state tax accounts",icon:xg},{id:"entity-details",title:"Entity Details",subtitle:"Your account details",icon:gg}];function pg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})})}function xg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 21h18M12 3l9 4.5v1.5H3V7.5L12 3z"})})}function gg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}const Yc="rounded-2xl border border-slate-200 bg-white shadow-sm";function yg(e){return e==="bank-accounts"||e==="tax-accounts"||e==="entity-details"}function il(){const{selectedEntity:e}=yt(),n=ke().state,[s,a]=x.useState(yg(n==null?void 0:n.section)?n.section:"bank-accounts");return r.jsxs("div",{className:"grid items-start gap-5 lg:grid-cols-[300px_minmax(0,1fr)]",children:[r.jsx("div",{className:`${Yc} p-3`,children:r.jsx(Qx,{items:fg,activeSection:s,onSectionChange:a})}),r.jsx("div",{className:`${Yc} p-6 lg:p-8`,children:s==="bank-accounts"?r.jsx(Yx,{entityId:(e==null?void 0:e.entityId)??null}):s==="tax-accounts"?r.jsx(lg,{entityId:(e==null?void 0:e.entityId)??null}):r.jsx(Hx,{entity:e})})]})}function bg({paymentsMode:e="all"}){return r.jsxs(_i,{children:[r.jsx(ie,{index:!0,element:r.jsx(lo,{})}),r.jsx(ie,{path:"create-entity",element:r.jsx(uo,{})}),r.jsx(ie,{path:"create-entity/form",element:r.jsx(Ro,{})}),r.jsx(ie,{path:"entities/:entityId/edit",element:r.jsx(L9,{})}),r.jsxs(ie,{element:r.jsx(co,{}),children:[r.jsx(ie,{path:"entities",element:r.jsx(Vo,{})}),r.jsx(ie,{path:"dashboard",element:r.jsx(Oo,{})}),r.jsx(ie,{path:"payments",element:r.jsx(Wo,{paymentsMode:e})}),r.jsx(ie,{path:"payments/federal/new",element:r.jsx(Ym,{})}),r.jsx(ie,{path:"payments/federal/:federalPaymentId/edit",element:r.jsx(Wm,{})}),r.jsx(ie,{path:"payments/federal/:federalPaymentId/view",element:r.jsx(Km,{})}),r.jsx(ie,{path:"payments/state/new",element:r.jsx(o1,{})}),r.jsx(ie,{path:"payments/state/:statePaymentId/edit",element:r.jsx(l1,{})}),r.jsx(ie,{path:"payments/state/:statePaymentId/view",element:r.jsx(c1,{})}),r.jsx(ie,{path:"payments/state/bank-details",element:r.jsx(m1,{})}),r.jsx(ie,{path:"payments/state/authorization",element:r.jsx(g1,{})}),r.jsx(ie,{path:"payments/federal/authorization",element:r.jsx(C1,{})}),r.jsx(ie,{path:"payments/federal/individual-enrollment",element:r.jsx(k1,{})}),r.jsx(ie,{path:"payments/federal/review",element:r.jsx(Ux,{})}),r.jsx(ie,{path:"tax-forms",element:r.jsx(Bx,{})}),r.jsx(ie,{path:"settings",element:r.jsx(il,{})})]}),r.jsx(ie,{path:"*",element:r.jsx(He,{to:"/",replace:!0})})]})}const Wi="tax-remittance:payment-complete",vg=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent(Wi,{detail:{paymentId:i}}))}})),r.jsx(oo,{...t,navigateFnRef:s,selectEntityFnRef:a,onPaymentRequired:t.onPaymentRequired,children:r.jsx(bg,{paymentsMode:"all"})})}),Cg=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent("tax-remittance:payment-complete",{detail:{paymentId:i}}))}})),r.jsx(oo,{...t,navigateFnRef:s,selectEntityFnRef:a,enabledPayments:["federal"],children:r.jsxs(_i,{children:[r.jsx(ie,{index:!0,element:r.jsx(lo,{})}),r.jsx(ie,{path:"create-entity",element:r.jsx(uo,{})}),r.jsx(ie,{path:"create-entity/form",element:r.jsx(Ro,{})}),r.jsxs(ie,{element:r.jsx(co,{}),children:[r.jsx(ie,{path:"entities",element:r.jsx(Vo,{})}),r.jsx(ie,{path:"dashboard",element:r.jsx(Oo,{})}),r.jsx(ie,{path:"payments",element:r.jsx(Wo,{paymentsMode:"federal"})}),r.jsx(ie,{path:"payments/federal/new",element:r.jsx(Ym,{})}),r.jsx(ie,{path:"payments/federal/:federalPaymentId/edit",element:r.jsx(Wm,{})}),r.jsx(ie,{path:"payments/federal/:federalPaymentId/view",element:r.jsx(Km,{})}),r.jsx(ie,{path:"payments/federal/authorization",element:r.jsx(C1,{})}),r.jsx(ie,{path:"payments/federal/individual-enrollment",element:r.jsx(k1,{})}),r.jsx(ie,{path:"settings",element:r.jsx(il,{})})]}),r.jsx(ie,{path:"*",element:r.jsx(He,{to:"/",replace:!0})})]})})}),jg=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent("tax-remittance:payment-complete",{detail:{paymentId:i}}))}})),r.jsx(oo,{...t,navigateFnRef:s,selectEntityFnRef:a,enabledPayments:["state"],children:r.jsxs(_i,{children:[r.jsx(ie,{index:!0,element:r.jsx(lo,{})}),r.jsx(ie,{path:"create-entity",element:r.jsx(uo,{})}),r.jsx(ie,{path:"create-entity/form",element:r.jsx(Ro,{})}),r.jsxs(ie,{element:r.jsx(co,{}),children:[r.jsx(ie,{path:"entities",element:r.jsx(Vo,{})}),r.jsx(ie,{path:"dashboard",element:r.jsx(Oo,{})}),r.jsx(ie,{path:"payments",element:r.jsx(Wo,{paymentsMode:"state"})}),r.jsx(ie,{path:"payments/state/new",element:r.jsx(o1,{})}),r.jsx(ie,{path:"payments/state/:statePaymentId/edit",element:r.jsx(l1,{})}),r.jsx(ie,{path:"payments/state/:statePaymentId/view",element:r.jsx(c1,{})}),r.jsx(ie,{path:"payments/state/bank-details",element:r.jsx(m1,{})}),r.jsx(ie,{path:"payments/state/authorization",element:r.jsx(g1,{})}),r.jsx(ie,{path:"settings",element:r.jsx(il,{})})]}),r.jsx(ie,{path:"*",element:r.jsx(He,{to:"/",replace:!0})})]})})});exports.ApiError=dn;exports.EMAIL_INVALID_MESSAGE=Pd;exports.EMAIL_MAX_LENGTH=Li;exports.EMAIL_PATTERN=kd;exports.FederalPaymentWidget=Cg;exports.MASK_CHAR=jo;exports.NAME_MAX_LENGTH=Ip;exports.PHONE_COUNTRY_CODE=Pr;exports.PHONE_NATIONAL_DIGIT_LENGTH=kr;exports.StatePaymentWidget=jg;exports.TAXPAYER_ID_DIGIT_LENGTH=Bt;exports.TAXPAYER_ID_MAX_INPUT_LENGTH=vd;exports.TaxRemittanceEmbedded=vg;exports.digitsOnly=et;exports.formatEin=Aa;exports.formatIdNumber=$n;exports.formatIdNumberInput=Xr;exports.formatPhone=_r;exports.formatPhoneInput=Ad;exports.formatPhoneNumberInput=Ln;exports.formatSsn=wd;exports.maskEin=Nd;exports.maskIdNumber=Hr;exports.maskSsn=Sd;exports.setRuntimeApiBaseUrl=Du;exports.taxpayerIdInputHints=Co;exports.taxpayerIdLabelFor=Cd;exports.toNationalPhoneDigits=Er;exports.validateEmail=No;exports.validateName=So;exports.validateOptionalTaxpayerId=jd;exports.validatePhone=wo;exports.validateTaxpayerId=us;
|
|
75
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const m=d[1];if(t===d[0]){i(d);continue}if(e.external){const f=(c=e.external.registry.get(d[0]))==null?void 0:c.id;if(t!==d[0]&&f){i(d);continue}}if((u=e.metadataRegistry.get(d[0]))==null?void 0:u.id){i(d);continue}if(m.cycle){i(d);continue}if(m.count>1&&e.reused==="ref"){i(d);continue}}}function bd(e,t){var l,c,u,d;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=m=>{const h=e.seen.get(m);if(h.ref===null)return;const f=h.def??h.schema,y={...f},p=h.ref;if(h.ref=null,p){s(p);const C=e.seen.get(p),g=C.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(g)):Object.assign(f,g),Object.assign(f,y),m._zod.parent===p)for(const j in f)j==="$ref"||j==="allOf"||j in y||delete f[j];if(g.$ref&&C.def)for(const j in f)j==="$ref"||j==="allOf"||j in C.def&&JSON.stringify(f[j])===JSON.stringify(C.def[j])&&delete f[j]}const b=m._zod.parent;if(b&&b!==p){s(b);const C=e.seen.get(b);if(C!=null&&C.schema.$ref&&(f.$ref=C.schema.$ref,C.def))for(const g in f)g==="$ref"||g==="allOf"||g in C.def&&JSON.stringify(f[g])===JSON.stringify(C.def[g])&&delete f[g]}e.override({zodSchema:m,jsonSchema:f,path:h.path??[]})};for(const m of[...e.seen.entries()].reverse())s(m[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const m=(c=e.external.registry.get(t))==null?void 0:c.id;if(!m)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(m)}Object.assign(a,n.def??n.schema);const i=(u=e.metadataRegistry.get(t))==null?void 0:u.id;i!==void 0&&a.id===i&&delete a.id;const o=((d=e.external)==null?void 0:d.defs)??{};for(const m of e.seen.entries()){const h=m[1];h.def&&h.defId&&(h.def.id===h.defId&&delete h.def.id,o[h.defId]=h.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?a.$defs=o:a.definitions=o);try{const m=JSON.parse(JSON.stringify(a));return Object.defineProperty(m,"~standard",{value:{...t["~standard"],jsonSchema:{input:_s(t,"input",e.processors),output:_s(t,"output",e.processors)}},enumerable:!1,writable:!1}),m}catch{throw new Error("Error converting schema to JSON.")}}function dt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return dt(s.element,n);if(s.type==="set")return dt(s.valueType,n);if(s.type==="lazy")return dt(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return dt(s.innerType,n);if(s.type==="intersection")return dt(s.left,n)||dt(s.right,n);if(s.type==="record"||s.type==="map")return dt(s.keyType,n)||dt(s.valueType,n);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:dt(s.in,n)||dt(s.out,n);if(s.type==="object"){for(const a in s.shape)if(dt(s.shape[a],n))return!0;return!1}if(s.type==="union"){for(const a of s.options)if(dt(a,n))return!0;return!1}if(s.type==="tuple"){for(const a of s.items)if(dt(a,n))return!0;return!!(s.rest&&dt(s.rest,n))}return!1}const $6=(e,t={})=>n=>{const s=gd({...n,processors:t});return at(e,s),yd(s,e),bd(s,e)},_s=(e,t,n={})=>s=>{const{libraryOptions:a,target:i}=s??{},o=gd({...a??{},target:i,io:t,processors:n});return at(e,o),yd(o,e),bd(o,e)},ep={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tp=(e,t,n,s)=>{const a=n;a.type="string";const{minimum:i,maximum:o,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof o=="number"&&(a.maxLength=o),l&&(a.format=ep[l]??l,a.format===""&&delete a.format,l==="time"&&delete a.format),u&&(a.contentEncoding=u),c&&c.size>0){const d=[...c];d.length===1?a.pattern=d[0].source:d.length>1&&(a.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},np=(e,t,n,s)=>{n.type="boolean"},rp=(e,t,n,s)=>{n.not={}},sp=(e,t,n,s)=>{},ap=(e,t,n,s)=>{const a=e._zod.def,i=rd(a.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},ip=(e,t,n,s)=>{const a=e._zod.def,i=[];for(const o of a.values)if(o===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(o))}else i.push(o);if(i.length!==0)if(i.length===1){const o=i[0];n.type=o===null?"null":typeof o,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[o]:n.const=o}else i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),i.every(o=>typeof o=="boolean")&&(n.type="boolean"),i.every(o=>o===null)&&(n.type="null"),n.enum=i},op=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},lp=(e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},cp=(e,t,n,s)=>{const a=n,i=e._zod.def,{minimum:o,maximum:l}=e._zod.bag;typeof o=="number"&&(a.minItems=o),typeof l=="number"&&(a.maxItems=l),a.type="array",a.items=at(i.element,t,{...s,path:[...s.path,"items"]})},up=(e,t,n,s)=>{var u;const a=n,i=e._zod.def;a.type="object",a.properties={};const o=i.shape;for(const d in o)a.properties[d]=at(o[d],t,{...s,path:[...s.path,"properties",d]});const l=new Set(Object.keys(o)),c=new Set([...l].filter(d=>{const m=i.shape[d]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));c.size>0&&(a.required=Array.from(c)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=at(i.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},dp=(e,t,n,s)=>{const a=e._zod.def,i=a.inclusive===!1,o=a.options.map((l,c)=>at(l,t,{...s,path:[...s.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=o:n.anyOf=o},mp=(e,t,n,s)=>{const a=e._zod.def,i=at(a.left,t,{...s,path:[...s.path,"allOf",0]}),o=at(a.right,t,{...s,path:[...s.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(i)?i.allOf:[i],...l(o)?o.allOf:[o]];n.allOf=c},hp=(e,t,n,s)=>{const a=e._zod.def,i=at(a.innerType,t,s),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},fp=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType},pp=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},xp=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},gp=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType;let o;try{o=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},yp=(e,t,n,s)=>{const a=e._zod.def,i=a.in._zod.traits.has("$ZodTransform"),o=t.io==="input"?i?a.out:a.in:a.out;at(o,t,s);const l=t.seen.get(e);l.ref=o},bp=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},vd=(e,t,n,s)=>{const a=e._zod.def;at(a.innerType,t,s);const i=t.seen.get(e);i.ref=a.innerType},vp=O("ZodISODateTime",(e,t)=>{k2.init(e,t),Ze.init(e,t)});function Cp(e){return T6(vp,e)}const jp=O("ZodISODate",(e,t)=>{P2.init(e,t),Ze.init(e,t)});function wp(e){return L6(jp,e)}const Np=O("ZodISOTime",(e,t)=>{I2.init(e,t),Ze.init(e,t)});function Sp(e){return F6(Np,e)}const Ap=O("ZodISODuration",(e,t)=>{E2.init(e,t),Ze.init(e,t)});function kp(e){return R6(Ap,e)}const Pp=(e,t)=>{Co.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>v5(e,n)},flatten:{value:n=>b5(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Li,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Li,2)}},isEmpty:{get(){return e.issues.length===0}}})},qt=O("ZodError",Pp,{Parent:Error}),Ip=Na(qt),Ep=Sa(qt),Tp=Aa(qt),Lp=ka(qt),Fp=S5(qt),Rp=A5(qt),Mp=k5(qt),Dp=P5(qt),Op=I5(qt),zp=E5(qt),qp=T5(qt),Vp=L5(qt),rc=new WeakMap;function Ia(e,t,n){const s=Object.getPrototypeOf(e);let a=rc.get(s);if(a||(a=new Set,rc.set(s,a)),!a.has(t)){a.add(t);for(const i in n){const o=n[i];Object.defineProperty(s,i,{configurable:!0,enumerable:!1,get(){const l=o.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}const Ke=O("ZodType",(e,t)=>(We.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:_s(e,"input"),output:_s(e,"output")}}),e.toJSONSchema=$6(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,s)=>Ip(e,n,s,{callee:e.parse}),e.safeParse=(n,s)=>Tp(e,n,s),e.parseAsync=async(n,s)=>Ep(e,n,s,{callee:e.parseAsync}),e.safeParseAsync=async(n,s)=>Lp(e,n,s),e.spa=e.safeParseAsync,e.encode=(n,s)=>Fp(e,n,s),e.decode=(n,s)=>Rp(e,n,s),e.encodeAsync=async(n,s)=>Mp(e,n,s),e.decodeAsync=async(n,s)=>Dp(e,n,s),e.safeEncode=(n,s)=>Op(e,n,s),e.safeDecode=(n,s)=>zp(e,n,s),e.safeEncodeAsync=async(n,s)=>qp(e,n,s),e.safeDecodeAsync=async(n,s)=>Vp(e,n,s),Ia(e,"ZodType",{check(...n){const s=this.def;return this.clone(zn(s,{checks:[...s.checks??[],...n.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,s){return qn(this,n,s)},brand(){return this},register(n,s){return n.add(this,s),this},refine(n,s){return this.check(L4(n,s))},superRefine(n,s){return this.check(F4(n,s))},overwrite(n){return this.check(qr(n))},optional(){return ic(this)},exactOptional(){return b4(this)},nullable(){return oc(this)},nullish(){return ic(oc(this))},nonoptional(n){return S4(this,n)},array(){return u4(this)},or(n){return jd([this,n])},and(n){return f4(this,n)},transform(n){return lc(this,g4(n))},default(n){return j4(this,n)},prefault(n){return N4(this,n)},catch(n){return k4(this,n)},pipe(n){return lc(this,n)},readonly(){return E4(this)},describe(n){const s=this.clone();return Qr.add(s,{description:n}),s},meta(...n){if(n.length===0)return Qr.get(this);const s=this.clone();return Qr.add(s,n[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=Qr.get(e))==null?void 0:n.description},configurable:!0}),e)),Cd=O("_ZodString",(e,t)=>{jo.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(s,a,i)=>tp(e,s,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ia(e,"_ZodString",{regex(...s){return this.check(z6(...s))},includes(...s){return this.check(Z6(...s))},startsWith(...s){return this.check(U6(...s))},endsWith(...s){return this.check(B6(...s))},min(...s){return this.check(Xs(...s))},max(...s){return this.check(pd(...s))},length(...s){return this.check(xd(...s))},nonempty(...s){return this.check(Xs(1,...s))},lowercase(s){return this.check(q6(s))},uppercase(s){return this.check(V6(s))},trim(){return this.check(Y6())},normalize(...s){return this.check(H6(...s))},toLowerCase(){return this.check(W6())},toUpperCase(){return this.check(K6())},slugify(){return this.check(Q6())}})}),Zp=O("ZodString",(e,t)=>{jo.init(e,t),Cd.init(e,t),e.email=n=>e.check(u6(Up,n)),e.url=n=>e.check(p6(Bp,n)),e.jwt=n=>e.check(E6(s4,n)),e.emoji=n=>e.check(x6(Hp,n)),e.guid=n=>e.check(nc(sc,n)),e.uuid=n=>e.check(d6(Is,n)),e.uuidv4=n=>e.check(m6(Is,n)),e.uuidv6=n=>e.check(h6(Is,n)),e.uuidv7=n=>e.check(f6(Is,n)),e.nanoid=n=>e.check(g6(Yp,n)),e.guid=n=>e.check(nc(sc,n)),e.cuid=n=>e.check(y6(Wp,n)),e.cuid2=n=>e.check(b6(Kp,n)),e.ulid=n=>e.check(v6(Qp,n)),e.base64=n=>e.check(k6(t4,n)),e.base64url=n=>e.check(P6(n4,n)),e.xid=n=>e.check(C6(Gp,n)),e.ksuid=n=>e.check(j6(Jp,n)),e.ipv4=n=>e.check(w6(Xp,n)),e.ipv6=n=>e.check(N6(_p,n)),e.cidrv4=n=>e.check(S6($p,n)),e.cidrv6=n=>e.check(A6(e4,n)),e.e164=n=>e.check(I6(r4,n)),e.datetime=n=>e.check(Cp(n)),e.date=n=>e.check(wp(n)),e.time=n=>e.check(Sp(n)),e.duration=n=>e.check(kp(n))});function Z(e){return c6(Zp,e)}const Ze=O("ZodStringFormat",(e,t)=>{Me.init(e,t),Cd.init(e,t)}),Up=O("ZodEmail",(e,t)=>{y2.init(e,t),Ze.init(e,t)}),sc=O("ZodGUID",(e,t)=>{x2.init(e,t),Ze.init(e,t)}),Is=O("ZodUUID",(e,t)=>{g2.init(e,t),Ze.init(e,t)}),Bp=O("ZodURL",(e,t)=>{b2.init(e,t),Ze.init(e,t)}),Hp=O("ZodEmoji",(e,t)=>{v2.init(e,t),Ze.init(e,t)}),Yp=O("ZodNanoID",(e,t)=>{C2.init(e,t),Ze.init(e,t)}),Wp=O("ZodCUID",(e,t)=>{j2.init(e,t),Ze.init(e,t)}),Kp=O("ZodCUID2",(e,t)=>{w2.init(e,t),Ze.init(e,t)}),Qp=O("ZodULID",(e,t)=>{N2.init(e,t),Ze.init(e,t)}),Gp=O("ZodXID",(e,t)=>{S2.init(e,t),Ze.init(e,t)}),Jp=O("ZodKSUID",(e,t)=>{A2.init(e,t),Ze.init(e,t)}),Xp=O("ZodIPv4",(e,t)=>{T2.init(e,t),Ze.init(e,t)}),_p=O("ZodIPv6",(e,t)=>{L2.init(e,t),Ze.init(e,t)}),$p=O("ZodCIDRv4",(e,t)=>{F2.init(e,t),Ze.init(e,t)}),e4=O("ZodCIDRv6",(e,t)=>{R2.init(e,t),Ze.init(e,t)}),t4=O("ZodBase64",(e,t)=>{M2.init(e,t),Ze.init(e,t)}),n4=O("ZodBase64URL",(e,t)=>{O2.init(e,t),Ze.init(e,t)}),r4=O("ZodE164",(e,t)=>{z2.init(e,t),Ze.init(e,t)}),s4=O("ZodJWT",(e,t)=>{V2.init(e,t),Ze.init(e,t)}),a4=O("ZodBoolean",(e,t)=>{Z2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>np(e,n,s)});function pr(e){return M6(a4,e)}const i4=O("ZodUnknown",(e,t)=>{U2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>sp()});function ac(){return D6(i4)}const o4=O("ZodNever",(e,t)=>{B2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>rp(e,n,s)});function l4(e){return O6(o4,e)}const c4=O("ZodArray",(e,t)=>{H2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>cp(e,n,s,a),e.element=t.element,Ia(e,"ZodArray",{min(n,s){return this.check(Xs(n,s))},nonempty(n){return this.check(Xs(1,n))},max(n,s){return this.check(pd(n,s))},length(n,s){return this.check(xd(n,s))},unwrap(){return this.element}})});function u4(e,t){return G6(c4,e,t)}const d4=O("ZodObject",(e,t)=>{W2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>up(e,n,s,a),Pe(e,"shape",()=>t.shape),Ia(e,"ZodObject",{keyof(){return wo(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:ac()})},loose(){return this.clone({...this._zod.def,catchall:ac()})},strict(){return this.clone({...this._zod.def,catchall:l4()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return h5(this,n)},safeExtend(n){return f5(this,n)},merge(n){return p5(this,n)},pick(n){return d5(this,n)},omit(n){return m5(this,n)},partial(...n){return x5(wd,this,n[0])},required(...n){return g5(Nd,this,n[0])}})});function hn(e,t){const n={type:"object",shape:e??{},...ce(t)};return new d4(n)}const m4=O("ZodUnion",(e,t)=>{K2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>dp(e,n,s,a),e.options=t.options});function jd(e,t){return new m4({type:"union",options:e,...ce(t)})}const h4=O("ZodIntersection",(e,t)=>{Q2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>mp(e,n,s,a)});function f4(e,t){return new h4({type:"intersection",left:e,right:t})}const Ri=O("ZodEnum",(e,t)=>{G2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(s,a,i)=>ap(e,s,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(s,a)=>{const i={};for(const o of s)if(n.has(o))i[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Ri({...t,checks:[],...ce(a),entries:i})},e.exclude=(s,a)=>{const i={...t.entries};for(const o of s)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Ri({...t,checks:[],...ce(a),entries:i})}});function wo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new Ri({type:"enum",entries:n,...ce(t)})}const p4=O("ZodLiteral",(e,t)=>{J2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>ip(e,n,s),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Qa(e,t){return new p4({type:"literal",values:Array.isArray(e)?e:[e],...ce(t)})}const x4=O("ZodTransform",(e,t)=>{X2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>lp(e,n),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new nd(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(es(i,n.value,t));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(es(o))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=a,n.fallback=!0,n)}});function g4(e){return new x4({type:"transform",transform:e})}const wd=O("ZodOptional",(e,t)=>{fd.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>vd(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function ic(e){return new wd({type:"optional",innerType:e})}const y4=O("ZodExactOptional",(e,t)=>{_2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>vd(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function b4(e){return new y4({type:"optional",innerType:e})}const v4=O("ZodNullable",(e,t)=>{$2.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>hp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function oc(e){return new v4({type:"nullable",innerType:e})}const C4=O("ZodDefault",(e,t)=>{e6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>pp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function j4(e,t){return new C4({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ad(t)}})}const w4=O("ZodPrefault",(e,t)=>{t6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>xp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function N4(e,t){return new w4({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ad(t)}})}const Nd=O("ZodNonOptional",(e,t)=>{n6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>fp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function S4(e,t){return new Nd({type:"nonoptional",innerType:e,...ce(t)})}const A4=O("ZodCatch",(e,t)=>{r6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>gp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function k4(e,t){return new A4({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const P4=O("ZodPipe",(e,t)=>{s6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>yp(e,n,s,a),e.in=t.in,e.out=t.out});function lc(e,t){return new P4({type:"pipe",in:e,out:t})}const I4=O("ZodReadonly",(e,t)=>{a6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>bp(e,n,s,a),e.unwrap=()=>e._zod.def.innerType});function E4(e){return new I4({type:"readonly",innerType:e})}const T4=O("ZodCustom",(e,t)=>{i6.init(e,t),Ke.init(e,t),e._zod.processJSONSchema=(n,s,a)=>op(e,n)});function L4(e,t={}){return J6(T4,e,t)}function F4(e,t){return X6(e,t)}const Ot={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function R4(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}function hs(e){return e.tradeName.trim()?e.tradeName:e.accountType==="Business"?(e.lastName||e.firstName).trim():`${e.firstName} ${e.lastName}`.trim()}function tt(e){return e.replace(/\D/g,"")}const Yt=9,Sd=Yt+2;function Ad(e){return e==="Individual"?"SSN":"EIN"}function No(e){return e==="Individual"?{label:"SSN",placeholder:`${cn(3)}-${cn(2)}-${cn(4)}`,maxLength:Yt+2}:{label:"EIN",placeholder:`${cn(2)}-${cn(7)}`,maxLength:Yt+1}}function fs(e,t="SSN"){const n=tt(e);if(!n)return`${t} is required`;if(n.length!==Yt)return`${t} must be ${Yt} digits`}function kd(e,t="SSN"){if(e.trim())return fs(e,t)}function Ea(e){const t=tt(e);return t.length!==Yt?e:`${t.slice(0,2)}-${t.slice(2)}`}function Pd(e){const t=tt(e);return t.length!==Yt?e:`${t.slice(0,3)}-${t.slice(3,5)}-${t.slice(5)}`}const So="X",cn=e=>So.repeat(e);function Id(e){const t=tt(e);return t.length!==Yt?e:`${cn(2)}-${cn(3)}${t.slice(5)}`}function Ed(e){const t=tt(e);return t.length!==Yt?e:`${cn(3)}-${cn(2)}-${t.slice(5)}`}function Gr(e,t){return t==="Individual"?Ed(e):Id(e)}function tr(e,t){return t==="Individual"?Pd(e):Ea(e)}function ts(e,t){const n=tt(e).slice(0,Yt);return t==="Individual"?n.length<=3?n:n.length<=5?`${n.slice(0,3)}-${n.slice(3)}`:`${n.slice(0,3)}-${n.slice(3,5)}-${n.slice(5)}`:n.length<=2?n:`${n.slice(0,2)}-${n.slice(2)}`}const Er=10,Tr="+1";function Lr(e){const t=tt(e);return t.length===Er+1&&t.startsWith("1")?t.slice(1):t}function Ao(e,t="Phone number"){const n=Lr(e);if(!n)return`${t} is required`;if(n.length!==Er)return`${t} must be ${Er} digits`}function ns(e){const t=Lr(e);return t.length!==Er?e:`${Tr} (${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}function Td(e){const t=tt(e).slice(0,Er);return t.length<=3?t:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}const M4=14,D4="(999) 999-9999";function Ln(e){const t=tt(e).replace(/^1/,"");return Td(t)}const Mi=50,Ld=/^[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/,Fd="Enter a valid email address";function ko(e,t="Email"){const n=e.trim();if(!n)return`${t} is required`;if(n.length>Mi)return`${t} must not exceed ${Mi} characters`;if(!Ld.test(n))return Fd}const O4=50;function Po(e,t){if(!e.trim())return`${t} is required`}const z4=["All","LLP","LLC","Corporation","S-Corp","Sole Proprietorship","Partnership"];function ps(e){return Z().superRefine((t,n)=>{const s=e(t);s&&n.addIssue({code:"custom",message:s})})}const Di=(e="SSN")=>ps(t=>fs(t,e)),Rd=(e="SSN")=>ps(t=>kd(t,e)).optional(),$s=(e="Phone number")=>ps(t=>Ao(t,e)),q4=(e="Email")=>ps(t=>ko(t,e)),ea=e=>ps(t=>Po(t,e)),V4=["LLP","LLC","Corporation","S-Corp","Sole Proprietorship","Partnership"],Md=/^[A-Za-z][A-Za-z\s'.-]*$/,ta=/^[A-Za-z0-9][A-Za-z0-9\s,.'#/&-]*$/,Dd=/^(?=.*[A-Za-z])[A-Za-z0-9 &-]*$/,Od=/^\d{5}(-\d{4})?$/,zd=/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,qd="City can only contain letters, spaces, apostrophes, and hyphens",na="Address can only contain letters, numbers, spaces, and , . ' # / & -",Vd="Enter a 5-digit ZIP or ZIP+4 (e.g. 12345 or 12345-6789)",Zd="Enter a valid postal code (e.g. A1A 1A1)",Ud=e=>`${e} can only contain letters, numbers, spaces, & and -, and must include a letter`;function Oi(e,t){const n=Po(e,t);if(n)return n;if(!Dd.test(e.trim()))return Ud(t)}function Z4(e){const t=e.replace(/\D/g,"").slice(0,9);return t.length<=5?t:`${t.slice(0,5)}-${t.slice(5)}`}function U4(e){const t=e.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6);return t.length<=3?t:`${t.slice(0,3)} ${t.slice(3)}`}const Ta=["United States","Canada"],B4=["Single","Married Filing Jointly","Married Filing Separately","Head of Household","Qualifying Surviving Spouse"],cc="Married Filing Jointly",Ga={firstName:"",lastName:"",ssn:"",email:"",phone:"",address1:"",address2:"",city:"",state:"",zipCode:"",country:"United States",sameAsPrimaryAddress:!1};function qs(e){return`${[e.address1,e.address2,e.city].map(n=>n.trim()).filter(n=>n.length>0).join(", ")}, ${e.state} ${e.zipCode}`.trim()}const Bd=hn({accountType:wo(["Business","Individual"]),firstName:Z(),lastName:Z(),tradeName:Z(),ein:Z(),entityType:Z(),email:q4(),phoneNumber:$s(),address1:Z().min(1,"Address is required"),address2:Z(),city:Z().min(1,"City is required"),state:Z().min(1,"State is required"),zipCode:Z().min(1,"ZIP code is required"),country:Z().min(1,"Country is required")}).superRefine((e,t)=>{Md.test(e.city.trim())||t.addIssue({code:"custom",path:["city"],message:qd}),ta.test(e.address1.trim())||t.addIssue({code:"custom",path:["address1"],message:na}),e.address2.trim()&&!ta.test(e.address2.trim())&&t.addIssue({code:"custom",path:["address2"],message:na}),e.country==="United States"&&!Od.test(e.zipCode.trim())?t.addIssue({code:"custom",path:["zipCode"],message:Vd}):e.country==="Canada"&&!zd.test(e.zipCode.trim())&&t.addIssue({code:"custom",path:["zipCode"],message:Zd});const n=fs(e.ein,Ad(e.accountType));n&&t.addIssue({code:"custom",path:["ein"],message:n});const s=(a,i)=>{const o=Oi(e[a],i);o&&t.addIssue({code:"custom",path:[a],message:o})};if(e.accountType==="Business"){e.entityType||t.addIssue({code:"custom",path:["entityType"],message:"Entity type is required"}),s("lastName","Business name");const a=e.tradeName.trim();a&&!Dd.test(a)&&t.addIssue({code:"custom",path:["tradeName"],message:Ud("Business display name")});return}s("firstName","First name"),s("lastName","Last name")});function H4(e){const t=e.accountType==="Individual",n=(e.lastName||e.firstName||"").trim();return{accountType:t?"Individual":"Business",firstName:t?e.firstName??"":"",lastName:t?e.lastName??"":n,tradeName:t?"":e.tradeName??"",ein:tr(e.idNumber,e.accountType),entityType:e.entityType??"",email:e.email,phoneNumber:Ln(e.phoneNumber),address1:e.address1,address2:e.address2??"",city:e.city,state:e.state,zipCode:e.zipCode,country:e.country}}function Hd(e,t,n,s){if(e!==t){if(e==="Business"&&t==="Individual"){n("firstName",""),n("lastName",s),n("tradeName","");return}e==="Individual"&&t==="Business"&&(n("firstName",""),n("lastName",s))}}function Y4(e,t){const n={},s=(i,o)=>{o&&(n[i]=o)};if(s("firstName",Oi(e.firstName,"First name")),s("lastName",Oi(e.lastName,"Last name")),s("ssn",fs(e.ssn,"SSN")),s("email",ko(e.email)),s("phone",Ao(e.phone)),e.sameAsPrimaryAddress)return n;t.address1.trim()?ta.test(t.address1.trim())||(n.address1=na):n.address1="Address is required",t.address2.trim()&&!ta.test(t.address2.trim())&&(n.address2=na),t.city.trim()?Md.test(t.city.trim())||(n.city=qd):n.city="City is required",t.state||(n.state="State is required"),t.country||(n.country="Country is required");const a=t.zipCode.trim();return a?t.country==="United States"&&!Od.test(a)?n.zipCode=Vd:t.country==="Canada"&&!zd.test(a)&&(n.zipCode=Zd):n.zipCode="ZIP code is required",n}function W4(e){const t=e==null?void 0:e.secondary;return t?{secondaryFirstName:t.firstName.trim(),secondaryLastName:t.lastName.trim(),secondarySsn:tt(t.ssn),secondaryEmail:t.email.trim(),secondaryPhoneNumber:Lr(t.phone),secondaryAddress1:t.address1,secondaryAddress2:t.address2||null,secondaryCity:t.city,secondaryState:t.state,secondaryCountry:t.country,secondaryZipCode:t.zipCode}:{}}function Yd(e,t){const n=e.lastName.trim(),s=t==null?void 0:t.filingStatus,a=W4(t);return e.accountType==="Business"?{accountType:e.accountType,firstName:"",lastName:n,idNumber:tt(e.ein),entityType:e.entityType,tradeName:e.tradeName.trim(),phoneNumber:`${Tr}${Lr(e.phoneNumber)}`,email:e.email,address1:e.address1,address2:e.address2||null,city:e.city,state:e.state,country:e.country,zipCode:e.zipCode}:{accountType:e.accountType,firstName:e.firstName.trim(),lastName:n,idNumber:tt(e.ein),entityType:null,tradeName:"",phoneNumber:`${Tr}${Lr(e.phoneNumber)}`,email:e.email,address1:e.address1,address2:e.address2||null,city:e.city,state:e.state,country:e.country,zipCode:e.zipCode,filingStatus:s,...a}}function K4(e,t){return Yd(e,{filingStatus:e.accountType==="Individual"&&t||void 0})}function Wd({accountType:e,onAccountTypeChange:t,isIndividual:n,filingStatus:s="",onFilingStatusChange:a=()=>{},focusHelp:i,resetHelp:o,showFilingStatus:l=!0}){return r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx("div",{className:"sm:col-span-2",children:r.jsx(s5,{label:"Account Type",required:!0,fullWidth:!1,value:e,onChange:t,onFocus:i("accountType"),options:[{label:"Business",value:"Business",icon:r.jsx(a5,{})},{label:"Individual",value:"Individual",icon:r.jsx(i5,{})}]})}),n&&l?r.jsx(Se,{id:"entity-filing-status",label:"Filing Status",required:!0,placeholder:"Select Filing Status",value:s,onChange:c=>{o(),a(c)},options:B4.map(c=>({value:c,label:c}))}):null]})}var xs=e=>e.type==="checkbox",Pn=e=>e instanceof Date,st=e=>e==null;const Io=e=>typeof e=="object";var qe=e=>!st(e)&&!Array.isArray(e)&&Io(e)&&!Pn(e),zi=e=>qe(e)&&e.target?xs(e.target)?e.target.checked:e.target.value:e,Kd=(e,t)=>t.split(".").some((n,s,a)=>!isNaN(Number(n))&&e.has(a.slice(0,s).join("."))),Qd=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},La=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Be(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(La&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(qe(e)&&Qd(e)))return e;const s=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=Be(e[a]));return s}const bn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Ut={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Gd="root",Eo=["__proto__","constructor","prototype"],Q4=/^\w*$/;var gs=e=>Q4.test(e),Le=e=>e===void 0;const G4=/[.[\]'"]/;var Fa=e=>e.split(G4).filter(Boolean),K=(e,t,n)=>{if(!t||!qe(e))return n;const s=gs(t)?[t]:Fa(t);if(s.some(i=>Eo.includes(i)))return n;const a=s.reduce((i,o)=>st(i)?void 0:i[o],e);return Le(a)||a===e?Le(e[t])?n:e[t]:a},At=e=>typeof e=="boolean",ot=e=>typeof e=="function",we=(e,t,n)=>{let s=-1;const a=gs(t)?[t]:Fa(t),i=a.length,o=i-1;for(;++s<i;){const l=a[s];let c=n;if(s!==o){const u=e[l];c=qe(u)||Array.isArray(u)?u:isNaN(+a[s+1])?{}:[]}if(Eo.includes(l))return;e[l]=c,e=e[l]}};const Jd=x.createContext(null);Jd.displayName="HookFormControlContext";const To=()=>x.useContext(Jd);var Xd=(e,t,n,s=!0)=>{const a={};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Ut.all&&(t._proxyFormState[o]=!s||Ut.all),n&&(n[o]=!0),e[o]}});return a};const Lo=La?x.useLayoutEffect:x.useEffect;function J4(e){const t=To(),{control:n=t,disabled:s,name:a,exact:i}=e||{},[o,l]=x.useState(()=>({...n._formState,defaultValues:n._defaultValues})),c=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Lo(()=>n._subscribe({name:a,formState:c.current,exact:i,callback:u=>{!s&&l({...n._formState,...u,defaultValues:n._defaultValues})}}),[a,s,i]),x.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),x.useMemo(()=>Xd(o,n,c.current,!1),[o,n])}var lt=e=>typeof e=="string",qi=(e,t,n,s,a)=>lt(e)?(s&&t.watch.add(e),K(n,e,a)):Array.isArray(e)?e.map(i=>(s&&t.watch.add(i),K(n,i))):(s&&(t.watchAll=!0),n),Vi=e=>st(e)||!Io(e);const uc=(e,t)=>t.length===0&&!Array.isArray(e)&&!Qd(e);function kt(e,t,n=new WeakMap){if(e===t)return!0;if(Vi(e)||Vi(t))return Object.is(e,t);if(Pn(e)&&Pn(t))return Object.is(e.getTime(),t.getTime());const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;if(uc(e,s)||uc(t,a))return Object.is(e,t);if(!s.length&&Array.isArray(e)!==Array.isArray(t))return!1;const i=n.get(e);if(i&&i.has(t))return!0;if(i)i.add(t);else{const o=new WeakSet;o.add(t),n.set(e,o)}for(const o of s){const l=e[o];if(!(o in t))return!1;if(o!=="ref"){const c=t[o];if(Pn(l)&&Pn(c)||(qe(l)||Array.isArray(l))&&(qe(c)||Array.isArray(c))?!kt(l,c,n):!Object.is(l,c))return!1}}return!0}function X4(e){const t=To(),{control:n=t,name:s,defaultValue:a,disabled:i,exact:o,compute:l}=e||{},c=x.useRef(a),u=x.useRef(l),d=x.useRef(void 0),m=x.useRef(n),h=x.useRef(s);u.current=l;const[f,y]=x.useState(()=>{const j=n._getWatch(s,c.current);return u.current?u.current(j):j}),p=x.useCallback(j=>{const k=qi(s,n._names,j||n._formValues,!1,c.current);return u.current?u.current(k):k},[n._formValues,n._names,s]),b=x.useCallback(j=>{if(!i){const k=qi(s,n._names,j||n._formValues,!1,c.current);if(u.current){const N=u.current(k);kt(N,d.current)||(y(N),d.current=N)}else y(k)}},[n._formValues,n._names,i,s]);Lo(()=>((m.current!==n||!kt(h.current,s))&&(m.current=n,h.current=s,b()),n._subscribe({name:s,formState:{values:!0},exact:o,callback:j=>{b(j.values)}})),[n,o,s,b]),x.useEffect(()=>n._removeUnmounted());const C=m.current!==n,g=h.current,A=x.useMemo(()=>{if(i)return null;const j=!C&&!kt(g,s);return C||j?p():null},[i,C,s,g,p]);return A!==null?A:f}function _4(e){const t=To(),{name:n,disabled:s,control:a=t,shouldUnregister:i,defaultValue:o,exact:l=!0}=e,c=Kd(a._names.array,n),u=x.useMemo(()=>K(a._formValues,n,K(a._defaultValues,n,o)),[a,n,o]),d=X4({control:a,name:n,defaultValue:u,exact:l}),m=J4({control:a,name:n,exact:l}),h=x.useRef(e),f=x.useRef(null),y=x.useRef(a.register(n,{...e.rules,value:d,...At(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const p=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!K(m.errors,n)},isDirty:{enumerable:!0,get:()=>!!K(m.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!K(m.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!K(m.validatingFields,n)},error:{enumerable:!0,get:()=>K(m.errors,n)}}),[m,n]),b=x.useCallback(j=>{const k=zi(j);return K(a._fields,n)||(y.current=a.register(n,{...h.current.rules,value:k})),y.current.onChange({target:{value:zi(j),name:n},type:bn.CHANGE})},[n,a]),C=x.useCallback(()=>y.current.onBlur({target:{value:K(a._formValues,n),name:n},type:bn.BLUR}),[n,a._formValues]),g=x.useCallback(j=>{j&&(f.current={focus:()=>ot(j.focus)&&j.focus(),select:()=>ot(j.select)&&j.select(),setCustomValidity:N=>ot(j.setCustomValidity)&&j.setCustomValidity(N),reportValidity:()=>ot(j.reportValidity)&&j.reportValidity()});const k=K(a._fields,n);k&&k._f&&j&&(k._f.ref=f.current)},[a._fields,n]),A=x.useMemo(()=>({name:n,value:d,...At(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:b,onBlur:C,ref:g}),[n,s,m.disabled,b,C,g,d]);return x.useEffect(()=>{const j=a._options.shouldUnregister||i;a.register(n,{...h.current.rules,...At(h.current.disabled)?{disabled:h.current.disabled}:{}});const k=(N,T)=>{const D=K(a._fields,N);D&&D._f&&(D._f.mount=T)};if(k(n,!0),j){const N=Be(K(i?a._defaultValues:a._options.values||a._defaultValues,n,K(a._options.defaultValues,n,h.current.defaultValue)));we(a._defaultValues,n,N),Le(K(a._formValues,n))&&we(a._formValues,n,N)}if(!c&&a.register(n),f.current){const N=K(a._fields,n);N&&N._f&&(N._f.ref=f.current)}return()=>{(c?j&&!a._state.action:j)?a.unregister(n):k(n,!1)}},[n,a,c,i]),x.useEffect(()=>{a._setDisabledField({disabled:s,name:n})},[s,n,a]),x.useMemo(()=>({field:A,formState:m,fieldState:p}),[A,m,p])}const Ee=e=>e.render(_4(e)),_d=e=>{const t={};for(const n of Object.keys(e))if(Io(e[n])&&e[n]!==null&&!Pn(e[n])){const s=_d(e[n]);for(const a of Object.keys(s))t[`${n}.${a}`]=s[a]}else t[n]=e[n];return t},$4=x.createContext(null);$4.displayName="HookFormContext";var Fo=(e,t,n,s,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[s]:a||!0}}:{},$d=e=>Array.isArray(e)?e.filter(Boolean):[],Vs=e=>Array.isArray(e)?e:[e],dc=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function em(e,t){const n={};for(const s in e)if(e.hasOwnProperty(s)){const a=e[s],i=t[s];if(a&&qe(a)&&i){const o=em(a,i);qe(o)&&(n[s]=o)}else e[s]&&(n[s]=i)}return n}var rt=e=>qe(e)&&!Object.keys(e).length,Ro=e=>e.type==="file",ra=e=>{if(!La)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},tm=e=>e.type==="select-multiple",Mo=e=>e.type==="radio",e9=e=>Mo(e)||xs(e),Ja=e=>ra(e)&&e.isConnected;function t9(e,t){const n=t.slice(0,-1).length;let s=0;for(;s<n;){if(st(e)){e=void 0;break}e=e[t[s]],s++}return e}function n9(e){for(const t in e)if(e.hasOwnProperty(t)&&!Le(e[t]))return!1;return!0}function Ge(e,t){if(lt(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:gs(t)?[t]:Fa(t);if(n.some(o=>Eo.includes(String(o))))return e;const s=n.length===1?e:t9(e,n),a=n.length-1,i=n[a];return s&&delete s[i],a!==0&&(qe(s)&&rt(s)||Array.isArray(s)&&n9(s))&&Ge(e,n.slice(0,-1)),e}var r9=e=>{for(const t in e)if(ot(e[t]))return!0;return!1};function nm(e){return Array.isArray(e)||qe(e)&&!r9(e)}function Zi(e,t={}){for(const n in e){const s=e[n];nm(s)?(t[n]=Array.isArray(s)?[]:{},Zi(s,t[n])):Le(s)||(t[n]=!0)}return t}function Ui(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(n=>Ui(n));return t.some(n=>n!==void 0)?t:void 0}if(qe(e)){const t={};for(const n in e){const s=Ui(e[n]);Le(s)||(t[n]=s)}return Object.keys(t).length?t:void 0}}}function Bn(e,t,n){n||(n=Zi(t));for(const s in e){const a=e[s];if(nm(a))Le(t)||Vi(n[s])?n[s]=Zi(a,Array.isArray(a)?[]:{}):Bn(a,st(t)?{}:t[s],n[s]);else{const i=t[s];n[s]=!kt(a,i)}}return Ui(n)||{}}const mc={value:!1,isValid:!1},hc={value:!0,isValid:!0};var rm=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Le(e[0].attributes.value)?Le(e[0].value)||e[0].value===""?hc:{value:e[0].value,isValid:!0}:hc:mc}return mc},sm=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:s})=>Le(e)?e:t?e===""?NaN:e&&+e:n&<(e)?new Date(e):s?s(e):e;const fc={isValid:!1,value:null};var am=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,fc):fc;function pc(e){const t=e.ref;return Ro(t)?t.files:Mo(t)?am(e.refs).value:tm(t)?[...t.selectedOptions].map(({value:n})=>n):xs(t)?rm(e.refs).value:sm(Le(t.value)?e.ref.value:t.value,e)}var s9=(e,t,n,s)=>{const a={};for(const i of e){const o=K(t,i);o&&we(a,i,o._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:s}},sa=e=>e instanceof RegExp,Hr=e=>Le(e)?e:sa(e)?e.source:qe(e)?sa(e.value)?e.value.source:e.value:e,Es=e=>({isOnSubmit:!e||e===Ut.onSubmit,isOnBlur:e===Ut.onBlur,isOnChange:e===Ut.onChange,isOnAll:e===Ut.all,isOnTouch:e===Ut.onTouched});const xc="AsyncFunction";var a9=e=>{if(!e||!e.validate)return!1;if(ot(e.validate))return e.validate.constructor.name===xc;if(qe(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===xc)return!0}return!1},i9=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Xa=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const s of t.watch)if(e.startsWith(s)&&e.charAt(s.length)===".")return!0;return!1};const Jr=(e,t,n,s)=>{for(const a of n||Object.keys(e)){const i=K(e,a);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!s)return!0;if(o.ref&&t(o.ref,o.name)&&!s)return!0;if(Jr(l,t))break}else if(qe(l)&&Jr(l,t))break}}};function gc(e,t,n){const s=K(e,n);if(s||gs(n))return{error:s,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),o=K(t,i),l=K(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};a.pop()}return{name:n}}var o9=(e,t,n,s)=>{n(e);const{name:a,...i}=e,o=Object.keys(i);return!o.length||s&&o.length>=Object.keys(t).length||o.find(l=>t[l]===(!s||Ut.all))},l9=(e,t,n)=>!e||!t||e===t||Vs(e).some(s=>s&&(n?s===t||s.startsWith(t+"."):s.startsWith(t)||t.startsWith(s))),c9=(e,t,n,s,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?s.isOnBlur:a.isOnBlur)?!e:(n?s.isOnChange:a.isOnChange)?e:!0,u9=(e,t)=>!$d(K(e,t)).length&&Ge(e,t),yc=(e,t,n)=>{const s=K(e,n),a=Array.isArray(s)?s:[];return we(a,Gd,t[n]),we(e,n,a),e};function bc(e,t,n="validate"){if(lt(e)||Array.isArray(e)&&e.every(lt)||At(e)&&!e)return{type:n,message:lt(e)?e:"",ref:t}}var dr=e=>qe(e)&&!sa(e)?e:{value:e,message:""},vc=async(e,t,n,s,a,i)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:d,min:m,max:h,pattern:f,validate:y,name:p,valueAsNumber:b,mount:C}=e._f,g=K(n,p);if(!C||t.has(p))return{};const A=l?l[0]:o,j=W=>{if(a&&A.reportValidity){const B=At(W)?"":W||"";l?l.forEach(ne=>ne.setCustomValidity(B)):A.setCustomValidity(B),A.reportValidity()}},k={},N=Mo(o),T=xs(o),D=N||T,q=(b||Ro(o))&&Le(o.value)&&Le(g)||ra(o)&&o.value===""||g===""||Array.isArray(g)&&!g.length,$=Fo.bind(null,p,s,k),F=(W,B,ne,V=Vt.maxLength,se=Vt.minLength)=>{const te=W?B:ne;k[p]={type:W?V:se,message:te,ref:o,...$(W?V:se,te)}};if(i?!Array.isArray(g)||!g.length:c&&(!D&&(q||st(g))||At(g)&&!g||T&&!rm(l).isValid||N&&!am(l).isValid)){const{value:W,message:B}=lt(c)?{value:!!c,message:c}:dr(c);if(W&&(k[p]={type:Vt.required,message:B,ref:A,...$(Vt.required,B)},!s))return j(B),k}if(!q&&(!st(m)||!st(h))){let W,B;const ne=dr(h),V=dr(m);if(!st(g)&&!isNaN(g)){const se=o.valueAsNumber||g&&+g;st(ne.value)||(W=se>ne.value),st(V.value)||(B=se<V.value)}else{const se=o.valueAsDate||new Date(g),te=be=>new Date(new Date().toDateString()+" "+be),re=o.type=="time",H=o.type=="week";lt(ne.value)&&g&&(W=re?te(g)>te(ne.value):H?g>ne.value:se>new Date(ne.value)),lt(V.value)&&g&&(B=re?te(g)<te(V.value):H?g<V.value:se<new Date(V.value))}if((W||B)&&(F(!!W,ne.message,V.message,Vt.max,Vt.min),!s))return j(k[p].message),k}if((u||d)&&!q&&(lt(g)||i&&Array.isArray(g))){const W=dr(u),B=dr(d),ne=!st(W.value)&&g.length>+W.value,V=!st(B.value)&&g.length<+B.value;if((ne||V)&&(F(ne,W.message,B.message),!s))return j(k[p].message),k}if(f&&!q&<(g)){const{value:W,message:B}=dr(f);if(sa(W)&&!g.match(W)&&(k[p]={type:Vt.pattern,message:B,ref:o,...$(Vt.pattern,B)},!s))return j(B),k}if(y){if(ot(y)){const W=await y(g,n),B=bc(W,A);if(B&&(k[p]={...B,...$(Vt.validate,B.message)},!s))return j(B.message),k}else if(qe(y)){let W={};for(const B in y){if(!rt(W)&&!s)break;const ne=bc(await y[B](g,n),A,B);ne&&(W={...ne,...$(B,ne.message)},j(ne.message),s&&(k[p]=W))}if(!rt(W)&&(k[p]={ref:A,...W},!s))return k}}return j(!0),k};const d9={mode:Ut.onSubmit,reValidateMode:Ut.onChange,shouldFocusError:!0},_a="form",im={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function m9(e={}){let t={...d9,...e},n={...Be(im),isLoading:ot(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},s={},a=qe(t.defaultValues)||qe(t.values)?Be(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Be(a),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c,u=0,d=0,m=Es(t.mode),h=Es(t.reValidateMode);const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},y={...f};let p={...y};const b={array:dc(),state:dc()},C=t.criteriaMode===Ut.all,g=w=>P=>{clearTimeout(u),u=setTimeout(w,P)},A=async w=>{if(!o.keepIsValid&&!t.disabled&&(y.isValid||p.isValid||w)){let P;t.resolver?(P=rt((await B()).errors),j()):P=await se({fields:s,onlyCheckValid:!0,eventType:bn.VALID}),P!==n.isValid&&b.state.next({isValid:P})}},j=(w,P)=>{!t.disabled&&(y.isValidating||y.validatingFields||p.isValidating||p.validatingFields)&&((w||Array.from(l.mount)).forEach(v=>{v&&(P?we(n.validatingFields,v,P):Ge(n.validatingFields,v))}),b.state.next({validatingFields:n.validatingFields,isValidating:!rt(n.validatingFields)}))},k=()=>{n.dirtyFields=Bn(a,i)},N=(w,P=[],v,E,M=!0,Y=!0)=>{if(E&&v&&!t.disabled){if(o.action=!0,Y&&Array.isArray(K(s,w))){const U=v(K(s,w),E.argA,E.argB);M&&we(s,w,U)}if(Y&&Array.isArray(K(n.errors,w))){const U=v(K(n.errors,w),E.argA,E.argB);M&&we(n.errors,w,U),u9(n.errors,w)}if((y.touchedFields||p.touchedFields)&&Y&&Array.isArray(K(n.touchedFields,w))){const U=v(K(n.touchedFields,w),E.argA,E.argB);M&&we(n.touchedFields,w,U)}(y.dirtyFields||p.dirtyFields)&&k(),b.state.next({name:w,isDirty:re(w,P),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else we(i,w,P)},T=(w,P)=>{we(n.errors,w,P),n.errors={...n.errors},b.state.next({errors:n.errors})},D=w=>{n.errors=w,b.state.next({errors:n.errors,isValid:!1})},q=w=>{const P=gs(w)?[w]:Fa(w);let v=i,E=a;for(let M=0;M<P.length-1;M++){const Y=P[M];if(v=st(v)?v:v[Y],E=st(E)?E:E[Y],v===null&&E!==null)return!0}return!1},$=(w,P,v,E)=>{const M=K(s,w);if(M){if(q(w))return;const Y=Le(K(i,w)),U=K(i,w,Le(v)?K(a,w):v);Le(U)||E&&E.defaultChecked||P?we(i,w,P?U:pc(M._f)):ie(w,U),o.mount&&!o.action&&(A(),Y&&n.isDirty&&(y.isDirty||p.isDirty)&&(re()||(n.isDirty=!1,b.state.next({...n}))),e.shouldUnregister&&Y&&!Le(K(i,w))&&Xa(w,l)&&(o.watch=!0))}},F=(w,P,v,E,M)=>{let Y=!1,U=!1;const G={name:w};if(!t.disabled){if(!v||E){const R=kt(K(a,w),P);(y.isDirty||p.isDirty)&&(U=n.isDirty,n.isDirty=G.isDirty=!R||re(),Y=U!==G.isDirty),U=!!K(n.dirtyFields,w),R!==n.isDirty?n.dirtyFields=Bn(a,i):R?Ge(n.dirtyFields,w):we(n.dirtyFields,w,!0),G.dirtyFields=n.dirtyFields,Y=Y||(y.dirtyFields||p.dirtyFields)&&U!==!R}if(v){const R=K(n.touchedFields,w);R||(we(n.touchedFields,w,v),G.touchedFields=n.touchedFields,Y=Y||(y.touchedFields||p.touchedFields)&&R!==v)}Y&&M&&b.state.next(G)}return Y?G:{}},W=(w,P,v,E)=>{const M=K(n.errors,w),Y=(y.isValid||p.isValid)&&At(P)&&n.isValid!==P;if(t.delayError&&v?(c=g(()=>T(w,v)),c(t.delayError)):(clearTimeout(u),c=null,v?we(n.errors,w,v):Ge(n.errors,w),n.errors={...n.errors}),(v?!kt(M,v):M)||!rt(E)||Y){const U={...E,...Y&&At(P)?{isValid:P}:{},errors:n.errors,name:w};n={...n,...U},b.state.next(U)}},B=async w=>(j(w,!0),await t.resolver(i,t.context,s9(w||l.mount,s,t.criteriaMode,t.shouldUseNativeValidation))),ne=async w=>{const{errors:P}=await B(w);if(j(w),w){for(const v of w){const E=K(P,v);E?l.array.has(v)&&qe(E)&&!Object.keys(E).some(M=>!Number.isNaN(Number(M)))?yc(n.errors,{[v]:E},v):we(n.errors,v,E):Ge(n.errors,v)}n.errors={...n.errors}}else n.errors=P;return P},V=async({name:w,eventType:P})=>{if(e.validate){const v=await e.validate({formValues:i,formState:n,name:w,eventType:P});if(qe(v))for(const E in v){const M=v[E];M&&z(`${_a}.${E}`,{message:lt(M.message)?M.message:"",type:M.type||Vt.validate})}else lt(v)||!v?z(_a,{message:v||"",type:Vt.validate}):Ce(_a);return v}return!0},se=async({fields:w,onlyCheckValid:P,name:v,eventType:E,context:M={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(M.runRootValidation=!0,!await V({name:v,eventType:E})&&(M.valid=!1,P)))return M.valid;for(const Y in w){const U=w[Y];if(U){const{_f:G,...R}=U;if(G){const Q=l.array.has(G.name),ke=U._f&&a9(U._f),xt=y.validatingFields||y.isValidating||p.validatingFields||p.isValidating;ke&&xt&&j([G.name],!0);const Rt=await vc(U,l.disabled,i,C,t.shouldUseNativeValidation&&!P,Q);if(ke&&xt&&j([G.name]),Rt[G.name]&&(M.valid=!1,P)||(!P&&(K(Rt,G.name)?Q?yc(n.errors,Rt,G.name):we(n.errors,G.name,Rt[G.name]):Ge(n.errors,G.name)),e.shouldUseNativeValidation&&Rt[G.name]))break}!rt(R)&&await se({context:M,onlyCheckValid:P,fields:R,name:Y,eventType:E})}}return M.valid},te=()=>{for(const w of l.unMount){const P=K(s,w);P&&(P._f.refs?P._f.refs.every(v=>!Ja(v)):!Ja(P._f.ref))&&Je(w)}l.unMount=new Set},re=(w,P)=>!t.disabled&&(w&&P&&we(i,w,P),!kt(o.mount?i:a,a)),H=(w,P,v)=>qi(w,l,{...o.mount?i:Le(P)?a:lt(w)?{[w]:P}:P},v,P),be=w=>$d(K(o.mount?i:a,w,t.shouldUnregister?K(a,w,[]):[])),ie=(w,P,v={},E=!1,M=!1)=>{const Y=K(s,w);let U=P;if(Y){const G=Y._f;G&&(!G.disabled&&we(i,w,sm(P,G)),U=ra(G.ref)&&st(P)?"":P,tm(G.ref)?[...G.ref.options].forEach(R=>R.selected=U.includes(R.value)):G.refs?xs(G.ref)?G.refs.forEach(R=>{(!R.defaultChecked||!R.disabled)&&(Array.isArray(U)?R.checked=!!U.find(Q=>Q===R.value):R.checked=U===R.value||!!U)}):G.refs.forEach(R=>R.checked=R.value===U):Ro(G.ref)?G.ref.value="":(G.ref.value=U,!G.ref.type&&!M&&b.state.next({name:w,values:E?i:Be(i)})))}(v.shouldDirty||v.shouldTouch)&&F(w,U,v.shouldTouch,v.shouldDirty,!M),v.shouldValidate&&ve(w)},xe=(w,P,v,E=!1,M=!1)=>{for(const Y in P){if(!P.hasOwnProperty(Y))return;const U=P[Y],G=w+"."+Y,R=K(s,G);(l.array.has(w)||qe(U)||R&&!R._f)&&!Pn(U)?xe(G,U,v,E,M):ie(G,U,v,E,M)}},Te=(w,P,v,E,M=!1)=>{const Y=K(s,w),U=l.array.has(w),G=E?P:Be(P),R=K(i,w),Q=kt(R,G);if(Q||we(i,w,G),U)b.array.next({name:w,values:E?i:Be(i)}),(y.isDirty||y.dirtyFields||p.isDirty||p.dirtyFields)&&v.shouldDirty&&(k(),M||b.state.next({name:w,dirtyFields:n.dirtyFields,isDirty:re(w,G)}));else{const ke=Array.isArray(G)&&!G.length||rt(G);!Y||Y._f||st(G)||ke?ie(w,G,v,E,M):xe(w,G,v,E,M)}if(!Q&&!M){const ke=Xa(w,l),xt=E?i:Be(i);b.state.next({...ke&&n,name:o.mount||ke?w:void 0,values:xt})}},De=(w,P,v={})=>Te(w,P,v,!1),Ue=(w,P={})=>{const v=ot(w)?w(i):w;if(!kt(i,v)){i={...i,...v};const E=_d(v);for(const M of l.mount)M in E&&Te(M,E[M],P,!0,!0);b.state.next({...n,name:void 0,type:void 0,...d?{values:i}:{}}),P.shouldValidate&&A()}},Oe=async w=>{o.mount=!0;const P=w.target;let v=P.name,E=!0;const M=K(s,v),Y=U=>{E=Number.isNaN(U)||Pn(U)&&isNaN(U.getTime())||kt(U,K(i,v,U))};if(M){let U,G;const R=P.type?pc(M._f):zi(w),Q=w.type===bn.BLUR||w.type===bn.FOCUS_OUT,ke=!i9(M._f)&&!e.validate&&!t.resolver&&!K(n.errors,v)&&!M._f.deps,xt=ke||c9(Q,K(n.touchedFields,v),n.isSubmitted,h,m),Rt=Xa(v,l,Q);we(i,v,R),Q?(!P||!P.readOnly)&&(M._f.onBlur&&M._f.onBlur(w),c&&c(0)):M._f.onChange&&M._f.onChange(w);const Vn=F(v,R,Q),Za=!rt(Vn)||Rt;if(!Q&&b.state.next({name:v,type:w.type,...d?{values:Be(i)}:{}}),xt)return(!ke||!n.isValid)&&(y.isValid||p.isValid)&&(t.mode==="onBlur"?Q&&A():Q||A()),Za&&b.state.next({name:v,...Rt?{}:Vn});if(!t.resolver&&e.validate&&await V({name:v,eventType:w.type}),!Q&&Rt&&b.state.next({...n}),t.resolver){const{errors:Vr}=await B([v]);if(j([v]),Y(R),!E){!rt(Vn)&&b.state.next(Vn);return}const Cs=gc(n.errors,s,v),js=gc(Vr,s,Cs.name||v);U=js.error,v=js.name,G=rt(Vr)}else j([v],!0),U=(await vc(M,l.disabled,i,C,t.shouldUseNativeValidation))[v],j([v]),Y(R),E&&(U?G=!1:(y.isValid||p.isValid)&&(G=await se({fields:s,onlyCheckValid:!0,name:v,eventType:w.type})));E&&(M._f.deps&&(!Array.isArray(M._f.deps)||M._f.deps.length>0)&&ve(M._f.deps),W(v,G,U,Vn))}},je=(w,P)=>{if(K(n.errors,P)&&w.focus)return w.focus(),1},ve=async(w,P={})=>{let v,E;const M=Vs(w);if(t.resolver){const Y=await ne(Le(w)?w:M);v=rt(Y),E=w?!M.some(U=>K(Y,U)):v}else w?(E=(await Promise.all(M.map(async Y=>{const U=K(s,Y);return await se({fields:U&&U._f?{[Y]:U}:U,eventType:bn.TRIGGER})}))).every(Boolean),!(!E&&!n.isValid)&&A()):E=v=await se({fields:s,name:w,eventType:bn.TRIGGER});return b.state.next({...!lt(w)||(y.isValid||p.isValid)&&v!==n.isValid?{}:{name:w},...t.resolver||!w?{isValid:v}:{},errors:n.errors}),P.shouldFocus&&!E&&Jr(s,je,w?M:l.mount),E},ye=(w,P)=>{let v={...o.mount?i:a};return P&&(v=em(P.dirtyFields?n.dirtyFields:n.touchedFields,v)),Le(w)?v:lt(w)?K(v,w):w.map(E=>K(v,E))},ee=(w,P)=>({invalid:!!K((P||n).errors,w),isDirty:!!K((P||n).dirtyFields,w),error:K((P||n).errors,w),isValidating:!!K(n.validatingFields,w),isTouched:!!K((P||n).touchedFields,w)}),Ce=w=>{const P=w?Vs(w):void 0;P==null||P.forEach(v=>Ge(n.errors,v)),P?P.forEach(v=>{b.state.next({name:v,errors:n.errors})}):b.state.next({errors:{}})},z=(w,P,v)=>{const E=(K(s,w,{_f:{}})._f||{}).ref,M=K(n.errors,w)||{},{ref:Y,message:U,type:G,...R}=M;we(n.errors,w,{...R,...P,ref:E}),b.state.next({name:w,errors:n.errors,isValid:!1}),v&&v.shouldFocus&&E&&E.focus&&E.focus()},ge=(w,P)=>{if(ot(w)){d++;const{unsubscribe:v}=b.state.subscribe({next:M=>"values"in M&&w(M.values||H(void 0,P),M)});let E=!1;return{unsubscribe:()=>{E||(E=!0,d--,v())}}}return H(w,P,!0)},X=w=>{var P;const v=!!(!((P=w.formState)===null||P===void 0)&&P.values);v&&d++;const{unsubscribe:E}=b.state.subscribe({next:Y=>{if(l9(w.name,Y.name,w.exact)&&o9(Y,w.formState||y,Lt,w.reRenderRoot)){const U={...i};w.callback({values:U,...n,...Y,defaultValues:a})}}});if(!v)return E;let M=!1;return()=>{M||(M=!0,d--,E())}},he=w=>(o.mount=!0,p={...p,...w.formState},X({...w,formState:{...f,...w.formState}})),Je=(w,P={})=>{for(const v of w?Vs(w):l.mount)l.mount.delete(v),l.array.delete(v),P.keepValue||(Ge(s,v),Ge(i,v)),!P.keepError&&Ge(n.errors,v),!P.keepDirty&&Ge(n.dirtyFields,v),!P.keepTouched&&Ge(n.touchedFields,v),!P.keepIsValidating&&Ge(n.validatingFields,v),!t.shouldUnregister&&!P.keepDefaultValue&&Ge(a,v);b.state.next({values:Be(i)}),b.state.next({...n,...P.keepDirty?{isDirty:re()}:{}}),!P.keepIsValid&&A()},Fe=({disabled:w,name:P})=>{if(At(w)&&o.mount||w||l.disabled.has(P)){const M=l.disabled.has(P)!==!!w;w?l.disabled.add(P):l.disabled.delete(P),M&&o.mount&&!o.action&&A()}},Qe=(w,P={})=>{let v=K(s,w);const E=At(P.disabled)||At(t.disabled),M=!l.registerName.has(w)&&v&&v._f&&!v._f.mount;return we(s,w,{...v||{},_f:{...v&&v._f?v._f:{ref:{name:w}},name:w,mount:!0,...P}}),l.mount.add(w),v&&!M?Fe({disabled:At(P.disabled)?P.disabled:t.disabled,name:w}):$(w,!0,P.value),{...E?{disabled:P.disabled||t.disabled}:{},...t.progressive?{required:!!P.required,min:Hr(P.min),max:Hr(P.max),minLength:Hr(P.minLength),maxLength:Hr(P.maxLength),pattern:Hr(P.pattern)}:{},name:w,onChange:Oe,onBlur:Oe,ref:Y=>{if(Y){l.registerName.add(w),Qe(w,P),l.registerName.delete(w),v=K(s,w);const U=Le(Y.value)&&Y.querySelectorAll&&Y.querySelectorAll("input,select,textarea")[0]||Y,G=e9(U),R=v._f.refs||[];if(G?R.find(Q=>Q===U):U===v._f.ref)return;we(s,w,{_f:{...v._f,...G?{refs:[...R.filter(Ja),U,...Array.isArray(K(a,w))?[{}]:[]],ref:{type:U.type,name:w}}:{ref:U}}}),$(w,!1,void 0,U)}else v=K(s,w,{}),v._f&&(v._f.mount=!1),(t.shouldUnregister||P.shouldUnregister)&&!(Kd(l.array,w)&&o.action)&&l.unMount.add(w)}}},ct=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Jr(s,je,l.mount),Et=w=>{At(w)&&(b.state.next({disabled:w}),Jr(s,(P,v)=>{const E=K(s,v);E&&(P.disabled=E._f.disabled||w,Array.isArray(E._f.refs)&&E._f.refs.forEach(M=>{M.disabled=E._f.disabled||w}))},0,!1))},Ct=(w,P)=>async v=>{let E;v&&(v.preventDefault&&v.preventDefault(),v.persist&&v.persist());let M=Be(i);if(b.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:U}=await B();j(),n.errors=Y,M=Be(U)}else await se({fields:s,eventType:bn.SUBMIT});if(l.disabled.size)for(const Y of l.disabled)Ge(M,Y);if(Ge(n.errors,Gd),rt(n.errors)){b.state.next({errors:{}});try{await w(M,v)}catch(Y){E=Y}}else P&&await P({...n.errors},v),ct(),setTimeout(ct);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rt(n.errors)&&!E,submitCount:n.submitCount+1,errors:n.errors}),E)throw E},jt=(w,P={})=>{K(s,w)&&(Le(P.defaultValue)?De(w,Be(K(a,w))):(De(w,P.defaultValue),we(a,w,Be(P.defaultValue))),P.keepTouched||Ge(n.touchedFields,w),P.keepDirty||(Ge(n.dirtyFields,w),n.isDirty=P.defaultValue?re(w,Be(K(a,w))):re()),P.keepError||(Ge(n.errors,w),y.isValid&&A()),b.state.next({...n}))},ut=(w,P={})=>{const v=w?Be(w):a,E=Be(v),M=rt(w),Y=E;if(P.keepDefaultValues||(a=v),!P.keepValues){if(P.keepDirtyValues){const U=new Set([...l.mount,...Object.keys(Bn(a,i))]);for(const G of Array.from(U)){const R=K(n.dirtyFields,G),Q=K(i,G),ke=K(Y,G);R&&!Le(Q)?we(Y,G,Q):!R&&!Le(ke)&&De(G,ke)}}else{if(La&&Le(w))for(const U of l.mount){const G=K(s,U);if(G&&G._f){const R=Array.isArray(G._f.refs)?G._f.refs[0]:G._f.ref;if(ra(R)){const Q=R.closest("form");if(Q){Q.reset();break}}}}if(P.keepFieldsRef)for(const U of l.mount)De(U,K(Y,U));else s={}}if(t.shouldUnregister){if(i=P.keepDefaultValues?Be(a):{},P.keepFieldsRef)for(const U of l.mount)we(i,U,K(Y,U))}else i=Be(Y);b.array.next({values:{...Y}}),b.state.next({name:void 0,type:void 0,values:{...Y}})}l={mount:P.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!y.isValid||!!P.keepIsValid||!!P.keepDirtyValues||!t.shouldUnregister&&!rt(Y),o.watch=!!t.shouldUnregister,o.keepIsValid=!!P.keepIsValid,o.action=!1,P.keepErrors||(n.errors={}),b.state.next({submitCount:P.keepSubmitCount?n.submitCount:0,isDirty:M?!1:P.keepDirty?n.isDirty:P.keepValues?re():!!(P.keepDefaultValues&&!kt(w,a)),isSubmitted:P.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:M?{}:P.keepDirtyValues?P.keepDefaultValues&&i?Bn(a,i):n.dirtyFields:P.keepDefaultValues&&w?Bn(a,w):P.keepDirty?n.dirtyFields:{},touchedFields:P.keepTouched?n.touchedFields:{},errors:P.keepErrors?n.errors:{},isSubmitSuccessful:P.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Re=(w,P)=>ut(ot(w)?w(i):w,{...t.resetOptions,...P}),Tt=(w,P={})=>{const v=K(s,w),E=v&&v._f;if(E){const M=E.refs?E.refs[0]:E.ref;M.focus&&setTimeout(()=>{M.focus(),P.shouldSelect&&ot(M.select)&&M.select()})}},Lt=w=>{const{name:P,type:v,values:E,...M}=w;n={...n,...M}},wt={control:{register:Qe,unregister:Je,getFieldState:ee,handleSubmit:Ct,setError:z,_subscribe:X,_runSchema:B,_updateIsValidating:j,_focusError:ct,_getWatch:H,_getDirty:re,_setValid:A,_setFieldArray:N,_setDisabledField:Fe,_setErrors:D,_getFieldArray:be,_reset:ut,_resetDefaultValues:()=>ot(t.defaultValues)&&t.defaultValues().then(w=>{Re(w,t.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:te,_disableForm:Et,_subjects:b,_proxyFormState:y,get _fields(){return s},get _formValues(){return i},get _state(){return o},set _state(w){o=w},get _defaultValues(){return a},get _names(){return l},set _names(w){l=w},get _formState(){return n},get _options(){return t},set _options(w){t={...t,...w},m=Es(t.mode),h=Es(t.reValidateMode)}},subscribe:he,trigger:ve,register:Qe,handleSubmit:Ct,watch:ge,setValue:De,setValues:Ue,getValues:ye,reset:Re,resetField:jt,resetDefaultValues:(w,P={})=>{if(a=Be(w),!P.keepDirty){const v=Bn(a,i);n.dirtyFields=v,n.isDirty=!rt(v)}P.keepIsValid||A(),b.state.next({...n,defaultValues:a})},clearErrors:Ce,unregister:Je,setError:z,setFocus:Tt,getFieldState:ee};return{...wt,formControl:wt}}function $t(e={}){const t=x.useRef(void 0),n=x.useRef(void 0),s=x.useRef(e.formControl),[a,i]=x.useState(()=>({...Be(im),isLoading:ot(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ot(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&s.current!==e.formControl)if(s.current=e.formControl,e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!ot(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=m9(e);t.current={...c,formState:a}}const o=t.current.control;return o._options=e,Lo(()=>{const l=o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return i(c=>({...c,isReady:!0})),o._formState.isReady=!0,l},[o]),x.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),x.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),x.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),x.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),x.useEffect(()=>{if(o._proxyFormState.isDirty){const l=o._getDirty();l!==a.isDirty&&o._subjects.state.next({isDirty:l})}},[o,a.isDirty]),x.useEffect(()=>{var l;e.values&&!kt(e.values,n.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((l=o._options.resetOptions)===null||l===void 0)&&l.keepIsValid||o._setValid(),n.current=e.values,i(c=>({...c}))):o._resetDefaultValues()},[o,e.values]),x.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=x.useMemo(()=>Xd(a,o),[o,a]),t.current}function om({register:e,control:t,errors:n,zipRegister:s,isUS:a,state:i,stateOptions:o,zipStateMismatch:l,focusHelp:c}){var u,d,m,h;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mt-6 h-px bg-slate-200"}),r.jsxs("div",{className:"border-t border-slate-100 pt-6",children:[r.jsx("h3",{className:"mb-5 text-sm font-semibold text-slate-900",children:"Address Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(ze,{label:"Address Line 1",required:!0,maxLength:50,placeholder:"Enter Address Line 1",error:(u=n.address1)==null?void 0:u.message,...e("address1"),onFocus:c("address1")}),r.jsx(ze,{label:"Address Line 2",maxLength:50,placeholder:"Enter Address Line 2",error:(d=n.address2)==null?void 0:d.message,...e("address2"),onFocus:c("address2")}),r.jsx(ze,{label:"City",required:!0,maxLength:50,placeholder:"Enter City",error:(m=n.city)==null?void 0:m.message,...e("city"),onFocus:c("city")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Ee,{name:"state",control:t,render:({field:f})=>{var y;return r.jsx(Se,{id:"entity-state",label:a?"State":"Province",required:!0,error:(y=n.state)==null?void 0:y.message,placeholder:a?"Select State":"Select Province",value:f.value??"",onChange:f.onChange,options:o.map(p=>({value:p.code,label:p.name}))})}}),r.jsx(ze,{label:a?"ZIP Code":"Postal Code",required:!0,maxLength:10,placeholder:a?"Enter ZIP Code":"A1A 1A1",error:((h=n.zipCode)==null?void 0:h.message)??(l?`ZIP code does not match the selected state (${i}).`:void 0),...s,onChange:f=>{f.target.value=a?Z4(f.target.value):U4(f.target.value),s.onChange(f)},onFocus:c("zipCode")}),r.jsx(Ee,{name:"country",control:t,render:({field:f})=>{var y;return r.jsx(Se,{id:"entity-country",label:"Country",required:!0,error:(y=n.country)==null?void 0:y.message,placeholder:"Select Country",value:f.value??"",onChange:f.onChange,options:Ta.map(p=>({value:p,label:p}))})}})]})]})]})}function Fr({label:e="Phone Number",required:t=!1,error:n,variant:s="default",placeholder:a=D4,id:i,name:o,readOnly:l,disabled:c,onFocus:u,register:d,value:m,onChange:h}){const f=i??(d==null?void 0:d.name)??o,y=n&&f?`${f}-error`:void 0,p=C=>{C.target.value=Ln(C.target.value),d&&d.onChange(C),h==null||h(C)},b=r.jsx("input",{type:"tel",inputMode:"numeric",autoComplete:"tel",maxLength:M4,placeholder:a,readOnly:l,disabled:c,"aria-invalid":n?!0:void 0,"aria-describedby":y,...d,...m===void 0?{}:{value:m},name:(d==null?void 0:d.name)??o,id:f,onFocus:u,onChange:p,className:s==="payment"?le(!!n,l):`block w-full rounded-sm border bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 ${n?"border-red-300":"border-slate-200"}`});return s==="payment"?r.jsx(_,{label:e,required:t,error:n,children:b}):r.jsxs("div",{children:[r.jsx(ms,{label:e,required:t,htmlFor:f}),b,n?r.jsx("p",{id:y,className:"mt-1 text-xs text-red-600",children:n}):null]})}function lm({label:e,placeholder:t,maxLength:n,accountType:s,register:a,error:i,onFocus:o}){return r.jsx(ze,{label:e,required:!0,inputMode:"numeric",placeholder:t,maxLength:n,error:i,...a,onChange:l=>{l.target.value=ts(l.target.value,s),a.onChange(l)},onFocus:o})}function cm({register:e,control:t,errors:n,einRegister:s,phoneRegister:a,accountType:i,idLabel:o,idPlaceholder:l,idMaxLength:c,focusHelp:u}){var d,m,h,f,y;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(ze,{label:"Legal Business Name",required:!0,maxLength:50,placeholder:"Enter Legal Business Name",error:(d=n.lastName)==null?void 0:d.message,...e("lastName"),onFocus:u("legalBusinessName")},"entity-business-name"),r.jsx(ze,{label:"Business Display Name",maxLength:50,placeholder:"Enter Business Display Name",error:(m=n.tradeName)==null?void 0:m.message,...e("tradeName"),onFocus:u("businessDisplayName")},"entity-trade-name"),r.jsx(ze,{label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",error:(h=n.email)==null?void 0:h.message,...e("email"),onFocus:u("email")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(Fr,{required:!0,register:a,error:(f=n.phoneNumber)==null?void 0:f.message,onFocus:u("phoneNumber")}),r.jsx(Ee,{name:"entityType",control:t,render:({field:p})=>{var b;return r.jsx(Se,{id:"entity-type",label:"Entity Type",required:!0,error:(b=n.entityType)==null?void 0:b.message,placeholder:"Select Entity Type",value:p.value??"",onChange:p.onChange,options:V4.map(C=>({value:C,label:C}))})}}),r.jsx(lm,{label:o,placeholder:l,maxLength:c,accountType:i,register:s,error:(y=n.ein)==null?void 0:y.message,onFocus:u("ein")})]})]})}const h9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZMAAACoCAMAAAASCPOJAAADAFBMVEUAljECn0gDok4DpUgEpE8GplAJqVELq1MNrFMOrFMPqVAbqVQItU0Or1QPr1URsVUSsVcUtFgXtlsau14dvmAgv2MlwmcryGsxy240zG81znA40HE80nM+z3Q+03Q/1HVKxH5F1Htd0Ixx15sIef0Xkf1yms5oq8JpzrUlmP0slf1Zqut4ntF6oNF7oNF6q81617l+otOApNSCptWDp9WA0rOHrNaR2rKcztSk0eOw3+Wk6L+u59y26uO36ea+7OS/6+e97+LB7+fC7+fC7+jE8Oetye20zu+z0vO40vC61e+94O3C1/LE7+nI2/TL4vPH8enT4vfa7vDj7PTb6PfY5vjk7vro8fv8yzX856T89dns+fHw+PTt9vfs8vjt8/jt9Prr8vvt9Pvr8/zs8/zt9P3z+P3q8P7r9f7r8f7r9P7r8/7s9f7s8/7s9P7t9f7t9P7t8/7t8v7t9f/6/P39ugH9wwP9vAT9rwX9vQb9vQ39wQ39xA79wg79wg/9xhP9xxX9whX9xhb9yRn9xRr9xBr9wxr9xRv9xBz9xx39xh39xR39xB79xR79xx79xCH9xCP9yCT9xyX9xib9yij9zDP9xDT91lb93XD93Xb93Hf933394of94oz9443955/96ar967P978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ypjLH3h3dhp83amaUQ7wC+RnUmN2O6O7Y5uiKLrIhQXtSiL+cLgcs2Fm5mez8HCBtQrzxjg8ud9eTL927KxvwSYyivO3YdUI3iEQH5nYsAEBYLAVSGNLt15SOlZbplkNiz0kzoCLRGO8DbmusyqQwjtZLOnhXpkISaPnrEcRSCH2il3U5UJqlRY8xinrkBplY2C06BkJNCuyi4LIfcy/sbqilwbR5CotFWSwWZVjgf4tUFqUkvFaGBV5YLIa8WCxyWaRShoQ/hiHlgT9SFoshlaGkxbAoeG2R5EP4SnxoKGUxZHxiSItFygX/SYthwKXwP/yZ+M0p8d/KomT+N+6HP4NLLPJiMYRhCIvFUPjr8ashLcoi4feJbw43D0pkunzHMCzyYsiJ/4WX84DL5wGdSfGRRcBNJLxtwfeFd2V8vvDT4+ZKycOAz+GmUuI7DIsF3oV7GxKefoGv4jHIuA4PSlgMJeBjGIaER+HRwfDxi2XgJ+ML49Z4GBeU6hfnAo3jMsiN4C4K/sdft+CbL/ylGOOA2cAA8HxhGjAhqSxCSQnTsODh4e/Bt+GlOoPy/QXfxpNY+BGGOgt8U0kum3CPKcuVMR9pUYaM+8akhoTFEIbA88K3gyHmIcV1U1rUpYLrLwYsi5QGvLbgQayXxM0tsqwLvlkeaCwh/ILvaCiLlPjxeKlhBIYhlJIGedaBxxprshReD5hYzCDWMV+U5xlLQSYH9zfwfeC+eTr46RM/4aKQXI+HTAY489Ir0zrHFfEQqOzHJWQB8yrKA/YU1n3Gmso8HkNJuW6xIsuj3kmRtV+3A38nzx5PSVrwtNXVybPNk8MjgUcceJEPvJNkA/EW5TWXsfbr5TEsZZB1mIa63wqvq4Irp8xXh6xzqrfCd5hlLLGNeNCL7ArZcfiXDOl034mnmycMXy7PVmS58xpJJQWM2lAHmxcKPw02FX6Psa77S+abx38xlPL/A0Q84jHd4l56AAAAAElFTkSuQmCC";function f9(){return r.jsx("img",{src:h9,alt:"",width:403,height:168,className:"h-32 w-auto"})}const p9="data:image/png;base64,iVBORw0KGg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t:"",width:242,height:168,className:"h-32 w-auto"})}function Do(){return r.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12s3.75-7.5 9.75-7.5 9.75 7.5 9.75 7.5-3.75 7.5-9.75 7.5S2.25 12 2.25 12z"}),r.jsx("circle",{cx:"12",cy:"12",r:"2.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}function um(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 002.25 12s3.75 7.5 9.75 7.5c1.632 0 3.106-.328 4.396-.87M6.228 6.228A10.45 10.45 0 0112 4.5c6 0 9.75 7.5 9.75 7.5a10.49 10.49 0 01-4.293 4.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.243L9.88 9.88"})})}function g9({open:e,entityName:t,description:n,illustration:s,pages:a,onClose:i,onGoToDashboard:o,onStartPayment:l}){const c=ir(),[u,d]=x.useState(0),[m,h]=x.useState({});if(x.useEffect(()=>{if(!e)return;d(0),h({});const p=b=>{b.key==="Escape"&&i()};return document.addEventListener("keydown",p),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[e,i]),!e||a.length===0)return null;const f=a[Math.min(u,a.length-1)],y=a.length>1;return ft.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:i}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"entity-success-title",className:"relative z-10 max-h-[90vh] w-full max-w-md overflow-y-auto rounded-2xl bg-white p-6 text-center shadow-xl sm:p-8",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:i,className:"absolute right-4 top-4 rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(y9,{})}),r.jsx("div",{className:"flex justify-center",children:s}),r.jsxs("h2",{id:"entity-success-title",className:"mt-2 text-xl font-bold text-slate-900",children:[t," Added Successfully!"]}),r.jsx("p",{className:"mt-2 text-sm text-slate-500",children:n}),r.jsxs("div",{className:"mt-6 overflow-hidden rounded-xl border border-slate-200 text-left",children:[f.title?r.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-slate-200 bg-slate-50 px-4 py-3 bg-[#F0F0F0]",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:f.title}),y?r.jsxs("div",{className:"flex items-center gap-1 rounded-md border border-slate-200 bg-white px-1 py-0.5",children:[r.jsx("button",{type:"button","aria-label":"Previous details",disabled:u===0,onClick:()=>d(p=>Math.max(0,p-1)),className:"rounded p-0.5 text-slate-500 transition hover:bg-slate-100 hover:text-slate-700 disabled:opacity-40 disabled:hover:bg-transparent",children:r.jsx(b9,{})}),r.jsxs("span",{className:"text-xs text-slate-500",children:[u+1," / ",a.length]}),r.jsx("button",{type:"button","aria-label":"Next details",disabled:u>=a.length-1,onClick:()=>d(p=>Math.min(a.length-1,p+1)),className:"rounded p-0.5 text-slate-500 transition hover:bg-slate-100 hover:text-slate-700 disabled:opacity-40 disabled:hover:bg-transparent",children:r.jsx(v9,{})})]}):null]}):null,r.jsx("div",{className:"divide-y divide-slate-100",children:f.rows.map(p=>{const b=`${u}:${p.label}`,C=m[b]===!0;return r.jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[r.jsx("span",{className:"shrink-0 text-sm text-slate-500",children:p.label}),r.jsxs("span",{className:"flex items-center gap-2 text-right text-sm font-medium text-slate-900",children:[p.masked!==void 0&&!C?p.masked:p.value,p.masked!==void 0?r.jsx("button",{type:"button","aria-label":C?`Hide ${p.label}`:`Show ${p.label}`,onClick:()=>h(g=>({...g,[b]:!C})),className:"shrink-0 text-slate-400 transition hover:text-slate-600",children:C?r.jsx(Do,{}):r.jsx(um,{})}):null]})]},p.label)})})]}),r.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[r.jsx("button",{type:"button",onClick:o,className:"inline-flex h-11 w-full items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 sm:w-1/2",children:"Go to Dashboard"}),r.jsx("button",{type:"button",onClick:l,className:"inline-flex h-11 w-full items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 sm:w-1/2",children:"Start Payment"})]})]})]}),c)}function y9(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}function b9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function v9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}const C9="Your entity has been created successfully. Review the details below and create your first payment.",j9="Review the details below and create your first payment.";function w9({created:e,onClose:t,onGoToDashboard:n,onStartPayment:s}){const a=(e==null?void 0:e.values)??null,i=(e==null?void 0:e.secondary)??null,o=(a==null?void 0:a.accountType)==="Individual";return r.jsx(g9,{open:a!==null,entityName:a?N9(a,o):"",description:o?j9:C9,illustration:o?r.jsx(x9,{}):r.jsx(f9,{}),pages:S9(a,i,o),onClose:t,onGoToDashboard:n,onStartPayment:s})}function N9(e,t){return t?`${e.firstName.trim()} ${e.lastName.trim()}`.trim():e.lastName.trim()}function S9(e,t,n){return e?n?[{title:"Primary Taxpayer Details",rows:[{label:"First Name",value:e.firstName.trim()},{label:"Last Name",value:e.lastName.trim()},{label:"Email",value:e.email},{label:"Phone Number",value:ns(`${Tr}${e.phoneNumber}`)},{label:"SSN",value:tr(e.ein,"Individual"),masked:Gr(e.ein,"Individual")},{label:"Address",value:qs(e)}]},...t?[{title:"Secondary Taxpayer Details",rows:[{label:"First Name",value:t.firstName.trim()},{label:"Last Name",value:t.lastName.trim()},{label:"Email",value:t.email},{label:"Phone Number",value:t.phone},{label:"SSN",value:tr(t.ssn,"Individual"),masked:Gr(t.ssn,"Individual")},{label:"Address",value:qs(t)}]}]:[]]:[{rows:[{label:"Entity Name",value:e.lastName.trim()},{label:"Email",value:e.email},{label:"Phone Number",value:ns(`${Tr}${e.phoneNumber}`)},{label:"Entity Type",value:e.entityType},{label:"EIN",value:tr(e.ein,"Business"),masked:Gr(e.ein,"Business")},{label:"Address",value:qs(e)}]}]:[]}function A9(){return r.jsxs("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.5 12.5l2.5 2.5 5-5"})]})}function k9(){return r.jsxs("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.5 9.5l5 5M14.5 9.5l-5 5"})]})}const dm={accountType:{title:"Account Type",required:!0,description:"Choose who the tax account and payments belong to. Your selection controls the identity fields and validation used on the form.",tips:[r.jsxs(r.Fragment,{children:["Choose ",r.jsx("strong",{children:"Business"})," for a registered organization using an EIN."]}),r.jsxs(r.Fragment,{children:["Choose ",r.jsx("strong",{children:"Individual"})," for personal obligations using an SSN or ITIN."]}),"Select the taxpayer that is legally responsible for the payment."],correct:"Business - ABC Consulting, LLC",mistake:"Individual - when the obligation belongs to the company EIN"},firstName:{title:"First Name",required:!0,description:"Enter the taxpayer's legal first name exactly as it appears on official tax or government records.",tips:["Use the individual's legal first name.","Match the name shown on the Social Security card or tax return.","Do not include middle names, initials, prefixes, or suffixes.","Avoid nicknames or abbreviated versions of the name."],correct:"John",mistake:"John Michael"},lastName:{title:"Last Name",required:!0,description:"Enter the taxpayer's legal last name exactly as it appears on official tax or government records.",tips:["Use the individual's legal surname/family name.","Match the name shown on the Social Security card or tax return.","Do not include middle names, prefixes, or suffixes.","Include hyphens or apostrophes if they are part of the legal last name."],correct:"Smith",mistake:"Smith Jr."},legalBusinessName:{title:"Legal Business Name",required:!0,description:r.jsxs(r.Fragment,{children:["Enter the exact legal name associated with the EIN in the business's ",r.jsx("strong",{children:"IRS records"}),"."]}),tips:[r.jsxs(r.Fragment,{children:["Use the name shown on ",r.jsx("strong",{children:"IRS Letter CP 575"}),", ",r.jsx("strong",{children:"Letter 147C"}),", or the latest tax return."]}),"Include punctuation and the full legal suffix, such as LLC, Inc., or Corp.","Do not enter a DBA, trade name, or shortened name here."],correct:"John's Consulting Services, LLC",mistake:`John's Consulting - when the IRS name includes "Services, LLC"`},businessDisplayName:{title:"Business Display Name",required:!1,description:"Add a familiar name to identify this entity in GovPay. This name is for your workspace and does not replace the legal business name.",tips:["Use a short name your team will easily recognize.","Add a location or division when managing similar entities.","Leave it blank if the legal name is already clear."],correct:"John's Consulting - West Office",mistake:"Using the legal name of a different business or taxpayer"},email:{title:"Email",required:!0,description:"Enter the primary email address for payment updates, verification messages, and action-required alerts.",tips:["Use an inbox that is actively monitored.","Prefer a business email accessible to the responsible user or team.","Check the spelling before continuing."],correct:"tax@johnsconsulting.com",mistake:"taxx@johnsconsulting.com - misspelled or inaccessible inbox"},phoneNumber:{title:"Phone Number",required:!0,description:"Provide the best contact number for account or payment-related questions.",tips:["Use an active number for the responsible contact.","Include the country code and area code.","Avoid shared numbers that your team cannot reliably access."],correct:"+1 (512) 555-0184",mistake:"555-0184 - missing the country code and area code"},entityType:{title:"Entity Type",required:!0,description:"Select the legal structure under which the business is registered.",tips:["Use formation or registration documents as your source.","Choose the full entity type, such as LLC, Corporation, or Partnership.","Do not guess from the business name or tax form alone."],correct:"Limited Liability Company (LLC)",mistake:"Corporation - when registration documents identify an LLC"},ein:{title:"EIN",required:!0,description:r.jsxs(r.Fragment,{children:["Enter the nine-digit ",r.jsx("strong",{children:"Employer Identification Number"})," assigned to the business by the IRS."]}),tips:["Use an IRS-issued document or the latest filed tax return.","Enter all nine digits in XX-XXXXXXX format.","Do not enter a state tax ID, account number, SSN, or ITIN."],correct:"12-3456789",mistake:"12345678 - incomplete, or a state account number"},ssn:{title:"SSN",required:!0,description:r.jsxs(r.Fragment,{children:["Enter the nine-digit ",r.jsx("strong",{children:"Social Security Number"})," issued to the individual taxpayer by the Social Security Administration."]}),tips:["Use the Social Security card or the latest filed tax return.","Enter all nine digits in XXX-XX-XXXX format.","Do not enter an EIN, state tax ID, or account number."],correct:"123-45-6789",mistake:"12-3456789 - an EIN, or fewer than nine digits"},address1:{title:"Address Line 1",required:!0,description:"Enter the primary street address used for the business's official mailing or tax correspondence.",tips:["Include the street number and full street name.","Use the address shown on current business or tax records.","Place suite, unit, floor, or attention details in Address Line 2."],correct:"245 Market Street",mistake:"Austin, Texas - city and state entered as the street address"},address2:{title:"Address Line 2",required:!1,description:"Add secondary delivery details needed to locate the business within the main street address.",tips:["Use this field for a suite, unit, floor, building, or attention line.","Leave it blank if no additional address information is required.","Do not repeat the city, state, ZIP Code, or country."],correct:"Suite 400",mistake:"Austin, TX 78701 - belongs in the city, state, and ZIP fields"},city:{title:"City",required:!0,description:"Enter the city associated with the business address and ZIP Code.",tips:["Use the official or USPS-recognized city name.","Make sure it matches the selected state and ZIP Code.","Do not include the state abbreviation or ZIP Code in this field."],correct:"Austin",mistake:"Austin, TX 78701"},state:{title:"State",required:!0,description:"Select the state in which this business address is physically located.",tips:["Match the state to the city and ZIP Code entered above.","Use the address state - not automatically the state of incorporation.","Select the state from the list instead of typing an abbreviation."],correct:"Texas (TX)",mistake:"Delaware - selected only because the business was incorporated there"},zipCode:{title:"ZIP Code",required:!0,description:"Enter the postal ZIP Code for the business address.",tips:["Use a five-digit ZIP Code or ZIP+4 when available.","Keep any leading zero.","Confirm that it matches the selected city and state."],correct:"78701 or 78701-1234",mistake:"7871 - fewer than five digits"},country:{title:"Country",required:!0,description:"Select the country where the business address is located. This controls the address format and available location fields.",tips:["Choose the country for the address entered - not the owner's residence.","Confirm that the state or region and postal code use that country's format.","Do not select United States only because the business has an EIN."],correct:"United States - for an address in Austin, Texas",mistake:"United States - when the entered business address is in Canada"}},P9=[r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"font-medium text-slate-700",children:"Business:"})," Have your IRS EIN confirmation letter (CP-575) on hand."]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"font-medium text-slate-700",children:"Individual:"})," Have your Social Security card on hand for your name and SSN."]}),"Select any field and this box shows exactly how to write it."];function mm({active:e}){return r.jsxs("aside",{className:"w-full shrink-0 rounded-xl border border-slate-200 bg-white p-5 lg:sticky lg:top-6 lg:w-80 shadow-lg",children:[r.jsx("h3",{className:"border-l-2 border-gov-600 pl-2 text-xs font-semibold italic text-gov-700",children:"How to fill this"}),e?r.jsxs("div",{className:"mt-3",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsx("h4",{className:"text-base font-semibold text-slate-900",children:e.title}),r.jsx("span",{className:`mt-0.5 shrink-0 rounded px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${e.required?"bg-red-50 text-red-600":"bg-gov-50 text-gov-700"}`,children:e.required?"Required":"Optional"})]}),r.jsx("p",{className:"mt-2 text-sm text-slate-600",children:e.description}),r.jsx("ul",{className:"mt-3 list-disc space-y-2 pl-5 text-sm text-slate-600",children:e.tips.map((t,n)=>r.jsx("li",{children:t},n))}),e.correct?r.jsx(Cc,{tone:"correct",label:"Correct format",value:e.correct}):null,e.mistake?r.jsx(Cc,{tone:"mistake",label:"Common mistake",value:e.mistake}):null]}):r.jsxs("div",{className:"mt-3",children:[r.jsx("p",{className:"text-sm text-slate-600",children:"We verify these details against IRS records, so accuracy here determines whether your filings are accepted."}),r.jsx("ul",{className:"mt-3 list-disc space-y-2 pl-5 text-sm text-slate-600",children:P9.map((t,n)=>r.jsx("li",{children:t},n))})]})]})}function Cc({tone:e,label:t,value:n}){const s=e==="correct";return r.jsxs("div",{className:s?"mt-4 rounded-lg border border-emerald-200 bg-emerald-50 p-3":"mt-3 rounded-lg border border-red-200 bg-red-50 p-3",children:[r.jsxs("p",{className:`flex items-center gap-1.5 text-xs font-semibold ${s?"text-emerald-700":"text-red-700"}`,children:[s?r.jsx(A9,{}):r.jsx(k9,{}),t]}),r.jsx("p",{className:`mt-1 text-sm ${s?"text-emerald-900":"text-red-900"}`,children:n})]})}function hm({register:e,errors:t,einRegister:n,phoneRegister:s,accountType:a,idLabel:i,idPlaceholder:o,idMaxLength:l,focusHelp:c}){var u,d,m,h,f;return r.jsxs(r.Fragment,{children:[r.jsx("h3",{className:"mb-5 text-sm font-semibold text-slate-900",children:"Primary Taxpayer Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(ze,{label:"First Name",required:!0,maxLength:50,placeholder:"Enter First Name",error:(u=t.firstName)==null?void 0:u.message,...e("firstName"),onFocus:c("firstName")},"entity-first-name"),r.jsx(ze,{label:"Last Name",required:!0,maxLength:50,placeholder:"Enter Last Name",error:(d=t.lastName)==null?void 0:d.message,...e("lastName"),onFocus:c("lastName")},"entity-last-name"),r.jsx(lm,{label:i,placeholder:o,maxLength:l,accountType:a,register:n,error:(m=t.ein)==null?void 0:m.message,onFocus:c("ssn")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[r.jsx(ze,{label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",error:(h=t.email)==null?void 0:h.message,...e("email"),onFocus:c("email")}),r.jsx(Fr,{required:!0,register:s,error:(f=t.phoneNumber)==null?void 0:f.message,onFocus:c("phoneNumber")})]})]})}function I9({checked:e,onChange:t}){return r.jsx("section",{className:"rounded-xl border border-slate-200 bg-white p-6",children:r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 shrink-0 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:e,onChange:n=>t(n.target.checked)}),r.jsxs("span",{children:[r.jsx("span",{className:"block text-sm font-semibold text-slate-900",children:"Add Secondary Taxpayer Details"}),r.jsx("span",{className:"mt-0.5 block text-sm text-slate-500",children:"Tick this to enter your spouse's name, SSN and contact details for the joint return."})]})]})})}function E9({values:e,address:t,stateOptions:n,errors:s,onFieldChange:a,onFieldValueChange:i,onSsnChange:o,onSameAsPrimaryChange:l}){const c=e.sameAsPrimaryAddress;return r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:"Secondary Taxpayer Details"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(ze,{id:"secondary-first-name",error:s.firstName,label:"First Name",required:!0,maxLength:50,placeholder:"Enter First Name",value:e.firstName,onChange:a("firstName")}),r.jsx(ze,{id:"secondary-last-name",error:s.lastName,label:"Last Name",required:!0,maxLength:50,placeholder:"Enter Last Name",value:e.lastName,onChange:a("lastName")})]}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(ze,{id:"secondary-ssn",error:s.ssn,label:"SSN",required:!0,inputMode:"numeric",placeholder:"Enter SSN",maxLength:Sd,value:e.ssn,onChange:u=>o(u.target.value)}),r.jsx(ze,{id:"secondary-email",error:s.email,label:"Email",required:!0,type:"email",maxLength:50,placeholder:"Enter Email",value:e.email,onChange:a("email")})]}),r.jsx("div",{className:"grid gap-5 sm:grid-cols-2",children:r.jsx(Fr,{id:"secondary-phone",error:s.phone,required:!0,value:e.phone,onChange:a("phone")})}),r.jsxs("div",{className:"border-t border-slate-100 pt-6",children:[r.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h3",{className:"text-sm font-semibold text-slate-900",children:"Address Details"}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:c,onChange:u=>l(u.target.checked)}),"Same as Primary Taxpayer's Address"]})]}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(ze,{id:"secondary-address1",error:s.address1,label:"Address Line 1",required:!0,maxLength:50,placeholder:"Enter Address Line 1",value:t.address1,disabled:c,onChange:a("address1")}),r.jsx(ze,{id:"secondary-address2",error:s.address2,label:"Address Line 2",maxLength:50,placeholder:"Enter Address Line 2",value:t.address2,disabled:c,onChange:a("address2")})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2",children:[r.jsx(ze,{id:"secondary-city",error:s.city,label:"City",required:!0,maxLength:50,placeholder:"Enter City",value:t.city,disabled:c,onChange:a("city")}),r.jsx(Se,{id:"secondary-state",error:s.state,label:"State",required:!0,placeholder:"Select State",value:t.state,disabled:c,onChange:u=>i("state",u),options:n.map(u=>({value:u.code,label:u.name}))})]}),r.jsxs("div",{className:"mt-5 grid gap-5 sm:grid-cols-2",children:[r.jsx(ze,{id:"secondary-zip",error:s.zipCode,label:"ZIP Code",required:!0,maxLength:10,placeholder:"Enter ZIP Code",value:t.zipCode,disabled:c,onChange:a("zipCode")}),r.jsx(Se,{id:"secondary-country",error:s.country,label:"Country",required:!0,placeholder:"Select Country",value:t.country,disabled:c,onChange:u=>i("country",u),options:Ta.map(u=>({value:u,label:u}))})]})]})]})}const jc=(e,t,n)=>{if(e&&"reportValidity"in e){const s=K(n,t);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Bi=(e,t)=>{for(const n in t.fields){const s=t.fields[n];s&&s.ref&&"reportValidity"in s.ref?jc(s.ref,n,e):s&&s.refs&&s.refs.forEach(a=>jc(a,n,e))}},wc=(e,t)=>{t.shouldUseNativeValidation&&Bi(e,t);const n={};for(const s in e){const a=K(t.fields,s),i=Object.assign(e[s]||{},{ref:a&&a.ref});if(T9(t.names||Object.keys(e),s)){const o=Object.assign({},K(n,s));we(o,"root",i),we(n,s,o)}else we(n,s,i)}return n},T9=(e,t)=>{const n=Nc(t).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(s=>Nc(s).match(`^${n}\\.\\d+`))};function Nc(e){return e.replace(/[\[\]]/g,"")}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Hi.apply(null,arguments)}function Sc(e,t){try{var n=e()}catch(s){return t(s)}return n&&n.then?n.then(void 0,t):n}function L9(e,t){for(var n={};e.length;){var s=e[0],a=s.code,i=s.message,o=s.path.join(".");if(!n[o])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];n[o]={message:l.message,type:l.code}}else n[o]={message:i,type:a};if("unionErrors"in s&&s.unionErrors.forEach(function(d){return d.errors.forEach(function(m){return e.push(m)})}),t){var c=n[o].types,u=c&&c[s.code];n[o]=Fo(o,t,n,a,u?[].concat(u,s.message):s.message)}e.shift()}return n}function F9(e,t){for(var n={},s=function(){var a=e[0],i=a.code,o=a.message,l=a.path.join(".");if(!n[l])if(a.code==="invalid_union"&&a.errors.length>0){var c=a.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:o,type:i};if(a.code==="invalid_union"&&a.errors.forEach(function(m){return m.forEach(function(h){return e.push(Hi({},h,{path:[].concat(a.path,h.path)}))})}),t){var u=n[l].types,d=u&&u[a.code];n[l]=Fo(l,t,n,i,d?[].concat(d,a.message):a.message)}e.shift()};e.length;)s();return n}function en(e,t,n){if(n===void 0&&(n={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,a,i){try{return Promise.resolve(Sc(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](s,t)).then(function(o){return i.shouldUseNativeValidation&&Bi({},i),{errors:{},values:n.raw?Object.assign({},s):o}})},function(o){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(o))return{values:{},errors:wc(L9(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,a,i){try{return Promise.resolve(Sc(function(){return Promise.resolve((n.mode==="sync"?C5:j5)(e,s,t)).then(function(o){return i.shouldUseNativeValidation&&Bi({},i),{errors:{},values:n.raw?Object.assign({},s):o}})},function(o){if((function(l){return l instanceof Co})(o))return{values:{},errors:wc(F9(o.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function nt(e,t){var n;if(e instanceof mn){if(e.details){const s=(n=Object.values(e.details)[0])==null?void 0:n[0];if(s)return s}return e.message||t}return e instanceof Error&&e.message?e.message:t}function R9(e){return me(`/portal/reference/states?country=${encodeURIComponent(e)}`)}function Rr(e){const{data:t}=ue({queryKey:["reference","states",e],queryFn:()=>R9(e),enabled:!!e,staleTime:1/0});return t??[]}function aa(e,t,n){const s=e.find(o=>o.code===t);if(!s||s.zipRanges.length===0)return!0;const a=n.replace(/\D/g,"");if(a.length<5)return!0;const i=Number(a.slice(0,3));return s.zipRanges.some(o=>i>=o.from&&i<=o.to)}function tn(e,t){const n=e==null?void 0:e.from;return n&&n.startsWith("/")&&!n.startsWith("//")?n:t}function M9(){const e=Ae(),t=Ie(),n=pt(),{data:s=[]}=ue({queryKey:["entities","mine"],queryFn:co}),[a,i]=x.useState(null),[o,l]=x.useState(!1),[c,u]=x.useState(null),d=R=>()=>u(R),m=()=>u(null),[h,f]=x.useState(""),[y,p]=x.useState(!1),[b,C]=x.useState({}),[g,A]=x.useState(Ga),[j,k]=x.useState(null),[N,T]=x.useState(!1),{enabledPayments:D}=Wt(),q=R=>{C(Q=>{if(!(R in Q))return Q;const{[R]:ke,...xt}=Q;return xt})},$=(R,Q)=>{A(ke=>({...ke,[R]:Q})),q(R)},F=R=>Q=>{$(R,Q.target.value)},W=R=>{A(Q=>({...Q,ssn:ts(R,"Individual")})),q("ssn")},B=R=>{A(Q=>({...Q,sameAsPrimaryAddress:R})),R&&["address1","address2","city","state","zipCode","country"].forEach(q)},V=s.length===0?"/create-entity":"/dashboard",se=tn(t.state,V),te=()=>{e(se)},{register:re,control:H,handleSubmit:be,watch:ie,setValue:xe,getValues:Te,formState:{errors:De}}=$t({resolver:en(Bd),shouldUnregister:!1,defaultValues:{accountType:"Business",firstName:"",lastName:"",tradeName:"",ein:"",entityType:"",email:"",phoneNumber:"",address1:"",address2:"",city:"",state:"",zipCode:"",country:"United States"}}),Ue=ie("accountType"),Oe=Ue==="Individual",{label:je,placeholder:ve,maxLength:ye}=No(Ue),ee=ie("country"),Ce=ie("state"),z=ie("zipCode"),ge=ie("address1"),X=ie("address2"),he=ie("city"),Je=ee==="United States",Fe=Rr(ee),Qe=Ce.length>0&&z.trim().length>0&&!aa(Fe,Ce,z),ct=re("ein"),Et=re("phoneNumber"),Ct=re("zipCode"),jt=Oe&&h===cc,ut=jt&&y,Re=g.sameAsPrimaryAddress,Tt=Re?ee:g.country,Lt=Rr(Tt),$e={address1:Re?ge:g.address1,address2:Re?X:g.address2,city:Re?he:g.city,state:Re?Ce:g.state,zipCode:Re?z:g.zipCode,country:Tt},Ft=ut;x.useEffect(()=>{Ce&&Fe.length>0&&!Fe.some(R=>R.code===Ce)&&xe("state","")},[ee,Fe]);const wt=R=>{const Q=Te("accountType");if(Q===R)return;u("accountType"),R==="Business"&&(f(""),p(!1),C({}),A(Ga));const ke=Te("lastName");Hd(Q,R,xe,ke),xe("accountType",R),xe("ein",ts(Te("ein"),R)),xe("entityType",""),queueMicrotask(()=>{xe("lastName",ke),xe("firstName",""),Q==="Business"&&R==="Individual"&&xe("tradeName","")})},w=R=>{f(R),R!==cc&&(p(!1),C({}),A(Ga))},P=R=>{p(R),R||C({})},v=be(async R=>{if(i(null),!aa(Fe,R.state,R.zipCode)){i(`ZIP code does not match the selected state (${R.state}).`);return}const Q=ut?Y4(g,$e):{};if(C(Q),!(Object.keys(Q).length>0)){l(!0);try{await Sf(Yd(R,{filingStatus:Oe&&h||void 0,secondary:Ft?{...g,...$e}:null})),await n.invalidateQueries({queryKey:["entities","mine"]}),k({values:R,secondary:Ft?{...g,...$e}:null})}catch(ke){i(nt(ke,"Unable to save entity. Please try again."))}finally{l(!1)}}}),E=()=>{k(null),e("/dashboard",{replace:!0})},M=()=>{k(null),T(!0)},Y=()=>{T(!1),e("/dashboard",{replace:!0})},U=()=>{e("/payments/federal/new",{state:{from:"/dashboard",resetDraft:!0}})},G=()=>{e("/payments/state/new",{state:{from:"/dashboard",resetDraft:!0}})};return{register:re,control:H,errors:De,onSubmit:v,error:a,isSubmitting:o,einRegister:ct,phoneRegister:Et,zipRegister:Ct,accountType:Ue,isIndividual:Oe,isUS:Je,idLabel:je,idPlaceholder:ve,idMaxLength:ye,stateOptions:Fe,state:Ce,zipStateMismatch:Qe,activeHelp:c?dm[c]:null,focusHelp:d,resetHelp:m,filingStatus:h,setFilingStatus:w,canAddSecondaryTaxpayer:jt,includeSecondaryTaxpayer:y,setIncludeSecondaryTaxpayer:P,secondaryErrors:b,showSecondaryTaxpayer:ut,secondaryTaxpayer:g,secondaryAddress:$e,secondaryStateOptions:Lt,updateSecondaryField:F,setSecondaryField:$,setSecondarySsn:W,setSecondarySameAsPrimary:B,createdEntity:j,handleAccountTypeChange:wt,handleCancel:te,goToDashboard:E,enabledPayments:D,isPaymentPickerOpen:N,startPayment:M,closePaymentPicker:Y,startFederalPayment:U,startStatePayment:G}}function D9(){const e=M9();return r.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-start bg-white p-3 rounded-sm",children:[r.jsxs("form",{onSubmit:e.onSubmit,noValidate:!0,className:"min-w-0 flex-1 space-y-6",children:[e.error?r.jsx(Kt,{message:e.error}):null,r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx(Wd,{accountType:e.accountType,onAccountTypeChange:e.handleAccountTypeChange,isIndividual:e.isIndividual,filingStatus:e.filingStatus,onFilingStatusChange:e.setFilingStatus,focusHelp:e.focusHelp,resetHelp:e.resetHelp}),r.jsxs("div",{className:"",children:[e.isIndividual?r.jsx(hm,{register:e.register,errors:e.errors,einRegister:e.einRegister,phoneRegister:e.phoneRegister,accountType:e.accountType,idLabel:e.idLabel,idPlaceholder:e.idPlaceholder,idMaxLength:e.idMaxLength,focusHelp:e.focusHelp}):r.jsx(cm,{register:e.register,control:e.control,errors:e.errors,einRegister:e.einRegister,phoneRegister:e.phoneRegister,accountType:e.accountType,idLabel:e.idLabel,idPlaceholder:e.idPlaceholder,idMaxLength:e.idMaxLength,focusHelp:e.focusHelp}),r.jsx(om,{register:e.register,control:e.control,errors:e.errors,zipRegister:e.zipRegister,isUS:e.isUS,state:e.state,stateOptions:e.stateOptions,zipStateMismatch:e.zipStateMismatch,focusHelp:e.focusHelp})]})]}),e.canAddSecondaryTaxpayer?r.jsx(I9,{checked:e.includeSecondaryTaxpayer,onChange:e.setIncludeSecondaryTaxpayer}):null,e.showSecondaryTaxpayer?r.jsx(E9,{values:e.secondaryTaxpayer,address:e.secondaryAddress,stateOptions:e.secondaryStateOptions,errors:e.secondaryErrors,onFieldChange:e.updateSecondaryField,onFieldValueChange:e.setSecondaryField,onSsnChange:e.setSecondarySsn,onSameAsPrimaryChange:e.setSecondarySameAsPrimary}):null,r.jsx(ed,{onCancel:e.handleCancel,isSubmitting:e.isSubmitting,submitLabel:"Save",submittingLabel:"Creating…"})]}),r.jsx(mm,{active:e.activeHelp}),r.jsx(w9,{created:e.createdEntity,onClose:e.goToDashboard,onGoToDashboard:e.goToDashboard,onStartPayment:e.startPayment}),r.jsx($u,{open:e.isPaymentPickerOpen,onClose:e.closePaymentPicker,enabledPayments:e.enabledPayments,onSelectFederal:e.startFederalPayment,onSelectState:e.startStatePayment})]})}function Oo(){const e=Ae(),t=Ie(),n=tn(t.state,"/create-entity");return r.jsx("div",{className:"min-h-full bg-slate-50 px-4 py-6 sm:px-8 sm:py-8",children:r.jsxs("div",{className:"w-full",children:[r.jsxs("button",{type:"button",onClick:()=>e(n),className:"inline-flex items-center gap-1.5 rounded-lg py-1 text-sm font-medium text-slate-600 transition hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-500",children:[r.jsx(O9,{}),"Back"]}),r.jsxs("div",{className:"mb-6 mt-4",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Add Entity"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Everything here is matched against IRS records, so enter it exactly as the IRS has it."})]}),r.jsx(D9,{})]})})}function O9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}function z9({entity:e,onCancel:t,onSaved:n}){const s=pt(),[a,i]=x.useState(null),[o,l]=x.useState(!1),[c,u]=x.useState(null),[d,m]=x.useState(e.filingStatus??""),h=ie=>()=>u(ie),f=()=>u(null),{register:y,control:p,handleSubmit:b,watch:C,setValue:g,getValues:A,formState:{errors:j}}=$t({resolver:en(Bd),defaultValues:H4(e),shouldUnregister:!1}),k=C("accountType"),N=k==="Individual",{label:T,placeholder:D,maxLength:q}=No(k),$=C("country"),F=C("state"),W=C("zipCode"),B=$==="United States",ne=Rr($),V=F.length>0&&W.trim().length>0&&!aa(ne,F,W),se=y("ein"),te=y("phoneNumber"),re=y("zipCode");x.useEffect(()=>{F&&ne.length>0&&!ne.some(ie=>ie.code===F)&&g("state","")},[$,ne]);const H=ie=>{const xe=A("accountType");if(xe===ie)return;u("accountType");const Te=A("lastName");Hd(xe,ie,g,Te),g("accountType",ie),g("ein",ts(A("ein"),ie)),g("entityType",""),ie==="Business"&&m(""),queueMicrotask(()=>{g("lastName",Te),g("firstName",""),xe==="Business"&&ie==="Individual"&&g("tradeName","")})},be=b(async ie=>{if(i(null),!aa(ne,ie.state,ie.zipCode)){i(`ZIP code does not match the selected state (${ie.state}).`);return}l(!0);try{await Af(e.entityId,K4(ie,d)),await s.invalidateQueries({queryKey:["entities","mine"]}),n()}catch(xe){i(nt(xe,"Unable to update entity. Please try again."))}finally{l(!1)}});return r.jsxs("div",{className:"flex flex-col gap-6 rounded-sm bg-white p-3 lg:flex-row lg:items-start",children:[r.jsxs("form",{onSubmit:be,noValidate:!0,className:"min-w-0 flex-1 space-y-6",children:[a?r.jsx(Kt,{message:a}):null,r.jsxs("section",{className:"space-y-6 rounded-xl border border-slate-200 bg-white p-6",children:[r.jsx(Wd,{accountType:k,onAccountTypeChange:H,isIndividual:N,filingStatus:d,onFilingStatusChange:m,focusHelp:h,resetHelp:f}),r.jsxs("div",{children:[N?r.jsx(hm,{register:y,errors:j,einRegister:se,phoneRegister:te,accountType:k,idLabel:T,idPlaceholder:D,idMaxLength:q,focusHelp:h}):r.jsx(cm,{register:y,control:p,errors:j,einRegister:se,phoneRegister:te,accountType:k,idLabel:T,idPlaceholder:D,idMaxLength:q,focusHelp:h}),r.jsx(om,{register:y,control:p,errors:j,zipRegister:re,isUS:B,state:F,stateOptions:ne,zipStateMismatch:V,focusHelp:h})]})]}),r.jsx(ed,{onCancel:t,isSubmitting:o,submitLabel:"Save Changes",submittingLabel:"Saving…"})]}),r.jsx(mm,{active:c?dm[c]:null})]})}function zo(){const e=Ae(),t=Ie(),{entityId:n}=ya(),{entities:s,isLoading:a}=Wt(),i=tn(t.state,"/entities"),o=()=>e(i),l=s.find(c=>String(c.entityId)===n)??null;return r.jsx("div",{className:"min-h-full bg-slate-50 px-4 py-6 sm:px-8 sm:py-8",children:r.jsxs("div",{className:"w-full",children:[r.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1.5 rounded-lg py-1 text-sm font-medium text-slate-600 transition hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-500",children:[r.jsx(q9,{}),"Back"]}),r.jsxs("div",{className:"mb-6 mt-4",children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Edit Entity"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Update your entity profile details."})]}),l?r.jsx(z9,{entity:l,onCancel:o,onSaved:o},l.entityId):r.jsx("p",{className:"rounded-sm bg-white p-6 text-sm text-slate-500",children:a?"Loading entity…":"That entity could not be found."})]})})}function q9(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})})}const Fn=10;function V9(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),me(`/portal/dashboard?${n}`)}function Z9({entityId:e,search:t,taxYear:n,status:s,page:a=1,pageSize:i=Fn}){const o=new URLSearchParams({entityId:String(e),page:String(a),pageSize:String(i)});return t&&o.set("search",t),n&&o.set("taxYear",n),s&&s!=="all"&&o.set("status",s),me(`/portal/dashboard/payments?${o}`)}function U9(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),me(`/portal/dashboard/overview?${n}`)}function $a(e,t){const n=new URLSearchParams({entityId:String(e)});return t!==void 0&&n.set("taxYear",String(t)),me(`/portal/dashboard/charts?${n}`)}function fm({entityCount:e,from:t}){const n=Ae();return r.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1.5",children:[r.jsxs("button",{type:"button",onClick:()=>n("/entities"),className:"inline-flex items-center gap-1.5 rounded-[14px] border border-solid border-[#e5e7eb] bg-[#f9fafb] px-[15px] py-[9px] text-xs font-bold text-[#364153] transition hover:bg-slate-100",title:"View Entities",children:[r.jsx(B9,{}),"Entities (",e,")"]}),r.jsxs("button",{type:"button",onClick:()=>n("/create-entity/form",{state:{from:t}}),className:"inline-flex items-center gap-1.5 rounded-[14px] border-[1.5px] border-dashed border-[#16a34a] bg-[#f0fdf4] px-[15.5px] py-[9.5px] text-xs font-bold text-[#16a34a] transition hover:bg-green-50",children:[r.jsx(H9,{}),"Add Entity"]})]})}function B9(){return r.jsx("svg",{className:"h-[13px] w-[13px] shrink-0 text-[#364153]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"})})}function H9(){return r.jsx("svg",{className:"h-[13px] w-[13px] shrink-0 text-[#16a34a]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zM4 19.235v-.11a6.375 6.375 0 0112.75 0v.109A12.318 12.318 0 0110.374 21c-2.356 0-4.564-.64-6.374-1.766z"})})}function ei({entityCount:e,showPaymentActions:t=!0}){const n=Ae(),{enabledPayments:s}=Wt();return r.jsxs("div",{className:"flex flex-col gap-3",children:[e>0&&r.jsx(fm,{entityCount:e,from:"/dashboard"}),r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"self-stretch inline-flex flex-col justify-start items-start",children:[r.jsx("div",{className:"size- flex flex-col justify-start items-start",children:r.jsx("div",{className:"self-stretch justify-center text-zinc-900 text-xl font-bold leading-7",children:"Dashboard"})}),r.jsx("div",{className:"size- max-w-[576px] flex flex-col justify-start items-start",children:r.jsx("div",{className:"justify-center text-gray-700 text-sm font-normal leading-5",children:"Manage your tax payments and filings from one place."})})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[t&&s.includes("federal")&&r.jsx("button",{type:"button",onClick:()=>n("/payments/federal/new",{state:{from:"/",resetDraft:!0}}),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Federal Payment"}),t&&s.includes("state")&&r.jsx("button",{type:"button",onClick:()=>n("/payments/state/new",{state:{from:"/",resetDraft:!0}}),className:"inline-flex items-center gap-2 rounded-lg border border-gov-600 bg-white px-4 py-2.5 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:"Add State Payment"}),t&&r.jsxs("button",{type:"button",disabled:!0,title:"Coming soon",className:"inline-flex cursor-not-allowed items-center gap-2 rounded-lg border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm font-semibold text-slate-400",children:["Add Local Payment",r.jsx("span",{className:"text-xs font-medium",children:"(Coming Soon)"})]})]})]})]})}function Y9({items:e}){return r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:e.map(t=>r.jsxs("div",{className:"rounded-xl border border-slate-200 bg-white px-5 py-4 shadow-sm",children:[r.jsx("p",{className:"text-[13px] leading-5 text-gray-600",children:t.label}),r.jsx("p",{className:`mt-1.5 text-2xl font-bold leading-8 ${t.tone==="danger"?"text-red-600":"text-zinc-900"}`,children:t.value}),r.jsx("p",{className:"mt-1.5 text-[13px] leading-5 text-gray-600",children:t.caption})]},t.key))})}function Ra({label:e="Loading…"}){return r.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] bg-white/75","aria-live":"polite","aria-busy":"true",children:r.jsxs("div",{className:"flex items-center gap-2.5 text-sm text-slate-500",children:[r.jsx(W9,{}),r.jsx("span",{children:e})]})})}function W9(){return r.jsxs("svg",{className:"h-5 w-5 animate-spin text-gov-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[r.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),r.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}const pm={Draft:"Draft"};function xm(e){switch((e??pm.Draft).trim().toLowerCase()){case"draft":case"pending":return"drafts";case"scheduled":return"scheduled";case"processing":return"submitted";case"rejected":return"rejected";case"accepted":return"paid";default:return"drafts"}}function gm(e){const t=(e??pm.Draft).trim().toLowerCase();return t==="draft"||t==="pending"||t==="rejected"}const K9=[0,1,3,4,6,7,9,10],Q9=[0,1,2,3,4,5,6,7,8,9,10],G9=[0,1,2,3,4,5,6,8,9,10,11],J9=[0,1,2,3,4,5,6,7,9,10,11],ym=["720","941"],bm=["706-GS (D)","706-GS (T)","926","940","943","944","945","1042","2438","3520","6069","8752","CT-1"],vm=["7200D"],Cm=["8963"];function jm(e){return ym.includes(e)?K9:bm.includes(e)?Q9:vm.includes(e)?G9:Cm.includes(e)?J9:[]}function X9(e){return e.length!==6?"":`${e.slice(0,4)}-${e.slice(4,6)}`}function ia(e){if(e.length!==6)return null;const t=Number.parseInt(e.slice(0,4),10),n=Number.parseInt(e.slice(4,6),10);return Number.isNaN(t)||Number.isNaN(n)||n<1||n>12?null:{year:t,month:n-1}}function _9(e,t){return`${e}${String(t+1).padStart(2,"0")}`}function wm(){const e=new Date().getFullYear();return{minYear:e-2,maxYear:e}}function $9(e){const t=(e==null?void 0:e.trim())??"";return ym.includes(t)?"quarterly":bm.includes(t)||vm.includes(t)||Cm.includes(t)?"annual":"monthly"}function ti(e){const[t,n,s]=e.split("-").map(i=>Number.parseInt(i,10));return new Date(Date.UTC(t,n-1,s)).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"})}const e7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nm(e,t){if(!(e!=null&&e.trim()))return"—";const n=/^(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})$/.exec(e);if(n){const[,l,c]=n;return l===c?ti(l):`${ti(l)} – ${ti(c)}`}const s=/^(\d{4})-Q([1-4])$/.exec(e);if(s)return`Q${s[2]} ${s[1]}`;if(/^(Q[1-4]|ANNUAL|MONTHLY|ACCOUNT_ASSIGNED)$/i.test(e))return e.toUpperCase()==="ACCOUNT_ASSIGNED"?"Assigned schedule":e.toUpperCase();if(e.length!==6)return e;const a=e.slice(0,4),i=Number.parseInt(e.slice(4,6),10);if(Number.isNaN(i)||i<1||i>12)return e;const o=$9(t);return o==="quarterly"?`Q${Math.ceil(i/3)} ${a}`:o==="annual"?a:`${e7[i-1]} ${a}`}function t7(e){var t;return{id:e.id,category:e.category,referenceNo:e.referenceNumber??"—",jurisdiction:e.jurisdiction,period:Nm(e.taxPeriod,e.formType),amount:e.amount,paymentDate:e.paymentDate,status:e.status,reason:e.reason,formType:((t=e.formType)==null?void 0:t.trim())||"—",tab:xm(e.status),isAuthorized:e.isAuthorized}}function Bt(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function n7(e){return[{value:e,label:`${e}`},{value:e-1,label:`${e-1}`},{value:e-2,label:`${e-2}`}]}function Ac(e){return`$${(e/1e3).toFixed(1)}k`}const Sm="drafts",Ma="all";function _e(){return Rn(Sm)}function Rn(e){return`/payments?tab=${e}`}function Am(e){return e.trim().toLowerCase()==="federal"?"federal":"state"}function km(e,t){return`/payments/${Am(e)}/${t}/edit`}function Pm(e,t){return`/payments/${Am(e)}/${t}/view`}function r7(e){return e==="failed"?"rejected":e}function s7(e,t){return e==="draft"||t.trim().toLowerCase()==="draft"?Sm:r7(e)}const a7=5;function i7({alerts:e}){const t=Ae(),[n,s]=x.useState(0),a=e.slice(0,a7),i=Rn("rejected"),o=Math.min(n,a.length-1),l=a[o];if(!l)return null;const c=u=>{s(d=>{const m=Math.min(d,a.length-1)+u;return Math.min(Math.max(m,0),a.length-1)})};return r.jsxs("section",{className:"rounded-xl border border-red-200 bg-white p-4",children:[r.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx("span",{"aria-hidden":"true",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-red-500 text-sm font-bold text-white",children:"!"}),r.jsx("h2",{className:"text-base font-bold text-red-500",children:"Need Attention"})]}),r.jsx("button",{type:"button",onClick:()=>t(i),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(kc,{direction:"previous",disabled:o===0,onClick:()=>c(-1)}),r.jsx("div",{className:"min-w-0 flex-1 rounded-lg border border-red-300 bg-red-50 px-4 py-3","aria-live":"polite",children:r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("p",{className:"truncate text-sm font-bold text-zinc-900",children:[Bt(l.amount)," ",l.reason]}),r.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-600",children:l.details.join(" · ")})]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[r.jsx("button",{type:"button",onClick:()=>t(Pm(l.category,l.paymentId),{state:{from:"/dashboard"}}),className:"rounded-md border border-gov-600 bg-white px-4 py-1.5 text-sm font-medium text-gov-600 transition hover:bg-gov-50",children:"View"}),r.jsx("button",{type:"button",onClick:()=>t(km(l.category,l.paymentId),{state:{from:"/dashboard"}}),className:"rounded-md bg-red-500 px-4 py-1.5 text-sm font-medium text-white transition hover:bg-red-600",children:l.actionLabel})]})]})}),r.jsx(kc,{direction:"next",disabled:o===a.length-1,onClick:()=>c(1)})]}),a.length>1?r.jsx("div",{className:"mt-3 flex items-center justify-center gap-1.5",children:a.map((u,d)=>r.jsx("button",{type:"button","aria-label":`Show alert ${d+1} of ${a.length}`,"aria-current":d===o,onClick:()=>s(d),className:`h-1.5 rounded-full transition-all ${d===o?"w-5 bg-gov-700":"w-1.5 bg-slate-300 hover:bg-slate-400"}`},u.id))}):null]})}function kc({direction:e,disabled:t,onClick:n}){return r.jsx("button",{type:"button",onClick:n,disabled:t,"aria-label":e==="next"?"Next alert":"Previous alert",className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-500 transition hover:bg-slate-50 hover:text-slate-700 disabled:cursor-not-allowed disabled:opacity-40",children:r.jsx("svg",{className:`h-4 w-4 ${e==="previous"?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})}const Pc=["#c7d2fe","#a7f3d0","#fcd34d","#bfdbfe","#fbcfe8","#fdba74","#93c5fd","#fda4af"];function o7(e){return Pc[e%Pc.length]}const Ic=["#6366f1","#10b981","#f59e0b","#3b82f6","#ec4899","#f97316","#0ea5e9","#f43f5e"];function l7(e){return Ic[e%Ic.length]}function c7(e){const[t,n,s]=e.split("-");return!t||!n||!s?e:`${n}-${s}-${t}`}function u7(e){return{id:`${e.category}-${e.id}`,jurisdiction:e.jurisdiction,period:e.period,paymentDate:c7(e.paymentDate),status:e.status,statusLabel:e.statusLabel,formType:e.formType,amount:e.amount}}const d7=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function m7(e,t){const s=Math.round((e.getTime()-t.getTime())/864e5);return s<=0?"Due today":s===1?"Due in 1 day":`Due in ${s} days`}function h7(e,t=new Date){const[n,s,a]=e.dueDate.split("-").map(Number),i=new Date(n,(s??1)-1,a??1),o=new Date(t.getFullYear(),t.getMonth(),t.getDate());return{id:`${e.category}-${e.id}`,month:d7[i.getMonth()]??"",day:String(i.getDate()).padStart(2,"0"),title:e.formType,dueLabel:m7(i,o),jurisdiction:e.jurisdiction,amount:e.amount}}function f7(e){return e.map(t=>({id:`${t.category}-${t.id}`,paymentId:t.id,category:t.category,amount:t.amount,reason:"Payment Rejected",details:[t.jurisdiction,t.formType,t.period],actionLabel:"Re-Submit"}))}function p7(e){return e.map(t=>({label:`Quarter ${t.quarter}`,amount:t.amount}))}function x7(e){return e.map((t,n)=>({state:t.state,count:t.count,amount:t.amount,color:o7(n)}))}function g7(e){const t=e.reduce((n,s)=>n+s.amount,0);return e.map((n,s)=>({label:n.paymentType,amount:n.amount,percent:t>0?Math.round(n.amount/t*100):0,color:l7(s)}))}function qo({value:e,options:t,onChange:n}){return r.jsx(Se,{size:"sm",ariaLabel:"Tax year",leadingIcon:r.jsx(y7,{className:"pointer-events-none absolute left-2.5 top-1/2 z-10 h-3.5 w-3.5 -translate-y-1/2 text-slate-500"}),placeholder:"Select year",value:String(e),onChange:s=>n(Number(s)),options:t.map(s=>({value:String(s.value),label:s.label}))})}function y7({className:e}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})})}function b7(){const e=x.useRef(null),[t,n]=x.useState(0);return x.useEffect(()=>{const s=e.current;if(!s||(n(s.clientWidth),typeof ResizeObserver>"u"))return;const a=new ResizeObserver(i=>{var l;const o=(l=i[0])==null?void 0:l.contentRect.width;o!==void 0&&n(o)});return a.observe(s),()=>a.disconnect()},[]),[e,t]}const Ts={left:46,right:10,top:14,bottom:34},v7=.52,C7=170,j7=240,w7=140,ni=3e4;function N7(e){return e<=0?ni:Math.ceil(e/ni)*ni}function S7(e){return`$${Math.round(e/1e3)}k`}function A7({points:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){const[a,i]=b7(),o=Math.round(Math.min(Math.max((i||340)*v7,C7),j7)),l=N7(Math.max(...e.map(C=>C.amount),0)),c=[0,l/3,l*2/3,l],u=Ts.left,d=i-Ts.right,m=Ts.top,h=o-Ts.bottom,f=(d-u)/Math.max(e.length,1),y=C=>u+f*(C+.5),p=C=>h-C/l*(h-m),b=e.map((C,g)=>`${y(g)},${p(C.amount)}`).join(" ");return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Federal Payments"}),r.jsx(qo,{value:t,options:n,onChange:s})]}),r.jsx("div",{ref:a,className:"w-full",children:i>=w7?r.jsxs("svg",{width:i,height:o,className:"block",role:"img","aria-label":`Federal payments by quarter for tax year ${t}`,children:[c.map(C=>{const g=p(C);return r.jsxs("g",{children:[r.jsx("line",{x1:u,y1:g,x2:d,y2:g,className:"stroke-slate-200",strokeWidth:"1",strokeDasharray:"3 3"}),r.jsx("text",{x:u-10,y:g,textAnchor:"end",dominantBaseline:"middle",className:"fill-slate-400",fontSize:"11",children:S7(C)})]},C)}),r.jsx("polyline",{points:b,fill:"none",className:"stroke-slate-600",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.map((C,g)=>r.jsx("circle",{cx:y(g),cy:p(C.amount),r:"5",className:"fill-gov-600"},C.label)),e.map((C,g)=>r.jsx("text",{x:y(g),y:o-12,textAnchor:"middle",className:"fill-slate-500",fontSize:"11",children:C.label},C.label))]}):r.jsx("div",{style:{height:o}})})]})}function k7({bars:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[r.jsxs("h2",{className:"text-base font-bold text-zinc-900",children:["Payment Types ",t]}),r.jsx(qo,{value:t,options:n,onChange:s})]}),r.jsx("div",{className:"flex flex-col gap-5",children:e.map(a=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 text-[13px]",children:[r.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-gray-700",children:[r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:a.color}}),r.jsx("span",{className:"truncate",children:a.label})]}),r.jsx("span",{className:"shrink-0 font-semibold text-zinc-900",children:Bt(a.amount)})]}),r.jsx("div",{className:"mt-2 h-2.5 overflow-hidden rounded-full bg-slate-100",children:r.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(Math.max(a.percent,0),100)}%`,backgroundColor:a.color}})})]},a.label))})]})}const P7=160;function Im({label:e,actions:t}){const[n,s]=x.useState(!1),a=x.useRef(null),i=x.useRef(null),o=x.useCallback(()=>s(!1),[]),l=Dn({open:n,anchorRef:a,layerRef:i,onDismiss:o,width:P7,align:"end"});return r.jsxs("div",{ref:a,className:"relative",children:[r.jsx("button",{type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":n,onClick:()=>s(c=>!c),className:"flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(I7,{})}),n&&l?ft.createPortal(r.jsx("div",{ref:i,role:"menu",style:l,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:t.map(c=>r.jsx("button",{type:"button",role:"menuitem",onClick:()=>{s(!1),c.onSelect()},className:"block w-full px-3 py-2 text-left text-sm text-slate-700 transition hover:bg-slate-50",children:c.label},c.key))}),On(a.current)):null]})}function I7(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.75"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.75"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.75"})]})}const E7={draft:"bg-slate-100 text-slate-600",scheduled:"bg-yellow-100 text-yellow-800",submitted:"bg-orange-100 text-orange-800",paid:"bg-green-100 text-green-800",failed:"bg-red-100 text-red-700"};function T7({payments:e}){const t=Ae();return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-6 pb-3 pt-5",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Recent Payments"}),r.jsx("button",{type:"button",onClick:()=>t(Rn(Ma)),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsx("div",{className:"flex-1 overflow-x-auto px-6 pb-5",children:r.jsxs("table",{className:"w-full min-w-[680px] text-left",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-y border-slate-200 text-sm text-gray-700",children:[r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Jurisdiction / Type"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Period"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Settlement Date"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Status"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Form Type"}),r.jsx("th",{className:"py-3 pr-4 font-medium",children:"Amount"}),r.jsx("th",{className:"w-10 py-3"})]})}),r.jsx("tbody",{children:e.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:7,className:"py-12 text-center text-sm text-slate-500",children:"No payments yet."})}):e.map(n=>r.jsxs("tr",{className:"text-sm",children:[r.jsx("td",{className:"py-4 pr-4 text-zinc-900",children:n.jurisdiction}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.period}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.paymentDate}),r.jsx("td",{className:"py-4 pr-4",children:r.jsx("span",{className:`inline-flex rounded-md px-2 py-1 text-xs font-medium ${E7[n.status]}`,children:n.statusLabel})}),r.jsx("td",{className:"py-4 pr-4 text-gray-700",children:n.formType}),r.jsx("td",{className:"py-4 pr-4 font-medium text-zinc-900",children:Bt(n.amount)}),r.jsx("td",{className:"py-4",children:r.jsx(Im,{label:`Actions for ${n.jurisdiction} ${n.period}`,actions:[{key:"view",label:"View details",onSelect:()=>t(Rn(s7(n.status,n.statusLabel)))}]})})]},n.id))})]})})]})}const pn=70,Yi=50,Ec=22,Tc=2*Math.PI*Yi;function L7({slices:e,taxYear:t,taxYearOptions:n,onTaxYearChange:s}){const a=Ae(),i=e.reduce((d,m)=>d+m.amount,0),o=e.reduce((d,m)=>d+m.count,0),l=`TY '${String(t).slice(-2)}`;let c=0;const u=e.map(d=>{const m=i>0?d.amount/i*Tc:0,h=-c;return c+=m,{...d,length:m,offset:h}});return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white px-5 py-5 shadow-sm",children:[r.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"State Payments"}),r.jsx(qo,{value:t,options:n,onChange:s})]}),r.jsxs("div",{className:"flex flex-1 flex-wrap gap-4",children:[r.jsxs("div",{className:"flex flex-1 flex-col items-center gap-3",children:[r.jsx("div",{className:"flex flex-1 items-center",children:r.jsxs("svg",{viewBox:"0 0 140 140",className:"h-[120px] w-[120px] shrink-0 sm:h-[130px] sm:w-[130px]",role:"img","aria-label":`State payments split for tax year ${t}`,children:[r.jsx("circle",{cx:pn,cy:pn,r:Yi,fill:"none",className:"stroke-slate-100",strokeWidth:Ec}),r.jsx("g",{transform:`rotate(-90 ${pn} ${pn})`,children:u.map(d=>r.jsx("circle",{cx:pn,cy:pn,r:Yi,fill:"none",stroke:d.color,strokeWidth:Ec,strokeDasharray:`${d.length} ${Tc-d.length}`,strokeDashoffset:d.offset},d.state))}),r.jsx("text",{x:pn,y:pn,textAnchor:"middle",dominantBaseline:"middle",className:"fill-slate-600",fontSize:"13",fontWeight:"600",children:l})]})}),r.jsx("button",{type:"button",onClick:()=>a(Rn(Ma)),className:"text-xs font-medium text-gov-600 hover:text-gov-700",children:"View Full State Report"})]}),r.jsxs("div",{className:"min-w-[170px] flex-1",children:[r.jsxs("div",{className:"flex items-center justify-between text-[10px] font-semibold uppercase tracking-wide text-slate-400",children:[r.jsx("span",{children:"State & Count"}),r.jsx("span",{children:"Amount"})]}),r.jsx("ul",{className:"mt-2 space-y-1.5",children:e.map(d=>r.jsxs("li",{className:"flex items-center justify-between gap-2 text-xs",children:[r.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-gray-700",children:[r.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:d.color}}),r.jsxs("span",{className:"truncate",children:[d.state," (",d.count,")"]})]}),r.jsx("span",{className:"shrink-0 text-gray-700",children:Ac(d.amount)})]},d.state))}),r.jsxs("div",{className:"mt-2.5 flex items-center justify-between border-t border-slate-200 pt-2.5 text-xs font-bold text-zinc-900",children:[r.jsxs("span",{children:["Total (",o,")"]}),r.jsx("span",{children:Ac(i)})]})]})]})]})}function F7({payments:e}){const t=Ae(),n=Rn(Ma);return r.jsxs("section",{className:"flex flex-col rounded-xl border border-slate-200 bg-white shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between px-5 pb-3 pt-5",children:[r.jsx("h2",{className:"text-base font-bold text-zinc-900",children:"Upcoming Payments"}),r.jsx("button",{type:"button",onClick:()=>t(n),className:"text-sm font-medium text-gov-600 hover:text-gov-700",children:"View All"})]}),r.jsx("div",{className:"flex flex-col gap-3 px-5 pb-5",children:e.length===0?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:"No upcoming payments."}):e.map(s=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex h-12 w-12 shrink-0 flex-col items-center justify-center rounded-lg bg-red-50",children:[r.jsx("span",{className:"text-[10px] font-semibold uppercase leading-3 tracking-wide text-red-600",children:s.month}),r.jsx("span",{className:"text-base font-bold leading-5 text-zinc-900",children:s.day})]}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("p",{className:"truncate text-sm font-semibold text-zinc-900",children:s.title}),r.jsxs("p",{className:"truncate text-xs text-gray-600",children:[s.dueLabel," ",r.jsx("span",{className:"text-slate-400",children:"•"})," ",s.jurisdiction]})]}),r.jsx("p",{className:"shrink-0 text-sm font-semibold text-zinc-900",children:Bt(s.amount)}),r.jsx(Im,{label:`Actions for ${s.title} due ${s.month} ${s.day}`,actions:[{key:"view",label:"View details",onSelect:()=>t(n)}]})]},s.id))})]})}function R7({userName:e,steps:t}){const n=t.filter(i=>i.done).length,s=t.findIndex(i=>!i.done),a=Math.round(n/t.length*100);return r.jsxs("section",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-10",children:[r.jsxs("h2",{className:"text-2xl font-bold text-slate-900",children:["Welcome",e?r.jsxs("span",{className:"italic",children:[", ",e,"!"]}):"!",r.jsx("span",{"aria-hidden":"true",children:" 👋"})]}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"New here? Take the five-minute tour to see how GovPay works."}),r.jsx("h3",{className:"mt-8 text-xl font-bold text-slate-900",children:"Complete your setup"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Four quick steps, then you're ready to make your first payment."}),r.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t.length,"aria-valuenow":n,"aria-label":"Setup progress",className:"mt-5 h-2 w-full overflow-hidden rounded-full bg-slate-200",children:r.jsx("div",{className:"h-full rounded-full bg-gov-700 transition-all",style:{width:`${Math.max(a,1.5)}%`}})}),r.jsx("ol",{className:"mt-6 space-y-4",children:t.map((i,o)=>r.jsx(M7,{step:i,stepNumber:o+1,active:o===s},i.title))})]})}function M7({step:e,stepNumber:t,active:n}){return r.jsxs("li",{className:`flex flex-wrap items-center justify-between gap-4 rounded-sm border p-4 ${n?"border-gov-400 bg-gov-50/40":"border-slate-200 bg-slate-50/60"}`,children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[r.jsx("span",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-sm text-sm font-semibold ${e.done?"bg-gov-700 text-white":n?"border border-gov-400 bg-white text-gov-600":"bg-slate-200 text-slate-500"}`,children:e.done?r.jsx(D7,{}):t}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:`text-sm font-semibold ${e.done?"text-slate-400 line-through":n?"text-gov-700":"text-slate-900"}`,children:e.title}),r.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:e.description})]})]}),e.done?r.jsx("button",{type:"button",onClick:e.onView,disabled:!e.onView,className:"inline-flex h-10 min-w-[120px] items-center justify-center rounded-sm border border-gov-300 bg-white px-5 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:"View"}):n?r.jsxs("button",{type:"button",onClick:e.onAction,disabled:!e.onAction,className:"inline-flex h-10 min-w-[140px] items-center justify-center gap-2 rounded-sm bg-gov-700 px-5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:[e.actionLabel,r.jsx(O7,{})]}):r.jsx("button",{type:"button",disabled:!0,className:"inline-flex h-10 min-w-[140px] cursor-not-allowed items-center justify-center rounded-sm border border-gov-200 bg-white px-5 text-sm font-medium text-gov-400",children:e.actionLabel})]})}function D7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}function O7(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})}const z7=1e3;async function fn(e){const t=await me(`/portal/bank-accounts?entityId=${e}&pageSize=${z7}`);return(t==null?void 0:t.items)??[]}function q7(e){return me("/portal/bank-accounts",{method:"POST",body:e})}function Em(e,t){return me(`/portal/bank-accounts/${e}`,{method:"PATCH",body:t})}function V7({entityId:e,entityCount:t,entitiesLoading:n,dashboard:s,dashboardLoading:a,userName:i}){const{data:o=[],isLoading:l}=ue({queryKey:["bank-accounts",e],queryFn:()=>fn(e),enabled:e!==null}),c=t>0,u=(s==null?void 0:s.hasPayments)??!1,d=o.length>0,m=u;return{hasEntity:c,hasPayment:u,hasBankAccount:d,hasAuthorizedPayment:m,isComplete:c&&u&&d&&m,isLoading:n||e!==null&&(a||l),userName:Z7(i)}}function Z7(e){var n,s;const t=(s=e??((n=Qu())==null?void 0:n.user.name))==null?void 0:s.trim();if(t)return t.split(/\s+/)[0]}function Vo(e){return me("/portal/state-payments/states",{signal:e})}function Zo(e,t,n){const s=new URLSearchParams({entityId:String(e),state:t});return me(`/portal/state-payments/payment-reasons?${s}`,{signal:n})}function Uo(e,t,n,s){const a=new URLSearchParams({entityId:String(e),state:t,reason:n});return me(`/portal/state-payments/validation-metadata?${a}`,{signal:s})}function U7(e,t,n,s){const a=new URLSearchParams({entityId:String(e),state:t,reason:n});return me(`/portal/state-payments/form-references?${a}`,{signal:s})}function B7(e,t,n,s,a,i){const o=new URLSearchParams({entityId:String(e),state:t,reason:n,frequencyCode:s,taxYear:String(a)});return me(`/portal/state-payments/tax-periods?${o}`,{signal:i})}function Tm(e){return me(`/portal/state-payments/${e}`)}function H7(e){return me("/portal/state-payments",{method:"POST",body:e})}function Y7(e,t){return me(`/portal/state-payments/${e}`,{method:"PATCH",body:t})}function Lm(e,t){return me(`/portal/state-payments/${e}/submit`,{method:"POST",body:t??null})}const W7=/^(.*?)\s*\(state\)$/i,K7=/^(.*?)\s*\(([A-Za-z]{2})\)$/;function Q7(e,t){const n=e.trim(),s=o=>{var l;return(l=t.find(c=>c.code.toLowerCase()===o.toLowerCase()))==null?void 0:l.name},a=n.match(W7);if(a){const o=a[1].trim();return s(o)??o}const i=n.match(K7);if(i){const[,o,l]=i;if(s(l))return o.trim()||s(l)}return n}function Fm(){const{data:e=[]}=ue({queryKey:["state-payment-states"],queryFn:({signal:t})=>Vo(t),staleTime:1/0});return x.useCallback(t=>Q7(t,e),[e])}const xn=new Date().getFullYear(),G7=5,J7={1:"grid gap-5",2:"grid gap-5 lg:grid-cols-2",3:"grid gap-5 lg:grid-cols-3"};function Bo(){const e=Ae(),{entities:t,isLoading:n,selectedEntity:s,enabledPayments:a,userName:i}=Wt(),o=(s==null?void 0:s.entityId)??null,[l,c]=x.useState(!1),u=Fm(),d=n7(xn),[m,h]=x.useState(xn),[f,y]=x.useState(xn),[p,b]=x.useState(xn),C=a.includes("federal"),g=a.includes("state"),A=1+Number(C)+Number(g),{data:j,isLoading:k}=ue({queryKey:["dashboard",o,xn],queryFn:()=>V9(o,xn),enabled:o!==null}),{data:N}=ue({queryKey:["dashboard","overview",o,xn],queryFn:()=>U9(o,xn),enabled:o!==null}),{data:T}=ue({queryKey:["dashboard","charts",o,m],queryFn:()=>$a(o,m),enabled:o!==null,placeholderData:Wa}),{data:D}=ue({queryKey:["dashboard","charts",o,f],queryFn:()=>$a(o,f),enabled:o!==null,placeholderData:Wa}),{data:q}=ue({queryKey:["dashboard","charts",o,p],queryFn:()=>$a(o,p),enabled:o!==null,placeholderData:Wa}),{data:$}=ue({queryKey:["dashboard","payments","recent",o],queryFn:()=>Z9({entityId:o,page:1,pageSize:G7}),enabled:o!==null}),F=V7({entityId:o,entityCount:t.length,entitiesLoading:n,dashboard:j,dashboardLoading:k,userName:i});if(F.isLoading)return r.jsxs("div",{className:"space-y-6",children:[r.jsx(ei,{entityCount:t.length,showPaymentActions:!1}),r.jsx("div",{className:"relative min-h-80 rounded-xl border border-slate-200 bg-white",children:r.jsx(Ra,{label:"Loading your dashboard…"})})]});if(!F.isComplete)return r.jsxs("div",{className:"space-y-6",children:[r.jsx(ei,{entityCount:t.length,showPaymentActions:!1}),r.jsx(R7,{userName:F.userName,steps:[{title:"Add your first entity",description:"Add the business or individual you'll be filing and paying taxes for.",actionLabel:"Add Entity",done:F.hasEntity,onAction:()=>e("/create-entity/form",{state:{from:"/dashboard"}}),onView:()=>e("/entities")},{title:"Create your first payment",description:"Choose the tax authority, payment type, and amount.",actionLabel:"Create Payment",done:F.hasPayment,onAction:()=>c(!0),onView:()=>e("/payments")},{title:"Connect your bank account",description:"Link an account so payments can be sent securely and on time.",actionLabel:"Connect Bank",done:F.hasBankAccount,onAction:()=>e("/settings"),onView:()=>e("/settings")},{title:"Review & Authorize",description:"Check the details, then submit. You can still cancel before it processes.",actionLabel:"Review Payment",done:F.hasAuthorizedPayment,onAction:()=>e(_e()),onView:()=>e("/payments")}]}),r.jsx($u,{open:l,onClose:()=>c(!1),enabledPayments:a,onSelectFederal:()=>e("/payments/federal/new",{state:{from:"/dashboard",resetDraft:!0}}),onSelectState:()=>e("/payments/state/new",{state:{from:"/dashboard",resetDraft:!0}})})]});const W=[{key:"taxes-paid-ytd",label:"Taxes paid - YTD",value:N?Bt(N.taxesPaidYtd.amount):"—",caption:N?`Across ${N.taxesPaidYtd.count} successful payments`:"Loading…",tone:"default"},{key:"upcoming-liability",label:`Payments Due - ${(N==null?void 0:N.upcomingLiability.windowDays)??60} days`,value:N?Bt(N.upcomingLiability.amount):"—",caption:N?`${N.upcomingLiability.count} payments scheduled`:"Loading…",tone:"default"},{key:"filling-progress",label:"Filing Progress - Current Year",value:N?Bt(N.draftTotal.amount):"—",caption:N?`${N.draftTotal.count} draft${N.draftTotal.count===1?"":"s"} in progress`:"Loading…",tone:"default"},{key:"rejected-payments",label:"Payment Requiring Action",value:N?Bt(N.rejectedTotal.amount):"—",caption:N?`${N.rejectedTotal.count} rejected payment${N.rejectedTotal.count===1?"":"s"}`:"Loading…",tone:N&&N.rejectedTotal.count>0?"danger":"default"}],B=(($==null?void 0:$.items)??[]).map(u7).map(H=>({...H,jurisdiction:u(H.jurisdiction)})),ne=((N==null?void 0:N.upcomingPayments)??[]).map(H=>h7(H)).map(H=>({...H,jurisdiction:u(H.jurisdiction)})),V=f7((N==null?void 0:N.needsAttention)??[]).map(H=>({...H,details:H.details.map((be,ie)=>ie===0?u(be):be)})),se=p7((T==null?void 0:T.federalByQuarter)??[]),te=x7((D==null?void 0:D.stateByJurisdiction)??[]),re=g7((q==null?void 0:q.statePaymentTypes)??[]);return r.jsxs("div",{className:"space-y-6",children:[r.jsx(ei,{entityCount:t.length}),r.jsx(i7,{alerts:V}),r.jsx(Y9,{items:W}),r.jsxs("div",{className:"grid gap-5 lg:grid-cols-3",children:[r.jsx("div",{className:"lg:col-span-2",children:r.jsx(T7,{payments:B})}),r.jsx(F7,{payments:ne})]}),r.jsxs("div",{className:J7[A],children:[C&&r.jsx(A7,{points:se,taxYear:m,taxYearOptions:d,onTaxYearChange:h}),g&&r.jsx(L7,{slices:te,taxYear:f,taxYearOptions:d,onTaxYearChange:y}),r.jsx(k7,{bars:re,taxYear:p,taxYearOptions:d,onTaxYearChange:b})]})]})}const Ho="Active",Rm="Inactive";function ys(e){return(e.status??Ho).trim().toLowerCase()==="active"}function X7(e){return ys(e)?Rm:Ho}function _7(e){return ys(e)?Rm:Ho}const Lc=160,$7=88,Ls=8;function e3({entity:e,onEdit:t,variant:n="button"}){const s=ir(),a=pt(),{showSuccess:i,showError:o}=ja(),l=x.useRef(null),c=x.useRef(null),[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,y]=x.useState({}),p=()=>{var N;const C=l.current;if(!C)return;const g=C.getBoundingClientRect(),A=((N=c.current)==null?void 0:N.offsetHeight)??$7,k=window.innerHeight-g.bottom<A+Ls;y({position:"fixed",top:k?g.top-A-Ls:g.bottom+Ls,left:Math.max(Ls,g.right-Lc),width:Lc,zIndex:50})};x.useLayoutEffect(()=>{u&&(p(),requestAnimationFrame(p))},[u]),x.useEffect(()=>{if(!u)return;const C=A=>{var k,N;const j=A.target;(k=l.current)!=null&&k.contains(j)||(N=c.current)!=null&&N.contains(j)||d(!1)},g=()=>p();return document.addEventListener("mousedown",C),window.addEventListener("resize",g),window.addEventListener("scroll",g,!0),()=>{document.removeEventListener("mousedown",C),window.removeEventListener("resize",g),window.removeEventListener("scroll",g,!0)}},[u]);const b=async()=>{const C=ys(e);h(!0);try{await kf(e.entityId,X7(e)),await a.invalidateQueries({queryKey:["entities","mine"]}),d(!1),i(C?"Entity Deactivated Successfully":"Entity Activated Successfully")}catch(g){o("Action Not Completed",nt(g,"Unable to update this entity."))}finally{h(!1)}};return r.jsxs("div",{className:"inline-block text-left",children:[r.jsx("button",{ref:l,type:"button",disabled:m,"aria-label":n==="kebab"?"Entity actions":void 0,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>d(C=>!C),className:n==="kebab"?"inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-60":"inline-flex items-center gap-1.5 rounded-lg bg-gov-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:n==="kebab"?r.jsx(t3,{}):r.jsxs(r.Fragment,{children:["Actions",r.jsx(n3,{})]})}),u?ft.createPortal(r.jsxs("div",{ref:c,role:"menu",style:f,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("button",{type:"button",onClick:()=>{d(!1),t(e)},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50",children:"Edit"}),r.jsx("button",{type:"button",disabled:m,onClick:()=>void b(),className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50 disabled:opacity-60",children:_7(e)})]}),s):null]})}function t3(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.6"})]})}function n3(){return r.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function Yo({active:e,variant:t="filled",activeLabel:n="Active",inactiveLabel:s="Inactive"}){const a=t==="outline"?e?"border border-emerald-200 bg-white text-emerald-700":"border border-slate-200 bg-slate-50 text-slate-500":e?"bg-emerald-50 text-emerald-700":"bg-red-50 text-red-600",i=e?"bg-emerald-500":t==="outline"?"bg-slate-400":"bg-red-500";return r.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium ${a}`,children:[r.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${i}`}),e?n:s]})}function r3({entity:e,selected:t,onEdit:n,onSelect:s}){const[a,i]=x.useState(!1),o=hs(e),l=ys(e),c=e.accountType==="Individual",u=c?"SSN":"EIN";return r.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,onClick:s?()=>s(e):void 0,onKeyDown:s?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),s(e))}:void 0,className:`rounded-xl border bg-white p-5 shadow-sm transition ${t?"border-gov-400 ring-1 ring-gov-200":"border-slate-200"} ${s?"cursor-pointer hover:border-gov-300 hover:shadow-md":""}`,children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[r.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gov-50 text-sm font-semibold text-gov-700",children:R4(o)}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"truncate text-base font-bold text-slate-900",children:o}),r.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[r.jsx(Yo,{active:l}),r.jsx("span",{className:"text-xs text-slate-500",children:e.accountType})]})]})]}),r.jsx("div",{onClick:d=>d.stopPropagation(),children:r.jsx(e3,{variant:"kebab",entity:e,onEdit:n})})]}),r.jsx("div",{className:"my-4 h-px bg-slate-200"}),r.jsxs("ul",{className:"space-y-3 text-sm text-slate-700",children:[r.jsx(Fs,{label:"Email ID",icon:r.jsx(a3,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:e.email||"—"})}),r.jsx(Fs,{label:"Phone Number",icon:r.jsx(i3,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:ns(e.phoneNumber)||"—"})}),r.jsxs(Fs,{label:`${u} Number`,icon:r.jsx(o3,{}),children:[r.jsx("span",{className:"shrink-0 whitespace-nowrap",children:a?tr(e.idNumber,e.accountType):Gr(e.idNumber,e.accountType)}),r.jsx("button",{type:"button","aria-label":a?`Hide ${u}`:`Show ${u}`,onClick:d=>{d.stopPropagation(),i(m=>!m)},className:"shrink-0 text-slate-400 transition hover:text-slate-600",children:a?r.jsx(Do,{}):r.jsx(um,{})})]}),c?null:r.jsx(Fs,{label:"Business Type",icon:r.jsx(l3,{}),children:r.jsx("span",{className:"min-w-0 truncate",children:e.entityType||"—"})})]})]})}function Fs({label:e,icon:t,children:n}){return r.jsxs("li",{className:"group/row relative flex flex-nowrap items-center gap-3 w-max",children:[r.jsx(s3,{label:e}),r.jsxs("span",{className:"sr-only",children:[e,":"]}),r.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-slate-400",children:t}),n]})}function s3({label:e}){return r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-full left-0 z-20 mb-2 w-max rounded-md bg-slate-700 px-2.5 py-1.5 text-xs font-medium text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover/row:opacity-100",children:[e,r.jsx("span",{className:"absolute left-3 top-full h-0 w-0 border-x-4 border-t-4 border-x-transparent border-t-slate-700"})]})}function a3(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",children:r.jsx("path",{d:"M13.8345 2.4998L7.83998 6.31742C7.63656 6.43555 7.40551 6.49777 7.17026 6.49777C6.93502 6.49777 6.70396 6.43555 6.50054 6.31742L0.500061 2.4998M1.8335 0.5H12.501C13.2375 0.5 13.8345 1.09689 13.8345 1.8332V9.8324C13.8345 10.5687 13.2375 11.1656 12.501 11.1656H1.8335C1.09706 11.1656 0.500061 10.5687 0.500061 9.8324V1.8332C0.500061 1.09689 1.09706 0.5 1.8335 0.5Z",stroke:"#8E8E92","stroke-linecap":"round"})})}function i3(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[r.jsx("g",{"clip-path":"url(#clip0_953_35331)",children:r.jsx("path",{d:"M9.66126 11.0858C9.51426 11.1225 9.35913 11.108 9.22143 11.0448C7.36957 10.1359 5.87095 8.63919 4.95976 6.78847C4.89228 6.65004 4.87479 6.49252 4.91028 6.34267C4.94577 6.19281 5.03204 6.05986 5.15444 5.9664L5.46647 5.73238C5.63207 5.60818 5.76649 5.44712 5.85907 5.26196C5.95164 5.07681 5.99984 4.87264 5.99984 4.66563V2.66547C5.99984 2.31182 5.85935 1.97266 5.60929 1.72259C5.35922 1.47252 5.02005 1.33203 4.6664 1.33203H2.66624C2.31259 1.33203 1.97343 1.47252 1.72336 1.72259C1.47329 1.97266 1.3328 2.31182 1.3328 2.66547C1.3328 5.84832 2.59719 8.90082 4.8478 11.1514C7.09842 13.402 10.1509 14.6664 13.3338 14.6664C13.6874 14.6664 14.0266 14.5259 14.2766 14.2759C14.5267 14.0258 14.6672 13.6866 14.6672 13.333V11.3328C14.6672 10.9792 14.5267 10.64 14.2766 10.3899C14.0266 10.1399 13.6874 9.99939 13.3338 9.99939H11.3336C11.1266 9.99939 10.9224 10.0476 10.7373 10.1402C10.5521 10.2327 10.3911 10.3672 10.2669 10.5328L10.0302 10.8428C9.93838 10.9634 9.80827 11.0491 9.66126 11.0858Z",stroke:"#8E8E92","stroke-linecap":"round"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_953_35331",children:r.jsx("rect",{width:"16",height:"16",fill:"white"})})})]})}function o3(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[r.jsx("path",{d:"M14.5271 2.25781H1.47294C0.649906 2.25781 0 2.92625 0 3.73075V12.2662C0 13.0892 0.668437 13.7391 1.47294 13.7391H14.5271C15.3501 13.7391 16 13.0706 16 12.2661V3.73075C16 2.90769 15.3316 2.25781 14.5271 2.25781ZM15.0625 12.2661C15.0625 12.5616 14.8232 12.8016 14.5271 12.8016H1.47294C1.17744 12.8016 0.9375 12.5622 0.9375 12.2661V3.73075C0.9375 3.43525 1.17681 3.19531 1.47294 3.19531H14.5271C14.8226 3.19531 15.0625 3.43462 15.0625 3.73075V12.2661Z",fill:"#8E8E92"}),r.jsx("path",{d:"M6.27309 8.14438C6.54547 7.83941 6.71144 7.4375 6.71144 6.99741C6.71144 6.04681 5.93806 5.27344 4.98747 5.27344C4.03688 5.27344 3.26353 6.04681 3.26353 6.99741C3.26353 7.4375 3.4295 7.83941 3.70184 8.14434C2.988 8.57953 2.51038 9.3655 2.51038 10.2609C2.51038 10.5198 2.72025 10.7297 2.97913 10.7297H6.99578C7.25466 10.7297 7.46453 10.5198 7.46453 10.2609C7.46453 9.3655 6.98691 8.57956 6.27309 8.14438ZM4.98747 6.21094C5.42113 6.21094 5.77394 6.56375 5.77394 6.99741C5.77394 7.43106 5.42113 7.78387 4.98747 7.78387C4.55381 7.78387 4.20103 7.43106 4.20103 6.99741C4.20103 6.56375 4.55381 6.21094 4.98747 6.21094ZM3.52081 9.79222C3.71956 9.17178 4.30191 8.72137 4.98747 8.72137C5.67303 8.72137 6.25534 9.17175 6.45413 9.79222H3.52081Z",fill:"#8E8E92"}),r.jsx("path",{d:"M13.0208 5.77734H9.50623C9.24735 5.77734 9.03748 5.98722 9.03748 6.24609C9.03748 6.50497 9.24735 6.71484 9.50623 6.71484H13.0208C13.2797 6.71484 13.4896 6.50497 13.4896 6.24609C13.4896 5.98722 13.2797 5.77734 13.0208 5.77734Z",fill:"#8E8E92"}),r.jsx("path",{d:"M13.0208 7.78516H9.50623C9.24735 7.78516 9.03748 7.99503 9.03748 8.25391C9.03748 8.51278 9.24735 8.72266 9.50623 8.72266H13.0208C13.2797 8.72266 13.4896 8.51278 13.4896 8.25391C13.4896 7.99503 13.2797 7.78516 13.0208 7.78516Z",fill:"#8E8E92"}),r.jsx("path",{d:"M12.0166 9.79297H9.50623C9.24735 9.79297 9.03748 10.0028 9.03748 10.2617C9.03748 10.5206 9.24735 10.7305 9.50623 10.7305H12.0166C12.2755 10.7305 12.4854 10.5206 12.4854 10.2617C12.4854 10.0028 12.2755 9.79297 12.0166 9.79297Z",fill:"#8E8E92"})]})}function l3(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:r.jsx("path",{d:"M10.6669 13.332V2.66536C10.6669 2.31174 10.5264 1.9726 10.2763 1.72256C10.0263 1.47251 9.68709 1.33203 9.33344 1.33203H6.66656C6.31291 1.33203 5.97375 1.47251 5.72368 1.72256C5.47361 1.9726 5.33312 2.31174 5.33312 2.66536V13.332M2.66624 3.9987H13.3338C14.0702 3.9987 14.6672 4.59565 14.6672 5.33203V11.9987C14.6672 12.7351 14.0702 13.332 13.3338 13.332H2.66624C1.9298 13.332 1.3328 12.7351 1.3328 11.9987V5.33203C1.3328 4.59565 1.9298 3.9987 2.66624 3.9987Z",stroke:"#8E8E92","stroke-linecap":"round"})})}const c3=208,Zs="All";function u3({value:e,onChange:t}){const[n,s]=x.useState(!1),a=x.useRef(null),i=x.useRef(null),o=e!==Zs,l=x.useCallback(()=>s(!1),[]),c=Dn({open:n,anchorRef:a,layerRef:i,onDismiss:l,width:c3,align:"end",gap:8});return r.jsxs("div",{ref:a,className:"relative",children:[r.jsxs("button",{type:"button","aria-label":o?`Filter by entity type: ${e}`:"Filter by entity type","aria-haspopup":"menu","aria-expanded":n,onClick:()=>s(u=>!u),className:`relative inline-flex h-10 w-10 items-center justify-center rounded-lg border transition ${o?"border-gov-300 bg-gov-50 text-gov-700":"border-slate-200 bg-white text-slate-500 hover:bg-slate-50"}`,children:[r.jsx(d3,{}),o?r.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-gov-700"}):null]}),n&&c?ft.createPortal(r.jsxs("div",{ref:i,role:"menu",style:c,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("p",{className:"px-4 py-2 text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Entity Type"}),z4.map(u=>r.jsxs("button",{type:"button",onClick:()=>{t(u),s(!1)},className:`flex w-full items-center justify-between px-4 py-2 text-left text-sm transition hover:bg-slate-50 ${u===e?"font-semibold text-gov-700":"text-slate-700"}`,children:[u,u===e?r.jsx(m3,{}):null]},u))]}),On(a.current)):null]})}function d3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M7 12h10M10 17h4"})})}function m3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}const h3={primary:"bg-brand-600 text-white hover:bg-brand-700 focus-visible:ring-brand-500 disabled:bg-brand-600/60",secondary:"border border-slate-300 bg-white text-slate-700 hover:bg-slate-50 focus-visible:ring-slate-400",ghost:"text-slate-600 hover:bg-slate-100 focus-visible:ring-slate-400"};function f3({variant:e="primary",isLoading:t=!1,className:n="",children:s,disabled:a,...i}){return r.jsx("button",{type:"button",className:`inline-flex h-10 items-center justify-center rounded-lg px-4 text-sm font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed ${h3[e]} ${n}`,disabled:a||t,...i,children:t?"Please wait…":s})}const p3=[10,20,50,100];function x3(e,t){const n=e.trim();if(!/^\d+$/.test(n))return null;const s=Number(n);return!Number.isInteger(s)||s<1||s>t?null:s}function g3(){return r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M12.5 4.5 7 10l5.5 5.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function y3(){return r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M7.5 4.5 13 10l-5.5 5.5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function Da({page:e,pageSize:t,totalCount:n,onPageChange:s,onPageSizeChange:a,pageSizeOptions:i=p3,disabled:o=!1,className:l=""}){const c=t>0?Math.max(1,Math.ceil(n/t)):1,u=n===0?0:c,d=e>1,m=u>0&&e<u,h=n===0?0:(e-1)*t+1,f=Math.min(e*t,n),[y,p]=x.useState(String(e)),b=x.useRef(y);b.current=y,x.useEffect(()=>{p(String(e))},[e]);function C(A=b.current){if(o||u===0){p(String(e));return}const j=x3(A,u);if(j===null){p(String(e));return}if(j===e){p(String(e));return}s(j)}function g(A){A.key==="Enter"&&(A.preventDefault(),C(A.currentTarget.value))}return n===0?null:r.jsxs("div",{className:`flex flex-wrap items-center justify-between gap-3 border-t border-slate-200 bg-white px-6 py-3 ${l}`,children:[r.jsxs("p",{className:"text-sm text-slate-500",children:["Showing ",r.jsx("span",{className:"font-medium text-slate-700",children:h}),"–",r.jsx("span",{className:"font-medium text-slate-700",children:f})," of ",r.jsx("span",{className:"font-medium text-slate-700",children:n})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a?r.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("span",{className:"whitespace-nowrap",children:"Rows per page"}),r.jsx(Se,{size:"sm",ariaLabel:"Rows per page",placeholder:String(t),value:String(t),disabled:o,onChange:A=>a(Number(A)),options:i.map(A=>({value:String(A),label:String(A)}))})]}):null,r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("button",{type:"button",disabled:o||!d,onClick:()=>s(e-1),"aria-label":"Previous page",className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-700 transition hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",children:r.jsx(g3,{})}),r.jsx("span",{className:"min-w-[5.5rem] text-center text-sm text-slate-600",children:u===0?"—":`Page ${e} of ${u}`}),r.jsx("button",{type:"button",disabled:o||!m,onClick:()=>s(e+1),"aria-label":"Next page",className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-700 transition hover:bg-slate-100 hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gov-200 disabled:cursor-not-allowed disabled:text-slate-300 disabled:hover:bg-transparent",children:r.jsx(y3,{})})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("label",{htmlFor:"pagination-go-to-page",className:"whitespace-nowrap text-sm text-slate-600",children:"Go to page"}),r.jsx("input",{id:"pagination-go-to-page",type:"text",inputMode:"numeric",pattern:"[0-9]*",value:y,disabled:o||u===0,onChange:A=>p(A.target.value),onKeyDown:g,"aria-label":"Go to page number",className:"h-9 w-14 rounded-lg border border-slate-200 bg-white px-2 text-center text-sm text-slate-900 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:opacity-60"}),r.jsx(f3,{type:"button",variant:"secondary",disabled:o||u===0,className:"h-9 px-3",onMouseDown:A=>{A.preventDefault()},onClick:()=>C(),children:"Go"})]})]})]})}const b3=[{id:"all",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}];function v3(e,t){const n=t.toLowerCase();return hs(e).toLowerCase().includes(n)||(e.email??"").toLowerCase().includes(n)||(e.idNumber??"").toLowerCase().includes(n)}function Wo(){const{selectedEntity:e,setSelectedEntityId:t}=Wt(),n=Ae(),[s,a]=x.useState(""),[i,o]=x.useState(""),[l,c]=x.useState("all"),[u,d]=x.useState(Zs),[m,h]=x.useState(1),[f,y]=x.useState(Fn);x.useEffect(()=>{const T=window.setTimeout(()=>o(s.trim()),300);return()=>window.clearTimeout(T)},[s]),x.useEffect(()=>{h(1)},[i,l,u,f]);const{data:p=[],isLoading:b,isFetching:C,isError:g}=ue({queryKey:["entities","mine"],queryFn:co}),A=x.useMemo(()=>p.filter(T=>i&&!v3(T,i)||l!=="all"&&ys(T)!==(l==="active")?!1:u===Zs||T.entityType===u),[p,i,l,u]),j=A.length,k=A.slice((m-1)*f,m*f),N=g?"Unable to load entities.":b?"Loading entities…":A.length===0?i?"No entities match your search.":u!==Zs?`No ${u} entities${l==="all"?"":` that are ${l}`}.`:l==="all"?"No entities yet.":`No ${l} entities.`:null;return r.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"All Entities"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Manage tax payments and filings for each entity."})]}),r.jsx("button",{type:"button",onClick:()=>n("/create-entity/form",{state:{from:"/entities"}}),className:"inline-flex shrink-0 items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Entity"})]}),r.jsxs("div",{className:"relative rounded-2xl border border-slate-200 bg-white p-6",children:[C?r.jsx(Ra,{label:"Loading entities…"}):null,r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-slate-200",children:[r.jsx("div",{className:"flex items-center gap-6",children:b3.map(T=>{const D=l===T.id;return r.jsx("button",{type:"button",onClick:()=>c(T.id),className:`-mb-px border-b-2 pb-3 text-sm transition ${D?"border-gov-600 font-semibold text-gov-600":"border-transparent text-slate-600 hover:text-slate-900"}`,children:T.label},T.id)})}),r.jsxs("div",{className:"flex items-center gap-2 pb-3",children:[r.jsxs("div",{className:"relative",children:[r.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:r.jsx(C3,{})}),r.jsx("input",{type:"search",value:s,onChange:T=>a(T.target.value),placeholder:"Search","aria-label":"Search entities by name, email or EIN",className:"h-10 w-full rounded-lg border border-slate-200 bg-white pl-9 pr-3 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 sm:w-64"})]}),r.jsx(u3,{value:u,onChange:d})]})]}),N?r.jsx("p",{className:"py-16 text-center text-sm text-slate-500",children:N}):r.jsx("div",{className:"mt-6 grid gap-5 sm:grid-cols-2 xl:grid-cols-3",children:k.map(T=>r.jsx(r3,{entity:T,selected:T.entityId===(e==null?void 0:e.entityId),onEdit:D=>n(`/entities/${D.entityId}/edit`,{state:{from:"/entities"}}),onSelect:D=>{t(D.entityId),n("/dashboard")}},T.entityId))}),j>f?r.jsx(Da,{page:m,pageSize:f,totalCount:j,onPageChange:h,onPageSizeChange:y,disabled:b||C}):null]})]})}function C3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-4.35-4.35M17 10.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0z"})})}function Ko(e){return me(`/portal/federal-payments/${e}`)}function j3(e){return me(`/portal/federal-payments/form-types?entityId=${e}`)}function Mm(e){const t=new URLSearchParams({formType:e});return me(`/portal/federal-payments/tax-type-codes?${t.toString()}`)}function Qo(e){return me("/portal/federal-payments",{method:"POST",body:e})}function Go(e,t){return me(`/portal/federal-payments/${e}`,{method:"PATCH",body:t})}function Dm(e){return me(`/portal/federal-payments/${e}/submit`,{method:"POST"})}function w3(e){return ds(`/portal/federal-payments/${e}/pdf`,{responseType:"blob"})}function N3(e){return ds(`/portal/state-payments/${e}/pdf`,{responseType:"blob"})}function S3(e){return ds(`/portal/federal-payments/${e}/pdf-html`,{responseType:"text"})}function A3(e){return ds(`/portal/state-payments/${e}/pdf-html`,{responseType:"text"})}function Fc({entityId:e,status:t,category:n="all",pageNumber:s=1,pageSize:a=Fn}){const i=new URLSearchParams({entityId:String(e),pageNumber:String(s),pageSize:String(a)});return t&&i.set("status",t),n&&n!=="all"?i.set("category",n):n==="all"&&i.set("category","all"),me(`/portal/remittance-payments?${i}`)}function k3(e,t="all"){const n=new URLSearchParams({entityId:String(e)});return t&&n.set("category",t),me(`/portal/remittance-payments/status-counts?${n}`)}function P3({open:e,title:t,html:n,isLoading:s=!1,error:a=null,downloadFileName:i="payment.pdf",onDownload:o,onClose:l}){const[c,u]=x.useState(!1);x.useEffect(()=>{if(!e)return;const m=h=>{h.key==="Escape"&&l()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,l]);const d=async()=>{if(!(!o||c)){u(!0);try{const m=await o(),h=URL.createObjectURL(m),f=document.createElement("a");f.href=h,f.download=i,document.body.appendChild(f),f.click(),document.body.removeChild(f),setTimeout(()=>URL.revokeObjectURL(h),1e3)}finally{u(!1)}}};return e?r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:l}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"payment-pdf-title",className:"relative flex h-[90vh] w-full max-w-5xl flex-col overflow-hidden rounded-2xl bg-white shadow-xl",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-slate-200 px-5 py-4",children:[r.jsx("h2",{id:"payment-pdf-title",className:"text-base font-semibold text-slate-900",children:t}),r.jsxs("div",{className:"flex items-center gap-2",children:[o?r.jsx("button",{type:"button",onClick:()=>void d(),disabled:c||s||!!a,className:"rounded-lg border border-gov-200 bg-gov-50 px-3 py-1.5 text-sm font-medium text-gov-600 hover:bg-gov-100 disabled:opacity-60",children:c?"Downloading…":"Download"}):null,r.jsx("button",{type:"button",onClick:l,className:"rounded-lg border border-slate-200 px-3 py-1.5 text-sm font-medium text-slate-600 hover:bg-slate-50",children:"Close"})]})]}),r.jsx("div",{className:"flex-1 overflow-hidden bg-white",children:s?r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-slate-500",children:"Loading…"}):a?r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-red-600",children:a}):n?r.jsx("iframe",{title:t,srcDoc:n,sandbox:"",className:"h-full w-full border-0 bg-white"}):r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-slate-500",children:"No content available."})})]})]}):null}function I3({onClick:e,disabled:t=!1,children:n}){return r.jsx("button",{type:"button",onClick:e,disabled:t,className:"rounded-md border border-gov-200 bg-white px-3 py-1.5 text-xs font-medium text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60",children:n})}function ri({onView:e,onEdit:t,button:n}){return r.jsxs("div",{className:"flex items-center gap-3",children:[e?r.jsx("button",{type:"button",onClick:e,"aria-label":"View payment",title:"View",className:"text-slate-400 transition hover:text-slate-600",children:r.jsx(Do,{})}):null,t?r.jsx("button",{type:"button",onClick:t,"aria-label":"Edit payment",title:"Edit",className:"text-slate-400 transition hover:text-slate-600",children:r.jsx(E3,{})}):null,n?r.jsx(I3,{onClick:n.onClick,disabled:n.disabled,children:n.label}):null]})}function E3(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zM19.5 15v4.125A1.875 1.875 0 0117.625 21H4.875A1.875 1.875 0 013 19.125V6.375A1.875 1.875 0 014.875 4.5H9"})})}const T3=152;function L3(e){const{actionType:t,onView:n,onViewPdf:s,onEdit:a,onSubmit:i,onResubmit:o}=e,l={label:e.isViewPdfLoading?"Loading PDF…":"View PDF",onSelect:s,disabled:e.isViewPdfLoading};return t==="draft-actions"?[{label:"View",onSelect:n},{label:"Edit",onSelect:a},{label:e.isSubmitting?"Submitting…":"Submit",onSelect:i,disabled:e.isSubmitting}]:t==="view-pdf"?[l]:t==="rejected-actions"?[{label:"View",onSelect:n},l,{label:"Re-Submit",onSelect:o,tone:"danger"}]:[{label:"View",onSelect:n},l]}function F3(e){const[t,n]=x.useState(!1),s=x.useRef(null),a=x.useRef(null),i=x.useCallback(()=>n(!1),[]),o=Dn({open:t,anchorRef:s,layerRef:a,onDismiss:i,width:T3,align:"end",gap:4}),l=L3(e);return r.jsxs("div",{ref:s,className:"relative flex justify-end",children:[r.jsx("button",{type:"button",onClick:()=>n(c=>!c),"aria-label":"Payment actions","aria-haspopup":"menu","aria-expanded":t,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(R3,{})}),t&&o?ft.createPortal(r.jsx("div",{ref:a,role:"menu",style:o,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:l.map(c=>r.jsx("button",{type:"button",role:"menuitem",disabled:c.disabled,onClick:()=>{var u;n(!1),(u=c.onSelect)==null||u.call(c)},className:`block w-full px-4 py-2 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-60 ${c.tone==="danger"?"text-red-600 hover:bg-red-50":"text-slate-700 hover:bg-slate-50"}`,children:c.label},c.label))}),On(s.current)):null]})}function R3(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"10",cy:"4.5",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"10",r:"1.5"}),r.jsx("circle",{cx:"10",cy:"15.5",r:"1.5"})]})}const M3={drafts:"bg-slate-100 text-slate-600",scheduled:"bg-amber-50 text-amber-700",submitted:"bg-orange-50 text-orange-700",rejected:"bg-red-50 text-red-600",paid:"bg-emerald-50 text-emerald-700"};function D3(e,t){switch(e){case"drafts":return"Draft";case"scheduled":return"Scheduled";case"submitted":return t==="federal"?"Submitted to Federal":"Submitted to State";case"rejected":return"Failed";case"paid":return"Paid"}}function O3({status:e,category:t}){const n=xm(e);return r.jsx("span",{className:`inline-flex rounded-full px-2.5 py-1 text-xs font-medium ${M3[n]}`,children:D3(n,t)})}function z3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsx("path",{d:"M9.375 1.25H3.75C3.41848 1.25 3.10054 1.3817 2.86612 1.61612C2.6317 1.85054 2.5 2.16848 2.5 2.5V12.5C2.5 12.8315 2.6317 13.1495 2.86612 13.3839C3.10054 13.6183 3.41848 13.75 3.75 13.75H11.25C11.5815 13.75 11.8995 13.6183 12.1339 13.3839C12.3683 13.1495 12.5 12.8315 12.5 12.5V4.375L9.375 1.25Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M8.75 1.25V3.75C8.75 4.08152 8.8817 4.39946 9.11612 4.63388C9.35054 4.8683 9.66848 5 10 5H12.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M6.25 5.625H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M10 8.125H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M10 10.625H5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function q3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#scheduled-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 3.75V7.5L10 8.75",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"scheduled-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}function V3({className:e,...t}){return r.jsx("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:r.jsx("path",{d:"M0 10V0L11.875 5L0 10ZM1.25 8.125L8.65625 5L1.25 1.875V4.0625L5 5L1.25 5.9375V8.125Z",fill:"currentColor"})})}function Z3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#rejected-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 5V7.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M7.5 10H7.50625",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"rejected-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}function U3({className:e,...t}){return r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":!0,...t,children:[r.jsxs("g",{clipPath:"url(#paid-tab-icon-clip)",children:[r.jsx("path",{d:"M7.5 13.75C10.9518 13.75 13.75 10.9518 13.75 7.5C13.75 4.04822 10.9518 1.25 7.5 1.25C4.04822 1.25 1.25 4.04822 1.25 7.5C1.25 10.9518 4.04822 13.75 7.5 13.75Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M5.625 7.5L6.875 8.75L9.375 6.25",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]}),r.jsx("defs",{children:r.jsx("clipPath",{id:"paid-tab-icon-clip",children:r.jsx("rect",{width:"15",height:"15",fill:"white"})})})]})}const Om=[{key:"all",label:"All"},{key:"drafts",label:"Draft",Icon:z3,iconClassName:"text-gray-500"},{key:"scheduled",label:"Scheduled",Icon:q3,iconClassName:"text-yellow-500"},{key:"submitted",label:"Submitted to Fed/State",Icon:V3,iconClassName:"text-[#FF733D]"},{key:"rejected",label:"Rejected",Icon:Z3,iconClassName:"text-red-500"},{key:"paid",label:"Paid",Icon:U3,iconClassName:"text-green-500"}],B3={all:"default",drafts:"draft",scheduled:"view-action",submitted:"view-action",rejected:"rejected",paid:"view-action"},Rc=["Jurisdiction / Type","Period","Amount","Settlement Date","Status","Form Type"],H3={default:Rc,"view-action":[...Rc,"Actions"],draft:["ID","Jurisdiction / Type","Period","Amount","Settlement Date","Form Type","Actions"],rejected:["ID","Jurisdiction / Type","Period","Amount","Form Type","Rejected Date","Reason for Reject","Actions"]},Y3={all:"No payments to display yet.",drafts:"No draft payments to display yet.",scheduled:"No scheduled payments to display yet.",submitted:"No submitted to fed/state payments to display yet.",rejected:"No rejected payments to display yet.",paid:"No paid payments to display yet."},Mc={drafts:"draft-actions",scheduled:"view-pdf",submitted:"view-link",rejected:"rejected-actions",paid:"view-link"},gn="px-6 py-4 text-slate-700";function W3(e){return e.referenceNo==="—"?`#${e.id}`:e.referenceNo}function K3({row:e,layout:t,isSubmitting:n,isViewPdfLoading:s,onView:a,onEdit:i,onViewPdf:o,onSubmit:l}){const c=t==="draft"||t==="rejected";return r.jsxs("tr",{className:"border-b border-slate-100 last:border-0",children:[c?r.jsx("td",{className:gn,children:W3(e)}):null,r.jsx("td",{className:gn,children:e.jurisdiction}),r.jsx("td",{className:gn,children:e.period}),r.jsx("td",{className:"px-6 py-4 font-semibold text-slate-900",children:Bt(e.amount)}),t==="rejected"?r.jsxs(r.Fragment,{children:[r.jsx("td",{className:gn,children:e.formType}),r.jsx("td",{className:gn,children:e.paymentDate}),r.jsx("td",{className:gn,children:e.reason??"—"})]}):r.jsxs(r.Fragment,{children:[r.jsx("td",{className:gn,children:e.paymentDate}),t==="draft"?null:r.jsx("td",{className:"px-6 py-4",children:r.jsx(O3,{status:e.status,category:e.category})}),r.jsx("td",{className:gn,children:e.formType})]}),r.jsx("td",{className:"px-6 py-4",children:t==="draft"?r.jsx(ri,{onView:a,onEdit:i,button:{label:n?"Submitting…":"Submit & Pay",onClick:l,disabled:n}}):t==="rejected"?r.jsx(ri,{onView:a,button:{label:"Re-Submit",onClick:i}}):t==="view-action"?r.jsx(ri,{onView:Mc[e.tab]==="view-pdf"?void 0:a,button:{label:s?"Loading PDF…":"View PDF",onClick:o,disabled:s}}):r.jsx(F3,{actionType:Mc[e.tab],onView:a,onViewPdf:o,onEdit:i,onSubmit:l,onResubmit:i,isSubmitting:n,isViewPdfLoading:s})})]})}function Q3(e){return[e.jurisdiction,e.formType,`Tax ${e.period}`].filter(t=>t&&t!=="—").join(" · ")}function G3({rows:e,onViewAll:t,onView:n,onResubmit:s}){const[a,i]=x.useState(0);if(x.useEffect(()=>{i(c=>c<e.length?c:0)},[e.length]),e.length===0)return null;const o=e[Math.min(a,e.length-1)],l=c=>i(u=>(u+c+e.length)%e.length);return r.jsxs("section",{className:"rounded-2xl border border-slate-200 bg-white p-4 shadow-sm",children:[r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold text-slate-900",children:[r.jsx(J3,{}),"Need Attention"]}),r.jsx("button",{type:"button",onClick:t,className:"text-xs font-medium text-gov-600 transition hover:text-gov-700",children:"View All"})]}),r.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[r.jsx(Dc,{direction:"previous",disabled:e.length<2,onClick:()=>l(-1)}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center justify-between gap-3 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[Bt(o.amount)," Payment Rejected"]}),r.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:Q3(o)})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",onClick:()=>n(o),className:"rounded-md border border-gov-200 bg-white px-3 py-1.5 text-xs font-medium text-gov-600 transition hover:bg-gov-50",children:"View"}),r.jsx("button",{type:"button",onClick:()=>s(o),className:"rounded-md bg-red-500 px-3 py-1.5 text-xs font-semibold text-white transition hover:bg-red-600",children:"Re-Submit"})]})]}),r.jsx(Dc,{direction:"next",disabled:e.length<2,onClick:()=>l(1)})]}),e.length>1?r.jsx("div",{className:"mt-3 flex items-center justify-center gap-1.5",children:e.map((c,u)=>r.jsx("button",{type:"button","aria-label":`Show rejected payment ${u+1}`,"aria-current":u===a,onClick:()=>i(u),className:`h-1.5 rounded-full transition-all ${u===a?"w-5 bg-gov-700":"w-1.5 bg-slate-300 hover:bg-slate-400"}`},`${c.category}-${c.id}`))}):null]})}function Dc({direction:e,disabled:t,onClick:n}){return r.jsx("button",{type:"button",onClick:n,disabled:t,"aria-label":e==="previous"?"Previous payment":"Next payment",className:"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-400 transition hover:bg-slate-50 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-50",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="previous"?"M15 19.5L7.5 12l7.5-7.5":"M9 4.5l7.5 7.5L9 19.5"})})})}function J3(){return r.jsx("span",{className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-red-500 text-white",children:r.jsx("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M10 5a1 1 0 011 1v5a1 1 0 01-2 0V6a1 1 0 011-1zm0 8.25a1.15 1.15 0 110 2.3 1.15 1.15 0 010-2.3z"})})})}const X3=5;function Oc(e){return e!==null&&Om.some(t=>t.key===e)}function Jo({paymentsMode:e="all"}){var Ce;const t=Ae(),n=pt(),[s]=yh(),{entities:a,selectedEntity:i}=vt(),{onPaymentRequired:o}=Wt(),l=(i==null?void 0:i.entityId)??null,c=a.length===0,u=s.get("tab"),[d,m]=x.useState(Oc(u)?u:Ma),[h,f]=x.useState(e==="all"?"all":e),y=e!=="all"?e:h,[p,b]=x.useState(1),[C,g]=x.useState(Fn),[A,j]=x.useState(null),[k,N]=x.useState(null),[T,D]=x.useState(null);x.useEffect(()=>{Oc(u)&&m(u)},[u]),x.useEffect(()=>{b(1),g(Fn)},[d,l,h]),x.useEffect(()=>{b(1)},[C]);const q=ue({queryKey:["remittance-payments","list",l,d,y,p,C],queryFn:()=>Fc({entityId:l,status:d==="all"?void 0:d,category:y,pageNumber:p,pageSize:C}),enabled:l!==null,placeholderData:z=>z}),$=ue({queryKey:["remittance-payments","need-attention",l,y],queryFn:()=>Fc({entityId:l,status:"rejected",category:y,pageNumber:1,pageSize:X3}),enabled:l!==null}),F=ue({queryKey:["remittance-payments","status-counts",l,y],queryFn:()=>k3(l,y),enabled:l!==null}),W=q.isLoading,B=q.isFetching,ne=l!==null&&B,V=x.useMemo(()=>{var ge,X,he,Je,Fe;const z={drafts:((ge=F.data)==null?void 0:ge.drafts)??0,scheduled:((X=F.data)==null?void 0:X.scheduled)??0,submitted:((he=F.data)==null?void 0:he.submitted)??0,rejected:((Je=F.data)==null?void 0:Je.rejected)??0,paid:((Fe=F.data)==null?void 0:Fe.paid)??0};return{...z,all:Object.values(z).reduce((Qe,ct)=>Qe+ct,0)}},[F.data]),se=Fm(),te=x.useCallback(z=>{const ge=t7(z);return{...ge,jurisdiction:se(ge.jurisdiction)}},[se]),re=x.useMemo(()=>{var z;return(((z=q.data)==null?void 0:z.items)??[]).map(te)},[q.data,te]),H=x.useMemo(()=>{var z;return(((z=$.data)==null?void 0:z.items)??[]).map(te)},[$.data,te]),be=((Ce=q.data)==null?void 0:Ce.totalCount)??0,ie=cf({mutationFn:async z=>{try{z.category==="federal"?await Dm(z.id):await Lm(z.id)}catch(ge){if(ge instanceof mn&&ge.status===402&&o){const X=ge.extensions,he={paymentType:(X==null?void 0:X.paymentType)??z.category,paymentId:(X==null?void 0:X.paymentId)??z.id,expectedAmount:(X==null?void 0:X.expectedAmount)??"0.00",currency:(X==null?void 0:X.currency)??"USD",federalRecordCount:(X==null?void 0:X.federalRecordCount)??0,stateRecordCount:(X==null?void 0:X.stateRecordCount)??0,feePerFederal:(X==null?void 0:X.feePerFederal)??null,feePerState:(X==null?void 0:X.feePerState)??null};o(he);return}throw ge}},onSuccess:async()=>{await n.invalidateQueries({queryKey:["remittance-payments"]}),await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["federal-payments"]}),await n.invalidateQueries({queryKey:["state-payments"]})},onError:()=>j(null),onSettled:()=>j(null)});x.useEffect(()=>{const z=async()=>{await n.invalidateQueries({queryKey:["remittance-payments"]}),await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["federal-payments"]}),await n.invalidateQueries({queryKey:["state-payments"]})};return window.addEventListener(Gi,z),()=>window.removeEventListener(Gi,z)},[n]);const xe=z=>{t(Pm(z.category,z.id))},Te=z=>{t(km(z.category,z.id))},De=z=>{if(z.category==="state"&&!z.isAuthorized){Te(z);return}j(`${z.category}-${z.id}`),ie.mutate(z)},Ue=async z=>{const ge=`${z.category}-${z.id}`,X=`payment-${z.referenceNo}.pdf`;N(ge),D({title:`Payment PDF — ${z.referenceNo}`,html:null,category:z.category,paymentId:z.id,downloadFileName:X,isLoading:!0,error:null});try{const he=z.category==="federal"?await S3(z.id):await A3(z.id);D({title:`Payment PDF — ${z.referenceNo}`,html:he,category:z.category,paymentId:z.id,downloadFileName:X,isLoading:!1,error:null})}catch(he){D({title:`Payment PDF — ${z.referenceNo}`,html:null,category:z.category,paymentId:z.id,downloadFileName:X,isLoading:!1,error:nt(he,"Unable to load payment PDF.")})}finally{N(null)}},Oe=async()=>{if(!T)throw new Error("No payment selected");return T.category==="federal"?w3(T.paymentId):N3(T.paymentId)},je=()=>D(null),ve=B3[d],ye=H3[ve],ee=ve==="default"?ye.length+1:ye.length;return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold text-slate-900",children:"Tax Payments"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"View, file, and track every tax payment in one place"})]}),c?r.jsx(fm,{entityCount:0,from:"/payments"}):r.jsxs("div",{className:"flex flex-wrap gap-3",children:[e!=="state"&&r.jsx("button",{type:"button",onClick:()=>t("/payments/federal/new",{state:{from:"/payments",resetDraft:!0}}),className:"inline-flex items-center rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Federal Payment"}),e!=="federal"&&r.jsx("button",{type:"button",onClick:()=>t("/payments/state/new",{state:{from:"/payments",resetDraft:!0}}),className:"inline-flex items-center rounded-lg border border-gov-600 bg-white px-4 py-2.5 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:"Add State Payment"}),e==="all"&&r.jsx("button",{type:"button",disabled:!0,title:"Coming soon",className:"inline-flex cursor-not-allowed items-center rounded-lg border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm font-semibold text-slate-400",children:"Add Local Payment"})]})]}),r.jsx(G3,{rows:H,onViewAll:()=>{m("rejected"),t(Rn("rejected"),{replace:!0})},onView:xe,onResubmit:Te}),r.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[ne?r.jsx(Ra,{label:"Loading payments…"}):null,r.jsx("div",{className:"flex flex-wrap gap-1 border-b border-slate-200 px-4 pt-4",children:Om.map(z=>{const ge=d===z.key,X=z.Icon;return r.jsxs("button",{type:"button",onClick:()=>{m(z.key),t(Rn(z.key),{replace:!0})},className:`mb-[-1px] flex items-center gap-2 border-b-2 px-4 py-3 text-sm font-medium transition ${ge?"border-gov-600 text-gov-600":"border-transparent text-slate-500 hover:text-slate-700"}`,children:[X?r.jsx(X,{className:`shrink-0 ${z.iconClassName??""}`}):null,z.label," (",V[z.key],")"]},z.key)})}),r.jsx("div",{className:"border-b border-slate-200 px-6 py-4",children:r.jsx("div",{className:"max-w-xs",children:r.jsx(Se,{id:"payments-type-filter",label:"Select Payment Type",placeholder:"All",value:h,onChange:f,disabled:e!=="all",options:[{value:"all",label:"All"},{value:"federal",label:"Federal"},{value:"state",label:"State"},{value:"local",label:"Local",disabled:!0,badge:"Coming Soon"}]})})}),r.jsx("div",{className:"overflow-x-auto px-4 pt-4",children:r.jsxs("table",{className:"w-full min-w-[860px] overflow-hidden rounded-xl border border-slate-200 text-left text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-200 bg-slate-50/80 text-sm font-medium text-slate-500",children:[ye.map(z=>r.jsx("th",{className:"px-6 py-3 font-medium",children:z},z)),ve==="default"?r.jsx("th",{className:"px-6 py-3",children:r.jsx("span",{className:"sr-only",children:"Actions"})}):null]})}),r.jsx("tbody",{children:W&&!q.data?r.jsx("tr",{children:r.jsx("td",{colSpan:ee,className:"px-6 py-12 text-center text-slate-500",children:"Loading payments…"})}):re.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:ee,className:"px-6 py-12 text-center text-slate-500",children:Y3[d]})}):re.map(z=>r.jsx(K3,{row:z,layout:ve,isSubmitting:A===`${z.category}-${z.id}`,isViewPdfLoading:k===`${z.category}-${z.id}`,onView:()=>xe(z),onEdit:()=>Te(z),onViewPdf:()=>Ue(z),onSubmit:()=>De(z)},`${z.category}-${z.id}`))})]})}),r.jsx(Da,{page:p,pageSize:C,totalCount:be,onPageChange:b,onPageSizeChange:g,disabled:W||l===null||B})]}),r.jsx(P3,{open:T!==null,title:(T==null?void 0:T.title)??"Payment PDF",html:(T==null?void 0:T.html)??null,downloadFileName:T==null?void 0:T.downloadFileName,isLoading:(T==null?void 0:T.isLoading)??!1,error:(T==null?void 0:T.error)??null,onDownload:T&&!T.error?Oe:void 0,onClose:je})]})}const _3=170;function lr({back:e,draft:t,submit:n}){const s=!!(n&&(n.isSubmitting||n.disabled&&n.blocksDraft!==!1));return r.jsxs("div",{className:"sticky bottom-0 z-20 mt-6 flex flex-wrap items-center justify-between gap-3 border-t border-slate-200 bg-white px-1 py-4",children:[e?r.jsxs("button",{type:"button",onClick:e.onClick,disabled:e.disabled,className:"inline-flex h-11 min-w-[120px] items-center justify-center gap-2 rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:[e.showArrow?r.jsx(e8,{}):null,e.label]}):r.jsx("span",{}),r.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[t?r.jsx($3,{...t,disabled:t.disabled||s}):null,n?r.jsx("button",{type:n.onClick?"button":"submit",onClick:n.onClick,disabled:n.disabled||n.isSubmitting,className:"inline-flex h-11 min-w-[120px] items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:n.isSubmitting?"Submitting…":n.label}):null]})]})}function $3({onSave:e,onDiscard:t,isSaving:n=!1,disabled:s=!1}){const[a,i]=x.useState(!1),o=x.useRef(null),l=x.useRef(null),c=x.useCallback(()=>i(!1),[]),u=Dn({open:a,anchorRef:o,layerRef:l,onDismiss:c,width:_3,align:"end",gap:8}),d=s||n;return r.jsxs("div",{ref:o,className:"relative",children:[r.jsxs("div",{className:"inline-flex h-11 items-stretch overflow-hidden rounded-lg border border-gov-300 bg-white",children:[r.jsx("button",{type:"button",onClick:e,disabled:d,className:"inline-flex min-w-[120px] items-center justify-center px-5 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:n?"Saving…":"Save as Draft"}),r.jsx("button",{type:"button",onClick:()=>i(m=>!m),disabled:d,"aria-label":"More payment actions","aria-haspopup":"menu","aria-expanded":a,className:"inline-flex w-9 items-center justify-center border-l border-gov-200 text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:r.jsx(t8,{})})]}),a&&u?ft.createPortal(r.jsx("div",{ref:l,role:"menu",style:u,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:r.jsx("button",{type:"button",role:"menuitem",onClick:()=>{i(!1),t()},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 transition hover:bg-slate-50",children:"Discard Payment"})}),On(o.current)):null]})}function e8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})})}function t8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function In({title:e,children:t,isFirst:n=!1,headerAction:s}){return r.jsxs("section",{className:n?"":"mt-8 border-t border-slate-100 pt-8",children:[r.jsxs("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[r.jsx("h3",{className:"text-base font-semibold text-gov-600",children:e}),s]}),t]})}function oa(){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:r.jsx("path",{d:"M2.23556 11.5817V5.95669H3.36056V11.5817H2.23556ZM6.36056 11.5817V5.95669H7.48556V11.5817H6.36056ZM0 14.2067V13.0817H13.8461V14.2067H0ZM10.4856 11.5817V5.95669H11.6106V11.5817H10.4856ZM0 4.45669V3.38944L6.92306 0L13.8461 3.38944V4.45669H0ZM2.6595 3.33169H11.1866L6.92306 1.26919L2.6595 3.33169Z",fill:"#185BA5"})})}function zm({open:e,title:t,onClose:n,children:s,footer:a,labelledById:i="side-drawer-title",closeOnEscape:o=!0}){const l=ir();return x.useEffect(()=>{if(!e)return;const c=u=>{u.key==="Escape"&&o&&n()};return document.addEventListener("keydown",c),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=""}},[e,n,o]),e?ft.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[r.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-slate-900/40",onClick:n}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":i,className:"relative z-10 flex h-full w-full max-w-[640px] flex-col bg-white shadow-xl",children:[r.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-slate-200 px-6 py-4",children:[r.jsx("h2",{id:i,className:"text-lg font-semibold text-slate-900",children:t}),r.jsx("button",{type:"button","aria-label":"Close panel",onClick:n,className:"rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(n8,{})})]}),r.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6",children:s}),a?r.jsx("div",{className:"flex flex-wrap items-center justify-end gap-3 border-t border-slate-200 px-6 py-4",children:a}):null]})]}),l):null}function n8(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}const la=17,r8=9;function Us(e,t){return e.replace(/\D/g,"").slice(0,t)}const qm=["Checking","Savings"],s8=hn({accountNumber:Z().min(1,"Account number is required").regex(/^\d{1,17}$/,`Account number must be 1 to ${la} digits`),confirmAccountNumber:Z().regex(/^\d{0,17}$/,`Account number must be 1 to ${la} digits`),routingNumber:Z().min(1,"Routing number is required").regex(/^\d{9}$/,"Routing number must be exactly 9 digits"),accountType:wo(qm,{message:"Account type is required"}),bankName:Z().min(1,"Account name is required")});function a8(e){return s8.superRefine((t,n)=>{if(e){if(!t.confirmAccountNumber){n.addIssue({code:"custom",path:["confirmAccountNumber"],message:"Please confirm the account number"});return}t.confirmAccountNumber!==t.accountNumber&&n.addIssue({code:"custom",path:["confirmAccountNumber"],message:"Account numbers do not match"})}})}const zc={accountNumber:"",confirmAccountNumber:"",routingNumber:"",accountType:"Checking",bankName:""};function i8(e){return{accountNumber:e.accountNumber,confirmAccountNumber:e.accountNumber,routingNumber:e.routingNumber,accountType:e.accountType==="Savings"?"Savings":"Checking",bankName:e.bankName}}function rs({open:e,entityId:t,account:n=null,onClose:s,onSaved:a}){const i=pt(),{showSuccess:o,showError:l}=ja(),[c,u]=x.useState(null),[d,m]=x.useState(!1),[h,f]=x.useState(!1),y=n!==null,p=x.useMemo(()=>a8(!y),[y]),{control:b,handleSubmit:C,reset:g,formState:{errors:A}}=$t({resolver:en(p),defaultValues:zc});x.useEffect(()=>{e&&(g(n?i8(n):zc),f((n==null?void 0:n.isPrimary)??!1),u(null))},[e,n,g]);const j=C(async k=>{if(t){u(null),m(!0);try{const N=n?await Em(n.bankAccountDetailId,{bankName:k.bankName.trim(),accountNumber:k.accountNumber,routingNumber:k.routingNumber,accountType:k.accountType,isPrimary:h}):await q7({entityId:t,bankName:k.bankName.trim(),accountNumber:k.accountNumber,routingNumber:k.routingNumber,accountType:k.accountType,isPrimary:h});await i.invalidateQueries({queryKey:["bank-accounts",t]}),o(y?"Bank Account Updated Successfully":"Bank Account Added Successfully"),a==null||a(N.bankAccountDetailId),s()}catch(N){const T=nt(N,"Unable to save bank account.");u(T),l("Action Not Completed",T)}finally{m(!1)}}});return r.jsx(zm,{open:e,title:y?"Edit Bank Account":"Add Bank Account Manually",onClose:s,labelledById:"bank-account-drawer-title",footer:r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:s,disabled:d,className:"inline-flex h-11 min-w-[110px] items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:opacity-60",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>void j(),disabled:d||!t,className:"inline-flex h-11 min-w-[110px] items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:d?"Saving…":"Save"})]}),children:r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"grid gap-x-6 gap-y-5 sm:grid-cols-2",children:[r.jsx(Ee,{name:"accountNumber",control:b,render:({field:k})=>{var N;return r.jsx(ze,{label:"Account Number",required:!0,placeholder:"Enter account number",inputMode:"numeric",autoComplete:"off",value:k.value,onChange:T=>k.onChange(Us(T.target.value,la)),onBlur:k.onBlur,error:(N=A.accountNumber)==null?void 0:N.message})}}),y?null:r.jsx(Ee,{name:"confirmAccountNumber",control:b,render:({field:k})=>{var N;return r.jsx(ze,{label:"Confirm Account Number",required:!0,placeholder:"Re-enter account number",inputMode:"numeric",autoComplete:"off",value:k.value,onChange:T=>k.onChange(Us(T.target.value,la)),onBlur:k.onBlur,error:(N=A.confirmAccountNumber)==null?void 0:N.message})}}),r.jsx(Ee,{name:"routingNumber",control:b,render:({field:k})=>{var N;return r.jsx(ze,{label:"Routing Number",required:!0,placeholder:"Enter routing number",inputMode:"numeric",autoComplete:"off",value:k.value,onChange:T=>k.onChange(Us(T.target.value,r8)),onBlur:k.onBlur,error:(N=A.routingNumber)==null?void 0:N.message})}}),r.jsx(Ee,{name:"accountType",control:b,render:({field:k})=>{var N;return r.jsx(Se,{id:"bank-account-type",label:"Account Type",required:!0,placeholder:"Select Account Type",value:k.value,onChange:k.onChange,error:(N=A.accountType)==null?void 0:N.message,options:qm.map(T=>({value:T,label:T}))})}}),r.jsx(Ee,{name:"bankName",control:b,render:({field:k})=>{var N;return r.jsx(ze,{label:"Account Name",required:!0,placeholder:"Enter account name",value:k.value,onChange:k.onChange,onBlur:k.onBlur,error:(N=A.bankName)==null?void 0:N.message})}})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-600",children:[r.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-2 focus:ring-gov-200",checked:h,onChange:k=>f(k.target.checked)}),"Set As Primary Account"]}),c?r.jsx(Kt,{message:c}):null]})})}function Xo({open:e,onClose:t,onAddManually:n}){const s=ir();return x.useEffect(()=>{if(!e)return;const a=i=>{i.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[e,t]),e?ft.createPortal(r.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[r.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-slate-900/40",onClick:t}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"bank-connection-method-title",className:"relative z-10 w-full max-w-[420px] rounded-2xl bg-white p-6 shadow-xl",children:[r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsx("h2",{id:"bank-connection-method-title",className:"text-lg font-semibold text-slate-900",children:"Connect Your Bank Account"}),r.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,className:"rounded-lg p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(l8,{})})]}),r.jsxs("div",{className:"mt-5 space-y-3",children:[r.jsxs("div",{className:"relative rounded-xl border border-slate-200 bg-slate-50 p-4",children:[r.jsxs("span",{className:"absolute -top-2.5 right-4 inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-[11px] font-semibold text-slate-500",children:[r.jsx(o8,{}),"Coming Soon"]}),r.jsx("p",{className:"text-sm font-semibold text-slate-400",children:"Connect with Plaid"}),r.jsx("p",{className:"mt-1 text-sm text-slate-400",children:"Securely sign in to your bank using Plaid."})]}),r.jsxs("button",{type:"button",onClick:n,className:"block w-full rounded-xl border border-slate-200 bg-white p-4 text-left transition hover:border-gov-300 hover:bg-gov-50/40",children:[r.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Add Manually"}),r.jsx("p",{className:"mt-1 text-sm text-slate-600",children:"Enter your bank account details yourself."}),r.jsxs("p",{className:"mt-2 text-xs italic text-slate-500",children:[r.jsx("span",{className:"font-semibold",children:"Note:"})," Payments will not be processed until the deposits are verified."]})]})]})]})]}),s):null}function o8(){return r.jsxs("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5V12l3 2"})]})}function l8(){return r.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}const c8=12,u8=["January","February","March","April","May","June","July","August","September","October","November","December"];function En(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${s}`}function ca(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const n=Number.parseInt(t[1],10),s=Number.parseInt(t[2],10)-1,a=Number.parseInt(t[3],10),i=new Date(n,s,a);return i.getFullYear()!==n||i.getMonth()!==s||i.getDate()!==a?null:i}function Vm(e=new Date){const t=new Date(e);return e.getHours()>=c8&&t.setDate(t.getDate()+1),t.setHours(0,0,0,0),En(t)}function Zm(e=new Date){const t=new Date(e);return t.setFullYear(t.getFullYear()+1),t.setHours(0,0,0,0),En(t)}function d8(e=18,t=new Date){const n=new Date(t);return n.setFullYear(n.getFullYear()-e),n.setHours(0,0,0,0),En(n)}function m8(e,t,n=new Date){const s=ca(e);if(!s)return!1;const a=new Date(n);return a.setFullYear(a.getFullYear()-t),a.setHours(0,0,0,0),s.setHours(0,0,0,0),s<=a}function h8(e){const t=e.getDay();return t!==0&&t!==6}function Wi(e,t=new Date){if(!h8(e))return!1;const n=En(e);return n>=Vm(t)&&n<=Zm(t)}function Oa(e,t=new Date){const n=ca(e);return n?Wi(n,t):!1}function f8(e,t){return`${u8[t]} ${e}`}function p8(e,t){const n=new Date(e,t,1),s=new Date(e,t+1,0).getDate(),a=n.getDay(),i=[];for(let o=0;o<a;o+=1)i.push(null);for(let o=1;o<=s;o+=1)i.push(new Date(e,t,o));return i}function ua(e){return`XXXX-${e.replace(/\D/g,"").slice(-4)||e.slice(-4)}`}function _o(e){const[t,n,s]=e.split("-");return!t||!n||!s?e:`${n}/${s}/${t}`}function Ki(e){const t=Number.parseFloat(e);return!e||Number.isNaN(t)?"—":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(t)}const x8=320;function Um({value:e,onChange:t,entityId:n,bankAccounts:s,isLoading:a=!1,disabled:i=!1,error:o,label:l="Bank Account Number",info:c}){const[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,y]=x.useState(!1),p=x.useRef(null),b=x.useRef(null),C=x.useCallback(()=>d(!1),[]),g=Dn({open:u,anchorRef:p,layerRef:b,onDismiss:C,width:"anchor",maxHeight:x8}),A=s.find(k=>String(k.bankAccountDetailId)===e),j=k=>{t(String(k)),y(!1),d(!1)};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:"relative",children:[r.jsx(po,{label:l,required:!0,info:c}),r.jsxs("button",{type:"button",disabled:i||!n,onClick:()=>d(k=>!k),className:`flex w-full items-center justify-between rounded-lg border bg-white px-3 py-2.5 text-left text-sm transition focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:cursor-not-allowed disabled:border-[#E5E7EB] disabled:bg-[#F9FAFB] ${o?"border-red-300":"border-slate-200"}`,children:[r.jsx("span",{className:A?"text-slate-900":"text-slate-400",children:a?"Loading accounts…":A?`${ua(A.accountNumber)}`:"Select bank"}),r.jsx(g8,{className:`shrink-0 text-slate-400 transition ${u?"rotate-180":""}`})]}),o?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:o}):null,u&&g?ft.createPortal(r.jsxs("div",{ref:b,style:g,className:"flex flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain py-1",children:s.length===0?r.jsx("p",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No bank accounts yet."}):s.map(k=>{const N=String(k.bankAccountDetailId)===e;return r.jsxs("button",{type:"button",onClick:()=>{t(String(k.bankAccountDetailId)),d(!1)},className:`block w-full px-4 py-3 text-left transition hover:bg-slate-50 ${N?"bg-gov-50":""}`,children:[r.jsx("span",{className:"block truncate text-sm font-semibold text-slate-900",children:k.bankName}),r.jsx("span",{className:"mt-0.5 block truncate text-xs text-slate-400",children:ua(k.accountNumber)})]},k.bankAccountDetailId)})}),r.jsxs("button",{type:"button",onClick:()=>{d(!1),h(!0)},className:"flex w-full shrink-0 items-center justify-center gap-2 border-t border-slate-200 px-4 py-3 text-sm font-semibold text-gov-600 transition hover:bg-gov-50",children:[r.jsx(oa,{}),"Add New Account"]})]}),On(p.current)):null]}),r.jsx(Xo,{open:m,onClose:()=>h(!1),onAddManually:()=>{h(!1),y(!0)}}),r.jsx(rs,{open:f,entityId:n,onClose:()=>y(!1),onSaved:j})]})}function g8({className:e=""}){return r.jsx("svg",{className:`h-4 w-4 ${e}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function cr({steps:e,current:t,completed:n,className:s=""}){const a=n??t-1;return r.jsx("ol",{className:`flex flex-wrap items-center gap-3 ${s}`,children:e.map((i,o)=>{const l=o+1,c=l<=a,u=l===t;return r.jsxs("li",{className:"flex items-center gap-3",children:[r.jsx("span",{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-xs font-semibold ${c?"bg-gov-700 text-white":u?"border border-gov-500 bg-white text-gov-600":"bg-slate-100 text-slate-400"}`,children:c?r.jsx(y8,{}):String(l).padStart(2,"0")}),r.jsx("span",{className:c||u?"text-sm font-semibold text-gov-600":"text-sm text-slate-500",children:i}),l<e.length?r.jsx("span",{className:"hidden h-px w-10 bg-slate-200 sm:block"}):null]},i)})})}function y8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"3",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})}const za=["Payment & Bank Details","Address & Authorize","Review & Submit"],da={941:"94105",944:"94405","CT-1":"10005"},Yr={socialSecurity:"Social Security",medicare:"Medicare",withheld:"Withheld",tier1:"Tier 1(FICA)",tier2:"Tier 2 (Industry)"},ma={regex:/^(?!0+(?:\.0+)?$)(?:100000000(?:\.00?)?|(?:\d{1,8}|\d{1,7}\d)(?:\.\d{1,2})?)$/,errorMessage:"Payment amount must be a number greater than 0, can include up to 2 decimal places, and must not exceed 100,000,000 (one hundred million)."};function qa(e,t){return!e||!t?!1:da[e]===t}function bs(e,t){return e==="CT-1"&&t===da["CT-1"]}function b8(e,t){return e==="941"&&t===da[941]||e==="944"&&t===da[944]}function v8(e){return e==="CT-1"?{code1:Yr.tier1,code2:Yr.tier2,code3:""}:{code1:Yr.socialSecurity,code2:Yr.medicare,code3:Yr.withheld}}function ha(e){return ma.regex.test(e)}const C8=/^(?:\d{0,8}(?:\.\d{0,2})?|100000000(?:\.\d{0,2})?)$/,Rs=1e8;function j8(e){if(!e)return"";let t="",n=!1;for(const c of e)c>="0"&&c<="9"?t+=c:c==="."&&!n&&(t+=c,n=!0);const s=t.indexOf(".");let a=s===-1?t:t.slice(0,s);const i=s===-1?"":t.slice(s+1,s+3),o=s!==-1&&t.endsWith(".");if(a.length>9&&(a=a.slice(0,9)),a.length===9&&a!=="100000000"&&(a=a.slice(0,8)),a.length>0&&!o&&i===""){const c=Number.parseInt(a,10);!Number.isNaN(c)&&c>Rs&&(a=String(Rs))}let l=s===-1?a:`${a}.${i}`;if(o&&(l=`${a}.`),C8.test(l)){if(!l.endsWith(".")&&l!==""){const c=Number.parseFloat(l);if(!Number.isNaN(c)&&c>Rs)return String(Rs)}return l}return""}function Bm(e){return ha(e)?Number.parseFloat(e):null}function w8(e){if(!e)return"";const t=Number.parseFloat(e);return Number.isNaN(t)?e:t.toFixed(2)}function N8(e,t,n,s){const a=[e,t];return s&&a.push(n),a.reduce((i,o)=>{const l=Bm(o);return l===null?i:i+l},0)}function S8(e,t){return Math.abs(e-t)<.005}function A8(e,t,n,s,a){if(!qa(e,t))return{subcategoryCode1:null,subcategoryCode2:null,subcategoryCode3:null};const i=bs(e,t);return{subcategoryCode1:n.trim()?"1":null,subcategoryCode2:s.trim()?"2":null,subcategoryCode3:!i&&a.trim()?"3":null}}const k8=["Su","Mo","Tu","We","Th","Fr","Sa"],P8=300;function I8(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M3 9h18",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M8 3v4M16 3v4",className:"stroke-gov-600",strokeWidth:"1.5",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"15",r:"1.5",className:"fill-gov-600"})]})}function $o({value:e,onChange:t,disabled:n=!1,hasError:s=!1}){const a=ca(e),i=Vm(),o=Zm(),[l,c]=x.useState(!1),[u,d]=x.useState(()=>a??ca(i)??new Date),m=x.useRef(null),h=x.useRef(null),f=x.useId(),y=x.useCallback(()=>c(!1),[]),p=Dn({open:l,anchorRef:m,layerRef:h,onDismiss:y,width:P8,gap:8});x.useEffect(()=>{a&&d(a)},[e]);const b=x.useMemo(()=>p8(u.getFullYear(),u.getMonth()),[u]),C=x.useMemo(()=>{const j=new Date(u.getFullYear(),u.getMonth()-1,1),k=new Date(j.getFullYear(),j.getMonth()+1,0);return En(k)>=i},[u,i]),g=x.useMemo(()=>{const j=new Date(u.getFullYear(),u.getMonth()+1,1);return En(j)<=o},[u,o]),A=j=>{Wi(j)&&(t(En(j)),c(!1))};return r.jsxs("div",{ref:m,className:"relative",children:[r.jsxs("div",{className:`flex items-center gap-2 rounded-lg border bg-white px-3 py-2.5 transition ${s?"border-red-300":"border-slate-200 focus-within:border-gov-400 focus-within:ring-2 focus-within:ring-gov-200"} ${n?"cursor-not-allowed border-[#E5E7EB] bg-[#F9FAFB] text-slate-700":""}`,children:[r.jsx("input",{id:f,type:"text",readOnly:!0,disabled:n,value:e,placeholder:"YYYY-MM-DD",onClick:()=>!n&&c(j=>!j),className:"w-full cursor-pointer border-0 bg-transparent p-0 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-0 disabled:cursor-not-allowed"}),r.jsx("button",{type:"button",disabled:n,onClick:()=>c(j=>!j),className:"shrink-0 rounded p-0.5 text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60","aria-label":"Open settlement date picker",children:r.jsx(I8,{})})]}),l&&p?ft.createPortal(r.jsxs("div",{ref:h,style:p,className:"rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsxs("div",{className:"flex items-center justify-between rounded-t-xl bg-slate-50 px-4 py-3",children:[r.jsx("button",{type:"button",disabled:!C,onClick:()=>d(j=>new Date(j.getFullYear(),j.getMonth()-1,1)),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Previous month",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),r.jsx("span",{className:"text-sm font-semibold text-slate-900",children:f8(u.getFullYear(),u.getMonth())}),r.jsx("button",{type:"button",disabled:!g,onClick:()=>d(j=>new Date(j.getFullYear(),j.getMonth()+1,1)),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Next month",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-7 gap-1 px-3 pt-2 text-center text-xs font-medium text-slate-500",children:k8.map(j=>r.jsx("div",{className:"py-1",children:j},j))}),r.jsx("div",{className:"grid grid-cols-7 gap-1 p-3 pt-1",children:b.map((j,k)=>{if(!j)return r.jsx("div",{},`empty-${k}`);const N=En(j),T=e===N,D=!Wi(j);return r.jsx("button",{type:"button","aria-disabled":D,onClick:()=>A(j),className:`rounded-lg px-1 py-2 text-sm transition ${D?"cursor-not-allowed text-slate-300 hover:bg-sky-50":T?"bg-sky-100 font-semibold text-slate-900":"font-medium text-slate-800 hover:bg-slate-50"}`,children:j.getDate()},N)})})]}),On(m.current)):null]})}function hr({value:e,onChange:t,onBlur:n,name:s,disabled:a=!1,readOnly:i=!1,placeholder:o="0.00",hasError:l=!1}){return r.jsxs("div",{className:"relative",children:[r.jsx("span",{"aria-hidden":!0,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm ${a||i?"text-slate-400":"text-slate-500"}`,children:"$"}),r.jsx("input",{type:"text",inputMode:"decimal",autoComplete:"off",name:s,value:e,disabled:a,readOnly:i,placeholder:o,className:`${le(l,i)} pl-7`,onChange:c=>t(j8(c.target.value)),onBlur:()=>{const c=w8(e);c!==e&&t(c),n==null||n()}})]})}const E8=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],T8=280;function L8(){return r.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M3 9h18",className:"stroke-gov-600",strokeWidth:"1.5"}),r.jsx("path",{d:"M8 3v4M16 3v4",className:"stroke-gov-600",strokeWidth:"1.5",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"15",r:"1.5",className:"fill-gov-600"})]})}function F8({value:e,onChange:t,disabled:n=!1,hasError:s=!1,disabledMonths:a=[]}){const{minYear:i,maxYear:o}=wm(),l=ia(e),[c,u]=x.useState(!1),[d,m]=x.useState((l==null?void 0:l.year)??o),h=x.useRef(null),f=x.useRef(null),y=x.useId(),p=x.useCallback(()=>u(!1),[]),b=Dn({open:c,anchorRef:h,layerRef:f,onDismiss:p,width:T8,gap:8});x.useEffect(()=>{l&&m(l.year)},[e]);const C=X9(e),g=N=>!!a.includes(N),A=N=>{g(N)||(t(_9(d,N)),u(!1))},j=d>i,k=d<o;return r.jsxs("div",{ref:h,className:"relative",children:[r.jsxs("div",{className:`flex items-center gap-2 rounded-lg border bg-white px-3 py-2.5 transition ${s?"border-red-300":"border-slate-200 focus-within:border-gov-400 focus-within:ring-2 focus-within:ring-gov-200"} ${n?"cursor-not-allowed border-[#E5E7EB] bg-[#F9FAFB] text-slate-700":""}`,children:[r.jsx("input",{id:y,type:"text",readOnly:!0,disabled:n,value:C,placeholder:"YYYY-MM",onClick:()=>!n&&u(N=>!N),className:"w-full cursor-pointer border-0 bg-transparent p-0 text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-0 disabled:cursor-not-allowed"}),r.jsx("button",{type:"button",disabled:n,onClick:()=>u(N=>!N),className:"shrink-0 rounded p-0.5 text-gov-600 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-60","aria-label":"Open tax period picker",children:r.jsx(L8,{})})]}),c&&b?ft.createPortal(r.jsxs("div",{ref:f,style:b,className:"rounded-xl border border-slate-200 bg-white shadow-lg",children:[r.jsxs("div",{className:"flex items-center justify-between rounded-t-xl bg-slate-50 px-4 py-3",children:[r.jsx("button",{type:"button",disabled:!j,onClick:()=>m(N=>N-1),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Previous year",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),r.jsx("span",{className:"text-sm font-semibold text-slate-900",children:d}),r.jsx("button",{type:"button",disabled:!k,onClick:()=>m(N=>N+1),className:"rounded p-1 text-slate-500 transition hover:bg-white hover:text-slate-800 disabled:cursor-not-allowed disabled:opacity-30","aria-label":"Next year",children:r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),r.jsx("div",{className:"grid grid-cols-3 gap-1 p-3",children:E8.map((N,T)=>{const D=(l==null?void 0:l.year)===d&&l.month===T&&e.length===6,q=g(T);return r.jsx("button",{type:"button","aria-disabled":q,onClick:()=>A(T),className:`rounded-lg px-2 py-2.5 text-sm transition ${q?"cursor-not-allowed text-slate-300 hover:bg-sky-50":D?"bg-sky-100 font-semibold text-slate-900":"font-medium text-slate-800 hover:bg-slate-50"}`,children:N},N)})})]}),On(h.current)):null]})}const Hm="Active",R8="Inactive";function ur(e){return(e.status??Hm).trim().toLowerCase()==="active"}function M8(e){return ur(e)?R8:Hm}function D8(e){return ur(e)?"Deactivate":"Activate"}function el(e){var t;return((t=e==null?void 0:e.accountType)==null?void 0:t.trim().toLowerCase())==="individual"}function O8(e){return el(e)?"/payments/federal/individual-enrollment":"/payments/federal/authorization"}function Ym(e){return Number.parseInt(e,10)||0}function Wm(e){return Number.parseFloat(e)||0}function Km(e){return e||"0001-01-01"}function Qm(e){const t=A8(e.taxFormType,e.taxTypeCode,e.subcategoryAmount1??"",e.subcategoryAmount2??"",e.subcategoryAmount3??""),n=bs(e.taxFormType,e.taxTypeCode);return{subcategoryCode1:t.subcategoryCode1,subcategoryAmount1:e.subcategoryAmount1?Number.parseFloat(e.subcategoryAmount1):null,subcategoryCode2:t.subcategoryCode2,subcategoryAmount2:e.subcategoryAmount2?Number.parseFloat(e.subcategoryAmount2):null,subcategoryCode3:t.subcategoryCode3,subcategoryAmount3:!n&&e.subcategoryAmount3?Number.parseFloat(e.subcategoryAmount3):null}}function tl(e,t){return{entityId:e,taxpayerPin:t.taxpayerPin||null,secondaryTin:t.secondaryTin||null,bankAccountDetailId:Ym(t.bankAccountDetailId),taxFormType:t.taxFormType,taxTypeCode:t.taxTypeCode,taxPeriod:t.taxPeriod,settlementDate:Km(t.settlementDate),paymentAmount:Wm(t.paymentAmount),...Qm(t)}}function nl(e){return{taxpayerPin:e.taxpayerPin||null,secondaryTin:e.secondaryTin||null,bankAccountDetailId:Ym(e.bankAccountDetailId),taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:Km(e.settlementDate),paymentAmount:Wm(e.paymentAmount),...Qm(e)}}const rl="federal-payment-draft";function sl(e){sessionStorage.setItem(rl,JSON.stringify(e))}function vs(){const e=sessionStorage.getItem(rl);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Mn(){sessionStorage.removeItem(rl)}function z8(e,t={}){return{federalPaymentId:e.federalPaymentId,enrollmentId:e.enrollmentId,taxpayerPin:e.taxpayerPin??"",secondaryTin:e.secondaryTin??"",bankAccountDetailId:e.bankAccountDetailId?String(e.bankAccountDetailId):"",routingNumber:t.routingNumber??"",accountNumber:t.accountNumber??"",accountType:t.accountType??"",bankName:t.bankName??"",taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:e.settlementDate,paymentAmount:String(e.paymentAmount),subcategoryAmount1:e.subcategoryAmount1!=null?String(e.subcategoryAmount1):"",subcategoryAmount2:e.subcategoryAmount2!=null?String(e.subcategoryAmount2):"",subcategoryAmount3:e.subcategoryAmount3!=null?String(e.subcategoryAmount3):""}}const q8=hn({taxpayerPin:Z().min(1,"Taxpayer PIN is required").regex(/^\d{4}$/,"Taxpayer PIN must be exactly 4 digits"),secondaryTin:Rd("Secondary TIN"),bankAccountDetailId:Z().min(1,"Bank account is required"),routingNumber:Z().optional(),accountType:Z().optional(),bankName:Z().optional(),taxFormType:Z().min(1,"Tax form type is required"),taxTypeCode:Z().min(1,"Payment type is required"),taxPeriod:Z().min(1,"This field is required").regex(/^\d{6}$/,"Tax period must be in YYYY-MM format").refine(e=>{const t=ia(e);if(!t)return!1;const{minYear:n,maxYear:s}=wm();return t.year>=n&&t.year<=s},"Tax period must be within the last 3 years"),settlementDate:Z().min(1,"This field is required").refine(e=>Oa(e),"Settlement date must be a weekday within the allowed range"),paymentAmount:Z().min(1,"This field is required").refine(e=>ha(e),ma.errorMessage),subcategoryCode1:Z().optional(),subcategoryAmount1:Z().optional(),subcategoryCode2:Z().optional(),subcategoryAmount2:Z().optional(),subcategoryCode3:Z().optional(),subcategoryAmount3:Z().optional()}).superRefine((e,t)=>{var l;if(e.taxPeriod&&e.taxFormType){const c=ia(e.taxPeriod);c&&jm(e.taxFormType).includes(c.month)&&t.addIssue({code:Ot.custom,message:"Tax period must be a valid month for the selected tax form",path:["taxPeriod"]})}if(!qa(e.taxFormType,e.taxTypeCode))return;const n=bs(e.taxFormType,e.taxTypeCode),s=b8(e.taxFormType,e.taxTypeCode),a=(c,u,d)=>{if(!(c!=null&&c.trim())){d&&t.addIssue({code:Ot.custom,message:"This field is required",path:[u]});return}ha(c)||t.addIssue({code:Ot.custom,message:ma.errorMessage,path:[u]})};a(e.subcategoryAmount1,"subcategoryAmount1",!0),a(e.subcategoryAmount2,"subcategoryAmount2",!0),a(e.subcategoryAmount3,"subcategoryAmount3",s);const i=Bm(e.paymentAmount),o=N8(e.subcategoryAmount1??"",e.subcategoryAmount2??"",e.subcategoryAmount3??"",s);i!==null&&!S8(i,o)&&t.addIssue({code:Ot.custom,message:"Payment amount must equal the sum of subcategory amounts",path:["paymentAmount"]}),n&&((l=e.subcategoryAmount3)!=null&&l.trim())&&t.addIssue({code:Ot.custom,message:"Subcategory amount 3 is not used for CT-1 payments",path:["subcategoryAmount3"]})}),V8={TaxpayerPin:"taxpayerPin",SecondaryTin:"secondaryTin",BankAccountDetailId:"bankAccountDetailId",TaxFormType:"taxFormType",TaxTypeCode:"taxTypeCode",TaxPeriod:"taxPeriod",SettlementDate:"settlementDate",PaymentAmount:"paymentAmount",SubcategoryCode1:"subcategoryCode1",SubcategoryCode2:"subcategoryCode2",SubcategoryCode3:"subcategoryCode3",SubcategoryAmount1:"subcategoryAmount1",SubcategoryAmount2:"subcategoryAmount2",SubcategoryAmount3:"subcategoryAmount3"},Wr="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3";function si(e){return{taxpayerPin:e.taxpayerPin??"",secondaryTin:e.secondaryTin??"",bankAccountDetailId:e.bankAccountDetailId,routingNumber:e.routingNumber??"",accountType:e.accountType??"",bankName:e.bankName??"",taxFormType:e.taxFormType,taxTypeCode:e.taxTypeCode,taxPeriod:e.taxPeriod,settlementDate:e.settlementDate,paymentAmount:e.paymentAmount,subcategoryCode1:e.subcategoryCode1??"",subcategoryAmount1:e.subcategoryAmount1??"",subcategoryCode2:e.subcategoryCode2??"",subcategoryAmount2:e.subcategoryAmount2??"",subcategoryCode3:e.subcategoryCode3??"",subcategoryAmount3:e.subcategoryAmount3??""}}const qc={taxpayerPin:"",secondaryTin:"",bankAccountDetailId:"",routingNumber:"",accountType:"",bankName:"",taxFormType:"",taxTypeCode:"",taxPeriod:"",settlementDate:"",paymentAmount:"",subcategoryCode1:"",subcategoryAmount1:"",subcategoryCode2:"",subcategoryAmount2:"",subcategoryCode3:"",subcategoryAmount3:""};function Z8(e,t,n){if(e)return si(e);if(t!=null&&t.paymentDraft)return si(t.paymentDraft);if(t!=null&&t.resetDraft)return Mn(),qc;const s=vs();return s&&s.entityId===n?si(s):qc}function Gm({entity:e,initialDraft:t,readonly:n=!1,onCancel:s}){var ct,Et,Ct,jt,ut,Re,Tt,Lt,$e,Ft,wt,w,P;const a=Ae(),i=Ie(),o=pt(),l=tn(i.state,_e()),c=i.state,u=c!=null&&c.resetDraft?null:vs(),d=t??(c==null?void 0:c.paymentDraft)??(u&&u.entityId===(e==null?void 0:e.entityId)?u:null),m=x.useRef(d==null?void 0:d.federalPaymentId),h=x.useRef(d==null?void 0:d.enrollmentId),[f,y]=x.useState(null),[p,b]=x.useState(!1),C=x.useMemo(()=>Z8(t,c,e==null?void 0:e.entityId),[t,c==null?void 0:c.paymentDraft,c==null?void 0:c.resetDraft,e==null?void 0:e.entityId,i.key]);x.useEffect(()=>{d!=null&&d.federalPaymentId&&(m.current=d.federalPaymentId),d!=null&&d.enrollmentId&&(h.current=d.enrollmentId)},[d==null?void 0:d.federalPaymentId,d==null?void 0:d.enrollmentId]);const{data:g=[],isLoading:A}=ue({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>fn(e.entityId),enabled:e!==null}),j=x.useMemo(()=>g.filter(ur),[g]),{data:k=[],isLoading:N}=ue({queryKey:["federal-form-types",e==null?void 0:e.entityId],queryFn:()=>j3(e.entityId),enabled:e!==null}),{register:T,control:D,handleSubmit:q,watch:$,setValue:F,setError:W,getValues:B,trigger:ne,formState:{errors:V}}=$t({resolver:en(q8),defaultValues:C}),se=T("taxpayerPin"),te=$("bankAccountDetailId"),re=$("taxFormType"),H=$("taxTypeCode"),be=$("taxPeriod"),ie=$("settlementDate"),xe=$("subcategoryAmount1"),Te=$("subcategoryAmount2"),De=$("subcategoryAmount3"),Ue=x.useRef(re),Oe=x.useMemo(()=>re?jm(re):[],[re]),je=x.useMemo(()=>qa(re,H),[re,H]),ve=x.useMemo(()=>bs(re,H),[re,H]),{data:ye=[],isLoading:ee}=ue({queryKey:["federal-tax-type-codes",re],queryFn:()=>Mm(re),enabled:!!re});x.useEffect(()=>{Ue.current&&Ue.current!==re&&F("taxTypeCode",""),Ue.current=re},[re,F]),x.useEffect(()=>{if(!be||!re)return;const v=ia(be);v&&Oe.includes(v.month)&&F("taxPeriod","")},[re,be,Oe,F]),x.useEffect(()=>{ie&&(Oa(ie)||F("settlementDate",""))},[ie,F]),x.useEffect(()=>{if(!je){F("subcategoryCode1",""),F("subcategoryCode2",""),F("subcategoryCode3",""),F("subcategoryAmount1",""),F("subcategoryAmount2",""),F("subcategoryAmount3","");return}const v=v8(re);F("subcategoryCode1",v.code1),F("subcategoryCode2",v.code2),F("subcategoryCode3",ve?"":v.code3),ve&&F("subcategoryAmount3","")},[je,re,ve,F]),x.useEffect(()=>{je&&(ne("paymentAmount"),ne("subcategoryAmount1"),ne("subcategoryAmount2"),ne("subcategoryAmount3"))},[xe,Te,De,je,ne]),x.useEffect(()=>{if(A)return;const v=j.find(E=>String(E.bankAccountDetailId)===te);if(!v){te&&(F("bankAccountDetailId",""),F("routingNumber",""),F("accountType",""),F("bankName",""));return}F("routingNumber",v.routingNumber),F("accountType",v.accountType),F("bankName",v.bankName)},[j,te,A,F]);const Ce=v=>{const E=j.find(M=>String(M.bankAccountDetailId)===v.bankAccountDetailId);return{federalPaymentId:m.current,enrollmentId:h.current??(d==null?void 0:d.enrollmentId),form8655AuthorizationId:d==null?void 0:d.form8655AuthorizationId,form9783EnrollmentId:d==null?void 0:d.form9783EnrollmentId,taxpayerPin:v.taxpayerPin??"",secondaryTin:v.secondaryTin??"",bankAccountDetailId:v.bankAccountDetailId,routingNumber:v.routingNumber??(E==null?void 0:E.routingNumber)??"",accountNumber:(E==null?void 0:E.accountNumber)??"",accountType:v.accountType??(E==null?void 0:E.accountType)??"",bankName:v.bankName??(E==null?void 0:E.bankName)??"",taxFormType:v.taxFormType,taxTypeCode:v.taxTypeCode,taxPeriod:v.taxPeriod,settlementDate:v.settlementDate,paymentAmount:v.paymentAmount,subcategoryCode1:v.subcategoryCode1,subcategoryAmount1:v.subcategoryAmount1,subcategoryCode2:v.subcategoryCode2,subcategoryAmount2:v.subcategoryAmount2,subcategoryCode3:v.subcategoryCode3,subcategoryAmount3:v.subcategoryAmount3}},z=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]}),m.current&&o.removeQueries({queryKey:["federal-payment",m.current],exact:!0})},ge=async v=>{if(!e)return null;if(v.federalPaymentId){const M=await Go(v.federalPaymentId,nl(v));return m.current=M.federalPaymentId,h.current=M.enrollmentId,M}const E=await Qo(tl(e.entityId,v));return m.current=E.federalPaymentId,h.current=E.enrollmentId,E},X=v=>{if(!(v instanceof mn)||!v.details)return!1;let E=!1;for(const[M,Y]of Object.entries(v.details)){const U=V8[M],G=Y[0];U&&G&&(W(U,{type:"server",message:G}),E=!0)}return E},he=q(async v=>{if(!(n||!e)){y(null),b(!0);try{const E=Ce(v),M=await ge(E);if(!M)return;const Y={...E,entityId:e.entityId,federalPaymentId:M.federalPaymentId,enrollmentId:M.enrollmentId};await z(),sl(Y),a(O8(e),{state:{from:l,paymentDraft:Y}})}catch(E){const M=X(E);y(M?"Please review the highlighted fields below.":nt(E,"Failed to save payment details."))}finally{b(!1)}}}),Je=async()=>{if(!(!e||n)){y(null),b(!0);try{const v=Ce(B());await ge(v),await z(),Mn(),a(_e())}catch(v){const E=X(v);y(E?"Please review the highlighted fields below.":nt(v,"Failed to save draft."))}finally{b(!1)}}},Fe=()=>{if(s){s();return}a(l)},Qe=()=>{Mn(),Fe()};return r.jsxs("form",{onSubmit:he,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!n&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:za,current:1})})]}),f?r.jsx(Kt,{message:f}):null,r.jsx("div",{className:"w-full",children:r.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:[r.jsx(In,{title:"Enrollment Details",isFirst:!0,children:r.jsxs("div",{className:"space-y-5 w-3/4",children:[r.jsxs("div",{className:Wr,children:[r.jsx(_,{label:"Taxpayer PIN",required:!0,info:"The 4-digit PIN assigned by the IRS for EFTPS enrollment.",error:(ct=V.taxpayerPin)==null?void 0:ct.message,children:r.jsx("input",{placeholder:"Enter Taxpayer PIN",className:le(!!V.taxpayerPin),inputMode:"numeric",maxLength:4,disabled:n,...se,onChange:v=>{v.target.value=v.target.value.replace(/\D/g,"").slice(0,4),se.onChange(v)}})}),r.jsx(_,{label:"Secondary TIN",info:"An additional Taxpayer Identification Number, if the payment requires one.",error:(Et=V.secondaryTin)==null?void 0:Et.message,children:r.jsx("input",{placeholder:"Enter Secondary TIN",className:le(!!V.secondaryTin),maxLength:9,disabled:n,...T("secondaryTin")})}),r.jsx(Ee,{name:"bankAccountDetailId",control:D,render:({field:v})=>{var E;return r.jsx(Um,{value:v.value,onChange:v.onChange,entityId:(e==null?void 0:e.entityId)??null,bankAccounts:j,isLoading:A,disabled:!e||n,label:"Account Number",info:"Select the bank account to debit for this payment, or add a new one.",error:(E=V.bankAccountDetailId)==null?void 0:E.message})}})]}),r.jsxs("div",{className:Wr,children:[r.jsx(_,{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",error:(Ct=V.routingNumber)==null?void 0:Ct.message,children:r.jsx("input",{readOnly:!0,placeholder:"Enter Routing Number",className:le(!!V.routingNumber,!0),...T("routingNumber")})}),r.jsx(_,{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",error:(jt=V.accountType)==null?void 0:jt.message,children:r.jsx("input",{readOnly:!0,placeholder:"Select Account Type",className:le(!!V.accountType,!0),...T("accountType")})}),r.jsx(_,{label:"Bank Name",required:!0,info:"The name of the bank, auto-filled from the selected bank account.",error:(ut=V.bankName)==null?void 0:ut.message,children:r.jsx("input",{readOnly:!0,placeholder:"Bank Name",className:le(!!V.bankName,!0),...T("bankName")})})]})]})}),r.jsx(In,{title:"Federal Payment",children:r.jsxs("div",{className:"space-y-5 w-3/4",children:[r.jsxs("div",{className:Wr,children:[r.jsx(_,{label:"Tax Form Type",required:!0,info:"The federal tax form this payment applies to (e.g. 941, 944, CT-1).",error:(Re=V.taxFormType)==null?void 0:Re.message,children:r.jsx(Ee,{name:"taxFormType",control:D,render:({field:v})=>r.jsx(Se,{hasError:!!V.taxFormType,disabled:N||!e||n,loading:N,loadingLabel:"Loading form types…",placeholder:"Select form type",value:v.value??"",onChange:v.onChange,options:k.map(E=>({value:E.value,label:E.value}))})})}),r.jsx(_,{label:"Payment Type",required:!0,info:"The type of payment for the selected tax form.",error:(Tt=V.taxTypeCode)==null?void 0:Tt.message,children:r.jsx(Ee,{name:"taxTypeCode",control:D,render:({field:v})=>r.jsx(Se,{hasError:!!V.taxTypeCode,disabled:!re||ee||n,loading:ee,loadingLabel:"Loading payment types…",placeholder:re?"Select payment type":"Select tax form first",value:v.value??"",onChange:v.onChange,options:ye.map(E=>({value:E.code,label:`${E.code} - ${E.codeName}`}))})})}),r.jsx(_,{label:"Tax Period",required:!0,info:"The tax period (month and year) this payment covers.",error:(Lt=V.taxPeriod)==null?void 0:Lt.message,children:r.jsx(Ee,{name:"taxPeriod",control:D,render:({field:v})=>r.jsx(F8,{value:v.value,onChange:v.onChange,hasError:!!V.taxPeriod,disabled:!re||n,disabledMonths:Oe})})})]}),r.jsxs("div",{className:"grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",children:[r.jsx(_,{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the IRS.",error:($e=V.settlementDate)==null?void 0:$e.message,children:r.jsx(Ee,{name:"settlementDate",control:D,render:({field:v})=>r.jsx($o,{value:v.value,onChange:v.onChange,hasError:!!V.settlementDate,disabled:n})})}),r.jsx(_,{label:"Payment Amount",required:!0,info:"The total amount to remit. Must equal the sum of subcategory amounts when applicable.",error:(Ft=V.paymentAmount)==null?void 0:Ft.message,children:r.jsx(Ee,{name:"paymentAmount",control:D,render:({field:v})=>r.jsx(hr,{name:v.name,value:v.value,onChange:v.onChange,onBlur:v.onBlur,disabled:n,hasError:!!V.paymentAmount})})})]}),je?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"h-px bg-slate-200"}),r.jsxs("div",{className:Wr,children:[r.jsx(_,{label:"Subcategory Code 1",info:"The first subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:le(!1,!0),...T("subcategoryCode1")})}),r.jsx(_,{label:"Subcategory Code 2",info:"The second subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:le(!1,!0),...T("subcategoryCode2")})}),ve?null:r.jsx(_,{label:"Subcategory Code 3",info:"The third subcategory code for the selected tax form, set automatically.",children:r.jsx("input",{readOnly:!0,className:le(!1,!0),...T("subcategoryCode3")})})]}),r.jsxs("div",{className:Wr,children:[r.jsx(_,{label:"Subcategory Amount 1",required:!0,info:"The amount allocated to Subcategory Code 1.",error:(wt=V.subcategoryAmount1)==null?void 0:wt.message,children:r.jsx(Ee,{name:"subcategoryAmount1",control:D,render:({field:v})=>r.jsx(hr,{name:v.name,value:v.value??"",onChange:v.onChange,onBlur:v.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!V.subcategoryAmount1})})}),r.jsx(_,{label:"Subcategory Amount 2",required:!0,info:"The amount allocated to Subcategory Code 2.",error:(w=V.subcategoryAmount2)==null?void 0:w.message,children:r.jsx(Ee,{name:"subcategoryAmount2",control:D,render:({field:v})=>r.jsx(hr,{name:v.name,value:v.value??"",onChange:v.onChange,onBlur:v.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!V.subcategoryAmount2})})}),ve?null:r.jsx(_,{label:"Subcategory Amount 3",required:!0,info:"The amount allocated to Subcategory Code 3.",error:(P=V.subcategoryAmount3)==null?void 0:P.message,children:r.jsx(Ee,{name:"subcategoryAmount3",control:D,render:({field:v})=>r.jsx(hr,{name:v.name,value:v.value??"",onChange:v.onChange,onBlur:v.onBlur,disabled:n,placeholder:"Enter amount",hasError:!!V.subcategoryAmount3})})})]})]}):null]})})]})}),r.jsx(lr,{back:n?{label:"Back",onClick:Fe,showArrow:!0}:void 0,draft:n?void 0:{onSave:Je,onDiscard:Qe,isSaving:p,disabled:!e},submit:n?void 0:{label:"Next",disabled:!e||p}})]},i.key)}function Jm(){const{selectedEntity:e}=vt();return r.jsx(Gm,{entity:e})}function Xm({mode:e}){const t=Ae(),{federalPaymentId:n}=ya(),{selectedEntity:s}=vt(),a=Number.parseInt(n??"",10),{data:i,isLoading:o,isError:l}=ue({queryKey:["federal-payment",a],queryFn:()=>Ko(a),enabled:Number.isFinite(a)}),{data:c=[]}=ue({queryKey:["bank-accounts",s==null?void 0:s.entityId],queryFn:()=>fn(s.entityId),enabled:s!==null&&i!==void 0}),u=x.useMemo(()=>{if(!i)return null;const m=c.find(h=>h.bankAccountDetailId===i.bankAccountDetailId);return z8(i,{routingNumber:m==null?void 0:m.routingNumber,accountNumber:m==null?void 0:m.accountNumber,accountType:m==null?void 0:m.accountType,bankName:m==null?void 0:m.bankName})},[i,c]);if(!Number.isFinite(a))return r.jsx(Ye,{to:_e(),replace:!0});if(o)return r.jsx("p",{className:"text-sm text-slate-600",children:"Loading federal payment…"});if(l||!i||!u)return r.jsx(Ye,{to:_e(),replace:!0});if(!s||i.entityId!==s.entityId)return r.jsx(Ye,{to:_e(),replace:!0});const d=e==="view"||!gm(i.status);return r.jsx(Gm,{entity:s,initialDraft:u,readonly:d,onCancel:()=>t(_e())})}function _m(){return vt(),r.jsx(Xm,{mode:"edit"})}function $m(){return vt(),r.jsx(Xm,{mode:"view"})}function e1({entityId:e,state:t,reasonForPayment:n,status:s,pageNumber:a=1,pageSize:i=Fn}){const o=new URLSearchParams({entityId:String(e),pageNumber:String(a),pageSize:String(i)});return t&&o.set("state",t),n&&o.set("reasonForPayment",n),s&&o.set("status",s),me(`/portal/tax-accounts?${o}`)}function U8(e){return me("/portal/tax-accounts",{method:"POST",body:e})}function B8(e,t){return me(`/portal/tax-accounts/${e}`,{method:"PATCH",body:t})}function H8({enabled:e,onChange:t,disabled:n=!1,helperText:s="Set a schedule once, and GovPay automatically submits each payment. Ideal for monthly or quarterly payments."}){return r.jsxs("div",{className:"rounded-xl border border-slate-200 p-5",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsx("h5",{className:"text-sm font-semibold text-slate-900",children:"Make This a Recurring Payment"}),r.jsxs("button",{type:"button",role:"switch","aria-checked":e,"aria-label":"Make this a recurring payment",disabled:n,onClick:()=>t(!e),className:`relative inline-flex h-6 w-[52px] shrink-0 items-center rounded-full text-[10px] font-semibold text-white transition focus:outline-none focus-visible:ring-2 focus-visible:ring-gov-300 disabled:cursor-not-allowed disabled:opacity-60 ${e?"bg-gov-700":"bg-slate-500"}`,children:[r.jsx("span",{className:`absolute h-4 w-4 rounded-full bg-white transition-all ${e?"left-[32px]":"left-1"}`}),r.jsx("span",{className:`w-full text-center ${e?"pr-5":"pl-5"}`,children:e?"Yes":"No"})]})]}),r.jsx("p",{className:"mt-3 text-sm text-slate-600",children:s})]})}function Y8(e){return{id:e,taxPeriod:"",taxAmount:"",paymentDate:""}}function W8({rows:e,taxPeriodOptions:t,onChange:n,onRemove:s,onAdd:a,disabled:i=!1}){return r.jsxs(r.Fragment,{children:[e.map(o=>r.jsxs("div",{className:"mt-5 flex items-start gap-3",children:[r.jsxs("div",{className:"grid flex-1 gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx(_,{label:"Tax Period",required:!0,children:r.jsx(Se,{placeholder:"Select Tax Period",value:o.taxPeriod,onChange:l=>n(o.id,{taxPeriod:l}),options:t.map(l=>({value:l.value,label:l.label}))})}),r.jsx(_,{label:"Tax Amount",required:!0,children:r.jsx(hr,{value:o.taxAmount,onChange:l=>n(o.id,{taxAmount:l}),disabled:i})}),r.jsx(_,{label:"Settlement Date",required:!0,children:r.jsx($o,{value:o.paymentDate,onChange:l=>n(o.id,{paymentDate:l}),disabled:i})})]}),r.jsx(t1,{onClick:()=>s(o.id),label:`Remove tax period row ${o.id}`})]},o.id)),r.jsxs("button",{type:"button",onClick:a,disabled:i,className:"mt-4 inline-flex items-center gap-2 text-sm font-semibold text-gov-600 transition hover:text-gov-700 disabled:cursor-not-allowed disabled:opacity-50",children:[r.jsx(Q8,{}),"Add New"]})]})}function t1({onClick:e,label:t,disabled:n=!1,title:s}){return r.jsx("button",{type:"button",onClick:e,disabled:n,"aria-label":t,title:s,className:"mt-[26px] inline-flex h-[42px] w-[42px] shrink-0 items-center justify-center rounded-lg border border-slate-200 text-slate-400 transition hover:bg-slate-50 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",children:r.jsx(K8,{})})}function K8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 7.5h12M9.5 7.5V6a1 1 0 011-1h3a1 1 0 011 1v1.5M7.5 7.5l.6 11a1 1 0 001 .95h5.8a1 1 0 001-.95l.6-11M10.5 11v5M13.5 11v5"})})}function Q8(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14m-7-7h14"})})}function G8(e){const t=[];return e.includes("\\d")&&t.push("0-9"),/[A-Z]/.test(e)&&t.push("A-Z"),e.includes("-")&&t.push("\\-"),e.includes(" ")&&t.push(" "),e.includes("/")&&t.push("/"),t.length?t.join(""):null}function n1(e,t){const n=e.toUpperCase();if(!t)return n;const s=G8(t);return s?n.replace(new RegExp(`[^${s}]`,"g"),""):n}function r1(e){if(!e)return null;const t=[];let n=0;try{for(;n<e.length;){if(e.startsWith("(?:",n))return null;const s=e[n];if(s==="-"||s===" "||s==="/"){t.push({type:"separator",char:s}),n+=1;continue}let a;if(s==="\\")a=e[n+1]==="d"?"digit":"letter",n+=2;else if(s==="["){const o=e.indexOf("]",n);if(o===-1)return null;a="letter",n=o+1}else a=s>="0"&&s<="9"?"digit":"letter",n+=1;const i=J8(e,n);if(i===null)return null;for(let o=0;o<i.count;o+=1)t.push({type:"slot",kind:a});n=i.nextIndex}}catch{return null}return t}function J8(e,t){if(e[t]!=="{")return{count:1,nextIndex:t};const n=e.indexOf("}",t);if(n===-1)throw new Error("Unterminated quantifier");const s=e.slice(t+1,n);if(s.includes(","))return null;const a=Number.parseInt(s,10);if(Number.isNaN(a))throw new Error("Bad quantifier");return{count:a,nextIndex:n+1}}function s1(e,t){const n=e.toUpperCase().replace(/[^0-9A-Z]/g,"").split("");let s="",a=0;for(const i of t){if(a>=n.length)break;if(i.type==="separator"){s+=i.char;continue}for(;a<n.length;){const o=n[a];a+=1;const l=o>="0"&&o<="9";if(i.kind==="digit"?l:!l){s+=o;break}}}return s}function a1(e){if(e)try{const t=i1(e,0);return t.index===e.length?t.length:void 0}catch{return}}function i1(e,t){let n=t,s=0;for(;;){const a=X8(e,n);if(s=Math.max(s,a.length),n=a.index,e[n]==="|"){n+=1;continue}return{length:s,index:n}}}function X8(e,t){let n=t,s=0;for(;n<e.length&&e[n]!=="|"&&e[n]!==")";){const a=_8(e,n);s+=a.length,n=a.index}return{length:s,index:n}}function _8(e,t){let n=t,s;if(e.startsWith("(?:",n)){const a=i1(e,n+3);if(e[a.index]!==")")throw new Error("Unbalanced group");s=a.length,n=a.index+1}else if(e[n]==="\\")s=1,n+=2;else if(e[n]==="["){const a=e.indexOf("]",n);if(a===-1)throw new Error("Unterminated class");s=1,n=a+1}else s=1,n+=1;if(e[n]==="{"){const a=e.indexOf("}",n);if(a===-1)throw new Error("Unterminated quantifier");const i=e.slice(n+1,a).split(","),o=i.length===2?i[1]:i[0],l=Number.parseInt(o,10);if(Number.isNaN(l))throw new Error("Bad quantifier");s*=l,n=a+1}return{length:s,index:n}}const al="state-payment-draft";function Va(e){sessionStorage.setItem(al,JSON.stringify(e))}function fa(){const e=sessionStorage.getItem(al);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Mr(){sessionStorage.removeItem(al)}function o1(e,t){if(!(e!=null&&e.trim()))return null;const n=t(e);return Number.isNaN(n)?null:n}const Qi=e=>o1(e,t=>Number.parseInt(t,10)),l1=e=>o1(e,Number.parseFloat),c1=e=>e!=null&&e.trim()?e:null;function $8(e,t){var n,s,a,i,o,l,c,u;if(t.isRecurring&&((n=t.additionalOccurrences)!=null&&n.length)){const d=[{taxPeriod:t.taxPeriod,taxAmount:t.taxAmount,paymentDate:t.paymentDate},...t.additionalOccurrences].map(m=>{var h;return{taxPeriod:(h=m.taxPeriod)!=null&&h.trim()?m.taxPeriod.trim():null,taxAmount:Number.parseFloat(m.taxAmount),paymentDate:m.paymentDate}});return{entityId:e,state:t.state,reasonForPayment:t.reasonForPayment,stateAccountId:t.stateAccountId,accountId:t.accountId,letterId:(s=t.letterId)!=null&&s.trim()?t.letterId.trim().toUpperCase():null,taxYear:t.taxYear,taxPeriod:null,taxAmount:null,paymentDate:null,bankAccountDetailId:Qi(t.bankAccountDetailId),formName:(a=t.formName)!=null&&a.trim()?t.formName.trim():null,depositFrequency:(i=t.depositFrequency)!=null&&i.trim()?t.depositFrequency.trim():null,occurrences:d}}return{entityId:e,state:t.state,reasonForPayment:t.reasonForPayment,stateAccountId:t.stateAccountId,accountId:t.accountId,letterId:(o=t.letterId)!=null&&o.trim()?t.letterId.trim().toUpperCase():null,taxYear:t.taxYear,taxPeriod:(l=t.taxPeriod)!=null&&l.trim()?t.taxPeriod.trim():null,taxAmount:l1(t.taxAmount),paymentDate:c1(t.paymentDate),bankAccountDetailId:Qi(t.bankAccountDetailId),isRecurring:t.isRecurring??!1,frequency:t.isRecurring?t.frequency:void 0,recurringEndDate:t.isRecurring?t.recurringEndDate:void 0,formName:(c=t.formName)!=null&&c.trim()?t.formName.trim():null,depositFrequency:(u=t.depositFrequency)!=null&&u.trim()?t.depositFrequency.trim():null}}function ex(e){var t,n,s,a;return{state:e.state,reasonForPayment:e.reasonForPayment,stateAccountId:e.stateAccountId,accountId:e.accountId,letterId:(t=e.letterId)!=null&&t.trim()?e.letterId.trim().toUpperCase():null,taxYear:e.taxYear,taxPeriod:(n=e.taxPeriod)!=null&&n.trim()?e.taxPeriod.trim():null,taxAmount:l1(e.taxAmount)??void 0,paymentDate:c1(e.paymentDate)??void 0,bankAccountDetailId:Qi(e.bankAccountDetailId)??void 0,formName:(s=e.formName)!=null&&s.trim()?e.formName.trim():null,depositFrequency:(a=e.depositFrequency)!=null&&a.trim()?e.depositFrequency.trim():null}}function il(e){const t=Ae(),n=pt(),s=async o=>{await n.invalidateQueries({queryKey:["dashboard"]}),await n.invalidateQueries({queryKey:["state-payments"]}),await n.invalidateQueries({queryKey:["remittance-payments"]}),o&&n.removeQueries({queryKey:["state-payments",o],exact:!0})},a=async o=>{if(!e)return null;if(o.statePaymentDetailId){const c=await Y7(o.statePaymentDetailId,ex(o));return await s(c.statePaymentDetailId),c}const l=await H7($8(e.entityId,o));return Va({...o,statePaymentDetailId:l.statePaymentDetailId}),await s(l.statePaymentDetailId),l};return{upsertPayment:a,saveAsDraft:async o=>{e&&(await a(o),Mr(),t(_e()))}}}const tx="Enter the letter or notice ID in this format: L1234567890 (the letter L followed by 10 digits).",Vc=/^L\d{10}$/,u1=10,nx=u1+1;function rx(e){const t=e.toUpperCase().replace(/[^A-Z0-9]/g,"");if(!t)return"";const n=t.replace(/\D/g,"").slice(0,u1);return!n&&!t.startsWith("L")?"":`L${n}`}function sx(e,t){return hn({state:Z().min(1,"State is required"),reasonForPayment:Z().min(1,"Reason for payment is required"),formName:Z().optional(),stateAccountId:Z().min(1,"State ID is required"),accountId:Z().min(1,"Account ID is required").refine(n=>/^\d{10,12}$/.test(n.trim()),"Account ID must be 10 to 12 digits"),letterId:Z().optional(),taxYear:Z().min(1,"Tax year is required"),taxPeriod:Z().optional(),taxAmount:Z().min(1,"Tax amount is required").refine(n=>ha(n),ma.errorMessage),paymentDate:Z().min(1,"Settlement date is required").refine(n=>Oa(n),"Settlement date must be a weekday within the allowed range"),bankAccountDetailId:Z().optional(),routingNumber:Z().optional(),accountType:Z().optional(),bankName:Z().optional()}).superRefine((n,s)=>{var m,h,f;const a=e(),i=a==null?void 0:a.stateId.pattern;if(i)try{new RegExp(`^(?:${i})$`).test(n.stateAccountId.trim().toUpperCase())||s.addIssue({code:Ot.custom,path:["stateAccountId"],message:a.stateId.message})}catch{s.addIssue({code:Ot.custom,path:["stateAccountId"],message:"State ID validation is temporarily unavailable"})}const o=((m=n.letterId)==null?void 0:m.trim().toUpperCase())??"",l=(a==null?void 0:a.letterIdRequired)??!1,c=(a==null?void 0:a.letterId.message)??tx;if(l&&!o)s.addIssue({code:Ot.custom,path:["letterId"],message:"Letter ID is required for a bill payment"});else if(o)try{(a!=null&&a.letterId.pattern?new RegExp(`^(?:${a.letterId.pattern})$`):Vc).test(o)||s.addIssue({code:Ot.custom,path:["letterId"],message:c})}catch{Vc.test(o)||s.addIssue({code:Ot.custom,path:["letterId"],message:c})}((a==null?void 0:a.taxPeriodRequired)??!0)&&!((h=n.taxPeriod)!=null&&h.trim())&&s.addIssue({code:Ot.custom,path:["taxPeriod"],message:"Tax period is required"}),t().length>1&&!((f=n.formName)!=null&&f.trim())&&s.addIssue({code:Ot.custom,path:["formName"],message:"Select a form"})})}const Zc="grid gap-x-6 gap-y-5 sm:grid-cols-3",ax="grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",ix="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",Uc="mt-6 min-w-0 rounded-xl border border-slate-200 p-5 lg:p-6",ai="text-sm font-semibold text-slate-900",ox=["Payment Details","Bank Account","Review & Authorize"],Bc={state:"",reasonForPayment:"",formName:"",stateAccountId:"",accountId:"",letterId:"",taxYear:"",taxPeriod:"",taxAmount:"",paymentDate:"",bankAccountDetailId:"",routingNumber:"",accountType:"",bankName:""};function ii(e){return{state:e.state,reasonForPayment:d1(e.reasonForPayment),formName:e.formName??"",stateAccountId:e.stateAccountId,accountId:e.accountId,letterId:e.letterId??"",taxYear:e.taxYear,taxPeriod:e.taxPeriod,taxAmount:e.taxAmount,paymentDate:e.paymentDate,bankAccountDetailId:e.bankAccountDetailId,routingNumber:e.routingNumber??"",accountType:e.accountType??"",bankName:e.bankName??""}}const lx={MAKE_A_BILL_PAYMENT:"BILL_PAYMENT"};function d1(e){const t=e.trim().toUpperCase().replaceAll(" ","_");return lx[t]??t}const Hc=new Set(["WITHHOLDING_TAX"]);function m1({entity:e,initialDraft:t,readonly:n=!1,onCancel:s}){var ml,hl,fl,pl,xl,gl,yl,bl,vl,Cl,jl;const a=Ae(),i=Ie(),o=tn(i.state,_e()),l=i.state,c=x.useMemo(()=>t??(l==null?void 0:l.paymentDraft)??(l!=null&&l.resetDraft?null:fa())??null,[t,l==null?void 0:l.paymentDraft,l==null?void 0:l.resetDraft]),u=x.useRef(c==null?void 0:c.statePaymentDetailId),d=x.useMemo(()=>{if(t)return ii(t);if(l!=null&&l.paymentDraft)return ii(l.paymentDraft);if(l!=null&&l.resetDraft)return Mr(),Bc;const L=fa();return L?ii(L):Bc},[t,l==null?void 0:l.paymentDraft,l==null?void 0:l.resetDraft,i.key]),{data:m=[],isLoading:h,isError:f}=ue({queryKey:["state-payment-states"],queryFn:({signal:L})=>Vo(L)}),{data:y=[],isLoading:p}=ue({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>fn(e.entityId),enabled:e!==null}),b=x.useMemo(()=>y.filter(ur),[y]),C=x.useRef(null),g=x.useRef([]),A=x.useMemo(()=>sx(()=>C.current,()=>g.current),[]),{register:j,control:k,handleSubmit:N,getValues:T,watch:D,setValue:q,clearErrors:$,formState:{errors:F}}=$t({resolver:en(A),defaultValues:d}),W=D("state"),B=D("reasonForPayment"),ne=D("paymentDate"),V=D("bankAccountDetailId"),{data:se=[],isLoading:te,isError:re}=ue({queryKey:["state-payment-reasons",e==null?void 0:e.entityId,W],queryFn:({signal:L})=>Zo(e.entityId,W,L),enabled:e!==null&&!!W}),{data:H}=ue({queryKey:["state-payment-validation-metadata",e==null?void 0:e.entityId,W,B],queryFn:({signal:L})=>Uo(e.entityId,W,B,L),enabled:e!==null&&!!(W&&B)}),{data:be}=ue({queryKey:["state-payment-form-references",e==null?void 0:e.entityId,W,B],queryFn:({signal:L})=>U7(e.entityId,W,B,L),enabled:e!==null&&!!(W&&B)}),{data:ie}=ue({queryKey:["tax-accounts","lookup",e==null?void 0:e.entityId,W,B],queryFn:()=>e1({entityId:e.entityId,state:W,reasonForPayment:B,status:"Active"}),enabled:e!==null&&!!(W&&B)}),xe=D("stateAccountId"),Te=D("accountId"),De=D("taxYear");x.useEffect(()=>{if(n)return;const L=ie==null?void 0:ie.items[0];L&&(xe||q("stateAccountId",L.stateAccountId,{shouldValidate:!0}),Te||q("accountId",L.accountId,{shouldValidate:!0}),!De&&L.taxYear&&(H!=null&&H.taxYearOptions.some(pe=>String(pe)===L.taxYear))&&q("taxYear",L.taxYear,{shouldValidate:!0}))},[ie,xe,Te,De,H,q,n]),C.current=H??null;const Ue=(H==null?void 0:H.taxYearOptions)??[],Oe=(H==null?void 0:H.frequencyMode)??null,je=(H==null?void 0:H.frequencyOptions)??[],ve=Oe!==null&&Oe!=="NotApplicable",[ye,ee]=x.useState((c==null?void 0:c.depositFrequency)??""),Ce=B==="BILL_PAYMENT",z=x.useMemo(()=>{const L=(be==null?void 0:be.forms)??[],pe=ye?L.filter(gt=>!gt.frequency||gt.frequency.toLowerCase()===ye.toLowerCase()):L,nn=pe.length>0?pe:L;return[...new Set(nn.map(gt=>gt.formName))]},[be,ye]);g.current=z,x.useEffect(()=>{je.length===1&&ye!==je[0].code&&ee(je[0].code)},[je,ye]);const ge=Number(De),{data:X}=ue({queryKey:["state-payment-tax-periods",e==null?void 0:e.entityId,W,B,ye,ge],queryFn:({signal:L})=>B7(e.entityId,W,B,ye,ge,L),enabled:e!==null&&ve&&!!ye&&Number.isInteger(ge)}),he=ve&&ye?X??((ml=je.find(L=>L.code===ye))==null?void 0:ml.taxPeriodOptions)??[]:(H==null?void 0:H.taxPeriodOptions)??[],Je=Ce?he.filter(L=>L.value==="ANNUAL").map(L=>({...L,label:Number.isInteger(ge)?`Annual ${ge} (Jan 1–Dec 31)`:L.label})):he,Fe=!!(H&&W&&B),Qe=(H==null?void 0:H.stateId.pattern)??null,ct=a1(Qe),Et=x.useMemo(()=>r1(Qe),[Qe]),Ct=j("stateAccountId"),jt=j("accountId"),ut=j("letterId"),[Re,Tt]=x.useState((c==null?void 0:c.isRecurring)??!1),[Lt,$e]=x.useState(null),[Ft,wt]=x.useState(null),[w,P]=x.useState(!1),{saveAsDraft:v}=il(e),E=x.useRef(1),[M,Y]=x.useState(()=>((c==null?void 0:c.additionalOccurrences)??[]).map(L=>({id:E.current++,...L}))),U=()=>{Y(L=>[...L,Y8(E.current++)])},G=(L,pe)=>{Y(nn=>nn.map(gt=>gt.id===L?{...gt,...pe}:gt))},R=L=>{Y(pe=>pe.filter(nn=>nn.id!==L))},Q=L=>{Tt(L),L||(Y([]),$e(null))};x.useEffect(()=>{Ce&&Re&&Q(!1)},[Ce,Re]);const ke=!!(H!=null&&H.letterIdRequired),xt=["stateAccountId","accountId","letterId","taxYear","taxPeriod","taxAmount","paymentDate","formName"],Rt=()=>{xt.forEach(L=>q(L,"")),ee(""),Y([]),$e(null),$([...xt,"bankAccountDetailId"])},Vn=L=>{q("state",L,{shouldValidate:!0}),q("reasonForPayment",""),$("reasonForPayment"),Rt()},Za=L=>{L!==B&&(q("reasonForPayment",L,{shouldValidate:!0}),Rt())};x.useEffect(()=>{c!=null&&c.statePaymentDetailId&&(u.current=c.statePaymentDetailId)},[c==null?void 0:c.statePaymentDetailId]),x.useEffect(()=>{if(!B||te||re||se.some(pe=>pe.code===B))return;const L=se.find(pe=>d1(pe.label)===B);q("reasonForPayment",(L==null?void 0:L.code)??"")},[te,re,se,B,q]);const Vr=x.useRef(!1);x.useEffect(()=>{if(!n){if(!Vr.current){Vr.current=!0;return}ne&&!Oa(ne)&&q("paymentDate","")}},[ne,q,n]),x.useEffect(()=>{if(n||p)return;const L=b.find(pe=>String(pe.bankAccountDetailId)===V);if(!L){V&&(q("bankAccountDetailId",""),q("routingNumber",""),q("accountType",""),q("bankName",""));return}q("routingNumber",L.routingNumber),q("accountType",L.accountType),q("bankName",L.bankName)},[b,V,q,n,p]);const Cs=L=>{var pe,nn;return{authorizedPersonName:c==null?void 0:c.authorizedPersonName,authorizedTitle:c==null?void 0:c.authorizedTitle,authorizationSignature:c==null?void 0:c.authorizationSignature,authorizationDate:c==null?void 0:c.authorizationDate,statePaymentDetailId:u.current,state:L.state,reasonForPayment:L.reasonForPayment,stateAccountId:L.stateAccountId.trim().toUpperCase(),accountId:L.accountId.trim(),letterId:(pe=L.letterId)!=null&&pe.trim()?L.letterId.trim().toUpperCase():"",taxYear:L.taxYear,taxPeriod:L.taxPeriod??"",taxAmount:L.taxAmount,paymentDate:L.paymentDate,bankAccountDetailId:L.bankAccountDetailId??"",routingNumber:L.routingNumber,accountType:L.accountType,bankName:L.bankName,isRecurring:Re,formName:((nn=L.formName)==null?void 0:nn.trim())||void 0,depositFrequency:ve&&ye?ye:void 0,additionalOccurrences:Re&&M.length>0?M.map(({taxPeriod:gt,taxAmount:z1,paymentDate:q1})=>({taxPeriod:gt,taxAmount:z1,paymentDate:q1})):void 0}},js=N(L=>{if(n||!H)return;if(Re){if(M.length===0){$e("Add at least one tax period below for this recurring payment.");return}if(M.some(gt=>!!(!gt.taxAmount.trim()||!gt.paymentDate.trim()||H.taxPeriodRequired&&!gt.taxPeriod.trim()))){$e("Fill in the Tax Period, Tax Amount, and Settlement Date for every added row.");return}$e(null)}const pe=Cs(L);Va(pe),a("/payments/state/bank-details",{state:{from:o,paymentDraft:pe}})}),dl=()=>{if(s){s();return}a(o)},D1=async()=>{if(e){wt(null),P(!0);try{await v(Cs(T()))}catch(L){wt(nt(L,"Failed to save draft."))}finally{P(!1)}}},O1=()=>{Mr(),dl()};return r.jsxs("form",{onSubmit:js,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),!n&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:ox,current:1})})]}),r.jsxs("section",{className:ix,children:[r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Payment Details"}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",children:[r.jsx(_,{label:"State",required:!0,info:"The tax jurisdiction this payment is for.",error:(hl=F.state)==null?void 0:hl.message,children:r.jsx(Se,{disabled:n||h||f,hasError:!!F.state,loading:h,loadingLabel:"Loading states…",placeholder:"Select State",value:W,onChange:Vn,options:m.map(L=>({value:L.code,label:L.name}))})}),r.jsx(_,{label:"Reason for Payment",required:!0,info:"The reason for this state tax payment, filtered by the selected state and entity.",error:(fl=F.reasonForPayment)==null?void 0:fl.message,children:r.jsx(Se,{disabled:n||!W||te||re,hasError:!!F.reasonForPayment,loading:te,loadingLabel:"Loading reasons…",placeholder:"Select Reason for Payment",value:B,onChange:Za,options:se.map(L=>({value:L.code,label:L.label,disabled:Hc.has(L.code),badge:Hc.has(L.code)?"Coming Soon":void 0}))})}),ve?r.jsx(_,{label:"Frequency",required:!0,info:je.length===1?"The deposit frequency for this state tax account - only one applies here.":"The deposit frequency for this state tax account - narrows the Tax Period choices below.",children:je.length===1?r.jsx("input",{readOnly:!0,className:le(!1,!0),value:je[0].label}):r.jsx(Se,{disabled:n||!B,placeholder:B?"Select Frequency":"Select a reason first",value:ye,onChange:ee,options:je.map(L=>({value:L.code,label:L.label}))})}):null,z.length>0?r.jsx(_,{label:"Forms",required:z.length>1,info:z.length>1?"Select the agency form this payment is for.":"The agency form this payment is for - only one applies here.",error:(pl=F.formName)==null?void 0:pl.message,children:z.length===1?r.jsx("input",{readOnly:!0,className:le(!1,!0),value:z[0]}):r.jsx(Ee,{name:"formName",control:k,render:({field:L})=>r.jsx(Se,{disabled:n,hasError:!!F.formName,placeholder:"Select Form",value:L.value??"",onChange:L.onChange,options:z.map(pe=>({value:pe,label:pe}))})})}):null]}),f?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Unable to load states."}):null,re?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Unable to load payment reasons."}):null,W&&!te&&!re&&se.length===0?r.jsx("p",{className:"mt-2 text-xs text-slate-500",children:"No supported payment reasons are available for this entity and state."}):null,be&&be.notes.length>0?r.jsx("div",{className:"mt-5 rounded-lg bg-slate-50 px-4 py-3 text-xs text-slate-700",children:be.notes.map(L=>r.jsx("p",{className:"text-slate-500",children:L},L))}):null,r.jsxs("fieldset",{disabled:!Fe||n,className:Uc,children:[r.jsx("h4",{className:ai,children:"Account Information"}),r.jsxs("div",{className:`mt-5 ${ax}`,children:[r.jsx(_,{label:"State Tax ID",required:(H==null?void 0:H.stateId.required)??!0,info:"Your state-issued tax account identifier for the selected state.",error:(xl=F.stateAccountId)==null?void 0:xl.message,children:r.jsx("input",{placeholder:(H==null?void 0:H.stateId.example)??"Enter State Tax ID",maxLength:ct,className:le(!!F.stateAccountId),...Ct,onChange:L=>{L.target.value=Et?s1(L.target.value,Et):n1(L.target.value,Qe),Ct.onChange(L)}})}),r.jsx(_,{label:"Account ID",required:(H==null?void 0:H.accountIdRequired)??!0,info:"Your 10 to 12 digit state tax account number.",error:(gl=F.accountId)==null?void 0:gl.message,children:r.jsx("input",{inputMode:"numeric",placeholder:"Enter Account ID",maxLength:12,className:le(!!F.accountId),...jt,onChange:L=>{L.target.value=L.target.value.replace(/\D/g,"").slice(0,12),jt.onChange(L)}})}),ke?r.jsx(_,{label:"Letter ID",required:(H==null?void 0:H.letterIdRequired)??!1,info:"The letter or notice ID from the state bill (format L1234567890).",error:(yl=F.letterId)==null?void 0:yl.message,children:r.jsx("input",{placeholder:(H==null?void 0:H.letterId.example)??"L1234567890",maxLength:nx,autoComplete:"off",className:le(!!F.letterId),...ut,onChange:L=>{L.target.value=rx(L.target.value),ut.onChange(L)}})}):null,r.jsx(_,{label:"Tax Year",required:!0,info:"The tax year this payment applies to.",error:(bl=F.taxYear)==null?void 0:bl.message,children:r.jsx(Ee,{name:"taxYear",control:k,render:({field:L})=>r.jsx(Se,{hasError:!!F.taxYear,placeholder:"Select Tax Year",value:L.value??"",onChange:L.onChange,options:Ue.map(pe=>({value:String(pe),label:`TY ${pe}`}))})})})]}),r.jsx("h4",{className:`mt-6 ${ai}`,children:"Tax Periods & Amounts"}),r.jsxs("div",{className:"mt-4 grid items-start gap-5 lg:grid-cols-[minmax(0,1fr)_320px]",children:[r.jsxs("div",{className:"rounded-xl border border-slate-200 p-4 lg:p-5",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsxs("div",{className:"grid flex-1 gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx(_,{label:"Tax Period",required:(H==null?void 0:H.taxPeriodRequired)??!0,info:(H==null?void 0:H.taxPeriodRequired)===!1?"Optional for a bill payment - the notice already states the billed period.":ve&&!ye?"The tax period this payment covers. Select a Frequency above to narrow this list.":"The tax period this payment covers.",error:(vl=F.taxPeriod)==null?void 0:vl.message,children:r.jsx(Ee,{name:"taxPeriod",control:k,render:({field:L})=>r.jsx(Se,{hasError:!!F.taxPeriod,placeholder:"Select Tax Period",value:L.value??"",onChange:L.onChange,options:Je.map(pe=>({value:pe.value,label:pe.label}))})})}),r.jsx(_,{label:"Tax Amount",required:!0,info:"The total amount to remit to the state.",error:(Cl=F.taxAmount)==null?void 0:Cl.message,children:r.jsx(Ee,{name:"taxAmount",control:k,render:({field:L})=>r.jsx(hr,{name:L.name,value:L.value,onChange:L.onChange,onBlur:L.onBlur,disabled:n,hasError:!!F.taxAmount})})}),r.jsx(_,{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the state.",error:(jl=F.paymentDate)==null?void 0:jl.message,children:r.jsx(Ee,{name:"paymentDate",control:k,render:({field:L})=>r.jsx($o,{value:L.value,onChange:L.onChange,hasError:!!F.paymentDate,disabled:n})})})]}),Re?r.jsx(t1,{label:"Remove tax period row 1",title:"The first tax period can't be removed",disabled:!0}):null]}),Re?r.jsxs(r.Fragment,{children:[r.jsx(W8,{rows:M,taxPeriodOptions:Je,onChange:(L,pe)=>{$e(null),G(L,pe)},onRemove:R,onAdd:U,disabled:n}),Lt?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:Lt}):null]}):null]}),r.jsx(H8,{enabled:Re,onChange:Q,disabled:n||Ce,helperText:Ce?"Not available for a bill payment - the notice you received already covers a single, fixed period.":void 0})]})]}),n?r.jsxs("fieldset",{disabled:!0,className:Uc,children:[r.jsx("h4",{className:ai,children:"Bank Account"}),r.jsxs("div",{className:"mt-5 space-y-5",children:[r.jsxs("div",{className:Zc,children:[r.jsx(Ee,{name:"bankAccountDetailId",control:k,render:({field:L})=>{var pe;return r.jsx(Um,{value:L.value??"",onChange:L.onChange,entityId:(e==null?void 0:e.entityId)??null,bankAccounts:b,isLoading:p,disabled:!e||!Fe||n,error:(pe=F.bankAccountDetailId)==null?void 0:pe.message,label:"Account Number",info:"Select the bank account to debit for this payment, or add a new one."})}}),r.jsx(_,{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"9-digit",className:le(!1,!0),...j("routingNumber")})}),r.jsx(_,{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"Select",className:le(!1,!0),...j("accountType")})})]}),r.jsx("div",{className:Zc,children:r.jsx(_,{label:"Bank Name",info:"The name of the bank, auto-filled from the selected bank account.",children:r.jsx("input",{readOnly:!0,placeholder:"e.g. Chase Bank",className:le(!1,!0),...j("bankName")})})})]})]}):null,H!=null&&H.notes.length?r.jsx("div",{className:"mt-5 rounded-lg bg-amber-50 px-4 py-3 text-xs text-amber-800",children:H.notes.map(L=>r.jsx("p",{children:L},L))}):null]}),Ft?r.jsx("div",{className:"mt-4",children:r.jsx(Kt,{message:Ft})}):null,r.jsx(lr,{back:n?{label:"Back",onClick:dl,showArrow:!0}:void 0,draft:n?void 0:{onSave:D1,onDiscard:O1,isSaving:w,disabled:!e},submit:n?void 0:{label:"Next",disabled:!e||!Fe}})]},i.key)}function h1(){const{selectedEntity:e}=vt();return r.jsx(m1,{entity:e})}function f1(){const{statePaymentId:e}=ya(),{selectedEntity:t}=vt(),n=Number.parseInt(e??"",10),{data:s,isLoading:a,isError:i}=ue({queryKey:["state-payments",n],queryFn:()=>Tm(n),enabled:t!==null&&Number.isFinite(n)}),o=x.useMemo(()=>s?{statePaymentDetailId:s.statePaymentDetailId,state:s.state,reasonForPayment:s.reasonForPayment??"",stateAccountId:s.stateAccountId??"",accountId:s.accountId??"",letterId:s.letterId??"",taxYear:s.taxYear??"",taxPeriod:s.taxPeriod??"",taxAmount:String(s.taxAmount),paymentDate:s.paymentDate,bankAccountDetailId:s.bankAccountDetailId?String(s.bankAccountDetailId):"",formName:s.formName??"",depositFrequency:s.frequency??"",authorizedPersonName:s.authorizedPersonName??"",authorizedTitle:s.authorizedTitle??"",authorizationSignature:s.authorizationSignature??"",authorizationDate:s.authorizationDate??""}:null,[s]);return Number.isFinite(n)?a?r.jsx("p",{className:"px-6 py-12 text-sm text-slate-500",children:"Loading state payment…"}):i||!s||!o?r.jsx(Ye,{to:_e(),replace:!0}):!t||s.entityId!==t.entityId?r.jsx(Ye,{to:_e(),replace:!0}):gm(s.status)?r.jsx(m1,{entity:t,initialDraft:o}):r.jsx(Ye,{to:`/payments/state/${n}/view`,replace:!0}):r.jsx(Ye,{to:_e(),replace:!0})}function p1(){var l,c;const{statePaymentId:e}=ya(),t=Ae(),{selectedEntity:n}=vt(),s=Number.parseInt(e??"",10),{data:a,isLoading:i,isError:o}=ue({queryKey:["state-payments",s],queryFn:()=>Tm(s),enabled:n!==null&&Number.isFinite(s)});return Number.isFinite(s)?i?r.jsx("p",{className:"px-6 py-12 text-sm text-slate-500",children:"Loading state payment…"}):o||!a?r.jsx(Ye,{to:"/payments",replace:!0}):!n||a.entityId!==n.entityId?r.jsx(Ye,{to:"/payments",replace:!0}):r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{type:"button",onClick:()=>t("/payments"),className:"inline-flex items-center gap-1.5 rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm font-medium text-slate-600 transition hover:bg-slate-50",children:[r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),"Back to Payments"]}),r.jsxs("h1",{className:"text-lg font-semibold text-slate-900",children:["State Payment ST-",a.statePaymentDetailId]})]}),r.jsx("div",{className:"w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("dl",{className:"grid gap-x-8 gap-y-5 sm:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"State"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.state})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Tax Period"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:Nm(a.taxPeriod,a.formName)})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Amount"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:Bt(a.taxAmount)})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Settlement Date"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.paymentDate})]}),a.formName&&r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Form"}),r.jsx("dd",{className:"mt-1 text-sm font-medium text-slate-900",children:a.formName})]}),r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Status"}),r.jsx("dd",{className:"mt-1",children:r.jsx("span",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold ${((l=a.status)==null?void 0:l.toLowerCase())==="paid"?"bg-green-100 text-green-800":((c=a.status)==null?void 0:c.toLowerCase())==="rejected"?"bg-red-100 text-red-800":"bg-slate-100 text-slate-700"}`,children:a.status??"—"})})]}),a.reason&&r.jsxs("div",{children:[r.jsx("dt",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:"Rejection Reason"}),r.jsx("dd",{className:"mt-1 text-sm text-slate-700",children:a.reason})]})]})})]}):r.jsx(Ye,{to:"/payments",replace:!0})}const Yc=160,cx=88,Ms=8;function ux({account:e,entityId:t,onEdit:n,variant:s="button"}){const a=ir(),i=pt(),{showSuccess:o,showError:l}=ja(),c=x.useRef(null),u=x.useRef(null),[d,m]=x.useState(!1),[h,f]=x.useState(!1),[y,p]=x.useState({}),b=()=>{var T;const g=c.current;if(!g)return;const A=g.getBoundingClientRect(),j=((T=u.current)==null?void 0:T.offsetHeight)??cx,N=window.innerHeight-A.bottom<j+Ms;p({position:"fixed",top:N?A.top-j-Ms:A.bottom+Ms,left:Math.max(Ms,A.right-Yc),width:Yc,zIndex:50})};x.useLayoutEffect(()=>{d&&(b(),requestAnimationFrame(b))},[d]),x.useEffect(()=>{if(!d)return;const g=j=>{var N,T;const k=j.target;(N=c.current)!=null&&N.contains(k)||(T=u.current)!=null&&T.contains(k)||m(!1)},A=()=>b();return document.addEventListener("mousedown",g),window.addEventListener("resize",A),window.addEventListener("scroll",A,!0),()=>{document.removeEventListener("mousedown",g),window.removeEventListener("resize",A),window.removeEventListener("scroll",A,!0)}},[d]);const C=async()=>{const g=ur(e);f(!0);try{await Em(e.bankAccountDetailId,{status:M8(e)}),await i.invalidateQueries({queryKey:["bank-accounts",t]}),m(!1),o(g?"Bank Account Deactivated Successfully":"Bank Account Activated Successfully")}catch(A){l("Action Not Completed",nt(A,"Cannot deactivate this bank account because it is linked to a payment that has not been accepted yet."))}finally{f(!1)}};return r.jsxs("div",{className:"inline-block text-left",children:[r.jsx("button",{ref:c,type:"button",disabled:h,"aria-label":s==="kebab"?"Bank account actions":void 0,"aria-haspopup":"menu","aria-expanded":d,onClick:()=>m(g=>!g),className:s==="kebab"?"inline-flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-100 hover:text-slate-600 disabled:cursor-not-allowed disabled:opacity-60":"inline-flex items-center gap-1.5 rounded-lg bg-gov-700 px-3 py-1.5 text-xs font-semibold text-white hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:s==="kebab"?r.jsx(dx,{}):r.jsxs(r.Fragment,{children:["Actions",r.jsx(mx,{})]})}),d?ft.createPortal(r.jsxs("div",{ref:u,role:"menu",style:y,className:"overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-lg",children:[r.jsx("button",{type:"button",onClick:()=>{m(!1),n(e)},className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50",children:"Edit"}),r.jsx("button",{type:"button",disabled:h,onClick:()=>void C(),className:"block w-full px-4 py-2 text-left text-sm text-slate-700 hover:bg-slate-50 disabled:opacity-60",children:D8(e)})]}),a):null]})}function dx(){return r.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[r.jsx("circle",{cx:"12",cy:"5",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"12",r:"1.6"}),r.jsx("circle",{cx:"12",cy:"19",r:"1.6"})]})}function mx(){return r.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})}function x1({account:e,onEdit:t,onSelect:n,selected:s=!1}){const a=ur(e),i=r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500",children:r.jsx(oa,{})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm font-semibold text-slate-900",children:e.bankName}),r.jsxs("span",{className:"mt-0.5 flex items-center gap-2",children:[r.jsx("span",{className:"text-xs text-slate-500",children:ua(e.accountNumber)}),r.jsx(Yo,{active:a})]}),r.jsx("span",{className:"mt-0.5 block truncate text-xs text-slate-400",children:e.accountType})]})]});return r.jsxs("div",{className:`relative flex items-start gap-2 rounded-xl border p-4 transition ${s||e.isPrimary?"border-gov-500 bg-gov-50/30 ring-1 ring-gov-200":"border-slate-200 bg-white"} ${a&&n?"hover:border-gov-300":""} ${a?"":"opacity-60"}`,children:[e.isPrimary?r.jsx("span",{className:"absolute -top-2.5 right-10 z-10 rounded-full bg-gov-700 px-3 py-0.5 text-[11px] font-medium text-white shadow-sm",children:"Primary"}):null,n?r.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:!a,onClick:()=>n(e.bankAccountDetailId),className:`flex min-w-0 flex-1 items-center gap-3 text-left ${a?"":"cursor-not-allowed"}`,children:i}):r.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:i}),r.jsx(ux,{variant:"kebab",account:e,entityId:e.entityId,onEdit:t})]})}function g1({onAddManually:e,disabled:t=!1}){return r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-sm text-slate-600",children:"Connect Your Bank Account"}),r.jsxs("div",{className:"mt-4 flex flex-wrap gap-4",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("span",{className:"absolute -top-2.5 right-3 z-10 inline-flex items-center gap-1 rounded-full border border-slate-200 bg-white px-2 py-0.5 text-[11px] font-semibold text-slate-500",children:[r.jsx(hx,{}),"Coming Soon"]}),r.jsx("button",{type:"button",disabled:!0,"aria-label":"Connect with Plaid — coming soon",className:"flex h-[52px] w-[264px] cursor-not-allowed items-center rounded-lg border border-slate-200 bg-slate-50 px-4 text-sm font-semibold text-slate-400",children:"Connect with Plaid"})]}),r.jsx("button",{type:"button",onClick:e,disabled:t,className:"flex h-[52px] w-[264px] items-center rounded-lg border border-slate-400 bg-gov-50/40 px-4 text-sm font-semibold text-slate-900 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:"Add Manually"})]})]})}function hx(){return r.jsxs("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"12",cy:"12",r:"9"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5V12l3 2"})]})}const fx=hn({bankAccountDetailId:Z().min(1,"Select a bank account")}),px=["Payment Details","Bank Account","Review & Authorize"],xx="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8";function gx({entity:e,paymentDraft:t}){const n=Ae(),s=Ie(),a=tn(s.state,_e()),[i,o]=x.useState(null),[l,c]=x.useState(!1),[u,d]=x.useState(!1),[m,h]=x.useState(!1),[f,y]=x.useState(null),{saveAsDraft:p}=il(e),{data:b=[],isLoading:C}=ue({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>fn(e.entityId),enabled:e!==null}),g=x.useMemo(()=>b.filter(ur),[b]),A=b.length>0,{handleSubmit:j,watch:k,setValue:N,formState:{errors:T}}=$t({resolver:en(fx),defaultValues:{bankAccountDetailId:t.bankAccountDetailId}}),D=k("bankAccountDetailId"),q=g.find(V=>String(V.bankAccountDetailId)===D);x.useEffect(()=>{C||D&&!q&&N("bankAccountDetailId","")},[C,q,D,N]);const $=V=>({...t,bankAccountDetailId:V.bankAccountDetailId,routingNumber:(q==null?void 0:q.routingNumber)??t.routingNumber,accountType:(q==null?void 0:q.accountType)??t.accountType,bankName:(q==null?void 0:q.bankName)??t.bankName}),F=j(V=>{const se=$(V);Va(se),n("/payments/state/authorization",{state:{from:"/payments/state/bank-details",paymentDraft:se}})}),W=j(async V=>{if(e){o(null),c(!0);try{await p($(V))}catch(se){o(nt(se,"Failed to save draft."))}finally{c(!1)}}}),B=()=>{n("/payments/state/new",{state:{from:a,paymentDraft:t}})},ne=()=>{Mr(),n(a)};return r.jsxs("form",{onSubmit:F,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:px,current:2,completed:D?2:1})})]}),i?r.jsx("div",{className:"mb-4",children:r.jsx(Kt,{message:i})}):null,r.jsxs("section",{className:`${xx} min-h-[420px]`,children:[r.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-slate-200 bg-slate-50 text-slate-500",children:r.jsx(oa,{})}),r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Bank Details"})]}),A?r.jsxs("button",{type:"button",onClick:()=>d(!0),disabled:!e,className:"inline-flex h-10 items-center gap-2 rounded-lg border border-gov-300 bg-white px-4 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:cursor-not-allowed disabled:opacity-50",children:[r.jsx(oa,{}),"Add Bank"]}):null]}),A?r.jsxs(r.Fragment,{children:[r.jsx("div",{role:"radiogroup","aria-label":"Bank account to debit",className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:b.map(V=>r.jsx(x1,{account:V,selected:String(V.bankAccountDetailId)===D,onSelect:se=>N("bankAccountDetailId",String(se),{shouldValidate:!0}),onEdit:y},V.bankAccountDetailId))}),T.bankAccountDetailId?r.jsx("p",{className:"mt-3 text-xs text-red-600",children:T.bankAccountDetailId.message}):null]}):r.jsx("div",{className:"mt-6",children:r.jsx(g1,{onAddManually:()=>h(!0),disabled:!e})})]}),r.jsx(Xo,{open:u,onClose:()=>d(!1),onAddManually:()=>{d(!1),h(!0)}}),r.jsx(rs,{open:m,entityId:(e==null?void 0:e.entityId)??null,onClose:()=>h(!1),onSaved:V=>N("bankAccountDetailId",String(V),{shouldValidate:!0})}),r.jsx(rs,{open:f!==null,entityId:(e==null?void 0:e.entityId)??null,account:f,onClose:()=>y(null)}),r.jsx(lr,{back:{label:"Back",onClick:B,showArrow:!0},draft:{onSave:W,onDiscard:ne,isSaving:l,disabled:!e},submit:{label:"Next",disabled:!e||!D}})]})}function y1(){const{selectedEntity:e}=vt(),t=Ie(),{paymentDraft:n}=t.state??{},s=n??fa();return s?r.jsx(gx,{entity:e,paymentDraft:s}):r.jsx(Ye,{to:"/payments/state/new",replace:!0})}function yx({entity:e,paymentDraft:t}){var y,p,b;const n=(e==null?void 0:e.entityId)??null,{data:s=[]}=ue({queryKey:["state-payment-states"],queryFn:({signal:C})=>Vo(C)}),{data:a=[]}=ue({queryKey:["state-payment-reasons",n,t.state],queryFn:({signal:C})=>Zo(n,t.state,C),enabled:n!==null&&!!t.state}),{data:i}=ue({queryKey:["state-payment-validation-metadata",n,t.state,t.reasonForPayment],queryFn:({signal:C})=>Uo(n,t.state,t.reasonForPayment,C),enabled:n!==null&&!!(t.state&&t.reasonForPayment)}),{data:o=[]}=ue({queryKey:["bank-accounts",n],queryFn:()=>fn(n),enabled:n!==null}),l=(y=s.find(C=>C.code===t.state))==null?void 0:y.name,c=((p=a.find(C=>C.code===t.reasonForPayment))==null?void 0:p.label)??(i==null?void 0:i.reasonLabel),u=[l??t.state,c].filter(Boolean).join(" "),d=((b=i==null?void 0:i.taxPeriodOptions.find(C=>C.value===t.taxPeriod))==null?void 0:b.label)??t.taxPeriod,m=o.find(C=>String(C.bankAccountDetailId)===t.bankAccountDetailId),h=[(m==null?void 0:m.bankName)??t.bankName,m?`${So.repeat(3)}${m.accountNumber.replace(/\D/g,"").slice(-4)}`:null].filter(Boolean).join(", "),f=[["Jurisdiction",u||"-"],["Tax Period",d||"-"],["Payment amount",Ki(t.taxAmount)],["Settlement Date",t.paymentDate?_o(t.paymentDate):"-"],["Bank Details",h||"-"]];return r.jsxs("aside",{className:"rounded-2xl bg-gov-50/70 p-5",children:[r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Review Payment"}),r.jsx("div",{className:"mt-4 rounded-xl bg-white p-4",children:r.jsx("dl",{className:"divide-y divide-slate-100",children:f.map(([C,g])=>r.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 first:pt-0 last:pb-0",children:[r.jsx("dt",{className:"text-xs text-slate-500",children:C}),r.jsx("dd",{className:"text-right text-sm font-semibold text-slate-900",children:g})]},C))})})]})}const bx="By signing below, you authorize Govpay Payments to initiate this tax payment using the payment details you provided.",vx=["The payment information has been reviewed and is accurate.","You are responsible for ensuring the tax return, payment amount, tax period, and jurisdiction are correct.","Authorizing this payment does not replace any filing requirements. If a tax form is required, it must be submitted separately.","Once submitted, the payment may not be canceled or modified, subject to the receiving tax authority's rules.","This authorization applies only to the payment shown on this page."],Cx="By signing, you confirm that you are authorized to act on behalf of the taxpayer or business listed above.",b1=/^[a-zA-Z\s]+$/;function jx(e){return e.replace(/[^a-zA-Z\s]/g,"")}const ol=Z().min(1,"Signature is required").regex(b1,"Signature must contain only letters").refine(e=>e.trim().length>0,{message:"Signature is required"}),wx=Z().optional().refine(e=>!e||!e.trim()||b1.test(e),{message:"Signature must contain only letters"}),v1="absolute inset-x-0 top-full mt-1 text-xs text-red-600",C1="flex flex-1 flex-col rounded-lg border border-slate-200 bg-[#F9FAFB] px-4 py-6",j1="flex h-16 items-center justify-center";function oi({caption:e,error:t,children:n}){return r.jsxs("div",{className:"relative flex flex-col",children:[r.jsxs("div",{className:C1,children:[r.jsx("div",{className:j1,children:n}),r.jsx("div",{className:"border-t border-slate-400"}),r.jsx("p",{className:"mt-2 text-center text-xs text-slate-500",children:e})]}),r.jsx("p",{className:v1,children:t??""})]})}const li="w-full border-0 bg-transparent text-center text-sm text-slate-700 placeholder:text-slate-400 focus:outline-none";function pa({label:e,required:t=!1,signature:n,title:s,date:a,signerName:i,signerNameCaption:o="Name of authorized person",signerNamePlaceholder:l="Enter name",signatureValue:c,dateValue:u="",dateReadOnly:d=!0,errors:m,signatureCaption:h="Signature of taxpayer"}){const f=!!(c!=null&&c.trim()),{onChange:y,onBlur:p,name:b,ref:C}=n,g=i?"sm:grid-cols-2 lg:grid-cols-[minmax(0,1.2fr)_repeat(3,minmax(0,1fr))]":"lg:grid-cols-[minmax(0,1.4fr)_minmax(0,0.8fr)_minmax(0,0.8fr)]";return r.jsxs("div",{children:[e?r.jsxs("p",{className:"mb-3 text-sm font-medium text-gov-600",children:[e,t?r.jsx("span",{className:"text-red-500",children:" *"}):null]}):null,r.jsxs("div",{className:`grid gap-6 pb-5 ${g}`,children:[r.jsxs("div",{className:"relative flex flex-col",children:[r.jsxs("div",{className:C1,children:[r.jsx("div",{className:j1,children:r.jsx("input",{ref:C,name:b,placeholder:"Sign here",autoComplete:"off",spellCheck:!1,className:`w-full border-0 bg-transparent text-center focus:outline-none ${f?"text-4xl leading-tight tracking-wide text-slate-800":"text-sm text-slate-400 placeholder:text-slate-400"}`,style:f?{fontFamily:"'Great Vibes', 'Segoe Script', cursive"}:void 0,onBlur:p,onChange:A=>{const j=jx(A.target.value);A.target.value=j,y(A)}})}),r.jsx("div",{className:"border-t border-slate-400"}),r.jsx("p",{className:"mt-2 text-center text-xs text-slate-500",children:h})]}),r.jsx("p",{className:v1,children:(m==null?void 0:m.signature)??""})]}),i?r.jsx(oi,{caption:o,error:m==null?void 0:m.signerName,children:r.jsx("input",{placeholder:l,className:li,...i})}):null,r.jsx(oi,{caption:"Title",error:m==null?void 0:m.title,children:r.jsx("input",{placeholder:"Enter title",className:li,...s})}),r.jsx(oi,{caption:"Date",error:m==null?void 0:m.date,children:d?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-center text-sm text-slate-700",children:_o(u)}),r.jsx("input",{type:"hidden",...a})]}):r.jsx("input",{type:"date",className:li,...a})})]})]})}const Nx=hn({agreementDate:Z().min(1,"Date is required"),agreementAccepted:pr().refine(e=>e,{message:"You must accept the authorization agreement"}),authorizationPersonName:ea("Name of authorization person"),signature:ol,title:Z().min(1,"Title is required")}),Sx="w-full rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",Ax=["Payment Details","Bank Account","Review & Authorize"];function kx(e){return{agreementDate:new Date().toISOString().slice(0,10),agreementAccepted:!1,authorizationPersonName:e.authorizedPersonName??"",signature:e.authorizationSignature??"",title:e.authorizedTitle??""}}function Px({entity:e,paymentDraft:t}){var F,W,B,ne;const n=Ae(),s=Ie(),a=pt(),{onPaymentRequired:i}=Wt(),o=tn(s.state,_e()),[l,c]=x.useState(null),[u,d]=x.useState(!1),m=x.useMemo(()=>kx(t),[t]),{register:h,handleSubmit:f,watch:y,formState:{errors:p}}=$t({resolver:en(Nx),defaultValues:m}),b=y("agreementDate"),C=y("agreementAccepted"),g=y("signature"),A=h("signature"),{saveAsDraft:j,upsertPayment:k}=il(e),N=()=>j(t),T=()=>{Mr(),n(o)},D=async()=>{await a.invalidateQueries({queryKey:["remittance-payments"]}),await a.invalidateQueries({queryKey:["dashboard"]}),await a.invalidateQueries({queryKey:["state-payments"]})},q=f(async V=>{if(e){c(null),d(!0);try{const se=await k(t);if(!se)return;await Lm(se.statePaymentDetailId,{authorizedPersonName:V.authorizationPersonName.trim(),authorizedTitle:V.title.trim(),authorizationSignature:V.signature.trim(),authorizationDate:V.agreementDate}),await D(),Mr(),n("/payments")}catch(se){if(se instanceof mn&&se.status===402&&i){const te=se.extensions;i({paymentType:(te==null?void 0:te.paymentType)??"state",paymentId:(te==null?void 0:te.paymentId)??t.statePaymentDetailId??0,expectedAmount:(te==null?void 0:te.expectedAmount)??"0.00",currency:(te==null?void 0:te.currency)??"USD",federalRecordCount:(te==null?void 0:te.federalRecordCount)??0,stateRecordCount:(te==null?void 0:te.stateRecordCount)??0,feePerFederal:(te==null?void 0:te.feePerFederal)??null,feePerState:(te==null?void 0:te.feePerState)??null});return}c(nt(se,"Failed to submit state payment."))}finally{d(!1)}}}),$=f(async()=>{if(e){c(null),d(!0);try{await N()}catch(V){c(nt(V,"Failed to save draft."))}finally{d(!1)}}});return r.jsxs("form",{onSubmit:q,noValidate:!0,className:"w-full",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"State Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:Ax,current:3})})]}),r.jsxs("div",{className:"grid items-start gap-6 lg:grid-cols-[minmax(0,1fr)_390px]",children:[r.jsxs("section",{className:`${Sx} min-h-125`,children:[r.jsx("h3",{className:"text-base font-bold text-slate-900",children:"Authorization Agreement"}),r.jsx("hr",{className:"mt-3 border-slate-200"}),r.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 shrink-0 rounded border-slate-400 text-gov-600 focus:ring-gov-200",...h("agreementAccepted")}),r.jsxs("span",{className:"text-sm leading-relaxed text-slate-600",children:[bx,r.jsx("span",{className:"mt-3 block font-bold text-slate-900",children:"You acknowledge that:"}),r.jsx("ul",{className:"mt-1 list-disc space-y-1 pl-5",children:vx.map(V=>r.jsx("li",{children:V},V))}),r.jsx("span",{className:"mt-3 block",children:Cx})]})]}),p.agreementAccepted?r.jsx("p",{className:"mt-1 text-xs text-red-600",children:p.agreementAccepted.message}):null,r.jsx("div",{className:"mt-6",children:r.jsx(pa,{label:"Taxpayer's Signature",required:!0,signature:A,signatureValue:g,signerName:h("authorizationPersonName"),signerNameCaption:"Name of authorized person",title:h("title"),date:h("agreementDate"),dateValue:b,errors:{signature:(F=p.signature)==null?void 0:F.message,signerName:(W=p.authorizationPersonName)==null?void 0:W.message,title:(B=p.title)==null?void 0:B.message,date:(ne=p.agreementDate)==null?void 0:ne.message}})})]}),r.jsx(yx,{entity:e,paymentDraft:t})]}),l?r.jsx("div",{className:"mt-5",children:r.jsx(Kt,{message:l})}):null,r.jsx(lr,{back:{label:"Back",showArrow:!0,disabled:u,onClick:()=>{Va(t),n("/payments/state/bank-details",{state:{from:o,paymentDraft:t}})}},draft:{onSave:$,onDiscard:T,disabled:u||!e},submit:{label:"Submit Payment",disabled:!e||!C,blocksDraft:!1,isSubmitting:u}})]})}function w1(){const{selectedEntity:e}=vt(),t=Ie(),{paymentDraft:n}=t.state??{},s=n??fa();return s?s.bankAccountDetailId?r.jsx(Px,{entity:e,paymentDraft:s}):r.jsx(Ye,{to:"/payments/state/bank-details",replace:!0,state:{paymentDraft:s}}):r.jsx(Ye,{to:"/payments/state/new",replace:!0})}const ll="/portal/federal-payments/form-8655-authorizations";function Ix(e){return me(ll,{method:"POST",body:e})}function Ex(e){return me(`${ll}/by-enrolment/${e}`)}function Tx(e,t){return me(`${ll}/${e}`,{method:"PATCH",body:t})}async function N1(e){try{return await Ex(e)}catch(t){if(t instanceof mn&&t.status===404)return null;throw t}}const S1=["720","940","941","943","944","945","990-PF","990-T","1041","1042","1120","CT-1"],ci="Other";function Lx(e){return e.trim()}function Fx(e){const t=e.trim();return t!==""&&!S1.includes(t)}const Rx="I understand that this agreement does not relieve me, as the taxpayer, of the responsibility to ensure that all tax returns are filed and that all deposits and payments are made and that I may enroll in the Electronic Federal Tax Payment System (EFTPS) to view deposits and payments made on my behalf.",Mx="I further understand that this agreement does not authorize the reporting agent to sign any tax returns, to otherwise act as a legal representative of the taxpayer, or to represent the taxpayer before the IRS. I also understand that the reporting agent is not responsible for any penalties or interest that may be assessed against the taxpayer. I authorize the reporting agent to complete Form 8655, Reporting Agent Authorization, and to make deposits and payments on my behalf for the tax return(s) indicated above. I also authorize the reporting agent to receive confidential information and to perform acts as specified on Form 2848, Power of Attorney and Declaration of Representative, or Form 8821, Tax Information Authorization, as applicable.";function A1(e,t){var n,s;return{enrollmentId:e,taxpayerName:t.taxpayerName.trim(),tradeName:t.tradeName.trim(),ein:tt(t.ein),address:t.address.trim(),city:t.city.trim(),state:t.state.trim(),zipCode:t.zipCode.trim(),country:t.country.trim(),isSeasonalEmployer:t.isSeasonalEmployer,otherIdentificationNumber:((n=t.otherIdentificationNumber)==null?void 0:n.trim())||null,contactPerson:t.contactPerson.trim(),daytimePhone:t.daytimePhone.trim(),faxNumber:t.faxNumber.trim(),authorizedTaxForm:t.authorizedTaxForm,authorizationStartMonth:((s=t.authorizationMonth)==null?void 0:s.trim())||null,agreementAccepted:t.agreementAccepted,taxpayerSignature:t.signature.trim()||null,taxpayerTitle:t.title.trim(),signatureDate:t.signatureDate}}function Dx(e){const{enrollmentId:t,...n}=A1(0,e);return n}function Ox(e){return{taxpayerName:e.taxpayerName,tradeName:e.tradeName,ein:Ea(e.ein),address:e.address,city:e.city,state:e.state,zipCode:e.zipCode,country:e.country,isSeasonalEmployer:e.isSeasonalEmployer,otherIdentificationNumber:e.otherIdentificationNumber??"",contactPerson:e.contactPerson,daytimePhone:Ln(e.daytimePhone),faxNumber:e.faxNumber,authorizedTaxForm:e.authorizedTaxForm,authorizationMonth:e.authorizationStartMonth??"",agreementAccepted:e.agreementAccepted,signature:e.taxpayerSignature??"",title:e.taxpayerTitle,signatureDate:e.signatureDate}}const zx=hn({taxpayerName:ea("Taxpayer name"),tradeName:Z().optional(),ein:Di("EIN"),address:Z().min(1,"Address is required"),city:Z().min(1,"City is required"),state:Z().min(1,"State is required"),zipCode:Z().min(1,"ZIP code is required"),country:Z().min(1,"Country is required"),isSeasonalEmployer:pr(),otherIdentificationNumber:Z().optional(),contactPerson:Z().optional(),daytimePhone:$s("Daytime telephone number"),faxNumber:Z().default(""),authorizedTaxForm:Z().min(1,"Select a tax form"),authorizationMonth:Z().optional().refine(e=>!e||/^\d{4}\/(0[1-9]|1[0-2])$/.test(e),"Enter the month as YYYY/MM (e.g. 2024/08)"),agreementAccepted:pr().refine(e=>e,{message:"You must accept the authorization agreement"}),signature:ol,title:Z().min(1,"Title is required"),signatureDate:Z().min(1,"Date is required")}),ui="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3";function qx(e,t){const n=new Date().toISOString().slice(0,10);return{taxpayerName:e?hs(e):"",tradeName:(e==null?void 0:e.tradeName)??"",ein:e?Ea(e.idNumber):"",address:[e==null?void 0:e.address1,e==null?void 0:e.address2].filter(Boolean).join(", "),city:(e==null?void 0:e.city)??"",state:(e==null?void 0:e.state)??"",zipCode:(e==null?void 0:e.zipCode)??"",country:(e==null?void 0:e.country)??"United States",isSeasonalEmployer:!1,otherIdentificationNumber:"",contactPerson:"",daytimePhone:e?Ln(e.phoneNumber):"",faxNumber:"",authorizedTaxForm:Lx(t.taxFormType),authorizationMonth:"",agreementAccepted:!1,signature:"",title:"",signatureDate:n}}function Vx({entity:e,paymentDraft:t,initialAuthorization:n=null,readonly:s=!1}){var be,ie,xe,Te,De,Ue,Oe,je,ve,ye,ee,Ce,z,ge;const a=Ae(),i=Ie(),o=pt(),l=tn(i.state,_e()),[c,u]=x.useState(null),[d,m]=x.useState(!1),h=x.useMemo(()=>n?Ox(n):qx(e,t),[e,n,t]),{register:f,handleSubmit:y,watch:p,setValue:b,reset:C,formState:{errors:g}}=$t({resolver:en(zx),defaultValues:h});x.useEffect(()=>{C(h)},[h,C]);const A=p("authorizedTaxForm"),j=Fx(A),k=p("signature"),N=p("signatureDate"),T=p("state"),D=p("country"),q=p("isSeasonalEmployer"),$=Rr(D),F=!0,W=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]})},B=async()=>{if(!e)return null;if(t.federalPaymentId){const he=await Go(t.federalPaymentId,nl(t));return await W(),he}const X=await Qo(tl(e.entityId,t));return sl({...t,federalPaymentId:X.federalPaymentId,enrollmentId:X.enrollmentId}),await W(),X},ne=async(X,he)=>{var Qe;const Je=t.form8655AuthorizationId??((Qe=await N1(X))==null?void 0:Qe.form8655AuthorizationId),Fe=he;return Je?Tx(Je,Dx(Fe)):Ix(A1(X,Fe))},V=async X=>{if(!e)return;const he=await B();if(he)return await ne(he.enrollmentId,X),await o.invalidateQueries({queryKey:["form-8655",he.enrollmentId]}),{...t,entityId:e.entityId,federalPaymentId:he.federalPaymentId,enrollmentId:he.enrollmentId}},se=y(async X=>{if(!(!e||s)){u(null),m(!0);try{const he=await V(X);if(!he)return;a("/payments/federal/review",{state:{from:"/payments/federal/authorization",paymentDraft:he}})}catch(he){u(nt(he,"Failed to save federal payment draft."))}finally{m(!1)}}}),te=()=>{a("/payments/federal/new",{state:{from:l,paymentDraft:t}})},re=()=>{Mn(),a(l)},H=y(async X=>{if(!(!e||s)){u(null),m(!0);try{await V(X),Mn(),a(_e())}catch(he){u(nt(he,"Failed to save draft."))}finally{m(!1)}}});return r.jsxs("form",{onSubmit:se,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"w-full",children:[r.jsxs("div",{className:"mb-4 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!s&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:za,current:2})})]}),r.jsx("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("fieldset",{disabled:s,className:"min-w-0 border-0 p-0",children:[r.jsx(In,{title:"Enrollment Details",isFirst:!0,children:r.jsxs("div",{className:"w-3/4",children:[r.jsxs("div",{className:ui,children:[r.jsx(_,{label:"1a) Name of the Taxpayer",required:!0,info:"The taxpayer's legal name as registered with the IRS.",error:(be=g.taxpayerName)==null?void 0:be.message,children:r.jsx("input",{placeholder:"Enter Name of the Taxpayer",className:le(!!g.taxpayerName),...f("taxpayerName")})}),r.jsx(_,{label:"1b) Trade Name, if any",error:(ie=g.tradeName)==null?void 0:ie.message,children:r.jsx("input",{placeholder:"Enter Trade Name, if any",className:le(!!g.tradeName),...f("tradeName")})}),r.jsx(_,{label:"2. Employer Identification Number (EIN)",required:!0,error:(xe=g.ein)==null?void 0:xe.message,children:r.jsx("input",{placeholder:"Enter EIN",className:le(!!g.ein),...f("ein")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",children:[r.jsx("div",{className:"sm:col-span-2",children:r.jsx(_,{label:"3a) Address (Number, Street, and Room/Suite No)",required:!0,error:(Te=g.address)==null?void 0:Te.message,children:r.jsx("input",{placeholder:"Enter Address",className:le(!!g.address),...f("address")})})}),r.jsx(_,{label:"3b) City or Town",required:!0,error:(De=g.city)==null?void 0:De.message,children:r.jsx("input",{placeholder:"Enter City or Town",className:le(!!g.city),...f("city")})})]}),r.jsxs("div",{className:`mt-5 ${ui}`,children:[r.jsx(_,{label:"3c) State",required:!0,error:(Ue=g.state)==null?void 0:Ue.message,children:r.jsx(Se,{hasError:!!g.state,placeholder:"Select State",value:T,onChange:X=>b("state",X,{shouldValidate:!0}),options:$.map(X=>({value:X.code,label:X.name}))})}),r.jsx(_,{label:"3d) ZIP Code",required:!0,error:(Oe=g.zipCode)==null?void 0:Oe.message,children:r.jsx("input",{placeholder:"Enter ZIP Code",className:le(!!g.zipCode),...f("zipCode")})}),r.jsx(_,{label:"3e) Country",required:!0,error:(je=g.country)==null?void 0:je.message,children:r.jsx(Se,{hasError:!!g.country,placeholder:"Select Country",value:D,onChange:X=>b("country",X,{shouldValidate:!0}),options:Ta.map(X=>({value:X,label:X}))})})]}),r.jsxs("div",{className:`mt-5 ${ui}`,children:[r.jsx(_,{label:"4. Are you a Seasonal Employer",children:r.jsxs("div",{className:"flex items-center gap-6 py-2.5",children:[r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:q===!0,onChange:()=>b("isSeasonalEmployer",!0),className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"Yes"]}),r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:q===!1,onChange:()=>b("isSeasonalEmployer",!1),className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"No"]})]})}),r.jsx(_,{label:"5. Other Identification Number (Optional)",children:r.jsx("input",{placeholder:"Enter Other Identification Number",className:le(!1),...f("otherIdentificationNumber")})}),r.jsx(_,{label:"6. Contact Person",error:(ve=g.contactPerson)==null?void 0:ve.message,children:r.jsx("input",{placeholder:"Enter Contact Person",className:le(!!g.contactPerson),...f("contactPerson")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-2",children:[r.jsx(Fr,{variant:"payment",label:"7. Daytime Telephone Number",required:!0,error:(ye=g.daytimePhone)==null?void 0:ye.message,register:f("daytimePhone")}),r.jsx(_,{label:"7. Fax Number",error:(ee=g.faxNumber)==null?void 0:ee.message,children:r.jsx("input",{placeholder:"Enter Fax Number",className:le(!!g.faxNumber),...f("faxNumber")})})]})]})}),r.jsxs(In,{title:r.jsxs(r.Fragment,{children:["Authorization of Reporting Agent To Make and Deposits and Payments"," ",r.jsx("span",{className:"font-normal",children:"(Caution: See Authorization Agreement.)"})]}),children:[r.jsx("p",{className:"mb-5 text-sm leading-6 text-slate-600",children:"Indicate the tax return(s) for which the reporting agent is authorized to make deposits or payments. Use the 'YYYY/MM' format to enter the month in which the authorization begins (for example, '2024/8' for August 2024)"}),r.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-3 sm:grid-cols-3 lg:grid-cols-6",children:[S1.map(X=>r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:X,checked:A===X,disabled:F,onChange:()=>b("authorizedTaxForm",X,{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),X]},X)),r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:ci,checked:j,disabled:F,onChange:()=>b("authorizedTaxForm",t.taxFormType.trim(),{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),j?`${ci} (${A})`:ci]})]}),g.authorizedTaxForm?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:g.authorizedTaxForm.message}):null]}),r.jsxs("section",{className:"mt-8 border-t border-slate-100 pt-8",children:[r.jsx("h3",{className:"mb-4 text-base font-semibold text-slate-900",children:"Authorization Agreement"}),r.jsxs("div",{className:"border-t border-slate-200 pt-5",children:[r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...f("agreementAccepted")}),r.jsxs("span",{className:"text-sm leading-6 text-slate-700",children:[r.jsx("span",{className:"font-semibold text-slate-900",children:Rx})," ",Mx]})]}),g.agreementAccepted?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:g.agreementAccepted.message}):null]})]}),r.jsx("section",{className:"mt-8 border-t border-slate-100 pt-8",children:r.jsx(pa,{label:"Taxpayer's Signature",required:!0,signature:f("signature"),title:f("title"),date:f("signatureDate"),signatureValue:k,dateValue:N,errors:{signature:(Ce=g.signature)==null?void 0:Ce.message,title:(z=g.title)==null?void 0:z.message,date:(ge=g.signatureDate)==null?void 0:ge.message}})})]})})]}),c?r.jsx(Kt,{message:c}):null,r.jsx(lr,{back:{label:"Back",showArrow:!0,onClick:te,disabled:d},draft:{onSave:H,onDiscard:re,disabled:s||!e},submit:{label:"Review and Submit",disabled:!e||s,isSubmitting:d}})]})}function k1(){const{selectedEntity:e}=vt(),t=Ie(),{paymentDraft:n}=t.state??{},s=n??vs(),{data:a,isLoading:i}=ue({queryKey:["federal-payment",s==null?void 0:s.federalPaymentId],queryFn:()=>Ko(s.federalPaymentId),enabled:(s==null?void 0:s.federalPaymentId)!=null&&s.enrollmentId==null}),o=(s==null?void 0:s.enrollmentId)??(a==null?void 0:a.enrollmentId),{data:l,isLoading:c}=ue({queryKey:["form-8655",o],queryFn:()=>N1(o),enabled:o!=null}),u=x.useMemo(()=>s?{...s,enrollmentId:o??s.enrollmentId,form8655AuthorizationId:s.form8655AuthorizationId??(l==null?void 0:l.form8655AuthorizationId)}:null,[s,o,l]);return s?el(e)?r.jsx(Ye,{to:"/payments/federal/individual-enrollment",replace:!0,state:t.state}):s.federalPaymentId!=null&&s.enrollmentId==null&&i||o!=null&&c?r.jsx("p",{className:"text-sm text-slate-600",children:"Loading authorization form…"}):r.jsx(Vx,{entity:e,paymentDraft:u??s,initialAuthorization:l}):r.jsx(Ye,{to:"/payments/federal/new",replace:!0})}const cl="/portal/federal-payments/form-9783-enrollments";function Zx(e){return me(cl,{method:"POST",body:e})}function Ux(e){return me(`${cl}/by-enrolment/${e}`)}function Bx(e,t){return me(`${cl}/${e}`,{method:"PATCH",body:t})}async function P1(e){try{return await Ux(e)}catch(t){if(t instanceof mn&&t.status===404)return null;throw t}}const Hx="I hereby authorize the contact person listed in item 5 on this form and financial institutions involved in the processing of my Electronic Federal Tax Payment System (EFTPS) payments to receive confidential information necessary to effect enrollment in EFTPS, electronic payment of taxes, answer inquiries and resolve issues related to enrollment and payments. This information includes, but is not limited to, passwords, payment instructions, taxpayer name and identifying number, and payment transaction details. This authorization is to remain in full force and effect until the designated Financial Agents of the U.S. Treasury have received written notification from me of termination in such time and in such manner to afford a reasonable opportunity to act on it.",Yx="By completing the financial institution information in items 9-11 on this form, I authorize designated Financial Agents of the U.S. Treasury to initiate EFTPS debit entries to the financial institution account indicated above, for payment of federal taxes owed to the IRS upon request by Taxpayer or his/her representative, using the Electronic Federal Tax Payment System (EFTPS). I further authorize the financial institution named above to debit such entries to the financial institution account indicated above. All debits initiated by the U.S. Treasury designated Financial Agents pursuant to this authorization shall be made under U.S. Treasury regulations. This authorization is to remain in full force and effect until the designated Financial Agents of the U.S. Treasury have received written notification of termination in such time and in such manner as to afford a reasonable opportunity to act on it.",Wx="If signed by a corporate officer, partner, or fiduciary on behalf of the taxpayer, I certify that I have the authority to have payments made from the taxpayer’s account. If signed by a representative of the taxpayer, I certify that I have the authority to execute this authorization on behalf of the taxpayer (i.e., authority provided by Form 2848, Power of Attorney and Declaration of Representative, or Form 8655, Reporting Agent Authorization for Magnetic Tape/Electronic Filers)",di=new Date().getFullYear(),Kx=[String(di-1),String(di-2),String(di-3)];function I1(e,t){var n,s,a,i;return{enrollmentId:e,primarySsn:tt(t.primarySsn),jointFilerSsn:t.jointFilerSsn?tt(t.jointFilerSsn):null,taxpayerNames:t.taxpayerNames.trim(),primaryAddress:t.primaryAddress.trim(),city:t.city.trim(),state:t.state.trim(),zipCode:t.zipCode.trim(),country:t.country.trim(),internationalAddress:((n=t.internationalAddress)==null?void 0:n.trim())||null,primaryPhone:t.primaryPhone.trim(),primaryContactName:t.primaryContactName.trim(),primaryContactAddress:t.primaryContactAddress.trim(),contactCity:t.contactCity.trim(),contactState:t.contactState.trim(),contactZipCode:t.contactZipCode.trim(),contactCountry:t.contactCountry.trim(),contactPhone:t.contactPhone.trim(),contactInternationalAddress:((s=t.contactInternationalAddress)==null?void 0:s.trim())||null,primaryTaxpayerPin:t.primaryTaxpayerPin.trim()||null,dateOfBirth:t.dateOfBirth||null,priorYearAgi:t.priorYearAgi.trim()?Number(t.priorYearAgi):null,agiTaxYear:t.agiTaxYear.trim()||null,financialPrimarySsn:tt(t.financialPrimarySsn),routingTransitNumber:tt(t.routingTransitNumber),accountNumber:t.accountNumber.trim(),accountType:t.accountType,disclosureAgreementOne:t.disclosureAgreementOne,disclosureAgreementTwo:t.disclosureAgreementTwo,authorityAgreement:t.authorityAgreement,taxpayerSignature:t.taxpayerSignature.trim()||null,taxpayerTitle:t.taxpayerTitle.trim(),taxpayerSignatureDate:t.taxpayerSignatureDate,jointFilerSignature:((a=t.jointFilerSignature)==null?void 0:a.trim())||null,jointFilerTitle:((i=t.jointFilerTitle)==null?void 0:i.trim())||null,jointFilerSignatureDate:t.jointFilerSignatureDate||null}}function Qx(e){const{enrollmentId:t,...n}=I1(0,e);return n}function Gx(e){var n;const t=((n=e.accountType)==null?void 0:n.toLowerCase())==="savings"?"Savings":"Checking";return{primarySsn:e.primarySsn,jointFilerSsn:e.jointFilerSsn??"",taxpayerNames:e.taxpayerNames,primaryAddress:e.primaryAddress,city:e.city,state:e.state,zipCode:e.zipCode,country:e.country,internationalAddress:e.internationalAddress??"",primaryPhone:Ln(e.primaryPhone),primaryContactName:e.primaryContactName,primaryContactAddress:e.primaryContactAddress,contactCity:e.contactCity,contactState:e.contactState,contactZipCode:e.contactZipCode,contactCountry:e.contactCountry,contactPhone:Ln(e.contactPhone),contactInternationalAddress:e.contactInternationalAddress??"",primaryTaxpayerPin:e.primaryTaxpayerPin??"",dateOfBirth:e.dateOfBirth??"",priorYearAgi:e.priorYearAgi!==null&&e.priorYearAgi!==void 0?String(e.priorYearAgi):"",agiTaxYear:e.agiTaxYear??"",financialPrimarySsn:e.financialPrimarySsn,routingTransitNumber:e.routingTransitNumber,accountNumber:e.accountNumber,accountType:t,disclosureAgreementOne:e.disclosureAgreementOne,disclosureAgreementTwo:e.disclosureAgreementTwo,authorityAgreement:e.authorityAgreement,taxpayerSignature:e.taxpayerSignature??"",taxpayerTitle:e.taxpayerTitle,taxpayerSignatureDate:e.taxpayerSignatureDate,jointFilerSignature:e.jointFilerSignature??"",jointFilerTitle:e.jointFilerTitle??"",jointFilerSignatureDate:e.jointFilerSignatureDate??""}}const Jx=hn({primarySsn:Di("Primary SSN"),jointFilerSsn:Rd("Joint filer's SSN"),taxpayerNames:ea("Taxpayer name"),primaryAddress:Z().min(1,"Primary address is required"),city:Z().min(1,"City is required"),state:Z().min(1,"State is required"),zipCode:Z().min(1,"ZIP code is required"),country:Z().min(1,"Country is required"),internationalAddress:Z().optional(),primaryPhone:$s("Primary phone number"),primaryContactName:ea("Primary contact name"),primaryContactAddress:Z().min(1,"Primary contact address is required"),contactCity:Z().min(1,"Contact city is required"),contactState:Z().min(1,"Contact state is required"),contactZipCode:Z().min(1,"Contact ZIP code is required"),contactCountry:Z().min(1,"Contact country is required"),contactPhone:$s("Contact phone number"),contactInternationalAddress:Z().optional(),primaryTaxpayerPin:Z().min(1,"Primary taxpayer PIN is required").regex(/^\d{5}$/,"Primary taxpayer PIN must be exactly 5 digits"),dateOfBirth:Z().min(1,"Date of birth is required").refine(e=>m8(e,E1),{message:"You must be at least 18 years old"}),priorYearAgi:Z().min(1,"Prior year adjusted gross income is required").refine(e=>!Number.isNaN(Number(e))&&Number(e)>=0,{message:"Enter a valid amount"}),agiTaxYear:Z().min(1,"Prior tax year is required"),financialPrimarySsn:Di("Primary SSN"),routingTransitNumber:Z().min(1,"Routing transit number is required"),accountNumber:Z().min(1,"Account number is required"),accountType:jd([Qa("Checking"),Qa("Savings"),Qa("")]).refine(e=>e==="Checking"||e==="Savings",{message:"Account type is required"}),disclosureAgreementOne:pr().refine(e=>e,{message:"You must accept the disclosure authorization agreement"}),disclosureAgreementTwo:pr().refine(e=>e,{message:"You must accept the disclosure authorization agreement"}),authorityAgreement:pr().refine(e=>e,{message:"You must accept the authority agreement"}),taxpayerSignature:ol,taxpayerTitle:Z().min(1,"Title is required"),taxpayerSignatureDate:Z().min(1,"Date is required"),jointFilerSignature:wx,jointFilerTitle:Z().optional(),jointFilerSignatureDate:Z().optional()}),Zn="grid gap-x-6 gap-y-5 sm:grid-cols-2 xl:grid-cols-3",Xx="grid gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-4",_x=5,E1=18;function T1(e){return e?e.toLowerCase()==="savings"?"Savings":"Checking":""}function L1(e,t){return{financialPrimarySsn:(e==null?void 0:e.idNumber)??"",routingTransitNumber:t.routingNumber??"",accountNumber:t.accountNumber??"",accountType:T1(t.accountType)}}function $x(e,t){const n=new Date().toISOString().slice(0,10),s=e?hs(e):"";return{primarySsn:(e==null?void 0:e.idNumber)??"",jointFilerSsn:"",taxpayerNames:s,primaryAddress:(e==null?void 0:e.address1)??"",city:(e==null?void 0:e.city)??"",state:(e==null?void 0:e.state)??"",zipCode:(e==null?void 0:e.zipCode)??"",country:(e==null?void 0:e.country)??"United States",internationalAddress:"",primaryPhone:e?Ln(e.phoneNumber):"",primaryContactName:"",primaryContactAddress:"",contactCity:"",contactState:"",contactZipCode:"",contactCountry:"",contactPhone:"",contactInternationalAddress:"",...L1(e,t),primaryTaxpayerPin:"",dateOfBirth:"",priorYearAgi:"",agiTaxYear:"",disclosureAgreementOne:!1,disclosureAgreementTwo:!1,authorityAgreement:!1,taxpayerSignature:"",taxpayerTitle:"",taxpayerSignatureDate:n,jointFilerSignature:"",jointFilerTitle:"",jointFilerSignatureDate:n}}function eg({entity:e,paymentDraft:t,initialEnrollment:n=null,readonly:s=!1}){var ge,X,he,Je,Fe,Qe,ct,Et,Ct,jt,ut,Re,Tt,Lt,$e,Ft,wt,w,P,v,E,M,Y,U,G;const a=Ae(),i=Ie(),o=pt(),l=tn(i.state,_e()),[c,u]=x.useState(null),[d,m]=x.useState(!1),[h,f]=x.useState(!1),{data:y=[]}=ue({queryKey:["bank-accounts",e==null?void 0:e.entityId],queryFn:()=>fn(e.entityId),enabled:(e==null?void 0:e.entityId)!=null}),p=x.useMemo(()=>{if(n)return Gx(n);const R=y.find(ke=>String(ke.bankAccountDetailId)===t.bankAccountDetailId),Q=L1(e,t);return{...$x(e,t),financialPrimarySsn:Q.financialPrimarySsn,routingTransitNumber:Q.routingTransitNumber||(R==null?void 0:R.routingNumber)||"",accountNumber:Q.accountNumber||(R==null?void 0:R.accountNumber)||"",accountType:T1(t.accountType||(R==null?void 0:R.accountType))}},[e,n,t,y]),{register:b,handleSubmit:C,watch:g,setValue:A,reset:j,control:k,formState:{errors:N}}=$t({resolver:en(Jx),defaultValues:p});x.useEffect(()=>{j(p)},[p,j]);const T=g("taxpayerSignature"),D=g("jointFilerSignature"),q=g("taxpayerSignatureDate"),$=g("jointFilerSignatureDate"),F=g("accountType"),W=g("taxpayerNames"),B=g("primaryAddress"),ne=g("city"),V=g("state"),se=g("zipCode"),te=g("country"),re=g("primaryPhone"),H=g("internationalAddress"),be=Rr(te),ie=!0,xe=x.useMemo(()=>d8(E1),[]),Te=()=>{A("primaryContactName",W,{shouldValidate:!0}),A("primaryContactAddress",B,{shouldValidate:!0}),A("contactCity",ne,{shouldValidate:!0}),A("contactState",V,{shouldValidate:!0}),A("contactZipCode",se,{shouldValidate:!0}),A("contactCountry",te,{shouldValidate:!0}),A("contactPhone",re,{shouldValidate:!0}),A("contactInternationalAddress",H??"",{shouldValidate:!0})},De=()=>{A("primaryContactName","",{shouldValidate:!0}),A("primaryContactAddress","",{shouldValidate:!0}),A("contactCity","",{shouldValidate:!0}),A("contactState","",{shouldValidate:!0}),A("contactZipCode","",{shouldValidate:!0}),A("contactCountry","",{shouldValidate:!0}),A("contactPhone","",{shouldValidate:!0}),A("contactInternationalAddress","",{shouldValidate:!0})};x.useEffect(()=>{h&&Te()},[h,W,B,ne,V,se,te,re,H]);const Ue=async()=>{await o.invalidateQueries({queryKey:["dashboard"]}),await o.invalidateQueries({queryKey:["federal-payments"]}),await o.invalidateQueries({queryKey:["remittance-payments"]})},Oe=async()=>{if(!e)return null;if(t.federalPaymentId){const Q=await Go(t.federalPaymentId,nl(t));return await Ue(),Q}const R=await Qo(tl(e.entityId,t));return sl({...t,federalPaymentId:R.federalPaymentId,enrollmentId:R.enrollmentId}),await Ue(),R},je=async(R,Q)=>{var xt;const ke=t.form9783EnrollmentId??((xt=await P1(R))==null?void 0:xt.form9783EnrollmentId);return ke?Bx(ke,Qx(Q)):Zx(I1(R,Q))},ve=async R=>{if(!e)return;const Q=await Oe();if(Q)return await je(Q.enrollmentId,R),await o.invalidateQueries({queryKey:["form-9783",Q.enrollmentId]}),{...t,entityId:e.entityId,federalPaymentId:Q.federalPaymentId,enrollmentId:Q.enrollmentId}},ye=C(async R=>{if(!(!e||s)){u(null),m(!0);try{const Q=await ve(R);if(!Q)return;a("/payments/federal/review",{state:{from:"/payments/federal/individual-enrollment",paymentDraft:Q}})}catch(Q){u(nt(Q,"Failed to save federal payment draft."))}finally{m(!1)}}}),ee=()=>{a("/payments/federal/new",{state:{from:l,paymentDraft:t}})},Ce=()=>{Mn(),a(l)},z=C(async R=>{if(!(!e||s)){u(null),m(!0);try{await ve(R),Mn(),a(_e())}catch(Q){u(nt(Q,"Failed to save draft."))}finally{m(!1)}}});return r.jsxs("form",{onSubmit:ye,noValidate:!0,className:"w-full space-y-6",children:[r.jsxs("div",{className:"w-full",children:[r.jsxs("div",{className:"mb-4 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),!s&&r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:za,current:2})})]}),r.jsx("div",{className:"rounded-2xl border border-slate-200 bg-white p-6 shadow-sm lg:p-8",children:r.jsxs("fieldset",{disabled:s,className:"min-w-0 border-0 p-0",children:[r.jsxs(In,{title:"1. Taxpayer Information",isFirst:!0,children:[r.jsxs("div",{className:Zn,children:[r.jsx(_,{label:"1a) Primary SSN",required:!0,info:"The primary taxpayer's Social Security Number.",error:(ge=N.primarySsn)==null?void 0:ge.message,children:r.jsx("input",{placeholder:"Enter Primary SSN",className:le(!!N.primarySsn),...b("primarySsn")})}),r.jsx(_,{label:"b) Joint Filer's Taxpayer ID No (SSN)",children:r.jsx("input",{placeholder:"Enter Joint Filer's Taxpayer ID No",className:le(!1),...b("jointFilerSsn")})}),r.jsx(_,{label:"2. Taxpayer(s) Name(s)",required:!0,error:(X=N.taxpayerNames)==null?void 0:X.message,children:r.jsx("input",{placeholder:"Enter Taxpayer(s) Name(s)",className:le(!!N.taxpayerNames),...b("taxpayerNames")})})]}),r.jsxs("div",{className:`mt-5 ${Zn}`,children:[r.jsx("div",{className:"sm:col-span-2 xl:col-span-2",children:r.jsx(_,{label:"3a) Primary Address (Number, Street, and Room/Suite No)",required:!0,error:(he=N.primaryAddress)==null?void 0:he.message,children:r.jsx("input",{placeholder:"Enter Primary Address",className:le(!!N.primaryAddress),...b("primaryAddress")})})}),r.jsx(_,{label:"3b) City or Town",required:!0,error:(Je=N.city)==null?void 0:Je.message,children:r.jsx("input",{placeholder:"Enter City or Town",className:le(!!N.city),...b("city")})})]}),r.jsxs("div",{className:`mt-5 ${Zn}`,children:[r.jsx(_,{label:"3c) State",required:!0,error:(Fe=N.state)==null?void 0:Fe.message,children:r.jsx(Ee,{name:"state",control:k,render:({field:R})=>r.jsx(Se,{hasError:!!N.state,placeholder:"Select State",value:R.value??"",onChange:R.onChange,options:be.map(Q=>({value:Q.code,label:Q.name}))})})}),r.jsx(_,{label:"3d) ZIP Code",required:!0,error:(Qe=N.zipCode)==null?void 0:Qe.message,children:r.jsx("input",{placeholder:"Enter ZIP Code",className:le(!!N.zipCode),...b("zipCode")})}),r.jsx(_,{label:"3e) Country",required:!0,error:(ct=N.country)==null?void 0:ct.message,children:r.jsx(Ee,{name:"country",control:k,render:({field:R})=>r.jsx(Se,{hasError:!!N.country,placeholder:"Select Country",value:R.value??"",onChange:R.onChange,options:Ta.map(Q=>({value:Q,label:Q}))})})})]}),r.jsxs("div",{className:`mt-5 ${Zn}`,children:[r.jsx("div",{className:"sm:col-span-2 xl:col-span-2",children:r.jsx(_,{label:"3. International Address",children:r.jsx("input",{placeholder:"Enter International Address",className:le(!1),...b("internationalAddress")})})}),r.jsx(Fr,{variant:"payment",label:"4. Primary Taxpayer Phone Number",required:!0,error:(Et=N.primaryPhone)==null?void 0:Et.message,register:b("primaryPhone")})]})]}),r.jsxs(In,{title:"2. Contact Information",headerAction:r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"checkbox",checked:h,disabled:s,onChange:R=>{const Q=R.target.checked;f(Q),Q?Te():De()},className:"h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200"}),"Same as Taxpayer Information"]}),children:[r.jsxs("div",{className:Zn,children:[r.jsx(_,{label:"5. Primary contact name",required:!0,error:(Ct=N.primaryContactName)==null?void 0:Ct.message,children:r.jsx("input",{placeholder:"Payer Name",readOnly:h,className:le(!!N.primaryContactName,h),...b("primaryContactName")})}),r.jsx(_,{label:"6a) Primary contact address",required:!0,error:(jt=N.primaryContactAddress)==null?void 0:jt.message,children:r.jsx("input",{placeholder:"Payer Address",readOnly:h,className:le(!!N.primaryContactAddress,h),...b("primaryContactAddress")})}),r.jsx(_,{label:"6b) City or Town",required:!0,error:(ut=N.contactCity)==null?void 0:ut.message,children:r.jsx("input",{placeholder:"City",readOnly:h,className:le(!!N.contactCity,h),...b("contactCity")})})]}),r.jsxs("div",{className:`mt-5 ${Zn}`,children:[r.jsx(_,{label:"6c) State",required:!0,error:(Re=N.contactState)==null?void 0:Re.message,children:r.jsx("input",{placeholder:"Payer State",readOnly:h,className:le(!!N.contactState,h),...b("contactState")})}),r.jsx(_,{label:"6d) ZIP code",required:!0,error:(Tt=N.contactZipCode)==null?void 0:Tt.message,children:r.jsx("input",{placeholder:"ZIP code",readOnly:h,className:le(!!N.contactZipCode,h),...b("contactZipCode")})}),r.jsx(_,{label:"6f) Country",required:!0,error:(Lt=N.contactCountry)==null?void 0:Lt.message,children:r.jsx("input",{placeholder:"Country",readOnly:h,className:le(!!N.contactCountry,h),...b("contactCountry")})})]}),r.jsxs("div",{className:"mt-5 grid gap-x-6 gap-y-5 sm:grid-cols-3",children:[r.jsx(Fr,{variant:"payment",label:"7. Primary taxpayer phone number",required:!0,error:($e=N.contactPhone)==null?void 0:$e.message,readOnly:h,register:b("contactPhone")}),r.jsx("div",{className:"sm:col-span-2",children:r.jsx(_,{label:"8. International address",children:r.jsx("input",{placeholder:"Phone Number (International number)",readOnly:h,className:le(!1,h),...b("contactInternationalAddress")})})})]})]}),r.jsx(In,{title:"Taxpayer Details *",children:r.jsxs("div",{className:Xx,children:[r.jsx(_,{label:"1. Primary Taxpayer Pin",required:!0,error:(Ft=N.primaryTaxpayerPin)==null?void 0:Ft.message,children:r.jsx(Ee,{name:"primaryTaxpayerPin",control:k,render:({field:R})=>r.jsx("input",{placeholder:"Primary Taxpayer Pin",inputMode:"numeric",className:le(!!N.primaryTaxpayerPin),value:R.value,onChange:Q=>R.onChange(Us(Q.target.value,_x)),onBlur:R.onBlur})})}),r.jsx(_,{label:"2. Date of Birth",required:!0,error:(wt=N.dateOfBirth)==null?void 0:wt.message,children:r.jsx("input",{type:"date",max:xe,className:le(!!N.dateOfBirth),...b("dateOfBirth")})}),r.jsx(_,{label:"3. Prior year adjusted gross income",required:!0,error:(w=N.priorYearAgi)==null?void 0:w.message,children:r.jsx("input",{placeholder:"Prior Year Adjusted Gross Income",inputMode:"decimal",className:le(!!N.priorYearAgi),...b("priorYearAgi")})}),r.jsx(_,{label:"4. Prior Tax Year",required:!0,error:(P=N.agiTaxYear)==null?void 0:P.message,children:r.jsx(Ee,{name:"agiTaxYear",control:k,render:({field:R})=>r.jsx(Se,{hasError:!!N.agiTaxYear,placeholder:"Select Tax Year",value:R.value??"",onChange:R.onChange,options:Kx.map(Q=>({value:String(Q),label:String(Q)}))})})})]})}),r.jsxs(In,{title:"3. Social Security Number and Financial Institution Information",children:[r.jsxs("div",{className:Zn,children:[r.jsx(_,{label:"9. Primary SSN",required:!0,error:(v=N.financialPrimarySsn)==null?void 0:v.message,children:r.jsx("input",{placeholder:"Enter number",readOnly:ie,className:le(!!N.financialPrimarySsn,ie),...b("financialPrimarySsn")})}),r.jsx(_,{label:"10. Routing Transit Number (RTN)",required:!0,error:(E=N.routingTransitNumber)==null?void 0:E.message,children:r.jsx("input",{placeholder:"Enter number",readOnly:ie,className:le(!!N.routingTransitNumber,ie),...b("routingTransitNumber")})}),r.jsx(_,{label:"11. Account Number",required:!0,error:(M=N.accountNumber)==null?void 0:M.message,children:r.jsx("input",{placeholder:"Enter",readOnly:ie,className:le(!!N.accountNumber,ie),...b("accountNumber")})})]}),r.jsxs("div",{className:"mt-5",children:[r.jsx("p",{className:"mb-3 text-sm text-slate-600",children:"12. Type of Account"}),r.jsx("div",{className:"flex flex-wrap gap-6",children:["Checking","Savings"].map(R=>r.jsxs("label",{className:"inline-flex items-center gap-2 text-sm text-slate-700",children:[r.jsx("input",{type:"radio",value:R,checked:F===R,disabled:ie,onChange:()=>A("accountType",R,{shouldValidate:!0}),className:"h-4 w-4 border-slate-300 text-gov-600 focus:ring-gov-200 disabled:cursor-default"}),R]},R))}),N.accountType?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:N.accountType.message}):null]})]}),r.jsxs("section",{className:"mt-8 border-t border-slate-100 pt-8",children:[r.jsx("h3",{className:"mb-4 text-base font-semibold text-slate-900",children:"Authorization Agreement"}),r.jsx("p",{className:"mb-5 text-sm text-slate-600",children:"Read the following authorization agreements"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Disclosure Authorization Agreement"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...b("disclosureAgreementOne")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Hx})]}),N.disclosureAgreementOne?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:N.disclosureAgreementOne.message}):null]}),r.jsxs("div",{children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Debit Authorization Agreement"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...b("disclosureAgreementTwo")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Yx})]}),N.disclosureAgreementTwo?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:N.disclosureAgreementTwo.message}):null]}),r.jsxs("div",{className:"border-t border-slate-200 pt-6",children:[r.jsx("p",{className:"mb-3 text-sm font-semibold text-slate-900",children:"Authority to Execute an Authorization"}),r.jsxs("label",{className:"flex items-start gap-3",children:[r.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4 rounded border-slate-300 text-gov-600 focus:ring-gov-200",...b("authorityAgreement")}),r.jsx("span",{className:"text-sm leading-6 text-slate-700",children:Wx})]}),N.authorityAgreement?r.jsx("p",{className:"mt-2 text-xs text-red-600",children:N.authorityAgreement.message}):null]})]})]}),r.jsxs("section",{className:"mt-8 space-y-8 border-t border-slate-100 pt-8",children:[r.jsx(pa,{label:"Taxpayer's Signature",required:!0,signature:b("taxpayerSignature"),title:b("taxpayerTitle"),date:b("taxpayerSignatureDate"),signatureValue:T,dateValue:q,errors:{signature:(Y=N.taxpayerSignature)==null?void 0:Y.message,title:(U=N.taxpayerTitle)==null?void 0:U.message,date:(G=N.taxpayerSignatureDate)==null?void 0:G.message}}),r.jsx(pa,{label:"Joint filer(s) Signature (Optional)",signature:b("jointFilerSignature"),title:b("jointFilerTitle"),date:b("jointFilerSignatureDate"),signatureValue:D??"",dateValue:$??"",signatureCaption:"Signature of joint filer"})]})]})})]}),c?r.jsx(Kt,{message:c}):null,r.jsx(lr,{back:{label:"Back",showArrow:!0,onClick:ee,disabled:d},draft:{onSave:z,onDiscard:Ce,disabled:s||!e},submit:{label:"Review and Submit",disabled:!e||s,isSubmitting:d}})]})}function F1(){const{selectedEntity:e}=vt(),t=Ie(),{paymentDraft:n}=t.state??{},s=n??vs(),{data:a,isLoading:i}=ue({queryKey:["federal-payment",s==null?void 0:s.federalPaymentId],queryFn:()=>Ko(s.federalPaymentId),enabled:(s==null?void 0:s.federalPaymentId)!=null&&s.enrollmentId==null}),o=(s==null?void 0:s.enrollmentId)??(a==null?void 0:a.enrollmentId),{data:l,isLoading:c}=ue({queryKey:["form-9783",o],queryFn:()=>P1(o),enabled:o!=null}),u=x.useMemo(()=>s?{...s,enrollmentId:o??s.enrollmentId,form9783EnrollmentId:s.form9783EnrollmentId??(l==null?void 0:l.form9783EnrollmentId)}:null,[s,o,l]);return s?e&&!el(e)?r.jsx(Ye,{to:"/payments/federal/authorization",replace:!0,state:t.state}):s.federalPaymentId!=null&&s.enrollmentId==null&&i||o!=null&&c?r.jsx("p",{className:"text-sm text-slate-600",children:"Loading enrollment form…"}):r.jsx(eg,{entity:e,paymentDraft:u??s,initialEnrollment:l}):r.jsx(Ye,{to:"/payments/federal/new",replace:!0})}const Mt="—";function tg({entityId:e,paymentDraft:t}){const{data:n=[]}=ue({queryKey:["bank-accounts",e],queryFn:()=>fn(e),enabled:e!==null}),{data:s=[]}=ue({queryKey:["federal-tax-type-codes",t.taxFormType],queryFn:()=>Mm(t.taxFormType),enabled:!!t.taxFormType}),a=n.find(b=>String(b.bankAccountDetailId)===t.bankAccountDetailId),i=(a==null?void 0:a.accountNumber)??t.accountNumber,o=(a==null?void 0:a.routingNumber)??t.routingNumber,l=(a==null?void 0:a.accountType)??t.accountType,c=(a==null?void 0:a.bankName)??t.bankName,u=s.find(b=>b.code===t.taxTypeCode),d=[{label:"Taxpayer PIN",required:!0,info:"The 4-digit PIN assigned by the IRS for EFTPS enrollment.",value:t.taxpayerPin||Mt},{label:"Secondary TIN",info:"An additional Taxpayer Identification Number, if the payment requires one.",value:t.secondaryTin||Mt},{label:"Account Number",required:!0,info:"The bank account debited for this payment.",value:i?ua(i):Mt},{label:"Routing Number",required:!0,info:"The 9-digit bank routing number, auto-filled from the selected bank account.",value:o||Mt},{label:"Account Type",required:!0,info:"The bank account type (checking or savings), auto-filled from the selected bank account.",value:l||Mt},{label:"Bank Name",required:!0,info:"The name of the bank, auto-filled from the selected bank account.",value:c||Mt}],m=[{label:"Tax Form Type",required:!0,info:"The federal tax form this payment applies to (e.g. 941, 944, CT-1).",value:t.taxFormType||Mt},{label:"Payment Type",required:!0,info:"The type of payment for the selected tax form.",value:u?`${u.code} - ${u.codeName}`:t.taxTypeCode||Mt},{label:"Tax Period",required:!0,info:"The tax period (month and year) this payment covers.",value:t.taxPeriod||Mt},{label:"Settlement Date",required:!0,info:"The weekday the payment will be withdrawn and settled with the IRS.",value:t.settlementDate?_o(t.settlementDate):Mt},{label:"Payment Amount",required:!0,info:"The total amount to remit. Must equal the sum of subcategory amounts when applicable.",value:Ki(t.paymentAmount)}],h=qa(t.taxFormType,t.taxTypeCode),y=bs(t.taxFormType,t.taxTypeCode)?[1,2]:[1,2,3],p=[...y.map(b=>({label:`Subcategory Code ${b}`,info:`Subcategory code ${b} for the selected tax form, set automatically.`,value:t[`subcategoryCode${b}`]||Mt})),...y.map(b=>({label:`Subcategory Amount ${b}`,required:!0,info:`The amount allocated to Subcategory Code ${b}.`,value:t[`subcategoryAmount${b}`]?Ki(t[`subcategoryAmount${b}`]):Mt}))];return r.jsxs("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm",children:[r.jsx("div",{className:"border-b border-slate-200 px-6 py-4",children:r.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Payment & Bank Details"})}),r.jsxs("div",{className:"px-6 py-6",children:[r.jsx(Wc,{title:"Enrollment Details",rows:d}),r.jsx(Wc,{title:"Federal Payment",rows:m,className:"mt-8"}),h?r.jsx("div",{className:"mt-8 border-t border-slate-100 pt-8",children:r.jsx(R1,{rows:p})}):null]})]})}function Wc({title:e,rows:t,className:n=""}){return r.jsxs("section",{className:n,children:[r.jsx("h4",{className:"mb-5 text-sm font-semibold text-slate-900",children:e}),r.jsx(R1,{rows:t})]})}function R1({rows:e}){return r.jsx("dl",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2 lg:grid-cols-3",children:e.map(t=>r.jsxs("div",{children:[r.jsx("dt",{children:r.jsx(po,{label:t.label,required:t.required,info:t.info})}),r.jsx("dd",{className:"text-sm text-slate-900",children:t.value})]},t.label))})}function ng({entity:e,paymentDraft:t}){const n=Ae(),s=Ie(),a=pt(),{onPaymentRequired:i}=Wt(),[o,l]=x.useState(null),[c,u]=x.useState(!1),d=tn(s.state,_e()),m=t.federalPaymentId??null,h=async()=>{await a.invalidateQueries({queryKey:["remittance-payments"]}),await a.invalidateQueries({queryKey:["dashboard"]}),await a.invalidateQueries({queryKey:["federal-payments"]})},f=async()=>{if(m===null){l("This payment has not been saved yet. Go back and save the previous step.");return}l(null),u(!0);try{await Dm(m),await h(),Mn(),n("/payments")}catch(y){if(y instanceof mn&&y.status===402&&i){const p=y.extensions;i({paymentType:(p==null?void 0:p.paymentType)??"federal",paymentId:(p==null?void 0:p.paymentId)??m,expectedAmount:(p==null?void 0:p.expectedAmount)??"0.00",currency:(p==null?void 0:p.currency)??"USD",federalRecordCount:(p==null?void 0:p.federalRecordCount)??0,stateRecordCount:(p==null?void 0:p.stateRecordCount)??0,feePerFederal:(p==null?void 0:p.feePerFederal)??null,feePerState:(p==null?void 0:p.feePerState)??null});return}l(nt(y,"Failed to submit this payment. Please try again."))}finally{u(!1)}};return r.jsxs("div",{className:"w-full space-y-6",children:[r.jsxs("div",{className:"mb-6 flex w-full flex-col gap-4 md:flex-row md:items-center",children:[r.jsx("h2",{className:"shrink-0 text-[28px] font-bold leading-tight text-slate-900",children:"Federal Tax Payment"}),r.jsx("div",{className:"flex min-w-0 flex-1 justify-center",children:r.jsx(cr,{steps:za,current:3})})]}),o?r.jsx(Kt,{message:o}):null,r.jsx(tg,{entityId:(e==null?void 0:e.entityId)??null,paymentDraft:t}),r.jsx(lr,{back:{label:"Back",showArrow:!0,onClick:()=>n(d),disabled:c},submit:{label:"Submit Payment",disabled:!e,isSubmitting:c,onClick:f}})]})}function rg(){const{selectedEntity:e}=vt(),t=Ie(),{paymentDraft:n}=t.state??{},s=n??vs();return s?r.jsx(ng,{entity:e,paymentDraft:s}):r.jsx(Ye,{to:"/payments/federal/new",replace:!0})}function sg(){return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-xl font-semibold text-slate-900",children:"Tax Forms"}),r.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"View and download the forms filed for each entity"})]}),r.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-2xl border border-slate-200 bg-white px-6 py-20 text-center shadow-sm",children:[r.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-gov-50 text-gov-600",children:r.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m-7 4h8a2 2 0 0 0 2-2V6.828a2 2 0 0 0-.586-1.414l-2.828-2.828A2 2 0 0 0 13.172 2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2Z"})})}),r.jsx("h2",{className:"text-base font-semibold text-slate-900",children:"Coming Soon"}),r.jsx("p",{className:"max-w-sm text-sm text-slate-500",children:"Tax Forms is still in progress. You'll be able to view and download filed forms here once it's ready."})]})]})}function ag({entityId:e}){const[t,n]=x.useState(!1),[s,a]=x.useState(!1),[i,o]=x.useState(null),[l,c]=x.useState(1),[u,d]=x.useState(Fn);x.useEffect(()=>{c(1)},[e,u]);const{data:m=[],isLoading:h,isError:f,isFetching:y}=ue({queryKey:["bank-accounts",e],queryFn:()=>fn(e),enabled:e!==null}),p=m.length,b=m.slice((l-1)*u,l*u),C=e!==null&&y,g=f?"error":e?h?"loading":p===0?"empty":"ready":"no-entity",A=g==="error"?"Unable to load bank accounts.":g==="no-entity"?"Create an entity to manage bank accounts.":g==="loading"?"Loading bank accounts…":null;return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Bank Accounts"}),g==="ready"?r.jsx("button",{type:"button",onClick:()=>n(!0),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700",children:"Add Bank"}):null]}),r.jsx(Xo,{open:t,onClose:()=>n(!1),onAddManually:()=>{n(!1),a(!0)}}),r.jsx(rs,{open:s,entityId:e,onClose:()=>a(!1)}),r.jsx(rs,{open:i!==null,entityId:e,account:i,onClose:()=>o(null)}),r.jsxs("div",{className:"relative min-h-[120px]",children:[C?r.jsx(Ra,{label:"Loading bank accounts…"}):null,A?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:A}):g==="empty"?r.jsx(g1,{onAddManually:()=>a(!0)}):r.jsx("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3",children:b.map(j=>r.jsx(x1,{account:j,onEdit:o},j.bankAccountDetailId))}),g==="ready"&&p>u?r.jsx(Da,{page:l,pageSize:u,totalCount:p,onPageChange:c,onPageSizeChange:d,disabled:h||y}):null]})]})}function Un({label:e,value:t,icon:n,wide:s=!1}){return r.jsxs("div",{className:`flex items-center gap-3 rounded-xl border border-slate-200 bg-white px-4 py-3.5 ${s?"sm:col-span-2":""}`,children:[r.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-slate-100 text-slate-500",children:r.jsx(og,{icon:n})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-xs text-slate-500",children:e}),r.jsx("p",{className:"mt-0.5 break-words text-sm font-semibold text-slate-900",children:t||"—"})]})]})}function ig({entity:e}){const t=Ae();return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Entity Details"}),e?r.jsxs("button",{type:"button",onClick:()=>t(`/entities/${e.entityId}/edit`,{state:{from:"/settings"}}),className:"inline-flex items-center gap-2 rounded-lg border border-gov-300 bg-white px-4 py-2.5 text-sm font-medium text-gov-700 transition hover:bg-gov-50",children:[r.jsx(lg,{}),"Edit"]}):null]}),e?r.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[r.jsx(Un,{label:"Entity Name",value:hs(e),icon:"entity"}),e.entityType?r.jsx(Un,{label:"Entity Type",value:e.entityType,icon:"type"}):null,r.jsx(Un,{label:"Account Type",value:e.accountType,icon:"account"}),r.jsx(Un,{label:e.accountType==="Individual"?"SSN":"Tax ID",value:tr(e.idNumber,e.accountType),icon:"tax"}),r.jsx(Un,{label:"Email Address",value:e.email,icon:"email"}),r.jsx(Un,{label:"Phone Number",value:ns(e.phoneNumber),icon:"phone"}),r.jsx(Un,{label:"Address",value:qs({address1:e.address1,address2:e.address2??"",city:e.city,state:e.state,zipCode:e.zipCode}),icon:"address",wide:!0})]}):r.jsx("div",{className:"rounded-xl border border-dashed border-slate-200 bg-slate-50/50 px-6 py-16 text-center",children:r.jsx("p",{className:"text-sm text-slate-500",children:"Select an entity to view its details."})})]})}function og({icon:e}){const n={className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.75};return e==="entity"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 21h16.5M4.5 21V6.75A1.5 1.5 0 016 5.25h6a1.5 1.5 0 011.5 1.5V21m0 0V11.25a1.5 1.5 0 011.5-1.5h2.25a1.5 1.5 0 011.5 1.5V21M7.5 8.25h3m-3 3h3m-3 3h3"})}):e==="type"||e==="account"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.075c0 1.313-.937 2.438-2.234 2.632A50.7 50.7 0 0112 21.5c-2.036 0-4.037-.12-6.016-.643A2.625 2.625 0 013.75 18.225V14.15M20.25 14.15A2.625 2.625 0 0021.75 11.7V8.7a2.625 2.625 0 00-2.625-2.625H4.875A2.625 2.625 0 002.25 8.7v3c0 1.09.663 2.03 1.5 2.45M14.25 6.075V4.5A1.5 1.5 0 0012.75 3h-1.5a1.5 1.5 0 00-1.5 1.5v1.575"})}):e==="tax"?r.jsxs("svg",{...n,children:[r.jsx("rect",{x:"2.75",y:"5.25",width:"18.5",height:"13.5",rx:"2"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.5 9.75h4.5M6.5 13h7M16 9.75h1.5"})]}):e==="phone"?r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 002.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 01-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 00-1.091-.852H4.5A2.25 2.25 0 002.25 4.5v2.25z"})}):e==="address"?r.jsxs("svg",{...n,children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 11-6 0 3 3 0 016 0z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1115 0z"})]}):r.jsx("svg",{...n,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75"})})}function lg(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zM19.5 15v4.125A1.875 1.875 0 0117.625 21H4.875A1.875 1.875 0 013 19.125V6.375A1.875 1.875 0 014.875 4.5H9"})})}function cg({activeSection:e,onSectionChange:t,items:n}){return r.jsx("nav",{className:"space-y-2",children:n.map(s=>{const a=e===s.id,i=s.icon;return r.jsxs("button",{type:"button",onClick:()=>t(s.id),className:`flex w-full items-center gap-3 rounded-xl border px-4 py-3.5 text-left transition ${a?"border-gov-200 bg-gov-50 shadow-sm":"border-slate-200 bg-white hover:border-slate-300 hover:bg-slate-50"}`,children:[r.jsx("span",{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-lg ${a?"bg-gov-700 text-white":"bg-slate-100 text-slate-500"}`,children:r.jsx(i,{className:"h-5 w-5"})}),r.jsx("span",{className:`min-w-0 flex-1 text-sm font-semibold ${a?"text-gov-700":"text-slate-700"}`,children:s.title}),r.jsx(ug,{className:`h-4 w-4 shrink-0 ${a?"text-gov-600":"text-slate-300"}`})]},s.id)})})}function ug({className:e}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})})}function dg(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"97",height:"104",viewBox:"0 0 97 104",fill:"none",children:[r.jsx("path",{d:"M45.8724 102.399C69.5702 102.399 88.7823 83.1872 88.7823 59.4047C88.7823 35.6223 69.5702 16.4102 45.8724 16.4102C22.1746 16.4102 2.9624 35.6223 2.9624 59.4047C2.9624 83.1872 22.1746 102.399 45.8724 102.399Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M14.3034 31.5605H75.3253C77.7797 31.5605 79.6417 33.4225 79.6417 35.8769V74.5551C79.6417 77.0096 77.7797 78.8715 75.3253 78.8715H14.3034C11.849 78.8715 9.98706 77.0096 9.98706 74.5551V35.8769C9.98706 33.4225 12.0183 31.5605 14.3034 31.5605Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M75.4946 45.6934H55.69C53.7434 45.6934 51.8814 46.3704 50.4426 47.5553L45.2799 51.7871C43.8411 52.972 41.9791 53.6491 40.0325 53.6491H17.6889C15.4037 53.6491 13.5417 55.511 13.5417 57.7962C13.5417 57.9654 13.5417 58.2193 13.6264 58.3886L17.7735 80.2245C18.112 82.2557 19.8047 83.7791 21.9206 83.7791H69.7394C71.7706 83.7791 73.548 82.3403 73.8865 80.3091L79.6417 50.4329C80.0649 48.1478 78.5414 46.1165 76.2563 45.6934C75.9178 45.6934 75.6639 45.6934 75.4946 45.6934Z",fill:"white"}),r.jsx("path",{d:"M84.3811 39.8542H58.652C56.113 39.8542 53.7432 40.7005 51.7966 42.3086L45.0258 47.8099C43.1638 49.3333 40.7094 50.2643 38.1703 50.2643H9.05588C6.09366 50.2643 3.72388 52.7187 3.72388 55.5963C3.72388 55.8502 3.72388 56.1041 3.80851 56.358L9.14052 84.88C9.56369 87.5883 11.8488 89.5349 14.4725 89.5349H76.7639C79.4722 89.5349 81.6727 87.673 82.0959 84.9646L89.6284 45.9479C90.1362 42.9857 88.1896 40.362 85.2274 39.7695C84.9735 39.8542 84.6349 39.8542 84.3811 39.8542Z",fill:"white",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M34.616 69.3926C36.1394 69.3926 37.4089 68.123 37.4089 66.5996C37.4089 65.0762 36.1394 63.8066 34.616 63.8066C33.0925 63.8066 31.823 65.0762 31.823 66.5996C31.823 68.123 33.0925 69.3926 34.616 69.3926Z",fill:"#467CB7"}),r.jsx("path",{d:"M56.3672 69.3086C57.8906 69.3086 59.1601 68.039 59.1601 66.5156C59.1601 64.9922 57.8906 63.7227 56.3672 63.7227C54.8437 63.7227 53.5742 64.9922 53.5742 66.5156C53.5742 68.1237 54.8437 69.3086 56.3672 69.3086Z",fill:"#467CB7"}),r.jsx("path",{d:"M88.5285 87.5881C88.1899 89.0269 87.6821 90.5503 87.0897 91.8198C85.4816 94.9513 82.9426 97.4057 79.8111 99.0138C76.595 100.622 72.7864 101.299 68.9778 100.453C60.0065 98.5906 54.2513 89.7886 56.1133 80.8173C57.9753 71.846 66.6927 66.0062 75.664 67.9528C78.8801 68.6298 81.6731 70.2379 84.0428 72.4384C88.0207 76.4163 89.7134 82.1714 88.5285 87.5881Z",fill:"#B7CCE3",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M77.6105 82.763H73.802V78.9544C73.802 78.1927 73.2095 77.5156 72.3632 77.5156C71.6015 77.5156 70.9244 78.1081 70.9244 78.9544V82.763H67.1158C66.3541 82.763 65.677 83.3554 65.677 84.2018C65.677 85.0481 66.2695 85.6406 67.1158 85.6406H70.9244V89.4492C70.9244 90.2109 71.5168 90.888 72.3632 90.888C73.1249 90.888 73.802 90.2955 73.802 89.4492V85.6406H77.6105C78.3723 85.6406 79.0493 85.0481 79.0493 84.2018C79.0493 83.3554 78.3723 82.763 77.6105 82.763Z",fill:"white",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M42.0637 49.334C39.0169 43.4095 38.3398 36.3002 40.371 29.8679C42.3177 23.4356 46.9726 17.9344 52.7278 14.8029C54.5051 13.8719 56.5363 13.1102 58.5676 13.0255C60.5988 12.9409 62.7993 13.618 64.1535 15.3107C65.5076 16.8341 65.7616 19.3732 64.6613 21.0659C63.4764 22.6739 61.1066 23.351 59.16 22.8432C56.0285 22.2508 53.4895 19.7963 52.7278 16.8341C51.966 13.8719 52.9817 10.4019 55.3514 8.45525C56.8749 7.10109 58.9908 6.33937 60.9374 5.74692C70.4165 2.95397 80.742 2.61543 90.3903 4.7313",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10","stroke-dasharray":"3.39 3.39"}),r.jsx("path",{d:"M48.1573 72.3535H42.9099V73.623H48.1573V72.3535Z",fill:"#467CB7"}),r.jsx("path",{d:"M95.4683 2.53033C95.3836 3.79985 95.299 4.98474 94.368 5.23865C93.437 5.49255 93.0138 4.6462 92.4214 3.46131C91.829 2.36106 92.1675 1.17617 93.1831 0.922262C94.1141 0.668357 95.6375 1.0069 95.4683 2.53033Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M94.4527 8.62515C94.7066 7.10172 94.9605 6.25537 94.1141 5.83219C93.1832 5.40902 92.5907 6.17073 91.5751 7.18635C90.7287 8.11734 91.2366 9.4715 92.0829 9.89468C93.0985 10.4025 94.1988 9.89468 94.4527 8.62515Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M95.6377 5.83066C95.5531 6.42311 95.1299 6.84628 94.5375 6.93092C94.2836 6.93092 94.0297 6.93092 93.6911 6.93092C92.5062 6.76165 91.5753 5.99993 91.6599 5.23822C91.7445 4.4765 92.8448 4.05333 94.1989 4.2226C94.4528 4.2226 94.7067 4.30723 94.876 4.39187C95.3838 4.56114 95.7224 5.15358 95.6377 5.83066C95.6377 5.83066 95.6377 5.74603 95.6377 5.83066Z",fill:"#F1F3FA"}),r.jsx("path",{d:"M95.6377 5.83066C95.5531 6.42311 95.1299 6.84628 94.5375 6.93092C94.2836 6.93092 94.0297 6.93092 93.6911 6.93092C92.5062 6.76165 91.5753 5.99993 91.6599 5.23822C91.7445 4.4765 92.8448 4.05333 94.1989 4.2226C94.4528 4.2226 94.7067 4.30723 94.876 4.39187C95.3838 4.56114 95.7224 5.15358 95.6377 5.83066ZM95.6377 5.83066C95.6377 5.74603 95.6377 5.83066 95.6377 5.83066Z",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M1.18481 29.6144C1.18481 28.1756 1.18481 26.7368 2.20043 26.3137C3.30069 25.8905 3.89314 26.9061 4.73949 28.3449C5.5012 29.6144 5.16266 30.9686 4.06241 31.3918C3.13142 31.8149 1.18481 31.561 1.18481 29.6144Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M1.77747 22.5051C1.6082 24.2824 1.35429 25.298 2.45455 25.7212C3.5548 26.1444 4.14725 25.2134 5.2475 23.8592C6.09385 22.6744 5.50141 21.1509 4.40115 20.7278C3.3009 20.3046 1.94674 21.0663 1.77747 22.5051Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M0.846436 25.8896C0.846436 25.2126 1.35425 24.7048 1.94669 24.6201C2.2006 24.5355 2.53914 24.5355 2.87768 24.6201C4.23184 24.7048 5.41673 25.4665 5.33209 26.3128C5.24746 27.1592 4.1472 27.7516 2.70841 27.5823C2.4545 27.5823 2.2006 27.4977 1.94669 27.4131C1.26961 27.3284 0.846436 26.6514 0.846436 25.8896Z",fill:"#F1F3FA",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10"}),r.jsx("path",{d:"M6.60156 26.1445C15.4882 26.1445 31.9074 31.3073 32.1613 50.2655",stroke:"#467CB7","stroke-width":"1.6927","stroke-miterlimit":"10","stroke-dasharray":"3.39 3.39"})]})}const mg=["Active","Inactive"],hg="United States",fg=hn({state:Z().min(1,"State is required"),reasonForPayment:Z().min(1,"Reason for payment is required"),stateAccountId:Z().min(1,"State ID is required"),accountId:Z().min(1,"Account ID is required").refine(e=>/^\d{10,12}$/.test(e.trim()),"Account ID must be 10 to 12 digits"),taxYear:Z().min(1,"Tax year is required"),frequency:Z().optional(),status:Z().min(1,"Status is required"),notes:Z().optional()}),Kc={state:"",reasonForPayment:"",accountId:"",stateAccountId:"",taxYear:"",frequency:"",status:"Active",notes:""};function Qc(e){return{state:e.state,reasonForPayment:e.reasonForPayment,accountId:e.accountId,stateAccountId:e.stateAccountId,taxYear:e.taxYear??"",frequency:e.frequency??"",status:e.status,notes:e.notes??""}}const mi=e=>{const t=e==null?void 0:e.trim();return t||null};function pg({open:e,entityId:t,account:n,readOnly:s=!1,onClose:a}){var De,Ue,Oe,je,ve,ye;const{showSuccess:i,showError:o}=ja(),l=pt(),c=n!=null,[u,d]=x.useState(null),[m,h]=x.useState(!1),{register:f,handleSubmit:y,watch:p,reset:b,setValue:C,formState:{errors:g}}=$t({resolver:en(fg),defaultValues:n?Qc(n):Kc});x.useEffect(()=>{e&&(d(null),b(n?Qc(n):Kc))},[e,n,b]);const A=p("state"),j=p("reasonForPayment"),k=p("taxYear"),N=p("frequency"),T=p("status"),D=Rr(hg),{data:q=[],isLoading:$}=ue({queryKey:["state-payment-reasons",t,A],queryFn:()=>Zo(t,A),enabled:e&&t!==null&&A.length>0}),{data:F}=ue({queryKey:["state-payment-validation-metadata",t,A,j],queryFn:()=>Uo(t,A,j),enabled:e&&t!==null&&A.length>0&&j.length>0}),W=(F==null?void 0:F.taxYearOptions)??[],B=(F==null?void 0:F.frequencyMode)??null,ne=(F==null?void 0:F.frequencyOptions)??[],V=B!==null&&B!=="NotApplicable",se=(F==null?void 0:F.stateId.pattern)??null,te=a1(se),re=r1(se),H=ee=>{ee!==A&&(C("state",ee,{shouldValidate:!0}),C("reasonForPayment",""),C("stateAccountId",""),C("taxYear",""),C("frequency",""))},be=ee=>{ee!==j&&(C("reasonForPayment",ee,{shouldValidate:!0}),C("stateAccountId",""),C("taxYear",""),C("frequency",""))},ie=f("stateAccountId"),xe=f("accountId"),Te=y(async ee=>{if(t!==null){d(null),h(!0);try{const Ce={state:ee.state,reasonForPayment:ee.reasonForPayment,stateAccountId:ee.stateAccountId.trim().toUpperCase(),accountId:ee.accountId.trim(),taxYear:mi(ee.taxYear),frequency:mi(ee.frequency),notes:mi(ee.notes)};c?await B8(n.taxAccountDetailId,{...Ce,status:ee.status}):await U8({entityId:t,...Ce,status:ee.status}),await l.invalidateQueries({queryKey:["tax-accounts",t]}),i(c?"Tax Account Updated Successfully":"Tax Account Added Successfully"),a()}catch(Ce){const z=nt(Ce,"Unable to save tax account. Please try again.");d(z),o("Action Not Completed",z)}finally{h(!1)}}});return r.jsx(zm,{open:e,title:s?"View Tax Account":c?"Edit Tax Account":"Add Tax Account",onClose:a,labelledById:"tax-account-drawer-title",footer:s?r.jsx("button",{type:"button",onClick:a,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50",children:"Close"}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:a,disabled:m,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg border border-gov-300 bg-white px-6 text-sm font-medium text-gov-700 transition hover:bg-gov-50 disabled:opacity-60",children:"Cancel"}),r.jsx("button",{type:"button",onClick:()=>void Te(),disabled:m||t===null,className:"inline-flex h-11 min-w-27.5 items-center justify-center rounded-lg bg-gov-700 px-6 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:m?"Saving…":c?"Save":"Add"})]}),children:r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(_,{label:"State",required:!0,info:"The tax jurisdiction this account is registered in.",error:(De=g.state)==null?void 0:De.message,children:r.jsx(Se,{disabled:s,hasError:!!g.state,placeholder:"Select State",value:A,onChange:H,options:D.map(ee=>({value:ee.code,label:ee.name}))})}),r.jsx(_,{label:"Reason for Payment",required:!0,info:"The reason for this state tax payment, filtered by the selected state and entity.",error:(Ue=g.reasonForPayment)==null?void 0:Ue.message,children:r.jsx(Se,{disabled:s||!A||$,hasError:!!g.reasonForPayment,loading:$,loadingLabel:"Loading reasons…",placeholder:"Select Reason for Payment",value:j,onChange:be,options:q.map(ee=>({value:ee.label,label:ee.label}))})})]}),r.jsxs("div",{className:"rounded-xl border border-slate-200 p-5",children:[r.jsx("h4",{className:"mb-4 text-sm font-semibold text-slate-900",children:"Account Information"}),r.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[r.jsx(_,{label:"State Tax ID",required:!0,info:"Your state-issued tax account identifier for the selected state.",error:(Oe=g.stateAccountId)==null?void 0:Oe.message,children:r.jsx("input",{disabled:s,placeholder:(F==null?void 0:F.stateId.example)??"Enter State Tax ID",maxLength:te,className:le(!!g.stateAccountId,s),...ie,onChange:ee=>{ee.target.value=re?s1(ee.target.value,re):n1(ee.target.value,se),ie.onChange(ee)}})}),r.jsx(_,{label:"Account ID",required:!0,info:"Your 10 to 12 digit state tax account number.",error:(je=g.accountId)==null?void 0:je.message,children:r.jsx("input",{disabled:s,inputMode:"numeric",placeholder:"Enter Account ID",maxLength:12,className:le(!!g.accountId,s),...xe,onChange:ee=>{ee.target.value=ee.target.value.replace(/\D/g,"").slice(0,12),xe.onChange(ee)}})}),r.jsx(_,{label:"Tax Year",required:!0,info:"The tax year this account applies to.",error:(ve=g.taxYear)==null?void 0:ve.message,children:r.jsx(Se,{disabled:s||!j,hasError:!!g.taxYear,placeholder:j?"Select Tax Year":"Select a reason first",value:k,onChange:ee=>C("taxYear",ee,{shouldValidate:!0}),options:W.map(ee=>({value:String(ee),label:`TY ${ee}`}))})}),V?r.jsxs(_,{label:"Frequency",info:"How often this account's payments are deposited.",children:[r.jsx(Se,{disabled:s||!j,placeholder:j?"Select Frequency":"Select a reason first",value:N??"",onChange:ee=>C("frequency",ee,{shouldValidate:!0}),options:ne.map(ee=>({value:ee.code,label:ee.label}))}),c&&(n==null?void 0:n.frequencyValid)===!1?r.jsx("p",{className:"mt-1.5 text-xs text-amber-700",children:n.frequencyValidationMessage??"Please confirm the deposit frequency for this state tax account."}):null]}):null]})]}),r.jsx(Se,{id:"tax-account-status",label:"Status",required:!0,disabled:s,error:(ye=g.status)==null?void 0:ye.message,placeholder:"Select Status",value:T,onChange:ee=>C("status",ee,{shouldValidate:!0}),options:mg.map(ee=>({value:ee,label:ee}))}),r.jsxs("div",{children:[r.jsx(ms,{label:"Notes",htmlFor:"tax-account-notes"}),r.jsx("textarea",{id:"tax-account-notes",rows:4,disabled:s,placeholder:"Enter Notes",className:"block w-full resize-y rounded-lg border border-slate-200 bg-white px-3 py-2.5 text-sm text-slate-900 placeholder:text-slate-400 focus:border-gov-400 focus:outline-none focus:ring-2 focus:ring-gov-200 disabled:cursor-default disabled:bg-slate-50 disabled:text-slate-500",...f("notes")})]}),u?r.jsx(Kt,{message:u}):null]})})}const xg={Monthly:"Monthly",Quarterly:"Quarterly","Semi-annually":"SemiAnnually",Annually:"Annually"},gg=Object.fromEntries(Object.entries(xg).map(([e,t])=>[t,e])),yg={ANNUAL:"Annual",MONTHLY:"Monthly",QUARTERLY:"Quarterly",SEMI_ANNUAL:"Semi-annual",WEEKLY:"Weekly",SEMI_WEEKLY:"Semi-weekly",SEMI_MONTHLY:"Semi-monthly",EARLY:"Early",ACCELERATED:"Accelerated",DEPOSITORY:"Depository",NEXT_BANKING_DAY:"Next banking day"};function bg(e){return e?gg[e]??yg[e]??e:null}const M1="—";function vg(e){return e.status.trim().toLowerCase()==="active"}function Cg(e){return bg(e)??M1}function jg(e){const t=new Map;for(const n of e){const s=n.state||"Other",a=t.get(s);a?a.push(n):t.set(s,[n])}return[...t.entries()].map(([n,s])=>({state:n,accounts:s}))}function wg({entityId:e}){const[t,n]=x.useState(1),[s,a]=x.useState(Fn),[i,o]=x.useState({}),[l,c]=x.useState(null);x.useEffect(()=>{n(1)},[e,s]);const{data:u,isLoading:d,isError:m}=ue({queryKey:["tax-accounts",e,t,s],queryFn:()=>e1({entityId:e,pageNumber:t,pageSize:s}),enabled:e!==null}),h=x.useMemo(()=>(u==null?void 0:u.items)??[],[u]),f=(u==null?void 0:u.totalCount)??0,y=x.useMemo(()=>jg(h),[h]),p=m?"Unable to load tax accounts.":e?d?"Loading tax accounts…":null:"Create an entity to manage tax accounts.",b=p===null&&h.length===0,C=g=>{o(A=>({...A,[g]:!A[g]}))};return r.jsxs("div",{children:[r.jsxs("div",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[r.jsx("h2",{className:"text-lg font-bold text-slate-900",children:"Tax Accounts"}),r.jsx("button",{type:"button",disabled:!e,onClick:()=>c({mode:"create"}),className:"inline-flex items-center gap-2 rounded-lg bg-gov-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-gov-700 disabled:cursor-not-allowed disabled:opacity-60",children:"Add Tax Account"})]}),p?r.jsx("p",{className:"py-12 text-center text-sm text-slate-500",children:p}):b?r.jsxs("div",{className:"flex flex-col items-center justify-center py-24",children:[r.jsx(dg,{}),r.jsx("p",{className:"mt-4 text-base text-slate-700",children:"No Tax Accounts Yet"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"mb-4 text-sm text-slate-700",children:["State Tax Accounts (",y.length,")"]}),r.jsx("div",{className:"space-y-4",children:y.map(g=>{const A=i[g.state]===!0;return r.jsxs("div",{className:"overflow-hidden rounded-xl border border-slate-200",children:[r.jsxs("button",{type:"button","aria-expanded":!A,onClick:()=>C(g.state),className:"flex w-full items-center justify-between gap-3 bg-slate-50/70 px-4 py-3.5 text-left transition hover:bg-slate-100/70",children:[r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Ng,{expanded:!A}),r.jsx("span",{className:"text-base font-bold text-slate-900",children:g.state})]}),r.jsxs("span",{className:"text-sm text-slate-500",children:[g.accounts.length," ",g.accounts.length===1?"Account":"Accounts"]})]}),A?null:r.jsx("div",{className:"overflow-x-auto border-t border-slate-200",children:r.jsxs("table",{className:"w-full min-w-190 text-left text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-slate-200 text-xs font-semibold text-slate-700",children:[r.jsx("th",{className:"px-5 py-3",children:"Reason for Payment"}),r.jsx("th",{className:"px-5 py-3",children:"Account ID"}),r.jsx("th",{className:"px-5 py-3",children:"State Tax ID"}),r.jsx("th",{className:"px-5 py-3",children:"Tax Year"}),r.jsx("th",{className:"px-5 py-3",children:"Frequency"}),r.jsx("th",{className:"px-5 py-3",children:"Status"}),r.jsx("th",{className:"px-5 py-3",children:"Action"})]})}),r.jsx("tbody",{children:g.accounts.map(j=>{var k,N;return r.jsxs("tr",{className:"border-b border-slate-100 last:border-0",children:[r.jsx("td",{className:"px-5 py-4 text-slate-700",children:j.reasonForPayment}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:j.accountId}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:j.stateAccountId}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:j.taxYear??M1}),r.jsx("td",{className:"px-5 py-4 text-slate-700",children:r.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[Cg(j.frequency),j.frequencyValid?null:r.jsx("span",{title:j.frequencyValidationMessage??"Please confirm the deposit frequency for this state tax account.",children:r.jsx(Sg,{})})]})}),r.jsx("td",{className:"px-5 py-4",children:r.jsx(Yo,{active:vg(j),variant:"outline"})}),r.jsx("td",{className:"px-5 py-4",children:r.jsxs("div",{className:"flex items-center justify-end gap-2",children:[r.jsx("span",{title:((k=j.notes)==null?void 0:k.trim())||"No notes added",className:`rounded-md p-1 ${(N=j.notes)!=null&&N.trim()?"text-slate-400":"text-slate-300"}`,children:r.jsx(Pg,{})}),r.jsx("button",{type:"button","aria-label":`View ${g.state} tax account`,onClick:()=>c({mode:"view",account:j}),className:"rounded-md p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(kg,{})}),r.jsx("button",{type:"button","aria-label":`Edit ${g.state} tax account`,onClick:()=>c({mode:"edit",account:j}),className:"rounded-md p-1 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600",children:r.jsx(Ag,{})})]})})]},j.taxAccountDetailId)})})]})})]},g.state)})}),f>s?r.jsx(Da,{page:t,pageSize:s,totalCount:f,onPageChange:n,onPageSizeChange:a,disabled:d}):null]}),r.jsx(pg,{open:l!==null,entityId:e,account:(l==null?void 0:l.mode)==="edit"||(l==null?void 0:l.mode)==="view"?l.account:null,readOnly:(l==null?void 0:l.mode)==="view",onClose:()=>c(null)})]})}function Ng({expanded:e}){return r.jsx("svg",{className:`h-4 w-4 shrink-0 text-slate-500 transition ${e?"":"-rotate-90"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function Sg(){return r.jsx("svg",{className:"h-4 w-4 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}function Ag(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931z"})})}function kg(){return r.jsxs("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:[r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}function Pg(){return r.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}const Ig=[{id:"bank-accounts",title:"Bank Accounts",subtitle:"Connected bank accounts",icon:Eg},{id:"tax-accounts",title:"Tax Accounts",subtitle:"IRS & state tax accounts",icon:Tg},{id:"entity-details",title:"Entity Details",subtitle:"Your account details",icon:Lg}];function Eg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})})}function Tg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 21h18M12 3l9 4.5v1.5H3V7.5L12 3z"})})}function Lg({className:e,...t}){return r.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.75",...t,children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}const Gc="rounded-2xl border border-slate-200 bg-white shadow-sm";function Fg(e){return e==="bank-accounts"||e==="tax-accounts"||e==="entity-details"}function ul(){const{selectedEntity:e}=vt(),n=Ie().state,[s,a]=x.useState(Fg(n==null?void 0:n.section)?n.section:"bank-accounts");return r.jsxs("div",{className:"grid items-start gap-5 lg:grid-cols-[300px_minmax(0,1fr)]",children:[r.jsx("div",{className:`${Gc} p-3`,children:r.jsx(cg,{items:Ig,activeSection:s,onSectionChange:a})}),r.jsx("div",{className:`${Gc} p-6 lg:p-8`,children:s==="bank-accounts"?r.jsx(ag,{entityId:(e==null?void 0:e.entityId)??null}):s==="tax-accounts"?r.jsx(wg,{entityId:(e==null?void 0:e.entityId)??null}):r.jsx(ig,{entity:e})})]})}function Rg({paymentsMode:e="all"}){return r.jsxs(to,{children:[r.jsx(oe,{index:!0,element:r.jsx(mo,{})}),r.jsx(oe,{path:"create-entity",element:r.jsx(fo,{})}),r.jsx(oe,{path:"create-entity/form",element:r.jsx(Oo,{})}),r.jsx(oe,{path:"entities/:entityId/edit",element:r.jsx(zo,{})}),r.jsxs(oe,{element:r.jsx(ho,{}),children:[r.jsx(oe,{path:"entities",element:r.jsx(Wo,{})}),r.jsx(oe,{path:"dashboard",element:r.jsx(Bo,{})}),r.jsx(oe,{path:"payments",element:r.jsx(Jo,{paymentsMode:e})}),r.jsx(oe,{path:"payments/federal/new",element:r.jsx(Jm,{})}),r.jsx(oe,{path:"payments/federal/:federalPaymentId/edit",element:r.jsx(_m,{})}),r.jsx(oe,{path:"payments/federal/:federalPaymentId/view",element:r.jsx($m,{})}),r.jsx(oe,{path:"payments/state/new",element:r.jsx(h1,{})}),r.jsx(oe,{path:"payments/state/:statePaymentId/edit",element:r.jsx(f1,{})}),r.jsx(oe,{path:"payments/state/:statePaymentId/view",element:r.jsx(p1,{})}),r.jsx(oe,{path:"payments/state/bank-details",element:r.jsx(y1,{})}),r.jsx(oe,{path:"payments/state/authorization",element:r.jsx(w1,{})}),r.jsx(oe,{path:"payments/federal/authorization",element:r.jsx(k1,{})}),r.jsx(oe,{path:"payments/federal/individual-enrollment",element:r.jsx(F1,{})}),r.jsx(oe,{path:"payments/federal/review",element:r.jsx(rg,{})}),r.jsx(oe,{path:"tax-forms",element:r.jsx(sg,{})}),r.jsx(oe,{path:"settings",element:r.jsx(ul,{})})]}),r.jsx(oe,{path:"*",element:r.jsx(Ye,{to:"/",replace:!0})})]})}const Gi="tax-remittance:payment-complete",Mg=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent(Gi,{detail:{paymentId:i}}))}})),r.jsx(uo,{...t,navigateFnRef:s,selectEntityFnRef:a,onPaymentRequired:t.onPaymentRequired,children:r.jsx(Rg,{paymentsMode:"all"})})}),Dg=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent("tax-remittance:payment-complete",{detail:{paymentId:i}}))}})),r.jsx(uo,{...t,navigateFnRef:s,selectEntityFnRef:a,enabledPayments:["federal"],children:r.jsxs(to,{children:[r.jsx(oe,{index:!0,element:r.jsx(mo,{})}),r.jsx(oe,{path:"create-entity",element:r.jsx(fo,{})}),r.jsx(oe,{path:"create-entity/form",element:r.jsx(Oo,{})}),r.jsx(oe,{path:"entities/:entityId/edit",element:r.jsx(zo,{})}),r.jsxs(oe,{element:r.jsx(ho,{}),children:[r.jsx(oe,{path:"entities",element:r.jsx(Wo,{})}),r.jsx(oe,{path:"dashboard",element:r.jsx(Bo,{})}),r.jsx(oe,{path:"payments",element:r.jsx(Jo,{paymentsMode:"federal"})}),r.jsx(oe,{path:"payments/federal/new",element:r.jsx(Jm,{})}),r.jsx(oe,{path:"payments/federal/:federalPaymentId/edit",element:r.jsx(_m,{})}),r.jsx(oe,{path:"payments/federal/:federalPaymentId/view",element:r.jsx($m,{})}),r.jsx(oe,{path:"payments/federal/authorization",element:r.jsx(k1,{})}),r.jsx(oe,{path:"payments/federal/individual-enrollment",element:r.jsx(F1,{})}),r.jsx(oe,{path:"settings",element:r.jsx(ul,{})})]}),r.jsx(oe,{path:"*",element:r.jsx(Ye,{to:"/",replace:!0})})]})})}),Og=x.forwardRef(function(t,n){const s=x.useRef(null),a=x.useRef(null);return x.useImperativeHandle(n,()=>({navigate:i=>{var o;return(o=s.current)==null?void 0:o.call(s,i)},selectEntity:i=>{var o;return(o=a.current)==null?void 0:o.call(a,i)},notifyPaymentComplete:i=>{window.dispatchEvent(new CustomEvent("tax-remittance:payment-complete",{detail:{paymentId:i}}))}})),r.jsx(uo,{...t,navigateFnRef:s,selectEntityFnRef:a,enabledPayments:["state"],children:r.jsxs(to,{children:[r.jsx(oe,{index:!0,element:r.jsx(mo,{})}),r.jsx(oe,{path:"create-entity",element:r.jsx(fo,{})}),r.jsx(oe,{path:"create-entity/form",element:r.jsx(Oo,{})}),r.jsx(oe,{path:"entities/:entityId/edit",element:r.jsx(zo,{})}),r.jsxs(oe,{element:r.jsx(ho,{}),children:[r.jsx(oe,{path:"entities",element:r.jsx(Wo,{})}),r.jsx(oe,{path:"dashboard",element:r.jsx(Bo,{})}),r.jsx(oe,{path:"payments",element:r.jsx(Jo,{paymentsMode:"state"})}),r.jsx(oe,{path:"payments/state/new",element:r.jsx(h1,{})}),r.jsx(oe,{path:"payments/state/:statePaymentId/edit",element:r.jsx(f1,{})}),r.jsx(oe,{path:"payments/state/:statePaymentId/view",element:r.jsx(p1,{})}),r.jsx(oe,{path:"payments/state/bank-details",element:r.jsx(y1,{})}),r.jsx(oe,{path:"payments/state/authorization",element:r.jsx(w1,{})}),r.jsx(oe,{path:"settings",element:r.jsx(ul,{})})]}),r.jsx(oe,{path:"*",element:r.jsx(Ye,{to:"/",replace:!0})})]})})});exports.ApiError=mn;exports.EMAIL_INVALID_MESSAGE=Fd;exports.EMAIL_MAX_LENGTH=Mi;exports.EMAIL_PATTERN=Ld;exports.FederalPaymentWidget=Dg;exports.MASK_CHAR=So;exports.NAME_MAX_LENGTH=O4;exports.PHONE_COUNTRY_CODE=Tr;exports.PHONE_NATIONAL_DIGIT_LENGTH=Er;exports.StatePaymentWidget=Og;exports.TAXPAYER_ID_DIGIT_LENGTH=Yt;exports.TAXPAYER_ID_MAX_INPUT_LENGTH=Sd;exports.TaxRemittanceEmbedded=Mg;exports.digitsOnly=tt;exports.formatEin=Ea;exports.formatIdNumber=tr;exports.formatIdNumberInput=ts;exports.formatPhone=ns;exports.formatPhoneInput=Td;exports.formatPhoneNumberInput=Ln;exports.formatSsn=Pd;exports.maskEin=Id;exports.maskIdNumber=Gr;exports.maskSsn=Ed;exports.setRuntimeApiBaseUrl=Zu;exports.taxpayerIdInputHints=No;exports.taxpayerIdLabelFor=Ad;exports.toNationalPhoneDigits=Lr;exports.validateEmail=ko;exports.validateName=Po;exports.validateOptionalTaxpayerId=kd;exports.validatePhone=Ao;exports.validateTaxpayerId=fs;
|
|
76
76
|
//# sourceMappingURL=index.cjs.map
|