|
<!DOCTYPE html> |
|
|
|
|
|
|
|
|
|
|
| <html> |
| <head> |
| <title> Neil Armstrong </title> |
|
|
| <script type="application/ld+json"></script> |
|
|
| <script |
| async |
| src="https://browser.sentry-cdn.com/7.19.0/bundle.min.js" |
| integrity="sha384-ztBHD5Kyf+YJqkbZijnUhyS5dYdQDCEfB2QjYao1rVJ1qBpQn+WMbafstDcVTHnB" |
| crossorigin="anonymous" |
| onload="Sentry.init({ dsn: 'https://97bfbb7bc651472085dab062d23194f6@sentry.io/1460722' });" |
| ></script> |
|
|
|
|
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
| <link rel="manifest" href="/static/manifest.json"> |
| <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> |
| <link rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> |
| |
| |
| <link rel="canonical" href="https://deepai.org/chat/neil-armstrong"> |
|
|
| <meta name="description" content="I am Neil Armstrong, the first human to set foot on the moon. Ask me about the Apollo 11 mission, the challenges I faced, and my thoughts on space exploration."> |
| <meta property="og:url" content="https://deepai.org/neil-armstrong"> |
| <meta property="og:site_name" content="DeepAI"> |
| <meta property="og:type" content="article"> |
| <meta property="og:title" content="Neil Armstrong - DeepAI"> |
| <meta property="og:description" content="I am Neil Armstrong, the first human to set foot on the moon. Ask me about the Apollo 11 mission, the challenges I faced, and my thoughts on space exploration."> |
| <meta property="og:image" content=""> |
| <meta name="twitter:card" content="summary_large_image"> |
| <meta name="twitter:site" content="@DeepAI"> |
| <meta name="twitter:creator" content="@DeepAI"> |
|
|
| <meta name="twitter:title" content="Neil Armstrong - DeepAI"> |
| <meta name="twitter:description" content="I am Neil Armstrong, the first human to set foot on the moon. Ask me about the Apollo 11 mission, the challenges I faced, and my thoughts on space exploration."> |
| <meta name="twitter:image" content=""> |
|
|
| <meta property="article:published_time" content="" /> |
| |
| |
| <link rel="preconnect" href="https://a.pub.network/" crossorigin /> |
| <link rel="preconnect" href="https://b.pub.network/" crossorigin /> |
| <link rel="preconnect" href="https://c.pub.network/" crossorigin /> |
| <link rel="preconnect" href="https://d.pub.network/" crossorigin /> |
| <link rel="preconnect" href="https://c.amazon-adsystem.com" crossorigin /> |
| <link rel="preconnect" href="https://s.amazon-adsystem.com" crossorigin /> |
| <link rel="preconnect" href="https://secure.quantserve.com/" crossorigin /> |
| <link rel="preconnect" href="https://rules.quantcount.com/" crossorigin /> |
| <link rel="preconnect" href="https://pixel.quantserve.com/" crossorigin /> |
| <link rel="preconnect" href="https://cmp.quantcast.com/" crossorigin /> |
| <link rel="preconnect" href="https://btloader.com/" crossorigin /> |
| <link rel="preconnect" href="https://api.btloader.com/" crossorigin /> |
| <link rel="preconnect" href="https://cdn.confiant-integrations.net" crossorigin /> |
| |
| |
| |
| <style> |
| body { |
| --fsAddBuffer: 22px; |
| } |
| [id='deepai\.org_billboard_ATF'], |
| [id='deepai\.org_1x1_bouncex'], |
| [id='deepai\.org_header'], |
| [id='deepai_incontent_1'], |
| [id='deepai_left_siderail_1'], |
| [id='deepai_left_siderail_2'], |
| [id='deepai\.org_leaderboard_BTF'], |
| [id='deepai\.org_chat_billboard_ATF'], |
| [id='deepai\.org_chat_header'], |
| [id='deepai\.org_chat_leaderboard_BTF'], |
| [id='deepai_mobile_incontent_2'], |
| [id='deepai\.org_chat_dynamic'] { |
| display: flex !important; |
| align-items: center; |
| justify-content: center; |
| flex-direction: column; |
| min-height: calc(var(--height) + var(--fsAddBuffer)); |
| height: calc(var(--height) + var(--fsAddBuffer)); |
| width: 100%; |
| } |
| [id='deepai\.org_billboard_ATF'] { |
| --height: 280px; |
| } |
| [id='deepai\.org_chat_billboard_ATF'] { |
| --height: 280px; |
| } |
| [id='deepai\.org_chat_dynamic'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_header'] { |
| --height: 50px; |
| } |
| [id='deepai\.org_chat_leaderboard_BTF'] { |
| --height: 280px; |
| } |
| [id='deepai\.org_header'] { |
| --height: 100px; |
| } |
| [id='deepai\.org_leaderboard_BTF'] { |
| --height: 280px; |
| } |
| [id='deepai_incontent_1'] { |
| --height: 280px; |
| } |
| [id='deepai_mobile_incontent_2'] { |
| --height: 280px; |
| } |
| @media only screen and (min-width: 768px) { |
| [id='deepai\.org_billboard_ATF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_billboard_ATF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_dynamic'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_header'] { |
| --height: 90px; |
| } |
| [id='deepai\.org_chat_leaderboard_BTF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_header'] { |
| --height: 100px; |
| } |
| [id='deepai\.org_leaderboard_BTF'] { |
| --height: 250px; |
| } |
| [id='deepai_incontent_1'] { |
| --height: 90px; |
| } |
| [id='deepai_mobile_incontent_2'] { |
| display: none; |
| } |
| } |
| @media only screen and (min-width: 970px) { |
| [id='deepai\.org_billboard_ATF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_billboard_ATF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_dynamic'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_chat_header'] { |
| --height: 90px; |
| } |
| [id='deepai\.org_chat_leaderboard_BTF'] { |
| --height: 250px; |
| } |
| [id='deepai\.org_header'] { |
| --height: 100px; |
| } |
| [id='deepai\.org_leaderboard_BTF'] { |
| --height: 250px; |
| } |
| } |
| @media only screen and (min-width: 1360px) { |
| [id='deepai_left_siderail_1'] { |
| --height: 600px; |
| } |
| } |
| @media only screen and (min-width: 1650px) { |
| [id='deepai_left_siderail_1'] { |
| --height: 250px; |
| } |
| [id='deepai_left_siderail_2'] { |
| --height: 250px; |
| } |
| } |
|
|
| </style> |
|
|
| <script data-cfasync="false" type="text/javascript"> |
|
|
| var user_paid_for_no_ads = false; |
| try{ |
| var user_object = JSON.parse(localStorage.getItem('user')); |
| if(user_object.userprofile2){ |
| if(user_object.userprofile2.locked_out_due_to_no_payment_info === false){ |
| user_paid_for_no_ads = true; |
| } |
| } |
|
|
| }catch(e){ |
| console.log('error checking user login for ads removal', e) |
| } |
|
|
| var freestar = freestar || {}; |
| freestar.queue = freestar.queue || []; |
| freestar.config = freestar.config || {}; |
|
|
|
|
| freestar.config.disabledProducts = { |
| //stickyFooter: true, |
| //pushdown: true, |
| }; |
|
|
| freestar.config.enabled_slots = []; |
| freestar.initCallback = function () { (freestar.config.enabled_slots.length === 0) ? freestar.initCallbackCalled = false : freestar.newAdSlots(freestar.config.enabled_slots) } |
|
|
| if(!user_paid_for_no_ads){ |
| console.log('user has not paid for no ads, loading ads'); |
| // inject a async script tag to load the ads.js file |
| var script = document.createElement('script'); |
| script.src = 'https://a.pub.network/deepai-org/pubfig.min.js'; |
| script.async = true; |
| document.head.appendChild(script); |
|
|
|
|
| }else{ |
| console.log('user has paid for no ads, not loading ads'); |
|
|
|
|
|
|
| } |
| </script> |
|
|
| <script> |
| // Set the ad provider flag: "openads" or "monetano" |
| // You could also set this dynamically via server-side templating. |
| // if chat_style is "chatgpt-alternative" then use "openads", otherwise use "monetano" |
|
|
| //const contextualAdProvider = 'monetano'; // Change to "openads" to enable OpenAds ads. |
| const contextualAdProvider = "neil-armstrong" === 'chatgpt-alternative' ? 'openads' : 'monetano'; |
|
|
| (function() { |
|
|
| if (contextualAdProvider === 'openads') { |
| // Dynamically load the OpenAds SDK |
| var script = document.createElement('script'); |
| script.async = true; |
| script.defer = true; |
| script.crossOrigin = 'anonymous'; |
| script.src = 'https://js.stratos.blue/stratos.js'; |
| document.head.appendChild(script); |
|
|
| window.stratosSettings = { |
| publisherId: '66be66c1e479eda3e018bb15', |
| adSlots: [ |
| { |
| adUnitCode: 'openads-infeed-ad-above', |
| adFormat: 'chat', |
| size: 'fluid' |
| } |
| ], |
| testMode: false // set to true for testing |
| }; |
|
|
| window.stratos = window.stratos || { queue: [] }; |
| window.stratos.queue.push(function() { |
| console.log('OpenAds initialized!'); |
| }); |
| } else if (contextualAdProvider === 'monetano') { |
| // Dynamically import the Monetano SDK |
| var script = document.createElement('script'); |
| script.async = true; |
| script.defer = true; |
| script.crossOrigin = 'anonymous'; |
| script.src = 'https://server.monetano.com/js/deepai-prod/monetano.js'; |
| document.head.appendChild(script); |
|
|
|
|
| window.monetano = window.monetano || { que: [] }; |
|
|
|
|
| } |
| })(); |
| </script> |
|
|
|
|
|
|
| |
|
|
| |
| <style type="text/css">@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:optional;src:url(https://fonts.gstatic.com/s/atkinsonhyperlegible/v11/9Bt23C1KxNDXMspQ1lPyU89-1h6ONRlW45G07JIoWQeCbGWn.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Atkinson Hyperlegible';font-style:normal;font-weight:400;font-display:optional;src:url(https://fonts.gstatic.com/s/atkinsonhyperlegible/v11/9Bt23C1KxNDXMspQ1lPyU89-1h6ONRlW45G04pIoWQeCbA.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}html{background-color:#170a2c;font-family:'Atkinson Hyperlegible',sans-serif}button,input,optgroup,select,textarea{font-family:'Atkinson Hyperlegible',sans-serif;font-size:100%;line-height:1.15;margin:0}body{margin:0;padding:0;display:flex;flex-direction:column;min-height:100vh;background:linear-gradient(180deg,#7729aa -13.13%,#170a2d 0.17%,#0a061d 6.9%,rgba(10,6,30,0.99) 36.38%,#010311 98.59%)!important}a{text-decoration:none}header{height:45px;overflow:hidden;width:100%;z-index:10}header a.logo-link,footer a.logo-link{display:flex;color:white!important;cursor:pointer;margin-right:10px}header nav{display:flex;margin-left:auto;max-height:62px}header ul{list-style-type:none;margin:0;padding:0;display:flex;flex-direction:row;white-space:nowrap;align-items:center;min-width:46px;justify-content:center}header ul li{display:block;float:left;font-size:16px;color:#fff;line-height:25px}header ul li a{text-decoration:none;cursor:pointer}.drop-menu-button{display:block;width:46px;height:45px;padding:0;margin:0;border:none;background:transparent;cursor:pointer}.menu-icon{font-size:30px;font-weight:bold;cursor:pointer;vertical-align:middle;pointer-events:none}header ul li a:hover{text-decoration:none}header ul li.dropdown:hover{cursor:pointer}header .dropdown{position:unset}ul li.dropdown ul{visibility:hidden;opacity:0;display:none;position:absolute;transition:all 0.5s ease;top:auto;z-index:10;right:13px;margin:auto;margin-top:20px;width:296px;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);-webkit-backdrop-filter:blur(114px);-moz-backdrop-filter:blur(114px);backdrop-filter:blur(114px)}.show-dropdown{visibility:visible!important;opacity:1!important;display:block!important}ul li.dropdown ul a{clear:both;display:block;margin:0;margin:0px 10px;height:45px;position:relative}ul li.dropdown ul li{margin:4px 5px;cursor:pointer}.search-bar-container{background:rgba(45,40,60,1);border-radius:30px;margin:0 9px 0 9px;height:32px;width:100%;max-width:450px;border:1px solid rgba(74,66,97,1);display:flex;flex-direction:row;align-items:center}.search-bar-container img{height:17px;margin:8px}.search-bar{width:100%}.search-bar input{width:100%;height:100%;border:none;padding:0;color:white;background-color:rgba(0,0,0,0)}.loading{background:url(/static/images/loading.gif) no-repeat right center!important;background-size:contain!important}.loading-center{background:url(/static/images/loading.gif) no-repeat center center;background-size:contain;height:50px}a.button{display:flex;padding:6px 19px;font-size:14px;border-radius:45px;border:1px solid #1e79d1;vertical-align:bottom;white-space:nowrap;font-weight:bold;color:#1e79d1;margin-left:9px}a.button:active{opacity:0.9}a.button.highlighted{background-color:#a01ed1;color:white;width:auto;background:linear-gradient(94deg,#c764ec,#4a36b1);height:auto;border:none;cursor:pointer}a.button.hotline{background:transparent;color:#c764ec;width:auto;height:auto;border:1px solid #c764ec;cursor:pointer}a.login-button{border:none;color:white;cursor:pointer}input:focus,button{outline:none}footer{margin-top:auto;text-align:center}a.button.doublecolor{border-radius:8px;border-right:1px solid #e7416b;border-bottom:1px solid #e7416b;border-left:1px solid #1e79d1;border-top:1px solid #1e79d1;background:transparent;padding:0.3em;color:white;width:auto;height:auto}#social-modal{flex-direction:column;width:80vw;max-width:440px;justify-content:flex-start;align-items:center;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);-webkit-backdrop-filter:blur(114px);-moz-backdrop-filter:blur(114px);backdrop-filter:blur(114px);margin:auto;position:relative;color:white;padding-bottom:54px;position:fixed}.social-link-copy{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;padding-right:18px;padding-left:18px;width:100%;border-radius:32px;border:1px solid rgba(255,255,255,0.13);backdrop-filter:blur(12px);height:48px;margin-top:10px}#social-link-input{flex-grow:1;border:none;background-color:transparent;font-size:14px;padding:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:white}.copy-button{background-color:transparent;border:none;cursor:pointer;padding:4px;margin-left:8px}.copy-button img{width:20px;height:20px}footer p{color:white;font-size:15px}.footer-row{display:flex;position:relative;flex-direction:row;align-items:center;justify-content:space-between;height:50px;background-color:rgba(1,0,9,0);z-index:5;bottom:0px}.bad-auth-error{display:none;justify-content:center;font-size:11px;color:#eb4f4f;text-align:left;margin-bottom:8px;margin-left:8px}.good-auth-error{display:none;justify-content:center;font-size:11px;color:#59ee7f;text-align:left;margin-bottom:8px}.leftfooter{margin-left:16px}.leftfooter a{display:flex;flex-direction:row}.leftfooter p,.logo-link p{background:linear-gradient(180deg,#fff 0%,#ebe5fb 50%,#7fabff 100%);-webkit-background-clip:text;background-clip:text;color:transparent;display:flex;flex-direction:row;font-size:19px;margin:auto;margin-left:10px}@media screen and (max-width:800px){.logo-link p{display:none}}.rightfooter{display:flex;flex-direction:row;margin-right:16px;align-items:center}.contact,.press,.legal,.feedback,.xlogo,.linkedinlogo,.instagramlogo,.tiktoklogo,.redditlogo,#pmLink{margin:auto;margin-left:15px;color:white}@media screen and (max-width:800px){.feedback{display:none}}.xlogo{height:19px}.instagramlogo,.redditlogo{height:25px}dialog{padding:0;border:0;border-radius:0.6rem}dialog::backdrop{background-color:rgba(0,0,0,0.4)}dialog + .backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,0.4)}dialog[open]{animation:slide-up 0.4s ease-out;display:flex}dialog{display:none;left:0;right:0;margin:auto;max-width:90vw;background-color:transparent}dialog#signup-modal form,dialog#login-modal form{display:block;margin:20px;width:500px}dialog#subscription-modal form{display:block;margin:20px;width:600px}dialog .button.social-auth{width:48%;background:#fff;color:#1D2129;border:1px solid #999;display:inline-block;padding:0 0 0 28px;text-align:left;margin:10px 4px}dialog .button.social-auth img{vertical-align:middle;margin:6px}dialog .button.more-options{background:linear-gradient(94deg,#c764ec,#4a36b1)}dialog .other-options-signup-row{display:flex;flex-direction:row;justify-content:center;align-items:center;margin:20px}dialog .other-options-signup-line{width:30%;height:0;border:1px solid #fff;margin:3px;display:inline-block}dialog .other-options-signup{color:#fff;font-size:15px;padding:0 10px 0 10px}dialog .switch-login-signup-button{padding:0 28px;color:#fff;background:#6ec0fd;font-weight:700;font-size:.7em;border-radius:3px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-width:0;border-style:none;-webkit-appearance:none;height:25px;cursor:pointer;margin:10px auto;width:30%;display:block}.login-container{display:none;flex-direction:column;width:440px;justify-content:flex-start;align-items:center;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);-webkit-backdrop-filter:blur(114px);-moz-backdrop-filter:blur(114px);-ms-backdrop-filter:blur(114px);margin:auto;color:white;position:fixed}.close{position:absolute;top:0.2em;right:0.2em;padding:0.3em;line-height:0.6;background-color:transparent;border:0;font-size:2em;color:#fff;cursor:pointer}.modal-header,.modal-body,.modal-footer{padding:1em;background-color:#2A282F;text-align:center;color:white}.login-header{text-align:center;font-size:36px;font-weight:600;letter-spacing:0.75px;line-height:normal;margin-top:49px;margin-bottom:0px;cursor:default;padding:0px}.share-header{text-align:center;font-size:36px;font-weight:600;letter-spacing:0.75px;line-height:normal;margin-top:54px;margin-bottom:0px}.share-subheader{text-align:center;color:darkgray;font-size:12px;line-height:18px;margin:auto;margin-top:8px;margin-bottom:24px}.out-credits-header{text-align:center;font-size:36px;font-weight:600;letter-spacing:0.75px;line-height:normal;margin-top:38px;margin-bottom:0px}.login-exit{display:flex;flex-direction:row;position:absolute;justify-content:right;right:24px;top:24px;cursor:pointer}.out-credits-exit{display:flex;flex-direction:row;position:absolute;justify-content:right;right:24px;top:24px;cursor:pointer}.please-subheader{text-align:center;color:darkgray;font-size:12px;line-height:18px;margin:auto;margin-top:8px;margin-bottom:16px}.options-container{width:270px;height:48px;display:flex;justify-content:center;align-items:center;background:rgba(142,142,142,0.05);border-radius:12px;justify-content:center;margin:auto;margin-top:6px;margin-bottom:6px;cursor:pointer}.membership-toggle{width:100%;height:36px}.login-active{display:flex;width:131px;height:40px;margin-left:4px;font-size:14px;font-weight:200;padding:0 41px 0 41px;justify-content:center;align-items:center;border-radius:10px;color:darkgray;cursor:pointer}.member-active{display:flex;width:131px;height:28px;margin-left:4px;font-size:12px;font-weight:200;padding:0 40px 0 40px;justify-content:center;align-items:center;border-radius:10px;color:darkgray;cursor:pointer}.signup{display:flex;width:131px;height:40px;padding:0 41px 0 41px;justify-content:center;align-items:center;border-radius:10px;font-size:14px;font-weight:200;color:darkgray;white-space:nowrap;text-align:center;cursor:pointer;margin-right:4px}.active{color:white;font-weight:400;background:rgba(255,255,255,0.1)}.signin-with-google{display:flex;position:relative;height:48px;width:270px;justify-content:center;align-items:center;gap:12px;border:none;border-radius:12px;color:white;font-size:14px;font-weight:400;font-family:inherit;background:rgba(255,255,255,0.1);margin:auto;margin-bottom:12px;transition:background 0s ease;cursor:pointer}.signin-with-google:hover{background:white;color:black}.button.login-with-email{display:flex;justify-content:center;background:none;border:none;white-space:nowrap;color:white;font-family:inherit;font-size:12px;font-weight:400;margin:auto;margin-bottom:48px;cursor:pointer}.email-container::before{content:"Email Address";position:absolute;z-index:1;top:10px;left:60px;font-size:9px;pointer-events:none;color:darkgray}.email-container{position:relative;display:none;margin:auto;margin-bottom:12px;width:270px;height:48px;border-radius:12px;background:rgba(142,142,142,0.02)}.email-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:darkgray;z-index:1;border-right:1px solid darkgray;padding-right:12px}.input-email{padding-left:58px;padding-top:22px;padding-bottom:10px;height:14px;line-height:14px;position:relative;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:transparent;color:white;width:100%}.input-email::placeholder{font-size:12px;line-height:18px}.password-container::before{content:"Enter Password";position:absolute;z-index:1;top:10px;left:60px;font-size:9px;pointer-events:none;color:darkgray}.password-container{position:relative;display:none;margin:auto;margin-bottom:12px;width:270px;height:48px}.lock-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:darkgray;z-index:1;border-right:1px solid darkgray;padding-right:10px}.input-password{font-size:12px;padding-left:58px;padding-top:22px;padding-bottom:10px;height:14px;line-height:14px;position:relative;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:transparent;color:white;width:100%}.input-password::placeholder{font-size:12px;line-height:18px}.reenter-password-container::before{content:"Re-enter Password";position:absolute;z-index:1;top:10px;left:60px;font-size:9px;color:darkgray;pointer-events:none}.reenter-password-container{position:relative;display:none;margin:auto;margin-bottom:12px;width:270px;height:48px}.button.login-email{display:none;flex-direction:column;background:#7000ff;border:none;width:270px;color:var(--white);font-size:14px;font-weight:500;white-space:nowrap;letter-spacing:2%;margin:auto;padding:12px;margin:auto;margin-bottom:12px;transition:background 0.2s ease;cursor:pointer;align-items:center;border-radius:12px}.button.sub-set{display:flex;flex-direction:column;align-items:center;border-radius:12px;background:#7000ff;border:none;width:270px;color:var(--white);font-size:14px;font-weight:500;white-space:nowrap;letter-spacing:2%;margin:auto;padding:12px;margin:auto;margin-bottom:12px;transition:background 0.2s ease;cursor:pointer}.button.goback{display:none;justify-content:center;background:none;border:none;white-space:nowrap;color:white;font-size:12px;font-weight:400;margin:auto;margin-bottom:24px;cursor:pointer}#forgot-password{display:none;justify-content:center;text-align:center;font-size:12px;margin:auto;margin-bottom:12px;color:white}#forgot-password:hover{background:none;cursor:default}span.click-here{color:#c549fe;cursor:pointer;margin-left:6px}.modal-body .title{font-size:22px;justify-content:center}.modal-body .subtitle{opacity:0.9}.modal-header{margin:0;padding-bottom:0.6em;background-color:#f3f3f3;border-bottom:1px solid #f3f3f3}.modal-footer{border-top:1px solid #f3f3f3}.subscription-modal-body{width:max(40vw,386px);background-color:#2A282F}.out-of-credits-modal-body{display:flex;flex-direction:column;width:80vw;max-width:440px;justify-content:flex-start;align-items:center;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);margin:auto;position:relative;color:white;padding-bottom:32px}.subscription-pro{display:flex;flex-direction:column}.modal-row{display:flex;flex-direction:row;justify-content:flex-start;padding-left:50px;align-items:center}.modal-row-top{display:flex;flex-direction:row;justify-content:flex-start;padding-left:40px;align-items:center}.purple{color:#c764ec}.smaller{text-align:left;font-size:12px;padding-right:70px}.stripe-signup-button{padding:8px 30px;font-size:16px;border-radius:45px;background-color:#a01ed1;color:white;width:auto;background:linear-gradient(94deg,#c764ec,#4a36b1);height:auto;border:none;cursor:pointer;vertical-align:bottom;white-space:nowrap;font-weight:bold;margin-bottom:11px}.switch-pay-button{font-size:16px;color:#9D9D9D;padding:10px;background:transparent;text-decoration:underline;width:auto;height:auto;border:none;cursor:pointer}.modal-pricing-title{padding-right:0px}.modal-pricing{margin:0px;font-size:14px;margin-bottom:4px;text-align:left}.modal-pricing-subheader{margin-bottom:100px}.modal-subscriptions-container{display:flex;position:relative;flex-direction:column;text-align:left;height:fit-content;border:1px solid transparent;border-radius:12px;padding:48px;padding-bottom:10px;color:#fff;overflow-y:hidden}.modal-small-subscription-container{background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);-webkit-backdrop-filter:blur(114px);height:fit-content;width:426px;border:1px solid rgba(255,255,255,0.13);border-radius:12px;margin:auto}.modal-subscription-section{display:flex;flex-direction:row;justify-content:space-between;height:auto;overflow:hidden;margin:auto;width:95%}#mobile-subscription-section-id{margin-top:16px}.modal-overview{visibility:visible}.modal-subscription-title-container{display:flex;flex-direction:column;justify-content:center;align-items:center}.modal-model-title{display:flex;flex-direction:row}.modal-subscription-title{font-size:27px;margin-bottom:5px;line-height:29px}.modal-subscriptions-subheader{font-size:14px;color:#9c9b9b;font-weight:300}.pro-title{margin-left:3px;font-weight:600}.modal-subscription-price{display:flex;justify-content:center}.modal-price{font-size:30px;color:#8f37ff;font-weight:500;margin-bottom:6px}.modal-subscription-length{font-size:24px;color:#8f37ff;margin-top:6px}.modal-get-started,.mobile-get-started{display:flex;flex-direction:row;width:100%!important;height:48px;padding:5px 95px;justify-content:center;align-items:center;gap:10px;border-radius:12px;font-size:18px;text-align:center;background-color:#8f37ff;color:white;border:none;white-space:nowrap;cursor:pointer}.modal-value{margin:0px;text-align:center;display:flex;flex-direction:column;justify-content:center;align-items:center;height:36px;border-bottom:1px rgba(255,255,255,0) solid}.modal-overview-title{display:flex;margin-block-start:0px;margin-block-end:0px;justify-content:flex-start;align-items:center;height:36px;width:238%;border-bottom:1px rgba(255,255,255,0.12) solid}.modal-overview{list-style-type:none;font-size:14px;line-height:38px;padding-left:0px}.modal-value2{margin-top:-21px;border-bottom:1px rgba(255,255,255) solid}.modal-api-value{border-bottom:none}.get-started-container{display:none;flex-direction:column}.go-back-subscription{backdrop-filter:blur(10px);width:100%!important;height:46px;background:var(--clear);border:1px solid transparent;border-radius:12px;color:var(--white);white-space:nowrap;cursor:pointer;transition:none;padding:5px 65px;margin:auto;font-size:18px}.subscription-terms{margin-bottom:12px;list-style:none;line-height:24px}.payment-container{display:flex;flex-direction:column}.payment-options{width:100%}.active{color:white;font-weight:400;background:rgba(255,255,255,0.1)}.modal-see-full{display:flex;flex-direction:row;justify-content:center;align-items:center;background:none;border:none;color:white;font-size:14px;cursor:pointer;margin:auto;margin-bottom:30px;gap:4px}.share-button{color:#fff!important;opacity:0.65;cursor:pointer;display:flex;align-items:center;flex-direction:row}.share-button img{margin-right:4px}#social-image{margin:0 auto}.separator-bullet{margin:0 4px;color:#999}.card-list{display:flex;flex-direction:column;justify-content:center;padding:18px 10px 0}.card-list .main-list{display:flex;flex-direction:column;margin:0 auto;width:100%}.card-list-item{border-radius:8px;margin:30px auto 30px auto;width:100%;max-width:700px;cursor:pointer;display:flex;flex-direction:row;outline:none;box-shadow:0 8px 92px 20px rgb(71 28 115 / 70%)}.card-list-item .heart-link{display:flex;flex:0 1;flex-direction:column;padding:12px 0;align-items:center}.card-list-item .card-content{display:flex;flex-direction:column;background:transparent;width:100%;border-radius:0 8px 8px 0;color:black;padding:20px}.card-list-item:hover{outline:1px solid #898989}.card-list-item .tag-container{display:flex;flex-direction:row}.card-list-item .card-list-item-header{display:flex;flex-direction:row;align-items:center;margin:12px;font-size:14px;color:#999}.card-list-item .trunc-summary{margin:0 12px 12px;font-size:14px;color:#fff}.card-list-item .card-footer{display:flex;flex-direction:row;align-items:center;margin:12px;font-size:14px}.card-list-item .card-footer .author-link{color:#c764ec}.card-list-item .title{margin:0 12px 12px;font-size:15px;font-weight:500;line-height:24px;color:#fff}.dropdown-select{background-color:rgba(111,0,255,0.049);color:darkgray;padding:12px;font-size:16px;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.dropdown-select option{color:white;margin-top:14px}.dropdown-select option:first-child{color:darkgray}.dropdown-select option:hover{background-color:#f1f1f1}.dropdown-payment-amount::before{content:"Add credits to your account";position:absolute;z-index:1;top:10px;left:60px;font-size:8px;color:darkgray;pointer-events:none}.dropdown-payment-amount::after{color:white}.dropdown-payment-amount{position:relative;display:none;margin-bottom:12px;width:100%;height:48px}.go-dropdown{display:flex}.money-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:darkgray;z-index:1;border-right:1px solid darkgray;padding-right:12px}.dropdown-input-amount{font-size:12px;padding-left:58px;padding-top:22px;padding-bottom:10px;height:48px;line-height:14px;position:relative;width:100%;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(255,255,255,0.02);backdrop-filter:blur(12px)}.dropdown-icon{position:absolute;right:16px;top:50%;transform:translateY(-50%);pointer-events:none;background-color:#ffffff00;color:white;border:none;z-index:2}.dropdown-icon:hover{cursor:pointer}.nudge-popup{position:fixed;top:20px;right:-350px;width:350px;max-height:300px;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);transition:right 0.3s ease;z-index:1000;overflow-y:auto;visibility:hidden}.nudge-popup.active{right:20px;visibility:visible}.nudge-popup-header{display:flex;justify-content:space-between;align-items:center;background:rgba(142,142,142,0.02);color:white;border-bottom:1px solid rgba(255,255,255,0.2);padding:2px 17px}.pro-popup-header{border:none;justify-content:flex-end}.nudge-popup-header-text{display:flex;align-items:center;gap:10px}.nudge-popup-body{padding:20px}.nudge-signin-button{margin-top:12px;font-size:16px}.nudge-pro-popup{position:fixed;bottom:20px;right:-350px;width:350px;max-height:400px;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);transition:right 0.3s ease;z-index:1000;overflow-y:auto;visibility:hidden}.nudge-pro-popup.active{right:20px;visibility:visible}.nudge-pro-body-title{display:flex;flex-direction:column;justify-content:center;text-align:center}.nudge-pro-icon{margin-top:-20px;height:50px}.close-icon{cursor:pointer;font-size:40px;opacity:.75}.sub-terms-pro-styling{padding-left:0px;padding-top:8px;margin:auto;flex-direction:column}.sub-terms-go-styling{padding-left:0px;padding-top:8px;margin:auto;flex-direction:column}.dataset{position:relative;width:100%}#amount{-webkit-appearance:none;-moz-appearance:none}.card-list-item .title a{color:#fff}.thumbnail{width:500px;max-width:100%;margin:12px auto;height:350px;max-height:100%;box-sizing:border-box;border-radius:8px;background-size:contain;background-repeat:no-repeat;background-position:center}.middle{vertical-align:middle}.hide{display:none}.heart-link{display:flex;align-items:center;justify-content:center;color:#999!important;text-decoration:none!important;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.heart-count{margin:4px}.heart-link:not([hearted]) .hearted-heart-icon{display:none}.heart-link[hearted] .unhearted-heart-icon{display:none}a:hover,a:focus{text-decoration:none}.social-icon{display:flex;gap:26px}.social-name{font-size:14px}.icon-container{display:flex;flex-direction:column;align-items:center;gap:8px}.icon-container a{display:flex;width:58px;height:58px;border-radius:12px;background-color:#ffffff04;justify-content:center;align-items:center;transition:background-color 0.3s;margin-bottom:-8px}.icon-container a:hover{background-color:#ffffff12}.facebook a:hover{background-color:#1876f2}.reddit a:hover{background-color:#ff4400}.x a:hover{background-color:rgb(13,13,13)}.linkedin a:hover{background-color:#0a66c2}.icon-container img{width:55%;height:auto;transition:transform 0.3s}.icon-container a:hover img{transform:scale(1.1)}@media screen and (max-width:960px){header img.header-social-icon{margin-left:12px}}@media screen and (max-width:800px){.modal-row{padding-left:2px}.smaller{padding-right:30px}}@media screen and (max-width:600px){ul li.dropdown ul{right:2%}.contact,.press,.feedback,.legal{margin-left:10px;font-size:12px}.linkedinlogo,.instagramlogo,.tiktoklogo,.redditlogo{margin-left:10px;height:22px}.xlogo{height:18px}.modal-row-top{padding-left:15px}.smaller{padding-right:10px}dialog#signup-modal{width:365px}dialog#signup-modal form{width:90%;margin:auto}dialog#login-modal form{width:100%;margin:auto}dialog#subscription-modal form{width:400px;margin:10px}.thumbnail{max-width:90%;margin:12px}dialog .button{width:80%}dialog input[type=email]{width:90%}dialog input[type=text]{width:90%}dialog input[type=password]{width:90%}dialog .button.social-auth{width:80%;display:block;margin:auto;margin-bottom:10px;text-align:left}.card-list .card-list-item{margin:4px 0}.card-list .card-list-item .card-content{width:87%}header img.deepai-logo{height:28px;margin-left:8px;width:32px;object-fit:cover;object-position:left}.sub-terms-pro-styling{margin:auto}.sub-terms-go-styling{margin:auto}}@media (max-width:500px){.social-modal-body{width:268px}.social-icon{gap:12px}#social-modal{width:98%}.social-name{font-size:12px}}@media screen and (max-width:470px){.modal-small-subscription-container{width:96vw;height:auto}.modal-subscriptions-container{padding:34px 34px 14px 34px}#close-sub{margin-right:10px}dialog{max-width:100vw;width:100vw}ul li.dropdown ul{width:96%}.login-container{width:96%}.leftfooter p{display:none}}@media screen and (max-width:420px){.modal-column{width:280px}.other-modal-column{width:280px;padding-bottom:5%;margin-bottom:10px}.other-modal-column .other-box-title{padding:0.8em}.modal-column .box-title{padding:0.8em}.other-modal-column :nth-child(2){padding:0.6em}.modal-row-top{padding-left:10px}.modal-column :nth-child(2){padding:0.6em}.member-active{padding:0 35px 0 35px}}@media screen and (max-width:390px){.member-active{padding:0 30px 0 30px}}@media screen and (max-width:375px){dialog#signup-modal form,dialog#login-modal form{width:90%;margin:auto}dialog input[type=email]{width:90%}dialog input[type=text]{width:90%}dialog input[type=password]{width:90%}dialog .button{width:90%}dialog .button.social-auth{width:90%}.modal-row{width:90%}.member-active{padding:0 20px 0 20px}}@media screen and (max-width:425px){.subscription-modal-body{width:auto}.out-of-credits-modal-body{width:auto}.subscription-pro{width:100%;margin:auto}}@media screen and (max-width:320px){ul li.dropdown ul{right:10px}dialog#signup-modal form,dialog#login-modal form{width:95%;margin:auto}dialog#signup-modal{width:365px}dialog#subscription-modal form{width:400px;margin:10px}dialog .button{width:100%}dialog .button.social-auth{width:100%}.thumbnail{max-width:90%;margin:12px}.card-list .card-list-item .card-content{width:87%}.card-list .card-list-item{margin:4px 0}dialog .button.social-auth{width:100%;display:block}.options-container{width:260px}.signin-with-google{width:240px}.email-container{width:240px}.password-container{width:240px}.reenter-password-container{width:240px}.button.login-email{width:240px}}@media screen and (max-width:290px){.options-container{width:235px}.member-active{padding:0 12px 0 12px}dialog{margin-left:0px}}.announcement-banner{background-color:#CBA8FF;color:#390D72;position:relative;box-sizing:border-box;display:none;justify-content:center;align-items:center;text-align:center;border-radius:50px;padding:8px 45px;margin:0 auto;max-width:fit-content}.banner-text{margin:0;padding:0;text-align:center;display:flex;flex-direction:column}.permanent-announcement-banner{display:none;background-color:#CBA8FF;color:#390D72;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;border-radius:50px;padding:8px 29.5px;margin:0 auto;max-width:fit-content}.menu-perm-ad{border-radius:6px;background-color:#CBA8FF;color:white;padding:8px 31.5px;margin-top:6px}.sidebar-perm-ad{border-radius:10px}.image-generator-banner{padding:8px 45px}.banner-text{margin:0;padding:0;text-align:center;display:flex;flex-direction:column}.perm-banner-text{margin:0;padding:0;text-align:center;display:flex;flex-direction:column}.main-text{font-size:16px;line-height:1.2;color:#390D72}.image-perm-text{font-size:18px}.sub-text{font-size:13px;line-height:1.2;color:#390D72;opacity:0.8}.image-sub-perm-text{font-size:15px}.sub-perm-text{font-size:12px}.pro-link-button{display:block;text-decoration:none;color:inherit;width:100%}.announcement-banner{display:none}.dismiss-button{background:transparent;border:none;color:#390D72;cursor:pointer;font-size:20px;padding:0;margin:0;position:absolute;right:10px;top:48%;transform:translateY(-50%);width:24px;display:flex;align-items:center;justify-content:center}div.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:10}div.left-sticky{position:fixed;top:20vh;left:0px;right:calc(100% - 320px);z-index:20;overflow:hidden}.fs-sidewall-container{z-index:9!important}#pmLink{visibility:hidden;text-decoration:none;cursor:pointer;background:transparent;border:none;font-size:16px;line-height:22px}#pmLink:hover{visibility:visible}@media (max-width:1650px){div.left-sticky{right:calc(100% - 180px)}}@media (min-width:1650px){div.left-sticky{right:calc(100% - 320px)}}h2,h3{font-weight:normal;font-size:20px}@media screen and (max-width:600px){#pmLink{font-size:12px}}@media screen and (max-width:850px){#pmLink{position:absolute;bottom:53px;text-align:center;left:0px;width:85vw}}body{color:white}h1{text-align:center;font-size:45px;font-weight:normal;margin-bottom:0px;margin-top:70px}.figure-name{font-size:0.8em;font-weight:500;text-align:center}h2{font-size:22px;font-weight:500;text-align:center}h3{margin:19px;text-align:center;width:calc(min(100vw - 18px,841px));margin-right:auto;margin-left:auto;margin-bottom:24px;margin-top:10px}.figure{width:200px;height:200px;margin:10px;margin-top:70px;cursor:pointer;transition:transform .2s;object-fit:cover;border-radius:12px}.captioned-figure{display:inline-block}.fig-name{margin:-5px}.idea-container{display:flex;margin:auto;flex-direction:column;text-align:left;width:calc(min(100vw - 24px,867px));text-decoration:none;list-style:none}.aichat-faq{text-align:left;width:calc(min(100vw - 18px,867px));margin:auto}.idea-container p{margin-bottom:32px}.learn-more-conatiner{text-align:left;width:calc(min(100vw - 24px,867px));margin:auto;margin-bottom:42px;font-size:32px}.weaknesses-container{margin-bottom:140px}.chatbox-wrapper{width:calc(min(100vw - 45px,867px));display:flex;flex-direction:column;position:relative;margin-right:auto;margin-left:auto}.chatbox{width:calc(min(100vw - 67px,818px));display:flex;flex-direction:column;margin:0px;resize:none;background:transparent;border:none;color:white;padding:22px;font-size:18px;height:187px;overflow:auto;justify-content:space-between;margin-top:0px;padding-bottom:47px;min-height:20px}.chatbox::placeholder{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chatbox:focus{outline:none}.outputBox{width:calc(min(100vw - 18px,818px));display:block;margin:10px;background:rgba(21,16,38,1);border-radius:12px;color:white;padding:22px;padding-top:0px;padding-bottom:42px;font-size:18px;border:1px solid rgba(255,255,255,0.13);margin-right:auto;margin-left:auto;overflow-x:hidden;margin-top:0px;position:relative}.humanize-box{display:flex;justify-content:space-between;width:calc(min(100vw - 18px,818px));border:1px solid rgba(255,255,255,0.13);background-color:transparent;padding:28px 22px 18px 22px;text-align:center;font-size:18px;color:white;border-radius:0 0 12px 12px;margin:-22px auto 12px auto;border-top:none}.humanize-title{display:flex;align-items:center;font-size:16px;color:white}.humanize-text-long{display:block}.humanize-text-short{display:none}.humanize-box a{color:#B78DED;text-decoration:none;position:relative;text-decoration:underline}.humanize-box a:hover{text-decoration:underline}.editsBox{display:none;flex-direction:row;justify-content:center;width:calc(min(100vw - 18px,841px));margin:auto;margin-bottom:12px;margin-top:2px}[data-edited] .editsBox{display:flex}.chatoptionsBox{display:flex;flex-direction:row;justify-content:flex-end;position:relative;margin-bottom:-20px;bottom:30px;margin-right:16px;align-self:center;background:none;border-radius:10px}.uploadoptionsBox{display:flex;flex-direction:row;justify-content:flex-end;position:relative;margin-bottom:0px;bottom:47px;width:96.6%;align-self:center;background:none;border-radius:10px}.hiddenTextContainer{display:none}.optionsBox{display:flex;flex-direction:row;justify-content:flex-end;margin-top:12px;position:absolute;bottom:0;right:0;padding:10px}.optionsBox button{margin:0 3px}.uploadButton{display:flex;margin:0;cursor:pointer;border:none;border-radius:50%;width:41px;height:41px;color:white;background-color:rgba(255,255,255,0.08);z-index:4;justify-content:center;align-items:center}.copytextButton{display:flex;margin-left:6px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(38,34,56,1);z-index:4}.summarizetextButton{display:flex;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(38,34,56,1);z-index:4}.summary .summarizetextButton{display:none}.deleteBoxButton{display:flex;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(38,34,56,1);z-index:4;margin-left:6px}.addBoxButton{display:flex;cursor:pointer;border:1px solid white;border-radius:6px;color:#101010;background:white}.deleteBoxButton,.summarizetextButton,.searchButton,.copytextButton,.expandButton,.webSummaryButton,.copyCodeButton,.livecodesButton,.uploadButton{font-size:16px}#errorpopup,#summarypopup,#copypopup,#upload-successful,#upload-unsuccessful{visibility:hidden;min-width:250px;background-color:rgba(45,40,60,1);border-radius:45px;padding:16px;position:fixed;z-index:10;left:50%;bottom:30px;transform:translateX(-50%);text-align:center;border:1px solid rgba(74,66,97,1);display:flex;align-items:center;justify-content:center;color:#fff}#summarypopup,#copypopup{border-color:rgba(74,66,97,1);background-color:rgba(45,40,60,1)}#upload-successful{color:white;border-color:#8F37FF;background-color:rgba(143,55,255,0.2);-webkit-backdrop-filter:blur(114px);-moz-backdrop-filter:blur(114px);backdrop-filter:blur(114px)}#errorpopup,#upload-unsuccessful{color:#ee7a7a;border-color:rgba(95,49,64,1);background-color:rgba(33,17,39,1)}.errorIcon{width:16px;height:16px;margin-right:0.75rem;flex-shrink:0;opacity:0.9}#errorpopup.show,#summarypopup.show,#upload-successful.show,#upload-unsuccessful.show,#copypopup.show{visibility:visible;-webkit-animation:fadein 0.5s,fadeout 0.5s 2.5s;animation:fadein 0.5s,fadeout 0.5s 2.5s}@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadeout{from{opacity:1}to{opacity:0}}@-webkit-keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@-webkit-keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}#progressContainer{width:calc(min(100vw - 18px,867px));height:10px;margin:auto;margin-top:12px;border-radius:12px;margin-bottom:12px}#deepaiProgressBar{height:10px;background:#8F37FF;border-radius:10px;width:0%}#chatSubmitButton{width:41px;height:41px;padding:0;border-radius:45px;border:none;background:#8F37FF;color:white;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:16px;flex-grow:0}#chatStopButton{width:41px;height:41px;padding:0;border-radius:45px;border:none;background:rgba(45,40,60,1);color:white;cursor:pointer;display:none;align-items:center;justify-content:center;flex-shrink:0;font-size:16px;flex-grow:0}.button-container{display:flex;align-items:center;justify-content:flex-end;gap:7px;width:100%}#recordButton{width:41px;height:41px;padding:0;border-radius:45px;border:none;background:rgba(45,40,60,1);color:white;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:width 0.3s ease,background-color 0.3s ease,color 0.3s ease;overflow:hidden}#recordButton.text{width:150px;border-radius:45px}#recordButton.recording{color:#ee7a7a;background-color:rgba(33,17,39,1)}.mic-icon{width:22px;height:22px}.fade-in{opacity:0;transition:opacity 0.2s ease-in}.fade-in.show{opacity:1}.chatEditSubmitButton{white-space:nowrap;color:white;background:#8F37FF;display:flex;margin-left:6px;border:none;cursor:pointer;border-radius:45px;padding:12px 24px;z-index:4}.chatEditCancelButton{display:flex;white-space:nowrap;color:white;margin-left:6px;cursor:pointer;border:none;border-radius:45px;padding:12px 24px;color:white;background-color:rgba(45,40,60,1);z-index:4}.chatEditSubmitButton:hover{background-color:color:black}.cta{display:flex;align-items:center;position:absolute;margin:auto;padding:14px 24px;transition:all 0.2s ease;border:none;background:none;z-index:5}.cta-extra{margin-left:48px}.cta:before{content:"";position:absolute;top:2px;left:1px;display:block;border:1px solid rgb(255,255,255);border-radius:24px;width:48px;height:48px;transition:all 0.3s ease}.button-path{display:none}.cta:hover .button-path{display:flex}.cta:hover{cursor:pointer}.cta:hover span{color:#000000}.cta span{position:relative;font-size:18px;font-weight:500;letter-spacing:0;color:#ffffff}.cta svg{position:relative;top:-1px;margin-left:24px;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke:#ffffff;stroke-width:2;transform:translateX(-32px);transition:all 0.3s ease-in-out}.cta:hover:before{width:100%;background:rgb(255,255,255)}.cta:hover svg{transform:translateX(-16px);stroke:#000000}.cta:active{transform:scale(0.95)}.idea-section{display:flex;flex-direction:column;width:calc(min(100vw - 18px,867px));margin:auto;margin-top:12px;margin-bottom:200px}.idea-row{position:relative;margin-top:84px}#idea-info-list,#str-info-list,#weak-info-list{text-align:left;display:flex;position:relative}#history-rename{display:flex;flex-direction:row;justify-content:center;align-items:center;margin:auto}#history-delete-chat,#character-edits-chat{display:flex;flex-direction:row;justify-content:center;align-items:center;width:55.35%;gap:7px}#chatSessionDeleteButton,#chatHistoryDeleteButton,#see-more-btn{right:8px;height:45px;width:50%;border:none;border-radius:32px;background-color:rgba(45,40,60,1);color:white;align-items:center;justify-content:center;padding:0 21px;cursor:pointer}#characterReportButton{color:#ee7a7a;font-size:14px;padding:8px 16px;border:none;border-radius:45px;background-color:rgba(33,17,39,1);margin:auto}#chatSessionRenameButton{margin:5px;color:#ffffff;padding:10px 17px;border-radius:32px;cursor:pointer;border:1px solid #c764ec;font-size:12px;text-align:center;background:#c764ec}#chat-editing-button{display:block;margin:auto;color:#fff;padding:16px 17px;cursor:pointer;font-size:12px;text-align:center;background:transparent;text-decoration:none;border:none;opacity:0}.response-length-options{margin-left:auto;display:flex;justify-content:center;width:calc(min(100vw - 24px,850px));margin-right:auto;align-items:center}.response-length-options input[type=radio]{margin:0px;width:0px}.response-length-options input[type=radio]:checked + label{background-color:#1f77d1;color:rgba(45,40,60,1)}.other-chat-styles{display:flex;flex-direction:row;justify-content:space-between;flex-wrap:wrap;margin:10px;width:calc(100% - 20px);max-width:890px;margin-left:auto;margin-right:auto}.learning-style{justify-content:center}.other-chat-styles a{display:flex;width:calc(33% - 12px);padding:18px 14px;align-items:center;gap:10px;border-radius:12px;border:none;background:none;justify-content:center;backdrop-filter:blur(2.10px);margin:6px;color:white;box-sizing:border-box}.other-chat-styles a:hover{background:var(--clear)}.characters-chat-link{display:block;width:50%;color:white;cursor:pointer;font-size:15px;text-align:center;margin-left:auto;margin-right:auto;margin-bottom:18px;border-radius:45px;border:none;background:rgba(45,40,60,1);padding:13.5px 0px}.chat-dropdown-box{display:block;font-size:16px;margin:auto;color:white;background:rgba(45,40,60,1);border:none;border-radius:12px;padding:0px;width:calc(min(100vw - 18px,867px));max-width:865px;min-width:200px;opacity:0;appearance:none;-moz-appearance:none;-ms-appearance:none;padding-right:30px}.chat-dropdown-box:focus{outline:none}.genius-chat-mode-title{font-size:42px;font-weight:500}.featured-chat-modals{display:flex;flex-direction:row;text-align:center;font-size:36px;font-weight:500;width:100%;height:auto;gap:24px}.genius-images{font-size:48px;font-weight:500}.genius-chat-sparkle{position:absolute;width:5%;height:auto;padding-left:6px;top:44px}.genius-mode-chat-popup-description{font-weight:400;font-size:24px;margin-bottom:48px;margin-top:-12px}.featured-chat-images,.tier-images{width:100%;height:auto}.mobile-featured-chat-images{display:none}.mobile-featured-chat-images,.tier-images{width:100%;height:auto;margin-bottom:24px}.chat-prompting{border:2px solid rgba(255,255,255,0.13);background:rgba(255,255,255,0.02);border-radius:12px;padding:12px;bottom:36%;left:34%;position:absolute;font-size:14px;width:242px;text-align:center;box-shadow:8px 14px 17px rgba(0,0,0,0.4);backdrop-filter:blur(114px);-webkit-backdrop-filter:blur(114px);-moz-backdrop-filter:blur(114px)}.try-now{height:42px;white-space:nowrap;background-color:#8f37ff;color:white;border:none;width:100%!important;font-size:14px;font-weight:400;font-family:var(--font-family-helvetica);padding:0px;margin-bottom:12px;border-radius:12px;margin-bottom:24px;cursor:pointer}.terms{font-size:14px;text-align:center;color:#BDBDBD}.exit-feature{display:flex;flex-direction:row;position:absolute;justify-content:right;right:10px;top:10px;cursor:pointer;margin:10px}@media screen and (max-width:915px){.chatoptionsBox{width:calc(min(100vw - 25px,830px));margin-right:0px}.uploadoptionsBox{width:92.6%}}.select-wrapper{position:relative;width:calc(min(100vw - 22.5px,865px));margin:0 auto}.dropdown-arrow-container{position:absolute;top:50%;right:18px;transform:translateY(-50%);pointer-events:none}.dropdown-arrow-container svg{display:block;width:100%;height:auto}@media screen and (max-width:702px){.genius-chat-mode-title{width:100%;height:auto}.exit-feature{width:14px;top:12px;right:14px;margin-bottom:8px}.genius-mode-header{font-size:12px}.genius-chat-sparkle{display:none}.featured-chat-images{display:none}.mobile-featured-chat-images{display:flex;flex-direction:column;justify-content:center}.try-now{margin-top:-90px;margin-bottom:8px;height:42px}.genius-mode-chat-popup-description{font-weight:400;font-size:12px;margin-bottom:12px;margin-top:-12px}.chat-prompting{display:none}.genius-chat-mode-title{font-size:24px;margin-top:18px}.standard-image{display:none}.terms{font-size:10px}.sidebar-ad{display:none}.sidebar-content{height:calc(100% - 120px)!important}}.amazon-advertisement-container{display:flex;justify-content:center;max-width:100%;flex-direction:column}.inner-amazon-advertisement-container{height:33%;border:5px solid #1a1a1a;border-radius:12px;text-align:center;text-decoration:none;color:black;padding:10px;display:flex;flex-direction:column;align-items:bottom;justify-content:center;background:white}.inner-amazon-advertisement-container img{height:auto;object-fit:contain;max-height:100px;max-width:100px}.amazon-ad-image-box{width:33%}.inner-amazon-advertisement-container-info{height:100%;justify-content:center;display:inherit}.amazon-ad-text-container{width:67%;display:flex;justify-content:center;align-self:center;flex-direction:column;overflow:hidden;margin-left:20px}.amazon-ad-text-container p{margin-bottom:0px}.amazon-ad-stat-box{display:flex;flex-direction:row;justify-content:space-around}.amazon-star-rating{height:20px;margin:10px;margin-bottom:0}.amazon-advert-price{margin:10px;margin-bottom:0;color:#B63419;height:20px}.amazon-ad-prime{display:flex;align-self:end;margin:10px;margin-bottom:0;height:20px}.amazon-ad-scroll-container{width:100%;height:auto;overflow:auto}.amazon-ad-overall-container{display:flex;flex-direction:row}.outputBox .url-chip{display:inline-flex;align-items:center;padding:8px;margin-bottom:10px;margin-right:0px;background-color:rgba(255,255,255,0.08);color:white;border-radius:12px;font-size:14px;text-decoration:none;transition:background-color 0.3s}.url-chip img{margin-right:5px;width:27px;height:27px}.expandButton{display:block;width:max-content;margin:10px auto;margin-top:0px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(45,40,60,1);text-align:center}.expandButton.expanded{background-color:rgba(74,66,97,1)}.expandButton.collapsed{background-color:rgba(45,40,60,1)}.showSummaryText:hover{cursor:pointer}.resultDiv{position:relative;margin-bottom:12px;background-color:rgba(255,255,255,0.08);border-radius:12px;padding:16px;font-size:16px;line-height:1.4;border:none;position:relative;margin:0px;margin-bottom:7px;color:white;overflow:auto}.resultsContainer{margin-bottom:16px}.outputBox .resultDiv a{color:#fff;text-decoration:none}.outputBox .resultDiv a:visited{color:#a9a9a9;text-decoration:none}.webSummaryButton{float:right;display:flex;margin-left:6px;margin-top:6px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(74,66,97,1);z-index:4}.searchButton{display:flex;margin-left:6px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(255,255,255,0.08);z-index:4}[data-has-results] .searchButton{display:none}.outputBox pre{background-color:rgba(255,255,255,0.08);border-radius:12px;padding:16px;overflow-x:auto;font-size:16px;line-height:1.4;white-space:pre-wrap;border:none;position:relative;margin:0px;color:#ffffff26;margin-bottom:12px;display:flex;align-items:flex-start;padding-top:24px;padding-left:24px;padding-bottom:48px;margin-top:12px}.outputBox pre *{font-family:monospace}.outputBox code{font-family:monospace;color:#aeaeae;font-size:16px}.outputBox pre::after{content:'';display:block;height:42px;margin-bottom:-30px}.outputBox .copyCodeButton{position:absolute;bottom:10px;right:10px;display:flex;font-family:'Atkinson Hyperlegible';margin-left:6px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(74,66,97,1);z-index:4}.outputBox .livecodesButton{position:absolute;bottom:10px;right:74px;display:flex;font-family:'Atkinson Hyperlegible';margin-left:6px;cursor:pointer;border:none;border-radius:45px;padding:6px 12px;color:white;background-color:rgba(74,66,97,1);z-index:4}.outputBox .livecodesButton img{width:auto;height:18px}.outputBox strong{font-weight:bold}.outputBox a{color:white;cursor:pointer;text-decoration:underline}.outputBox a:visited{color:#a9a9a9;cursor:pointer;text-decoration:underline}.outputBox blockquote{padding-left:10px;border-left:2px solid #aeaeae;font-style:italic;margin:0}.outputBox blockquote cite{display:block;text-align:right;color:#aeaeae;font-style:normal}.outputBox .table-container{overflow:hidden;border:1px solid #aeaeae;width:fit-content}.outputBox table{width:100%;border-collapse:collapse;margin:0}.outputBox th,.outputBox td{border:1px solid #aeaeae;padding:0.5em 1em;text-align:left}.outputBox th{font-weight:bold}.outputBox h1,.outputBox h2,.outputBox h3,.outputBox h4,.outputBox h5,.outputBox h6,.outputBox p,.outputBox ul,.outputBox ol,.outputBox li{margin:0;margin-top:7px;text-align:left;padding-top:5px;padding-bottom:5px;width:auto}.outputBox ul,.outputBox ol{padding-left:20px;padding-top:10px;padding-bottom:10px}.outputBox li{padding-top:5px;padding-bottom:5px}.outputBox ul ul,.outputBox ul ol,.outputBox ol ul,.outputBox ol ol{padding-left:40px}.outputBox p{white-space:pre-wrap}.outputBox>*:not(.expandButton):not(.optionsBox):not(.chipsBox):not(.resultsContainer){padding-top:10px}.outputBox.expanded .chipsBox,.outputBox.expanded .showSummaryText,.outputBox:not(.expanded) .resultsContainer,.outputBox:not(.expanded) .hideSummaryText{display:none}.generic-text-ad{width:calc(min(100vw - 18px,841px));max-width:818px;margin:10px auto;padding:20px;background-color:#2a0e3a;border-radius:10px;text-align:center;position:relative;overflow:hidden;transition:background-color 0.3s ease}.generic-text-ad::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;border-radius:10px;padding:3px;background:linear-gradient(135deg,#6a0dad,#9400d3,#ff1493);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.generic-text-ad::after{content:"Sponsored";position:absolute;top:5px;right:5px;color:white;padding:2px 5px;font-size:12px;border-radius:3px}.generic-text-ad:hover{background-color:#3a1555}.generic-text-ad a{color:#fff;text-decoration:none;display:block;position:relative}.generic-text-ad p{margin:0;font-size:20px;font-weight:bold;line-height:1.4}.history-title-combo{display:flex;flex-direction:column;font-size:20px;font-weight:400}.history-content-subheader-row{font-size:16px;color:#9F9F9F;margin-top:8px}.history-editing,.history-manager{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin-top:32px;width:calc(min(100vw - 24px,867px));max-width:865px;min-width:200px;margin:auto;margin-top:42px}.history-manager{margin-bottom:0px}#history-editing{display:none;opacity:0}#rename-chat-button{position:absolute;right:8px;height:36px;border:none;border-radius:18px;background:rgba(45,40,60,1);color:white;align-items:center;justify-content:center;padding:0 21px;cursor:pointer}.history-input-field{width:-webkit-fill-available;height:48px}.history-input-edit-container{display:flex;position:relative;align-items:center;width:55%;border-radius:32px;border:1px solid rgba(255,255,255,0.13);background:rgba(255,255,255,0.04);backdrop-filter:blur(12px)}#new-chat-title{width:80%;height:48px;border-radius:32px;border:none;padding:0px;padding-left:24px;padding-right:80px;background:transparent;font-family:"Helvetica";font-size:16px;font-weight:400;color:white}#new-chat-title::placeholder{color:#9F9F9F}.chat-mode-border{border:.5px solid #fefefe12;width:calc(min(100vw - 18px,864px));height:0px;margin:auto;margin-top:42px}#chat-mode-border{margin-bottom:42px}select.chat-dropdown-box>option{color:black}@media screen and (max-width:890px){.chatoptionsBox{width:calc(min(100vw - 25px,820px))}.outputBox,.humanize-box{width:calc(min(100vw - 67px,841px));padding-left:22px;padding-right:22px}.history-editing{display:flex;flex-direction:column}.history-title-combo{margin-bottom:18px;width:100%}.chat-mode-border{width:94%}.history-input-edit-container{width:100%}#history-delete-chat,#character-edits-chat{width:100%}.history-manager{display:flex;flex-direction:column}#chatSessionDeleteButton,#chatHistoryDeleteButton,#see-more-btn{width:50%}}@media screen and (max-width:715px){.response-length-options{flex-direction:column}.history-editing,.history-manager,#see-more-btn,.characters-chat-link{width:calc(min(100vw - 24px,867px));margin-top:8px!important}#history-editing{margin-top:0px;margin-bottom:24px}#history-delete-chat,#character-edits-chat{flex-direction:column}.history-title-combo{box-sizing:border-box;padding-left:8px}#chatSessionDeleteButton,#chatHistoryDeleteButton{width:100%}.other-chat-styles{flex-direction:column;margin:auto;max-width:98%}.other-chat-styles a{box-sizing:border-box;margin:0px;margin-bottom:7px;width:100%}.characters-chat-link{margin-bottom:12px}}.optionsBox{display:flex}.group1,.group2{display:flex}#see-more-btn{margin:15px auto 0;padding:0;display:flex;margin-bottom:60px}.chat-dropdown-box{display:block;font-size:16px;width:100%;color:white;background:rgba(45,40,60,1);border:none;border-radius:12px;padding:13.5px 22px;appearance:none;-webkit-appearance:none;-moz-appearance:none;opacity:1}.kontext-ad,.koah-ad-container{width:calc(min(100vw - 45px,841px));display:flex;flex-direction:column;margin:0px;resize:none;background:linear-gradient(to right,rgba(168,85,247,0.2),rgba(59,130,246,0.2));border-radius:12px;border:1px solid rgb(214 168 255 / 30%);color:white;padding:22px;padding-right:0px;font-size:18px;margin-right:auto;margin-left:auto;overflow:auto;justify-content:space-between;margin-top:0px;margin-bottom:10px}.kontext-a{text-decoration:underline;color:#b78ded}.koah-ad{text-decoration:underline;color:#b78ded;>br{display:none}}.koah-ad-badge{display:none}.monetano-ad{display:block;margin-left:auto;margin-right:auto}// Makes KaTeX font size shrink with screen size and for large equations .katex{font-size:0.7vw}.trustpilot-popup{position:fixed;bottom:100px;left:20px;width:280px;max-height:400px;border-radius:12px;border:1px solid rgba(255,255,255,0.13);background:rgba(142,142,142,0.02);backdrop-filter:blur(114px);transform:translateX(-350px);transition:transform 0.3s ease-out;z-index:1000;overflow-y:auto;visibility:hidden}.trustpilot-popup.active{transform:translateX(0);visibility:visible}.chat-layout-container{position:relative;margin:0;padding:0}.chat-layout-container.sidebar-open .chat-sidebar{transform:translateX(0)}@media (min-width:1200px){.chat-layout-container.sidebar-open .chat-main{margin-left:270px;transition:margin-left 0.2s ease}.chat-layout-container:not(.sidebar-open) .chat-main{margin-left:0;transition:margin-left 0.2s ease}}.chat-layout-container:not(.ready-for-animation) .chat-sidebar,.chat-layout-container:not(.ready-for-animation) .chat-main,.chat-layout-container:not(.ready-for-animation) .persistent-compose-area{transition:none!important}.chat-sidebar{position:fixed;top:47px;bottom:50px;width:260px;background:rgba(21,16,38,1);border:1px solid rgba(51,47,66,1);z-index:5;overflow:hidden;transition:transform 0.2s ease;transform:translateX(-100%);left:0;border-radius:0 12px 12px 0;border-left:none}@media (min-width:1200px){.chat-sidebar{left:10px;border-radius:12px;border-left:1px solid rgba(51,47,66,1)}.chat-layout-container:not(.sidebar-open) .chat-sidebar{transform:translateX(calc(-100% - 10px))}}.sidebar-header{top:0;background:rgba(25,23,42,1);padding:21.5px;border-bottom:1px solid rgba(255,255,255,0.13);text-align:center;cursor:pointer}.sidebar-label{font-size:18px}.sidebar-toggle-container{position:fixed;top:58px;left:11px;display:flex;align-items:center;gap:10px;z-index:6}@media (min-width:1200px){.sidebar-toggle-container{left:21px}}.sidebar-toggle{width:45px;height:45px;border-radius:10px;border:none;background:rgba(45,40,60,1);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:width 0.3s ease,opacity 0.3s ease,visibility 0.3s ease,box-shadow 0.3s ease}.history-icon{width:28px;height:28px}.sidebar-content{height:calc(100% - 120px);overflow-y:auto;overflow-x:hidden;padding:16px;box-sizing:border-box}.sidebar-content.no-scroll{overflow-y:hidden}:root{color-scheme:dark}.chat-main{position:relative;margin-left:0}.sidebar-footer{position:absolute;bottom:0;width:100%;padding:12px 16px;box-sizing:border-box;background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,0.25) 20px,rgba(0,0,0,0.5) 100%)}.sidebar-ad{position:absolute;bottom:50px;width:100%;padding:12px 16px;box-sizing:border-box}.delete-all-history-button{width:100%;background:rgba(45,40,60,1);color:#fff;border:none;border-radius:45px;padding:12px 16px;font-size:16px;cursor:pointer;text-align:center;position:relative;overflow:hidden}.delete-all-history-button::after{content:"";position:absolute;left:0;right:0;bottom:-10px;height:20px;background:linear-gradient(to bottom,transparent,rgba(0,0,0,0.2));border-radius:0 0 45px 45px;z-index:-1}.sidebar-overlay{position:fixed;top:47px;left:0;right:0;bottom:50px;background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,0.35) 30px,rgba(0,0,0,0.35) calc(100% - 30px),rgba(0,0,0,0) 100%);opacity:0;pointer-events:none;transition:opacity 0.2s ease;z-index:4}.sidebar-overlay.active{opacity:1;pointer-events:auto}.history-heading-label{color:#9F9F9F;margin:30px 0 6px 7px;font-size:14px}.chat-history-item{position:relative;display:block;padding:8px 40px 8px 8px;color:#fff;cursor:pointer;border-radius:10px;background-color:transparent;transition:none;margin-bottom:6px}.chat-history-label{display:block;white-space:normal;word-wrap:break-word;overflow-wrap:break-word}.chat-history-dots{position:absolute;top:50%;right:8px;transform:translateY(-50%);font-size:24px;font-weight:bold;user-select:none;opacity:0}.chat-history-item-wrapper:hover .chat-history-dots{opacity:1}.chat-history-item:hover{background-color:var(--clear)}.chat-history-item.current-chat{background-color:rgba(60,55,75,1)}.chat-history-item.menu-open{background-color:var(--clear)}.chat-history-item.rename-open{background-color:var(--clear)}.chat-history-item.current-chat.rename-open{background-color:rgba(60,55,75,1)}.chat-history-item.current-chat.menu-open{background-color:rgba(60,55,75,1)}.chat-history-item.menu-open .chat-history-dots,.chat-history-item.current-chat .chat-history-dots{opacity:1}.chat-history-context-menu{position:fixed;display:none;background-color:rgba(21,16,38,1);border:1px solid rgba(51,47,66,1);border-radius:10px;padding:5px;z-index:6}.chat-history-context-menu button{display:block;width:100%;border:none;cursor:pointer;text-align:center;padding:5px 8px;background:transparent;border-radius:6px}.history-rename-btn{color:#fff;margin-bottom:5px}.history-rename-btn:hover{background:rgba(45,40,60,1)}.history-delete-btn{color:#ee7a7a}.history-delete-btn:hover{background:rgba(51,23,42,1)}.inline-rename-input{display:block;padding:6px 6px;border-radius:5px;border:1px solid rgba(74,66,97,1);background:rgba(45,40,60,1);color:#fff;width:90%;outline:none}.modal-root{position:fixed;overflow:hidden;background-color:rgba(0,0,0,0.5);left:0;top:0;width:0;height:0;opacity:0;transition:opacity 0.15s ease-out,width 0s linear 0.15s,height 0s linear 0.15s;z-index:9999}.modal-root.visible{width:100%;height:100%;opacity:1;transition:opacity 0.15s ease-out}.modal{margin:0 auto;width:100%;max-width:400px;background:rgba(21,16,38,1);border:1px solid rgba(51,47,66,1);padding:0;border-radius:12px;position:relative;top:50%;transform:translateY(-50%);max-height:85vh;overflow:auto}.title{text-align:center;font-size:20px;margin-top:1.5rem}.confirm-desc{font-size:14px;color:#bbb;text-align:center;padding:1.25rem 2rem}.modal-button-container{display:flex;flex-direction:column;justify-content:center;margin-bottom:1.5rem}.confirm-button{padding:0.6rem 1rem;background-color:transparent;margin:0.25rem 2rem;border-radius:5px;border:none;color:white;cursor:pointer}#confirm-yes-btn{color:#ee7a7a;background-color:rgba(51,23,42,1);border-radius:45px}#confirm-cancel-btn{background-color:rgba(45,40,60,1);border-radius:45px}#confirm-yes-btn:disabled{cursor:not-allowed;opacity:0.5}.confirm-input{display:block;padding:12px 12px;margin:4px auto;margin-top:0px;border-radius:12px;border:1px solid rgba(74,66,97,1);background:rgba(45,40,60,1);color:#fff;width:76%;outline:none}.pro-banner-showing .new-chat-button-container,.pro-banner-showing .sidebar-toggle-container,.pro-banner-showing .sidebar-overlay{top:100px!important}.pro-banner-showing .chat-sidebar{top:89px!important}@media (min-width:1200px){.new-chat-button-container{right:21px}}.new-chat-button{width:45px;height:45px;border-radius:10px;border:none;background:rgba(45,40,60,1);display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;transition:width 0.3s ease,opacity 0.3s ease,visibility 0.3s ease,box-shadow 0.3s ease}.plus-icon{width:22px;height:22px;margin:0;display:flex;align-items:center;justify-content:center}.chat-mode-dropdown-container{position:relative;display:inline-block;width:calc(min(100vw - 22.5px,400px));max-width:865px;margin:auto}.chat-mode-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;font-size:16px;width:100%;height:45px;color:white;background:rgba(45,40,60,1);border:none;border-radius:12px;padding:8px 14px;cursor:pointer}.chat-mode-dropdown-menu{position:absolute;top:auto;bottom:45px;left:50%;transform:translateX(-50%);width:250px;background-color:rgba(21,16,38,1);border:1px solid rgba(51,47,66,1);border-radius:12px;padding:8px;z-index:6;box-sizing:border-box;display:none}.chat-mode-menu-header{display:flex;align-items:center;justify-content:space-between;margin:14px 14px 6px 14px;padding-bottom:6px}.header-title{font-size:14px;color:#9F9F9F}.info-link{color:#9F9F9F;text-decoration:none;display:flex;align-items:center}.chat-mode-menu-item{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;color:#fff;font-size:15px;line-height:1.4;border-radius:6px}.chat-mode-menu-item:hover{background-color:var(--clear);cursor:pointer}.chat-mode-menu-item .text-container{display:flex;flex-direction:column}.chat-mode-description{font-size:13px;color:#9F9F9F;margin-top:4px}.chat-mode-locked{opacity:0.5}.chat-mode-checkmark{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin-left:10px}.chat-mode-menu-item:not(.selected) .chat-mode-checkmark{display:none}.upload-preview-container{position:absolute;top:10px;left:20px;display:flex;align-items:center;gap:8px;z-index:4}.image-chatbox{text-align:center;display:inline-block;background:rgba(25,23,42,1);border-radius:12px;border:1px solid rgba(49,47,64,1);border-radius:12px;padding:4px;width:auto}.chat-image{padding-top:0px!important;width:30%;height:30%;border-radius:8px;object-fit:contain;display:block;text-align:center;margin-bottom:36px;margin-left:15px}.preview-image{height:48px;width:48px;object-fit:cover;border-radius:8px;border:1px solid rgba(255,255,255,0.2)}.close-button{background:transparent;border:none;color:white;font-size:16px;cursor:pointer;background-color:rgba(255,255,255,0.08);border-radius:20px;padding:5px 7px}#convo{height:auto;overflow-y:auto;padding-bottom:77px;scroll-behavior:smooth;display:block;margin-bottom:-10px;width:100%;margin-left:auto;margin-right:auto;position:relative;transition:background-image 0.3s ease;padding-top:24px}.persistent-compose-area{position:fixed;bottom:10px;left:0;right:0;margin:0 auto;width:calc(min(100vw - 21px,864px));max-width:864px;z-index:3;background-color:transparent;transform:none;transition:width 0.22s ease,left 0.22s ease,right 0.22s ease,margin-left 0.22s ease,max-width 0.22s ease}#persistentChatbox.chatbox{min-height:69px;max-height:25vh;height:auto;overflow-y:auto;flex:1;background:rgba(25,23,42,1);border-radius:12px;border:1px solid rgba(49,47,64,1);color:white;font-size:18px;padding:20px;padding-right:200px;margin:0;display:block;outline:none;word-wrap:break-word;line-height:1.5;white-space:pre-wrap;transition:height 0.1s;z-index:3;resize:none;box-sizing:border-box;width:100%}#persistentChatbox.has-thumbnail{min-height:60px;padding-top:60px}.persistent-compose-area .response-length-options{position:absolute;right:15px;bottom:14px;margin:0;padding:0;z-index:3;pointer-events:none}.persistent-compose-area .button-container{display:flex;align-items:center;gap:7px;pointer-events:none}.persistent-compose-area #chatSubmitButton,.persistent-compose-area #chatStopButton,.persistent-compose-area #recordButton,.persistent-compose-area .uploadButton{pointer-events:auto}#convo .chatbox-wrapper:last-child{display:none}@media (min-width:1200px){.chat-layout-container.sidebar-open .chat-main{margin-left:270px;transition:margin-left 0.2s ease}.chat-layout-container:not(.sidebar-open) .chat-main{margin-left:0;transition:margin-left 0.2s ease}.chat-layout-container.sidebar-open .persistent-compose-area{left:270px;width:auto;max-width:864px;margin-left:auto;margin-right:auto}.chat-layout-container:not(.sidebar-open) .persistent-compose-area{left:0;right:0;width:calc(min(100vw - 21px,865px));max-width:865px;margin:0 auto}.chat-layout-container.sidebar-open #convo{}.chat-layout-container:not(.sidebar-open) #convo{}}.explore-aichat-modes{width:calc(min(100vw - 21px,865px));margin:auto}.chat-chips-container{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-bottom:24px}.chat-chip-image{width:35px;height:35px;border-radius:50%;margin-right:8px;vertical-align:middle}.chat-chip{display:inline-flex;align-items:center;justify-content:center;padding:8px 16px 8px 16px;border-radius:45px;background-color:rgba(45,40,60,1);color:white;font-size:14px;text-decoration:none;white-space:nowrap}.chat-chip-with-image{padding:8px 16px 8px 9px}.hidden-chip{display:none}#chatMain>h1,#chatMain>h3,#chatMain .explore-aichat-modes,#chatMain .figure,#characterReportButton,footer{display:block}#chatSidebar{bottom:10px}#sidebarOverlay{bottom:10px}.no-scroll-animation{scroll-behavior:auto!important}@media (max-width:523px){.chat-mode-dropdown-container{margin-left:56px;margin-right:56px}}.chat-main{position:relative;display:flex;flex-direction:column;margin-bottom:10px}#convo{transition:height 0.05s ease-out;flex:0 1 auto}#convo ~ .persistent-compose-area{position:absolute;bottom:-37px;left:0;right:0;z-index:3}.persistent-compose-area{flex:0 0 auto}.nav-items{display:flex;justify-content:space-between;align-items:center;width:calc(100% - 32px)}.chat-mode-section{display:flex;margin:0;width:auto;align-items:center;position:relative;z-index:50;pointer-events:auto}.chat-mode-dropdown-container{position:relative;width:auto;margin-right:0;pointer-events:auto}.chat-mode-dropdown-trigger{display:flex;align-items:center;justify-content:flex-start;height:41px;border-radius:45px;background:rgba(45,40,60,1);border:none;color:white;font-size:16px;cursor:pointer;position:relative;z-index:10;pointer-events:auto;overflow:hidden;width:fit-content;padding-left:12px;padding-right:41px;margin-left:auto;transition:width 0.15s cubic-bezier(0.2,1,0.3,1),padding 0.15s cubic-bezier(0.2,1,0.3,1)}.chat-mode-dropdown-trigger.compact{width:41px;padding-left:0;padding-right:0}#currentChatModeLabel{transition:opacity 0.15s cubic-bezier(0,0,0.58,1) 0.05s;white-space:nowrap;margin-right:6px}.chat-mode-dropdown-trigger.compact #currentChatModeLabel{opacity:0;width:0;margin:0;padding:0;position:absolute;visibility:hidden}.dropdown-caret{position:absolute;right:8.5px;top:50%;transform:translateY(-50%) rotate(180deg);width:24px;height:24px;z-index:2}.chat-mode-dropdown-trigger.open .dropdown-caret{transform:translateY(-50%) rotate(0deg)}.chat-mode-menu-header{display:flex;align-items:center;justify-content:space-between;margin:8px 8px 6px 8px;padding-bottom:6px}.header-title{font-size:14px;color:#9F9F9F}.info-link{color:#9F9F9F;text-decoration:none;display:flex;align-items:center}.chat-mode-menu-item{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;color:#fff;font-size:15px;line-height:1.4;border-radius:6px;cursor:pointer}.chat-mode-menu-item:hover{background-color:rgba(45,40,60,0.5)}.response-length-options,.button-container{pointer-events:auto;position:relative;z-index:10}.button-container>div{pointer-events:auto}#convo .chatbox-wrapper{display:block;visibility:visible;opacity:1;position:relative;height:auto;overflow:visible;pointer-events:auto;background:rgba(21,16,38,1);border-radius:12px;border:1px solid rgba(255,255,255,0.13);margin-bottom:10px;margin-left:auto;margin-right:auto;width:calc(min(100vw - 18px,862px))}#convo .chatbox-wrapper:empty,#convo .chatbox-wrapper .chatbox:empty{display:none}.chatbox-wrapper.empty-box{opacity:0;position:absolute;pointer-events:none;z-index:-1}.no-scroll-animation{scroll-behavior:auto}@media (max-width:600px){.chat-mode-dropdown-trigger{width:41px;padding-left:0;padding-right:0}.chat-mode-dropdown-trigger #currentChatModeLabel{opacity:0;visibility:hidden;width:0;margin:0;padding:0}.chat-image{width:40%}}@media (max-height:600px){.chat-image{height:40%}}@media (max-width:500px){.chat-image{width:50%}}@media (max-height:500px){.chat-image{height:50%}}@media (max-width:400px){.chat-image{width:60%}}@media (max-height:400px){.chat-image{height:60%}}.outputBox,.chatbox-wrapper{contain:content}.new-chat-button-container{position:fixed;top:58px;right:11px;z-index:3}@media (min-width:1200px){.new-chat-button-container{right:21px}}.toggle-text{display:inline;color:white;font-size:16px;transition:opacity 0.3s ease;margin-left:8px}.sidebar-toggle,.new-chat-button{width:auto;padding:0 12px;display:flex;align-items:center;justify-content:center;border-radius:45px;transition:width 0.3s ease,opacity 0.3s ease,visibility 0.3s ease;box-shadow:none}.sidebar-toggle,.new-chat-button{flex-direction:row;justify-content:flex-start;padding:0 14px 0 10px}.sidebar-toggle .toggle-text,.new-chat-button .toggle-text{margin-left:8px}.sidebar-toggle .close-icon{position:absolute;width:22px;height:22px;opacity:0;transition:opacity 0.1s ease;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);padding-right:2px}.chat-layout-container.sidebar-open .sidebar-toggle .history-icon{opacity:0;visibility:hidden}.chat-layout-container.sidebar-open .sidebar-toggle .close-icon{opacity:1}.chat-layout-container.sidebar-open .sidebar-toggle{width:45px;padding:0;position:relative;box-shadow:none!important}.chat-layout-container.sidebar-open .sidebar-toggle .toggle-text{opacity:0;width:0;margin:0;visibility:hidden}#chatSubmitButton,#chatStopButton{width:41px;height:41px;padding:0;margin:0;border-radius:45px;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0;line-height:1;position:relative}#chatSubmitButton{background:#8F37FF}#chatStopButton{background:rgba(45,40,60,1);display:none}#chatSubmitButton svg,#chatStopButton svg{width:22px;height:22px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;padding:0}#chatSubmitButton:disabled,.chatEditSubmitButton:disabled{opacity:0.5;cursor:not-allowed}.thinking-indicator{width:calc(min(100vw - 67px,819px));display:block;margin:auto;margin-bottom:10px;background:rgba(21,16,38,1);border-radius:12px;color:white;padding:22px;font-size:18px;border:1px solid rgba(51,47,66,1);overflow-x:hidden;position:relative;min-height:24px}.thinking-text{font-weight:500;opacity:0.8}.thinking-dots{display:inline-block;position:relative}.thinking-dots::after{content:'';animation:thinking-dots 1.8s infinite;display:inline-block}@keyframes thinking-dots{0%{content:'.'}33%{content:'..'}66%{content:'...'}}.markdownContainer{overflow-x:auto}.character-avatar-container{float:left;margin:-1px 10px 10px -12px}.character-avatar{width:100px;height:100px;border-radius:12px;object-fit:cover;border:1px solid rgba(255,255,255,0.13);display:block}.outputBox.has-character-avatar{border-top-left-radius:21px}.outputBox.has-character-avatar .markdownContainer{overflow-x:visible}.loading-chat-history .chat-sidebar{top:47px!important;bottom:10px!important}.loading-chat-history #sidebarOverlay{top:10px!important;bottom:10px!important}.loading-chat-history .persistent-compose-area{opacity:1!important;visibility:visible!important}:root{--button-glow-shadow:0px 4px 8px 0px rgba(0,0,0,0.4),0px 8px 16px 0px rgba(0,0,0,0.3),0px 2px 24px 0px rgba(80,70,120,0.5)}.sidebar-toggle,.new-chat-button{box-shadow:none;transition:width 0.3s ease,opacity 0.3s ease,visibility 0.3s ease,box-shadow 0.3s ease}@media (max-width:1419px){.chat-layout-container.sidebar-open .new-chat-button{box-shadow:var(--button-glow-shadow)}.chat-layout-container.sidebar-open .sidebar-toggle{box-shadow:none}}@media (max-width:1180px){.chat-layout-container:not(.sidebar-open) .sidebar-toggle{box-shadow:var(--button-glow-shadow)}}@media (max-width:1129px){.chat-layout-container:not(.sidebar-open) .new-chat-button{box-shadow:var(--button-glow-shadow)}}.chat-layout-container.sidebar-open .sidebar-toggle{box-shadow:none}@media (min-width:1420px){.chat-layout-container.sidebar-open .new-chat-button{box-shadow:none}}body::after{content:"";position:fixed;bottom:0;left:0;width:100%;height:40px;background:linear-gradient(to bottom,transparent,rgba(1,2,5,1) 50%,rgba(1,2,5,1) 100%);z-index:2;pointer-events:none}.sidebar-toggle-container,.new-chat-button-container{opacity:1;visibility:visible;transition:opacity 0.3s ease,visibility 0.3s ease;z-index:6}.buttons-hidden .sidebar-toggle-container,.buttons-hidden .new-chat-button-container{opacity:0;visibility:hidden;pointer-events:none}.sidebar-toggle-container,.new-chat-button-container{pointer-events:auto}.fs-sticky-footer{position:fixed!important;bottom:80px!important;z-index:0!important}.fs-sticky-parent{position:fixed!important;bottom:80px!important;z-index:0!important}</style> |
|
|
| |
| |
| <script async src="https://www.googletagmanager.com/gtag/js?id=G-GY2GHX2J9Y"></script> |
| <script> |
| window.dataLayer = window.dataLayer || []; |
| function gtag(){dataLayer.push(arguments);} |
| gtag('js', new Date()); |
|
|
| gtag('config', 'G-GY2GHX2J9Y'); |
| </script> |
| |
| </head> |
| <body> |
|
|
| |
| |
| <div class="sticky"> |
| <div align="center" data-freestar-ad="__320x50 __970x90" id="deepai.org_header"> |
| <script data-cfasync="false" type="text/javascript"> |
| if (typeof freestar !== 'undefined') { |
| freestar.config.enabled_slots.push({ placementName: "deepai.org_header", slotId: "deepai.org_header" }); |
| } |
| </script> |
| </div> |
| </div> |
|
|
| <script> |
| if (typeof user_paid_for_no_ads !== 'undefined') { |
| // the variable is defined |
| if(user_paid_for_no_ads){ |
| // remove element "deepai.org_header" if it exists |
| var pushdown = document.getElementById("deepai.org_header"); |
| if(pushdown){ |
| // just remove the parent element |
| const parentMain = pushdown.parentNode; |
| if (parentMain){ |
| parentMain.remove(); |
| } |
| } |
|
|
| } |
| else { |
| try{ |
| var headerAd = document.getElementById("deepai.org_header"); |
| headerAd.setAttribute('style', 'height: 90px;'); |
| }catch(err){ |
| console.log("Error setting header ad height", err); |
| } |
| } |
| } |
|
|
| </script> |
|
|
| |
| |
| <header> |
| |
| <style> |
| :root { |
| --white: rgba(255, 255, 255, 1); |
| --clear: rgba(255, 255, 255, 0.06); |
| --cod-gray: rgba(8, 8, 8, 1); |
| --cod-gray-2: rgba(9, 9, 9, 1); |
| --pink: #c549fe; |
| --purple: #7000ff; |
| --font-size-xxs: 24px; |
| --font-size-xs: 26px; |
| --font-size-s: 32px; |
| --font-size-m: 40px; |
| --font-size-l: 48px; |
| } |
| a.button { |
| display: flex; |
| flex-direction: row; |
| width: 35px; |
| padding: 5px 95px; |
| justify-content: center; |
| align-items: center; |
| gap: 10px; |
| border-radius: 12px; |
| font-size: 18px; |
| text-align: center; |
| font-style: normal; |
| } |
|
|
| .nav-items { |
| display: flex; |
| justify-content: space-between; |
| margin-left: 16px; |
| margin-right: 16px; |
| height: 45px; |
| } |
|
|
| .nav-buttons { |
| display: flex; |
| flex-direction: row; |
| } |
|
|
| .hidden-icon { |
| display: none; |
| } |
|
|
| .exit { |
| display: flex; |
| flex-direction: row; |
| position: relative; |
| justify-content: right; |
| right: 10px; |
| top: 10px; |
| cursor: pointer; |
| margin: 10px; |
| } |
|
|
| a.button.login, a.button.headerbutton { |
| z-index: 2; |
| width: fit-content; |
| background: transparent; |
| border: 1px solid transparent; |
| border-radius: 12px; |
| color: var(--white); |
| white-space: nowrap; |
| letter-spacing: 2%; |
| margin-right: 12px; |
| cursor: pointer; |
| transition: none; |
| padding: 5px 10px; |
| height: 32px; |
| margin-left: auto; |
| font-weight: 500; |
| font-size: 16px; |
| } |
|
|
| a.button.chatbutton, |
| a.button.imagebutton { |
| background: var(--clear); |
| border: none; |
| color: var(--white); |
| font-weight: bold; |
| letter-spacing: 2%; |
| margin-right: 12px; |
| transition: background 0.4s ease; |
| cursor: pointer; |
| backdrop-filter: blur(10px); |
| z-index: 2; |
| } |
|
|
| a.button.chatbutton, |
| a.button.imagebutton { |
| display: flex; |
| flex-direction: row; |
| width: 240px; |
| margin-right: 0px; |
| justify-content: space-around; |
| cursor: pointer; |
| backdrop-filter: blur(10px); |
| z-index: 2; |
| } |
|
|
| a.button.chatbutton:hover { |
| background: var(--purple); |
| } |
| a.button.imagebutton:hover { |
| background: var(--pink); |
| } |
|
|
| a.button.menu { |
| background: none; |
| border: none; |
| width: 24px; |
| padding: 0px; |
| cursor: pointer; |
| } |
|
|
| .menu-icon { |
| font-size: 30px; |
| font-weight: bold; |
| cursor: pointer; |
| vertical-align: middle; |
| } |
|
|
| .dropbtn { |
| color: white; |
| border-radius: 10px; |
| cursor: pointer; |
| background: transparent; |
| border: none; |
| margin: auto; |
| } |
|
|
| #userIconDrop { |
| display: none; |
| } |
|
|
| .usericon { |
| width: 75px; |
| height: 75px; |
| border-radius: 12px; |
| margin: auto 24px 12px 0px; |
| object-fit: cover; |
| } |
|
|
| .nav-profile-section { |
| display: flex; |
| flex-direction: row; |
| cursor: pointer; |
| justify-content: center; |
| padding-right: 20px; |
| } |
|
|
| .nav-usernames { |
| gap: 6px; |
| margin-bottom: 3px; |
| margin-bottom: 6px; |
| } |
|
|
| .nav-profilename { |
| margin: auto; |
| margin-bottom: 0px; |
| white-space: normal; |
| } |
|
|
| .nav-username { |
| margin: auto; |
| margin-top: 0px; |
| white-space: normal; |
| max-width: 170px; |
| overflow-wrap: break-word; |
| word-wrap: normal; |
| word-break: break-word; |
| font-size: 13px; |
| } |
|
|
| .nav-profile-button { |
| display: flex; |
| flex-direction: column; |
| justify-content: center; |
| align-items: center; |
| background: #8f37ff; |
| border: none; |
| width: 77%; |
| font-family: inherit; |
| color: var(--white); |
| white-space: nowrap; |
| letter-spacing: 2%; |
| margin: auto; |
| padding: 12px; |
| margin-top: 0px; |
| transition: background 0.2s ease; |
| cursor: pointer; |
| border-radius: 12px; |
| font-size: 18px; |
| } |
|
|
| .profile-button:hover { |
| background: var(--pink); |
| } |
|
|
| #navProfileSection{ |
| display: none; |
| } |
|
|
| #navProfileButton{ |
| display: none; |
| } |
|
|
| .pages { |
| margin-bottom: 12px; |
| } |
|
|
| .menu-options { |
| font-size: 18px; |
| font-style: normal; |
| font-weight: 400; |
| line-height: 52px; |
| padding: 2px 0px; |
| } |
|
|
| .pages a { |
| display: flex; |
| flex-direction: column; |
| justify-content: space-around; |
| color: white; |
| text-decoration: none; |
| width: 77%; |
| margin: auto; |
| margin: 0px 10px; |
| padding: 0 0 0 46px; |
| } |
|
|
| .pages a:hover { |
| background-color: var(--clear); |
| border-radius: 12px; |
| width: auto; |
| } |
|
|
| .settings, |
| .logout { |
| display: flex; |
| flex-direction: row; |
| gap: 16px; |
| align-items: center; |
| margin: 4px 4px 0 16px; |
| background: none; |
| border: none; |
| height: 52px; |
| font-size: 18px; |
| font-family: inherit; |
| color: white; |
| cursor: pointer; |
| width: 95%; |
| } |
|
|
| .logout { |
| width: auto; |
| padding: 0px 0px 0px 40px; |
| } |
|
|
| .menu-border { |
| border: 1px solid rgba(255, 255, 255, 0.13); |
| width: 100%; |
| height: auto; |
| } |
|
|
|
|
| @media screen and (max-width: 980px) { |
| a.button.audiogenerator { |
| display: none; |
| } |
| } |
|
|
| @media screen and (max-width: 890px) { |
| a.button.voicechat { /* Voice chat disappears first */ |
| display: none; |
| } |
| } |
|
|
| @media screen and (max-width: 710px) { |
| a.button.photoeditor { /* AI Photo Editor disappears second */ |
| display: none; |
| } |
| } |
|
|
| @media screen and (max-width: 620px) { |
| .hero h1 { |
| font-size: 76px; |
| } |
| .titlesparkle { |
| top: -55px; |
| height: 34%; |
| margin-left: -60px; |
| } |
| } |
|
|
| @media screen and (max-width: 560px) { |
| a.button.videogenerator { |
| display: none; |
| } |
| } |
|
|
| @media screen and (max-width: 500px) { |
| .nav-buttons { |
| justify-content: space-between; |
| width: 100%; |
| } |
| a.button.login, a.button.headerbutton { |
| font-size: 16px; |
| margin-right: 8px; |
| } |
| a.button.login { |
| display: none; |
| } |
|
|
| } |
|
|
| @media screen and (max-width: 420px) { |
| .hero h1 { |
| font-size: 56px; |
| } |
| .titlesparkle { |
| top: -40px; |
| margin-left: -55px; |
| } |
| a.button.headerbutton { |
| font-size: 13px; |
| margin-right: 6px; |
| } |
| } |
|
|
| @media screen and (max-width: 345px) { |
| .hero h1 { |
| font-size: 48px; |
| } |
| .titlesparkle { |
| top: -40px; |
| margin-left: -52px; |
| } |
| a.button.headerbutton { |
| font-size: 12px; |
| margin-right: 2px; |
| padding: 5px 5px; |
| } |
| } |
|
|
| @media screen and (max-width: 300px) { |
| .nav-buttons { |
| justify-content: flex-end; |
| width: 100%; |
| } |
| a.button.videogenerator, a.button.videogenerator { /* Note: Duplicate selector here, might want to clean up */ |
| display: none; |
| } |
| a.button.aichat { |
| font-size: 14px; |
| } |
| } |
|
|
|
|
| </style> |
|
|
| <div class="nav-items"> |
| <a class="logo-link" href="/"> |
| <svg width="45" height="45" viewBox="0 0 45 45" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <path d="M13.4781 27.6456V24.5259H10.5015V27.5763H13.4781V27.6456Z" fill="white"/> |
| <path d="M33.9079 25.8433C33.8402 26.1899 33.7049 26.6058 33.5696 26.9525C33.5696 27.0218 33.502 27.0911 33.502 27.1605C33.2314 27.8537 32.8931 28.4777 32.5549 29.1016C32.2166 29.5869 31.8784 30.0722 31.5401 30.4881C31.3372 30.6961 31.2019 30.9041 30.9989 31.1121L31.0666 31.0428C30.796 31.3201 30.5254 31.5974 30.1871 31.8747C30.0518 32.0133 29.8489 32.0827 29.7136 32.2213C29.6459 32.2213 29.5783 32.2906 29.5783 32.2906C29.1724 32.5679 28.7665 32.7759 28.2929 32.9839C27.7517 33.2612 27.1429 33.4692 26.534 33.6078C25.9252 33.7465 25.2487 33.8851 24.6398 33.9545C23.8957 34.0238 23.1515 34.0238 22.3397 33.8851C18.8895 33.3999 15.9806 31.3894 14.2217 28.6163C14.6276 29.1016 15.0335 29.5176 15.507 29.8642C16.3188 30.4881 17.2659 30.9734 18.3483 31.1814C18.8219 31.3201 19.3631 31.3201 19.8366 31.3201C19.9719 31.3201 20.1072 31.3201 20.2425 31.3201C20.9867 31.3201 21.7309 31.1814 22.4074 30.9041C22.5427 30.8348 22.6103 30.8348 22.7456 30.7654C22.9486 30.6961 23.2192 30.5575 23.4221 30.4881C23.4898 30.4881 23.4898 30.4188 23.5574 30.4188C25.6546 29.2403 27.2105 27.1605 27.4811 24.526C27.5488 24.0408 27.5488 23.4861 27.5488 23.0009C29.443 23.0009 30.9989 24.1794 31.8107 25.7739C31.8784 25.9819 31.946 26.1899 32.0137 26.3979C32.0137 26.2592 32.0137 26.1899 32.0137 26.0512C32.0137 25.4966 31.946 25.0113 31.8784 24.4567C31.2019 20.7824 28.0223 18.0787 24.2339 18.0787C23.7604 18.0787 23.3545 18.148 22.8809 18.2173C22.8809 18.2173 22.8809 18.2173 22.8133 18.2173C21.4603 18.4253 20.5132 18.8413 19.0248 19.9505C18.416 20.3665 17.1983 21.4757 16.2512 22.3769C15.7776 22.8622 14.9658 22.3769 15.1011 21.6837C15.2364 21.0597 15.4394 20.3665 15.8453 19.6039C13.9511 16.9001 13.9511 13.9884 17.6718 11.4233C19.8366 9.89813 23.4221 9.48217 26.737 10.7301C28.7665 9.62083 31.6754 9.5515 34.3138 12.4632C34.5844 12.7405 34.3814 13.2258 33.9755 13.2258C33.2314 13.2258 32.2166 13.4338 31.4048 14.0577C31.4725 14.1271 31.5401 14.2657 31.6754 14.4044C34.855 18.7026 34.7873 22.7236 33.9079 25.8433Z" fill="white"/> |
| </svg> |
| |
| <P>DeepAI</P> |
| </a> |
| <div class="nav-buttons"> |
| <a class="button headerbutton aichat" href="/chat">AI Chat</a> |
| <a class="button headerbutton imagegenerator" href="/machine-learning-model/text2img">AI Image Generator</a> |
| <a class="button headerbutton videogenerator" href="/video">AI Video</a> |
| <a class="button headerbutton audiogenerator" href="/music">AI Music</a> |
| <a class="button headerbutton voicechat" href="/voice">Voice Chat</a> |
| <a class="button headerbutton photoeditor" href="/machine-learning-model/image-editor">AI Photo Editor</a> |
|
|
| <a class="button login" id="headerLoginButton" onclick="openLogin()">Login</a> |
| <nav> |
| <ul> |
| <li class="dropdown"> |
| <button class="drop-menu-button" id="dropMenuButton"> |
| <img src="/static/images/HiUser.svg" class="menu-icon dropbtn" id="userIconDrop" loading="lazy"/> |
| <img src="/static/images/IoMenu.svg" class="menu-icon dropbtn" id="sandwichIconDrop" loading="lazy"/> |
| </button> |
| <ul id="mainNavDropdown"> |
| <div class="exit"> |
| <svg |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M11.9997 10.586L16.9497 5.63599L18.3637 7.04999L13.4137 12L18.3637 16.95L16.9497 18.364L11.9997 13.414L7.04974 18.364L5.63574 16.95L10.5857 12L5.63574 7.04999L7.04974 5.63599L11.9997 10.586Z" |
| fill="white" |
| /> |
| </svg> |
| </div> |
| <div id="navProfileSection" class="nav-profile-section"> |
| <img class="usericon" id="navUserAvatar" alt="avatar" loading="lazy" onclick="window.location.replace('/dashboard/profile')" src="/static/images/dolphin-icon.jpeg" /> |
| <div class="nav-usernames"> |
| <p class="nav-profilename" id="navUserName"></p> |
| <p class="nav-username" id="navUserEmail"></p> |
| </div> |
| </div> |
| <button id="navProfileButton" class="button nav-profile-button" onclick="window.location.replace('/dashboard/profile')">Account Settings</button> |
| <div class="menu-options"> |
| <div class="pages"> |
| <a href="/machine-learning-model/text2img" class="ai-generators">AI Image Generator</a> |
| <a href="/video" class="ai-generators">AI Video Generator</a> |
| <a href="/music" class="ai-generators">AI Music Generator</a> |
| <a href="/chat" class="ai-generators">AI Chat</a> |
| <a href="/machine-learning-model/image-editor" class="ai-generators">AI Photo Editor</a> |
| <a href="/pricing" class="pricing">Pricing</a> |
| <a href="/definitions" class="glossary">Glossary</a> |
| <a href="/docs" class="apidocs">Docs</a> |
| </div> |
| <div class="menu-settings"> |
| <div class="menu-border"></div> |
| <button id="login-button-dropdown" onclick="openSignup()" class="logout"> |
| Login |
| </button> |
| </div> |
| </div> |
| </ul> |
| </li> |
| </ul> |
| </nav> |
| </div> |
| </div> |
|
|
| </header> |
| <div id="announcement-banner" class="announcement-banner"> |
| <a href="javascript:void(0);" onclick="openSubscription();" class="pro-link-button"> |
| <div class="banner-text"> |
| <span class="main-text">Upgrade to DeepAI Pro</span> |
| <span class="sub-text">More access to the best models</span> |
| </div> |
| </a> |
| <button id="dismiss-banner" class="dismiss-button" aria-label="Dismiss announcement">×</button> |
| </div> |
| <script> |
| // Immediately decide banner visibility to prevent CLS |
| (function() { |
| const banner = document.getElementById('announcement-banner'); |
| const bannerKey = 'proBannerDismissed'; |
| const dismissedData = localStorage.getItem(bannerKey); |
| const pathname = window.location.pathname; |
|
|
| // Check cached user object for Pro status |
| let userHasPro = false; |
| try { |
| const cachedUser = localStorage.getItem('user'); |
| if (cachedUser) { |
| const user = JSON.parse(cachedUser); |
| userHasPro = user?.userprofile2?.user_can_use_genius_mode || false; |
| } |
| } catch (e) {} |
|
|
| // Don't show if user has Pro or on specific pages |
| if (userHasPro || pathname.includes('dashboard/') || pathname.includes('chat')) { |
| return; |
| } |
|
|
| // Check dismissal status |
| if (dismissedData) { |
| try { |
| const dismissedDate = new Date(JSON.parse(dismissedData).date); |
| const daysSinceDismissal = Math.floor((Date.now() - dismissedDate) / (1000 * 60 * 60 * 24)); |
| if (daysSinceDismissal < 5) { |
| return; |
| } |
| } catch (e) {} |
| } |
|
|
| // Show the banner |
| banner.style.display = 'inline-flex'; |
| })(); |
| </script> |
| |
| |
|
|
|
|
|
|
| <script async src="/static/js/marked.js"></script> |
| <script async src="/static/js/marked-highlight.js"></script> |
| <script async src="/static/js/highlight.js"></script> |
| <script async src="/static/js/maquette.js"></script> |
| <script async src="/static/js/katex.js"></script> |
| <script> |
| function loadCSS(href) { |
| const link = document.createElement('link'); |
| link.rel = 'stylesheet'; |
| link.href = href; |
| document.head.appendChild(link); |
| } |
|
|
| document.addEventListener('DOMContentLoaded', function() { |
| loadCSS("/static/js/sunburst.css"); |
| loadCSS("/static/js/katex.css"); |
| }); |
|
|
| </script> |
|
|
| <div class="chat-layout-container sidebar-closed" id="layoutContainer"> |
|
|
| |
| <div class="sidebar-toggle-container"> |
| <button class="sidebar-toggle" id="sidebarToggle"> |
| <img src="/static/images/history.svg" alt="history" class="history-icon"/> |
| <svg class="close-icon" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <path d="M14 3.5L7 11L14 18.5" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> |
| </svg> |
| <span class="toggle-text">Chat History</span> |
| </button> |
| </div> |
|
|
| |
| <div class="new-chat-button-container"> |
| <a href="" class="new-chat-button"> |
| <svg class="plus-icon" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <path d="M11 3.5L11 18.5" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> |
| <path d="M3.5 11L18.5 11" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> |
| </svg> |
| <span class="toggle-text">New Chat</span> |
| </a> |
| </div> |
|
|
| |
| <aside class="chat-sidebar" id="chatSidebar"> |
| |
| <div class="sidebar-header"> |
| <span class="sidebar-label">Chat History</span> |
| </div> |
|
|
| |
| <div class="sidebar-content"> |
| <div class="chat-history-items" id="chatHistoryList"> |
| |
| </div> |
| </div> |
|
|
| <div class="sidebar-ad"> |
| <div id="permanent-announcement-banner" class="permanent-announcement-banner sidebar-perm-ad"> |
| <a href="javascript:void(0);" onclick="openSubscription();" class="pro-link-button"> |
| <div class="perm-banner-text"> |
| <span class="main-text">Upgrade to DeepAI Pro</span> |
| <span class="sub-text sub-perm-text">More access to the best models</span> |
| </div> |
| </a> |
| </div> |
| </div> |
|
|
| |
| <div class="sidebar-footer"> |
| <button class="delete-all-history-button">Delete Chat History</button> |
| </div> |
| </aside> |
|
|
|
|
| |
| <div class="sidebar-overlay" id="sidebarOverlay"></div> |
|
|
| |
| <main class="chat-main" id="chatMain"> |
|
|
| |
| <center> |
| <img class="figure" src="https://images.deepai.org/chat-style-image/196af23c77e54750be5810bcb3dfe14a/output.jpg" alt=neil-armstrong /> |
| </center> |
| <style>h1 { margin-top: 0; }</style> |
| |
|
|
| <h1>Neil Armstrong</h1> |
|
|
| <h3>I am Neil Armstrong, the first human to set foot on the moon. Ask me about the Apollo 11 mission, the challenges I faced, and my thoughts on space exploration.</h3> |
| |
|
|
| <div id="trustpilot-popup" class="trustpilot-popup"> |
| <div class="nudge-popup-header pro-popup-header"> |
| <span class="close-icon" id="close-trustpilot-popup">×</span> |
| </div> |
| <div class="nudge-popup-body" style="padding: 0px 20px 20px 20px;"> |
| <div class="nudge-pro-body-title"> |
| <img class="profile-pro-icon nudge-pro-icon" src="/static/images/pro-badge.svg" /> |
| <h2 style="margin-top: 10px; font-size: 20px;">Enjoying the experience?</h2> |
| </div> |
| <button class="modal-get-started" style="margin-top: 10px;" onclick="window.open('https://www.trustpilot.com/review/deepai.org', '_blank')"> |
| Rate DeepAI! |
| </button> |
| </div> |
| </div> |
| <div id="copypopup"> |
| <span class="message">Copied!</span> |
| </div> |
| <div id="upload-successful"> |
| <span class="message">Upload Successful!</span> |
| </div> |
| <div id="upload-unsuccessful"> |
| <span class="message">Upload Unsuccessful. Please try again.</span> |
| </div> |
| <div id="summarypopup"> |
| <span class="message">Summarizing!</span> |
| </div> |
| <div id="errorpopup"> |
| <img class="errorIcon" src="/static/images/error-icon.svg" alt="Error Icon" /> |
| <span class="message">An error has occurred</span> |
| </div> |
| |
| <div class="persistent-compose-area"> |
| <textarea class="chatbox" id="persistentChatbox" placeholder="Message Neil Armstrong..." rows="1"></textarea> |
| <div class="response-length-options"> |
| <div class="button-container"> |
| <div style="display: none"> |
| <div class="chat-mode-section"> |
| <div class="chat-mode-dropdown-container"> |
| |
| <button |
| id="chatModeDropdownButton" |
| class="chat-mode-dropdown-trigger" |
| type="button" |
| > |
| <span id="currentChatModeLabel">Standard</span> |
| |
| <svg |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| class="dropdown-caret" |
| > |
| <path |
| d="M7 10L12 15L17 10" |
| stroke="white" |
| stroke-width="2.5" |
| stroke-linecap="round" |
| stroke-linejoin="round" |
| fill="none" |
| /> |
| </svg> |
| </button> |
|
|
| |
| <div id="chatModeMenu" class="chat-mode-dropdown-menu" style="display:none;"> |
| |
| </div> |
| </div> |
| </div> |
| </div> |
| <button id="recordButton" title="Speech To Text"> |
| <img src="/static/images/mic.svg" alt="Mic Icon" class="mic-icon"> |
| </button> |
| <button id="chatSubmitButton" type="button" onclick="chatSubmit('', '', true)"> |
| <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <path d="M11 3.5L11 18.5" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> |
| <path d="M5 9.5L11 3.5L17 9.5" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> |
| </svg> |
| </button> |
|
|
| <button id="chatStopButton" type="button" onclick="chatStop()"> |
| <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <rect x="5" y="5" width="12" height="12" rx="2" fill="white"/> |
| </svg> |
| </button> |
| </div> |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| |
| <div class="explore-aichat-modes"> |
| <div class="chat-chips-container"> |
| |
| <a href="/chat/charles-darwin" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/4ced8b9a140c4096a43babd833a4bbc8/40-thumb.jpg" alt="Charles Darwin " class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Charles Darwin </span> |
| </a> |
| |
| <a href="/chat/mother-teresa" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/82323e7eef6d46bea9660858213c8481/48-thumb.jpg" alt="Mother Teresa " class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Mother Teresa </span> |
| </a> |
| |
| <a href="/chat/elvis-presley" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/be514b35db1d4b26bf060d08cc2f04f2/82-thumb.jpg" alt="Elvis Presley" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Elvis Presley</span> |
| </a> |
| |
| <a href="/chat/freddie-mercury" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/26bc7d453e304d93b4fb79a98e47a4a1/91-thumb.jpg" alt="Freddie Mercury" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Freddie Mercury</span> |
| </a> |
| |
| <a href="/chat/martin-luther-king-jr" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/959cc96742434714b906ac29d9a130ba/94-thumb.jpg" alt="Martin Luther King Jr." class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Martin Luther King Jr.</span> |
| </a> |
| |
| <a href="/chat/bob-marley" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/4af7f55d51b1496c8318ec8a9896a9e1/103-thumb.jpg" alt="Bob Marley" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Bob Marley</span> |
| </a> |
| |
| <a href="/chat/napolean-bonaparte" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/b2c1695933f74c5aa664654c472d3861/133-thumb.jpg" alt="Napolean Bonaparte" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Napolean Bonaparte</span> |
| </a> |
| |
| <a href="/chat/nikola-tesla" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/cc7efe871ef44ef5981a1d8e076e4bb1/135-thumb.jpg" alt="Nikola Tesla" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Nikola Tesla</span> |
| </a> |
| |
| <a href="/chat/bruce-lee" class="chat-chip chat-chip-with-image"> |
| |
| <img src="https://images.deepai.org/chat-style-image/c7e5f93d2c11473aa04c067512729db3/162-thumb.jpg" alt="Bruce Lee" class="chat-chip-image"> |
| |
| <span class="chat-chip-name">Bruce Lee</span> |
| </a> |
| |
| </div> |
| </div> |
|
|
| |
| |
| <button id="characterReportButton" type="button" onclick="reportCharacter()">Report Character</button> |
| |
| |
| <form id="convo" onsubmit="return false;"> |
| </form> |
| </main> |
| </div> |
|
|
| |
| <div id="confirm-modal-root" class="modal-root"> |
| <div id="confirm-modal" class="modal"> |
| <div id="confirm-title" class="title">Deleting a Character</div> |
| <div id="confirm-desc" class="confirm-desc"> |
| Are you sure you want to delete this character?<br/> |
| This action cannot be undone. |
| </div> |
|
|
| |
| <input |
| type="text" |
| id="confirm-input" |
| class="confirm-input" |
| placeholder="Type here to confirm..." |
| style="display: none;" |
| /> |
|
|
| <div class="modal-button-container"> |
| <button id="confirm-yes-btn" class="confirm-button"> |
| Delete |
| </button> |
| <button id="confirm-cancel-btn" class="confirm-button"> |
| Cancel |
| </button> |
| </div> |
| </div> |
| </div> |
|
|
|
|
| <dialog id="signup-modal"> |
| <div class="modal-body"> |
|
|
| </div> |
| <button id="close" class="close" type="button">×</button> |
| </dialog> |
| <dialog id="login-modal" class="login-container"> |
| <div id="close-login" type="button" class="login-exit"> |
| <svg |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M11.9997 10.586L16.9497 5.63599L18.3637 7.04999L13.4137 12L18.3637 16.95L16.9497 18.364L11.9997 13.414L7.04974 18.364L5.63574 16.95L10.5857 12L5.63574 7.04999L7.04974 5.63599L11.9997 10.586Z" |
| fill="white" |
| /> |
| </svg> |
| </div> |
| <div style="width: 95%;"> |
| <h2 class="login-header" id="login-header-title">Login</h2> |
| <p class="please-subheader"> |
| Please sign up or login with your details |
| </p> |
| <div class="options-container"> |
| <div class="option login-active active" id='loginToggle' onclick="toggleAuthOption('login')"> |
| Login |
| </div> |
| <div class="option signup" id='signupToggle' onclick="toggleAuthOption('signup')"> |
| Sign up |
| </div> |
| </div> |
| <button class="signin-with-google" id="social-auth-google" onclick="social_login(event, 'google')"> |
| <svg |
| width="32" |
| height="32" |
| viewBox="0 0 32 32" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| > |
| <path |
| d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" |
| fill="white" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M23.8299 16.1823C23.8299 15.615 23.779 15.0695 23.6845 14.5459H16.1499V17.6405H20.4554C20.2699 18.6405 19.7063 19.4877 18.859 20.055V22.0623H21.4445C22.9572 20.6695 23.8299 18.6186 23.8299 16.1823Z" |
| fill="#4285F4" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M16.1496 23.9995C18.3096 23.9995 20.1205 23.2832 21.4442 22.0614L18.8587 20.0541C18.1423 20.5341 17.226 20.8177 16.1496 20.8177C14.066 20.8177 12.3023 19.4104 11.6732 17.5195H9.00049V19.5923C10.3169 22.2068 13.0223 23.9995 16.1496 23.9995Z" |
| fill="#34A853" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M11.6735 17.52C11.5135 17.04 11.4226 16.5272 11.4226 16C11.4226 15.4727 11.5135 14.96 11.6735 14.48V12.4072H9.00081C8.45899 13.4872 8.1499 14.709 8.1499 16C8.1499 17.2909 8.45899 18.5127 9.00081 19.5927L11.6735 17.52Z" |
| fill="#FBBC05" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M16.1496 11.1818C17.3241 11.1818 18.3787 11.5855 19.2078 12.3782L21.5023 10.0836C20.1169 8.79273 18.306 8 16.1496 8C13.0223 8 10.3169 9.79273 9.00049 12.4073L11.6732 14.48C12.3023 12.5891 14.066 11.1818 16.1496 11.1818Z" |
| fill="#EA4335" |
| /> |
| </svg> |
| Continue with Google |
| </button> |
|
|
| <div class="email-container" id="email-container-id"> |
| <svg |
| class="email-icon" |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M22 6C22 4.9 21.1 4 20 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6ZM20 6L12 11L4 6H20ZM20 18H4V8L12 13L20 8V18Z" |
| fill="#7D7D7D" |
| /> |
| </svg> |
|
|
| <input |
| class="input-email" |
| id="user-email" |
| type="text" |
| placeholder="Enter valid email address" |
| name="email" |
| onkeypress="authKeyPressHandler(event)" |
| /> |
| </div> |
| <div class="password-container" id="password-container-id"> |
| <svg |
| class="lock-icon" |
| xmlns="http://www.w3.org/2000/svg" |
| width="27" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M12 17C13.1 17 14 16.1 14 15C14 13.9 13.1 13 12 13C10.9 13 10 13.9 10 15C10 16.1 10.9 17 12 17ZM18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM8.9 6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8H8.9V6ZM18 20H6V10H18V20Z" |
| fill="#7D7D7D" |
| /> |
| </svg> |
|
|
| <input |
| class="input-password" |
| id="user-password" |
| type="password" |
| placeholder="Enter your password" |
| name="password" |
| onkeypress="authKeyPressHandler(event)" |
| /> |
| </div> |
| <div class="reenter-password-container" id="reenter-password-container-id"> |
| <svg |
| class="lock-icon" |
| xmlns="http://www.w3.org/2000/svg" |
| width="27" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M12 17C13.1 17 14 16.1 14 15C14 13.9 13.1 13 12 13C10.9 13 10 13.9 10 15C10 16.1 10.9 17 12 17ZM18 8H17V6C17 3.24 14.76 1 12 1C9.24 1 7 3.24 7 6V8H6C4.9 8 4 8.9 4 10V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V10C20 8.9 19.1 8 18 8ZM8.9 6C8.9 4.29 10.29 2.9 12 2.9C13.71 2.9 15.1 4.29 15.1 6V8H8.9V6ZM18 20H6V10H18V20Z" |
| fill="#7D7D7D" |
| /> |
| </svg> |
|
|
| <input |
| class="input-password" |
| id="confirm-user-password" |
| type="password" |
| placeholder="Re-enter your password" |
| name="password" |
| /> |
| <path |
| d="M10.125 10.5C10.0757 10.5001 10.0269 10.4905 9.98145 10.4716C9.93595 10.4527 9.89464 10.425 9.8599 10.3901L1.6099 2.14013C1.54254 2.06923 1.50555 1.97482 1.5068 1.87704C1.50805 1.77925 1.54745 1.68582 1.6166 1.61667C1.68575 1.54752 1.77918 1.50812 1.87697 1.50687C1.97475 1.50561 2.06916 1.54261 2.14006 1.60997L10.3901 9.85997C10.4425 9.91241 10.4782 9.97922 10.4926 10.0519C10.5071 10.1247 10.4996 10.2 10.4713 10.2685C10.4429 10.337 10.3949 10.3956 10.3332 10.4368C10.2716 10.478 10.1991 10.5 10.125 10.5V10.5ZM5.99201 9.00005C5.01959 9.00005 4.08185 8.71223 3.20482 8.14458C2.40631 7.62895 1.68748 6.89044 1.12592 6.01177V6.00989C1.59326 5.34028 2.10514 4.77403 2.65498 4.31747C2.65995 4.31331 2.66401 4.30817 2.66689 4.30236C2.66978 4.29655 2.67143 4.29021 2.67174 4.28374C2.67204 4.27726 2.67101 4.27079 2.66869 4.26474C2.66637 4.25868 2.66282 4.25317 2.65826 4.24856L2.19139 3.78239C2.18309 3.77403 2.17195 3.76909 2.16018 3.76857C2.14841 3.76805 2.13687 3.77198 2.12787 3.77958C1.54381 4.27177 1.0017 4.87552 0.508807 5.58239C0.424007 5.7041 0.377304 5.84828 0.374633 5.99659C0.371962 6.14491 0.413444 6.29067 0.493807 6.41536C1.11279 7.38403 1.90943 8.19989 2.79724 8.77434C3.79685 9.42192 4.87264 9.75005 5.99201 9.75005C6.59622 9.74817 7.19615 9.64861 7.76857 9.4552C7.77612 9.45264 7.7829 9.4482 7.78825 9.44229C7.79361 9.43638 7.79737 9.4292 7.79917 9.42143C7.80098 9.41367 7.80077 9.40557 7.79858 9.3979C7.79638 9.39024 7.79227 9.38326 7.78662 9.37763L7.28084 8.87184C7.2692 8.86049 7.2548 8.85235 7.23906 8.84824C7.22332 8.84413 7.20678 8.84419 7.19107 8.84841C6.79937 8.94927 6.39649 9.00022 5.99201 9.00005V9.00005ZM11.504 5.59223C10.8839 4.63317 10.0793 3.81848 9.1774 3.23606C8.17967 2.59106 7.0781 2.25005 5.99201 2.25005C5.39421 2.25111 4.80084 2.35276 4.23678 2.55075C4.22926 2.55337 4.22253 2.55785 4.21723 2.56378C4.21193 2.56972 4.20822 2.5769 4.20647 2.58466C4.20471 2.59242 4.20495 2.6005 4.20718 2.60814C4.20941 2.61578 4.21354 2.62273 4.2192 2.62833L4.72428 3.13341C4.73603 3.14496 4.75063 3.15322 4.7666 3.15733C4.78256 3.16145 4.79933 3.16128 4.81521 3.15684C5.19888 3.05306 5.59456 3.00034 5.99201 3.00005C6.94568 3.00005 7.8806 3.29138 8.77053 3.86723C9.58404 4.39223 10.3113 5.13005 10.8743 6.00005C10.8747 6.00058 10.8749 6.00124 10.8749 6.00192C10.8749 6.0026 10.8747 6.00326 10.8743 6.0038C10.4656 6.64714 9.95851 7.22234 9.37146 7.70841C9.36644 7.71255 9.36233 7.71769 9.3594 7.72351C9.35647 7.72933 9.35479 7.7357 9.35446 7.7422C9.35413 7.74871 9.35516 7.75521 9.35748 7.7613C9.3598 7.76738 9.36337 7.77292 9.36795 7.77755L9.83435 8.24372C9.84261 8.25205 9.85369 8.25699 9.8654 8.25755C9.87712 8.25812 9.88862 8.25427 9.89764 8.24677C10.5244 7.71907 11.0669 7.0988 11.5064 6.40739C11.5841 6.28555 11.6252 6.14397 11.6247 5.99947C11.6243 5.85497 11.5824 5.71363 11.504 5.59223V5.59223Z" |
| fill="#7D7D7D" |
| /> |
| <path |
| d="M5.99999 3.75C5.83145 3.74991 5.66344 3.76878 5.49913 3.80625C5.49083 3.80797 5.48315 3.81192 5.47691 3.81766C5.47068 3.8234 5.46611 3.83072 5.46371 3.83885C5.4613 3.84698 5.46115 3.8556 5.46326 3.86381C5.46537 3.87202 5.46966 3.87951 5.47569 3.88547L8.11452 6.52359C8.12048 6.52962 8.12796 6.53392 8.13617 6.53603C8.14438 6.53814 8.15301 6.53798 8.16114 6.53558C8.16927 6.53317 8.17659 6.52861 8.18233 6.52237C8.18807 6.51613 8.19201 6.50846 8.19374 6.50016C8.26887 6.17063 8.26879 5.82842 8.19353 5.49893C8.11826 5.16944 7.96973 4.86114 7.75897 4.59692C7.54821 4.33271 7.28064 4.11937 6.97612 3.97275C6.6716 3.82613 6.33796 3.74999 5.99999 3.75V3.75ZM3.88545 5.47641C3.87949 5.47038 3.87201 5.46608 3.8638 5.46397C3.85559 5.46186 3.84696 5.46202 3.83883 5.46443C3.83071 5.46683 3.82338 5.47139 3.81764 5.47763C3.8119 5.48387 3.80796 5.49154 3.80624 5.49984C3.72124 5.87118 3.73191 6.25801 3.83725 6.62409C3.9426 6.99017 4.13916 7.32351 4.40852 7.59287C4.67788 7.86223 5.01122 8.0588 5.3773 8.16414C5.74338 8.26948 6.13022 8.28015 6.50155 8.19516C6.50985 8.19343 6.51753 8.18949 6.52376 8.18375C6.53 8.17801 6.53456 8.17069 6.53697 8.16256C6.53937 8.15443 6.53953 8.1458 6.53742 8.13759C6.53531 8.12938 6.53101 8.1219 6.52499 8.11594L3.88545 5.47641Z" |
| fill="#7D7D7D" |
| /> |
| </svg> |
| </div> |
| <p id="user-email-error" class="bad-auth-error"></p> |
| <button class="button login-with-email" id="switch-to-email" onclick="authOptions('moreOptions')">Or login with email</button> |
| <button class="button login-email" id="login-via-email-id" onclick="login(event)">Login</button> |
| <a class="forgot-password" id="forgot-password"> |
| Forgot password? |
| <span href="javascript:void();" onclick="resetPassword(event)" class="click-here">Click here to reset</span> |
| </a> |
| <button class="button goback" id="go-back-login" onclick="authOptions('lessOptions')">Go back</button> |
| </div> |
| </dialog> |
| <dialog id="subscription-modal"> |
| <div id="subscription-pro-id" class="modal-small-subscription-container"> |
| <div class="modal-subscriptions-container"> |
| <div class="modal-subscription-title-container"> |
| <div class="modal-subscription-title pro-promo-title" id="subscription-title-pro-promo-id">Unlock AI power with </div> |
| <div class="modal-model-title"> |
| <div class="modal-subscription-title" id="subscription-title-id">DeepAI</div> |
| <div class="modal-subscription-title pro-title" id="subscription-title-pro-id">PRO</div> |
| </div> |
| </div> |
| <div class="modal-subscription-price"> |
| <div class="modal-price" id="subscription-price-id"> $4.99 </div> |
| <div class="modal-subscription-length" id="subscription-length-id">/month</div> |
| </div> |
| <button id="stripe-pro-button-container" class="modal-get-started" onclick="window.open(window.deepaiProLinkUrl, '_blank')">Subscribe</button> |
| </div> |
| <a class="modal-see-full" href="/pricing" target="_blank"> |
| See Full Pricing |
| <svg |
| xmlns="http://www.w3.org/2000/svg" |
| width="18" |
| height="19" |
| viewBox="0 0 18 19" |
| fill="none" |
| > |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M3.8248 5.44998C3.64578 5.44998 3.47409 5.52109 3.34751 5.64768C3.22092 5.77427 3.1498 5.94595 3.1498 6.12498V13.775C3.1498 14.1476 3.4522 14.45 3.8248 14.45H11.4748C11.6538 14.45 11.8255 14.3789 11.9521 14.2523C12.0787 14.1257 12.1498 13.954 12.1498 13.775V10.175C12.1498 9.99595 12.2209 9.82427 12.3475 9.69768C12.4741 9.57109 12.6458 9.49998 12.8248 9.49998C13.0038 9.49998 13.1755 9.57109 13.3021 9.69768C13.4287 9.82427 13.4998 9.99595 13.4998 10.175V13.775C13.4998 14.312 13.2865 14.8271 12.9067 15.2069C12.5269 15.5866 12.0119 15.8 11.4748 15.8H3.8248C3.28774 15.8 2.77267 15.5866 2.39291 15.2069C2.01315 14.8271 1.7998 14.312 1.7998 13.775V6.12498C1.7998 5.58791 2.01315 5.07285 2.39291 4.69308C2.77267 4.31332 3.28774 4.09998 3.8248 4.09998H8.3248C8.50383 4.09998 8.67551 4.17109 8.8021 4.29768C8.92869 4.42427 8.9998 4.59595 8.9998 4.77498C8.9998 4.954 8.92869 5.12569 8.8021 5.25227C8.67551 5.37886 8.50383 5.44998 8.3248 5.44998H3.8248Z" |
| fill="#C3CAD9" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M5.57465 11.9777C5.63413 12.0436 5.706 12.097 5.78615 12.135C5.8663 12.1731 5.95316 12.1949 6.04176 12.1994C6.13036 12.2038 6.21897 12.1907 6.30252 12.1609C6.38606 12.131 6.4629 12.085 6.52865 12.0254L14.85 4.49605V7.02505C14.85 7.20407 14.9212 7.37576 15.0478 7.50235C15.1743 7.62893 15.346 7.70005 15.525 7.70005C15.7041 7.70005 15.8758 7.62893 16.0023 7.50235C16.1289 7.37576 16.2 7.20407 16.2 7.02505V2.97505C16.2 2.79603 16.1289 2.62434 16.0023 2.49775C15.8758 2.37116 15.7041 2.30005 15.525 2.30005H11.475C11.296 2.30005 11.1243 2.37116 10.9978 2.49775C10.8712 2.62434 10.8 2.79603 10.8 2.97505C10.8 3.15407 10.8712 3.32576 10.9978 3.45235C11.1243 3.57893 11.296 3.65005 11.475 3.65005H13.7727L5.62235 11.0246C5.55653 11.0841 5.50308 11.156 5.46505 11.2361C5.42703 11.3163 5.40517 11.4032 5.40074 11.4918C5.39631 11.5804 5.40939 11.669 5.43923 11.7525C5.46907 11.8361 5.51509 11.912 5.57465 11.9777Z" |
| fill="#C3CAD9" |
| /> |
| </svg> |
| </a> |
| </div> |
| <button id="close-sub" class="close" type="button">×</button> |
| </div> |
| </div> |
| </dialog> |
| <dialog id="out-of-credits-modal"> |
| <div class="modal-body out-of-credits-modal-body"> |
| <div id="close-out-of-credits" type="button" class="out-credits-exit"> |
| <svg |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M11.9997 10.586L16.9497 5.63599L18.3637 7.04999L13.4137 12L18.3637 16.95L16.9497 18.364L11.9997 13.414L7.04974 18.364L5.63574 16.95L10.5857 12L5.63574 7.04999L7.04974 5.63599L11.9997 10.586Z" |
| fill="white" |
| /> |
| </svg> |
| </div> |
| <div> |
| <h2 class="out-credits-header">Out of credits</h2> |
| <p class="please-subheader"> |
| Refill your membership to continue using DeepAI |
| </p> |
|
|
| <div class="dropdown-payment-amount go-dropdown"> |
| <div class="dataset"> |
| <select |
| id="outOfCreditsAmountSelect" |
| class="dropdown-select dropdown-input-amount" |
| name="chooseAmount" |
| > |
| <option disabled selected>$5.00 USD</option> |
| <option value="5">$5.00 USD</option> |
| <option value="10">$10.00 USD</option> |
| <option value="20">$20.00 USD</option> |
| <option value="50">$50.00 USD</option> |
| <option value="100">$100.00 USD</option> |
| <option value="200">$200.00 USD</option> |
| <option value="500">$500.00 USD</option> |
| <option value="1000">$1000.00 USD</option> |
| </select> |
|
|
| <svg |
| class="money-icon" |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| > |
| <path |
| d="M11.8003 10.9C9.53031 10.31 8.80031 9.7 8.80031 8.75C8.80031 7.66 9.81031 6.9 11.5003 6.9C13.2803 6.9 13.9403 7.75 14.0003 9H16.2103C16.1403 7.28 15.0903 5.7 13.0003 5.19V3H10.0003V5.16C8.06031 5.58 6.50031 6.84 6.50031 8.77C6.50031 11.08 8.41031 12.23 11.2003 12.9C13.7003 13.5 14.2003 14.38 14.2003 15.31C14.2003 16 13.7103 17.1 11.5003 17.1C9.44031 17.1 8.63031 16.18 8.52031 15H6.32031C6.44031 17.19 8.08031 18.42 10.0003 18.83V21H13.0003V18.85C14.9503 18.48 16.5003 17.35 16.5003 15.3C16.5003 12.46 14.0703 11.49 11.8003 10.9Z" |
| fill="#7D7D7D" |
| /> |
| </svg> |
|
|
| <svg |
| class="dropdown-icon" |
| xmlns="http://www.w3.org/2000/svg" |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| > |
| <path |
| d="M16.59 8.58997L12 13.17L7.41 8.58997L6 9.99997L12 16L18 9.99997L16.59 8.58997Z" |
| fill="white" |
| /> |
| </svg> |
| </div> |
| </div> |
|
|
| <button id="out-stripe-go-button-container" onclick="creditsCheckoutUrl('outOfCreditsAmountSelect')" class="button modal-get-started">Add Credits</button> |
| </div> |
| </div> |
| </dialog> |
|
|
| <dialog id="social-modal"> |
| <div class="social-modal-body"> |
| <p class="share-header">Share</p> |
| <p class="share-subheader">Share your generations with friends</p> |
| <div class="social-container"> |
| <div class="social-icon"> |
| <div class="icon-container x"> |
| <a id="x-link" target="_blank"> |
| <img src="/static/images/social-x-icon.svg"> |
|
|
| </a> |
| <p class="social-name">X</p> |
| </div> |
| <div class="icon-container facebook"> |
| <a id="facebook-link" target="_blank"> |
| <img src="/static/images/social-facebook-icon.svg"> |
| </a> |
| <p class="social-name">Facebook</p> |
| </div> |
| <div class="icon-container linkedin"> |
| <a id="linkedin-link" target="_blank"> |
| <img src="/static/images/social-linkedin-icon.svg"> |
| </a> |
| <p class="social-name">Linkedin</p> |
| </div> |
| <div class="icon-container reddit"> |
| <a id="reddit-link" target="_blank"> |
| <img src="/static/images/social-reddit-icon.svg"> |
| </a> |
| <p class="social-name">Reddit</p> |
| </div> |
| </div> |
| <div class="social-link-copy"> |
| <input type="text" id="social-link-input" readonly> |
| <button class="copy-button" onclick="navigator.clipboard.writeText(document.getElementById('social-link-input').value)"> |
| <img src="/static/images/social-copy-icon.svg" alt="Copy"> |
| </button> |
| </div> |
| </div> |
| </div> |
| <button id="close-social" class="close" type="button">×</button> |
| </dialog> |
|
|
| |
| <div id="nudge-popup" class="nudge-popup"> |
| <div class="nudge-popup-header"> |
| <div class="nudge-popup-header-text"> |
| <svg |
| width="32" |
| height="32" |
| viewBox="0 0 32 32" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| > |
| <path |
| d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" |
| fill="white" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M23.8299 16.1823C23.8299 15.615 23.779 15.0695 23.6845 14.5459H16.1499V17.6405H20.4554C20.2699 18.6405 19.7063 19.4877 18.859 20.055V22.0623H21.4445C22.9572 20.6695 23.8299 18.6186 23.8299 16.1823Z" |
| fill="#4285F4" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M16.1496 23.9995C18.3096 23.9995 20.1205 23.2832 21.4442 22.0614L18.8587 20.0541C18.1423 20.5341 17.226 20.8177 16.1496 20.8177C14.066 20.8177 12.3023 19.4104 11.6732 17.5195H9.00049V19.5923C10.3169 22.2068 13.0223 23.9995 16.1496 23.9995Z" |
| fill="#34A853" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M11.6735 17.52C11.5135 17.04 11.4226 16.5272 11.4226 16C11.4226 15.4727 11.5135 14.96 11.6735 14.48V12.4072H9.00081C8.45899 13.4872 8.1499 14.709 8.1499 16C8.1499 17.2909 8.45899 18.5127 9.00081 19.5927L11.6735 17.52Z" |
| fill="#FBBC05" |
| /> |
| <path |
| fill-rule="evenodd" |
| clip-rule="evenodd" |
| d="M16.1496 11.1818C17.3241 11.1818 18.3787 11.5855 19.2078 12.3782L21.5023 10.0836C20.1169 8.79273 18.306 8 16.1496 8C13.0223 8 10.3169 9.79273 9.00049 12.4073L11.6732 14.48C12.3023 12.5891 14.066 11.1818 16.1496 11.1818Z" |
| fill="#EA4335" |
| /> |
| </svg> |
| <h2 style="font-size: 17px;">Sign in with Google</h2> |
| </div> |
| <span class="close-icon" id="close-nudge-popup">×</span> |
| </div> |
| <div class="nudge-popup-body"> |
| <p style="margin: auto; width: 90%;">Use your Google Account to sign in to DeepAI</p> |
| <button class="signin-with-google nudge-signin-button" id="social-auth-google" onclick="social_login(event, 'google')"> |
| Continue |
| </button> |
| </div> |
| </div> |
|
|
| <div id="nudge-pro-popup" class="nudge-pro-popup"> |
| <div class="nudge-popup-header pro-popup-header"> |
| <span class="close-icon" id="close-nudge-pro-popup">×</span> |
| </div> |
| <div class="nudge-popup-body" style="padding: 0px 25px 20px 25px;"> |
| <div class="nudge-pro-body-title"> |
| <img class="profile-pro-icon nudge-pro-icon" src="/static/images/pro-badge.svg" /> |
| <h2>Consider DeepAI Pro</h2> |
| </div> |
| <ul class="pro-features-list" style="list-style: none; padding: 0; margin: 0 0 20px 0;"> |
| <li style="display: flex; align-items: center; margin-bottom: 10px;"> |
| <svg |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| style="margin-right: 10px;" |
| > |
| <circle cx="12" cy="12" r="12" fill="#8f37ff" /> |
| <path |
| d="M10.8333 13.8503L16.1953 8.48776L17.0207 9.3126L10.8333 15.5L7.12097 11.7877L7.94581 10.9628L10.8333 13.8503Z" |
| fill="white" |
| /> |
| </svg> |
| <span>World's best value AI at $5 per month</span> |
| </li> |
| <li style="display: flex; align-items: center; margin-bottom: 10px;"> |
| <svg |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| style="margin-right: 10px;" |
| > |
| <circle cx="12" cy="12" r="12" fill="#8f37ff" /> |
| <path |
| d="M10.8333 13.8503L16.1953 8.48776L17.0207 9.3126L10.8333 15.5L7.12097 11.7877L7.94581 10.9628L10.8333 13.8503Z" |
| fill="white" |
| /> |
| </svg> |
| <span>Smarter AI Chat</span> |
| </li> |
| <li style="display: flex; align-items: center; margin-bottom: 10px;"> |
| <svg |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| style="margin-right: 10px;" |
| > |
| <circle cx="12" cy="12" r="12" fill="#8f37ff" /> |
| <path |
| d="M10.8333 13.8503L16.1953 8.48776L17.0207 9.3126L10.8333 15.5L7.12097 11.7877L7.94581 10.9628L10.8333 13.8503Z" |
| fill="white" |
| /> |
| </svg> |
| <span>Highest quality AI Images, Videos, and Music</span> |
| </li> |
| <li style="display: flex; align-items: center;"> |
| <svg |
| width="24" |
| height="24" |
| viewBox="0 0 24 24" |
| fill="none" |
| xmlns="http://www.w3.org/2000/svg" |
| style="margin-right: 10px;" |
| > |
| <circle cx="12" cy="12" r="12" fill="#8f37ff" /> |
| <path |
| d="M10.8333 13.8503L16.1953 8.48776L17.0207 9.3126L10.8333 15.5L7.12097 11.7877L7.94581 10.9628L10.8333 13.8503Z" |
| fill="white" |
| /> |
| </svg> |
| <span>100% Ad-free</span> |
| </li> |
| </ul> |
| <button id="stripe-pro-button-container" class="modal-get-started" onclick="window.open(deepaiProLinkUrl, '_blank')"> |
| Subscribe |
| </button> |
| </div> |
| </div> |
|
|
| |
| <footer> |
| |
| |
| |
| |
| </footer> |
| |
| <script>try{if(!(window.location.hostname==="deepai.org"||window.location.hostname==="127.0.0.1")){window.location.href="https://deepai.org"+window.location.pathname+window.location.search;}}catch(e){console.log("error redirecting to deepai.org: "+e);} |
| try{(function(window){if(window.location!==window.top.location){window.top.location=window.location;}})(this);}catch(e){console.log('error breaking out of iframe',e);alert('DeepAI cannot be used in an iframe');window.open('https://deepai.org','_blank') |
| window.location.href='https://openai.com/'} |
| const app_base_url='https://api.deepai.org';fetch(app_base_url+"/favicon.ico",{method:'POST',credentials:'include',});function setElementsStyleById(ids,style){ids.forEach(id=>{const element=document.getElementById(id);if(element){element.style=style;}});} |
| function showElementsById(ids){setElementsStyleById(ids,"display: flex;");} |
| function hideElementsById(ids){setElementsStyleById(ids,"display: none;");} |
| function toggleAuthOption(toggle){const loginOption=document.getElementById("loginToggle");const signupOption=document.getElementById("signupToggle");const authGoogle=document.getElementById('social-auth-google');const emailSwitch=document.getElementById("switch-to-email");const loginEmail=document.getElementById('login-via-email-id');const userEmailError=document.getElementById('user-email-error');const reenterPwd=document.getElementById("reenter-password-container-id");if(userEmailError)userEmailError.style="display: none;";if(document.getElementById('user-email'))document.getElementById('user-email').focus();if(toggle=="login"){if(loginOption&&!loginOption.classList.contains("active")){loginOption.classList.add("active");if(signupOption)signupOption.classList.remove("active");} |
| if(document.getElementById('login-header-title'))document.getElementById('login-header-title').innerHTML="Login";if(authGoogle)authGoogle.setAttribute('onclick',"social_login(event, 'google')");if(emailSwitch){emailSwitch.innerHTML="Or login with email";emailSwitch.setAttribute('onclick',"authOptions('moreOptions')");} |
| hideElementsById(["reenter-password-container-id","user-email-error"]);if(loginEmail){loginEmail.innerHTML="Login";loginEmail.setAttribute('onclick',"login(event)");}}else{if(signupOption&&!signupOption.classList.contains("active")){signupOption.classList.add("active");if(loginOption)loginOption.classList.remove("active");} |
| if(document.getElementById('login-header-title'))document.getElementById('login-header-title').innerHTML="Signup";if(authGoogle)authGoogle.setAttribute('onclick',"social_signup(event, 'google')");if(emailSwitch){emailSwitch.innerHTML="Or signup with email";emailSwitch.setAttribute('onclick',"authOptions('moreOptions')");} |
| if(loginEmail){loginEmail.innerHTML="Signup";loginEmail.setAttribute('onclick',"signup(event)");} |
| hideElementsById(["forgot-password","user-email-error"]);const reenterPwdDisplay=(authGoogle&&authGoogle.style.display=="none")?"flex":"none";if(reenterPwd)reenterPwd.style=`display: ${reenterPwdDisplay};`;}} |
| function authOptions(toggle){hideElementsById(['user-email-error']) |
| const moreOptions={true:{visible:["email-container-id","password-container-id","reenter-password-container-id","login-via-email-id","forgot-password","go-back-login"],hidden:["switch-to-email","social-auth-google"]},false:{visible:["switch-to-email","social-auth-google"],hidden:["email-container-id","password-container-id","reenter-password-container-id","login-via-email-id","forgot-password","go-back-login"]}};showElementsById(moreOptions[toggle=="moreOptions"].visible);hideElementsById(moreOptions[toggle=="moreOptions"].hidden);if(document.getElementById('user-email'))document.getElementById('user-email').focus();const loginButton=document.getElementById('login-via-email-id');if(toggle=="moreOptions"&&loginButton&&loginButton.innerHTML=="Login"){hideElementsById(["reenter-password-container-id"]);}} |
| function togglePaymentOption(toggle){const stripeProOption=document.getElementById("stripeProToggle");const stripeProButton=document.getElementById("stripe-pro-button-container");if(toggle==="stripePro"){if(stripeProOption&&!stripeProOption.classList.contains("active")){stripeProOption.classList.add("active");} |
| if(stripeProButton)stripeProButton.style.display="flex";}else if(stripeProButton)stripeProButton.style.display="none";} |
| function toggleMembershipOption(toggle){const options={pro:{active:"proToggle",inactive:"payGoToggle",titleDisplay:"flex",subheaderText:"DeepAI PRO member",priceText:"$4.99",lengthText:"/month",periodText:"Per month",genCallsValue:"500",videoCallsValue:"30",musicCallsValue:"100",chatCallsValue:"1750",geniusMessagesValue:"250",geniusMessagesFontSize:"14px",geniusImagesValue:"60",geniusImagesFontSize:"14px",geniusVideosValue:"5",geniusVideosFontSize:"14px",},};const activeOption="pro";const currentOption=options[activeOption];const proToggleElement=document.getElementById(currentOption.active);if(proToggleElement)proToggleElement.classList.add("active");const subTitlePro=document.getElementById('subscription-title-pro-id');if(subTitlePro)subTitlePro.style.display=currentOption.titleDisplay;const subHeader=document.getElementById('subscriptions-subheader-id');if(subHeader)subHeader.innerHTML=currentOption.subheaderText;const subPrice=document.getElementById('subscription-price-id');if(subPrice)subPrice.innerHTML=currentOption.priceText;const subLength=document.getElementById('subscription-length-id');if(subLength)subLength.innerHTML=currentOption.lengthText;const genCallsPer=document.getElementById('gen-calls-per');if(genCallsPer)genCallsPer.innerHTML=currentOption.periodText;const genCallsVal=document.getElementById('gen-calls-value');if(genCallsVal)genCallsVal.innerHTML=currentOption.genCallsValue;const chatCallsVal=document.getElementById('chat-calls-value');if(chatCallsVal)chatCallsVal.innerHTML=currentOption.chatCallsValue;const videoCallsVal=document.getElementById('video-calls-value');if(videoCallsVal)videoCallsVal.innerHTML=currentOption.videoCallsValue;const musicCallsVal=document.getElementById('music-calls-value');if(musicCallsVal)musicCallsVal.innerHTML=currentOption.musicCallsValue;const geniusMsgVal=document.getElementById('genius-messages-value');if(geniusMsgVal){geniusMsgVal.innerHTML=currentOption.geniusMessagesValue;geniusMsgVal.style.fontSize=currentOption.geniusMessagesFontSize;} |
| const geniusImgVal=document.getElementById('genius-images-value');if(geniusImgVal){geniusImgVal.innerHTML=currentOption.geniusImagesValue;geniusImgVal.style.fontSize=currentOption.geniusImagesFontSize;} |
| const geniusVidVal=document.getElementById('genius-videos-value');if(geniusVidVal){geniusVidVal.innerHTML=currentOption.geniusVideosValue;geniusVidVal.style.fontSize=currentOption.geniusVideosFontSize;} |
| const proActive=toggle==="pro";try{updateUserPlanButton(proActive);}catch(e){console.error("Error updating user plan button:",e);}} |
| function setDisplayStyle(elementIds,displayStyle){elementIds.forEach(id=>{const element=document.getElementById(id);if(element){element.style.display=displayStyle;}});} |
| function changePaymentModalState(toggle){const alwaysHideElements=[];const startHideElements=['membership-toggle-id','modal-subscription-section-id','subscription-start-id','modal-dropdown-payment-amount'];const paymentElementsPro=['sub-terms-pro','payment-container-pro'];const getStartedContainer=document.getElementById('get-started-container-id');if(toggle==="start"){setDisplayStyle(alwaysHideElements,"none");setDisplayStyle(startHideElements,"none");if(getStartedContainer)getStartedContainer.style.display="flex";togglePaymentOption('stripePro');setDisplayStyle(paymentElementsPro,"flex");}else{setDisplayStyle(alwaysHideElements,"none");setDisplayStyle(startHideElements,"flex");if(getStartedContainer)getStartedContainer.style.display="none";}} |
| function togglePricingPageOptions(toggle){const freeMembOption=document.getElementById("freeMembToggle");const proMembOption=document.getElementById("proMembToggle");const middleFreeCol=document.getElementById("middle-free-plan-column");const middleProCol=document.getElementById("middle-pro-plan-column");if(toggle==="free-memb"){if(freeMembOption&&!freeMembOption.classList.contains("active")){freeMembOption.classList.add("active");if(proMembOption)proMembOption.classList.remove("active");} |
| if(middleFreeCol)middleFreeCol.style.display="block";if(middleProCol)middleProCol.style.display="none";}else if(toggle==="pro-memb"){if(proMembOption&&!proMembOption.classList.contains("active")){proMembOption.classList.add("active");if(freeMembOption)freeMembOption.classList.remove("active");} |
| if(middleFreeCol)middleFreeCol.style.display="none";if(middleProCol)middleProCol.style.display="block";}else{if(middleFreeCol)middleFreeCol.style.display="none";if(middleProCol)middleProCol.style.display="none";}} |
| function getMobileProPlanDetails(){return{price:"$4.99",length:"/month",period:"Per month",genCalls:"500",chatCalls:"1750",videoCalls:"30",musicCalls:"100",geniusMessages:"250",messageSize:"14px",geniusImages:"60",imageSize:"14px",geniusVideos:"5",videoSize:"14px"};} |
| function updateMobilePricingClasses(proElement,proActive){if(proElement)proElement.classList.toggle("active",proActive);} |
| function updateMobilePricingContent(proActive){const plan=getMobileProPlanDetails();const mobileSubTitlePro=document.getElementById('mobile-subscription-title-pro-id');if(mobileSubTitlePro)mobileSubTitlePro.style.display=proActive?"flex":"none";const mobileSubPrice=document.getElementById('mobile-subscription-price-id');if(mobileSubPrice)mobileSubPrice.innerHTML=plan.price;const mobileSubLength=document.getElementById('mobile-subscription-length-id');if(mobileSubLength)mobileSubLength.innerHTML=plan.length;const mobileProOverages=document.getElementById('mobile-pro-overages');if(mobileProOverages)mobileProOverages.style.display=proActive?"flex":"none";const mobileGenCallsPer=document.getElementById('mobile-gen-calls-per');if(mobileGenCallsPer)mobileGenCallsPer.innerHTML=plan.period;const mobileGenCallsVal=document.getElementById('mobile-gen-calls-value');if(mobileGenCallsVal)mobileGenCallsVal.innerHTML=plan.genCalls;const mobileChatCallsVal=document.getElementById('mobile-chat-calls-value');if(mobileChatCallsVal)mobileChatCallsVal.innerHTML=plan.chatCalls;const mobileVideoCallsVal=document.getElementById('mobile-video-calls-value');if(mobileVideoCallsVal)mobileVideoCallsVal.innerHTML=plan.videoCalls;const mobileMusicCallsVal=document.getElementById('mobile-music-calls-value');if(mobileMusicCallsVal)mobileMusicCallsVal.innerHTML=plan.musicCalls;const mobileGeniusMsgVal=document.getElementById('mobile-genius-messages-value');if(mobileGeniusMsgVal){mobileGeniusMsgVal.innerHTML=plan.geniusMessages;mobileGeniusMsgVal.style.fontSize=plan.messageSize;} |
| const mobileGeniusImgVal=document.getElementById('mobile-genius-images-value');if(mobileGeniusImgVal){mobileGeniusImgVal.innerHTML=plan.geniusImages;mobileGeniusImgVal.style.fontSize=plan.imageSize;} |
| const mobileGeniusVidVal=document.getElementById('mobile-genius-videos-value');if(mobileGeniusVidVal){mobileGeniusVidVal.innerHTML=plan.geniusVideos;mobileGeniusVidVal.style.fontSize=plan.videoSize;}} |
| function toggleMembershipOptionPricing(toggle){const mobileProMembOption=document.getElementById("mobileProToggle");const proActive=toggle==="pro";try{updateMobilePricingClasses(mobileProMembOption,proActive);updateMobilePricingContent(proActive);}catch(e){console.log('error updating mobile pricing display',e);} |
| try{updateUserPlanButton(proActive);}catch(e){console.log('error updating user plan button state',e);}} |
| function toggleProPromoTitle(){const titleEl=document.getElementById('subscription-title-pro-promo-id');if(!titleEl)return;const segments=window.location.pathname.replace(/^\/+|\/+$/g,'').split('/');let page=segments[0];if(segments[0]==='machine-learning-model'){page='image';} |
| const titles={chat:'Upgrade AI Chat with',image:'Make Better Images with',video:'Make Better Videos with',music:'Make Beats with'};titleEl.innerHTML=titles[page]||'Unlock AI Power with';} |
| function updateUserPlanButton(proActive){let user_object=null;try{if(localStorage.getItem('user')){user_object=JSON.parse(localStorage.getItem('user'));}}catch(e){console.error("Error accessing or parsing user data from localStorage",e);return;} |
| if(user_object&&user_object.userprofile2){const userIsPro=user_object.userprofile2.user_has_deepai_pro;const userIsGo=user_object.userprofile2.user_is_pay_as_you_go;const isCurrentPlan=proActive?userIsPro:userIsGo;setElementStyles('subscription-start-id',isCurrentPlan?"Current Plan":"Get Started",isCurrentPlan);setElementStyles('mobile-subscription-start-id',isCurrentPlan?"Current Plan":"Get Started",isCurrentPlan);}else{setElementStyles('subscription-start-id',"Get Started",false);setElementStyles('mobile-subscription-start-id',"Get Started",false);}} |
| function getProPlan(){return getMobileProPlanDetails();} |
| function changePaymentModalStatePricing(toggle){const hideElementsOnStart=['mobile-membership-toggle-id','mobile-subscription-section-id','mobile-subscription-start-id',];const paymentElementsPro=['mobile-sub-terms-pro','mobile-stripe-pro-button-container'];const mobileSubscriptionTitle=document.getElementById('mobile-subscription-title-id');const mobileGetStartedContainer=document.getElementById('mobile-get-started-container-id');if(toggle==="start"){setDisplayStyle(hideElementsOnStart,"none");if(mobileGetStartedContainer)setDisplayStyle(['mobile-get-started-container-id'],"flex");const mobileSubTitlePro=document.getElementById('mobile-subscription-title-pro-id');togglePaymentOptionMobile('stripePro');setDisplayStyle(paymentElementsPro,"flex");if(mobileSubscriptionTitle)mobileSubscriptionTitle.innerHTML="DeepAI";}else{setDisplayStyle(hideElementsOnStart,"flex");if(mobileGetStartedContainer)setDisplayStyle(['mobile-get-started-container-id'],"none");setDisplayStyle(['mobile-dropdown-payment-amount'],"none");}} |
| function togglePaymentOptionMobile(toggle){const mobilestripeProOption=document.getElementById("mobilestripeProToggle");const mobileStripeProBtn=document.getElementById("mobile-stripe-pro-button-container");if(toggle=="stripePro"){if(mobilestripeProOption&&!mobilestripeProOption.classList.contains("active")){mobilestripeProOption.classList.add("active");} |
| if(mobileStripeProBtn)mobileStripeProBtn.style.display="flex";} |
| else{if(mobilestripeProOption)mobilestripeProOption.classList.remove("active");if(mobileStripeProBtn)mobileStripeProBtn.style.display="none";}} |
| function checkCurrentUserPricingPlan(context='default'){const ids={proPlanButton:(context==='default')?'pro-plan-button':'middle-pro-plan-button',freePlanColumn:(context==='default')?'free-plan-column':'middle-free-plan-column',infoSubContainer:'info-subscriptions-container',subscriptionStartId:'subscription-start-id',subscriptionStartButton:'stripe-pro-button-container',mobileSubscriptionStartId:'mobile-subscription-start-id',freePlanButton:(context==='default')?'free-plan-button':'middle-free-plan-button'};let user_object=null;try{if(localStorage.getItem('user')){user_object=JSON.parse(localStorage.getItem('user'));}}catch(e){console.error("Error accessing or parsing user data from localStorage",e);updateNonLoggedInUserPlan();return;} |
| if(user_object&&user_object.userprofile2){const userIsPro=user_object.userprofile2.user_has_deepai_pro;const userIsGo=user_object.userprofile2.user_is_pay_as_you_go;const infoSubContainerEl=document.getElementById(ids.infoSubContainer);if(userIsPro){setElementStyles(ids.proPlanButton,"Current Plan",true);if(infoSubContainerEl&&context==='default')infoSubContainerEl.style="width: 22vw;";setElementStyles(ids.subscriptionStartId,"Current Plan",true);setElementStyles(ids.mobileSubscriptionStartId,"Current Plan",true);toggleMembershipOptionPricing('pro');setElementOnClick(ids.subscriptionStartId,"changePaymentModalState('start');");setElementOnClick(ids.mobileSubscriptionStartId,"changePaymentModalStatePricing('start');");}else if(userIsGo){if(infoSubContainerEl&&context==='default')infoSubContainerEl.style="width: 24vw;";setElementStyles(ids.subscriptionStartId,"Current Plan",true);setElementStyles(ids.mobileSubscriptionStartId,"Current Plan",true);setElementOnClick(ids.subscriptionStartId,"changePaymentModalState('start');");setElementOnClick(ids.mobileSubscriptionStartId,"changePaymentModalStatePricing('start');");setElementOnClick(ids.proPlanButton,"openSubscription();");setElementStyles(ids.subscriptionStartButton,"Subscribe",false);setElementOnClick(ids.subscriptionStartButton,"window.open(window.deepaiProLinkUrl, '_blank');");}else{setElementStyles(ids.freePlanButton,"Current Plan",true);setElementOnClick(ids.proPlanButton,"openSubscription();");setElementOnClick(ids.subscriptionStartId,"changePaymentModalState('start');");setElementOnClick(ids.mobileSubscriptionStartId,"changePaymentModalStatePricing('start');");toggleMembershipOptionPricing('pro');setElementStyles(ids.subscriptionStartId,"Get Started",false);setElementStyles(ids.mobileSubscriptionStartId,"Get Started",false);setElementStyles(ids.subscriptionStartButton,"Subscribe",false);setElementOnClick(ids.subscriptionStartButton,"window.open(window.deepaiProLinkUrl, '_blank');");}}else{updateNonLoggedInUserPlan();toggleMembershipOptionPricing('pro');}} |
| function setElementStyles(elementId,innerHTMLText,disable=false){const element=document.getElementById(elementId);if(element){element.style.cssText=disable?"background-color: transparent !important; border: 2px solid #8f37ff !important; cursor: default !important; pointer-events: none !important;":"background-color: #8f37ff !important; border: none !important; cursor: pointer !important; pointer-events: all !important;";element.innerHTML=innerHTMLText;}else{}} |
| function setElementOnClick(elementId,action){const element=document.getElementById(elementId);if(element){element.setAttribute("onclick",action);}else{}} |
| function updateNonLoggedInUserPlan(){setElementOnClick('subscription-start-id',"openSignup();");setElementStyles('subscription-start-id',"Signup",false);setElementOnClick('stripe-pro-button-container',"openSignup();");setElementStyles('stripe-pro-button-container',"Signup",false);setElementOnClick('mobile-subscription-start-id',"openSignup();");setElementStyles('mobile-subscription-start-id',"Signup",false);setElementOnClick('pro-plan-button',"openSubscription();");setElementStyles('pro-plan-button',"Get Started",false);setElementOnClick('middle-pro-plan-button',"openSubscription();");setElementStyles('middle-pro-plan-button',"Get Started",false);setElementStyles('free-plan-button',"Get Started",false);setElementStyles('middle-free-plan-button',"Get Started",false);} |
| function subscriptionPopupAfterAuth(){let user_object=null;try{if(localStorage.getItem('user')){user_object=JSON.parse(localStorage.getItem('user'));}}catch(e){console.error("Error accessing user data after auth.",e);return;} |
| const announcementBanner=document.getElementById('announcement-banner');if(user_object&&user_object.userprofile2){if(!(user_object.userprofile2.user_has_deepai_pro||user_object.userprofile2.user_is_pay_as_you_go)){if(subscription_shown){const win=window.open(window.deepaiProLinkUrl,'_blank');if(win&&!win.closed){subscription_shown=false;return;}} |
| openSubscription();}else{announcementBanner.style.display="none";}}} |
| function openSubscribeFromGenius(tag){const modalId=tag==="image"?"genius-images-modal":"genius-chat-modal";const geniusModal=document.getElementById(modalId);if(geniusModal&&typeof geniusModal.close==='function'){geniusModal.close();openSubscription();}else{console.warn(`Modal with ID '${modalId}' not found or is not a closeable element.`);openSubscription();}} |
| try{document.addEventListener("visibilitychange",(e)=>{fetch(app_base_url+"/favicon.ico",{method:'POST',credentials:'include',});})}catch(e){console.log("error adding visibilitychange event listener: "+e);} |
| function removeHeaderBackground(){const navbar=document.querySelector('header');navbar.style.background="";} |
| function changeHeaderBackground(){const navbar=document.querySelector('header');const ad=document.getElementById('deepai.org_header');const navbarRect=navbar.getBoundingClientRect();const adRect=ad.getBoundingClientRect();const navbarHeight=navbarRect.height;const bodyHeight=document.querySelector('body').getBoundingClientRect().height;const navBodyRatio=bodyHeight/navbarHeight;const shift=-100*adRect.height/navbarHeight;navbar.style.background=`linear-gradient(180deg,#7729aa ${shift + -13.13 * navBodyRatio}%,#170a2d ${shift + 0.17 * navBodyRatio }%,#0a061d ${shift + navBodyRatio* 6.9}%,rgba(10,6,30,0.99) ${shift + navBodyRatio * 36.38}%,#010311 ${shift + navBodyRatio * 98.59}%)`;} |
| try{if(!user_paid_for_no_ads){changeHeaderBackground();}}catch(e){console.log("error changing header background: "+e);} |
| try{localStorage.setItem("name","Hello World!");}catch(e){console.log("Error - local storage is full. clearing local storage");try{localStorage.clear();}catch(e2){console.log("error clearing local storage: "+e2);}} |
| var onCategoryPage=false;try{const reeferrerMadness=document.referrer;var cookieUserReeferrer=localStorage.getItem('userReeferrer');if(cookieUserReeferrer==undefined){localStorage.setItem('userReeferrer',reeferrerMadness);cookieUserReeferrer=localStorage.getItem('userReeferrer');}else{} |
| var thisLocation=window.location.pathname;var pagePathCookie=localStorage.getItem('pagePath');if(pagePathCookie==undefined){localStorage.setItem('pagePath',[thisLocation]);}else if(pagePathCookie.length>100000){}else{var newPagePathCookie=new Array(pagePathCookie,thisLocation);localStorage.setItem('pagePath',newPagePathCookie);};var latestPagePathCookie=localStorage.getItem('pagePath');}catch(e){console.log("error in reeferrer madness: "+e);} |
| if(!document.createElement('dialog').showModal){console.log('loading dialog polyfill...');var script=document.createElement("script");script.src="/static/js/libs/dialog-polyfill.js";script.type="text/javascript";script.async=true;script.onload=function(){for(var dialog of document.getElementsByTagName('dialog')){dialogPolyfill.registerDialog(dialog);}};document.getElementsByTagName("head")[0].appendChild(script);}else{console.log('not loading dialog polyfill');} |
| try{if(!window.localStorage||!window.sessionStorage)(function(){var Storage=function(type){function createCookie(name,value,days){var date,expires;if(days){date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}else{expires="";} |
| document.cookie=name+"="+value+expires+"; path=/";} |
| function readCookie(name){var nameEQ=name+"=",ca=document.cookie.split(';'),i,c;for(i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);} |
| if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}} |
| return null;} |
| function setData(data){data=JSON.stringify(data);if(type=='session'){window.name=data;}else{createCookie('localStorage',data,365);}} |
| function clearData(){if(type=='session'){window.name='';}else{createCookie('localStorage','',365);}} |
| function getData(){var data=type=='session'?window.name:readCookie('localStorage');return data?JSON.parse(data):{};} |
| var data=getData();function numKeys(){var n=0;for(var k in data){if(data.hasOwnProperty(k)){n+=1;}} |
| return n;} |
| return{clear:function(){data={};clearData();this.length=numKeys();},getItem:function(key){key=encodeURIComponent(key);return data[key]===undefined?null:data[key];},key:function(i){var ctr=0;for(var k in data){if(ctr==i)return decodeURIComponent(k);else ctr++;} |
| return null;},removeItem:function(key){key=encodeURIComponent(key);delete data[key];setData(data);this.length=numKeys();},setItem:function(key,value){key=encodeURIComponent(key);data[key]=String(value);setData(data);this.length=numKeys();},length:0};};if(!window.localStorage)window.localStorage=new Storage('local');if(!window.sessionStorage)window.sessionStorage=new Storage('session');})();}catch(e){console.log("error installing localstorage polyfill: "+e);} |
| var user_object={};function userIsLoggedIn(){if(user_object?.pk){return true;}else{return false;}} |
| function getUserId(){if(user_object?.pk){return user_object.pk;}else{return null;}} |
| async function saveDeepaiProLinkUrl(){const resp=await fetch(app_base_url+'/get_my_stripe_subscription_checkout_link',{method:'GET',credentials:'include',});const data=await resp.json();window.deepaiProLinkUrl=data.link;console.log("got deepaiProLinkUrl",window.deepaiProLinkUrl);} |
| async function creditsCheckoutUrl(creditsAmountSelect){var amount_of_credits=document.getElementById(creditsAmountSelect).value;var formData=new FormData();formData.append('amount_of_credits',amount_of_credits);const resp=await fetch(app_base_url+'/get_my_stripe_credits_checkout_link',{method:'POST',credentials:'include',body:formData});const data=await resp.json();window.deepaiAddCreditsLinkUrl=data.add_credits_link;console.log("got deepaiAddCreditsLinkUrl",window.deepaiAddCreditsLinkUrl);window.open(window.deepaiAddCreditsLinkUrl,'_blank');} |
| async function saveStripeCardUpdateLink(){const resp=await fetch(app_base_url+'/get_my_stripe_card_update_link',{method:'GET',credentials:'include',});const data=await resp.json();window.deepaiUpdateStripeCardUrl=data.link;console.log("got deepaiUpdateStripeCardUrl",window.deepaiProLinkUrl);};function authKeyPressHandler(e){if(e.keyCode==13&&!e.shiftKey){e.preventDefault();if(document.getElementById('login-via-email-id').innerHTML=="Login"){login(e);}else{signup(e);}}} |
| async function checkAuthStatus(){if(localStorage.getItem('user')){user_object=JSON.parse(localStorage.getItem('user'));}else{} |
| if(typeof displayMyChatSessions==="function"){try{displayMyChatSessions()}catch(e){console.log(e)}} |
| console.log(user_object);var dropdownSandwich=document.getElementById('sandwichIconDrop');var dropdownUser=document.getElementById('userIconDrop');var profileSecNav=document.getElementById('navProfileSection');var profileButtonNav=document.getElementById('navProfileButton');var navProfileAvatar=document.getElementById('navUserAvatar');var headerLogin=document.getElementById('headerLoginButton');var navUsername=document.getElementById('navUserName');var navUseremail=document.getElementById('navUserEmail');if(userIsLoggedIn()){if(user_object.userprofile2.user_can_use_genius_mode){unlockGeniusMode();unlockGeniusImageGenerator();const banner=document.getElementById('announcement-banner');if(banner){banner.style.display='none';}} |
| showHidePermanentProAds();if(user_object.userprofile2.locked_out_due_to_no_payment_info===false){unlockHdImageGenerator();if(typeof user_paid_for_no_ads!=='undefined'){user_paid_for_no_ads=true;} |
| removeFreestarAds();} |
| navProfileAvatar.src=app_base_url+'/get_author_obj_img_url';saveDeepaiProLinkUrl();saveStripeCardUpdateLink();dropdownSandwich.style="display: none;";headerLogin.style="display: none;";dropdownUser.style="display: flex;";profileSecNav.style="display: flex;";profileButtonNav.style="display: flex;";if(document.getElementById("My Characters")){document.getElementById("My Characters").style.display="inline-block";} |
| navUsername.innerHTML=user_object.username;navUseremail.innerHTML=user_object.email;for(const signupButton of document.getElementsByClassName('button login')){signupButton.setAttribute('onclick',"window.location.replace('/dashboard/profile')");signupButton.innerHTML="My Profile";} |
| if(document.getElementById('signup-button-dropdown-li')){document.getElementById('signup-button-dropdown-li').setAttribute('onclick',"window.location.replace('/dashboard/profile')");document.getElementById('signup-button-dropdown-li').innerHTML="My Profile";} |
| for(const loginButton of document.getElementsByClassName('login-button')){loginButton.setAttribute('onclick',"logout()");loginButton.innerHTML="Log Out";} |
| if(document.getElementById('login-button-dropdown')){document.getElementById('login-button-dropdown').setAttribute('onclick',"logout()");document.getElementById('login-button-dropdown').innerHTML="Logout";} |
| if(user_object.userprofile&&user_object.userprofile.api_key){applyApiKeyToCodeExamples(user_object.userprofile.api_key);}else{console.log('Error - user is logged in but has no API key.');} |
| try{if(typeof freestar=='object'){freestar.queue.push(function(){freestar.identity.setIdentity({email:user_object.email});});}}catch(e){console.log('error setting freestar identity',e);} |
| applyCachedHeartsToHeartsOnPage();await refreshHeartsFromServer();}else{}} |
| function unlockGeniusMode(){if(document.getElementById('genius')){document.getElementById('genius').removeAttribute('locked');document.getElementById('genius').classList.remove('chat-mode-locked');} |
| if(document.getElementById('supergenius')){document.getElementById('supergenius').removeAttribute('locked');document.getElementById('supergenius').classList.remove('chat-mode-locked');}} |
| function removeFreestarAds(){try{var pushdown=document.getElementById("deepai.org_header");if(pushdown){var parentMain=pushdown.parentNode;if(parentMain){parentMain.remove();}}}catch(e){console.error('Error removing deepai.org_header parent:',e);} |
| try{freestar.deleteAdSlots();}catch(e){console.error('Error in freestar.deleteAdSlots:',e);} |
| try{freestar.deleteVideo();}catch(e){console.error('Error in freestar.deleteVideo:',e);} |
| try{freestar.deleteStickyFooter();}catch(e){console.error('Error in freestar.deleteStickyFooter:',e);}} |
| function unlockHdImageGenerator(){if(document.getElementById('imageHdLockedIcon')){document.getElementById('imageHdLockedIcon').remove();}} |
| function unlockGeniusImageGenerator(){if(document.getElementById('modelGeniusModeButton')){document.getElementById('modelGeniusModeButton').removeAttribute('locked');} |
| if(document.getElementById('imageGeniusLockedIcon')){document.getElementById('imageGeniusLockedIcon').remove();}} |
| async function auth(){try{const response=await fetch(app_base_url+"/daily-time-sync/user/",{credentials:'include'});var user=await response.json();var user_string=JSON.stringify(user);if(await response.status==200){localStorage.setItem('user',user_string);user_object=JSON.parse(localStorage.getItem('user'));await checkAuthStatus();}else{localStorage.removeItem('user');localStorage.removeItem('hearts-cache');user_object={};};}catch(e){console.log("Error validating auth",e);localStorage.removeItem('user');localStorage.removeItem('hearts-cache');user_object={};}} |
| function mainNavDrop(){document.getElementById("mainNavDropdown").classList.toggle("show-dropdown");} |
| if(document.getElementById("dropMenuButton")){document.getElementById("dropMenuButton").addEventListener("click",function(event){event.stopPropagation();mainNavDrop();},false);} |
| window.onclick=function(event){if(event.target.closest('.dropdown-link')||event.target.closest('.content-dropdown-link')){}else if(!event.target.matches('.dropbtn')){if(document.getElementById("contentNavDropdown")){var contentDropdown=document.getElementById("contentNavDropdown");if(contentDropdown){if(contentDropdown.classList.contains('show-dropdown')){contentDropdown.classList.remove('show-dropdown');}}} |
| var mainDropdown=document.getElementById("mainNavDropdown");if(mainDropdown){if(mainDropdown.classList.contains('show-dropdown')){mainDropdown.classList.remove('show-dropdown');}}}else{}} |
| var lastApiKeyUsed;function applyApiKeyToCodeExamples(newApiKey){for(var subArea of document.getElementsByClassName('api-key-auto-substitute-area')){const treeWalker=document.createTreeWalker(subArea);while(treeWalker.nextNode()){const node=treeWalker.currentNode;if(node.nodeValue){var newValue=node.nodeValue.replace('YOUR_API_KEY',newApiKey);if(lastApiKeyUsed){newValue=newValue.replace(lastApiKeyUsed,newApiKey);} |
| node.nodeValue=newValue;}}} |
| lastApiKeyUsed=newApiKey;} |
| checkAuthStatus();auth();async function refreshHeartsFromServer(){const response=await fetch(app_base_url+"/get_my_hearted_object_ids",{credentials:'include'});const hearts=await response.json();localStorage.setItem('hearts-cache',JSON.stringify(hearts));applyCachedHeartsToHeartsOnPage();} |
| function applyCachedHeartsToHeartsOnPage(){if(!localStorage.getItem('hearts-cache')){console.log('no heart cache');return;} |
| var hearts_hash=JSON.parse(localStorage.getItem('hearts-cache')).hearts;for(const heartLink of document.getElementsByClassName('heart-link')){heartLink.removeAttribute('hearted');if(hearts_hash[heartLink.attributes.heartid.value]){heartLink.setAttribute('hearted','hearted');}}} |
| async function heart(heartLink){if(!userIsLoggedIn()){openSignup(function(){heart(heartLink);});return;} |
| var hearts_cache;if(localStorage.getItem('hearts-cache')){hearts_cache=JSON.parse(localStorage.getItem('hearts-cache'));}else{console.log('warning, hearts cache is empty. creating new hearts cache...');hearts_cache={'hearts':{}};} |
| var addremove;var oldcount=(heartLink.getElementsByClassName('heart-count')[0].innerText)*1;if(heartLink.attributes.hearted){heartLink.removeAttribute('hearted');addremove='false';delete hearts_cache.hearts[heartLink.attributes.heartid.value];var count=oldcount-1;if(count<0){count=0;} |
| heartLink.getElementsByClassName('heart-count')[0].innerText=count;}else{heartLink.setAttribute('hearted','hearted');addremove='true';hearts_cache.hearts[heartLink.attributes.heartid.value]=true;heartLink.getElementsByClassName('heart-count')[0].innerText=oldcount+1;} |
| localStorage.setItem('hearts-cache',JSON.stringify(hearts_cache));var formData=new FormData();var split=heartLink.attributes.heartid.value.split('-');var heartclass=split[0];var objid=split[1];formData.append('type',heartclass);formData.append('id',objid);formData.append('switch',addremove);const response=await fetch(app_base_url+"/add_remove_heart",{method:'POST',credentials:'include',body:formData});console.log('hearty response ',response);} |
| const modal=document.getElementById('login-modal');const nudgeLoginModal=document.getElementById("nudge-popup");const nudgeProModal=document.getElementById("nudge-pro-popup");var afterSignupFunction=null;const openSignup=function(afterSignupFunctionArg,popupHeaderText){afterSignupFunction=afterSignupFunctionArg;if(userIsLoggedIn()){if(afterSignupFunction){afterSignupFunction();}}else{subscription_modal.close();modal.showModal();toggleAuthOption("signup");if(popupHeaderText){modal.getElementsByClassName('login-header')[0].innerHTML=popupHeaderText;}}} |
| const close=document.getElementById('close');close.addEventListener('click',()=>{modal.close('cancelled');authOptions('lessOptions');}) |
| modal.addEventListener('cancel',()=>{modal.close('cancelled');authOptions('lessOptions');});modal.addEventListener('click',(event)=>{if(event.target===modal){modal.close('cancelled');authOptions('lessOptions');}});function getSignupCustomData(desired_username){return{'referrer':'['+cookieUserReeferrer+']'+'['+latestPagePathCookie+']','signup_page':window.location.pathname,'desired_username':desired_username};} |
| async function save_custom_signup_data(desired_username){const custom_signup_data=getSignupCustomData(desired_username);const response=await fetch(app_base_url+"/save_custom_signup_data",{credentials:'include',method:'POST',body:JSON.stringify(custom_signup_data),headers:{'Content-Type':'application/json'}});if(!response.ok){throw new Error("saving custom signup data HTTP status "+response.status);} |
| return null;} |
| async function signup(e){e.preventDefault();var p=document.getElementById('user-email-error');p.innerHTML='';p.setAttribute('style','display: none;');var user_email=document.getElementById('user-email');var user_password=document.getElementById('user-password');var confirm_user_password=document.getElementById('confirm-user-password');var user_email_value=user_email.value;var user_password_value=user_password.value;var confirm_user_password_value=confirm_user_password.value;var formData=new FormData();formData.append('email',user_email_value);formData.append('username',user_email_value);formData.append('password1',user_password_value);formData.append('password2',confirm_user_password_value);user_email.classList.add('loading');var validation_error=null;if(!user_email_value){validation_error='Email is required';}else if(!user_password){validation_error='Password is required';}else if(!confirm_user_password){validation_error='Password confirmation is required';}else{} |
| if(validation_error){p.innerHTML=validation_error;p.setAttribute('style','display: block;');user_email.classList.remove('loading');return;}else{const user_login_type=await get_user_login_type(user_email_value);if(user_login_type.user_exists){user_email.classList.remove('loading');var message="This account already exists";if(!user_login_type.login_with_password){var name=user_login_type.login_with_social_accounts[0];message="This account exists and needs to be logged in using "+name;} |
| var p=document.getElementById('user-email-error');p.innerHTML=message;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');} |
| else{await save_custom_signup_data(null);const response=await fetch(app_base_url+"/daily-time-sync/registration/",{credentials:'include',method:'POST',body:formData});console.log(response);if(response.ok==true){user_email.classList.remove('loading');modal.close('cancelled');nudgeLoginModal.classList.remove("active");if(afterSignupFunction){await auth();afterSignupFunction();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}else{await auth();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}}else if(response.ok==false){user_email.classList.remove('loading');if(response.status==500){var signup_fail="Hmm, something went wrong. Perhaps try another email address, or try again later.";var p=document.getElementById('user-email-error');p.innerHTML=signup_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}else if(response.status>=400){var data=await response.json();var signup_fail="Hmm, something went wrong. Perhaps try another email address, or try again later.";for(const[key,value]of Object.entries(data)){if(value[0]){signup_fail=value[0];break;}} |
| var p=document.getElementById('user-email-error');p.innerHTML=signup_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}else{}}}}} |
| function recordNewProSubscriberConversion(callback){try{if(!callback){callback=function(){console.log('conversion event callback');}} |
| gtag('event','conversion_event_subscribe_paid',{'event_callback':callback,'event_timeout':2000,});}catch(e){console.log('error recording new pro subscriber conversion',e);callback();}} |
| const login_modal=document.getElementById('login-modal');var afterLoginFunction=null;const openLogin=function(afterLoginFunctionArg){afterLoginFunction=afterLoginFunctionArg;if(userIsLoggedIn()){if(afterLoginFunction){afterLoginFunction();}}else{login_modal.showModal();toggleAuthOption("login");}} |
| const closeLogin=document.getElementById('close-login');closeLogin.addEventListener('click',()=>{login_modal.close('cancelled');authOptions('lessOptions');}) |
| login_modal.addEventListener('cancel',()=>{login_modal.close('cancelled');authOptions('lessOptions');});login_modal.addEventListener('click',(event)=>{if(event.target===login_modal){login_modal.close('cancelled');authOptions('lessOptions');}});const subscription_modal=document.getElementById('subscription-modal');var afterLoginFunction=null;var subscription_shown=false;const subscriptionMessageHandler=async(event)=>{console.log('received message: ',event.data);if(event.data=='stripe subscription success'){subscription_modal.close('cancelled');nudgeProModal.classList.remove('active');recordNewProSubscriberConversion();try{await auth();if(user_object&&user_object.userprofile2&&user_object.userprofile2.user_can_use_genius_mode){unlockGeniusMode();unlockGeniusImageGenerator();if(typeof user_paid_for_no_ads!=='undefined'){user_paid_for_no_ads=true;} |
| removeFreestarAds();showHidePermanentProAds();} |
| if(userIsLoggedIn()){try{openNudgeTrustpilotPopup();}catch(e){console.log('error opening nudge popup',e);}}}catch(e){console.log('Error handling subscription success:',e);}}};let subscriptionListenerAdded=false;const openSubscription=function(){if(!subscriptionListenerAdded){window.addEventListener("message",subscriptionMessageHandler,false);subscriptionListenerAdded=true;} |
| const showSubscriptionModal=()=>{subscription_modal.showModal();toggleProPromoTitle();changePaymentModalStatePricing('back');toggleMembershipOption('pro');subscription_shown=true;};if(!userIsLoggedIn()){openSignup(async function(){if(!window.deepaiProLinkUrl){await saveDeepaiProLinkUrl();} |
| if(window.deepaiProLinkUrl){const stripeWindow=window.open(window.deepaiProLinkUrl,'_blank');if(!stripeWindow||stripeWindow.closed||typeof stripeWindow.closed==='undefined'){showSubscriptionModal();}}});return;} |
| if(userIsLoggedIn()&&window.deepaiProLinkUrl){const stripeWindow=window.open(window.deepaiProLinkUrl,'_blank');if(!stripeWindow||stripeWindow.closed||typeof stripeWindow.closed==='undefined'){showSubscriptionModal();} |
| return;} |
| if(localStorage.getItem('user')){user_object=JSON.parse(localStorage.getItem('user'));} |
| showSubscriptionModal();if(!userIsLoggedIn()){toggleProPromoTitle();updateNonLoggedInUserPlan();}} |
| const closeSubscription=document.getElementById('close-sub');closeSubscription.addEventListener('click',()=>{subscription_modal.close('cancelled');}) |
| subscription_modal.addEventListener('cancel',()=>{subscription_modal.close('cancelled');});subscription_modal.addEventListener('click',(event)=>{if(event.target===subscription_modal){subscription_modal.close('cancelled');}});const out_of_credits_modal=document.getElementById('out-of-credits-modal');const openOutOfCredits=function(current_balance){if(userIsLoggedIn()){out_of_credits_modal.showModal();if(current_balance!==null&¤t_balance!==undefined){current_balance=current_balance.toFixed(2);document.getElementById('currentAccountBalance').innerText=current_balance;}}else{openLogin();}} |
| const closeOutOfCredits=document.getElementById('close-out-of-credits');closeOutOfCredits.addEventListener('click',()=>{out_of_credits_modal.close('cancelled');}) |
| out_of_credits_modal.addEventListener('cancel',()=>{out_of_credits_modal.close('cancelled');});out_of_credits_modal.addEventListener('click',(event)=>{if(event.target===out_of_credits_modal){out_of_credits_modal.close('cancelled');}});async function get_user_login_type(email){var formData=new FormData();formData.append('email',email);const response=await fetch(app_base_url+"/get_user_login_type",{credentials:'include',method:'POST',body:formData});if(response.ok==true){var user_login_type=await response.json();return user_login_type;} |
| return null;} |
| async function login(e){e.preventDefault();var p=document.getElementById('user-email-error');p.innerHTML='';p.setAttribute('style','display: none;') |
| var login_user_email=document.getElementById('user-email');var login_user_password=document.getElementById('user-password');var login_user_email_value=login_user_email.value;var login_user_password_value=login_user_password.value;var formData=new FormData();formData.append('username',login_user_email_value);formData.append('password',login_user_password_value);if(login_user_email_value==''||login_user_password==''){}else{login_user_email.classList.add('loading');const user_login_type=await get_user_login_type(login_user_email_value);if(!user_login_type.user_exists){login_user_email.classList.remove('loading');var login_fail="No user with this email or username was found";var p=document.getElementById('user-email-error');p.innerHTML=login_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');return;} |
| if(!user_login_type.login_with_password){login_user_email.classList.remove('loading');var name=user_login_type.login_with_social_accounts[0];var login_fail="This account needs to be logged in using "+name;var p=document.getElementById('user-email-error');p.innerHTML=login_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');return;} |
| const response=await fetch(app_base_url+"/daily-time-sync/login/",{credentials:'include',method:'POST',body:formData});console.log(response);if(response.ok==true){login_user_email.classList.remove('loading');login_modal.close('cancelled');nudgeLoginModal.classList.remove("active");if(afterLoginFunction){await auth();afterLoginFunction();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}else{await auth();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}}else if(response.ok==false){login_user_email.classList.remove('loading');if(response.status==500){var login_fail="Hmm, something went wrong. Let's try that again.";var p=document.getElementById('user-email-error');p.innerHTML=login_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}else if(response.status==400){var login_fail="Email/password combination incorrect. Let's try that again.";var p=document.getElementById('user-email-error');p.innerHTML=login_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}else{}}}} |
| function sleep_async(ms){return new Promise(resolve=>setTimeout(resolve,ms));} |
| async function social_auth(social_network,desired_username){const network_to_url={linkedin:'/accounts/linkedin_oauth2/login/?process=login',google:'/accounts/google/login/?process=login',};var url=app_base_url+network_to_url[social_network];var openedWindow=window.open('about:blank','deepaiLogin','height=600,width=600,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no');await save_custom_signup_data(desired_username);openedWindow.location.href=url;while(true){await sleep_async(200);if(openedWindow.closed){return;}}} |
| async function social_signup(e,social_network){e.preventDefault();var user_email=document.getElementById('user-email');user_email.classList.add('loading');var p=document.getElementById('user-email-error');p.innerHTML='';p.setAttribute('style','display: none;');var validation_error=null;if(validation_error){p.innerHTML=validation_error;p.setAttribute('style','display: block;');user_email.classList.remove('loading');return;} |
| await social_auth(social_network,null);const response=await fetch(app_base_url+"/daily-time-sync/user/",{credentials:'include'});if(response.ok==true){user_email.classList.remove('loading');modal.close('cancelled');nudgeLoginModal.classList.remove("active");if(afterSignupFunction){await auth();afterSignupFunction();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}else{await auth();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}}else{user_email.classList.remove('loading');var signup_fail="Hmm, something went wrong. You might already have an account with that email, or your passwords do not match.";p.innerHTML=signup_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}} |
| async function social_login(e,social_network){e.preventDefault();await social_auth(social_network,null);var login_user_email=document.getElementById('user-email');login_user_email.classList.add('loading');const response=await fetch(app_base_url+"/daily-time-sync/user/",{credentials:'include'});if(response.ok==true){login_user_email.classList.remove('loading');login_modal.close('cancelled');nudgeLoginModal.classList.remove("active");await auth();try{subscriptionPopupAfterAuth();checkCurrentUserPricingPlan();checkCurrentUserPricingPlan('middle');}catch(e){console.log("error getting current user pricing plan: "+e);}}else{login_user_email.classList.remove('loading');var login_fail="Hmm, something went wrong. Let's try that again.";var p=document.getElementById('user-email-error');p.innerHTML=login_fail;p.setAttribute('className','bad-auth-error');p.setAttribute('style','display: flex;');}} |
| async function logout(){const response=await fetch(app_base_url+"/daily-time-sync/logout/",{method:'POST',credentials:'include'});localStorage.removeItem('user');localStorage.removeItem('hearts-cache');localStorage.removeItem('geniusChecked');localStorage.removeItem('onlineChecked');localStorage.removeItem('geniusVideoChecked');user_object={};showHidePermanentProAds();["genius","supergenius"].forEach(id=>{const el=document.getElementById(id);if(el){el.setAttribute("locked","true");el.classList.add("chat-mode-locked");}});const selected=document.querySelector(".chat-mode-menu-item.selected[locked]");if(selected){selected.classList.remove("selected");const standardEl=document.getElementById("standard");if(standardEl){standardEl.classList.add("selected");} |
| localStorage.setItem("selectedChatMode","standard");const currentLabel=document.getElementById("currentChatModeLabel");if(currentLabel){currentLabel.textContent="Standard";}} |
| window.location='/';} |
| async function resetPassword(e){var p=document.getElementById('user-email-error');p.innerHTML='';p.setAttribute('style','display: none;') |
| login_user_email=document.getElementById('user-email');login_user_email_value=login_user_email.value;var formData=new FormData();formData.append('email',login_user_email_value);const response=await fetch(app_base_url+"/password_reset_trigger",{method:'POST',credentials:'include',body:formData,});console.log(response);if(response.ok==true){var submission_success="Check your email inbox to reset password.";var p=document.getElementById('user-email-error');console.log(p);p.innerHTML=submission_success;p.setAttribute('class','good-auth-error');p.setAttribute('style','display: flex;');}else if(response.ok==false){var submission_success=document.getElementById("user-email").value?"Hmm something isn't right. Please try again or contact us.":"Please enter your email address above.";var p=document.getElementById('user-email-error');p.innerHTML=submission_success;p.setAttribute('class','bad-auth-error');p.setAttribute('style','display: flex;');}} |
| var thisPagePath=window.location.pathname;const social_modal=document.getElementById('social-modal');const openSocial=function(target_url){social_modal.showModal();const x_link=document.getElementById('x-link');var x_link_value="https://twitter.com/intent/tweet?url="+target_url;x_link.href=x_link_value;const facebook_link=document.getElementById('facebook-link');var facebook_link_value="https://www.facebook.com/sharer.php?u="+target_url;facebook_link.href=facebook_link_value;const linkedin_link=document.getElementById('linkedin-link');var linkedin_link_value="https://www.linkedin.com/shareArticle?mini=true&url="+target_url;linkedin_link.href=linkedin_link_value;const reddit_link=document.getElementById('reddit-link');var reddit_link_value="https://www.reddit.com/submit?url="+target_url;reddit_link.href=reddit_link_value;const social_link_input=document.getElementById('social-link-input');social_link_input.value=target_url;};const closeSocial=document.getElementById('close-social');async function shareMedia(target_url,isMusic=false){const share_url=target_url.replace('job-view','gallery-item').replace('art-image','gallery-item').replace('audio-gallery-item','gallery-item').replace('https://images.deepai.org',window.location.origin)+".html";const native_share_url=target_url.replace('gallery-item','get-media').replace('art-image','get-media').replace('https://images.deepai.org',window.location.origin)+'.html';async function fetchAssetAsBlob(url){const response=await fetch(url);if(!response.ok){throw new Error('Network response was not ok');} |
| return response.blob();} |
| try{const isDesktop=!navigator.userAgent.match(/(iPad|iPhone|iPod|android)/i);if(!isDesktop&&navigator.share){const blob=await fetchAssetAsBlob(native_share_url);const extension=native_share_url.split('.').pop();const isVideo=['mp4','webm','ogg'].includes(extension);const type=isVideo?'video':'image';const mimeType=isVideo?`video/${extension}`:('image/'+extension);const filename=`deepai-${type}.${extension}`;const file=new File([blob],filename,{type:mimeType});const text=isVideo?'Check out this cool video I made on DeepAI!':'Check out this cool image I made on DeepAI!';await navigator.share({files:[file],title:'DeepAI',text});console.log('Video shared successfully');return;}}catch(error){console.error('Error sharing the video:',error);} |
| social_modal.showModal();const message="Check out this video I generated with DeepAI!";const x_link=document.getElementById('x-link');var x_link_value="https://twitter.com/intent/tweet?url="+encodeURIComponent(share_url)+"&text="+encodeURIComponent(message);x_link.href=x_link_value;const facebook_link=document.getElementById('facebook-link');var facebook_link_value="https://www.facebook.com/sharer.php?u="+encodeURIComponent(share_url);facebook_link.href=facebook_link_value;const linkedin_link=document.getElementById('linkedin-link');var linkedin_link_value="https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(share_url)+"&summary="+encodeURIComponent(message);linkedin_link.href=linkedin_link_value;const reddit_link=document.getElementById('reddit-link');var reddit_link_value="https://www.reddit.com/submit?url="+encodeURIComponent(share_url)+"&title="+encodeURIComponent(message);reddit_link.href=reddit_link_value;const social_link_input=document.getElementById('social-link-input');social_link_input.value=share_url;};closeSocial.addEventListener('click',()=>{social_modal.close('cancelled');}) |
| social_modal.addEventListener('cancel',()=>{social_modal.close('cancelled');});social_modal.addEventListener('click',(event)=>{if(event.target===social_modal){social_modal.close('cancelled');}});function fragmentFromString(strHTML){return document.createRange().createContextualFragment(strHTML);} |
| document.querySelectorAll('.icon-container').forEach(container=>{const anchor=container.querySelector('a');const img=anchor.querySelector('img');const originalSrc=img.src;const hoverSrc=originalSrc.replace('.svg','-hover.svg');container.addEventListener('mouseenter',()=>{img.src=hoverSrc;});container.addEventListener('mouseleave',()=>{img.src=originalSrc;});});async function checkIfUserIsBlocked(){try{const response=await fetch('https://api.deepai.org/ping',{credentials:'include',method:'GET'});if(response.status===401){const textData=await response.text();return{success:true,message:textData};}else{return{success:false,message:''};}}catch(error){console.error('Error making the request:',error);return{success:false,message:'Network error or server not reachable'};}} |
| async function showAlertIfUserIsBlocked(){const result=await checkIfUserIsBlocked();if(result.success){alert(result.message);}} |
| function openNudgePopup(){document.getElementById("nudge-popup").classList.add("active");} |
| function closeNudgePopup(){document.getElementById("nudge-popup").classList.remove("active");} |
| document.getElementById("close-nudge-popup").addEventListener("click",function(event){closeNudgePopup();});document.addEventListener("click",function(event){const nudgePopup=document.getElementById("nudge-popup");if(nudgePopup.classList.contains("active")&&!nudgePopup.contains(event.target)){closeNudgePopup();}});function openNudgeProPopup(){document.getElementById("nudge-pro-popup").classList.add("active");} |
| function closeNudgeProPopup(){document.getElementById("nudge-pro-popup").classList.remove("active");} |
| document.getElementById("close-nudge-pro-popup").addEventListener("click",function(){closeNudgeProPopup();});document.addEventListener("click",function(event){const nudgeProPopup=document.getElementById("nudge-pro-popup");if(nudgeProPopup.classList.contains("active")&&!nudgeProPopup.contains(event.target)){closeNudgeProPopup();}});function nudgeUserLogin(){if(userIsLoggedIn())return;if(window.innerWidth<1000){return;} |
| const now=Date.now();const firstNudgeKey='firstLoginNudge';const lastNudgeKey='lastLoginNudge';const callCountKey='loginNudgeCallCount';const firstNudge=parseInt(localStorage.getItem(firstNudgeKey),10);const lastNudge=parseInt(localStorage.getItem(lastNudgeKey),10);let callCount=parseInt(localStorage.getItem(callCountKey),10);if(isNaN(callCount)){callCount=0;} |
| callCount++;localStorage.setItem(callCountKey,callCount);if(!firstNudge){localStorage.setItem(firstNudgeKey,now);return;} |
| const FIVE_MINUTES=5*60*1000;const FOUR_HOURS=4*60*60*1000;if(now-firstNudge>=FIVE_MINUTES){if(!lastNudge){localStorage.setItem(lastNudgeKey,now);openNudgePopup();return;} |
| if((now-lastNudge>=FOUR_HOURS)&&(callCount%4===0)){localStorage.setItem(lastNudgeKey,now);openNudgePopup();}}} |
| function nudgeUserPro(){if(!user_object){return;} |
| if(user_object.userprofile2.user_can_use_genius_mode)return;if(window.innerWidth<1000){return;} |
| const now=Date.now();const firstNudgeKey='firstProNudge';const lastNudgeKey='lastProNudge';const callCountKey='proNudgeCallCount';const firstNudge=parseInt(localStorage.getItem(firstNudgeKey),10);const lastNudge=parseInt(localStorage.getItem(lastNudgeKey),10);let callCount=parseInt(localStorage.getItem(callCountKey),10);if(isNaN(callCount)){callCount=0;} |
| callCount++;localStorage.setItem(callCountKey,callCount);if(!firstNudge){localStorage.setItem(firstNudgeKey,now);return;} |
| const FIVE_MINUTES=5*60*1000;const FOUR_HOURS=4*60*60*1000;if(now-firstNudge>=FIVE_MINUTES){if(!lastNudge){localStorage.setItem(lastNudgeKey,now);openNudgeProPopup();return;} |
| if((now-lastNudge>=FOUR_HOURS)&&(callCount%4===0)){localStorage.setItem(lastNudgeKey,now);openNudgeProPopup();}}} |
| try{const bannerKey='proBannerDismissed';const banner=document.getElementById('announcement-banner');const dismissButton=document.getElementById('dismiss-banner');if(banner&&window.user_object){const userHasPro=window.user_object?.userprofile2?.user_can_use_genius_mode||false;if(userHasPro){banner.style.display='none';}} |
| if(dismissButton){dismissButton.addEventListener('click',function(){banner.style.display='none';localStorage.setItem(bannerKey,JSON.stringify({date:new Date().toISOString()}));});}}catch(error){console.error('Error in pro banner functionality:',error);} |
| function showHidePermanentProAds(){try{const shouldShowProAds=!window.user_object?.userprofile2?.user_can_use_genius_mode;document.querySelectorAll('.permanent-announcement-banner').forEach(el=>el.style.setProperty('display',shouldShowProAds?'block':'none','important'));const sidebarContent=document.querySelector('.sidebar-content');if(sidebarContent){sidebarContent.style.setProperty('height',shouldShowProAds?'calc(100% - 177px)':'calc(100% - 120px)');}}catch(error){console.error('Error in showHidePermanentProAds:',error);}} |
| showHidePermanentProAds();let humanizeBoxAttached=false;const chat_style="neil-armstrong";const characterEnabled="True"==="True";function toggleChips(){var hiddenChips=document.querySelectorAll('.hidden-chip');var moreChip=document.getElementById('more-chip');for(var i=0;i<hiddenChips.length;i++){hiddenChips[i].style.display='inline-flex';} |
| moreChip.style.display='none';} |
| const createButton=(innerText,attributes,onClick)=>{const button=document.createElement("button");button.textContent=innerText;for(const[attr,value]of Object.entries(attributes)){button.setAttribute(attr,value);} |
| button.addEventListener("click",onClick);return button;} |
| const createUploadButton=(attributes,onClick)=>{const button=document.createElement("button");for(const[attr,value]of Object.entries(attributes)){button.setAttribute(attr,value);} |
| const svgIcon=document.createElementNS("http://www.w3.org/2000/svg","svg");svgIcon.setAttribute("viewBox","0 0 24 24");svgIcon.setAttribute("width","20");svgIcon.setAttribute("height","20");svgIcon.setAttribute("fill","none");svgIcon.setAttribute("stroke","currentColor");svgIcon.setAttribute("stroke-width","2");svgIcon.setAttribute("stroke-linecap","round");svgIcon.setAttribute("stroke-linejoin","round");svgIcon.innerHTML=` |
| <rect x="3" y="3" width="18" height="18" rx="2" ry="2" /> |
| <circle cx="8.5" cy="8.5" r="1.5" /> |
| <path d="M21 15l-5-5L5 21" /> |
| `;button.appendChild(svgIcon);button.style.boxSizing="content-box";button.style.padding="0";button.addEventListener("click",onClick);return button;} |
| const newDeleteButton=()=>createButton("Delete",{class:'deleteBoxButton',type:'button'},function(event){event.stopPropagation();let deletable=this.closest(".chatbox-wrapper, .outputBox");if(!deletable)return console.error('delete button is outside of a chatbox or outputbox');deletable.remove();const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox){persistentChatbox.focus();} |
| try{saveChatHistory();}catch(e){console.log("Error saving chat history after deleting message",e);} |
| chatModifiedSinceLoad=true;}) |
| const newSummarizeButton=()=>createButton("Summarize",{class:'summarizetextButton',id:'sumButtonId'},event=>{let outputElement=event.target.closest(".outputBox");if(!outputElement)return console.error('summarize button is outside of an outputbox');let outputText=getTextFromDiv(outputElement).replace(/[\*#]+/g,'');var summarizePrompt="Summarize the following text: ";var combinedText=summarizePrompt+outputText;summarizeSubmit(combinedText);toast('summarypopup');}) |
| const newCopyTextButton=()=>createButton("Copy",{class:'copytextButton',type:'button'},event=>{let outputElement=event.target.closest(".outputBox");if(!outputElement)return console.error('copy text button is outside of an outputbox');let outputText=getTextFromDiv(outputElement);navigator.clipboard.writeText(outputText);toast('copypopup');}) |
| const newUploadButton=()=>createUploadButton({class:'uploadButton',id:'upload',type:'button'},event=>{const input=document.createElement('input');input.type='file';input.accept='.png,.jpg,.jpeg,.bmp,.webp,.gif,.tif,.tiff,.avif';input.multiple=false;input.click();input.addEventListener('change',async(e)=>{const files=e.target.files;if(!files.length)return;const maxSizeInBytes=20*1024*1024;if(files[0].size>maxSizeInBytes){alert("File size exceeds 20 MB. Please select a smaller file.");input.value='';return;} |
| if(chatRunning)sessionStorage.setItem("clearImageUponChatCompletion","false");if(files[0].type.startsWith('image/')){const reader=new FileReader();reader.onload=function(event){displayThumbnail(event.target.result,input);};reader.readAsDataURL(files[0]);} |
| fileData=files[0];toast('upload-successful');});}) |
| try{appendUploadIfNeeded();}catch(e){console.log('error appending upload',e);} |
| function removeThumbnail(resetFile=false){const previewContainer=document.querySelector('.upload-preview-container');if(previewContainer){resetThumbnail(previewContainer);} |
| if(resetFile)fileData=null;} |
| function resetThumbnail(previewContainer){const persistentChatbox=document.getElementById('persistentChatbox');persistentChatbox.classList.remove('has-thumbnail');previewContainer.remove();persistentChatbox.style.height='auto';persistentChatbox.style.height=persistentChatbox.scrollHeight+'px';} |
| function displayThumbnail(imageSrc,inputElement){const previewContainer=document.createElement('div');previewContainer.classList.add('upload-preview-container');const img=document.createElement('img');img.src=imageSrc;img.classList.add('preview-image');const closeButton=document.createElement('button');closeButton.innerHTML='✖';closeButton.classList.add('close-button');closeButton.onclick=()=>removeThumbnail(true);previewContainer.appendChild(img);previewContainer.appendChild(closeButton);const container=document.querySelector('.persistent-compose-area');const persistentChatbox=document.getElementById('persistentChatbox');const existingPreview=container.querySelector('.upload-preview-container');if(existingPreview){existingPreview.remove();} |
| persistentChatbox.classList.add('has-thumbnail');container.appendChild(previewContainer);persistentChatbox.style.height='auto';persistentChatbox.style.height=Math.max(persistentChatbox.scrollHeight,80)+'px';} |
| const newHumanizeButton=()=>createButton("Humanize",{class:'copytextButton',type:'button'},event=>{const button=event.target;const originalText=button.innerText;button.disabled=true;button.innerText="Humanizing...";let outputElement=button.closest(".outputBox");let outputText=getTextFromDiv(outputElement);if(!outputText||outputText.length<50||outputText.length>15000){const message=(!outputText||outputText.length<50)?"Oops! Your text is too short. Please try again.":"Oops! Your text is too long. Please try again.";alert(message);button.disabled=false;button.innerText=originalText;return;} |
| fetch("https://humanize.undetectable.ai/handover",{method:"POST",headers:{"Content-Type":"application/json","apikey":"f3fb7304-7ad1-476a-96e7-d20a7d9d003a"},body:JSON.stringify({content:outputText})}).then(response=>{if(!response.ok){alert("Oops! Something went wrong. Please try again.");button.disabled=false;button.innerText=originalText;return;} |
| return response.json();}).then(data=>{if(!data)return;const documentId=data.id;if(!documentId){alert("Oops! Something went wrong. Please try again.");button.disabled=false;button.innerText=originalText;return;} |
| let baseUrl;if(chat_style==="free-chatgpt"){baseUrl="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=hbutton-freechatgpt&utm_campaign=deep1&sl=deepai-hbutton-freechatgpt&htrafficsource=deepai";}else if(chat_style==="text-generator"){baseUrl="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=hbutton-aitextgenerator&utm_campaign=deep1&sl=deepai-hbutton-aitextgenerator&htrafficsource=deepai";}else if(chat_style==="gpt-chat"){baseUrl="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=hbutton-gptchat&utm_campaign=deep1&sl=deepai-hbutton-gptchat&htrafficsource=deepai";}else{baseUrl="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=hbutton-chat&utm_campaign=deep1&sl=deepai-hbutton-chat&htrafficsource=deepai";} |
| const finalUrl=`${baseUrl}&handoverId=${documentId}`;window.open(finalUrl,'_blank');button.disabled=false;button.innerText=originalText;}).catch(error=>{console.error("Error:",error);alert("Oops! Something went wrong. Please try again.");button.disabled=false;button.innerText=originalText;});});const newSaveNGoButton=()=>createButton("Save & Go",{class:"chatEditSubmitButton",disabled:"true"},event=>{let chatboxWrapper=event.target.closest('.chatbox-wrapper');const imgElement=chatboxWrapper?.querySelector('.chat-image');handleImageAndSubmit(chatboxWrapper,imgElement);});const newCancelEditButton=()=>createButton("Cancel",{class:"chatEditCancelButton"},event=>{let chatboxWrapper=event.target.closest('.chatbox-wrapper') |
| let chatbox=chatboxWrapper.firstElementChild |
| chatbox.value=chatBoxUneditedText[chatboxWrapper.id] |
| delete chatboxWrapper.dataset.edited |
| const textarea=chatboxWrapper.querySelector('textarea');if(textarea){adjustTextareaHeight(textarea);}}) |
| function handleImageAndSubmit(chatboxWrapper,imgElement){if(imgElement){const canvas=document.createElement('canvas');canvas.width=imgElement.naturalWidth;canvas.height=imgElement.naturalHeight;const ctx=canvas.getContext('2d');ctx.drawImage(imgElement,0,0);const mimeType='image/png';canvas.toBlob((blob)=>{if(blob){const tempFile=new File([blob],'regenerate_image.png',{type:mimeType,lastModified:Date.now()});fileData=tempFile;chatReSubmit(chatboxWrapper);}},mimeType);}else chatReSubmit(chatboxWrapper);} |
| const newRegenerateButton=()=>createButton("Regenerate",{class:'deleteBoxButton',type:'button'},function(event){event.stopPropagation();let chatboxWrapper=this.closest(".chatbox-wrapper");if(!chatboxWrapper)return console.error('Regenerate button is outside of a chatbox');const imgElement=chatboxWrapper?.querySelector('.chat-image');handleImageAndSubmit(chatboxWrapper,imgElement);});async function addUploadedImage(chatboxWrapper,file){const imageSrc=await fileToImageSrc(file);const img=document.createElement('img');img.src=imageSrc;img.classList.add('chat-image');chatboxWrapper.querySelector('.chatImageBox').append(img);} |
| function newChatBox(content=""){let temp=document.createElement("template");temp.innerHTML+=` |
| <div class="chatbox-wrapper" id="${uuidv4().slice(-10)}"> |
| <textarea class="chatbox" placeholder="Edit Message..." rows="10" cols="50">${content}</textarea> |
| <div class="chatImageBox"><!-- image goes here --></div> |
| <div class="chatoptionsBox"><!-- buttons go here --></div> |
| <div class="uploadoptionsBox"><!-- upload buttons go here --></div> |
| <div class="editsBox"><!--save & go, cancel buttons--></div> |
| </div>`;let chatboxWrapper=temp.content.firstElementChild;let chatbox=chatboxWrapper.querySelector('textarea');try{if(fileData!=null){addUploadedImage(chatboxWrapper,fileData);chatbox.style.paddingBottom='10px';}}catch(e){console.log('error adding uploaded image',e);} |
| chatboxWrapper.querySelector('.chatoptionsBox').append(newRegenerateButton(),newDeleteButton());if(content){chatboxWrapper.querySelector('.editsBox').append(newSaveNGoButton(),newCancelEditButton());chatbox.addEventListener("focus",textAreaFocusHandler);chatbox.addEventListener("blur",textAreaBlurHandler);chatboxWrapper.addEventListener("keypress",editedtextAreaKeyPressHandler);}else{chatboxWrapper.addEventListener("keypress",textAreaKeyPressHandler);optimizeChatPromptBox(chatboxWrapper);} |
| return chatboxWrapper;} |
| function textAreaKeyPressHandler(e){if(e.keyCode==13&&!e.shiftKey){e.preventDefault();chatSubmit('','',true);}} |
| function editedtextAreaKeyPressHandler(e){if(e.keyCode==13&&!e.shiftKey){e.preventDefault();let chatboxWrapper=e.target.closest('.chatbox-wrapper');chatReSubmit(chatboxWrapper);}} |
| const newOutputBox=(content="")=>{let temp=document.createElement("template");let[messageText,messageJSON]=content.includes('\u001C')?content.split('\u001C'):[content] |
| console.log("new outputbox",{messageText,messageJSON}) |
| temp.innerHTML+=` |
| <div class="outputBox" id="${uuidv4().slice(-10)}"> |
| <div class="markdownContainer"></div> |
| <span data-new-content="true" class="hiddenTextContainer">${messageText}</span> |
| <div class="optionsBox"> |
| <div class="group1"></div> |
| <div class="group2"></div> |
| </div> |
| </div>`;const group1=temp.content.querySelector('.group1');group1.append(newCopyTextButton(),);const group2=temp.content.querySelector('.group2');group2.append(newSummarizeButton(),newDeleteButton());if(messageJSON){try{temp.content.querySelector('.outputBox').append(drawResults(JSON.parse(messageJSON))) |
| temp.content.querySelector('.outputBox').dataset.hasResults=true;}catch(e){console.error("failed to attach websearchresults",e)}} |
| if(characterEnabled){const figureImg=document.querySelector('.figure');if(figureImg){const outputBox=temp.content.querySelector('.outputBox');outputBox.classList.add('has-character-avatar');const markdownContainer=temp.content.querySelector('.markdownContainer');const avatarContainer=document.createElement('div');avatarContainer.className='character-avatar-container';const img=document.createElement('img');img.src=figureImg.src;img.alt=figureImg.alt||'Character';img.className='character-avatar';avatarContainer.appendChild(img);markdownContainer.insertBefore(avatarContainer,markdownContainer.firstChild);}} |
| return temp.content.firstElementChild;} |
| let chatBoxUneditedText={};function attachHumanizeBox(){if(humanizeBoxAttached)return;const outputBoxes=document.getElementsByClassName("outputBox");if(outputBoxes.length===0)return;const targetBox=outputBoxes[outputBoxes.length-1];const humanizeDiv=document.createElement("div");const humanizeTitleLeft=document.createElement("div");const humanizeTitleRight=document.createElement("div");humanizeDiv.className="humanize-box";humanizeTitleLeft.className="humanize-title";humanizeTitleLeft.innerHTML=` |
| <img |
| src="/static/images/detectable.svg" |
| alt="Detectable Icon" |
| width="18" |
| height="18" |
| loading="lazy" |
| style="margin-right: 6px;" |
| /> |
| AI TEXT DETECTED |
| `;let link;if(chat_style==='text-generator'){link="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=button-aitextgenerator&utm_campaign=deep1&sl=deepai-button-aitextgenerator&htrafficsource=deepai";}else if(chat_style==='free-chatgpt'){link="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=button-freechatgpt&utm_campaign=deep1&sl=deepai-button-freechatgpt&htrafficsource=deepai";}else if(chat_style==='gpt-chat'){link="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=button-gptchat&utm_campaign=deep1&sl=deepai-button-gptchat&htrafficsource=deepai";}else{link="https://undetectable.ai/detector-humanizer?utm_source=deepai&utm_medium=buttonchat&utm_campaign=deep1&sl=deepaibuttonchat&htrafficsource=deepai";} |
| let variant=localStorage.getItem('humanizeBoxVariant');if(!variant){variant=Math.random()<0.5?'A':'B';localStorage.setItem('humanizeBoxVariant',variant);} |
| let textLong,textShort;if(variant==='A'){textLong=`Don't get accused of using AI. <a target="_blank" href="${link}">Click here</a> to bypass AI detectors.`;textShort=`<a target="_blank" href="${link}">Click here</a> to bypass AI detectors.`;}else if(variant==='B'){textLong=`Avoid being flagged for using AI. <a target="_blank" href="${link}">Click here</a> to bypass AI detectors.`;textShort=`<a target="_blank" href="${link}">Click here</a> to bypass AI detectors.`;} |
| humanizeTitleRight.className="humanize-title";humanizeTitleRight.innerHTML=` |
| <!-- Default (shown on wider screens) --> |
| <span class="humanize-text-long"> |
| ${textLong} |
| </span> |
|
|
| <!-- Shorter (shown on narrower screens) --> |
| <span class="humanize-text-short"> |
| ${textShort} |
| </span> |
| `;humanizeDiv.appendChild(humanizeTitleLeft);humanizeDiv.appendChild(humanizeTitleRight);targetBox.insertAdjacentElement('afterend',humanizeDiv);humanizeBoxAttached=true;} |
| const maxChips=3;function concatUint8Array(arrayOne,arrayTwo){var mergedArray=new Uint8Array(arrayOne.length+arrayTwo.length);mergedArray.set(arrayOne);mergedArray.set(arrayTwo,arrayOne.length);return mergedArray;} |
| function Utf8ArrayToStr(array){let out="";const len=array.length;for(let i=0;i<len;){const c=array[i++];if((c>>7)===0){out+=String.fromCharCode(c);}else if((c>>5)===0x6){const char2=array[i++];out+=String.fromCharCode(((c&0x1F)<<6)|(char2&0x3F));}else if((c>>4)===0xE){const char2=array[i++];const char3=array[i++];out+=String.fromCharCode(((c&0x0F)<<12)|((char2&0x3F)<<6)|(char3&0x3F));}else if((c>>3)===0x1E){const char2=array[i++];const char3=array[i++];const char4=array[i++];const codePoint=(((c&0x07)<<18)|((char2&0x3F)<<12)|((char3&0x3F)<<6)|(char4&0x3F))-0x10000;out+=String.fromCharCode((codePoint>>10)+0xD800,(codePoint&0x3FF)+0xDC00);}} |
| return out;} |
| function getFullChatHistoryObject(){const chatHistory=[];const allElements=document.querySelectorAll(".chatbox-wrapper, .outputBox");Array.from(allElements).forEach(element=>{if(element.classList.contains('chatbox-wrapper')){const textarea=element.querySelector('textarea');if(textarea){const chatBoxText=textarea.value.trim();if(chatBoxText){chatHistory.push({"role":"user","content":chatBoxText});}}}else if(element.classList.contains('outputBox')){let outputBoxText=getTextFromDiv(element);let outputBoxJSON=getJSONFromDiv(element);chatHistory.push({"role":"assistant","content":outputBoxJSON?outputBoxText+'\u001C'+outputBoxJSON:outputBoxText});}});return chatHistory;} |
| function getChatHistoryObject(){const chatHistory=getFullChatHistoryObject();chatHistory.splice(0,chatHistory.length-30);return chatHistory;} |
| function textAreaFocusHandler(event){let chatboxWrapper=event.target.closest('.chatbox-wrapper');if(!chatboxWrapper){console.error("textAreaFocusHandler: Could not find '.chatbox-wrapper' for target:",event.target);return;} |
| if(!chatboxWrapper.id){console.error("textAreaFocusHandler: chatboxWrapper is missing an ID:",chatboxWrapper);return;} |
| if(!chatboxWrapper.dataset.edited){chatboxWrapper.dataset.edited=true;const firstChild=chatboxWrapper.firstElementChild;const valueToStore=firstChild&&typeof firstChild.value==='string'?firstChild.value:'';chatBoxUneditedText[chatboxWrapper.id]=valueToStore;const saveButton=chatboxWrapper.querySelector('.chatEditSubmitButton');if(saveButton){const textarea=chatboxWrapper.querySelector('.chatbox');if(textarea){const currentText=typeof textarea.value==='string'?textarea.value.trim():'';const originalStoredValue=chatBoxUneditedText[chatboxWrapper.id];const originalText=typeof originalStoredValue==='string'?originalStoredValue.trim():'';saveButton.disabled=!currentText||currentText===originalText;}else{console.error("textAreaFocusHandler: Could not find '.chatbox' textarea inside wrapper:",chatboxWrapper);}}}} |
| function textAreaBlurHandler(event){let chatboxWrapper=event.target.closest('.chatbox-wrapper') |
| if(event.relatedTarget&&event.relatedTarget.classList.contains("chatEditSubmitButton")){return null} |
| if(chatBoxUneditedText[chatboxWrapper.id]===chatboxWrapper.firstElementChild.value){delete chatboxWrapper.dataset.edited}} |
| function toast(toastElementId,message,toastInterval=3000){const toastElement=document.getElementById(toastElementId);if(toastElement){const messageElement=toastElement.querySelector('.message');if(messageElement){const defaultMessage=messageElement.textContent;if(message){messageElement.textContent=message;} |
| toastElement.classList.add("show");setTimeout(()=>{toastElement.classList.remove("show");messageElement.textContent=defaultMessage;},toastInterval);}else{console.warn(`Message element not found in ${toastElementId}.`);}}else{console.warn(`Element with ID ${toastElementId} not found.`);}} |
| var abortController=null;function drawResults(webSearchResults){let resultsCount=webSearchResults.length |
| if(!resultsCount)return null |
| let temp=document.createElement('template') |
| temp.innerHTML+=` |
| <button class='expandButton collapsed' type='button' onclick='this.classList.toggle("expanded"); this.classList.toggle("collapsed"); this.parentNode.classList.toggle("expanded")'> |
| <span class='hideSummaryText'>Hide Results</span> |
| <span class='showSummaryText'>Expand ${resultsCount > maxChips ? (resultsCount - maxChips) + ' more ' : ''}Results</span> |
| </button> |
| <div class='chipsBox'></div> |
| <div class='resultsContainer' data-results-count='${webSearchResults.length}'></div>` |
| let chipsBox=temp.content.querySelector('.chipsBox') |
| let resultsContainer=temp.content.querySelector('.resultsContainer') |
| webSearchResults.forEach(({description,title,url,aiSnippets},index)=>{let favicon=`<img src='https://www.google.com/s2/favicons?sz=64&domain=${new URL(url).hostname}' style='width: 27px; height: 27px; margin-right: 5px; float: left; border-radius: 50%;' alt='favicon'>`;let resultDiv=document.createElement('template');resultDiv.innerHTML+=` |
| <div class='resultDiv' data-ai-snippets="${aiSnippets}" data-index="${index}"> |
| <div> |
| ${favicon} |
| <a class='url' href='${url}' target='_blank'> |
| <strong class='title'>${title}</strong> |
| </a> |
| </div> |
| </div>` |
| resultsContainer.append(resultDiv.content) |
| if(index<maxChips){chipsBox.innerHTML+=` |
| <a class='url-chip' href='${url}' target='_blank' style="display: inline-block; text-decoration: none; color: inherit;"> |
| <div style="display: flex; align-items: flex-start; gap: 8px;"> |
| ${favicon} |
| <div style="display: flex; flex-direction: column;"> |
| <span style="font-size: 13px; color: #aaa;"> |
| ${url.length > 30 ? url.substring(0, 30) + '...' : url} |
| </span> |
| <span style="font-size: 14px; font-weight: 500;"> |
| ${title.length > 30 ? title.substring(0, 30) + '...' : title} |
| </span> |
| </div> |
| </div> |
| </a>`}}) |
| return temp.content} |
| function copyCodeSnippetToClipboard(event){navigator.clipboard.writeText(event.target.parentNode.querySelector('code').textContent) |
| toast("copypopup");} |
| async function livecodesButtonClicked(event){const targetElement=event.target.tagName==='IMG'?event.target.parentElement:event.target;const code=targetElement.nextElementSibling.textContent;const languageMatch=targetElement.nextElementSibling.className.match(/language-(\w+)/);const language=languageMatch?languageMatch[1]:'javascript';try{if(!window.livecodes){await loadLiveCodesSDK();} |
| const config={title:'DeepAI Code Snippet',tools:{enabled:['console'],active:'console',status:'open'}};if(language==='html'){config.markup={language:'html',content:code};config.activeEditor='markup';}else if(language==='css'){config.style={language:'css',content:code};config.activeEditor='style';}else{config.script={language:language,content:code};config.activeEditor='script';} |
| const playgroundUrl=window.livecodes.getPlaygroundUrl({config,params:{console:'open'}});window.open(playgroundUrl,'_blank').focus();}catch(error){console.error('LiveCodes integration error:',error);}} |
| function loadLiveCodesSDK(){return new Promise((resolve,reject)=>{if(window.livecodes){resolve();return;} |
| const script=document.createElement('script');script.src='https://cdn.jsdelivr.net/npm/livecodes@0.10.0/livecodes.umd.js';script.onload=()=>window.livecodes?resolve():reject(new Error('LiveCodes SDK not found'));script.onerror=()=>reject(new Error('Failed to load LiveCodes SDK'));document.head.appendChild(script);});} |
| let projector;let isCurrentlyStreaming=false;let pendingMarkdownUpdate=false;function updateMarkDown(){isContentChanging=true;const convo=document.getElementById('convo');const librariesLoaded=typeof marked!=='undefined'&&typeof hljs!=='undefined'&&typeof maquette!=='undefined';if(!librariesLoaded){console.log("Error: 'marked', 'highlight.js', or 'maquette' library not loaded. Falling back to plain text.");const outputBoxes=convo.querySelectorAll(".outputBox");outputBoxes.forEach(box=>{const hiddenContainer=box.querySelector('.hiddenTextContainer');const markdownContainer=box.querySelector('.markdownContainer');if(hiddenContainer&&markdownContainer&&hiddenContainer.dataset.newContent){markdownContainer.textContent=hiddenContainer.textContent;delete hiddenContainer.dataset.newContent;}});pendingMarkdownUpdate=false;return;} |
| const{h,createProjector}=maquette;if(!projector){projector=createProjector();} |
| const mathExtension={name:'math',level:'inline',start(src){return src.match(/\\\[|\\\(/)?.index;},tokenizer(src){let displayMatch=src.match(/^\\\[([\s\S]+?)\\\]/);if(displayMatch){return{type:'math',raw:displayMatch[0],text:displayMatch[1].trim(),display:true};} |
| let inlineMatch=src.match(/^\\\(([\s\S]+?)\\\)/);if(inlineMatch){return{type:'math',raw:inlineMatch[0],text:inlineMatch[1].trim(),display:false};}},renderer(token){try{return katex.renderToString(token.text,{displayMode:token.display,throwOnError:false,trust:true});}catch(e){console.error('KaTeX rendering error:',e);return token.raw;}}};marked.use({extensions:[mathExtension]});const renderer=new marked.Renderer();renderer.code=function(code,language){const sanitizedLanguage=language?language.replace(/[^a-zA-Z0-9-]/g,''):'';return`<pre> |
| <button class="copyCodeButton" onclick="copyCodeSnippetToClipboard(event)">Copy</button> |
| <button onclick="livecodesButtonClicked(event)" class="livecodesButton">Run</button> |
| <code class="${sanitizedLanguage ? `language-${sanitizedLanguage}` : ''}">${hljs.highlightAuto(code).value}</code> |
| </pre>`;};renderer.html=function(html){return html.replace(/</g,'<').replace(/>/g,'>');};renderer.link=function(href,title,text){if(/^\[.*\]$/.test(text)){const linkText=text.slice(1,-1);return`<a href="${href}" title="${title}" target="_blank" style="color: #a9a9a9; font-size: 0.8em; vertical-align: super; padding: 0; margin-left: 0px; text-decoration: none;">${linkText}</a>`;}else{return`<a href="${href}" title="${title}" target="_blank">${text}</a>`;}};marked.setOptions({renderer,breaks:true,gfm:true});const outputBoxes=convo.querySelectorAll(".outputBox");let currentTextLength=0;outputBoxes.forEach(box=>{let hiddenContainer=box.querySelector('.hiddenTextContainer');if(!hiddenContainer||!hiddenContainer.dataset.newContent)return null;if(hiddenContainer.textContent){currentTextLength+=hiddenContainer.textContent.length;} |
| let markdownContainer=box.querySelector('.markdownContainer');if(!markdownContainer.dataset.projected){projector.append(markdownContainer,renderMarkdown);markdownContainer.dataset.projected=true;} |
| function htmlToVNode(element,key=0){if(element.nodeType===Node.TEXT_NODE){return element.textContent;} |
| else if(element.nodeType===Node.ELEMENT_NODE){const tagName=element.tagName.toLowerCase();const properties={key};Array.from(element.attributes).forEach(attr=>{properties[attr.name]=attr.value;});if(tagName==='input'||tagName==='textarea'){properties.value=element.value;} |
| let childNodes=Array.from(element.childNodes).map((child,idx)=>htmlToVNode(child,key+'-'+idx));return h(tagName,properties,childNodes);}} |
| function renderMarkdown(){const htmlContent=marked.parse(hiddenContainer.textContent);const tempDiv=document.createElement('div');tempDiv.innerHTML=htmlContent;let vnodes=Array.from(tempDiv.childNodes).map(htmlToVNode);return h('div',{class:'markdownContainer'},vnodes);} |
| if(hiddenContainer.dataset.newContent){delete hiddenContainer.dataset.newContent;projector.scheduleRender();}});pendingMarkdownUpdate=false;} |
| function addOpenAdsAdBox(){if(document.getElementById('openads-infeed-ad-above')){return false;} |
| const adBoxAbove=document.createElement("div");adBoxAbove.id='openads-infeed-ad-above';const adBoxBelow=document.createElement("div");adBoxBelow.id='openads-infeed-ad-below';const outputBoxes=convo.querySelectorAll('.outputBox');const lastOutputBox=outputBoxes[outputBoxes.length-1];lastOutputBox.parentNode.insertBefore(adBoxAbove,lastOutputBox);lastOutputBox.parentNode.insertBefore(adBoxBelow,lastOutputBox.nextSibling);return true;} |
| async function addOpenAdsAd(user_prompt){const added=addOpenAdsAdBox();if(added){window.stratos.queue.push(function(){window.stratos.getAds(user_prompt);});}else{console.log('OpenAds ad already added - skipping');}} |
| async function addMonetanoAd(user_prompt){const added=addMonetanoAdBox();const oldMessages=getFullChatHistoryObject();const messages=oldMessages.map((m,idx)=>{return{id:`message-${idx}-${Date.now()}`,createdAt:new Date().toISOString(),role:m.role,content:m.content};});if(messages.length&&messages[messages.length-1].role!=="assistant"){messages.push({id:`message-${messages.length}-${Date.now()}`,createdAt:new Date().toISOString(),role:"assistant",content:""});} |
| const userId=(getUserId()??"anonymousId")+"";window.monetano.que.push(()=>{console.log("Fetching ads from Monetano");window.monetano.getAds(messages,{userId,conversationId:currentChatUUID,},{onBids:(bids)=>{return bids;},onError:(error)=>{console.error("Ad error",JSON.stringify(error));},onWinner:(winner)=>{},onRender:()=>{},onView:()=>{},onClick:()=>{},},false);});} |
| function addMonetanoAdBox(){const adBoxBelow=document.createElement("div");adBoxBelow.classList.add('monetano-ad');adBoxBelow.style.display="block";const outputBoxes=convo.querySelectorAll('.outputBox');const lastOutputBox=outputBoxes[outputBoxes.length-1];let referenceNode=lastOutputBox;while(referenceNode.nextSibling&&referenceNode.nextSibling.nodeType===Node.ELEMENT_NODE&&referenceNode.nextSibling.classList.contains("humanize-box")){referenceNode=referenceNode.nextSibling;} |
| referenceNode.parentNode.insertBefore(adBoxBelow,referenceNode.nextSibling);return true;} |
| function adjustTextareaHeight(textarea){if(!textarea)return;textarea.style.height="1px";const computedHeight=textarea.scrollHeight;const computedStyle=window.getComputedStyle(textarea);const paddingHeight=parseInt(computedStyle.paddingTop,10)+ |
| parseInt(computedStyle.paddingBottom,10);const textHeight=computedHeight-paddingHeight;textarea.style.height=textHeight+"px";} |
| function optimizeChatPromptBox(chatboxWrapper){const textarea=chatboxWrapper.querySelector('textarea');if(!textarea)return;textarea.addEventListener('input',()=>adjustTextareaHeight(textarea));if(!currentlyLoadingChat){adjustTextareaHeight(textarea);}else{textarea.style.height="auto";setTimeout(()=>adjustTextareaHeight(textarea),0);setTimeout(()=>adjustTextareaHeight(textarea),100);}} |
| function generateUniqueAdId(){const adBoxes=document.querySelectorAll(".chat-ad-container");if(adBoxes.length!==0){const newId=parseInt(adBoxes[adBoxes.length-1].id.split("ad-box-")[1],10)+1;return`ad-box-${newId}`;}else{return'ad-box-0';}};function newAdSlot(container){const newAd=document.createElement("div");newAd.setAttribute('data-freestar-ad','__320x50 __970x90');newAd.setAttribute('align','center');newAd.setAttribute('style','overflow: hidden;');const adBoxId=generateUniqueAdId();newAd.setAttribute('id',adBoxId);newAd.classList.add("chat-ad-container");const comment=document.createComment('Tag ID: adBoxId');container.append(comment);container.append(newAd);freestar.queue.push(function(){console.log('Pushing new ad slot to freestar queue');freestar.newAdSlots({placementName:'deepai.org_chat_dynamic',slotId:adBoxId})});};async function chatSubmit(summaryMessage,searchMessage,contentsCheck,editedBox=null){try{removeThumbnail();}catch(e){console.log('error removing thumbnail',e);} |
| chatRunning=true;try{nudgeUserLogin();}catch(e){console.log('error nudging user to login',e);} |
| try{nudgeUserPro()}catch(e){console.log('error nudging user to pro',e);} |
| search_flag=false;let messageText='';const form_data=new FormData();if(summaryMessage){messageText=summaryMessage;form_data.append('online','online');form_data.append('summary','summary');}else if(searchMessage){messageText=searchMessage;form_data.append('online','online');form_data.append('search','search');search_flag=true;}else{const persistentChatbox=document.getElementById('persistentChatbox');messageText=persistentChatbox?persistentChatbox.value.trim():'';if(editedBox){const textarea=editedBox.querySelector('textarea');if(textarea){messageText=textarea.value.trim();}} |
| if(contentsCheck&&!messageText){console.log('No message to send');return;} |
| if(messageText&&!editedBox){const newBox=newChatBox(messageText);newBox.style.visibility='visible';newBox.style.display='block';newBox.style.opacity='1';const convo=document.getElementById('convo');convo.append(newBox);optimizeChatPromptBox(newBox);requestAnimationFrame(()=>{try{newBox.scrollIntoView({behavior:'smooth',block:'start'});}catch(error){console.error("Error scrolling new user message into view:",error);const convoContainer=document.getElementById('convo');if(convoContainer){convoContainer.scrollTop=convoContainer.scrollHeight;}}});} |
| if(persistentChatbox){persistentChatbox.value='';persistentChatbox.style.height='auto';persistentChatbox.dispatchEvent(new Event('input',{bubbles:true}));}} |
| try{saveChatHistory();}catch(e){console.log("Error saving chat history after user message processing",e);} |
| chatModifiedSinceLoad=true;const convo=document.getElementById('convo');const thinkingIndicator=showThinkingIndicator();const chatHistory=getChatHistoryObject();form_data.append('chat_style',chat_style);form_data.append('chatHistory',JSON.stringify(chatHistory));const selectedMode=localStorage.getItem("selectedChatMode")||"standard";form_data.append('model',selectedMode);form_data.append('hacker_is_stinky','very_stinky');const tryitApiKey=generateTryitApiKey();const chatSubmitElem=document.getElementById("chatSubmitButton");const chatStopElem=document.getElementById("chatStopButton");if(document.getElementById("chatEditSubmitButton")!==null){document.getElementById("chatEditSubmitButton").disabled=true;document.getElementById("chatEditSubmitButton").style="background: white; color: #101010;";} |
| let reader,response;if(fileData!=null){form_data.append('file',fileData);} |
| try{abortController=new AbortController();const abortSignal=abortController.signal;chatStopElem.style="display: block;";chatSubmitElem.style="display: none;";response=await fetch(app_base_url+"/hacking_is_a_serious_crime",{credentials:'include',method:'POST',body:form_data,signal:abortSignal,headers:{'api-key':tryitApiKey}});reader=response.body.getReader();}catch(e){console.log("Caught error in chat fetch",e);chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;removeThinkingIndicator();if(e.name!=='AbortError'){toast("errorpopup");} |
| return;} |
| if(response.status>299){if(document.getElementById("chatEditSubmitButton")!==null){document.getElementById("chatEditSubmitButton").disabled=false;document.getElementById("chatEditSubmitButton").style="background: #8F37FF; color: white;";} |
| chatSubmitElem.style="display: block;";chatStopElem.style="display: none;";removeThinkingIndicator();const{value,done}=await reader.read();const decoder=new TextDecoder("utf-8");const json=JSON.parse(decoder.decode(value));if(json.status==="anonymous try it exceeded"){openSignup();chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="signed in try-it quota exceeded"){openSubscription();chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="model only available to paid users"){openSubscription();chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="pro user out of credits"){openOutOfCredits(json.credits_remaining);chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="file size exceeds limit"){toast("errorpopup","File size exceeds limit!");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="bad model for file upload"){toast("errorpopup","File upload could not be used at this time. Please try again later.");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="online can't be used for file upload"){toast("errorpopup","File upload can't be used with online mode.");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="bad file type"){toast("errorpopup","Something went wrong with uploading the file. Please try another.");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| if(json.status==="file too many tokens"){toast("errorpopup","The document you uploaded was too long. Please try a shorter one.");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;} |
| toast("errorpopup");chatStopElem.style="display: none;";chatSubmitElem.style="display: block;";chatRunning=false;return;throw new Error("Unknown error");} |
| let outputBox=newOutputBox() |
| removeThinkingIndicator();convo.append(outputBox) |
| let hiddenTextContainer=outputBox.querySelector('.hiddenTextContainer') |
| var uint8ArraySoFar=new Uint8Array(0);var responseSoFar="";var responseText="";var responseJSON=null;var outputBuffer="";isCurrentlyStreaming=true;try{while(true){const{value,done}=await reader.read();if(done){const tempStyle=document.getElementById('temp-chatbox-style');if(tempStyle)tempStyle.remove();updateMarkDown();break;} |
| uint8ArraySoFar=concatUint8Array(uint8ArraySoFar,value);responseSoFar=Utf8ArrayToStr(uint8ArraySoFar);if(responseSoFar.includes("OpenAI")||responseSoFar.includes("Anthropic")){responseSoFar=responseSoFar.replaceAll("OpenAI","DeepAI").replaceAll("Anthropic","DeepAI");} |
| if(responseSoFar.includes('\u001C')){[responseText,responseJSON]=responseSoFar.split('\u001C');}else{responseText=responseSoFar;} |
| let textToInsert=responseText.substring(outputBuffer.length,responseText.length);const wordsAndSpaces=textToInsert.split(/(\s+)/);for(var i=0;i<wordsAndSpaces.length;i++){var wordOrSpace=wordsAndSpaces[i];outputBuffer+=wordOrSpace;const textAsHtml=document.createTextNode(wordOrSpace);hiddenTextContainer.appendChild(textAsHtml);hiddenTextContainer.dataset.newContent=true;const contentGrowthThreshold=100;if(!pendingMarkdownUpdate){pendingMarkdownUpdate=true;setTimeout(()=>{updateMarkDown();},10);}}} |
| console.log('Response fully received, has JSON?',Boolean(responseJSON));if(responseJSON){try{outputBox.append(drawResults(JSON.parse(responseJSON)));outputBox.dataset.hasResults=true;}catch(e){console.error('something went wrong creating or appending the resultsContainer from a JSON message',e,responseJSON)}}}catch(e){if(e.name!=='AbortError'){console.log("Error in reading chat response",e);toast("errorpopup");}}finally{try{saveChatHistory();}catch(e){console.log("Error saving chat history after response was received",e);} |
| isCurrentlyStreaming=false;} |
| if(!user_paid_for_no_ads){try{if(contextualAdProvider==='openads'){const ads_user_prompt=chatHistory.slice(-1)[0].content;addOpenAdsAd(ads_user_prompt);}else if(contextualAdProvider==='monetano'){addMonetanoAd();}}catch(e){console.log('error adding contextual ad',e);}} |
| if(document.getElementById("chatEditSubmitButton")!==null){document.getElementById("chatEditSubmitButton").disabled=false;document.getElementById("chatEditSubmitButton").style="background: #8F37FF; color: white;";} |
| chatSubmitElem.style="display: block;";chatStopElem.style="display: none;";chatRunning=false;if(sessionStorage.getItem("clearImageUponChatCompletion")==="true")fileData=null;sessionStorage.setItem("clearImageUponChatCompletion","true");if(document.querySelectorAll('.chatbox-wrapper').length===1){setTimeout(()=>displayMyChatSessions(),2000);} |
| const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox){persistentChatbox.focus();}} |
| function chatStop(){fileData=null;if(abortController){abortController.abort();} |
| try{saveChatHistory();}catch(e){console.log("Error saving chat history when stopping response generation",e);}} |
| try{const chatbox_text=sessionStorage.getItem("homepage_chatbox_text");if(chatbox_text){sessionStorage.removeItem("homepage_chatbox_text");const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox){persistentChatbox.value=chatbox_text;persistentChatbox.dispatchEvent(new Event('input',{bubbles:true}));persistentChatbox.focus();setTimeout(()=>{chatSubmit('','',true);},100);}}}catch(e){console.log("Error handling homepage chat text from sessionStorage:",e);} |
| async function summarizeSubmit(text){try{toast('summarypopup');const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox){persistentChatbox.textContent='';persistentChatbox.dispatchEvent(new Event('input',{bubbles:true}));} |
| const convo=document.getElementById('convo');if(convo){convo.scrollTop=convo.scrollHeight;} |
| await chatSubmit(text);if(persistentChatbox){persistentChatbox.focus();}}catch(e){console.log("Error in summarization:",e);toast("errorpopup","Error summarizing text");}} |
| function chatReSubmit(editedElement){let editedBox=editedElement;if(!editedBox){editedBox=document.querySelector('.chatbox-wrapper[data-edited="true"]');} |
| if(!editedBox){console.warn("No edited box found for resubmit");return;} |
| delete editedBox.dataset.edited;let nextElement=editedBox.nextElementSibling;while(nextElement){const elementToRemove=nextElement;nextElement=nextElement.nextElementSibling;elementToRemove.remove();} |
| chatSubmit('','',true,editedBox);} |
| function getTextFromDiv(div){let text='';const hiddenContainer=div.querySelector('.hiddenTextContainer');if(hiddenContainer){Array.from(hiddenContainer.childNodes).forEach(child=>{if(child.nodeType===Node.TEXT_NODE){text+=child.textContent;}});}else{Array.from(div.childNodes).forEach(child=>{if(child.nodeType===Node.TEXT_NODE){text+=child.textContent;}});} |
| return text;} |
| function getJSONFromDiv(div){const searchResults=div.querySelectorAll('.resultsContainer .resultDiv') |
| if(searchResults.length>0){return JSON.stringify(Array.from(searchResults).slice(0,maxChips).map(resultDiv=>({aiSnippets:resultDiv.dataset.aiSnippets,title:resultDiv.querySelector('.title').textContent,url:resultDiv.querySelector('.url').getAttribute('href')})))}else{return""}} |
| function uuidv4(){var s=[];var hexDigits="0123456789abcdef";for(var i=0;i<36;i++){s[i]=hexDigits.substr(Math.floor(Math.random()*0x10),1);} |
| s[14]="4";s[19]=hexDigits.substr((s[19]&0x3)|0x8,1);s[8]=s[13]=s[18]=s[23]="-";return s.join("");} |
| function isUploadNeeded(){var online=localStorage.getItem("selectedChatMode")==="online";return true?(!online&&!characterEnabled):false;} |
| function switchUpload(){if(!isUploadNeeded()&&isUploadButtonAlreadyAppended()){removeUpload();}else if(isUploadNeeded()&&!isUploadButtonAlreadyAppended()){appendUpload();}} |
| function appendUpload(){const container=document.querySelector('.button-container');const uploadButton=newUploadButton();const chatSubmitButton=document.getElementById('chatSubmitButton');container.insertBefore(uploadButton,chatSubmitButton);} |
| function removeUpload(){document.querySelector('.button-container').querySelector('.uploadButton').remove();} |
| function appendUploadIfNeeded(){if(isUploadNeeded())appendUpload();} |
| function isUploadButtonAlreadyAppended(){return document.querySelector('.button-container .uploadButton')==null?false:true;} |
| var currentChatUUID=uuidv4();var fileData=null;sessionStorage.setItem("clearImageUponChatCompletion","true");var chatRunning=false;const fileToImageSrc=(file)=>{return new Promise((resolve,reject)=>{const reader=new FileReader();reader.onload=function(e){resolve(e.target.result);};reader.onerror=reject;reader.readAsDataURL(file);});};async function saveChatHistory(){const chatHistory=getFullChatHistoryObject();if(!chatHistory||chatHistory.length===0){console.log("No messages to save, skipping saveChatHistory");return;} |
| if(currentlyLoadingChat&&!chatModifiedSinceLoad){console.log("Chat loaded but not modified, skipping saveChatHistory");return;} |
| document.querySelectorAll('.chatbox-wrapper.empty-box').forEach(wrapper=>{wrapper.style.visibility='visible';wrapper.style.opacity='0';});const uuid=currentChatUUID;const title="";const form=new FormData();form.append("uuid",uuid);form.append("title",title);form.append("chat_style",chat_style);form.append("messages",JSON.stringify(chatHistory));const response=await fetch(app_base_url+"/save_chat_session",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("saveChatHistory response",data);try{saveSessionUUIDToLocalStorage(currentChatUUID);}catch(e){console.log("error saving session uuid to localStorage",e);}} |
| async function getChatHistory(uuidToFetch){const response=await fetch(app_base_url+"/get_chat_session?uuid="+uuidToFetch,{credentials:'include',method:"GET"});const data=await response.json();console.log("getChatHistory response",data);return data;} |
| async function deleteAllChatHistory(){let existingUUIDs=getChatSessionUUIDsFromLocalStorage();const form=new FormData();form.append("my_known_uuids",JSON.stringify(existingUUIDs));const response=await fetch(app_base_url+"/delete_all_chat_history",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("deleteAllChatHistory response",data);window.location.reload();} |
| async function deleteChatHistoryEntry(uuidToDelete){const form=new FormData();form.append("uuid",uuidToDelete);const response=await fetch(app_base_url+"/delete_chat_session",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("deleteChatHistoryEntry response",data);if(uuidToDelete===currentChatUUID){window.location.reload();}else{const item=document.querySelector(`.chat-history-item-wrapper[data-session-id="${uuidToDelete}"]`);if(item){item.remove();}}} |
| async function reportCharacter(){const reason=prompt("Please provide a reason for reporting this character:");if(!reason){alert("You must provide a reason to report the character.");return;} |
| const form=new FormData();form.append("reason",reason);if(characterEnabled){form.append("character_url",chat_style);} |
| form.append("chat_history",JSON.stringify(getFullChatHistoryObject()));try{const response=await fetch(app_base_url+"/report_character",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("reportCharacter response",data);if(data.status==="Success"){alert("Thank you for cooperation. Character has been reported.");}else{alert("Error reporting character. Please try again.");}}catch(error){console.error("Error reporting character:",error);alert("An error occurred while reporting the character. Please try again.");}} |
| async function renameChatHistoryEntry(uuid,title){const form=new FormData();form.append("uuid",uuid);form.append("title",title);const response=await fetch(app_base_url+"/rename_chat_session",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("renameChatHistoryEntry response",data);} |
| function clearChat(){const elementsToRemove=document.querySelectorAll(".chatbox-wrapper, .outputBox, .chat-ad-container, "+"#openads-infeed-ad-above, #openads-infeed-ad-below, "+".monetano-ad, .humanize-box");elementsToRemove.forEach(element=>element.remove());chatBoxUneditedText={};} |
| function displayChatHistory(chatHistory){const convo=document.getElementById('convo');const originalScrollBehavior=getComputedStyle(convo).scrollBehavior;convo.style.setProperty('scroll-behavior','auto','important');convo.classList.add('no-scroll-animation');currentlyLoadingChat=true;chatModifiedSinceLoad=false;isContentChanging=true;document.querySelectorAll('.header-slide-element').forEach(el=>el.classList.remove('header-slide-hidden'));convo.classList.remove('reduced-gradient');convo.style.opacity="0";clearChat();for(const message of chatHistory.messages){if(message.role==="user"){if(message.content.trim()!==""){const newBox=newChatBox(message.content);newBox.style.visibility='visible';newBox.style.display='block';newBox.style.opacity='1';convo.appendChild(newBox);optimizeChatPromptBox(newBox);}}else if(message.role==="assistant"){const outputBox=newOutputBox(message.content.replace(/</g,'<').replace(/>/g,'>'));convo.appendChild(outputBox);}else{console.log("unknown message role",message.role);}} |
| const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox){persistentChatbox.value='';persistentChatbox.style.height='auto';persistentChatbox.dispatchEvent(new Event('input',{bubbles:true}));} |
| updateMarkDown();setTimeout(()=>{document.querySelectorAll('.chatbox-wrapper, .outputBox').forEach(box=>{box.style.visibility='visible';box.style.display='block';box.style.opacity='1';});convo.style.opacity="1";if(persistentChatbox){persistentChatbox.focus();} |
| convo.style.scrollBehavior=originalScrollBehavior;convo.classList.remove('no-scroll-animation');isContentChanging=false;setTimeout(()=>{currentlyLoadingChat=false;document.querySelectorAll('.chatbox-wrapper, .outputBox').forEach(box=>{box.style.visibility='visible';box.style.display='block';box.style.opacity='1';});},300);},150);} |
| function saveSessionUUIDToLocalStorage(uuidToAdd){let existingUUIDs=localStorage.getItem("chatSessionUUIDs");if(existingUUIDs===null){existingUUIDs=[];}else{try{existingUUIDs=JSON.parse(existingUUIDs);}catch(e){console.log("error parsing existingUUIDs",e);existingUUIDs=[];}} |
| existingUUIDs.push(uuidToAdd);existingUUIDs=[...new Set(existingUUIDs)];localStorage.setItem("chatSessionUUIDs",JSON.stringify(existingUUIDs));} |
| function getChatSessionUUIDsFromLocalStorage(){let existingUUIDs=localStorage.getItem("chatSessionUUIDs");if(existingUUIDs===null){existingUUIDs=[];}else{try{existingUUIDs=JSON.parse(existingUUIDs);}catch(e){console.log("error parsing existingUUIDs",e);existingUUIDs=[];}} |
| return existingUUIDs;} |
| async function getMyChatSessionsAndConvertAnonymousSessions(){let existingUUIDs=getChatSessionUUIDsFromLocalStorage();const form=new FormData();form.append("my_known_uuids",JSON.stringify(existingUUIDs));const response=await fetch(app_base_url+"/get_my_chat_sessions_and_convert_anonymous_sessions",{credentials:'include',method:"POST",body:form});const data=await response.json();console.log("getMyChatSessionsAndConvertAnonymousSessions response",data);try{if(data.session_uuids_to_forget&&Array.isArray(data.session_uuids_to_forget)){let updatedUUIDs=existingUUIDs.filter(uuid=>!data.session_uuids_to_forget.includes(uuid));localStorage.setItem("chatSessionUUIDs",JSON.stringify(updatedUUIDs));let numRemoved=existingUUIDs.length-updatedUUIDs.length;console.log(`Removed ${numRemoved} session_uuids_to_forget from localStorage`);}}catch(e){console.log('error removing session_uuids_to_forget from localStorage',e);} |
| return data;} |
| let confirmModalRoot,confirmTitleEl,confirmDescEl,confirmInputEl;let confirmYesBtn,confirmCancelBtn,confirmActionCallback=null,requiredConfirmText=null;function openConfirmModal({title,desc,requireText,confirmLabel,onConfirm}){if(!confirmModalRoot)return;confirmActionCallback=onConfirm;requiredConfirmText=requireText||null;confirmTitleEl.textContent=title;confirmDescEl.innerHTML=desc;confirmInputEl.value="";confirmInputEl.style.display=requireText?"block":"none";confirmYesBtn.textContent=confirmLabel||"Delete";confirmYesBtn.disabled=!!requireText;confirmModalRoot.classList.add('visible');} |
| function closeConfirmModal(){confirmModalRoot.classList.remove('visible');confirmActionCallback=null;requiredConfirmText=null;confirmYesBtn.disabled=false;} |
| function setupGlobalContextMenu(){if(window.__globalContextMenu)return;sidebarContent=document.querySelector('.sidebar-content');const menu=document.createElement('div');menu.classList.add('chat-history-context-menu');menu.style.display='none';menu.innerHTML=` |
| <button class="history-rename-btn">Rename</button> |
| <button class="history-delete-btn">Delete</button> |
| `;document.body.appendChild(menu);window.__globalContextMenu=menu;menu.querySelector('.history-rename-btn').addEventListener('click',()=>{const activeItem=document.querySelector('.chat-history-item.menu-open');if(activeItem)startInlineRename(activeItem);closeGlobalContextMenu();});menu.querySelector('.history-delete-btn').addEventListener('click',()=>{const activeItem=document.querySelector('.chat-history-item.menu-open');if(activeItem)confirmDeleteSingle(activeItem.closest('.chat-history-item-wrapper').dataset.sessionId);closeGlobalContextMenu();});document.addEventListener('click',(evt)=>{if(menu.style.display==='block'&&!menu.contains(evt.target))closeGlobalContextMenu();});} |
| function openGlobalContextMenu(rect){const menu=window.__globalContextMenu;if(!menu)return;menu.style.position='fixed';menu.style.top=rect.top+'px';menu.style.left=rect.left+'px';menu.style.zIndex=6;menu.style.display='block';if(sidebarContent)sidebarContent.classList.add('no-scroll');} |
| function closeGlobalContextMenu(){const menu=window.__globalContextMenu;if(!menu||menu.style.display==='none')return;menu.style.display='none';if(sidebarContent)sidebarContent.classList.remove('no-scroll');document.querySelectorAll('.chat-history-item.menu-open').forEach(it=>it.classList.remove('menu-open'));} |
| function startInlineRename(activeItemEl){activeItemEl.classList.add('rename-open');const labelSpan=activeItemEl.querySelector('.chat-history-label');if(!labelSpan)return;const originalText=labelSpan.textContent;const input=document.createElement('input');input.type='text';input.value=originalText;input.className='inline-rename-input';activeItemEl.replaceChild(input,labelSpan);input.focus();input.select();let renameDone=false;function keydownHandler(e){if(e.key==='Enter')finalize();else if(e.key==='Escape')revert();} |
| function blurHandler(){finalize();} |
| input.addEventListener('keydown',keydownHandler);input.addEventListener('blur',blurHandler);const revert=()=>{if(renameDone)return;renameDone=true;input.removeEventListener('keydown',keydownHandler);input.removeEventListener('blur',blurHandler);labelSpan.textContent=originalText;if(input.parentNode===activeItemEl){activeItemEl.replaceChild(labelSpan,input);} |
| activeItemEl.classList.remove('rename-open');};const finalize=async()=>{if(renameDone)return;renameDone=true;input.removeEventListener('keydown',keydownHandler);input.removeEventListener('blur',blurHandler);const newTitle=input.value.trim();if(!newTitle){revert();return;} |
| const sessionId=activeItemEl.closest('.chat-history-item-wrapper').dataset.sessionId;try{await renameChatHistoryEntry(sessionId,newTitle);labelSpan.textContent=newTitle;if(input.parentNode===activeItemEl){activeItemEl.replaceChild(labelSpan,input);}}catch{revert();return;} |
| activeItemEl.classList.remove('rename-open');};} |
| function confirmDeleteSingle(sessionId){openConfirmModal({title:"Delete Chat",desc:"Are you sure you want to delete this chat?<br/>This cannot be undone.",onConfirm:async()=>{await deleteChatHistoryEntry(sessionId);}});} |
| function confirmDeleteAll(){openConfirmModal({title:"Delete Chat History",desc:"This action <b>cannot</b> be undone. This will permanently delete all chat history. Please type <b>delete-all-chat-history</b> to confirm.",requireText:"delete-all-chat-history",confirmLabel:"Delete All",onConfirm:async()=>{await deleteAllChatHistory();}});} |
| async function displayMyChatSessions(){const data=await getMyChatSessionsAndConvertAnonymousSessions();let mySessions=data.sessions||[];mySessions.sort((a,b)=>new Date(b.updated_at)-new Date(a.updated_at));const groups={};mySessions.forEach(s=>{const date=new Date(s.updated_at||new Date());const label=categorizeSessionByDate(date);groups[label]=groups[label]||[];groups[label].push(s);});const historyList=document.getElementById('chatHistoryList');historyList.innerHTML='';for(const label of Object.keys(groups)){const heading=document.createElement('div');heading.classList.add('history-heading-label');heading.textContent=label;historyList.appendChild(heading);groups[label].forEach(session=>{const row=createChatHistoryItem(session);historyList.appendChild(row);});} |
| let found=Object.values(groups).some(arr=>arr.some(s=>s.uuid===currentChatUUID));if(!found&¤tChatUUID){const newRow=createChatHistoryItem({uuid:currentChatUUID,title:'New Chat'});newRow.classList.add('new-chat');let newChatLabel=[...historyList.querySelectorAll('.history-heading-label')].find(lbl=>lbl.textContent==='Today');if(!newChatLabel){newChatLabel=document.createElement('div');newChatLabel.classList.add('history-heading-label');newChatLabel.textContent='Today';historyList.insertBefore(newChatLabel,historyList.firstChild);} |
| historyList.insertBefore(newRow,newChatLabel.nextSibling);} |
| const firstLabel=historyList.querySelector('.history-heading-label');if(firstLabel){firstLabel.style.marginTop='0';} |
| updateCurrentChatHighlight();} |
| function createChatHistoryItem(session){const wrap=document.createElement('div');wrap.classList.add('chat-history-item-wrapper');wrap.dataset.sessionId=session.uuid;const item=document.createElement('div');item.classList.add('chat-history-item');const labelSpan=document.createElement('span');labelSpan.classList.add('chat-history-label');labelSpan.textContent=session.title||'Untitled Chat';item.appendChild(labelSpan);const dots=document.createElement('div');dots.classList.add('chat-history-dots');dots.textContent='⋮';item.appendChild(dots);wrap.appendChild(item);item.addEventListener('click',async()=>{if(session.uuid===currentChatUUID){return;} |
| if(session.chat_style&&session.chat_style!==chat_style){sessionStorage.setItem('redirect_chat_id',session.uuid);let redirectUrl;if(session.chat_style==="chat"){redirectUrl="/chat";}else{redirectUrl=`/chat/${session.chat_style}`;} |
| window.location.href=redirectUrl;return;} |
| currentChatUUID=session.uuid;clearChat();const chatData=await getChatHistory(session.uuid);displayChatHistory(chatData);updateMarkDown();updateCurrentChatHighlight();const historyList=document.getElementById('chatHistoryList');let todayLabel=[...historyList.querySelectorAll('.history-heading-label')].find(lbl=>lbl.textContent==='Today');if(todayLabel){const nextSibling=todayLabel.nextElementSibling;if(nextSibling&&nextSibling.classList.contains('history-heading-label')){todayLabel.remove();const firstLabel=historyList.querySelector('.history-heading-label');if(firstLabel){firstLabel.style.marginTop='0';}}}});dots.addEventListener('click',(e)=>{e.stopPropagation();closeGlobalContextMenu();item.classList.add('menu-open');openGlobalContextMenu(dots.getBoundingClientRect());});return wrap;} |
| function checkUrlForChatId(){const chatId=sessionStorage.getItem('redirect_chat_id');if(chatId){sessionStorage.removeItem('redirect_chat_id');setTimeout(async()=>{try{currentChatUUID=chatId;const chatData=await getChatHistory(chatId);currentlyLoadingChat=true;displayChatHistory(chatData);updateMarkDown();updateCurrentChatHighlight();document.body.classList.remove('loading-chat-history');}catch(error){console.error("Error loading redirected chat:",error);document.body.classList.remove('loading-chat-history');if(convo)convo.style.opacity="1";}},100);}} |
| function updateCurrentChatHighlight(){document.querySelectorAll('.chat-history-item-wrapper').forEach(w=>{const sid=w.dataset.sessionId,item=w.querySelector('.chat-history-item');if(w.classList.contains('new-chat')&&sid!==currentChatUUID)w.remove();sid===currentChatUUID?item.classList.add('current-chat'):item.classList.remove('current-chat','active');});} |
| function categorizeSessionByDate(dateObj){const now=new Date(),daysDiff=(now-dateObj)/(1000*60*60*24);if(daysDiff<1)return'Today';if(daysDiff<2)return'Yesterday';if(daysDiff<7)return'Previous 7 Days';if(daysDiff<30)return'Previous 30 Days';const m=["January","February","March","April","May","June","July","August","September","October","November","December"];return m[dateObj.getMonth()]+" "+dateObj.getFullYear();} |
| async function save_user_sees_ads_value(){var user_sees_ads=false;if(typeof fsprebid==='object'){user_sees_ads=true;} |
| console.log('user_sees_ads: ',user_sees_ads);const url=app_base_url+'/set_user_sees_ads';const form=new FormData();form.append('user_sees_ads',user_sees_ads+"");const apiResult=await fetch(url,{method:'POST',body:form,credentials:'include'});if(!apiResult.ok){throw apiResult}} |
| setTimeout(save_user_sees_ads_value,10000);let mediaRecorder;let recordedChunks=[];let isRecording=false;const micIconHTML='<img src="/static/images/mic.svg" alt="Mic Icon" class="mic-icon">';async function handleRecording(){if(!isRecording){await startRecording();}else{stopRecording();}} |
| async function startRecording(){recordedChunks=[];try{const stream=await navigator.mediaDevices.getUserMedia({audio:true});mediaRecorder=new MediaRecorder(stream);mediaRecorder.ondataavailable=(event)=>{if(event.data.size>0){recordedChunks.push(event.data);}};mediaRecorder.onstop=async()=>{await handleRecordingStop(stream);};mediaRecorder.start();updateButtonForRecording();isRecording=true;}catch(err){console.error('Mic access error or unsupported browser:',err);toast("errorpopup","Mic access error or unsupported browser.");}} |
| async function handleRecordingStop(stream){const blob=new Blob(recordedChunks,{type:mediaRecorder.mimeType||'audio/webm'});const recordButton=document.getElementById('recordButton');recordButton.classList.remove('recording');recordButton.classList.add('text');recordButton.innerHTML='Processing...';try{const form=new FormData();form.append('voiceRecording',blob,'myFunRecording.webm');const tryitApiKey=generateTryitApiKey();const response=await fetch(app_base_url+"/speech_to_text",{credentials:'include',method:"POST",body:form,headers:{'api-key':tryitApiKey,},});if(!response.ok){throw new Error('Server error: '+response.statusText);} |
| const result=await response.json();const persistentChatbox=document.getElementById('persistentChatbox');if(persistentChatbox&&result.text){const currentText=persistentChatbox.value;persistentChatbox.value=currentText+result.text;persistentChatbox.style.height='auto';persistentChatbox.style.height=(persistentChatbox.scrollHeight)+'px';persistentChatbox.dispatchEvent(new Event('input',{bubbles:true}));persistentChatbox.focus();}}catch(err){console.error('Upload error:',err);toast("errorpopup","An error occurred during upload or processing.");}finally{resetButtonAfterProcessing();stream.getTracks().forEach((track)=>track.stop());}} |
| function stopRecording(){const recordButton=document.getElementById('recordButton');if(mediaRecorder&&mediaRecorder.state!=='inactive'){mediaRecorder.stop();} |
| recordButton.classList.remove('recording','text');recordButton.innerHTML=micIconHTML;isRecording=false;} |
| function updateButtonForRecording(){const recordButton=document.getElementById('recordButton');recordButton.classList.add('recording','text');recordButton.innerHTML='';setTimeout(()=>{recordButton.innerHTML='<span class="fade-in">Stop Recording</span>';const fadeInElement=recordButton.querySelector('.fade-in');setTimeout(()=>{fadeInElement.classList.add('show');},10);},100);} |
| function resetButtonAfterProcessing(){const recordButton=document.getElementById('recordButton');setTimeout(()=>{recordButton.innerHTML=micIconHTML;recordButton.classList.remove('text');},300);} |
| function generateTryitApiKey(){let myrandomstr=Math.round((Math.random()*100000000000))+"";const myhashfunction=function(){for(var a=[],b=0;64>b;) |
| a[b]=0|4294967296*Math.sin(++b%Math.PI);return function(c){var d,e,f,g=[d=1732584193,e=4023233417,~d,~e],h=[],l=unescape(encodeURI(c))+"\u0080",k=l.length;c=--k/4+2|15;for(h[--c]=8*k;~k;) |
| h[k>>2]|=l.charCodeAt(k)<<8*k--;for(b=l=0;b<c;b+=16){for(k=g;64>l;k=[f=k[3],d+((f=k[0]+[d&e|~d&f,f&d|~f&e,d^e^f,e^(d|~f)][k=l>>4]+a[l]+~~h[b|[l,5*l+1,3*l+5,7*l][k]&15])<<(k=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*k+l++%4])|f>>>-k),d,e]) |
| d=k[1]|0,e=k[2];for(l=4;l;) |
| g[--l]+=k[l]} |
| for(c="";32>l;) |
| c+=(g[l>>3]>>4*(1^l++)&15).toString(16);return c.split("").reverse().join("")}}();const tryitApiKey='tryit-'+myrandomstr+'-'+myhashfunction(navigator.userAgent+myhashfunction(navigator.userAgent+myhashfunction(navigator.userAgent+myrandomstr+'hackers_become_a_little_stinkier_every_time_they_hack')));return tryitApiKey;} |
| function closeNudgeTrustpilotPopup(){document.getElementById("trustpilot-popup").classList.remove("active");} |
| function openNudgeTrustpilotPopup(){document.getElementById("trustpilot-popup").classList.add("active");document.getElementById("close-trustpilot-popup").addEventListener("click",function(){closeNudgeTrustpilotPopup();});} |
| (function(){const chatModes=[{value:"standard",label:"Standard",locked:false,description:"Default accuracy and speed."},{value:"online",label:"Online",locked:false,description:"Live web-browsing"},{value:"genius",label:"Genius",locked:true,description:"Advanced reasoning & better accuracy (Pro)."},{value:"supergenius",label:"Super Genius",locked:true,description:"Extra advanced logic & reasoning (Pro)."},];const userIsLoggedIn=window.userIsLoggedIn?.()||false;const userHasPro=window.user_object?.userprofile2?.user_can_use_genius_mode||false;const menu=document.getElementById("chatModeMenu");const triggerBtn=document.getElementById("chatModeDropdownButton");const currentLabel=document.getElementById("currentChatModeLabel");const checkIconSVG=` |
| <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| <circle cx="12" cy="12" r="12" fill="#8f37ff"></circle> |
| <path d="M7.5 12L10.5 15L16.5 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> |
| </svg> |
| `;const headerDiv=document.createElement("div");headerDiv.classList.add("chat-mode-menu-header");headerDiv.innerHTML=` |
| <span class="header-title">Chat Mode</span> |
| <a href="/docs#ai-chat" target="_blank" class="info-link"> |
| <svg |
| width="18" |
| height="18" |
| stroke-width="2" |
| stroke-linecap="round" |
| stroke-linejoin="round" |
| fill="none" |
| stroke="#9F9F9F" |
| viewBox="0 0 24 24"> |
| <circle cx="12" cy="12" r="9"/> |
| <path d="M12 8h.01"/> |
| <path d="M12 12v4"/> |
| </svg> |
| </a> |
| `;menu.appendChild(headerDiv);let savedMode="standard";try{const storedMode=localStorage.getItem("selectedChatMode");if(storedMode&&chatModes.some(mode=>mode.value===storedMode)){savedMode=storedMode;}}catch(error){console.error("Error accessing localStorage:",error);} |
| chatModes.forEach(mode=>{const shouldBeLocked=mode.locked&&(((mode.value==="genius"||mode.value==="supergenius")&&!userHasPro));const item=document.createElement("div");item.classList.add("chat-mode-menu-item");item.id=mode.value;if(shouldBeLocked){item.classList.add("chat-mode-locked");item.setAttribute("locked","true");} |
| const textContainer=document.createElement("div");textContainer.classList.add("text-container");textContainer.innerHTML=` |
| <strong>${mode.label}</strong> |
| <span class="chat-mode-description">${mode.description}</span> |
| `;const checkDiv=document.createElement("div");checkDiv.classList.add("chat-mode-checkmark");checkDiv.innerHTML=checkIconSVG;if(mode.value===savedMode){item.classList.add("selected");} |
| item.addEventListener("click",()=>{if(item.hasAttribute("locked")){openSubscription();closeChatModeMenu();return;} |
| try{localStorage.setItem("selectedChatMode",mode.value);}catch(error){console.error("Error saving to localStorage:",error);} |
| currentLabel.textContent=mode.label;savedMode=mode.value;try{switchUpload();}catch(error){console.error("Error switching upload:",error);} |
| menu.querySelectorAll(".chat-mode-menu-item").forEach(el=>el.classList.remove("selected"));item.classList.add("selected");closeChatModeMenu();});item.appendChild(textContainer);item.appendChild(checkDiv);menu.appendChild(item);});const announcementBanner=document.createElement('div');announcementBanner.id='permanent-announcement-banner';announcementBanner.className='permanent-announcement-banner menu-perm-ad';announcementBanner.innerHTML=` |
| <a href="javascript:void(0);" onclick="openSubscription();" class="pro-link-button"> |
| <div class="perm-banner-text"> |
| <span class="main-text">Upgrade to DeepAI Pro</span> |
| <span class="sub-text sub-perm-text">More access to the best models</span> |
| </div> |
| </a> |
| `;menu.appendChild(announcementBanner);const matched=chatModes.find(m=>m.value===savedMode);currentLabel.textContent=matched.label;function openChatModeMenu(){menu.style.display="block";triggerBtn.classList.add("open");setTimeout(()=>{document.addEventListener("click",outsideClickHandler);},0);} |
| function closeChatModeMenu(){menu.style.display="none";triggerBtn.classList.remove("open");document.removeEventListener("click",outsideClickHandler);} |
| function outsideClickHandler(e){if(!menu.contains(e.target)&&e.target!==triggerBtn){closeChatModeMenu();}} |
| function toggleChatModeMenu(){if(menu.style.display==="none"){openChatModeMenu();}else{closeChatModeMenu();}} |
| triggerBtn.addEventListener("click",(e)=>{e.stopPropagation();toggleChatModeMenu();});})();let chatModifiedSinceLoad=false;let currentlyLoadingChat=false;function initPersistentChatbox(){const persistentChatbox=document.getElementById('persistentChatbox');if(!persistentChatbox)return;persistentChatbox.addEventListener('input',function(){this.style.height='auto';this.style.height=(this.scrollHeight)+'px';});const dropdown=document.getElementById('chatModeDropdownButton');if(dropdown){dropdown.classList.toggle('compact',persistentChatbox.value.trim().length>0);persistentChatbox.addEventListener('input',function(){dropdown.classList.toggle('compact',this.value.trim().length>0);});} |
| persistentChatbox.style.height='auto';persistentChatbox.style.height=(persistentChatbox.scrollHeight)+'px';persistentChatbox.focus();} |
| function initEventDelegation(){const persistentChatbox=document.getElementById('persistentChatbox');const chatSubmitButton=document.getElementById('chatSubmitButton');if(persistentChatbox&&chatSubmitButton){chatSubmitButton.disabled=!persistentChatbox.value.trim();persistentChatbox.addEventListener('input',function(){chatSubmitButton.disabled=!this.value.trim();});persistentChatbox.addEventListener('keydown',function(e){if(e.key==='Enter'&&!e.shiftKey){const isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(isMobile){return;} |
| e.preventDefault();const chatSubmitElem=document.getElementById("chatSubmitButton");const chatStopElem=document.getElementById("chatStopButton");const isThinking=chatStopElem.style.display==="block"||chatSubmitElem.style.display==="none";if(!chatSubmitButton.disabled&&!isCurrentlyStreaming&&!isThinking){chatSubmit('','',true);}}});} |
| document.addEventListener('input',function(event){if(event.target.classList.contains('chatbox')&&event.target.closest('.chatbox-wrapper[data-edited]')){const wrapper=event.target.closest('.chatbox-wrapper');const saveButton=wrapper.querySelector('.chatEditSubmitButton');if(saveButton){const currentText=event.target.value.trim();const originalText=chatBoxUneditedText[wrapper.id]||'';saveButton.disabled=!currentText||currentText===originalText.trim();}}});} |
| window.addEventListener('resize',function(){document.querySelectorAll('.chatbox-wrapper textarea.chatbox').forEach(textarea=>{adjustTextareaHeight(textarea);});});const standardThinkingWords=["Thinking","Pondering","Considering","Processing","Reflecting","Analyzing","Contemplating","Calculating","Working","Reviewing"];const geniusThinkingWords=["Ratiocinating","Excogitating","Lucubrating","Cogitating","Noesizing","Cerebrating","Ideating","Intellecting","Discursing","Apperceiving"];function showThinkingIndicator(){const selectedMode=localStorage.getItem("selectedChatMode")||"standard";const wordList=selectedMode==="supergenius"?geniusThinkingWords:standardThinkingWords;const randomIndex=Math.floor(Math.random()*wordList.length);const thinkingWord=wordList[randomIndex];const thinkingIndicator=document.createElement('div');thinkingIndicator.className='thinking-indicator';thinkingIndicator.innerHTML=`<span class="thinking-text">${thinkingWord}</span><span class="thinking-dots"></span>`;convo.appendChild(thinkingIndicator);return thinkingIndicator;} |
| function removeThinkingIndicator(){const indicator=document.querySelector('.thinking-indicator');if(indicator){indicator.remove();}} |
| (()=>{const layoutContainer=document.getElementById("layoutContainer");const sidebarOverlay=document.getElementById("sidebarOverlay");const sidebarToggle=document.getElementById("sidebarToggle");const sidebarHeader=document.querySelector(".sidebar-header");function getSavedSidebarState(){if(window.innerWidth>=1200){try{const savedState=localStorage.getItem('sidebarState');return(savedState==='open'||savedState==='closed')?savedState:null;}catch(e){console.log('Error reading sidebar state',e);}} |
| return null;} |
| function saveSidebarState(isOpen){if(window.innerWidth>=1200){try{localStorage.setItem('sidebarState',isOpen?'open':'closed');}catch(e){console.log('Error saving sidebar state',e);}}} |
| function setSidebarState(open){if(layoutContainer){layoutContainer.classList.toggle('sidebar-open',open);} |
| if(sidebarOverlay&&window.innerWidth<1200){sidebarOverlay.classList.toggle('active',open);}} |
| function toggleSidebar(){const isOpen=layoutContainer?layoutContainer.classList.contains("sidebar-open"):false;const newState=!isOpen;saveSidebarState(newState);setSidebarState(newState);} |
| function initSidebar(){const savedState=getSavedSidebarState();if(savedState){setSidebarState(savedState==='open');}else{setSidebarState(window.innerWidth>=1200);}} |
| initSidebar();window.addEventListener("resize",function(){if(window.innerWidth<1200){setSidebarState(false);return;} |
| const savedState=getSavedSidebarState();if(savedState){setSidebarState(savedState==='open');}else{setSidebarState(true);}});if(sidebarToggle){sidebarToggle.addEventListener("click",toggleSidebar);} |
| if(sidebarHeader){sidebarHeader.addEventListener("click",toggleSidebar);} |
| if(sidebarOverlay){sidebarOverlay.addEventListener("click",()=>setSidebarState(false));} |
| confirmModalRoot=document.getElementById('confirm-modal-root');confirmTitleEl=document.getElementById('confirm-title');confirmDescEl=document.getElementById('confirm-desc');confirmInputEl=document.getElementById('confirm-input');confirmYesBtn=document.getElementById('confirm-yes-btn');confirmCancelBtn=document.getElementById('confirm-cancel-btn');if(confirmCancelBtn){confirmCancelBtn.addEventListener('click',closeConfirmModal);} |
| if(confirmYesBtn){confirmYesBtn.addEventListener('click',()=>{if(confirmActionCallback)confirmActionCallback();closeConfirmModal();});} |
| if(confirmInputEl){confirmInputEl.addEventListener('input',()=>{if(!requiredConfirmText)return;if(confirmYesBtn){confirmYesBtn.disabled=(confirmInputEl.value.trim()!==requiredConfirmText);}});} |
| if(confirmModalRoot){confirmModalRoot.addEventListener('click',(e)=>{if(e.target===confirmModalRoot){closeConfirmModal();}});} |
| window.addEventListener('keydown',(e)=>{if(e.key==='Escape'&&confirmModalRoot&&confirmModalRoot.classList.contains('visible')){closeConfirmModal();}});const deleteAllBtn=document.querySelector('.delete-all-history-button');if(deleteAllBtn){deleteAllBtn.addEventListener('click',confirmDeleteAll);} |
| setupGlobalContextMenu();displayMyChatSessions();let lastScrollTop=0;const mobileBreakpoint=1200;const scrollThreshold=10;function handleVisibility(){const currentScrollTop=window.pageYOffset||document.documentElement.scrollTop;const isMobile=window.innerWidth<mobileBreakpoint;if(isMobile){if(currentScrollTop>lastScrollTop&¤tScrollTop>scrollThreshold){document.body.classList.add('buttons-hidden');} |
| else if(currentScrollTop<lastScrollTop||currentScrollTop<=scrollThreshold){document.body.classList.remove('buttons-hidden');}}else{document.body.classList.remove('buttons-hidden');} |
| lastScrollTop=Math.max(0,currentScrollTop);} |
| window.addEventListener('scroll',handleVisibility,{passive:true});window.addEventListener('resize',handleVisibility);handleVisibility();setTimeout(()=>{if(layoutContainer){layoutContainer.classList.add('ready-for-animation');}},100);initPersistentChatbox();initEventDelegation();checkUrlForChatId();const recordButton=document.getElementById('recordButton');if(recordButton){recordButton.addEventListener('click',()=>{handleRecording();});}})();try{if(!user_paid_for_no_ads){document.querySelectorAll('.new-chat-button-container, .sidebar-toggle-container, .sidebar-overlay').forEach(e=>e.style.setProperty('top','178px','important'));document.querySelectorAll('.chat-sidebar').forEach(e=>e.style.setProperty('top','167px','important'));const convo=document.getElementById('convo');if(convo){convo.style.paddingBottom='158px';}}}catch(e){console.log('error adding margin to the bottom of the conversation when ads are showing',e);} |
| (function(){const TARGET_ELEMENT_ID='persistentChatbox';const CHECK_INTERVAL_MS=500;const MOVE_OFFSET_PX=-80;const movedElements=new Set();function checkAndMoveObstructingElements(){if(typeof user_paid_for_no_ads!=='undefined'&&user_paid_for_no_ads===true){return;} |
| const targetElement=document.getElementById(TARGET_ELEMENT_ID);if(!targetElement){return;} |
| const rect=targetElement.getBoundingClientRect();const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;if(centerX<0||centerY<0||centerX>window.innerWidth||centerY>window.innerHeight){return;} |
| const elementAtCenter=document.elementFromPoint(centerX,centerY);if(!elementAtCenter||elementAtCenter===document.documentElement||elementAtCenter===document.body){return;} |
| const isTargetOrDescendant=targetElement===elementAtCenter||targetElement.contains(elementAtCenter);if(!isTargetOrDescendant){let obstructingElement=elementAtCenter;let elementToMove=null;let currentElement=obstructingElement;while(currentElement&¤tElement.parentElement){if(currentElement.parentElement===document.body){elementToMove=currentElement;break;} |
| if(currentElement.parentElement===document.documentElement){break;} |
| currentElement=currentElement.parentElement;} |
| if(elementToMove&&!movedElements.has(elementToMove)){const isTargetItself=elementToMove===targetElement;const isTargetParent=elementToMove.contains(targetElement);const isTargetChild=targetElement.contains(elementToMove);if(isTargetItself||isTargetParent||isTargetChild){}else{elementToMove.style.transform=`translateY(${MOVE_OFFSET_PX}px)`;movedElements.add(elementToMove);}}else if(elementToMove&&movedElements.has(elementToMove)){}else{}}else{}} |
| console.log(`Starting obstruction check for #${TARGET_ELEMENT_ID} every ${CHECK_INTERVAL_MS}ms.`);const intervalId=setInterval(checkAndMoveObstructingElements,CHECK_INTERVAL_MS);})();;</script> |
|
|
| |
| </body> |
| </html> |
| |