!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7a154538-a92d-4fca-9843-f61c35d7aded",e._sentryDebugIdIdentifier="sentry-dbid-7a154538-a92d-4fca-9843-f61c35d7aded")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9224],{9654:function(e,t,i){var n=i(57818);let o=e=>{let{children:t}=e;return t};t.default=(0,n.default)(()=>Promise.resolve(o),{ssr:!1})},19264:function(e,t,i){i.d(t,{A:function(){return R},Z:function(){return P}});var n,o,r=i(57437),s=i(2265),a=i(38472),l=i(17090),c=i(91116),d=i(54038),h=i(37974),u=i(85130),p=i(64728),m=i(66312),x=i(83738),g=i(66648),w=i(70750),f=i(88492),v=i.n(f),y=i(6407),b=i(57287),j=i(44785),C=i(99881),T=i(26792),k=i(25523),N=i(65833),S=i(87510),z=i(47234),E=i(96312),M=i(63158),I=i(30756),_=i(64453),A=i(83758);let L=e=>x.validate(e),R=-9e3;function P(e){var t,i,n,o;let{chapter:x,editMode:f=!1,width:P,height:D,demo:H,index:F,slide:O,handleNext:B,setDemo:Z,setOpenChapterSettings:X,openChapterSettings:$,handleUpgradeNow:V,resetDemo:G,uniqueViewerId:W,isMobileView:U,demoViewType:q=b.H.Demo,variables:Y=[],demoRendering:J,isAllowedToEdit:Q=!1,previewMode:K=!1}=e,ee=(0,S.$)("sm"),et=(()=>{for(let e of O===H.steps.length-1?H.steps.slice().reverse():H.steps.slice(O))if(e.image||e.video)return e.image||e.video})(),ei=x.buttons[0],[en,eo]=(0,s.useState)(""),[er,es]=(0,s.useState)(""),[ea,el]=(0,s.useState)(!1),ec=(0,M.Z)(e=>e.setSelectedButton),[ed,eh]=(0,s.useState)(!1),[eu,ep]=(0,s.useState)(!1),em=(0,s.useRef)(null),ex=(0,s.useRef)(null),[eg,ew]=(0,s.useState)(null),[ef,ev]=(0,s.useState)(null),[ey,eb]=(0,s.useState)(null),[ej,eC]=(0,s.useState)(0),eT=(0,C.$)((null==H?void 0:null===(t=H.workspace)||void 0===t?void 0:t.plan)||l.Plan.Free),[ek,eN]=(0,s.useState)(x.type===l.ChapterType.Embed),[,eS]=(0,w._)(T.H7,null);(0,s.useEffect)(()=>{let e=localStorage.getItem((0,k.Fd)(x.id)),t=localStorage.getItem((0,k.Ie)(x.id));x.type===l.ChapterType.Email&&e?eo(e):x.type===l.ChapterType.Password&&t&&eo(t)},[O,x.id,x.type]),(0,s.useEffect)(()=>{if(ed||ek){let e=setTimeout(()=>{eN(!1),eh(!1)},ek?1e3:2e3);return()=>{clearTimeout(e)}}},[ed,ek]);let ez=()=>{if(W&&H.steps.length-1===O)try{a.Z.put("".concat(T.BC,"/analytics/demo/step/").concat(x.stepId,"/view"),{viewerId:W})}catch(e){throw Error(e)}},eE=async e=>{if(e.preventDefault(),f&&X){X(!0),ec(F);return}if(es(""),!en.trim()){es(x.type===l.ChapterType.Email?"Email field cannot be empty":"Password field cannot be empty");return}if(el(!0),x.type===l.ChapterType.Email&&!L(en)){el(!1),es("Please enter a valid email address");return}if(!m.w(en)&&x.allowCompanyEmail&&x.type===l.ChapterType.Email){el(!1),es("Please enter a valid business email.");return}try{x.type===l.ChapterType.Email&&(localStorage.setItem((0,k.Fd)(x.id),en),el(!1),eh(!0),B(),eS(en),(0,N.w2)({action:"supademo_lead_identify",category:"Lead",label:"Supademo Lead",value:1,demo_id:H.id,demo_url:"".concat(T.v2,"/demo/").concat(H.id),lead_email:en}));let e=await a.Z.post("/api/demo/chapter-form",{text:en,chapterType:x.type,authorId:H.authorId,demoId:H.id,demoTitle:H.title,chapterId:x.id,workspaceId:H.workspaceId,uniqueViewerId:W,demoViewType:q});x.type===l.ChapterType.Password&&(e.data.isValid?(localStorage.setItem((0,k.Ie)(x.id),en),el(!1),B(R)):(el(!1),es("Invalid password"))),ez()}catch(e){console.error("Error submitting form:",e)}},eM=(e,t)=>{if(f&&X){X(!0),ec(t);return}if(x.type===l.ChapterType.Link&&e.isLinkExternal){if(!e.linkTxt)return;window.open(e.linkTxt,e.openInNewTab?"_blank":"_self"),(0,N.w2)({action:"supademo_cta_click",category:"Link",label:"Supademo Link",value:1,demo_id:H.id,demo_url:"".concat(T.v2,"/demo/").concat(H.id),cta_url:e.linkTxt})}else B(e.linkTxt);ez()},eI=e=>{var t,i,n;null==X||X(!0),ec(e);let o=null==H?void 0:H.workspace,r=null==o?void 0:null===(t=o.chapter)||void 0===t?void 0:t.buttons[0],s=O===H.steps.length-1,a=H.steps.length>0&&s?r&&r.linkTxt?r.linkTxt:"https://supademo.com":null,l={id:(0,c.x0)(),chapterId:x.id,content:s&&r&&r.content?r.content:"Get Started",btnColor:null===(i=x.buttons[0])||void 0===i?void 0:i.btnColor,color:null===(n=x.buttons[0])||void 0===n?void 0:n.color,linkTxt:a,isLinkExternal:s};Z(e=>{let t=e.steps[O].chapter;t&&t.buttons.push(l)})},e_=(e,t)=>{if(eT){let{charBeforeCursor:i,cursorPosition:n}=(0,j.eu)(e),{cursorX:o}=(0,j.zX)(e);"{"===i?(ep(!0),eC(o),"heading"===t?(ew(em),ev(n)):"description"===t&&(ew(ex),eb(n))):"{"!==i&&ep(!1)}let i={...x,[t]:e.target.value};Z(e=>{e.steps[O].chapter=i})},eA=e=>{"heading"===e?em.current&&ev(em.current.selectionStart||0):"description"===e&&ex.current&&eb(ex.current.selectionStart||0)},eL=(e,t)=>{var i,n,o,r;if(!e)return;let s=x.heading||"",a=x.description||"";"heading"===t?s=null!==ef?"".concat(null===(i=x.heading)||void 0===i?void 0:i.slice(0,ef)).concat(e).concat(null===(n=x.heading)||void 0===n?void 0:n.slice(ef)):"".concat(x.heading).concat(e):"description"===t&&(a=null!==ey?"".concat(null===(o=x.description)||void 0===o?void 0:o.slice(0,ey)).concat(e).concat(null===(r=x.description)||void 0===r?void 0:r.slice(ey)):"".concat(x.description).concat(e));let l={...x,heading:s,description:a};Z(e=>{e.steps[O].chapter=l})};return(0,r.jsxs)("div",{id:"chapter-".concat(F),className:(0,z.A)(H.topBar?U?"":"rounded-b-md":U?q!==b.H.Showcase?"rounded-t-md":"":"rounded-md","overflow-hidden z-30"),style:{width:P,height:D,position:"relative",display:F===O?"block":"none"},children:[x.type===l.ChapterType.Embed?(0,r.jsx)("div",{className:"relative bg-white flex items-center justify-center w-full h-full",children:x.embedCode?(0,r.jsxs)(r.Fragment,{children:[ek&&(0,r.jsx)("div",{className:"w-full absolute bg-white h-full flex items-center justify-center",children:(0,r.jsx)(A.F,{})}),(0,r.jsx)("iframe",{src:x.embedCode,title:"Embed",width:P,height:D})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center w-3/4",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold text-center",children:"Embed forms and apps directly into this Supademo"}),(0,r.jsxs)("p",{className:"text-sm text-gray-600 mt-4 text-center w-3/4",children:["Add calendars or forms to encourage viewers to take action directly within Supademo."," ",(0,r.jsx)("span",{className:"underline cursor-pointer hover:text-indigo-600",onClick:()=>window.open("https://docs.supademo.com/article/118-embed-apps-into-chapter","_blank"),children:"Learn more"})]}),(0,r.jsxs)("div",{className:"gap-3 items-center mt-8 hidden sm:flex",children:[[{src:"/external_logos/calendly.png",alt:"Calendly",className:"w-6"},{src:"/external_logos/cal.png",alt:"Cal",className:"w-6"},{src:"/external_logos/jotform.png",alt:"Jotform",className:"w-6"},{src:"/external_logos/tally.png",alt:"Tally",className:"w-6"},{src:"/external_logos/hsforms.png",alt:"Hubspot",className:"w-6"},{src:"/external_logos/typeform.png",alt:"Typeform",className:"w-6"},{src:"/external_logos/google.png",alt:"Google",className:"w-4"}].map((e,t)=>(0,r.jsx)("div",{title:e.alt,children:(0,r.jsx)(g.default,{src:e.src,alt:e.alt,className:e.className,width:20,height:20})},t)),(0,r.jsx)("a",{className:"text-gray-500 underline hover:text-indigo-600 cursor-pointer",target:"_blank",href:"https://docs.supademo.com/article/118-embed-apps-into-chapter",children:"+ more"})]})]})}):(0,r.jsxs)("div",{className:"relative flex items-center justify-center w-full h-full",children:[(0,r.jsxs)("div",{className:(0,z.A)(U?"px-4 max-w-96":"px-16","z-20 flex flex-col justify-center items-center flex-grow w-full gap-2"),children:[(0,r.jsx)("h2",{className:(0,z.A)(U?"text-base sm:text-2xl landscape:text-base":"text-3xl","line-clamp-2 sm:line-clamp-none sm:flex font-semibold sm:font-bold break-words text-center justify-center w-full"),"data-test-id":"chapter-heading",style:{color:x.headingColor},children:f?(0,r.jsxs)("div",{className:"relative group w-full",children:[(0,r.jsx)(h.Z,{placeholder:"Heading",maxRows:3,className:(0,z.A)(U?"text-xl px-1":"text-3xl px-2","Dark"===x.theme?"bg-white/[.10] placeholder-white":"bg-gray-900/[.10] placeholder-gray-700","outline-none border-0 ring-0 p-0 resize-none select-all focus:ring-0 w-full max-w-4/5 rounded-lg transition-all placeholder-opacity-50 text-center"),style:{color:x.headingColor},ref:em,onClick:()=>{f&&!$&&X?X(!0):f&&eA("heading")},id:"heading-input",value:x.heading||"",onChange:e=>{e_(e,"heading")}}),$&&(0,r.jsx)(_.s,{onSelect:e=>eL(e,"heading"),hasDynamicVariablesAccess:eT,size:"sm",sx:{marginTop:"-3px",marginRight:"-15px"}})]}):(0,j.E8)(x.heading||"",Y,eT,Q,K)}),(0,r.jsx)("div",{className:(0,z.A)("text-center w-full placeholder-opacity-50 line-clamp-3 sm:line-clamp-none",((null===(i=x.description)||void 0===i?void 0:i.length)||1)>120&&U?"text-xs min-[420px]:text-sm":U?"text-sm px-1":"text-base"),style:{color:x.descriptionColor},children:f?(0,r.jsxs)("div",{className:"relative group w-full",children:[(0,r.jsx)(h.Z,{maxRows:3,placeholder:"Description",ref:ex,onClick:()=>{f&&!$&&X?X(!0):f&&eA("description")},id:"description-input",className:(0,z.A)("Dark"===x.theme?"bg-white/[.10] placeholder-white":"bg-gray-900/[.10] placeholder-gray-700","outline-none border-0 ring-0 p-0 resize-none select-all focus:ring-0 w-full max-w-4/5 text-center rounded-lg transition-all placeholder-opacity-50 "),style:{color:x.descriptionColor},value:x.description||"",onChange:e=>{e_(e,"description")}}),$&&(0,r.jsx)(_.s,{onSelect:e=>eL(e,"description"),hasDynamicVariablesAccess:eT,size:"sm",sx:{marginTop:"-3px",marginRight:"-15px"}})]}):(0,j.E8)(x.description||"",Y,eT,Q,K)}),(x.type===l.ChapterType.Email||x.type===l.ChapterType.Password)&&(0,r.jsxs)("div",{className:(0,z.A)("w-full flex gap-2 sm:gap-3 sm:flex-col mt-2 sm:mt-4 justify-center items-center"),children:[(0,r.jsxs)("form",{onSubmit:eE,className:(0,z.A)(U?"w-full":"md:w-[520px] mt-6","flex"),children:[(0,r.jsx)("input",{id:"chapter-input",disabled:f,name:x.type===l.ChapterType.Email?"email":"password",type:x.type===l.ChapterType.Email?"email":"password",autoComplete:"on",value:en,onChange:e=>eo(e.target.value),className:(0,z.A)(U?"px-2 py-1.5 text-xs sm:text-sm":"py-2.5 px-3.5 text-sm","rounded-l-md border flex-auto  bg-white shadow-sm sm:leading-6 w-full"),placeholder:x.type===l.ChapterType.Email?"Enter your email":"Enter your password"}),(0,r.jsx)("button",{type:"submit",style:{background:ei.btnColor,color:ei.color},className:(0,z.A)(U?"px-4 py-2 text-xs sm:text-sm":"px-7 py-2.5 sm:text-sm lg:text-base ","flex items-center justify-center gap-2 relative rounded-r-md flex-none shadow-md  font-medium oversized-cursor-pointer hover:scale-[1.04] ease-in duration-170 transition-transform"),children:ea?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{role:"status",className:"inline w-4 h-4 mr-1 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),(0,r.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),(0,r.jsx)("span",{children:"Validating"})]}):(0,r.jsxs)(r.Fragment,{children:[ed&&(0,r.jsx)(u.Z,{className:"w-5 h-5 inline-flex items-center mr-1.5"}),(0,r.jsx)("span",{children:ed?"Submitted":f?ei.content:(0,j.E8)(ei.content||"",Y,eT,Q,K)})]})})]}),er&&(0,r.jsx)("p",{className:"text-center mt-4 text-red-500 font-semibold",children:er}),(0,r.jsxs)("div",{className:"flex gap-4 items-center justify-center z-20",children:[x.type===l.ChapterType.Email&&H.steps.length-1!==O&&x.skip&&(0,r.jsx)("div",{onClick:()=>eM(ei,0),className:(0,z.A)(U?"text-xs sm:text-sm":"text-base mt-5","oversized-cursor-pointer text-center hover:underline font-light hover:scale-[1.04] ease-in duration-170 transition-transform"),style:{color:x.descriptionColor},children:"Skip"}),H.steps.length-1===O&&!f&&!U&&(0,r.jsxs)("div",{onClick:()=>G(),className:(0,z.A)(U?"mt-3":"mt-5","oversized-cursor-pointer text-center hover:underline text-xs sm:text-base font-light items-center hover:scale-[1.04] ease-in duration-170 transition-transform"),style:{color:x.descriptionColor},children:[(0,r.jsx)(p.Z,{className:"h-3 w-3 sm:h-4 sm:w-4 inline-block mr-1 items-center"}),"Replay"]})]})]}),x.type===l.ChapterType.Link&&(0,r.jsxs)("div",{className:(0,z.A)(U?"space-y-1 sm:space-y-2 mt-4":"space-y-3 mt-6",""),children:[x.buttons.map((e,t)=>{let i=e.btnColor;if(e.animation&&(e.animation===l.ButtonAnimation.Spinner||e.animation===l.ButtonAnimation.Ripple)){let[t,n,o]=(0,y.$W)(e.btnColor),[r,s,a]=(0,y.lC)(t,n,o);i="hsl(".concat(r,", ").concat(s,"%, ").concat(a+30,"%)")}return(0,r.jsxs)("div",{id:"chapter-button-".concat(t),className:(0,z.A)(U?"px-4 py-2 text-xs sm:text-sm":"px-7 py-2.5 sm:text-sm lg:text-base","flex items-center justify-center gap-2 rounded-md shadow-lg sm:rounded-lg text-center sm:font-medium oversized-cursor-pointer z-0 relative hover:scale-[1.04] ease-in duration-170 transition-transform",e.animation===l.ButtonAnimation.Pulse?"pulse":""),onClick:()=>eM(e,t),style:{animationDelay:"1s",background:e.btnColor,color:e.color},children:[e.animation&&e.animation===l.ButtonAnimation.Spinner&&(0,r.jsxs)("div",{className:"absolute inset-0 overflow-hidden",children:[(0,r.jsx)("div",{style:{position:"absolute",left:"-50%",top:"-150%",width:"200%",height:"400%",zIndex:"-2",backgroundRepeat:"no-repeat",backgroundSize:"50% 50%, 50% 50%",backgroundPosition:"0 0, 100% 0, 100% 100%, 0 100%",backgroundImage:"linear-gradient(transparent, transparent),\n                                  linear-gradient(".concat(i,", ").concat(i,"), linear-gradient(transparent, transparent),\n                                  linear-gradient(transparent, transparent)"),animation:"rotate 2s linear infinite"}}),(0,r.jsx)("div",{style:{position:"absolute",zIndex:"-1",left:"3px",top:"3px",width:"calc(100% - 6px)",height:"calc(100% - 6px)",background:e.btnColor,borderRadius:"5px"}})]}),e.animation&&e.animation===l.ButtonAnimation.Ripple&&(0,r.jsx)("div",{className:"absolute top-0 left-0 flex items-center justify-center h-full w-full overflow-hidden rounded-md",children:(0,r.jsx)("div",{className:"ripple h-[50px] w-[50px]",style:{backgroundColor:i}})}),f?e.content:(0,j.E8)(e.content||"",Y,eT,Q,K)]},e.id)}),H.steps.length-1===O&&!f&&!U&&(0,r.jsxs)("div",{onClick:()=>G(),className:(0,z.A)("oversized-cursor-pointer mt-6 text-center hover:underline text-xs sm:text-base font-light items-center hover:scale-[1.04] ease-in duration-170 transition-transform"),style:{color:x.descriptionColor},children:[(0,r.jsx)(p.Z,{className:"h-3 w-3 sm:h-4 sm:w-4 inline-block mr-1 items-center"}),"Replay"]}),x.buttons.length<=2&&f&&$&&(0,r.jsx)("div",{className:(0,z.A)(U?"px-4 py-2 text-xs sm:text-sm":"px-7 py-2.5 sm:text-sm lg:text-base","Dark"===x.theme?"border-white/30 text-white/50":"text-gray-900/60 border-gray-900/30","rounded-md sm:rounded-lg text-center font-medium cursor-pointer border-2 border-dashed hover:scale-[1.04] ease-in duration-170 transition-transform"),onClick:()=>{eT?eI(x.buttons.length):V&&V("branching")},"data-tooltip-content":"\n                        This feature is only available with a Scale plan or\n                        above. Click to upgrade now.\n                      ","data-tooltip-id":eT?"":"light-tooltip",children:"Add Button"})]})]}),(0,r.jsx)("div",{className:(0,z.A)(x.theme===l.ChapterTheme.Dark?"bg-gray-900":"",x.theme===l.ChapterTheme.Light?"bg-white":"","z-10 absolute flex top-0 left-0 items-center justify-center w-full h-full",ee?"rounded-b-md":"",J.shouldShowFrame?"":"rounded-t-md"),style:{opacity:x.blurIntensity===E.tT||x.theme===l.ChapterTheme.Custom&&(null===(o=x.background)||void 0===o?void 0:o.type)===l.DemoBackgroundType.Url?1:E.cz,background:(()=>{var e;if(x.theme===l.ChapterTheme.Custom)return"".concat(null===(e=x.background)||void 0===e?void 0:e.value," center / cover no-repeat")})(),filter:(()=>{var e;if(x.theme===l.ChapterTheme.Custom&&(null===(e=x.background)||void 0===e?void 0:e.type)===l.DemoBackgroundType.Url)return"blur(".concat(x.blurIntensity,"px)")})()}}),et&&x.blurIntensity<E.tT&&(null===(n=x.background)||void 0===n?void 0:n.type)!==l.DemoBackgroundType.Url&&(et.includes(".mp4")?(0,r.jsx)("video",{muted:!0,src:et,className:"w-full h-full object-cover absolute overflow-hidden",style:{filter:"blur(".concat(x.blurIntensity,"px)")}}):et.includes(".m3u8")?(0,r.jsx)(v(),{url:et,style:{position:"absolute",filter:"blur(".concat(x.blurIntensity,"px)")},width:"100%",height:"100%",config:{file:{attributes:{crossOrigin:"anonymous",style:{objectPosition:"inherit",position:"absolute",objectFit:"cover",width:"100%"}}}}}):(0,r.jsx)(g.default,{"data-something":x.blurIntensity,src:et,className:"h-auto object-cover absolute overflow-hidden",alt:"",width:P,height:D,style:{filter:"blur(".concat(x.blurIntensity,"px)")}}))]}),(0,r.jsx)(d.u,{id:"light-tooltip",style:{width:"260px",fontSize:"12px",zIndex:"999",background:"#fff",color:"#000"},opacity:1}),(0,r.jsx)(I.y,{isPickerOpen:eu,setShowDynamicVariablePicker:ep,inputRef:eg,onSelect:e=>{var t,i,n,o,r,s;if(!(null==eg?void 0:eg.current))return;let a=x.heading,l=x.description;if("heading-input"===eg.current.id){if(!ef)return;let o=(null===(t=x.heading)||void 0===t?void 0:t[ef-2])==="{"?ef-2:ef-1;a="".concat(null===(i=x.heading)||void 0===i?void 0:i.slice(0,o)).concat(e).concat(null===(n=x.heading)||void 0===n?void 0:n.slice(ef))}if("description-input"===eg.current.id){if(!ey)return;let t=(null===(o=x.description)||void 0===o?void 0:o[ey-2])==="{"?ey-2:ey-1;l="".concat(null===(r=x.description)||void 0===r?void 0:r.slice(0,t)).concat(e).concat(null===(s=x.description)||void 0===s?void 0:s.slice(ey))}let c={...x,heading:a,description:l};Z(e=>{e.steps[O].chapter=c}),ep(!1)},xOffset:ej,hasDynamicVariablesAccess:eT})]})}(n=o||(o={})).Heading="heading",n.Description="description"},90354:function(e,t,i){i.d(t,{ZP:function(){return l}});var n=i(57437),o=i(17090),r=i(6407);function s(e){let{bgColor:t}=e,[i,o,s]=(0,r.$W)(t),[a,l,c]=(0,r.lC)(i,o,s),d="hsl(".concat(a,", ").concat(l,"%, ").concat(c+30,"%)");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{position:"absolute",left:"-50%",top:"-150%",width:"200%",height:"400%",zIndex:"-2",pointerEvents:"none",backgroundRepeat:"no-repeat",backgroundSize:"50% 50%, 50% 50%",backgroundPosition:"0 0, 100% 0, 100% 100%, 0 100%",backgroundImage:"linear-gradient(transparent, transparent),\n                      linear-gradient(".concat(d,", ").concat(d,"), linear-gradient(transparent, transparent),\n                      linear-gradient(transparent, transparent)"),animation:"rotate 2s linear infinite"}}),(0,n.jsx)("div",{className:"rounded-xl",style:{position:"absolute",zIndex:"-1",left:"3px",top:"3px",width:"calc(100% - 6px)",height:"calc(100% - 6px)",background:t}})]})}function a(e){let{bgColor:t}=e,[i,o,s]=(0,r.$W)(t),[a,l,c]=(0,r.lC)(i,o,s),d="hsl(".concat(a,", ").concat(l,"%, ").concat(c+30,"%)");return(0,n.jsx)("div",{className:"absolute top-0 left-0 flex items-center justify-center h-full w-full pointer-events-none",children:(0,n.jsx)("div",{className:"ripple h-[50px] w-[50px]",style:{backgroundColor:d}})})}function l(e){let{animation:t,bgColor:i}=e;return t===o.HotspotAnimation.Spinner?(0,n.jsx)(s,{bgColor:i}):t===o.HotspotAnimation.Ripple?(0,n.jsx)(a,{bgColor:i}):null}},70634:function(e,t,i){i.d(t,{_Y:function(){return a},bl:function(){return n},fy:function(){return o},uZ:function(){return r},yr:function(){return s}});let n=40,o=40,r=(e,t,i)=>Math.min(Math.max(e,i),t),s=(e,t,i,n,o,s)=>a=>{let{transform:l,active:c}=a;if(!c)return l;let d=-1*(e-i/2),h=i-16,u=-1*(t-n/2),p=n-16,m=16-i,x=o-(e+i/2),g=16-n,w=s-(t+n/2);switch(c.id){case"w":return{...l,x:r(l.x,h,d)};case"n":return{...l,y:r(l.y,p,u)};case"e":return{...l,x:r(l.x,x,m)};case"s":return{...l,y:r(l.y,w,g)};case"nw":return{...l,x:r(l.x,h,d),y:r(l.y,p,u)};case"ne":return{...l,x:r(l.x,x,m),y:r(l.y,p,u)};case"se":return{...l,x:r(l.x,x,m),y:r(l.y,w,g)};case"sw":return{...l,x:r(l.x,h,d),y:r(l.y,w,g)};case"center":return{...l,x:r(l.x,x,d),y:r(l.y,w,u)}}return l},a=(e,t,i,n)=>o=>{let{transform:r,draggingNodeRect:s}=o;if(!s)return r;let a=s.width,l=s.height;return{...r,x:Math.max(Math.min(r.x,i-a/2-e),a/2-e),y:Math.max(Math.min(r.y,n-l/2-t),l/2-t)}}},71226:function(e,t,i){i.d(t,{Z:function(){return s}});var n=i(57437),o=i(17090),r=i(47234);function s(e){var t;let{slide:i,steps:s,showSteps:a,nextEnabled:l,handleNextSlide:c,handleBack:d,restartDemo:h,demo:u,nextslide:p,prevslide:m,textColor:x}=e;if(!a&&!l)return null;let g="justify-between";return a&&!l?g="justify-start":!a&&l&&(g="justify-end"),(0,n.jsx)("div",{className:"text-sm mt-3 oversized-cursor-pointer",children:(0,n.jsxs)("div",{className:(0,r.A)("flex items-center gap-8",g),children:[a&&(0,n.jsx)("div",{className:(0,r.A)(l?"":"mt-1.5"),children:(0,n.jsxs)("span",{id:"current-step-details",className:(0,r.A)("opacity-80"),children:[i+1," of ",s.length]})}),l?s.length!==i+1||(null==u?void 0:null===(t=u.workspace)||void 0===t?void 0:t.plan)===o.Plan.Free||p?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[0===i?(0,n.jsx)("div",{}):(0,n.jsx)("div",{className:"px-2 py-1.5 rounded-md bg-white bg-opacity-20 hover:bg-opacity-40",onClick:e=>d(e,m),id:"previous-button",children:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",children:[(0,n.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,n.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsxs)("g",{id:"SVGRepo_iconCarrier",children:[" ",(0,n.jsx)("path",{d:"M6 12H18M6 12L11 7M6 12L11 17",stroke:x||"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})," "]})]})}),(0,n.jsx)("div",{className:"px-2 py-1.5 rounded-md bg-white bg-opacity-20 hover:bg-opacity-40",onClick:c,id:"next-button",children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",children:(0,n.jsx)("g",{transform:"rotate(180, 12, 12)",children:(0,n.jsx)("path",{d:"M6 12H18M6 12L11 7M6 12L11 17",stroke:x||"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}):(0,n.jsx)("div",{className:"flex justify-center px-3 py-1.5 rounded-md bg-white",onClick:h,id:"replay-button",style:{backgroundColor:"rgba(255, 255, 255, 0.2)"},children:(0,n.jsx)("p",{children:"Replay"})}):null]})})}},31986:function(e,t,i){i.d(t,{M:function(){return h}});var n=i(17090),o=i(2265),r=i(91327),s=i(70750),a=i(49972),l=i.n(a),c=i(87510),d=i(57287);function h(e,t){var a,h,p,m,x,g;let w=(0,s.tm)(),f=(0,c.$)("sm"),v=(0,c.$)("md"),y=(0,c.$)("lg"),b=(0,c.$)("2xl"),j=new URLSearchParams(null===(p=i.g)||void 0===p?void 0:null===(h=p.window)||void 0===h?void 0:null===(a=h.location)||void 0===a?void 0:a.search),C=(null==j?void 0:j.get("embed_v"))||"1",T=!!(null===(x=t.demo)||void 0===x?void 0:null===(m=x.background)||void 0===m?void 0:m.value),k=t.demo.steps&&t.demo.steps.length>0,N=k?t.demo.steps.find(e=>!l()(e.image)||!l()(e.video))||t.demo.steps[0]:null,S=k?t.demo.steps[t.currentStepIndex]:null,z=(null==S?void 0:S.mediaFitMode)||n.MediaFitMode.Cover,E=(null==N?void 0:N.widthOrg)?u(N.widthOrg):1,M=(null==N?void 0:N.heightOrg)?u(N.heightOrg):1;!k||((null==N?void 0:N.widthOrg)&&(null==N?void 0:N.heightOrg)||console.error("First step does not have widthOrg or heightOrg"),(null==S?void 0:S.widthOrg)&&(null==S?void 0:S.heightOrg)||console.error("Current step does not have widthOrg or heightOrg"));let I=(null==S?void 0:S.widthOrg)?u(S.widthOrg):1,_=(null==S?void 0:S.heightOrg)?u(S.heightOrg):1,A=!!(null==S?void 0:S.text),L=(0,o.useRef)(!v),R=(0,s.iP)(),P=R.width>=R.height?"horizontal":"vertical",D=E>M?"horizontal":"vertical",H=(0,s.yU)({ref:t.demoCanvasRef,box:"content-box"}),F="edit"===e&&(null==S?void 0:S.video)?26:0,O={width:u(H.width||(e===d.H.ShowcaseEmbed||e===d.H.Showcase?0:R.width)),height:u(H.height||(e===d.H.ShowcaseEmbed||e===d.H.Showcase?0:R.height))-F};(0,o.useEffect)(()=>{O.width=u(H.width||R.width),O.height=u(H.height||R.height)-F},[H.width,H.height,F]);let B=function(e){let{hasBackground:t,sceneType:i,deviceOrientation:n,hasBorder:o,isTwSm:s,isTwMd:a,isTwLg:l,isTw2Xl:c}=e;if(!t){if(i===d.H.DemoEmbed||i===d.H.Export||i===d.H.ShowcaseEmbed)return o?{x:1,y:1}:{x:0,y:0};if(i===d.H.Demo)return a?{x:32,y:32}:{x:16,y:16}}return(0,r.EQ)({scene:"".concat(i,":").concat(n),isTwMd:a,isTwLg:l,isTw2Xl:c,isTwSm:s}).with({scene:"export:horizontal",isTw2Xl:!0},()=>({x:52,y:52})).with({scene:"export:horizontal",isTwLg:!0},()=>({x:40,y:40})).with({scene:"export:horizontal",isTwMd:!0},()=>({x:32,y:32})).with({scene:"export:horizontal",isTwSm:!0},()=>({x:24,y:24})).with({scene:"export:horizontal"},()=>({x:0,y:0})).with({scene:"export:vertical",isTw2Xl:!0},()=>({x:56,y:56})).with({scene:"export:vertical",isTw2Xl:!0},()=>({x:40,y:40})).with({scene:"export:vertical",isTwLg:!0},()=>({x:40,y:40})).with({scene:"export:vertical",isTwMd:!0},()=>({x:32,y:32})).with({scene:"export:vertical",isTwSm:!0},()=>({x:20,y:20})).with({scene:"export:vertical"},()=>({x:16,y:16})).with({scene:"demo:horizontal",isTw2Xl:!0},()=>({x:64,y:48})).with({scene:"demo:horizontal",isTwLg:!0},()=>({x:48,y:40})).with({scene:"demo:horizontal",isTwMd:!0},()=>({x:32,y:40})).with({scene:"demo:horizontal",isTwSm:!0},()=>({x:24,y:24})).with({scene:"demo:horizontal"},()=>({x:20,y:20})).with({scene:"demo:vertical",isTw2Xl:!0},()=>({x:56,y:56})).with({scene:"demo:vertical",isTwLg:!0},()=>({x:40,y:40})).with({scene:"demo:vertical",isTwMd:!0},()=>({x:28,y:28})).with({scene:"demo:vertical",isTwSm:!0},()=>({x:24,y:24})).with({scene:"demo:vertical"},()=>({x:24,y:24})).with({scene:"demo-embed:horizontal",isTw2Xl:!0},()=>({x:52,y:52})).with({scene:"demo-embed:horizontal",isTwLg:!0},()=>({x:40,y:40})).with({scene:"demo-embed:horizontal",isTwMd:!0},()=>({x:32,y:32})).with({scene:"demo-embed:horizontal",isTwSm:!0},()=>({x:24,y:24})).with({scene:"demo-embed:horizontal"},()=>({x:0,y:0})).with({scene:"demo-embed:vertical",isTw2Xl:!0},()=>({x:56,y:56})).with({scene:"demo-embed:vertical",isTw2Xl:!0},()=>({x:40,y:40})).with({scene:"demo-embed:vertical",isTwLg:!0},()=>({x:40,y:40})).with({scene:"demo-embed:vertical",isTwMd:!0},()=>({x:32,y:32})).with({scene:"demo-embed:vertical",isTwSm:!0},()=>({x:20,y:20})).with({scene:"demo-embed:vertical"},()=>({x:16,y:16})).with({scene:"showcase:horizontal",isTw2Xl:!0},()=>({x:64,y:48})).with({scene:"showcase:horizontal",isTwLg:!0},()=>({x:32,y:32})).with({scene:"showcase:horizontal",isTwMd:!0},()=>({x:24,y:24})).with({scene:"showcase:horizontal"},()=>({x:24,y:24})).with({scene:"showcase:vertical",isTw2Xl:!0},()=>({x:48,y:32})).with({scene:"showcase:vertical",isTwLg:!0},()=>({x:32,y:24})).with({scene:"showcase:vertical",isTwMd:!0},()=>({x:20,y:20})).with({scene:"showcase:vertical"},()=>({x:20,y:20})).with({scene:"showcase-embed:horizontal",isTw2Xl:!0},()=>({x:64,y:48})).with({scene:"showcase-embed:horizontal",isTwLg:!0},()=>({x:32,y:32})).with({scene:"showcase-embed:horizontal",isTwMd:!0},()=>({x:28,y:28})).with({scene:"showcase-embed:horizontal"},()=>({x:20,y:20})).with({scene:"showcase-embed:vertical",isTw2Xl:!0},()=>({x:48,y:32})).with({scene:"showcase-embed:vertical",isTwLg:!0},()=>({x:32,y:24})).with({scene:"showcase-embed:vertical",isTwMd:!0},()=>({x:28,y:28})).with({scene:"showcase-embed:vertical"},()=>({x:20,y:20})).with({scene:"edit:horizontal",isTw2Xl:!0},()=>({x:64,y:56})).with({scene:"edit:horizontal",isTwLg:!0},()=>({x:48,y:48})).with({scene:"edit:horizontal",isTwMd:!0},()=>({x:32,y:32})).with({scene:"edit:vertical",isTw2Xl:!0},()=>({x:48,y:32})).with({scene:"edit:vertical",isTwLg:!0},()=>({x:32,y:24})).with({scene:"edit:vertical",isTwMd:!0},()=>({x:24,y:24})).with({scene:"edit:vertical"},()=>({x:24,y:24})).otherwise(()=>({x:24,y:24}))}({hasBackground:T,sceneType:e,hasBorder:t.demo.border||!1,deviceOrientation:P,isTwSm:f,isTwMd:v,isTwLg:y,isTw2Xl:b}),Z=null===(g=t.demoCanvasRef.current)||void 0===g?void 0:g.children[0],X=e===d.H.Export||B.x>=24&&B.y>=24||((null==Z?void 0:Z.clientWidth)||1)+20<Math.trunc(O.width),$=T&&X;(0,o.useMemo)(()=>v?.9*R.height-2*B.y:.8*R.height-2*B.y,[v,R.height,B.y]);let V={width:0,height:0},G={width:0,height:0},W={height:0,width:0},U=!!t.demo.topBar&&"horizontal"===D&&E>640&&f,q=(U?40:0)+("export"===e?0:(f||"edit"===e)&&(f||"2"!==C)?0:void 0!==t.baseFontSize?2.5*t.baseFontSize:40),Y=u(O.width/O.height);u(E/M);let J=u(E/(M+q));function Q(){if(O.height>0&&O.width>0){if(e===d.H.ShowcaseEmbed&&"1"===C){let e=O.width/E,t=E*e,i=M*e;V.height=i,V.width=t,G.height=i,G.width=t,W.height=i,W.width=t}else{let e=O.height-q,t=Math.min(O.width/E,e/M),i=M*t,o=E*t;if(V.height=i+q,V.width=o,G.height=i,G.width=o,z===n.MediaFitMode.Contain){let e=Math.min(G.height-24,_),t=Math.min(Math.min(G.width-24,I)/I,e/_);W.height=_*t,W.width=I*t}else W.width=G.width,W.height=G.height}L.current=V.width<=640}}Q(),(0,o.useLayoutEffect)(()=>{if(e===d.H.Demo&&ei)requestAnimationFrame(()=>{var e,i,n,o,r,s;null===(i=t.demoCanvasRef.current)||void 0===i||null===(e=i.parentElement)||void 0===e||e.style.setProperty("opacity","0"),null===(o=t.demoCanvasRef.current)||void 0===o||null===(n=o.parentElement)||void 0===n||n.style.setProperty("transition",null),null===(r=t.demoCanvasRef.current)||void 0===r||r.style.setProperty("transition","height 0.15s"),null===(s=t.demoCanvasRef.current)||void 0===s||s.style.setProperty("height","100vh"),Q(),requestAnimationFrame(()=>{var e,i,n,o,r;null===(i=t.demoCanvasRef.current)||void 0===i||null===(e=i.parentElement)||void 0===e||e.style.setProperty("opacity","1"),null===(o=t.demoCanvasRef.current)||void 0===o||null===(n=o.parentElement)||void 0===n||n.style.setProperty("transition","opacity 0.5s 0.5s"),null===(r=t.demoCanvasRef.current)||void 0===r||r.style.setProperty("height","".concat(V.height+q+2*B.y,"px"))})});else{var i;null===(i=t.demoCanvasRef.current)||void 0===i||i.style.setProperty("height","100%"),Q()}},[R.width,R.height,B.y]);let K=u(G.width/(G.height||1)),ee=u(I/_),et=W.width<G.width||W.height<G.height,ei=w()&&(O.width||0)>0&&(O.height||0)>0&&V.width>0&&Math.trunc(V.width)<=Math.trunc(O.width||1)&&Math.trunc(V.height)>0&&Math.trunc(V.height)<=Math.trunc(O.height||1);return{isReady:ei,shouldRenderInMobileMode:L.current,deviceOrientation:P,firstStepOrgWidth:E,firstStepOrgHeight:M,demoCanvasSize:O,demoCanvasAspectRatio:Y,demoCanvasOrientation:Y>=1?"horizontal":"vertical",shouldShowBackground:$,frameExtraHeight:q,controlsHeight:F,hasHotspot:A,innerSpace:B,demoOrientation:D,shouldShowFrame:U,mediaAspectRatio:ee,frameAspectRatio:J,mediaHolderAspectRatio:K,frameStickMode:J>Y?"inline":"block",frameSize:V,mediaSize:W,mediaHolderSize:G,hasSmallerMedia:et,embedVersion:C}}function u(e){return Math.round(1e3*e)/1e3}},87510:function(e,t,i){i.d(t,{$:function(){return c}});var n=i(79933),o=i(5481),r=i.n(o),s=i(7722),a=i.n(s);let l={...r()(a()).theme.screens,landscape:"(orientation: landscape)"},{useBreakpoint:c}=(0,n.Ue)(l)},7722:function(e,t,i){let n=i(67022);e.exports={content:["./app/**/*.{js,ts,jsx,tsx,mdx}","./pages/**/*.{js,ts,jsx,tsx}","./components/**/*.{js,ts,jsx,tsx}","./containers/**/*.{js,ts,jsx,tsx}","./remotion/**/*.{js,ts,jsx,tsx}"],theme:{extend:{fontFamily:{sans:["Inter var",...n.fontFamily.sans],recoleta:["RECOLETA","serif"]},gridTemplateRows:{"animate-height-open":"1fr","animate-height-closed":"0fr"},screens:{landscape:{raw:"(orientation: landscape)"}}},plugins:[]}}},57287:function(e,t,i){i.d(t,{H:function(){return o}});var n,o,r=i(17090);(n=o||(o={})).Demo="demo",n.DemoEmbed="demo-embed",n.Showcase="showcase",n.ShowcaseEmbed="showcase-embed",n.Export="export",r.IntegrationPlatform.GA4},25523:function(e,t,i){i.d(t,{Fd:function(){return o},Ie:function(){return r},Nx:function(){return s},rr:function(){return a}});var n=i(17090);let o=e=>"gated-chapter-value-".concat(e),r=e=>"chapter-password-value-".concat(e);function s(e){let t=e.find(e=>{var t;return(null===(t=e.chapter)||void 0===t?void 0:t.type)===n.ChapterType.Email}),i=!1;return(null==t?void 0:t.chapter)&&(i=!!localStorage.getItem(o(t.chapter.id))),{emailGatedStep:t,hasCompletedGatedStep:i}}function a(e){let t=e.find(e=>{var t;return(null===(t=e.chapter)||void 0===t?void 0:t.type)===n.ChapterType.Password}),i=!1;return(null==t?void 0:t.chapter)&&(i=!!localStorage.getItem(r(t.chapter.id))),{passwordGatedStep:t,hasCompletedPasswordStep:i}}},10648:function(e,t,i){function n(e){for(let t of e)if(t.hotspots&&t.hotspots.length>0)return t.hotspots[0];return null}function o(e){for(let t of e)if(t.hotspots&&t.hotspots.length>0){let e=t.hotspots.find(e=>e.text||e.aiText);if(e)return e}return null}i.d(t,{E:function(){return o},j:function(){return n}})},65833:function(e,t,i){i.d(t,{Ys:function(){return r},_k:function(){return o},w2:function(){return s}});var n=i(59494);let o=e=>{e&&n.ZP.initialize(e,{gtagOptions:{custom_map:{dimension1:"demo_id"}}})},r=e=>{n.ZP.send({hitType:"pageview",page:e})},s=e=>{let{action:t,category:i,label:o,value:r,...s}=e;n.ZP.gtag("event",t,{event_category:i,event_label:o,...s})}}}]);