{"version":3,"sources":["#style-inject:#style-inject","../src/styles/global.css","../src/ElementSelector.tsx","../src/utils.ts","../src/styles/selector-styles.ts","../src/ElementHighlighter.tsx","../src/styles/highlighter-styles.ts","../src/ElementInspector.tsx","../src/constants.ts","../src/styles/bubble-menu-styles.ts","../src/components/bubble-menu/MenuArrow.tsx","../src/Icons.tsx","../src/styles/base-styles.ts","../src/styles/form-styles.ts","../src/components/MentionChat.tsx","../src/stores/workflows.ts","../src/components/Mapper.tsx","../src/components/ui/mention.tsx","../src/components/PromptForm.tsx","../src/styles/expanded-menu-styles.ts","../src/components/bubble-menu/ExpandedMenu.tsx","../src/styles/bubble-button-styles.ts","../src/components/BubbleMenuButton.tsx","../src/components/bubble-menu/FloatingButton.tsx","../src/components/bubble-menu/BubbleMenu.tsx","../src/components/ElementTagLabel.tsx","../src/styles/highlights-styles.ts","../src/components/highlights/HoveredElement.tsx","../src/components/highlights/SelectedElements.tsx","../src/components/InspectionOverlay.tsx","../src/hooks/useDarkMode.ts","../src/hooks/useElementBubblePosition.ts","../src/hooks/useElementSelection.ts","../src/hooks/useIframeMessaging.ts","../src/hooks/useInspector.ts"],"sourcesContent":["\n          export default function styleInject(css, { insertAt } = {}) {\n            if (!css || typeof document === 'undefined') return\n          \n            const head = document.head || document.getElementsByTagName('head')[0]\n            const style = document.createElement('style')\n            style.type = 'text/css'\n          \n            if (insertAt === 'top') {\n              if (head.firstChild) {\n                head.insertBefore(style, head.firstChild)\n              } else {\n                head.appendChild(style)\n              }\n            } else {\n              head.appendChild(style)\n            }\n          \n            if (style.styleSheet) {\n              style.styleSheet.cssText = css\n            } else {\n              style.appendChild(document.createTextNode(css))\n            }\n          }\n          ","import styleInject from '#style-inject';styleInject(\"/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */\\n@layer properties;\\n@layer theme, base, components, utilities;\\n@layer theme {\\n  :root,\\n  :host {\\n    --font-sans:\\n      ui-sans-serif,\\n      system-ui,\\n      sans-serif,\\n      \\\"Apple Color Emoji\\\",\\n      \\\"Segoe UI Emoji\\\",\\n      \\\"Segoe UI Symbol\\\",\\n      \\\"Noto Color Emoji\\\";\\n    --font-mono:\\n      ui-monospace,\\n      SFMono-Regular,\\n      Menlo,\\n      Monaco,\\n      Consolas,\\n      \\\"Liberation Mono\\\",\\n      \\\"Courier New\\\",\\n      monospace;\\n    --color-blue-50: oklch(97% 0.014 254.604);\\n    --color-blue-200: oklch(88.2% 0.059 254.128);\\n    --color-blue-800: oklch(42.4% 0.199 265.638);\\n    --color-blue-950: oklch(28.2% 0.091 267.935);\\n    --color-gray-500: oklch(55.1% 0.027 264.364);\\n    --color-gray-600: oklch(44.6% 0.03 256.802);\\n    --color-black: #000;\\n    --color-white: #fff;\\n    --spacing: 0.25rem;\\n    --text-xs: 0.75rem;\\n    --text-xs--line-height: calc(1 / 0.75);\\n    --text-sm: 0.875rem;\\n    --text-sm--line-height: calc(1.25 / 0.875);\\n    --text-base: 1rem;\\n    --text-base--line-height: calc(1.5 / 1);\\n    --font-weight-semibold: 600;\\n    --radius-sm: 0.25rem;\\n    --radius-md: 0.375rem;\\n    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\\n    --animate-spin: spin 1s linear infinite;\\n    --default-transition-duration: 150ms;\\n    --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\\n    --default-font-family: var(--font-sans);\\n    --default-mono-font-family: var(--font-mono);\\n  }\\n}\\n@layer base {\\n  *,\\n  ::after,\\n  ::before,\\n  ::backdrop,\\n  ::file-selector-button {\\n    box-sizing: border-box;\\n    margin: 0;\\n    padding: 0;\\n    border: 0 solid;\\n  }\\n  html,\\n  :host {\\n    line-height: 1.5;\\n    -webkit-text-size-adjust: 100%;\\n    -moz-tab-size: 4;\\n    -o-tab-size: 4;\\n    tab-size: 4;\\n    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\", \\\"Noto Color Emoji\\\");\\n    font-feature-settings: var(--default-font-feature-settings, normal);\\n    font-variation-settings: var(--default-font-variation-settings, normal);\\n    -webkit-tap-highlight-color: transparent;\\n  }\\n  hr {\\n    height: 0;\\n    color: inherit;\\n    border-top-width: 1px;\\n  }\\n  abbr:where([title]) {\\n    -webkit-text-decoration: underline dotted;\\n    text-decoration: underline dotted;\\n  }\\n  h1,\\n  h2,\\n  h3,\\n  h4,\\n  h5,\\n  h6 {\\n    font-size: inherit;\\n    font-weight: inherit;\\n  }\\n  a {\\n    color: inherit;\\n    -webkit-text-decoration: inherit;\\n    text-decoration: inherit;\\n  }\\n  b,\\n  strong {\\n    font-weight: bolder;\\n  }\\n  code,\\n  kbd,\\n  samp,\\n  pre {\\n    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \\\"Liberation Mono\\\", \\\"Courier New\\\", monospace);\\n    font-feature-settings: var(--default-mono-font-feature-settings, normal);\\n    font-variation-settings: var(--default-mono-font-variation-settings, normal);\\n    font-size: 1em;\\n  }\\n  small {\\n    font-size: 80%;\\n  }\\n  sub,\\n  sup {\\n    font-size: 75%;\\n    line-height: 0;\\n    position: relative;\\n    vertical-align: baseline;\\n  }\\n  sub {\\n    bottom: -0.25em;\\n  }\\n  sup {\\n    top: -0.5em;\\n  }\\n  table {\\n    text-indent: 0;\\n    border-color: inherit;\\n    border-collapse: collapse;\\n  }\\n  :-moz-focusring {\\n    outline: auto;\\n  }\\n  progress {\\n    vertical-align: baseline;\\n  }\\n  summary {\\n    display: list-item;\\n  }\\n  ol,\\n  ul,\\n  menu {\\n    list-style: none;\\n  }\\n  img,\\n  svg,\\n  video,\\n  canvas,\\n  audio,\\n  iframe,\\n  embed,\\n  object {\\n    display: block;\\n    vertical-align: middle;\\n  }\\n  img,\\n  video {\\n    max-width: 100%;\\n    height: auto;\\n  }\\n  button,\\n  input,\\n  select,\\n  optgroup,\\n  textarea,\\n  ::file-selector-button {\\n    font: inherit;\\n    font-feature-settings: inherit;\\n    font-variation-settings: inherit;\\n    letter-spacing: inherit;\\n    color: inherit;\\n    border-radius: 0;\\n    background-color: transparent;\\n    opacity: 1;\\n  }\\n  :where(select:is([multiple], [size])) optgroup {\\n    font-weight: bolder;\\n  }\\n  :where(select:is([multiple], [size])) optgroup option {\\n    padding-inline-start: 20px;\\n  }\\n  ::file-selector-button {\\n    margin-inline-end: 4px;\\n  }\\n  ::-moz-placeholder {\\n    opacity: 1;\\n  }\\n  ::placeholder {\\n    opacity: 1;\\n  }\\n  @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\\n    ::-moz-placeholder {\\n      color: currentcolor;\\n      @supports (color: color-mix(in lab, red, red)) {\\n        color: color-mix(in oklab, currentcolor 50%, transparent);\\n      }\\n    }\\n    ::placeholder {\\n      color: currentcolor;\\n      @supports (color: color-mix(in lab, red, red)) {\\n        color: color-mix(in oklab, currentcolor 50%, transparent);\\n      }\\n    }\\n  }\\n  textarea {\\n    resize: vertical;\\n  }\\n  ::-webkit-search-decoration {\\n    -webkit-appearance: none;\\n  }\\n  ::-webkit-date-and-time-value {\\n    min-height: 1lh;\\n    text-align: inherit;\\n  }\\n  ::-webkit-datetime-edit {\\n    display: inline-flex;\\n  }\\n  ::-webkit-datetime-edit-fields-wrapper {\\n    padding: 0;\\n  }\\n  ::-webkit-datetime-edit,\\n  ::-webkit-datetime-edit-year-field,\\n  ::-webkit-datetime-edit-month-field,\\n  ::-webkit-datetime-edit-day-field,\\n  ::-webkit-datetime-edit-hour-field,\\n  ::-webkit-datetime-edit-minute-field,\\n  ::-webkit-datetime-edit-second-field,\\n  ::-webkit-datetime-edit-millisecond-field,\\n  ::-webkit-datetime-edit-meridiem-field {\\n    padding-block: 0;\\n  }\\n  :-moz-ui-invalid {\\n    box-shadow: none;\\n  }\\n  button,\\n  input:where([type=button], [type=reset], [type=submit]),\\n  ::file-selector-button {\\n    -webkit-appearance: button;\\n    -moz-appearance: button;\\n    appearance: button;\\n  }\\n  ::-webkit-inner-spin-button,\\n  ::-webkit-outer-spin-button {\\n    height: auto;\\n  }\\n  [hidden]:where(:not([hidden=until-found])) {\\n    display: none !important;\\n  }\\n}\\n@layer utilities {\\n  .visible {\\n    visibility: visible;\\n  }\\n  .sr-only {\\n    position: absolute;\\n    width: 1px;\\n    height: 1px;\\n    padding: 0;\\n    margin: -1px;\\n    overflow: hidden;\\n    clip: rect(0, 0, 0, 0);\\n    white-space: nowrap;\\n    border-width: 0;\\n  }\\n  .absolute {\\n    position: absolute;\\n  }\\n  .fixed {\\n    position: fixed;\\n  }\\n  .relative {\\n    position: relative;\\n  }\\n  .static {\\n    position: static;\\n  }\\n  .z-50 {\\n    z-index: 50;\\n  }\\n  .z-\\\\[10001\\\\] {\\n    z-index: 10001;\\n  }\\n  .container {\\n    width: 100%;\\n    @media (width >= 40rem) {\\n      max-width: 40rem;\\n    }\\n    @media (width >= 48rem) {\\n      max-width: 48rem;\\n    }\\n    @media (width >= 64rem) {\\n      max-width: 64rem;\\n    }\\n    @media (width >= 80rem) {\\n      max-width: 80rem;\\n    }\\n    @media (width >= 96rem) {\\n      max-width: 96rem;\\n    }\\n  }\\n  .mr-2 {\\n    margin-right: calc(var(--spacing) * 2);\\n  }\\n  .ml-0 {\\n    margin-left: calc(var(--spacing) * 0);\\n  }\\n  .block {\\n    display: block;\\n  }\\n  .flex {\\n    display: flex;\\n  }\\n  .field-sizing-content {\\n    field-sizing: content;\\n  }\\n  .h-8 {\\n    height: calc(var(--spacing) * 8);\\n  }\\n  .h-\\\\[200px\\\\] {\\n    height: 200px;\\n  }\\n  .max-h-\\\\[200px\\\\] {\\n    max-height: 200px;\\n  }\\n  .min-h-16 {\\n    min-height: calc(var(--spacing) * 16);\\n  }\\n  .w-8 {\\n    width: calc(var(--spacing) * 8);\\n  }\\n  .w-full {\\n    width: 100%;\\n  }\\n  .max-w-\\\\[435px\\\\] {\\n    max-width: 435px;\\n  }\\n  .min-w-\\\\[8rem\\\\] {\\n    min-width: 8rem;\\n  }\\n  .min-w-\\\\[250px\\\\] {\\n    min-width: 250px;\\n  }\\n  .transform {\\n    transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\\n  }\\n  .animate-spin {\\n    animation: var(--animate-spin);\\n  }\\n  .cursor-default {\\n    cursor: default;\\n  }\\n  .resize {\\n    resize: both;\\n  }\\n  .resize-none {\\n    resize: none;\\n  }\\n  .flex-col {\\n    flex-direction: column;\\n  }\\n  .items-center {\\n    align-items: center;\\n  }\\n  .items-start {\\n    align-items: flex-start;\\n  }\\n  .gap-0\\\\.5 {\\n    gap: calc(var(--spacing) * 0.5);\\n  }\\n  .gap-2 {\\n    gap: calc(var(--spacing) * 2);\\n  }\\n  .overflow-hidden {\\n    overflow: hidden;\\n  }\\n  .overflow-y-auto {\\n    overflow-y: auto;\\n  }\\n  .rounded-md {\\n    border-radius: var(--radius-md);\\n  }\\n  .rounded-sm {\\n    border-radius: var(--radius-sm);\\n  }\\n  .border {\\n    border-style: var(--tw-border-style);\\n    border-width: 1px;\\n  }\\n  .\\\\!border-none {\\n    --tw-border-style: none !important;\\n    border-style: none !important;\\n  }\\n  .border-none {\\n    --tw-border-style: none;\\n    border-style: none;\\n  }\\n  .bg-transparent {\\n    background-color: transparent;\\n  }\\n  .bg-white {\\n    background-color: var(--color-white);\\n  }\\n  .fill-black {\\n    fill: var(--color-black);\\n  }\\n  .p-1 {\\n    padding: calc(var(--spacing) * 1);\\n  }\\n  .px-0\\\\.5 {\\n    padding-inline: calc(var(--spacing) * 0.5);\\n  }\\n  .px-1 {\\n    padding-inline: calc(var(--spacing) * 1);\\n  }\\n  .px-2 {\\n    padding-inline: calc(var(--spacing) * 2);\\n  }\\n  .px-3 {\\n    padding-inline: calc(var(--spacing) * 3);\\n  }\\n  .px-4 {\\n    padding-inline: calc(var(--spacing) * 4);\\n  }\\n  .py-1\\\\.5 {\\n    padding-block: calc(var(--spacing) * 1.5);\\n  }\\n  .py-2 {\\n    padding-block: calc(var(--spacing) * 2);\\n  }\\n  .py-3 {\\n    padding-block: calc(var(--spacing) * 3);\\n  }\\n  .text-base {\\n    font-size: var(--text-base);\\n    line-height: var(--tw-leading, var(--text-base--line-height));\\n  }\\n  .text-sm {\\n    font-size: var(--text-sm);\\n    line-height: var(--tw-leading, var(--text-sm--line-height));\\n  }\\n  .text-xs {\\n    font-size: var(--text-xs);\\n    line-height: var(--tw-leading, var(--text-xs--line-height));\\n  }\\n  .text-\\\\[15px\\\\] {\\n    font-size: 15px;\\n  }\\n  .font-semibold {\\n    --tw-font-weight: var(--font-weight-semibold);\\n    font-weight: var(--font-weight-semibold);\\n  }\\n  .\\\\!whitespace-nowrap {\\n    white-space: nowrap !important;\\n  }\\n  .text-gray-500 {\\n    color: var(--color-gray-500);\\n  }\\n  .text-white {\\n    color: var(--color-white);\\n  }\\n  .\\\\!shadow-none {\\n    --tw-shadow: 0 0 #0000 !important;\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow) !important;\\n  }\\n  .shadow-md {\\n    --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow);\\n  }\\n  .shadow-xs {\\n    --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow);\\n  }\\n  .\\\\!ring-0 {\\n    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor) !important;\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow) !important;\\n  }\\n  .ring {\\n    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\\n    box-shadow:\\n      var(--tw-inset-shadow),\\n      var(--tw-inset-ring-shadow),\\n      var(--tw-ring-offset-shadow),\\n      var(--tw-ring-shadow),\\n      var(--tw-shadow);\\n  }\\n  .outline-hidden {\\n    --tw-outline-style: none;\\n    outline-style: none;\\n    @media (forced-colors: active) {\\n      outline: 2px solid transparent;\\n      outline-offset: 2px;\\n    }\\n  }\\n  .outline {\\n    outline-style: var(--tw-outline-style);\\n    outline-width: 1px;\\n  }\\n  .transition {\\n    transition-property:\\n      color,\\n      background-color,\\n      border-color,\\n      outline-color,\\n      text-decoration-color,\\n      fill,\\n      stroke,\\n      --tw-gradient-from,\\n      --tw-gradient-via,\\n      --tw-gradient-to,\\n      opacity,\\n      box-shadow,\\n      transform,\\n      translate,\\n      scale,\\n      rotate,\\n      filter,\\n      -webkit-backdrop-filter,\\n      backdrop-filter,\\n      display,\\n      visibility,\\n      content-visibility,\\n      overlay,\\n      pointer-events;\\n    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\\n    transition-duration: var(--tw-duration, var(--default-transition-duration));\\n  }\\n  .transition-\\\\[color\\\\,box-shadow\\\\] {\\n    transition-property: color, box-shadow;\\n    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\\n    transition-duration: var(--tw-duration, var(--default-transition-duration));\\n  }\\n  .ease-in-out {\\n    --tw-ease: var(--ease-in-out);\\n    transition-timing-function: var(--ease-in-out);\\n  }\\n  .outline-none {\\n    --tw-outline-style: none;\\n    outline-style: none;\\n  }\\n  .select-none {\\n    -webkit-user-select: none;\\n    -moz-user-select: none;\\n    user-select: none;\\n  }\\n  .focus\\\\:outline-none {\\n    &:focus {\\n      --tw-outline-style: none;\\n      outline-style: none;\\n    }\\n  }\\n  .focus-visible\\\\:ring-1 {\\n    &:focus-visible {\\n      --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\\n      box-shadow:\\n        var(--tw-inset-shadow),\\n        var(--tw-inset-ring-shadow),\\n        var(--tw-ring-offset-shadow),\\n        var(--tw-ring-shadow),\\n        var(--tw-shadow);\\n    }\\n  }\\n  .focus-visible\\\\:ring-\\\\[3px\\\\] {\\n    &:focus-visible {\\n      --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\\n      box-shadow:\\n        var(--tw-inset-shadow),\\n        var(--tw-inset-ring-shadow),\\n        var(--tw-ring-offset-shadow),\\n        var(--tw-ring-shadow),\\n        var(--tw-shadow);\\n    }\\n  }\\n  .focus-visible\\\\:outline-hidden {\\n    &:focus-visible {\\n      --tw-outline-style: none;\\n      outline-style: none;\\n      @media (forced-colors: active) {\\n        outline: 2px solid transparent;\\n        outline-offset: 2px;\\n      }\\n    }\\n  }\\n  .disabled\\\\:cursor-not-allowed {\\n    &:disabled {\\n      cursor: not-allowed;\\n    }\\n  }\\n  .disabled\\\\:opacity-50 {\\n    &:disabled {\\n      opacity: 50%;\\n    }\\n  }\\n  .data-disabled\\\\:pointer-events-none {\\n    &[data-disabled] {\\n      pointer-events: none;\\n    }\\n  }\\n  .data-disabled\\\\:opacity-50 {\\n    &[data-disabled] {\\n      opacity: 50%;\\n    }\\n  }\\n  .\\\\*\\\\*\\\\:data-tag\\\\:rounded {\\n    :is(& *) {\\n      &[data-tag] {\\n        border-radius: 0.25rem;\\n      }\\n    }\\n  }\\n  .\\\\*\\\\*\\\\:data-tag\\\\:bg-blue-200 {\\n    :is(& *) {\\n      &[data-tag] {\\n        background-color: var(--color-blue-200);\\n      }\\n    }\\n  }\\n  .\\\\*\\\\*\\\\:data-tag\\\\:py-px {\\n    :is(& *) {\\n      &[data-tag] {\\n        padding-block: 1px;\\n      }\\n    }\\n  }\\n  .\\\\*\\\\*\\\\:data-tag\\\\:text-blue-950 {\\n    :is(& *) {\\n      &[data-tag] {\\n        color: var(--color-blue-950);\\n      }\\n    }\\n  }\\n  .md\\\\:text-sm {\\n    @media (width >= 48rem) {\\n      font-size: var(--text-sm);\\n      line-height: var(--tw-leading, var(--text-sm--line-height));\\n    }\\n  }\\n  .dark\\\\:text-gray-600 {\\n    @media (prefers-color-scheme: dark) {\\n      color: var(--color-gray-600);\\n    }\\n  }\\n  .dark\\\\:\\\\*\\\\*\\\\:data-tag\\\\:bg-blue-800 {\\n    @media (prefers-color-scheme: dark) {\\n      :is(& *) {\\n        &[data-tag] {\\n          background-color: var(--color-blue-800);\\n        }\\n      }\\n    }\\n  }\\n  .dark\\\\:\\\\*\\\\*\\\\:data-tag\\\\:text-blue-50 {\\n    @media (prefers-color-scheme: dark) {\\n      :is(& *) {\\n        &[data-tag] {\\n          color: var(--color-blue-50);\\n        }\\n      }\\n    }\\n  }\\n}\\nbody span[data-tag] {\\n  background-color: #ebf5fb !important;\\n  color: #1566a4 !important;\\n  border-radius: 4px !important;\\n}\\n@property --tw-rotate-x { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-rotate-y { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-rotate-z { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-skew-x { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-skew-y { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-border-style { syntax: \\\"*\\\"; inherits: false; initial-value: solid; }\\n@property --tw-font-weight { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-inset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-shadow-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-shadow-alpha { syntax: \\\"<percentage>\\\"; inherits: false; initial-value: 100%; }\\n@property --tw-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-inset-ring-color { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-inset-ring-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-ring-inset { syntax: \\\"*\\\"; inherits: false; }\\n@property --tw-ring-offset-width { syntax: \\\"<length>\\\"; inherits: false; initial-value: 0px; }\\n@property --tw-ring-offset-color { syntax: \\\"*\\\"; inherits: false; initial-value: #fff; }\\n@property --tw-ring-offset-shadow { syntax: \\\"*\\\"; inherits: false; initial-value: 0 0 #0000; }\\n@property --tw-outline-style { syntax: \\\"*\\\"; inherits: false; initial-value: solid; }\\n@property --tw-ease { syntax: \\\"*\\\"; inherits: false; }\\n@keyframes spin {\\n  to {\\n    transform: rotate(360deg);\\n  }\\n}\\n@layer properties {\\n  @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\\n    *,\\n    ::before,\\n    ::after,\\n    ::backdrop {\\n      --tw-rotate-x: initial;\\n      --tw-rotate-y: initial;\\n      --tw-rotate-z: initial;\\n      --tw-skew-x: initial;\\n      --tw-skew-y: initial;\\n      --tw-border-style: solid;\\n      --tw-font-weight: initial;\\n      --tw-shadow: 0 0 #0000;\\n      --tw-shadow-color: initial;\\n      --tw-shadow-alpha: 100%;\\n      --tw-inset-shadow: 0 0 #0000;\\n      --tw-inset-shadow-color: initial;\\n      --tw-inset-shadow-alpha: 100%;\\n      --tw-ring-color: initial;\\n      --tw-ring-shadow: 0 0 #0000;\\n      --tw-inset-ring-color: initial;\\n      --tw-inset-ring-shadow: 0 0 #0000;\\n      --tw-ring-inset: initial;\\n      --tw-ring-offset-width: 0px;\\n      --tw-ring-offset-color: #fff;\\n      --tw-ring-offset-shadow: 0 0 #0000;\\n      --tw-outline-style: solid;\\n      --tw-ease: initial;\\n    }\\n  }\\n}\\n\")","\"use client\";\nimport React, { useCallback, useRef } from 'react';\nimport { getMostSpecificElementAtPoint } from './utils';\nimport { elementSelectorStyles } from './styles/selector-styles';\n\nexport interface ElementSelectorProps {\n  /**\n   * Callback when an element is hovered\n   */\n  onElementHovered: (element: HTMLElement) => void;\n  \n  /**\n   * Callback when an element is no longer hovered\n   */\n  onElementUnhovered: () => void;\n  \n  /**\n   * Callback when an element is selected\n   */\n  onElementSelected: (element: HTMLElement) => void;\n  \n  /**\n   * List of elements to ignore during selection\n   */\n  ignoreList?: HTMLElement[];\n  \n  /**\n   * CSS selector for elements to exclude\n   */\n  excludeSelector?: string;\n  \n  /**\n   * CSS class name for the selector overlay\n   */\n  className?: string;\n  \n  /**\n   * Custom styles for the selector overlay\n   */\n  style?: React.CSSProperties;\n}\n\n/**\n * ElementSelector component that creates an overlay to select DOM elements\n */\nexport function ElementSelector({\n  onElementHovered,\n  onElementUnhovered,\n  onElementSelected,\n  ignoreList = [],\n  excludeSelector = '',\n  className = '',\n  style = {},\n}: ElementSelectorProps) {\n  const lastHoveredElement = useRef<HTMLElement | null>(null);\n\n  const handleMouseMove = useCallback(\n    (event: React.MouseEvent<HTMLDivElement>) => {\n      const { clientX, clientY } = event;\n      \n      // Hide the overlay temporarily to get accurate element detection\n      const overlayElement = event.currentTarget;\n      if (overlayElement) {\n        overlayElement.style.pointerEvents = 'none';\n      }\n      \n      // Get element at this point (with overlay hidden)\n      const refElement = getMostSpecificElementAtPoint(clientX, clientY, excludeSelector);\n      \n      // Restore the overlay\n      if (overlayElement) {\n        overlayElement.style.pointerEvents = 'auto';\n      }\n      \n      // Ignore if element is in the ignore list\n      if (ignoreList.includes(refElement)) return;\n      \n      // Ignore if element is the overlay itself or a child of it\n      if (refElement === overlayElement || \n          (overlayElement && overlayElement.contains(refElement))) {\n        return;\n      }\n      \n      // Only trigger callback if the hovered element has changed\n      if (lastHoveredElement.current !== refElement) {\n        lastHoveredElement.current = refElement;\n        onElementHovered(refElement);\n      }\n    },\n    [onElementHovered, ignoreList, excludeSelector]\n  );\n\n  const handleMouseLeave = useCallback(() => {\n    lastHoveredElement.current = null;\n    onElementUnhovered();\n  }, [onElementUnhovered]);\n\n  const handleMouseClick = useCallback(\n    (event: React.MouseEvent<HTMLDivElement>) => {\n      // Prevent the default action and stop propagation\n      event.preventDefault();\n      event.stopPropagation();\n      \n      const { clientX, clientY } = event;\n      \n      // Hide the overlay temporarily to get accurate element detection\n      const overlayElement = event.currentTarget;\n      if (overlayElement) {\n        overlayElement.style.pointerEvents = 'none';\n      }\n      \n      // Get the most accurate element at click position\n      const clickedElement = getMostSpecificElementAtPoint(clientX, clientY, excludeSelector);\n      \n      // Restore the overlay\n      if (overlayElement) {\n        overlayElement.style.pointerEvents = 'auto';\n      }\n      \n      // Don't select if it's the overlay\n      if (\n        clickedElement === overlayElement || \n        (overlayElement && overlayElement.contains(clickedElement))\n      ) {\n        return;\n      }\n      \n      // Update last hovered element and trigger selection\n      lastHoveredElement.current = clickedElement;\n      onElementSelected(clickedElement);\n    },\n    [onElementSelected, ignoreList, excludeSelector]\n  );\n\n  return (\n    <div\n      className={`element-selector ${className}`}\n      data-element-selector=\"true\"\n      style={{\n        ...elementSelectorStyles.overlay,\n        ...style,\n      }}\n      onMouseMove={handleMouseMove}\n      onMouseLeave={handleMouseLeave}\n      onClick={handleMouseClick}\n      role=\"button\"\n      tabIndex={0}\n    />\n  );\n}\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Utility functions for DOM element inspection and manipulation\n */\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\n/**\n * Checks if a point is within an element's bounds\n * @param element - The element to check\n * @param clientX - The x coordinate\n * @param clientY - The y coordinate\n * @returns Whether the point is within the element's bounds\n */\nexport const isElementAtPoint = (\n  element: HTMLElement,\n  clientX: number,\n  clientY: number,\n): boolean => {\n  const boundingRect = element.getBoundingClientRect();\n\n  const isInHorizontalBounds =\n    clientX >= boundingRect.left &&\n    clientX <= boundingRect.left + boundingRect.width;\n  const isInVerticalBounds =\n    clientY >= boundingRect.top &&\n    clientY <= boundingRect.top + boundingRect.height;\n\n  return isInHorizontalBounds && isInVerticalBounds;\n};\n\n/**\n * Calculates the percentage offsets from a point to an element\n * @param refElement - The reference element\n * @param x - The x coordinate\n * @param y - The y coordinate\n * @returns The percentage offsets\n */\nexport function getOffsetsFromPointToElement(\n  refElement: HTMLElement,\n  x: number,\n  y: number,\n): { offsetTop: number; offsetLeft: number } {\n  const referenceClientBounds = refElement.getBoundingClientRect();\n\n  const offsetTop =\n    ((y - referenceClientBounds.top) * 100) / referenceClientBounds.height;\n  const offsetLeft =\n    ((x - referenceClientBounds.left) * 100) / referenceClientBounds.width;\n\n  return {\n    offsetTop,\n    offsetLeft,\n  };\n}\n\n/**\n * Gets the XPath for an element\n * @param element - The element to get the XPath for\n * @param useId - Whether to use the element's ID if available\n * @returns The XPath for the element\n */\nexport const getXPathForElement = (element: HTMLElement, useId = true): string => {\n  if (element.id && useId) {\n    return `//*[@id=\"${element.id}\"]`;\n  }\n\n  let nodeElem: HTMLElement | null = element;\n  const parts: string[] = [];\n  while (nodeElem && Node.ELEMENT_NODE === nodeElem.nodeType) {\n    let nbOfPreviousSiblings = 0;\n    let hasNextSiblings = false;\n    let sibling = nodeElem.previousSibling;\n    while (sibling) {\n      if (\n        sibling.nodeType !== Node.DOCUMENT_TYPE_NODE &&\n        sibling.nodeName === nodeElem.nodeName\n      ) {\n        nbOfPreviousSiblings++;\n      }\n      sibling = sibling.previousSibling;\n    }\n    sibling = nodeElem.nextSibling;\n    while (sibling) {\n      if (sibling.nodeName === nodeElem.nodeName) {\n        hasNextSiblings = true;\n        break;\n      }\n      sibling = sibling.nextSibling;\n    }\n    const prefix = nodeElem.prefix ? `${nodeElem.prefix}:` : '';\n    const nth =\n      nbOfPreviousSiblings || hasNextSiblings\n        ? `[${nbOfPreviousSiblings + 1}]`\n        : '';\n    parts.push(prefix + nodeElem.localName + nth);\n    nodeElem = nodeElem.parentElement;\n  }\n  return parts.length ? `/${parts.reverse().join('/')}` : '';\n};\n\n/**\n * Extracts relevant attributes from an HTMLElement\n * @param element - The element to get attributes from\n * @returns An object containing the element's attributes\n */\nexport function getElementAttributes(element: HTMLElement): { [key: string]: string } {\n  const attrs: { [key: string]: string } = {};\n  const priorityAttrs = [\n    'id',\n    'class',\n    'name',\n    'type',\n    'href',\n    'src',\n    'alt',\n    'for',\n    'placeholder',\n  ];\n  const dataAttrs: { name: string; value: string }[] = [];\n\n  for (let i = 0; i < element.attributes.length; i++) {\n    const attr = element.attributes[i];\n    if (attr.name.startsWith('data-')) {\n      dataAttrs.push({ name: attr.name, value: attr.value });\n    } else if (\n      priorityAttrs.includes(attr.name.toLowerCase()) ||\n      attr.name.toLowerCase() !== 'style'\n    ) {\n      attrs[attr.name] = attr.value;\n    }\n  }\n  \n  dataAttrs.forEach((da) => {\n    attrs[da.name] = da.value;\n  });\n  \n  return attrs;\n}\n\n/**\n * Generates a detailed context string for a single HTMLElement\n * @param element - The element to generate context for\n * @param index - The index of the element\n * @param totalElements - The total number of elements\n * @returns A string containing the element's context\n */\nexport function generateElementContext(\n  element: HTMLElement,\n  index: number,\n  totalElements: number,\n): string {\n  let context = \"\";\n  \n  // Only add element numbering if there are multiple elements\n  if (totalElements > 1) {\n    context += `### Element ${index + 1}\\n`;\n  }\n  \n  context += `- **Tag**: ${element.tagName.toLowerCase()}\\n`;\n\n  const id = element.id;\n  if (id) {\n    context += `- **ID**: ${id}\\n`;\n  }\n\n  const classes = Array.from(element.classList).join(', ');\n  if (classes) {\n    context += `- **Classes**: ${classes}\\n`;\n  }\n\n  const attributes = getElementAttributes(element);\n  if (Object.keys(attributes).length > 0) {\n    context += `- **Attributes**:\\n`;\n    for (const [key, value] of Object.entries(attributes)) {\n      if (key.toLowerCase() !== 'class' || !classes) {\n        context += `  - ${key}: ${value}\\n`;\n      }\n    }\n  }\n\n  const text = element.innerText?.trim();\n  if (text) {\n    const maxLength = 100;\n    context += `- **Text**: ${text.length > maxLength ? `${text.substring(0, maxLength)}...` : text}\\n`;\n  }\n\n  context += `- **Structural Context**:\\n`;\n  if (element.parentElement) {\n    const parent = element.parentElement;\n    context += `  - **Parent**:\\n`;\n    context += `    - Tag: ${parent.tagName.toLowerCase()}\\n`;\n    if (parent.id) {\n      context += `    - ID: ${parent.id}\\n`;\n    }\n    const parentClasses = Array.from(parent.classList).join(', ');\n    if (parentClasses) {\n      context += `    - Classes: ${parentClasses}\\n`;\n    }\n  } else {\n    context += `  - **Parent**: No parent element found (likely root or disconnected)\\n`;\n  }\n\n  try {\n    const styles = window.getComputedStyle(element);\n    const relevantStyles = {\n      color: styles.color,\n      backgroundColor: styles.backgroundColor,\n      fontSize: styles.fontSize,\n      fontWeight: styles.fontWeight,\n      display: styles.display,\n    };\n    context += `- **Styles**:\\n`;\n    for (const [key, value] of Object.entries(relevantStyles)) {\n      context += `  - ${key}: ${value}\\n`;\n    }\n  } catch (e) {\n    context += `- **Styles**: Could not retrieve computed styles\\n`;\n  }\n\n  context += `\\n`;\n  return context;\n}\n\n/**\n * Creates a prompt containing information about the selected elements\n * @param selectedElements - The selected elements\n * @param userPrompt - The user's prompt\n * @param url - The page URL\n * @returns A string containing the prompt\n */\nexport function createElementsPrompt(\n  selectedElements: HTMLElement[],\n  userPrompt: string,\n): string {\n  if (!selectedElements || selectedElements.length === 0) {\n    return `\n${userPrompt}\n\n## Context\nNo specific element was selected on the page. Please analyze the page code in general or ask for clarification.`.trim();\n  }\n\n  let detailedContext = '';\n  const totalElements = selectedElements.length;\n  \n  selectedElements.forEach((element, index) => {\n    detailedContext += generateElementContext(element, index, totalElements);\n  });\n\n  // Use singular or plural based on number of selected elements\n  const sectionHeader = totalElements > 1 ? '## Selected Elements' : '## Selected Element';\n\n  return `\n${userPrompt}\n\n${sectionHeader}\n${detailedContext.trim()}`.trim();\n}\n\n/**\n * Finds the most specific/innermost element at a given point\n * @param x - The x coordinate\n * @param y - The y coordinate\n * @param excludeSelector - CSS selector to exclude elements\n * @returns The most specific element at the point\n */\nexport function getMostSpecificElementAtPoint(\n  x: number,\n  y: number,\n  excludeSelector?: string\n): HTMLElement {\n  // Add a default exclude for the element selector itself\n  const fullExcludeSelector = excludeSelector \n    ? `${excludeSelector}, .element-selector, [data-element-selector=\"true\"]` \n    : `.element-selector, [data-element-selector=\"true\"]`;\n    \n  const elements = document.elementsFromPoint(x, y);\n  \n  // Filter out excluded elements and SVG elements\n  const eligibleElements = elements.filter(element => {\n    // Skip the element selector and any specified excludes\n    if (fullExcludeSelector && \n       (element.matches(fullExcludeSelector) || \n        element.closest(fullExcludeSelector))) {\n      return false;\n    }\n    \n    // Skip SVG elements\n    if (element.closest('svg')) {\n      return false;\n    }\n    \n    // Skip the element selector class or attribute\n    if (element.classList.contains('element-selector') || \n        element.hasAttribute('data-element-selector')) {\n      return false;\n    }\n    \n    return isElementAtPoint(element as HTMLElement, x, y);\n  }) as HTMLElement[];\n  \n  if (eligibleElements.length === 0) {\n    return document.body;\n  }\n  \n  // Sort elements by various criteria to find the most specific one\n  const sortedElements = [...eligibleElements].sort((a, b) => {\n    // 1. First check depth - deeper DOM elements are more specific\n    const aDepth = getElementDepth(a);\n    const bDepth = getElementDepth(b);\n    \n    if (aDepth !== bDepth) {\n      return bDepth - aDepth; // Higher depth is more specific\n    }\n    \n    // 2. If at same depth, prefer elements with less children\n    const aChildren = a.children.length;\n    const bChildren = b.children.length;\n    \n    if (aChildren !== bChildren) {\n      return aChildren - bChildren; // Fewer children is more specific\n    }\n    \n    // 3. If still tied, use element area\n    const aRect = a.getBoundingClientRect();\n    const bRect = b.getBoundingClientRect();\n    const aArea = aRect.width * aRect.height;\n    const bArea = bRect.width * bRect.height;\n    return aArea - bArea; // Smaller area is more specific\n  });\n  \n  // Return the most specific eligible element\n  return sortedElements[0];\n}\n\n/**\n * Helper function to calculate the depth of an element in the DOM tree\n * @param element - The element to check\n * @returns The depth of the element\n */\nfunction getElementDepth(element: HTMLElement): number {\n  let depth = 0;\n  let current = element;\n  \n  while (current.parentElement) {\n    depth++;\n    current = current.parentElement;\n  }\n  \n  return depth;\n}\n","\"use client\";\nimport React from 'react';\n\n/**\n * Styles for the ElementSelector component\n */\nexport const elementSelectorStyles = {\n  overlay: {\n    position: 'fixed' as const,\n    inset: 0,\n    height: '100vh',\n    width: '100vw',\n    cursor: 'cell',\n    zIndex: 9999,\n    pointerEvents: 'auto',\n  } as React.CSSProperties\n};\n","\"use client\";\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport { getHighlighterStyles } from './styles/highlighter-styles';\n\nexport interface ElementHighlighterProps {\n  /**\n   * The element to highlight\n   */\n  element: HTMLElement;\n  \n  /**\n   * CSS class for the highlighter\n   */\n  className?: string;\n  \n  /**\n   * Custom styles for the highlighter\n   */\n  style?: React.CSSProperties;\n  \n  /**\n   * Update rate in frames per second (0 to disable updates)\n   */\n  updateRate?: number;\n  \n  /**\n   * Content to render inside the highlighter\n   */\n  children?: React.ReactNode;\n  \n  /**\n   * Border color for the highlighter\n   */\n  borderColor?: string;\n  \n  /**\n   * Background color for the highlighter\n   */\n  backgroundColor?: string;\n}\n\n/**\n * A component that highlights a DOM element with a border\n */\nexport function ElementHighlighter({\n  element,\n  className = '',\n  style = {},\n  updateRate = 30,\n  children,\n  borderColor = 'rgba(59, 130, 246, 0.8)',\n  backgroundColor = 'rgba(59, 130, 246, 0.2)',\n}: ElementHighlighterProps) {\n  const boxRef = useRef<HTMLDivElement>(null);\n  const updateIntervalRef = useRef<number | null>(null);\n\n  const updateBoxPosition = useCallback(() => {\n    if (boxRef.current && element) {\n      const referenceRect = element.getBoundingClientRect();\n\n      boxRef.current.style.top = `${referenceRect.top - 2}px`;\n      boxRef.current.style.left = `${referenceRect.left - 2}px`;\n      boxRef.current.style.width = `${referenceRect.width + 4}px`;\n      boxRef.current.style.height = `${referenceRect.height + 4}px`;\n    }\n  }, [element]);\n\n  // Set up the interval for updating the box position\n  useEffect(() => {\n    updateBoxPosition();\n    \n    if (updateRate > 0) {\n      const intervalId = window.setInterval(() => {\n        updateBoxPosition();\n      }, 1000 / updateRate);\n      \n      updateIntervalRef.current = intervalId;\n      \n      return () => {\n        if (updateIntervalRef.current !== null) {\n          window.clearInterval(updateIntervalRef.current);\n        }\n      };\n    }\n  }, [updateBoxPosition, updateRate]);\n\n  // Also update on window resize\n  useEffect(() => {\n    const handleResize = () => {\n      updateBoxPosition();\n    };\n    \n    window.addEventListener('resize', handleResize);\n    return () => {\n      window.removeEventListener('resize', handleResize);\n    };\n  }, [updateBoxPosition]);\n\n  return (\n    <div\n      className={`element-highlighter ${className}`}\n      style={getHighlighterStyles(borderColor, backgroundColor, style).container}\n      ref={boxRef}\n    >\n      {children}\n    </div>\n  );\n}\n","\"use client\";\nimport React from 'react';\n\n/**\n * Styles for the ElementHighlighter component\n */\nexport const getHighlighterStyles = (\n  borderColor: string = 'rgba(59, 130, 246, 0.8)',\n  backgroundColor: string = 'rgba(59, 130, 246, 0.2)',\n  customStyles: React.CSSProperties = {}\n) => {\n  return {\n    container: {\n      position: 'fixed',\n      display: 'flex',\n      alignItems: 'center',\n      justifyContent: 'center',\n      borderRadius: '4px',\n      border: `2px solid ${borderColor}`,\n      backgroundColor,\n      transition: 'all 100ms',\n      zIndex: 9998,\n      pointerEvents: 'none',\n      ...customStyles,\n    } as React.CSSProperties\n  };\n};\n","\"use client\";\nimport React, { useCallback, useEffect } from 'react';\nimport { BubbleMenu, InspectionOverlay } from './components';\nimport {\n  useDarkMode,\n  useElementBubblePosition,\n  useElementSelection,\n  useIframeMessaging,\n  useInspector\n} from './hooks';\nimport { UI_CONSTANTS } from './constants';\n\nexport interface ElementInspectorProps {\n  /**\n   * Initial state of the inspector (active or not)\n   */\n  initialIsActive?: boolean;\n  \n  /**\n   * CSS selector for elements to exclude from selection\n   */\n  excludeSelector?: string;\n  \n  /**\n   * Custom label for selected elements\n   */\n  elementLabel?: (element: HTMLElement) => React.ReactNode;\n  \n  /**\n   * Custom styles for the selector\n   */\n  selectorStyle?: React.CSSProperties;\n  \n  /**\n   * Custom styles for the highlighter\n   */\n  highlighterStyle?: React.CSSProperties;\n  \n  /**\n   * Whether to show the floating bubble menu button\n   * @default false\n   */\n  showBubbleMenuButton?: boolean;\n}\n\n/**\n * A component that allows inspecting and selecting DOM elements with a UI for interaction\n */\nexport function ElementInspector({\n  initialIsActive = true,\n  excludeSelector = '.element-inspector-bubble, .element-inspector-controls, .element-inspector-mention',\n  elementLabel,\n  selectorStyle,\n  highlighterStyle,\n  showBubbleMenuButton = false,\n}: ElementInspectorProps) {\n  // Custom hooks\n  const isDarkMode = useDarkMode();\n  const { \n    isInIframe, \n    sendSelectedElements, \n    sendPrompt,\n    shouldEnableInspect,\n  } = useIframeMessaging();\n  \n  // Element selection hook\n  const { \n    hoveredElement, \n    selectedElements, \n    handleElementHovered, \n    handleElementUnhovered, \n    handleElementSelected,\n    clearSelections \n  } = useElementSelection({\n    onElementsSelected: (elements) => {\n      // Send selected elements to parent frame if in iframe\n      if (isInIframe) {\n        sendSelectedElements(elements);\n      }\n    }\n  });\n  \n  // Bubble position hook\n  const { bubblePosition, isMenuAboveElement } = useElementBubblePosition({\n    selectedElements,\n    menuHeight: UI_CONSTANTS.MENU_HEIGHT,\n    menuWidth: UI_CONSTANTS.MENU_WIDTH,\n    spacing: UI_CONSTANTS.SPACING\n  });\n  \n  // Inspector state hook\n  const {\n    isInspecting,\n    userPrompt,\n    setUserPrompt,\n    toggleInspection,\n    handlePromptSubmit,\n  } =  useInspector({\n    // Use shouldEnableInspect from iframe messaging if in iframe, otherwise use initialIsActive\n    initialIsActive: isInIframe ? shouldEnableInspect : initialIsActive,\n    onPromptGenerated: (prompt, elements) => {\n      // Send prompt to parent frame if in iframe\n      if (isInIframe) {\n        sendPrompt(prompt, elements);\n      }\n    }\n  });\n  \n  // Handle menu toggle - clear selections when toggling off\n  const handleMenuToggle = useCallback(() => {\n    toggleInspection();\n    if (isInspecting) {\n      clearSelections();\n    }\n  }, [isInspecting, toggleInspection, clearSelections]);\n  \n  // Handle form submission with selected elements\n  const onSubmitPrompt = useCallback((e: React.FormEvent) => {\n    handlePromptSubmit(e, selectedElements);\n  }, [handlePromptSubmit, selectedElements]);\n  \n  // Update inspection state when shouldEnableInspect changes (from iframe messages)\n  useEffect(() => {\n    if (isInIframe && isInspecting !== shouldEnableInspect) {\n      toggleInspection();\n    }\n  }, [isInIframe, isInspecting, shouldEnableInspect, toggleInspection]);\n\n  // Send ready message to parent window when component mounts\n  useEffect(() => {\n    if (isInIframe) {\n      window.parent.postMessage({ type: 'UI_BUILDER_READY' }, '*');\n    }\n  }, [isInIframe]);\n\n  return (\n    <div>\n      {/* Element Inspector Components */}\n      <InspectionOverlay\n        isInspecting={isInspecting}\n        hoveredElement={hoveredElement}\n        selectedElements={selectedElements}\n        onElementHovered={handleElementHovered}\n        onElementSelected={handleElementSelected}\n        onElementUnhovered={handleElementUnhovered}\n        excludeSelector={excludeSelector}\n        selectorStyle={selectorStyle}\n        highlighterStyle={highlighterStyle}\n        elementLabel={elementLabel}\n      />\n\n      {/* Bubble Menu */}\n      <BubbleMenu\n        isInspecting={isInspecting}\n        selectedElements={selectedElements}\n        bubblePosition={bubblePosition}\n        isMenuAboveElement={isMenuAboveElement}\n        userPrompt={userPrompt}\n        setUserPrompt={setUserPrompt}\n        onSubmitPrompt={onSubmitPrompt}\n        onToggleInspection={handleMenuToggle}\n        isDarkMode={isDarkMode}\n        showBubbleMenuButton={showBubbleMenuButton}\n      />\n    </div>\n  );\n}\n","/**\n * Shared constants for the element prompt builder\n */\n\n// UI Dimensions\nexport const UI_CONSTANTS = {\n  // Menu dimensions\n  MENU_WIDTH: 350, // Width of the control menu in pixels\n  MENU_HEIGHT: 56, // Height of the control menu in pixels\n  \n  // Spacing and offsets\n  SPACING: 10, // Standard spacing for margins and padding\n  ARROW_LEFT_OFFSET: 20, // Left offset for the arrow from menu edge\n  \n  // Z-index values\n  Z_INDEX: 10000, // Standard z-index for UI elements\n};\n","\"use client\";\nimport { UI_CONSTANTS } from \"../constants\";\n\n/**\n * Generates styles for the menu arrow component\n */\nexport const getMenuArrowStyles = (\n  isMenuAboveElement: boolean,\n  bubblePosition: { top: number; left: number },\n  isDarkMode: boolean,\n  isVisible: boolean,\n) => {\n  const topPosition = isMenuAboveElement\n    ? `${bubblePosition.top + UI_CONSTANTS.MENU_HEIGHT}px` // Arrow at bottom of menu\n    : `${bubblePosition.top - 8}px`; // Arrow at top of menu\n\n  const leftPosition = `${bubblePosition.left + UI_CONSTANTS.ARROW_LEFT_OFFSET}px`;\n\n  const borderTop = isMenuAboveElement\n    ? `8px solid ${isDarkMode ? \"#1f2937\" : \"white\"}`\n    : \"none\";\n\n  const borderBottom = isMenuAboveElement\n    ? \"none\"\n    : `8px solid ${isDarkMode ? \"#1f2937\" : \"white\"}`;\n\n  return {\n    menuArrow: {\n      position: \"fixed\",\n      width: 0,\n      height: 0,\n      borderLeft: \"8px solid transparent\",\n      borderRight: \"8px solid transparent\",\n      top: topPosition,\n      left: leftPosition,\n      borderTop,\n      borderBottom,\n      pointerEvents: \"none\",\n      opacity: isVisible ? 1 : 0,\n      zIndex: UI_CONSTANTS.Z_INDEX + 1,\n    } as React.CSSProperties,\n  };\n};\n\n/**\n * Styles for the floating button container\n */\nexport const floatingButtonStyles = {\n  container: {\n    position: \"fixed\",\n    bottom: \"24px\",\n    right: \"24px\",\n    zIndex: UI_CONSTANTS.Z_INDEX,\n  } as React.CSSProperties,\n};\n\n/**\n * Styles for the bubble container\n */\nexport const bubbleStyles = {\n  container: {\n    position: \"static\",\n  } as React.CSSProperties,\n};\n","\"use client\";\nimport React from \"react\";\nimport { getMenuArrowStyles } from \"../../styles/bubble-menu-styles\";\n\ninterface MenuArrowProps {\n  isMenuAboveElement: boolean;\n  bubblePosition: { top: number; left: number };\n  isDarkMode: boolean;\n  isVisible: boolean;\n}\n\nexport const MenuArrow: React.FC<MenuArrowProps> = ({\n  isMenuAboveElement,\n  bubblePosition,\n  isDarkMode,\n  isVisible,\n}) => {\n  const styles = getMenuArrowStyles(\n    isMenuAboveElement,\n    bubblePosition,\n    isDarkMode,\n    isVisible,\n  );\n  return (\n    <div\n      className=\"element-inspector-menu-arrow\"\n      style={styles.menuArrow}\n      aria-hidden=\"true\"\n    />\n  );\n};\n","\"use client\";\n\n// Custom icon components\nexport const IconPointer = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"lucide lucide-mouse-pointer-click-icon lucide-mouse-pointer-click\"><path d=\"M14 4.1 12 6\"/><path d=\"m5.1 8-2.9-.8\"/><path d=\"m6 12-1.9 2\"/><path d=\"M7.2 2.2 8 5.1\"/><path d=\"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z\"/></svg>\n);\n\nexport const IconSquareDashedPointer = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"lucide lucide-square-dashed-mouse-pointer-icon lucide-square-dashed-mouse-pointer\"><path d=\"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z\"/><path d=\"M5 3a2 2 0 0 0-2 2\"/><path d=\"M19 3a2 2 0 0 1 2 2\"/><path d=\"M5 21a2 2 0 0 1-2-2\"/><path d=\"M9 3h1\"/><path d=\"M9 21h2\"/><path d=\"M14 3h1\"/><path d=\"M3 9v1\"/><path d=\"M21 9v2\"/><path d=\"M3 14v1\"/></svg>\n);\n\nexport const IconX = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n    <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n    <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n  </svg>\n);\n\nexport const IconSend = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n    <path d=\"m22 2-7 20-4-9-9-4Z\"/>\n    <path d=\"M22 2 11 13\"/>\n  </svg>\n);\n\nexport const IconTick = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n    <polyline points=\"20 6 9 17 4 12\"/>\n  </svg>\n);\n\nexport const IconAi = () => (\n  <svg width=\"23\" height=\"23\" viewBox=\"0 0 23 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M9.55507 5.34461L10.1322 6.94742C10.7733 8.72633 12.1742 10.1272 13.9531 10.7683L15.5559 11.3455C15.7004 11.3979 15.7004 11.6028 15.5559 11.6545L13.9531 12.2317C12.1742 12.8728 10.7733 14.2736 10.1322 16.0525L9.55507 17.6554C9.5026 17.7998 9.29776 17.7998 9.24601 17.6554L8.66885 16.0525C8.02772 14.2736 6.62688 12.8728 4.84797 12.2317L3.24516 11.6545C3.10069 11.602 3.10069 11.3972 3.24516 11.3455L4.84797 10.7683C6.62688 10.1272 8.02772 8.72633 8.66885 6.94742L9.24601 5.34461C9.29776 5.19942 9.5026 5.19942 9.55507 5.34461Z\" fill=\"black\"/>\n    <path d=\"M16.7699 1.49284L17.0624 2.30431C17.3873 3.2049 18.0967 3.91431 18.9973 4.23918L19.8088 4.53172C19.8821 4.55831 19.8821 4.66181 19.8088 4.6884L18.9973 4.98093C18.0967 5.30581 17.3873 6.01521 17.0624 6.91581L16.7699 7.72728C16.7433 7.80059 16.6398 7.80059 16.6132 7.72728L16.3207 6.91581C15.9958 6.01521 15.2864 5.30581 14.3858 4.98093L13.5743 4.6884C13.501 4.66181 13.501 4.55831 13.5743 4.53172L14.3858 4.23918C15.2864 3.91431 15.9958 3.2049 16.3207 2.30431L16.6132 1.49284C16.6398 1.41881 16.744 1.41881 16.7699 1.49284Z\" fill=\"black\"/>\n    <path d=\"M16.7699 15.2734L17.0624 16.0849C17.3873 16.9855 18.0967 17.6949 18.9973 18.0198L19.8088 18.3123C19.8821 18.3389 19.8821 18.4424 19.8088 18.469L18.9973 18.7615C18.0967 19.0864 17.3873 19.7958 17.0624 20.6964L16.7699 21.5079C16.7433 21.5812 16.6398 21.5812 16.6132 21.5079L16.3207 20.6964C15.9958 19.7958 15.2864 19.0864 14.3858 18.7615L13.5743 18.469C13.501 18.4424 13.501 18.3389 13.5743 18.3123L14.3858 18.0198C15.2864 17.6949 15.9958 16.9855 16.3207 16.0849L16.6132 15.2734C16.6398 15.2001 16.744 15.2001 16.7699 15.2734Z\" fill=\"black\"/>\n  </svg>\n\n);","\"use client\";\n// Base styles for the ElementInspector component\n\n// Layout styles\nexport const layout = {\n  bubble: {\n    position: 'fixed' as const,\n    zIndex: 9999,\n    // Dynamic positioning will be handled in the component\n  },\n  expandedMenu: {\n    backgroundColor: 'white',\n    borderRadius: '8px',\n    boxShadow: '0 4px 20px rgba(0, 0, 0, 0.15)',\n    padding: '16px',\n    width: '350px',\n    transition: 'all 0.15s ease-in-out',\n    zIndex: 9999,\n    position: 'relative',\n  },\n  menuHeader: {\n    display: 'flex',\n    justifyContent: 'space-between',\n    alignItems: 'center',\n    marginBottom: '12px',\n  },\n  inspectorToggle: {\n    marginBottom: '16px',\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'space-between',\n  },\n  toggleLeft: {\n    display: 'flex',\n    alignItems: 'center',\n    gap: '8px',\n  },\n  toggleRight: {\n    display: 'flex',\n    alignItems: 'center',\n    gap: '8px',\n  },\n  promptForm: {\n    marginTop: '12px',\n  },\n  inputContainer: {\n    display: 'flex',\n  },\n};\n\n// Button styles\nexport const buttons = {\n  mainButton: {\n    backgroundColor: '#3b82f6',\n    color: 'white',\n    borderRadius: '50%',\n    boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',\n    border: 'none',\n    cursor: 'pointer',\n    transition: 'all 0.2s ease',\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    padding: '8px',\n  },\n  mainButtonHover: {\n    backgroundColor: '#2563eb',\n  },\n  closeButton: {\n    color: '#6b7280',\n    background: 'none',\n    border: 'none',\n    cursor: 'pointer',\n    padding: '4px',\n  },\n  closeButtonHover: {\n    color: '#374151',\n  },\n  toggleButton: {\n    padding: '4px 12px',\n    borderRadius: '9999px',\n    fontSize: '12px',\n    fontWeight: '500',\n    border: 'none',\n    cursor: 'pointer',\n    transition: 'colors 0.2s ease',\n  },\n  submitButton: {\n    backgroundColor: '#3b82f6',\n    color: 'white',\n    padding: '8px',\n    borderRadius: '6px',\n    border: 'none',\n    cursor: 'pointer',\n    transition: 'background-color 0.2s ease',\n  },\n  submitButtonHover: {\n    backgroundColor: '#2563eb',\n  },\n};\n\n// Text styles\nexport const text = {\n  menuTitle: {\n    fontSize: '14px',\n    fontWeight: '500',\n    color: '#1f2937',\n  },\n  toggleText: {\n    fontSize: '14px',\n    fontWeight: '500',\n    color: '#374151',\n  },\n  selectedCount: {\n    fontSize: '12px',\n    fontWeight: '500',\n    color: '#10b981',\n  },\n  promptLabel: {\n    display: 'block',\n    fontSize: '14px',\n    fontWeight: '500',\n    color: '#374151',\n    marginBottom: '4px',\n  },\n};\n\n// Input styles\nexport const inputs = {\n  promptInput: {\n    flexGrow: 1,\n    minHeight: \"65px\",\n    fontSize: '14px',\n    outline: 'none',\n    fontFamily: 'inherit',\n    borderColor: 'transparent',\n    padding: 0,\n    width: '100%',\n  },\n  promptInputFocus: {\n    borderColor: '#3b82f6',\n    boxShadow: '0 0 0 1px rgba(59, 130, 246, 0.5)',\n  },\n  promptInputSelected: {\n    borderColor: 'transparent',\n  },\n};\n\n// Element styles\nexport const elements = {\n  elementTagLabel: {\n    position: 'absolute' as const,\n    top: '0.5px',\n    left: '0.5px',\n    backgroundColor: 'rgba(52, 53, 65, 0.8)',\n    borderRadius: '4px',\n    padding: '2px 6px',\n    fontSize: '12px',\n    color: 'white',\n    pointerEvents: 'none' as const,\n  },\n  menuArrow: {\n    position: 'absolute' as const,\n    width: 0,\n    height: 0,\n    borderLeft: '8px solid transparent',\n    borderRight: '8px solid transparent',\n    zIndex: 10001,\n    transform: 'translateX(-8px)',\n    transition: 'all 0.15s ease-in-out',\n  },\n};\n\n// State styles\nexport const states = {\n  toggleButtonActive: {\n    backgroundColor: '#dcfce7',\n    color: '#065f46',\n  },\n  toggleButtonInactive: {\n    backgroundColor: '#f3f4f6',\n    color: '#1f2937',\n  },\n};\n\n// Dark mode styles\nexport const darkMode = {\n  expandedMenu: {\n    backgroundColor: '#1f2937',\n  },\n  menuTitle: {\n    color: '#e5e7eb',\n  },\n  closeButtonHover: {\n    color: '#e5e7eb',\n  },\n  toggleText: {\n    color: '#e5e7eb',\n  },\n  selectedCount: {\n    color: '#34d399',\n  },\n  toggleButtonActive: {\n    backgroundColor: '#064e3b',\n    color: '#ecfdf5',\n  },\n  toggleButtonInactive: {\n    backgroundColor: '#374151',\n    color: '#d1d5db',\n  },\n  promptLabel: {\n    color: '#d1d5db',\n  },\n  promptInput: {\n    backgroundColor: '#374151',\n    color: 'white',\n    borderColor: 'transparent',\n  },\n};\n","\"use client\";\nimport { buttons, darkMode, inputs } from \"./base-styles\";\n\n/**\n * Styles for the prompt form container\n */\nexport const formContainerStyles = {\n  wrapper: {\n    display: \"flex\",\n    flexDirection: \"row\",\n    gap: \"8px\",\n    alignItems: \"center\",\n    width: \"100%\",\n  } as React.CSSProperties,\n  \n  inputWrapper: {\n    display: 'flex',\n    alignItems: 'center',\n    position: 'relative',\n    gap: '5px',\n    width: '100%' \n  } as React.CSSProperties\n};\n\n/**\n * Get styles for the prompt textarea\n */\nexport const getPromptTextareaStyles = (isDarkMode: boolean, selectedElementsCount: number) => {\n  return {\n    textarea: {\n      ...inputs.promptInput,\n      ...(isDarkMode ? darkMode.promptInput : {}),\n      ...(selectedElementsCount > 0 ? inputs.promptInputSelected : {}),\n      resize: \"none\",\n      minHeight: \"62px\", // Height for approximately 3 lines\n      lineHeight: \"1.5\",\n    } as React.CSSProperties\n  };\n};\n\n/**\n * Styles for the submit button\n */\nexport const submitButtonStyles = {\n  button: {\n    ...buttons.submitButton,\n    borderRadius: \"50%\",\n    padding: \"5px\",\n    display: \"flex\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n  } as React.CSSProperties,\n  \n  hoverBackgroundColor: buttons.submitButtonHover.backgroundColor as string,\n  normalBackgroundColor: buttons.submitButton.backgroundColor as string\n};\n","import React, {\n  CSSProperties,\n  useCallback,\n  useEffect,\n  useRef,\n  useState,\n} from \"react\";\nimport { useWorkflowsStore } from \"../stores/workflows\";\nimport { cn } from \"../utils\";\nimport Mapper from \"./Mapper\";\nimport {\n  Mention,\n  MentionContent,\n  MentionInput,\n  MentionItem,\n} from \"./ui/mention\";\n\ninterface MentionChatProps {\n  // mentionInputRef?: React.RefObject<HTMLInputElement> | undefined;\n  input?: string;\n  showWorkbench?: boolean;\n  handleInputChange?: (value: string) => void;\n  onSubmit?: (event: React.UIEvent | React.FormEvent) => void;\n  style?: CSSProperties;\n  textAreaClassName?: string;\n  mentionContentClassName?: string;\n  onFileChange?: (files: FileList | undefined) => void;\n}\n\nexport const MentionChat: React.FC<MentionChatProps> = ({\n  showWorkbench = false,\n  handleInputChange,\n  style,\n  textAreaClassName = '',\n  mentionContentClassName = '',\n}) => {\n  const isInIframe = typeof window !== 'undefined' && window.self !== window.top;\n  const mentionInputRef = useRef<HTMLInputElement>(null);\n  const [values, setValues] = useState<string[]>([]);\n  const [inputValue, setInputValue] = useState('');\n  const workflows = useWorkflowsStore.getState().workflows || [];\n\n  // Function to convert mention format to workflow XML format\n  /* const convertMentionToWorkflowTag = useCallback((text: string): string => {\n    let convertedText = text;\n    values.forEach((value) => {\n      const workflowName = workflows.find(workflow => workflow.id === value)?.name;\n      if (workflowName) {\n        const mentionRegex = new RegExp(`@${workflowName}`, 'g');\n        convertedText = convertedText.replace(mentionRegex, `<workflow>${value}</workflow>`);\n      }\n    });\n    return convertedText;\n  }, [values]); */\n\n\n  useEffect(() => {\n    // const convertedText = convertMentionToWorkflowTag(inputValue);\n    handleInputChange?.(inputValue);\n    if (values.length > 0) {\n      useWorkflowsStore.getState().setWorkflowId(values[0]);\n    }\n  }, [inputValue, values])\n\n  useEffect(() => {\n    if (isInIframe) {\n      window.parent.postMessage(\n        {\n          type: \"ELEMENT_INSPECTOR_MENTIONED\",\n          payload: { workflowId: values?.[0] },\n        },\n        \"*\"\n      );\n    }\n  }, [isInIframe, values]);\n  \n\n  useEffect(() => {\n    if (!mentionInputRef.current) return;\n    mentionInputRef.current.parentElement\n      ?.querySelector(\"div\")\n      ?.classList?.add(\"!whitespace-nowrap\");\n  }, [mentionInputRef.current]);\n\n  useEffect(() => {\n    if (inputValue) return\n    setValues([])\n  }, [inputValue])\n\n  return (\n    <Mention\n      trigger=\"@\"\n      className={cn(\n        'w-full focus:outline-none resize-none text-md text-bolt-elements-textPrimary placeholder-bolt-elements-textTertiary bg-transparent',\n        {\n          'max-w-[435px] ml-0': showWorkbench,\n        },\n        'element-inspector-mention'\n      )}\n      inputValue={inputValue}\n      value={values}\n      onInputValueChange={setInputValue}\n      onValueChange={setValues}\n    >\n      <MentionInput\n        value={inputValue}\n        ref={mentionInputRef}\n        placeholder={\"Tell me how to modify this element...\"}\n        className={cn(\n          '!shadow-none !ring-0 !border-none w-full focus:outline-none text-sm text-bolt-elements-textPrimary placeholder-bolt-elements-textTertiary bg-transparent px-1',\n          {\n            'max-w-[435px] ml-0': showWorkbench,\n          },\n          textAreaClassName\n        )}\n        style={{ ...style, resize: 'none' }}\n      />\n      {values.length === 0 && (\n        <MentionContent className={cn(\"max-h-[200px] h-[200px] min-w-[250px] overflow-y-auto relative border-none outline-none bg-white\", mentionContentClassName)} style={{ zIndex: 10001 }}>\n          <Mapper data={workflows} extractedKey={'id'}>\n            {(item) => (\n              <MentionItem\n                key={item.id}\n                value={item.id}\n                label={item.name}\n                className=\"flex-col items-start gap-0.5\"\n                disabled={values.length > 0 && !values.includes(item.id)}\n              >\n                <p className=\"text-sm\">{item.name}</p>\n                <p className=\"text-xs text-gray-500\">{item.id}</p>\n              </MentionItem>\n            )}\n          </Mapper>\n        </MentionContent>\n      )}\n    </Mention>\n  );\n};\n","import { create } from \"zustand\";\n\n/**\n * Interface for the workflows store state and actions\n */\nexport interface WorkflowsState {\n  // State properties\n  workflows: any[];\n\n  workflowId: string;\n\n  // Actions\n  setWorkflowId: (data: string) => void;\n  setWorkflows: (data: any[]) => void;\n}\n\n/**\n * Zustand store for workflows\n */\nexport const useWorkflowsStore = create<WorkflowsState>()((set, get) => ({\n  // Initial state\n  workflows: [],\n  workflowId: \"\",\n\n  // Actions to update workflows state\n  setWorkflowId: (workflowId: string) =>\n    set({ workflowId }),\n  setWorkflows: (data) =>\n    set({\n      workflows: data,\n    }),\n  getworkflows: () => {\n    return get().workflows;\n  },\n}));\n","import get from \"lodash/get\";\nimport map from \"lodash/map\";\nimport size from \"lodash/size\";\nimport React from \"react\";\nimport isEmpty from \"lodash/isEmpty\";\n\ninterface IMapperProps<T> {\n  children: (\n    item: T,\n    info: {\n      index: number;\n      firstItem: boolean;\n      lastItem: boolean;\n      isOdd: boolean;\n    }\n  ) => React.ReactNode;\n  data: T[];\n  extractedKey?: keyof T;\n  isShowEmpty?: boolean;\n}\n\nconst Mapper = <T,>({\n  children,\n  data: items = [],\n  extractedKey,\n  isShowEmpty = false,\n}: IMapperProps<T>) => {\n  return (\n    <React.Fragment>\n      {!isEmpty(items)\n        ? map(items, (item, index) => (\n            <React.Fragment\n              key={extractedKey ? get(item, extractedKey, index) : index}\n            >\n              {children(item, {\n                index: +index,\n                firstItem: +index === 0,\n                lastItem: size(items) - 1 === +index,\n                isOdd: +index % 2 !== 0,\n              })}\n            </React.Fragment>\n          ))\n        : isShowEmpty && (\n            <p className=\"px-4 py-3 text-[15px] text-gray-500\">\n              No data found.\n            </p>\n          )}\n    </React.Fragment>\n  );\n};\n\nexport default Mapper;\n","import * as MentionPrimitive from \"@diceui/mention\";\nimport * as React from \"react\";\n \nimport { cn } from \"../../utils\";\n \nconst Mention = React.forwardRef<\n  React.ComponentRef<typeof MentionPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof MentionPrimitive.Root>\n>(({ className, ...props }, ref) => (\n  <MentionPrimitive.Root\n    data-slot=\"mention\"\n    ref={ref}\n    className={cn(\n      \"**:data-tag:rounded **:data-tag:bg-blue-200 **:data-tag:py-px **:data-tag:text-blue-950 dark:**:data-tag:bg-blue-800 dark:**:data-tag:text-blue-50\",\n      className,\n    )}\n    {...props}\n  />\n));\nMention.displayName = MentionPrimitive.Root.displayName;\n \nconst MentionLabel = React.forwardRef<\n  React.ComponentRef<typeof MentionPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof MentionPrimitive.Label>\n>(({ className, ...props }, ref) => (\n  <MentionPrimitive.Label\n    data-slot=\"mention-label\"\n    ref={ref}\n    className={cn(\"px-0.5 py-1.5 font-semibold text-sm\", className)}\n    {...props}\n  />\n));\nMentionLabel.displayName = MentionPrimitive.Label.displayName;\n \nconst MentionInput = React.forwardRef<\n  React.ComponentRef<typeof MentionPrimitive.Input>,\n  React.ComponentPropsWithoutRef<typeof MentionPrimitive.Input>\n>(({ className, ...props }, ref) => (\n  <MentionPrimitive.Input\n    data-slot=\"mention-input\"\n    ref={ref}\n    className={cn(\n      \"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n      className,\n    )}\n    {...props}\n  />\n));\nMentionInput.displayName = MentionPrimitive.Input.displayName;\n \nconst MentionContent = React.forwardRef<\n  React.ComponentRef<typeof MentionPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof MentionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n  <MentionPrimitive.Portal>\n    <MentionPrimitive.Content\n      data-slot=\"mention-content\"\n      ref={ref}\n      className={cn(\n        \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n    </MentionPrimitive.Content>\n  </MentionPrimitive.Portal>\n));\nMentionContent.displayName = MentionPrimitive.Content.displayName;\n \nconst MentionItem = React.forwardRef<\n  React.ComponentRef<typeof MentionPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof MentionPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n  <MentionPrimitive.Item\n    data-slot=\"mention-item\"\n    ref={ref}\n    className={cn(\n      \"relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-50\",\n      className,\n    )}\n    {...props}\n  >\n    {children}\n  </MentionPrimitive.Item>\n));\nMentionItem.displayName = MentionPrimitive.Item.displayName;\n \nexport { Mention, MentionContent, MentionInput, MentionItem, MentionLabel };","\"use client\";\nimport React from \"react\";\nimport { IconTick, IconAi } from \"../Icons\";\nimport {\n  formContainerStyles,\n  getPromptTextareaStyles,\n  submitButtonStyles,\n} from \"../styles/form-styles\";\nimport { MentionChat } from \"./MentionChat\";\n\ninterface PromptFormProps {\n  /**\n   * The current prompt text\n   */\n  userPrompt: string;\n\n  /**\n   * Function to update the prompt text\n   */\n  setUserPrompt: (value: string) => void;\n\n  /**\n   * Form submission handler\n   */\n  handlePromptSubmit: (e: React.FormEvent) => void;\n\n  /**\n   * Number of elements currently selected\n   */\n  selectedElementsCount: number;\n\n  /**\n   * Whether dark mode is active\n   */\n  isDarkMode: boolean;\n}\n\n/**\n * Form component for entering and submitting prompts for selected elements\n */\nexport function PromptForm({\n  userPrompt,\n  setUserPrompt,\n  handlePromptSubmit,\n  selectedElementsCount,\n  isDarkMode,\n}: PromptFormProps) {\n  // const textareaStyles = getPromptTextareaStyles(isDarkMode, selectedElementsCount);\n\n  return (\n    <form onSubmit={handlePromptSubmit}>\n      <div style={formContainerStyles.wrapper}>\n        <div style={formContainerStyles.inputWrapper}>\n          <IconAi />\n          <MentionChat\n            handleInputChange={setUserPrompt}\n            textAreaClassName=\"text-sm resize-none\"\n            // mentionContentClassName=\"z-[10001]\"\n          />\n          {/* <textarea\n            value={userPrompt}\n            onChange={(e) => setUserPrompt(e.target.value)}\n            style={textareaStyles.textarea}\n            placeholder={\"Tell me how to modify this element...\\nI can help change its style, content, or\\nbehavior.\"}\n          /> */}\n        </div>\n        {userPrompt.trim() !== \"\" && (\n          <button\n            type=\"submit\"\n            style={submitButtonStyles.button}\n            onMouseOver={(e) => {\n              e.currentTarget.style.backgroundColor =\n                submitButtonStyles.hoverBackgroundColor;\n            }}\n            onMouseOut={(e) => {\n              e.currentTarget.style.backgroundColor =\n                submitButtonStyles.normalBackgroundColor;\n            }}\n          >\n            <IconTick />\n          </button>\n        )}\n      </div>\n    </form>\n  );\n}\n","\"use client\";\nimport { layout, darkMode } from './base-styles';\n\n/**\n * Styles for the ExpandedMenu component\n */\nexport const getExpandedMenuStyles = (\n  top: number,\n  left: number,\n  isDarkMode: boolean\n) => {\n  return {\n    container: {\n      ...layout.expandedMenu,\n      ...(isDarkMode ? darkMode.expandedMenu : {}),\n      padding: '10px 8px',\n      position: 'fixed', // Use fixed to stay consistent with scroll position\n      top: `${top}px`,\n      left: `${left}px`,\n      zIndex: 10000,\n      maxHeight: '400px', // Ensure it doesn't get too large\n      overflowY: 'auto', // Add scrolling if needed\n    } as React.CSSProperties\n  };\n};\n","\"use client\";\nimport React from \"react\";\nimport { PromptForm } from \"../PromptForm\";\nimport { getExpandedMenuStyles } from \"../../styles/expanded-menu-styles\";\n\ninterface ExpandedMenuProps {\n  bubblePosition: { top: number; left: number };\n  userPrompt: string;\n  setUserPrompt: (prompt: string) => void;\n  onSubmitPrompt: (e: React.FormEvent) => void;\n  selectedElementsCount: number;\n  isDarkMode: boolean;\n}\n\nexport const ExpandedMenu: React.FC<ExpandedMenuProps> = ({\n  bubblePosition,\n  userPrompt,\n  setUserPrompt,\n  onSubmitPrompt,\n  selectedElementsCount,\n  isDarkMode,\n}) => {\n  const styles = getExpandedMenuStyles(bubblePosition.top, bubblePosition.left, isDarkMode);\n  return (\n    <div className=\"element-inspector-controls\" style={styles.container}>\n      <PromptForm\n        userPrompt={userPrompt}\n        setUserPrompt={setUserPrompt}\n        handlePromptSubmit={onSubmitPrompt}\n        selectedElementsCount={selectedElementsCount}\n        isDarkMode={isDarkMode}\n      />\n    </div>\n  );\n};\n","\"use client\";\nimport { buttons } from './base-styles';\n\n/**\n * Styles for the BubbleMenuButton component\n */\nexport const getBubbleMenuButtonStyles = (isInspecting: boolean) => {\n  return {\n    button: {\n      ...buttons.mainButton,\n      backgroundColor: isInspecting ? '#2563eb' : '#93c5fd', // Lighter blue when not enabled\n      boxShadow: '0 4px 8px rgba(0, 0, 0, 0.15)',\n    } as React.CSSProperties,\n    \n    hoverBackgroundColor: isInspecting ? '#1d4ed8' : '#60a5fa', // Darker on hover but still lighter than active\n    normalBackgroundColor: isInspecting ? '#2563eb' : '#93c5fd'\n  };\n};\n","\"use client\";\nimport React from \"react\";\nimport { IconSquareDashedPointer } from \"../Icons\";\nimport { getBubbleMenuButtonStyles } from \"../styles/bubble-button-styles\";\n\ninterface BubbleMenuButtonProps {\n  /**\n   * Whether the inspector is currently active\n   */\n  isInspecting: boolean;\n\n  /**\n   * Click handler for the button\n   */\n  onClick: () => void;\n}\n\n/**\n * The main floating button for toggling the element inspector\n */\nexport function BubbleMenuButton({\n  isInspecting,\n  onClick,\n}: BubbleMenuButtonProps) {\n  const title = isInspecting\n    ? \"Disable Element Inspector\"\n    : \"Enable Element Inspector\";\n  const styles = getBubbleMenuButtonStyles(isInspecting);\n  const handleMouseOver = (e: React.MouseEvent<HTMLButtonElement>) => {\n    e.currentTarget.style.backgroundColor = styles.hoverBackgroundColor;\n  };\n  const handleMouseOut = (e: React.MouseEvent<HTMLButtonElement>) => {\n    e.currentTarget.style.backgroundColor = styles.normalBackgroundColor;\n  };\n\n  return (\n    <button\n      onClick={onClick}\n      style={styles.button}\n      onMouseOver={handleMouseOver}\n      onMouseOut={handleMouseOut}\n      title={title}\n    >\n      <IconSquareDashedPointer />\n    </button>\n  );\n}\n","\"use client\";\nimport React from \"react\";\nimport { BubbleMenuButton } from \"../BubbleMenuButton\";\nimport { floatingButtonStyles } from \"../../styles/bubble-menu-styles\";\n\ninterface FloatingButtonProps {\n  isInspecting: boolean;\n  onToggle: () => void;\n}\n\nexport const FloatingButton: React.FC<FloatingButtonProps> = ({\n  isInspecting,\n  onToggle,\n}) => {\n  return (\n    <div\n      className=\"element-inspector-floating-button-container\"\n      style={floatingButtonStyles.container}\n    >\n      <BubbleMenuButton isInspecting={isInspecting} onClick={onToggle} />\n    </div>\n  );\n};\n","\"use client\";\nimport React from \"react\";\nimport { MenuArrow } from \"./MenuArrow\";\nimport { ExpandedMenu } from \"./ExpandedMenu\";\nimport { FloatingButton } from \"./FloatingButton\";\n\ninterface BubbleMenuProps {\n  isInspecting: boolean;\n  selectedElements: HTMLElement[];\n  bubblePosition: { top: number; left: number };\n  isMenuAboveElement: boolean;\n  userPrompt: string;\n  setUserPrompt: (prompt: string) => void;\n  onSubmitPrompt: (e: React.FormEvent) => void;\n  onToggleInspection: () => void;\n  isDarkMode: boolean;\n  showBubbleMenuButton: boolean;\n}\n\nexport const BubbleMenu: React.FC<BubbleMenuProps> = ({\n  isInspecting,\n  selectedElements,\n  bubblePosition,\n  isMenuAboveElement,\n  userPrompt,\n  setUserPrompt,\n  onSubmitPrompt,\n  onToggleInspection,\n  isDarkMode,\n  showBubbleMenuButton,\n}) => {\n  const showMenu = isInspecting && selectedElements.length > 0;\n\n  return (\n    <div className=\"element-inspector-bubble\">\n      {/* Expanded Menu with Arrow */}\n      {showMenu && (\n        <>\n          <MenuArrow\n            isMenuAboveElement={isMenuAboveElement}\n            bubblePosition={bubblePosition}\n            isDarkMode={isDarkMode}\n            isVisible={selectedElements.length > 0}\n          />\n\n          <ExpandedMenu\n            bubblePosition={bubblePosition}\n            userPrompt={userPrompt}\n            setUserPrompt={setUserPrompt}\n            onSubmitPrompt={onSubmitPrompt}\n            selectedElementsCount={selectedElements.length}\n            isDarkMode={isDarkMode}\n          />\n        </>\n      )}\n\n      {/* Floating Button */}\n      {showBubbleMenuButton && (\n        <FloatingButton\n          isInspecting={isInspecting}\n          onToggle={onToggleInspection}\n        />\n      )}\n    </div>\n  );\n};\n","\"use client\";\nimport React from \"react\";\nimport { elements } from \"../styles/base-styles\";\n\ninterface ElementTagLabelProps {\n  /**\n   * The HTML element to display the tag for\n   */\n  element: HTMLElement;\n}\n\n/**\n * A label that displays the tag name of an HTML element\n */\nexport function ElementTagLabel({ element }: ElementTagLabelProps) {\n  return (\n    <div style={elements.elementTagLabel}>\n      {element.tagName.toLowerCase()}\n    </div>\n  );\n}\n","\"use client\";\nimport React from \"react\";\n\n/**\n * Styles for the hovered element\n */\nexport const hoveredElementStyles = {\n  highlighter: {\n    borderColor: \"rgba(59, 130, 246, 0.8)\",\n    backgroundColor: \"rgba(59, 130, 246, 0.2)\",\n  } as React.CSSProperties,\n};\n\n/**\n * Styles for the selected elements\n */\nexport const selectedElementStyles = {\n  highlighter: {\n    borderColor: \"rgba(34, 197, 94, 0.8)\",\n    backgroundColor: \"rgba(34, 197, 94, 0.2)\",\n  } as React.CSSProperties,\n};\n","\"use client\";\nimport React from \"react\";\nimport { ElementHighlighter } from \"../../ElementHighlighter\";\nimport { ElementTagLabel } from \"../ElementTagLabel\";\nimport { hoveredElementStyles } from \"../../styles/highlights-styles\";\n\ninterface HoveredElementProps {\n  hoveredElement: HTMLElement | null;\n  elementLabel?: (element: HTMLElement) => React.ReactNode;\n  highlighterStyle?: React.CSSProperties;\n}\n\nexport const HoveredElement: React.FC<HoveredElementProps> = ({\n  hoveredElement,\n  elementLabel,\n  highlighterStyle,\n}) => {\n  if (!hoveredElement) return null;\n\n  return (\n    <ElementHighlighter\n      element={hoveredElement}\n      borderColor={hoveredElementStyles.highlighter.borderColor}\n      backgroundColor={hoveredElementStyles.highlighter.backgroundColor}\n      style={highlighterStyle}\n    >\n      {elementLabel ? (\n        elementLabel(hoveredElement)\n      ) : (\n        <ElementTagLabel element={hoveredElement} />\n      )}\n    </ElementHighlighter>\n  );\n};\n","\"use client\";\nimport React from \"react\";\nimport { ElementHighlighter } from \"../../ElementHighlighter\";\nimport { ElementTagLabel } from \"../ElementTagLabel\";\nimport { selectedElementStyles } from \"../../styles/highlights-styles\";\n\ninterface SelectedElementsProps {\n  selectedElements: HTMLElement[];\n  elementLabel?: (element: HTMLElement) => React.ReactNode;\n  highlighterStyle?: React.CSSProperties;\n}\n\nexport const SelectedElements: React.FC<SelectedElementsProps> = ({\n  selectedElements,\n  elementLabel,\n  highlighterStyle,\n}) => {\n  return (\n    <>\n      {selectedElements.map((element, index) => {\n        // Add data attribute to mark as selected for tracking\n        element.setAttribute(\"data-element-inspector-selected\", \"true\");\n        return (\n          <ElementHighlighter\n            key={`selected-${index}`}\n            element={element}\n            borderColor={selectedElementStyles.highlighter.borderColor}\n            backgroundColor={selectedElementStyles.highlighter.backgroundColor}\n            style={highlighterStyle}\n          >\n            {elementLabel ? (\n              elementLabel(element)\n            ) : (\n              <ElementTagLabel element={element} />\n            )}\n          </ElementHighlighter>\n        );\n      })}\n    </>\n  );\n};\n","\"use client\";\nimport React from 'react';\nimport { ElementSelector } from '../ElementSelector';\nimport { HoveredElement } from './highlights/HoveredElement';\nimport { SelectedElements } from './highlights/SelectedElements';\n\ninterface InspectionOverlayProps {\n  isInspecting: boolean;\n  hoveredElement: HTMLElement | null;\n  selectedElements: HTMLElement[];\n  onElementHovered: (element: HTMLElement) => void;\n  onElementSelected: (element: HTMLElement) => void;\n  onElementUnhovered: () => void;\n  excludeSelector: string;\n  selectorStyle?: React.CSSProperties;\n  highlighterStyle?: React.CSSProperties;\n  elementLabel?: (element: HTMLElement) => React.ReactNode;\n}\n\nexport const InspectionOverlay: React.FC<InspectionOverlayProps> = ({\n  isInspecting,\n  hoveredElement,\n  selectedElements,\n  onElementHovered,\n  onElementSelected,\n  onElementUnhovered,\n  excludeSelector,\n  selectorStyle,\n  highlighterStyle,\n  elementLabel,\n}) => {\n  if (!isInspecting) return null;\n  \n  return (\n    <>\n      {/* Element selection overlay */}\n      <ElementSelector\n        onElementHovered={onElementHovered}\n        onElementSelected={onElementSelected}\n        onElementUnhovered={onElementUnhovered}\n        ignoreList={selectedElements}\n        excludeSelector={excludeSelector}\n        style={selectorStyle}\n      />\n      \n      {/* Highlight for hovered element */}\n      <HoveredElement \n        hoveredElement={hoveredElement}\n        elementLabel={elementLabel}\n        highlighterStyle={highlighterStyle}\n      />\n      \n      {/* Highlights for selected elements */}\n      <SelectedElements\n        selectedElements={selectedElements}\n        elementLabel={elementLabel}\n        highlighterStyle={highlighterStyle}\n      />\n    </>\n  );\n};\n","import { useState, useEffect } from 'react';\n\n/**\n * Custom hook to detect and track dark mode preferences\n */\nexport function useDarkMode() {\n  const [isDarkMode, setIsDarkMode] = useState(false);\n  \n  useEffect(() => {\n    // Check initial dark mode preference\n    const isDark = window.matchMedia && \n      window.matchMedia('(prefers-color-scheme: dark)').matches;\n    setIsDarkMode(isDark);\n    \n    // Listen for changes in color scheme preference\n    const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n    const handleChange = (e: MediaQueryListEvent) => setIsDarkMode(e.matches);\n    \n    mediaQuery.addEventListener('change', handleChange);\n    return () => mediaQuery.removeEventListener('change', handleChange);\n  }, []);\n  \n  return isDarkMode;\n}\n","import { useState, useEffect } from 'react';\nimport { UI_CONSTANTS } from '../constants';\n\ninterface BubblePosition {\n  top: number;\n  left: number;\n  arrowOffset: number;\n}\n\ninterface UseElementBubblePositionProps {\n  selectedElements: HTMLElement[];\n  menuHeight?: number;\n  menuWidth?: number;\n  spacing?: number;\n}\n\n/**\n * Custom hook to calculate and update the position of a bubble menu\n * relative to selected elements\n */\nexport function useElementBubblePosition({\n  selectedElements,\n  menuHeight = UI_CONSTANTS.MENU_HEIGHT,\n  menuWidth = UI_CONSTANTS.MENU_WIDTH,\n  spacing = UI_CONSTANTS.SPACING,\n}: UseElementBubblePositionProps) {\n  const [bubblePosition, setBubblePosition] = useState<BubblePosition>({ \n    top: 0, \n    left: 0, \n    arrowOffset: UI_CONSTANTS.ARROW_LEFT_OFFSET \n  });\n  const [isMenuAboveElement, setIsMenuAboveElement] = useState(false);\n  \n  // Calculate and update bubble position based on selected elements\n  useEffect(() => {\n    if (selectedElements.length === 0) return;\n    \n    const updateBubblePosition = () => {\n      const lastElement = selectedElements[selectedElements.length - 1];\n      const rect = lastElement.getBoundingClientRect();\n      const viewportWidth = window.innerWidth;\n      const viewportHeight = window.innerHeight;\n      \n      // Calculate element center point for arrow positioning\n      const elementCenterX = rect.left + (rect.width / 2);\n      \n      // Check if element is near the bottom of the viewport\n      const isNearBottom = (rect.bottom + menuHeight + spacing * 2 > viewportHeight);\n      \n      // Update state to indicate menu position\n      setIsMenuAboveElement(isNearBottom);\n      \n      // Position calculations - below or above the element based on position\n      let top = isNearBottom \n        ? rect.top + window.scrollY - menuHeight - spacing // spacing above the element\n        : rect.bottom + window.scrollY + spacing; // spacing below the element\n        \n      // Initialize left position - align with the element's left edge\n      // (changed from centering to better work with left-aligned arrow)\n      let left = rect.left + window.scrollX;\n      \n      // Special case for elements very close to the bottom of the page\n      if (isNearBottom && rect.top < menuHeight + spacing * 2) {\n        // If there's not enough space above or below, position beside the element\n        const spaceRight = viewportWidth - rect.right;\n        if (spaceRight >= menuWidth + spacing * 2) {\n          // Place to the right\n          top = rect.top + window.scrollY;\n          left = rect.right + window.scrollX + spacing;\n        } else {\n          // As a last resort, position at top of page with enough space for scrolling\n          top = window.scrollY + spacing;\n        }\n      }\n      \n      // Ensure the bubble stays within viewport bounds horizontally\n      left = Math.max(spacing, Math.min(left, viewportWidth - menuWidth - spacing));\n      \n      // Calculate arrow position relative to the menu - should point to element center\n      const arrowOffset = elementCenterX - left - window.scrollX;\n\n      const scrolledPixels = window.scrollY || window.pageYOffset;\n      \n      // Ensure the bubble stays within viewport bounds vertically\n      top = Math.max(spacing, top) - scrolledPixels;\n      \n      setBubblePosition({ \n        top, \n        left, \n        // Keep arrow within menu bounds (spacing*2 to width-spacing*2)\n        arrowOffset: Math.min(Math.max(spacing * 2, arrowOffset), menuWidth - spacing * 2)\n      });\n    };\n    \n    // Initial calculation\n    updateBubblePosition();\n    \n    // Re-calculate on window resize or scroll\n    window.addEventListener('resize', updateBubblePosition);\n    window.addEventListener('scroll', updateBubblePosition);\n    \n    return () => {\n      window.removeEventListener('resize', updateBubblePosition);\n      window.removeEventListener('scroll', updateBubblePosition);\n    };\n  }, [selectedElements, menuHeight, menuWidth, spacing]);\n  \n  return { bubblePosition, isMenuAboveElement };\n}\n","import { useState, useCallback, useEffect } from 'react';\n\ninterface UseElementSelectionProps {\n  /**\n   * Callback when elements are selected\n   */\n  onElementsSelected?: (elements: HTMLElement[]) => void;\n}\n\n/**\n * Custom hook to manage element selection and hovering\n */\nexport function useElementSelection({ onElementsSelected }: UseElementSelectionProps = {}) {\n  const [hoveredElement, setHoveredElement] = useState<HTMLElement | null>(null);\n  const [selectedElements, setSelectedElements] = useState<HTMLElement[]>([]);\n\n  // Element hover handlers\n  const handleElementHovered = useCallback((element: HTMLElement) => {\n    setHoveredElement(element);\n  }, []);\n\n  const handleElementUnhovered = useCallback(() => {\n    setHoveredElement(null);\n  }, []);\n\n  // Element selection handler\n  const handleElementSelected = useCallback((element: HTMLElement) => {\n    const isElementSelected = selectedElements.includes(element);\n    \n    // If element is already selected, remove it\n    if (isElementSelected) {\n      // Remove data attribute\n      element.removeAttribute('data-element-inspector-selected');\n      \n      const newSelectedElements = selectedElements.filter(el => el !== element);\n      setSelectedElements(newSelectedElements);\n      onElementsSelected?.(newSelectedElements);\n    } \n    // If element is not selected, unselect old elements and select only this one\n    else {\n      // Remove data attribute from previously selected elements\n      selectedElements.forEach(el => {\n        el.removeAttribute('data-element-inspector-selected');\n      });\n      \n      // Add data attribute to newly selected element\n      element.setAttribute('data-element-inspector-selected', 'true');\n      \n      const newSelectedElements = [element];\n      setSelectedElements(newSelectedElements);\n      onElementsSelected?.(newSelectedElements);\n    }\n  }, [selectedElements, onElementsSelected]);\n\n  // Clear all selections\n  const clearSelections = useCallback(() => {\n    // Remove data attributes from currently selected elements\n    selectedElements.forEach(element => {\n      element.removeAttribute('data-element-inspector-selected');\n    });\n    \n    setSelectedElements([]);\n    onElementsSelected?.([]);\n  }, [selectedElements, onElementsSelected]);\n\n  // Listen for the clearElementSelections event\n  useEffect(() => {\n    const handleClearSelections = () => {\n      clearSelections();\n    };\n\n    document.addEventListener('clearElementSelections', handleClearSelections);\n    \n    return () => {\n      document.removeEventListener('clearElementSelections', handleClearSelections);\n    };\n  }, [clearSelections]);\n\n  // Clean up data attributes when component unmounts\n  useEffect(() => {\n    return () => {\n      // Cleanup data attributes\n      selectedElements.forEach(element => {\n        element.removeAttribute('data-element-inspector-selected');\n      });\n    };\n  }, [selectedElements]);\n\n  return {\n    hoveredElement,\n    selectedElements,\n    handleElementHovered,\n    handleElementUnhovered,\n    handleElementSelected,\n    clearSelections\n  };\n}\n","import { useCallback, useEffect, useState } from 'react';\nimport { useWorkflowsStore } from \"../stores/workflows\";\n\ntype TabType = 'chat' | 'design' | 'workflow' | null;\n\n/**\n * Extracts common properties from an HTML element\n */\nconst extractElementProperties = (el: HTMLElement) => ({\n  tagName: el.tagName,\n  id: el.id,\n  className: el.className,\n  textContent: el.textContent?.trim(),\n  attributes: Array.from(el.attributes).map(attr => ({\n    name: attr.name,\n    value: attr.value\n  }))\n});\n\n/**\n * Maps an HTML element to a serializable object representation\n */\nconst getAllFormElements = (): string[] => {\n  const formElements = Array.from(\n    document.querySelectorAll(\n      '[data-name$=\"-select\"], [data-name$=\"-input\"], [data-name$=\"-checkbox\"], [data-name$=\"-radio\"], [data-name$=\"-textarea\"]'\n    )\n  ).filter((formEl): formEl is HTMLElement => formEl instanceof HTMLElement);\n  const dataNames = formElements.map((el) => el.getAttribute(\"data-name\") || \"\");\n  return dataNames.filter(Boolean); // Remove any empty strings if attribute is missing\n};\n\n/**\n * Custom hook to handle cross-frame communication\n */\nexport function useIframeMessaging() {\n  const isInIframe = typeof window !== 'undefined' && window.self !== window.top;\n  const [activeTab, setActiveTab] = useState<TabType>(null);\n  const [shouldEnableInspect, setShouldEnableInspect] = useState<boolean>(!isInIframe);\n  \n  // Effect to listen for messages from the parent window\n  useEffect(() => {\n    if (!isInIframe) return;\n    \n    const handleMessage = (event: MessageEvent) => {\n      if (event.data?.type === 'TAB_CHANGED') {\n        const { activeTab: newActiveTab } = event.data.payload || {};\n        \n        setActiveTab(newActiveTab as TabType);\n        \n        // Disable inspect mode for chat tab\n        if (newActiveTab === 'chat') {\n          setShouldEnableInspect(false);\n        }\n        // Enable inspect mode for design and workflow tabs\n        else if (newActiveTab === 'design' || newActiveTab === 'workflow') {\n          setShouldEnableInspect(true);\n        }\n      } else if (event.data?.type === 'WORKFLOW_LIST') {\n        useWorkflowsStore.getState().setWorkflows(event.data.workflows);\n      }\n    };\n    \n    window.addEventListener('message', handleMessage);\n    return () => {\n      window.removeEventListener('message', handleMessage);\n    };  }, [isInIframe, activeTab]);\n\n  // Send selected elements to parent window\n  const sendSelectedElements = useCallback((elements: HTMLElement[]) => {\n    if (!isInIframe) return;\n    \n    window.parent.postMessage({\n      type: 'ELEMENT_INSPECTOR_SELECTED',\n      payload: {\n        referenceInputs: getAllFormElements(),\n        elements: elements.map(el => extractElementProperties(el))\n      }\n    }, '*');\n  }, [isInIframe]);\n  \n  // Send generated prompt to parent window\n  const sendPrompt = useCallback((prompt: string, elements: HTMLElement[]) => {\n    if (!isInIframe) return;\n    \n    window.parent.postMessage({\n      type: 'ELEMENT_INSPECTOR_PROMPT',\n      payload: {\n        workflowId: useWorkflowsStore.getState().workflowId,\n        prompt,\n        activeTab,\n        referenceInputs: getAllFormElements(),\n        elements: elements.map(el => extractElementProperties(el))\n      }\n    }, '*');\n  }, [isInIframe, activeTab]);\n  \n  return {\n    isInIframe,\n    sendSelectedElements,\n    sendPrompt,\n    activeTab,\n    shouldEnableInspect\n  };\n}\n","import { useState, useCallback, useEffect } from 'react';\nimport { createElementsPrompt } from '../utils';\n\ninterface UseInspectorProps {\n  initialIsActive?: boolean;\n  onPromptGenerated?: (prompt: string, elements: HTMLElement[]) => void;\n}\n\n/**\n * Custom hook to manage the inspector state and prompt generation\n */\nexport function useInspector({\n  initialIsActive = true,\n  onPromptGenerated\n}: UseInspectorProps = {}) {\n  const [isInspecting, setIsInspecting] = useState(initialIsActive);\n  const [userPrompt, setUserPrompt] = useState('');\n  \n  // Toggle inspection mode\n  const toggleInspection = useCallback(() => {\n    setIsInspecting(prev => !prev);\n  }, []);\n  \n  // Handle ESC key to exit inspection mode\n  useEffect(() => {\n    const handleKeyDown = (event: KeyboardEvent) => {\n      if (event.key === 'Escape' && isInspecting) {\n        setIsInspecting(false);\n      }\n    };\n\n    window.addEventListener('keydown', handleKeyDown);\n    return () => {\n      window.removeEventListener('keydown', handleKeyDown);\n    };\n  }, [isInspecting]);\n  \n  // Generate prompt from selected elements and user input\n  const generatePrompt = useCallback((elements: HTMLElement[], prompt: string) => {\n    if (elements.length === 0 || !prompt.trim()) return;\n    \n    const generatedPrompt = createElementsPrompt(elements, prompt);\n    \n    // Dispatch custom event for local handlers\n    const promptEvent = new CustomEvent('promptGenerated', {\n      detail: { prompt: generatedPrompt, elements }\n    });\n    document.dispatchEvent(promptEvent);\n    \n    // Call the callback if provided\n    onPromptGenerated?.(generatedPrompt, elements);\n    \n    // Clear the prompt input\n    setUserPrompt('');\n  }, [onPromptGenerated]);\n  \n  // Handle form submission\n  const handlePromptSubmit = useCallback((e: React.FormEvent, elements: HTMLElement[]) => {\n    e.preventDefault();\n    generatePrompt(elements, userPrompt);\n  }, [userPrompt, generatePrompt]);\n  \n  return {\n    isInspecting,\n    userPrompt,\n    setUserPrompt,\n    toggleInspection,\n    handlePromptSubmit,\n    generatePrompt\n  };\n}\n"],"mappings":";AACyB,SAAR,YAA6B,KAAK,EAAE,SAAS,IAAI,CAAC,GAAG;AAC1D,MAAI,CAAC,OAAO,OAAO,aAAa,YAAa;AAE7C,QAAM,OAAO,SAAS,QAAQ,SAAS,qBAAqB,MAAM,EAAE,CAAC;AACrE,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,OAAO;AAEb,MAAI,aAAa,OAAO;AACtB,QAAI,KAAK,YAAY;AACnB,WAAK,aAAa,OAAO,KAAK,UAAU;AAAA,IAC1C,OAAO;A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AAgB,CAAC;AAGzC,EAAAC,WAAU,MAAM;AACd,QAAI,cAAc,iBAAiB,qBAAqB;AACtD,uBAAiB;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,YAAY,cAAc,qBAAqB,gBAAgB,CAAC;AAGpE,EAAAA,WAAU,MAAM;AACd,QAAI,YAAY;AACd,aAAO,OAAO,YAAY,EAAE,MAAM,mBAAmB,GAAG,GAAG;AAAA,IAC7D;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAEf,SACE,gBAAAH,MAAC,SAEC;AAAA,oBAAAD;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,kBAAkB;AAAA,QAClB,mBAAmB;AAAA,QACnB,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAGA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["inputs","elements","useCallback","useRef","jsx","useRef","useCallback","useCallback","useEffect","jsx","jsx","jsx","jsx","useEffect","useRef","get","React","jsx","React","jsx","jsx","jsxs","useRef","useEffect","jsx","jsxs","jsx","jsx","jsx","jsx","jsxs","jsx","jsx","Fragment","jsx","Fragment","jsx","jsxs","useState","useEffect","useState","useEffect","useState","useEffect","useState","useCallback","useEffect","useCallback","useEffect","useState","useState","useEffect","useCallback","elements","useState","useCallback","useEffect","useState","useCallback","useEffect","elements","jsx","jsxs","elements","useCallback","useEffect"]}