1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4309],{1397:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/images/popular/[id]",function(){return n(33830)}])},55987:function(e,t,n){"use strict";var i=n(85893),r=n(67294),a=n(11163),s=n(82785),l=n(98008),o=n(67421),c=n(4298),u=n.n(c);let d=(0,r.memo)(()=>{var e;let{t}=(0,o.$G)("common"),[n,c]=(0,r.useState)(!1),d=(0,a.useRouter)(),g=(null===(e=d.query)||void 0===e?void 0:e.campaign_id)==="openaimusic";(0,r.useEffect)(()=>{if(!1!==d.isReady){if(localStorage.getItem("cookieConsent")){window.uetq?window.uetq.push("consent","update",{ad_storage:"granted"}):setTimeout(()=>{window.uetq&&window.uetq.push("consent","update",{ad_storage:"granted"})},1e3),window.clarity?window.clarity("consent"):setTimeout(()=>{window.clarity&&window.clarity("consent")},1e3);return}g||(0,s.getJson)("/api/geoip").then(e=>{e.country?e.country&&["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK","UK","CH"].includes(e.country)?c(!0):m():c(!0)}).catch(()=>c(!0))}},[d.isReady,g]);let m=()=>{localStorage.setItem("cookieConsent","true"),c(!1),window.clarity&&window.clarity("consent")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u(),{id:"msads",strategy:"afterInteractive",children:'(function(w,d,t,r,u)\n {\n var f,n,i;\n w[u]=w[u]||[],f=function()\n {\n var o={ti:"343110090", enableAutoSpaTracking: true};\n o.q=w[u],w[u]=new UET(o),\n w[u].push(\'consent\', \'default\', {\n \'ad_storage\': \'denied\'\n })\n w[u].push("pageLoad") \n },\n n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function()\n {\n var s=this.readyState;\n s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)\n },\n i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)\n })\n (window,document,"script","//bat.bing.com/bat.js","uetq");\n '}),n&&(0,i.jsxs)(l.Z,{show:n,onHide:()=>c(!1),centered:!0,children:[(0,i.jsx)(l.Z.Header,{closeButton:!0,style:{background:"var(--background)"}}),(0,i.jsx)(l.Z.Body,{children:(0,i.jsxs)("center",{children:[t("cookie-consent"),(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)("button",{className:"submit-btn-2",onClick:m,children:t("accept")})]})})]})]})});d.displayName="CookieConsentEU",t.Z=d},89792:function(e,t,n){"use strict";var i=n(85893);t.Z=e=>(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",gap:"30px",padding:"20px",textAlign:"left"},children:[(0,i.jsx)("img",{src:"/images/data-protection-at-tangra.webp",alt:"We Protect Your Data at Tangra",style:{width:"512px",maxWidth:"100%"}}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{style:{fontSize:"34px"},children:"We Protect Your Data"}),(0,i.jsxs)("ul",{style:{fontSize:"20px",lineHeight:"2"},children:[(0,i.jsx)("li",{style:{listStyleType:"'â '"},children:"Your data is reliably encrypted and stored."}),(0,i.jsx)("li",{style:{listStyleType:"'â '"},children:"Tangra undergoes regular security audits."}),(0,i.jsx)("li",{style:{listStyleType:"'â '"},children:"Cloud architecture that is GDPR compliant."})]})]})]})},64954:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var i=n(85893),r=n(9008),a=n.n(r);n(4298);var s=n(11163),l=n(41664),o=n.n(l),c=n(67294);function u(e){var t;let n=(0,s.useRouter)(),r=e.title?e.title:"Tangra "+(e.subtitle?"".concat(e.subtitle):"Platform"),[l,u]=(0,c.useState)(!1),d=()=>{u(!1),e.onCta?e.onCta():"mock-interview"==e.path?window.location="".concat("https://tangra.link","/mock-interview#start"):"images"==e.path?window.location="".concat("https://tangra.link","/pricing"):"images-pricing"==e.path?window.location="".concat("https://tangra.link","/images"):"music"==e.path?window.location="".concat("https://tangra.link","/pricing"):"music-pricing"==e.path?window.location="".concat("https://tangra.link","/music"):"events"==e.path?window.location="".concat("https://tangra.link","/products/tangra-events#demorequest"):"learning"==e.path?window.location="".concat("https://tangra.link","/products/immersive-learning#demorequest"):"tangra-ai-photo-editor"==e.path?window.location="".concat("https://tangra.link","/photos"):"tangra-ai-studio"==e.path?(saveEvent("studiodemoclick"),window.location="".concat("https://tangra.link","/products/tangra-ai-studio")):window.location="".concat("https://tangra.link","/products")},g=()=>e.ctaLabel?e.ctaLabel:"images"==e.path||"music"==e.path?"Subscribe":e.path&&e.path.endsWith("-pricing")?"Create":"tangra-ai-studio"==e.path?"Book a Meeting":"Get Started",m=null!==(t=e.extraLinks)&&void 0!==t?t:[],p=e=>t=>{var i;t.preventDefault(),u(!1),e.onClick?e.onClick():(null===(i=e.href)||void 0===i?void 0:i.startsWith("#"))?window.location.hash=e.href:n.push(e.href)};return(0,i.jsxs)(i.Fragment,{children:[e.skipHead?"":(0,i.jsxs)(a(),{children:[(0,i.jsx)("title",{children:r}),e.customMetaTags]}),e.hideMenu?"":(0,i.jsx)("div",{className:"header",children:(0,i.jsxs)("div",{className:"header-menu",children:[(0,i.jsx)(o(),{href:"/",passHref:!0,onClick:()=>
1n.push("/"),children:(0,i.jsx)("img",{src:"/logo/tangra-logo-b.png",className:"logo",alt:"Tangra"})}),(0,i.jsxs)("div",{style:{display:"flex",marginLeft:"auto"},children:[(0,i.jsxs)("div",{className:"header-nav-narrow",style:{paddingTop:"0px",marginLeft:"auto",position:"relative"},children:[(0,i.jsx)("button",{className:"top-menu",onClick:()=>u(!l),style:{float:"right"},"aria-label":"Menu",children:(0,i.jsx)("svg",{width:"32",height:"23",viewBox:"0 0 32 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M32 22.1666H21.3333V18.6111H32V22.1666ZM32 0.833313V4.38887H0V0.833313H32ZM32 13.2778H10.6667V9.7222H32V13.2778Z",fill:"#E8056D"})})})," ",(0,i.jsx)("br",{})," ",(0,i.jsx)("br",{}),(0,i.jsxs)("div",{style:{display:l?"block":"none",padding:"20px",position:"absolute",right:0,width:"max-content",zIndex:"1000",background:"var(--background)",padding:"33px 33px 33px 9px"},children:[(0,i.jsx)("button",{className:"top-menu top-menu-popup",onClick:()=>{u(!1),n.push("/about")},children:"About"})," ",(0,i.jsx)("br",{}),(0,i.jsx)("button",{className:"top-menu top-menu-popup",onClick:()=>{u(!1),n.push("/products")},children:"Products"})," ",(0,i.jsx)("br",{}),m.map(e=>(0,i.jsxs)(c.Fragment,{children:[(0,i.jsx)("button",{className:"top-menu top-menu-popup",onClick:p(e),children:e.label})," ",(0,i.jsx)("br",{})]},e.href)),(0,i.jsx)("button",{className:"top-menu top-menu-popup get-started",onClick:d,children:g()})]})]}),(0,i.jsxs)("div",{className:"header-nav-wide",style:{display:"flex",marginLeft:"auto"},children:[(0,i.jsx)("button",{className:"about"===e.path?"top-menu top-menu-selected":"top-menu",onClick:()=>{n.push("/about")},children:"About"}),(0,i.jsx)("button",{className:"products"===e.path?"top-menu top-menu-selected":"top-menu",onClick:()=>{n.push("/products")},children:"Products"}),m.map(e=>(0,i.jsx)("button",{className:"top-menu",onClick:p(e),children:e.label},e.href)),(0,i.jsx)("button",{className:"signup"===e.path?"top-menu top-menu-selected get-started":"top-menu get-started",onClick:d,children:g()})]})]})]})})]})}},25759:function(e,t,n){"use strict";n.d(t,{J:function(){return u}});var i=n(85893),r=n(67294),a=n(67421),s=n(44698),l=n(82785),o=n(2664),c=n(22419);let u=e=>{var t,u;let{t:d}=(0,a.$G)("images"),g=(0,o.v9)(e=>e.images.view),m=e.forceView||g,{viewportWidth:p}=(0,c.n)(),h=p<=1300,[f,w]=(0,r.useState)(!1),[x,j]=(0,r.useState)(1),[M,y]=(0,r.useState)(0),[v,b]=(0,r.useState)([]),[I,N]=(0,r.useState)([]),k=(0,r.useRef)(0),C=(0,r.useRef)(),z=(0,r.useCallback)(async()=>{try{let e=(await (0,l.getJson)("".concat(n.g.serverUrl,"/images/client-reviews?lang=").concat((0,s.G3)(),"&product=").concat(m))).testimonials;e=e.sort(()=>.5-Math.random()),N(e),y(Math.ceil(e.length/3)),j(0),k.current=0}catch(e){k.current++<3&&(C.current=setTimeout(z,4e3*k.current))}},[m]);(0,r.useEffect)(()=>{w(!0)},[]),(0,r.useEffect)(()=>(e.testimonials?(N(e.testimonials),y(Math.ceil(e.testimonials.length/3)),j(0)):(k.current=0,z()),()=>clearTimeout(C.current)),[m,e.testimonials,z]),(0,r.useEffect)(()=>{let e=3*x,t=I.slice(e,e+3);t.sort((e,t)=>e.text.length-t.text.length),3==t.length?b([t[0],t[2],t[1]]):b(t)},[x,I,h]),(0,r.useEffect)(()=>{h&&I.length>0&&(b(I),j(0))},[h,I]);let D=f&&p<1100;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{display:"flex",width:"100%",marginTop:D?"16px":"40px",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)("div",{style:{width:"100%"},children:(0,i.jsx)("div",{className:"text-center",children:null!==(t=e.title)&&void 0!==t?t:(0,i.jsx)("h2",{style:D?{paddingBottom:0}:void 0,children:(0,i.jsxs)(a.cC,{i18nKey:"reviews-from-clients",t:d,children:["What ",(0,i.jsx)("span",{className:"gradient-text",children:"Clients"})," are Saying"]})})})})}),f&&!h&&(0,i.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",gap:"5px",height:"64px"},children:[(0,i.jsx)("button",{onClick:()=>j(x-1),className:"submit-btn-circle",style:{fontSize:"24px"},disabled:0==x,children:"<"}),Array.from({length:M}).map((e,t)=>(0,i.jsx)("div",{className:"page-link",style:{fontSize:t==x?"128px":"64px",color:"black"},children:"\xb7"},t)),(0,i.jsx)("button",{onClick:()=>j(x+1),className:"submit-btn-circle",style:{fontSize:"24px"},disabled:x>=M-1,children:">"})]}),(0,i.jsx)("div",{style:null!==(u=e.containerStyle)&&void 0!==u?u:D?{marginTop:6}:{minHeight:"600px"},children:(0,i.jsx)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"center",flexDirection:f&&h?"column":"row",gap:D?"12px":"40px",flexWrap:"wrap"},children:v.map(e=>(0,i.jsxs)("div",{className:"images-testimonial",children:["âââââ",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),e.title&&(0,i.jsxs)("b",{children:[e.title," ",(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),e.text,(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),e.name,(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]},e.text))})})]})}},951:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var i=n(85893),r=n(67421);n(44698);var a=n(22419),s=n(67294);let l="undefined"!=typeof navigator&&/iPhone|iPad|iPod|Macintosh/i.test(navigator.userAgent),o=e=>{let{t}=(0,r.$G)("images"),{viewportWidth:n}
1=(0,a.n)(),[o,c]=(0,s.useState)({imgWidth:62,imgHeight:150,divWidth:"180px",fontSize:"36px",fontSize2:"16px"});return(0,s.useEffect)(()=>{n<1e3?c({imgWidth:25,imgHeight:50,divWidth:"80px",fontSize:"16px",fontSize2:"9px"}):c({imgWidth:62,imgHeight:150,divWidth:"180px",fontSize:"36px",fontSize2:"16px"})},[n]),(0,i.jsxs)("center",{className:"hide-on-very-small-screen",children:[(0,i.jsx)("br",{}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"30px",flexWrap:"wrap"},children:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px"},children:[(0,i.jsx)("img",{src:"/images/leaf-left.svg",width:o.imgWidth,height:o.imgHeight,alt:"left leaf",loading:"eager",fetchpriority:"high"}),(0,i.jsxs)("div",{style:{width:o.divWidth,fontSize:o.fontSize2},children:[(0,i.jsx)("span",{style:{fontSize:o.fontSize,fontWeight:"500"},children:t("statistics-100k-plus")}),(0,i.jsx)("br",{}),t("statistics-creators")]}),(0,i.jsx)("img",{src:"/images/leaf-right.svg",width:o.imgWidth,height:o.imgHeight,alt:"right leaf",loading:"eager",fetchpriority:"high"})]})}),(0,i.jsx)("br",{}),!e.inApp&&(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",flexWrap:"wrap"},children:[!l&&(0,i.jsx)("a",{href:"https://play.google.com/store/apps/details?id=link.tangra.imagegenerator",target:"_blank","aria-label":"Get it on Google Play",children:(0,i.jsx)("img",{src:"/logo/googleplay.png",width:"169",height:"50",alt:"Get it on Google Play",loading:"eager",fetchpriority:"high"})}),(0,i.jsx)("a",{href:"https://apps.apple.com/us/app/tangra-ai-image-generator/id6504161735",target:"_blank","aria-label":"Download from App Store",children:(0,i.jsx)("img",{src:"/logo/app-store-black.svg",width:o.imgHeight,height:"50",alt:"Download from App Store",loading:"eager",fetchpriority:"high"})}),(0,i.jsx)("a",{href:"https://apps.apple.com/us/app/tangra-ai-image-generator/id6504161735",target:"_blank","aria-label":"Download from Mac App Store",children:(0,i.jsx)("img",{src:"/logo/mac-store-black.svg",width:"200",height:"50",alt:"Download from Mac App Store",loading:"eager",fetchpriority:"high"})}),!l&&(0,i.jsx)("a",{href:"https://apps.microsoft.com/detail/9n46qfmpj0dd",target:"_blank","aria-label":"Download from Microsoft Store",children:(0,i.jsx)("img",{src:"/images/products/ms-store-badge-50.png",width:138,height:50,alt:"Download from Microsoft Store",loading:"eager",fetchpriority:"high"})}),!l&&(0,i.jsx)("a",{href:"https://www.canva.com/your-apps/AAGUlg7bD5k/tangra-ai?q=tangra+ai",target:"_blank","aria-label":"Use in Canva",children:(0,i.jsx)("img",{src:"/images/products/canva-50.png",width:90,height:50,alt:"Use in Canva",loading:"eager",fetchpriority:"high"})})]}),(0,i.jsx)("br",{})]})}},11555:function(e,t,n){"use strict";n.d(t,{J3:function(){return H},RL:function(){return W},Ri:function(){return L},TW:function(){return B},Zy:function(){return E},_U:function(){return C},eD:function(){return p}});var i=n(85893),r=n(67294),a=n(82785);let s=e=>{let t;if("string"!=typeof e)return null;let n=e.indexOf("?");if(n<0)return null;try{t=new URLSearchParams(e.slice(n+1))}catch(e){return null}let i=t.get("X-Amz-Date"),r=t.get("X-Amz-Expires");if(i&&r&&/^\d+$/.test(r)){let e=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(i);if(e)return Date.UTC(+e[1],+e[2]-1,+e[3],+e[4],+e[5],+e[6])+1e3*Number(r)}let a=t.get("Expires");return a&&/^\d+$/.test(a)?1e3*Number(a):null},l=e=>{let t=s(e);return null!==t&&Date.now()>t-3e4},o="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><g fill="none" stroke="#8a8a8a" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="30" y="32" width="36" height="32" rx="4"/><circle cx="41" cy="43" r="3.5"/><path d="M30 57l10-10 8 8 6-6 12 12"/></g></svg>'),c=new Map,u=(e,t)=>{let n=(null==e?void 0:e._id)||(null==e?void 0:e.filename);return n?"".concat(t?"thumb":"full",":").concat(n):null},d=(e,t)=>{let n=c.get(u(e,t));if(!(!n||Date.now()-n.at>54e4))return n.url},g=(e,t)=>{e&&(c.size>
1500&&c.clear(),c.set(e,{url:t,at:Date.now()}))},m=(e,t,n)=>{let i=c.get(u(e,t));return!!i&&i.url===n&&Date.now()-i.at<54e4},p=e=>e?{_id:e.itemId||e._id,filename:e.filename,imageUrl:e.url||e.imageUrl,imageThumbUrl:e.thumbnail||e.imageThumbUrl,model:e.model,watermark:"track-watermark"===e.trackId}:null,h=e=>!!(null==e?void 0:e.watermark)||[null==e?void 0:e.imageUrl,null==e?void 0:e.imageThumbUrl].some(e=>"string"==typeof e&&e.includes("/watermarks/")),f=e=>{if("string"!=typeof e)return null;let t=e.split("?")[0],n=t.substring(t.lastIndexOf("/")+1);return n&&n.includes(".")?n:null},w=["_thumb.webp",".webp",".png"],x=e=>!!e&&/^[A-Za-z0-9._-]+$/.test(e)&&!e.startsWith("sh_")&&w.some(t=>e.endsWith(t)),j=new Map,M=null,y=async()=>{M=null;let e=j;j=new Map;let t=[...e.keys()];for(let i=0;i<t.length;i+=300){let r=t.slice(i,i+300),s={};try{let e=await (0,a.uz)("".concat(n.g.serverUrl,"/images/private/urls"),{filenames:r});s=(null==e?void 0:e.urls)||{}}catch(e){}r.forEach(t=>e.get(t).forEach(e=>e(s[t]||null)))}},v=e=>new Promise(t=>{let n=j.get(e);if(n){n.push(t);return}j.set(e,[t]),M||(M=setTimeout(y,60))}),b=new Map,I=(e,t)=>(t?(null==e?void 0:e.imageThumbUrl)||(null==e?void 0:e.imageUrl):(null==e?void 0:e.imageUrl)||(null==e?void 0:e.imageThumbUrl))||"",N=(e,t)=>{let n=c.get(u(e,t));return n?f(n.url):null},k=async(e,t)=>{var i,r,s;let l=f(I(e,t))||N(e,t);if(!h(e)&&x(l)){let e=await v(l);if(e)return e}if(h(e)&&e._id)return null===(r=await (0,a.getJson)("".concat(n.g.serverUrl,"/user/watermarks/").concat(e._id,"/url")))||void 0===r?void 0:r.url;if(e.filename&&(!t||!e._id)){let i=t?"_thumb.webp":".webp";return null===(s=await (0,a.getJson)("".concat(n.g.serverUrl,"/images/private/").concat(e.filename).concat(i)))||void 0===s?void 0:s.url}if(e._id){let i=I(await (0,a.getJson)("".concat(n.g.serverUrl,"/images/id/").concat(e._id)),t);if(i)return i}return l?null===(i=await (0,a.getJson)("".concat(n.g.serverUrl,"/images/private/").concat(l)))||void 0===i?void 0:i.url:null},C=async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!(null==e?void 0:e._id)&&!(null==e?void 0:e.filename)&&!I(e,t))return null;let n=u(e,t)||I(e,t),i=b.get(n);if(i)return i;let r=(async()=>{try{let n=await k(e,t);return n&&g(u(e,t),n),n||null}catch(e){return null}finally{b.delete(n)}})();return b.set(n,r),r},z=new Set,D=e=>z.forEach(t=>{try{t(e)}catch(e){}});if("undefined"!=typeof document){document.addEventListener("visibilitychange",()=>{document.hidden||D(!0)}),window.addEventListener("pageshow",()=>D(!0)),window.addEventListener("online",()=>D(!0));let e=setInterval(()=>{document.hidden||D(!1)},6e4);e&&"function"==typeof e.unref&&e.unref()}let T=e=>{let t=(0,r.useRef)(e);t.current=e,(0,r.useEffect)(()=>{let e=e=>t.current(e);return z.add(e),()=>{z.delete(e)}},[])},S=[2e3,5e3,15e3,6e4,3e5],A=(e,t)=>{let n=(0,r.useCallback)(e=>I(e,t),[t]),i=(0,r.useRef)(e);i.current=e;let a=()=>d(i.current,t)||n(i.current),s=e=>!e||l(e)&&!m(i.current,t,e),[o,c]=(0,r.useState)(a),[g,p]=(0,r.useState)(()=>s(o)),h=(0,r.useRef)(o);h.current=o;let f=(0,r.useRef)(g);f.current=g;let w=(0,r.useRef)(0),x=(0,r.useRef)(!1),j=(0,r.useRef)(null),M=(0,r.useRef)(null),y=(0,r.useCallback)(()=>{j.current&&(clearTimeout(j.current),j.current=null)},[]);(0,r.useEffect)(()=>y,[y]);let v=e=>{f.current=e,p(e)},b=(0,r.useCallback)(async()=>{let e=i.current;if(e&&!x.current){x.current=!0;try{let n=await C(e,t),r=u(e,t);if(r&&r!==u(i.current,t))return;n?(y(),c(n),v(!1)):M.current()}finally{x.current=!1}}},[t,y]),N=(0,r.useCallback)(()=>{y();let e=w.current++,t=0===e?0:S[Math.min(e-1,S.length-1)];0===t?b():j.current=setTimeout(()=>{j.current=null,b()},t)},[b,y]);M.current=N;let k=(null==e?void 0:e._id)||(null==e?void 0:e.filename)||n(e);(0,r.useEffect)(()=>{y(),w.current=0;let e=a();c(e);let t=s(e);v(t),t&&N()},[k,n,t]);let z=n(e);return(0,r.useEffect)(()=>{!(!z||z===h.current||l(z))&&(f.current||s(h.current))&&(y(),w.current=0,c(z),v(!1))},[z]),{src:o,broken:g,fail:(0,r.useCallback)(()=>{v(!0),N()},[N]),heal:(0,r.useCallback)(()=>{y(),w.current=0,f.current&&v(!1)},[y]),check:(0,r.useCallback)((e,t)=>f.current?(t&&(w.current=0,N()),!0):!!("bad"===e||"ok"!==e&&s(h.current))&&(v(!0),w.current=0,N(),!0),[N])}},E=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{src:n,broken:i,fail:a,heal:s,check:l}=A(e,t),o=(0,r.useRef)(null),c=(0,r.useCallback)(()=>
1{if(!n||i||!window.Image)return;let e=new window.Image;return o.current=e,e.onload=()=>{o.current===e&&s()},e.onerror=()=>{o.current===e&&a()},e.src=n,()=>{o.current===e&&(o.current=null)}},[n,i,a,s]);return(0,r.useEffect)(()=>{l("unknown",!1)},[l,n]),(0,r.useEffect)(c,[c]),T(e=>{l("unknown",e)||c()}),n},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(0,r.useRef)(!1),a=(0,r.useRef)(0),s=(0,r.useRef)(e);return s.current=e,(0,r.useCallback)(async()=>{let e=null==t?void 0:t.current,r=s.current;if(!e||!r)return;let l=Date.now();if(!i.current&&!(l-a.current<3e3)){i.current=!0,a.current=l;try{let i=await C(r,n);if(!i||t.current!==e)return;let a=e.currentTime,s=!e.paused&&!e.ended;e.src=i,e.addEventListener("loadedmetadata",()=>{if(a)try{e.currentTime=a}catch(e){}if(s){let t=e.play();(null==t?void 0:t.catch)&&t.catch(()=>{})}},{once:!0}),e.load()}finally{i.current=!1}}},[t,n])},Z=e=>{let{tag:t,image:n,preferThumb:a,onError:s,onLoadedMetadata:l,...o}=e,{src:c,fail:u,heal:d,check:g}=A(n,a),m=(0,r.useRef)(null),p=(0,r.useCallback)(()=>{let e=m.current;return e?e.error?"bad":e.readyState>=1?"ok":"unknown":"unknown"},[]);(0,r.useEffect)(()=>{g(p(),!1)},[g,p,c]),T(e=>g(p(),e));let h=(0,r.useCallback)(e=>{u(),s&&s(e)},[u,s]),f=(0,r.useCallback)(e=>{d(),l&&l(e)},[d,l]);return(0,i.jsx)(t,{ref:m,src:c,onError:h,onLoadedMetadata:f,...o})},B=e=>(0,i.jsx)(Z,{tag:"video",preferThumb:!1,...e}),H=e=>(0,i.jsx)(Z,{tag:"audio",preferThumb:!1,...e}),W=function(e){let{preferThumb:t=!1,crossOrigin:n="anonymous"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((i,r)=>{if(!window.Image){r(Error("No Image constructor"));return}let a=d(e,t)||I(e,t);if(!a){r(Error("No url for image"));return}let s=(a,l)=>{let o=new window.Image;n&&(o.crossOrigin=n),o.onload=()=>i(o),o.onerror=async()=>{if(!l){r(Error("Could not load private image"));return}let n=await C(e,t);n?s(n,!1):r(Error("Could not re-sign private image"))},o.src=a};l(a)?C(e,t).then(e=>s(e||a,!1)):s(a,!0)})};t.ZP=e=>{let{image:t,alt:n="",style:a,className:s,onClick:l,onLoad:c,onError:u,loading:d,fetchpriority:g,crossOrigin:m,preferThumb:p=!0,draggable:h,title:f,id:w}=e,{src:x,broken:j,fail:M,heal:y,check:v}=A(t,p),b=(0,r.useRef)(null),I=(0,r.useCallback)(()=>{let e=b.current;return e&&e.complete&&e.getAttribute("src")!==o?e.naturalWidth>0?"ok":"bad":"unknown"},[]);(0,r.useEffect)(()=>{v(I(),!1)},[v,I,x]),T(e=>v(I(),e));let N=(0,r.useCallback)(e=>{(null==e?void 0:e.currentTarget)&&(e.currentTarget.alt=""),M(),u&&u(e)},[M,u]),k=(0,r.useCallback)(e=>{var t;(null==e?void 0:null===(t=e.currentTarget)||void 0===t?void 0:t.getAttribute("src"))!==o&&(y(),c&&c(e))},[y,c]);return(0,i.jsx)("img",{ref:b,id:w,src:j?o:x,alt:j?"":n,title:f,className:s,style:a,loading:d,fetchpriority:g,crossOrigin:m,draggable:h,onClick:l,onLoad:k,onError:N})}},97265:function(e,t,n){"use strict";var i=n(85893),r=n(67294);let a="undefined"!=typeof navigator&&/iPhone|iPad|iPod|Macintosh|Android/i.test(navigator.userAgent);t.Z=e=>{let{itemHeight:t,viewportWidth:n,containerRef:s,loadMore:l,showLoadMore:o,contained:c,alwaysShow:u}=e,[d,g]=(0,r.useState)(a||!1),[m,p]=(0,r.useState)(a||!1),[h,f]=(0,r.useState)(!1),w=(0,r.useRef)(0),x=(0,r.useRef)(o);x.current=o;let j=(0,r.useRef)(l);j.current=l;let M=(0,r.useRef)(n);M.current=n;let y=(0,r.useCallback)(()=>{f(!0)},[]),v=(0,r.useCallback)(e=>{let t=s.current.getBoundingClientRect(),{clientX:n,clientY:i}=e;(n<t.left||n>t.right||i<t.top||i>t.bottom)&&f(!1)},[s]),b=(0,r.useCallback)(()=>{let e=s.current,t=x.current,n=M.current;f(i=>{let r=u||!a,s=u||!a&&i;g(!s||0===e.scrollLeft);let l=e.scrollLeft+e.clientWidth+1>=e.scrollWidth&&e.scrollWidth>n;if(l&&t){let e=Date.now();e-w.current>500&&(w.current=e,r&&p(!1),j.current())}else r&&p(!s||l);return i})},[s,u]);(0,r.useEffect)(()=>{let e=s.current;return e&&(e.addEventListener("scroll",b),e.addEventListener("mouseenter",y),e.addEventListener("mouseleave",v)),b(),()=>{e&&(e.removeEventListener("scroll",b),e.removeEventListener("mouseenter",y),e.removeEventListener("mouseleave",v))}},[s,b,y,v]),(0,r.useEffect)(()=>{b()},[n,h,b]);let I=e=>{let t=s.current;if(!t)return null;
1e?t.scrollBy(n-50,0):t.scrollBy(-(n-50),0)};return(0,i.jsxs)("div",{style:{position:"relative"},children:[!d&&(0,i.jsx)("div",{style:{position:"absolute",marginTop:-Math.round(t/2)-50+"px",left:"30px",fontSize:"12px"},title:"Previous",children:(0,i.jsx)("button",{onClick:()=>I(!1),className:"submit-btn-circle",style:{fontSize:"24px"},disabled:d,onMouseEnter:y,children:"<"})}),!m&&(0,i.jsx)("div",{style:{position:"absolute",marginTop:-Math.round(t/2)-50+"px",...c?{right:"30px"}:{left:"calc(100vw - 100px)"},fontSize:"12px"},title:"Next",children:(0,i.jsx)("button",{onClick:()=>I(!0),className:"submit-btn-circle",style:{fontSize:"24px"},disabled:m,children:">"})})]})}},22419:function(e,t,n){"use strict";n.d(t,{n:function(){return d}});var i=n(67294);let r=new Set,a=!1,s={width:window.innerWidth,height:window.innerHeight},l=()=>{for(let e of r)e(s.width,s.height)},o=()=>{s.width=window.innerWidth,s.height=window.innerHeight,l()},c=()=>{a||(a=!0,s.width=window.innerWidth,s.height=window.innerHeight,window.addEventListener("resize",o),l())},u=()=>{a&&(window.removeEventListener("resize",o),a=!1)},d=()=>{let[e,t]=(0,i.useState)(s.width),[n,a]=(0,i.useState)(s.height);return(0,i.useEffect)(()=>{let e=(e,n)=>{t(e),a(n)};return r.add(e),c(),e(s.width,s.height),()=>{r.delete(e),0===r.size&&u()}},[]),{viewportWidth:e,viewportHeight:n,updateViewportSize:()=>{s.width=window.innerWidth,s.height=window.innerHeight,l()}}}},44698:function(e,t,n){"use strict";let i;n.d(t,{G3:function(){return u},b:function(){return l},cr:function(){return c},jK:function(){return d}});var r=n(31955);let a=async(e,t,n)=>{if(!e)return;let i=n.filter(n=>!e.hasResourceBundle(t,n));0!==i.length&&await Promise.all(i.map(async n=>{try{let i=await fetch("/locales/".concat(t,"/").concat(n,".json"));if(!i.ok){console.warn("[i18n] fetch failed",t,n,i.status);return}let r=await i.json();e.addResourceBundle(t,n,r,!0,!0)}catch(e){console.error("[i18n] Failed to load translations",t,n,e)}}))},s=()=>
1{if("undefined"==typeof localStorage)return null;let e=localStorage.getItem("language");if(!e){let t=navigator.languages;e=t&&t.length>0?t[0]:navigator.language}if(e){if(e.startsWith("en"))return"en";if(e.startsWith("es"))return"es";if(e.startsWith("de"))return"de";if(e.startsWith("fr"))return"fr";if(e.startsWith("it"))return"it"}return"en"},l=async e=>{let t=s();if(t){if(i=t,e){let n=e.options.ns||["default"];await a(e,t,n),e.language!==t&&await e.changeLanguage(t)}r.Z.set("NEXT_LOCALE",t,{expires:365,path:""})}},o=[{id:"en",name:"English",locale:"en-US",currency:"$"},{id:"es",name:"Espa\xf1ol",locale:"es-ES",currency:"â¬"},{id:"fr",name:"Fran\xe7ais",locale:"fr-FR",currency:"â¬"},{id:"ar-AE",name:"Arabic (United Arab Emirates)",locale:"ar-AE",currency:"د.Ø¥"},{id:"de",name:"Deutsch",locale:"de-DE",currency:"â¬"},{id:"it",name:"Italiano",locale:"it-IT",currency:"â¬"}],c=[{id:"en",name:"English",flag:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NTAwIDM5MDAiPjxyZWN0IHdpZHRoPSI3NTAwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz48cGF0aCBkPSJNMCwzMDBoNzUwMG0wLDYwMEgwbTAsNjAwaDc1MDBtMCw2MDBIMG0wLDYwMGg3NTAwbTAsNjAwSDBtMCw2MDBoNzUwMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPjxyZWN0IHdpZHRoPSIzMDAwIiBoZWlnaHQ9IjIxMDAiIGZpbGw9IiMzYzNiNmUiLz48ZyBmaWxsPSIjZmZmIj48cGF0aCBkPSJNMjQ3IDE5MGw3NC4zLTIyNy42TDM5NSA5NWgtMjMwbC03My44IDIyNy42TDE2NSA5NWgyMzB6bTYwMCAwbDc0LjMtMjI3LjZMOTk1IDk1aC0yMzBsLTczLjggMjI3LjZMNzY1IDk1aDIzMHptNjAwIDBsNzQuMy0yMjcuNkwxNTk1IDk1aC0yMzBsLTczLjggMjI3LjZMMTM2NSA5NWgyMzB6TTE4NSA1MTVsNzQuMy0yMjcuNkwzMzMgNDIwSDEwM2wtNzMuOCAyMjcuNkwxMDMgNDIwaDIzMHptNjAwIDBsNzQuMy0yMjcuNkw5MzMgNDIwSDcwM2wtNzMuOCAyMjcuNkw3MDMgNDIwaDIzMHptNjAwIDBsNzQuMy0yMjcuNkwxNTMzIDQyMGgtMjMwbC03My44IDIyNy42TDEzMDMgNDIwaDIzMHpNMjQ3IDg0MGw3NC4zLTIyNy42TDM5NSA3NDVoLTIzMGwtNzMuOCAyMjcuNkwxNjUgNzQ1aDIzMHptNjAwIDBsNzQuMy0yMjcuNkw5OTUgNzQ1aC0yMzBsLTczLjggMjI3LjZMNzY1IDc0NWgyMzB6bTYwMCAwbDc0LjMtMjI3LjZMMTU5NSA3NDVoLTIzMGwtNzMuOCAyMjcuNkwxMzY1IDc0NWgyMzB6TTE4NSAxMTY1bDc0LjMtMjI3LjZMMzMzIDEwNzBIMTAzbC03My44IDIyNy42TDEwMyAxMDcwaDIzMHptNjAwIDBsNzQuMy0yMjcuNkw5MzMgMTA3MEg3MDNsLTczLjggMjI3LjZMNzAzIDEwNzBoMjMwem02MDAgMGw3NC4zLTIyNy42TDE1MzMgMTA3MGgtMjMwbC03My44IDIyNy42TDEzMDMgMTA3MGgyMzB6TTI0NyAxNDkwbDc0LjMtMjI3LjZMMzk1IDEzOTVoLTIzMGwtNzMuOCAyMjcuNkwxNjUgMTM5NWgyMzB6bTYwMCAwbDc0LjMtMjI3LjZMOTk1IDEzOTVoLTIzMGwtNzMuOCAyMjcuNkw3NjUgMTM5NWgyMzB6bTYwMCAwbDc0LjMtMjI3LjZMMTU5NSAxMzk1aC0yMzBsLTczLjggMjI3LjZMMTM2NSAxMzk1aDIzMHoiLz48L2c+PC9zdmc+"},{id:"es",name:"Espa\xf1ol",flag:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NTAgNTAwIj48cGF0aCBmaWxsPSIjYzYwYjFlIiBkPSJNMCAwaDc1MHY1MDBIMHoiLz48cGF0aCBmaWxsPSIjZmZjNDAwIiBkPSJNMCAxMjVoNzUwdjI1MEgweiIvPjwvc3ZnPg=="},{id:"fr",name:"Fran\xe7ais",flag:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj48cGF0aCBmaWxsPSIjZWQyOTM5IiBkPSJNMCAwaDkwMHY2MDBIMHoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDYwMHY2MDBIMHoiLz48cGF0aCBmaWxsPSIjMDAyMzk1IiBkPSJNMCAwaDMwMHY2MDBIMHoiLz48L3N2Zz4="},{id:"de",name:"Deutsch",flag:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1IDMiPjxwYXRoIGQ9Ik0wIDBoNXYzSDB6Ii8+PHBhdGggZmlsbD0iI2QwMCIgZD0iTTAgMWg1djJIMHoiLz48cGF0aCBmaWxsPSIjZmZjZTAwIiBkPSJNMCAyaDV2MUgweiIvPjwvc3ZnPg=="},{id:"it",name:"Italiano",flag:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzIDIiPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjIiIGZpbGw9IiMwMDkyNDYiLz48cmVjdCB3aWR0aD0iMSIgaGVpZ2h0PSIyIiB4PSIxIiBmaWxsPSIjZmZmZmZmIi8+PHJlY3Qgd2lkdGg9IjEiIGhlaWdodD0iMiIgeD0iMiIgZmlsbD0iI2NlMmIzNyIvPjwvc3ZnPg=="}],u=()=>(i||l(),i),d=()=>{let e=u()||"en";return(o.find(t=>t.id===e)||o[0]).currency}},33830:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return f},default:function(){return w}});var i=n(85893),r=n(3364),a=n(11163),s=n(45236),l=n(951),o=n(25759),c=n(89792),u=n(67294),d=n(22419),g=n(64954),m=n(55987),p=n(87692),h=n(2664);n.g.serverUrl||(n.g.serverUrl="https://server1.tangra.link");var f=!0;function w(e){var t,n;let f=(0,a.useRouter)(),w=JSON.parse(e.page),x=JSON.parse(e.images),{viewportWidth:j}=(0,d.n)(),[M,y]=(0,u.useState)(w.prompt),[v,b]=(0,u.useState)(!1);if((0,u.useEffect)(()=>{b(!0)},[]),!w)return window.location="".concat("https://tangra.link","/images"),"";let I=null!==(t=w.pageTitle)&&void 0!==t?t:w.title,N="https://tangra.link/images/popular/".concat(w.id),k=null!==(n=w.description)&&void 0!==n?n:w.title,C=e=>{sessionStorage.setItem("keywords",M),e.model&&sessionStorage.setItem("model",e.model),f.push("".concat("https://tangra.link","/images"))};return(0,i.jsxs)(h.zt,{store:p.h,children:[(0,i.jsx)(m.Z,{addMSAds:!0}),(0,i.jsx)(g.Z,{subtitle:"Images",path:"images",customMetaTags:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:I}),(0,i.jsx)("meta",{name:"description",content:k}),(0,i.jsx)("meta",{name:"robots",content:"index"}),(0,i.jsx)("link",{rel:"canonical",href:N}),(0,i.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{property:"og:title",content:I}),(0,i.jsx)("meta",{property:"og:description",content:k}),(0,i.jsx)("meta",{property:"og:url",content:N}),(0,i.jsx)("meta",{property:"og:site_name",content:"Tangra AI"}),(0,i.jsx)("meta",{property:"og:image",content:w.ogImageUrl}),(0,i.jsx)("meta",{property:"og:image:width",content:"1024"}),(0,i.jsx)("meta",{property:"og:image:height",content:"1024"}),(0,i.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,i.jsx)("meta",{name:"twitter:creator",content:"@TangraLink"}),(0,i.jsx)("meta",{name:"twitter:site",content:"@TangraLink"})]})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"images-bg"}),(0,i.jsxs)("div",{className:"popular",children:[(0,i.jsx)("center",{children:(0,i.jsxs)("div",{style:{maxWidth:"1200px"},children:[(0,i.jsx)("h1",{className:"images-title",children:(0,i.jsxs)("span",{className:"gradient-text",children:[" ",I]})}),w.description&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)("h2",{children:w.description})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]})}),(0,i.jsx)("center",{children:(0,i.jsxs)("div",{style:{maxWidth:"600px",display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",flexDirection:"column"},className:"image-container",children:[(0,i.jsx)("label",{htmlFor:"prompt",children:"What would you like to create?"}),(0,i.jsx)("textarea",{id:"prompt",className:"form-control gradient-input",style:{padding:"20px"},value:M,autoFocus:!0,onChange:e=>y(e.target.value),onBlur:e=>y(e.target.value)}),(0,i.jsx)("button",{className:"generate-outside-input",onClick:()=>C(w),title:"Create Your Own",style:{marginRight:"0px"},children:"Create Your Own"})]},"custom")}),v&&(0,i.jsxs)("div",{className:"hide-on-small-screen",children:[(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(0,i.jsx)(l.o,{})]}),(0,i.jsx)("br",{}),(0,i.jsx)("br",{})]}),w.images&&(0,i.jsxs)("div",{className:"popular",children:[(0,i.jsx)("center",{children:(0,i.jsx)(s.Z,{autoPlay:!0,interval:2e3,controls:!0,indicators:!0,className:"carousel",children:w.images.map(e=>x.find(t=>t.filename==e)).map(e=>(0,i.jsx)(s.Z.Item,{children:(0,i.jsx)("div",{className:"image-container clickable",children:(0,i.jsx)("img",{src:e.imageUrl,alt:e.description,title:e.description,className:"popular-image",onClick:()=>f.push("https://tangra.link/images/".concat(e.filename))})},"my".concat(e._id))},e.filename))})}),(0,i.jsx)("br",{})]}),w.groups&&w.groups.map(t=>(0,i.jsxs)("div",{children:[(0,i.jsx)(r.Z,{eagerLoading:!0,title:t.title,hideAddorners:!0,itemHeight:354,groupClassName:"my-music-group popular-group",files:t.images.map(e=>x.find(t=>t.filename==e)),inApp:e.inApp,onClick:e=>f.push("https://tangra.link/images/".concat(e.filename)),showPremium:!1}),(0,i.jsx)("br",{})]},t.title)),v&&(0,i.jsxs)("div",{className:"popular",children:[(0,i.jsx)(o.J,{}),(0,i.jsx)(c.Z,{})]})]})]})}}},function(e){e.O(0,[4133,9823,5236,3364,2888,9774,179],function(){return e(e.s=1397)}),_N_E=e.O()}]);
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.