PageSourceSearch

https://magicstudio.com/_next/static/chunks/8877-0daf0cdbb556a0e3.js

js magicstudio.com collected 2026-10-02 04:13:03 UTC 14,539 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8877],{34499:function(t,e,n){var i=n(20550),a=n(2081),r=n(51403),o=n(94511),s=n(88026),l=n(95855),c=n(43857),u=n(8403),m=n(16660),d=n(14532),g=n(88837),f=n(80394),p=n(29094);e.Z=function(t){var e,n,h,x=(0,c.Z)().t,v=(0,m.useState)(!0),w=v[0],y=v[1],_=(0,m.useState)(),b=_[0],S=_[1],I=null===(n=t.showWaterMark)||void 0===n||n,L=(h=(0,i.Z)(function(t){var e,n,i;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return e=null==t?void 0:t.split("/").pop(),[4,(0,d.t)(t,e)];case 1:return n=a.sent(),[4,(0,g.Nw)(n,e)];case 2:return i=a.sent(),S(URL.createObjectURL(i)),y(!1),[2]}})}),function(t){return h.apply(this,arguments)});(0,m.useEffect)(function(){var e,n;(null===(e=t.subscription)||void 0===e?void 0:e.status)!=="active"&&t.image&&I&&(y(!0),L(t.image)),((null===(n=t.subscription)||void 0===n?void 0:n.status)==="active"&&t.image||!I&&t.image)&&y(!1)},[t.image,t.subscription]);var j=function(){if((0,f.c)("image_downloaded",{source_tool:t.app},[p.C.MS_ANALYTICS]),navigator.share){var e;navigator.share({url:(null===(e=t.subscription)||void 0===e?void 0:e.status)!=="active"&&I?b:t.image,title:"Save Image"}).then(function(){return console.log("Image saved to photos")}).catch(function(t){return console.log("Error sharing image:",t)})}else console.log("Web Share API not supported.")};return(0,r.jsxs)("div",{className:"w-full h-full inset-0 fixed z-40 bg-white",children:[(0,r.jsx)("div",{className:(0,s.Z)("bg-gradient-to-r from-".concat(t.app,"-gradient-start via-").concat(t.app,"-gradient-middle to-").concat(t.app,"-gradient-end h-2 w-full"))}),(0,r.jsxs)("div",{className:"flex flex-col items-center w-full h-full px-4 py-8 relative",children:[(0,r.jsx)("div",{className:"absolute top-4 right-4 md:top-8 md:right-8 p-2 cursor-pointer hover:bg-neutral-100 rounded-lg",onClick:function(){return t.setIsMobileDownloadModalOpen(!1)},children:(0,r.jsx)(o.F,{className:"text-primary text-2xl"})}),(0,r.jsx)(l.aC,{text:x("common:MOBILE_DOWNLOAD_SCREEN_TITLE")}),(0,r.jsx)("p",{className:"text-sm antialiased font-normal text-primary my-4",children:x("common:MOBILE_DOWNLOAD_SCREEN_EXPLAINER")}),((null==t?void 0:t.creatingImageUrlFromFile)||w)&&(0,r.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,r.jsx)(u.Z,{size:160,lineWeight:5,speed:2,color:"#0A1727"})}),!(null==t?void 0:t.creatingImageUrlFromFile)&&!w&&(0,r.jsx)("div",{className:(0,s.Z)("border border-".concat(t.app,"-gradient-end max-h-download-mobile max-w-fit rounded-[0.625rem] p-0.5")),onClick:function(){return j(t.image)},children:(0,r.jsx)("img",{src:(null===(e=t.subscription)||void 0===e?void 0:e.status)!=="active"&&I?b:t.image,alt:"image to download",className:"rounded-lg object-contain max-h-full"})})]})]})}},89299:function(t,e,n){n.d(e,{Z:function(){return u}});var i=n(51403),a=n(2356),r=n.n(a),o=n(43857);function s(t,e){if(!e.faq||0===e.faq.length)return null;for(var n=e.faqLocalePrefix?e.faqLocalePrefix:e.localeSlug,i=e.faqAppPrefix?e.faqAppPrefix:"",a=[],r=1;r<=e.faq.length;r++)a.push({"@type":"Question",name:t("".concat(n,":").concat(i,"FAQ_QUESTION_").concat(r)),acceptedAnswer:{"@type":"Answer",text:t("".concat(n,":").concat(i,"FAQ_ANSWER_").concat(r))}});return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:a}}function l(t,e){if(!e.howItWorksSteps||0===e.howItWorksSteps.length)return null;for(var n=[],i=1;i<=e.howItWorksSteps.length;i++)n.push({"@type":"HowToStep",name:t("".concat(e.localeSlug,":HOW_IT_WORKS_STEP_").concat(i,"_TITLE")),text:t("".concat(e.localeSlug,":HOW_IT_WORKS_STEP_").concat(i,"_DESCRIPTION"))});return{"@context":"https://schema.org","@type":"HowTo",name:t("".concat(e.localeSlug,":HOW_IT_WORKS_SECTION_TITLE")),step:n}}function c(t){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://magicstudio.com/"},{"@type":"ListItem",position:2,name:t,item:"https://magicstudio.com/".concat(t,"/")}]}}var u=function(t){var e=t.appConfig,n=t.noIndex,a=(0,o.Z)().t;return(0,i.jsxs)(r(),{children:[(0,i.jsx)("title",{children:a(e.pageTitle)}),n&&(0,i.jsx)("meta",{name:"robots",content:"noindex"}),(0,i.jsx)("meta",{name:"title",content:a(e.metaTitle)}),(0,i.jsx)("meta",{name:"description",content:a(e.metaDescription)},"description"),(0,i.jsx)("meta",{property:"og:site_name",content:"Magic Studio"},"og:site_name"),(0,i.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,i.jsx)("meta",{property:"og:url",content:e.metaUrl},"og:url"),(0,i.jsx)("meta",{property:"og:title",content:a(e.ogTitle)},"og:title"),(0,i.jsx)("meta",{property:"og:description",content:a(e.ogDescription)},"og:description"),(0,i.jsx)("meta",{property:"og:image",content:e.metaImageUrl},"og:image"),(0,i.jsx)("meta",{name:"twitter:card",content:"summary_large_image"},"twitter:card"),(0,i.jsx)("meta",{name:"twitter:site",content:"@MagicStudio"}
1,"twitter:site"),(0,i.jsx)("meta",{name:"twitter:url",content:e.metaUrl},"twitter:url"),(0,i.jsx)("meta",{name:"twitter:title",content:a(e.twitterTitle)},"twitter:title"),(0,i.jsx)("meta",{name:"twitter:description",content:a(e.twitterDescription)},"twitter:description"),(0,i.jsx)("meta",{name:"twitter:image",content:e.metaImageUrl},"twitter:image"),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:function(t,e){var n=e.enabledStructuredSchema;if(!n||0===n.length)return null;var i=[],a=!0,r=!1,o=void 0;try{for(var u,m=n[Symbol.iterator]();!(a=(u=m.next()).done);a=!0){var d=u.value;try{switch(d){case"FAQ":var g=s(t,e);g&&i.push(g);break;case"HOW_TO":var f=l(t,e);f&&i.push(f);break;case"BREAD_CRUMB_LIST":i.push(c(e.appName))}}catch(p){console.error(p)}}}catch(h){r=!0,o=h}finally{try{a||null==m.return||m.return()}finally{if(r)throw o}}return{__html:JSON.stringify(i)}}(a,e)})]})}},95855:function(t,e,n){n.d(e,{Cd:function(){return s},DI:function(){return p},Eu:function(){return f},H1:function(){return l},H2:function(){return c},H3:function(){return u},H4:function(){return m},H5:function(){return d},XJ:function(){return a},aC:function(){return r},gS:function(){return h},k8:function(){return o},v_:function(){return g}});var i=n(51403);function a(t){return(0,i.jsx)("h2",{className:"font-semibold text-2xl md:text-3xl text-primary antialiased",dangerouslySetInnerHTML:{__html:t.text}})}function r(t){return(0,i.jsx)("h3",{className:"text-primary text-xl md:text-2xl font-[550] font-inter antialiased",dangerouslySetInnerHTML:{__html:t.text}})}function o(t){return(0,i.jsx)("h4",{className:"text-lg md:text-xl font-regular text-primary antialiased",dangerouslySetInnerHTML:{__html:t.text}})}function s(t){return(0,i.jsx)("h6",{className:"text-sm md:text-base font-regular text-primary antialiased",dangerouslySetInnerHTML:{__html:t.text}})}function l(t){return(0,i.jsx)("h1",{className:"font-inter font-medium text-5xl md:text-7xl antialiased text-primary -tracking-[0.022em] ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function c(t){return(0,i.jsx)("h2",{className:"font-inter font-[450] text-3xl md:text-5xl md:leading-[1.15] antialiased text-primary -tracking-[0.021em] md:-tracking-[0.022em] ".concat((null==t?void 0:t.classes)?t.classes:""),style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"},dangerouslySetInnerHTML:{__html:t.text}})}function u(t){return(0,i.jsx)("h2",{className:"font-inter font-medium text-2xl md:text-[2rem] leading-[1.2] antialiased text-primary -tracking-[0.019em] md:-tracking-[0.021em] ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function m(t){return(0,i.jsx)("h3",{className:"font-inter font-medium text-lg md:text-2xl antialiased text-primary leading-6 md:leading-8 -tracking-[0.014em] md:-tracking-[0.019em] ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function d(t){return(0,i.jsx)("h4",{className:"text-primary text-base md:text-lg antialiased font-inter font-[450] -tracking-[0.011em] md:-tracking-[0.014em] ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function g(t){return(0,i.jsx)("h2",{className:"font-inter text-slate-800 font-[350] text-xl md:text-2xl -tracking-[0.017em] md:-tracking-[0.019em] antialiased ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function f(t){return(0,i.jsx)("h3",{className:"font-inter font-[350] text-lg md:text-xl antialiased text-slate-800 -tracking-[0.014em] md:-tracking-[0.017em] ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function p(t){return(0,i.jsx)("h3",{className:"font-inter font-[350] text-slate-800 text-base md:text-lg -tracking-[0.011em] md:-tracking-[0.014em] antialiased ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}function h(t){return(0,i.jsx)("p",{className:"font-inter font-[350] text-slate-800 text-sm md:text-base -tracking-[0.006em] md:-tracking-[0.011em] antialiased ".concat((null==t?void 0:t.classes)?t.classes:""),dangerouslySetInnerHTML:{__html:t.text},style:{fontVariationSettings:"'opsz' 28",textRendering:"optimizeLegibility"}})}},88837:function(t,e,n){n.d(e,{GN:function(){return p},Nm:function(){return c},Nw:function(){return l},qo:function(){return m},sz:function(){return g}});var i=n(20550),a=n(2081),r=n(29094),o=n(80394),s=n(14532);function l(t,e){var n,i=null==t?void 0:null===(n=t.name)||void 0===n?void 0:n.split(".").pop().toLowerCase(),a="image/"+(i="jpg"===i?"jpeg":i),r="MagicStudio",o=new FileReader,s=document.createElement("canvas"),l=s.getContext("2d"),c=new Image,u=function(){s.width=c.width,s.height=c.height,l.imageSmoothingEnabled=!1,l.drawImage(c,0,0);var n=Math.floor(.033*c.height);n=c.width>c.height?Math.floor(.033*c.width):Math.floor(.033*c.height),l.font=n+"px KumbhSans",l.textAlign="right";for(var i=n,o=l.measureText(r).width,u=Math.floor(.03*c.height),m=s.width-u,d=s.height-u,g=l.getImageData(m-o,d-i,o,i).data,f=0,p=0,h=0,x=0,v=0;v<g.length;v+=4)f+=g[v],p+=g[v+1],h+=g[v+2],x++;f=Math.floor(f/x);var w=(f+(p=Math.floor(p/x))+(h=Math.floor(h/x)))/3;l.fillStyle=w>128?"#0A1727":"white",l.fillText(r,m,d);var y=function(t){for(var e=t.split(",")[0].split(":")[1].split(";")[0],n=atob(t.split(",")[1]),i=[],a=0;a<n.length;a+=1)i.push(n.charCodeAt(a));return new Blob([new Uint8Array(i)],{type:e})}(s.toDataURL(a));return new File([y],e,{type:t.type})};
1return new Promise(function(e,n){if(!t.type.match(/image.*/)){n(Error("Not an image"));return}o.onload=function(t){c.src=t.target.result,c.onload=function(){var t=new FontFace("KumbhSans","url(https://fonts.gstatic.com/s/kumbhsans/v12/c4mw1n92AsfhuCq6tVsaoIx1CHIi4kToNoo0TRNPVoswOlXC22Y.woff)");document.fonts.add(t),t.load("12px KumbhSans").then(function(){e(u())})}},o.readAsDataURL(t)})}function c(t,e){return u.apply(this,arguments)}function u(){return(u=(0,i.Z)(function(t,e){var n,i,c,u,m,d,g,f=arguments;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if(n=f.length>2&&void 0!==f[2]&&f[2],i=f.length>3?f[3]:void 0,c=t,u=e||(null==t?void 0:t.split("/").pop()),n)return[3,3];return[4,(0,s.t)(t,u)];case 1:return[4,l(a.sent(),u)];case 2:c=a.sent(),a.label=3;case 3:return d=n?c:URL.createObjectURL(c),(g=document.createElement("a")).href=d,g.download=u,g.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),(0,o.c)("image_downloaded",{source_tool:i},[r.C.MS_ANALYTICS]),setTimeout(function(){g.remove()},100),[2]}})})).apply(this,arguments)}function m(t,e){return d.apply(this,arguments)}function d(){return(d=(0,i.Z)(function(t,e){var n,i,s,c,u=arguments;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if(n=u.length>2&&void 0!==u[2]&&u[2],i=u.length>3?u[3]:void 0,console.log("start downloadImageFileWithWatermark"),console.log("file",t),n)return[3,2];return[4,l(t,e)];case 1:t=a.sent(),a.label=2;case 2:return s=window.URL.createObjectURL(t),console.log("file",t),console.log("name",e),console.log("url",s),(c=document.createElement("a")).href=s,c.download=e,c.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),(0,o.c)("image_downloaded",{source_tool:i},[r.C.MS_ANALYTICS]),setTimeout(function(){c.remove()},100),[2]}})})).apply(this,arguments)}function g(t,e){return f.apply(this,arguments)}function f(){return(f=(0,i.Z)(function(t,e){var n,i,c,u,m,d,g,f,p=arguments;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if(n=p.length>2&&void 0!==p[2]&&p[2],i=p.length>3?p[3]:void 0,m=t,u=t.startsWith("data:")?(0,t.split(",")[0].split(":")[1].split(";")[0]).split("/")[1]:t.split(".").pop(),n)return[3,3];return[4,(0,s.t)(t,e+"."+u)];case 1:return[4,l(a.sent(),e+"."+u)];case 2:c=a.sent(),m=URL.createObjectURL(c),a.label=3;case 3:return(f=document.createElement("a")).href=m,f.download=e+"."+u,f.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),(0,o.c)("image_downloaded",{source_tool:i},[r.C.MS_ANALYTICS]),setTimeout(function(){f.remove()},100),[2]}})})).apply(this,arguments)}function p(t,e,n){var i=document.createElement("a");i.href=t,i.download=e,i.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),(0,o.c)("image_downloaded",{source_tool:n},[r.C.MS_ANALYTICS]),setTimeout(function(){i.remove()},100)}},14532:function(t,e,n){n.d(e,{t:function(){return r}});var i=n(20550),a=n(2081);function r(t,e){return o.apply(this,arguments)}function o(){return(o=(0,i.Z)(function(t,e){var n,i,r,o;return(0,a.__generator)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,fetch(t)];case 1:if(!(n=a.sent()).ok)throw Error("HTTP error! status: ".concat(n.status));return[4,n.blob()];case 2:return i=a.sent(),[2,new File([i],e||(null==t?void 0:t.split("/").pop()),{type:"image/jpeg"})];case 3:throw o=a.sent(),console.error("Fetch Error: ",o),o;case 4:return[2]}})})).apply(this,arguments)}}}]);

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.