"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3836,82],{69474:function(e,n,t){var i=t(85893),r=t(51430),s=t(71293),o=t(73582),l=t(99603),a=t(67294);n.Z=e=>{let{title:n,icon:t,step:o,onClick:a,active:d,pass:p,disabled:u}=e;return(0,i.jsx)(r.K,{onClick:()=>!u&&a&&a(),userSelect:"none",cursor:u?"default":"pointer",px:{base:2,md:0},py:1.5,borderRadius:"8px",_hover:{bg:"#F2F6FE"},opacity:u?.5:1,children:(0,i.jsxs)(r.K,{alignItems:"center",justifyContent:"center",spacing:1.5,children:[(0,i.jsxs)(r.K,{direction:{base:"row",md:"column"},spacing:.5,children:[(0,i.jsx)(s.x,{color:d?"#0543F5":"#121212",fontSize:{base:"14px",md:"16px"},children:(0,i.jsx)(l.G,{icon:t,size:"lg"})}),Boolean(o)&&(0,i.jsx)(r.K,{display:{base:"none",md:"flex"},alignItems:"center",children:(0,i.jsx)(c,{pass:p,step:o,active:d})})]}),(o||n)&&(0,i.jsxs)(r.K,{direction:"row",alignItems:"center",spacing:1,children:[Boolean(o)&&(0,i.jsx)(r.K,{display:{base:"flex",md:"none"},children:(0,i.jsx)(c,{pass:p,step:o,active:d})}),n&&(0,i.jsx)(s.x,{fontSize:12,fontWeight:d?700:400,whiteSpace:"pre-line",textAlign:"center",children:n})]})]})})};const c=e=>{let{step:n,active:t,pass:c}=e;return(0,i.jsxs)(a.Fragment,{children:[!c&&(0,i.jsx)(r.K,{border:t?"1px solid #0543F5":"1px solid #121212",h:{base:"14px",md:"18px"},w:{base:"14px",md:"18px"},backgroundColor:t?"#0543F5":"#fff",borderRadius:16,justifyContent:"center",alignItems:"center",children:(0,i.jsx)(s.x,{color:t?"#fff":"#121212",fontSize:{base:8,md:12},lineHeight:"125%",align:"center",children:n})}),c&&(0,i.jsx)(r.K,{bg:"#24CC65",h:{base:"14px",md:"18px"},w:{base:"14px",md:"18px"},borderRadius:16,border:"1px solid #24CC65",justifyContent:"center",alignItems:"center",children:(0,i.jsx)(s.x,{color:"#fff",children:(0,i.jsx)(l.G,{icon:o.LEp,size:"xs"})})})]})}},20082:function(e,n,t){t.r(n);var i=t(85893),r=t(67294),s=t(99477),o=t(69365),l=t(77836),a=t(87011),c=t(57747),d=t(27239),p=t(81136),u=t(99603),h=t(65735);const x=(0,r.forwardRef)((function(e,n){const{width:t=350,height:x=350,modelUrl:g,isRotate:m=!0}=e,f=(0,r.useRef)(null),j=(0,r.useRef)(),b=(0,r.useRef)(),w=(0,r.useRef)(),v=(0,r.useRef)(),y=(0,r.useRef)(),S=(0,r.useRef)(),[F,C]=(0,r.useState)(!0),[E,R]=(0,r.useState)(!1);(0,r.useEffect)((()=>{if(f.current)return A(),I;z(!1,!0)}),[g,t,x]),(0,r.useEffect)((()=>{v.current&&(v.current.enableRotate=null===m||void 0===m||m)}),[m]);const T=e=>{e.preventDefault(),z(!1,!0)},A=()=>{if(!f.current)return void z(!1,!0);const e=new s.CP7({antialias:!0,alpha:!0});e.setSize(t,x),e.setClearColor(0,0),f.current.appendChild(e.domElement),j.current=e;const n=new s.xsS;b.current=n;const i=new s.cPb(75,t/x,.1,1e3);i.position.set(1,1,1),w.current=i;const r=new o.z(i,e.domElement);r.enablePan=!1,r.enableZoom=!0,r.enableRotate=m,v.current=r;const l=new s.Mig(4210752,2);n.add(l);const a=new s.Ox3(16777215,2);a.position.copy(i.position),n.add(a),y.current=a,K(g,n,r),e.domElement.addEventListener("webglcontextlost",T,!1);const c=()=>{e&&r&&n&&i&&(r.update(),e.render(n,i),a.position.copy(i.position),a.target.position.copy(r.target),a.target.updateMatrixWorld(),requestAnimationFrame(c))};c()},K=(e,n,t)=>{var i;z(!0,!1);const r=null===(i=null===e||void 0===e?void 0:e.split(".").pop())||void 0===i?void 0:i.toLowerCase();let o;if("glb"===r||"gltf"===r)o=new l.E;else{if("obj"!==r)return void z(!1,!0);o=new a.L}o.load(e,(e=>{S.current&&n.remove(S.current),e.scene?S.current=e.scene:S.current=e,n.add(S.current);const i=(new s.ZzF).setFromObject(S.current).getCenter(new s.Pa4);t.target.copy(i),z(!1,!1)}),void 0,(e=>{z(!1,!0)}))},z=(e,n)=>{C(e),R(n)},I=()=>{j.current&&j.current.dispose(),v.current&&v.current.dispose(),f.current&&f.current.removeEventListener("webglcontextlost",T,!1)};return(0,r.useImperativeHandle)(n,(()=>({captureImage:()=>j.current&&b.current&&w.current?(z(!1,!1),j.current.render(b.current,w.current),j.current.domElement.toDataURL("image/png")):(z(!1,!0),null)}))),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(c.xu,{ref:f,w:t,h:x,position:"relative",children:F?(0,i.jsx)(c.xu,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",children:(0,i.jsx)(d.M,{w:"full",h:"full",children:(0,i.jsx)(p.$,{size:"lg",color:"primary.0"})})}):E?(0,i.jsx)(d.M,{color:"red",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",children:(0,i.jsx)(u.G,{icon:h.xHz})}):null})})}));n.default=x},67893:function(e,n,t){t.d(n,{P:function(){return y}});var i,r=t(32692),s=t(85893),o=t(16829),l=t(22339),a=t(51430),c=t(27239),d=t(79970),p=t(38942),u=(t(67294),t(99603)),h=t(68779),x=t(88741),g=t(43382),m=t(21997),f=t(11163),j=t(70939),b=t(20082),w=t(66540);function v(){const e=(0,r.Z)(["\n  .upload-widget__root {\n    max-width: ",';\n    @media screen and (min-width: 1440px) {\n      width: 100%;\n    }\n    input[type="file" i]::-webkit-file-upload-button {\n      cursor: pointer;\n    }\n  }\n  .upload-widget__widget-base {\n    left: 0;\n    right: 0;\n  }\n  .upload-widget__widget-base--draggable {\n    border: 1px dashed #e8eaed;\n    border-radius: 8px;\n  }\n  .text-secondary {\n    text-align: center;\n    line-height: 140%;\n  }\n']);return v=function(){return e},e}const y=(0,o.Z)(l.UploadDropzone)(v(),(e=>null!==(i=e.width)&&void 0!==i?i:"226px"));n.Z=e=>{let{value:n,text:t,width:i="230px",maxPreview:r=!1,showClear:o=!0,onChange:l,onClear:v,is3D:S=!1}=e;const{userData:F}=(0,g.Z)(),C=(0,f.useRouter)();return(0,s.jsxs)(a.K,{position:"relative",justifyContent:"center",children:[n&&(0,s.jsxs)(c.M,{width:"100%",children:[S?(0,s.jsx)(b.default,{modelUrl:n,width:250,height:250,isRotate:!0}):(0,s.jsx)(d.E,{src:n,alt:"image",h:r?"unset":"172px",width:i,objectFit:"cover",borderRadius:"8px",border:"1px solid #e1e1e1"}),o&&(0,s.jsx)(p.z,{variant:"ghost",position:"absolute",right:2,top:2,size:"sm",colorScheme:"gray",onClick:v,children:(0,s.jsx)(u.G,{icon:h.EOp,size:"sm"})})]}),!n&&(0,s.jsx)(y,{options:S?x.BU:x.A8,height:"172px",onUpdate:async e=>{let{uploadedFiles:n}=e;if(!F)return(0,m.Sk)(C.asPath),void C.push(j.Z6.AUTH);if(0!==n.length)if(l(n[0].fileUrl),S){const e=n[0].fileUrl;l(e)}else{const e=await(0,w.d)(n[0].fileUrl);l(e.url)}},width:i})]})}},66540:function(e,n,t){t.d(n,{d:function(){return i}});const i=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;if(!e.includes("upcdn.io"))return{url:e,width:0,height:0};const t=new Image;return new Promise(((i,r)=>(t.onload=function(){const r=t.width,s=t.height;let o,l;r>s&&r>n?(o=n,l=Math.round(s/r*n),i({url:(null===e||void 0===e?void 0:e.replace("/raw/","/image/"))+"?w=".concat(o,"&h=").concat(l),width:r,height:s})):s>r&&s>n?(l=n,o=Math.round(r/s*n),i({url:(null===e||void 0===e?void 0:e.replace("/raw/","/image/"))+"?w=".concat(o,"&h=").concat(l),width:r,height:s})):i({url:e,width:r,height:s})},t.onerror=function(){r(new Error("Error loading the image."))},t.src=e,{})))}},88741:function(e,n,t){t.d(n,{A8:function(){return i},BU:function(){return o},Bg:function(){return s},u0:function(){return r}});const i={apiKey:"public_FW25cFN3Z1q3kqjjnySqJ6MSsXaJ",maxFileCount:1,mimeTypes:["image/png","image/jpeg"],maxFileSizeBytes:20971520,editor:{images:{crop:!1}},styles:{colors:{primary:"#0543F5",active:"#0030b0"},fontSizes:{base:12}},locale:{uploadImage:"Upload",orDragDropImage:"JPG, PNG, formats",cancel:"Cancel"}},r={apiKey:"public_FW25cFN3Z1q3kqjjnySqJ6MSsXaJ",maxFileCount:1,mimeTypes:["image/png","image/jpeg"],maxFileSizeBytes:20971520,editor:{images:{crop:!0,cropShape:"circ",cropRatio:1}},styles:{colors:{primary:"#0543F5",active:"#0030b0"},fontSizes:{base:12}},locale:{uploadImage:"Upload",orDragDropImage:"JPG, PNG, formats. Up to 20 MB",cancel:"Cancel"}},s={apiKey:"public_FW25cFN3Z1q3kqjjnySqJ6MSsXaJ",maxFileCount:1,mimeTypes:["application/pdf"],maxFileSizeBytes:104857600,editor:{images:{crop:!1}},styles:{colors:{primary:"#121212",active:"#222222"},fontSizes:{base:12}},locale:{uploadFileBtn:"Upload your portfolio",orDragDropFile:"Drag and drop your file here. PDF supported, up to 100 MB",cancel:"Cancel"}},o={apiKey:"public_FW25cFN3Z1q3kqjjnySqJ6MSsXaJ",maxFileCount:1,maxFileSizeBytes:15728640,mimeTypes:["*"],editor:{images:{crop:!1}},styles:{colors:{primary:"#0543F5",active:"#0030b0"},fontSizes:{base:12}},locale:{uploadFileBtn:"Upload",orDragDropFile:"OBJ, GLB, GLTF formats",cancel:"Cancel"}}},11919:function(e,n,t){t.d(n,{Z:function(){return T}});var i=t(85893),r=t(69474),s=t(70939),o=t(30836),l=t(83589),a=t(61213),c=t(66205),d=t(54346),p=t(51430),u=t(71293),h=t(38942),x=t(41664),g=t.n(x);var m=e=>{let{isOpen:n,onClose:t,data:r}=e;return(0,i.jsxs)(o.u_,{closeOnOverlayClick:!0,blockScrollOnMount:!1,isOpen:n,onClose:t,size:"lg",isCentered:!0,children:[(0,i.jsx)(l.Z,{}),(0,i.jsxs)(a.h,{borderRadius:"16px",m:4,minW:{base:"auto",lg:"800px"},children:[(0,i.jsx)(c.o,{onClick:t,top:3,right:3}),(0,i.jsx)(d.f,{p:"24px",children:(0,i.jsxs)(p.K,{spacing:4,children:[(0,i.jsxs)(p.K,{spacing:1,children:[(0,i.jsx)(u.x,{fontSize:24,fontWeight:700,align:"center",children:"Quick start video"}),(0,i.jsx)(u.x,{fontSize:14,fontWeight:400,color:"#656B8A",align:"center",children:"Let\u2019s learn how to use this features to know how to get the best results."})]}),(0,i.jsx)(p.K,{borderRadius:"16px",overflow:"hidden",height:{base:"232px",sm:"330px",md:"420px",xl:"390px"},children:(0,i.jsx)("iframe",{width:"100%",height:"100%",src:null===r||void 0===r?void 0:r.video,title:"YouTube video player",allowFullScreen:!0})}),(0,i.jsxs)(p.K,{direction:"row",spacing:4,children:[(0,i.jsx)(p.K,{width:"100%",children:(0,i.jsx)(g(),{href:s.Z6.TUTORIALS,children:(0,i.jsx)(h.z,{width:"100%",height:"48px",rounded:"8px",children:"Go to tutorial list"})})}),(0,i.jsx)(h.z,{onClick:t,width:"100%",height:"48px",children:"I\u2019ll try by myself"})]})]})})]})]})},f=t(67294),j=t(64529),b=t(782);const w={spaceGenerate:!0,styleTransfer:!0,collageToRender:!0,editAndFill:!0},v=(0,j.Ue)((0,b.tJ)((e=>({...w,setSpaceGenerate:n=>e({spaceGenerate:n}),setStyleTransfer:n=>e({styleTransfer:n}),setCollageToRender:n=>e({collageToRender:n}),setEditAndFill:n=>e({editAndFill:n}),clearStore:()=>e({...w})})),{name:"app-tutorial-store"}));var y=()=>{const{spaceGenerate:e,setSpaceGenerate:n,styleTransfer:t,setStyleTransfer:i,collageToRender:r,setCollageToRender:s,editAndFill:o,setEditAndFill:l}=v();return{spaceGenerate:e,onVisibleSpaceGenerate:()=>{n(!1)},styleTransfer:t,onVisibleStyleTransfer:()=>{i(!1)},collageToRender:r,onVisibleCollageToRender:()=>{s(!1)},editAndFill:o,onVisibleEditAndFill:()=>{l(!1)}}},S=t(98303),F=t(22797),C=t(27239),E=t(49289),R=t(65735);var T=e=>{let{id:n,children:t,showAdvance:o,isAdvance:l,handleChangeAdvance:a,showSetting:c,settingSection:d,showOption:h,optionSection:x,disabled:g,showTutorial:j,tutorial:b}=e;const w=(0,S.S)({base:!0,md:!1}),{spaceGenerate:v,onVisibleSpaceGenerate:T,collageToRender:A,onVisibleCollageToRender:K,styleTransfer:z,onVisibleStyleTransfer:I,editAndFill:N,onVisibleEditAndFill:k}=y(),[_,D]=(0,f.useState)(!1),G=()=>{D(!0)};(0,f.useEffect)((()=>{(v&&n===s.Ns.SPACE_GENERATOR||A&&n===s.Ns.COLLAGE_TO_RENDER||z&&n===s.Ns.TRANSFER_STYLE||N&&n===s.Ns.EDIT_AND_FILL)&&D(!0)}),[v,A,z,N]);return(0,i.jsxs)(f.Fragment,{children:[(0,i.jsx)(p.K,{height:"calc(100svh - 66px)",minW:"84px",w:"84px",borderRight:"1px solid #E8EAED",bg:"#fff",justifyContent:"space-between",alignItems:"center",overflowY:"auto",display:{base:"none",md:"flex"},children:(0,i.jsxs)(p.K,{direction:{base:"row",md:"column"},spacing:2,alignItems:"center",w:"100%",children:[o&&(0,i.jsxs)(f.Fragment,{children:[(0,i.jsxs)(p.K,{pt:5,alignItems:"center",className:w?"":"advance-tab",children:[(0,i.jsx)(F.r,{colorScheme:"spacelime",isChecked:l,isDisabled:g,onChange:e=>{var n;return a&&a(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.checked)}}),(0,i.jsx)(p.K,{direction:"row",spacing:1,alignItems:"center",children:(0,i.jsx)(u.x,{fontWeight:400,fontSize:12,color:"#121212",children:"Advanced"})})]}),(0,i.jsx)(C.M,{w:"52px",children:(0,i.jsx)(E.i,{})})]}),c&&(0,i.jsxs)(f.Fragment,{children:[(0,i.jsxs)(p.K,{direction:{base:"row",md:"column"},spacing:8,alignItems:"center",w:"100%",pt:2,pb:4,children:[(0,i.jsx)(u.x,{color:"#656B8A",fontWeight:700,fontSize:10,display:{base:"none",md:"block"},children:"SETTINGS"}),(0,i.jsx)(p.K,{spacing:6,w:"100%",className:w?"":"renovate-settings-tab",px:1,children:d})]}),(0,i.jsx)(C.M,{w:"52px",children:(0,i.jsx)(E.i,{})})]}),h&&(0,i.jsx)(f.Fragment,{children:(0,i.jsxs)(p.K,{spacing:8,alignItems:"center",w:"100%",pb:4,children:[(0,i.jsx)(u.x,{color:"#656B8A",fontWeight:700,fontSize:10,display:{base:"none",md:"block"},children:"OPTIONAL"}),(0,i.jsx)(p.K,{spacing:6,w:"100%",px:1,children:x})]})}),j&&(0,i.jsx)(f.Fragment,{children:(0,i.jsx)(p.K,{spacing:8,alignItems:"center",w:"100%",pb:4,children:(0,i.jsx)(p.K,{spacing:6,w:"100%",px:1,children:(0,i.jsx)(r.Z,{icon:R.Rcg,onClick:G})})})}),t]})}),(0,i.jsx)(p.K,{bottom:0,minWidth:"100vw",width:"100vw",position:"fixed",height:"62px",borderRight:"1px solid #E8EAED",bg:"#fff",boxShadow:"0px 0px 20px 6px #EAEAEA",display:{base:"flex",md:"none"},zIndex:1,className:w?"renovate-settings-tab advance-tab":"",children:(0,i.jsxs)(p.K,{overflowX:"auto",height:"100%",direction:"row",alignItems:"center",justifyContent:"space-between",children:[o&&(0,i.jsx)(f.Fragment,{children:(0,i.jsx)(p.K,{px:4,children:(0,i.jsxs)(p.K,{alignItems:"center",children:[(0,i.jsx)(F.r,{isDisabled:g,size:"sm",colorScheme:"spacelime",isChecked:l,onChange:e=>{var n;return a&&a(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.checked)}}),(0,i.jsx)(p.K,{direction:"row",spacing:1,alignItems:"center",children:(0,i.jsx)(u.x,{fontWeight:400,fontSize:12,color:"#121212",children:"Advanced"})})]})})}),c&&(0,i.jsx)(f.Fragment,{children:d}),h&&(0,i.jsx)(f.Fragment,{children:x}),j&&(0,i.jsx)(f.Fragment,{children:(0,i.jsx)(p.K,{alignItems:"center",children:(0,i.jsx)(r.Z,{title:"Tutorial",active:_,icon:R.Rcg,onClick:G})})})]})}),(0,i.jsx)(m,{data:b,isOpen:_,onClose:()=>{D(!1),n===s.Ns.SPACE_GENERATOR?T():n===s.Ns.COLLAGE_TO_RENDER?K():n===s.Ns.TRANSFER_STYLE?I():n===s.Ns.EDIT_AND_FILL&&k()}})]})}}}]);