{"version":3,"file":"shared-lib.mpXZqsxW.mjs","names":[],"sources":["https:/framerusercontent.com/modules/hc2nNMl7dPJrevVrAb6n/LoanqgSVEzTCOLWDhoCf/siteMetadata.js"],"sourcesContent":["// Generated by Framer (88cdfe9)\nexport default function metadata(params,activeLocale){return{customHTMLBodyEnd:\"<div id=\\\"xentillus\\\">\\n  <!-- Quick suggestion above chat icon -->\\n  <div id=\\\"xa-quick-collapsed\\\">\\n    <button id=\\\"xa-quick\\\" class=\\\"xa-q\\\">✨ How can I grow with Kronx?</button>\\n  </div>\\n\\n  <!-- Chat toggle button -->\\n  <button id=\\\"xa-toggle\\\" aria-label=\\\"Open chat\\\">💬</button>\\n\\n  <!-- Chat window -->\\n  <section id=\\\"xa-box\\\" aria-label=\\\"Xentillus Chatbot\\\">\\n    <header id=\\\"xa-header\\\">\\n      <div class=\\\"xa-header-content\\\">\\n        <div class=\\\"xa-avatar\\\">X</div>\\n        <div class=\\\"xa-header-text\\\">\\n          <div class=\\\"xa-title\\\">Xentillus</div>\\n          <div class=\\\"xa-status\\\">\\n            <div class=\\\"xa-status-dot\\\"></div>\\n            <span>Online</span>\\n          </div>\\n        </div>\\n      </div>\\n      <button id=\\\"xa-close\\\" aria-label=\\\"Close chat\\\">✖</button>\\n    </header>\\n    <main id=\\\"xa-messages\\\" role=\\\"log\\\" aria-live=\\\"polite\\\"></main>\\n    <div id=\\\"xa-typing-container\\\"></div>\\n    <form id=\\\"xa-form\\\" autocomplete=\\\"off\\\">\\n      <textarea id=\\\"xa-input\\\" rows=\\\"1\\\" placeholder=\\\"Type a message…\\\"></textarea>\\n      <button id=\\\"xa-send\\\" type=\\\"submit\\\" aria-label=\\\"Send\\\">\\n        <svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n          <path d=\\\"M2 21L23 12L2 3V10L17 12L2 14V21Z\\\" fill=\\\"currentColor\\\"></path>\\n        </svg>\\n      </button>\\n    </form>\\n  </section>\\n</div>\\n\\n<script>\\nconst ENDPOINT = \\\"https://icy-rain-78f0.kronxstudios.workers.dev/\\\";\\nconst $toggle = document.getElementById('xa-toggle');\\nconst $box = document.getElementById('xa-box');\\nconst $log = document.getElementById('xa-messages');\\nconst $form = document.getElementById('xa-form');\\nconst $input = document.getElementById('xa-input');\\nconst $quick = document.getElementById('xa-quick');\\nconst $close = document.getElementById('xa-close');\\nconst $send = document.getElementById('xa-send');\\nconst $typingContainer = document.getElementById('xa-typing-container');\\n\\nlet history = [];\\nlet greeted = false;\\nlet sessionId = null;\\n\\n// Initialize or retrieve session ID\\nfunction initSession() {\\n  sessionId = localStorage.getItem('xa-session-id');\\n  if (!sessionId) {\\n    sessionId = 'user_' + Math.random().toString(36).substring(2, 15) + Date.now().toString(36);\\n    localStorage.setItem('xa-session-id', sessionId);\\n  }\\n}\\n\\n// Initialize session on load\\ninitSession();\\n\\n// Format text with bold support, line breaks, and clickable links\\nfunction formatText(text) {\\n  return text\\n    .replace(/\\\\*\\\\*(.*?)\\\\*\\\\*/g, '<strong>$1</strong>')\\n    .replace(/\\\\n/g, '\\\\n')\\n    .replace(/(https?:\\\\/\\\\/[^\\\\s]+)/g, '<a href=\\\"$1\\\" target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\">$1</a>');\\n}\\n\\n// Append messages with enhanced formatting\\nfunction append(role, text) {\\n  const row = document.createElement('div');\\n  row.className = `xa-msg ${role}`;\\n  const bub = document.createElement('div');\\n  bub.className = 'xa-bubble';\\n  \\n  if (role === 'user') {\\n    bub.textContent = text;\\n  } else {\\n    bub.innerHTML = formatText(text);\\n  }\\n  \\n  row.appendChild(bub);\\n  $log.appendChild(row);\\n  $log.scrollTop = $log.scrollHeight;\\n}\\n\\n// Show typing indicator\\nfunction showTyping() {\\n  const typing = document.createElement('div');\\n  typing.className = 'xa-typing';\\n  typing.id = 'typing-indicator';\\n  typing.innerHTML = `\\n    <div class=\\\"xa-typing-dots\\\">\\n      <div class=\\\"xa-typing-dot\\\"></div>\\n      <div class=\\\"xa-typing-dot\\\"></div>\\n      <div class=\\\"xa-typing-dot\\\"></div>\\n    </div>\\n    <span>Xentillus is typing</span>\\n  `;\\n  $typingContainer.appendChild(typing);\\n  $log.scrollTop = $log.scrollHeight;\\n}\\n\\n// Hide typing indicator\\nfunction hideTyping() {\\n  const typing = document.getElementById('typing-indicator');\\n  if (typing) typing.remove();\\n}\\n\\n// Auto-resize textarea\\nfunction autoResize() {\\n  $input.style.height = 'auto';\\n  $input.style.height = Math.min($input.scrollHeight, 120) + 'px';\\n}\\n\\n$input.addEventListener('input', autoResize);\\n\\n// Toggle chat\\n$toggle.addEventListener('click', () => {\\n  $box.classList.toggle('open');\\n  if (!$box.classList.contains('open')) return;\\n  \\n  if (!greeted) {\\n    const greet = \\\"👋 Hey! I'm Xentillus. Want me to show you how we can grow your brand with **Kronx** services?\\\\n\\\\nFeel free to ask me anything about our **AI automation solutions**!\\\";\\n    append('assistant', greet);\\n    history.push({role: 'assistant', text: greet});\\n    greeted = true;\\n  }\\n  $input.focus();\\n});\\n\\n// Close chat with X button\\n$close.addEventListener('click', () => $box.classList.remove('open'));\\n\\n// Quick suggestion click\\n$quick.addEventListener('click', () => {\\n  $box.classList.add('open');\\n  $input.value = $quick.textContent.replace('✨ ', '');\\n  sendMessage();\\n});\\n\\n// Enter sends message (Shift+Enter for new line)\\n$input.addEventListener('keydown', e => {\\n  if (e.key === 'Enter' && !e.shiftKey) {\\n    e.preventDefault();\\n    $form.requestSubmit();\\n  }\\n});\\n\\n// Form submit\\n$form.addEventListener('submit', async e => {\\n  e.preventDefault();\\n  sendMessage();\\n});\\n\\nasync function sendMessage() {\\n  const text = $input.value.trim();\\n  if (!text) return;\\n  \\n  $input.value = '';\\n  autoResize();\\n  append('user', text);\\n  history.push({role: 'user', text});\\n  \\n  // Disable send button and show typing\\n  $send.disabled = true;\\n  showTyping();\\n\\n  try {\\n    const reply = await callGemini(history);\\n    hideTyping();\\n    append('assistant', reply);\\n    history.push({role: 'assistant', text: reply});\\n  } catch (err) {\\n    hideTyping();\\n    append('assistant', '⚠️ Connection error. Please try again.');\\n    console.error('Chat error:', err);\\n  } finally {\\n    $send.disabled = false;\\n  }\\n}\\n\\n// Backend call with session ID\\nasync function callGemini(hist) {\\n  const contents = hist.map(m => ({\\n    role: m.role === 'assistant' ? 'model' : m.role, \\n    parts: [{text: m.text}]\\n  }));\\n  \\n  const res = await fetch(ENDPOINT, {\\n    method: 'POST',\\n    headers: {'Content-Type': 'application/json'},\\n    body: JSON.stringify({\\n      contents,\\n      sessionId\\n    })\\n  });\\n  \\n  if (!res.ok) { \\n    throw new Error(await res.text()); \\n  }\\n  \\n  const data = await res.json();\\n  return data?.candidates?.[0]?.content?.parts?.map(p => p.text).join(' ') || 'Sorry, I couldn\\\\'t generate a response.';\\n}\\n</script>\",customHTMLHeadEnd:\"<style>\\n:root {\\n  --accent: #814AC8;\\n  --accent-hover: #9457d1;\\n  --bubble: #6939a8;\\n  --bubble-hover: #7a4bb8;\\n  --text-on: #fff;\\n  --bg: #0b0b0b;\\n  --bg-light: #1a1a1a;\\n  --border: #333;\\n  --radius: 18px;\\n  --shadow: 0 10px 30px rgba(0,0,0,.45);\\n  --shadow-light: 0 4px 12px rgba(0,0,0,.25);\\n}\\n\\n#xentillus {\\n  position: fixed; bottom: 20px; right: 20px; z-index: 9999;\\n  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;\\n  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;\\n}\\n\\n#xa-toggle {\\n  width: 64px; height: 64px; border-radius: 50%; border: none;\\n  background: linear-gradient(135deg, var(--accent), var(--bubble));\\n  color: var(--text-on); font-size: 28px; cursor: pointer; \\n  box-shadow: var(--shadow); transition: all 0.3s ease;\\n  display: flex; align-items: center; justify-content: center;\\n}\\n\\n#xa-toggle:hover {\\n  transform: translateY(-2px);\\n  box-shadow: 0 15px 40px rgba(0,0,0,.5);\\n  background: linear-gradient(135deg, var(--accent-hover), var(--bubble-hover));\\n}\\n\\n#xa-quick-collapsed {\\n  margin-bottom: 6px;\\n  display: flex; justify-content: center; width: 100%;\\n}\\n\\n#xa-quick {\\n  background: rgba(28, 28, 28, 0.95); color: #fff; border: 1px solid var(--border);\\n  border-radius: 14px; padding: .5rem .75rem; cursor: pointer; font-size: .83rem;\\n  backdrop-filter: blur(10px); transition: all 0.3s ease;\\n  box-shadow: var(--shadow-light);\\n}\\n\\n#xa-quick:hover { \\n  background: rgba(38, 38, 38, 0.95); \\n  border-color: #444;\\n  transform: translateY(-1px);\\n}\\n\\n#xa-box {\\n  display: none; position: absolute; bottom: 15px; right: 0;\\n  width: 360px; height: 480px; \\n  background: var(--bg); color: #fff;\\n  border-radius: var(--radius); overflow: hidden; \\n  box-shadow: var(--shadow); flex-direction: column;\\n  border: 1px solid var(--border);\\n  backdrop-filter: blur(10px);\\n}\\n\\n#xa-box.open { display: flex; animation: slideUp 0.3s ease-out; }\\n\\n@keyframes slideUp {\\n  from { opacity: 0; transform: translateY(20px); }\\n  to { opacity: 1; transform: translateY(0); }\\n}\\n\\n#xa-header {\\n  background: linear-gradient(135deg, var(--accent), var(--bubble));\\n  color: var(--text-on); padding: 0.7rem 1rem; \\n  display: flex; justify-content: space-between; align-items: center;\\n  border-bottom: 1px solid rgba(255,255,255,0.1);\\n}\\n\\n.xa-header-content {\\n  display: flex; align-items: center; gap: 12px;\\n}\\n\\n.xa-avatar {\\n  width: 40px; height: 40px; border-radius: 50%;\\n  background: rgba(255,255,255,0.2);\\n  display: flex; align-items: center; justify-content: center;\\n  font-size: 16px; backdrop-filter: blur(10px);\\n  font-weight: 700; letter-spacing: -0.5px;\\n}\\n\\n.xa-header-text .xa-title {\\n  font-weight: 700; font-size: 14px;\\n}\\n\\n.xa-status {\\n  display: flex; align-items: center; gap: 6px;\\n  font-size: 10px; opacity: 0.9;\\n}\\n\\n.xa-status-dot {\\n  width: 6px; height: 6px; border-radius: 50%;\\n  background: #4ade80; animation: pulse 2s infinite;\\n}\\n\\n@keyframes pulse {\\n  0%, 100% { opacity: 1; }\\n  50% { opacity: 0.5; }\\n}\\n\\n#xa-header button { \\n  background: transparent; border: none; color: var(--text-on); \\n  font-size: 18px; cursor: pointer; padding: 6px;\\n  border-radius: 6px; transition: all 0.2s ease;\\n}\\n\\n#xa-header button:hover {\\n  background: rgba(255,255,255,0.1);\\n}\\n\\n#xa-messages { \\n  flex: 1; overflow-y: auto; padding: .8rem; \\n  display: flex; flex-direction: column; gap: .8rem;\\n  scrollbar-width: thin;\\n  scrollbar-color: var(--border) transparent;\\n}\\n\\n#xa-messages::-webkit-scrollbar {\\n  width: 6px;\\n}\\n\\n#xa-messages::-webkit-scrollbar-track {\\n  background: transparent;\\n}\\n\\n#xa-messages::-webkit-scrollbar-thumb {\\n  background: var(--border);\\n  border-radius: 3px;\\n}\\n\\n.xa-msg { display: flex; animation: messageSlide 0.3s ease-out; }\\n.xa-msg.user { justify-content: flex-end; }\\n\\n@keyframes messageSlide {\\n  from { opacity: 0; transform: translateY(10px); }\\n  to { opacity: 1; transform: translateY(0); }\\n}\\n\\n.xa-bubble {\\n  background: var(--bubble); color: var(--text-on); max-width: 80%; \\n  padding: .7rem .95rem; border-radius: var(--radius);\\n  line-height: 1.4; word-wrap: break-word; font-size: 14px;\\n  box-shadow: var(--shadow-light);\\n  white-space: pre-wrap;\\n}\\n\\n.xa-msg.user .xa-bubble { \\n  background: linear-gradient(135deg, var(--accent), var(--accent-hover));\\n}\\n\\n.xa-msg.assistant .xa-bubble {\\n  background: linear-gradient(135deg, var(--bubble), var(--bubble-hover));\\n}\\n\\n.xa-bubble strong {\\n  font-weight: 700;\\n  color: rgba(255, 255, 255, 0.95);\\n}\\n\\n.xa-bubble a {\\n  color: #60a5fa;\\n  text-decoration: underline;\\n  transition: color 0.2s ease;\\n}\\n\\n.xa-bubble a:hover {\\n  color: #93c5fd;\\n}\\n\\n#xa-typing-container {\\n  padding: 0 .8rem;\\n}\\n\\n.xa-typing {\\n  display: flex; align-items: center; gap: 8px;\\n  padding: .6rem .8rem; color: #999; font-size: .83rem;\\n  animation: fadeIn 0.3s ease;\\n}\\n\\n@keyframes fadeIn {\\n  from { opacity: 0; }\\n  to { opacity: 1; }\\n}\\n\\n.xa-typing-dots {\\n  display: flex; gap: 4px;\\n}\\n\\n.xa-typing-dot {\\n  width: 4px; height: 4px; border-radius: 50%;\\n  background: #666; animation: typingDots 1.4s infinite ease-in-out;\\n}\\n\\n.xa-typing-dot:nth-child(1) { animation-delay: -0.32s; }\\n.xa-typing-dot:nth-child(2) { animation-delay: -0.16s; }\\n\\n@keyframes typingDots {\\n  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }\\n  40% { transform: scale(1); opacity: 1; }\\n}\\n\\n#xa-form { \\n  display: flex; gap: .4rem; padding: .5rem; \\n  border-top: 1px solid var(--border); \\n  background: var(--bg);\\n}\\n\\n#xa-input { \\n  flex: 1; min-height: 36px; max-height: 120px; resize: none; \\n  border: none; outline: none; \\n  background: var(--bg-light); color: #fff; \\n  padding: .5rem .65rem; border-radius: 10px;\\n  border: 1px solid var(--border);\\n  transition: border-color 0.2s ease;\\n  font-family: inherit; line-height: 1.4; font-size: 14px;\\n}\\n\\n#xa-input:focus {\\n  border-color: var(--accent);\\n  box-shadow: 0 0 0 2px rgba(129, 74, 200, 0.2);\\n}\\n\\n#xa-send { \\n  background: linear-gradient(135deg, var(--accent), var(--bubble));\\n  color: var(--text-on); border: none; border-radius: 10px; \\n  padding: 0 12px; cursor: pointer;\\n  transition: all 0.2s ease;\\n  display: flex; align-items: center; justify-content: center;\\n  min-width: 44px; height: 38px;\\n}\\n\\n#xa-send:hover {\\n  background: linear-gradient(135deg, var(--accent-hover), var(--bubble-hover));\\n  transform: translateY(-1px);\\n}\\n\\n#xa-send:disabled {\\n  opacity: 0.6; cursor: not-allowed;\\n  transform: none;\\n}\\n\\n@media (max-width: 420px) { \\n  #xa-box { width: 92vw; height: 70vh; right: -6vw; } \\n}\\n</style>\",description:\"Kronx Studios specializes in AI-powered web development, automation solutions, and Social media strategies. We help startups and businesses accelerate growth, improve efficiency, and create memorable digital experiences\",favicon:\"https://framerusercontent.com/assets/S5bElawc9xv8BGFudoWegvcH0M.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/srcHG3VTBdxiGa5C9y9OdNtwlNQ.png\",title:\"Kronx Studios • AI-Powered Web & Workflow Solutions\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"2DACA,SAAwB,EAAS,EAAO,EAAa,CAAC,MAAM,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAoxM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAA+gN,YAAY,8NAA8N,QAAQ,sEAAsE,OAAO,0BAA0B,YAAY,uEAAuE,MAAM,sDAAsD"}