1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e7bbab80-bfea-5798-a38a-ffae940a13e3")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3988],{8648:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>D});var l=n(6029),i=n(13717),a=n(73914),o=n(39792),r=n(92739),s=n(13342);let c=e=>{let{handleLogin:t,integrationIcon:n,platformName:i,loading:a=!1}=e;return(0,l.jsx)(s.A,{handleAction:t,integrationIcon:n,loading:a,title:"Login to Your ".concat(i," Account"),description:"To use Navattic demos and share links in your emails, please login to your ".concat(i," account"),loadingTitle:"Logging in to ".concat(i),loadingDescription:"Waiting for your ".concat(i," account to be authenticated"),buttonText:"Login"})};var u=n(87042),d=n(12094),m=n(98494),p=n(531),f=n(47527),g=n(49376),h=n(11050);let x={auth:{clientId:p.A.AZURE_CLIENT_ID,authority:"https://login.microsoftonline.com/common/",redirectUri:p.A.AZURE_REDIRECT_URI,navigateToLoginRequestUrl:!1},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(e,t,n)=>{if(!n)switch(e){case g.$.Error:f.Rm.error({message:"MSAL error",detail:t});return;case g.$.Info:console.info(t);return;case g.$.Verbose:console.debug(t);return;case g.$.Warning:console.warn(t);return;default:return}}}}},v={scopes:["openid","profile","email","offline_access"]},y=null,k=async()=>(y||(y=await (0,h.q8)(x)),y);var j=n(34584),w=n(58663),C=n(18863),b=n(14810),S=n(25139),N=n(55729),I=n(3947),A=n(53525),L=n(69222),T=n(80842),E=n(97985),R=n(50197);let O=e=>{let{onLogout:t}=e,{recipients:n,waitingForRecipients:o,sendHtmlContent:r}=(0,u.dG)();return o?null:(0,l.jsx)(E.d,{allowEmailInvites:!1,defaultEmailClient:I.N2g.None,source:"outlook",children:(0,l.jsx)(a.A,{insertShareLink:e=>{let{html:t}=e;try{i.A.track("share_link_inserted",{integration:m.r.Outlook}),r(t)}catch(e){f.Rm.error({message:"Error sending HTML content to parent",error:e})}},recipients:n,onLogout:t})})},P=()=>{let[e,t]=(0,N.useState)(null),[n,i]=(0,N.useState)(!1),[a,s]=(0,N.useState)(!1),{isAuthenticated:u,isLoading:p,login:g,logout:h,getMicrosoftToken:x,exchangeForNavatticToken:y}=(()=>{let{instance:e,accounts:t}=(0,b.dk)(),n=(0,b.F7)(t[0]||null),l=(0,b.XI)(),[i,a]=(0,N.useState)(!1),o=(0,N.useCallback)(async()=>{try{a(!0),await e.loginPopup(v)}catch(e){f.Rm.error({message:"Office login failed",error:e})}finally{a(!1)}},[e]),r=(0,N.useCallback)(async()=>{try{a(!0),n&&await e.logoutPopup({account:n})}catch(e){f.Rm.error({message:"Office logout failed",error:e})}finally{a(!1)}},[e,n]),s=(0,N.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n)return f.Rm.error({message:"Failed to get Microsoft token: No account available"}),null;let l={...v,account:n,forceRefresh:t};try{f.Rm.info({message:"Attempting to retrieve ID token silently"});let t=await e.acquireTokenSilent(l);if(!t.idToken)return f.Rm.error({message:"Failed to get Microsoft token: No ID token in response"}),null;return f.Rm.info({message:"Successfully retrieved ID token silently"}),t.idToken}catch(t){if(t instanceof w.CB||t instanceof C.jT)try{f.Rm.info({message:"Attempting to retrieve ID token through popup"});let t=await e.acquireTokenPopup(l);if(!t.idToken)return f.Rm.error({message:"Failed to get Microsoft token: No ID token in popup response"}),null;return f.Rm.info({message:"Successfully retrieved ID token through popup"}),t.idToken}catch(e){return f.Rm.error({message:"Failed to get Microsoft token",error:e}),null}return f.Rm.error({message:"Failed to get Microsoft token",error:t}),null}},[e,n]),c=(0,N.useCallback)(async()=>{let e=e=>fetch((0,j.clU)(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({microsoftToken:e})});try{a(!0);let n=await s();if(!n)return{token:null,requiresLinking:!1};let l=await e(n);if(l.status===S.v.UNAUTHORIZED){if(!(n=await s(!0)))return{token:null,requiresLinking:!1};l=await e(n)}let i=await l.json();if(!l.ok){var t;let e=null!=(t=i.requiresLinking)&&t,n=i.error||"Token exchange failed";return f.Rm.warn({message:"Failed to exchange token",error:n,requiresLinking:e,status:l.status}),{token:null,requiresLinking:e}}return{token:i.token,requiresLinking:!1}}catch(e){return f.Rm.error({message:"Failed to exchange token",error:e}),{token:null,requiresLinking:!1}}finally{a(!1)}},[s]);return{isAuthenticated:l&&!!n,isLoading:i,login:o,logout:r,getMicrosoftToken:s,exchangeForNavatticToken:c}})(),k=async()=>{await g()},I=async()=>{await h(),t(null),i(!1)},E=(0,N.useCallback)(async()=>{let{token:e,requiresLinking:n}=await y();t(e),i(n)},[y]),P=(0,N.useCallback)(async()=>{s(!0);let e=await x();if(!e)return void s(!1);let n=async e=>{e&&t(e),s(!1)},l="".concat((0,j.dmn)(),"?token=").concat(encodeURIComponent(e));(0,d.W)(l,null,n,()=>{s(!1)})},[x]),D=(0,N.useMemo)(()=>(0,T.t)(e||""),[e]);return((0,N.useEffect)(()=>{!u||e||a||E()},[u,e,a,E]),u)?e?(0,l.jsx)(R.Kq,{value:D,children:(0,l.jsx)(o.E,{token:e,type:m.r.Outlook,onLogout:I,children:(0,l.jsx)(O,{onLogout:I})})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"absolute top-0 right-0",children:(0,l.jsx)(A.W1,{items:[{label:"Log out",type:"button",iconLeft:"log-out",onClick:I}],align:"end",children:(0,l.jsx)(L.K,{icon:"ellipsis",variant:"ghost",size:"sm","aria-label":"More options"})})}),(0,l.jsx)(r.A,{handleLinkAccount:n?P:E,integrationIcon:"logo-outlook",linking:p||a})]}):(0,l.jsx)(c,{handleLogin:k,integrationIcon:"logo-outlook",platformName:"Outlook",loading:p})},D=function(){let[e,t]=(0,N.useState)(!1),[n,i]=(0,N.useState)(null);return((0,N.useEffect)(()=>{k().then(e=>i(e)).catch(e=>console.error("Failed to get MSAL Instance",e))},[]),(0,N.useEffect)(()=>{let e=window.history.pushState,n=window.history.replaceState,l=document.createElement("script");return l.src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js",l.onload=function(){window.history.pushState=e,window.history.replaceState=n,Office.onReady(()=>{t(!0)})},document.head.appendChild(l),()=>l.remove()},[]),e&&n)?(0,l.jsx)(b.r7,{instance:n,children:(0,l.jsx)("div",{className:"p-1",children:(0,l.jsx)(P,{})})}):null}},12094:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,Y:()=>l});let l="NAVATTIC_AUTH_SUCCESS";function i(e,t,n,i){let a=window.open(t?"".concat(e,"?token=").concat(t):e,"_blank","width=".concat(600,",height=").concat(800,",scrollbars=yes,resizable=yes")),o=e=>{e.origin===window.location.origin&&e.data.type===l&&(null==a||a.close(),n(e.data.newToken))};window.addEventListener("message",o);let r=setInterval(()=>{(null==a?void 0:a.closed)&&(window.removeEventListener("message",o),clearInterval(r),null==i||i())},1e3)}},13342:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var l=n(6029),i=n(95678),a=n(16332),o=n(55613);let r=e=>{let{handleAction:t,integrationIcon:n,loading:r=!1,title:s,loadingTitle:c,description:u,loadingDescription:d,buttonText:m}=e;return(0,l.jsxs)("div",{className:"flex min-h-screen flex-col items-center justify-center space-y-2 bg-white p-4",children:[(0,l.jsxs)("div",{className:"flex flex-row items-center justify-center",children:[(0,l.jsx)("div",{className:"flex h-24 w-24 justify-center rounded-full border-2",children:(0,l.jsx)(i.I,{size:"lg",name:n,className:"h-full w-1/2"})}),(0,l.jsx)(i.I,{size:"lg",name:"arrow-right",className:"h-full"}),(0,l.jsx)("div",{className:"flex h-24 w-24 justify-center rounded-full border-2",children:(0,l.jsx)(i.I,{size:"lg",name:"navattic",className:"h-full w-1/2"})})]}),(0,l.jsx)("h1",{className:"text-default text-2xl font-semibold tracking-tight",children:r?c:s}),(0,l.jsx)("div",{className:"mb-3 w-3/4 text-center text-lg font-medium text-gray-500",children:r?d:u}),(0,l.jsx)("div",{className:"mb-16",children:r?(0,l.jsx)(a.a,{}):(0,l.jsx)(o.$,{onClick:t,children:m})})]})}}
3,16998:(e,t,n)=>{"use strict";n.d(t,{D:()=>r});var l=n(85966),i=n(26626),a=n(78157);function o(){let e=(0,l._)(["\n fragment ProjectShareLinkWithScreenshot on ProjectShareLink {\n ...ProjectShareLinkWithItems\n projectScreenshot\n}\n ",""]);return o=function(){return e},e}let r=(0,i.Ay)(o(),a.b)},27670:(e,t,n)=>{"use strict";n.d(t,{V:()=>p});var l=n(6029),i=n(55314),a=n(65435),o=n(78869),r=n(81079),s=n(91596),c=n(56769),u=n(22391),d=n(46907),m=n(55729);function p(e){let{projectFlows:t,exportOptions:n,setExportOptions:p,pdfFlowIds:g,onPdfFlowIdsChange:h,disableTypeSelection:x,languages:v=[],...y}=e,k=n.type===d.G4.PDF;(0,m.useEffect)(()=>{var e;if(!(null==t?void 0:t.length))return;let l=(null==(e=t.find(e=>e.isStarting))?void 0:e.id)||t[0].id;if(k){if(null==g?void 0:g.length)return;let e=n.flowId||l,i=t.find(t=>t.id===e);null==h||h([e]),p({...n,stepCount:i?f([i]):n.stepCount})}else{if(n.flowId)return;p({...n,flowId:l})}},[n,p,t,k,g,h]);let j=(0,m.useMemo)(()=>k?t.filter(e=>null==g?void 0:g.includes(e.id)):[],[k,g,t]),w=j.reduce((e,t)=>e+t.stepCount,0),C=1===j.length?j[0]:null,b=C?Math.min(C.stepCount,60):0,S=(0,m.useMemo)(()=>{let[e,n]=(0,u.mX)(t||[],e=>e.isStarting);return[...e,...n].map(e=>{let t=e.stepCount;return{label:"".concat(e.name," (").concat(t||"No"," steps)"),value:e.id}})},[t]),N=(0,m.useMemo)(()=>v.map(e=>({label:c.dG[e],value:e,iconLeft:c.Zn[e]})),[v]);return(0,l.jsx)(i.aF,{...y,children:(0,l.jsxs)("div",{className:"flex w-full flex-col gap-5",children:[!x&&(0,l.jsx)(a.z,{value:n.type,onValueChange:e=>p({...n,type:e}),items:d.lC,variant:"card",className:"w-full"}),v.length>1&&(0,l.jsx)(o.l6,{label:"Language",items:N,onValueChange:e=>p({...n,language:e}),value:n.language}),k?(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)(r.K,{label:"Flows",placeholder:"Select flows",items:S,selected:null!=g?g:[],onChange:e=>{let l=f(t.filter(t=>e.includes(t.id)));null==h||h(e),p({...n,stepCount:l||n.stepCount})}}),w>60&&(0,l.jsxs)("p",{className:"pl-0.5 text-xs text-gray-500",children:["Exports with more than ",60," steps will export only the first ",60,"."]})]}),C&&b>0&&(0,l.jsx)(s.Q,{label:"Number of steps",elementRight:"steps",min:1,max:b,value:n.stepCount,onValueChange:e=>p({...n,stepCount:e})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.l6,{label:"Flow",items:S,onValueChange:e=>p({...n,flowId:e}),value:n.flowId}),(0,l.jsx)(s.Q,{label:"Number of steps",elementRight:"steps",min:1,max:d.wv,value:n.stepCount,onValueChange:e=>p({...n,stepCount:e})})]}),n.type!==d.G4.PDF&&(0,l.jsx)(s.Q,{label:"Time per Step",elementRight:"seconds",min:d.R8,max:d.ZF,value:n.timePerStep,onValueChange:e=>p({...n,timePerStep:e})})]})})}function f(e){return Math.min(Math.max(0,...e.map(e=>e.stepCount)),60)}},39792:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var l=n(6029),i=n(13717),a=n(10403),o=n(22743),r=n(53525),s=n(69222),c=n(81983),u=n(24363),d=n(78476),m=n(98089),p=n(84379),f=n(55729);function g(e){var t;let{children:n,token:g,type:h,onLogout:x}=e;(0,f.useEffect)(()=>{i.A.init()},[]);let[{membershipId:v,activeMembership:y},k]=(0,p.Ag)({getStorageActiveMembershipId:a.I.getActiveMembershipId,setStorageActiveMembershipId:a.I.setActiveMembershipId}),j=(0,f.useMemo)(()=>({membershipId:v}),[v]),[{data:w},C]=(0,d.Z)({variables:j,context:j,pause:!v}),b=null==w?void 0:w.workspaceLayoutConfig,[{data:S}]=(0,u.g)(),N=null==S?void 0:S.currentUser,I=[{label:(null==N?void 0:N.email)||"Profile",type:"text",group:"",avatarLeft:{src:(null==N?void 0:N.image)||"",size:20,initials:null==N||null==(t=N.firstName)?void 0:t[0]}},{label:"Log out",type:"button",iconLeft:"log-out",onClick:x}];return((0,f.useEffect)(()=>{if(N&&b&&y){var e;let{email:t,firstName:n,lastName:l,createdAt:a,image:o,crossDomainTracking:r}=N,{id:s,name:c,slug:u,planType:d,domain:m}=b,p={email:t,firstName:n,lastName:l,role:null==y||null==(e=y.role)?void 0:e.name,avatar:o,createdAt:a},f={workspaceId:s,workspaceName:c,workspaceSlug:u,workspacePlanType:d,workspaceDomain:m||""},g={crossDomain:!!r};(null==N?void 0:N.internalRole)?i.A.identify(N.id,p,void 0,g):(i.A.group("company",s,f),i.A.identify(N.id,p,f,g)),i.A.track("email_editor_integration_active",{integration:h})}},[N,b,y,h]),b&&y)?(0,l.jsx)(p.Jb,{currentUserCtx:{currentUser:N},workspaceCtx:{workspace:b,workspaceMembership:y,setActiveMembership:k,refetch:C},children:(0,l.jsx)(m.V,{token:g,children:(0,l.jsx)(o.B,{children:n})})}):(0,l.jsx)(o.B,{children:(0,l.jsxs)("div",{className:"h-full w-full bg-white p-4",children:[x&&(0,l.jsx)("div",{className:"absolute top-0 right-0",children:(0,l.jsx)(r.W1,{items:I,align:"end",children:(0,l.jsx)(s.K,{icon:"ellipsis",variant:"ghost",size:"sm","aria-label":"More options"})})}),(0,l.jsx)(c.V,{className:"bg-white p-4",iconLeft:"loader",title:"Loading workspace..."})]})})}},70478:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>g,fP:()=>d,tj:()=>m});var l=n(6029),i=n(16332),a=n(95632),o=n(4165),r=n(55613),s=n(27670),c=n(46907),u=n(55729);let d={type:c.G4.GIF,stepCount:5,timePerStep:1},m={type:c.G4.PNG,stepCount:1,timePerStep:1};function p(e){let{loading:t,previewURL:n}=e;return t?(0,l.jsx)(i.a,{}):n?(0,l.jsx)("img",{src:n,width:"600",height:"auto",className:"max-w-full"}):null}function f(e){let{open:t,onOpenChange:n,onSave:i,project:a,exportOptions:o}=e,[r,c]=(0,u.useState)(o),d=(0,u.useMemo)(()=>{var e,t;return null!=(t=null==(e=a.flows)?void 0:e.map(e=>{var t,n;return{id:e.id,name:e.name,isStarting:e.isStarting,stepCount:null!=(n=null==(t=e.editVersion)?void 0:t.doc.stepCount)?n:0}}))?t:[]},[a]);return(0,l.jsx)(s.V,{open:t,onOpenChange:n,title:"Export Settings",projectFlows:d,exportOptions:r,setExportOptions:c,disableTypeSelection:!0,primaryButton:{children:"Save",onClick:()=>{i(r)}},secondaryButton:{children:"Cancel",onClick:()=>{n(!1)}}})}function g(e){let{project:t,exportOptions:n,setExportOptions:i,includeGif:s,setIncludeGif:c,previewURL:d,loading:m,className:g,...h}=e,[x,v]=(0,u.useState)(!1);return(0,l.jsxs)("div",{className:(0,a.cn)(g,"flex flex-col gap-2"),...h,children:[(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-5",children:[(0,l.jsx)(o.d,{label:"Include GIF",checked:s,onCheckedChange:c,className:"py-2"}),s&&t&&(0,l.jsx)(r.$,{onClick:()=>v(e=>!e),iconLeft:"settings",variant:"ghost",size:"sm",children:"Advanced"})]}),(0,l.jsx)(p,{loading:m,previewURL:d}),t&&(0,l.jsx)(f,{open:x,onOpenChange:v,onSave:e=>{v(!1),i(e)},project:t,exportOptions:n})]})}}
3,73914:(e,t,n)=>{"use strict";n.d(t,{A:()=>D});var l=n(6029),i=n(53525),a=n(69222),o=n(59069),r=n(84379),s=n(55729);function c(e){let{onLogout:t}=e,{setActiveMembership:n}=(0,r.hA)(),[c,u]=(0,s.useState)(null),[{data:d}]=(0,o.M)({variables:{slug:c},pause:!c});(0,s.useEffect)(()=>{(null==d?void 0:d.initialMembership)&&(n(d.initialMembership),u(null))},[d,n]);let{menuItems:m,hasVisibleItems:p}=function(e){var t;let{onChangeWorkspaceSlug:n,extraItems:l=[]}=e,{currentUser:i}=(0,r.iZ)(),{workspace:a}=(0,r.hA)(),[o,c]=(0,s.useState)(""),{workspaceItems:u}=(0,r.$6)({selectedWorkspaceSlug:a.slug,onChangeWorkspaceSlug:n,searchText:o}),d=[{label:(null==i?void 0:i.email)||"Profile",type:"text",group:"",avatarLeft:{src:(null==i?void 0:i.image)||"",size:20,initials:null==i||null==(t=i.firstName)?void 0:t[0]}},{id:"search",label:"Search Workspaces",iconLeft:"search",type:"search",value:o,onValueChange:c,isHidden:u.length<=4},...u,...l],m=d.some(e=>!e.isHidden);return{menuItems:d,hasVisibleItems:m}}({onChangeWorkspaceSlug:u,extraItems:[{label:"Log out",type:"button",iconLeft:"log-out",onClick:t,isHidden:!t}]});return p?(0,l.jsx)("div",{className:"absolute top-0 right-0",children:(0,l.jsx)(i.W1,{items:m,align:"end",children:(0,l.jsx)(a.K,{icon:"ellipsis",variant:"ghost",size:"sm","aria-label":"More options"})})}):null}var u=n(85966),d=n(26626),m=n(16998);function p(){let e=(0,u._)(["\n query GetProjectShareLinkWithScreenshot($id: String!) {\n projectShareLink(id: $id) {\n ...ProjectShareLinkWithScreenshot\n }\n}\n ",""]);return p=function(){return e},e}n(1559);let f=(0,d.Ay)(p(),m.D);var g=n(50197),h=n(14701),x=n(3947),v=n(95632),y=n(76678),k=n(59584),j=n(93510),w=n(28117),C=n(98089),b=n(61520),S=n(75615),N=n(10924),I=n(70478),A=n(97985),L=n(36751),T=n(80598),E=n(72036),R=n(81519),O=n(46907);let P=function(e){let{recipients:t,insertShareLink:n,onLogout:i,showHeaderMenu:a=!0,className:o}=e,{customDemoBuilderState:u,dispatchCustomDemoBuilder:d}=(0,T.b)({recipients:t}),{token:m}=(0,C.r)(),{getThumbnail:p}=function(){let e=(0,g.tH)();return{getThumbnail:async t=>{var n,l,i;return null!=(i=null==(l=(await e.query(f,{id:t}).toPromise()).data)||null==(n=l.projectShareLink)?void 0:n.projectScreenshot)?i:void 0}}}(),{demoName:P,settings:D,visitorOpportunityId:M,error:_}=u,{shareType:F,companyLogoUrl:H}=D,{defaultEmailClient:U,showAdvancedEmailTemplate:V}=(0,A.e)(),W=(0,h.z)({defaultEmailClient:U,defaultSendDemoInvites:!1}),{emailClient:q,includeGif:z}=W,{fetching:G,formatShareLink:B}=(0,L.ef)(),$=(0,r.CE)(x.TOI.LAUNCHPAD_ADVANCED_EMAIL_TEMPLATE),Z=(0,r.CE)(x.TOI.LAUNCHPAD_COPY_WITH_GIF),{stepConfig:K}=(0,L.wT)({shareType:F,customDemoBuilderState:u,dispatchCustomDemoBuilder:d}),{currentStep:X,selectedInterestFlows:Y,selectedProject:J}=u,Q=K.findIndex(e=>{let{id:t}=e;return t===X}),ee=K.findIndex(e=>{let{id:t}=e;return t===R.RX.Content}),et=(0,N.g)({currentConfigIndex:Q,stepConfig:K,customDemoBuilderState:u,userDefaults:W}),{handleRemoveInterestItem:en,handleRemoveProject:el}=(0,S.o)({customDemoBuilderState:u,dispatchCustomDemoBuilder:d,currentConfigIndex:Q,contentConfigIndex:ee}),ei=async e=>{var t;let{shareLink:l,validRecipients:i}=e,{projectId:a,customPath:o}=l,r=B(o),s=i.length>0?i[0]:void 0,c=a?await (0,E.xL)({projectId:a,options:Z?I.fP:I.tj,token:m}):void 0;n({html:z?(0,L.Lc)({shareLink:r,shareType:l.shareType,exportUrl:c&&!Z?(0,O.FI)(c):c,primaryRecipient:s,emailClient:q,projectName:P,showAdvancedEmailTemplate:null!=V?V:$}):(0,L.Zs)({shareLink:r,shareType:l.shareType,primaryRecipient:s,emailClient:q}),thumbnail:null!=(t=await p(l.id))?t:c,shareLink:r,demoName:null!=P?P:null,opportunityId:null!=M?M:null,recipientEmails:null==i?void 0:i.map(e=>e.recipientInfo),companyLogoUrl:null!=H?H:null})},ea=(0,s.useCallback)(e=>{d({type:"set-error",payload:e}),setTimeout(()=>{d({type:"set-error",payload:null})},5e3)},[d]),{loading:eo,onCreateCustomDemoAndShareLink:er}=(0,L.EX)({customDemoBuilderState:u,userDefaults:W,dispatchCustomDemoBuilder:d,onCreateCustomDemoShareLink:ei,onError:ea}),{navigateToNextStep:es,navigateToPreviousStep:ec}=(0,L.AK)({currentConfigIndex:Q,stepConfig:K,shareType:F,dispatchCustomDemoBuilder:d,onCreateCustomDemoAndShareLink:er});return(0,l.jsxs)("div",{className:(0,v.cn)("flex h-full flex-col border bg-white",o),children:[(0,l.jsx)("div",{className:"flex-1 overflow-x-hidden overflow-y-auto px-5 pt-5",children:(0,l.jsxs)("div",{className:"relative flex flex-col gap-6 pb-5",children:[a?(0,l.jsx)(c,{onLogout:i}):null,(0,l.jsx)(y.C,{steps:K,value:X,allowProgress:!1,allowBack:!0,onValueChange:e=>d({type:"set-current-step",payload:e}),className:"flex items-center justify-center"}),(0,l.jsx)(b.V,{selectedInterestFlows:Y,selectedProject:J,onRemoveInterestItem:en,onReorderInterestItems:e=>d({type:"set-selected-interest-flows",payload:e}),onRemoveProject:el}),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[_&&(0,l.jsx)(k._,{colorScheme:"red",icon:"info",title:"Error: ".concat(_)}),(0,l.jsx)(j.A,{customDemoBuilderState:u,dispatchCustomDemoBuilder:d,userDefaults:W,navigateToNextStep:es,paginationClassName:"bottom-0 -mx-5 px-5"})]})]})}),(0,l.jsx)("div",{className:"flex-shrink-0 border bg-gray-50 px-6 py-4",children:(0,l.jsx)(w.A,{isLoading:eo||G,stepConfig:K,isStepValid:et,currentConfigIndex:Q,navigateToPreviousStep:ec,navigateToNextStep:es,customDemoBuilderState:u,dispatchCustomDemoBuilder:d,userDefaults:W,insertHTMLOnLastStep:!0})})]})},D=function(e){let{recipients:t,insertShareLink:n,onLogout:i,showHeaderMenu:a=!0,className:o}=e,{workspace:s}=(0,r.hA)();return(0,l.jsx)(P,{className:o,insertShareLink:n,recipients:t,onLogout:i,showHeaderMenu:a},s.id)}},87042:(e,t,n)=>{"use strict";n.d(t,{AB:()=>s,dG:()=>c});var l=n(47527),i=n(22391),a=n(55729);let o=e=>{let t=(0,i.x6)(e);return t||(l.Rm.error({message:"Failed to parse dialog message",payload:e}),null)},r=e=>{try{Office.context.ui.messageParent(JSON.stringify(e))}catch(t){l.Rm.error({message:"Failed to send message to parent",error:t,payload:e})}},s=(e,t)=>({openDialog:(0,a.useCallback)(()=>{Office.context.ui.displayDialogAsync(e,{height:75,width:40,displayInIframe:!0},e=>{if(e.status!==Office.AsyncResultStatus.Succeeded)return void l.Rm.error({message:"Failed to open dialog",error:e.error});let n=e.value;n.addEventHandler(Office.EventType.DialogMessageReceived,async e=>{if(!("message"in e))return;let i=o(e.message);if(i)switch(i.type){case"READY":((e,t)=>{try{e.messageChild(JSON.stringify(t))}catch(e){l.Rm.error({message:"Failed to send message to dialog",error:e,payload:t})}})(n,{type:"RECIPIENTS",data:t});break;case"HTML_CONTENT":let a;await (a=i.data,new Promise((e,t)=>
3{let n=Office.context.mailbox.item;if(!n)return void t(Error("Office mailbox item not available"));n.body.setSelectedDataAsync(a,{coercionType:Office.CoercionType.Html},n=>{n.status===Office.AsyncResultStatus.Succeeded?e():t(Error(n.error.message))})})),n.close(),Office.context.ui.closeContainer()}}),n.addEventHandler(Office.EventType.DialogEventReceived,e=>{"error"in e&&12006===e.error&&(n.close(),Office.context.ui.closeContainer())})})},[e,t])}),c=()=>{let[e,t]=(0,a.useState)([]),[n,l]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{Office.context.ui.addHandlerAsync(Office.EventType.DialogParentMessageReceived,e=>{let{message:n}=e,i=o(n);i&&"RECIPIENTS"===i.type&&(t(i.data),l(!1))}),r({type:"READY"})},[]),{recipients:e,waitingForRecipients:n,sendHtmlContent:(0,a.useCallback)(e=>{r({type:"HTML_CONTENT",data:e})},[])}}},89841:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/integration/office/dialog",function(){return n(8648)}])},92739:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var l=n(6029),i=n(13342);let a=e=>{let{handleLinkAccount:t,integrationIcon:n,linking:a=!1}=e;return(0,l.jsx)(i.A,{handleAction:t,integrationIcon:n,loading:a,title:"Link Your Navattic Account",description:"To use Navattic demos and share links in your emails, please link your Navattic account",loadingTitle:"Connecting to Navattic",loadingDescription:"Please wait while we connect to your Navattic account",buttonText:"Link Account"})}}},e=>{e.O(0,[6593,1663,9616,238,9913,8277,3684,4446,919,6838,9391,2292,1642,8750,9047,6450,9899,7283,488,9928,7929,5139,9727,2532,8975,6100,865,2593,4379,2146,1224,5389,2045,2444,5720,7676,7135,1362,4641,3482,9933,8255,8792],()=>e(e.s=89841)),_N_E=e.O()}]); 4//# sourceMappingURL=dialog-fce439c968d395b2.js.map 5//# debugId=e7bbab80-bfea-5798-a38a-ffae940a13e3
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.