@react-email/ui 6.8.1 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/diagnostics/route-bundle-stats.json +10 -9
  4. package/.next/fallback-build-manifest.json +3 -3
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/page/server-reference-manifest.json +1 -1
  16. package/.next/server/app/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/preview/[...slug]/page/server-reference-manifest.json +8 -8
  18. package/.next/server/app/preview/[...slug]/page.js +5 -4
  19. package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
  20. package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/chunks/ssr/{0kci_next_dist_esm_build_templates_app-page_0o.jt0x.js → 0kci_next_dist_esm_build_templates_app-page_13jevt-.js} +3 -3
  22. package/.next/server/chunks/ssr/0kci_next_dist_esm_build_templates_app-page_13jevt-.js.map +1 -0
  23. package/.next/server/chunks/ssr/[root-of-the-server]__0jx5d~g._.js +2 -2
  24. package/.next/server/chunks/ssr/[root-of-the-server]__0k6754k._.js +1 -1
  25. package/.next/server/chunks/ssr/[root-of-the-server]__0k6754k._.js.map +1 -1
  26. package/.next/server/chunks/ssr/{[root-of-the-server]__0d.h7dp._.js → [root-of-the-server]__13sdo3r._.js} +2 -2
  27. package/.next/server/chunks/ssr/_03liear._.js +1 -1
  28. package/.next/server/chunks/ssr/_03liear._.js.map +1 -1
  29. package/.next/server/chunks/ssr/_06p~r0t._.js +3 -3
  30. package/.next/server/chunks/ssr/_06p~r0t._.js.map +1 -1
  31. package/.next/server/chunks/ssr/_06x5yf8._.js +1 -1
  32. package/.next/server/chunks/ssr/_0au~b4w._.js +1 -1
  33. package/.next/server/chunks/ssr/_0au~b4w._.js.map +1 -1
  34. package/.next/server/chunks/ssr/_0bb37hq._.js +2 -2
  35. package/.next/server/chunks/ssr/_0bb37hq._.js.map +1 -1
  36. package/.next/server/chunks/ssr/_0jzzir7._.js +1 -1
  37. package/.next/server/chunks/ssr/_0jzzir7._.js.map +1 -1
  38. package/.next/server/chunks/ssr/_0o5084b._.js +5 -5
  39. package/.next/server/chunks/ssr/_0o5084b._.js.map +1 -1
  40. package/.next/server/chunks/ssr/_0z2_2b7._.js +1 -1
  41. package/.next/server/chunks/ssr/_0z2_2b7._.js.map +1 -1
  42. package/.next/server/chunks/ssr/packages_ui_src_0.ov~_x._.js +3 -0
  43. package/.next/server/chunks/ssr/packages_ui_src_0.ov~_x._.js.map +1 -0
  44. package/.next/server/chunks/ssr/packages_ui_src_11mz0xt._.js +3 -0
  45. package/.next/server/chunks/ssr/packages_ui_src_11mz0xt._.js.map +1 -0
  46. package/.next/server/middleware-build-manifest.js +3 -3
  47. package/.next/server/pages/500.html +1 -1
  48. package/.next/server/server-reference-manifest.js +1 -1
  49. package/.next/server/server-reference-manifest.json +9 -9
  50. package/.next/static/chunks/{08l40kl5rf2s2.js → 0.__jzgiil6q7.js} +1 -1
  51. package/.next/static/chunks/00ecsosfoo~be.css +3 -0
  52. package/.next/static/chunks/{15~kc67eqdve8.js → 0cr8lx05fcstc.js} +1 -1
  53. package/.next/static/chunks/0nhnu1wkjtfwe.js +1 -0
  54. package/.next/static/chunks/{0m-l5t15j5bnl.js → 0ntsvdyzr-1u3.js} +1 -1
  55. package/.next/static/chunks/0owottqfmsjwp.js +42 -0
  56. package/.next/trace +1 -1
  57. package/.next/trace-build +1 -1
  58. package/.next/types/routes.d.ts +3 -1
  59. package/.next/types/validator.ts +9 -0
  60. package/package.json +2 -2
  61. package/src/app/preview/[...slug]/preview.tsx +126 -104
  62. package/src/app/preview/layout.tsx +9 -0
  63. package/src/components/code.tsx +2 -2
  64. package/src/components/icons/icon-panel-right.tsx +19 -0
  65. package/src/components/json-editor.tsx +71 -0
  66. package/src/components/preview-props-editor.tsx +101 -0
  67. package/src/components/preview-props-panel.tsx +31 -0
  68. package/src/components/toolbar/copy-for-ai.tsx +0 -1
  69. package/src/components/toolbar.tsx +11 -31
  70. package/src/components/topbar/props-panel-toggle.tsx +31 -0
  71. package/src/contexts/props-panel.tsx +61 -0
  72. package/src/hooks/use-hot-reload.ts +11 -10
  73. package/.next/server/chunks/ssr/0kci_next_dist_esm_build_templates_app-page_0o.jt0x.js.map +0 -1
  74. package/.next/static/chunks/093u7_u99n-lp.css +0 -3
  75. package/.next/static/chunks/0nvn3s74q.6bx.js +0 -42
  76. package/src/components/toolbar/preview-props-editor.tsx +0 -102
  77. /package/.next/server/chunks/ssr/{[root-of-the-server]__0d.h7dp._.js.map → [root-of-the-server]__13sdo3r._.js.map} +0 -0
  78. /package/.next/static/{-9MO25vpro82XlxO0t34A → c8jFxxcwBv319fqx4lN5X}/_buildManifest.js +0 -0
  79. /package/.next/static/{-9MO25vpro82XlxO0t34A → c8jFxxcwBv319fqx4lN5X}/_clientMiddlewareManifest.js +0 -0
  80. /package/.next/static/{-9MO25vpro82XlxO0t34A → c8jFxxcwBv319fqx4lN5X}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
