@react-email/preview-server 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/preview/[...slug]/page/server-reference-manifest.json +7 -7
- package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__18129482._.js +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__a0a18175._.js → [root-of-the-server]__a108fb1c._.js} +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__a0a18175._.js.map → [root-of-the-server]__a108fb1c._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__d473ad55._.js +1 -1
- package/.next/server/chunks/ssr/_1e7382c4._.js +1 -1
- package/.next/server/chunks/ssr/_1e7382c4._.js.map +1 -1
- package/.next/server/chunks/ssr/_38d04011._.js +1 -1
- package/.next/server/chunks/ssr/_38d04011._.js.map +1 -1
- package/.next/server/chunks/ssr/_4918e306._.js +1 -1
- package/.next/server/chunks/ssr/_4918e306._.js.map +1 -1
- package/.next/server/chunks/ssr/_79065a4e._.js +1 -1
- package/.next/server/chunks/ssr/_79065a4e._.js.map +1 -1
- package/.next/server/chunks/ssr/_d3e887f6._.js +1 -1
- package/.next/server/chunks/ssr/_d3e887f6._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_preview-server_src_f0998b31._.js +1 -1
- package/.next/server/chunks/ssr/packages_preview-server_src_f0998b31._.js.map +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +8 -8
- package/.next/static/chunks/54c8ef691d68704b.css +3 -0
- package/.next/static/chunks/65727c8467ced1d9.js +1 -0
- package/.next/static/chunks/8e74e5d1900f2223.js +1 -0
- package/.next/static/chunks/{45b1225b2717626c.js → d9a7b4274314c5d8.js} +1 -1
- package/.next/static/chunks/{fca0e5e80bb0405b.js → ef9c097f5b777499.js} +1 -1
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/components/resizable-wrapper.tsx +2 -5
- package/src/components/sidebar/sidebar.tsx +2 -2
- package/.next/static/chunks/8cac1d97e33c6868.js +0 -1
- package/.next/static/chunks/a1be64d092760bc6.js +0 -1
- package/.next/static/chunks/daa3196100e7d340.css +0 -3
- /package/.next/static/{fWKfDBA1-pCeZ3szdNaIB → im-qT8p8L52cpQgG6WtuN}/_buildManifest.js +0 -0
- /package/.next/static/{fWKfDBA1-pCeZ3szdNaIB → im-qT8p8L52cpQgG6WtuN}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{fWKfDBA1-pCeZ3szdNaIB → im-qT8p8L52cpQgG6WtuN}/_ssgManifest.js +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
${h}px !important;
|
|
7
7
|
top: ${n}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{f.contains(p)&&f.removeChild(p)}},[r]),(0,t.jsx)(M,{isPresent:r,childRef:s,sizeRef:l,children:T.cloneElement(e,{ref:c})})}let F=({children:e,initial:r,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,root:c})=>{let d=(0,E.useConstant)(D),h=(0,n.useId)(),p=!0,f=(0,n.useMemo)(()=>(p=!1,{id:h,initial:r,isPresent:i,custom:o,onExitComplete:e=>{for(let t of(d.set(e,!0),d.values()))if(!t)return;a&&a()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[i,d,a]);return s&&p&&(f={...f}),(0,n.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[i]),n.useEffect(()=>{i||d.size||!a||a()},[i]),"popLayout"===l&&(e=(0,t.jsx)(R,{isPresent:i,anchorX:u,root:c,children:e})),(0,t.jsx)(S.PresenceContext.Provider,{value:f,children:e})};function D(){return new Map}var I=e.i(95918);let j=e=>e.key||"";function O(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}let N=({children:e,custom:r,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",root:c})=>{let[d,h]=(0,I.usePresence)(l),p=(0,n.useMemo)(()=>O(e),[e]),f=l&&!d?[]:p.map(j),m=(0,n.useRef)(!0),g=(0,n.useRef)(p),y=(0,E.useConstant)(()=>new Map),[v,b]=(0,n.useState)(p),[w,x]=(0,n.useState)(p);(0,k.useIsomorphicLayoutEffect)(()=>{m.current=!1,g.current=p;for(let e=0;e<w.length;e++){let t=j(w[e]);f.includes(t)?y.delete(t):!0!==y.get(t)&&y.set(t,!1)}},[w,f.length,f.join("-")]);let C=[];if(p!==v){let e=[...p];for(let t=0;t<w.length;t++){let n=w[t],r=j(n);f.includes(r)||(e.splice(t,0,n),C.push(n))}return"wait"===s&&C.length&&(e=C),x(O(e)),b(p),null}let{forceRender:S}=(0,n.useContext)(_.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:w.map(e=>{let n=j(e),v=(!l||!!d)&&(p===w||f.includes(n));return(0,t.jsx)(F,{isPresent:v,initial:(!m.current||!!i)&&void 0,custom:r,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:v?void 0:()=>{if(!y.has(n))return;y.set(n,!0);let e=!0;y.forEach(t=>{t||(e=!1)}),e&&(S?.(),x(g.current),l&&h?.(),a&&a())},anchorX:u,children:e},n)})})};e.s(["AnimatePresence",()=>N],77887);var B=e.i(99065);let V=n.forwardRef(({...e},n)=>(0,t.jsx)(B.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M7.75 4C6.23122 4 5 5.23122 5 6.75V17.25C5 18.7688 6.23122 20 7.75 20H16.25C17.7688 20 19 18.7688 19 17.25V9C19 8.80109 18.921 8.61032 18.7803 8.46967L14.5303 4.21967C14.3897 4.07902 14.1989 4 14 4H7.75ZM6.5 6.75C6.5 6.05964 7.05964 5.5 7.75 5.5H13V9.25C13 9.66421 13.3358 10 13.75 10H17.5V17.25C17.5 17.9404 16.9404 18.5 16.25 18.5H7.75C7.05964 18.5 6.5 17.9404 6.5 17.25V6.75ZM16.6893 8.5L14.5 6.31066V8.5H16.6893Z",fill:"currentColor",fillOpacity:"0.927",fillRule:"evenodd"})}));V.displayName="IconFile",e.s(["IconFile",0,V],73241)},22166,e=>{"use strict";var t=e.i(49135),n=e.i(63422),r=e.i(97877);e.i(26084);var i=e.i(73500),a=e.i(34855);let o=r.forwardRef(({as:e="h1",size:r="3",className:a,color:o="white",children:c,weight:d="bold",...h},p)=>(0,t.jsx)(n.Slot,{className:(0,i.cn)(a,s(r),l(o),u(d)),ref:p,...h,children:(0,t.jsx)(e,{children:c})})),s=e=>{switch(e){case"1":return"text-xs";case"2":return"text-sm";case void 0:case"3":return"text-base";case"4":return"text-lg";case"5":return"text-xl tracking-[-0.16px]";case"6":return"text-2xl tracking-[-0.288px]";case"7":return"text-[28px] leading-[34px] tracking-[-0.416px]";case"8":return"text-[35px] leading-[42px] tracking-[-0.64px]";case"9":return"text-6xl leading-[73px] tracking-[-0.896px]";case"10":return["text-[38px] leading-[46px]","md:text-[70px] md:leading-[85px] tracking-[-1.024px;]"];default:return(0,a.unreachable)(e)}},l=e=>{switch(e){case"gray":return"text-slate-11";case"white":case void 0:return"text-slate-12";default:return(0,a.unreachable)(e)}},u=e=>{switch(e){case"medium":return"font-medium";case"bold":case void 0:return"font-bold";default:return(0,a.unreachable)(e)}};o.displayName="Heading",e.s(["Heading",0,o])},87844,99065,e=>{"use strict";var t=e.i(49135),n=e.i(97877);let r=n.forwardRef(({size:e=20,children:n,...r},i)=>(0,t.jsx)("svg",{fill:"none",height:e,ref:i,viewBox:"0 0 24 24",width:e,xmlns:"http://www.w3.org/2000/svg",...r,children:n}));r.displayName="IconBase",e.s(["IconBase",0,r],99065);let i=n.forwardRef(({...e},n)=>(0,t.jsx)(r,{ref:n,...e,children:(0,t.jsx)("path",{d:"M12 16L6 9.85966L6.84 9L12 14.2808L17.16 9L18 9.85966L12 16Z",fill:"currentColor"})}));i.displayName="IconArrowDown",e.s(["IconArrowDown",0,i],87844)},70018,e=>{"use strict";var t=e.i(49135),n=e.i(7284),r=e.i(56622);e.i(26084);var i=e.i(73500),a=e.i(11524),o=e.i(57383),s=e.i(97877),l=e.i(77887),u=e.i(98804),c=e.i(36002),d=e.i(21096),h=e.i(18960),p=e.i(73241),f=e.i(22166),m=e.i(87844),g=e.i(99065);let y=s.forwardRef(({...e},n)=>(0,t.jsx)(g.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M6.75 4C5.23122 4 4 5.23122 4 6.75V7.75V8V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25V9.75C20 8.23122 18.7688 7 17.25 7H14.0816L13.227 5.43322C12.7451 4.54965 11.819 4 10.8127 4H6.75ZM12.3729 7L11.9101 6.15145L11.91 6.15138C11.6911 5.74989 11.2702 5.5 10.8127 5.5H6.75C6.05964 5.5 5.5 6.05964 5.5 6.75V7H12.3729ZM5.5 17.25V8.5H17.25C17.9404 8.5 18.5 9.05964 18.5 9.75V17.25C18.5 17.9404 17.9404 18.5 17.25 18.5H6.75C6.05964 18.5 5.5 17.9404 5.5 17.25Z",fill:"currentColor",fillRule:"evenodd"})}));y.displayName="IconFolder";let v=s.forwardRef(({...e},n)=>(0,t.jsx)(g.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M6.75 4C5.23122 4 4 5.23122 4 6.75V17.25V17.5C4 17.5933 4.01702 17.6825 4.04812 17.7649C4.28918 19.0376 5.4072 20 6.75 20H17.25C17.9905 20 18.6283 19.7404 19.111 19.2387C19.5681 18.7636 19.836 18.1241 19.9792 17.4279L21.4711 12.206C21.4903 12.139 21.5 12.0697 21.5 12C21.5 10.652 20.5301 9.53047 19.25 9.29534V8.5C19.25 7.5335 18.4665 6.75 17.5 6.75H13.9452L13.227 5.43322C12.7451 4.54965 11.819 4 10.8127 4H6.75ZM17.75 9.25V8.5C17.75 8.36193 17.6381 8.25 17.5 8.25H13.5C13.2255 8.25 12.973 8.10009 12.8416 7.85915L11.9101 6.15145L11.91 6.15138C11.6911 5.74989 11.2702 5.5 10.8127 5.5H6.75C6.05964 5.5 5.5 6.05964 5.5 6.75V13.158L6.79875 9.73401C6.90926 9.44267 7.1884 9.25 7.5 9.25H17.75ZM5.50587 17.372L8.01766 10.75H18.5H18.75C19.4091 10.75 19.949 11.26 19.9966 11.9069L18.5289 17.044C18.5233 17.0634 18.5185 17.0831 18.5146 17.1029C18.4062 17.6448 18.2275 17.9934 18.03 18.1988C17.8513 18.3846 17.6141 18.5 17.25 18.5H6.75C6.10079 18.5 5.56718 18.0051 5.50587 17.372Z",fill:"currentColor",fillRule:"evenodd"})}));v.displayName="IconFolderOpen";let b=new Set,w=({emailsDirectoryMetadata:e,className:n,currentEmailOpenSlug:r})=>{let a=!!r&&r.includes(e.relativePath),l=0===e.emailFilenames.length&&0===e.subDirectories.length,[u,c]=s.useState(b.has(e.absolutePath)||a);return(0,t.jsxs)(o.Root,{className:(0,i.cn)("group",n),onOpenChange:t=>{t?b.add(e.absolutePath):b.delete(e.absolutePath),c(t)},open:u,children:[(0,t.jsxs)(o.Trigger,{className:(0,i.cn)("mt-1 mb-1.5 flex w-full items-center text-start justify-between gap-2 font-medium text-[14px]",{"cursor-pointer":!l}),children:[u?(0,t.jsx)(v,{className:"w-[20px]",height:"20",width:"20"}):(0,t.jsx)(y,{height:"20",width:"20"}),(0,t.jsx)(f.Heading,{as:"h3",className:"transition grow w-[calc(100%-40px)] truncate duration-200 ease-in-out hover:text-slate-12",color:"gray",size:"2",weight:"medium",children:e.directoryName}),l?null:(0,t.jsx)(m.IconArrowDown,{width:"20",height:"20",className:"ml-auto opacity-60 transition-transform data-[open=true]:rotate-180","data-open":u})]}),l?null:(0,t.jsx)(x,{currentEmailOpenSlug:r,emailsDirectoryMetadata:e,open:u})]})},x=e=>{let n=(0,h.useSearchParams)(),r=(0,h.useRouter)(),a=s.useId();return(0,t.jsx)(l.AnimatePresence,{initial:!1,children:e.open?(0,t.jsx)(o.Content,{asChild:!0,className:"relative overflow-y-hidden pl-1",forceMount:!0,children:(0,t.jsxs)(c.motion.div,{animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},initial:{opacity:0,height:0},children:[e.isRoot?null:(0,t.jsx)("div",{className:"line absolute left-2.5 h-full w-px bg-slate-6"}),(0,t.jsx)("div",{className:"flex flex-col truncate",children:(0,t.jsxs)(u.LayoutGroup,{id:`sidebar-${a}`,children:[e.emailsDirectoryMetadata.subDirectories.map(n=>(0,t.jsx)(w,{className:"p-0 data-[state=open]:mb-2",currentEmailOpenSlug:e.currentEmailOpenSlug,emailsDirectoryMetadata:n},n.absolutePath)),e.emailsDirectoryMetadata.emailFilenames.map((a,o)=>{var s;let l=e.isRoot?a:`${e.emailsDirectoryMetadata.relativePath}/${a}`,u=!!e.currentEmailOpenSlug&&("tsx"===(s=e.currentEmailOpenSlug).split(".").pop()||"jsx"===s.split(".").pop()||"js"===s.split(".").pop()?s.split(".").slice(0,-1).join("."):s)===l;return(0,t.jsx)(d.default,{href:{pathname:`/preview/${l}`,search:n.toString()},onMouseOver:()=>{r.prefetch(`/preview/${l}?${n.toString()}`)},children:(0,t.jsxs)(c.motion.span,{animate:{x:0,opacity:1},className:(0,i.cn)("relative flex h-8 w-full items-center text-start gap-2 rounded-md align-middle text-slate-11 text-sm transition-colors duration-100 ease-[cubic-bezier(.6,.12,.34,.96)]",e.isRoot?void 0:"pl-3",{"text-cyan-11":u,"hover:text-slate-12":e.currentEmailOpenSlug!==l}),initial:{x:-10+-(1.5*o),opacity:0},transition:{x:{delay:.03*o,duration:.2},opacity:{delay:.03*o,duration:.2}},children:[u?(0,t.jsx)(c.motion.span,{animate:{opacity:1},className:"absolute inset-0 rounded-md bg-cyan-5 opacity-0 transition-all duration-200 ease-[cubic-bezier(.6,.12,.34,.96)]",exit:{opacity:0},initial:{opacity:0},children:e.isRoot?null:(0,t.jsx)(c.motion.div,{className:"absolute top-1 left-[0.4rem] inset-0 h-6 w-px rounded-sm bg-cyan-11",layoutId:"active-file",transition:{type:"spring",bounce:.2,duration:.6}})}):null,(0,t.jsx)(p.IconFile,{className:"h-5 w-5",height:"20",width:"20"}),(0,t.jsx)("span",{className:"truncate w-[calc(100%-1.25rem)]",children:a})]})},l)})]})})]})}):null})},C=({currentEmailOpenSlug:e,emailsDirectoryMetadata:n})=>(0,t.jsx)("div",{className:"flex w-full h-full flex-col lg:w-full lg:min-w-[14.5rem]",children:(0,t.jsx)("nav",{className:"flex flex-grow flex-col p-4 pr-0 pl-0",children:(0,t.jsx)(o.Root,{open:!0,children:(0,t.jsx)(s.Suspense,{children:(0,t.jsx)(x,{currentEmailOpenSlug:e,emailsDirectoryMetadata:n,isRoot:!0,open:!0})})})})});e.s(["Sidebar",0,({className:e,currentEmailOpenSlug:o})=>{let{emailsDirectoryMetadata:s}=(0,r.useEmails)();return(0,t.jsx)("aside",{className:(0,i.cn)("overflow-hidden","lg:static lg:z-auto lg:max-h-screen lg:w-[16rem]",e),children:(0,t.jsxs)("div",{className:"flex w-full h-full overflow-hidden flex-col border-slate-6 border-r",children:[(0,t.jsx)("div",{className:(0,n.clsx)("hidden min-h-[3.3125rem] flex-shrink items-center p-3 px-4 lg:flex"),children:(0,t.jsx)("h2",{children:(0,t.jsx)(a.Logo,{})})}),(0,t.jsx)("div",{className:"relative grow w-full h-full overflow-y-auto overflow-x-hidden border-slate-4 border-t px-4 pb-3",children:(0,t.jsx)(C,{currentEmailOpenSlug:o,emailsDirectoryMetadata:s})})]})})}],70018)},68642,29669,e=>{"use strict";var t=e.i(49135),n=e.i(97877);e.i(26084);var r=e.i(73500),i=e.i(11524),a=e.i(70018);e.s([],29669);let o=n.createContext(void 0);e.s(["Shell",0,({children:e,currentEmailOpenSlug:s})=>{let[l,u]=n.useState(!0);return(0,t.jsxs)(o.Provider,{value:{toggleSidebar:()=>u(e=>!e),sidebarToggled:l},children:[(0,t.jsxs)("div",{className:"flex h-[4.375rem] items-center justify-between border-slate-6 border-b px-6 lg:hidden",children:[(0,t.jsx)("div",{className:"flex h-[4.375rem] items-center",children:(0,t.jsx)(i.Logo,{})}),(0,t.jsx)("button",{className:"flex h-6 w-6 items-center justify-center rounded text-white",onClick:()=>{u(e=>!e)},type:"button",children:(0,t.jsxs)("svg",{fill:"none",height:"16",stroke:"white",viewBox:"0 0 15 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"Menu"}),(0,t.jsx)("path",{clipRule:"evenodd",d:"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z",fill:"currentColor",fillRule:"evenodd"})]})})]}),(0,t.jsxs)("div",{className:"w-[100dvw] flex h-[calc(100dvh-4.375rem)] lg:h-[100dvh]",children:[(0,t.jsx)(n.Suspense,{children:(0,t.jsx)(a.Sidebar,{className:(0,r.cn)("fixed top-[4.375rem] left-0 z-[9999] h-full max-h-full w-full max-w-full will-change-auto [transition:width_0.2s_ease-in-out]","lg:static lg:inline-block lg:z-auto lg:max-h-full lg:w-[16rem]",{"-translate-x-full lg:translate-x-0":l,"lg:w-0":!l}),currentEmailOpenSlug:s})}),(0,t.jsx)("main",{className:(0,r.cn)("inline-block relative overflow-hidden will-change-[width]","w-full h-full","[transition:width_0.2s_ease-in-out,_transform_0.2s_ease-in-out]",{"lg:w-[calc(100%-16rem)]":l,"opacity-0 lg:opacity-100":!l}),children:e})]})]})},"ShellContext",0,o],68642)},94775,e=>{"use strict";var t,n,r=e.i(49135),i=e.i(97877),a=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))c.call(t,n)&&d(e,n,t[n]);return e},p=(e,t)=>{var n={};for(var r in e)u.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&l)for(var r of l(e))0>t.indexOf(r)&&c.call(e,r)&&(n[r]=e[r]);return n},f=(e,t,n)=>d(e,"symbol"!=typeof t?t+"":t,n),m=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),g=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},y=class{constructor(){f(this,"_lastHandleId",0),f(this,"_lastImmediate",null)}requestAnimationFrame(e){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},v=class{constructor(){f(this,"_strategy"),this._strategy="function"==typeof requestAnimationFrame?new g:new y}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}},b="u">typeof window&&"u">typeof window.document,w=new Uint8Array([80,75,3,4]),x=["v","ip","op","layers","fr","w","h"],C="0.42.0",_="@lottiefiles/dotlottie-web",E=(n="u">typeof document?null==(t=document.currentScript)?void 0:t.src:void 0,function(e={}){var t,r,i,a,o,s=new Promise((e,t)=>{a=e,o=t}),l=Object.assign({},e),u="./this.program",c="";"u">typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1);var d=e.print||console.log.bind(console),h=e.printErr||console.error.bind(console);Object.assign(e,l),l=null,e.thisProgram&&(u=e.thisProgram);var p,m,g,y,v,b,w,x,C,_,E=e.wasmBinary,k=!1;function S(){var t=p.buffer;e.HEAP8=g=new Int8Array(t),e.HEAP16=v=new Int16Array(t),e.HEAPU8=y=new Uint8Array(t),e.HEAPU16=b=new Uint16Array(t),e.HEAP32=w=new Int32Array(t),e.HEAPU32=x=new Uint32Array(t),e.HEAPF32=C=new Float32Array(t),e.HEAPF64=_=new Float64Array(t)}var L=[],T=[],A=[],P=0,M=null;function R(t){var n;throw null==(n=e.onAbort)||n.call(e,t),h(t="Aborted("+t+")"),k=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),o(t),t}function F(e){if(e==G&&E)return new Uint8Array(E);throw"both async and sync fetching of the wasm failed"}function D(e,t,n){var r;return(r=e,E?Promise.resolve().then(()=>F(r)):fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))).then(e=>new Uint8Array(e),()=>F(r))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{h(`failed to asynchronously prepare wasm: ${e}`),R(e)})}class I{constructor(e){f(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var j=t=>{for(;0<t.length;)t.shift()(e)},O=e.noExitRuntime||!0,N="u">typeof TextDecoder?new TextDecoder:void 0,B=(e,t=0,n=NaN)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&N)return N.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if((224&i)==192)r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=(240&i)==224?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},V=0;class ${constructor(e){this.Ea=e-24}}var z=(e,t,n)=>{var r=y;if(0<n){n=t+n-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(t>=n)break;r[t++]=a}else{if(2047>=a){if(t+1>=n)break;r[t++]=192|a>>6}else{if(65535>=a){if(t+2>=n)break;r[t++]=224|a>>12}else{if(t+3>=n)break;r[t++]=240|a>>18,r[t++]=128|a>>12&63}r[t++]=128|a>>6&63}r[t++]=128|63&a}}r[t]=0}},U={},H=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function W(e){return this.fromWireType(x[e>>2])}var G,Z,Y,q,K={},X={},J={},Q=(e,t,n)=>{function r(t){if((t=n(t)).length!==e.length)throw new Z("Mismatched type converter count");for(var r=0;r<e.length;++r)et(e[r],t[r])}e.forEach(e=>J[e]=t);var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{X.hasOwnProperty(e)?i[t]=X[e]:(a.push(e),K.hasOwnProperty(e)||(K[e]=[]),K[e].push(()=>{i[t]=X[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)},ee=e=>{for(var t="";y[e];)t+=Y[y[e++]];return t};function et(e,t,n={}){return function(e,t,n={}){var r=t.name;if(!e)throw new q(`type "${r}" must have a positive integer typeid pointer`);if(X.hasOwnProperty(e)){if(n.kb)return;throw new q(`Cannot register type '${r}' twice`)}X[e]=t,delete J[e],K.hasOwnProperty(e)&&(t=K[e],delete K[e],t.forEach(e=>e()))}(e,t,n)}var en=e=>{throw new q(e.Da.Ga.Fa.name+" instance already deleted")},er=!1,ei=()=>{},ea=(e,t,n)=>t===n?e:void 0===n.Ja||null===(e=ea(e,t,n.Ja))?null:n.cb(e),eo={},es={},el=(e,t)=>{if(!t.Ga||!t.Ea)throw new Z("makeClassHandle requires ptr and ptrType");if(!!t.Ka!=!!t.Ia)throw new Z("Both smartPtrType and smartPtr must be specified");return t.count={value:1},eu(Object.create(e,{Da:{value:t,writable:!0}}))},eu=e=>typeof FinalizationRegistry>"u"?(eu=e=>e,e):(er=new FinalizationRegistry(e=>{e=e.Da,--e.count.value,0===e.count.value&&(e.Ia?e.Ka.Na(e.Ia):e.Ga.Fa.Na(e.Ea))}),eu=e=>{var t=e.Da;return t.Ia&&er.register(e,{Da:t},e),e},ei=e=>{er.unregister(e)},eu(e));function ec(){}var ed=(e,t)=>Object.defineProperty(t,"name",{value:e}),eh=(e,t,n)=>{if(void 0===e[t].Ha){var r=e[t];e[t]=function(...r){if(!e[t].Ha.hasOwnProperty(r.length))throw new q(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].Ha})!`);return e[t].Ha[r.length].apply(this,r)},e[t].Ha=[],e[t].Ha[r.Qa]=r}},ep=(t,n,r)=>{if(e.hasOwnProperty(t)){if(void 0===r||void 0!==e[t].Ha&&void 0!==e[t].Ha[r])throw new q(`Cannot register public name '${t}' twice`);if(eh(e,t,t),e[t].Ha.hasOwnProperty(r))throw new q(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);e[t].Ha[r]=n}else e[t]=n,e[t].Qa=r};function ef(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.Pa=n,this.Na=r,this.Ja=i,this.fb=a,this.Ta=o,this.cb=s,this.mb=[]}var em=(e,t,n)=>{for(;t!==n;){if(!t.Ta)throw new q(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.Ta(e),t=t.Ja}return e};function eg(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);return 0}if(!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return em(t.Da.Ea,t.Da.Ga.Fa,this.Fa)}function ey(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);if(this.Va){var n=this.Xa();return null!==e&&e.push(this.Na,n),n}return 0}if(!t||!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ua&&t.Da.Ga.Ua)throw new q(`Cannot convert argument of type ${t.Da.Ka?t.Da.Ka.name:t.Da.Ga.name} to parameter type ${this.name}`);if(n=em(t.Da.Ea,t.Da.Ga.Fa,this.Fa),this.Va){if(void 0===t.Da.Ia)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.rb){case 0:if(t.Da.Ka===this)n=t.Da.Ia;else throw new q(`Cannot convert argument of type ${t.Da.Ka?t.Da.Ka.name:t.Da.Ga.name} to parameter type ${this.name}`);break;case 1:n=t.Da.Ia;break;case 2:if(t.Da.Ka===this)n=t.Da.Ia;else{var r=t.clone();n=this.nb(n,eD(()=>r.delete())),null!==e&&e.push(this.Na,n)}break;default:throw new q("Unsupporting sharing policy")}}return n}function ev(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);return 0}if(!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.Da.Ga.Ua)throw new q(`Cannot convert argument of type ${t.Da.Ga.name} to parameter type ${this.name}`);return em(t.Da.Ea,t.Da.Ga.Fa,this.Fa)}function eb(e,t,n,r,i,a,o,s,l,u,c){this.name=e,this.Fa=t,this.Wa=n,this.Ua=r,this.Va=i,this.lb=a,this.rb=o,this.ab=s,this.Xa=l,this.nb=u,this.Na=c,i||void 0!==t.Ja?this.toWireType=ey:(this.toWireType=r?eg:ev,this.Ma=null)}var ew,ex,eC=(t,n,r)=>{if(!e.hasOwnProperty(t))throw new Z("Replacing nonexistent public symbol");void 0!==e[t].Ha&&void 0!==r?e[t].Ha[r]=n:(e[t]=n,e[t].Qa=r)},e_=(t,n)=>{let r;var i=(t=ee(t)).includes("j")?(r=t,(...t)=>((t,n,r=[])=>n=t.includes("j")?(0,e["dynCall_"+(t=t.replace(/p/g,"i"))])(n,...r):ew.get(n)(...r))(r,n,t)):ew.get(n);if("function"!=typeof i)throw new q(`unknown function pointer with signature ${t}: ${n}`);return i},eE=e=>{var t=ee(e=e6(e));return e7(e),t},ek=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||X[t]||(J[t]?J[t].forEach(e):(n.push(t),r[t]=!0))}),new ex(`${e}: `+n.map(eE).join([", "]))},eS=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(x[t+4*r>>2]);return n};function eL(e,t,n,r,i){var a=t.length;if(2>a)throw new q("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].Ma)return!0;return!1}(t),l="void"!==t[0].name,u=a-2,c=Array(u),d=[],h=[];return ed(e,function(...e){if(h.length=0,d.length=o?2:1,d[0]=i,o){var n=t[1].toWireType(h,this);d[1]=n}for(var a=0;a<u;++a)c[a]=t[a+2].toWireType(h,e[a]),d.push(c[a]);if(e=r(...d),s)H(h);else for(a=o?1:2;a<t.length;a++){var p=1===a?n:c[a-2];null!==t[a].Ma&&t[a].Ma(p)}return l?t[0].fromWireType(e):void 0})}var eT,eA=e=>{let t=(e=e.trim()).indexOf("(");return -1!==t?e.substr(0,t):e},eP=[],eM=[],eR=e=>{9<e&&0==--eM[e+1]&&(eM[e]=void 0,eP.push(e))},eF=e=>{if(!e)throw new q("Cannot use deleted val. handle = "+e);return eM[e]},eD=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=eP.pop()||eM.length;return eM[t]=e,eM[t+1]=1,t}},eI={name:"emscripten::val",fromWireType:e=>{var t=eF(e);return eR(e),t},toWireType:(e,t)=>eD(t),La:8,readValueFromPointer:W,Ma:null},ej=(e,t)=>{var n=X[e];if(void 0===n)throw e=`${t} has unknown type ${eE(e)}`,new q(e);return n},eO=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},eN=Object.assign({optional:!0},eI),eB="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&b[n];)++n;if(32<(n<<=1)-e&&eB)return eB.decode(y.subarray(e,n));for(n="",r=0;!(r>=t/2);++r){var i=v[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},e$=(e,t,n)=>{if(null!=n||(n=0x7fffffff),2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)v[t>>1]=e.charCodeAt(i),t+=2;return v[t>>1]=0,t-r},ez=e=>2*e.length,eU=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=w[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r},eH=(e,t,n)=>{if(null!=n||(n=0x7fffffff),4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),w[t>>2]=a,(t+=4)+4>n)break}return w[t>>2]=0,t-r},eW=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},eG=0,eZ=[],eY=Reflect.construct,eq={},eK=e=>{if(!(e instanceof I||"unwind"==e))throw e},eX=t=>{var n;throw m=t,O||0<eG||(null==(n=e.onExit)||n.call(e,t),k=!0),new I(t)},eJ={},eQ=()=>{if(!eT){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in eJ)void 0===eJ[e]?delete t[e]:t[e]=eJ[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);eT=n}return eT},e1=[null,[],[]],e2=e=>(e2=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);R("initRandomDevice")})())(e);Z=e.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}};for(var e3=Array(256),e0=0;256>e0;++e0)e3[e0]=String.fromCharCode(e0);Y=e3,q=e.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(ec.prototype,{isAliasOf:function(e){if(!(this instanceof ec&&e instanceof ec))return!1;var t=this.Da.Ga.Fa,n=this.Da.Ea;e.Da=e.Da;var r=e.Da.Ga.Fa;for(e=e.Da.Ea;t.Ja;)n=t.Ta(n),t=t.Ja;for(;r.Ja;)e=r.Ta(e),r=r.Ja;return t===r&&n===e},clone:function(){if(this.Da.Ea||en(this),this.Da.Sa)return this.Da.count.value+=1,this;var e=eu,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.Da;return e=e(n.call(t,r,{Da:{value:{count:i.count,Ra:i.Ra,Sa:i.Sa,Ea:i.Ea,Ga:i.Ga,Ia:i.Ia,Ka:i.Ka}}})),e.Da.count.value+=1,e.Da.Ra=!1,e},delete(){if(this.Da.Ea||en(this),this.Da.Ra&&!this.Da.Sa)throw new q("Object already scheduled for deletion");ei(this);var e=this.Da;--e.count.value,0===e.count.value&&(e.Ia?e.Ka.Na(e.Ia):e.Ga.Fa.Na(e.Ea)),this.Da.Sa||(this.Da.Ia=void 0,this.Da.Ea=void 0)},isDeleted:function(){return!this.Da.Ea},deleteLater:function(){if(this.Da.Ea||en(this),this.Da.Ra&&!this.Da.Sa)throw new q("Object already scheduled for deletion");return this.Da.Ra=!0,this}}),Object.assign(eb.prototype,{gb(e){return this.ab&&(e=this.ab(e)),e},Za(e){var t;null==(t=this.Na)||t.call(this,e)},La:8,readValueFromPointer:W,fromWireType:function(e){function t(){return this.Va?el(this.Fa.Pa,{Ga:this.lb,Ea:n,Ka:this,Ia:e}):el(this.Fa.Pa,{Ga:this,Ea:e})}var n=this.gb(e);if(!n)return this.Za(e),null;var r=((e,t)=>{if(void 0===t)throw new q("ptr should not be undefined");for(;e.Ja;)t=e.Ta(t),e=e.Ja;return es[t]})(this.Fa,n);if(void 0!==r)return 0===r.Da.count.value?(r.Da.Ea=n,r.Da.Ia=e,r.clone()):(r=r.clone(),this.Za(e),r);if(!(r=eo[r=this.Fa.fb(n)]))return t.call(this);r=this.Ua?r.bb:r.pointerType;var i=ea(n,this.Fa,r.Fa);return null===i?t.call(this):this.Va?el(r.Fa.Pa,{Ga:r,Ea:i,Ka:this,Ia:e}):el(r.Fa.Pa,{Ga:r,Ea:i})}}),t=Error,(r=ed("UnboundTypeError",function(e){this.name="UnboundTypeError",this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+`
|
|
9
|
+
`),()=>{f.contains(p)&&f.removeChild(p)}},[r]),(0,t.jsx)(M,{isPresent:r,childRef:s,sizeRef:l,children:T.cloneElement(e,{ref:c})})}let F=({children:e,initial:r,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:l,anchorX:u,root:c})=>{let d=(0,E.useConstant)(D),h=(0,n.useId)(),p=!0,f=(0,n.useMemo)(()=>(p=!1,{id:h,initial:r,isPresent:i,custom:o,onExitComplete:e=>{for(let t of(d.set(e,!0),d.values()))if(!t)return;a&&a()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[i,d,a]);return s&&p&&(f={...f}),(0,n.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[i]),n.useEffect(()=>{i||d.size||!a||a()},[i]),"popLayout"===l&&(e=(0,t.jsx)(R,{isPresent:i,anchorX:u,root:c,children:e})),(0,t.jsx)(S.PresenceContext.Provider,{value:f,children:e})};function D(){return new Map}var I=e.i(95918);let j=e=>e.key||"";function O(e){let t=[];return n.Children.forEach(e,e=>{(0,n.isValidElement)(e)&&t.push(e)}),t}let N=({children:e,custom:r,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s="sync",propagate:l=!1,anchorX:u="left",root:c})=>{let[d,h]=(0,I.usePresence)(l),p=(0,n.useMemo)(()=>O(e),[e]),f=l&&!d?[]:p.map(j),m=(0,n.useRef)(!0),g=(0,n.useRef)(p),y=(0,E.useConstant)(()=>new Map),[v,b]=(0,n.useState)(p),[w,x]=(0,n.useState)(p);(0,k.useIsomorphicLayoutEffect)(()=>{m.current=!1,g.current=p;for(let e=0;e<w.length;e++){let t=j(w[e]);f.includes(t)?y.delete(t):!0!==y.get(t)&&y.set(t,!1)}},[w,f.length,f.join("-")]);let C=[];if(p!==v){let e=[...p];for(let t=0;t<w.length;t++){let n=w[t],r=j(n);f.includes(r)||(e.splice(t,0,n),C.push(n))}return"wait"===s&&C.length&&(e=C),x(O(e)),b(p),null}let{forceRender:S}=(0,n.useContext)(_.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:w.map(e=>{let n=j(e),v=(!l||!!d)&&(p===w||f.includes(n));return(0,t.jsx)(F,{isPresent:v,initial:(!m.current||!!i)&&void 0,custom:r,presenceAffectsLayout:o,mode:s,root:c,onExitComplete:v?void 0:()=>{if(!y.has(n))return;y.set(n,!0);let e=!0;y.forEach(t=>{t||(e=!1)}),e&&(S?.(),x(g.current),l&&h?.(),a&&a())},anchorX:u,children:e},n)})})};e.s(["AnimatePresence",()=>N],77887);var B=e.i(99065);let V=n.forwardRef(({...e},n)=>(0,t.jsx)(B.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M7.75 4C6.23122 4 5 5.23122 5 6.75V17.25C5 18.7688 6.23122 20 7.75 20H16.25C17.7688 20 19 18.7688 19 17.25V9C19 8.80109 18.921 8.61032 18.7803 8.46967L14.5303 4.21967C14.3897 4.07902 14.1989 4 14 4H7.75ZM6.5 6.75C6.5 6.05964 7.05964 5.5 7.75 5.5H13V9.25C13 9.66421 13.3358 10 13.75 10H17.5V17.25C17.5 17.9404 16.9404 18.5 16.25 18.5H7.75C7.05964 18.5 6.5 17.9404 6.5 17.25V6.75ZM16.6893 8.5L14.5 6.31066V8.5H16.6893Z",fill:"currentColor",fillOpacity:"0.927",fillRule:"evenodd"})}));V.displayName="IconFile",e.s(["IconFile",0,V],73241)},22166,e=>{"use strict";var t=e.i(49135),n=e.i(63422),r=e.i(97877);e.i(26084);var i=e.i(73500),a=e.i(34855);let o=r.forwardRef(({as:e="h1",size:r="3",className:a,color:o="white",children:c,weight:d="bold",...h},p)=>(0,t.jsx)(n.Slot,{className:(0,i.cn)(a,s(r),l(o),u(d)),ref:p,...h,children:(0,t.jsx)(e,{children:c})})),s=e=>{switch(e){case"1":return"text-xs";case"2":return"text-sm";case void 0:case"3":return"text-base";case"4":return"text-lg";case"5":return"text-xl tracking-[-0.16px]";case"6":return"text-2xl tracking-[-0.288px]";case"7":return"text-[28px] leading-[34px] tracking-[-0.416px]";case"8":return"text-[35px] leading-[42px] tracking-[-0.64px]";case"9":return"text-6xl leading-[73px] tracking-[-0.896px]";case"10":return["text-[38px] leading-[46px]","md:text-[70px] md:leading-[85px] tracking-[-1.024px;]"];default:return(0,a.unreachable)(e)}},l=e=>{switch(e){case"gray":return"text-slate-11";case"white":case void 0:return"text-slate-12";default:return(0,a.unreachable)(e)}},u=e=>{switch(e){case"medium":return"font-medium";case"bold":case void 0:return"font-bold";default:return(0,a.unreachable)(e)}};o.displayName="Heading",e.s(["Heading",0,o])},87844,99065,e=>{"use strict";var t=e.i(49135),n=e.i(97877);let r=n.forwardRef(({size:e=20,children:n,...r},i)=>(0,t.jsx)("svg",{fill:"none",height:e,ref:i,viewBox:"0 0 24 24",width:e,xmlns:"http://www.w3.org/2000/svg",...r,children:n}));r.displayName="IconBase",e.s(["IconBase",0,r],99065);let i=n.forwardRef(({...e},n)=>(0,t.jsx)(r,{ref:n,...e,children:(0,t.jsx)("path",{d:"M12 16L6 9.85966L6.84 9L12 14.2808L17.16 9L18 9.85966L12 16Z",fill:"currentColor"})}));i.displayName="IconArrowDown",e.s(["IconArrowDown",0,i],87844)},70018,e=>{"use strict";var t=e.i(49135),n=e.i(7284),r=e.i(56622);e.i(26084);var i=e.i(73500),a=e.i(11524),o=e.i(57383),s=e.i(97877),l=e.i(77887),u=e.i(98804),c=e.i(36002),d=e.i(21096),h=e.i(18960),p=e.i(73241),f=e.i(22166),m=e.i(87844),g=e.i(99065);let y=s.forwardRef(({...e},n)=>(0,t.jsx)(g.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M6.75 4C5.23122 4 4 5.23122 4 6.75V7.75V8V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25V9.75C20 8.23122 18.7688 7 17.25 7H14.0816L13.227 5.43322C12.7451 4.54965 11.819 4 10.8127 4H6.75ZM12.3729 7L11.9101 6.15145L11.91 6.15138C11.6911 5.74989 11.2702 5.5 10.8127 5.5H6.75C6.05964 5.5 5.5 6.05964 5.5 6.75V7H12.3729ZM5.5 17.25V8.5H17.25C17.9404 8.5 18.5 9.05964 18.5 9.75V17.25C18.5 17.9404 17.9404 18.5 17.25 18.5H6.75C6.05964 18.5 5.5 17.9404 5.5 17.25Z",fill:"currentColor",fillRule:"evenodd"})}));y.displayName="IconFolder";let v=s.forwardRef(({...e},n)=>(0,t.jsx)(g.IconBase,{ref:n,...e,children:(0,t.jsx)("path",{clipRule:"evenodd",d:"M6.75 4C5.23122 4 4 5.23122 4 6.75V17.25V17.5C4 17.5933 4.01702 17.6825 4.04812 17.7649C4.28918 19.0376 5.4072 20 6.75 20H17.25C17.9905 20 18.6283 19.7404 19.111 19.2387C19.5681 18.7636 19.836 18.1241 19.9792 17.4279L21.4711 12.206C21.4903 12.139 21.5 12.0697 21.5 12C21.5 10.652 20.5301 9.53047 19.25 9.29534V8.5C19.25 7.5335 18.4665 6.75 17.5 6.75H13.9452L13.227 5.43322C12.7451 4.54965 11.819 4 10.8127 4H6.75ZM17.75 9.25V8.5C17.75 8.36193 17.6381 8.25 17.5 8.25H13.5C13.2255 8.25 12.973 8.10009 12.8416 7.85915L11.9101 6.15145L11.91 6.15138C11.6911 5.74989 11.2702 5.5 10.8127 5.5H6.75C6.05964 5.5 5.5 6.05964 5.5 6.75V13.158L6.79875 9.73401C6.90926 9.44267 7.1884 9.25 7.5 9.25H17.75ZM5.50587 17.372L8.01766 10.75H18.5H18.75C19.4091 10.75 19.949 11.26 19.9966 11.9069L18.5289 17.044C18.5233 17.0634 18.5185 17.0831 18.5146 17.1029C18.4062 17.6448 18.2275 17.9934 18.03 18.1988C17.8513 18.3846 17.6141 18.5 17.25 18.5H6.75C6.10079 18.5 5.56718 18.0051 5.50587 17.372Z",fill:"currentColor",fillRule:"evenodd"})}));v.displayName="IconFolderOpen";let b=new Set,w=({emailsDirectoryMetadata:e,className:n,currentEmailOpenSlug:r})=>{let a=!!r&&r.includes(e.relativePath),l=0===e.emailFilenames.length&&0===e.subDirectories.length,[u,c]=s.useState(b.has(e.absolutePath)||a);return(0,t.jsxs)(o.Root,{className:(0,i.cn)("group",n),onOpenChange:t=>{t?b.add(e.absolutePath):b.delete(e.absolutePath),c(t)},open:u,children:[(0,t.jsxs)(o.Trigger,{className:(0,i.cn)("mt-1 mb-1.5 flex w-full items-center text-start justify-between gap-2 font-medium text-[14px]",{"cursor-pointer":!l}),children:[u?(0,t.jsx)(v,{className:"w-[20px]",height:"20",width:"20"}):(0,t.jsx)(y,{height:"20",width:"20"}),(0,t.jsx)(f.Heading,{as:"h3",className:"transition grow w-[calc(100%-40px)] truncate duration-200 ease-in-out hover:text-slate-12",color:"gray",size:"2",weight:"medium",children:e.directoryName}),l?null:(0,t.jsx)(m.IconArrowDown,{width:"20",height:"20",className:"ml-auto opacity-60 transition-transform data-[open=true]:rotate-180","data-open":u})]}),l?null:(0,t.jsx)(x,{currentEmailOpenSlug:r,emailsDirectoryMetadata:e,open:u})]})},x=e=>{let n=(0,h.useSearchParams)(),r=(0,h.useRouter)(),a=s.useId();return(0,t.jsx)(l.AnimatePresence,{initial:!1,children:e.open?(0,t.jsx)(o.Content,{asChild:!0,className:"relative overflow-y-hidden pl-1",forceMount:!0,children:(0,t.jsxs)(c.motion.div,{animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},initial:{opacity:0,height:0},children:[e.isRoot?null:(0,t.jsx)("div",{className:"line absolute left-2.5 h-full w-px bg-slate-6"}),(0,t.jsx)("div",{className:"flex flex-col truncate",children:(0,t.jsxs)(u.LayoutGroup,{id:`sidebar-${a}`,children:[e.emailsDirectoryMetadata.subDirectories.map(n=>(0,t.jsx)(w,{className:"p-0 data-[state=open]:mb-2",currentEmailOpenSlug:e.currentEmailOpenSlug,emailsDirectoryMetadata:n},n.absolutePath)),e.emailsDirectoryMetadata.emailFilenames.map((a,o)=>{var s;let l=e.isRoot?a:`${e.emailsDirectoryMetadata.relativePath}/${a}`,u=!!e.currentEmailOpenSlug&&("tsx"===(s=e.currentEmailOpenSlug).split(".").pop()||"jsx"===s.split(".").pop()||"js"===s.split(".").pop()?s.split(".").slice(0,-1).join("."):s)===l;return(0,t.jsx)(d.default,{href:{pathname:`/preview/${l}`,search:n.toString()},onMouseOver:()=>{r.prefetch(`/preview/${l}?${n.toString()}`)},children:(0,t.jsxs)(c.motion.span,{animate:{x:0,opacity:1},className:(0,i.cn)("relative flex h-8 w-full items-center text-start gap-2 rounded-md align-middle text-slate-11 text-sm transition-colors duration-100 ease-[cubic-bezier(.6,.12,.34,.96)]",e.isRoot?void 0:"pl-3",{"text-cyan-11":u,"hover:text-slate-12":e.currentEmailOpenSlug!==l}),initial:{x:-10+-(1.5*o),opacity:0},transition:{x:{delay:.03*o,duration:.2},opacity:{delay:.03*o,duration:.2}},children:[u?(0,t.jsx)(c.motion.span,{animate:{opacity:1},className:"absolute inset-0 rounded-md bg-cyan-5 opacity-0 transition-all duration-200 ease-[cubic-bezier(.6,.12,.34,.96)]",exit:{opacity:0},initial:{opacity:0},children:e.isRoot?null:(0,t.jsx)(c.motion.div,{className:"absolute top-1 left-[0.4rem] inset-0 h-6 w-px rounded-sm bg-cyan-11",layoutId:"active-file",transition:{type:"spring",bounce:.2,duration:.6}})}):null,(0,t.jsx)(p.IconFile,{className:"h-5 w-5",height:"20",width:"20"}),(0,t.jsx)("span",{className:"truncate w-[calc(100%-1.25rem)]",children:a})]})},l)})]})})]})}):null})},C=({currentEmailOpenSlug:e,emailsDirectoryMetadata:n})=>(0,t.jsx)("div",{className:"flex w-full h-full flex-col lg:w-full lg:min-w-[14.5rem]",children:(0,t.jsx)("nav",{className:"flex flex-grow flex-col p-4 pr-0 pl-0",children:(0,t.jsx)(o.Root,{open:!0,children:(0,t.jsx)(s.Suspense,{children:(0,t.jsx)(x,{currentEmailOpenSlug:e,emailsDirectoryMetadata:n,isRoot:!0,open:!0})})})})});e.s(["Sidebar",0,({className:e,currentEmailOpenSlug:o})=>{let{emailsDirectoryMetadata:s}=(0,r.useEmails)();return(0,t.jsx)("aside",{className:(0,i.cn)("overflow-hidden","lg:static lg:z-auto lg:max-h-screen lg:w-[16rem]",e),children:(0,t.jsxs)("div",{className:"flex w-full h-full overflow-hidden flex-col border-slate-6 border-r",children:[(0,t.jsx)("div",{className:(0,n.clsx)("hidden min-h-14 flex-shrink items-center py-2 px-3 lg:flex border-b border-slate-4"),children:(0,t.jsx)("h2",{children:(0,t.jsx)(a.Logo,{})})}),(0,t.jsx)("div",{className:"relative grow w-full h-full overflow-y-auto overflow-x-hidden px-4 pb-3",children:(0,t.jsx)(C,{currentEmailOpenSlug:o,emailsDirectoryMetadata:s})})]})})}],70018)},68642,29669,e=>{"use strict";var t=e.i(49135),n=e.i(97877);e.i(26084);var r=e.i(73500),i=e.i(11524),a=e.i(70018);e.s([],29669);let o=n.createContext(void 0);e.s(["Shell",0,({children:e,currentEmailOpenSlug:s})=>{let[l,u]=n.useState(!0);return(0,t.jsxs)(o.Provider,{value:{toggleSidebar:()=>u(e=>!e),sidebarToggled:l},children:[(0,t.jsxs)("div",{className:"flex h-[4.375rem] items-center justify-between border-slate-6 border-b px-6 lg:hidden",children:[(0,t.jsx)("div",{className:"flex h-[4.375rem] items-center",children:(0,t.jsx)(i.Logo,{})}),(0,t.jsx)("button",{className:"flex h-6 w-6 items-center justify-center rounded text-white",onClick:()=>{u(e=>!e)},type:"button",children:(0,t.jsxs)("svg",{fill:"none",height:"16",stroke:"white",viewBox:"0 0 15 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("title",{children:"Menu"}),(0,t.jsx)("path",{clipRule:"evenodd",d:"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z",fill:"currentColor",fillRule:"evenodd"})]})})]}),(0,t.jsxs)("div",{className:"w-[100dvw] flex h-[calc(100dvh-4.375rem)] lg:h-[100dvh]",children:[(0,t.jsx)(n.Suspense,{children:(0,t.jsx)(a.Sidebar,{className:(0,r.cn)("fixed top-[4.375rem] left-0 z-[9999] h-full max-h-full w-full max-w-full will-change-auto [transition:width_0.2s_ease-in-out]","lg:static lg:inline-block lg:z-auto lg:max-h-full lg:w-[16rem]",{"-translate-x-full lg:translate-x-0":l,"lg:w-0":!l}),currentEmailOpenSlug:s})}),(0,t.jsx)("main",{className:(0,r.cn)("inline-block relative overflow-hidden will-change-[width]","w-full h-full","[transition:width_0.2s_ease-in-out,_transform_0.2s_ease-in-out]",{"lg:w-[calc(100%-16rem)]":l,"opacity-0 lg:opacity-100":!l}),children:e})]})]})},"ShellContext",0,o],68642)},94775,e=>{"use strict";var t,n,r=e.i(49135),i=e.i(97877),a=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,d=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))u.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))c.call(t,n)&&d(e,n,t[n]);return e},p=(e,t)=>{var n={};for(var r in e)u.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&l)for(var r of l(e))0>t.indexOf(r)&&c.call(e,r)&&(n[r]=e[r]);return n},f=(e,t,n)=>d(e,"symbol"!=typeof t?t+"":t,n),m=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),g=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},y=class{constructor(){f(this,"_lastHandleId",0),f(this,"_lastImmediate",null)}requestAnimationFrame(e){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},v=class{constructor(){f(this,"_strategy"),this._strategy="function"==typeof requestAnimationFrame?new g:new y}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}},b="u">typeof window&&"u">typeof window.document,w=new Uint8Array([80,75,3,4]),x=["v","ip","op","layers","fr","w","h"],C="0.42.0",_="@lottiefiles/dotlottie-web",E=(n="u">typeof document?null==(t=document.currentScript)?void 0:t.src:void 0,function(e={}){var t,r,i,a,o,s=new Promise((e,t)=>{a=e,o=t}),l=Object.assign({},e),u="./this.program",c="";"u">typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=c.startsWith("blob:")?"":c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1);var d=e.print||console.log.bind(console),h=e.printErr||console.error.bind(console);Object.assign(e,l),l=null,e.thisProgram&&(u=e.thisProgram);var p,m,g,y,v,b,w,x,C,_,E=e.wasmBinary,k=!1;function S(){var t=p.buffer;e.HEAP8=g=new Int8Array(t),e.HEAP16=v=new Int16Array(t),e.HEAPU8=y=new Uint8Array(t),e.HEAPU16=b=new Uint16Array(t),e.HEAP32=w=new Int32Array(t),e.HEAPU32=x=new Uint32Array(t),e.HEAPF32=C=new Float32Array(t),e.HEAPF64=_=new Float64Array(t)}var L=[],T=[],A=[],P=0,M=null;function R(t){var n;throw null==(n=e.onAbort)||n.call(e,t),h(t="Aborted("+t+")"),k=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),o(t),t}function F(e){if(e==G&&E)return new Uint8Array(E);throw"both async and sync fetching of the wasm failed"}function D(e,t,n){var r;return(r=e,E?Promise.resolve().then(()=>F(r)):fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))).then(e=>new Uint8Array(e),()=>F(r))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{h(`failed to asynchronously prepare wasm: ${e}`),R(e)})}class I{constructor(e){f(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var j=t=>{for(;0<t.length;)t.shift()(e)},O=e.noExitRuntime||!0,N="u">typeof TextDecoder?new TextDecoder:void 0,B=(e,t=0,n=NaN)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&N)return N.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if((224&i)==192)r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=(240&i)==224?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},V=0;class ${constructor(e){this.Ea=e-24}}var z=(e,t,n)=>{var r=y;if(0<n){n=t+n-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),127>=a){if(t>=n)break;r[t++]=a}else{if(2047>=a){if(t+1>=n)break;r[t++]=192|a>>6}else{if(65535>=a){if(t+2>=n)break;r[t++]=224|a>>12}else{if(t+3>=n)break;r[t++]=240|a>>18,r[t++]=128|a>>12&63}r[t++]=128|a>>6&63}r[t++]=128|63&a}}r[t]=0}},U={},H=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function W(e){return this.fromWireType(x[e>>2])}var G,Z,Y,q,K={},X={},J={},Q=(e,t,n)=>{function r(t){if((t=n(t)).length!==e.length)throw new Z("Mismatched type converter count");for(var r=0;r<e.length;++r)et(e[r],t[r])}e.forEach(e=>J[e]=t);var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{X.hasOwnProperty(e)?i[t]=X[e]:(a.push(e),K.hasOwnProperty(e)||(K[e]=[]),K[e].push(()=>{i[t]=X[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)},ee=e=>{for(var t="";y[e];)t+=Y[y[e++]];return t};function et(e,t,n={}){return function(e,t,n={}){var r=t.name;if(!e)throw new q(`type "${r}" must have a positive integer typeid pointer`);if(X.hasOwnProperty(e)){if(n.kb)return;throw new q(`Cannot register type '${r}' twice`)}X[e]=t,delete J[e],K.hasOwnProperty(e)&&(t=K[e],delete K[e],t.forEach(e=>e()))}(e,t,n)}var en=e=>{throw new q(e.Da.Ga.Fa.name+" instance already deleted")},er=!1,ei=()=>{},ea=(e,t,n)=>t===n?e:void 0===n.Ja||null===(e=ea(e,t,n.Ja))?null:n.cb(e),eo={},es={},el=(e,t)=>{if(!t.Ga||!t.Ea)throw new Z("makeClassHandle requires ptr and ptrType");if(!!t.Ka!=!!t.Ia)throw new Z("Both smartPtrType and smartPtr must be specified");return t.count={value:1},eu(Object.create(e,{Da:{value:t,writable:!0}}))},eu=e=>typeof FinalizationRegistry>"u"?(eu=e=>e,e):(er=new FinalizationRegistry(e=>{e=e.Da,--e.count.value,0===e.count.value&&(e.Ia?e.Ka.Na(e.Ia):e.Ga.Fa.Na(e.Ea))}),eu=e=>{var t=e.Da;return t.Ia&&er.register(e,{Da:t},e),e},ei=e=>{er.unregister(e)},eu(e));function ec(){}var ed=(e,t)=>Object.defineProperty(t,"name",{value:e}),eh=(e,t,n)=>{if(void 0===e[t].Ha){var r=e[t];e[t]=function(...r){if(!e[t].Ha.hasOwnProperty(r.length))throw new q(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].Ha})!`);return e[t].Ha[r.length].apply(this,r)},e[t].Ha=[],e[t].Ha[r.Qa]=r}},ep=(t,n,r)=>{if(e.hasOwnProperty(t)){if(void 0===r||void 0!==e[t].Ha&&void 0!==e[t].Ha[r])throw new q(`Cannot register public name '${t}' twice`);if(eh(e,t,t),e[t].Ha.hasOwnProperty(r))throw new q(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);e[t].Ha[r]=n}else e[t]=n,e[t].Qa=r};function ef(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.Pa=n,this.Na=r,this.Ja=i,this.fb=a,this.Ta=o,this.cb=s,this.mb=[]}var em=(e,t,n)=>{for(;t!==n;){if(!t.Ta)throw new q(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.Ta(e),t=t.Ja}return e};function eg(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);return 0}if(!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);return em(t.Da.Ea,t.Da.Ga.Fa,this.Fa)}function ey(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);if(this.Va){var n=this.Xa();return null!==e&&e.push(this.Na,n),n}return 0}if(!t||!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ua&&t.Da.Ga.Ua)throw new q(`Cannot convert argument of type ${t.Da.Ka?t.Da.Ka.name:t.Da.Ga.name} to parameter type ${this.name}`);if(n=em(t.Da.Ea,t.Da.Ga.Fa,this.Fa),this.Va){if(void 0===t.Da.Ia)throw new q("Passing raw pointer to smart pointer is illegal");switch(this.rb){case 0:if(t.Da.Ka===this)n=t.Da.Ia;else throw new q(`Cannot convert argument of type ${t.Da.Ka?t.Da.Ka.name:t.Da.Ga.name} to parameter type ${this.name}`);break;case 1:n=t.Da.Ia;break;case 2:if(t.Da.Ka===this)n=t.Da.Ia;else{var r=t.clone();n=this.nb(n,eD(()=>r.delete())),null!==e&&e.push(this.Na,n)}break;default:throw new q("Unsupporting sharing policy")}}return n}function ev(e,t){if(null===t){if(this.Wa)throw new q(`null is not a valid ${this.name}`);return 0}if(!t.Da)throw new q(`Cannot pass "${eO(t)}" as a ${this.name}`);if(!t.Da.Ea)throw new q(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.Da.Ga.Ua)throw new q(`Cannot convert argument of type ${t.Da.Ga.name} to parameter type ${this.name}`);return em(t.Da.Ea,t.Da.Ga.Fa,this.Fa)}function eb(e,t,n,r,i,a,o,s,l,u,c){this.name=e,this.Fa=t,this.Wa=n,this.Ua=r,this.Va=i,this.lb=a,this.rb=o,this.ab=s,this.Xa=l,this.nb=u,this.Na=c,i||void 0!==t.Ja?this.toWireType=ey:(this.toWireType=r?eg:ev,this.Ma=null)}var ew,ex,eC=(t,n,r)=>{if(!e.hasOwnProperty(t))throw new Z("Replacing nonexistent public symbol");void 0!==e[t].Ha&&void 0!==r?e[t].Ha[r]=n:(e[t]=n,e[t].Qa=r)},e_=(t,n)=>{let r;var i=(t=ee(t)).includes("j")?(r=t,(...t)=>((t,n,r=[])=>n=t.includes("j")?(0,e["dynCall_"+(t=t.replace(/p/g,"i"))])(n,...r):ew.get(n)(...r))(r,n,t)):ew.get(n);if("function"!=typeof i)throw new q(`unknown function pointer with signature ${t}: ${n}`);return i},eE=e=>{var t=ee(e=e6(e));return e7(e),t},ek=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||X[t]||(J[t]?J[t].forEach(e):(n.push(t),r[t]=!0))}),new ex(`${e}: `+n.map(eE).join([", "]))},eS=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(x[t+4*r>>2]);return n};function eL(e,t,n,r,i){var a=t.length;if(2>a)throw new q("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].Ma)return!0;return!1}(t),l="void"!==t[0].name,u=a-2,c=Array(u),d=[],h=[];return ed(e,function(...e){if(h.length=0,d.length=o?2:1,d[0]=i,o){var n=t[1].toWireType(h,this);d[1]=n}for(var a=0;a<u;++a)c[a]=t[a+2].toWireType(h,e[a]),d.push(c[a]);if(e=r(...d),s)H(h);else for(a=o?1:2;a<t.length;a++){var p=1===a?n:c[a-2];null!==t[a].Ma&&t[a].Ma(p)}return l?t[0].fromWireType(e):void 0})}var eT,eA=e=>{let t=(e=e.trim()).indexOf("(");return -1!==t?e.substr(0,t):e},eP=[],eM=[],eR=e=>{9<e&&0==--eM[e+1]&&(eM[e]=void 0,eP.push(e))},eF=e=>{if(!e)throw new q("Cannot use deleted val. handle = "+e);return eM[e]},eD=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=eP.pop()||eM.length;return eM[t]=e,eM[t+1]=1,t}},eI={name:"emscripten::val",fromWireType:e=>{var t=eF(e);return eR(e),t},toWireType:(e,t)=>eD(t),La:8,readValueFromPointer:W,Ma:null},ej=(e,t)=>{var n=X[e];if(void 0===n)throw e=`${t} has unknown type ${eE(e)}`,new q(e);return n},eO=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},eN=Object.assign({optional:!0},eI),eB="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&b[n];)++n;if(32<(n<<=1)-e&&eB)return eB.decode(y.subarray(e,n));for(n="",r=0;!(r>=t/2);++r){var i=v[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},e$=(e,t,n)=>{if(null!=n||(n=0x7fffffff),2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)v[t>>1]=e.charCodeAt(i),t+=2;return v[t>>1]=0,t-r},ez=e=>2*e.length,eU=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=w[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r},eH=(e,t,n)=>{if(null!=n||(n=0x7fffffff),4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),w[t>>2]=a,(t+=4)+4>n)break}return w[t>>2]=0,t-r},eW=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},eG=0,eZ=[],eY=Reflect.construct,eq={},eK=e=>{if(!(e instanceof I||"unwind"==e))throw e},eX=t=>{var n;throw m=t,O||0<eG||(null==(n=e.onExit)||n.call(e,t),k=!0),new I(t)},eJ={},eQ=()=>{if(!eT){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:u||"./this.program"};for(e in eJ)void 0===eJ[e]?delete t[e]:t[e]=eJ[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);eT=n}return eT},e1=[null,[],[]],e2=e=>(e2=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);R("initRandomDevice")})())(e);Z=e.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}};for(var e3=Array(256),e0=0;256>e0;++e0)e3[e0]=String.fromCharCode(e0);Y=e3,q=e.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(ec.prototype,{isAliasOf:function(e){if(!(this instanceof ec&&e instanceof ec))return!1;var t=this.Da.Ga.Fa,n=this.Da.Ea;e.Da=e.Da;var r=e.Da.Ga.Fa;for(e=e.Da.Ea;t.Ja;)n=t.Ta(n),t=t.Ja;for(;r.Ja;)e=r.Ta(e),r=r.Ja;return t===r&&n===e},clone:function(){if(this.Da.Ea||en(this),this.Da.Sa)return this.Da.count.value+=1,this;var e=eu,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.Da;return e=e(n.call(t,r,{Da:{value:{count:i.count,Ra:i.Ra,Sa:i.Sa,Ea:i.Ea,Ga:i.Ga,Ia:i.Ia,Ka:i.Ka}}})),e.Da.count.value+=1,e.Da.Ra=!1,e},delete(){if(this.Da.Ea||en(this),this.Da.Ra&&!this.Da.Sa)throw new q("Object already scheduled for deletion");ei(this);var e=this.Da;--e.count.value,0===e.count.value&&(e.Ia?e.Ka.Na(e.Ia):e.Ga.Fa.Na(e.Ea)),this.Da.Sa||(this.Da.Ia=void 0,this.Da.Ea=void 0)},isDeleted:function(){return!this.Da.Ea},deleteLater:function(){if(this.Da.Ea||en(this),this.Da.Ra&&!this.Da.Sa)throw new q("Object already scheduled for deletion");return this.Da.Ra=!0,this}}),Object.assign(eb.prototype,{gb(e){return this.ab&&(e=this.ab(e)),e},Za(e){var t;null==(t=this.Na)||t.call(this,e)},La:8,readValueFromPointer:W,fromWireType:function(e){function t(){return this.Va?el(this.Fa.Pa,{Ga:this.lb,Ea:n,Ka:this,Ia:e}):el(this.Fa.Pa,{Ga:this,Ea:e})}var n=this.gb(e);if(!n)return this.Za(e),null;var r=((e,t)=>{if(void 0===t)throw new q("ptr should not be undefined");for(;e.Ja;)t=e.Ta(t),e=e.Ja;return es[t]})(this.Fa,n);if(void 0!==r)return 0===r.Da.count.value?(r.Da.Ea=n,r.Da.Ia=e,r.clone()):(r=r.clone(),this.Za(e),r);if(!(r=eo[r=this.Fa.fb(n)]))return t.call(this);r=this.Ua?r.bb:r.pointerType;var i=ea(n,this.Fa,r.Fa);return null===i?t.call(this):this.Va?el(r.Fa.Pa,{Ga:r,Ea:i,Ka:this,Ia:e}):el(r.Fa.Pa,{Ga:r,Ea:i})}}),t=Error,(r=ed("UnboundTypeError",function(e){this.name="UnboundTypeError",this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+`
|
|
10
10
|
`+e.replace(/^Error(:[^\n]*)?\n/,""))})).prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},ex=e.UnboundTypeError=r,eM.push(0,1,void 0,1,null,1,!0,1,!1,1),e.count_emval_handles=()=>eM.length/2-5-eP.length;var e4={c:(e,t,n,r)=>R(`Assertion failed: ${e?B(y,e):""}, at: `+[t?t?B(y,t):"":"unknown filename",n,r?r?B(y,r):"":"unknown function"]),d:()=>(()=>{var e=V;if(!e)return tt(0),0;var t=new $(e);x[t.Ea+16>>2]=e;var n=x[t.Ea+4>>2];if(!n)return tt(0),e;for(var r of[]){if(0===r||r===n)break;if(ti(r,n,t.Ea+16))return tt(r),e}return tt(n),e})(),p:(e,t,n)=>{var r=new $(e);throw x[r.Ea+16>>2]=0,x[r.Ea+4>>2]=t,x[r.Ea+8>>2]=n,V=e},g:e=>{throw V||(V=e),V},R:()=>{},O:()=>{},P:()=>{},U:function(){},Q:()=>{},W:()=>R(""),z:e=>{var t=U[e];delete U[e];var n=t.Xa,r=t.Na,i=t.$a;Q([e],i.map(e=>e.jb).concat(i.map(e=>e.pb)),e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.hb,s=t.ib,l=e[n+i.length],u=t.ob,c=t.qb;a[t.eb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];u(c,e,l.toWireType(n,t)),H(n)}}}),[{name:t.name,fromWireType:e=>{var t,n={};for(t in a)n[t]=a[t].read(e);return r(e),n},toWireType:(e,t)=>{for(var i in a)if(!(i in t))throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(r,o),o},La:8,readValueFromPointer:W,Ma:r}]})},H:()=>{},aa:(e,t,n,r)=>{et(e,{name:t=ee(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},La:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},Ma:null})},v:(e,t,n,r,i,a,o,s,l,u,c,d,h)=>{c=ee(c),a=e_(i,a),s&&(s=e_(o,s)),u&&(u=e_(l,u)),h=e_(d,h);var p,f,m=48<=(f=(p=(p=c).replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0))&&57>=f?`_${p}`:p;ep(m,function(){ek(`Cannot construct ${c} due to unbound types`,[r])}),Q([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n,i=t.Fa,o=i.Pa;else o=ec.prototype;var l=Object.create(o,{constructor:{value:t=ed(c,function(...e){if(Object.getPrototypeOf(this)!==l)throw new q("Use 'new' to construct "+c);if(void 0===d.Oa)throw new q(c+" has no accessible constructor");var t=d.Oa[e.length];if(void 0===t)throw new q(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.Oa).toString()}) parameters instead!`);return t.apply(this,e)})}});t.prototype=l;var d=new ef(c,t,l,h,i,a,s,u);return d.Ja&&(null!=(n=d.Ja).Ya||(n.Ya=[]),d.Ja.Ya.push(d)),i=new eb(c,d,!0,!1,!1),n=new eb(c+"*",d,!1,!1,!1),o=new eb(c+" const*",d,!1,!0,!1),eo[e]={pointerType:n,bb:o},eC(m,t),[i,n,o]})},t:(e,t,n,r,i,a)=>{var o=eS(t,n);i=e_(r,i),Q([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(void 0===e.Fa.Oa&&(e.Fa.Oa=[]),void 0!==e.Fa.Oa[t-1])throw new q(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.Fa.Oa[t-1]=()=>{ek(`Cannot construct ${e.name} due to unbound types`,o)},Q([],o,r=>(r.splice(1,0,null),e.Fa.Oa[t-1]=eL(n,r,null,i,a),[])),[]})},h:(e,t,n,r,i,a,o,s)=>{var l=eS(n,r);t=eA(t=ee(t)),a=e_(i,a),Q([],[e],e=>{function r(){ek(`Cannot call ${i} due to unbound types`,l)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.Fa.mb.push(t);var u=e.Fa.Pa,c=u[t];return void 0===c||void 0===c.Ha&&c.className!==e.name&&c.Qa===n-2?(r.Qa=n-2,r.className=e.name,u[t]=r):(eh(u,t,i),u[t].Ha[n-2]=r),Q([],l,r=>(r=eL(i,r,e,a,o),void 0===u[t].Ha?(r.Qa=n-2,u[t]=r):u[t].Ha[n-2]=r,[])),[]})},$:e=>et(e,eI),B:(e,t,n,r)=>{function i(){}t=ee(t),i.values={},et(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,La:8,readValueFromPointer:((e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(g[e])}:function(e){return this.fromWireType(y[e])};case 2:return n?function(e){return this.fromWireType(v[e>>1])}:function(e){return this.fromWireType(b[e>>1])};case 4:return n?function(e){return this.fromWireType(w[e>>2])}:function(e){return this.fromWireType(x[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}})(t,n,r),Ma:null}),ep(t,i)},n:(e,t,n)=>{var r=ej(e,"enum");t=ee(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:ed(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},D:(e,t,n)=>{et(e,{name:t=ee(t),fromWireType:e=>e,toWireType:(e,t)=>t,La:8,readValueFromPointer:((e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(_[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}})(t,n),Ma:null})},y:(e,t,n,r,i,a)=>{var o=eS(t,n);e=eA(e=ee(e)),i=e_(r,i),ep(e,function(){ek(`Cannot call ${e} due to unbound types`,o)},t-1),Q([],o,n=>(eC(e,eL(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},o:(e,t,n,r,i)=>{if(t=ee(t),-1===i&&(i=0xffffffff),i=e=>e,0===r){var a=32-8*n;i=e=>e<<a>>>a}var o=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t};et(e,{name:t,fromWireType:i,toWireType:o,La:8,readValueFromPointer:((e,t,n)=>{switch(t){case 1:return n?e=>g[e]:e=>y[e];case 2:return n?e=>v[e>>1]:e=>b[e>>1];case 4:return n?e=>w[e>>2]:e=>x[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}})(t,n,0!==r),Ma:null})},k:(e,t,n)=>{function r(e){return new i(g.buffer,x[e+4>>2],x[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];et(e,{name:n=ee(n),fromWireType:r,La:8,readValueFromPointer:r},{kb:!0})},x:e=>{et(e,eN)},ga:(e,t,n,r,i,a,o,s,l,u,c,d)=>{n=ee(n),a=e_(i,a),s=e_(o,s),u=e_(l,u),d=e_(c,d),Q([e],[t],e=>(e=e[0],[new eb(n,e.Fa,!1,!1,!0,e,r,a,s,u,d)]))},E:(e,t)=>{var n="std::string"===(t=ee(t));et(e,{name:t,fromWireType:function(e){var t=x[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==y[o]){if(i=i?B(y,i,o-i):"",void 0===s)var s=i;else s+="\0",s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(y[r+a]);s=s.join("")}return e7(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i="string"==typeof t;if(!(i||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new q("Cannot pass non-string to std::string");if(n&&i)for(var a=r=0;a<t.length;++a){var o=t.charCodeAt(a);127>=o?r++:2047>=o?r+=2:55296<=o&&57343>=o?(r+=4,++a):r+=3}else r=t.length;if(o=(a=e5(4+r+1))+4,x[a>>2]=r,n&&i)z(t,o,r+1);else if(i)for(i=0;i<r;++i){var s=t.charCodeAt(i);if(255<s)throw e7(o),new q("String has UTF-16 code units that do not fit in 8 bits");y[o+i]=s}else for(i=0;i<r;++i)y[o+i]=t[i];return null!==e&&e.push(e7,a),a},La:8,readValueFromPointer:W,Ma(e){e7(e)}})},w:(e,t,n)=>{if(n=ee(n),2===t)var r=eV,i=e$,a=ez,o=e=>b[e>>1];else 4===t&&(r=eU,i=eH,a=eW,o=e=>x[e>>2]);et(e,{name:n,fromWireType:e=>{for(var n,i=x[e>>2],a=e+4,s=0;s<=i;++s){var l=e+4+s*t;(s==i||0==o(l))&&(a=r(a,l-a),void 0===n?n=a:(n+="\0",n+=a),a=l+t)}return e7(e),n},toWireType:(e,r)=>{if("string"!=typeof r)throw new q(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=e5(4+o+t);return x[s>>2]=o/t,i(r,s+4,o+t),null!==e&&e.push(e7,s),s},La:8,readValueFromPointer:W,Ma(e){e7(e)}})},A:(e,t,n,r,i,a)=>{U[e]={name:ee(t),Xa:e_(n,r),Na:e_(i,a),$a:[]}},m:(e,t,n,r,i,a,o,s,l,u)=>{U[e].$a.push({eb:ee(t),jb:n,hb:e_(r,i),ib:a,pb:o,ob:e_(s,l),qb:u})},ba:(e,t)=>{et(e,{sb:!0,name:t=ee(t),La:0,fromWireType:()=>{},toWireType:()=>{}})},M:()=>{O=!1,eG=0},I:()=>{throw 1/0},ea:(e,t,n,r)=>(e=eZ[e])(null,t=eF(t),n,r),F:eR,da:(e,t,n)=>{var r,i,a=((e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=ej(x[t+4*r>>2],"parameter "+r);return n})(e,t),o=a.shift(),s=Array(--e);return r=ed(t=`methodCaller<(${a.map(e=>e.name).join(", ")}) => ${o.name}>`,(t,r,i,l)=>{for(var u=0,c=0;c<e;++c)s[c]=a[c].readValueFromPointer(l+u),u+=a[c].La;return r=1===n?eY(r,s):r.apply(t,s),t=[],r=o.toWireType(t,r),t.length&&(x[i>>2]=eD(t)),r}),i=eZ.length,eZ.push(r),i},fa:e=>{9<e&&(eM[e+1]+=1)},ca:e=>{H(eF(e)),eR(e)},r:(e,t)=>eD(e=(e=ej(e,"_emval_take_value")).readValueFromPointer(t)),J:(e,t)=>{if(eq[e]&&(clearTimeout(eq[e].id),delete eq[e]),!t)return 0;var n=setTimeout(()=>{delete eq[e],(e=>{if(!k)try{if(e(),!(O||0<eG))try{m=e=m,eX(e)}catch(e){eK(e)}}catch(e){eK(e)}})(()=>e8(e,performance.now()))},t);return eq[e]={id:n,tb:t},0},K:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),x[e>>2]=60*Math.max(a,i),w[t>>2]=+(a!=i),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?"-":"+"}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`})(a),t=t(i),i<a?(z(e,n,17),z(t,r,17)):(z(e,r,17),z(t,n,17))},ha:()=>performance.now(),L:e=>{var t=y.length;if(0x80000000<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);e:{r=(Math.min(0x80000000,65536*Math.ceil(Math.max(e,r)/65536))-p.buffer.byteLength+65535)/65536|0;try{p.grow(r),S();var i=1;break e}catch{}i=void 0}if(i)return!0}return!1},Y:(e,t)=>{var n=0;return eQ().forEach((r,i)=>{var a=t+n;for(i=x[e+4*i>>2]=a,a=0;a<r.length;++a)g[i++]=r.charCodeAt(a);g[i]=0,n+=r.length+1}),0},Z:(e,t)=>{var n=eQ();x[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),x[t>>2]=r,0},V:()=>52,T:()=>52,S:(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=x[t>>2],s=x[t+4>>2];t+=8;for(var l=0;l<s;l++){var u=y[o+l],c=e1[e];0===u||10===u?((1===e?d:h)(B(c)),c.length=0):c.push(u)}i+=s}return x[r>>2]=i,0},j:function(e,t){var n=tr();try{return ew.get(e)(t)}catch(e){if(tn(n),e!==e+0)throw e;te(1,0)}},f:function(e,t,n){var r=tr();try{return ew.get(e)(t,n)}catch(e){if(tn(r),e!==e+0)throw e;te(1,0)}},e:function(e,t,n,r){var i=tr();try{return ew.get(e)(t,n,r)}catch(e){if(tn(i),e!==e+0)throw e;te(1,0)}},_:function(e,t,n,r,i){var a=tr();try{return ew.get(e)(t,n,r,i)}catch(e){if(tn(a),e!==e+0)throw e;te(1,0)}},s:function(e,t,n,r,i,a){var o=tr();try{return ew.get(e)(t,n,r,i,a)}catch(e){if(tn(o),e!==e+0)throw e;te(1,0)}},C:function(e,t,n,r,i,a,o,s){var l=tr();try{return ew.get(e)(t,n,r,i,a,o,s)}catch(e){if(tn(l),e!==e+0)throw e;te(1,0)}},u:function(e){var t=tr();try{ew.get(e)()}catch(e){if(tn(t),e!==e+0)throw e;te(1,0)}},b:function(e,t){var n=tr();try{ew.get(e)(t)}catch(e){if(tn(n),e!==e+0)throw e;te(1,0)}},a:function(e,t,n){var r=tr();try{ew.get(e)(t,n)}catch(e){if(tn(r),e!==e+0)throw e;te(1,0)}},i:function(e,t,n,r){var i=tr();try{ew.get(e)(t,n,r)}catch(e){if(tn(i),e!==e+0)throw e;te(1,0)}},l:function(e,t,n,r,i){var a=tr();try{ew.get(e)(t,n,r,i)}catch(e){if(tn(a),e!==e+0)throw e;te(1,0)}},q:function(e,t,n,r,i,a){var o=tr();try{ew.get(e)(t,n,r,i,a)}catch(e){if(tn(o),e!==e+0)throw e;te(1,0)}},G:function(e,t,n,r,i,a,o,s,l,u){var c=tr();try{ta(e,t,n,r,i,a,o,s,l,u)}catch(e){if(tn(c),e!==e+0)throw e;te(1,0)}},X:eX,N:(e,t)=>(e2(y.subarray(e,e+t)),0)},e9=function(){function t(t){var n;return p=(e9=t.exports).ia,S(),ew=e9.na,T.unshift(e9.ja),P--,null==(n=e.monitorRunDependencies)||n.call(e,P),0==P&&M&&(t=M,M=null,t()),e9}P++,null==(a=e.monitorRunDependencies)||a.call(e,P);var n,r,i,a,s={a:e4};if(e.instantiateWasm)try{return e.instantiateWasm(s,t)}catch(e){h(`Module.instantiateWasm callback failed with error: ${e}`),o(e)}return null!=G||(G="DotLottiePlayer.wasm".startsWith("data:application/octet-stream;base64,")?"DotLottiePlayer.wasm":e.locateFile?e.locateFile("DotLottiePlayer.wasm",c):c+"DotLottiePlayer.wasm"),(n=s,r=function(e){t(e.instance)},i=G,E||"function"!=typeof WebAssembly.instantiateStreaming||i.startsWith("data:application/octet-stream;base64,")||"function"!=typeof fetch?D(i,n,r):fetch(i,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,n).then(r,function(e){return h(`wasm streaming compile failed: ${e}`),h("falling back to ArrayBuffer instantiation"),D(i,n,r)}))).catch(o),{}}(),e5=e=>(e5=e9.ka)(e),e6=e=>(e6=e9.la)(e),e7=e=>(e7=e9.ma)(e),e8=(e,t)=>(e8=e9.oa)(e,t),te=(e,t)=>(te=e9.pa)(e,t),tt=e=>(tt=e9.qa)(e),tn=e=>(tn=e9.ra)(e),tr=()=>(tr=e9.sa)(),ti=(e,t,n)=>(ti=e9.ta)(e,t,n);e.dynCall_iijj=(t,n,r,i,a,o)=>(e.dynCall_iijj=e9.ua)(t,n,r,i,a,o),e.dynCall_vijj=(t,n,r,i,a,o)=>(e.dynCall_vijj=e9.va)(t,n,r,i,a,o),e.dynCall_jiii=(t,n,r,i)=>(e.dynCall_jiii=e9.wa)(t,n,r,i);var ta=e.dynCall_vijjjj=(t,n,r,i,a,o,s,l,u,c)=>(ta=e.dynCall_vijjjj=e9.xa)(t,n,r,i,a,o,s,l,u,c);function to(){function t(){var t;if(!i&&(i=!0,e.calledRun=!0,!k)){if(j(T),a(e),null==(t=e.onRuntimeInitialized)||t.call(e),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var n=e.postRun.shift();A.unshift(n)}j(A)}}if(!(0<P)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)!function(){var t=e.preRun.shift();L.unshift(t)}();j(L),0<P||(e.setStatus?(e.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>e.setStatus(""),1),t()},1)):t())}}if(e.dynCall_jii=(t,n,r)=>(e.dynCall_jii=e9.ya)(t,n,r),e.dynCall_viijii=(t,n,r,i,a,o,s)=>(e.dynCall_viijii=e9.za)(t,n,r,i,a,o,s),e.dynCall_iiiiij=(t,n,r,i,a,o,s)=>(e.dynCall_iiiiij=e9.Aa)(t,n,r,i,a,o,s),e.dynCall_iiiiijj=(t,n,r,i,a,o,s,l,u)=>(e.dynCall_iiiiijj=e9.Ba)(t,n,r,i,a,o,s,l,u),e.dynCall_iiiiiijj=(t,n,r,i,a,o,s,l,u,c)=>(e.dynCall_iiiiiijj=e9.Ca)(t,n,r,i,a,o,s,l,u,c),M=function e(){i||to(),i||(M=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return to(),s}),k=class{constructor(){throw Error("RendererLoader is a static class and cannot be instantiated.")}static _tryLoad(e){return m(this,null,function*(){return yield E({locateFile:()=>e})})}static _loadWithBackup(){return m(this,null,function*(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(e=>m(this,null,function*(){let t=`https://unpkg.com/${_}@${C}/dist/dotlottie-player.wasm`;console.warn(`Primary WASM load failed from ${this._wasmURL}. Error: ${e.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`);try{return yield this._tryLoad(t)}catch(t){throw console.error(`Primary WASM URL failed: ${e.message}`),console.error(`Backup WASM URL failed: ${t.message}`),Error("WASM loading failed from all sources.")}}))),this._ModulePromise})}static load(){return m(this,null,function*(){return this._loadWithBackup()})}static setWasmUrl(e){e!==this._wasmURL&&(this._wasmURL=e,this._ModulePromise=null)}};f(k,"_ModulePromise",null),f(k,"_wasmURL",`https://cdn.jsdelivr.net/npm/${_}@${C}/dist/dotlottie-player.wasm`);var S=class{constructor(){f(this,"_eventListeners",new Map)}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){let n=this._eventListeners.get(e);n&&(t?(n.delete(t),0===n.size&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){let t=this._eventListeners.get(e.type);t?.forEach(t=>t(e))}removeAllEventListeners(){this._eventListeners.clear()}},L=class{static _initializeObserver(){if(this._observer)return;let e=e=>{e.forEach(e=>{let t=this._observedCanvases.get(e.target);t&&(e.isIntersecting?t.unfreeze():t.freeze())})};this._observer=new IntersectionObserver(e,{threshold:0})}static observe(e,t){var n;this._initializeObserver(),this._observedCanvases.has(e)||(this._observedCanvases.set(e,t),null==(n=this._observer)||n.observe(e))}static unobserve(e){var t,n;null==(t=this._observer)||t.unobserve(e),this._observedCanvases.delete(e),0===this._observedCanvases.size&&(null==(n=this._observer)||n.disconnect(),this._observer=null)}};f(L,"_observer",null),f(L,"_observedCanvases",new Map);var T=class{static _initializeObserver(){if(this._observer)return;let e=e=>{e.forEach(e=>{let t=this._observedCanvases.get(e.target);if(!t)return;let[n,r]=t;clearTimeout(r);let i=setTimeout(()=>{n.resize()},100);this._observedCanvases.set(e.target,[n,i])})};this._observer=new ResizeObserver(e)}static observe(e,t){var n;this._initializeObserver(),this._observedCanvases.has(e)||(this._observedCanvases.set(e,[t,0]),null==(n=this._observer)||n.observe(e))}static unobserve(e){var t,n;null==(t=this._observer)||t.unobserve(e),this._observedCanvases.delete(e),0===this._observedCanvases.size&&(null==(n=this._observer)||n.disconnect(),this._observer=null)}};function A(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,w.byteLength));for(let e=0;e<w.length;e+=1)if(w[e]!==t[e])return!1;return!0}function P(e){return x.every(t=>Object.prototype.hasOwnProperty.call(e,t))}function M(e){if("string"!=typeof e)return P(e);try{return P(JSON.parse(e))}catch{return!1}}function R(){return 1+((b?window.devicePixelRatio:1)-1)*.75}function F(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}f(T,"_observer",null),f(T,"_observedCanvases",new Map);var D=(e,t)=>"reverse"===e?t.Mode.Reverse:"bounce"===e?t.Mode.Bounce:"reverse-bounce"===e?t.Mode.ReverseBounce:t.Mode.Forward,I=(e,t)=>{let n=new t.VectorFloat;return 2!==e.length||(n.push_back(e[0]),n.push_back(e[1])),n},j=(e,t)=>{var n,r,i;let a,o;return e?{align:(i=null!=(n=e.align)?n:[.5,.5],(a=new t.VectorFloat).push_back(i[0]),a.push_back(i[1]),a),fit:(o=null!=(r=e.fit)?r:"contain","contain"===o?t.Fit.Contain:"cover"===o?t.Fit.Cover:"fill"===o?t.Fit.Fill:"fit-height"===o?t.Fit.FitHeight:"fit-width"===o?t.Fit.FitWidth:t.Fit.None)}:t.createDefaultLayout()},O=class e{constructor(t){var n,r,i;f(this,"_canvas"),f(this,"_context",null),f(this,"_eventManager"),f(this,"_animationFrameId",null),f(this,"_frameManager"),f(this,"_dotLottieCore",null),f(this,"_renderConfig",{}),f(this,"_isFrozen",!1),f(this,"_backgroundColor",null),f(this,"_pointerUpMethod"),f(this,"_pointerDownMethod"),f(this,"_pointerMoveMethod"),f(this,"_pointerEnterMethod"),f(this,"_pointerExitMethod"),this._canvas=t.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new S,this._frameManager=new v,this._renderConfig=o(h({},t.renderConfig),s({devicePixelRatio:(null==(n=t.renderConfig)?void 0:n.devicePixelRatio)||R(),freezeOnOffscreen:null==(i=null==(r=t.renderConfig)?void 0:r.freezeOnOffscreen)||i})),k.load().then(n=>{var r,i,a,o,s,l,u,c;e._wasmModule=n,this._dotLottieCore=new n.DotLottiePlayer({themeId:null!=(r=t.themeId)?r:"",autoplay:null!=(i=t.autoplay)&&i,backgroundColor:0,loopAnimation:null!=(a=t.loop)&&a,mode:D(null!=(o=t.mode)?o:"forward",n),segment:I(null!=(s=t.segment)?s:[],n),speed:null!=(l=t.speed)?l:1,useFrameInterpolation:null==(u=t.useFrameInterpolation)||u,marker:null!=(c=t.marker)?c:"",layout:j(t.layout,n)}),this._eventManager.dispatch({type:"ready"}),t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(e=>{this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${e}`)})}),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this)}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:"loadError",error:Error(e)})}_fetchData(e){return m(this,null,function*(){let t=yield fetch(e);if(!t.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);let n=yield t.arrayBuffer();return A(n)?n:new TextDecoder().decode(n)})}_loadFromData(e){if(null===this._dotLottieCore)return;let t=this._canvas.width,n=this._canvas.height,r=!1;if("string"==typeof e){if(!M(e))return void this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");r=this._dotLottieCore.loadAnimationData(e,t,n)}else if(e instanceof ArrayBuffer){if(!A(e))return void this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");r=this._dotLottieCore.loadDotLottieData(e,t,n)}else{if("object"!=typeof e)return void this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
11
11
|
- string (Lottie JSON),
|
|
12
12
|
- ArrayBuffer (dotLottie),
|
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":157,"timestamp":64866518,"id":4,"parentId":1,"tags":{},"startTime":1762895340857,"traceId":"6ef4bc8fab1d25c3"},{"name":"load-custom-routes","duration":215,"timestamp":64866749,"id":5,"parentId":1,"tags":{},"startTime":1762895340858,"traceId":"6ef4bc8fab1d25c3"},{"name":"create-dist-dir","duration":152,"timestamp":64866982,"id":6,"parentId":1,"tags":{},"startTime":1762895340858,"traceId":"6ef4bc8fab1d25c3"},{"name":"clean","duration":133,"timestamp":64867680,"id":7,"parentId":1,"tags":{},"startTime":1762895340859,"traceId":"6ef4bc8fab1d25c3"},{"name":"create-pages-mapping","duration":132,"timestamp":64898943,"id":8,"parentId":1,"tags":{},"startTime":1762895340890,"traceId":"6ef4bc8fab1d25c3"},{"name":"collect-app-files","duration":1776,"timestamp":64899096,"id":9,"parentId":1,"tags":{},"startTime":1762895340890,"traceId":"6ef4bc8fab1d25c3"},{"name":"create-app-mapping","duration":976,"timestamp":64900892,"id":10,"parentId":1,"tags":{},"startTime":1762895340892,"traceId":"6ef4bc8fab1d25c3"},{"name":"create-app-layouts","duration":89,"timestamp":64901885,"id":11,"parentId":1,"tags":{},"startTime":1762895340893,"traceId":"6ef4bc8fab1d25c3"},{"name":"collect-default-files","duration":344,"timestamp":64902534,"id":13,"parentId":1,"tags":{},"startTime":1762895340893,"traceId":"6ef4bc8fab1d25c3"},{"name":"generate-route-types","duration":7865,"timestamp":64902227,"id":12,"parentId":1,"tags":{},"startTime":1762895340893,"traceId":"6ef4bc8fab1d25c3"},{"name":"public-dir-conflict-check","duration":54,"timestamp":64910107,"id":14,"parentId":1,"tags":{},"startTime":1762895340901,"traceId":"6ef4bc8fab1d25c3"},{"name":"generate-routes-manifest","duration":1327,"timestamp":64910204,"id":15,"parentId":1,"tags":{},"startTime":1762895340901,"traceId":"6ef4bc8fab1d25c3"},{"name":"run-turbopack","duration":6187935,"timestamp":64913537,"id":17,"parentId":1,"tags":{},"startTime":1762895340904,"traceId":"6ef4bc8fab1d25c3"},{"name":"run-typescript","duration":5087299,"timestamp":71108595,"id":19,"parentId":1,"tags":{},"startTime":1762895347099,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-static-error-page","duration":1419,"timestamp":76240624,"id":22,"parentId":21,"tags":{},"startTime":1762895352232,"traceId":"6ef4bc8fab1d25c3"},{"name":"is-page-static","duration":145750,"timestamp":76244677,"id":29,"parentId":24,"tags":{},"startTime":1762895352236,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-page","duration":148717,"timestamp":76241775,"id":24,"parentId":21,"tags":{"page":"/_global-error"},"startTime":1762895352233,"traceId":"6ef4bc8fab1d25c3"},{"name":"is-page-static","duration":173104,"timestamp":76245206,"id":30,"parentId":27,"tags":{},"startTime":1762895352236,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-page","duration":176344,"timestamp":76242003,"id":27,"parentId":21,"tags":{"page":"/favicon.ico"},"startTime":1762895352233,"traceId":"6ef4bc8fab1d25c3"},{"name":"is-page-static","duration":183855,"timestamp":76244509,"id":28,"parentId":23,"tags":{},"startTime":1762895352235,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-page","duration":187177,"timestamp":76241218,"id":23,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1762895352232,"traceId":"6ef4bc8fab1d25c3"},{"name":"is-page-static","duration":201353,"timestamp":76260451,"id":31,"parentId":25,"tags":{},"startTime":1762895352251,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-page","duration":219935,"timestamp":76241899,"id":25,"parentId":21,"tags":{"page":"/"},"startTime":1762895352233,"traceId":"6ef4bc8fab1d25c3"},{"name":"is-page-static","duration":554553,"timestamp":76260718,"id":32,"parentId":26,"tags":{},"startTime":1762895352252,"traceId":"6ef4bc8fab1d25c3"},{"name":"check-page","duration":573353,"timestamp":76241957,"id":26,"parentId":21,"tags":{"page":"/preview/[...slug]"},"startTime":1762895352233,"traceId":"6ef4bc8fab1d25c3"},{"name":"static-check","duration":575183,"timestamp":76240149,"id":21,"parentId":1,"tags":{},"startTime":1762895352231,"traceId":"6ef4bc8fab1d25c3"},{"name":"generate-required-server-files","duration":345,"timestamp":76815469,"id":34,"parentId":1,"tags":{},"startTime":1762895352806,"traceId":"6ef4bc8fab1d25c3"},{"name":"write-routes-manifest","duration":185,"timestamp":76816785,"id":35,"parentId":1,"tags":{},"startTime":1762895352808,"traceId":"6ef4bc8fab1d25c3"},{"name":"load-dotenv","duration":20,"timestamp":76822315,"id":38,"parentId":37,"tags":{},"startTime":1762895352813,"traceId":"6ef4bc8fab1d25c3"},{"name":"run-export-path-map","duration":200,"timestamp":76823567,"id":39,"parentId":37,"tags":{},"startTime":1762895352814,"traceId":"6ef4bc8fab1d25c3"},{"name":"next-export","duration":290628,"timestamp":76821732,"id":37,"parentId":1,"tags":{},"startTime":1762895352813,"traceId":"6ef4bc8fab1d25c3"},{"name":"move-exported-app-global-error-","duration":330,"timestamp":77113153,"id":40,"parentId":36,"tags":{},"startTime":1762895353104,"traceId":"6ef4bc8fab1d25c3"},{"name":"static-generation","duration":295230,"timestamp":76819121,"id":36,"parentId":1,"tags":{},"startTime":1762895352810,"traceId":"6ef4bc8fab1d25c3"},{"name":"write-routes-manifest","duration":159,"timestamp":77114433,"id":41,"parentId":1,"tags":{},"startTime":1762895353105,"traceId":"6ef4bc8fab1d25c3"},{"name":"print-tree-view","duration":1206,"timestamp":77120815,"id":42,"parentId":1,"tags":{},"startTime":1762895353112,"traceId":"6ef4bc8fab1d25c3"},{"name":"telemetry-flush","duration":275222,"timestamp":77122028,"id":43,"parentId":1,"tags":{},"startTime":1762895353113,"traceId":"6ef4bc8fab1d25c3"},{"name":"next-build","duration":12673886,"timestamp":64723381,"id":1,"tags":{"buildMode":"default","version":"16.0.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1762895340714,"traceId":"6ef4bc8fab1d25c3"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":6187935,"timestamp":64913537,"id":17,"parentId":1,"tags":{},"startTime":1762895340904,"traceId":"6ef4bc8fab1d25c3"},{"name":"run-typescript","duration":5087299,"timestamp":71108595,"id":19,"parentId":1,"tags":{},"startTime":1762895347099,"traceId":"6ef4bc8fab1d25c3"},{"name":"static-check","duration":575183,"timestamp":76240149,"id":21,"parentId":1,"tags":{},"startTime":1762895352231,"traceId":"6ef4bc8fab1d25c3"},{"name":"static-generation","duration":295230,"timestamp":76819121,"id":36,"parentId":1,"tags":{},"startTime":1762895352810,"traceId":"6ef4bc8fab1d25c3"},{"name":"telemetry-flush","duration":275222,"timestamp":77122028,"id":43,"parentId":1,"tags":{},"startTime":1762895353113,"traceId":"6ef4bc8fab1d25c3"},{"name":"next-build","duration":12673886,"timestamp":64723381,"id":1,"tags":{"buildMode":"default","version":"16.0.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1762895340714,"traceId":"6ef4bc8fab1d25c3"}]
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -142,7 +142,7 @@ export const ResizableWrapper = ({
|
|
|
142
142
|
|
|
143
143
|
return (
|
|
144
144
|
<>
|
|
145
|
-
<div className="
|
|
145
|
+
<div className="overflow-hidden absolute inset-0">
|
|
146
146
|
<div className="absolute mx-auto box-content -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2">
|
|
147
147
|
{VIEW_PRESETS.map((preset) => (
|
|
148
148
|
<div
|
|
@@ -260,10 +260,7 @@ export const ResizableWrapper = ({
|
|
|
260
260
|
/>
|
|
261
261
|
</div>
|
|
262
262
|
|
|
263
|
-
<Slot
|
|
264
|
-
ref={resizableRef}
|
|
265
|
-
className={isResizing ? 'pointer-events-none select-none' : ''}
|
|
266
|
-
>
|
|
263
|
+
<Slot ref={resizableRef} className={isResizing ? 'select-none' : ''}>
|
|
267
264
|
{children}
|
|
268
265
|
</Slot>
|
|
269
266
|
</div>
|
|
@@ -24,14 +24,14 @@ export const Sidebar = ({ className, currentEmailOpenSlug }: SidebarProps) => {
|
|
|
24
24
|
<div className="flex w-full h-full overflow-hidden flex-col border-slate-6 border-r">
|
|
25
25
|
<div
|
|
26
26
|
className={clsx(
|
|
27
|
-
'hidden min-h-
|
|
27
|
+
'hidden min-h-14 flex-shrink items-center py-2 px-3 lg:flex border-b border-slate-4',
|
|
28
28
|
)}
|
|
29
29
|
>
|
|
30
30
|
<h2>
|
|
31
31
|
<Logo />
|
|
32
32
|
</h2>
|
|
33
33
|
</div>
|
|
34
|
-
<div className="relative grow w-full h-full overflow-y-auto overflow-x-hidden
|
|
34
|
+
<div className="relative grow w-full h-full overflow-y-auto overflow-x-hidden px-4 pb-3">
|
|
35
35
|
<FileTree
|
|
36
36
|
currentEmailOpenSlug={currentEmailOpenSlug}
|
|
37
37
|
emailsDirectoryMetadata={emailsDirectoryMetadata}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78979,(t,e,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var r={callServer:function(){return n.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var i in r)Object.defineProperty(s,i,{enumerable:!0,get:r[i]});let n=t.r(28676),o=t.r(15579),a=t.r(18075)},2666,t=>{"use strict";var e=t.i(78979),s=(0,e.createServerReference)("7fa5907e7940436591f70b46842058cee6d76ec4a1",e.callServer,void 0,e.findSourceMapURL,"getEmailsDirectoryMetadataAction");t.s(["getEmailsDirectoryMetadataAction",()=>s])},84928,t=>{"use strict";var e=t.i(19833);e.default.env.USER_PROJECT_LOCATION,e.default.env.PREVIEW_SERVER_LOCATION,e.default.env.EMAILS_DIR_ABSOLUTE_PATH,e.default.env.RESEND_API_KEY;let s="true"===e.default.env.NEXT_PUBLIC_IS_BUILDING,r="true"===e.default.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT;t.s(["isBuilding",0,s,"isPreviewDevelopment",0,r])},56622,5248,t=>{"use strict";let e,s,r;var i,n,o=t.i(49135),a=t.i(97877),h=t.i(2666),c=t.i(84928);let l=Object.create(null);l.open="0",l.close="1",l.ping="2",l.pong="3",l.message="4",l.upgrade="5",l.noop="6";let u=Object.create(null);Object.keys(l).forEach(t=>{u[l[t]]=t});let p={type:"error",data:"parser error"},d="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),f="function"==typeof ArrayBuffer,y=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,g=({type:t,data:e},s,r)=>{if(d&&e instanceof Blob)if(s)return r(e);else return m(e,r);if(f&&(e instanceof ArrayBuffer||y(e)))if(s)return r(e);else return m(new Blob([e]),r);return r(l[t]+(e||""))},m=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function _(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<b.length;t++)v[b.charCodeAt(t)]=t;let w="function"==typeof ArrayBuffer,k=(t,e)=>{if("string"!=typeof t)return{type:"message",data:A(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:E(t.substring(1),e)}:u[s]?t.length>1?{type:u[s],data:t.substring(1)}:{type:u[s]}:p},E=(t,e)=>w?A((t=>{let e=.75*t.length,s=t.length,r,i=0,n,o,a,h;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let c=new ArrayBuffer(e),l=new Uint8Array(c);for(r=0;r<s;r+=4)n=v[t.charCodeAt(r)],o=v[t.charCodeAt(r+1)],a=v[t.charCodeAt(r+2)],h=v[t.charCodeAt(r+3)],l[i++]=n<<2|o>>4,l[i++]=(15&o)<<4|a>>2,l[i++]=(3&a)<<6|63&h;return c})(t),e):{base64:!0,data:t},A=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;function T(t){return t.reduce((t,e)=>t+e.length,0)}function R(t,e){if(t[0].length===e)return t.shift();let s=new Uint8Array(e),r=0;for(let i=0;i<e;i++)s[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),s}function O(t){if(t){var e=t;for(var s in O.prototype)e[s]=O.prototype[s];return e}}O.prototype.on=O.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},O.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},O.prototype.off=O.prototype.removeListener=O.prototype.removeAllListeners=O.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<r.length;i++)if((s=r[i])===e||s.fn===e){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},O.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),s=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(s){s=s.slice(0);for(var r=0,i=s.length;r<i;++r)s[r].apply(this,e)}return this},O.prototype.emitReserved=O.prototype.emit,O.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},O.prototype.hasListeners=function(t){return!!this.listeners(t).length};let C="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),B="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function S(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}let x=B.setTimeout,N=B.clearTimeout;function L(t,e){e.useNativeTimers?(t.setTimeoutFn=x.bind(B),t.clearTimeoutFn=N.bind(B)):(t.setTimeoutFn=B.setTimeout.bind(B),t.clearTimeoutFn=B.clearTimeout.bind(B))}function P(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class q extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class D extends O{constructor(t){super(),this.writable=!1,L(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,s){return super.emitReserved("error",new q(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=k(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return -1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){let e=function(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}(t);return e.length?"?"+e:""}}class U extends D{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)};((t,e)=>{let s=t.split("\x1e"),r=[];for(let t=0;t<s.length;t++){let i=k(s[t],e);if(r.push(i),"error"===i.type)break}return r})(t,this.socket.binaryType).forEach(e),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){var e;let s,r,i;this.writable=!1,e=t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})},r=Array(s=t.length),i=0,t.forEach((t,n)=>{g(t,!1,t=>{r[n]=t,++i===s&&e(r.join("\x1e"))})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=P()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let j=!1;try{j="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let I=j;function M(){}class F extends U{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){let s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class V extends O{constructor(t,e,s){super(),this.createRequest=t,L(this,s),this._opts=s,this._method=s.method||"GET",this._uri=e,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var t;let e=S(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(e);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let t in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&s.setRequestHeader(t,this._opts.extraHeaders[t])}catch(t){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{s.setRequestHeader("Accept","*/*")}catch(t){}null==(t=this._opts.cookieJar)||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var t;3===s.readyState&&(null==(t=this._opts.cookieJar)||t.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(t){this.setTimeoutFn(()=>{this._onError(t)},0);return}"undefined"!=typeof document&&(this._index=V.requestsCount++,V.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=M,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete V.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function H(){for(let t in V.requests)V.requests.hasOwnProperty(t)&&V.requests[t].abort()}V.requestsCount=0,V.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",H):"function"==typeof addEventListener&&addEventListener("onpagehide"in B?"pagehide":"unload",H,!1));let K=(r=W({xdomain:!1}))&&null!==r.responseType;function W(t){let e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||I))return new XMLHttpRequest}catch(t){}if(!e)try{return new B[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let Y="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class z extends D{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,s=Y?{}:S(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],r=e===t.length-1;g(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}r&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=P()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let J=B.WebSocket||B.MozWebSocket,$={websocket:class extends z{createSocket(t,e,s){return Y?new J(t,e,s):e?new J(t,e):new J(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends D{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{var r,i;let n,o,a,h,c=(r=Number.MAX_SAFE_INTEGER,i=this.socket.binaryType,s||(s=new TextDecoder),n=[],o=0,a=-1,h=!1,new TransformStream({transform(t,e){for(n.push(t);;){if(0===o){if(1>T(n))break;let t=R(n,1);h=(128&t[0])==128,o=(a=127&t[0])<126?3:126===a?1:2}else if(1===o){if(2>T(n))break;let t=R(n,2);a=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),o=3}else if(2===o){if(8>T(n))break;let t=R(n,8),s=new DataView(t.buffer,t.byteOffset,t.length),r=s.getUint32(0);if(r>2097151){e.enqueue(p);break}a=0x100000000*r+s.getUint32(4),o=3}else{if(T(n)<a)break;let t=R(n,a);e.enqueue(k(h?t:s.decode(t),i)),o=0}if(0===a||a>r){e.enqueue(p);break}}}})),l=t.readable.pipeThrough(c).getReader(),u=new TransformStream({transform(t,s){var r;r=e=>{let r,i=e.length;if(i<126)new DataView((r=new Uint8Array(1)).buffer).setUint8(0,i);else if(i<65536){let t=new DataView((r=new Uint8Array(3)).buffer);t.setUint8(0,126),t.setUint16(1,i)}else{let t=new DataView((r=new Uint8Array(9)).buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(r[0]|=128),s.enqueue(r),s.enqueue(e)},d&&t.data instanceof Blob?t.data.arrayBuffer().then(_).then(r):f&&(t.data instanceof ArrayBuffer||y(t.data))?r(_(t.data)):g(t,!1,t=>{e||(e=new TextEncoder),r(e.encode(t))})}});u.readable.pipeTo(t.writable),this._writer=u.writable.getWriter();let m=()=>{l.read().then(({done:t,value:e})=>{t||(this.onPacket(e),m())}).catch(t=>{})};m();let b={type:"open"};this.query.sid&&(b.data=`{"sid":"${this.query.sid}"}`),this._writer.write(b).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],r=e===t.length-1;this._writer.write(s).then(()=>{r&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null==(t=this._transport)||t.close()}},polling:class extends F{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=K&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new V(W,this.uri(),t)}}},X=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Q=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function G(t){var e,s;let r,i;if(t.length>8e3)throw"URI too long";let n=t,o=t.indexOf("["),a=t.indexOf("]");-1!=o&&-1!=a&&(t=t.substring(0,o)+t.substring(o,a).replace(/:/g,";")+t.substring(a,t.length));let h=X.exec(t||""),c={},l=14;for(;l--;)c[Q[l]]=h[l]||"";return -1!=o&&-1!=a&&(c.source=n,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),r=(e=c.path).replace(/\/{2,9}/g,"/").split("/"),("/"==e.slice(0,1)||0===e.length)&&r.splice(0,1),"/"==e.slice(-1)&&r.splice(r.length-1,1),c.pathNames=r,s=c.query,i={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,s){e&&(i[e]=s)}),c.queryKey=i,c}let Z="function"==typeof addEventListener&&"function"==typeof removeEventListener,tt=[];Z&&addEventListener("offline",()=>{tt.forEach(t=>t())},!1);class te extends O{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const s=G(t);e.hostname=s.host,e.secure="https"===s.protocol||"wss"===s.protocol,e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=G(e.host).host);L(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{let e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},s=t.split("&");for(let t=0,r=s.length;t<r;t++){let r=s[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}(this.opts.query)),Z&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},tt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);let s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let t=this.opts.rememberUpgrade&&te.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",te.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){let s=this.writeBuffer[e].data;if(s&&(t+="string"==typeof s?function(t){let e=0,s=0;for(let r=0,i=t.length;r<i;r++)(e=t.charCodeAt(r))<128?s+=1:e<2048?s+=2:e<55296||e>=57344?s+=3:(r++,s+=4);return s}(s):Math.ceil(1.33*(s.byteLength||s.size))),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,C(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this._sendPacket("message",t,e,s),this}send(t,e,s){return this._sendPacket("message",t,e,s),this}_sendPacket(t,e,s,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;let i={type:t,data:e,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(te.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Z&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=tt.indexOf(this._offlineEventListener);-1!==t&&tt.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}te.protocol=4;class ts extends te{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),s=!1;te.priorWebsocketSuccess=!1;let r=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!s)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;te.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let t=Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function i(){s||(s=!0,c(),e.close(),e=null)}let n=t=>{let s=Error("probe error: "+t);s.transport=e.name,i(),this.emitReserved("upgradeError",s)};function o(){n("transport closed")}function a(){n("socket closed")}function h(t){e&&t.name!==e.name&&i()}let c=()=>{e.removeListener("open",r),e.removeListener("error",n),e.removeListener("close",o),this.off("close",a),this.off("upgrading",h)};e.once("open",r),e.once("error",n),e.once("close",o),this.once("close",a),this.once("upgrading",h),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}class tr extends ts{constructor(t,e={}){const s="object"==typeof t?t:e;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(t=>$[t]).filter(t=>!!t)),super(t,s)}}tr.protocol;let ti="function"==typeof ArrayBuffer,tn=Object.prototype.toString,to="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===tn.call(Blob),ta="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===tn.call(File);function th(t){return ti&&(t instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer))||to&&t instanceof Blob||ta&&t instanceof File}let tc=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(i=n||(n={}))[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK";class tl{constructor(t){this.replacer=t}encode(t){return(t.type===n.EVENT||t.type===n.ACK)&&function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,r=e.length;s<r;s++)if(t(e[s]))return!0;return!1}if(th(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}(t)?this.encodeAsBinary({type:t.type===n.EVENT?n.BINARY_EVENT:n.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===n.BINARY_EVENT||t.type===n.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e,s,r=(e=[],s=t.data,t.data=function t(e,s){if(!e)return e;if(th(e)){let t={_placeholder:!0,num:s.length};return s.push(e),t}if(Array.isArray(e)){let r=Array(e.length);for(let i=0;i<e.length;i++)r[i]=t(e[i],s);return r}if("object"==typeof e&&!(e instanceof Date)){let r={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t(e[i],s));return r}return e}(s,e),t.attachments=e.length,{packet:t,buffers:e}),i=this.encodeAsString(r.packet),n=r.buffers;return n.unshift(i),n}}function tu(t){return"[object Object]"===Object.prototype.toString.call(t)}class tp extends O{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let s=(e=this.decodeString(t)).type===n.BINARY_EVENT;s||e.type===n.BINARY_ACK?(e.type=s?n.EVENT:n.ACK,this.reconstructor=new td(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(th(t)||t.base64)if(this.reconstructor)(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+t)}decodeString(t){let e=0,s={type:Number(t.charAt(0))};if(void 0===n[s.type])throw Error("unknown packet type "+s.type);if(s.type===n.BINARY_EVENT||s.type===n.BINARY_ACK){let r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);let i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw Error("Illegal attachments");s.attachments=Number(i)}if("/"===t.charAt(e+1)){let r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);s.nsp=t.substring(r,e)}else s.nsp="/";let r=t.charAt(e+1);if(""!==r&&Number(r)==r){let r=e+1;for(;++e;){let s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){let r=this.tryParse(t.substr(e));if(tp.isPayloadValid(s.type,r))s.data=r;else throw Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case n.CONNECT:return tu(e);case n.DISCONNECT:return void 0===e;case n.CONNECT_ERROR:return"string"==typeof e||tu(e);case n.EVENT:case n.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tc.indexOf(e[0]));case n.ACK:case n.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class td{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e,s;let t=(e=this.reconPack,s=this.buffers,e.data=function t(e,s){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<s.length)return s[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=t(e[r],s);else if("object"==typeof e)for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t(e[r],s));return e}(e.data,s),delete e.attachments,e);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function tf(t,e,s){return t.on(e,s),function(){t.off(e,s)}}t.s(["Decoder",()=>tp,"Encoder",()=>tl,"PacketType",()=>n,"protocol",0,5],52140);let ty=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tg extends O{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[tf(t,"open",this.onopen.bind(this)),tf(t,"packet",this.onpacket.bind(this)),tf(t,"error",this.onerror.bind(this)),tf(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,r,i;if(ty.hasOwnProperty(t))throw Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let o={type:n.EVENT,data:e};if(o.options={},o.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){let t=this.ids++,s=e.pop();this._registerAckCallback(t,s),o.id=t}let a=null==(r=null==(s=this.io.engine)?void 0:s.transport)?void 0:r.writable,h=this.connected&&!(null==(i=this.io.engine)?void 0:i._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var s;let r=null!=(s=this.flags.timeout)?s:this._opts.ackTimeout;if(void 0===r){this.acks[t]=e;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,Error("operation has timed out"))},r),n=(...t)=>{this.io.clearTimeoutFn(i),e.apply(this,t)};n.withError=!0,this.acks[t]=n}emitWithAck(t,...e){return new Promise((s,r)=>{let i=(t,e)=>t?r(t):s(e);i.withError=!0,e.push(i),this.emit(t,...e)})}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((t,...r)=>{if(s===this._queue[0])return null!==t?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;let e=this._queue[0];(!e.pending||t)&&(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:n.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case n.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case n.EVENT:case n.BINARY_EVENT:this.onevent(t);break;case n.ACK:case n.BINARY_ACK:this.onack(t);break;case n.DISCONNECT:this.ondisconnect();break;case n.CONNECT_ERROR:this.destroy();let e=Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){let e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length)for(let e of this._anyListeners.slice())e.apply(this,t);super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,s=!1;return function(...r){s||(s=!0,e.packet({type:n.ACK,id:t,data:r}))}}onack(t){let e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:n.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let e of this._anyOutgoingListeners.slice())e.apply(this,t.data)}}var tm=t.i(52140);function t_(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t_.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-s:t+s}return 0|Math.min(t,this.max)},t_.prototype.reset=function(){this.attempts=0},t_.prototype.setMin=function(t){this.ms=t},t_.prototype.setMax=function(t){this.max=t},t_.prototype.setJitter=function(t){this.jitter=t};class tb extends O{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,L(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(s=e.randomizationFactor)?s:.5),this.backoff=new t_({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||tm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null==(e=this.backoff)||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null==(e=this.backoff)||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null==(e=this.backoff)||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new tr(this.uri,this.opts);let e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let r=tf(e,"open",function(){s.onopen(),t&&t()}),i=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},n=tf(e,"error",i);if(!1!==this._timeout){let t=this._timeout,s=this.setTimeoutFn(()=>{r(),i(Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(n),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(tf(t,"ping",this.onping.bind(this)),tf(t,"data",this.ondata.bind(this)),tf(t,"error",this.onerror.bind(this)),tf(t,"close",this.onclose.bind(this)),tf(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){C(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new tg(this,t,e),this.nsps[t]=s),s}_destroy(t){for(let t of Object.keys(this.nsps))if(this.nsps[t].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),null==(s=this.engine)||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}let tv={};function tw(t,e){let s;"object"==typeof t&&(e=t,t=void 0);let r=function(t,e="",s){let r=t;s=s||"undefined"!=typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==s?s.protocol+"//"+t:"https://"+t),r=G(t)),!r.port&&(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+e,r.href=r.protocol+"://"+i+(s&&s.port===r.port?"":":"+r.port),r}(t,(e=e||{}).path||"/socket.io"),i=r.source,n=r.id,o=r.path,a=tv[n]&&o in tv[n].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?s=new tb(i,e):(tv[n]||(tv[n]=new tb(i,e)),s=tv[n]),r.query&&!e.query&&(e.query=r.queryKey),s.socket(r.path,e)}Object.assign(tw,{Manager:tb,Socket:tg,io:tw,connect:tw});let tk=t=>{let e=(0,a.useRef)(null);(0,a.useEffect)(()=>{e.current||(e.current=tw());let s=e.current;return s.on("reload",e=>{console.debug("Reloading..."),t(e)}),()=>{s.off()}},[t])};t.s(["useHotreload",0,tk],5248);let tE=(0,a.createContext)(void 0);t.s(["EmailsProvider",0,t=>{let[e,s]=(0,a.useState)(t.initialEmailsDirectoryMetadata);return c.isBuilding||c.isPreviewDevelopment||tk(async()=>{let e=await (0,h.getEmailsDirectoryMetadataAction)(t.initialEmailsDirectoryMetadata.absolutePath);if(e)s(e);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,o.jsx)(tE.Provider,{value:{emailsDirectoryMetadata:e},children:t.children})},"useEmails",0,()=>{let t=(0,a.useContext)(tE);if(void 0===t)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return t}],56622)}]);
|