PageSourceSearch

https://viralsauce.ai/static/js/833.c5a3e861.chunk.js

js viralsauce.ai collected 2026-10-05 13:15:33 UTC 12,247 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkviralsauce=self.webpackChunkviralsauce||[]).push([[833],{833:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var o=r(7353),i=r(5043),s=r(2250),n=r(2220),l=r(1637),c=r(2851),d=r(7392),a=r(5865),m=r(6591),p=r(2890),h=r(8988),x=r(7621),u=r(3438),g=r(692),f=r(2488),j=r(3135),A=r(8469),w=r(7927),y=r(579);function b(e){let{product:t,updateProduct:r,nextStep:b}=e;const S=(0,w.D)(),C=(0,s.Zp)(),[v,k]=(0,i.useState)(!1),[z,I]=(0,i.useState)(!1),[W,_]=(0,i.useState)("English"),[F,R]=(0,i.useState)(null),[E,N]=(0,i.useState)("100px"),D=()=>{C(-1)};return(0,y.jsxs)(o.A,{sx:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:[(0,y.jsx)(n.A,{sx:e=>({zIndex:999}),open:v,onClick:()=>k(!1),children:(0,y.jsx)(l.A,{color:"inherit"})}),(0,y.jsxs)(c.A,{sx:{width:"100%",maxWidth:"665px",height:"100%",m:"0 auto"},children:[(0,y.jsxs)(c.A,{direction:"row",sx:{borderBottom:"0.01rem solid",borderColor:S.palette.grey[25],p:"0 0.04rem",bgcolor:S.palette.background.default,position:"sticky",top:0,left:0,zIndex:10},children:[(0,y.jsx)(d.A,{sx:{p:"0.1rem"},onClick:D,children:(0,y.jsx)(x.A,{sx:{fontSize:"0.24rem",color:S.palette.primary[4]}})}),(0,y.jsx)(o.A,{flexGrow:"1",overflow:"hidden",p:"0 0.04rem",children:(0,y.jsx)(a.A,{sx:{textAlign:"center",fontSize:"0.18rem",color:S.palette.primary[5],lineHeight:"0.44rem",fontWeight:600},className:"ellipsis",children:"Generate Script"})}),(0,y.jsx)(d.A,{sx:{p:"0.1rem"},onClick:D,children:(0,y.jsx)(u.A,{sx:{fontSize:"0.24rem",color:S.palette.primary[4]}})})]}),(0,y.jsxs)(o.A,{sx:{p:"0.12rem 0.16rem"},children:[(0,y.jsx)(a.A,{sx:{color:S.palette.primary[5],fontWeight:700},children:"Select Product"}),(0,y.jsxs)(c.A,{direction:"row",sx:{p:"0.08rem 0.1rem",border:"0.01rem solid "+S.palette.grey[32],borderRadius:"0.04rem",mt:"0.08rem",alignItems:"center",gap:"0.12rem",cursor:"pointer"},onClick:()=>I(!0),children:[t&&(0,y.jsx)(m.A,{component:"img",src:t.cover_img_link,sx:{width:"32px",height:"32px",border:"0.01rem solid #EAECF0"}}),(0,y.jsx)(o.A,{flexGrow:"1",overflow:"hidden",children:(0,y.jsx)(a.A,{sx:{color:S.palette.primary[5],fontWeight:400},className:"ellipsis",children:t?t.name:"Select Product"})}),(0,y.jsx)(g.A,{sx:{fontSize:"0.24rem",color:S.palette.primary[4]}})]})]}),(0,y.jsx)(o.A,{sx:{width:"100%",height:"5px",bgcolor:S.custom.bd_3}}),(0,y.jsxs)(o.A,{sx:{p:"0.12rem 0.16rem"},children:[(0,y.jsx)(a.A,{sx:{color:S.palette.primary[5],fontWeight:700},children:"Language"}),(0,y.jsxs)(c.A,{direction:"row",sx:{p:"0.08rem 0.1rem 0.08rem 0.12rem",border:"0.01rem solid "+S.palette.grey[32],borderRadius:"0.04rem",mt:"0.08rem",alignItems:"center",gap:"0.12rem",cursor:"pointer"},onClick:e=>{R(e.currentTarget),N(e.currentTarget.offsetWidth+"px")},children:[(0,y.jsx)(o.A,{flexGrow:"1",overflow:"hidden",children:(0,y.jsx)(a.A,{sx:{color:S.palette.primary[5],fontWeight:400},className:"ellipsis",children:W})}),(0,y.jsx)(g.A,{sx:{fontSize:"0.24rem",color:S.palette.primary[4]}})]}),(0,y.jsx)(p.A,{anchorEl:F,open:!!F,onClose:()=>R(null),sx:{"& .MuiPaper-root":{boxShadow:"none",borderRadius:"0.1rem",width:E},"& .MuiList-root":{padding:"0 !important"}},children:["English","Spanish","Portuguese"].map((e=>(0,y.jsx)(h.A,{onClick:()=>{_(e),R(null)},sx:{color:S.palette.primary[5],bgcolor:S.palette.grey[26],borderColor:S.palette.grey[32]+" !important"},children:e},e)))})]}),(0,y.jsx)(o.A,{sx:{width:"100%",height:"5px",bgcolor:S.custom.bd_3}}),(0,y.jsx)(o.A,{sx:{width:"100%",flexGrow:"1"}}),(0,y.jsx)(o.A,{sx:{p:"0.2rem 0.16rem"},children:(0,y.jsx)(A.B7,{sx:{width:"100%",mt:"0.2rem"},onClick:async()=>{if(!t)return;sessionStorage.setItem("video:script",JSON.stringify({product:t,video:null}));let e=window.location.pathname+"?productid="+t.product_id+"&lang="+W;window.history.replaceState(null,"",e),b("two")},children:"Next"})})]}),(0,y.jsx)(f.A,{placement:"right",open:z,closeIcon:!1,getContainer:document.getElementById("root")||void 0,destroyOnClose:!0,onClose:()=>I(!1),rootStyle:{position:"absolute"},styles:{wrapper:{height:"100%",overflow:"hidden",width:"400px"},body:{padding:"0",backgroundColor:S.palette.grey[26]}},children:(0,y.jsx)(j.A,{onClose:()=>I(!1),videoInfo:null,onChange:e=>{r(e),I(!1)}})})]})}var S=r(9379),C=r(2692),v=r(8606),k=r(3485);function z(e){let{selectFlow:t,onClose:r,updateFlow:s}=e;const n=(0,w.D)(),[l,m]=(0,i.useState)(-1);return(0,y.jsxs)(c.A,{sx:{overflow:"hidden",height:"100%",position:"relative"},children:[(0,y.jsxs)(o.A,{sx:{p:"0.08rem 0.08rem 0.28rem",position:"relative"},children:[(0,y.jsx)(a.A,{sx:{textAlign:"center",fontSize:"0.18rem",color:n.palette.primary[5],lineHeight:"0.28rem",fontWeight:600},children:"More ideas from framework"}),(0,y.jsx)(d.A,{sx:{position:"absolute",top:"0",right:"0.04rem",p:"0.1rem"},onClick:r,children:(0,y.jsx)(u.A,{sx:{fontSize:"0.24rem",color:n.palette.primary[4]}})})]}),(0,y.jsxs)(o.A,{sx:{flexGrow:"1",overflow:"auto",p:"0 0.2rem 1rem"},children:[(0,y.jsx)(a.A,{sx:{fontWeight:"700",lineHeight:"0.2rem",color:n.palette.primary[5]},children:t.checkoutFlow.name}),(0,y.jsx)(a.A,{sx:{fontWeight:"400",color:n.palette.primary[5],m:"0.04rem 0 0.18rem"},children:t.checkoutFlow.description}),t.children.map(((e,t)=>(0,y.jsxs)(o.A,{sx:{bgcolor:l===t?n.custom.ck_1:n.palette.primary.bg_1,position:"relative",p:"0.16rem 0.16rem 0.16rem",borderRadius:"0.08rem",mb:"0.12rem",cursor:"pointer",overflow:"hidden"},onClick:()=>(e=>{m(e)})(t),children:[(0,y.jsx)(o.A,{sx:{position:"absolute",right:"0.12rem",top:"0.14rem"},children:l===t?(0,y.jsx)(v.A,{sx:{color:"#8135F2",fontSize:"0.2rem"}}):(0,y.jsx)(k.A,{sx:{color:n.palette.grey[32],fontSize:"0.2rem"}})}),t<=1&&(0,y.jsx)(c.A,{direction:"row",mb:"0.08rem",children:(0,y.jsx)(o.A,{sx:{borderRadius:"0.05rem",lineHeight:"0.22rem",bgcolor:"#DDFCE0",color:"#14531D",p:"0 0.08rem"},children:"\ud83d\udd25 Top Choice"})}),(0,y.jsx)(a.A,{sx:{fontSize:"0.16rem",fontWeight:"700",color:n.palette.primary[4]},children:e.name}),(0,y.jsx)(a.A,{sx:{fontSize:"0.12rem",fontWeight:"400",mt:"0.04rem",color:n.palette.grey[34]},children:e.description})]},e.name)))]}),(0,y.jsx)(o.A,{sx:{p:"0.16rem",position:"absolute",bottom:"0",left:"0",width:"100%"},children:(0,y.jsx)(A.B7,{sx:{width:"100%"},disabled:-1===l,onClick:()=>{-1!==l&&(t.checkoutFlow=t.children[l],s(t))},children:-1===l?"Select Option to Continue":"Continue"})})]})}var I=r(1730),W=r(6593);function _(e){let{onClose:t}=e;const r=(0,w.D)(),n=(0,s.Zp)(),m=(0,I.K_)(),[p,h]=(0,i.useState)(""),[g,j]=(0,i.useState)(!1),b=(0,I.nV)(),[_,F]=(0,i.useState)([]),[R,E]=(0,i.useState)({name:"",description:"",children:[],checkoutFlow:{name:"",description:"",order:0,children:[]}}),[N,D]=(0,i.useState)("1"),G=(0,i.useRef)(null);(0,i.useEffect)((()=>{(async()=>{let e=sessionStorage.getItem("video:script");
1if(!e)return;let t=JSON.parse(e);G.current=t.product;let r=await b({body:{product_id:t.product.product_id}});if(D("0"),!r.data||200!==r.status_code)return;let o=r.data.flows.map((e=>(e.checkoutFlow=e.children[0],e)));o=o.sort(((e,t)=>t.checkoutFlow.order-e.checkoutFlow.order)),F(o)})()}),[]);const O=async e=>{if(""===p)return;let t=e;e||(t=_.find((e=>e.name===p)));let r=new URLSearchParams(window.location.search),o=r.get("productid"),i=r.get("lang");if(!t||"2"===N||!o||!i)return;let s=t.checkoutFlow;D("2");let l=await m({body:{action:"Create",adjustment_level:"Very",language:i,product_id:o,message:"",framework:t.name,structure:s.name}});if(!l.data||200!==l.status_code)return void D("0");let c=[{role:"assistant",content:{script:l.data.script}}];sessionStorage.setItem("video:script:history",JSON.stringify(c));const d="/video-script?chat_id=".concat(l.data.chat_id,"&name=").concat(l.data.title);n(d,{replace:!0})};return(0,y.jsxs)(o.A,{sx:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:[(0,y.jsx)(c.A,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",justifyContent:"center",alignItems:"center",bgcolor:r.palette.background.default,zIndex:999,display:"2"===N?"flex":"none"},children:"2"===N&&(0,y.jsx)(W.s,{mode:r.palette.mode,color:r.palette.primary[5],textArr:["Researching product...","Researching category...","Finding top performing videos...","Analyzing videos...","Generating Ideas..."]})}),(0,y.jsxs)(o.A,{sx:{width:"100%",height:"100%",overflow:"auto"},children:[(0,y.jsxs)(c.A,{direction:"row",sx:{borderBottom:"0.01rem solid",borderColor:r.palette.grey[25],p:"0 0.04rem",bgcolor:r.palette.background.default,maxWidth:"665px",width:"100%",m:"0 auto",position:"sticky",top:0,left:0,zIndex:10},children:[(0,y.jsx)(d.A,{sx:{p:"0.1rem"},onClick:t,children:(0,y.jsx)(x.A,{sx:{fontSize:"0.24rem",color:r.palette.primary[4]}})}),(0,y.jsx)(o.A,{flexGrow:"1",overflow:"hidden",p:"0 0.04rem",children:(0,y.jsx)(a.A,{sx:{textAlign:"center",fontSize:"0.18rem",color:r.palette.primary[5],lineHeight:"0.44rem",fontWeight:600},className:"ellipsis",children:"Select Idea"})}),(0,y.jsx)(d.A,{sx:{p:"0.1rem"},onClick:t,children:(0,y.jsx)(u.A,{sx:{fontSize:"0.24rem",color:r.palette.primary[4]}})})]}),(0,y.jsxs)(o.A,{sx:{p:"0.16rem 0.16rem 0.6rem",maxWidth:"665px",width:"100%",m:"0 auto"},children:["1"===N&&(0,y.jsx)(c.A,{sx:{width:"100%",height:"0.6rem",justifyContent:"center",alignItems:"center"},children:(0,y.jsx)(l.A,{})}),_.map(((e,t)=>(0,y.jsxs)(o.A,{sx:{bgcolor:p===e.name?r.custom.ck_1:r.palette.primary.bg_1,borderRadius:"0.08rem",mb:"0.16rem",overflow:"hidden",cursor:"pointer"},onClick:()=>h(e.name),children:[(0,y.jsxs)(o.A,{sx:{position:"relative",p:"0.16rem 0.16rem 0.16rem"},children:[(0,y.jsx)(o.A,{sx:{position:"absolute",right:"0.12rem",top:"0.14rem"},children:p===e.name?(0,y.jsx)(v.A,{sx:{color:"#8135F2",fontSize:"0.2rem"}}):(0,y.jsx)(k.A,{sx:{color:r.palette.grey[32],fontSize:"0.2rem"}})}),t<=1&&(0,y.jsx)(c.A,{direction:"row",mb:"0.08rem",children:(0,y.jsx)(o.A,{sx:{borderRadius:"0.05rem",lineHeight:"0.22rem",bgcolor:"#DDFCE0",color:"#14531D",p:"0 0.08rem"},children:"\ud83d\udd25 Top Choice"})}),(0,y.jsx)(a.A,{sx:{fontSize:"0.16rem",fontWeight:"700",color:r.palette.primary[4]},children:e.checkoutFlow.name}),(0,y.jsx)(a.A,{sx:{fontSize:"0.12rem",fontWeight:"400",mt:"0.04rem",color:r.palette.grey[34]},children:e.checkoutFlow.description})]}),(0,y.jsxs)(c.A,{direction:"row",sx:{height:"0.4rem",alignItems:"center",p:"0 0.1rem",justifyContent:"space-between",borderTop:"0.01rem solid "+r.palette.grey[25]},children:[(0,y.jsx)(o.A,{sx:{overflow:"hidden",bgcolor:r.custom.btn_1,p:"0 0.08rem",borderRadius:"0.05rem"},children:(0,y.jsx)(a.A,{sx:{fontSize:"0.12rem",fontWeight:"400",lineHeight:"0.24rem",color:r.custom.txt_1},className:"ellipsis",children:e.name})}),e.children.length>1&&(0,y.jsxs)(A.QW,{sx:{color:r.palette.grey.txt_1},onClick:()=>{return t=e,j(!0),void E(t);var t},children:[(0,y.jsx)(a.A,{sx:{fontSize:"0.12rem",fontWeight:"600",color:"inherit"},children:t<=1?"\ud83d\udd25 See more":"See more"}),(0,y.jsx)(C.A,{sx:{fontSize:"0.24rem"}})]})]})]},t)))]})]}),(0,y.jsx)(o.A,{sx:{p:"0.16rem",position:"absolute",bottom:"0",left:"0",width:"100%"},children:(0,y.jsx)(A.B7,{sx:{width:"100%",maxWidth:"665px",m:"0 auto"},disabled:!p,onClick:()=>O(),children:p?"Generate Script":"Select Option to Continue"})}),(0,y.jsx)(f.A,{placement:"right",open:g,closeIcon:!1,getContainer:document.getElementById("root")||void 0,destroyOnClose:!0,onClose:()=>j(!1),rootStyle:{position:"absolute"}
1,styles:{wrapper:{height:"100%",overflow:"hidden",width:"400px"},body:{padding:"0",backgroundColor:r.palette.grey[26]}},children:(0,y.jsx)(z,{selectFlow:R,updateFlow:e=>{let t=[..._],r=(0,S.A)({},e),o=t.findIndex((e=>e.name===r.name));t[o]=r,F(t),j(!1),O(r)},onClose:()=>j(!1)})})]})}function F(){const[e,t]=(0,i.useState)("one"),[r,s]=(0,i.useState)(null);return(0,i.useEffect)((()=>{(()=>{const e=sessionStorage.getItem("video:script");if(e){let t=JSON.parse(e);s(t.product)}})()}),[]),(0,y.jsxs)(o.A,{sx:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:["one"===e&&(0,y.jsx)(b,{product:r,updateProduct:s,nextStep:t}),"two"===e&&(0,y.jsx)(_,{onClose:()=>t("one")})]})}},2692:(e,t,r)=>{r.d(t,{A:()=>s});var o=r(6734),i=r(579);const s=(0,o.A)((0,i.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight")}}]);
2//# sourceMappingURL=833.c5a3e861.chunk.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.