@zeniai/web-cockpit-ui 2.3.17-dev → 2.3.17-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/assets/{CreditAgentRoutes-CuoMlb2L.js → CreditAgentRoutes-C3KSn0qF.js} +1 -1
  2. package/dist/assets/{Preview-DxqS1kpV.js → Preview-Bh0AETby.js} +1 -1
  3. package/dist/assets/{ScreenRoutes-DWUVu9Yw.js → ScreenRoutes-BD_9T844.js} +3 -3
  4. package/dist/assets/{SignInScreen-B_53sM3e.js → SignInScreen-3dFTyo0S.js} +1 -1
  5. package/dist/assets/{analytics-PQVWTCTD.js → analytics-Dxa9-SvV.js} +1 -1
  6. package/dist/assets/{analyticsHelper-BCwbzW6S.js → analyticsHelper-CEO3FRLE.js} +1 -1
  7. package/dist/assets/{core-D8hk6m0T.js → core-B83eUXZg.js} +1 -1
  8. package/dist/assets/{dash.all.min-CjRZMKeE.js → dash.all.min-DfVVsk6f.js} +1 -1
  9. package/dist/assets/{empty-BQZxP14H.js → empty-BcNm9HyV.js} +1 -1
  10. package/dist/assets/{empty-DGwkeziA.js → empty-C5Woq1Da.js} +1 -1
  11. package/dist/assets/{epic-fbuWcMB0.js → epic-BqSZrb5f.js} +1 -1
  12. package/dist/assets/{index-XspIdE1e.js → index-BvlRA3sc.js} +1 -1
  13. package/dist/assets/{index-3To0-XFC.js → index-CFDwKJZV.js} +1 -1
  14. package/dist/assets/{index-BKWEz40A.js → index-ClbXydMP.js} +1 -1
  15. package/dist/assets/{index-Dqbpu8vA.js → index-Di_HCLlf.js} +2 -2
  16. package/dist/assets/{index-D8u0upr9.js → index-Dj5tmvX1.js} +6 -6
  17. package/dist/assets/{index-Ce2ImpIl.js → index-Dr7wk9vq.js} +1 -1
  18. package/dist/assets/{index-C5kyQkcp.js → index-iF2cM_a7.js} +1 -1
  19. package/dist/assets/{lexical-Blrhkk2t.js → lexical-D2527jek.js} +1 -1
  20. package/dist/assets/{liveblocks-DYWzFGhT.js → liveblocks-BcpL_eIf.js} +1 -1
  21. package/dist/assets/{lottie-BxTTb6gO.js → lottie-BP5NslbC.js} +1 -1
  22. package/dist/assets/{mui-DNgie5_z.js → mui-RtA2F6xO.js} +1 -1
  23. package/dist/assets/{react-D6R87yWU.js → react-BE5ihux_.js} +1 -1
  24. package/dist/assets/{react-azud2Jz1.js → react-C3vKdbbP.js} +1 -1
  25. package/dist/assets/{react-QCGammPI.js → react-CKxxabGI.js} +1 -1
  26. package/dist/assets/{react-D75MZkVU.js → react-CURcyy-9.js} +2 -2
  27. package/dist/assets/{react-BAzZNPFl.js → react-CXJPZUX2.js} +1 -1
  28. package/dist/assets/{react-D3UWY8U2.js → react-DW1p1O70.js} +1 -1
  29. package/dist/assets/{react-DFAyxyom.js → react-Ds753vZG.js} +1 -1
  30. package/dist/assets/{react-BnVSNFfk.js → react-J88c0JIV.js} +1 -1
  31. package/dist/assets/{recharts-vOQNlcA0.js → recharts-Dw9UyYxv.js} +1 -1
  32. package/dist/assets/{sentry-BKGW4O8F.js → sentry-CXD2tUYO.js} +1 -1
  33. package/dist/assets/{url-CP5VNIwh.js → url-BuipZa3k.js} +1 -1
  34. package/dist/assets/{url-J8jpaHxl.js → url-DqI0Vlwu.js} +1 -1
  35. package/dist/assets/{utils-SUgx7y8O.js → utils-DGW3GFUd.js} +1 -1
  36. package/dist/assets/{zeni-epic-state-Bo6SozDm.js → zeni-epic-state-BPERiJiS.js} +3 -3
  37. package/dist/index.html +1 -1
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DYWzFGhT.js";import{u as v,P as D}from"./ScreenRoutes-DWUVu9Yw.js";import{a as u}from"./sentry-BKGW4O8F.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-D8hk6m0T.js";import{S$ as N,T0 as E,lI as M,T1 as $,my as k,mB as L,mn as B,T2 as _,T3 as O,mv as F,mr as q}from"./zeni-epic-state-Bo6SozDm.js";import{z as V,T as G,G as J,n as W,W as Z,B as H,$ as K,b as Q,g as X,h as Y}from"./index-D8u0upr9.js";import{n as ee}from"./mui-DNgie5_z.js";import"./recharts-vOQNlcA0.js";import"./analyticsHelper-BCwbzW6S.js";import"./utils-SUgx7y8O.js";import"./empty-BQZxP14H.js";import"./index-Ce2ImpIl.js";import"./url-J8jpaHxl.js";import"./index-3To0-XFC.js";import"./analytics-PQVWTCTD.js";import"./lottie-BxTTb6gO.js";import"./lexical-Blrhkk2t.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="d47457a7-9e91-4146-9944-ed246491ba35",a._sentryDebugIdIdentifier="sentry-dbid-d47457a7-9e91-4146-9944-ed246491ba35")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,selectedTabOption:K("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ne(a,t){return{headerActions:{onTabChange:n=>{const g=Y(n),c=X(n);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(Z),oe=ee.div`
1
+ import{j as s}from"./liveblocks-BcpL_eIf.js";import{u as v,P as D}from"./ScreenRoutes-BD_9T844.js";import{a as u}from"./sentry-CXD2tUYO.js";import{i as P,n as U,g as m,h as R,k as C,l as I,N as j}from"./core-B83eUXZg.js";import{S$ as N,T0 as E,lI as M,T1 as $,my as k,mB as L,mn as B,T2 as _,T3 as O,mv as F,mr as q}from"./zeni-epic-state-BPERiJiS.js";import{z as V,T as G,G as J,n as W,W as Z,B as H,$ as K,b as Q,g as X,h as Y}from"./index-Dj5tmvX1.js";import{n as ee}from"./mui-RtA2F6xO.js";import"./recharts-Dw9UyYxv.js";import"./analyticsHelper-CEO3FRLE.js";import"./utils-DGW3GFUd.js";import"./empty-BcNm9HyV.js";import"./index-Dr7wk9vq.js";import"./url-DqI0Vlwu.js";import"./index-CFDwKJZV.js";import"./analytics-Dxa9-SvV.js";import"./lottie-BP5NslbC.js";import"./lexical-D2527jek.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="d47457a7-9e91-4146-9944-ed246491ba35",a._sentryDebugIdIdentifier="sentry-dbid-d47457a7-9e91-4146-9944-ed246491ba35")}catch{}})();function te(a,t){return{headerData:{allTabOptions:H,selectedTabOption:K("creditAgent")},creditAgentPageData:{macroData:{data:t.macroCombined.data,fetchState:t.macroCombined.fetchStatus.fetchState,updateState:t.macroCombined.updateStatus.fetchState},cardProfilesData:t.cardProfilesData}}}function ne(a,t){return{headerActions:{onTabChange:n=>{const g=Y(n),c=X(n);Q.trackCockpitTabClicked(c),t.navigate(`../../${g}`,{replace:!0})}},creditAgentPageActions:{onFetchMacro:()=>{a(q())},onSaveMacro:n=>{a(F(n))},onResetSaveMacro:()=>{a(O())},onUIStateChange:n=>{a(_(n))},cardProfilesActions:t.cardProfilesActions}}}const ae=R(te,ne)(Z),oe=ee.div`
2
2
  padding: ${W.sp5};
3
3
  text-align: center;
4
4
  `;function re(){const a=P(),t=U(),n=m(N),g=m(E),[c,h]=u.useState(new Set),p=u.useRef(new Set),y=m(e=>e.tenantState.currentTenantId),b=m(e=>e.companyViewState.zeniUsers.fetchState);u.useEffect(()=>{b==="Not-Started"&&t(M())},[t,b]);const d=V.getSignedInUser(),A=d!=null&&[d.firstName,d.lastName].filter(Boolean).join(" ")||void 0,w=u.useMemo(()=>({onFetch:()=>{t(B())},onUpdateProfile:(e,o,r)=>{const i=r.updatedByName??A;t(L({tenantId:o,tenantEmailDomain:e,update:{...r,updatedByName:i}}))},onAnalyse:e=>{h(o=>new Set(o).add(e)),t(k(e))},onDownloadReport:()=>{const e=$(n.rows),o=d?.userId??"",r=d?.zeniSessionId??"",i=y??"";if(!o||!r||!i)return;const T=encodeURIComponent(JSON.stringify(e)),x=`${G}/tableDownload?query=${T}`;fetch(x,{headers:{"zeni-user-id":o,"zeni-session-id":r,"zeni-tenant-id":i}}).then(async l=>{if(!l.ok){const f=await l.text();throw new Error(`Download failed: ${l.status} ${f}`)}return l.blob()}).then(l=>{const f=URL.createObjectURL(l),S=document.createElement("a");S.href=f,S.download=`${e.file_name}.xlsx`,S.click(),URL.revokeObjectURL(f)}).catch(()=>{})}}),[t,A,d,y,n.rows]);u.useEffect(()=>{if(c.size===0)return;const e=new Set;for(const o of c){const r=n.rows.find(i=>i.tenantId===o);r!=null&&r.isAnalyzing?p.current.add(o):r!=null&&!r.isAnalyzing&&p.current.has(o)&&(e.add(o),p.current.delete(o))}e.size>0&&h(o=>{const r=new Set(o);for(const i of e)r.delete(i);return r})},[n.rows,c]);const z=u.useMemo(()=>({fetchState:n.fetchStatus.fetchState,rows:n.rows.map(e=>e.isAnalyzing||e.tenantId!=null&&c.has(e.tenantId)?{...e,isAnalyzing:!0}:e),uiState:n.uiState}),[n,c]);return d==null?s.jsx(oe,{children:J.getLocalizedStrings().cockpit.creditAgent.notSignedIn}):s.jsx(ae,{macroCombined:g,navigate:a,cardProfilesActions:w,cardProfilesData:z})}function we(){const{isAllowed:a,isLoading:t}=v();return t?null:a?s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(D,{element:s.jsx(re,{})})})}):s.jsx(C,{children:s.jsx(I,{path:"/*",element:s.jsx(j,{to:"/management",replace:!0})})})}export{we as default};
@@ -1 +1 @@
1
- import{a as h,R as n}from"./sentry-BKGW4O8F.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};
1
+ import{a as h,R as n}from"./sentry-CXD2tUYO.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="f4ba052c-9e02-4735-9454-bf2cba2bc7bc",t._sentryDebugIdIdentifier="sentry-dbid-f4ba052c-9e02-4735-9454-bf2cba2bc7bc")}catch{}})();const d="64px",u={},k=({src:t,light:a,oEmbedUrl:r,onClickPreview:s,playIcon:m,previewTabIndex:I,previewAriaLabel:f})=>{const[b,o]=h.useState(null);h.useEffect(()=>{!t||!a||!r||_({src:t,light:a,oEmbedUrl:r})},[t,a,r]);const _=async({src:e,light:i,oEmbedUrl:E})=>{if(n.isValidElement(i))return;if(typeof i=="string"){o(i);return}if(u[e]){o(u[e]);return}o(null);const y=await(await fetch(E.replace("{url}",e))).json();if(y.thumbnail_url){const g=y.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");o(g),u[e]=g}},w=e=>{(e.key==="Enter"||e.key===" ")&&s?.(e)},v=e=>{s?.(e)},l=n.isValidElement(a),p={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:b&&!l?`url(${b})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...p},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:d,width:d,height:d,position:l?"absolute":void 0,...p},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},x=n.createElement("div",{style:c.shadow,className:"react-player__shadow"},n.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return n.createElement("div",{style:c.preview,className:"react-player__preview",tabIndex:I,onClick:v,onKeyDown:w,...f?{"aria-label":f}:{}},l?a:null,m||x)};var S=k;export{S as default};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CreditAgentRoutes-CuoMlb2L.js","assets/liveblocks-DYWzFGhT.js","assets/sentry-BKGW4O8F.js","assets/core-D8hk6m0T.js","assets/recharts-vOQNlcA0.js","assets/zeni-epic-state-Bo6SozDm.js","assets/index-D8u0upr9.js","assets/mui-DNgie5_z.js","assets/analytics-PQVWTCTD.js","assets/lottie-BxTTb6gO.js","assets/lexical-Blrhkk2t.js","assets/utils-SUgx7y8O.js","assets/index-Bd7ri422.css","assets/analyticsHelper-BCwbzW6S.js","assets/empty-BQZxP14H.js","assets/index-Ce2ImpIl.js","assets/url-J8jpaHxl.js","assets/index-3To0-XFC.js"])))=>i.map(i=>d[i]);
2
- import{S9 as qf,Sa as Df,lG as xt,f3 as vs,Sb as Dt,fc as an,f1 as Nf,Sc as Jt,f8 as sn,Sd as ch,Se as lh,Sf as ur,Sg as fh,jZ as Mf,lI as Ct,jW as dh,k1 as Ff,Sh as ys,k3 as hh,k4 as ph,Si as Sr,Sj as cr,js as mh,Sk as pn,Sl as Uo,dj as gh,h0 as Vo,gZ as un,h5 as Mt,h3 as vh,Sm as Bf,Sn as Uf,ki as yh,kf as _h,So as bh,kt as wh,ko as _s,kl as Sh,ka as Eh,Sp as Rh,eL as Oh,dr as Th,lU as Vf,Sq as Ah,be as on,k7 as bs,kc as Ih,Ax as $f,lH as mn,Sr as zf,Ss as pt,m3 as cn,l_ as Gf,kN as $o,St as xh,m6 as Ch,H as et,bm as zo,Su as kh,jp as Ph,Sv as jh,Sw as Hf,Sx as Lh,yR as ws,yn as qh,Sy as Dh,yt as In,Sz as Nh,yv as Mh,SA as Tt,yk as Fh,d7 as Bh,lL as Zf,lM as Wf,lK as Go,lJ as Ho,lN as Uh,SB as Vh,yU as $h,SC as zh,yB as Gh,yO as Hh,SD as Zh,yF as Wh,SE as Yh,SF as Kt,SG as Zo,SH as Jh,SI as Kh,sj as Xh,sp as Yf,SJ as Jf,iW as Qh,Re as Kf,SK as ep,R8 as tp,SL as rp,SM as np,ss as ip,SN as ap,Rj as op,R7 as sp,Cu as Xf,SO as xn,SP as Qf,NJ as Wo,Nv as up,NM as ed,Ny as cp,SQ as lp,ND as fp,Np as dp,Ns as hp,SR as pp,NQ as mp,NG as gp,bp as vp,bd as yp,SS as _p,ST as Gt,SU as bp,SV as wp,SW as Sp,kB as No,kx as Ep,kH as Rp,kK as Ss,ba as td}from"./zeni-epic-state-Bo6SozDm.js";import{j as U}from"./liveblocks-DYWzFGhT.js";import{a as ce,p as ye,d as rd,c as Yo,g as Op}from"./sentry-BKGW4O8F.js";import{m as wt,j as At,z as He,B as Tp,a as Ap,o as lr,X as Ip,$ as St,J as nd,v as at,b as Fe,h as kt,g as Ft,f as xp,u as Cp,U as kp,K as Pp,c as gn,H as jp,G as fr,d as vn,n as Nt,r as Lp,D as qp,_ as yn,t as Dp,e as Np,i as Cn,Z as Mp,V as id,O as Fp,k as ad,l as od,p as Mo,q as Bp,s as Up,w as Vp,R as sd,x as $p,Q as zp,y as Gp,A as Hp,C as Zp,E as Wp,F as Yp,N as Jp,I as Kp,Y as Xp,L as Qp,M as em,P as ud}from"./index-D8u0upr9.js";import{f as tm}from"./analyticsHelper-BCwbzW6S.js";import{i as Be,n as We,g as Ee,o as ot,N as ir,k as gt,l as Te,p as cd,h as ze,u as Jo,j as Fo}from"./core-D8hk6m0T.js";import{u as Bt,D as dr,n as tt,S as Zt}from"./mui-DNgie5_z.js";import{a as Ze,b as rm,c as nm,d as im,e as Ko,f as am,g as om,h as sm,i as Wt,j as um,k as or,l as _n,m as cm,n as hr,o as lm}from"./utils-SUgx7y8O.js";import{r as Xo}from"./empty-BQZxP14H.js";import{r as pr,a as fm}from"./index-Ce2ImpIl.js";import{r as dm}from"./index-3To0-XFC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a8b97f4c-ad82-4fba-8f84-e00fc39d78da",e._sentryDebugIdIdentifier="sentry-dbid-a8b97f4c-ad82-4fba-8f84-e00fc39d78da")}catch{}})();var kn={},Es;function bn(){return Es||(Es=1,(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var d=o.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)n(d,f)&&(a[f]=d[f])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,d,f,v){if(o.subarray&&a.subarray){a.set(o.subarray(d,d+f),v);return}for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){var o,d,f,v,s,l;for(f=0,o=0,d=a.length;o<d;o++)f+=a[o].length;for(l=new Uint8Array(f),v=0,o=0,d=a.length;o<d;o++)s=a[o],l.set(s,v),v+=s.length;return l}},i={arraySet:function(a,o,d,f,v){for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(kn)),kn}var ut={},Pt={},Rs;function hm(){if(Rs)return Pt;Rs=1;var e=bn(),t=4,n=0,r=1,i=2;function a(C){for(var ne=C.length;--ne>=0;)C[ne]=0}var o=0,d=1,f=2,v=3,s=258,l=29,c=256,y=c+1+l,h=30,m=19,g=2*y+1,u=15,_=16,S=7,w=256,b=16,x=17,O=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=512,I=new Array((y+2)*2);a(I);var $=new Array(h*2);a($);var z=new Array(E);a(z);var X=new Array(s-v+1);a(X);var A=new Array(l);a(A);var k=new Array(h);a(k);function j(C,ne,se,fe,Z){this.static_tree=C,this.extra_bits=ne,this.extra_base=se,this.elems=fe,this.max_length=Z,this.has_stree=C&&C.length}var N,H,B;function q(C,ne){this.dyn_tree=C,this.max_code=0,this.stat_desc=ne}function L(C){return C<256?z[C]:z[256+(C>>>7)]}function D(C,ne){C.pending_buf[C.pending++]=ne&255,C.pending_buf[C.pending++]=ne>>>8&255}function F(C,ne,se){C.bi_valid>_-se?(C.bi_buf|=ne<<C.bi_valid&65535,D(C,C.bi_buf),C.bi_buf=ne>>_-C.bi_valid,C.bi_valid+=se-_):(C.bi_buf|=ne<<C.bi_valid&65535,C.bi_valid+=se)}function K(C,ne,se){F(C,se[ne*2],se[ne*2+1])}function J(C,ne){var se=0;do se|=C&1,C>>>=1,se<<=1;while(--ne>0);return se>>>1}function ae(C){C.bi_valid===16?(D(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function ue(C,ne){var se=ne.dyn_tree,fe=ne.max_code,Z=ne.stat_desc.static_tree,ie=ne.stat_desc.has_stree,R=ne.stat_desc.extra_bits,oe=ne.stat_desc.extra_base,be=ne.stat_desc.max_length,p,te,re,T,G,ee,_e=0;for(T=0;T<=u;T++)C.bl_count[T]=0;for(se[C.heap[C.heap_max]*2+1]=0,p=C.heap_max+1;p<g;p++)te=C.heap[p],T=se[se[te*2+1]*2+1]+1,T>be&&(T=be,_e++),se[te*2+1]=T,!(te>fe)&&(C.bl_count[T]++,G=0,te>=oe&&(G=R[te-oe]),ee=se[te*2],C.opt_len+=ee*(T+G),ie&&(C.static_len+=ee*(Z[te*2+1]+G)));if(_e!==0){do{for(T=be-1;C.bl_count[T]===0;)T--;C.bl_count[T]--,C.bl_count[T+1]+=2,C.bl_count[be]--,_e-=2}while(_e>0);for(T=be;T!==0;T--)for(te=C.bl_count[T];te!==0;)re=C.heap[--p],!(re>fe)&&(se[re*2+1]!==T&&(C.opt_len+=(T-se[re*2+1])*se[re*2],se[re*2+1]=T),te--)}}function ve(C,ne,se){var fe=new Array(u+1),Z=0,ie,R;for(ie=1;ie<=u;ie++)fe[ie]=Z=Z+se[ie-1]<<1;for(R=0;R<=ne;R++){var oe=C[R*2+1];oe!==0&&(C[R*2]=J(fe[oe]++,oe))}}function me(){var C,ne,se,fe,Z,ie=new Array(u+1);for(se=0,fe=0;fe<l-1;fe++)for(A[fe]=se,C=0;C<1<<P[fe];C++)X[se++]=fe;for(X[se-1]=fe,Z=0,fe=0;fe<16;fe++)for(k[fe]=Z,C=0;C<1<<M[fe];C++)z[Z++]=fe;for(Z>>=7;fe<h;fe++)for(k[fe]=Z<<7,C=0;C<1<<M[fe]-7;C++)z[256+Z++]=fe;for(ne=0;ne<=u;ne++)ie[ne]=0;for(C=0;C<=143;)I[C*2+1]=8,C++,ie[8]++;for(;C<=255;)I[C*2+1]=9,C++,ie[9]++;for(;C<=279;)I[C*2+1]=7,C++,ie[7]++;for(;C<=287;)I[C*2+1]=8,C++,ie[8]++;for(ve(I,y+1,ie),C=0;C<h;C++)$[C*2+1]=5,$[C*2]=J(C,5);N=new j(I,P,c+1,y,u),H=new j($,M,0,h,u),B=new j(new Array(0),W,0,m,S)}function we(C){var ne;for(ne=0;ne<y;ne++)C.dyn_ltree[ne*2]=0;for(ne=0;ne<h;ne++)C.dyn_dtree[ne*2]=0;for(ne=0;ne<m;ne++)C.bl_tree[ne*2]=0;C.dyn_ltree[w*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Ce(C){C.bi_valid>8?D(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Pe(C,ne,se,fe){Ce(C),D(C,se),D(C,~se),e.arraySet(C.pending_buf,C.window,ne,se,C.pending),C.pending+=se}function je(C,ne,se,fe){var Z=ne*2,ie=se*2;return C[Z]<C[ie]||C[Z]===C[ie]&&fe[ne]<=fe[se]}function Ie(C,ne,se){for(var fe=C.heap[se],Z=se<<1;Z<=C.heap_len&&(Z<C.heap_len&&je(ne,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!je(ne,fe,C.heap[Z],C.depth));)C.heap[se]=C.heap[Z],se=Z,Z<<=1;C.heap[se]=fe}function Se(C,ne,se){var fe,Z,ie=0,R,oe;if(C.last_lit!==0)do fe=C.pending_buf[C.d_buf+ie*2]<<8|C.pending_buf[C.d_buf+ie*2+1],Z=C.pending_buf[C.l_buf+ie],ie++,fe===0?K(C,Z,ne):(R=X[Z],K(C,R+c+1,ne),oe=P[R],oe!==0&&(Z-=A[R],F(C,Z,oe)),fe--,R=L(fe),K(C,R,se),oe=M[R],oe!==0&&(fe-=k[R],F(C,fe,oe)));while(ie<C.last_lit);K(C,w,ne)}function $e(C,ne){var se=ne.dyn_tree,fe=ne.stat_desc.static_tree,Z=ne.stat_desc.has_stree,ie=ne.stat_desc.elems,R,oe,be=-1,p;for(C.heap_len=0,C.heap_max=g,R=0;R<ie;R++)se[R*2]!==0?(C.heap[++C.heap_len]=be=R,C.depth[R]=0):se[R*2+1]=0;for(;C.heap_len<2;)p=C.heap[++C.heap_len]=be<2?++be:0,se[p*2]=1,C.depth[p]=0,C.opt_len--,Z&&(C.static_len-=fe[p*2+1]);for(ne.max_code=be,R=C.heap_len>>1;R>=1;R--)Ie(C,se,R);p=ie;do R=C.heap[1],C.heap[1]=C.heap[C.heap_len--],Ie(C,se,1),oe=C.heap[1],C.heap[--C.heap_max]=R,C.heap[--C.heap_max]=oe,se[p*2]=se[R*2]+se[oe*2],C.depth[p]=(C.depth[R]>=C.depth[oe]?C.depth[R]:C.depth[oe])+1,se[R*2+1]=se[oe*2+1]=p,C.heap[1]=p++,Ie(C,se,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],ue(C,ne),ve(se,be,C.bl_count)}function st(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),ne[(se+1)*2+1]=65535,fe=0;fe<=se;fe++)ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)&&(oe<p?C.bl_tree[ie*2]+=oe:ie!==0?(ie!==Z&&C.bl_tree[ie*2]++,C.bl_tree[b*2]++):oe<=10?C.bl_tree[x*2]++:C.bl_tree[O*2]++,oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4))}function qe(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),fe=0;fe<=se;fe++)if(ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)){if(oe<p)do K(C,ie,C.bl_tree);while(--oe!==0);else ie!==0?(ie!==Z&&(K(C,ie,C.bl_tree),oe--),K(C,b,C.bl_tree),F(C,oe-3,2)):oe<=10?(K(C,x,C.bl_tree),F(C,oe-3,3)):(K(C,O,C.bl_tree),F(C,oe-11,7));oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4)}}function Ne(C){var ne;for(st(C,C.dyn_ltree,C.l_desc.max_code),st(C,C.dyn_dtree,C.d_desc.max_code),$e(C,C.bl_desc),ne=m-1;ne>=3&&C.bl_tree[V[ne]*2+1]===0;ne--);return C.opt_len+=3*(ne+1)+5+5+4,ne}function Ye(C,ne,se,fe){var Z;for(F(C,ne-257,5),F(C,se-1,5),F(C,fe-4,4),Z=0;Z<fe;Z++)F(C,C.bl_tree[V[Z]*2+1],3);qe(C,C.dyn_ltree,ne-1),qe(C,C.dyn_dtree,se-1)}function Y(C){var ne=4093624447,se;for(se=0;se<=31;se++,ne>>>=1)if(ne&1&&C.dyn_ltree[se*2]!==0)return n;if(C.dyn_ltree[18]!==0||C.dyn_ltree[20]!==0||C.dyn_ltree[26]!==0)return r;for(se=32;se<c;se++)if(C.dyn_ltree[se*2]!==0)return r;return n}var Q=!1;function le(C){Q||(me(),Q=!0),C.l_desc=new q(C.dyn_ltree,N),C.d_desc=new q(C.dyn_dtree,H),C.bl_desc=new q(C.bl_tree,B),C.bi_buf=0,C.bi_valid=0,we(C)}function ge(C,ne,se,fe){F(C,(o<<1)+(fe?1:0),3),Pe(C,ne,se)}function de(C){F(C,d<<1,3),K(C,w,I),ae(C)}function Re(C,ne,se,fe){var Z,ie,R=0;C.level>0?(C.strm.data_type===i&&(C.strm.data_type=Y(C)),$e(C,C.l_desc),$e(C,C.d_desc),R=Ne(C),Z=C.opt_len+3+7>>>3,ie=C.static_len+3+7>>>3,ie<=Z&&(Z=ie)):Z=ie=se+5,se+4<=Z&&ne!==-1?ge(C,ne,se,fe):C.strategy===t||ie===Z?(F(C,(d<<1)+(fe?1:0),3),Se(C,I,$)):(F(C,(f<<1)+(fe?1:0),3),Ye(C,C.l_desc.max_code+1,C.d_desc.max_code+1,R+1),Se(C,C.dyn_ltree,C.dyn_dtree)),we(C),fe&&Ce(C)}function Oe(C,ne,se){return C.pending_buf[C.d_buf+C.last_lit*2]=ne>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=ne&255,C.pending_buf[C.l_buf+C.last_lit]=se&255,C.last_lit++,ne===0?C.dyn_ltree[se*2]++:(C.matches++,ne--,C.dyn_ltree[(X[se]+c+1)*2]++,C.dyn_dtree[L(ne)*2]++),C.last_lit===C.lit_bufsize-1}return Pt._tr_init=le,Pt._tr_stored_block=ge,Pt._tr_flush_block=Re,Pt._tr_tally=Oe,Pt._tr_align=de,Pt}var Pn,Os;function ld(){if(Os)return Pn;Os=1;function e(t,n,r,i){for(var a=t&65535|0,o=t>>>16&65535|0,d=0;r!==0;){d=r>2e3?2e3:r,r-=d;do a=a+n[i++]|0,o=o+a|0;while(--d);a%=65521,o%=65521}return a|o<<16|0}return Pn=e,Pn}var jn,Ts;function fd(){if(Ts)return jn;Ts=1;function e(){for(var r,i=[],a=0;a<256;a++){r=a;for(var o=0;o<8;o++)r=r&1?3988292384^r>>>1:r>>>1;i[a]=r}return i}var t=e();function n(r,i,a,o){var d=t,f=o+a;r^=-1;for(var v=o;v<f;v++)r=r>>>8^d[(r^i[v])&255];return r^-1}return jn=n,jn}var Ln,As;function pm(){return As||(As=1,Ln={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Ln}var Is;function mm(){if(Is)return ut;Is=1;var e=bn(),t=hm(),n=ld(),r=fd(),i=pm(),a=0,o=1,d=3,f=4,v=5,s=0,l=1,c=-2,y=-3,h=-5,m=-1,g=1,u=2,_=3,S=4,w=0,b=2,x=8,O=9,P=15,M=8,W=29,V=256,E=V+1+W,I=30,$=19,z=2*E+1,X=15,A=3,k=258,j=k+A+1,N=32,H=42,B=69,q=73,L=91,D=103,F=113,K=666,J=1,ae=2,ue=3,ve=4,me=3;function we(p,te){return p.msg=i[te],te}function Ce(p){return(p<<1)-(p>4?9:0)}function Pe(p){for(var te=p.length;--te>=0;)p[te]=0}function je(p){var te=p.state,re=te.pending;re>p.avail_out&&(re=p.avail_out),re!==0&&(e.arraySet(p.output,te.pending_buf,te.pending_out,re,p.next_out),p.next_out+=re,te.pending_out+=re,p.total_out+=re,p.avail_out-=re,te.pending-=re,te.pending===0&&(te.pending_out=0))}function Ie(p,te){t._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,te),p.block_start=p.strstart,je(p.strm)}function Se(p,te){p.pending_buf[p.pending++]=te}function $e(p,te){p.pending_buf[p.pending++]=te>>>8&255,p.pending_buf[p.pending++]=te&255}function st(p,te,re,T){var G=p.avail_in;return G>T&&(G=T),G===0?0:(p.avail_in-=G,e.arraySet(te,p.input,p.next_in,G,re),p.state.wrap===1?p.adler=n(p.adler,te,G,re):p.state.wrap===2&&(p.adler=r(p.adler,te,G,re)),p.next_in+=G,p.total_in+=G,G)}function qe(p,te){var re=p.max_chain_length,T=p.strstart,G,ee,_e=p.prev_length,he=p.nice_match,pe=p.strstart>p.w_size-j?p.strstart-(p.w_size-j):0,Ae=p.window,vt=p.w_mask,Le=p.prev,xe=p.strstart+k,Ue=Ae[T+_e-1],Je=Ae[T+_e];p.prev_length>=p.good_match&&(re>>=2),he>p.lookahead&&(he=p.lookahead);do if(G=te,!(Ae[G+_e]!==Je||Ae[G+_e-1]!==Ue||Ae[G]!==Ae[T]||Ae[++G]!==Ae[T+1])){T+=2,G++;do;while(Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&T<xe);if(ee=k-(xe-T),T=xe-k,ee>_e){if(p.match_start=te,_e=ee,ee>=he)break;Ue=Ae[T+_e-1],Je=Ae[T+_e]}}while((te=Le[te&vt])>pe&&--re!==0);return _e<=p.lookahead?_e:p.lookahead}function Ne(p){var te=p.w_size,re,T,G,ee,_e;do{if(ee=p.window_size-p.lookahead-p.strstart,p.strstart>=te+(te-j)){e.arraySet(p.window,p.window,te,te,0),p.match_start-=te,p.strstart-=te,p.block_start-=te,T=p.hash_size,re=T;do G=p.head[--re],p.head[re]=G>=te?G-te:0;while(--T);T=te,re=T;do G=p.prev[--re],p.prev[re]=G>=te?G-te:0;while(--T);ee+=te}if(p.strm.avail_in===0)break;if(T=st(p.strm,p.window,p.strstart+p.lookahead,ee),p.lookahead+=T,p.lookahead+p.insert>=A)for(_e=p.strstart-p.insert,p.ins_h=p.window[_e],p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+1])&p.hash_mask;p.insert&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+A-1])&p.hash_mask,p.prev[_e&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=_e,_e++,p.insert--,!(p.lookahead+p.insert<A)););}while(p.lookahead<j&&p.strm.avail_in!==0)}function Ye(p,te){var re=65535;for(re>p.pending_buf_size-5&&(re=p.pending_buf_size-5);;){if(p.lookahead<=1){if(Ne(p),p.lookahead===0&&te===a)return J;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var T=p.block_start+re;if((p.strstart===0||p.strstart>=T)&&(p.lookahead=p.strstart-T,p.strstart=T,Ie(p,!1),p.strm.avail_out===0)||p.strstart-p.block_start>=p.w_size-j&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):(p.strstart>p.block_start&&(Ie(p,!1),p.strm.avail_out===0),J)}function Y(p,te){for(var re,T;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),re!==0&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re)),p.match_length>=A)if(T=t._tr_tally(p,p.strstart-p.match_start,p.match_length-A),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=A){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else T=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(T&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function Q(p,te){for(var re,T,G;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=A-1,re!==0&&p.prev_length<p.max_lazy_match&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re),p.match_length<=5&&(p.strategy===g||p.match_length===A&&p.strstart-p.match_start>4096)&&(p.match_length=A-1)),p.prev_length>=A&&p.match_length<=p.prev_length){G=p.strstart+p.lookahead-A,T=t._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-A),p.lookahead-=p.prev_length-1,p.prev_length-=2;do++p.strstart<=G&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart);while(--p.prev_length!==0);if(p.match_available=0,p.match_length=A-1,p.strstart++,T&&(Ie(p,!1),p.strm.avail_out===0))return J}else if(p.match_available){if(T=t._tr_tally(p,0,p.window[p.strstart-1]),T&&Ie(p,!1),p.strstart++,p.lookahead--,p.strm.avail_out===0)return J}else p.match_available=1,p.strstart++,p.lookahead--}return p.match_available&&(T=t._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0),p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function le(p,te){for(var re,T,G,ee,_e=p.window;;){if(p.lookahead<=k){if(Ne(p),p.lookahead<=k&&te===a)return J;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=A&&p.strstart>0&&(G=p.strstart-1,T=_e[G],T===_e[++G]&&T===_e[++G]&&T===_e[++G])){ee=p.strstart+k;do;while(T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&G<ee);p.match_length=k-(ee-G),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=A?(re=t._tr_tally(p,1,p.match_length-A),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function ge(p,te){for(var re;;){if(p.lookahead===0&&(Ne(p),p.lookahead===0)){if(te===a)return J;break}if(p.match_length=0,re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function de(p,te,re,T,G){this.good_length=p,this.max_lazy=te,this.nice_length=re,this.max_chain=T,this.func=G}var Re;Re=[new de(0,0,0,0,Ye),new de(4,4,8,4,Y),new de(4,5,16,8,Y),new de(4,6,32,32,Y),new de(4,4,16,16,Q),new de(8,16,32,32,Q),new de(8,16,128,128,Q),new de(8,32,128,256,Q),new de(32,128,258,1024,Q),new de(32,258,258,4096,Q)];function Oe(p){p.window_size=2*p.w_size,Pe(p.head),p.max_lazy_match=Re[p.level].max_lazy,p.good_match=Re[p.level].good_length,p.nice_match=Re[p.level].nice_length,p.max_chain_length=Re[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=A-1,p.match_available=0,p.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(z*2),this.dyn_dtree=new e.Buf16((2*I+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),Pe(this.dyn_ltree),Pe(this.dyn_dtree),Pe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(X+1),this.heap=new e.Buf16(2*E+1),Pe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*E+1),Pe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ne(p){var te;return!p||!p.state?we(p,c):(p.total_in=p.total_out=0,p.data_type=b,te=p.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?H:F,p.adler=te.wrap===2?0:1,te.last_flush=a,t._tr_init(te),s)}function se(p){var te=ne(p);return te===s&&Oe(p.state),te}function fe(p,te){return!p||!p.state||p.state.wrap!==2?c:(p.state.gzhead=te,s)}function Z(p,te,re,T,G,ee){if(!p)return c;var _e=1;if(te===m&&(te=6),T<0?(_e=0,T=-T):T>15&&(_e=2,T-=16),G<1||G>O||re!==x||T<8||T>15||te<0||te>9||ee<0||ee>S)return we(p,c);T===8&&(T=9);var he=new C;return p.state=he,he.strm=p,he.wrap=_e,he.gzhead=null,he.w_bits=T,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=G+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+A-1)/A),he.window=new e.Buf8(he.w_size*2),he.head=new e.Buf16(he.hash_size),he.prev=new e.Buf16(he.w_size),he.lit_bufsize=1<<G+6,he.pending_buf_size=he.lit_bufsize*4,he.pending_buf=new e.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=te,he.strategy=ee,he.method=re,se(p)}function ie(p,te){return Z(p,te,x,P,M,w)}function R(p,te){var re,T,G,ee;if(!p||!p.state||te>v||te<0)return p?we(p,c):c;if(T=p.state,!p.output||!p.input&&p.avail_in!==0||T.status===K&&te!==f)return we(p,p.avail_out===0?h:c);if(T.strm=p,re=T.last_flush,T.last_flush=te,T.status===H)if(T.wrap===2)p.adler=0,Se(T,31),Se(T,139),Se(T,8),T.gzhead?(Se(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),Se(T,T.gzhead.time&255),Se(T,T.gzhead.time>>8&255),Se(T,T.gzhead.time>>16&255),Se(T,T.gzhead.time>>24&255),Se(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Se(T,T.gzhead.os&255),T.gzhead.extra&&T.gzhead.extra.length&&(Se(T,T.gzhead.extra.length&255),Se(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(p.adler=r(p.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=B):(Se(T,0),Se(T,0),Se(T,0),Se(T,0),Se(T,0),Se(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Se(T,me),T.status=F);else{var _e=x+(T.w_bits-8<<4)<<8,he=-1;T.strategy>=u||T.level<2?he=0:T.level<6?he=1:T.level===6?he=2:he=3,_e|=he<<6,T.strstart!==0&&(_e|=N),_e+=31-_e%31,T.status=F,$e(T,_e),T.strstart!==0&&($e(T,p.adler>>>16),$e(T,p.adler&65535)),p.adler=1}if(T.status===B)if(T.gzhead.extra){for(G=T.pending;T.gzindex<(T.gzhead.extra.length&65535)&&!(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size));)Se(T,T.gzhead.extra[T.gzindex]&255),T.gzindex++;T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=q)}else T.status=q;if(T.status===q)if(T.gzhead.name){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.name.length?ee=T.gzhead.name.charCodeAt(T.gzindex++)&255:ee=0,Se(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.gzindex=0,T.status=L)}else T.status=L;if(T.status===L)if(T.gzhead.comment){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.comment.length?ee=T.gzhead.comment.charCodeAt(T.gzindex++)&255:ee=0,Se(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.status=D)}else T.status=D;if(T.status===D&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&je(p),T.pending+2<=T.pending_buf_size&&(Se(T,p.adler&255),Se(T,p.adler>>8&255),p.adler=0,T.status=F)):T.status=F),T.pending!==0){if(je(p),p.avail_out===0)return T.last_flush=-1,s}else if(p.avail_in===0&&Ce(te)<=Ce(re)&&te!==f)return we(p,h);if(T.status===K&&p.avail_in!==0)return we(p,h);if(p.avail_in!==0||T.lookahead!==0||te!==a&&T.status!==K){var pe=T.strategy===u?ge(T,te):T.strategy===_?le(T,te):Re[T.level].func(T,te);if((pe===ue||pe===ve)&&(T.status=K),pe===J||pe===ue)return p.avail_out===0&&(T.last_flush=-1),s;if(pe===ae&&(te===o?t._tr_align(T):te!==v&&(t._tr_stored_block(T,0,0,!1),te===d&&(Pe(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),je(p),p.avail_out===0))return T.last_flush=-1,s}return te!==f?s:T.wrap<=0?l:(T.wrap===2?(Se(T,p.adler&255),Se(T,p.adler>>8&255),Se(T,p.adler>>16&255),Se(T,p.adler>>24&255),Se(T,p.total_in&255),Se(T,p.total_in>>8&255),Se(T,p.total_in>>16&255),Se(T,p.total_in>>24&255)):($e(T,p.adler>>>16),$e(T,p.adler&65535)),je(p),T.wrap>0&&(T.wrap=-T.wrap),T.pending!==0?s:l)}function oe(p){var te;return!p||!p.state?c:(te=p.state.status,te!==H&&te!==B&&te!==q&&te!==L&&te!==D&&te!==F&&te!==K?we(p,c):(p.state=null,te===F?we(p,y):s))}function be(p,te){var re=te.length,T,G,ee,_e,he,pe,Ae,vt;if(!p||!p.state||(T=p.state,_e=T.wrap,_e===2||_e===1&&T.status!==H||T.lookahead))return c;for(_e===1&&(p.adler=n(p.adler,te,re,0)),T.wrap=0,re>=T.w_size&&(_e===0&&(Pe(T.head),T.strstart=0,T.block_start=0,T.insert=0),vt=new e.Buf8(T.w_size),e.arraySet(vt,te,re-T.w_size,T.w_size,0),te=vt,re=T.w_size),he=p.avail_in,pe=p.next_in,Ae=p.input,p.avail_in=re,p.next_in=0,p.input=te,Ne(T);T.lookahead>=A;){G=T.strstart,ee=T.lookahead-(A-1);do T.ins_h=(T.ins_h<<T.hash_shift^T.window[G+A-1])&T.hash_mask,T.prev[G&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=G,G++;while(--ee);T.strstart=G,T.lookahead=A-1,Ne(T)}return T.strstart+=T.lookahead,T.block_start=T.strstart,T.insert=T.lookahead,T.lookahead=0,T.match_length=T.prev_length=A-1,T.match_available=0,p.next_in=pe,p.input=Ae,p.avail_in=he,T.wrap=_e,s}return ut.deflateInit=ie,ut.deflateInit2=Z,ut.deflateReset=se,ut.deflateResetKeep=ne,ut.deflateSetHeader=fe,ut.deflate=R,ut.deflateEnd=oe,ut.deflateSetDictionary=be,ut.deflateInfo="pako deflate (from Nodeca project)",ut}var qn,xs;function gm(){if(xs)return qn;xs=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return qn=e,qn}var it={},Dn,Cs;function vm(){if(Cs)return Dn;Cs=1;var e=30,t=12;return Dn=function(r,i){var a,o,d,f,v,s,l,c,y,h,m,g,u,_,S,w,b,x,O,P,M,W,V,E,I;a=r.state,o=r.next_in,E=r.input,d=o+(r.avail_in-5),f=r.next_out,I=r.output,v=f-(i-r.avail_out),s=f+(r.avail_out-257),l=a.dmax,c=a.wsize,y=a.whave,h=a.wnext,m=a.window,g=a.hold,u=a.bits,_=a.lencode,S=a.distcode,w=(1<<a.lenbits)-1,b=(1<<a.distbits)-1;e:do{u<15&&(g+=E[o++]<<u,u+=8,g+=E[o++]<<u,u+=8),x=_[g&w];t:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O===0)I[f++]=x&65535;else if(O&16){P=x&65535,O&=15,O&&(u<O&&(g+=E[o++]<<u,u+=8),P+=g&(1<<O)-1,g>>>=O,u-=O),u<15&&(g+=E[o++]<<u,u+=8,g+=E[o++]<<u,u+=8),x=S[g&b];r:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O&16){if(M=x&65535,O&=15,u<O&&(g+=E[o++]<<u,u+=8,u<O&&(g+=E[o++]<<u,u+=8)),M+=g&(1<<O)-1,M>l){r.msg="invalid distance too far back",a.mode=e;break e}if(g>>>=O,u-=O,O=f-v,M>O){if(O=M-O,O>y&&a.sane){r.msg="invalid distance too far back",a.mode=e;break e}if(W=0,V=m,h===0){if(W+=c-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}else if(h<O){if(W+=c+h-O,O-=h,O<P){P-=O;do I[f++]=m[W++];while(--O);if(W=0,h<P){O=h,P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}}else if(W+=h-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}for(;P>2;)I[f++]=V[W++],I[f++]=V[W++],I[f++]=V[W++],P-=3;P&&(I[f++]=V[W++],P>1&&(I[f++]=V[W++]))}else{W=f-M;do I[f++]=I[W++],I[f++]=I[W++],I[f++]=I[W++],P-=3;while(P>2);P&&(I[f++]=I[W++],P>1&&(I[f++]=I[W++]))}}else if((O&64)===0){x=S[(x&65535)+(g&(1<<O)-1)];continue r}else{r.msg="invalid distance code",a.mode=e;break e}break}}else if((O&64)===0){x=_[(x&65535)+(g&(1<<O)-1)];continue t}else if(O&32){a.mode=t;break e}else{r.msg="invalid literal/length code",a.mode=e;break e}break}}while(o<d&&f<s);P=u>>3,o-=P,u-=P<<3,g&=(1<<u)-1,r.next_in=o,r.next_out=f,r.avail_in=o<d?5+(d-o):5-(o-d),r.avail_out=f<s?257+(s-f):257-(f-s),a.hold=g,a.bits=u},Dn}var Nn,ks;function ym(){if(ks)return Nn;ks=1;var e=bn(),t=15,n=852,r=592,i=0,a=1,o=2,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Nn=function(c,y,h,m,g,u,_,S){var w=S.bits,b=0,x=0,O=0,P=0,M=0,W=0,V=0,E=0,I=0,$=0,z,X,A,k,j,N=null,H=0,B,q=new e.Buf16(t+1),L=new e.Buf16(t+1),D=null,F=0,K,J,ae;for(b=0;b<=t;b++)q[b]=0;for(x=0;x<m;x++)q[y[h+x]]++;for(M=w,P=t;P>=1&&q[P]===0;P--);if(M>P&&(M=P),P===0)return g[u++]=1<<24|64<<16|0,g[u++]=1<<24|64<<16|0,S.bits=1,0;for(O=1;O<P&&q[O]===0;O++);for(M<O&&(M=O),E=1,b=1;b<=t;b++)if(E<<=1,E-=q[b],E<0)return-1;if(E>0&&(c===i||P!==1))return-1;for(L[1]=0,b=1;b<t;b++)L[b+1]=L[b]+q[b];for(x=0;x<m;x++)y[h+x]!==0&&(_[L[y[h+x]]++]=x);if(c===i?(N=D=_,B=19):c===a?(N=d,H-=257,D=f,F-=257,B=256):(N=v,D=s,B=-1),$=0,x=0,b=O,j=u,W=M,V=0,A=-1,I=1<<M,k=I-1,c===a&&I>n||c===o&&I>r)return 1;for(;;){K=b-V,_[x]<B?(J=0,ae=_[x]):_[x]>B?(J=D[F+_[x]],ae=N[H+_[x]]):(J=96,ae=0),z=1<<b-V,X=1<<W,O=X;do X-=z,g[j+($>>V)+X]=K<<24|J<<16|ae|0;while(X!==0);for(z=1<<b-1;$&z;)z>>=1;if(z!==0?($&=z-1,$+=z):$=0,x++,--q[b]===0){if(b===P)break;b=y[h+_[x]]}if(b>M&&($&k)!==A){for(V===0&&(V=M),j+=O,W=b-V,E=1<<W;W+V<P&&(E-=q[W+V],!(E<=0));)W++,E<<=1;if(I+=1<<W,c===a&&I>n||c===o&&I>r)return 1;A=$&k,g[A]=M<<24|W<<16|j-u|0}}return $!==0&&(g[j+$]=b-V<<24|64<<16|0),S.bits=M,0},Nn}var Ps;function _m(){if(Ps)return it;Ps=1;var e=bn(),t=ld(),n=fd(),r=vm(),i=ym(),a=0,o=1,d=2,f=4,v=5,s=6,l=0,c=1,y=2,h=-2,m=-3,g=-4,u=-5,_=8,S=1,w=2,b=3,x=4,O=5,P=6,M=7,W=8,V=9,E=10,I=11,$=12,z=13,X=14,A=15,k=16,j=17,N=18,H=19,B=20,q=21,L=22,D=23,F=24,K=25,J=26,ae=27,ue=28,ve=29,me=30,we=31,Ce=32,Pe=852,je=592,Ie=15,Se=Ie;function $e(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function st(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qe(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,Z.total_in=Z.total_out=ie.total=0,Z.msg="",ie.wrap&&(Z.adler=ie.wrap&1),ie.mode=S,ie.last=0,ie.havedict=0,ie.dmax=32768,ie.head=null,ie.hold=0,ie.bits=0,ie.lencode=ie.lendyn=new e.Buf32(Pe),ie.distcode=ie.distdyn=new e.Buf32(je),ie.sane=1,ie.back=-1,l)}function Ne(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,ie.wsize=0,ie.whave=0,ie.wnext=0,qe(Z))}function Ye(Z,ie){var R,oe;return!Z||!Z.state||(oe=Z.state,ie<0?(R=0,ie=-ie):(R=(ie>>4)+1,ie<48&&(ie&=15)),ie&&(ie<8||ie>15))?h:(oe.window!==null&&oe.wbits!==ie&&(oe.window=null),oe.wrap=R,oe.wbits=ie,Ne(Z))}function Y(Z,ie){var R,oe;return Z?(oe=new st,Z.state=oe,oe.window=null,R=Ye(Z,ie),R!==l&&(Z.state=null),R):h}function Q(Z){return Y(Z,Se)}var le=!0,ge,de;function Re(Z){if(le){var ie;for(ge=new e.Buf32(512),de=new e.Buf32(32),ie=0;ie<144;)Z.lens[ie++]=8;for(;ie<256;)Z.lens[ie++]=9;for(;ie<280;)Z.lens[ie++]=7;for(;ie<288;)Z.lens[ie++]=8;for(i(o,Z.lens,0,288,ge,0,Z.work,{bits:9}),ie=0;ie<32;)Z.lens[ie++]=5;i(d,Z.lens,0,32,de,0,Z.work,{bits:5}),le=!1}Z.lencode=ge,Z.lenbits=9,Z.distcode=de,Z.distbits=5}function Oe(Z,ie,R,oe){var be,p=Z.state;return p.window===null&&(p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new e.Buf8(p.wsize)),oe>=p.wsize?(e.arraySet(p.window,ie,R-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize):(be=p.wsize-p.wnext,be>oe&&(be=oe),e.arraySet(p.window,ie,R-oe,be,p.wnext),oe-=be,oe?(e.arraySet(p.window,ie,R-oe,oe,0),p.wnext=oe,p.whave=p.wsize):(p.wnext+=be,p.wnext===p.wsize&&(p.wnext=0),p.whave<p.wsize&&(p.whave+=be))),0}function C(Z,ie){var R,oe,be,p,te,re,T,G,ee,_e,he,pe,Ae,vt,Le=0,xe,Ue,Je,Xe,br,wr,Me,nt,Ge=new e.Buf8(4),yt,dt,gs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return h;R=Z.state,R.mode===$&&(R.mode=z),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,_e=re,he=T,nt=l;e:for(;;)switch(R.mode){case S:if(R.wrap===0){R.mode=z;break}for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.wrap&2&&G===35615){R.check=0,Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0),G=0,ee=0,R.mode=w;break}if(R.flags=0,R.head&&(R.head.done=!1),!(R.wrap&1)||(((G&255)<<8)+(G>>8))%31){Z.msg="incorrect header check",R.mode=me;break}if((G&15)!==_){Z.msg="unknown compression method",R.mode=me;break}if(G>>>=4,ee-=4,Me=(G&15)+8,R.wbits===0)R.wbits=Me;else if(Me>R.wbits){Z.msg="invalid window size",R.mode=me;break}R.dmax=1<<Me,Z.adler=R.check=1,R.mode=G&512?E:$,G=0,ee=0;break;case w:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.flags=G,(R.flags&255)!==_){Z.msg="unknown compression method",R.mode=me;break}if(R.flags&57344){Z.msg="unknown header flags set",R.mode=me;break}R.head&&(R.head.text=G>>8&1),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=b;case b:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.time=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,Ge[2]=G>>>16&255,Ge[3]=G>>>24&255,R.check=n(R.check,Ge,4,0)),G=0,ee=0,R.mode=x;case x:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.xflags=G&255,R.head.os=G>>8),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=O;case O:if(R.flags&1024){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length=G,R.head&&(R.head.extra_len=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0}else R.head&&(R.head.extra=null);R.mode=P;case P:if(R.flags&1024&&(pe=R.length,pe>re&&(pe=re),pe&&(R.head&&(Me=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),e.arraySet(R.head.extra,oe,p,pe,Me)),R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,R.length-=pe),R.length))break e;R.length=0,R.mode=M;case M:if(R.flags&2048){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.name+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=W;case W:if(R.flags&4096){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.comment+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.comment=null);R.mode=V;case V:if(R.flags&512){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.check&65535)){Z.msg="header crc mismatch",R.mode=me;break}G=0,ee=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),Z.adler=R.check=0,R.mode=$;break;case E:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}Z.adler=R.check=$e(G),G=0,ee=0,R.mode=I;case I:if(R.havedict===0)return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,y;Z.adler=R.check=1,R.mode=$;case $:if(ie===v||ie===s)break e;case z:if(R.last){G>>>=ee&7,ee-=ee&7,R.mode=ae;break}for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}switch(R.last=G&1,G>>>=1,ee-=1,G&3){case 0:R.mode=X;break;case 1:if(Re(R),R.mode=B,ie===s){G>>>=2,ee-=2;break e}break;case 2:R.mode=j;break;case 3:Z.msg="invalid block type",R.mode=me}G>>>=2,ee-=2;break;case X:for(G>>>=ee&7,ee-=ee&7;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((G&65535)!==(G>>>16^65535)){Z.msg="invalid stored block lengths",R.mode=me;break}if(R.length=G&65535,G=0,ee=0,R.mode=A,ie===s)break e;case A:R.mode=k;case k:if(pe=R.length,pe){if(pe>re&&(pe=re),pe>T&&(pe=T),pe===0)break e;e.arraySet(be,oe,p,pe,te),re-=pe,p+=pe,T-=pe,te+=pe,R.length-=pe;break}R.mode=$;break;case j:for(;ee<14;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.nlen=(G&31)+257,G>>>=5,ee-=5,R.ndist=(G&31)+1,G>>>=5,ee-=5,R.ncode=(G&15)+4,G>>>=4,ee-=4,R.nlen>286||R.ndist>30){Z.msg="too many length or distance symbols",R.mode=me;break}R.have=0,R.mode=N;case N:for(;R.have<R.ncode;){for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.lens[gs[R.have++]]=G&7,G>>>=3,ee-=3}for(;R.have<19;)R.lens[gs[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,yt={bits:R.lenbits},nt=i(a,R.lens,0,19,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid code lengths set",R.mode=me;break}R.have=0,R.mode=H;case H:for(;R.have<R.nlen+R.ndist;){for(;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Je<16)G>>>=xe,ee-=xe,R.lens[R.have++]=Je;else{if(Je===16){for(dt=xe+2;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G>>>=xe,ee-=xe,R.have===0){Z.msg="invalid bit length repeat",R.mode=me;break}Me=R.lens[R.have-1],pe=3+(G&3),G>>>=2,ee-=2}else if(Je===17){for(dt=xe+3;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=3+(G&7),G>>>=3,ee-=3}else{for(dt=xe+7;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=11+(G&127),G>>>=7,ee-=7}if(R.have+pe>R.nlen+R.ndist){Z.msg="invalid bit length repeat",R.mode=me;break}for(;pe--;)R.lens[R.have++]=Me}}if(R.mode===me)break;if(R.lens[256]===0){Z.msg="invalid code -- missing end-of-block",R.mode=me;break}if(R.lenbits=9,yt={bits:R.lenbits},nt=i(o,R.lens,0,R.nlen,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid literal/lengths set",R.mode=me;break}if(R.distbits=6,R.distcode=R.distdyn,yt={bits:R.distbits},nt=i(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,yt),R.distbits=yt.bits,nt){Z.msg="invalid distances set",R.mode=me;break}if(R.mode=B,ie===s)break e;case B:R.mode=q;case q:if(re>=6&&T>=258){Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,r(Z,he),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,R.mode===$&&(R.back=-1);break}for(R.back=0;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Ue&&(Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.lencode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,R.length=Je,Ue===0){R.mode=J;break}if(Ue&32){R.back=-1,R.mode=$;break}if(Ue&64){Z.msg="invalid literal/length code",R.mode=me;break}R.extra=Ue&15,R.mode=L;case L:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=D;case D:for(;Le=R.distcode[G&(1<<R.distbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.distcode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,Ue&64){Z.msg="invalid distance code",R.mode=me;break}R.offset=Je,R.extra=Ue&15,R.mode=F;case F:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.offset+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){Z.msg="invalid distance too far back",R.mode=me;break}R.mode=K;case K:if(T===0)break e;if(pe=he-T,R.offset>pe){if(pe=R.offset-pe,pe>R.whave&&R.sane){Z.msg="invalid distance too far back",R.mode=me;break}pe>R.wnext?(pe-=R.wnext,Ae=R.wsize-pe):Ae=R.wnext-pe,pe>R.length&&(pe=R.length),vt=R.window}else vt=be,Ae=te-R.offset,pe=R.length;pe>T&&(pe=T),T-=pe,R.length-=pe;do be[te++]=vt[Ae++];while(--pe);R.length===0&&(R.mode=q);break;case J:if(T===0)break e;be[te++]=R.length,T--,R.mode=q;break;case ae:if(R.wrap){for(;ee<32;){if(re===0)break e;re--,G|=oe[p++]<<ee,ee+=8}if(he-=T,Z.total_out+=he,R.total+=he,he&&(Z.adler=R.check=R.flags?n(R.check,be,he,te-he):t(R.check,be,he,te-he)),he=T,(R.flags?G:$e(G))!==R.check){Z.msg="incorrect data check",R.mode=me;break}G=0,ee=0}R.mode=ue;case ue:if(R.wrap&&R.flags){for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.total&4294967295)){Z.msg="incorrect length check",R.mode=me;break}G=0,ee=0}R.mode=ve;case ve:nt=c;break e;case me:nt=m;break e;case we:return g;case Ce:default:return h}return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,(R.wsize||he!==Z.avail_out&&R.mode<me&&(R.mode<ae||ie!==f))&&Oe(Z,Z.output,Z.next_out,he-Z.avail_out),_e-=Z.avail_in,he-=Z.avail_out,Z.total_in+=_e,Z.total_out+=he,R.total+=he,R.wrap&&he&&(Z.adler=R.check=R.flags?n(R.check,be,he,Z.next_out-he):t(R.check,be,he,Z.next_out-he)),Z.data_type=R.bits+(R.last?64:0)+(R.mode===$?128:0)+(R.mode===B||R.mode===A?256:0),(_e===0&&he===0||ie===f)&&nt===l&&(nt=u),nt}function ne(Z){if(!Z||!Z.state)return h;var ie=Z.state;return ie.window&&(ie.window=null),Z.state=null,l}function se(Z,ie){var R;return!Z||!Z.state||(R=Z.state,(R.wrap&2)===0)?h:(R.head=ie,ie.done=!1,l)}function fe(Z,ie){var R=ie.length,oe,be,p;return!Z||!Z.state||(oe=Z.state,oe.wrap!==0&&oe.mode!==I)?h:oe.mode===I&&(be=1,be=t(be,ie,R,0),be!==oe.check)?m:(p=Oe(Z,ie,R,R),p?(oe.mode=we,g):(oe.havedict=1,l))}return it.inflateReset=Ne,it.inflateReset2=Ye,it.inflateResetKeep=qe,it.inflateInit=Q,it.inflateInit2=Y,it.inflate=C,it.inflateEnd=ne,it.inflateGetHeader=se,it.inflateSetDictionary=fe,it.inflateInfo="pako inflate (from Nodeca project)",it}var Mn,js;function bm(){return js||(js=1,Mn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Mn}function wm(){const{useDynamicConfig:e}=wt(),{configValue:t,isDynamicConfigLoading:n}=e(At.creditAgentEnablement),r=He.getSignedInUser()?.userEmail;return{isAllowed:ce.useMemo(()=>{const a=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&a.includes(r)},[t,r]),isLoading:n}}function Et(){const{isAllowed:e}=wm();return e?Tp:Ap}const Sm={overlayWidth:new at(100,100,50)};function Ls(){const e=Be(),t=We(),n=lr(),r=Bt(),i=Et(),a=Ee(V=>qf(V)),o=a.uiState.selectedCustomerTenantId,d=ce.useMemo(()=>o?a.customers.find(V=>V.tenantId===o):void 0,[a.customers,o]),f=Ee(V=>o?Df(V.aiAccountantCustomerState,V.userState,o):[]),v=a.customerViewStateByTenantId[o],s=v?.jobsFetchStatus??{fetchState:"Not-Started"},l=v?.jobsPageToken!=null;ce.useEffect(()=>{a.fetchState==="Completed"?t(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&t(vs())},[a.fetchState]);const c=V=>{const E=kt(V),I=Ft(V);Fe.trackCockpitTabClicked(I),e(`../../${E}`,{replace:!0})},y=(V,E,I,$)=>{t(Dt([V.tenantId])),t(an(E,I,$))},h=(V,E,I)=>{t(an(V,E,I))},m=(V,E)=>{t(Dt(a.unonboardedTenantIds)),t(an("retrain",V,E))},g=V=>{const E=a.selectedTenantIds,I=E.includes(V)?E.filter($=>$!==V):[...E,V];t(Dt(I))},u=V=>{if(V.length===0)return;const E=a.selectedTenantIds,I=new Set(E);if(V.every(z=>I.has(z))){const z=new Set(V);t(Dt(E.filter(X=>!z.has(X))))}else{const z=Array.from(new Set([...E,...V]));t(Dt(z))}},_=()=>{t(Dt([]))},S=V=>{t(Nf(V.companyId,V.tenantId))},w=V=>{V==="aiAccountant"&&t(vs())},b=(V,E)=>{t(Jt({sortKey:V,sortOrder:E}))},x=V=>{t(Jt({selectedCustomerTenantId:V.tenantId})),t(sn(V.tenantId))},O=()=>{t(Jt({selectedCustomerTenantId:""}))},P=V=>{t(Jt({filterText:V}))},M=(V,E)=>{t(Jt({filters:E}))},W=()=>{o&&t(sn(o,!0))};return U.jsxs(U.Fragment,{children:[U.jsx(Ip,{headerData:{allTabOptions:i,selectedTabOption:St("aiAccountant")},headerActions:{onTabChange:c},aiAccountantPageData:{aiAccountantView:a},aiAccountantPageActions:{onAction:y,onBulkAction:h,onCancelOnboarding:S,onClearSelection:_,onCockpitReloadData:w,onColumnSortConfigChanged:b,onCustomerSelected:x,onEvaluateAll:m,onFilterTextChanged:P,onFiltersChange:M,onToggleAllVisible:u,onToggleTenantSelection:g}}),U.jsx(dr,{anchor:"right",open:d!=null,PaperProps:{style:{width:Sm.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:O,children:d!=null&&U.jsx(nd,{customer:d,hasMoreJobs:l,jobs:f,jobsFetchStatus:s,onAction:y,onCancelOnboarding:S,onClose:O,onLoadMoreJobs:W})})]})}function Em(){const{tenantId:e=""}=ot(),t=Be(),n=We(),r=Ee(c=>ch(c.aiAccountantCustomerState,c.userState)),i=Ee(c=>qf(c)),a=r.find(c=>c.tenantId===e),o=i.customerViewStateByTenantId[e],d=Ee(c=>Df(c.aiAccountantCustomerState,c.userState,e));if(ce.useEffect(()=>{n(sn(e))},[e,n]),a==null)return null;const f=(c,y,h,m)=>{n(Dt([c.tenantId])),n(an(y,h,m))},v=c=>{n(Nf(c.companyId,c.tenantId))},s=()=>{t("../")},l=()=>{n(sn(e,!0))};return U.jsx(nd,{customer:a,hasMoreJobs:o?.jobsPageToken!=null,jobs:d,jobsFetchStatus:o?.jobsFetchStatus??{fetchState:"Not-Started"},onAction:f,onCancelOnboarding:v,onClose:s,onLoadMoreJobs:l})}const dd=(e,t)=>{const n=[...e??[]];return n.push(t),n},Rm=e=>{const t=[...e??[]];return{poppedPathname:t.pop(),newStack:t}},Om=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ke=({state:e,element:t})=>He.isSignedIn()===!0?U.jsx(U.Fragment,{children:t}):U.jsx(ir,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function Tm(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Ls,{})})}),U.jsx(Te,{path:"/detail/:tenantId",element:U.jsx(ke,{element:U.jsx(Em,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Ls,{})})})]})}const Ut=()=>{const[e,t]=cd(),[n,r]=ce.useState(),i=ce.useRef(!1);return ce.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const o=xp(e);o!=null&&r(o);const d=new URLSearchParams(e);d.delete("thread_id"),d.delete("entity_type"),d.delete("company_id"),t(d,{replace:!0}),i.current=!0},[e,t]),n},Am={overlayWidth:new at(100,100,50)},{common:{strings:qs}}=fr.getLocalizedStrings();function Im(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Sr({uiState:{filterText:r}}))},onFiltersChange:(n,r)=>{r.categories!=null&&r.categoryCombinationOperator!=null&&Fe.trackHealthMonitorFiltersApplied({filterSelection:{condition:r.categories.map(i=>i.matchingOperator).join(qs.comma),logic:r.categoryCombinationOperator,parameter:r.categories.map(i=>i.field).join(qs.comma)}}),e(Sr({uiState:{filters:r}}))}}},healthPageActions:{onRowClick:n=>{e(Ff(n))},onColumnSortConfigChanged:(n,r)=>{e(Sr({uiState:{sortKey:n,sortOrder:r}}))},onCockpitReloadData:n=>{n==="healthMonitor"&&e(Mf())},onFiltersChange:n=>{e(Sr({uiState:{filters:n}}))}}}}function xm(e,t){return{healthPageData:{healthView:t.healthView,managementView:t.managementView,mixpanelUrl:t.mixpanelHMUrl}}}const Cm=ze(xm,Im)(jp);function Fn({isDrawerOpen:e}){const t=Be(),n=We(),r=Bt(),i=lr(),{companyId:a}=ot(),[o,d]=cd(),[f,v]=ce.useState(!1),s=Ut(),l=Et(),c=Ee(b=>lh(b)),y=Ee(b=>ur(b)),{additionalChurnFactors:h}=Ee(b=>fh(b)),{selectedCompanyDetail:m,selectedCompanyId:g,localFormDataAndStatusByCompanyId:u}=c,_=Ee(b=>b.companyViewState.zeniUsers.fetchState),S=Ee(b=>b.companyHealthMetricConfigViewState);if(ce.useEffect(()=>{const b=x=>x==="Not-Started"||x==="Error";c.fetchState==="Completed"?n(xt(!1)):b(c.fetchState)&&(n(Mf()),b(_)&&n(Ct()),b(S.fetchState)&&n(dh()))},[c.fetchState,S.fetchState]),ce.useEffect(()=>{a!=null&&c.fetchState==="Completed"&&o.has("utm_source")===!0&&(n(Ff(a)),m!=null&&(Cp(),Fe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:m.companyInfo.companyId,companyName:m.companyInfo.name,churnProbability:m.companyHealthMetric.churnProbabilityPercentage??null}),v(!0),o.delete("utm_source"),d(o)))},[c.fetchState,m?.companyInfo.companyId,m?.companyInfo.name]),He.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return U.jsxs(U.Fragment,{children:[e===!0||g!=null&&m!=null?U.jsx(dr,{anchor:"right",open:g!=null,PaperProps:{style:{width:Am.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>n(ys()),children:U.jsx(kp,{roomId:`cockpit_${g}`,autoConnect:!0,children:U.jsx(Pp,{onSaveClick:()=>{g!=null&&n(ph(g))},onSaveChangesToLocalStore:b=>{c.selectedCompanyId!=null&&n(hh({companyId:c.selectedCompanyId,updatedLocalData:b}))},localData:u?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:c,onCloseDrawer:()=>n(ys()),analytics:Fe,urlSource:f,additionalChurnFactorsOptions:h})})}):null,U.jsx(Cm,{headerData:{allTabOptions:l,selectedTabOption:St("healthMonitor")},initialOpenThreadRequest:s??void 0,healthView:c,managementView:y,navigate:t,mixpanelHMUrl:gn.mixpanelHMUrl})]})}function km(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Fn,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Fn,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Fn,{})})})]})}const Pm={drawerLeftMargin:new at(0,0,240)};function mr(e){const{isOpen:t,drawerLeftMargin:n,children:r,onClose:i}=e,a=lr(),o=n?.valuePx(a)??Pm.drawerLeftMargin.valuePx(a),d=Bt();return U.jsx(dr,{anchor:"right",open:t,PaperProps:{style:{width:`calc(100% - ${o})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:r})}const jm=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?U.jsx(Lm,{children:U.jsx(vn,{size:"ExtraLarge",start:!0})}):null,Lm=tt.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CreditAgentRoutes-C3KSn0qF.js","assets/liveblocks-BcpL_eIf.js","assets/sentry-CXD2tUYO.js","assets/core-B83eUXZg.js","assets/recharts-Dw9UyYxv.js","assets/zeni-epic-state-BPERiJiS.js","assets/index-Dj5tmvX1.js","assets/mui-RtA2F6xO.js","assets/analytics-Dxa9-SvV.js","assets/lottie-BP5NslbC.js","assets/lexical-D2527jek.js","assets/utils-DGW3GFUd.js","assets/index-Bd7ri422.css","assets/analyticsHelper-CEO3FRLE.js","assets/empty-BcNm9HyV.js","assets/index-Dr7wk9vq.js","assets/url-DqI0Vlwu.js","assets/index-CFDwKJZV.js"])))=>i.map(i=>d[i]);
2
+ import{S9 as qf,Sa as Df,lG as xt,f3 as vs,Sb as Dt,fc as an,f1 as Nf,Sc as Jt,f8 as sn,Sd as ch,Se as lh,Sf as ur,Sg as fh,jZ as Mf,lI as Ct,jW as dh,k1 as Ff,Sh as ys,k3 as hh,k4 as ph,Si as Sr,Sj as cr,js as mh,Sk as pn,Sl as Uo,dj as gh,h0 as Vo,gZ as un,h5 as Mt,h3 as vh,Sm as Bf,Sn as Uf,ki as yh,kf as _h,So as bh,kt as wh,ko as _s,kl as Sh,ka as Eh,Sp as Rh,eL as Oh,dr as Th,lU as Vf,Sq as Ah,be as on,k7 as bs,kc as Ih,Ax as $f,lH as mn,Sr as zf,Ss as pt,m3 as cn,l_ as Gf,kN as $o,St as xh,m6 as Ch,H as et,bm as zo,Su as kh,jp as Ph,Sv as jh,Sw as Hf,Sx as Lh,yR as ws,yn as qh,Sy as Dh,yt as In,Sz as Nh,yv as Mh,SA as Tt,yk as Fh,d7 as Bh,lL as Zf,lM as Wf,lK as Go,lJ as Ho,lN as Uh,SB as Vh,yU as $h,SC as zh,yB as Gh,yO as Hh,SD as Zh,yF as Wh,SE as Yh,SF as Kt,SG as Zo,SH as Jh,SI as Kh,sj as Xh,sp as Yf,SJ as Jf,iW as Qh,Re as Kf,SK as ep,R8 as tp,SL as rp,SM as np,ss as ip,SN as ap,Rj as op,R7 as sp,Cu as Xf,SO as xn,SP as Qf,NJ as Wo,Nv as up,NM as ed,Ny as cp,SQ as lp,ND as fp,Np as dp,Ns as hp,SR as pp,NQ as mp,NG as gp,bp as vp,bd as yp,SS as _p,ST as Gt,SU as bp,SV as wp,SW as Sp,kB as No,kx as Ep,kH as Rp,kK as Ss,ba as td}from"./zeni-epic-state-BPERiJiS.js";import{j as U}from"./liveblocks-BcpL_eIf.js";import{a as ce,p as ye,d as rd,c as Yo,g as Op}from"./sentry-CXD2tUYO.js";import{m as wt,j as At,z as He,B as Tp,a as Ap,o as lr,X as Ip,$ as St,J as nd,v as at,b as Fe,h as kt,g as Ft,f as xp,u as Cp,U as kp,K as Pp,c as gn,H as jp,G as fr,d as vn,n as Nt,r as Lp,D as qp,_ as yn,t as Dp,e as Np,i as Cn,Z as Mp,V as id,O as Fp,k as ad,l as od,p as Mo,q as Bp,s as Up,w as Vp,R as sd,x as $p,Q as zp,y as Gp,A as Hp,C as Zp,E as Wp,F as Yp,N as Jp,I as Kp,Y as Xp,L as Qp,M as em,P as ud}from"./index-Dj5tmvX1.js";import{f as tm}from"./analyticsHelper-CEO3FRLE.js";import{i as Be,n as We,g as Ee,o as ot,N as ir,k as gt,l as Te,p as cd,h as ze,u as Jo,j as Fo}from"./core-B83eUXZg.js";import{u as Bt,D as dr,n as tt,S as Zt}from"./mui-RtA2F6xO.js";import{a as Ze,b as rm,c as nm,d as im,e as Ko,f as am,g as om,h as sm,i as Wt,j as um,k as or,l as _n,m as cm,n as hr,o as lm}from"./utils-DGW3GFUd.js";import{r as Xo}from"./empty-BcNm9HyV.js";import{r as pr,a as fm}from"./index-Dr7wk9vq.js";import{r as dm}from"./index-CFDwKJZV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a8b97f4c-ad82-4fba-8f84-e00fc39d78da",e._sentryDebugIdIdentifier="sentry-dbid-a8b97f4c-ad82-4fba-8f84-e00fc39d78da")}catch{}})();var kn={},Es;function bn(){return Es||(Es=1,(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var d=o.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)n(d,f)&&(a[f]=d[f])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,d,f,v){if(o.subarray&&a.subarray){a.set(o.subarray(d,d+f),v);return}for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){var o,d,f,v,s,l;for(f=0,o=0,d=a.length;o<d;o++)f+=a[o].length;for(l=new Uint8Array(f),v=0,o=0,d=a.length;o<d;o++)s=a[o],l.set(s,v),v+=s.length;return l}},i={arraySet:function(a,o,d,f,v){for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(kn)),kn}var ut={},Pt={},Rs;function hm(){if(Rs)return Pt;Rs=1;var e=bn(),t=4,n=0,r=1,i=2;function a(C){for(var ne=C.length;--ne>=0;)C[ne]=0}var o=0,d=1,f=2,v=3,s=258,l=29,c=256,y=c+1+l,h=30,m=19,g=2*y+1,u=15,_=16,S=7,w=256,b=16,x=17,O=18,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=512,I=new Array((y+2)*2);a(I);var $=new Array(h*2);a($);var z=new Array(E);a(z);var X=new Array(s-v+1);a(X);var A=new Array(l);a(A);var k=new Array(h);a(k);function j(C,ne,se,fe,Z){this.static_tree=C,this.extra_bits=ne,this.extra_base=se,this.elems=fe,this.max_length=Z,this.has_stree=C&&C.length}var N,H,B;function q(C,ne){this.dyn_tree=C,this.max_code=0,this.stat_desc=ne}function L(C){return C<256?z[C]:z[256+(C>>>7)]}function D(C,ne){C.pending_buf[C.pending++]=ne&255,C.pending_buf[C.pending++]=ne>>>8&255}function F(C,ne,se){C.bi_valid>_-se?(C.bi_buf|=ne<<C.bi_valid&65535,D(C,C.bi_buf),C.bi_buf=ne>>_-C.bi_valid,C.bi_valid+=se-_):(C.bi_buf|=ne<<C.bi_valid&65535,C.bi_valid+=se)}function K(C,ne,se){F(C,se[ne*2],se[ne*2+1])}function J(C,ne){var se=0;do se|=C&1,C>>>=1,se<<=1;while(--ne>0);return se>>>1}function ae(C){C.bi_valid===16?(D(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function ue(C,ne){var se=ne.dyn_tree,fe=ne.max_code,Z=ne.stat_desc.static_tree,ie=ne.stat_desc.has_stree,R=ne.stat_desc.extra_bits,oe=ne.stat_desc.extra_base,be=ne.stat_desc.max_length,p,te,re,T,G,ee,_e=0;for(T=0;T<=u;T++)C.bl_count[T]=0;for(se[C.heap[C.heap_max]*2+1]=0,p=C.heap_max+1;p<g;p++)te=C.heap[p],T=se[se[te*2+1]*2+1]+1,T>be&&(T=be,_e++),se[te*2+1]=T,!(te>fe)&&(C.bl_count[T]++,G=0,te>=oe&&(G=R[te-oe]),ee=se[te*2],C.opt_len+=ee*(T+G),ie&&(C.static_len+=ee*(Z[te*2+1]+G)));if(_e!==0){do{for(T=be-1;C.bl_count[T]===0;)T--;C.bl_count[T]--,C.bl_count[T+1]+=2,C.bl_count[be]--,_e-=2}while(_e>0);for(T=be;T!==0;T--)for(te=C.bl_count[T];te!==0;)re=C.heap[--p],!(re>fe)&&(se[re*2+1]!==T&&(C.opt_len+=(T-se[re*2+1])*se[re*2],se[re*2+1]=T),te--)}}function ve(C,ne,se){var fe=new Array(u+1),Z=0,ie,R;for(ie=1;ie<=u;ie++)fe[ie]=Z=Z+se[ie-1]<<1;for(R=0;R<=ne;R++){var oe=C[R*2+1];oe!==0&&(C[R*2]=J(fe[oe]++,oe))}}function me(){var C,ne,se,fe,Z,ie=new Array(u+1);for(se=0,fe=0;fe<l-1;fe++)for(A[fe]=se,C=0;C<1<<P[fe];C++)X[se++]=fe;for(X[se-1]=fe,Z=0,fe=0;fe<16;fe++)for(k[fe]=Z,C=0;C<1<<M[fe];C++)z[Z++]=fe;for(Z>>=7;fe<h;fe++)for(k[fe]=Z<<7,C=0;C<1<<M[fe]-7;C++)z[256+Z++]=fe;for(ne=0;ne<=u;ne++)ie[ne]=0;for(C=0;C<=143;)I[C*2+1]=8,C++,ie[8]++;for(;C<=255;)I[C*2+1]=9,C++,ie[9]++;for(;C<=279;)I[C*2+1]=7,C++,ie[7]++;for(;C<=287;)I[C*2+1]=8,C++,ie[8]++;for(ve(I,y+1,ie),C=0;C<h;C++)$[C*2+1]=5,$[C*2]=J(C,5);N=new j(I,P,c+1,y,u),H=new j($,M,0,h,u),B=new j(new Array(0),W,0,m,S)}function we(C){var ne;for(ne=0;ne<y;ne++)C.dyn_ltree[ne*2]=0;for(ne=0;ne<h;ne++)C.dyn_dtree[ne*2]=0;for(ne=0;ne<m;ne++)C.bl_tree[ne*2]=0;C.dyn_ltree[w*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Ce(C){C.bi_valid>8?D(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Pe(C,ne,se,fe){Ce(C),D(C,se),D(C,~se),e.arraySet(C.pending_buf,C.window,ne,se,C.pending),C.pending+=se}function je(C,ne,se,fe){var Z=ne*2,ie=se*2;return C[Z]<C[ie]||C[Z]===C[ie]&&fe[ne]<=fe[se]}function Ie(C,ne,se){for(var fe=C.heap[se],Z=se<<1;Z<=C.heap_len&&(Z<C.heap_len&&je(ne,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!je(ne,fe,C.heap[Z],C.depth));)C.heap[se]=C.heap[Z],se=Z,Z<<=1;C.heap[se]=fe}function Se(C,ne,se){var fe,Z,ie=0,R,oe;if(C.last_lit!==0)do fe=C.pending_buf[C.d_buf+ie*2]<<8|C.pending_buf[C.d_buf+ie*2+1],Z=C.pending_buf[C.l_buf+ie],ie++,fe===0?K(C,Z,ne):(R=X[Z],K(C,R+c+1,ne),oe=P[R],oe!==0&&(Z-=A[R],F(C,Z,oe)),fe--,R=L(fe),K(C,R,se),oe=M[R],oe!==0&&(fe-=k[R],F(C,fe,oe)));while(ie<C.last_lit);K(C,w,ne)}function $e(C,ne){var se=ne.dyn_tree,fe=ne.stat_desc.static_tree,Z=ne.stat_desc.has_stree,ie=ne.stat_desc.elems,R,oe,be=-1,p;for(C.heap_len=0,C.heap_max=g,R=0;R<ie;R++)se[R*2]!==0?(C.heap[++C.heap_len]=be=R,C.depth[R]=0):se[R*2+1]=0;for(;C.heap_len<2;)p=C.heap[++C.heap_len]=be<2?++be:0,se[p*2]=1,C.depth[p]=0,C.opt_len--,Z&&(C.static_len-=fe[p*2+1]);for(ne.max_code=be,R=C.heap_len>>1;R>=1;R--)Ie(C,se,R);p=ie;do R=C.heap[1],C.heap[1]=C.heap[C.heap_len--],Ie(C,se,1),oe=C.heap[1],C.heap[--C.heap_max]=R,C.heap[--C.heap_max]=oe,se[p*2]=se[R*2]+se[oe*2],C.depth[p]=(C.depth[R]>=C.depth[oe]?C.depth[R]:C.depth[oe])+1,se[R*2+1]=se[oe*2+1]=p,C.heap[1]=p++,Ie(C,se,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],ue(C,ne),ve(se,be,C.bl_count)}function st(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),ne[(se+1)*2+1]=65535,fe=0;fe<=se;fe++)ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)&&(oe<p?C.bl_tree[ie*2]+=oe:ie!==0?(ie!==Z&&C.bl_tree[ie*2]++,C.bl_tree[b*2]++):oe<=10?C.bl_tree[x*2]++:C.bl_tree[O*2]++,oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4))}function qe(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),fe=0;fe<=se;fe++)if(ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)){if(oe<p)do K(C,ie,C.bl_tree);while(--oe!==0);else ie!==0?(ie!==Z&&(K(C,ie,C.bl_tree),oe--),K(C,b,C.bl_tree),F(C,oe-3,2)):oe<=10?(K(C,x,C.bl_tree),F(C,oe-3,3)):(K(C,O,C.bl_tree),F(C,oe-11,7));oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4)}}function Ne(C){var ne;for(st(C,C.dyn_ltree,C.l_desc.max_code),st(C,C.dyn_dtree,C.d_desc.max_code),$e(C,C.bl_desc),ne=m-1;ne>=3&&C.bl_tree[V[ne]*2+1]===0;ne--);return C.opt_len+=3*(ne+1)+5+5+4,ne}function Ye(C,ne,se,fe){var Z;for(F(C,ne-257,5),F(C,se-1,5),F(C,fe-4,4),Z=0;Z<fe;Z++)F(C,C.bl_tree[V[Z]*2+1],3);qe(C,C.dyn_ltree,ne-1),qe(C,C.dyn_dtree,se-1)}function Y(C){var ne=4093624447,se;for(se=0;se<=31;se++,ne>>>=1)if(ne&1&&C.dyn_ltree[se*2]!==0)return n;if(C.dyn_ltree[18]!==0||C.dyn_ltree[20]!==0||C.dyn_ltree[26]!==0)return r;for(se=32;se<c;se++)if(C.dyn_ltree[se*2]!==0)return r;return n}var Q=!1;function le(C){Q||(me(),Q=!0),C.l_desc=new q(C.dyn_ltree,N),C.d_desc=new q(C.dyn_dtree,H),C.bl_desc=new q(C.bl_tree,B),C.bi_buf=0,C.bi_valid=0,we(C)}function ge(C,ne,se,fe){F(C,(o<<1)+(fe?1:0),3),Pe(C,ne,se)}function de(C){F(C,d<<1,3),K(C,w,I),ae(C)}function Re(C,ne,se,fe){var Z,ie,R=0;C.level>0?(C.strm.data_type===i&&(C.strm.data_type=Y(C)),$e(C,C.l_desc),$e(C,C.d_desc),R=Ne(C),Z=C.opt_len+3+7>>>3,ie=C.static_len+3+7>>>3,ie<=Z&&(Z=ie)):Z=ie=se+5,se+4<=Z&&ne!==-1?ge(C,ne,se,fe):C.strategy===t||ie===Z?(F(C,(d<<1)+(fe?1:0),3),Se(C,I,$)):(F(C,(f<<1)+(fe?1:0),3),Ye(C,C.l_desc.max_code+1,C.d_desc.max_code+1,R+1),Se(C,C.dyn_ltree,C.dyn_dtree)),we(C),fe&&Ce(C)}function Oe(C,ne,se){return C.pending_buf[C.d_buf+C.last_lit*2]=ne>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=ne&255,C.pending_buf[C.l_buf+C.last_lit]=se&255,C.last_lit++,ne===0?C.dyn_ltree[se*2]++:(C.matches++,ne--,C.dyn_ltree[(X[se]+c+1)*2]++,C.dyn_dtree[L(ne)*2]++),C.last_lit===C.lit_bufsize-1}return Pt._tr_init=le,Pt._tr_stored_block=ge,Pt._tr_flush_block=Re,Pt._tr_tally=Oe,Pt._tr_align=de,Pt}var Pn,Os;function ld(){if(Os)return Pn;Os=1;function e(t,n,r,i){for(var a=t&65535|0,o=t>>>16&65535|0,d=0;r!==0;){d=r>2e3?2e3:r,r-=d;do a=a+n[i++]|0,o=o+a|0;while(--d);a%=65521,o%=65521}return a|o<<16|0}return Pn=e,Pn}var jn,Ts;function fd(){if(Ts)return jn;Ts=1;function e(){for(var r,i=[],a=0;a<256;a++){r=a;for(var o=0;o<8;o++)r=r&1?3988292384^r>>>1:r>>>1;i[a]=r}return i}var t=e();function n(r,i,a,o){var d=t,f=o+a;r^=-1;for(var v=o;v<f;v++)r=r>>>8^d[(r^i[v])&255];return r^-1}return jn=n,jn}var Ln,As;function pm(){return As||(As=1,Ln={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Ln}var Is;function mm(){if(Is)return ut;Is=1;var e=bn(),t=hm(),n=ld(),r=fd(),i=pm(),a=0,o=1,d=3,f=4,v=5,s=0,l=1,c=-2,y=-3,h=-5,m=-1,g=1,u=2,_=3,S=4,w=0,b=2,x=8,O=9,P=15,M=8,W=29,V=256,E=V+1+W,I=30,$=19,z=2*E+1,X=15,A=3,k=258,j=k+A+1,N=32,H=42,B=69,q=73,L=91,D=103,F=113,K=666,J=1,ae=2,ue=3,ve=4,me=3;function we(p,te){return p.msg=i[te],te}function Ce(p){return(p<<1)-(p>4?9:0)}function Pe(p){for(var te=p.length;--te>=0;)p[te]=0}function je(p){var te=p.state,re=te.pending;re>p.avail_out&&(re=p.avail_out),re!==0&&(e.arraySet(p.output,te.pending_buf,te.pending_out,re,p.next_out),p.next_out+=re,te.pending_out+=re,p.total_out+=re,p.avail_out-=re,te.pending-=re,te.pending===0&&(te.pending_out=0))}function Ie(p,te){t._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,te),p.block_start=p.strstart,je(p.strm)}function Se(p,te){p.pending_buf[p.pending++]=te}function $e(p,te){p.pending_buf[p.pending++]=te>>>8&255,p.pending_buf[p.pending++]=te&255}function st(p,te,re,T){var G=p.avail_in;return G>T&&(G=T),G===0?0:(p.avail_in-=G,e.arraySet(te,p.input,p.next_in,G,re),p.state.wrap===1?p.adler=n(p.adler,te,G,re):p.state.wrap===2&&(p.adler=r(p.adler,te,G,re)),p.next_in+=G,p.total_in+=G,G)}function qe(p,te){var re=p.max_chain_length,T=p.strstart,G,ee,_e=p.prev_length,he=p.nice_match,pe=p.strstart>p.w_size-j?p.strstart-(p.w_size-j):0,Ae=p.window,vt=p.w_mask,Le=p.prev,xe=p.strstart+k,Ue=Ae[T+_e-1],Je=Ae[T+_e];p.prev_length>=p.good_match&&(re>>=2),he>p.lookahead&&(he=p.lookahead);do if(G=te,!(Ae[G+_e]!==Je||Ae[G+_e-1]!==Ue||Ae[G]!==Ae[T]||Ae[++G]!==Ae[T+1])){T+=2,G++;do;while(Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&T<xe);if(ee=k-(xe-T),T=xe-k,ee>_e){if(p.match_start=te,_e=ee,ee>=he)break;Ue=Ae[T+_e-1],Je=Ae[T+_e]}}while((te=Le[te&vt])>pe&&--re!==0);return _e<=p.lookahead?_e:p.lookahead}function Ne(p){var te=p.w_size,re,T,G,ee,_e;do{if(ee=p.window_size-p.lookahead-p.strstart,p.strstart>=te+(te-j)){e.arraySet(p.window,p.window,te,te,0),p.match_start-=te,p.strstart-=te,p.block_start-=te,T=p.hash_size,re=T;do G=p.head[--re],p.head[re]=G>=te?G-te:0;while(--T);T=te,re=T;do G=p.prev[--re],p.prev[re]=G>=te?G-te:0;while(--T);ee+=te}if(p.strm.avail_in===0)break;if(T=st(p.strm,p.window,p.strstart+p.lookahead,ee),p.lookahead+=T,p.lookahead+p.insert>=A)for(_e=p.strstart-p.insert,p.ins_h=p.window[_e],p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+1])&p.hash_mask;p.insert&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+A-1])&p.hash_mask,p.prev[_e&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=_e,_e++,p.insert--,!(p.lookahead+p.insert<A)););}while(p.lookahead<j&&p.strm.avail_in!==0)}function Ye(p,te){var re=65535;for(re>p.pending_buf_size-5&&(re=p.pending_buf_size-5);;){if(p.lookahead<=1){if(Ne(p),p.lookahead===0&&te===a)return J;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var T=p.block_start+re;if((p.strstart===0||p.strstart>=T)&&(p.lookahead=p.strstart-T,p.strstart=T,Ie(p,!1),p.strm.avail_out===0)||p.strstart-p.block_start>=p.w_size-j&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):(p.strstart>p.block_start&&(Ie(p,!1),p.strm.avail_out===0),J)}function Y(p,te){for(var re,T;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),re!==0&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re)),p.match_length>=A)if(T=t._tr_tally(p,p.strstart-p.match_start,p.match_length-A),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=A){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else T=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(T&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function Q(p,te){for(var re,T,G;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=A-1,re!==0&&p.prev_length<p.max_lazy_match&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re),p.match_length<=5&&(p.strategy===g||p.match_length===A&&p.strstart-p.match_start>4096)&&(p.match_length=A-1)),p.prev_length>=A&&p.match_length<=p.prev_length){G=p.strstart+p.lookahead-A,T=t._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-A),p.lookahead-=p.prev_length-1,p.prev_length-=2;do++p.strstart<=G&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart);while(--p.prev_length!==0);if(p.match_available=0,p.match_length=A-1,p.strstart++,T&&(Ie(p,!1),p.strm.avail_out===0))return J}else if(p.match_available){if(T=t._tr_tally(p,0,p.window[p.strstart-1]),T&&Ie(p,!1),p.strstart++,p.lookahead--,p.strm.avail_out===0)return J}else p.match_available=1,p.strstart++,p.lookahead--}return p.match_available&&(T=t._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0),p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function le(p,te){for(var re,T,G,ee,_e=p.window;;){if(p.lookahead<=k){if(Ne(p),p.lookahead<=k&&te===a)return J;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=A&&p.strstart>0&&(G=p.strstart-1,T=_e[G],T===_e[++G]&&T===_e[++G]&&T===_e[++G])){ee=p.strstart+k;do;while(T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&G<ee);p.match_length=k-(ee-G),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=A?(re=t._tr_tally(p,1,p.match_length-A),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function ge(p,te){for(var re;;){if(p.lookahead===0&&(Ne(p),p.lookahead===0)){if(te===a)return J;break}if(p.match_length=0,re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function de(p,te,re,T,G){this.good_length=p,this.max_lazy=te,this.nice_length=re,this.max_chain=T,this.func=G}var Re;Re=[new de(0,0,0,0,Ye),new de(4,4,8,4,Y),new de(4,5,16,8,Y),new de(4,6,32,32,Y),new de(4,4,16,16,Q),new de(8,16,32,32,Q),new de(8,16,128,128,Q),new de(8,32,128,256,Q),new de(32,128,258,1024,Q),new de(32,258,258,4096,Q)];function Oe(p){p.window_size=2*p.w_size,Pe(p.head),p.max_lazy_match=Re[p.level].max_lazy,p.good_match=Re[p.level].good_length,p.nice_match=Re[p.level].nice_length,p.max_chain_length=Re[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=A-1,p.match_available=0,p.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(z*2),this.dyn_dtree=new e.Buf16((2*I+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),Pe(this.dyn_ltree),Pe(this.dyn_dtree),Pe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(X+1),this.heap=new e.Buf16(2*E+1),Pe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*E+1),Pe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ne(p){var te;return!p||!p.state?we(p,c):(p.total_in=p.total_out=0,p.data_type=b,te=p.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?H:F,p.adler=te.wrap===2?0:1,te.last_flush=a,t._tr_init(te),s)}function se(p){var te=ne(p);return te===s&&Oe(p.state),te}function fe(p,te){return!p||!p.state||p.state.wrap!==2?c:(p.state.gzhead=te,s)}function Z(p,te,re,T,G,ee){if(!p)return c;var _e=1;if(te===m&&(te=6),T<0?(_e=0,T=-T):T>15&&(_e=2,T-=16),G<1||G>O||re!==x||T<8||T>15||te<0||te>9||ee<0||ee>S)return we(p,c);T===8&&(T=9);var he=new C;return p.state=he,he.strm=p,he.wrap=_e,he.gzhead=null,he.w_bits=T,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=G+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+A-1)/A),he.window=new e.Buf8(he.w_size*2),he.head=new e.Buf16(he.hash_size),he.prev=new e.Buf16(he.w_size),he.lit_bufsize=1<<G+6,he.pending_buf_size=he.lit_bufsize*4,he.pending_buf=new e.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=te,he.strategy=ee,he.method=re,se(p)}function ie(p,te){return Z(p,te,x,P,M,w)}function R(p,te){var re,T,G,ee;if(!p||!p.state||te>v||te<0)return p?we(p,c):c;if(T=p.state,!p.output||!p.input&&p.avail_in!==0||T.status===K&&te!==f)return we(p,p.avail_out===0?h:c);if(T.strm=p,re=T.last_flush,T.last_flush=te,T.status===H)if(T.wrap===2)p.adler=0,Se(T,31),Se(T,139),Se(T,8),T.gzhead?(Se(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),Se(T,T.gzhead.time&255),Se(T,T.gzhead.time>>8&255),Se(T,T.gzhead.time>>16&255),Se(T,T.gzhead.time>>24&255),Se(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Se(T,T.gzhead.os&255),T.gzhead.extra&&T.gzhead.extra.length&&(Se(T,T.gzhead.extra.length&255),Se(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(p.adler=r(p.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=B):(Se(T,0),Se(T,0),Se(T,0),Se(T,0),Se(T,0),Se(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Se(T,me),T.status=F);else{var _e=x+(T.w_bits-8<<4)<<8,he=-1;T.strategy>=u||T.level<2?he=0:T.level<6?he=1:T.level===6?he=2:he=3,_e|=he<<6,T.strstart!==0&&(_e|=N),_e+=31-_e%31,T.status=F,$e(T,_e),T.strstart!==0&&($e(T,p.adler>>>16),$e(T,p.adler&65535)),p.adler=1}if(T.status===B)if(T.gzhead.extra){for(G=T.pending;T.gzindex<(T.gzhead.extra.length&65535)&&!(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size));)Se(T,T.gzhead.extra[T.gzindex]&255),T.gzindex++;T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=q)}else T.status=q;if(T.status===q)if(T.gzhead.name){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.name.length?ee=T.gzhead.name.charCodeAt(T.gzindex++)&255:ee=0,Se(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.gzindex=0,T.status=L)}else T.status=L;if(T.status===L)if(T.gzhead.comment){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.comment.length?ee=T.gzhead.comment.charCodeAt(T.gzindex++)&255:ee=0,Se(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.status=D)}else T.status=D;if(T.status===D&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&je(p),T.pending+2<=T.pending_buf_size&&(Se(T,p.adler&255),Se(T,p.adler>>8&255),p.adler=0,T.status=F)):T.status=F),T.pending!==0){if(je(p),p.avail_out===0)return T.last_flush=-1,s}else if(p.avail_in===0&&Ce(te)<=Ce(re)&&te!==f)return we(p,h);if(T.status===K&&p.avail_in!==0)return we(p,h);if(p.avail_in!==0||T.lookahead!==0||te!==a&&T.status!==K){var pe=T.strategy===u?ge(T,te):T.strategy===_?le(T,te):Re[T.level].func(T,te);if((pe===ue||pe===ve)&&(T.status=K),pe===J||pe===ue)return p.avail_out===0&&(T.last_flush=-1),s;if(pe===ae&&(te===o?t._tr_align(T):te!==v&&(t._tr_stored_block(T,0,0,!1),te===d&&(Pe(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),je(p),p.avail_out===0))return T.last_flush=-1,s}return te!==f?s:T.wrap<=0?l:(T.wrap===2?(Se(T,p.adler&255),Se(T,p.adler>>8&255),Se(T,p.adler>>16&255),Se(T,p.adler>>24&255),Se(T,p.total_in&255),Se(T,p.total_in>>8&255),Se(T,p.total_in>>16&255),Se(T,p.total_in>>24&255)):($e(T,p.adler>>>16),$e(T,p.adler&65535)),je(p),T.wrap>0&&(T.wrap=-T.wrap),T.pending!==0?s:l)}function oe(p){var te;return!p||!p.state?c:(te=p.state.status,te!==H&&te!==B&&te!==q&&te!==L&&te!==D&&te!==F&&te!==K?we(p,c):(p.state=null,te===F?we(p,y):s))}function be(p,te){var re=te.length,T,G,ee,_e,he,pe,Ae,vt;if(!p||!p.state||(T=p.state,_e=T.wrap,_e===2||_e===1&&T.status!==H||T.lookahead))return c;for(_e===1&&(p.adler=n(p.adler,te,re,0)),T.wrap=0,re>=T.w_size&&(_e===0&&(Pe(T.head),T.strstart=0,T.block_start=0,T.insert=0),vt=new e.Buf8(T.w_size),e.arraySet(vt,te,re-T.w_size,T.w_size,0),te=vt,re=T.w_size),he=p.avail_in,pe=p.next_in,Ae=p.input,p.avail_in=re,p.next_in=0,p.input=te,Ne(T);T.lookahead>=A;){G=T.strstart,ee=T.lookahead-(A-1);do T.ins_h=(T.ins_h<<T.hash_shift^T.window[G+A-1])&T.hash_mask,T.prev[G&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=G,G++;while(--ee);T.strstart=G,T.lookahead=A-1,Ne(T)}return T.strstart+=T.lookahead,T.block_start=T.strstart,T.insert=T.lookahead,T.lookahead=0,T.match_length=T.prev_length=A-1,T.match_available=0,p.next_in=pe,p.input=Ae,p.avail_in=he,T.wrap=_e,s}return ut.deflateInit=ie,ut.deflateInit2=Z,ut.deflateReset=se,ut.deflateResetKeep=ne,ut.deflateSetHeader=fe,ut.deflate=R,ut.deflateEnd=oe,ut.deflateSetDictionary=be,ut.deflateInfo="pako deflate (from Nodeca project)",ut}var qn,xs;function gm(){if(xs)return qn;xs=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return qn=e,qn}var it={},Dn,Cs;function vm(){if(Cs)return Dn;Cs=1;var e=30,t=12;return Dn=function(r,i){var a,o,d,f,v,s,l,c,y,h,m,g,u,_,S,w,b,x,O,P,M,W,V,E,I;a=r.state,o=r.next_in,E=r.input,d=o+(r.avail_in-5),f=r.next_out,I=r.output,v=f-(i-r.avail_out),s=f+(r.avail_out-257),l=a.dmax,c=a.wsize,y=a.whave,h=a.wnext,m=a.window,g=a.hold,u=a.bits,_=a.lencode,S=a.distcode,w=(1<<a.lenbits)-1,b=(1<<a.distbits)-1;e:do{u<15&&(g+=E[o++]<<u,u+=8,g+=E[o++]<<u,u+=8),x=_[g&w];t:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O===0)I[f++]=x&65535;else if(O&16){P=x&65535,O&=15,O&&(u<O&&(g+=E[o++]<<u,u+=8),P+=g&(1<<O)-1,g>>>=O,u-=O),u<15&&(g+=E[o++]<<u,u+=8,g+=E[o++]<<u,u+=8),x=S[g&b];r:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O&16){if(M=x&65535,O&=15,u<O&&(g+=E[o++]<<u,u+=8,u<O&&(g+=E[o++]<<u,u+=8)),M+=g&(1<<O)-1,M>l){r.msg="invalid distance too far back",a.mode=e;break e}if(g>>>=O,u-=O,O=f-v,M>O){if(O=M-O,O>y&&a.sane){r.msg="invalid distance too far back",a.mode=e;break e}if(W=0,V=m,h===0){if(W+=c-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}else if(h<O){if(W+=c+h-O,O-=h,O<P){P-=O;do I[f++]=m[W++];while(--O);if(W=0,h<P){O=h,P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}}else if(W+=h-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}for(;P>2;)I[f++]=V[W++],I[f++]=V[W++],I[f++]=V[W++],P-=3;P&&(I[f++]=V[W++],P>1&&(I[f++]=V[W++]))}else{W=f-M;do I[f++]=I[W++],I[f++]=I[W++],I[f++]=I[W++],P-=3;while(P>2);P&&(I[f++]=I[W++],P>1&&(I[f++]=I[W++]))}}else if((O&64)===0){x=S[(x&65535)+(g&(1<<O)-1)];continue r}else{r.msg="invalid distance code",a.mode=e;break e}break}}else if((O&64)===0){x=_[(x&65535)+(g&(1<<O)-1)];continue t}else if(O&32){a.mode=t;break e}else{r.msg="invalid literal/length code",a.mode=e;break e}break}}while(o<d&&f<s);P=u>>3,o-=P,u-=P<<3,g&=(1<<u)-1,r.next_in=o,r.next_out=f,r.avail_in=o<d?5+(d-o):5-(o-d),r.avail_out=f<s?257+(s-f):257-(f-s),a.hold=g,a.bits=u},Dn}var Nn,ks;function ym(){if(ks)return Nn;ks=1;var e=bn(),t=15,n=852,r=592,i=0,a=1,o=2,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Nn=function(c,y,h,m,g,u,_,S){var w=S.bits,b=0,x=0,O=0,P=0,M=0,W=0,V=0,E=0,I=0,$=0,z,X,A,k,j,N=null,H=0,B,q=new e.Buf16(t+1),L=new e.Buf16(t+1),D=null,F=0,K,J,ae;for(b=0;b<=t;b++)q[b]=0;for(x=0;x<m;x++)q[y[h+x]]++;for(M=w,P=t;P>=1&&q[P]===0;P--);if(M>P&&(M=P),P===0)return g[u++]=1<<24|64<<16|0,g[u++]=1<<24|64<<16|0,S.bits=1,0;for(O=1;O<P&&q[O]===0;O++);for(M<O&&(M=O),E=1,b=1;b<=t;b++)if(E<<=1,E-=q[b],E<0)return-1;if(E>0&&(c===i||P!==1))return-1;for(L[1]=0,b=1;b<t;b++)L[b+1]=L[b]+q[b];for(x=0;x<m;x++)y[h+x]!==0&&(_[L[y[h+x]]++]=x);if(c===i?(N=D=_,B=19):c===a?(N=d,H-=257,D=f,F-=257,B=256):(N=v,D=s,B=-1),$=0,x=0,b=O,j=u,W=M,V=0,A=-1,I=1<<M,k=I-1,c===a&&I>n||c===o&&I>r)return 1;for(;;){K=b-V,_[x]<B?(J=0,ae=_[x]):_[x]>B?(J=D[F+_[x]],ae=N[H+_[x]]):(J=96,ae=0),z=1<<b-V,X=1<<W,O=X;do X-=z,g[j+($>>V)+X]=K<<24|J<<16|ae|0;while(X!==0);for(z=1<<b-1;$&z;)z>>=1;if(z!==0?($&=z-1,$+=z):$=0,x++,--q[b]===0){if(b===P)break;b=y[h+_[x]]}if(b>M&&($&k)!==A){for(V===0&&(V=M),j+=O,W=b-V,E=1<<W;W+V<P&&(E-=q[W+V],!(E<=0));)W++,E<<=1;if(I+=1<<W,c===a&&I>n||c===o&&I>r)return 1;A=$&k,g[A]=M<<24|W<<16|j-u|0}}return $!==0&&(g[j+$]=b-V<<24|64<<16|0),S.bits=M,0},Nn}var Ps;function _m(){if(Ps)return it;Ps=1;var e=bn(),t=ld(),n=fd(),r=vm(),i=ym(),a=0,o=1,d=2,f=4,v=5,s=6,l=0,c=1,y=2,h=-2,m=-3,g=-4,u=-5,_=8,S=1,w=2,b=3,x=4,O=5,P=6,M=7,W=8,V=9,E=10,I=11,$=12,z=13,X=14,A=15,k=16,j=17,N=18,H=19,B=20,q=21,L=22,D=23,F=24,K=25,J=26,ae=27,ue=28,ve=29,me=30,we=31,Ce=32,Pe=852,je=592,Ie=15,Se=Ie;function $e(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function st(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qe(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,Z.total_in=Z.total_out=ie.total=0,Z.msg="",ie.wrap&&(Z.adler=ie.wrap&1),ie.mode=S,ie.last=0,ie.havedict=0,ie.dmax=32768,ie.head=null,ie.hold=0,ie.bits=0,ie.lencode=ie.lendyn=new e.Buf32(Pe),ie.distcode=ie.distdyn=new e.Buf32(je),ie.sane=1,ie.back=-1,l)}function Ne(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,ie.wsize=0,ie.whave=0,ie.wnext=0,qe(Z))}function Ye(Z,ie){var R,oe;return!Z||!Z.state||(oe=Z.state,ie<0?(R=0,ie=-ie):(R=(ie>>4)+1,ie<48&&(ie&=15)),ie&&(ie<8||ie>15))?h:(oe.window!==null&&oe.wbits!==ie&&(oe.window=null),oe.wrap=R,oe.wbits=ie,Ne(Z))}function Y(Z,ie){var R,oe;return Z?(oe=new st,Z.state=oe,oe.window=null,R=Ye(Z,ie),R!==l&&(Z.state=null),R):h}function Q(Z){return Y(Z,Se)}var le=!0,ge,de;function Re(Z){if(le){var ie;for(ge=new e.Buf32(512),de=new e.Buf32(32),ie=0;ie<144;)Z.lens[ie++]=8;for(;ie<256;)Z.lens[ie++]=9;for(;ie<280;)Z.lens[ie++]=7;for(;ie<288;)Z.lens[ie++]=8;for(i(o,Z.lens,0,288,ge,0,Z.work,{bits:9}),ie=0;ie<32;)Z.lens[ie++]=5;i(d,Z.lens,0,32,de,0,Z.work,{bits:5}),le=!1}Z.lencode=ge,Z.lenbits=9,Z.distcode=de,Z.distbits=5}function Oe(Z,ie,R,oe){var be,p=Z.state;return p.window===null&&(p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new e.Buf8(p.wsize)),oe>=p.wsize?(e.arraySet(p.window,ie,R-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize):(be=p.wsize-p.wnext,be>oe&&(be=oe),e.arraySet(p.window,ie,R-oe,be,p.wnext),oe-=be,oe?(e.arraySet(p.window,ie,R-oe,oe,0),p.wnext=oe,p.whave=p.wsize):(p.wnext+=be,p.wnext===p.wsize&&(p.wnext=0),p.whave<p.wsize&&(p.whave+=be))),0}function C(Z,ie){var R,oe,be,p,te,re,T,G,ee,_e,he,pe,Ae,vt,Le=0,xe,Ue,Je,Xe,br,wr,Me,nt,Ge=new e.Buf8(4),yt,dt,gs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return h;R=Z.state,R.mode===$&&(R.mode=z),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,_e=re,he=T,nt=l;e:for(;;)switch(R.mode){case S:if(R.wrap===0){R.mode=z;break}for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.wrap&2&&G===35615){R.check=0,Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0),G=0,ee=0,R.mode=w;break}if(R.flags=0,R.head&&(R.head.done=!1),!(R.wrap&1)||(((G&255)<<8)+(G>>8))%31){Z.msg="incorrect header check",R.mode=me;break}if((G&15)!==_){Z.msg="unknown compression method",R.mode=me;break}if(G>>>=4,ee-=4,Me=(G&15)+8,R.wbits===0)R.wbits=Me;else if(Me>R.wbits){Z.msg="invalid window size",R.mode=me;break}R.dmax=1<<Me,Z.adler=R.check=1,R.mode=G&512?E:$,G=0,ee=0;break;case w:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.flags=G,(R.flags&255)!==_){Z.msg="unknown compression method",R.mode=me;break}if(R.flags&57344){Z.msg="unknown header flags set",R.mode=me;break}R.head&&(R.head.text=G>>8&1),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=b;case b:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.time=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,Ge[2]=G>>>16&255,Ge[3]=G>>>24&255,R.check=n(R.check,Ge,4,0)),G=0,ee=0,R.mode=x;case x:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.xflags=G&255,R.head.os=G>>8),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=O;case O:if(R.flags&1024){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length=G,R.head&&(R.head.extra_len=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0}else R.head&&(R.head.extra=null);R.mode=P;case P:if(R.flags&1024&&(pe=R.length,pe>re&&(pe=re),pe&&(R.head&&(Me=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),e.arraySet(R.head.extra,oe,p,pe,Me)),R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,R.length-=pe),R.length))break e;R.length=0,R.mode=M;case M:if(R.flags&2048){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.name+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=W;case W:if(R.flags&4096){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.comment+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.comment=null);R.mode=V;case V:if(R.flags&512){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.check&65535)){Z.msg="header crc mismatch",R.mode=me;break}G=0,ee=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),Z.adler=R.check=0,R.mode=$;break;case E:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}Z.adler=R.check=$e(G),G=0,ee=0,R.mode=I;case I:if(R.havedict===0)return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,y;Z.adler=R.check=1,R.mode=$;case $:if(ie===v||ie===s)break e;case z:if(R.last){G>>>=ee&7,ee-=ee&7,R.mode=ae;break}for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}switch(R.last=G&1,G>>>=1,ee-=1,G&3){case 0:R.mode=X;break;case 1:if(Re(R),R.mode=B,ie===s){G>>>=2,ee-=2;break e}break;case 2:R.mode=j;break;case 3:Z.msg="invalid block type",R.mode=me}G>>>=2,ee-=2;break;case X:for(G>>>=ee&7,ee-=ee&7;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((G&65535)!==(G>>>16^65535)){Z.msg="invalid stored block lengths",R.mode=me;break}if(R.length=G&65535,G=0,ee=0,R.mode=A,ie===s)break e;case A:R.mode=k;case k:if(pe=R.length,pe){if(pe>re&&(pe=re),pe>T&&(pe=T),pe===0)break e;e.arraySet(be,oe,p,pe,te),re-=pe,p+=pe,T-=pe,te+=pe,R.length-=pe;break}R.mode=$;break;case j:for(;ee<14;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.nlen=(G&31)+257,G>>>=5,ee-=5,R.ndist=(G&31)+1,G>>>=5,ee-=5,R.ncode=(G&15)+4,G>>>=4,ee-=4,R.nlen>286||R.ndist>30){Z.msg="too many length or distance symbols",R.mode=me;break}R.have=0,R.mode=N;case N:for(;R.have<R.ncode;){for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.lens[gs[R.have++]]=G&7,G>>>=3,ee-=3}for(;R.have<19;)R.lens[gs[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,yt={bits:R.lenbits},nt=i(a,R.lens,0,19,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid code lengths set",R.mode=me;break}R.have=0,R.mode=H;case H:for(;R.have<R.nlen+R.ndist;){for(;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Je<16)G>>>=xe,ee-=xe,R.lens[R.have++]=Je;else{if(Je===16){for(dt=xe+2;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G>>>=xe,ee-=xe,R.have===0){Z.msg="invalid bit length repeat",R.mode=me;break}Me=R.lens[R.have-1],pe=3+(G&3),G>>>=2,ee-=2}else if(Je===17){for(dt=xe+3;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=3+(G&7),G>>>=3,ee-=3}else{for(dt=xe+7;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=11+(G&127),G>>>=7,ee-=7}if(R.have+pe>R.nlen+R.ndist){Z.msg="invalid bit length repeat",R.mode=me;break}for(;pe--;)R.lens[R.have++]=Me}}if(R.mode===me)break;if(R.lens[256]===0){Z.msg="invalid code -- missing end-of-block",R.mode=me;break}if(R.lenbits=9,yt={bits:R.lenbits},nt=i(o,R.lens,0,R.nlen,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid literal/lengths set",R.mode=me;break}if(R.distbits=6,R.distcode=R.distdyn,yt={bits:R.distbits},nt=i(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,yt),R.distbits=yt.bits,nt){Z.msg="invalid distances set",R.mode=me;break}if(R.mode=B,ie===s)break e;case B:R.mode=q;case q:if(re>=6&&T>=258){Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,r(Z,he),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,R.mode===$&&(R.back=-1);break}for(R.back=0;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Ue&&(Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.lencode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,R.length=Je,Ue===0){R.mode=J;break}if(Ue&32){R.back=-1,R.mode=$;break}if(Ue&64){Z.msg="invalid literal/length code",R.mode=me;break}R.extra=Ue&15,R.mode=L;case L:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=D;case D:for(;Le=R.distcode[G&(1<<R.distbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.distcode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,Ue&64){Z.msg="invalid distance code",R.mode=me;break}R.offset=Je,R.extra=Ue&15,R.mode=F;case F:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.offset+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){Z.msg="invalid distance too far back",R.mode=me;break}R.mode=K;case K:if(T===0)break e;if(pe=he-T,R.offset>pe){if(pe=R.offset-pe,pe>R.whave&&R.sane){Z.msg="invalid distance too far back",R.mode=me;break}pe>R.wnext?(pe-=R.wnext,Ae=R.wsize-pe):Ae=R.wnext-pe,pe>R.length&&(pe=R.length),vt=R.window}else vt=be,Ae=te-R.offset,pe=R.length;pe>T&&(pe=T),T-=pe,R.length-=pe;do be[te++]=vt[Ae++];while(--pe);R.length===0&&(R.mode=q);break;case J:if(T===0)break e;be[te++]=R.length,T--,R.mode=q;break;case ae:if(R.wrap){for(;ee<32;){if(re===0)break e;re--,G|=oe[p++]<<ee,ee+=8}if(he-=T,Z.total_out+=he,R.total+=he,he&&(Z.adler=R.check=R.flags?n(R.check,be,he,te-he):t(R.check,be,he,te-he)),he=T,(R.flags?G:$e(G))!==R.check){Z.msg="incorrect data check",R.mode=me;break}G=0,ee=0}R.mode=ue;case ue:if(R.wrap&&R.flags){for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.total&4294967295)){Z.msg="incorrect length check",R.mode=me;break}G=0,ee=0}R.mode=ve;case ve:nt=c;break e;case me:nt=m;break e;case we:return g;case Ce:default:return h}return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,(R.wsize||he!==Z.avail_out&&R.mode<me&&(R.mode<ae||ie!==f))&&Oe(Z,Z.output,Z.next_out,he-Z.avail_out),_e-=Z.avail_in,he-=Z.avail_out,Z.total_in+=_e,Z.total_out+=he,R.total+=he,R.wrap&&he&&(Z.adler=R.check=R.flags?n(R.check,be,he,Z.next_out-he):t(R.check,be,he,Z.next_out-he)),Z.data_type=R.bits+(R.last?64:0)+(R.mode===$?128:0)+(R.mode===B||R.mode===A?256:0),(_e===0&&he===0||ie===f)&&nt===l&&(nt=u),nt}function ne(Z){if(!Z||!Z.state)return h;var ie=Z.state;return ie.window&&(ie.window=null),Z.state=null,l}function se(Z,ie){var R;return!Z||!Z.state||(R=Z.state,(R.wrap&2)===0)?h:(R.head=ie,ie.done=!1,l)}function fe(Z,ie){var R=ie.length,oe,be,p;return!Z||!Z.state||(oe=Z.state,oe.wrap!==0&&oe.mode!==I)?h:oe.mode===I&&(be=1,be=t(be,ie,R,0),be!==oe.check)?m:(p=Oe(Z,ie,R,R),p?(oe.mode=we,g):(oe.havedict=1,l))}return it.inflateReset=Ne,it.inflateReset2=Ye,it.inflateResetKeep=qe,it.inflateInit=Q,it.inflateInit2=Y,it.inflate=C,it.inflateEnd=ne,it.inflateGetHeader=se,it.inflateSetDictionary=fe,it.inflateInfo="pako inflate (from Nodeca project)",it}var Mn,js;function bm(){return js||(js=1,Mn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Mn}function wm(){const{useDynamicConfig:e}=wt(),{configValue:t,isDynamicConfigLoading:n}=e(At.creditAgentEnablement),r=He.getSignedInUser()?.userEmail;return{isAllowed:ce.useMemo(()=>{const a=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&a.includes(r)},[t,r]),isLoading:n}}function Et(){const{isAllowed:e}=wm();return e?Tp:Ap}const Sm={overlayWidth:new at(100,100,50)};function Ls(){const e=Be(),t=We(),n=lr(),r=Bt(),i=Et(),a=Ee(V=>qf(V)),o=a.uiState.selectedCustomerTenantId,d=ce.useMemo(()=>o?a.customers.find(V=>V.tenantId===o):void 0,[a.customers,o]),f=Ee(V=>o?Df(V.aiAccountantCustomerState,V.userState,o):[]),v=a.customerViewStateByTenantId[o],s=v?.jobsFetchStatus??{fetchState:"Not-Started"},l=v?.jobsPageToken!=null;ce.useEffect(()=>{a.fetchState==="Completed"?t(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&t(vs())},[a.fetchState]);const c=V=>{const E=kt(V),I=Ft(V);Fe.trackCockpitTabClicked(I),e(`../../${E}`,{replace:!0})},y=(V,E,I,$)=>{t(Dt([V.tenantId])),t(an(E,I,$))},h=(V,E,I)=>{t(an(V,E,I))},m=(V,E)=>{t(Dt(a.unonboardedTenantIds)),t(an("retrain",V,E))},g=V=>{const E=a.selectedTenantIds,I=E.includes(V)?E.filter($=>$!==V):[...E,V];t(Dt(I))},u=V=>{if(V.length===0)return;const E=a.selectedTenantIds,I=new Set(E);if(V.every(z=>I.has(z))){const z=new Set(V);t(Dt(E.filter(X=>!z.has(X))))}else{const z=Array.from(new Set([...E,...V]));t(Dt(z))}},_=()=>{t(Dt([]))},S=V=>{t(Nf(V.companyId,V.tenantId))},w=V=>{V==="aiAccountant"&&t(vs())},b=(V,E)=>{t(Jt({sortKey:V,sortOrder:E}))},x=V=>{t(Jt({selectedCustomerTenantId:V.tenantId})),t(sn(V.tenantId))},O=()=>{t(Jt({selectedCustomerTenantId:""}))},P=V=>{t(Jt({filterText:V}))},M=(V,E)=>{t(Jt({filters:E}))},W=()=>{o&&t(sn(o,!0))};return U.jsxs(U.Fragment,{children:[U.jsx(Ip,{headerData:{allTabOptions:i,selectedTabOption:St("aiAccountant")},headerActions:{onTabChange:c},aiAccountantPageData:{aiAccountantView:a},aiAccountantPageActions:{onAction:y,onBulkAction:h,onCancelOnboarding:S,onClearSelection:_,onCockpitReloadData:w,onColumnSortConfigChanged:b,onCustomerSelected:x,onEvaluateAll:m,onFilterTextChanged:P,onFiltersChange:M,onToggleAllVisible:u,onToggleTenantSelection:g}}),U.jsx(dr,{anchor:"right",open:d!=null,PaperProps:{style:{width:Sm.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:O,children:d!=null&&U.jsx(nd,{customer:d,hasMoreJobs:l,jobs:f,jobsFetchStatus:s,onAction:y,onCancelOnboarding:S,onClose:O,onLoadMoreJobs:W})})]})}function Em(){const{tenantId:e=""}=ot(),t=Be(),n=We(),r=Ee(c=>ch(c.aiAccountantCustomerState,c.userState)),i=Ee(c=>qf(c)),a=r.find(c=>c.tenantId===e),o=i.customerViewStateByTenantId[e],d=Ee(c=>Df(c.aiAccountantCustomerState,c.userState,e));if(ce.useEffect(()=>{n(sn(e))},[e,n]),a==null)return null;const f=(c,y,h,m)=>{n(Dt([c.tenantId])),n(an(y,h,m))},v=c=>{n(Nf(c.companyId,c.tenantId))},s=()=>{t("../")},l=()=>{n(sn(e,!0))};return U.jsx(nd,{customer:a,hasMoreJobs:o?.jobsPageToken!=null,jobs:d,jobsFetchStatus:o?.jobsFetchStatus??{fetchState:"Not-Started"},onAction:f,onCancelOnboarding:v,onClose:s,onLoadMoreJobs:l})}const dd=(e,t)=>{const n=[...e??[]];return n.push(t),n},Rm=e=>{const t=[...e??[]];return{poppedPathname:t.pop(),newStack:t}},Om=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ke=({state:e,element:t})=>He.isSignedIn()===!0?U.jsx(U.Fragment,{children:t}):U.jsx(ir,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function Tm(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Ls,{})})}),U.jsx(Te,{path:"/detail/:tenantId",element:U.jsx(ke,{element:U.jsx(Em,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Ls,{})})})]})}const Ut=()=>{const[e,t]=cd(),[n,r]=ce.useState(),i=ce.useRef(!1);return ce.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const o=xp(e);o!=null&&r(o);const d=new URLSearchParams(e);d.delete("thread_id"),d.delete("entity_type"),d.delete("company_id"),t(d,{replace:!0}),i.current=!0},[e,t]),n},Am={overlayWidth:new at(100,100,50)},{common:{strings:qs}}=fr.getLocalizedStrings();function Im(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Sr({uiState:{filterText:r}}))},onFiltersChange:(n,r)=>{r.categories!=null&&r.categoryCombinationOperator!=null&&Fe.trackHealthMonitorFiltersApplied({filterSelection:{condition:r.categories.map(i=>i.matchingOperator).join(qs.comma),logic:r.categoryCombinationOperator,parameter:r.categories.map(i=>i.field).join(qs.comma)}}),e(Sr({uiState:{filters:r}}))}}},healthPageActions:{onRowClick:n=>{e(Ff(n))},onColumnSortConfigChanged:(n,r)=>{e(Sr({uiState:{sortKey:n,sortOrder:r}}))},onCockpitReloadData:n=>{n==="healthMonitor"&&e(Mf())},onFiltersChange:n=>{e(Sr({uiState:{filters:n}}))}}}}function xm(e,t){return{healthPageData:{healthView:t.healthView,managementView:t.managementView,mixpanelUrl:t.mixpanelHMUrl}}}const Cm=ze(xm,Im)(jp);function Fn({isDrawerOpen:e}){const t=Be(),n=We(),r=Bt(),i=lr(),{companyId:a}=ot(),[o,d]=cd(),[f,v]=ce.useState(!1),s=Ut(),l=Et(),c=Ee(b=>lh(b)),y=Ee(b=>ur(b)),{additionalChurnFactors:h}=Ee(b=>fh(b)),{selectedCompanyDetail:m,selectedCompanyId:g,localFormDataAndStatusByCompanyId:u}=c,_=Ee(b=>b.companyViewState.zeniUsers.fetchState),S=Ee(b=>b.companyHealthMetricConfigViewState);if(ce.useEffect(()=>{const b=x=>x==="Not-Started"||x==="Error";c.fetchState==="Completed"?n(xt(!1)):b(c.fetchState)&&(n(Mf()),b(_)&&n(Ct()),b(S.fetchState)&&n(dh()))},[c.fetchState,S.fetchState]),ce.useEffect(()=>{a!=null&&c.fetchState==="Completed"&&o.has("utm_source")===!0&&(n(Ff(a)),m!=null&&(Cp(),Fe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:m.companyInfo.companyId,companyName:m.companyInfo.name,churnProbability:m.companyHealthMetric.churnProbabilityPercentage??null}),v(!0),o.delete("utm_source"),d(o)))},[c.fetchState,m?.companyInfo.companyId,m?.companyInfo.name]),He.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return U.jsxs(U.Fragment,{children:[e===!0||g!=null&&m!=null?U.jsx(dr,{anchor:"right",open:g!=null,PaperProps:{style:{width:Am.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>n(ys()),children:U.jsx(kp,{roomId:`cockpit_${g}`,autoConnect:!0,children:U.jsx(Pp,{onSaveClick:()=>{g!=null&&n(ph(g))},onSaveChangesToLocalStore:b=>{c.selectedCompanyId!=null&&n(hh({companyId:c.selectedCompanyId,updatedLocalData:b}))},localData:u?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:c,onCloseDrawer:()=>n(ys()),analytics:Fe,urlSource:f,additionalChurnFactorsOptions:h})})}):null,U.jsx(Cm,{headerData:{allTabOptions:l,selectedTabOption:St("healthMonitor")},initialOpenThreadRequest:s??void 0,healthView:c,managementView:y,navigate:t,mixpanelHMUrl:gn.mixpanelHMUrl})]})}function km(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Fn,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Fn,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Fn,{})})})]})}const Pm={drawerLeftMargin:new at(0,0,240)};function mr(e){const{isOpen:t,drawerLeftMargin:n,children:r,onClose:i}=e,a=lr(),o=n?.valuePx(a)??Pm.drawerLeftMargin.valuePx(a),d=Bt();return U.jsx(dr,{anchor:"right",open:t,PaperProps:{style:{width:`calc(100% - ${o})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:r})}const jm=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?U.jsx(Lm,{children:U.jsx(vn,{size:"ExtraLarge",start:!0})}):null,Lm=tt.div`
3
3
  display: flex;
4
4
  width: 100%;
5
5
  height: 100%;
@@ -177,4 +177,4 @@ Found: ${n.toString().split(`
177
177
  `;function B_(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/report/:companyId",element:U.jsx(ke,{element:U.jsx(qo,{})})}),U.jsx(Te,{path:"/warnings/:companyId",element:U.jsx(ke,{element:U.jsx(qo,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(qo,{})})})]})}function U_(e,t){const n=Qf(e,t.tenantId),r=n.estimateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{localData:n,isDisabled:r}}function V_(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t;return{onSubscriptionDetailsChanged:o=>{const{addPlan:d,invoiceOption:f}=o,{subscriptionPlan:v,recurringAddOns:s,coupon:l}=d,c={subscriptionPlanId:v.selectedOption??"",subscriptionAddOnIds:s.filter(y=>y.selectedOption!=null).map(y=>y.selectedOption),subscriptionCouponIds:l.selectedOption!=null?[l.selectedOption]:[],invoiceImmediately:f.invoicingOption!=null};d.planStartDate!=null&&(c.startDate=on(d.planStartDate.toString())),e(ed({tenantId:n,subscriptionData:c}))},onEstimateSuccess:()=>{const o=dd(i.state?.pathnameStackToGoBack,i.pathname);a(`../tenants/${n}/companies/${r}/summary`,{state:{pathnameStackToGoBack:o}})},onReviewClick:()=>{e(up(n))},onBackClick:()=>{a(`../tenants/${n}/companies/${r}`)},onResetClick:()=>{e(Wo(n))}}}const $_=ze(U_,V_)(Yp),z_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx($_,{tenantId:t,companyId:n,location:r,navigate:i})};function G_(e,t){const{companyId:n,tenantId:r}=t,i=lp(e,n,r),a=i.fetchState!=="In-Progress";return{subscriptionDetailView:i,canUpdate:a}}function H_(e,t){const{tenantId:n,location:r,navigate:i}=t;return{onUpdateOrAddPlanClick:a=>{e(Wo(n,a)),e(fp()),e(dp()),e(hp()),a!=null?i(`${r.pathname}/update`):i(`${r.pathname}/add`)},onCloseClick:()=>{i("../")}}}const Z_=ze(G_,H_)(Jp),W_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e,a=We(),[o,d]=ce.useState(!1),f=Ee(v=>v.subscriptionViewState.subscriptionDetailsByCompanyId[n]?.fetchStatus);return ce.useEffect(()=>{!o&&(f==null||f?.fetchState==="Not-Started")&&(d(!0),a(cp(n)))},[o,f,n,a]),ce.useEffect(()=>{o&&f!=null&&f?.fetchState==="Error"&&i("../subscription")},[o,f]),U.jsx(Z_,{tenantId:t,companyId:n,location:r,navigate:i})};function Y_(e,t){return{subscriptionEstimateData:pp(e,t.tenantId)}}function J_(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t,o=()=>{const d=Rm(i.state?.pathnameStackToGoBack),f=d.poppedPathname??Om(1);a(f,{state:{pathnameStackToGoBack:d.newStack}})};return{onBackClick:()=>{o()},onCancelClick:()=>{o()},onConfirmClick:()=>{e(mp(n))},onConfirmSuccess:()=>{a(`../tenants/${n}/companies/${r}`)}}}const K_=ze(Y_,J_)(Kp),X_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx(K_,{companyId:n,tenantId:t,location:r,navigate:i})};function Q_(e,t){const n=Qf(e,t.tenantId),r=n.estimateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{localData:n,isDisabled:r}}function eb(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t;return{onSubscriptionDetailsChanged:o=>{const{updatePlan:d,applyChanges:f}=o,{subscriptionPlan:v,recurringAddOns:s,coupon:l}=d,c={subscriptionPlanId:v.selectedOption??"",subscriptionAddOnIds:s.filter(y=>y.selectedOption!=null).map(y=>y.selectedOption),subscriptionCouponIds:l.selectedOption!=null?[l.selectedOption]:[],invoiceImmediately:!0,applyEndOfTerm:f.changeType==="applyEndOfTerm",shouldProrate:f.shouldProrate};e(ed({tenantId:n,subscriptionData:c}))},onEstimateSuccess:()=>{const o=dd(i.state?.pathnameStackToGoBack,i.pathname);a(`../tenants/${n}/companies/${r}/summary`,{state:{pathnameStackToGoBack:o}})},onReviewClick:()=>{e(gp(n))},onBackClick:()=>{a(`../tenants/${n}/companies/${r}`)},onResetClick:o=>{e(Wo(n,o.subscription.subscription.subscriptionId))}}}const tb=ze(Q_,eb)(Xp),rb=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx(tb,{tenantId:t,companyId:n,location:r,navigate:i})},uh=["add","update","summary"],nb=e=>yp(e,uh),ib=e=>vp(e,uh),ab=()=>{const[e,t]=ce.useState(!0),{tenantId:n,companyId:r,updatePageType:i}=ot(),a=Be(),o=Ee(f=>n!=null?f.subscriptionViewState.subscriptionUpdateViewDataByTenantId[n]:null);if(He.getSignedInUser()==null)throw Error("Can't access subscription details drawer without signing in...");return ce.useEffect(()=>{(o==null&&i!=null||ib(i??"")==null)&&a(`../tenants/${n}/companies/${r}`)},[o]),U.jsx(mr,{isOpen:e,onClose:()=>{t(!1),a("../subscription")},children:U.jsx(sb,{children:U.jsx(ob,{tenantId:n,companyId:r,updatePageType:i!=null?nb(i):void 0})})})},ob=({tenantId:e,companyId:t,updatePageType:n})=>{const r=Be(),i=Jo(),a={tenantId:e,companyId:t,navigate:r,location:i};if(n==null)return U.jsx(W_,{...a});switch(n){case"update":return U.jsx(rb,{...a});case"add":return U.jsx(z_,{...a});case"summary":return U.jsx(X_,{...a});default:return console.error("Subscription Update Page - Invalid Url"),U.jsx(ir,{to:"/",replace:!0})}},sb=tt(Zt)`
178
178
  display: flex;
179
179
  min-height: 100%;
180
- `;function ub(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Gt({filterText:r}))},onFiltersChange:(n,r)=>{e(Gt({filters:r}))}}},subscriptionPageActions:{onColumnSortConfigChanged:(n,r)=>{e(Gt({sortKey:n,sortOrder:r}))},onCollapseToggled:(n,r)=>{e(Gt({isRowCollapseToggled:{companyId:n,isCollapsed:r}}))},onScroll:n=>{e(Gt({scrollYOffset:n}))},changeHandlers:(n,r)=>{const i=fb(r);Object.keys(i).length>0&&e($o(n,i))},onCompanyNameClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard`),onPassportIconClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard/company_details`),onPlanOrAddOnClicked:(n,r)=>{e(bp({tenantId:r})),t.navigate(`../tenants/${r}/companies/${n}`)},onFiltersChange:(n,r)=>{e(Gt({filters:r}))},onCockpitReloadData:n=>{n==="subscription"&&e(Ho())}}}}function cb(e,t){return{subscriptionPageData:{loggedInUser:t.signedInUser,subscriptionView:t.subscriptionView}}}const lb=ze(cb,ub)(Qp);function Do({isDrawerOpen:e}){const t=Be(),n=We(),r=Ut(),i=Et(),a=Ee(f=>_p(f)),o=Ee(f=>f.companyViewState.zeniUsers.fetchState);ce.useEffect(()=>{a.fetchState==="Completed"?n(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&(n(Ho()),(o==="Not-Started"||o==="Error")&&n(Ct()))},[a.fetchState]);const d=He.getSignedInUser();return U.jsxs(U.Fragment,{children:[e===!0?U.jsx(ab,{}):null,U.jsx(lb,{headerData:{allTabOptions:i,selectedTabOption:St("subscription")},initialOpenThreadRequest:r??void 0,signedInUser:d,subscriptionView:a,navigate:t})]})}const fb=e=>{const{users:t}=e;return t?{users:t}:{}};function db(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId/:updatePageType",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Do,{})})})]})}function hb(e,t){const{navigate:n}=t;return{headerActions:{onTabChange:r=>{const i=kt(r);n(`../../${i}`,{replace:!0})},filterActions:{onFilterTextChanged:(r,i)=>{e(Ss({filterText:i}))},onFiltersChange:(r,i)=>{e(Ss({filters:i}))}}},taskManagerPageActions:{onRowClick:(r,i)=>{window.open(`/${r}/tasks/${i}`)},onCockpitReloadData:r=>{r==="taskManager"&&e(No(0,"dueDate","descending",!1))},onFetchTaskManagerView:(r,i,a,o,d,f)=>{e(No(r,i,a,o,d,f))}}}}function pb(e,t){return{isBirdsEyeViewEnabled:t.isBirdsEyeViewEnabled,taskManagerPageData:{companyTaskManagerView:t.companyTaskManagerView}}}const mb=ze(pb,hb)(em);function jf(){const e=Be(),t=We(),n=Ut(),r=Et(),{useFeatureGate:i}=wt(),{isFeatureEnabled:a}=i(yn.isBirdsEyeViewEnabled),o=Ee(l=>wp(l)),d=Ee(l=>Sp(l)),f=Ee(l=>l.companyViewState.zeniUsers.fetchState);if(ce.useEffect(()=>{o.fetchState==="Completed"?t(xt(!1)):o.fetchState==="Not-Started"&&(t(No(0,"dueDate","descending",!1)),t(Ep()),(f==="Not-Started"||f==="Error")&&t(Ct()))},[o.fetchState]),ce.useEffect(()=>{a&&(o.metricsFetchState==="Not-Started"||o.metricsFetchState==="Error")&&t(Rp())},[a,o.metricsFetchState]),He.getSignedInUser()==null)throw Error("Can't access task manager page without signing in...");const s=ce.useMemo(()=>({allTabOptions:r,selectedTabOption:St("taskManager")}),[r]);return U.jsx(mb,{headerData:s,companyTaskManagerView:o,isBirdsEyeViewEnabled:a,initialOpenThreadRequest:n,navigate:e,reviewCount:d})}function gb(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(jf,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(jf,{})})})]})}const vb=ud(()=>td(()=>import("./CreditAgentRoutes-CuoMlb2L.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));let Lf=!1;const yb=ud(()=>td(()=>Promise.resolve().then(()=>Km),void 0));function _b(){const e=He.getSignedInUser(),t=Bt().mode;return ce.useEffect(()=>{He.isSignedIn()&&!Lf&&e!=null&&(tm(e,t),Lf=!0)},[e]),U.jsxs(gt,{children:[U.jsx(Te,{path:"/ai-accountant/*",element:U.jsx(Tm,{})}),U.jsx(Te,{path:"/management/*",element:U.jsx(ig,{})}),U.jsx(Te,{path:"/subscription/*",element:U.jsx(db,{})}),U.jsx(Te,{path:"/onboarding/*",element:U.jsx(g_,{})}),U.jsx(Te,{path:"/portfolio/*",element:U.jsx(b_,{})}),U.jsx(Te,{path:"/audit/*",element:U.jsx(B_,{})}),U.jsx(Te,{path:"/reconciliation/*",element:U.jsx(C_,{})}),U.jsx(Te,{path:"/health-monitor/*",element:U.jsx(km,{})}),U.jsx(Te,{path:"/task-manager/*",element:U.jsx(gb,{})}),U.jsx(Te,{path:"/credit-agent/*",element:U.jsx(vb,{})}),U.jsx(Te,{path:"/*",element:U.jsx(yb,{})})]})}const kb=Object.freeze(Object.defineProperty({__proto__:null,default:_b},Symbol.toStringTag,{value:"Module"}));export{ke as P,kb as S,wm as u};
180
+ `;function ub(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Gt({filterText:r}))},onFiltersChange:(n,r)=>{e(Gt({filters:r}))}}},subscriptionPageActions:{onColumnSortConfigChanged:(n,r)=>{e(Gt({sortKey:n,sortOrder:r}))},onCollapseToggled:(n,r)=>{e(Gt({isRowCollapseToggled:{companyId:n,isCollapsed:r}}))},onScroll:n=>{e(Gt({scrollYOffset:n}))},changeHandlers:(n,r)=>{const i=fb(r);Object.keys(i).length>0&&e($o(n,i))},onCompanyNameClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard`),onPassportIconClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard/company_details`),onPlanOrAddOnClicked:(n,r)=>{e(bp({tenantId:r})),t.navigate(`../tenants/${r}/companies/${n}`)},onFiltersChange:(n,r)=>{e(Gt({filters:r}))},onCockpitReloadData:n=>{n==="subscription"&&e(Ho())}}}}function cb(e,t){return{subscriptionPageData:{loggedInUser:t.signedInUser,subscriptionView:t.subscriptionView}}}const lb=ze(cb,ub)(Qp);function Do({isDrawerOpen:e}){const t=Be(),n=We(),r=Ut(),i=Et(),a=Ee(f=>_p(f)),o=Ee(f=>f.companyViewState.zeniUsers.fetchState);ce.useEffect(()=>{a.fetchState==="Completed"?n(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&(n(Ho()),(o==="Not-Started"||o==="Error")&&n(Ct()))},[a.fetchState]);const d=He.getSignedInUser();return U.jsxs(U.Fragment,{children:[e===!0?U.jsx(ab,{}):null,U.jsx(lb,{headerData:{allTabOptions:i,selectedTabOption:St("subscription")},initialOpenThreadRequest:r??void 0,signedInUser:d,subscriptionView:a,navigate:t})]})}const fb=e=>{const{users:t}=e;return t?{users:t}:{}};function db(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId/:updatePageType",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Do,{})})})]})}function hb(e,t){const{navigate:n}=t;return{headerActions:{onTabChange:r=>{const i=kt(r);n(`../../${i}`,{replace:!0})},filterActions:{onFilterTextChanged:(r,i)=>{e(Ss({filterText:i}))},onFiltersChange:(r,i)=>{e(Ss({filters:i}))}}},taskManagerPageActions:{onRowClick:(r,i)=>{window.open(`/${r}/tasks/${i}`)},onCockpitReloadData:r=>{r==="taskManager"&&e(No(0,"dueDate","descending",!1))},onFetchTaskManagerView:(r,i,a,o,d,f)=>{e(No(r,i,a,o,d,f))}}}}function pb(e,t){return{isBirdsEyeViewEnabled:t.isBirdsEyeViewEnabled,taskManagerPageData:{companyTaskManagerView:t.companyTaskManagerView}}}const mb=ze(pb,hb)(em);function jf(){const e=Be(),t=We(),n=Ut(),r=Et(),{useFeatureGate:i}=wt(),{isFeatureEnabled:a}=i(yn.isBirdsEyeViewEnabled),o=Ee(l=>wp(l)),d=Ee(l=>Sp(l)),f=Ee(l=>l.companyViewState.zeniUsers.fetchState);if(ce.useEffect(()=>{o.fetchState==="Completed"?t(xt(!1)):o.fetchState==="Not-Started"&&(t(No(0,"dueDate","descending",!1)),t(Ep()),(f==="Not-Started"||f==="Error")&&t(Ct()))},[o.fetchState]),ce.useEffect(()=>{a&&(o.metricsFetchState==="Not-Started"||o.metricsFetchState==="Error")&&t(Rp())},[a,o.metricsFetchState]),He.getSignedInUser()==null)throw Error("Can't access task manager page without signing in...");const s=ce.useMemo(()=>({allTabOptions:r,selectedTabOption:St("taskManager")}),[r]);return U.jsx(mb,{headerData:s,companyTaskManagerView:o,isBirdsEyeViewEnabled:a,initialOpenThreadRequest:n,navigate:e,reviewCount:d})}function gb(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(jf,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(jf,{})})})]})}const vb=ud(()=>td(()=>import("./CreditAgentRoutes-C3KSn0qF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])));let Lf=!1;const yb=ud(()=>td(()=>Promise.resolve().then(()=>Km),void 0));function _b(){const e=He.getSignedInUser(),t=Bt().mode;return ce.useEffect(()=>{He.isSignedIn()&&!Lf&&e!=null&&(tm(e,t),Lf=!0)},[e]),U.jsxs(gt,{children:[U.jsx(Te,{path:"/ai-accountant/*",element:U.jsx(Tm,{})}),U.jsx(Te,{path:"/management/*",element:U.jsx(ig,{})}),U.jsx(Te,{path:"/subscription/*",element:U.jsx(db,{})}),U.jsx(Te,{path:"/onboarding/*",element:U.jsx(g_,{})}),U.jsx(Te,{path:"/portfolio/*",element:U.jsx(b_,{})}),U.jsx(Te,{path:"/audit/*",element:U.jsx(B_,{})}),U.jsx(Te,{path:"/reconciliation/*",element:U.jsx(C_,{})}),U.jsx(Te,{path:"/health-monitor/*",element:U.jsx(km,{})}),U.jsx(Te,{path:"/task-manager/*",element:U.jsx(gb,{})}),U.jsx(Te,{path:"/credit-agent/*",element:U.jsx(vb,{})}),U.jsx(Te,{path:"/*",element:U.jsx(yb,{})})]})}const kb=Object.freeze(Object.defineProperty({__proto__:null,default:_b},Symbol.toStringTag,{value:"Module"}));export{ke as P,kb as S,wm as u};
@@ -1 +1 @@
1
- import{j as d}from"./liveblocks-DYWzFGhT.js";import{a as S,R as f,n as m}from"./sentry-BKGW4O8F.js";import{n as I,i as w,g,u as h,N as y,h as b}from"./core-D8hk6m0T.js";import{z as l,G as C,b as v,p as E,S as T,c as p}from"./index-D8u0upr9.js";import{SX as U,SY as x,SZ as L,S_ as z,bm as u}from"./zeni-epic-state-Bo6SozDm.js";import{f as D}from"./analyticsHelper-BCwbzW6S.js";import{u as A}from"./mui-DNgie5_z.js";import"./recharts-vOQNlcA0.js";import"./analytics-PQVWTCTD.js";import"./lottie-BxTTb6gO.js";import"./lexical-Blrhkk2t.js";import"./utils-SUgx7y8O.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="477d9961-00e7-47ce-b6d3-2a1ce7942588",e._sentryDebugIdIdentifier="sentry-dbid-477d9961-00e7-47ce-b6d3-2a1ce7942588")}catch{}})();function N(e){const o=e.tenantState.fetchState,i=e.tenantState.sendEmailMagicLinkFetchState;return{googleClientId:p.googleClientId,microsoftClientId:p.microsoftClientId,signInError:e.tenantState.error?.error,fetchState:o,sendMagicLinkStatus:i,showEmailLogin:!1}}function _(e,o){const{location:i,navigate:a}=o;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,t)=>{m({message:`OAuth error from provider ${t} with error ${n}`,level:"error",tags:{authProvider:t,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,t)=>{const s=t==="google"?window.location.origin:window.location.origin+window.location.pathname;e(z({authCode:n,oauthProvider:t,appType:"web",redirectUri:u(s),sourceUri:u(i.state!=null?i.state.origin:"")}))},getSignedInUser:()=>l.getSignedInUser(),onSignedInCallback:()=>{const n=i.state?.origin;n&&n!=="/"?a(n,{replace:!0}):window.open(window.location.origin,"_self")},clearSignInError:()=>{e(L())}}}const k=b(N,_)(T),P=f.memo(k);function X(){const e=I(),o=w(),i=l.getSignedInUser(),a=g(r=>r.tenantState.fetchState),n=g(r=>r.tenantState.signInState),t=g(r=>r.tenantState.loggedInUser),s=A().mode,c=h();if(S.useEffect(()=>{n==="In-Progress"&&a==="Completed"&&t?.zeniSessionId!=null&&(l.saveSignedInUserWithSession(t,t.zeniSessionId),U(t.userId,t.zeniSessionId),e(x("Completed")),C.updateAppLocaleID("en"),D(t,s),setTimeout(()=>{v.trackLogin(E.Event.loginSuccess,t.authProvider??"google")},2e3))},[]),n==="In-Progress"&&a==="Completed"&&t?.zeniSessionId!=null||i!=null){const r=c.state?.origin??"/";return d.jsx(y,{to:r,state:{...c.state,origin:""}})}else return d.jsx(P,{navigate:o,location:c})}export{X as default};
1
+ import{j as d}from"./liveblocks-BcpL_eIf.js";import{a as S,R as f,n as m}from"./sentry-CXD2tUYO.js";import{n as I,i as w,g,u as h,N as y,h as b}from"./core-B83eUXZg.js";import{z as l,G as C,b as v,p as E,S as T,c as p}from"./index-Dj5tmvX1.js";import{SX as U,SY as x,SZ as L,S_ as z,bm as u}from"./zeni-epic-state-BPERiJiS.js";import{f as D}from"./analyticsHelper-CEO3FRLE.js";import{u as A}from"./mui-RtA2F6xO.js";import"./recharts-Dw9UyYxv.js";import"./analytics-Dxa9-SvV.js";import"./lottie-BP5NslbC.js";import"./lexical-D2527jek.js";import"./utils-DGW3GFUd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="477d9961-00e7-47ce-b6d3-2a1ce7942588",e._sentryDebugIdIdentifier="sentry-dbid-477d9961-00e7-47ce-b6d3-2a1ce7942588")}catch{}})();function N(e){const o=e.tenantState.fetchState,i=e.tenantState.sendEmailMagicLinkFetchState;return{googleClientId:p.googleClientId,microsoftClientId:p.microsoftClientId,signInError:e.tenantState.error?.error,fetchState:o,sendMagicLinkStatus:i,showEmailLogin:!1}}function _(e,o){const{location:i,navigate:a}=o;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,t)=>{m({message:`OAuth error from provider ${t} with error ${n}`,level:"error",tags:{authProvider:t,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,t)=>{const s=t==="google"?window.location.origin:window.location.origin+window.location.pathname;e(z({authCode:n,oauthProvider:t,appType:"web",redirectUri:u(s),sourceUri:u(i.state!=null?i.state.origin:"")}))},getSignedInUser:()=>l.getSignedInUser(),onSignedInCallback:()=>{const n=i.state?.origin;n&&n!=="/"?a(n,{replace:!0}):window.open(window.location.origin,"_self")},clearSignInError:()=>{e(L())}}}const k=b(N,_)(T),P=f.memo(k);function X(){const e=I(),o=w(),i=l.getSignedInUser(),a=g(r=>r.tenantState.fetchState),n=g(r=>r.tenantState.signInState),t=g(r=>r.tenantState.loggedInUser),s=A().mode,c=h();if(S.useEffect(()=>{n==="In-Progress"&&a==="Completed"&&t?.zeniSessionId!=null&&(l.saveSignedInUserWithSession(t,t.zeniSessionId),U(t.userId,t.zeniSessionId),e(x("Completed")),C.updateAppLocaleID("en"),D(t,s),setTimeout(()=>{v.trackLogin(E.Event.loginSuccess,t.authProvider??"google")},2e3))},[]),n==="In-Progress"&&a==="Completed"&&t?.zeniSessionId!=null||i!=null){const r=c.state?.origin??"/";return d.jsx(y,{to:r,state:{...c.state,origin:""}})}else return d.jsx(P,{navigate:o,location:c})}export{X as default};