1
  module.exports=[88860,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"registerServerReference",{enumerable:!0,get:function(){return d.registerServerReference}});let d=a.r(54718)},34514,(a,b,c)=>{"use strict";function d(a){for(let b=0;b<a.length;b++){let c=a[b];if("function"!=typeof c)throw Object.defineProperty(Error(`A "use server" file can only export async functions, found ${typeof c}.
2
- Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},19986,a=>{"use strict";var b=a.i(88860),c=a.i(90994),d=a.i(37342),e=a.i(34514);let f=async()=>(0,d.getEmailsDirectoryMetadata)(c.emailsDirectoryAbsolutePath);(0,e.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"0088a7b4a5e945264b8b2196fdbf0b912c774847f2",null),a.s(["getEmailsDirectoryMetadataAction",0,f])},82613,a=>{"use strict";var b=a.i(19986);a.s([],24448),a.i(24448),a.s(["0088a7b4a5e945264b8b2196fdbf0b912c774847f2",()=>b.getEmailsDirectoryMetadataAction],82613)}];
2
+ Read more: https://nextjs.org/docs/messages/invalid-use-server-value`),"__NEXT_ERROR_CODE",{value:"E352",enumerable:!1,configurable:!0})}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ensureServerEntryExports",{enumerable:!0,get:function(){return d}})},19986,a=>{"use strict";var b=a.i(88860),c=a.i(90994),d=a.i(37342),e=a.i(34514);let f=async()=>(0,d.getEmailsDirectoryMetadata)(c.emailsDirectoryAbsolutePath);(0,e.ensureServerEntryExports)([f]),(0,b.registerServerReference)(f,"00fae0c8ea641ac0efa23431eb04e921901fbb9310",null),a.s(["getEmailsDirectoryMetadataAction",0,f])},82613,a=>{"use strict";var b=a.i(19986);a.s([],24448),a.i(24448),a.s(["00fae0c8ea641ac0efa23431eb04e921901fbb9310",()=>b.getEmailsDirectoryMetadataAction],82613)}];
3
3
 
4
4
  //# sourceMappingURL=_0z2_2b7._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../node_modules/.pnpm/next%4016.2.6_%40babel%2Bcore%407.29.6_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../node_modules/.pnpm/next%4016.2.6_%40babel%2Bcore%407.29.6_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../packages/ui/src/actions/get-emails-directory-metadata-action.ts","../../../../../../packages/ui/.next-internal/server/app/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","'use server';\n\nimport { emailsDirectoryAbsolutePath } from '../app/env';\nimport type { EmailsDirectory } from '../utils/get-emails-directory-metadata';\nimport { getEmailsDirectoryMetadata } from '../utils/get-emails-directory-metadata';\n\nexport const getEmailsDirectoryMetadataAction = async (): Promise<\n EmailsDirectory | undefined\n> => {\n return getEmailsDirectoryMetadata(emailsDirectoryAbsolutePath);\n};\n","export {getEmailsDirectoryMetadataAction as '0088a7b4a5e945264b8b2196fdbf0b912c774847f2'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error","getEmailsDirectoryMetadataAction"],"mappings":"6CAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,8CCDhB,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBAEO,IAAMM,EAAmC,SAGvC,CAAA,EAAA,EAAA,0BAAA,AAA0B,EAAC,EAAA,2BAA2B,kCAHlDA,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA,4ECNb,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
1
+ {"version":3,"sources":["../../../../../../node_modules/.pnpm/next%4016.2.6_%40babel%2Bcore%407.29.6_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/server-reference.ts","../../../../../../node_modules/.pnpm/next%4016.2.6_%40babel%2Bcore%407.29.6_react-dom%4019.2.4_react%4019.2.4__react%4019.2.4/node_modules/next/src/build/webpack/loaders/next-flight-loader/action-validate.ts","../../../../../../packages/ui/src/actions/get-emails-directory-metadata-action.ts","../../../../../../packages/ui/.next-internal/server/app/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["/* eslint-disable import/no-extraneous-dependencies */\nexport { registerServerReference } from 'react-server-dom-webpack/server'\n","// This function ensures that all the exported values are valid server actions,\n// during the runtime. By definition all actions are required to be async\n// functions, but here we can only check that they are functions.\nexport function ensureServerEntryExports(actions: any[]) {\n for (let i = 0; i < actions.length; i++) {\n const action = actions[i]\n if (typeof action !== 'function') {\n throw new Error(\n `A \"use server\" file can only export async functions, found ${typeof action}.\\nRead more: https://nextjs.org/docs/messages/invalid-use-server-value`\n )\n }\n }\n}\n","'use server';\n\nimport { emailsDirectoryAbsolutePath } from '../app/env';\nimport type { EmailsDirectory } from '../utils/get-emails-directory-metadata';\nimport { getEmailsDirectoryMetadata } from '../utils/get-emails-directory-metadata';\n\nexport const getEmailsDirectoryMetadataAction = async (): Promise<\n EmailsDirectory | undefined\n> => {\n return getEmailsDirectoryMetadata(emailsDirectoryAbsolutePath);\n};\n","export {getEmailsDirectoryMetadataAction as '00fae0c8ea641ac0efa23431eb04e921901fbb9310'} from 'ACTIONS_MODULE0'\n"],"names":["registerServerReference","ensureServerEntryExports","actions","i","length","action","Error","getEmailsDirectoryMetadataAction"],"mappings":"6CAAoD,OAAA,cAAA,CAAA,EAAA,aAAA,oCAC3CA,0BAAAA,qCAAAA,EAAAA,uBAAuB,YAAQ,CAAA,CAAA,IAAA,iCCEjC,SAASC,EAAyBC,CAAc,EACrD,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAQE,MAAM,CAAED,IAAK,CACvC,IAAME,EAASH,CAAO,CAACC,EAAE,CACzB,GAAI,AAAkB,YAAY,OAAvBE,EACT,MAAM,OAAA,cAEL,CAFK,AAAIC,MACR,CAAC,2DAA2D,EAAE,OAAOD,EAAO;AAAA,oEAAuE,CAAC,EADhJ,oBAAA,OAAA,mBAAA,gBAAA,CAEN,EAEJ,CACF,0EATgBJ,2BAAAA,qCAAAA,8CCDhB,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,oBAEO,IAAMM,EAAmC,SAGvC,CAAA,EAAA,EAAA,0BAAA,AAA0B,EAAC,EAAA,2BAA2B,kCAHlDA,IAAAA,CAAAA,EAAAA,EAAAA,uBAAAA,EAAAA,EAAAA,6CAAAA,4ECNb,IAAA,EAAA,EAAA,CAAA,CAAA","ignoreList":[0,1]}
@@ -0,0 +1,3 @@
1
+ module.exports=[56319,a=>{"use strict";var b=a.i(29090),c=a.i(17272);let d=()=>({});a.s(["useCachedWorkspaceState",0,a=>{let e=(0,c.useWorkspaceId)(),f=((a,b)=>{let c=d()[a];if(c&&Object.hasOwn(c,b))return c[b]})(e,a);return[(0,b.useSyncExternalStore)(()=>()=>{},()=>f,()=>void 0),function(b){((a,b,c)=>{let e=d(),f={...e[a]??{}};if(void 0===c){if(!Object.hasOwn(f,b))return;delete f[b]}else f[b]=c;0===Object.keys(f).length?delete e[a]:e[a]=f})(e,a,b)}]}],56319)},51510,a=>{"use strict";var b=a.i(45617),c=a.i(29090),d=a.i(56319);let e=(0,c.createContext)(void 0);a.s(["PropsPanelProvider",0,({children:a})=>{let[f,g]=(0,d.useCachedWorkspaceState)("props-panel-open"),[h,i]=(0,c.useState)(void 0),[j,k]=(0,c.useState)(!1);return(0,b.jsx)(e.Provider,{value:{open:h??!0===f,setOpen:a=>{k(!0),i(a),g(a)},animated:j},children:a})},"usePropsPanel",0,()=>{let a=(0,c.useContext)(e);if(void 0===a)throw Error("Cannot call `usePropsPanel` outside of a `PropsPanelProvider`.");return a}])}];
2
+
3
+ //# sourceMappingURL=packages_ui_src_0.ov~_x._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/ui/src/hooks/use-cached-workspace-state.ts","../../../../../../packages/ui/src/utils/workspace-storage.ts","../../../../../../packages/ui/src/contexts/props-panel.tsx"],"sourcesContent":["import { useSyncExternalStore } from 'react';\nimport { useWorkspaceId } from '../contexts/workspace';\nimport {\n readWorkspaceValue,\n writeWorkspaceValue,\n} from '../utils/workspace-storage';\n\n/**\n * Reads and writes a value scoped to the current React Email workspace,\n * persisted under the shared `react-email-data` localStorage entry.\n *\n * Behavioral notes (mirrors the older `useCachedState` it replaces):\n * - The value is re-read from storage on every render, so navigating\n * between contexts that change the `key` picks up the right snapshot.\n * - `setValue` writes to storage but doesn't trigger a re-render (the\n * external store has a no-op subscribe), so callers typically seed\n * local React state from this value at first render and call\n * `setValue` alongside `setState` on updates.\n * - Pass `undefined` to delete the entry.\n */\nexport const useCachedWorkspaceState = <T>(key: string) => {\n const workspaceId = useWorkspaceId();\n const value = readWorkspaceValue<T>(workspaceId, key);\n\n return [\n useSyncExternalStore(\n () => () => {},\n () => value,\n () => undefined,\n ),\n function setValue(newValue: T | undefined) {\n writeWorkspaceValue(workspaceId, key, newValue);\n },\n ] as const;\n};\n","/**\n * Single localStorage entry that holds every piece of React Email's cached\n * browser state, keyed first by workspace id (hash of the user's project\n * path) and then by an arbitrary string key.\n *\n * Consolidating under one entry means users can purge everything in one\n * step from DevTools (handy because `localhost` is a shared origin across\n * many tools).\n */\nconst STORAGE_KEY = 'react-email-data';\n\ntype WorkspaceBucket = Record<string, unknown>;\ntype AllWorkspaces = Record<string, WorkspaceBucket>;\n\nconst isBrowser = (): boolean =>\n typeof window !== 'undefined' && typeof window.localStorage !== 'undefined';\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n value !== null && typeof value === 'object' && !Array.isArray(value);\n\nconst readAll = (): AllWorkspaces => {\n if (!isBrowser()) return {};\n\n try {\n const raw = window.localStorage.getItem(STORAGE_KEY);\n if (!raw) return {};\n\n const parsed: unknown = JSON.parse(raw);\n if (!isPlainObject(parsed)) return {};\n\n // Shallow validation: discard any top-level entry whose value isn't\n // a plain object — protects against hand-edited or corrupted payloads.\n const result: AllWorkspaces = {};\n for (const [id, bucket] of Object.entries(parsed)) {\n if (isPlainObject(bucket)) {\n result[id] = bucket;\n }\n }\n return result;\n } catch {\n return {};\n }\n};\n\nconst writeAll = (data: AllWorkspaces): void => {\n if (!isBrowser()) return;\n\n try {\n if (Object.keys(data).length === 0) {\n window.localStorage.removeItem(STORAGE_KEY);\n return;\n }\n window.localStorage.setItem(STORAGE_KEY, JSON.stringify(data));\n } catch {\n // Swallow quota / serialization errors — persistence is best-effort.\n }\n};\n\nexport const readWorkspaceValue = <T>(\n workspaceId: string,\n key: string,\n): T | undefined => {\n const bucket = readAll()[workspaceId];\n // `Object.hasOwn` (not `in`) so prototype members like `toString` aren't\n // mistaken for stored values.\n if (!bucket || !Object.hasOwn(bucket, key)) return undefined;\n return bucket[key] as T;\n};\n\nexport const writeWorkspaceValue = <T>(\n workspaceId: string,\n key: string,\n value: T | undefined,\n): void => {\n const all = readAll();\n const bucket = { ...(all[workspaceId] ?? {}) };\n\n if (value === undefined) {\n if (!Object.hasOwn(bucket, key)) return;\n delete bucket[key];\n } else {\n bucket[key] = value;\n }\n\n if (Object.keys(bucket).length === 0) {\n delete all[workspaceId];\n } else {\n all[workspaceId] = bucket;\n }\n\n writeAll(all);\n};\n\n// Exported for tests and for debugging by name in DevTools.\nexport const REACT_EMAIL_DATA_STORAGE_KEY = STORAGE_KEY;\n","'use client';\n\nimport { createContext, useContext, useState } from 'react';\nimport { useCachedWorkspaceState } from '../hooks/use-cached-workspace-state';\n\nconst PropsPanelContext = createContext<\n | {\n open: boolean;\n setOpen: (open: boolean) => void;\n /**\n * False until the user toggles the panel, so restoring the remembered\n * state on load applies instantly instead of animating.\n */\n animated: boolean;\n }\n | undefined\n>(undefined);\n\n/**\n * Must stay mounted in the preview layout, which survives navigating between\n * templates — otherwise the panel closes or replays its opening animation on\n * every navigation.\n */\nexport const PropsPanelProvider = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const [cachedOpen, setCachedOpen] =\n useCachedWorkspaceState<boolean>('props-panel-open');\n // Writing to the workspace cache does not re-render, so toggles land in\n // this state and the cached value only matters on load.\n const [override, setOverride] = useState<boolean | undefined>(undefined);\n const [animated, setAnimated] = useState(false);\n\n const open = override ?? cachedOpen === true;\n\n const setOpen = (newOpen: boolean) => {\n setAnimated(true);\n setOverride(newOpen);\n setCachedOpen(newOpen);\n };\n\n return (\n <PropsPanelContext.Provider value={{ open, setOpen, animated }}>\n {children}\n </PropsPanelContext.Provider>\n );\n};\n\nexport const usePropsPanel = () => {\n const context = useContext(PropsPanelContext);\n\n if (context === undefined) {\n throw new Error(\n 'Cannot call `usePropsPanel` outside of a `PropsPanelProvider`.',\n );\n }\n\n return context;\n};\n"],"names":["STORAGE_KEY","isBrowser","window","localStorage","isPlainObject","value","Array","isArray","readAll","writeAll","data","readWorkspaceValue","workspaceId","key","bucket","Object","hasOwn","undefined","writeWorkspaceValue","all","keys","length","REACT_EMAIL_DATA_STORAGE_KEY","PropsPanelContext","PropsPanelProvider","children","cachedOpen","setCachedOpen","override","setOverride","animated","setAnimated","open","setOpen","newOpen","Provider","usePropsPanel","context","Error"],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OCmBA,IAAMQ,EAAU,KACW,EAAC,mCDDW,AAAI,IACzC,IAAM,EAAc,CAAA,EAAA,EAAA,cAAA,AAAc,IAC5B,EAAQ,CCoCkB,CAChCI,EACAC,KAEA,IAAMC,EAASN,GAAS,CAACI,EAAY,CAGrC,GAAKE,AAAD,GAAYC,OAAD,AAAQC,MAAM,CAACF,EAAQD,GACtC,GAD4C,IACrCC,CAAM,CAACD,CADqCI,CACjC,CACpB,ED7CsC,EAAa,GAEjD,MAAO,CACL,CAAA,EAAA,EAAA,oBAAA,AAAoB,EAClB,IAAM,KAAO,EACb,IAAM,EACN,SAAM,GAER,SAAS,AAAS,CAAuB,EACvC,CCsC6B,CACjCL,EACAC,EACAR,KAEA,IAAMc,EAAMX,IACNM,EAAS,CAAE,GAAIK,CAAG,CAACP,EAAY,EAAI,CAAC,CAAC,AAAE,EAE7C,GAAIP,KAAUY,MAAW,CACvB,GAAI,CAACF,OAAOC,MAAM,CAACF,EAAQD,GAAM,MACjC,QAAOC,CAAM,CAACD,EAAI,AACpB,MACEC,CADK,AACC,CAACD,EAAI,CAAGR,CAGmB,GAAG,EAAlCU,OAAOK,IAAI,CAACN,GAAQO,MAAM,CAC5B,OAAOF,CAAG,CAACP,EAAY,CAEvBO,CAAG,CAACP,EAAY,CAAGE,EAIvB,ED5D0B,EAAa,EAAK,EACxC,EAEJ,AADG,mDE/BH,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,IAAMS,EAAoB,CAAA,EAAA,EAAA,aAAA,AAAa,EAWrCN,oCAOgC,CAAC,UACjCQ,CAAQ,CAGT,IACC,GAAM,CAACC,EAAYC,EAAc,CAC/B,CAAA,EAAA,EAAA,uBAAA,AAAuB,EAAU,oBAG7B,CAACC,EAAUC,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,OAAsBZ,GACxD,CAACa,EAAUC,EAAY,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,GAAC,GAUzC,MACE,CAAA,EAAA,EAAA,GAAA,EAACR,EAAkBY,QAAQ,CAAA,CAAC9B,MAAO,CAAE2B,KAT1BJ,IAA2B,IAAfF,EASoBO,QAP5BC,AAAD,IACdH,GAAY,GACZF,EAAYK,GACZP,EAAcO,EAChB,WAGsDJ,CAAS,WAC1DL,GAGP,oBAE6B,KAC3B,IAAMY,EAAU,CAAA,EAAA,EAAA,UAAA,AAAU,EAACd,GAE3B,QAAgBN,IAAZoB,EACF,KADyB,CACnB,AAAIC,MACR,kEAIJ,OAAOD,CACT"}
@@ -0,0 +1,3 @@
1
+ module.exports=[53749,a=>{"use strict";a.s(["PropsPanelProvider",()=>c,"usePropsPanel",()=>d]);var b=a.i(54718);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call PropsPanelProvider() from the server but PropsPanelProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/packages/ui/src/contexts/props-panel.tsx <module evaluation>","PropsPanelProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call usePropsPanel() from the server but usePropsPanel is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/packages/ui/src/contexts/props-panel.tsx <module evaluation>","usePropsPanel")},4920,a=>{"use strict";a.s(["PropsPanelProvider",()=>c,"usePropsPanel",()=>d]);var b=a.i(54718);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call PropsPanelProvider() from the server but PropsPanelProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/packages/ui/src/contexts/props-panel.tsx","PropsPanelProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call usePropsPanel() from the server but usePropsPanel is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/packages/ui/src/contexts/props-panel.tsx","usePropsPanel")},8694,a=>{"use strict";a.i(53749);var b=a.i(4920);a.n(b)},76567,a=>{"use strict";var b=a.i(65541),c=a.i(8694);a.s(["default",0,function({children:a}){return(0,b.jsx)(c.PropsPanelProvider,{children:a})}])},34324,a=>{a.n(a.i(76567))}];
2
+
3
+ //# sourceMappingURL=packages_ui_src_11mz0xt._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/ui/src/contexts/props-panel.tsx/__nextjs-internal-proxy.mjs","../../../../../../packages/ui/src/app/preview/layout.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const PropsPanelProvider = registerClientReference(\n function() { throw new Error(\"Attempted to call PropsPanelProvider() from the server but PropsPanelProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/packages/ui/src/contexts/props-panel.tsx\",\n \"PropsPanelProvider\",\n);\nexport const usePropsPanel = registerClientReference(\n function() { throw new Error(\"Attempted to call usePropsPanel() from the server but usePropsPanel is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/packages/ui/src/contexts/props-panel.tsx\",\n \"usePropsPanel\",\n);\n","import { PropsPanelProvider } from '../../contexts/props-panel';\n\nexport default function PreviewLayout({\n children,\n}: {\n children: React.ReactNode;\n}) {\n return <PropsPanelProvider>{children}</PropsPanelProvider>;\n}\n"],"names":["PropsPanelProvider","Error","usePropsPanel","PreviewLayout","children"],"mappings":"+FACA,IAAA,EAAA,EAAA,CAAA,CAAA,OACO,IAAMA,EAAqB,CAAA,EAAA,EAAA,uBAAA,AAAuB,EACrD,WAAa,MAAM,AAAIC,MAAM,kPAAoP,EACjR,yEACA,sBAESC,EAAgB,CAAA,EAAA,EAAA,uBAAA,AAAuB,EAChD,WAAa,MAAM,AAAID,MAAM,wOAA0O,EACvQ,yEACA,gGATJ,IAAA,EAAA,EAAA,CAAA,CAAA,OACO,IAAMD,EAAqB,CAAA,EAAA,EAAA,uBAAA,AAAuB,EACrD,WAAa,MAAM,AAAIC,MAAM,kPAAoP,EACjR,qDACA,sBAESC,EAAgB,CAAA,EAAA,EAAA,uBAAA,AAAuB,EAChD,WAAa,MAAM,AAAID,MAAM,wOAA0O,EACvQ,qDACA,mHCVJ,EAAA,EAAA,CAAA,CAAA,uBAEe,SAASE,AAAc,UACpCC,CAAQ,CAGT,EACC,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,kBAAkB,CAAA,UAAEA,GAC9B","ignoreList":[0]}
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
7
7
  "static/chunks/03~yq9q893hmn.js"
8
8
  ],
9
9
  "lowPriorityFiles": [
10
- "static/-9MO25vpro82XlxO0t34A/_buildManifest.js",
11
- "static/-9MO25vpro82XlxO0t34A/_ssgManifest.js",
12
- "static/-9MO25vpro82XlxO0t34A/_clientMiddlewareManifest.js"
10
+ "static/c8jFxxcwBv319fqx4lN5X/_buildManifest.js",
11
+ "static/c8jFxxcwBv319fqx4lN5X/_ssgManifest.js",
12
+ "static/c8jFxxcwBv319fqx4lN5X/_clientMiddlewareManifest.js"
13
13
  ],
14
14
  "rootMainFiles": [
15
15
  "static/chunks/0~5chh5-fhbyu.js",
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0~5chh5-fhbyu.js"/><script src="/_next/static/chunks/1125t~d-4qywn.js" async=""></script><script src="/_next/static/chunks/0fg8kcsue-i4..js" async=""></script><script src="/_next/static/chunks/12l0.ycm98tfe.js" async=""></script><script src="/_next/static/chunks/turbopack-0m2kv6o0~~z96.js" async=""></script><script src="/_next/static/chunks/089ogr3egm65i.js" async=""></script><script src="/_next/static/chunks/0lsw96p.vm9l2.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0cvz_ui57tz6w.ico" sizes="32x32" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0~5chh5-fhbyu.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[29788,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\"]\n3:I[52655,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\"]\n4:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"ViewportBoundary\"]\na:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"MetadataBoundary\"]\nc:I[66100,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"-9MO25vpro82XlxO0t34A\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[25307,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0cvz_ui57tz6w.ico\",\"sizes\":\"32x32\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/0~5chh5-fhbyu.js"/><script src="/_next/static/chunks/1125t~d-4qywn.js" async=""></script><script src="/_next/static/chunks/0fg8kcsue-i4..js" async=""></script><script src="/_next/static/chunks/12l0.ycm98tfe.js" async=""></script><script src="/_next/static/chunks/turbopack-0m2kv6o0~~z96.js" async=""></script><script src="/_next/static/chunks/089ogr3egm65i.js" async=""></script><script src="/_next/static/chunks/0lsw96p.vm9l2.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><link rel="icon" href="/favicon.ico?favicon.0cvz_ui57tz6w.ico" sizes="32x32" type="image/x-icon"/><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/0~5chh5-fhbyu.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[29788,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\"]\n3:I[52655,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\"]\n4:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"ViewportBoundary\"]\na:I[21625,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"MetadataBoundary\"]\nc:I[66100,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"c8jFxxcwBv319fqx4lN5X\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[25307,[\"/_next/static/chunks/089ogr3egm65i.js\",\"/_next/static/chunks/0lsw96p.vm9l2.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0cvz_ui57tz6w.ico\",\"sizes\":\"32x32\",\"type\":\"image/x-icon\"}],[\"$\",\"$Le\",\"1\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"0088a7b4a5e945264b8b2196fdbf0b912c774847f2\": {\n \"workers\": {\n \"app/_not-found/page\": {\n \"moduleId\": 95976,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n },\n \"app/page\": {\n \"moduleId\": 82613,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n },\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\",\n \"exportedName\": \"getEmailsDirectoryMetadataAction\"\n },\n \"601ff051f6688a31012f4b86b4135a9c8347567562\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkCompatibility\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-compatibility.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-compatibility.ts\",\n \"exportedName\": \"checkCompatibility\"\n },\n \"7f0ed0c797b267d100383679eea1608a2206ccabdc\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"getEmailPathFromSlug\",\n \"filename\": \"packages/ui/src/actions/get-email-path-from-slug.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/get-email-path-from-slug.ts\",\n \"exportedName\": \"getEmailPathFromSlug\"\n },\n \"40b9f5e738349e4c7372700b15d7237be1f3f85cf5\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"invalidateEmailRenderingCache\",\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\"\n }\n },\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\",\n \"exportedName\": \"invalidateEmailRenderingCache\"\n },\n \"702bf24a684f12dcc427353b77f4a2d83217558413\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"renderEmailByPath\",\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\"\n }\n },\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\",\n \"exportedName\": \"renderEmailByPath\"\n },\n \"603090534049d691a187bd289723a84e1b80bdfc75\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkImages\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-images.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-images.ts\",\n \"exportedName\": \"checkImages\"\n },\n \"400cc03f09d2cb46c30cdf94756c86501485ea2225\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkLinks\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-links.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-links.ts\",\n \"exportedName\": \"checkLinks\"\n },\n \"7f7022afe934771b106025a5f2c2401279d51da08c\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"exportSingleTemplate\",\n \"filename\": \"packages/ui/src/actions/export-single-template.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/export-single-template.ts\",\n \"exportedName\": \"exportSingleTemplate\"\n }\n },\n \"edge\": {},\n \"encryptionKey\": \"9IrE/e2Z/RP5uOhUUMLAC+uFlTSm1Joa0tcR/Gpx+tg=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {\n \"00fae0c8ea641ac0efa23431eb04e921901fbb9310\": {\n \"workers\": {\n \"app/_not-found/page\": {\n \"moduleId\": 95976,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n },\n \"app/page\": {\n \"moduleId\": 82613,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n },\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"getEmailsDirectoryMetadataAction\",\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/get-emails-directory-metadata-action.ts\",\n \"exportedName\": \"getEmailsDirectoryMetadataAction\"\n },\n \"6035a3de631d3fccb7f6023846713ec43623bc4310\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkCompatibility\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-compatibility.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-compatibility.ts\",\n \"exportedName\": \"checkCompatibility\"\n },\n \"7ff69307f851f911a20ba896303f8c7beb8591b9e6\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"getEmailPathFromSlug\",\n \"filename\": \"packages/ui/src/actions/get-email-path-from-slug.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/get-email-path-from-slug.ts\",\n \"exportedName\": \"getEmailPathFromSlug\"\n },\n \"40d8af545d937466cd81468ae85c297bc1d2eaad3a\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"invalidateEmailRenderingCache\",\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\"\n }\n },\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\",\n \"exportedName\": \"invalidateEmailRenderingCache\"\n },\n \"702e464f4483ea88c468c74c647cec7ff3360b8e10\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"renderEmailByPath\",\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\"\n }\n },\n \"filename\": \"packages/ui/src/actions/render-email-by-path.tsx\",\n \"exportedName\": \"renderEmailByPath\"\n },\n \"609c454211ed15753b288adcc2c720d76b41dfd923\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkImages\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-images.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-images.ts\",\n \"exportedName\": \"checkImages\"\n },\n \"40cddb6c4857038495943a4cbb41f8c050b5edec18\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"checkLinks\",\n \"filename\": \"packages/ui/src/actions/email-validation/check-links.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/email-validation/check-links.ts\",\n \"exportedName\": \"checkLinks\"\n },\n \"7fd7afc5727c25f2d71e6176c8e623a1a44e62d363\": {\n \"workers\": {\n \"app/preview/[...slug]/page\": {\n \"moduleId\": 37120,\n \"async\": false,\n \"exportedName\": \"exportSingleTemplate\",\n \"filename\": \"packages/ui/src/actions/export-single-template.ts\"\n }\n },\n \"filename\": \"packages/ui/src/actions/export-single-template.ts\",\n \"exportedName\": \"exportSingleTemplate\"\n }\n },\n \"edge\": {},\n \"encryptionKey\": \"nXA9RY+ti779hHmWDcNPwbgXKJpKxrAo3HPWYEDhV08=\"\n}"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "node": {
3
- "0088a7b4a5e945264b8b2196fdbf0b912c774847f2": {
3
+ "00fae0c8ea641ac0efa23431eb04e921901fbb9310": {
4
4
  "workers": {
5
5
  "app/_not-found/page": {
6
6
  "moduleId": 95976,
@@ -24,7 +24,7 @@
24
24
  "filename": "packages/ui/src/actions/get-emails-directory-metadata-action.ts",
25
25
  "exportedName": "getEmailsDirectoryMetadataAction"
26
26
  },
27
- "601ff051f6688a31012f4b86b4135a9c8347567562": {
27
+ "6035a3de631d3fccb7f6023846713ec43623bc4310": {
28
28
  "workers": {
29
29
  "app/preview/[...slug]/page": {
30
30
  "moduleId": 37120,
@@ -36,7 +36,7 @@
36
36
  "filename": "packages/ui/src/actions/email-validation/check-compatibility.ts",
37
37
  "exportedName": "checkCompatibility"
38
38
  },
39
- "7f0ed0c797b267d100383679eea1608a2206ccabdc": {
39
+ "7ff69307f851f911a20ba896303f8c7beb8591b9e6": {
40
40
  "workers": {
41
41
  "app/preview/[...slug]/page": {
42
42
  "moduleId": 37120,
@@ -48,7 +48,7 @@
48
48
  "filename": "packages/ui/src/actions/get-email-path-from-slug.ts",
49
49
  "exportedName": "getEmailPathFromSlug"
50
50
  },
51
- "40b9f5e738349e4c7372700b15d7237be1f3f85cf5": {
51
+ "40d8af545d937466cd81468ae85c297bc1d2eaad3a": {
52
52
  "workers": {
53
53
  "app/preview/[...slug]/page": {
54
54
  "moduleId": 37120,
@@ -60,7 +60,7 @@
60
60
  "filename": "packages/ui/src/actions/render-email-by-path.tsx",
61
61
  "exportedName": "invalidateEmailRenderingCache"
62
62
  },
63
- "702bf24a684f12dcc427353b77f4a2d83217558413": {
63
+ "702e464f4483ea88c468c74c647cec7ff3360b8e10": {
64
64
  "workers": {
65
65
  "app/preview/[...slug]/page": {
66
66
  "moduleId": 37120,
@@ -72,7 +72,7 @@
72
72
  "filename": "packages/ui/src/actions/render-email-by-path.tsx",
73
73
  "exportedName": "renderEmailByPath"
74
74
  },
75
- "603090534049d691a187bd289723a84e1b80bdfc75": {
75
+ "609c454211ed15753b288adcc2c720d76b41dfd923": {
76
76
  "workers": {
77
77
  "app/preview/[...slug]/page": {
78
78
  "moduleId": 37120,
@@ -84,7 +84,7 @@
84
84
  "filename": "packages/ui/src/actions/email-validation/check-images.ts",
85
85
  "exportedName": "checkImages"
86
86
  },
87
- "400cc03f09d2cb46c30cdf94756c86501485ea2225": {
87
+ "40cddb6c4857038495943a4cbb41f8c050b5edec18": {
88
88
  "workers": {
89
89
  "app/preview/[...slug]/page": {
90
90
  "moduleId": 37120,
@@ -96,7 +96,7 @@
96
96
  "filename": "packages/ui/src/actions/email-validation/check-links.ts",
97
97
  "exportedName": "checkLinks"
98
98
  },
99
- "7f7022afe934771b106025a5f2c2401279d51da08c": {
99
+ "7fd7afc5727c25f2d71e6176c8e623a1a44e62d363": {
100
100
  "workers": {
101
101
  "app/preview/[...slug]/page": {
102
102
  "moduleId": 37120,
@@ -110,5 +110,5 @@
110
110
  }
111
111
  },
112
112
  "edge": {},
113
- "encryptionKey": "9IrE/e2Z/RP5uOhUUMLAC+uFlTSm1Joa0tcR/Gpx+tg="
113
+ "encryptionKey": "nXA9RY+ti779hHmWDcNPwbgXKJpKxrAo3HPWYEDhV08="
114
114
  }
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12654,(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(71355),o=t.r(73534),a=t.r(15291)},60203,74805,54734,t=>{"use strict";let e,s,r;var i,n,o=t.i(70403),a=t.i(80161),h=t.i(12654);let c=(0,h.createServerReference)("0088a7b4a5e945264b8b2196fdbf0b912c774847f2",h.callServer,void 0,h.findSourceMapURL,"getEmailsDirectoryMetadataAction");var l=t.i(27155);l.default.env.REACT_EMAIL_INTERNAL_USER_PROJECT_LOCATION,l.default.env.REACT_EMAIL_INTERNAL_PREVIEW_SERVER_LOCATION,l.default.env.REACT_EMAIL_INTERNAL_EMAILS_DIR_ABSOLUTE_PATH,l.default.env.REACT_EMAIL_INTERNAL_RESEND_API_KEY;let u="true"===l.default.env.NEXT_PUBLIC_IS_BUILDING,p="true"===l.default.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT;t.s(["isBuilding",0,u,"isPreviewDevelopment",0,p],74805);let d=Object.create(null);d.open="0",d.close="1",d.ping="2",d.pong="3",d.message="4",d.upgrade="5",d.noop="6";let f=Object.create(null);Object.keys(d).forEach(t=>{f[d[t]]=t});let y={type:"error",data:"parser error"},g="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),m="function"==typeof ArrayBuffer,_=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,b=({type:t,data:e},s,r)=>{if(g&&e instanceof Blob)if(s)return r(e);else return v(e,r);if(m&&(e instanceof ArrayBuffer||_(e)))if(s)return r(e);else return v(new Blob([e]),r);return r(d[t]+(e||""))},v=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function w(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<E.length;t++)k[E.charCodeAt(t)]=t;let A="function"==typeof ArrayBuffer,T=(t,e)=>{if("string"!=typeof t)return{type:"message",data:O(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:R(t.substring(1),e)}:f[s]?t.length>1?{type:f[s],data:t.substring(1)}:{type:f[s]}:y},R=(t,e)=>A?O((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=k[t.charCodeAt(r)],o=k[t.charCodeAt(r+1)],a=k[t.charCodeAt(r+2)],h=k[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},O=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;function C(t){return t.reduce((t,e)=>t+e.length,0)}function N(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 B(t){if(t){var e=t;for(var s in B.prototype)e[s]=B.prototype[s];return e}}B.prototype.on=B.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},B.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},B.prototype.off=B.prototype.removeListener=B.prototype.removeAllListeners=B.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},B.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},B.prototype.emitReserved=B.prototype.emit,B.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},B.prototype.hasListeners=function(t){return!!this.listeners(t).length};let S="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),L="u">typeof self?self:"u">typeof window?window:Function("return this")();function x(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}let P=L.setTimeout,q=L.clearTimeout;function I(t,e){e.useNativeTimers?(t.setTimeoutFn=P.bind(L),t.clearTimeoutFn=q.bind(L)):(t.setTimeoutFn=L.setTimeout.bind(L),t.clearTimeoutFn=L.clearTimeout.bind(L))}function j(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class U extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class D extends B{constructor(t){super(),this.writable=!1,I(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 U(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=T(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&&443!==Number(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 M 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=T(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)=>{b(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]=j()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let F=!1;try{F="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let V=F;function H(){}class K extends M{constructor(t){if(super(t),"u">typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="u">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 W extends B{constructor(t,e,s){super(),this.createRequest=t,I(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=x(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}"u">typeof document&&(this._index=W.requestsCount++,W.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=H,t)try{this._xhr.abort()}catch(t){}"u">typeof document&&delete W.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 Y(){for(let t in W.requests)W.requests.hasOwnProperty(t)&&W.requests[t].abort()}W.requestsCount=0,W.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",Y):"function"==typeof addEventListener&&addEventListener("onpagehide"in L?"pagehide":"unload",Y,!1));let z=(r=J({xdomain:!1}))&&null!==r.responseType;function J(t){let e=t.xdomain;try{if("u">typeof XMLHttpRequest&&(!e||V))return new XMLHttpRequest}catch(t){}if(!e)try{return new L[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let $="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class X extends D{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,s=$?{}:x(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;b(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}r&&S(()=>{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]=j()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let Q=L.WebSocket||L.MozWebSocket,G={websocket:class extends X{createSocket(t,e,s){return $?new Q(t,e,s):e?new Q(t,e):new Q(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>C(n))break;let t=N(n,1);h=(128&t[0])==128,o=(a=127&t[0])<126?3:126===a?1:2}else if(1===o){if(2>C(n))break;let t=N(n,2);a=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),o=3}else if(2===o){if(8>C(n))break;let t=N(n,8),s=new DataView(t.buffer,t.byteOffset,t.length),r=s.getUint32(0);if(r>2097151){e.enqueue(y);break}a=0x100000000*r+s.getUint32(4),o=3}else{if(C(n)<a)break;let t=N(n,a);e.enqueue(T(h?t:s.decode(t),i)),o=0}if(0===a||a>r){e.enqueue(y);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)},g&&t.data instanceof Blob?t.data.arrayBuffer().then(w).then(r):m&&(t.data instanceof ArrayBuffer||_(t.data))?r(w(t.data)):b(t,!1,t=>{e||(e=new TextEncoder),r(e.encode(t))})}});u.readable.pipeTo(t.writable),this._writer=u.writable.getWriter();let p=()=>{l.read().then(({done:t,value:e})=>{t||(this.onPacket(e),p())}).catch(t=>{})};p();let d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).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&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null==(t=this._transport)||t.close()}},polling:class extends K{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=z&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new W(J,this.uri(),t)}}},Z=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function te(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=Z.exec(t||""),c={},l=14;for(;l--;)c[tt[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 ts="function"==typeof addEventListener&&"function"==typeof removeEventListener,tr=[];ts&&addEventListener("offline",()=>{tr.forEach(t=>t())},!1);class ti extends B{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=te(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=te(e.host).host);I(this,e),this.secure=null!=e.secure?e.secure:"u">typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("u">typeof location?location.hostname:"localhost"),this.port=e.port||("u">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)),ts&&(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"})},tr.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&&ti.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",ti.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,S(()=>{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(ti.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(),ts&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=tr.indexOf(this._offlineEventListener);-1!==t&&tr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=4;class tn extends ti{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;ti.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;ti.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 to extends tn{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=>G[t]).filter(t=>!!t)),super(t,s)}}to.protocol;let ta="function"==typeof ArrayBuffer,th=Object.prototype.toString,tc="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===th.call(Blob),tl="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===th.call(File);function tu(t){return ta&&(t instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer))||tc&&t instanceof Blob||tl&&t instanceof File}let tp=["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 td extends B{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}: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 tf(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(tu(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");let n=Number(i);if(!ty(n)||n<0)throw Error("Illegal attachments");if(n>this.opts.maxAttachments)throw Error("too many attachments");s.attachments=n}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(td.isPayloadValid(s.type,r))s.data=r;else throw Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case n.CONNECT:return tg(e);case n.DISCONNECT:return void 0===e;case n.CONNECT_ERROR:return"string"==typeof e||tg(e);case n.EVENT:case n.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tp.indexOf(e[0]));case n.ACK:case n.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tf{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=[]}}let ty=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function tg(t){return"[object Object]"===Object.prototype.toString.call(t)}function tm(t,e,s){return t.on(e,s),function(){t.off(e,s)}}t.s(["Decoder",0,td,"Encoder",0,class{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(tu(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(tu(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}},"PacketType",0,n,"isPacketValid",0,function(t){var e;return"string"==typeof t.nsp&&(void 0===(e=t.id)||ty(e))&&function(t,e){switch(t){case n.CONNECT:return void 0===e||tg(e);case n.DISCONNECT:return void 0===e;case n.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tp.indexOf(e[0]));case n.ACK:return Array.isArray(e);case n.CONNECT_ERROR:return"string"==typeof e||tg(e);default:return!1}}(t.type,t.data)},"protocol",0,5],53192);let t_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tb extends B{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=[tm(t,"open",this.onopen.bind(this)),tm(t,"packet",this.onpacket.bind(this)),tm(t,"error",this.onerror.bind(this)),tm(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(t_.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)=>(this._queue[0],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._drainQueue(!0),this.emitReserved("connect")}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 tv=t.i(53192);function tw(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}tw.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)},tw.prototype.reset=function(){this.attempts=0},tw.prototype.setMin=function(t){this.ms=t},tw.prototype.setMax=function(t){this.max=t},tw.prototype.setJitter=function(t){this.jitter=t};class tE extends B{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,I(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 tw({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||tv;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 to(this.uri,this.opts);let e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let r=tm(e,"open",function(){s.onopen(),t&&t()}),i=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},n=tm(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(tm(t,"ping",this.onping.bind(this)),tm(t,"data",this.ondata.bind(this)),tm(t,"error",this.onerror.bind(this)),tm(t,"close",this.onclose.bind(this)),tm(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){S(()=>{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 tb(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 tk={};function tA(t,e){let s;"object"==typeof t&&(e=t,t=void 0);let r=function(t,e="",s){let r=t;s=s||"u">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=te(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=tk[n]&&o in tk[n].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?s=new tE(i,e):(tk[n]||(tk[n]=new tE(i,e)),s=tk[n]),r.query&&!e.query&&(e.query=r.queryKey),s.socket(r.path,e)}Object.assign(tA,{Manager:tE,Socket:tb,io:tA,connect:tA});let tT=t=>{let e=(0,a.useRef)(null);(0,a.useEffect)(()=>{e.current||(e.current=tA());let s=e.current;return s.on("reload",e=>{console.debug("Reloading..."),t(e)}),()=>{s.off()}},[t])};t.s(["useHotreload",0,tT],54734);let tR=(0,a.createContext)(void 0);t.s(["EmailsProvider",0,t=>{let[e,s]=(0,a.useState)(t.initialEmailsDirectoryMetadata);return u||p||tT(async()=>{let t=await c();if(t)s(t);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,o.jsx)(tR.Provider,{value:{emailsDirectoryMetadata:e},children:t.children})},"useEmails",0,()=>{let t=(0,a.useContext)(tR);if(void 0===t)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return t}],60203)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12654,(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(71355),o=t.r(73534),a=t.r(15291)},60203,74805,54734,t=>{"use strict";let e,s,r;var i,n,o=t.i(70403),a=t.i(80161),h=t.i(12654);let c=(0,h.createServerReference)("00fae0c8ea641ac0efa23431eb04e921901fbb9310",h.callServer,void 0,h.findSourceMapURL,"getEmailsDirectoryMetadataAction");var l=t.i(27155);l.default.env.REACT_EMAIL_INTERNAL_USER_PROJECT_LOCATION,l.default.env.REACT_EMAIL_INTERNAL_PREVIEW_SERVER_LOCATION,l.default.env.REACT_EMAIL_INTERNAL_EMAILS_DIR_ABSOLUTE_PATH,l.default.env.REACT_EMAIL_INTERNAL_RESEND_API_KEY;let u="true"===l.default.env.NEXT_PUBLIC_IS_BUILDING,p="true"===l.default.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT;t.s(["isBuilding",0,u,"isPreviewDevelopment",0,p],74805);let d=Object.create(null);d.open="0",d.close="1",d.ping="2",d.pong="3",d.message="4",d.upgrade="5",d.noop="6";let f=Object.create(null);Object.keys(d).forEach(t=>{f[d[t]]=t});let y={type:"error",data:"parser error"},g="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),m="function"==typeof ArrayBuffer,_=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,b=({type:t,data:e},s,r)=>{if(g&&e instanceof Blob)if(s)return r(e);else return v(e,r);if(m&&(e instanceof ArrayBuffer||_(e)))if(s)return r(e);else return v(new Blob([e]),r);return r(d[t]+(e||""))},v=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function w(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<E.length;t++)k[E.charCodeAt(t)]=t;let A="function"==typeof ArrayBuffer,T=(t,e)=>{if("string"!=typeof t)return{type:"message",data:O(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:R(t.substring(1),e)}:f[s]?t.length>1?{type:f[s],data:t.substring(1)}:{type:f[s]}:y},R=(t,e)=>A?O((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=k[t.charCodeAt(r)],o=k[t.charCodeAt(r+1)],a=k[t.charCodeAt(r+2)],h=k[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},O=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;function C(t){return t.reduce((t,e)=>t+e.length,0)}function N(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 B(t){if(t){var e=t;for(var s in B.prototype)e[s]=B.prototype[s];return e}}B.prototype.on=B.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},B.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},B.prototype.off=B.prototype.removeListener=B.prototype.removeAllListeners=B.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},B.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},B.prototype.emitReserved=B.prototype.emit,B.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},B.prototype.hasListeners=function(t){return!!this.listeners(t).length};let S="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),L="u">typeof self?self:"u">typeof window?window:Function("return this")();function x(t,...e){return e.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}let P=L.setTimeout,q=L.clearTimeout;function I(t,e){e.useNativeTimers?(t.setTimeoutFn=P.bind(L),t.clearTimeoutFn=q.bind(L)):(t.setTimeoutFn=L.setTimeout.bind(L),t.clearTimeoutFn=L.clearTimeout.bind(L))}function j(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class U extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class D extends B{constructor(t){super(),this.writable=!1,I(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 U(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=T(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&&443!==Number(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 M 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=T(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)=>{b(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]=j()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let F=!1;try{F="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let V=F;function H(){}class K extends M{constructor(t){if(super(t),"u">typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="u">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 W extends B{constructor(t,e,s){super(),this.createRequest=t,I(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=x(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}"u">typeof document&&(this._index=W.requestsCount++,W.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=H,t)try{this._xhr.abort()}catch(t){}"u">typeof document&&delete W.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 Y(){for(let t in W.requests)W.requests.hasOwnProperty(t)&&W.requests[t].abort()}W.requestsCount=0,W.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",Y):"function"==typeof addEventListener&&addEventListener("onpagehide"in L?"pagehide":"unload",Y,!1));let z=(r=J({xdomain:!1}))&&null!==r.responseType;function J(t){let e=t.xdomain;try{if("u">typeof XMLHttpRequest&&(!e||V))return new XMLHttpRequest}catch(t){}if(!e)try{return new L[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let $="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class X extends D{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,s=$?{}:x(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;b(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}r&&S(()=>{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]=j()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let Q=L.WebSocket||L.MozWebSocket,G={websocket:class extends X{createSocket(t,e,s){return $?new Q(t,e,s):e?new Q(t,e):new Q(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>C(n))break;let t=N(n,1);h=(128&t[0])==128,o=(a=127&t[0])<126?3:126===a?1:2}else if(1===o){if(2>C(n))break;let t=N(n,2);a=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),o=3}else if(2===o){if(8>C(n))break;let t=N(n,8),s=new DataView(t.buffer,t.byteOffset,t.length),r=s.getUint32(0);if(r>2097151){e.enqueue(y);break}a=0x100000000*r+s.getUint32(4),o=3}else{if(C(n)<a)break;let t=N(n,a);e.enqueue(T(h?t:s.decode(t),i)),o=0}if(0===a||a>r){e.enqueue(y);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)},g&&t.data instanceof Blob?t.data.arrayBuffer().then(w).then(r):m&&(t.data instanceof ArrayBuffer||_(t.data))?r(w(t.data)):b(t,!1,t=>{e||(e=new TextEncoder),r(e.encode(t))})}});u.readable.pipeTo(t.writable),this._writer=u.writable.getWriter();let p=()=>{l.read().then(({done:t,value:e})=>{t||(this.onPacket(e),p())}).catch(t=>{})};p();let d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).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&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null==(t=this._transport)||t.close()}},polling:class extends K{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=z&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new W(J,this.uri(),t)}}},Z=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function te(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=Z.exec(t||""),c={},l=14;for(;l--;)c[tt[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 ts="function"==typeof addEventListener&&"function"==typeof removeEventListener,tr=[];ts&&addEventListener("offline",()=>{tr.forEach(t=>t())},!1);class ti extends B{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=te(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=te(e.host).host);I(this,e),this.secure=null!=e.secure?e.secure:"u">typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("u">typeof location?location.hostname:"localhost"),this.port=e.port||("u">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)),ts&&(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"})},tr.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&&ti.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",ti.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,S(()=>{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(ti.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(),ts&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=tr.indexOf(this._offlineEventListener);-1!==t&&tr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}ti.protocol=4;class tn extends ti{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;ti.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;ti.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 to extends tn{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=>G[t]).filter(t=>!!t)),super(t,s)}}to.protocol;let ta="function"==typeof ArrayBuffer,th=Object.prototype.toString,tc="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===th.call(Blob),tl="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===th.call(File);function tu(t){return ta&&(t instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer))||tc&&t instanceof Blob||tl&&t instanceof File}let tp=["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 td extends B{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}: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 tf(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(tu(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");let n=Number(i);if(!ty(n)||n<0)throw Error("Illegal attachments");if(n>this.opts.maxAttachments)throw Error("too many attachments");s.attachments=n}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(td.isPayloadValid(s.type,r))s.data=r;else throw Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case n.CONNECT:return tg(e);case n.DISCONNECT:return void 0===e;case n.CONNECT_ERROR:return"string"==typeof e||tg(e);case n.EVENT:case n.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tp.indexOf(e[0]));case n.ACK:case n.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tf{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=[]}}let ty=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function tg(t){return"[object Object]"===Object.prototype.toString.call(t)}function tm(t,e,s){return t.on(e,s),function(){t.off(e,s)}}t.s(["Decoder",0,td,"Encoder",0,class{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(tu(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(tu(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}},"PacketType",0,n,"isPacketValid",0,function(t){var e;return"string"==typeof t.nsp&&(void 0===(e=t.id)||ty(e))&&function(t,e){switch(t){case n.CONNECT:return void 0===e||tg(e);case n.DISCONNECT:return void 0===e;case n.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tp.indexOf(e[0]));case n.ACK:return Array.isArray(e);case n.CONNECT_ERROR:return"string"==typeof e||tg(e);default:return!1}}(t.type,t.data)},"protocol",0,5],53192);let t_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tb extends B{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=[tm(t,"open",this.onopen.bind(this)),tm(t,"packet",this.onpacket.bind(this)),tm(t,"error",this.onerror.bind(this)),tm(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(t_.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)=>(this._queue[0],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._drainQueue(!0),this.emitReserved("connect")}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 tv=t.i(53192);function tw(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}tw.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)},tw.prototype.reset=function(){this.attempts=0},tw.prototype.setMin=function(t){this.ms=t},tw.prototype.setMax=function(t){this.max=t},tw.prototype.setJitter=function(t){this.jitter=t};class tE extends B{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,I(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 tw({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||tv;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 to(this.uri,this.opts);let e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let r=tm(e,"open",function(){s.onopen(),t&&t()}),i=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},n=tm(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(tm(t,"ping",this.onping.bind(this)),tm(t,"data",this.ondata.bind(this)),tm(t,"error",this.onerror.bind(this)),tm(t,"close",this.onclose.bind(this)),tm(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){S(()=>{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 tb(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 tk={};function tA(t,e){let s;"object"==typeof t&&(e=t,t=void 0);let r=function(t,e="",s){let r=t;s=s||"u">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=te(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=tk[n]&&o in tk[n].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||a?s=new tE(i,e):(tk[n]||(tk[n]=new tE(i,e)),s=tk[n]),r.query&&!e.query&&(e.query=r.queryKey),s.socket(r.path,e)}Object.assign(tA,{Manager:tE,Socket:tb,io:tA,connect:tA});let tT=t=>{let e=(0,a.useRef)(t);e.current=t,(0,a.useEffect)(()=>{let t=tA(),s=t=>{console.debug("Reloading..."),e.current(t)};return t.on("reload",s),()=>{t.off("reload",s),t.disconnect()}},[])};t.s(["useHotreload",0,tT],54734);let tR=(0,a.createContext)(void 0);t.s(["EmailsProvider",0,t=>{let[e,s]=(0,a.useState)(t.initialEmailsDirectoryMetadata);return u||p||tT(async()=>{let t=await c();if(t)s(t);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,o.jsx)(tR.Provider,{value:{emailsDirectoryMetadata:e},children:t.children})},"useEmails",0,()=>{let t=(0,a.useContext)(tR);if(void 0===t)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return t}],60203)}]);