{"version":3,"file":"ng-qcauto.mjs","sources":["../../../projects/ng-qcauto/src/lib/qc-hash.util.ts","../../../projects/ng-qcauto/src/lib/qc-dompath.util.ts","../../../projects/ng-qcauto/src/lib/qc-auto-global.ts","../../../projects/ng-qcauto/src/public-api.ts","../../../projects/ng-qcauto/src/ng-qcauto.ts"],"sourcesContent":["export function hashBase36(input: string): string {\r\n  let h1 = 0x811c9dc5, h2 = 0x811c9dc5;\r\n  for (let i = 0; i < input.length; i++) {\r\n    const c = input.charCodeAt(i);\r\n    h1 ^= c; h1 = Math.imul(h1, 0x01000193);\r\n    h2 ^= (c << 1); h2 = Math.imul(h2, 0x01000193);\r\n  }\r\n  const mixed = (h1 ^ (h2 >>> 7)) >>> 0;\r\n  return mixed.toString(36);\r\n}\r\n","// qc-dompath.util.ts\r\nexport function domPathWithinHost(el: Element, host: Element): string {\r\n  const parts: string[] = [];\r\n  let node: Element | null = el;\r\n\r\n  while (node && node !== host && node.nodeType === Node.ELEMENT_NODE) {\r\n    const tag = node.tagName.toLowerCase();\r\n    // nth-of-type among element siblings with the same tag (more stable than nth-child)\r\n    let index = 1;\r\n    let sib = node.previousElementSibling;\r\n    while (sib) {\r\n      if (sib.tagName.toLowerCase() === tag) index++;\r\n      sib = sib.previousElementSibling;\r\n    }\r\n    parts.push(`${tag}:${index}`);\r\n    node = node.parentElement;\r\n  }\r\n\r\n  return parts.reverse().join('>');\r\n}\r\n","// qc-auto-global.ts\r\nimport { hashBase36 } from './qc-hash.util';\r\nimport { domPathWithinHost } from './qc-dompath.util';\r\n\r\nexport interface QcAutoConfig {\r\n  tags: string[];\r\n  classes: string[];\r\n  ids: string[];\r\n  clickToCopy?: boolean;\r\n}\r\n\r\nfunction loadConfigFromStorage(): QcAutoConfig {\r\n  const getArray = (key: string): string[] => {\r\n    const raw = localStorage.getItem(key);\r\n    try {\r\n      return raw ? JSON.parse(raw) : [];\r\n    } catch {\r\n      return [];\r\n    }\r\n  };\r\n  const clickToCopy = localStorage.getItem('qcAuto-clickToCopy');\r\n  return {\r\n    tags: getArray('qcAuto-tags'),\r\n    classes: getArray('qcAuto-classes'),\r\n    ids: getArray('qcAuto-ids'),\r\n    clickToCopy: clickToCopy === 'true',\r\n  };\r\n}\r\n\r\nfunction ensureDefaults() {\r\n  if (localStorage.getItem('qcAuto-tags') === null) {\r\n    // Default to clickable and form-related HTML tags only\r\n    const defaultTags = [\r\n      'a', 'button', 'input', 'textarea', 'select', 'form',\r\n      'label', 'option', 'img'\r\n    ];\r\n    localStorage.setItem('qcAuto-tags', JSON.stringify(defaultTags));\r\n  }\r\n  if (localStorage.getItem('qcAuto-classes') === null) {\r\n    localStorage.setItem('qcAuto-classes', JSON.stringify([]));\r\n  }\r\n  if (localStorage.getItem('qcAuto-ids') === null) {\r\n    localStorage.setItem('qcAuto-ids', JSON.stringify([]));\r\n  }\r\n  if (localStorage.getItem('qcAuto-clickToCopy') === null) {\r\n    localStorage.setItem('qcAuto-clickToCopy', 'true');\r\n  }\r\n}\r\n\r\nlet CONFIG: QcAutoConfig = { tags: [], classes: [], ids: [], clickToCopy: true };\r\nlet mutationObserver: MutationObserver | null = null;\r\n\r\nfunction getCurrentRoutePath(): string {\r\n  const path = window.location.pathname;\r\n  // Clean up the path: remove leading/trailing slashes, replace slashes with underscores\r\n  return path\r\n    .replace(/^\\/+|\\/+$/g, '') // Remove leading/trailing slashes\r\n    .replace(/\\//g, '_') // Replace slashes with underscores\r\n    .replace(/[^a-zA-Z0-9_-]/g, '') || 'home'; // Remove special chars, default to 'home'\r\n}\r\n\r\nexport function initQcAutoGlobal() {\r\n  ensureDefaults();\r\n  CONFIG = loadConfigFromStorage();\r\n  console.log('QC-Auto initialized with config:', CONFIG);\r\n\r\n  // Inject styles for modal and toast\r\n  injectModalStyles();\r\n\r\n  // Setup keyboard shortcut listener (Ctrl+Q)\r\n  setupKeyboardShortcut();\r\n\r\n  // Setup click-to-copy if enabled\r\n  if (CONFIG.clickToCopy) {\r\n    setupClickToCopy();\r\n  }\r\n\r\n  // Initial scan\r\n  document.querySelectorAll('*').forEach(el => {\r\n    assignQcId(el);\r\n  });\r\n\r\n  // Watch DOM changes\r\n  mutationObserver = new MutationObserver(muts => {\r\n    muts.forEach(m => {\r\n      m.addedNodes.forEach(node => {\r\n        if (node instanceof Element) {\r\n          if (matchesTarget(node)) {\r\n            assignQcId(node);\r\n          }\r\n          node.querySelectorAll?.('*').forEach(el => {\r\n            assignQcId(el);\r\n          });\r\n        }\r\n      });\r\n    });\r\n  });\r\n  mutationObserver.observe(document.body, { childList: true, subtree: true });\r\n}\r\n\r\nfunction matchesTarget(el: Element): boolean {\r\n  const tag = el.tagName.toLowerCase();\r\n  if (CONFIG.tags?.includes(tag)) return true;\r\n  if (CONFIG.classes?.some(cls => el.classList.contains(cls))) return true;\r\n  if (CONFIG.ids?.includes(el.id)) return true;\r\n  return false;\r\n}\r\n\r\nfunction assignQcId(el: Element) {\r\n  if (el.hasAttribute('data-qcauto')) return;\r\n  if (!matchesTarget(el)) return;\r\n\r\n  const routePath = getCurrentRoutePath();\r\n  const key = el.getAttribute('data-qc-key');\r\n  let basis: string;\r\n\r\n  if (key) {\r\n    basis = `${routePath}|${el.tagName}|${key}`;\r\n  } else {\r\n    const path = domPathWithinHost(el, document.body);\r\n    basis = `${routePath}|${el.tagName}|${el.id}|${Array.from(el.classList).join('.') || ''}|${path}`;\r\n  }\r\n\r\n  const id = el.id\r\n    ? `qc_${routePath}_${el.tagName.toLowerCase()}_${el.id}`\r\n    : `qc_${routePath}_${el.tagName.toLowerCase()}_${hashBase36(basis)}`;\r\n\r\n  el.setAttribute('data-qcauto', id);\r\n\r\n  // Add cursor pointer if click-to-copy is enabled\r\n  if (CONFIG.clickToCopy) {\r\n    (el as HTMLElement).style.cursor = 'pointer';\r\n  }\r\n}\r\n\r\n// Click-to-Copy System\r\nfunction setupClickToCopy() {\r\n  document.body.addEventListener('contextmenu', (e: MouseEvent) => {\r\n    const target = e.target as Element;\r\n\r\n    // Don't copy if clicking on modal elements\r\n    if (target.closest('.qc-config-modal')) return;\r\n\r\n    // Find the closest element with data-qcauto attribute\r\n    const qcElement = target.closest('[data-qcauto]');\r\n    if (qcElement) {\r\n      const qcId = qcElement.getAttribute('data-qcauto');\r\n      if (qcId) {\r\n        e.preventDefault(); // Prevent context menu from showing\r\n        e.stopPropagation();\r\n        copyToClipboard(qcId);\r\n      }\r\n    }\r\n  }, true); // Use capture phase to catch events early\r\n}\r\n\r\nfunction copyToClipboard(text: string) {\r\n  navigator.clipboard.writeText(text).then(() => {\r\n    console.log('Copied to clipboard:', text);\r\n    showToast(`✓ ${text}`);\r\n  }).catch(err => {\r\n    console.error('Failed to copy:', err);\r\n    // Fallback method\r\n    const textarea = document.createElement('textarea');\r\n    textarea.value = text;\r\n    textarea.style.position = 'fixed';\r\n    textarea.style.opacity = '0';\r\n    document.body.appendChild(textarea);\r\n    textarea.select();\r\n    document.execCommand('copy');\r\n    document.body.removeChild(textarea);\r\n    showToast(`✓ ${text}`);\r\n  });\r\n}\r\n\r\nfunction showToast(message: string) {\r\n  const toast = document.createElement('div');\r\n  toast.className = 'qc-toast';\r\n  toast.textContent = message;\r\n  document.body.appendChild(toast);\r\n  setTimeout(() => toast.remove(), 2000);\r\n}\r\n\r\n// Keyboard Shortcut System (Ctrl+Q)\r\nlet keySequence: string[] = [];\r\nlet keySequenceTimeout: any = null;\r\n\r\nfunction setupKeyboardShortcut() {\r\n  document.addEventListener('keydown', (e: KeyboardEvent) => {\r\n    if (e.ctrlKey || e.metaKey) {\r\n      keySequence.push(e.key.toLowerCase());\r\n\r\n      // Clear timeout if exists\r\n      if (keySequenceTimeout) {\r\n        clearTimeout(keySequenceTimeout);\r\n      }\r\n\r\n      // Reset sequence after 1 second\r\n      keySequenceTimeout = setTimeout(() => {\r\n        keySequence = [];\r\n      }, 1000);\r\n\r\n      // Check if sequence matches Ctrl+Q\r\n      const sequenceStr = keySequence.join('');\r\n      if (sequenceStr.includes('q')) {\r\n        e.preventDefault();\r\n        openConfigModal();\r\n        keySequence = [];\r\n      }\r\n    }\r\n  });\r\n}\r\n\r\n// Configuration Modal\r\nfunction openConfigModal() {\r\n  // Remove existing modal if any\r\n  const existing = document.querySelector('.qc-config-modal');\r\n  if (existing) {\r\n    existing.remove();\r\n    return;\r\n  }\r\n\r\n  const modal = document.createElement('div');\r\n  modal.className = 'qc-config-modal';\r\n\r\n  const currentConfig = loadConfigFromStorage();\r\n\r\n  modal.innerHTML = `\r\n    <div class=\"qc-modal-content\">\r\n      <div class=\"qc-modal-header\">\r\n        <h2>QC Auto Configuration</h2>\r\n        <button class=\"qc-modal-close\">&times;</button>\r\n      </div>\r\n      <div class=\"qc-modal-body\">\r\n        <div class=\"qc-form-group\">\r\n          <label for=\"qc-tags\">Tags (comma-separated):</label>\r\n          <input\r\n            type=\"text\"\r\n            id=\"qc-tags\"\r\n            placeholder=\"e.g., button, input, a\"\r\n            value=\"${currentConfig.tags.join(', ')}\"\r\n          />\r\n        </div>\r\n        <div class=\"qc-form-group\">\r\n          <label for=\"qc-classes\">Classes (comma-separated):</label>\r\n          <input\r\n            type=\"text\"\r\n            id=\"qc-classes\"\r\n            placeholder=\"e.g., btn, form-control\"\r\n            value=\"${currentConfig.classes.join(', ')}\"\r\n          />\r\n        </div>\r\n        <div class=\"qc-form-group\">\r\n          <label for=\"qc-ids\">IDs (comma-separated):</label>\r\n          <input\r\n            type=\"text\"\r\n            id=\"qc-ids\"\r\n            placeholder=\"e.g., submit-btn, user-form\"\r\n            value=\"${currentConfig.ids.join(', ')}\"\r\n          />\r\n        </div>\r\n        <div class=\"qc-form-group qc-checkbox-group\">\r\n          <label>\r\n            <input\r\n              type=\"checkbox\"\r\n              id=\"qc-click-to-copy\"\r\n              ${currentConfig.clickToCopy ? 'checked' : ''}\r\n            />\r\n            Enable Click-to-Copy QC IDs\r\n          </label>\r\n        </div>\r\n      </div>\r\n      <div class=\"qc-modal-footer\">\r\n        <button class=\"qc-btn qc-btn-primary\" id=\"qc-reload-btn\">Save & Reload</button>\r\n        <button class=\"qc-btn qc-btn-secondary\" id=\"qc-cancel-btn\">Cancel</button>\r\n      </div>\r\n    </div>\r\n  `;\r\n\r\n  document.body.appendChild(modal);\r\n  injectModalStyles();\r\n\r\n  // Event listeners\r\n  modal.querySelector('.qc-modal-close')?.addEventListener('click', () => modal.remove());\r\n  modal.querySelector('#qc-cancel-btn')?.addEventListener('click', () => modal.remove());\r\n  modal.querySelector('#qc-reload-btn')?.addEventListener('click', () => {\r\n    saveConfigAndReload(modal);\r\n  });\r\n\r\n  // Close on outside click\r\n  modal.addEventListener('click', (e) => {\r\n    if (e.target === modal) {\r\n      modal.remove();\r\n    }\r\n  });\r\n\r\n  // Focus first input\r\n  setTimeout(() => {\r\n    (modal.querySelector('#qc-tags') as HTMLInputElement)?.focus();\r\n  }, 100);\r\n}\r\n\r\nfunction saveConfigAndReload(modal: HTMLElement) {\r\n  const tagsInput = (modal.querySelector('#qc-tags') as HTMLInputElement).value;\r\n  const classesInput = (modal.querySelector('#qc-classes') as HTMLInputElement).value;\r\n  const idsInput = (modal.querySelector('#qc-ids') as HTMLInputElement).value;\r\n  const clickToCopy = (modal.querySelector('#qc-click-to-copy') as HTMLInputElement).checked;\r\n\r\n  // Parse and save\r\n  const tags = tagsInput.split(',').map(s => s.trim()).filter(s => s);\r\n  const classes = classesInput.split(',').map(s => s.trim()).filter(s => s);\r\n  const ids = idsInput.split(',').map(s => s.trim()).filter(s => s);\r\n\r\n  localStorage.setItem('qcAuto-tags', JSON.stringify(tags));\r\n  localStorage.setItem('qcAuto-classes', JSON.stringify(classes));\r\n  localStorage.setItem('qcAuto-ids', JSON.stringify(ids));\r\n  localStorage.setItem('qcAuto-clickToCopy', String(clickToCopy));\r\n\r\n  console.log('Configuration saved:', { tags, classes, ids, clickToCopy });\r\n\r\n  // Reload the page\r\n  window.location.reload();\r\n}\r\n\r\nfunction injectModalStyles() {\r\n  if (document.getElementById('qc-auto-styles')) return;\r\n\r\n  const style = document.createElement('style');\r\n  style.id = 'qc-auto-styles';\r\n  style.textContent = `\r\n    /* Force LTR direction and prevent color overrides */\r\n    .qc-config-modal,\r\n    .qc-config-modal * {\r\n      direction: ltr !important;\r\n      color: inherit !important;\r\n    }\r\n\r\n    .qc-config-modal {\r\n      position: fixed;\r\n      top: 0;\r\n      left: 0;\r\n      width: 100%;\r\n      height: 100%;\r\n      background: rgba(0, 0, 0, 0.5);\r\n      display: flex;\r\n      align-items: center;\r\n      justify-content: center;\r\n      z-index: 999999;\r\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\r\n    }\r\n\r\n    .qc-modal-content {\r\n      background: white;\r\n      border-radius: 8px;\r\n      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\r\n      width: 90%;\r\n      max-width: 500px;\r\n      max-height: 90vh;\r\n      overflow-y: auto;\r\n    }\r\n\r\n    .qc-modal-header {\r\n      padding: 20px;\r\n      border-bottom: 1px solid #e0e0e0;\r\n      display: flex;\r\n      justify-content: space-between;\r\n      align-items: center;\r\n    }\r\n\r\n    .qc-modal-header h2 {\r\n      margin: 0;\r\n      font-size: 20px;\r\n      color: #333 !important;\r\n    }\r\n\r\n    .qc-modal-close {\r\n      background: none;\r\n      border: none;\r\n      font-size: 28px;\r\n      cursor: pointer;\r\n      color: #999 !important;\r\n      padding: 0;\r\n      width: 30px;\r\n      height: 30px;\r\n      display: flex;\r\n      align-items: center;\r\n      justify-content: center;\r\n      line-height: 1;\r\n    }\r\n\r\n    .qc-modal-close:hover {\r\n      color: #333 !important;\r\n    }\r\n\r\n    .qc-modal-body {\r\n      padding: 20px;\r\n    }\r\n\r\n    .qc-form-group {\r\n      margin-bottom: 20px;\r\n    }\r\n\r\n    .qc-form-group label {\r\n      display: block;\r\n      margin-bottom: 8px;\r\n      font-weight: 600;\r\n      color: #333 !important;\r\n      font-size: 14px;\r\n    }\r\n\r\n    .qc-form-group input[type=\"text\"] {\r\n      width: 100%;\r\n      padding: 10px;\r\n      border: 1px solid #ddd;\r\n      border-radius: 4px;\r\n      font-size: 14px;\r\n      box-sizing: border-box;\r\n    }\r\n\r\n    .qc-form-group input[type=\"text\"]:focus {\r\n      outline: none;\r\n      border-color: #4CAF50 !important;\r\n    }\r\n\r\n    .qc-checkbox-group label {\r\n      display: flex;\r\n      align-items: center;\r\n      cursor: pointer;\r\n      font-weight: normal;\r\n    }\r\n\r\n    .qc-checkbox-group input[type=\"checkbox\"] {\r\n      margin-right: 8px;\r\n      width: 18px;\r\n      height: 18px;\r\n      cursor: pointer;\r\n    }\r\n\r\n    .qc-modal-footer {\r\n      padding: 20px;\r\n      border-top: 1px solid #e0e0e0;\r\n      display: flex;\r\n      gap: 10px;\r\n      justify-content: flex-end;\r\n    }\r\n\r\n    .qc-btn {\r\n      padding: 10px 20px;\r\n      border: none;\r\n      border-radius: 4px;\r\n      cursor: pointer;\r\n      font-size: 14px;\r\n      font-weight: 600;\r\n      transition: all 0.2s;\r\n    }\r\n\r\n    .qc-btn-primary {\r\n      background: #4CAF50 !important;\r\n      color: white !important;\r\n    }\r\n\r\n    .qc-btn-primary:hover {\r\n      background: #45a049 !important;\r\n    }\r\n\r\n    .qc-btn-secondary {\r\n      background: #f0f0f0 !important;\r\n      color: #333 !important;\r\n    }\r\n\r\n    .qc-btn-secondary:hover {\r\n      background: #e0e0e0 !important;\r\n    }\r\n\r\n    /* Toast notification */\r\n    .qc-toast {\r\n      position: fixed;\r\n      bottom: 20px;\r\n      right: 20px;\r\n      background: #323232 !important;\r\n      color: white !important;\r\n      padding: 12px 20px;\r\n      border-radius: 4px;\r\n      z-index: 1000000;\r\n      animation: qc-toast-in 0.3s ease-out;\r\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\r\n      font-size: 14px;\r\n    }\r\n\r\n    @keyframes qc-toast-in {\r\n      from {\r\n        transform: translateY(100px);\r\n        opacity: 0;\r\n      }\r\n      to {\r\n        transform: translateY(0);\r\n        opacity: 1;\r\n      }\r\n    }\r\n  `;\r\n  document.head.appendChild(style);\r\n}\r\n","/*\r\n * Public API Surface of ng-qcauto\r\n */\r\n\r\nexport * from './lib/qc-auto-global';\r\nexport * from './lib/qc-dompath.util';\r\nexport * from './lib/qc-hash.util';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAM,SAAU,UAAU,CAAC,KAAa,EAAA;AACtC,IAAA,IAAI,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,UAAU;AACpC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;QAC7B,EAAE,IAAI,CAAC;QAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC;AACvC,QAAA,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,CAAC;IAChD;AACA,IAAA,MAAM,KAAK,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3B;;ACTA;AACM,SAAU,iBAAiB,CAAC,EAAW,EAAE,IAAa,EAAA;IAC1D,MAAM,KAAK,GAAa,EAAE;IAC1B,IAAI,IAAI,GAAmB,EAAE;AAE7B,IAAA,OAAO,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY,EAAE;QACnE,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;;QAEtC,IAAI,KAAK,GAAG,CAAC;AACb,QAAA,IAAI,GAAG,GAAG,IAAI,CAAC,sBAAsB;QAC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