(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[978],{1049:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[[...publicId]]",function(){return r(24554)}])},24554:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>y,default:()=>f});var n=r(6029),l=r(69443),s=r(28157),i=r(59393),o=r(83814);let a=e=>{let{dashboardUrl:t}=e;return(0,n.jsx)("div",{style:{height:"100dvh",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{style:{fontWeight:"bold",fontSize:"30px"},children:"Welcome to Typebot"}),(0,n.jsx)("p",{children:"Typebot is a no-code platform that enables you to effortlessly create and integrate advanced chatbots into websites and chat platforms like WhatsApp."}),(0,n.jsxs)("p",{children:["Go to the ",(0,n.jsx)("a",{href:t,children:"dashboard"}),"."]})]})})};var d=r(72032),u=r(55729),c=e=>{let{style:t,className:l,...s}=e,i=(0,u.useRef)(null);return(0,u.useEffect)(()=>{if(r.e(525).then(r.bind(r,52525)),!i.current)return;let{typebot:e,...t}=s;Object.assign(i.current,t,{typebot:e})},[s]),(0,n.jsx)("typebot-standard",{ref:i,style:t,class:l})},b=r(81278),h=r(98965);let p=e=>{let{font:t,isMatchingViewerUrl:r,publicId:i,name:o,url:a,isHideQueryParamsEnabled:d,metadata:p,background:y}=e,{asPath:f,push:v}=(0,b.useRouter)(),j=(0,u.useMemo)(()=>{if(!r)return new URL(a).origin},[r,a]);return(0,n.jsxs)("div",{style:{height:"100dvh",backgroundColor:(null==y?void 0:y.type)===s.hK.COLOR?null==y?void 0:y.content:(null==y?void 0:y.type)===s.hK.NONE?void 0:"#fff"},children:[(0,n.jsx)(h.k,{url:a,typebotName:o,metadata:p,isMatchingViewerUrl:r}),(0,n.jsx)(c,{typebot:null!=i?i:void 0,onInit:()=>{f.includes("?")&&(null!=d?d:l.L6.general.isHideQueryParamsEnabled)&&v(f.split("?")[0],void 0,{shallow:!0})},font:null!=t?t:void 0,apiHost:j})]})};var y=!0;let f=e=>{var t,r,u;let{publishedTypebot:c,incompatibleBrowser:b,dashboardUrl:h,...y}=e;return b?(0,n.jsx)(i.M,{error:Error("Your web browser: ".concat(b,", is not supported."))}):h?(0,n.jsx)(a,{dashboardUrl:h}):!c||"typebot"in c&&c.typebot.isArchived?(0,n.jsx)(o.j,{}):"typebot"in c&&c.typebot.isClosed?(0,n.jsx)(i.M,{error:Error("This bot is now closed")}):"typebot"in c?(0,n.jsx)(d.N,{publishedTypebot:c,...y}):(0,n.jsx)(p,{url:y.url,isMatchingViewerUrl:y.isMatchingViewerUrl,name:c.name,publicId:c.publicId,isHideQueryParamsEnabled:null!=(t=c.isHideQueryParamsEnabled)?t:l.L6.general.isHideQueryParamsEnabled,background:null!=(r=c.background)?r:{type:s.at,content:Number(c.version)>=6?s.lG[c.version]:s.lG["6"]},metadata:null!=(u=c.metadata)?u:{},font:c.font})}}},e=>{e.O(0,[883,966,864,996,172,331,636,593,792],()=>e(e.s=1049)),_N_E=e.O()}]);