PageSourceSearch

https://trystan.net/assets/EmailPreview-eScn0Igq.js

js trystan.net collected 2026-09-26 06:20:15 UTC 10,879 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`3fb85819`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`9f919277-c0f2-4a80-9c0a-ce64c9791f31`,e._sentryDebugIdIdentifier=`sentry-dbid-9f919277-c0f2-4a80-9c0a-ce64c9791f31`)}catch{}})();import{s as e,t}from"./react-BxJ5vIog.js";import{t as n}from"./src-jTF5SSYo.js";import{$t as r,Zt as i,nn as a,r as o,tn as s}from"./persist-state-keys-DIv83xll.js";import{t as c}from"./jsx-runtime-_Lj106d5.js";import{t as l}from"./compiler-runtime-BQBjb8-F.js";import{E as u,S as d,i as f,r as p,w as m}from"./useFetch-BoJLT2pS.js";import{t as h}from"./useQuery-CmicRdJh.js";import{n as g,t as _}from"./useMe-D7pJMmC1.js";import{t as v}from"./bundle-mjs-fSrAgIZu.js";import{t as y}from"./Loader-ChuWdBFC.js";import{n as b}from"./useStorageValue-4M1J1udM.js";import{n as x,r as S,t as C}from"./Text-CJnpdYHU.js";import{t as w}from"./cjs-Cq0NLgp1.js";import{t as T}from"./frame-Ays3D2QJ.js";import{t as E}from"./emojis-BvO8dQHG.js";var D=e(t(),1),O={onError:()=>{},reloadThreshold:1,timeWindow:6e4};function k(e){let t=e instanceof ErrorEvent?e.filename:void 0,n=e instanceof Error?e.stack:void 0,r=(e instanceof Error||e instanceof ErrorEvent?e.message:``)||``;return t?.includes(`cello.js`)||n?.includes(`cello.js`)||r.includes(`cello.js`)||r.includes(`cello.so`)}function A(e){return e.includes(`Failed to fetch dynamically imported module`)||e.includes(`error loading dynamically imported module`)||e.includes(`Importing a module script failed`)}function j(e,t){return t===`ChunkLoadError`||e.includes(`Loading chunk`)||e.includes(`Loading CSS chunk`)||A(e)||e.includes(`Failed to import`)||e.includes(`Script error`)||e.includes(`Network Error`)||e.includes(`TypeError: Failed to fetch`)||e.includes(`Unexpected token`)||e.includes(`SyntaxError: Unexpected token`)||e.includes(`Failed to load CSS`)||e.includes(`Module not found`)||e.includes(`Cannot resolve module`)||e.includes(`Server function info not found`)}function M(e){let t=e instanceof Error?e.name:``,n=e instanceof Error?e.message:typeof e==`string`?e:``,r=e instanceof Error?e.stack:void 0;return t!==`SyntaxError`&&!n.includes(`SyntaxError`)||!n.includes(`missing ) after argument list`)?!1:!r||!/\n\s*at\s/.test(r)}function N(e){let t=(e instanceof Error||e instanceof ErrorEvent?e.message:``)||``;return A(t)&&t.includes(`code.bloom.io/dist/`)}function P(e){let t=e instanceof Error?e.message:e.message||``,n=e instanceof Error?e.name:``;return(t===`Script error`||t===`Script error.`)&&e instanceof ErrorEvent&&!e.filename?!1:j(t,n)}var F=class e{options;isInitialized=!1;constructor(e={}){this.options={...O,...e}}isDeploymentRejection(e){let t=``,n=``;try{if(e instanceof Error)t=e.message,n=e.name;else if(e&&typeof e==`object`){let r=e;t=typeof r.message==`string`?r.message:``,n=typeof r.name==`string`?r.name:``}else typeof e==`string`?t=e:(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)&&(t=String(e))}catch{t=``}return j(t,n)}shouldReload(){let e=`bloom_global_error_attempts`,t=`bloom_global_error_time`;try{let n=Number(sessionStorage.getItem(e)||`0`),r=Number(sessionStorage.getItem(t)||`0`),i=Date.now();return i-r>this.options.timeWindow?(sessionStorage.setItem(e,`0`),sessionStorage.setItem(t,String(i)),!0):n<this.options.reloadThreshold&&(sessionStorage.setItem(e,String(n+1)),sessionStorage.setItem(t,String(i)),!0)}catch{return!1}}performReload(){console.log(`🔄 Global error handler: Reloading due to deployment error`);let e=new URL(window.location.href);e.searchParams.set(`reload_error`,String(Date.now())),window.location.href=e.toString()}handleError=e=>{if(!((e instanceof Error?e.name:``)===`AbortError`&&k(e))&&(console.log(`🚨 Global error caught:`,e),this.options.onError(e),P(e))){if(this.shouldReload()){setTimeout(()=>this.performReload(),20);return}console.warn(`🛑 Max reload attempts reached for deployment errors`)}};handleUnhandledRejection=e=>{let{reason:t}=e;k(t)||(console.log(`🚨 Unhandled promise rejection:`,e.reason),this.isDeploymentRejection(e.reason)&&(console.log(`🔄 Deployment-related promise rejection detected, reloading...`),this.shouldReload()&&(setTimeout(()=>this.performReload(),20),e.preventDefault())))};initialize(){this.isInitialized||typeof window>`u`||(window.addEventListener(`error`,this.handleError),window.addEventListener(`unhandledrejection`,this.handleUnhandledRejection),this.isInitialized=!0,console.log(`✅ Global error handler initialized`))}destroy(){this.isInitialized&&typeof window<`u`&&(window.removeEventListener(`error`,this.handleError),window.removeEventListener(`unhandledrejection`,this.handleUnhandledRejection),this.isInitialized=!1)}handleErrorManually(e){this.handleError(e)}static create(t){return new e(t)}},I=F.create(),L=l(),R=c(),z=(e,t,n)=>e?!n||P(n)?!1:Number(t||`0`)>0:!0,B=e=>{let t=(0,L.c)(17),{autoReload:n,children:r,className:i,error:a,title:o}=e,s=n===void 0||n,c=o===void 0?`Something went wrong`:o,l=b(`has-new-version`)===`true`,u=b(`bloom_sww_refresh_count`,`sessionStorage`),d;t[0]!==s||t[1]!==a||t[2]!==u?(d=z(s,u,a),t[0]=s,t[1]=a,t[2]=u,t[3]=d):d=t[3];let f=d,[p,m]=(0,D.useState)(f);f&&!p&&m(!0);let h=(0,D.useRef)(null),g,_;if(t[4]!==s||t[5]!==a?(g=()=>{let e;if(h.current||=F.create({onError:V,reloadThreshold:1,timeWindow:6e4}),s&&a){if(P(a)){console.log(`🔄 ErrorPage: Delegating to globalErrorHandler for deployment error`),h.current.handleErrorManually(a);return}let t=Number(sessionStorage.getItem(`bloom_sww_refresh_count`)||`0`),n=Number(sessionStorage.getItem(`bloom_sww_last_refresh`)||`0`),r=Date.now();if(r-n>6e4&&sessionStorage.setItem(`bloom_sww_refresh_count`,`0`),t>0){let e=new URL(window.location.href);e.searchParams.set(`bloom_sww`,`true`),window.history.pushState({},``,e)}else sessionStorage.setItem(`bloom_sww_refresh_count`,String(t+1)),sessionStorage.setItem(`bloom_sww_last_refresh`,String(r)),e=setTimeout(H,50)}return()=>clearTimeout(e)},_=[s,a],t[4]=s,t[5]=a,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,D.useEffect)(g,_),p&&!l){let e;t[8]===i?e=t[9]:(e=v(`w-full p-20 text-center`,i),t[8]=i,t[9]=e);let n;t[10]===c?n=t[11]:(n=(0,R.jsx)(C,{size:x[`3XL`],variant:S.MEDIUM,children:c}),t[10]=c,t[11]=n);let a;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,R.jsx)(`div`,{children:`Thanks for noticing — we're going to fix it up and have things back to normal soon. Please contact support if the problem persists.`}),t[12]=a):a=t[12];let o;return t[13]!==r||t[14]!==e||t[15]!==n?(o=(0,R.jsxs)(`div`,{className:e,children:[n,a,r]}),t[13]=r,t[14]=e,t[15]=n,t[16]=o):o=t[16],o}return null};function V(e){console.log(`🚨 ErrorPage handling error via globalErrorHandler:`,e)}
1function H(){let e=new URL(window.location.href);e.searchParams.set(`reload`,String(Date.now())),window.location.href=e.toString()}var U=e(w(),1),W=e=>{let t=(0,L.c)(8),{renderedTemplate:n,withPadding:r}=e,i=r===void 0||r,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={border:`none`,height:`var(--height)`,outline:`none`,width:`100%`},t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o={__html:n},t[1]=n,t[2]=o);let s;t[3]===i?s=t[4]:(s={borderSpacing:0,...i?{backgroundColor:`#FFFFFF`,padding:`60px 7% 50px`}:{},color:`#272A2B`,margin:`0 auto`,maxWidth:600,width:`100%`},t[3]=i,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,R.jsx)(T,{srcDoc:`<!DOCTYPE html><html style="font-size:14px;height:100%;overflow:hidden;"><head><base target="_blank" /><style>[data-testid="message-email"] { background-color: transparent !important; }footer {font-size: 12px !important;}</style></head><body style="margin:0;padding:0;word-spacing:normal;position:relative;word-break: break-word;"><div style="position:relative"></div></body></html>`,style:a,children:(0,R.jsx)(`div`,{dangerouslySetInnerHTML:o,style:s})}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c};function G(){let e=(0,L.c)(2),{get:t}=f(),n;return e[0]===t?n=e[1]:(n=async e=>{let n=await t(`/api/event-messages/${e}`);return n.status===d.SUCCESS?n.data.eventMessage:null},e[0]=t,e[1]=n),n}function K(){let e=(0,L.c)(2),{get:t}=f(),n;return e[0]===t?n=e[1]:(n=async e=>{let n=await t(`/api/inbound-messages/${e}`);return n.status===d.SUCCESS?n.data.inboundMessage:null},e[0]=t,e[1]=n),n}function q(e,t){let n=(0,L.c)(10),r=G(),i=!!e,a;n[0]!==e||n[1]!==r?(a=()=>e?r(e):null,n[0]=e,n[1]=r,n[2]=a):a=n[2];let o;n[3]===e?o=n[4]:(o=[m.EVENT_MESSAGE,e],n[3]=e,n[4]=o);let s;return n[5]!==t||n[6]!==i||n[7]!==a||n[8]!==o?(s={enabled:i,queryFn:a,queryKey:o,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o,n[9]=s):s=n[9],h(s)}function J(e){let t=(0,L.c)(9),n=K(),r=!!e,i;t[0]!==n||t[1]!==e?(i=()=>n(e),t[0]=n,t[1]=e,t[2]=i):i=t[2];let a;t[3]===e?a=t[4]:(a=[m.INBOUND_MESSAGE,e],t[3]=e,t[4]=a);let o;return t[5]!==r||t[6]!==i||t[7]!==a?(o={enabled:r,queryFn:i,queryKey:a},t[5]=r,t[6]=i,t[7]=a,t[8]=o):o=t[8],h(o)}function Y(e){let t=(0,L.c)(10),{me:c}=_(),{showErrorMessageFromResponse:l,showWarningMessage:f}=o(),h=u(),v;t[0]!==c?.defaultAccountId||t[1]!==f?(v=async function(e){if(a(c?.defaultAccountId))return f(r,s),Response.json({message:i},{status:503});let t=(0,U.default)(p(!0),{headers:{"x-account":c?.defaultAccountId||``},method:`POST`});return await fetch(`${n.NEXT_PUBLIC_BLOOM_API}/api/messages/${e}/resend`,t)},t[0]=c?.defaultAccountId,t[1]=f,t[2]=v):v=t[2];let y=v,b;t[3]!==e||t[4]!==h||t[5]!==l?(b=async t=>{if(t.ok&&await Promise.all([h.invalidateQueries({queryKey:[m.EVENT_MESSAGE,e]}),h.invalidateQueries({queryKey:[m.LEAD_ACTIVITIES_LIST]}),h.invalidateQueries({queryKey:[m.PROJECT_ACTIVITIES_LIST]})]),!t.ok){let e=await t.json();l({error:e,status:d.ERROR})}},t[3]=e,t[4]=h,t[5]=l,t[6]=b):b=t[6];let x;return t[7]!==y||t[8]!==b?(x={mutationFn:y,onSuccess:b},t[7]=y,t[8]=b,t[9]=x):x=t[9],g(x)}var X=e=>{let t=(0,L.c)(14),{className:n,emailData:r,isFetching:i}=e,a;t[0]===r?a=t[1]:(a=(r||{}).eventDetails||{},t[0]=r,t[1]=a);let{renderedBody:o}=a,s;t[2]===o?s=t[3]:(s=o===void 0?``:o,(s.match(/:emoji-\w+:/gim)||[]).forEach(e=>{let t=/:emoji-(?<unicode>\w+):/.exec(e),n=t?.[0]??``,r=t?.groups?.unicode,{char:i}=Object.values(E).find(e=>e.unicode===r)||{char:``};i&&(s=s.split(n).join(i))}),t[2]=o,t[3]=s);let c;t[4]===n?c=t[5]:(c=v(`relative mx-auto w-full overflow-hidden rounded-sm`,n),t[4]=n,t[5]=c);let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l={maxWidth:600},t[6]=l):l=t[6];let u;t[7]!==r||t[8]!==i||t[9]!==s?(u=i?(0,R.jsx)(`div`,{className:`p-12`,children:(0,R.jsx)(y,{})}):r===null?(0,R.jsx)(B,{autoReload:!1}):(0,R.jsx)(W,{renderedTemplate:s,withPadding:!1}),t[7]=r,t[8]=i,t[9]=s,t[10]=u):u=t[10];let d;return t[11]!==c||t[12]!==u?(d=(0,R.jsx)(`div`,{className:c,style:l,children:u}),t[11]=c,t[12]=u,t[13]=d):d=t[13],d};export{W as a,k as c,Y as i,N as l,J as n,B as o,q as r,I as s,X as t,M as u};
2//# sourceMappingURL=EmailPreview-eScn0Igq.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.