301 Moved Permanently means that the requested resource has been permanently moved to a new URL. All future requests should use the new address.
The browser will automatically redirect the user to the new address, and search engines will update their indexes.
200 OK is a standard successful HTTP server response. It means that the client’s request (e.g., from a browser) was successfully processed, and the server is delivering the requested data.
The user receives content without errors, and the page or application functions properly. If Code 200 is accompanied by data, the browser or program processes and displays it to the user.
GET / HTTP/1.1 Host: halfc.com Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
<!Doctype HTML> <html lang="en" data-bs-theme="auto"> <head> <title>Search.com GPT Plus – Chat with AI, Write, Learn & Explore</title> <meta name="description" content="Search.com GPT Plus is your go-to AI assistant for writing, learning, brainstorming, and productivity. Get instant answers, generate content, and chat with smart AI – all for free. Try it now!"/> <meta name="keywords" content="SearchGPT, GPT chat, AI assistant, chat with GPT, chatgpt login, chat gpt website, openai, AI writing tool, free chat AI, search.com AI, GPT Plus, chat gbt, chatbot, search.com, search AI, ChatGPT alternative, chat with AI"/> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> <meta name="description" content=""> <meta name="author" content="admedia.com"> <meta name="generator" content="admedia.com"> <!-- Favicon --> <link rel="shortcut icon" href="assets/img/favicon.svg" type="image/x-icon"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://search.com/assets/img/favicon/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://search.com/assets/img/favicon/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://search.com/assets/img/favicon/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://search.com/assets/img/favicon/apple-touch-icon-57-precomposed.png"> <!-- Open Graph Meta Tags for social sharing --> <meta property="og:title" content="Search.com GPT Plus – Free AI Chat, Writing & Answers"/> <meta property="og:description" content="Chat with AI to write, learn, brainstorm, and be more productive. Try SearchGPT Plus from Search.com – it’s free and easy to use."/> <meta property="og:url" content="https://www.search.com/"/> <meta property="og:type" content="website"/> <meta property="og:image" content=""/> <!-- replace with your actual OG image --> <!-- Twitter Card for better display on Twitter --> <meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:title" content="Search.com GPT Plus – Chat with AI, Write, Learn & Explore"/> <meta name="twitter:description" content="A free, smart AI assistant from Search.com to help with writing, learning, productivity, and more."/> <meta name="twitter:image" content=""/> <!-- replace with your Twitter image --> <!----------------------CSS FILES--------------------> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css" /> <link rel="stylesheet preload" as="style" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.6.0/css/all.min.css" rel="stylesheet"/> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"> <link rel="stylesheet" href="https://search.com/assets/css/intlTelInput.min.css?v=1.02" /> <link href="https://search.com/assets/css/bootstrap.min.css?v=1.02" rel="stylesheet"> <link href="https://search.com/assets/css/style.css?v=1.06" rel="stylesheet"> <style> .main-section { padding-bottom: 0 } .scroll-down-btn { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 40px; /* Adjust size */ height: 40px; background-color: rgba(0, 0, 0, 0.7); color: white; border: none; border-radius: 50%; /* Makes it circular */ display: none; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Subtle shadow */ transition: background 0.3s ease-in-out, transform 0.2s ease-in-out; z-index: 10; } .like-button.active svg path { fill: green; } .dislike-button.active svg path { fill: red; } </style> <script> var MAIN_URL = "https://search.com/"; </script> <!-- Meta Pixel Base Code Start --> <script> (function(f,b,e,v,n,t,s){ if(f.fbq) return; n = f.fbq = function() { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s) })(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '680344444359627'); </script> <noscript> <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=680344444359627&ev=PageView&noscript=1" /> </noscript> <!-- Meta Pixel Base Code End --> <!-- Bing Pixel base code Start --> <script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"283023080", enableAutoSpaTracking: true};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");</script> <script>function uet_report_conversion(msclkid) {window.uetq = window.uetq || [];window.uetq.push('event', 'signup', {"event_label": "signup_conversion","event_category": "outbound_click", "msclkid": msclkid});}</script> <!-- Bing Pixel base code End --> <!-- Google tag (gtag.js) Start --> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-16990713410"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-16990713410'); </script> <script> function gtag_report_conversion(url, gclid) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-16990713410/9awACKqSqrYaEMLs5qU_', 'event_callback': callback, 'gclid': gclid } ); return false; } </script> <!-- Google tag (gtag.js) End --> <!-- FlexOffer Affiliate meta tag for site verification Start --> <meta name="fo-verify" content="500d2b16-5e43-4448-a786-baf68f00f332" /> <!-- FlexOffer Affiliate meta tag for site verification Start --> <meta name="google-site-verification" content="Yh1m8oNnTz5lVHWUQP1XHoWzO6cFVS3kXuLYkFfyIls" /> </head> <body> <div class="page-loading"> <div class="lds-dual-ring"></div> </div> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol viewBox="0 0 24 24" id="stop"> <rect x="7" y="7" width="10" height="10" rx="1.25" fill="currentColor"></rect> </symbol> <symbol viewBox="0 0 48 48" id="google"> <path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path> <path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path> <path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path> <path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path> <path fill="none" d="M0 0h48v48H0z"></path> </symbol> <symbol id="microsoft" viewBox="0 0 23 23"><path fill="#f3f3f3" d="M0 0h23v23H0z"/><path fill="#f35325" d="M1 1h10v10H1z"/><path fill="#81bc06" d="M12 1h10v10H12z"/><path fill="#05a6f0" d="M1 12h10v10H1z"/><path fill="#ffba08" d="M12 12h10v10H12z"/></symbol> <symbol id="apple" viewBox="0 0 32 32"><g transform="matrix(.036771 0 0 .036771 3 0)"><defs><path id="A" d="M0 0h708.7v870.3H0z"/><path id="B" d="M591.8 462.4c-1-110.1 90-163 94.1-165.6-51.2-74.9-130.8-85.1-159.2-86.3-67.7-6.9-132.2 39.9-166.6 39.9s-87.4-38.9-143.6-37.8c-73.9 1.1-142 42.9-180.1 109.1-76.7 133-19.6 330.3 55.2 438.4 36.6 52.8 80.1 112.3 137.4 110.1 55.2-2.2 76-35.7 142.6-35.7s85.4 35.7 143.6 34.6c59.3-1.2 96.9-54 133.2-107 41.9-61.3 59.2-120.7 60.2-123.8-1.3-.5-115.6-44.3-116.8-175.9"/></defs><clipPath id="C"><use xlink:href="#A"/></clipPath><g clip-path="url(#C)"><use xlink:href="#B"/></g><path d="M482.3 139c30.4-36.8 50.9-88 45.3-139-43.8 1.8-96.8 29.2-128.2 66-28.1 32.5-52.8 84.6-46.1 134.6 48.7 3.8 98.6-24.9 129-61.6"/></g><g clip-path="url(#C)" transform="matrix(.098524 0 0 .098524 89.579758 -18.770519)"><use xlink:href="#B"/></g><path d="M137.098-5.076c2.995-3.626 5.015-8.67 4.463-13.695-4.315.177-9.537 2.877-12.63 6.503-2.77 3.202-5.202 8.335-4.542 13.26 4.798.374 9.714-2.453 12.71-6.07"/><path d="M185.7 37.457l-4.966 15.045h-6.384l16.247-47.824h7.448l16.316 47.824h-6.6l-5.113-15.045zm15.685-4.828l-4.68-13.764c-1.064-3.123-1.773-5.96-2.483-8.73h-.138l-2.414 8.66L187 32.63z" enable-background="new "/><path d="M219.208 29.368c0-4.394-.138-7.95-.286-11.212h5.606l.286 5.892h.138c2.552-4.187 6.6-6.67 12.207-6.67 8.306 0 14.542 7.025 14.542 17.458 0 12.345-7.517 18.444-15.606 18.444-4.542 0-8.512-2-10.572-5.4h-.138v18.66h-6.177zm6.168 9.153c0 .926.138 1.773.286 2.552 1.133 4.325 4.897 7.3 9.37 7.3 6.6 0 10.434-5.4 10.434-13.27 0-6.887-3.616-12.77-10.217-12.77-4.256 0-8.227 3.054-9.44 7.734-.217.778-.424 1.704-.424 2.552v5.892zm32.778-9.153c0-4.394-.138-7.95-.286-11.212h5.606l.286 5.892h.138c2.552-4.187 6.6-6.67 12.207-6.67 8.306 0 14.542 7.025 14.542 17.458 0 12.345-7.517 18.444-15.606 18.444-4.542 0-8.512-2-10.572-5.4h-.138v18.66h-6.177zm6.177 9.153c0 .926.138 1.773.286 2.552 1.133 4.325 4.897 7.3 9.37 7.3 6.6 0 10.434-5.4 10.434-13.27 0-6.887-3.616-12.77-10.217-12.77-4.256 0-8.227 3.054-9.44 7.734-.217.778-.424 1.704-.424 2.552v5.892zM297.1 2.126h6.246V52.5H297.1zm18.8 34.336c.138 8.444 5.537 11.92 11.774 11.92 4.473 0 7.163-.778 9.508-1.773l1.064 4.473c-2.197.995-5.96 2.128-11.42 2.128-10.572 0-16.887-6.956-16.887-17.3s6.1-18.523 16.1-18.523c11.212 0 14.187 9.862 14.187 16.178 0 1.28-.138 2.266-.217 2.906zm18.306-4.473c.07-3.97-1.635-10.148-8.66-10.148-6.315 0-9.084 5.823-9.577 10.148z" enable-background="new "/></symbol> <symbol id="facebook" viewBox="0 0 24 24"><path fill="#1877F2" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"/></symbol> <symbol id="check2" viewBox="0 0 16 16"> <path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/> </symbol> <symbol id="circle-half" viewBox="0 0 16 16"> <path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"/> </symbol> <symbol id="moon-stars-fill" viewBox="0 0 16 16"> <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/> <path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"/> </symbol> <symbol id="sun-fill" viewBox="0 0 16 16"> <path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/> </symbol> <symbol id="stars" viewBox="0 0 24 24"> <path d="M15.11 14.285a.41.41 0 0 1 .78 0c.51 2.865.96 3.315 3.825 3.826.38.12.38.658 0 .778-2.865.511-3.315.961-3.826 3.826a.408.408 0 0 1-.778 0c-.511-2.865-.961-3.315-3.826-3.826a.408.408 0 0 1 0-.778c2.865-.511 3.315-.961 3.826-3.826Zm2.457-12.968a.454.454 0 0 1 .866 0C19 4.5 19.5 5 22.683 5.567a.454.454 0 0 1 0 .866C19.5 7 19 7.5 18.433 10.683a.454.454 0 0 1-.866 0C17 7.5 16.5 7 13.317 6.433a.454.454 0 0 1 0-.866C16.5 5 17 4.5 17.567 1.317Z" fill="currentColor" ></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.001 4a1 1 0 0 1 .993.887c.192 1.7.701 2.877 1.476 3.665.768.783 1.913 1.3 3.618 1.452a1 1 0 0 1-.002 1.992c-1.675.145-2.849.662-3.638 1.452-.79.79-1.307 1.963-1.452 3.638a1 1 0 0 1-1.992.003c-.152-1.706-.67-2.851-1.452-3.62-.788-.774-1.965-1.283-3.665-1.475a1 1 0 0 1-.002-1.987c1.73-.2 2.878-.709 3.646-1.476.767-.768 1.276-1.916 1.476-3.646A1 1 0 0 1 7 4Zm-2.472 6.998a6.11 6.11 0 0 1 2.468 2.412 6.232 6.232 0 0 1 1.037-1.376 6.232 6.232 0 0 1 1.376-1.036 6.114 6.114 0 0 1-2.412-2.469 6.163 6.163 0 0 1-1.053 1.416 6.163 6.163 0 0 1-1.416 1.053Z" fill="currentColor"></path></symbol> <symbol id="arrow-up" viewBox="0 0 32 32"> <path fill-rule="evenodd" clip-rule="evenodd" d="M15.1918 8.90615C15.6381 8.45983 16.3618 8.45983 16.8081 8.90615L21.9509 14.049C22.3972 14.4953 22.3972 15.2189 21.9509 15.6652C21.5046 16.1116 20.781 16.1116 20.3347 15.6652L17.1428 12.4734V22.2857C17.1428 22.9169 16.6311 23.4286 15.9999 23.4286C15.3688 23.4286 14.8571 22.9169 14.8571 22.2857V12.4734L11.6652 15.6652C11.2189 16.1116 10.4953 16.1116 10.049 15.6652C9.60265 15.2189 9.60265 14.4953 10.049 14.049L15.1918 8.90615Z" fill="currentColor"></path> </symbol> <symbol id="sidebar-collapse" viewBox="0 0 24 24"> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.85719 3L13.5 3C14.0523 3 14.5 3.44772 14.5 4C14.5 4.55229 14.0523 5 13.5 5H11.5V19H15.1C16.2366 19 17.0289 18.9992 17.6458 18.9488C18.2509 18.8994 18.5986 18.8072 18.862 18.673C19.4265 18.3854 19.8854 17.9265 20.173 17.362C20.3072 17.0986 20.3994 16.7509 20.4488 16.1458C20.4992 15.5289 20.5 14.7366 20.5 13.6V11.5C20.5 10.9477 20.9477 10.5 21.5 10.5C22.0523 10.5 22.5 10.9477 22.5 11.5V13.6428C22.5 14.7266 22.5 15.6008 22.4422 16.3086C22.3826 17.0375 22.2568 17.6777 21.955 18.27C21.4757 19.2108 20.7108 19.9757 19.77 20.455C19.1777 20.7568 18.5375 20.8826 17.8086 20.9422C17.1008 21 16.2266 21 15.1428 21H8.85717C7.77339 21 6.89925 21 6.19138 20.9422C5.46253 20.8826 4.82234 20.7568 4.23005 20.455C3.28924 19.9757 2.52433 19.2108 2.04497 18.27C1.74318 17.6777 1.61737 17.0375 1.55782 16.3086C1.49998 15.6007 1.49999 14.7266 1.5 13.6428V10.3572C1.49999 9.27341 1.49998 8.39926 1.55782 7.69138C1.61737 6.96253 1.74318 6.32234 2.04497 5.73005C2.52433 4.78924 3.28924 4.02433 4.23005 3.54497C4.82234 3.24318 5.46253 3.11737 6.19138 3.05782C6.89926 2.99998 7.77341 2.99999 8.85719 3ZM9.5 19V5H8.9C7.76339 5 6.97108 5.00078 6.35424 5.05118C5.74907 5.10062 5.40138 5.19279 5.13803 5.32698C4.57354 5.6146 4.1146 6.07354 3.82698 6.63803C3.69279 6.90138 3.60062 7.24907 3.55118 7.85424C3.50078 8.47108 3.5 9.26339 3.5 10.4V13.6C3.5 14.7366 3.50078 15.5289 3.55118 16.1458C3.60062 16.7509 3.69279 17.0986 3.82698 17.362C4.1146 17.9265 4.57354 18.3854 5.13803 18.673C5.40138 18.8072 5.74907 18.8994 6.35424 18.9488C6.97108 18.9992 7.76339 19 8.9 19H9.5ZM5 8.5C5 7.94772 5.44772 7.5 6 7.5H7C7.55229 7.5 8 7.94772 8 8.5C8 9.05229 7.55229 9.5 7 9.5H6C5.44772 9.5 5 9.05229 5 8.5ZM5 12C5 11.4477 5.44772 11 6 11H7C7.55229 11 8 11.4477 8 12C8 12.5523 7.55229 13 7 13H6C5.44772 13 5 12.5523 5 12Z" fill="currentColor"></path><circle cx="20" cy="5" r="4" fill="#0285FF"></circle> </symbol> <symbol id="find" viewBox="0 0 24 24"> <path fill-rule="evenodd" clip-rule="evenodd" d="M10.75 4.25C7.16015 4.25 4.25 7.16015 4.25 10.75C4.25 14.3399 7.16015 17.25 10.75 17.25C14.3399 17.25 17.25 14.3399 17.25 10.75C17.25 7.16015 14.3399 4.25 10.75 4.25ZM2.25 10.75C2.25 6.05558 6.05558 2.25 10.75 2.25C15.4444 2.25 19.25 6.05558 19.25 10.75C19.25 12.7369 18.5683 14.5645 17.426 16.0118L21.4571 20.0429C21.8476 20.4334 21.8476 21.0666 21.4571 21.4571C21.0666 21.8476 20.4334 21.8476 20.0429 21.4571L16.0118 17.426C14.5645 18.5683 12.7369 19.25 10.75 19.25C6.05558 19.25 2.25 15.4444 2.25 10.75Z" fill="currentColor"></path> </symbol> <symbol id="new-chat" viewBox="0 0 24 24"> <path d="M15.6729 3.91287C16.8918 2.69392 18.8682 2.69392 20.0871 3.91287C21.3061 5.13182 21.3061 7.10813 20.0871 8.32708L14.1499 14.2643C13.3849 15.0293 12.3925 15.5255 11.3215 15.6785L9.14142 15.9899C8.82983 16.0344 8.51546 15.9297 8.29289 15.7071C8.07033 15.4845 7.96554 15.1701 8.01005 14.8586L8.32149 12.6785C8.47449 11.6075 8.97072 10.615 9.7357 9.85006L15.6729 3.91287ZM18.6729 5.32708C18.235 4.88918 17.525 4.88918 17.0871 5.32708L11.1499 11.2643C10.6909 11.7233 10.3932 12.3187 10.3014 12.9613L10.1785 13.8215L11.0386 13.6986C11.6812 13.6068 12.2767 13.3091 12.7357 12.8501L18.6729 6.91287C19.1108 6.47497 19.1108 5.76499 18.6729 5.32708ZM11 3.99929C11.0004 4.55157 10.5531 4.99963 10.0008 5.00007C9.00227 5.00084 8.29769 5.00827 7.74651 5.06064C7.20685 5.11191 6.88488 5.20117 6.63803 5.32695C6.07354 5.61457 5.6146 6.07351 5.32698 6.63799C5.19279 6.90135 5.10062 7.24904 5.05118 7.8542C5.00078 8.47105 5 9.26336 5 10.4V13.6C5 14.7366 5.00078 15.5289 5.05118 16.1457C5.10062 16.7509 5.19279 17.0986 5.32698 17.3619C5.6146 17.9264 6.07354 18.3854 6.63803 18.673C6.90138 18.8072 7.24907 18.8993 7.85424 18.9488C8.47108 18.9992 9.26339 19 10.4 19H13.6C14.7366 19 15.5289 18.9992 16.1458 18.9488C16.7509 18.8993 17.0986 18.8072 17.362 18.673C17.9265 18.3854 18.3854 17.9264 18.673 17.3619C18.7988 17.1151 18.8881 16.7931 18.9393 16.2535C18.9917 15.7023 18.9991 14.9977 18.9999 13.9992C19.0003 13.4469 19.4484 12.9995 20.0007 13C20.553 13.0004 21.0003 13.4485 20.9999 14.0007C20.9991 14.9789 20.9932 15.7808 20.9304 16.4426C20.8664 17.116 20.7385 17.7136 20.455 18.2699C19.9757 19.2107 19.2108 19.9756 18.27 20.455C17.6777 20.7568 17.0375 20.8826 16.3086 20.9421C15.6008 21 14.7266 21 13.6428 21H10.3572C9.27339 21 8.39925 21 7.69138 20.9421C6.96253 20.8826 6.32234 20.7568 5.73005 20.455C4.78924 19.9756 4.02433 19.2107 3.54497 18.2699C3.24318 17.6776 3.11737 17.0374 3.05782 16.3086C2.99998 15.6007 2.99999 14.7266 3 13.6428V10.3572C2.99999 9.27337 2.99998 8.39922 3.05782 7.69134C3.11737 6.96249 3.24318 6.3223 3.54497 5.73001C4.02433 4.7892 4.78924 4.0243 5.73005 3.54493C6.28633 3.26149 6.88399 3.13358 7.55735 3.06961C8.21919 3.00673 9.02103 3.00083 9.99922 3.00007C10.5515 2.99964 10.9996 3.447 11 3.99929Z" fill="currentColor"></path> </symbol> </svg> <div class="d-flex justify-content-center"> <div class="modal fade" id="confirm-clear" tabindex="-1" role="dialog"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content rounded-4 p-2"> <div class="modal-header border-0 pb-0"> <h4 class="modal-title m-auto" id="myModalLabel">Clear current chat?</h4> </div> <div class="modal-body text-center px-3"> <p class="text-secondary"> To start a new chat, your current conversation will be discarded. <a class="fw-semibold text-black" href="https://search.com/auth/sign-up">Sign up</a> or <a class="fw-semibold text-black" href="https://search.com/auth/sign-in">Log in</a> to save chats. </p> </div> <div class="modal-footer border-0"> <button type="button" class="btn btn-lg btn-danger w-100 rounded-pill" id="btn-clear-chat">Clear chat</button> <button type="button" class="btn btn-lg btn-default w-100 rounded-pill border" data-bs-dismiss="modal">Cancel</button> </div> </div> </div> </div> <main class="flex-fill d-flex flex-column vh-100"> <header class="p-2 px-4 mb-3 border-bottom position-sticky top-0 z-1"> <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start"> <button class="btn p-0 d-md-block d-none" id="btn-open-confirm" type="button"><img src="https://search.com/assets/img/search-related-icons/edit.svg" class="icon-xl-heavy" alt=""/></button> <div class="dropdown"> <button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"> Search.com </button> <!-- <ul class="dropdown-menu"> <li class="dropdown-item gap-2 d-flex" href="#"> <button class="btn btn-outline-tertiary p-2" type="button"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-token-text-primary"><path d="M15.11 14.285a.41.41 0 0 1 .78 0c.51 2.865.96 3.315 3.825 3.826.38.12.38.658 0 .778-2.865.511-3.315.961-3.826 3.826a.408.408 0 0 1-.778 0c-.511-2.865-.961-3.315-3.826-3.826a.408.408 0 0 1 0-.778c2.865-.511 3.315-.961 3.826-3.826Zm2.457-12.968a.454.454 0 0 1 .866 0C19 4.5 19.5 5 22.683 5.567a.454.454 0 0 1 0 .866C19.5 7 19 7.5 18.433 10.683a.454.454 0 0 1-.866 0C17 7.5 16.5 7 13.317 6.433a.454.454 0 0 1 0-.866C16.5 5 17 4.5 17.567 1.317Z" fill="currentColor" ></path><path fill-rule="evenodd" clip-rule="evenodd" d="M7.001 4a1 1 0 0 1 .993.887c.192 1.7.701 2.877 1.476 3.665.768.783 1.913 1.3 3.618 1.452a1 1 0 0 1-.002 1.992c-1.675.145-2.849.662-3.638 1.452-.79.79-1.307 1.963-1.452 3.638a1 1 0 0 1-1.992.003c-.152-1.706-.67-2.851-1.452-3.62-.788-.774-1.965-1.283-3.665-1.475a1 1 0 0 1-.002-1.987c1.73-.2 2.878-.709 3.646-1.476.767-.768 1.276-1.916 1.476-3.646A1 1 0 0 1 7 4Zm-2.472 6.998a6.11 6.11 0 0 1 2.468 2.412 6.232 6.232 0 0 1 1.037-1.376 6.232 6.232 0 0 1 1.376-1.036 6.114 6.114 0 0 1-2.412-2.469 6.163 6.163 0 0 1-1.053 1.416 6.163 6.163 0 0 1-1.416 1.053Z" fill="currentColor"></path></svg> <span class="visually-hidden">P</span> </button> <div class="m-auto"> <h6 class="text-15">SearchGPT Plus</h6> <p class="fs-11 opacity-75 m-0">Our smartest model & more</p> </div> <div class="m-auto"> <a href="https://search.com/landing" target="_blank" class="btn btn-outline-secondary btn-sm rounded-pill">Upgrade</a> </div> </li> </ul> --> <ul class="dropdown-menu login-dropdown-menu border-0 rounded-4 z-9999 p-0"> <li> <div class="card p-0 border-0 rounded-4 shadow"> <img src="https://search.com/assets/img/colored-img.jpg" class="card-img-top colored-img rounded-top-4 " alt="..."> <div class="card-body rounded-bottom-4"> <h5 class="subHeading text-18 mb-2">Try advanced features for free</h5> <p class="fs-09 gray-600 fw-normal mb-3">Get Smarter responses, upload files, create images, and more by logging in.</p> <a href="https://search.com/auth/sign-in" class="button btn-first me-2">Log In</a> <a href="https://search.com/auth/sign-up" class="button btn-outline-first">Sign Up</a> </div> </div> </li> </ul> </div> <div class="m-auto"></div> <a class="btn btn-outline-secondary rounded-pill me-2" href="https://search.com/auth/sign-in">Log In</a> <a class="btn btn-secondary rounded-pill" href="https://search.com/auth/sign-up">Sign Up</a> </div> </header> <script src="https://search.com/assets/js/color-modes.js"></script> <section class="main-section d-flex flex-column"> <div class="text-option-buttons" style="display:none"> <span class="copy-button copy-code-text fw-semibold d-inline-block me-1 rounded-2" type="button"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z" fill="currentColor"></path></svg> Copy </span> <!-- <span class="copy-button copy-code-text fw-semibold d-inline-block me-1 rounded-2" type="button"> <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 384" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M207.9,32.3c8.3,1.5,16.6,2.6,24.9,4.7,27.4,7,53,21.7,72.8,41.7l30.3-29.9v79.3h-79.3l26.1-27.2c-45.6-43.6-114.6-48.7-166.4-12.3-51.8,36.4-53.4,62.7-52.2,103.2h-31.4c-1.4-19.1,2.6-37.8,9.2-55.6,21-56.5,72.9-97.6,133.4-103.2l1.2-.7h31.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M351.6,191.8c1,71.2-46.9,135.7-115.7,154.1-55.9,15-116.1.6-157.1-40.4l-30.3,29.9v-79.3h79.3l-26.1,27.2c48.3,45.8,121.5,48.5,173.5,6.8,29.2-23.5,44.3-61.3,45-98.4h31.4Z"/></svg> Rewrite </span> --> <span class="copy-button copy-code-text fw-semibold d-inline-block rounded-2" type="button"> <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 384" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M276.7,228.1l-61.9,130.9c-1.8,1.9-4.1,4-6.8,4.4-9.8,1.5-28.2.3-37.3-3.8-38.7-17.7-21.3-69.3-25.2-102.8s-1.5-4.6-4.8-4.9c-25.8-2.5-74.9,6.2-96-5.8-12.9-7.3-20.8-21.1-21.9-35.7,8.4-49.8,12.3-103.2,22.7-152.5,4.4-20.9,17.5-34.4,39-37.3,63.1.1,126.5-.1,189.4,0,19.6,0,43.2-1.7,62.2,0,14.2,1.2,24.3,13.4,25.1,27.3v152.8c-1.1,14-10.6,25-24.6,27.1l-59.9.3ZM257.1,44.6H84.6c-5.4,0-14.7,9.9-15.1,15.6l-22.7,146.5c-.2,10.9,7.4,20.2,18.4,21.3,24.8,2.5,53.6-2.2,78.6,0,13.8,1.2,24.3,12.2,25.7,25.9,2.2,21.5-1.9,46.5,0,68.1,1.2,13.8,14.9,19.5,27.4,17.6l1.2-.5,59.1-124.9V44.6ZM337.2,44.6h-56.2v159.4h56.2V44.6Z"/></svg> Dislike </span> </div> <div class="chat-section overflow-auto"> <div id="chat-box-block"> </div> </div> <div class="chat-input px-2 pb-0 my-auto position-sticky bottom-0"> <h2 class="text-center main-heading mb-2">What can I help with?</h2> <button id="scroll-down-btn" class="scroll-down-btn"> <i class="fa fa-arrow-down" style="color: white;"></i> </button> <div class="chat-input-box border shadow-sm bg-body-tertiary d-flex flex-column rounded-4 p-2"> <!-- <div class="limit-login-section text-center p-3"> <p class="fw-normal">You've reached the guest message limit. Create a FREE account to continue searching!</p> <a href="https://search.com/auth/sign-in" class="btn btn-secondary rounded-pill">Create Account or login</a> </div> --> <div class="upgradePlus"> <div class="row justify-content-center mb-3"> <div class="col-12"> <div class="card shadow-sm mb-4"> <div class="card-body"> <!-- <button type="button" class="btn-close position-absolute end-0 top-0 mt-1" aria-label="Close" onclick="this.closest('.card').remove();"></button> --> <div class="row justify-content-center align-items-center"> <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-8 col-md-8 col-12 mb-3 mb-md-0"> <h5 class="card-title mb-1 fs-6">Unlock more with SearchGPT Plus</h5> <p class="mb-0 fs-08">SearchGPT Plus gives you higher limits, smarter models, and more.</p> </div> <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-3 col-md-3 col-6"> <a href="https://search.com/landing" class="btn btn-secondary w-100">Upgrade Now</a> </div> </div> </div> </div> </div> </div> </div> <form method="GET" action="" class="search-box-form text-center w-100 h-100"> <textarea class="form-control p-2 shadow-none border-0 bg-transparent" placeholder="Ask anything" required aria-label="With textarea" id="search-form-input" wrap="soft" rows="2" autofocus></textarea> <div class="d-flex justify-content-between"> <div class="d-flex"> <!--<div class="dropdown me-2"> <button class="button btn-outline-first dropdown-toggle no-arrow fs-08 color-second" type="button" data-bs-toggle="dropdown" aria-expanded="false"> <img src="assets/img/search-related-icons/plus.svg" class="icon-sm " alt=""></button> <div class="dropdown-menu upload-box z-9999 py-2"> <div class="upload-option upload-file" data-source="Google Drive"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0"> <path d="M3.51117 18.4269L4.39319 19.9615C4.57646 20.2846 4.83992 20.5384 5.1492 20.723L8.29926 15.2307H1.99915C1.99915 15.5884 2.09078 15.9461 2.27406 16.2692L3.51117 18.4269Z" fill="#0066DA"></path> <path d="M11.9991 8.76916L8.84909 3.27686C8.53981 3.46147 8.27635 3.71532 8.09307 4.03839L2.27406 14.1922C2.09415 14.5083 1.99939 14.8663 1.99915 15.2307H8.29926L11.9991 8.76916Z" fill="#00AC47"></path> <path d="M18.8492 20.723C19.1585 20.5384 19.422 20.2846 19.6053 19.9615L19.9718 19.3269L21.7244 16.2692C21.9077 15.9461 21.9993 15.5884 21.9993 15.2307H15.6987L17.0394 17.8846L18.8492 20.723Z" fill="#EA4335"></path> <path d="M11.9981 8.76923L15.1482 3.27692C14.8389 3.09231 14.4838 3 14.1173 3H9.87901C9.51246 3 9.15736 3.10385 8.84808 3.27692L11.9981 8.76923Z" fill="#00832D"></path> <path d="M15.6984 15.2307H8.29862L5.14856 20.723C5.45784 20.9076 5.81294 20.9999 6.17949 20.9999H17.8175C18.1841 20.9999 18.5392 20.8961 18.8484 20.723L15.6984 15.2307Z" fill="#2684FC"></path> <path d="M18.8148 9.11532L15.9053 4.03839C15.722 3.71532 15.4585 3.46147 15.1493 3.27686L11.9992 8.76916L15.6991 15.2307H21.9878C21.9878 14.873 21.8961 14.5153 21.7128 14.1922L18.8148 9.11532Z" fill="#FFBA00"></path> </svg> <span>Connect to Google Drive</span> </div> <div class="upload-option upload-file" data-source="OneDrive Personal"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0"> <path d="M7.82373 7.35312L7.82391 7.35249L11.6726 9.65779L13.9659 8.6927C14.4319 8.49124 14.9344 8.38793 15.4421 8.38843C15.5267 8.38843 15.6103 8.39227 15.6935 8.39782C15.4178 7.32269 14.8357 6.35079 14.0181 5.60023C13.2004 4.84966 12.1823 4.35275 11.0876 4.16987C9.99283 3.98699 8.86853 4.12601 7.8513 4.57005C6.83408 5.01409 5.96772 5.74403 5.35751 6.67115C5.37712 6.67091 5.39643 6.66968 5.41608 6.66968C6.26666 6.66852 7.10061 6.90525 7.82373 7.35312Z" fill="#0364B8"></path> <path d="M7.82449 7.3525L7.82431 7.35313C7.10119 6.90526 6.26724 6.66853 5.41666 6.66968C5.39701 6.66968 5.37767 6.67091 5.35809 6.67116C4.52559 6.68147 3.71163 6.91843 3.00368 7.35659C2.29574 7.79475 1.72058 8.41754 1.34 9.15804C0.959422 9.89853 0.787821 10.7287 0.843637 11.5594C0.899452 12.3901 1.18057 13.1899 1.65679 13.8728L5.05075 12.4446L6.55948 11.8097L9.91879 10.396L11.6731 9.65779L7.82449 7.3525Z" fill="#0078D4"></path> <path d="M15.6938 8.39782C15.6106 8.39227 15.527 8.38843 15.4424 8.38843C14.9347 8.38793 14.4323 8.49163 13.9663 8.6931L11.6728 9.65779L12.3378 10.0561L14.5178 11.3619L15.4688 11.9316L18.7209 13.8795C19.0164 13.331 19.1695 12.717 19.1663 12.0939C19.163 11.4709 19.0035 10.8586 18.7023 10.3131C18.4011 9.76768 17.9678 9.30653 17.4422 8.97191C16.9166 8.63729 16.3154 8.4399 15.6938 8.39782Z" fill="#1490DF"></path> <path d="M15.4693 11.9315L14.5182 11.3618L12.3383 10.0561L11.6732 9.65771L9.9189 10.396L6.55959 11.8096L5.05086 12.4445L1.6569 13.8727C2.07866 14.4791 2.64091 14.9744 3.29564 15.3163C3.95037 15.6583 4.67813 15.8367 5.41676 15.8363H15.4428C16.115 15.8365 16.7748 15.6547 17.352 15.3101C17.9292 14.9656 18.4024 14.4712 18.7213 13.8794L15.4693 11.9315Z" fill="#28A8EA"></path> </svg> <span>Connect to Microsoft OneDrive (personal)</span> </div> <div class="upload-option upload-file" data-source="OneDrive Work"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0"> <path d="M7.82373 7.35312L7.82391 7.35249L11.6726 9.65779L13.9659 8.6927C14.4319 8.49124 14.9344 8.38793 15.4421 8.38843C15.5267 8.38843 15.6103 8.39227 15.6935 8.39782C15.4178 7.32269 14.8357 6.35079 14.0181 5.60023C13.2004 4.84966 12.1823 4.35275 11.0876 4.16987C9.99283 3.98699 8.86853 4.12601 7.8513 4.57005C6.83408 5.01409 5.96772 5.74403 5.35751 6.67115C5.37712 6.67091 5.39643 6.66968 5.41608 6.66968C6.26666 6.66852 7.10061 6.90525 7.82373 7.35312Z" fill="#0364B8"></path> <path d="M7.82449 7.3525L7.82431 7.35313C7.10119 6.90526 6.26724 6.66853 5.41666 6.66968C5.39701 6.66968 5.37767 6.67091 5.35809 6.67116C4.52559 6.68147 3.71163 6.91843 3.00368 7.35659C2.29574 7.79475 1.72058 8.41754 1.34 9.15804C0.959422 9.89853 0.787821 10.7287 0.843637 11.5594C0.899452 12.3901 1.18057 13.1899 1.65679 13.8728L5.05075 12.4446L6.55948 11.8097L9.91879 10.396L11.6731 9.65779L7.82449 7.3525Z" fill="#0078D4"></path> <path d="M15.6938 8.39782C15.6106 8.39227 15.527 8.38843 15.4424 8.38843C14.9347 8.38793 14.4323 8.49163 13.9663 8.6931L11.6728 9.65779L12.3378 10.0561L14.5178 11.3619L15.4688 11.9316L18.7209 13.8795C19.0164 13.331 19.1695 12.717 19.1663 12.0939C19.163 11.4709 19.0035 10.8586 18.7023 10.3131C18.4011 9.76768 17.9678 9.30653 17.4422 8.97191C16.9166 8.63729 16.3154 8.4399 15.6938 8.39782Z" fill="#1490DF"></path> <path d="M15.4693 11.9315L14.5182 11.3618L12.3383 10.0561L11.6732 9.65771L9.9189 10.396L6.55959 11.8096L5.05086 12.4445L1.6569 13.8727C2.07866 14.4791 2.64091 14.9744 3.29564 15.3163C3.95037 15.6583 4.67813 15.8367 5.41676 15.8363H15.4428C16.115 15.8365 16.7748 15.6547 17.352 15.3101C17.9292 14.9656 18.4024 14.4712 18.7213 13.8794L15.4693 11.9315Z" fill="#28A8EA"></path> </svg> <div class="upload-text"> <span>Connect to Microsoft OneDrive (work/school)</span> <span class="upload-subtext">Includes SharePoint</span> </div> </div> <input type="file" class="file-input"> <div class="upload-divider"></div> <div class="upload-option upload-file" data-source="Upload Computer"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0"> <path fill-rule="evenodd" clip-rule="evenodd" d="M18.0322 5.02393C17.7488 5.00078 17.3766 5 16.8 5H11.5002C11.3 6 11.0989 6.91141 10.8903 7.85409C10.7588 8.44955 10.6432 8.97304 10.3675 9.41399C10.1262 9.80009 9.80009 10.1262 9.41399 10.3675C8.97304 10.6432 8.44955 10.7588 7.85409 10.8903C7.81276 10.8994 7.77108 10.9086 7.72906 10.9179L5.21693 11.4762C5.1442 11.4924 5.07155 11.5001 5 11.5002V16.8C5 17.3766 5.00078 17.7488 5.02393 18.0322C5.04612 18.3038 5.0838 18.4045 5.109 18.454C5.20487 18.6422 5.35785 18.7951 5.54601 18.891C5.59546 18.9162 5.69617 18.9539 5.96784 18.9761C6.25118 18.9992 6.62345 19 7.2 19H10C10.5523 19 11 19.4477 11 20C11 20.5523 10.5523 21 10 21H7.16144C6.6343 21 6.17954 21 5.80497 20.9694C5.40963 20.9371 5.01641 20.8658 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3.13419 18.9836 3.06287 18.5904 3.03057 18.195C2.99997 17.8205 2.99998 17.3657 3 16.8385L3 11C3 8.92477 4.02755 6.93324 5.4804 5.4804C6.93324 4.02755 8.92477 3 11 3L16.8385 3C17.3657 2.99998 17.8205 2.99997 18.195 3.03057C18.5904 3.06287 18.9836 3.13419 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C20.8658 5.01641 20.9371 5.40963 20.9694 5.80497C21 6.17954 21 6.6343 21 7.16144V10C21 10.5523 20.5523 11 20 11C19.4477 11 19 10.5523 19 10V7.2C19 6.62345 18.9992 6.25118 18.9761 5.96784C18.9539 5.69617 18.9162 5.59546 18.891 5.54601C18.7951 5.35785 18.6422 5.20487 18.454 5.109C18.4045 5.0838 18.3038 5.04612 18.0322 5.02393ZM5.28014 9.41336L7.2952 8.96556C8.08861 8.78925 8.24308 8.74089 8.35381 8.67166C8.48251 8.59121 8.59121 8.48251 8.67166 8.35381C8.74089 8.24308 8.78925 8.08861 8.96556 7.2952L9.41336 5.28014C8.51014 5.59289 7.63524 6.15398 6.89461 6.89461C6.15398 7.63524 5.59289 8.51014 5.28014 9.41336ZM17 15C17 14.4477 17.4477 14 18 14C18.5523 14 19 14.4477 19 15V17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H19V21C19 21.5523 18.5523 22 18 22C17.4477 22 17 21.5523 17 21V19H15C14.4477 19 14 18.5523 14 18C14 17.4477 14.4477 17 15 17H17V15Z" fill="currentColor"></path> </svg> <span>Upload from computer</span> </div> <input type="file" class="file-input"/> </div> </div>--> </div> <div class="d-flex"> <button class="btn btn-secondary btn-sm p-1 rounded-circle search-submit-button" type="submit" data-value="" disabled> <svg width="32" height="32"> <use href="#arrow-up"></use> </svg> <span class="visually-hidden">C</span> </button> </div> </div> </form> </div> </div> <div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="limit-login-modal" tabindex="-1" aria-modal="true" role="dialog"> <div class="modal-dialog modal-dialog-centered modal-lg webContent"> <div class="modal-content border-0"> <div class="modal-body p-0 rounded-5"> <div class="limit-login-section text-center shadow-none p-4"> <p class="fw-semibold text-2xl mb-3">You've reached the guest message limit. Create a FREE account to continue searching!</p> <a href="https://search.com/auth/sign-in" class="btn btn-secondary rounded-pill text-18 px-5 py-3">Create Account or login</a> </div> </div> </div> </div> </div> <div class="modal fade" data-bs-backdrop="static" data-bs-keyboard="false" id="bot-login-modal" tabindex="-1" aria-modal="true" role="dialog"> <div class="modal-dialog modal-dialog-centered modal-lg webContent"> <div class="modal-content border-0"> <div class="modal-body p-0 rounded-5"> <div class="text-center shadow-none p-4"> <p class="fw-semibold text-2xl mb-3">We couldn't verify your session. Please log in to continue.</p> <a href="https://search.com/auth/sign-in" class="btn btn-secondary rounded-pill text-18 px-5 py-3">Create Account or login</a> </div> </div> </div> </div> </div> </section> <footer class="p-2 p-md-3 border-top text-center position-sticky mt-0 bottom-0"> <p class="mb-0 fs-09">By messaging search.com, you agree to our <a href="https://search.com/terms" target="_blank" rel="noopener noreferrer" class="text-decoration-underline fs-09 fw-normal"> Terms</a> and have read our <a href="https://search.com/privacy" target="_blank" rel="noopener noreferrer" class="text-decoration-underline fs-09 fw-normal">Privacy Policy</a> | <a href="https://search.com/contact-us" target="_blank" rel="noopener noreferrer" class="text-decoration-underline fs-09 fw-normal">Contact Us</a>.</p> </footer> </main> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://search.com/assets/js/bootstrap.bundle.min.js?v=1.02"></script> <script src="https://search.com/assets/js/intlTelInput.min.js?v=1.02"></script> <!-- Custom JS --> <script> const BASE_URL = 'https://search.com'; </script> <script src="https://search.com/assets/js/main.js?v=1.0.5"></script> <script> $('#image_prompt').on('click', function(event) { event.preventDefault(); // Prevent any default action this.classList.toggle("toggled"); // Toggle class // Toggle value for form submission if (this.classList.contains("toggled")) { $('#is_image_prompt').val("1"); } else { $('#is_image_prompt').val("0"); } }); const feedbackStates = {}; function setCopiedState($text, $icon) { $text.text('Copied'); // Swap to check icon $icon.replaceWith(` <svg class="icon-check" width="16" height="16" viewBox="0 0 24 24" fill="none"> <path d="M5 13l4 4L19 7" stroke="currentColor" stroke-width="2"/> </svg> `); // Reset after 2s setTimeout(() => { $text.text('Copy'); $icon = $text.siblings('svg'); $icon.replaceWith(` <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z" fill="currentColor"></path></svg> `); }, 2000); } // Fallback for non-HTTPS or unsupported browsers function fallbackCopy(text, $text, $icon) { const $temp = $('<textarea>'); $('body').append($temp); $temp.val(text).select(); document.execCommand('copy'); $temp.remove(); setCopiedState($text, $icon); } function applyActiveStates() { console.log('applyActiveStates called'); const getFeedbackStates = 'https://search.com/user/getFeedbackStates'; const uid = ""; const currentChatId = localStorage.getItem('currentChatId'); $.ajax({ url: getFeedbackStates, method: 'POST', data: { uid:uid, chatid:currentChatId, }, success: function(result) { var res = JSON.parse(result); res.datalist.forEach((item, index) => { // Save current count in a local variable const thisCount = index; setTimeout(() => { let active_class = ''; let remove_btn_class = ''; if (item.feedback_type === "dislike") { active_class = `.dislike-button.count_${thisCount}`; remove_btn_class = `.like-button.count_${thisCount}`; } if (item.feedback_type === "like") { active_class = `.like-button.count_${thisCount}`; remove_btn_class = `.dislike-button.count_${thisCount}`; } console.log(active_class); if (active_class) { setTimeout(() => { requestAnimationFrame(() => { const element = document.querySelector(active_class); if (element) { element.classList.add("active"); $(remove_btn_class).remove(); } else { console.warn("Still not found:", active_class); } }); }, 500); } }, 100); }) }, error: function(err) { console.error('Error getting feedback:', err); } }); } function addButtonsToLeftMessage() { // Remove any existing buttons first (optional cleanup) $('.text-option-buttons').remove(); // Select all left messages const $Left = $('.left-chat-box'); // Create the buttons template const count = 0; const $buttons = $(` <div class="text-option-buttons"> <span class="copy-button copy-code-text fw-semibold d-inline-block me-1 rounded-2" type="button"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 5C7 3.34315 8.34315 2 10 2H19C20.6569 2 22 3.34315 22 5V14C22 15.6569 20.6569 17 19 17H17V19C17 20.6569 15.6569 22 14 22H5C3.34315 22 2 20.6569 2 19V10C2 8.34315 3.34315 7 5 7H7V5ZM9 7H14C15.6569 7 17 8.34315 17 10V15H19C19.5523 15 20 14.5523 20 14V5C20 4.44772 19.5523 4 19 4H10C9.44772 4 9 4.44772 9 5V7ZM5 9C4.44772 9 4 9.44772 4 10V19C4 19.5523 4.44772 20 5 20H14C14.5523 20 15 19.5523 15 19V10C15 9.44772 14.5523 9 14 9H5Z" fill="currentColor"></path></svg> <span class="copy-text">Copy</span> </span> <!-- <span class="rewrite-button copy-code-text fw-semibold d-inline-block me-1 rounded-2" type="button"> <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 384" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M207.9,32.3c8.3,1.5,16.6,2.6,24.9,4.7,27.4,7,53,21.7,72.8,41.7l30.3-29.9v79.3h-79.3l26.1-27.2c-45.6-43.6-114.6-48.7-166.4-12.3-51.8,36.4-53.4,62.7-52.2,103.2h-31.4c-1.4-19.1,2.6-37.8,9.2-55.6,21-56.5,72.9-97.6,133.4-103.2l1.2-.7h31.4Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M351.6,191.8c1,71.2-46.9,135.7-115.7,154.1-55.9,15-116.1.6-157.1-40.4l-30.3,29.9v-79.3h79.3l-26.1,27.2c48.3,45.8,121.5,48.5,173.5,6.8,29.2-23.5,44.3-61.3,45-98.4h31.4Z"/></svg> <span>Rewrite</span> </span> --> <span class="like-button copy-code-text fw-semibold d-inline-block me-1 rounded-2" type="button" data-bs-toggle="tooltip" data-bs-title="Good Response" data-bs-custom-class="custom-tooltip" data-bs-placement="bottom" title="Good Response"> <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 384" class="icon-md-heavy"> <path fill-rule="evenodd" clip-rule="evenodd" d="M107.3,155.8L169.2,24.9c1.8-1.9,4.1-4,6.8-4.4,9.8-1.5,28.2-.3,37.3,3.8,38.7,17.7,21.3,69.3,25.2,102.8,3.9,33.5,1.5,4.6,4.8,4.9,25.8,2.5,74.9-6.2,96,5.8,12.9,7.3,20.8,21.1,21.9,35.7-8.4,49.8-12.3,103.2-22.7,152.5-4.4,20.9-17.5,34.4-39,37.3-63.1-.1-126.5.1-189.4,0-19.6,0-43.2,1.7-62.2,0-14.2-1.2-24.3-13.4-25.1-27.3v-152.8c1.1-14,10.6-25,24.6-27.1l59.9-.3h0ZM126.9,339.3h172.5c5.4,0,14.7-9.9,15.1-15.6l22.7-146.5c.2-10.9-7.4-20.2-18.4-21.3-24.8-2.5-53.6,2.2-78.6,0-13.8-1.2-24.3-12.2-25.7-25.9-2.2-21.5,1.9-46.5,0-68.1-1.2-13.8-14.9-19.5-27.4-17.6l-1.2.5-59.1,124.9v169.6s0,0,0,0ZM46.8,339.3h56.2s0-159.4,0-159.4h-56.2s0,159.4,0,159.4Z"/></svg> </span> <span class="dislike-button copy-code-text fw-semibold d-inline-block rounded-2" type="button" data-bs-toggle="tooltip" data-bs-title="Bad Response" data-bs-placement="bottom" data-bs-custom-class="custom-tooltip" title="Bad response"> <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 384" class="icon-md-heavy"><path fill-rule="evenodd" clip-rule="evenodd" d="M276.7,228.1l-61.9,130.9c-1.8,1.9-4.1,4-6.8,4.4-9.8,1.5-28.2,.3-37.3-3.8-38.7-17.7-21.3-69.3-25.2-102.8s-1.5-4.6-4.8-4.9c-25.8-2.5-74.9,6.2-96-5.8-12.9-7.3-20.8-21.1-21.9-35.7,8.4-49.8,12.3-103.2,22.7-152.5,4.4-20.9,17.5-34.4,39-37.3,63.1.1,126.5-.1,189.4,0,19.6,0,43.2-1.7,62.2,0,14.2,1.2,24.3,13.4,25.1,27.3v152.8c-1.1,14-10.6,25-24.6,27.1l-59.9,.3ZM257.1,44.6H84.6c-5.4,0-14.7,9.9-15.1,15.6l-22.7,146.5c-.2,10.9,7.4,20.2,18.4,21.3,24.8,2.5,53.6-2.2,78.6,0,13.8,1.2,24.3,12.2,25.7,25.9,2.2,21.5-1.9,46.5,0,68.1,1.2,13.8,14.9,19.5,27.4,17.6l1.2-.5,59.1-124.9V44.6ZM337.2,44.6h-56.2v159.4h56.2V44.6Z"/></svg> </span> </div> `); // Add buttons to each left message let currentCount = 0; $Left.each(function() { const $message = $(this); // Check if message contains a button with id 'sign-btn' if ($message.find('#adult-signup-btn').length <= 0) { // Clone the buttons for each message const $buttonsCopy = $buttons.clone(); const isLastMessage = $message.is($Left.last()); $message.last().append($buttonsCopy); $buttonsCopy.find('.like-button').addClass('count_' + currentCount); $buttonsCopy.find('.dislike-button').addClass('count_' + currentCount); // Remove rewrite button if not the last message if (!isLastMessage) { $buttonsCopy.find('.rewrite-button').remove(); } currentCount++; } }); // Handle copy button click $('.copy-button').on('click', function() { const $message = $(this).closest('.left-chat-box'); // Get only the message text, excluding the buttons const messageText = $message.clone().find('.text-option-buttons, .ai-ads-block').remove().end().text().trim(); const $btn = $(this); const $text = $btn.find('.copy-text'); const $icon = $btn.find('svg'); if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') { navigator.clipboard.writeText(messageText).then(function () { setCopiedState($text, $icon); }).catch(function (err) { fallbackCopy(messageText, $text, $icon); }); } else { fallbackCopy(messageText, $text, $icon); } }); $('.like-button, .dislike-button').click(function() { var loggedIn = 0; if (loggedIn) { const $button = $(this); const isLike = $button.hasClass('like-button'); const isDislike = $button.hasClass('dislike-button'); const $wrapper = $button.closest('.text-option-buttons'); const countClass = $button.attr('class').split(' ').find(cls => cls.startsWith('count_')); const countNumber = countClass ? countClass.split('_')[1] : 0; const rclass = '.right_count_'+ countNumber; const lclass = '.left_count_'+ countNumber; const prompt = $(rclass).clone().children('.text-option-buttons').remove().end().text().trim(); const answer = $(lclass).clone().children('.text-option-buttons').remove().end().text().trim(); if (!$button.hasClass('active')) { const apiUrl = 'https://api.search.com/search'; var originalText = $(this).closest('.left-chat-box').clone().children('.text-option-buttons').remove().end().text().trim(); const dislikeUrl = 'https://search.com/user/updateLikeDislikeStatus'; const uid = ""; const currentChatId = localStorage.getItem('currentChatId'); // Send AJAX to PHP backend $.ajax({ url: dislikeUrl, method: 'POST', data: { feedbackType: isLike ? 'like' : 'dislike', uid:uid, id:currentChatId, prompt:prompt, answer:answer, countNumber:countNumber }, success: function(response) { $button.addClass('active'); feedbackStates[`count_${countNumber}`] = isLike ? 'like' : 'dislike'; const opposite = isLike ? 'dislike' : 'like'; $(`.${opposite}-button.count_${countNumber}`).remove(); }, error: function(err) { console.error('Error sending feedback:', err); } }); } } else { const $button = $(this); const isLike = $button.hasClass('like-button'); const isDislike = $button.hasClass('dislike-button'); const $wrapper = $button.closest('.text-option-buttons'); const countClass = $button.attr('class').split(' ').find(cls => cls.startsWith('count_')); const countNumber = countClass ? countClass.split('_')[1] : 0; const rclass = '.right_count_'+ countNumber; const lclass = '.left_count_'+ countNumber; $button.addClass('active'); const opposite = isLike ? 'dislike' : 'like'; $(`.${opposite}-button.count_${countNumber}`).remove(); } }); // Handle rewrite button click /*$('.dislike-button').on('click', function() { const dislikeUrl = `https://search.com/user/dislike`; $.ajax({ url: urlWithParams, type: 'GET', success: function(res) { var response = JSON.parse(res); if (response.status) { } else { } }, error: function(xhr, status, error) { console.error('Error disliking the message:', error); } }); });*/ // Handle rewrite button click $('.rewrite-button').on('click', function() { var $btn = $(this); //var $msg = $btn.closest('.left-chat-box'); var $leftBox = $('.left-chat-box'); var $msg = $('.last-right-msg'); //console.log($msg); //var originalText = "Please rewrite " + $msg.clone().children('.text-option-buttons').remove().end().text().trim(); var originalText = "Please rewrite " + $msg.text().trim(); console.log(originalText); // const prompt = $(rclass).clone().children('.text-option-buttons').remove().end().text().trim(); var lastText = $leftBox.clone().children('.text-option-buttons').remove().end().text().trim(); const apiUrl = 'https://api.search.com/search'; const currentChatId = localStorage.getItem('currentChatId'); const chatId = ""; const urlWithParams = apiUrl + '?&prompt=' + encodeURIComponent(originalText ) + '&key=Iyk9KzMpMDkvOT85NCQ,' + '&rewrite=1' + '&auth=Ig,,' + '&sub=' + `¤tChatId=${currentChatId || ''}`; $leftBox.html('<em>Rewriting...</em>'); $btn.prop('disabled', true); $.ajax({ url: urlWithParams, type: 'GET', statusCode: { 429: function() { // window.location.href = "https://search.com/auth/sign-in"; var loggedIn = 0; if (loggedIn) { $('.upgradePlus').show(); } else { $('#limit-login-modal').modal('show'); } $(".main-heading, .search-box-form").hide(); }, 404: function() { const newUrl = `https://search.com/chat`; window.history.pushState({}, '', newUrl); }, 403: function() { $('#bot-login-modal').modal('show'); } }, success: function (result) { $leftBox.html(result.response); handleRefreshHistory(); setTimeout(() => { addButtonsToLeftMessage(); }, 500); //handleRefreshHistory(); if (result.chatId) { const newUrl = `https://search.com/chat/${result.chatId}`; window.history.pushState({}, '', newUrl); localStorage.setItem('currentChatId', result.chatId); } }, error: function() { $leftBox.html(lastText); setTimeout(() => { addButtonsToLeftMessage(); }, 500); }, complete: function () { $btn.prop('disabled', false); } }); }); } function getCookie(name) { let nameEQ = name + "="; let ca = document.cookie.split(';'); for (let i = 0; i < ca.length; i++) { let c = ca[i].trim(); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length); } return null; } document.addEventListener("DOMContentLoaded", function() { var utm_source = getCookie("utm_source"); if (utm_source != null && utm_source !== "") { fbq('track', 'PageView'); gtag('event', 'conversion', {'send_to': 'AW-16990713410/LSYiCPDeqrYaEMLs5qU_'}); var isNewUser = 0; if (isNewUser) { var gclid = getCookie("gclid"); var msclkid = getCookie("msclkid"); fbq('track', 'Purchase', { value: 1.00, currency: 'USD' }); uet_report_conversion(msclkid); gtag_report_conversion('https://search.com/', gclid); setCookie("utm_source", "", -1); } } if (window.location.pathname !== '/') { const baseUrl = 'https://search.com/'; window.history.pushState({}, '', baseUrl); localStorage.removeItem('currentChatId'); localStorage.removeItem('chatHistory'); } }); function scrollToMessage(element) { element.scrollIntoView({ behavior: "smooth", block: "start" }); } function show_chat(recno, obj) { // Ensure recno is treated as a string recno = String(recno); $("#chat-sidebar li a").removeClass("active"); $(obj).addClass("active"); // Clear current chat history document.getElementById('chat-box-block').innerHTML = ""; // Store the chat ID and update URL localStorage.setItem('currentChatId', recno); const newUrl = `https://search.com/chat/${recno}`; window.history.pushState({}, '', newUrl); // Get chat content getChatContent(recno); showResult(); } function showResult() { $(".chat-input").removeClass("mb-0").addClass("mb-0"); $(".main-heading").hide(); } function handleRefreshHistory() { const urlWithParams = `https://search.com/user/history`; $.ajax({ url: urlWithParams, type: 'GET', success: function(res) { var response = JSON.parse(res); if (response.status) { $("#chat-sidebar").html(response.data); if (response.lastHistory !== undefined) { lastHistory = response.lastHistory; } } else { // console.error("Error: " + (response.message || 'Unknown error')); } }, error: function(xhr, status, error) { console.error('Error refreshing history:', error); } }); } function userCanInput(flag){ isDrawing = !flag; $("#search-form-input").val("").focus(); if(flag){ $("#chat-box-block .typing").html(""); $(".search-submit-button").attr("disabled", true); $(".search-submit-button use").attr("href", "#arrow-up"); } else { $(".search-submit-button").removeAttr("disabled"); $(".search-submit-button use").attr("href", "#stop"); } } function handleMessageSubmission() { console.log('isDrawing', isDrawing); if(isDrawing) return; const inputField = document.getElementById('search-form-input'); const userMessage = inputField.value.trim(); const is_image = $('#is_image_prompt').val(); if (is_image) { $('#image_prompt').click(); } const image_url = $('#image_url').val(); // $(".chatsection").show(); // $(".main-heading").hide(); // $('.left-chat-box').removeClass("add-min-height"); if (userMessage === "") return; // Prevent empty messages from being sent displayMessage(userMessage, true); showResult(); const apiUrl = 'https://api.search.com/search'; // Get fresh currentChatId from localStorage let currentChatId = localStorage.getItem('currentChatId'); // Construct the API URL with query parameters const urlWithParams = apiUrl + '?&prompt=' + encodeURIComponent(userMessage) + '&key=Iyk9KzMpMDkvOT85NCQ,' + '&is_image=' + is_image + '&auth=Ig,,' + '&sub=' + `¤tChatId=${currentChatId || ''}`; // Disable the input field and button to prevent multiple submissions // inputField.disabled = true; userCanInput(false); $("#chat-box-block .typing").remove(); $("#chat-box-block").append("<div class=\"typing\"><div class=\"dot\"></div><div class=\"dot\"></div><div class=\"dot\"></div></div>"); const userLastMessage = document.getElementsByClassName('last-right-msg')[0]; document.getElementsByClassName('typing')[0].style.minHeight = `calc(100vh - ${userLastMessage.offsetHeight + 272}px)`; // const fileInput = document.querySelector('.file-input'); const formData = new FormData(); formData.append('prompt', encodeURIComponent(userMessage)); formData.append('key', 'Iyk9KzMpMDkvOT85NCQ,'); if (is_image) formData.append('is_image', is_image); if (image_url) formData.append('image_url', image_url); formData.append('auth', 'Ig,,'); formData.append('sub', ''); if (currentChatId) formData.append('currentChatId', currentChatId); /*if (fileInput.files.length > 0) { formData.append('file', fileInput.files[0]); }*/ $.ajax({ url: apiUrl, type: 'POST', data: formData, processData: false, contentType: false, statusCode: { 429: function() { // window.location.href = "https://search.com/auth/sign-in"; var loggedIn = 0; if (loggedIn) { $('.upgradePlus').show(); } else { $('#limit-login-modal').modal('show'); } $(".main-heading, .search-box-form").hide(); }, 404: function() { const newUrl = `https://search.com/chat`; window.history.pushState({}, '', newUrl); }, 403: function() { $('#bot-login-modal').modal('show'); } }, success: function(result) { //displayMessage(userMessage, 'user'); if(!isDrawing) return; setTimeout(() => { if(!isDrawing) return; const gptMessage = result.response; $('#image_url').val(result.image_url); displayMessage(gptMessage, false); handleRefreshHistory(); if (result.chatId) { const newUrl = `https://search.com/chat/${result.chatId}`; window.history.pushState({}, '', newUrl); localStorage.setItem('currentChatId', result.chatId); } }, 1000); $("#chat-section").show(); if(result.adultTerm === true) { return; } var chatHistory = JSON.parse(localStorage.getItem('chatHistory') || '[]'); chatHistory.push({ message: userMessage, type: 'user' }); chatHistory.push({ message: result.response, type: 'assistant' }); localStorage.setItem('chatHistory', JSON.stringify(chatHistory)); }, error: function() { const newUrl = `https://search.com/chat`; window.history.pushState({}, '', newUrl); userCanInput(true); } }); } function getChatContent(chatId) { const inputField = document.getElementById('search-form-input'); const userMessage = inputField.value.trim(); $(".chatsection").show(); $(".main-heading").hide(); $(".search-fixed-section").addClass("move-bottom"); // console.log(chatId); const apiUrl = 'https://api.search.com/getchatcontent'; // Construct the API URL with query parameters const urlWithParams = apiUrl + '?' + '&key=Iyk9KzMpMDkvOT85NCQ,' + '&auth=Ig,,' + '&sub=' + `&chatId=${chatId}`; $.ajax({ url: urlWithParams, type: 'GET', statusCode: { 429: function() { // window.location.href = "https://search.com/sign-in"; var loggedIn = 0; if (loggedIn) { $('.upgradePlus').show(); } else { $('#limit-login-modal').modal('show'); } $(".main-heading, .search-box-form").hide(); } }, success: function(result) { // Clear existing messages document.getElementById('chat-box-block').innerHTML = ''; isDrawing = true; // Display each message from the datalist if (result.datalist && Array.isArray(result.datalist)) { lcount = rcount = 0; currentLCount = rcount; // Capture current count before it changes result.datalist.forEach((item, index) => { displayMessage(item.search, true, true, lcount++); displayMessage(item.response['ai_response'], false, true, rcount++); // Save current count in a local variable const thisCount = index; setTimeout(() => { let active_class = ''; let remove_btn_class = ''; if (item.feedback_type === "dislike") { active_class = `.dislike-button.count_${thisCount}`; remove_btn_class = `.like-button.count_${thisCount}`; } if (item.feedback_type === "like") { active_class = `.like-button.count_${thisCount}`; remove_btn_class = `.dislike-button.count_${thisCount}`; } if (active_class) { setTimeout(() => { requestAnimationFrame(() => { const element = document.querySelector(active_class); if (element) { element.classList.add("active"); $(remove_btn_class).remove(); } else { console.warn("Still not found:", active_class); } }); }, 500); } }, 100); }); } // Show chat section and hide main heading $("#chat-section").show(); $(".main-heading").hide(); }, error: function() { window.location.href = "https://search.com/chat"; inputField.disabled = false; $(".search-submit-button").removeAttr("disabled"); } }); }; // Handle Enter key for mobile (send on Enter, but allow Shift+Enter for new line) document.getElementById("search-form-input").addEventListener("keydown", function(e) { if (e.key === 'Enter' && !e.shiftKey && !isDrawing) { e.preventDefault(); const message = this.value.trim(); if (message) { handleMessageSubmission(); this.value = ''; this.style.height = 'auto'; } } }); // Attach event listener for button click $(".search-submit-button").click(function(e) { e.preventDefault(); if (!isDrawing) { handleMessageSubmission(); } else{ userCanInput(true); } }); $(".togglesidebar").click(function() { handleRefreshHistory(); }); handleRefreshHistory(); // Display the message in the chat box function displayMessage(message, isUserMessage, firstDrawing = false , count=null) { isDrawing = true; const chatBox = document.getElementById('chat-box-block'); const messageDiv = document.createElement('div'); if (count == null) { const leftChatBoxes = document.querySelectorAll('div.left-chat-box'); // Select all divs with the class 'left-chat-box' if (leftChatBoxes.length > 0) { const lastLeftChatBox = leftChatBoxes[leftChatBoxes.length - 1]; // Get the last div const lcountClass = lastLeftChatBox.className.split(' ').find(cls => cls.startsWith('left_count')); if (lcountClass) { const parts = lcountClass.split('_'); count = parseInt(parts[2], 10); if (isNaN(count)) count = 0; else count += 1; } else { count = 0; } } else { count = 0; } } if (isUserMessage) { messageDiv.classList.add("right-chat-box"); messageDiv.classList.add("rounded-4"); messageDiv.classList.add("bg-body-tertiary"); messageDiv.classList.add("right_count_" + count); } else { messageDiv.classList.add("left-chat-box"); messageDiv.classList.add("left_count_" + count); } messageDiv.classList.add('msg-chat-box'); if (isUserMessage) { let left_elements = document.getElementsByClassName('last-left-msg'); if (left_elements.length) { left_elements[0].style.minHeight = ''; left_elements[0].classList.remove('last-left-msg'); } let right_elements = document.getElementsByClassName('last-right-msg'); if (right_elements.length) { right_elements[0].classList.remove('last-right-msg'); } messageDiv.classList.add('last-right-msg'); messageDiv.innerHTML = message; chatBox.append(messageDiv); setTimeout(() => { scrollToMessage(messageDiv); }, 100); } else { $("#chat-box-block .typing").remove(); messageDiv.classList.add('last-left-msg'); chatBox.append(messageDiv); const userLastMessage = document.getElementsByClassName('last-right-msg')[0]; document.getElementsByClassName('last-left-msg')[0].style.minHeight = `calc(100vh - ${userLastMessage.offsetHeight + 272}px)`; if(firstDrawing){ messageDiv.innerHTML = message; userCanInput(true); setTimeout(() => { addButtonsToLeftMessage(); //applyActiveStates(); }, 500); } else { // Add typing effect for GPT responses const { cleanMessage, adElement } = extractCleanMessageAndAdBlock(message); typeMessage(cleanMessage, messageDiv, 20, adElement); } // setTimeout(() => { // addButtonsToLeftMessage(); // scrollToBottom(); // }, 500); setTimeout(() => { scrollToBottom(); }, 500); setTimeout(() => { appendAdBlockToEnd(element, adElement); requestAnimationFrame(() => { addButtonsToLeftMessage(); }); }, 100); } const clearDiv = document.createElement('div'); clearDiv.classList.add('clearfix'); chatBox.append(clearDiv); } // function preprocessMessage(rawMessage) { // // Convert markdown bold to <strong> // rawMessage = rawMessage.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>'); // // Convert line breaks to <br> // rawMessage = rawMessage.replace(/\n/g, '<br>'); // return rawMessage; // } // Function to create typing effect function typeMessage(message, element, speed = 50, adElement) { // Create a temporary div to parse HTML const tempDiv = document.createElement('div'); tempDiv.innerHTML = message; console.log(tempDiv); // Get all child nodes (including text and element nodes) // const processedMessage = preprocessMessage(message); tempDiv.innerHTML = message; const nodes = Array.from(tempDiv.childNodes); // Get all top-level nodes (not just the first!) let index = 0; element.innerHTML = ''; function type() { if (!isDrawing) return; if (index < nodes.length) { const node = nodes[index]; if (node.nodeType === Node.TEXT_NODE) { console.log('1.'+node.nodeType); // Handle text nodes const words = node.textContent.split(/(\s+)/); // Preserve spaces let wordIndex = 0; function typeWord() { if (wordIndex < words.length) { element.appendChild(document.createTextNode(words[wordIndex])); wordIndex++; setTimeout(typeWord, speed); } else { index++; setTimeout(type, speed); } } typeWord(); } else if (node.nodeType === Node.ELEMENT_NODE) { console.log('2.'+node.nodeType); // Handle HTML elements const clone = node.cloneNode(true); element.appendChild(clone); index++; setTimeout(type, speed); } else { index++; setTimeout(type, speed); } } else { console.log(3); // console.log('drawing finished'); userCanInput(true); setTimeout(() => { appendAdBlockToEnd(element, adElement); addButtonsToLeftMessage(); }, 500); } toggleScrollButton() } type(); } function extractCleanMessageAndAdBlock(message) { const tempDiv = document.createElement('div'); tempDiv.innerHTML = message; const adsBlock = tempDiv.querySelector('.ai-ads-block'); let adElement = null; if (adsBlock) { adElement = adsBlock.cloneNode(true); adsBlock.remove(); } return { cleanMessage: tempDiv.innerHTML, adElement, }; } function appendAdBlockToEnd(targetElement, adElement) { if (adElement) { targetElement.appendChild(adElement); } } const chatContainer = document.querySelector(".chat-section"); const scrollDownBtn = document.getElementById("scroll-down-btn"); function scrollToBottom() { chatContainer.scrollTo({ top: chatContainer.scrollHeight - chatContainer.clientHeight, // Scroll to the bottom behavior: "smooth" // Smooth scroll effect }); } function toggleScrollButton() { if (chatContainer.scrollTop + chatContainer.clientHeight >= chatContainer.scrollHeight - 50) { scrollDownBtn.style.display = "none"; } else { scrollDownBtn.style.display = "flex"; } } function showChat_loggedin() { var chatHistory = JSON.parse(localStorage.getItem('chatHistory')); if (!chatHistory || !Array.isArray(chatHistory)) { console.warn('No valid chat history found'); return; } // Display chat messages chatHistory.forEach(chat => { if(chat.type === 'assistant') { displayMessage(chat.message, false); } else if(chat.type === 'user') { displayMessage(chat.message, true); } }); showResult(); // Store chat history as new chat to redis with new chat id const apiUrl = 'https://api.search.com/setnewchatloggedin'; const urlWithParams = apiUrl + '?' + '&key=Iyk9KzMpMDkvOT85NCQ,' + '&auth=Ig,,' + '&sub='; // Prepare the data as JSON const postData = { dataList: localStorage.getItem('chatHistory') }; localStorage.removeItem('chatHistory'); // Make the POST request $.ajax({ url: urlWithParams, type: 'POST', data: JSON.stringify(postData), contentType: 'application/json', beforeSend: function() { console.log('Sending data:', postData); }, success: function(result) { if (result && result.status ==='success') { console.log('Chat history saved successfully'); if (result.currentChatId) { localStorage.setItem('currentChatId', result.currentChatId); window.history.pushState({}, '', `https://search.com/chat/${result.currentChatId}`); handleRefreshHistory(); } } else { console.warn('Failed to save chat history:', result?.message || 'Unknown error'); } }, error: function(xhr, status, error) { console.error('Error saving chat history:', error); console.error('Status:', status); console.error('Response:', xhr.responseText); } }); } chatContainer.addEventListener("scroll", toggleScrollButton); scrollDownBtn.addEventListener("click", scrollToBottom); function setCookie(name, value, days) { let expires = ""; if (days) { let date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + value + "; path=/" + expires; } function handleMessageSubmissionUsingTerm() { $("#search-form-input").val(""); const inputField = document.getElementById('search-form-input'); const userMessage = inputField.value.trim(); if (userMessage === "") return; // Prevent empty messages from being sent displayMessage(userMessage, true); showResult(); const apiUrl = 'https://api.search.com/search'; // Get fresh currentChatId from localStorage let currentChatId = localStorage.getItem('currentChatId'); // Construct the API URL with query parameters const urlWithParams = apiUrl + '?&prompt=' + encodeURIComponent(userMessage) + '&key=Iyk9KzMpMDkvOT85NCQ,' + '&auth=Ig,,' + '&isTerms=1' + '&sub=' + `¤tChatId=${currentChatId || ''}`; // Disable the input field and button to prevent multiple submissions // inputField.disabled = true; userCanInput(false); $("#chat-box-block .typing").remove(); $("#chat-box-block").append("<div class=\"typing\"><div class=\"dot\"></div><div class=\"dot\"></div><div class=\"dot\"></div></div>"); const userLastMessage = document.getElementsByClassName('last-right-msg')[0]; document.getElementsByClassName('typing')[0].style.minHeight = `calc(100vh - ${userLastMessage.offsetHeight + 272}px)`; $.ajax({ url: urlWithParams, type: 'GET', statusCode: { 429: function() { var loggedIn = 0; if (loggedIn) { $('.upgradePlus').show(); } else { $('#limit-login-modal').modal('show'); } $(".main-heading, .search-box-form").hide(); }, 404: function() { const newUrl = `https://search.com/chat`; window.history.pushState({}, '', newUrl); } }, success: function(result) { //displayMessage(userMessage, 'user'); if(!isDrawing) return; setTimeout(() => { if(!isDrawing) return; const gptMessage = result.response; displayMessage(gptMessage, false); handleRefreshHistory(); if (result.chatId) { const newUrl = `https://search.com/chat/${result.chatId}`; window.history.pushState({}, '', newUrl); localStorage.setItem('currentChatId', result.chatId); } }, 1000); $("#chat-section").show(); var chatHistory = JSON.parse(localStorage.getItem('chatHistory') || '[]'); chatHistory.push({ message: userMessage, type: 'user' }); chatHistory.push({ message: result.response, type: 'assistant' }); localStorage.setItem('chatHistory', JSON.stringify(chatHistory)); }, error: function(xhr, status, error) { const newUrl = `https://search.com/chat`; window.history.pushState({}, '', newUrl); userCanInput(true); } }); } </script> </body> </html>