guideai-app 0.5.1 → 0.5.4-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +179 -80
  2. package/dist/GuideAI.d.ts +1 -1
  3. package/dist/GuideAI.js +1 -1
  4. package/dist/GuideAI.js.LICENSE.txt +7 -0
  5. package/dist/GuideAI.js.map +1 -1
  6. package/dist/__mocks__/fileMock.d.ts +2 -0
  7. package/dist/components/AudioConfigDialog.d.ts +22 -0
  8. package/dist/components/DeveloperTools.d.ts +36 -0
  9. package/dist/components/MicGlyphs.d.ts +9 -0
  10. package/dist/components/Microphone.d.ts +4 -2
  11. package/dist/components/NoisyPresetSuggestBanner.d.ts +12 -0
  12. package/dist/components/PlaybackInterruptLockDebugOverlay.d.ts +19 -0
  13. package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +14 -0
  14. package/dist/components/ResetGlyph.d.ts +5 -0
  15. package/dist/components/SpeakerGlyphs.d.ts +9 -0
  16. package/dist/components/TranscriptBox.d.ts +65 -8
  17. package/dist/components/TranscriptMessages.d.ts +8 -1
  18. package/dist/components/TranscriptTextInput.d.ts +41 -2
  19. package/dist/components/TranscriptToolbar.d.ts +23 -0
  20. package/dist/components/TranscriptWorkflowDrawer.d.ts +39 -0
  21. package/dist/components/WelcomeBubble.d.ts +6 -1
  22. package/dist/components/WorkspaceStubIcon.d.ts +6 -0
  23. package/dist/contexts/AdminToolDiagnosticsContext.d.ts +6 -0
  24. package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +16 -0
  25. package/dist/devtools/adminToolDiagnostics/adminToolDiagnosticsPanelUtils.d.ts +8 -0
  26. package/dist/devtools/adminToolDiagnostics/adminToolDiagnosticsStyles.d.ts +5 -0
  27. package/dist/devtools/adminToolDiagnostics/buildDiagnosticsToolNameList.d.ts +6 -0
  28. package/dist/devtools/adminToolDiagnostics/getIdOrFallbackSelectorForDiagnostics.d.ts +5 -0
  29. package/dist/devtools/adminToolDiagnostics/index.d.ts +2 -0
  30. package/dist/devtools/useDraggableDialog.d.ts +23 -0
  31. package/dist/devtools/visualContextInspector/BufferIndicator.d.ts +15 -0
  32. package/dist/devtools/visualContextInspector/ConfigSection.d.ts +18 -0
  33. package/dist/devtools/visualContextInspector/ScreenshotList.d.ts +13 -0
  34. package/dist/devtools/visualContextInspector/VisualContextInspector.d.ts +36 -0
  35. package/dist/devtools/visualContextInspector/fieldInfo.d.ts +7 -0
  36. package/dist/devtools/visualContextInspector/index.d.ts +13 -0
  37. package/dist/devtools/visualContextInspector/inspectorStore.d.ts +35 -0
  38. package/dist/devtools/visualContextInspector/inspectorStyles.d.ts +13 -0
  39. package/dist/devtools/visualContextInspector/types.d.ts +27 -0
  40. package/dist/hooks/index.d.ts +6 -0
  41. package/dist/hooks/useAssistantPlaybackMute.d.ts +16 -0
  42. package/dist/hooks/useAudioConfigSurface.d.ts +20 -0
  43. package/dist/hooks/useConversationSession.d.ts +69 -0
  44. package/dist/hooks/useDocToFormDropFlow.d.ts +31 -0
  45. package/dist/hooks/useGuideAIAPI.d.ts +3 -6
  46. package/dist/hooks/useGuideAILayout.d.ts +38 -0
  47. package/dist/hooks/useGuideAILocalStorageSync.d.ts +17 -0
  48. package/dist/hooks/useHiddenRealtimeSteers.d.ts +22 -0
  49. package/dist/hooks/useMicMute.d.ts +20 -0
  50. package/dist/hooks/useMicPreset.d.ts +19 -0
  51. package/dist/hooks/useMicPromptHook.d.ts +28 -0
  52. package/dist/hooks/useNoisyPresetSuggest.d.ts +19 -0
  53. package/dist/hooks/usePlaybackLockDebugOverlay.d.ts +12 -0
  54. package/dist/hooks/useProtectedPlayback.d.ts +36 -0
  55. package/dist/hooks/useTranscriptChrome.d.ts +39 -0
  56. package/dist/hooks/useTranscriptState.d.ts +1 -1
  57. package/dist/hooks/useWebRTC.d.ts +41 -6
  58. package/dist/hooks/useWidgetWorkflowSession.d.ts +35 -0
  59. package/dist/hooks/useWorkspaceCatalog.d.ts +32 -0
  60. package/dist/index.d.ts +6 -1
  61. package/dist/lib/workspaceEmbedIcons.d.ts +57 -0
  62. package/dist/micPrompt.defaults.d.ts +25 -0
  63. package/dist/playwrightToolHarness.d.ts +8 -0
  64. package/dist/playwrightToolHarness.js +3 -0
  65. package/dist/playwrightToolHarness.js.LICENSE.txt +16 -0
  66. package/dist/playwrightToolHarness.js.map +1 -0
  67. package/dist/staticContext/collectContext.d.ts +28 -0
  68. package/dist/staticContext/index.d.ts +8 -0
  69. package/dist/staticContext/types.d.ts +176 -0
  70. package/dist/staticContext/useStaticContext.d.ts +32 -0
  71. package/dist/stubs/workspaces.d.ts +36 -0
  72. package/dist/styles/GuideAI.styles.d.ts +2 -6
  73. package/dist/styles/GuideAI.styles.types.d.ts +6 -0
  74. package/dist/styles/guideAIStylesCore.d.ts +2 -0
  75. package/dist/styles/guideAIStylesDialogs.d.ts +2 -0
  76. package/dist/styles/guideAIStylesMicPrompt.d.ts +2 -0
  77. package/dist/styles/guideAIStylesTranscript.d.ts +2 -0
  78. package/dist/types/GuideAI.types.d.ts +63 -2
  79. package/dist/types/audioConfig.types.d.ts +78 -0
  80. package/dist/utils/api.d.ts +61 -15
  81. package/dist/utils/confettiBurst.d.ts +6 -0
  82. package/dist/utils/constants.d.ts +7 -1
  83. package/dist/utils/conversationManager.d.ts +20 -2
  84. package/dist/utils/dataChannel.d.ts +56 -6
  85. package/dist/utils/dataChannelHelpers.d.ts +28 -0
  86. package/dist/utils/dataTransferHasFiles.d.ts +2 -0
  87. package/dist/utils/date.d.ts +11 -0
  88. package/dist/utils/embedConversationNamespace.d.ts +10 -0
  89. package/dist/utils/isMobileBrowser.d.ts +5 -0
  90. package/dist/utils/lastSystemToolCall.d.ts +6 -0
  91. package/dist/utils/localStorageHelper.d.ts +84 -0
  92. package/dist/utils/logger.d.ts +17 -20
  93. package/dist/utils/messageStorage.d.ts +16 -11
  94. package/dist/utils/micPromptThrottle.d.ts +13 -0
  95. package/dist/utils/positionUtils.d.ts +8 -7
  96. package/dist/utils/reactHooks.d.ts +14 -0
  97. package/dist/utils/reducedMotion.d.ts +17 -0
  98. package/dist/utils/tools/back.d.ts +19 -0
  99. package/dist/utils/tools/clickElement.d.ts +32 -0
  100. package/dist/utils/tools/cssPathForElement.d.ts +2 -0
  101. package/dist/utils/tools/descriptionToHighlightSelector.d.ts +2 -0
  102. package/dist/utils/tools/docToForm.d.ts +54 -0
  103. package/dist/utils/tools/docUploadPrompt.d.ts +11 -0
  104. package/dist/utils/tools/elementInteractions.d.ts +40 -0
  105. package/dist/utils/tools/fillField.d.ts +41 -0
  106. package/dist/utils/tools/fillForm.d.ts +49 -0
  107. package/dist/utils/tools/goToAElmLink.d.ts +27 -0
  108. package/dist/utils/tools/highlight.d.ts +23 -0
  109. package/dist/utils/tools/highlightThenClick.d.ts +31 -0
  110. package/dist/utils/tools/hover.d.ts +23 -0
  111. package/dist/utils/tools/hoverThenClick.d.ts +37 -0
  112. package/dist/utils/tools/markWorkflowComplete.d.ts +18 -0
  113. package/dist/utils/tools/navigateTo.d.ts +23 -0
  114. package/dist/utils/tools/refresh.d.ts +19 -0
  115. package/dist/utils/tools/sampleToolArgsJson.d.ts +1 -0
  116. package/dist/utils/tools/scroll.d.ts +32 -0
  117. package/dist/utils/tools/toolRegistry.d.ts +55 -0
  118. package/dist/utils/tools/workflowToolBridge.d.ts +15 -0
  119. package/dist/utils/webrtcConnection.d.ts +9 -2
  120. package/dist/utils/widgetAuthStore.d.ts +9 -0
  121. package/dist/utils/widgetBearerStorage.d.ts +26 -0
  122. package/dist/utils/widgetSession.d.ts +20 -0
  123. package/dist/utils/widgetWorkspaces.d.ts +10 -0
  124. package/dist/utils/workflowSteer.d.ts +6 -0
  125. package/dist/utils/workspaceCatalog.d.ts +24 -0
  126. package/dist/visualContext/VisualContextScheduler.d.ts +48 -2
  127. package/dist/visualContext/domChangeTracker.d.ts +29 -0
  128. package/dist/visualContext/imageHash.d.ts +19 -0
  129. package/dist/visualContext/index.d.ts +3 -3
  130. package/dist/visualContext/types.d.ts +48 -2
  131. package/dist/visualContext/useVisualContext.d.ts +23 -8
  132. package/package.json +3 -1
  133. package/dist/components/AnimatedSettingsItem.d.ts +0 -9
  134. package/dist/components/MuteButton.d.ts +0 -11
  135. package/dist/components/ResetButton.d.ts +0 -9
  136. package/dist/components/SettingsMenu.d.ts +0 -16
  137. package/dist/components/SettingsToggle.d.ts +0 -7
  138. package/dist/components/TranscriptToggle.d.ts +0 -7
  139. package/dist/utils/elementInteractions.d.ts +0 -127
  140. package/dist/utils/goToAElmLink.d.ts +0 -1
  141. package/dist/utils/highlightThenClick.d.ts +0 -2
  142. package/dist/utils/hover.d.ts +0 -2
  143. package/dist/utils/hoverThenClick.d.ts +0 -2
  144. package/dist/utils/toolRegistry.d.ts +0 -33
  145. package/dist/utils/workflow.d.ts +0 -62
  146. package/dist/visualContext/debug-overlay.d.ts +0 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwrightToolHarness.js","mappings":";uBAIA,EAMMA,E,8CCDN,MAAMC,GAAS,E,QAAA,GAAiB,SAAU,CACxC,CACE,OACA,CACEC,EAAG,+GACHC,IAAK,UAGT,CACE,OACA,CACED,EAAG,4EACHC,IAAK,WAGT,CACE,OACA,CACED,EAAG,4EACHC,IAAK,Y,wjECsIX,qBAmMA,uBA8BA,oBAuJA,uCAA4CC,GAA5C,WACC,OAAO,IAAIC,QAAiB,SAACC,GAC5B,IAAIC,GAAU,EACRC,EAAS,SAACC,GACXF,IACJA,GAAU,EACVD,EAAQG,GACT,GACA,IAAAC,uBAAsB,+C,yDAEb,O,sBAAP,EAAAF,EAAO,GAAMJ,K,cAAb,gBAAO,W,+BAEP,UAAOO,MAAM,UAAW,0BAA2B,GACnDH,GAAO,G,6BAGV,EACD,EA3iBA,iBAkKA,SAAgBI,EAAiBC,GAChC,IAAKA,EAAQC,YAAa,OAAO,EAGjC,IADA,IAAIC,EAAqBF,EAClBE,GAAI,CACV,GAAIA,aAAcC,Y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Oo2B,uBAAyB,CAC/BC,YAAa,SAAC3tB,EAAc2F,GAAiB,WAAAgoB,aAAY3tB,EAAM2F,EAAM1P,EAAxB,E","sources":["webpack://guideai-app/./src/playwrightToolHarness.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/layers.js","webpack://guideai-app/./src/utils/tools/elementInteractions.ts","webpack://guideai-app/./src/utils/tools/fillField.ts","webpack://guideai-app/./src/utils/localStorageHelper.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/book-open.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/globe.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/video.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/file-text.js","webpack://guideai-app/./src/utils/tools/highlightThenClick.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/database.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/leaf.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/star.js","webpack://guideai-app/./src/utils/api.ts","webpack://guideai-app/./src/utils/tools/hover.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/gift.js","webpack://guideai-app/./src/utils/tools/refresh.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/briefcase.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/music.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/calendar.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/shield.js","webpack://guideai-app/./src/utils/tools/clickElement.ts","webpack://guideai-app/./src/utils/tools/goToAElmLink.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/code.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/folder-open.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/heart.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/lightbulb.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/users.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/mail.js","webpack://guideai-app/./src/utils/constants.ts","webpack://guideai-app/./src/utils/tools/scroll.ts","webpack://guideai-app/./src/utils/tools/docToForm.ts","webpack://guideai-app/./node_modules/react/cjs/react.production.min.js","webpack://guideai-app/./src/utils/tools/navigateTo.ts","webpack://guideai-app/./src/utils/tools/docUploadPrompt.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/house.js","webpack://guideai-app/./src/utils/logger.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/play.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/trophy.js","webpack://guideai-app/./src/utils/tools/highlight.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/map.js","webpack://guideai-app/./src/utils/tools/hoverThenClick.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/layout-grid.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/sparkles.js","webpack://guideai-app/./node_modules/react/index.js","webpack://guideai-app/./src/utils/tools/workflowToolBridge.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/wrench.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/zap.js","webpack://guideai-app/./src/lib/workspaceEmbedIcons.tsx","webpack://guideai-app/./src/utils/tools/toolRegistry.ts","webpack://guideai-app/./src/utils/widgetAuthStore.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/lock.js","webpack://guideai-app/./src/utils/tools/markWorkflowComplete.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/clock.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/camera.js","webpack://guideai-app/./src/utils/tools/fillForm.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/target.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/compass.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/cloud.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/search.js","webpack://guideai-app/./src/utils/tools/back.ts","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/flag.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/shared/src/utils.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/defaultAttributes.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/Icon.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/createLucideIcon.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/bell.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/image.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/rocket.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/phone.js","webpack://guideai-app/./node_modules/lucide-react/dist/esm/icons/cpu.js","webpack://guideai-app/webpack/bootstrap","webpack://guideai-app/webpack/runtime/define property getters","webpack://guideai-app/webpack/runtime/hasOwnProperty shorthand","webpack://guideai-app/webpack/runtime/make namespace object"],"sourcesContent":["/**\n * Browser bundle entry for Playwright: exposes tool execution on window so E2E\n * tests run against the real DOM (executeTool in Node has no document).\n */\nimport {\n\tbuildLocalToolsWithConfig,\n\texecuteTool,\n\ttype ToolWithConfig,\n} from './utils/tools/toolRegistry';\n\nconst toolsConfig: ToolWithConfig[] = buildLocalToolsWithConfig();\n\ndeclare global {\n\tinterface Window {\n\t\t__GUIDEAI_PLAYWRIGHT__?: {\n\t\t\texecuteTool: (name: string, args: string) => Promise<unknown>;\n\t\t};\n\t}\n}\n\nwindow.__GUIDEAI_PLAYWRIGHT__ = {\n\texecuteTool: (name: string, args: string) => executeTool(name, args, toolsConfig),\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Layers = createLucideIcon(\"Layers\", [\n [\n \"path\",\n {\n d: \"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z\",\n key: \"zw3jo\"\n }\n ],\n [\n \"path\",\n {\n d: \"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12\",\n key: \"1wduqc\"\n }\n ],\n [\n \"path\",\n {\n d: \"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17\",\n key: \"kqbvx6\"\n }\n ]\n]);\n\nexport { Layers as default };\n//# sourceMappingURL=layers.js.map\n","import Logger from '../logger';\n\n// Types\nexport interface ToolInput {\n\targuments: string;\n\tname?: string;\n}\n\n/// --- Constants --- ///\nexport const HOVER_EFFECT_KEEP_ALIVE_TIME = 1500; // milliseconds\n\nconst NAVIGATE_GRACE_PERIOD_MS = 10_000;\n\n/** Remove the cursor only after the queue has stayed empty this long, so chained hovers/clicks from the model do not flash-remove between round-trips. */\nconst CURSOR_IDLE_REMOVE_MS = 2000;\n\n// Track when navigateTo last ran (persisted in sessionStorage so it survives reloads)\nexport const getLastNavigateTimestamp = (): number | null => {\n\ttry {\n\t\tif (typeof window === 'undefined' || !window.sessionStorage) return null;\n\t\tconst raw = window.sessionStorage.getItem('guideai:lastNavigateTs');\n\t\tif (!raw) return null;\n\t\tconst parsed = parseInt(raw, 10);\n\t\treturn Number.isNaN(parsed) ? null : parsed;\n\t} catch {\n\t\treturn null;\n\t}\n};\n\n// Shared utility to wait for an element to appear, but only when a recent navigateTo occurred.\n// Otherwise, it fails fast so bad selectors don't cause long waits.\nexport const waitForElement = async (\n\tselector: string,\n\ttimeout: number = NAVIGATE_GRACE_PERIOD_MS,\n\tinterval: number = 2000\n): Promise<Element | null> => {\n\t// Always try once immediately\n\tlet element: Element | null = findElementBySelector(selector);\n\tif (element) return element;\n\n\tconst lastNavigate = getLastNavigateTimestamp();\n\tconst now = Date.now();\n\n\t// If there was no recent navigateTo, don't poll – just fail fast.\n\tif (!lastNavigate || now - lastNavigate > NAVIGATE_GRACE_PERIOD_MS) {\n\t\treturn null;\n\t}\n\n\t// Only poll within the remaining grace period after navigateTo\n\tconst deadline = lastNavigate + timeout;\n\n\twhile (!element && Date.now() < deadline) {\n\t\tawait new Promise((resolve) => setTimeout(resolve, interval));\n\t\telement = findElementBySelector(selector);\n\t}\n\n\treturn element;\n};\n\n// Create hover effects with position tracking for dynamic elements\nexport const createHoverEffect = async (\n\telement: Element,\n\tinitialRect: DOMRect,\n\tcursorElement: HTMLElement | null = null,\n\tduration: number = HOVER_EFFECT_KEEP_ALIVE_TIME\n): Promise<void> => {\n\treturn new Promise<void>((resolve) => {\n\t\tsetTimeout(() => {\n\t\t\tconst cursorZIndex: number = getEffectiveZIndex(element) + 1;\n\n\t\t\t// Get fresh rect in case element has expanded since initial measurement\n\t\t\tlet currentRect = element.getBoundingClientRect();\n\t\t\tconst hoverEffectContainer = document.createElement('div');\n\t\t\thoverEffectContainer.style.cssText = `\n position: fixed;\n left: ${currentRect.left}px;\n top: ${currentRect.top}px;\n width: ${currentRect.width}px;\n height: ${currentRect.height}px;\n z-index: ${cursorZIndex};\n pointer-events: none;\n border: 2px solid rgba(255, 165, 0, 0.8);\n border-radius: 4px;\n background: rgba(255, 165, 0, 0.1);\n box-shadow: 0 0 10px rgba(255, 165, 0, 0.6);\n animation: hover-pulse 0.8s ease-in-out infinite;\n transition: all 0.1s ease-out;\n `;\n\t\t\thoverEffectContainer.setAttribute('data-guideai-hover-effect', 'true');\n\t\t\tdocument.body.appendChild(hoverEffectContainer);\n\n\t\t\tconst mouseEnterEvent = new MouseEvent('mouseenter', {\n\t\t\t\tview: window,\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t});\n\t\t\tconst mouseOverEvent = new MouseEvent('mouseover', {\n\t\t\t\tview: window,\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t});\n\n\t\t\telement.dispatchEvent(mouseEnterEvent);\n\t\t\telement.dispatchEvent(mouseOverEvent);\n\n\t\t\t// Temporarily apply a subtle highlight to the element itself\n\t\t\tconst originalBoxShadow = (element as HTMLElement).style.boxShadow;\n\t\t\tconst originalTransition = (element as HTMLElement).style.transition;\n\t\t\tconst originalBackground = (element as HTMLElement).style.background;\n\n\t\t\t(element as HTMLElement).style.transition = 'all 0.3s ease-out';\n\t\t\t(element as HTMLElement).style.boxShadow =\n\t\t\t\t'0 0 0 2px rgba(255, 165, 0, 0.6), 0 0 15px rgba(255, 165, 0, 0.4)';\n\t\t\t(element as HTMLElement).style.background =\n\t\t\t\t(element as HTMLElement).style.background + ', rgba(255, 165, 0, 0.05)';\n\n\t\t\t// Position tracking interval\n\t\t\tlet trackingInterval: NodeJS.Timeout;\n\t\t\ttrackingInterval = setInterval(() => {\n\t\t\t\tconst newRect = element.getBoundingClientRect();\n\n\t\t\t\t// Check if position or size changed significantly (more than 2px to avoid tiny fluctuations)\n\t\t\t\tif (\n\t\t\t\t\tMath.abs(newRect.left - currentRect.left) > 2 ||\n\t\t\t\t\tMath.abs(newRect.top - currentRect.top) > 2 ||\n\t\t\t\t\tMath.abs(newRect.width - currentRect.width) > 2 ||\n\t\t\t\t\tMath.abs(newRect.height - currentRect.height) > 2\n\t\t\t\t) {\n\t\t\t\t\tcurrentRect = newRect;\n\n\t\t\t\t\t// Update hover effect container position\n\t\t\t\t\thoverEffectContainer.style.left = `${currentRect.left}px`;\n\t\t\t\t\thoverEffectContainer.style.top = `${currentRect.top}px`;\n\t\t\t\t\thoverEffectContainer.style.width = `${currentRect.width}px`;\n\t\t\t\t\thoverEffectContainer.style.height = `${currentRect.height}px`;\n\n\t\t\t\t\t// Update cursor position if it exists\n\t\t\t\t\tif (cursorElement) {\n\t\t\t\t\t\tcursorElement.style.left = `${currentRect.left + currentRect.width / 2}px`;\n\t\t\t\t\t\tcursorElement.style.top = `${currentRect.top + currentRect.height / 2 - 10}px`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 50); // Check every 50ms for position changes\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tclearInterval(trackingInterval);\n\n\t\t\t\t(element as HTMLElement).style.boxShadow = originalBoxShadow;\n\t\t\t\t(element as HTMLElement).style.transition = originalTransition;\n\t\t\t\t(element as HTMLElement).style.background = originalBackground;\n\n\t\t\t\thoverEffectContainer.remove();\n\t\t\t\tresolve();\n\t\t\t}, duration || HOVER_EFFECT_KEEP_ALIVE_TIME); // Keep hover effect for specified duration or 3 seconds\n\t\t}, 250); // Small delay before applying hover effects\n\t});\n};\n\n/**\n * Whether an element is shown in the layout tree (usable when multiple nodes match the same text/CSS).\n * Walks ancestors for display/visibility/opacity/hidden; requires a non-zero box for HTMLElement targets.\n */\nexport function isElementVisible(element: Element): boolean {\n\tif (!element.isConnected) return false;\n\n\tlet el: Element | null = element;\n\twhile (el) {\n\t\tif (el instanceof HTMLElement) {\n\t\t\tif (el.hidden) return false;\n\t\t\tif (el.inert) return false;\n\t\t}\n\t\tif (el.getAttribute('aria-hidden') === 'true') return false;\n\n\t\tconst style = window.getComputedStyle(el);\n\t\tif (style.display === 'none') return false;\n\t\tif (style.visibility === 'hidden' || style.visibility === 'collapse') return false;\n\t\tif (style.contentVisibility === 'hidden') return false;\n\t\tconst opacity = parseFloat(style.opacity);\n\t\tif (Number.isFinite(opacity) && opacity === 0) return false;\n\n\t\tel = el.parentElement;\n\t}\n\n\tif (element instanceof HTMLElement) {\n\t\tconst rect = element.getBoundingClientRect();\n\t\treturn rect.width > 0 && rect.height > 0;\n\t}\n\n\treturn element.getClientRects().length > 0;\n}\n\n// Parse custom selector format: \"text:cssSelector:textContent\"\nexport const parseCustomSelector = (\n\tselector: string\n): {\n\ttype: 'text' | 'css' | 'xpath';\n\tcssSelector?: string;\n\ttextContent?: string;\n\toriginalSelector?: string;\n} => {\n\t// Check if it's a text selector format: \"text:cssSelector:textContent\"\n\tif (selector.startsWith('text:')) {\n\t\tconst parts = selector.split(':');\n\t\tif (parts.length >= 3) {\n\t\t\tconst cssSelector = parts[1];\n\t\t\tconst textContent = parts.slice(2).join(':'); // Rejoin in case text contains colons\n\t\t\treturn { type: 'text', cssSelector, textContent };\n\t\t}\n\t}\n\n\t// Check if it's XPath\n\tif (selector.startsWith('//')) {\n\t\treturn { type: 'xpath', originalSelector: selector };\n\t}\n\n\t// Default to CSS selector\n\treturn { type: 'css', originalSelector: selector };\n};\n\n// Find element using custom selector logic\nexport const findElementBySelectorStrict = (selector: string): Element | null => {\n\tconst parsed = parseCustomSelector(selector);\n\n\tswitch (parsed.type) {\n\t\tcase 'text': {\n\t\t\tif (!parsed.cssSelector || !parsed.textContent) return null;\n\n\t\t\t// Find all elements matching the CSS selector\n\t\t\tconst elements = document.querySelectorAll(parsed.cssSelector);\n\t\t\tconst targetText = parsed.textContent.trim();\n\n\t\t\t// Filter by text content; prefer visible nodes when several match\n\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\tconst element = elements[i];\n\t\t\t\tconst textContent = element.textContent?.trim();\n\t\t\t\tif (textContent === targetText && isElementVisible(element)) {\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If exact match not found, try finding parent elements that contain the text\n\t\t\t// This handles cases where the text is in a child element\n\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\tconst element = elements[i];\n\t\t\t\tconst parent =\n\t\t\t\t\telement.closest('button, [role=\"button\"], a, [onclick]') || element.parentElement;\n\t\t\t\tif (parent && parent.textContent?.trim().includes(targetText) && isElementVisible(parent)) {\n\t\t\t\t\treturn parent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\tcase 'xpath': {\n\t\t\tif (!parsed.originalSelector) return null;\n\t\t\tconst result = document.evaluate(\n\t\t\t\tparsed.originalSelector,\n\t\t\t\tdocument,\n\t\t\t\tnull,\n\t\t\t\tXPathResult.ORDERED_NODE_SNAPSHOT_TYPE,\n\t\t\t\tnull\n\t\t\t);\n\t\t\tfor (let i = 0; i < result.snapshotLength; i++) {\n\t\t\t\tconst node = result.snapshotItem(i);\n\t\t\t\tif (node instanceof Element && isElementVisible(node)) {\n\t\t\t\t\treturn node;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\tcase 'css':\n\t\tdefault: {\n\t\t\tif (!parsed.originalSelector) return null;\n\t\t\tconst matches = document.querySelectorAll(parsed.originalSelector);\n\t\t\tfor (let i = 0; i < matches.length; i++) {\n\t\t\t\tconst match = matches[i];\n\t\t\t\tif (isElementVisible(match)) return match;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}\n};\n\n// Find element using custom selector logic and search through various element types if not found\nexport const findElementBySelector = (selector: string): Element | null => {\n\t// Try finding an exact match\n\tlet element = findElementBySelectorStrict(selector);\n\n\t// If an exact match is found, return it\n\tif (element) {\n\t\treturn element;\n\t}\n\n\t// Try other selectors instead of stopping\n\tconst elementTypes = [\n\t\t'a',\n\t\t'button',\n\t\t'input',\n\t\t'textarea',\n\t\t'div',\n\t\t'span',\n\t\t'li',\n\t\t'p',\n\t\t'h1',\n\t\t'h2',\n\t\t'h3',\n\t\t'h4',\n\t\t'h5',\n\t\t'h6',\n\t];\n\n\t// Check if currentSelector starts with //\n\tif (selector.startsWith('//')) {\n\t\t// Get the word after //. For instance //a[href=abc] should print a.\n\t\tconst regex = /^\\/\\/([a-zA-Z0-9]+)/;\n\t\tconst match = selector.match(regex);\n\t\tif (match && match[1] && elementTypes.includes(match[1])) {\n\t\t\tconst elementType = match[1];\n\n\t\t\t// Search with the other element types\n\t\t\tfor (const type of elementTypes) {\n\t\t\t\tif (type === elementType) continue; // Skip the original type\n\n\t\t\t\tconst newSelector = selector.replace(`//${elementType}`, `//${type}`);\n\t\t\t\tconst newElement = findElementBySelectorStrict(newSelector);\n\t\t\t\tif (newElement) {\n\t\t\t\t\t// Update element and break out of loop\n\t\t\t\t\telement = newElement;\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Element doesn't start with // so it is of the type text:button:TextHere\n\n\t\t// Middle segment is cssSelector (tag name or .class etc.); label is everything after the second :\n\t\tconst parts = selector.split(':');\n\t\tif (parts.length >= 3 && selector.startsWith('text:')) {\n\t\t\tconst textSuffix = parts.slice(2).join(':');\n\n\t\t\t// e.g. text:.MuiListItemText-primary:Insureds — middle is not a bare tag, so the loop\n\t\t\t// above was skipped. Still try each element type so we can find the same node as text:button:Label.\n\t\t\tfor (const type of elementTypes) {\n\t\t\t\tconst newSelector = `text:${type}:${textSuffix}`;\n\t\t\t\tconst newElement = findElementBySelectorStrict(newSelector);\n\t\t\t\tif (newElement) {\n\t\t\t\t\telement = newElement;\n\t\t\t\t\treturn element;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null; // No element found\n};\n\nexport function getEffectiveZIndex(element: Element | null): number {\n\tlet el = element;\n\n\twhile (el) {\n\t\tconst style = window.getComputedStyle(el);\n\n\t\tif (style.zIndex !== 'auto') {\n\t\t\tconst isPositioned = style.position !== 'static';\n\t\t\tconst isFlexItem =\n\t\t\t\tel.parentElement &&\n\t\t\t\t(window.getComputedStyle(el.parentElement).display.includes('flex') ||\n\t\t\t\t\twindow.getComputedStyle(el.parentElement).display.includes('grid'));\n\n\t\t\tif (isPositioned || isFlexItem) {\n\t\t\t\treturn parseInt(style.zIndex, 10);\n\t\t\t}\n\t\t}\n\n\t\tel = el.parentElement;\n\t}\n\n\treturn 0;\n}\n\nexport type ScrollToElementOptions = {\n\tbehavior?: ScrollBehavior;\n\tblock?: ScrollLogicalPosition;\n\tinline?: ScrollLogicalPosition;\n};\n\nexport function scrollToElement(element: Element, options?: ScrollToElementOptions): void {\n\telement.scrollIntoView({\n\t\tbehavior: options?.behavior ?? 'smooth',\n\t\tblock: options?.block ?? 'center',\n\t\tinline: options?.inline ?? 'nearest',\n\t});\n}\n\nexport const moveCursorToElement = async (\n\telement: Element,\n\tcursorElement: HTMLElement | null\n): Promise<HTMLElement | null> => {\n\t// Scroll element into view if it's not visible\n\tscrollToElement(element, { behavior: 'smooth', block: 'center', inline: 'center' });\n\n\t// Wait a moment for scrolling to complete\n\tawait new Promise((resolve) => setTimeout(resolve, 300));\n\n\t// Get rect after scrolling\n\tlet rect = element.getBoundingClientRect();\n\n\t// For collapsed elements, we might need to trigger hover first to get accurate dimensions\n\tconst isLikelyCollapsed = rect.width < 50 || rect.height < 20;\n\n\tif (isLikelyCollapsed) {\n\t\t// Dispatch initial hover events to potentially expand the element\n\t\tconst mouseEnterEvent = new MouseEvent('mouseenter', {\n\t\t\tview: window,\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\telement.dispatchEvent(mouseEnterEvent);\n\n\t\t// Wait for potential expansion animation\n\t\tawait new Promise((resolve) => setTimeout(resolve, 200));\n\n\t\t// Get updated rect after potential expansion\n\t\trect = element.getBoundingClientRect();\n\t}\n\n\t// Create cursor if it's the first element, or reuse existing cursor\n\tif (!cursorElement) {\n\t\tconst cursorZIndex: number = getEffectiveZIndex(element) + 1;\n\n\t\tcursorElement = document.createElement('div');\n\t\tcursorElement.id = 'guide-ai-cursor';\n\n\t\tconst blueCursorSvg = `\n <svg width=\"100%\" height=\"100%\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"#0066ff\" d=\"M7,2l12,11.2l-5.8,0.5l3.3,7.3l-2.2,1l-3.2-7.4L7,18.5V2\" />\n </svg>\n `;\n\n\t\tcursorElement.innerHTML = blueCursorSvg;\n\t\tcursorElement.style.cssText = `\n position: fixed;\n width: 64px;\n height: 64px;\n pointer-events: none;\n z-index: ${cursorZIndex};\n transition: all 0.8s ease-in-out;\n transform: translate(-50%, 0);\n filter: drop-shadow(0 0 4px rgba(0, 102, 255, 0.8));\n `;\n\n\t\tdocument.body.appendChild(cursorElement);\n\n\t\t// First element starts from center of viewport\n\t\tconst viewportWidth = window.innerWidth;\n\t\tconst viewportHeight = window.innerHeight;\n\t\tcursorElement.style.left = `${viewportWidth / 2}px`;\n\t\tcursorElement.style.top = `${viewportHeight / 2}px`;\n\t}\n\n\t// Force reflow to ensure transition works\n\tvoid cursorElement!.offsetHeight;\n\n\tawait new Promise<void>((resolve) => {\n\t\tsetTimeout(() => {\n\t\t\tcursorElement!.style.left = `${rect.left + rect.width / 2}px`;\n\t\t\tcursorElement!.style.top = `${rect.top + rect.height / 2 - 10}px`;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tcursorElement!.style.animation = 'cursor-hover-float 2s ease-in-out infinite';\n\t\t\t\tresolve();\n\t\t\t}, 100);\n\t\t}, 100);\n\t});\n\n\treturn cursorElement;\n};\n\ntype InteractionJob = () => Promise<void>;\n\nconst interactionQueue: InteractionJob[] = [];\nlet isProcessingQueue = false;\nlet pendingCursorRemovalId: ReturnType<typeof setTimeout> | null = null;\n\nfunction clearScheduledCursorRemoval(): void {\n\tif (pendingCursorRemovalId !== null) {\n\t\tclearTimeout(pendingCursorRemovalId);\n\t\tpendingCursorRemovalId = null;\n\t}\n}\n\n/** Debounced: only remove the cursor if no new jobs arrive and processing has not restarted. */\nfunction scheduleCursorRemovalWhenIdle(): void {\n\tclearScheduledCursorRemoval();\n\tpendingCursorRemovalId = setTimeout(() => {\n\t\tpendingCursorRemovalId = null;\n\t\tif (interactionQueue.length > 0 || isProcessingQueue) {\n\t\t\treturn;\n\t\t}\n\t\tdocument.getElementById('guide-ai-cursor')?.remove();\n\t}, CURSOR_IDLE_REMOVE_MS);\n}\n\nconst processInteractionQueue = async (): Promise<void> => {\n\tif (isProcessingQueue) return;\n\tisProcessingQueue = true;\n\n\ttry {\n\t\twhile (interactionQueue.length > 0) {\n\t\t\tconst job = interactionQueue.shift();\n\t\t\tif (!job) continue;\n\t\t\ttry {\n\t\t\t\tawait job();\n\t\t\t} catch (error) {\n\t\t\t\tLogger.error('GuideAI', 'Error running interaction job:', error);\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tisProcessingQueue = false;\n\t\tscheduleCursorRemovalWhenIdle();\n\t}\n};\n\nexport const enqueueInteractionJob = (job: InteractionJob): void => {\n\tclearScheduledCursorRemoval();\n\tinteractionQueue.push(job);\n\tif (!isProcessingQueue) {\n\t\tvoid processInteractionQueue();\n\t}\n};\n\n/**\n * Runs work on the interaction queue and returns a boolean for executeTool.\n * Always settles: if the job throws (e.g. invalid selector DOMException), resolves false so\n * dataChannel sees result === false and can log; otherwise a thrown job would never resolve\n * the outer promise because processInteractionQueue swallows errors.\n */\nexport function runQueuedInteractionBoolean(work: () => Promise<boolean>): Promise<boolean> {\n\treturn new Promise<boolean>((resolve) => {\n\t\tlet settled = false;\n\t\tconst finish = (value: boolean) => {\n\t\t\tif (settled) return;\n\t\t\tsettled = true;\n\t\t\tresolve(value);\n\t\t};\n\t\tenqueueInteractionJob(async () => {\n\t\t\ttry {\n\t\t\t\tfinish(await work());\n\t\t\t} catch (error) {\n\t\t\t\tLogger.error('GuideAI', 'Interaction job failed:', error);\n\t\t\t\tfinish(false);\n\t\t\t}\n\t\t});\n\t});\n}\n\nexport const parseArgs = async (argsToUse: string): Promise<any> => {\n\ttry {\n\t\treturn JSON.parse(argsToUse.trim());\n\t} catch (err: any) {\n\t\tLogger.error('GuideAI', 'Error parsing args as JSON:', err);\n\t\tthrow err;\n\t}\n};\n","import {\n\tfindElementBySelector,\n\tparseArgs,\n\trunQueuedInteractionBoolean,\n\tscrollToElement,\n\tToolInput,\n} from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Fill_Field_Tool = {\n\ttype: 'function',\n\tname: 'fillField',\n\tdescription:\n\t\t'Fill an input, textarea, or contenteditable field with the specified value, optionally identified by field name or selector.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfieldName: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t'Logical field name to locate the field (e.g., label text, HTML name attribute, placeholder, or accessible name). Used first when present.',\n\t\t\t},\n\t\t\tselector: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t'Fallback CSS/XPath/text selector for the field if fieldName is not provided or does not match.',\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'The text value to fill into the target field.',\n\t\t\t},\n\t\t\tdelay: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription:\n\t\t\t\t\t'Delay in milliseconds before filling the field. Default is 0ms. Maximum is 10000ms.',\n\t\t\t\tminimum: 0,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['value'],\n\t},\n};\n\nconst FILLABLE_TAGS = 'input, textarea, select, [contenteditable=\"true\"]';\n\nconst normalize = (text: string) => (text || '').toLowerCase().replace(/[^a-z0-9]/g, '');\n\nconst dispatchEvents = (el: HTMLElement) => {\n\tel.dispatchEvent(new Event('input', { bubbles: true }));\n\tel.dispatchEvent(new Event('change', { bubbles: true }));\n};\n\nconst setNativeValue = (el: HTMLElement, value: any, prop = 'value') => {\n\tconst tag = el.tagName.toLowerCase();\n\tconst proto =\n\t\ttag === 'select'\n\t\t\t? HTMLSelectElement.prototype\n\t\t\t: tag === 'textarea'\n\t\t\t\t? HTMLTextAreaElement.prototype\n\t\t\t\t: HTMLInputElement.prototype;\n\tconst descriptor = Object.getOwnPropertyDescriptor(proto, prop);\n\tif (descriptor?.set) {\n\t\tdescriptor.set.call(el, value);\n\t} else {\n\t\t(el as any)[prop] = value;\n\t}\n};\n\nconst isTextLike = (el: HTMLElement) => {\n\tif (el.isContentEditable) return true;\n\tconst tag = el.tagName.toLowerCase();\n\tif (tag === 'textarea' || tag === 'select') return true;\n\tif (tag !== 'input') return false;\n\tconst type = ((el as HTMLInputElement).type || 'text').toLowerCase();\n\treturn !['checkbox', 'radio', 'hidden', 'button', 'submit', 'reset', 'file', 'image'].includes(\n\t\ttype\n\t);\n};\n\nconst isCheckboxOrRadio = (el: HTMLElement): boolean =>\n\tel instanceof HTMLInputElement &&\n\t['checkbox', 'radio'].includes((el.type || 'text').toLowerCase());\n\nfunction findFieldByNameInner(fieldName: string, textLikeOnly: boolean): HTMLElement | null {\n\tconst target = normalize(fieldName);\n\tconst allFields = Array.from(document.querySelectorAll<HTMLElement>(FILLABLE_TAGS));\n\tconst labels = Array.from(document.querySelectorAll('label'));\n\tconst isValid = (el: HTMLElement) => !textLikeOnly || isTextLike(el);\n\n\tconst exact = (s: string) => normalize(s) === target;\n\tconst partial = (s: string) => normalize(s).includes(target);\n\n\t// Placeholder (text-like only, regardless of pass)\n\tfor (const el of allFields) {\n\t\tif (isTextLike(el) && exact(el.getAttribute('placeholder') || '')) return el;\n\t}\n\tfor (const el of allFields) {\n\t\tif (isTextLike(el) && partial(el.getAttribute('placeholder') || '')) return el;\n\t}\n\n\t// name=\"…\" on text-like fields\n\tfor (const el of allFields) {\n\t\tif (isTextLike(el) && exact(el.getAttribute('name') || '')) return el;\n\t}\n\n\t// Labels (exact then partial)\n\tfor (const match of [exact, partial]) {\n\t\tfor (const label of labels) {\n\t\t\tif (!match(label.textContent || '')) continue;\n\t\t\tconst forAttr = label.getAttribute('for');\n\t\t\tif (forAttr) {\n\t\t\t\tconst el = document.getElementById(forAttr);\n\t\t\t\tif (el && isValid(el as HTMLElement)) return el as HTMLElement;\n\t\t\t}\n\t\t\tconst nested = label.querySelector(FILLABLE_TAGS);\n\t\t\tif (nested && isValid(nested as HTMLElement)) return nested as HTMLElement;\n\n\t\t\tconst row = label.parentElement;\n\t\t\tif (row) {\n\t\t\t\tconst candidates = Array.from(row.querySelectorAll<HTMLElement>(FILLABLE_TAGS));\n\t\t\t\tconst after = candidates.find(\n\t\t\t\t\t(c) =>\n\t\t\t\t\t\tisValid(c) &&\n\t\t\t\t\t\tBoolean(label.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING)\n\t\t\t\t);\n\t\t\t\tif (after) return after;\n\t\t\t\tif (candidates.length === 1 && isValid(candidates[0])) return candidates[0];\n\t\t\t}\n\t\t}\n\t}\n\n\t// aria-label (exact then partial)\n\tfor (const match of [exact, partial]) {\n\t\tfor (const field of allFields) {\n\t\t\tif (isValid(field) && match(field.getAttribute('aria-label') || '')) return field;\n\t\t}\n\t}\n\n\t// name / id — exact match on ALL controls (unfiltered), then partial with restrictions\n\tfor (const field of allFields) {\n\t\tconst name = field.getAttribute('name') || '';\n\t\tconst id = field.getAttribute('id') || '';\n\t\tif (exact(name) || exact(id)) return field;\n\t}\n\tfor (const field of allFields) {\n\t\tif (textLikeOnly && !isTextLike(field)) continue;\n\t\tconst name = field.getAttribute('name') || '';\n\t\tconst id = field.getAttribute('id') || '';\n\t\tconst allowIdPartial = !isCheckboxOrRadio(field) || textLikeOnly;\n\t\tif (partial(name) || (allowIdPartial && partial(id))) return field;\n\t}\n\n\t// Nearby text (td, preceding siblings, parent text nodes)\n\tfor (const field of allFields) {\n\t\tif (!isValid(field)) continue;\n\t\tconst td = field.closest('td');\n\t\tif (td) {\n\t\t\tconst prevTd = td.previousElementSibling;\n\t\t\tif (prevTd && partial(prevTd.textContent || '')) return field;\n\t\t}\n\t\tlet sibling = field.previousElementSibling;\n\t\twhile (sibling) {\n\t\t\tif (exact(sibling.textContent || '')) return field;\n\t\t\tsibling = sibling.previousElementSibling;\n\t\t}\n\t\tconst parentText = Array.from(field.parentElement?.childNodes || [])\n\t\t\t.filter((n) => n.nodeType === Node.TEXT_NODE)\n\t\t\t.map((n) => n.textContent || '')\n\t\t\t.join('');\n\t\tif (partial(parentText)) return field;\n\t}\n\n\treturn null;\n}\n\nconst findFieldByName = (fieldName: string): HTMLElement | null =>\n\tfindFieldByNameInner(fieldName, true) ?? findFieldByNameInner(fieldName, false);\n\nconst fillElement = (el: HTMLElement, value: string): boolean => {\n\tconst tagName = el.tagName.toLowerCase();\n\tel.focus();\n\n\tif (tagName === 'select') {\n\t\tconst select = el as HTMLSelectElement;\n\t\tconst option = Array.from(select.options).find(\n\t\t\t(o) =>\n\t\t\t\to.value.toLowerCase() === value.toLowerCase() ||\n\t\t\t\to.text.toLowerCase() === value.toLowerCase()\n\t\t);\n\t\tsetNativeValue(select, option ? option.value : value);\n\t\tdispatchEvents(select);\n\t} else if (tagName === 'input') {\n\t\tconst input = el as HTMLInputElement;\n\t\tconst type = (input.type || 'text').toLowerCase();\n\n\t\tif (type === 'checkbox') {\n\t\t\tconst normalized = value.trim().toLowerCase();\n\t\t\tconst truthy = new Set(['true', '1', 'yes', 'y', 'on', 'checked', 'check']);\n\t\t\tconst falsy = new Set(['false', '0', 'no', 'n', 'off', 'unchecked', 'uncheck']);\n\t\t\tconst elValue = (input.value || '').trim().toLowerCase();\n\n\t\t\tlet shouldCheck: boolean;\n\t\t\tif (falsy.has(normalized)) shouldCheck = false;\n\t\t\telse if (truthy.has(normalized)) shouldCheck = true;\n\t\t\telse if (elValue && normalized === elValue) shouldCheck = true;\n\t\t\telse shouldCheck = false;\n\n\t\t\tif (input.checked !== shouldCheck) {\n\t\t\t\tsetNativeValue(input, shouldCheck, 'checked');\n\t\t\t\tdispatchEvents(input);\n\t\t\t}\n\t\t} else if (type === 'radio') {\n\t\t\tif (!input.checked) input.click();\n\t\t} else if (type === 'file') {\n\t\t\tLogger.warn('ToolCall', 'File inputs cannot be filled programmatically');\n\t\t\treturn false;\n\t\t} else {\n\t\t\tsetNativeValue(input, value);\n\t\t\tdispatchEvents(input);\n\t\t}\n\t} else if (tagName === 'textarea') {\n\t\tsetNativeValue(el, value);\n\t\tdispatchEvents(el);\n\t} else if (el.isContentEditable) {\n\t\tel.textContent = value;\n\t\tdispatchEvents(el);\n\t} else {\n\t\tLogger.warn('ToolCall', `Element <${tagName}> may not be a fillable field, attempting anyway`);\n\t\tsetNativeValue(el, value);\n\t\tdispatchEvents(el);\n\t}\n\treturn true;\n};\n\n/**\n * Core DOM work shared by fillField and fillForm: resolve, scroll, fill.\n * Does NOT run on the interaction queue — callers are responsible for queueing.\n */\nexport async function fillFieldInDom(\n\tfieldName: string | undefined,\n\tselector: string | undefined,\n\tvalue: string,\n\tdelay = 0\n): Promise<{ success: true } | { success: false; error: string }> {\n\tif (!fieldName && !selector)\n\t\treturn { success: false, error: 'fieldName or selector is required' };\n\tif (delay > 0) await new Promise((r) => setTimeout(r, delay));\n\n\tconst element =\n\t\t(fieldName ? findFieldByName(fieldName) : null) ??\n\t\t(selector ? (findElementBySelector(selector) as HTMLElement | null) : null);\n\n\tif (!element) return { success: false, error: 'Field not found' };\n\n\tscrollToElement(element);\n\tif (!fillElement(element, value)) {\n\t\treturn { success: false, error: 'Could not fill element (e.g. unsupported input type)' };\n\t}\n\treturn { success: true };\n}\n\nexport const fillField = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments);\n\tif (!args || args.value == null) {\n\t\tLogger.error('ToolCall', 'fillField: value is required');\n\t\treturn false;\n\t}\n\tconst { fieldName, selector, delay = 0 } = args;\n\n\treturn runQueuedInteractionBoolean(async () => {\n\t\tconst result = await fillFieldInDom(fieldName, selector, String(args.value), delay);\n\t\tif (!result.success)\n\t\t\tLogger.error('ToolCall', `fillField: ${result.error}`, { fieldName, selector });\n\t\treturn result.success;\n\t});\n};\n","import Logger from './logger';\n\n/**\n * Centralized localStorage helper\n * Tracks all localStorage keys used in the application\n */\n\n// Storage keys - centralized location\nconst STORAGE_KEYS = {\n\tUSER_UUID: 'guideAI_userUUID',\n\tSESSION_ID: 'guideAI_sessionId',\n\tCONVERSATION: 'guideAI_conversation',\n\tHAS_INTERACTED: 'guideAI_hasInteracted',\n\tIS_MUTED: 'guideAI_isMuted',\n\t/** Mute assistant TTS / remote audio (WebRTC playback); not the user microphone. */\n\tASSISTANT_PLAYBACK_MUTED: 'guideAI_assistantPlaybackMuted',\n\tLOGGER_ENABLED: 'guideAI_loggerEnabled',\n\tAUDIO_CONFIG: 'guideAI_audioConfig',\n\t/** UI microphone preset selector (Precise vs Noisy). */\n\tMIC_PRESET: 'guideAI_micPreset',\n\t/** Transcript “⋯” debug section (console: GuideAI.debug.showMoreMenu()). */\n\tDEBUG_MORE_MENU: 'guideAI_debugMoreMenu',\n\t/** Transcript ⋯ → Debug: fixed “playback interrupt lock” debug panel (default off). */\n\tPLAYBACK_LOCK_DEBUG_OVERLAY: 'guideAI_playbackLockDebugOverlay',\n\t/** Debug: transcript ⋯ — use stub workspaces/workflows vs fetched API catalog. */\n\tWORKSPACE_DATA_SOURCE: 'guideAI_workspaceDataSource',\n} as const;\n\n/**\n * Emit a custom event when localStorage is written, so the Chrome extension\n * content script can mirror writes from the isolated GuideAI component.\n * Exported for bespoke flows (for example conversation save + quota handling).\n */\nexport function emitStorageWrite(key: string, value: string): void {\n\tif (typeof window === 'undefined') return;\n\ttry {\n\t\twindow.dispatchEvent(new CustomEvent('guideai_storage_write', { detail: { key, value } }));\n\t} catch (error) {\n\t\tLogger.warn('LocalStorageHelper', 'Failed to emit storage write event', error);\n\t}\n}\n\n/**\n * Check if localStorage is available\n */\nexport const isLocalStorageAvailable = (): boolean => {\n\ttry {\n\t\tif (typeof window === 'undefined') return false;\n\t\tconst testKey = '__storage_test__';\n\t\tlocalStorage.setItem(testKey, testKey);\n\t\tlocalStorage.removeItem(testKey);\n\t\treturn true;\n\t} catch (_e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Return `localStorage.getItem(key)` or `null` if localStorage is unavailable / throws\n * (SSR, private mode, quota errors). Prefer this over an ad-hoc `typeof localStorage` check.\n */\nexport function safeReadLocal(key: string): string | null {\n\tif (typeof localStorage === 'undefined') return null;\n\ttry {\n\t\treturn localStorage.getItem(key);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/**\n * Best-effort `localStorage.setItem(key, value)`. Silently no-ops if localStorage is unavailable.\n * Does NOT emit the `guideai_storage_write` event — use the typed setters in this file for keys\n * the Chrome extension needs to mirror.\n */\nexport function safeWriteLocal(key: string, value: string): void {\n\tif (typeof localStorage === 'undefined') return;\n\ttry {\n\t\tlocalStorage.setItem(key, value);\n\t} catch {\n\t\t/* ignore */\n\t}\n}\n\n/** Best-effort removeItem. No-ops if localStorage is unavailable. */\nexport function safeRemoveLocal(key: string): void {\n\tif (typeof localStorage === 'undefined') return;\n\ttry {\n\t\tlocalStorage.removeItem(key);\n\t} catch {\n\t\t/* ignore */\n\t}\n}\n\n/**\n * setItem(key, value) if value is a string; removeItem(key) if value is null.\n * Emits the guideai_storage_write event for the final state (value or '').\n *\n * Use for keys the Chrome extension mirrors. Callers that need emit-on-set-only\n * can pass `{ emitOnClear: false }`.\n */\nexport function writeMirroredLocal(\n\tkey: string,\n\tvalue: string | null,\n\toptions: { emitOnClear?: boolean } = {}\n): void {\n\tconst { emitOnClear = true } = options;\n\tif (typeof localStorage === 'undefined') return;\n\ttry {\n\t\tif (value === null) {\n\t\t\tlocalStorage.removeItem(key);\n\t\t\tif (emitOnClear) emitStorageWrite(key, '');\n\t\t} else {\n\t\t\tlocalStorage.setItem(key, value);\n\t\t\temitStorageWrite(key, value);\n\t\t}\n\t} catch {\n\t\t/* ignore */\n\t}\n}\n\n/**\n * Generate a UUID v4\n */\nconst generateUUID = (): string => {\n\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n\t\tconst r = (Math.random() * 16) | 0;\n\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\n\t\treturn v.toString(16);\n\t});\n};\n\n/**\n * Get or create user UUID\n * Creates a new UUID if one doesn't exist\n */\nexport const getUserUUID = (): string => {\n\tconst existing = safeReadLocal(STORAGE_KEYS.USER_UUID);\n\tif (existing) return existing;\n\tconst uuid = generateUUID();\n\tsafeWriteLocal(STORAGE_KEYS.USER_UUID, uuid);\n\treturn uuid;\n};\n\n/**\n * Get session ID (active OpenAI session)\n */\nexport const getSessionId = (): string | null => safeReadLocal(STORAGE_KEYS.SESSION_ID);\n\n/**\n * Set session ID\n */\nexport const setSessionId = (sessionId: string | null): void => {\n\tconst key = STORAGE_KEYS.SESSION_ID;\n\tif (sessionId === null) {\n\t\tsafeRemoveLocal(key);\n\t} else {\n\t\tsafeWriteLocal(key, sessionId);\n\t}\n};\n\n/**\n * Get has interacted flag\n */\nexport const getHasInteracted = (): boolean =>\n\tsafeReadLocal(STORAGE_KEYS.HAS_INTERACTED) === 'true';\n\n/**\n * Set has interacted flag\n */\nexport const setHasInteracted = (value: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.HAS_INTERACTED, value ? 'true' : null, { emitOnClear: false });\n};\n\n/**\n * Get is muted flag\n */\nexport const getIsMuted = (): boolean => safeReadLocal(STORAGE_KEYS.IS_MUTED) === 'true';\n\n/**\n * Set is muted flag\n */\nexport const setIsMuted = (value: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.IS_MUTED, value ? 'true' : null, { emitOnClear: false });\n};\n\nexport const getAssistantPlaybackMuted = (): boolean =>\n\tsafeReadLocal(STORAGE_KEYS.ASSISTANT_PLAYBACK_MUTED) === 'true';\n\nexport const setAssistantPlaybackMuted = (value: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.ASSISTANT_PLAYBACK_MUTED, value ? 'true' : null, {\n\t\temitOnClear: false,\n\t});\n};\n\n/**\n * Get logger enabled flag (used by Logger to persist enable state)\n */\nexport const getLoggerEnabled = (): boolean =>\n\tsafeReadLocal(STORAGE_KEYS.LOGGER_ENABLED) === 'true';\n\n/**\n * Set logger enabled flag\n */\nexport const setLoggerEnabled = (value: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.LOGGER_ENABLED, value ? 'true' : null, { emitOnClear: false });\n};\n\n/**\n * Get stored audio configuration\n */\nexport const getAudioConfig = (): import('../types/audioConfig.types').StoredAudioConfig | null => {\n\tconst raw = safeReadLocal(STORAGE_KEYS.AUDIO_CONFIG);\n\tif (!raw) return null;\n\ttry {\n\t\treturn JSON.parse(raw);\n\t} catch (error) {\n\t\tLogger.error('LocalStorageHelper', 'Error parsing audio config:', error);\n\t\treturn null;\n\t}\n};\n\n/**\n * Save audio configuration\n */\nexport const setAudioConfig = (\n\tvalue: import('../types/audioConfig.types').StoredAudioConfig | null\n): void => {\n\twriteMirroredLocal(STORAGE_KEYS.AUDIO_CONFIG, value ? JSON.stringify(value) : null, {\n\t\temitOnClear: false,\n\t});\n};\n\nexport type MicrophonePreset = 'precise' | 'noisy';\n\n/** Default mic preset is Precise. */\nexport const getMicPreset = (): MicrophonePreset => {\n\tconst v = safeReadLocal(STORAGE_KEYS.MIC_PRESET);\n\treturn v === 'noisy' ? 'noisy' : 'precise';\n};\n\nexport const setMicPreset = (preset: MicrophonePreset): void => {\n\twriteMirroredLocal(STORAGE_KEYS.MIC_PRESET, preset === 'precise' ? null : preset);\n};\n\n/**\n * Whether the transcript more-menu shows a Debug section (audio, visual context, logger, API helpers).\n */\nexport const getDebugMoreMenuEnabled = (): boolean =>\n\tsafeReadLocal(STORAGE_KEYS.DEBUG_MORE_MENU) === 'true';\n\nexport const setDebugMoreMenuEnabled = (enabled: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.DEBUG_MORE_MENU, enabled ? 'true' : null);\n\tif (typeof window !== 'undefined') {\n\t\twindow.dispatchEvent(new CustomEvent('guideai_debug_more_menu'));\n\t}\n};\n\n/**\n * Fixed debug panel: interrupt lock / VAD state (transcript ⋯ → Debug).\n * Default hidden until enabled from the menu or localStorage.\n */\nexport const getPlaybackLockDebugOverlayVisible = (): boolean =>\n\tsafeReadLocal(STORAGE_KEYS.PLAYBACK_LOCK_DEBUG_OVERLAY) === 'true';\n\nexport const setPlaybackLockDebugOverlayVisible = (visible: boolean): void => {\n\twriteMirroredLocal(STORAGE_KEYS.PLAYBACK_LOCK_DEBUG_OVERLAY, visible ? 'true' : null);\n\tif (typeof window !== 'undefined') {\n\t\twindow.dispatchEvent(new CustomEvent('guideai_playback_lock_debug_overlay'));\n\t}\n};\n\nexport type WorkspaceDataSource = 'stub' | 'api';\n\n/** Default is API; localStorage value `'stub'` opts into stub workspaces (debug menu). */\nexport const getWorkspaceDataSource = (): WorkspaceDataSource =>\n\tsafeReadLocal(STORAGE_KEYS.WORKSPACE_DATA_SOURCE) === 'stub' ? 'stub' : 'api';\n\nexport const setWorkspaceDataSource = (source: WorkspaceDataSource): void => {\n\twriteMirroredLocal(STORAGE_KEYS.WORKSPACE_DATA_SOURCE, source === 'stub' ? 'stub' : null);\n\tif (typeof window !== 'undefined') {\n\t\twindow.dispatchEvent(new CustomEvent('guideai_workspace_data_source'));\n\t}\n};\n\n/** Default docked drawer width (px). */\nexport const TRANSCRIPT_DRAWER_WIDTH_PX = 420;\n\nexport const TRANSCRIPT_DRAWER_WIDTH_MIN_PX = 260;\nexport const TRANSCRIPT_DRAWER_WIDTH_MAX_PX = 720;\n\nconst transcriptDrawerPrefStorageKey = (widgetKey: string) =>\n\t`guideAI_transcriptDrawerPref:${widgetKey}`;\n\nconst transcriptDrawerWidthStorageKey = (widgetKey: string) =>\n\t`guideAI_transcriptDrawerWidth:${widgetKey}`;\n\nfunction clampDrawerWidthPx(n: number): number {\n\tif (!Number.isFinite(n)) return TRANSCRIPT_DRAWER_WIDTH_PX;\n\treturn Math.round(\n\t\tMath.min(TRANSCRIPT_DRAWER_WIDTH_MAX_PX, Math.max(TRANSCRIPT_DRAWER_WIDTH_MIN_PX, n))\n\t);\n}\n\n/** User-resizable docked drawer width (px), per widget key. */\nexport const getTranscriptDrawerWidthPref = (widgetKey: string): number => {\n\tconst raw = safeReadLocal(transcriptDrawerWidthStorageKey(widgetKey));\n\tif (raw == null || raw === '') return TRANSCRIPT_DRAWER_WIDTH_PX;\n\treturn clampDrawerWidthPx(parseInt(raw, 10));\n};\n\nexport const setTranscriptDrawerWidthPref = (widgetKey: string, widthPx: number): void => {\n\tconst key = transcriptDrawerWidthStorageKey(widgetKey);\n\twriteMirroredLocal(key, String(clampDrawerWidthPx(widthPx)));\n};\n\n/**\n * Whether the user prefers the docked transcript panel when the transcript is visible (per widget key).\n * Storage key remains `guideAI_transcriptDrawerPref:*` for backward compatibility.\n */\nexport const getTranscriptPanelDockedPref = (widgetKey: string): boolean =>\n\tsafeReadLocal(transcriptDrawerPrefStorageKey(widgetKey)) === '1';\n\nexport const setTranscriptPanelDockedPref = (widgetKey: string, docked: boolean): void => {\n\tconst key = transcriptDrawerPrefStorageKey(widgetKey);\n\twriteMirroredLocal(key, docked ? '1' : '0');\n};\n\n/**\n * Last workspace slug the user selected in the in-widget transcript selector, scoped per\n * conversation/widget key. Used to keep the selection sticky across page reloads. Cleared\n * when the conversation ends (see `useConversationSession.endConversationSession`) so a\n * brand-new thread falls back to the host-default workspace resolution.\n *\n * The persisted slug is only re-applied when it still appears in the freshly fetched\n * workspace catalog; consumers must validate before using.\n */\nconst lastWorkspaceSlugStorageKey = (widgetKey: string) => `guideAI_lastWorkspaceSlug:${widgetKey}`;\n\nexport const getLastWorkspaceSlugPref = (widgetKey: string): string | null => {\n\tconst raw = safeReadLocal(lastWorkspaceSlugStorageKey(widgetKey));\n\tconst trimmed = typeof raw === 'string' ? raw.trim() : '';\n\treturn trimmed.length > 0 ? trimmed : null;\n};\n\nexport const setLastWorkspaceSlugPref = (widgetKey: string, slug: string | null): void => {\n\tconst key = lastWorkspaceSlugStorageKey(widgetKey);\n\tconst trimmed = typeof slug === 'string' ? slug.trim() : '';\n\twriteMirroredLocal(key, trimmed.length > 0 ? trimmed : null);\n};\n\n/**\n * Export storage keys for reference (read-only)\n */\nexport { STORAGE_KEYS };\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst BookOpen = createLucideIcon(\"BookOpen\", [\n [\"path\", { d: \"M12 7v14\", key: \"1akyts\" }],\n [\n \"path\",\n {\n d: \"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z\",\n key: \"ruj8y\"\n }\n ]\n]);\n\nexport { BookOpen as default };\n//# sourceMappingURL=book-open.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Globe = createLucideIcon(\"Globe\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n]);\n\nexport { Globe as default };\n//# sourceMappingURL=globe.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Video = createLucideIcon(\"Video\", [\n [\n \"path\",\n {\n d: \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\",\n key: \"ftymec\"\n }\n ],\n [\"rect\", { x: \"2\", y: \"6\", width: \"14\", height: \"12\", rx: \"2\", key: \"158x01\" }]\n]);\n\nexport { Video as default };\n//# sourceMappingURL=video.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FileText = createLucideIcon(\"FileText\", [\n [\"path\", { d: \"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\", key: \"1rqfz7\" }],\n [\"path\", { d: \"M14 2v4a2 2 0 0 0 2 2h4\", key: \"tnqrlb\" }],\n [\"path\", { d: \"M10 9H8\", key: \"b1mrlr\" }],\n [\"path\", { d: \"M16 13H8\", key: \"t4e002\" }],\n [\"path\", { d: \"M16 17H8\", key: \"z1uh3a\" }]\n]);\n\nexport { FileText as default };\n//# sourceMappingURL=file-text.js.map\n","import {\n\tparseArgs,\n\tfindElementBySelector,\n\tmoveCursorToElement,\n\tenqueueInteractionJob,\n\tToolInput,\n} from './elementInteractions';\nimport { performClick } from './clickElement';\nimport Logger from '../logger';\n\nexport const Highlight_Then_Click_Tool = {\n\ttype: 'function',\n\tname: 'highlightThenClick',\n\tdescription:\n\t\t'Move the guide cursor to each element and click it. Accepts one selector or an array of selectors; processes them in sequence with visual highlight and click effect.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\toneOf: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Single selector (CSS, XPath, or text-based 'text:cssSelector:textContent').\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\titems: { type: 'string' },\n\t\t\t\t\t\tdescription: 'List of selectors to highlight and click in sequence.',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdescription: 'Selector or array of selectors for the element(s) to highlight then click.',\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\nconst DELAY_BETWEEN_ELEMENTS_MS = 1000;\n\n/**\n * Highlight (move cursor to) each element then click it. Supports a single selector or array of selectors.\n * Same behavior as legacy: cursor moves to each element in sequence and clicks with visual effect.\n */\nexport const highlightThenClick = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments ?? '{}');\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for highlightThenClick');\n\t}\n\n\tconst selector: string | string[] = args.selector;\n\tconst selectorArray = Array.isArray(selector) ? selector : [selector];\n\tif (selectorArray.length === 0) {\n\t\tthrow new Error('Selector array is empty');\n\t}\n\n\tLogger.info('GuideAI', 'Executing highlightThenClick with args:', args);\n\n\tenqueueInteractionJob(async () => {\n\t\tlet cursor: HTMLElement | null = null;\n\n\t\tfor (let i = 0; i < selectorArray.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tawait new Promise((r) => setTimeout(r, DELAY_BETWEEN_ELEMENTS_MS));\n\t\t\t}\n\n\t\t\tconst sel = selectorArray[i];\n\t\t\tconst element = findElementBySelector(sel);\n\t\t\tif (!element) {\n\t\t\t\tLogger.warn('GuideAI', `Element not found for selector: ${sel}. Skipping.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcursor = await moveCursorToElement(element, cursor);\n\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\t// Use the shorter global click emphasis duration (500ms)\n\t\t\tawait performClick(element, rect, true, cursor, 500);\n\t\t}\n\t});\n\n\treturn true;\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Database = createLucideIcon(\"Database\", [\n [\"ellipse\", { cx: \"12\", cy: \"5\", rx: \"9\", ry: \"3\", key: \"msslwz\" }],\n [\"path\", { d: \"M3 5V19A9 3 0 0 0 21 19V5\", key: \"1wlel7\" }],\n [\"path\", { d: \"M3 12A9 3 0 0 0 21 12\", key: \"mv7ke4\" }]\n]);\n\nexport { Database as default };\n//# sourceMappingURL=database.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Leaf = createLucideIcon(\"Leaf\", [\n [\n \"path\",\n {\n d: \"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z\",\n key: \"nnexq3\"\n }\n ],\n [\"path\", { d: \"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12\", key: \"mt58a7\" }]\n]);\n\nexport { Leaf as default };\n//# sourceMappingURL=leaf.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Star = createLucideIcon(\"Star\", [\n [\n \"path\",\n {\n d: \"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\",\n key: \"r04s7s\"\n }\n ]\n]);\n\nexport { Star as default };\n//# sourceMappingURL=star.js.map\n","import { getApiBaseUrl, WIDGET_EXTENSION_HEADER } from './constants';\nimport { GuideAIEnvironment } from '../types/GuideAI.types';\nimport type { StubWorkflowItem } from '../stubs/workspaces';\nimport { DEFAULT_WORKSPACE_EMBED_ICON, isWorkspaceEmbedIconId } from '../lib/workspaceEmbedIcons';\nimport Logger from './logger';\nimport { MessageData } from './conversationManager';\nimport packageJson from '../../package.json';\nimport { getWidgetBearerToken } from './widgetAuthStore';\n\nconst PACKAGE_VERSION = packageJson.version;\n\n/** Thrown when `POST /initialize` rejects the widget Bearer JWT (typically HTTP 401). */\nexport class InitializeUnauthorizedError extends Error {\n\treadonly status: number;\n\n\tconstructor(status: number, message: string) {\n\t\tsuper(message);\n\t\tthis.name = 'InitializeUnauthorizedError';\n\t\tthis.status = status;\n\t}\n}\n\nexport interface ApiHeadersOptions {\n\tauthorizationBearer?: string;\n\t/** Server treats request as Chrome extension (domain allowlist bypass for session). */\n\textensionContext?: boolean;\n}\n\nexport function getApiHeaders(options?: ApiHeadersOptions): Record<string, string> {\n\tconst headers: Record<string, string> = {\n\t\t'Content-Type': 'application/json',\n\t\t'X-GuideAI-Client': `guideai/${PACKAGE_VERSION}`,\n\t};\n\tif (options?.authorizationBearer) {\n\t\theaders.Authorization = `Bearer ${options.authorizationBearer}`;\n\t}\n\tif (options?.extensionContext) {\n\t\theaders[WIDGET_EXTENSION_HEADER] = '1';\n\t}\n\treturn headers;\n}\n\n// Prop tool definition (serializable - no execute)\nexport interface PropToolDefinition {\n\tname: string;\n\tdescription: string;\n\tparameters: object;\n}\n\n// Initialize WebRTC session via unified initialize endpoint (prop tools go to registerTools only)\nexport interface InitializeWebRTCPayload {\n\tsdp: string;\n\t/** Workspace slug: forwarded on the body so the server can pick a non-default workspace per request. */\n\tworkspace?: string;\n\tuser?: string;\n\tconversationId?: string;\n\t/** Access-key: linked published workflow id for session instructions (omit = first linked). */\n\tsessionWorkflowId?: string;\n}\n\nexport interface ToolFromServer {\n\ttoolConfig: object;\n\tfunctionConfig: object;\n}\n\nexport interface InitializeWebRTCResponse {\n\tanswerSdp: string;\n\tid: string;\n\ttools?: ToolFromServer[];\n\tcontextKey?: string;\n\ttranscriptionModel?: string;\n\tgreeting?: string | null;\n}\n\nexport interface InitializeWebRTCOptions {\n\t/** Required widget Bearer JWT; the server is JWT-only on `/initialize`. */\n\tauthorizationBearer?: string;\n\textensionContext?: boolean;\n}\n\nexport const initializeWebRTC = async (\n\tendpoint: string,\n\tpayload: InitializeWebRTCPayload,\n\toptions?: InitializeWebRTCOptions\n): Promise<InitializeWebRTCResponse> => {\n\tconst requestBody: Record<string, unknown> = {\n\t\tsdp: payload.sdp,\n\t\tuser: payload.user,\n\t\tconversationId: payload.conversationId || undefined,\n\t};\n\tif (payload.workspace) requestBody.workspace = payload.workspace;\n\tconst sw = typeof payload.sessionWorkflowId === 'string' ? payload.sessionWorkflowId.trim() : '';\n\tif (sw) {\n\t\trequestBody.sessionWorkflowId = sw;\n\t}\n\n\tconst response = await fetch(endpoint, {\n\t\tmethod: 'POST',\n\t\theaders: getApiHeaders({\n\t\t\tauthorizationBearer: options?.authorizationBearer,\n\t\t\textensionContext: options?.extensionContext,\n\t\t}),\n\t\tbody: JSON.stringify(requestBody),\n\t});\n\n\tif (!response.ok) {\n\t\tconst errorText = await response.text().catch(() => 'No error details available');\n\t\tif (response.status === 401) {\n\t\t\tthrow new InitializeUnauthorizedError(\n\t\t\t\t401,\n\t\t\t\t`Failed to initialize: ${response.status} - ${errorText}`\n\t\t\t);\n\t\t}\n\t\tthrow new Error(`Failed to initialize: ${response.status} - ${errorText}`);\n\t}\n\n\tconst data = await response.json();\n\tconst { answerSdp, id, tools, contextKey, greeting, transcriptionModel } = data;\n\n\tif (!answerSdp || typeof answerSdp !== 'string') {\n\t\tthrow new Error('Invalid initialize response: missing answerSdp');\n\t}\n\n\treturn {\n\t\tanswerSdp,\n\t\tid,\n\t\ttools: Array.isArray(tools) ? tools : undefined,\n\t\tcontextKey: typeof contextKey === 'string' ? contextKey : undefined,\n\t\ttranscriptionModel:\n\t\t\ttypeof transcriptionModel === 'string' && transcriptionModel.trim()\n\t\t\t\t? transcriptionModel.trim()\n\t\t\t\t: undefined,\n\t\tgreeting: typeof greeting === 'string' && greeting.trim() ? greeting.trim() : null,\n\t};\n};\n\n/** Fire-and-forget: register missing prop tools (customer-scoped). Does not await. */\nexport const registerTools = (\n\tendpoint: string,\n\tpayload: {\n\t\tpropTools?: PropToolDefinition[];\n\t},\n\toptions?: InitializeWebRTCOptions\n): void => {\n\tconst body: Record<string, unknown> = {};\n\tif (payload.propTools?.length) body.propTools = payload.propTools;\n\n\tfetch(endpoint, {\n\t\tmethod: 'POST',\n\t\theaders: getApiHeaders({\n\t\t\tauthorizationBearer: options?.authorizationBearer,\n\t\t\textensionContext: options?.extensionContext,\n\t\t}),\n\t\tbody: JSON.stringify(body),\n\t}).catch((err) => {\n\t\tLogger.warn('API', 'registerTools failed (fire-and-forget):', err);\n\t});\n};\n\n/** Built-in tool definition for server registration */\nexport interface BuiltInToolDefinition {\n\ttoolConfig: object;\n\tfunctionConfig: object;\n}\n\n// Log a message to the conversation via API and local storage\nexport const logMessage = async (\n\tmessageData: MessageData,\n\tconversationId: string | null,\n\t_conversationKey: string,\n\tuser?: string,\n\tenvironment?: GuideAIEnvironment\n): Promise<void> => {\n\tLogger.info('API', 'logMessage: Conversation ID: (should not be null)', conversationId);\n\tif (!conversationId) return;\n\n\ttry {\n\t\tconst requestData = {\n\t\t\tcontent: messageData.content,\n\t\t\tsender: messageData.sender,\n\t\t\ttype: messageData.type,\n\t\t\turl: messageData.url,\n\t\t\tsession: messageData.session,\n\t\t\tlogdata: messageData.logdata,\n\t\t\tuser,\n\t\t};\n\t\tconst endpoint = `/conversations/${conversationId}/messages`;\n\n\t\tLogger.apiCall('POST', endpoint, requestData);\n\n\t\tconst apiBase = getApiBaseUrl(environment);\n\t\tconst response = await fetch(`${apiBase}${endpoint}`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: getApiHeaders({\n\t\t\t\tauthorizationBearer: getWidgetBearerToken() || undefined,\n\t\t\t}),\n\t\t\tbody: JSON.stringify(requestData),\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tLogger.apiResponse('POST', endpoint, false, { status: response.status });\n\t\t\tthrow new Error(`Failed to log message: ${response.status} ${response.statusText}`);\n\t\t}\n\n\t\tLogger.apiResponse('POST', endpoint, true, {\n\t\t\tsender: messageData.sender,\n\t\t\tcontentLength: messageData.content.length,\n\t\t});\n\t} catch (error) {\n\t\tLogger.error('API', 'Error logging message', error);\n\t}\n};\n\n/** One workspace row from `POST /widget/workspaces` (normalized). */\nexport interface WidgetWorkspaceRow {\n\tid: string;\n\tlabel: string;\n\tdescription: string;\n\ticon: string;\n\t/** When true, realtime session uses full workspace prompt + rolled-up linked workflow prompts (not a single workflow). */\n\trollupWorkflows: boolean;\n\tworkflowChecklistEnabled: boolean;\n\tworkflowConfettiEnabled: boolean;\n\tworkflows: StubWorkflowItem[];\n}\n\nexport interface WidgetWorkspacesResponse {\n\tworkspaces: WidgetWorkspaceRow[];\n}\n\nfunction mapWidgetWorkspaceRow(raw: unknown): WidgetWorkspaceRow | null {\n\tif (!raw || typeof raw !== 'object') return null;\n\tconst o = raw as Record<string, unknown>;\n\tconst id = typeof o.id === 'string' ? o.id.trim() : '';\n\tconst label = typeof o.label === 'string' ? o.label.trim() : '';\n\tif (!id || !label) return null;\n\tconst desc = typeof o.description === 'string' ? o.description : '';\n\tconst iconRaw = typeof o.icon === 'string' ? o.icon.trim() : '';\n\tconst icon = isWorkspaceEmbedIconId(iconRaw) ? iconRaw : DEFAULT_WORKSPACE_EMBED_ICON;\n\tconst wfRaw = o.workflows;\n\tconst workflows: StubWorkflowItem[] = [];\n\tif (Array.isArray(wfRaw)) {\n\t\tfor (const w of wfRaw) {\n\t\t\tif (!w || typeof w !== 'object') continue;\n\t\t\tconst wr = w as Record<string, unknown>;\n\t\t\tconst wid = typeof wr.id === 'string' ? wr.id.trim() : '';\n\t\t\tconst wl = typeof wr.label === 'string' ? wr.label.trim() : '';\n\t\t\tif (wid && wl) workflows.push({ id: wid, label: wl });\n\t\t}\n\t}\n\treturn {\n\t\tid,\n\t\tlabel,\n\t\tdescription: desc,\n\t\ticon,\n\t\trollupWorkflows: o.rollupWorkflows === true,\n\t\tworkflowChecklistEnabled: o.workflowChecklistEnabled === true,\n\t\tworkflowConfettiEnabled: o.workflowConfettiEnabled !== false,\n\t\tworkflows,\n\t};\n}\n\nexport interface FetchWidgetWorkspacesParams {\n\tapiBase: string;\n\t/** Omit to request all workspaces for the customer; empty array requests none. */\n\tworkspacesFilter?: string[];\n\tauthorizationBearer?: string;\n\textensionContext?: boolean;\n}\n\n/**\n * POST `/widget/workspaces` — widget workspace list + embedded workflow steps.\n * Keep HTTP here; map to transcript types in `widgetWorkspaces.ts` / `workspaceCatalog.ts`.\n */\nexport async function fetchWidgetWorkspaces(\n\tparams: FetchWidgetWorkspacesParams\n): Promise<WidgetWorkspacesResponse | null> {\n\tconst { apiBase, workspacesFilter, authorizationBearer, extensionContext } = params;\n\tconst base = apiBase.replace(/\\/$/, '');\n\tconst url = `${base}/widget/workspaces`;\n\tconst body: Record<string, unknown> = {};\n\tif (workspacesFilter !== undefined) {\n\t\tbody.workspaces = workspacesFilter.length <= 1 ? (workspacesFilter[0] ?? []) : workspacesFilter;\n\t}\n\n\ttry {\n\t\tconst res = await fetch(url, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: getApiHeaders({ authorizationBearer, extensionContext }),\n\t\t\tbody: JSON.stringify(body),\n\t\t});\n\t\tif (!res.ok) {\n\t\t\tLogger.warn('API', 'widget/workspaces HTTP', res.status);\n\t\t\treturn null;\n\t\t}\n\t\tconst json: unknown = await res.json();\n\t\tif (!json || typeof json !== 'object') return null;\n\t\tconst w = (json as Record<string, unknown>).workspaces;\n\t\tif (!Array.isArray(w)) return null;\n\t\tconst workspaces = w\n\t\t\t.map(mapWidgetWorkspaceRow)\n\t\t\t.filter((x): x is WidgetWorkspaceRow => x !== null);\n\t\treturn { workspaces };\n\t} catch (e) {\n\t\tLogger.error('API', 'widget/workspaces fetch failed', e);\n\t\treturn null;\n\t}\n}\n","import {\n\tparseArgs,\n\tmoveCursorToElement,\n\trunQueuedInteractionBoolean,\n\tToolInput,\n\twaitForElement,\n} from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Hover_Tool = {\n\ttype: 'function',\n\tname: 'hover',\n\tdescription: 'Hover the cursor over specific elements on the page with extended visual feedback.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Selector for the cursor to hover over. Supports CSS selectors, XPath, and custom text-based selectors in format 'text:cssSelector:textContent' for precise targeting.\",\n\t\t\t},\n\t\t\tinteractionTime: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'How long (ms) to keep the hover effect on the element. Default is 1500ms.',\n\t\t\t\tminimum: 500,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\n// Hover over a single element by moving the GuideAI cursor to it (no box effect, no click).\nexport const hover = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments);\n\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for hover');\n\t}\n\n\tconst selector: string = args.selector;\n\tconst interactionTime: number = args.interactionTime ?? 1500;\n\n\treturn runQueuedInteractionBoolean(async () => {\n\t\tconst element = await waitForElement(selector);\n\t\tif (!element) {\n\t\t\tLogger.error('GuideAI', `Element not found for selector in hover: ${selector}`);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst cursor = document.getElementById('guide-ai-cursor') as HTMLElement | null;\n\t\tawait moveCursorToElement(element, cursor);\n\n\t\tconst mouseEnterEvent = new MouseEvent('mouseenter', {\n\t\t\tview: window,\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tconst mouseOverEvent = new MouseEvent('mouseover', {\n\t\t\tview: window,\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\n\t\telement.dispatchEvent(mouseEnterEvent);\n\t\telement.dispatchEvent(mouseOverEvent);\n\n\t\tawait new Promise((r) => setTimeout(r, interactionTime));\n\t\treturn true;\n\t});\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Gift = createLucideIcon(\"Gift\", [\n [\"rect\", { x: \"3\", y: \"8\", width: \"18\", height: \"4\", rx: \"1\", key: \"bkv52\" }],\n [\"path\", { d: \"M12 8v13\", key: \"1c76mn\" }],\n [\"path\", { d: \"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7\", key: \"6wjy6b\" }],\n [\n \"path\",\n {\n d: \"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5\",\n key: \"1ihvrl\"\n }\n ]\n]);\n\nexport { Gift as default };\n//# sourceMappingURL=gift.js.map\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Refresh_Tool = {\n\ttype: 'function',\n\tname: 'refresh',\n\tdescription:\n\t\t'Reload the current page (same as the user refreshing the browser). Use when the UI may be stale or after server-side changes.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tdelay: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'Delay in milliseconds before reloading. Default is 0ms. Maximum is 10000ms.',\n\t\t\t\tminimum: 0,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: [],\n\t},\n};\n\nexport const refresh = async (out: ToolInput): Promise<boolean> => {\n\tconst trimmed = (out.arguments ?? '').trim();\n\tconst args = trimmed ? await parseArgs(out.arguments!) : {};\n\tconst delay: number = (args.delay as number) ?? 0;\n\n\tenqueueInteractionJob(async () => {\n\t\tif (delay > 0) {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, delay));\n\t\t}\n\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.sessionStorage) {\n\t\t\t\twindow.sessionStorage.setItem('guideai:lastNavigateTs', Date.now().toString());\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLogger.warn('ToolCall', 'error while setting lastNavigateTs in sessionStorage:', err);\n\t\t}\n\n\t\twindow.location.reload();\n\t});\n\n\treturn true;\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Briefcase = createLucideIcon(\"Briefcase\", [\n [\"path\", { d: \"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16\", key: \"jecpp\" }],\n [\"rect\", { width: \"20\", height: \"14\", x: \"2\", y: \"6\", rx: \"2\", key: \"i6l2r4\" }]\n]);\n\nexport { Briefcase as default };\n//# sourceMappingURL=briefcase.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Music = createLucideIcon(\"Music\", [\n [\"path\", { d: \"M9 18V5l12-2v13\", key: \"1jmyc2\" }],\n [\"circle\", { cx: \"6\", cy: \"18\", r: \"3\", key: \"fqmcym\" }],\n [\"circle\", { cx: \"18\", cy: \"16\", r: \"3\", key: \"1hluhg\" }]\n]);\n\nexport { Music as default };\n//# sourceMappingURL=music.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Calendar = createLucideIcon(\"Calendar\", [\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"4\", rx: \"2\", key: \"1hopcy\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }]\n]);\n\nexport { Calendar as default };\n//# sourceMappingURL=calendar.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Shield = createLucideIcon(\"Shield\", [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\"\n }\n ]\n]);\n\nexport { Shield as default };\n//# sourceMappingURL=shield.js.map\n","import {\n\tparseArgs,\n\trunQueuedInteractionBoolean,\n\tToolInput,\n\tgetEffectiveZIndex,\n\twaitForElement,\n\tscrollToElement,\n} from './elementInteractions';\nimport Logger from '../logger';\nimport { safeWriteLocal } from '../localStorageHelper';\n\nexport const Click_Tool = {\n\ttype: 'function',\n\tname: 'click',\n\tdescription:\n\t\t'Click specific elements on the page. Optionally show a visual click indicator (ripple and emphasis). Supports CSS selectors, XPath, and custom text-based selectors.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Selector for the element to click. Supports CSS selectors, XPath, and custom text-based selectors in format 'text:cssSelector:textContent' for precise targeting.\",\n\t\t\t},\n\t\t\twithEffect: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether to show the visual click effect (ripple and emphasis on the element). Default is true.',\n\t\t\t},\n\t\t\tinteractionTime: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription:\n\t\t\t\t\t'How long (ms) to keep the click visual emphasis on the element before resetting. Default is 500ms. Only applies when withEffect is true.',\n\t\t\t\tminimum: 500,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\n// Constants\nconst Z_INDEX_DETECTION_OFFSET = 150;\nconst Z_INDEX_DETECTTION_DELAY = 200;\n\nconst elementIsVisible = (element: HTMLElement): boolean => {\n\t// Check if it is hidden via CSS\n\tif (!element.checkVisibility()) return false;\n\n\t// Check if element is within viewport\n\tconst rect = element.getBoundingClientRect();\n\treturn (\n\t\trect.width > 0 &&\n\t\trect.height > 0 &&\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n};\n\n/**\n * Perform a single click on an element (used by click tool and by highlightThenClick/hoverThenClick).\n * Resolves clickable subelement, dispatches click, optionally shows ripple/emphasis.\n */\nexport async function performClick(\n\telement: Element,\n\trect: DOMRect,\n\twithEffect: boolean,\n\tcursor: HTMLElement | null,\n\tinteractionTime: number = 500\n): Promise<void> {\n\tconst clickableElements = element.querySelectorAll(\n\t\t'a, button, input[type=\"button\"], input[type=\"submit\"]'\n\t);\n\tlet clickableElement: HTMLElement = element as HTMLElement;\n\tfor (\n\t\tlet i = 0;\n\t\ti < clickableElements.length && !elementIsVisible(clickableElement as HTMLElement);\n\t\ti++\n\t) {\n\t\tclickableElement = clickableElements[i] as HTMLElement;\n\t}\n\n\tif (!elementIsVisible(clickableElement as HTMLElement)) {\n\t\treturn;\n\t}\n\n\tconst clickX = rect.left + rect.width / 2;\n\tconst clickY = rect.top + rect.height / 2;\n\n\tawait new Promise<void>((resolve) => {\n\t\tsetTimeout(() => {\n\t\t\tconst cursorZIndex: number = getEffectiveZIndex(element) + 1;\n\t\t\tconst clickEffectContainer = document.createElement('div');\n\n\t\t\tif (withEffect) {\n\t\t\t\tclickEffectContainer.style.cssText = `\n position: fixed;\n left: ${clickX}px;\n top: ${clickY}px;\n width: 60px;\n height: 60px;\n z-index: ${cursorZIndex + 100};\n pointer-events: none;\n transform: translate(-50%, -50%);\n `;\n\t\t\t\tclickEffectContainer.setAttribute('data-guideai-click-effect', 'true');\n\t\t\t\tdocument.body.appendChild(clickEffectContainer);\n\n\t\t\t\tfor (let j = 0; j < 3; j++) {\n\t\t\t\t\tconst clickRipple = document.createElement('div');\n\t\t\t\t\tclickRipple.style.cssText = `\n position: absolute;\n left: 50%;\n top: 50%;\n width: 40px;\n height: 40px;\n border: 2px solid rgba(0, 102, 255, ${0.7 - j * 0.2});\n border-radius: 50%;\n transform: translate(-50%, -50%) scale(0);\n opacity: 1;\n animation: click-ripple-animation 0.8s ease-out ${j * 0.15}s forwards;\n box-shadow: 0 0 8px rgba(0, 102, 255, 0.4);\n `;\n\t\t\t\t\tclickEffectContainer.appendChild(clickRipple);\n\t\t\t\t}\n\n\t\t\t\tconst clickDot = document.createElement('div');\n\t\t\t\tclickDot.style.cssText = `\n position: absolute;\n left: 50%;\n top: 50%;\n width: 12px;\n height: 12px;\n background: rgba(0, 102, 255, 0.9);\n border-radius: 50%;\n transform: translate(-50%, -50%) scale(0);\n animation: click-dot-animation 0.4s ease-out forwards;\n box-shadow: 0 0 5px rgba(0, 102, 255, 0.8);\n `;\n\t\t\t\tclickEffectContainer.appendChild(clickDot);\n\t\t\t}\n\n\t\t\tconst isLink =\n\t\t\t\tclickableElement.tagName.toLowerCase() === 'a' ||\n\t\t\t\tclickableElement.getAttribute('role') === 'link' ||\n\t\t\t\tclickableElement.closest('a, [role=\"link\"]');\n\n\t\t\tif (isLink) {\n\t\t\t\t// Mark navigation timestamp for waitForElement to poll after link clicks\n\t\t\t\tsafeWriteLocal('guideai:lastNavigateTs', Date.now().toString());\n\t\t\t}\n\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tview: window,\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t});\n\t\t\tclickableElement.dispatchEvent(clickEvent);\n\n\t\t\tupdateCursorZIndex(cursor, clickX, clickY).catch((e: any) => {\n\t\t\t\tLogger.error('GuideAI', 'Error updating cursor z-index:', e);\n\t\t\t});\n\n\t\t\tif (withEffect) {\n\t\t\t\tconst originalBoxShadow = clickableElement.style.boxShadow;\n\t\t\t\tconst originalTransition = clickableElement.style.transition;\n\t\t\t\tclickableElement.style.transition = 'all 0.3s ease-out';\n\t\t\t\tclickableElement.style.boxShadow =\n\t\t\t\t\t'0 0 0 2px rgba(0, 102, 255, 0.5), 0 0 10px rgba(0, 102, 255, 0.3)';\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tclickableElement.style.boxShadow = originalBoxShadow;\n\t\t\t\t\tclickableElement.style.transition = originalTransition;\n\t\t\t\t\tclickEffectContainer.remove();\n\t\t\t\t\tresolve();\n\t\t\t\t}, interactionTime);\n\t\t\t} else {\n\t\t\t\tresolve();\n\t\t\t}\n\t\t}, 1500);\n\t});\n}\n\n// Find the highest z-index element near a given point (for detecting dropdowns)\nasync function updateCursorZIndex(cursor: HTMLElement | null, x: number, y: number): Promise<void> {\n\tif (!cursor) return;\n\n\t// Wait for dropdowns/modals to render\n\tawait new Promise((resolve) => setTimeout(resolve, Z_INDEX_DETECTTION_DELAY));\n\n\t// Check click point and area above (for drop-ups), handling bounds automatically\n\tconst elements = [\n\t\t...document.elementsFromPoint(x, y),\n\t\t...document.elementsFromPoint(x, Math.max(0, y - Z_INDEX_DETECTION_OFFSET)), // Check if menu opens above cursor\n\t\t...document.elementsFromPoint(\n\t\t\tx,\n\t\t\tMath.min(window.innerHeight - 1, y + Z_INDEX_DETECTION_OFFSET)\n\t\t), // Check if menu opens slightly below cursor\n\t];\n\n\t// Find max z-index, ignoring the cursor itself\n\tconst highestZ = elements.reduce((max, el) => {\n\t\tif (el === cursor) return max;\n\t\treturn Math.max(max, getEffectiveZIndex(el));\n\t}, 0);\n\n\t// Apply new z-index if needed\n\tif (highestZ > parseInt(cursor.style.zIndex || '0')) {\n\t\tcursor.style.zIndex = `${highestZ + 1}`;\n\t}\n}\n\n// Click a single element on the page with animated cursor\nexport const clickElement = async (out: ToolInput): Promise<boolean> => {\n\t// Parse the arguments\n\tconst args = await parseArgs(out.arguments);\n\n\t// Validate selector\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for click');\n\t}\n\n\tLogger.info('GuideAI', 'Executing click with args:', args);\n\n\tconst selector: string = args.selector;\n\tconst withEffect: boolean = args.withEffect !== false;\n\tconst interactionTime: number = args.interactionTime ?? 500;\n\n\treturn runQueuedInteractionBoolean(async () => {\n\t\tconst element = await waitForElement(selector);\n\t\tif (!element) {\n\t\t\tLogger.error('GuideAI', `Element not found for selector in click: ${selector}`);\n\t\t\treturn false;\n\t\t}\n\t\tscrollToElement(element);\n\t\tconst rect = element.getBoundingClientRect();\n\t\tconst cursor = document.getElementById('guide-ai-cursor') as HTMLElement | null;\n\t\tawait performClick(element, rect, withEffect, cursor, interactionTime);\n\t\treturn true;\n\t});\n};\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Go_To_A_Elm_Link_Tool = {\n\ttype: 'function',\n\tname: 'goToAElmLink',\n\tdescription:\n\t\t'[Deprecated – prefer navigateTo.] Navigate to a URL by finding an <a> that wraps a <span> with the given text and reading the data-momentum-client-link attribute. Prefixes with /AMSINS.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tlinkText: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Exact text content of the <span> nested inside the desired <a> element.',\n\t\t\t},\n\t\t\tdelay: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'Delay in milliseconds before navigating. Default is 0.',\n\t\t\t\tminimum: 0,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['linkText'],\n\t},\n};\n\n/**\n * Navigate to a URL by finding an <a> that wraps a <span> with the given text and reading data-momentum-client-link.\n * @deprecated Prefer navigateTo with a URL (e.g. from the link href or route). This tool is for legacy Momentum-style markup.\n */\nasync function goToAElmLinkImpl(linkText: string, delay: number = 0): Promise<boolean> {\n\tif (!linkText || typeof linkText !== 'string') {\n\t\tthrow new Error('Invalid linkText');\n\t}\n\n\tlet targetSpan: HTMLSpanElement | null = null;\n\tconst allSpans = document.querySelectorAll('span');\n\n\tfor (const span of Array.from(allSpans)) {\n\t\tif (span.textContent && span.textContent.trim() === linkText && span.closest('a')) {\n\t\t\ttargetSpan = span as HTMLSpanElement;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (!targetSpan) {\n\t\tthrow new Error(`Could not find a clickable span with the text: \"${linkText}\"`);\n\t}\n\n\tconst linkElement = targetSpan.closest('a');\n\tif (!linkElement) {\n\t\tthrow new Error('Could not find a parent <a> element for the span.');\n\t}\n\n\tconst relativeUrl = linkElement.getAttribute('data-momentum-client-link');\n\tif (!relativeUrl) {\n\t\tthrow new Error(\n\t\t\t\"The parent <a> element does not have the 'data-momentum-client-link' attribute.\"\n\t\t);\n\t}\n\n\tconst basePath = '/AMSINS';\n\tconst fullUrl = basePath + relativeUrl;\n\tLogger.info('GuideAI', `goToAElmLink: Navigating to ${fullUrl} for linkText \"${linkText}\"`);\n\n\tif (delay === 0) {\n\t\twindow.location.href = fullUrl;\n\t\treturn true;\n\t}\n\treturn new Promise<boolean>((resolve) => {\n\t\tsetTimeout(() => {\n\t\t\twindow.location.href = fullUrl;\n\t\t\tresolve(true);\n\t\t}, delay);\n\t});\n}\n\n/**\n * Tool entry for goToAElmLink. Parses linkText and delay from args and enqueues the navigation job.\n * @deprecated Prefer navigateTo. This tool is for legacy Momentum-style markup (span text + data-momentum-client-link).\n */\nexport const goToAElmLink = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments ?? '{}');\n\tconst linkText = args?.linkText != null ? String(args.linkText) : '';\n\tconst delay = typeof args?.delay === 'number' ? args.delay : 0;\n\n\tif (!linkText) {\n\t\tthrow new Error('No linkText provided for goToAElmLink');\n\t}\n\n\tenqueueInteractionJob(async () => {\n\t\tawait goToAElmLinkImpl(linkText, delay);\n\t});\n\n\treturn true;\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Code = createLucideIcon(\"Code\", [\n [\"polyline\", { points: \"16 18 22 12 16 6\", key: \"z7tu5w\" }],\n [\"polyline\", { points: \"8 6 2 12 8 18\", key: \"1eg1df\" }]\n]);\n\nexport { Code as default };\n//# sourceMappingURL=code.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst FolderOpen = createLucideIcon(\"FolderOpen\", [\n [\n \"path\",\n {\n d: \"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\",\n key: \"usdka0\"\n }\n ]\n]);\n\nexport { FolderOpen as default };\n//# sourceMappingURL=folder-open.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Heart = createLucideIcon(\"Heart\", [\n [\n \"path\",\n {\n d: \"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z\",\n key: \"c3ymky\"\n }\n ]\n]);\n\nexport { Heart as default };\n//# sourceMappingURL=heart.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Lightbulb = createLucideIcon(\"Lightbulb\", [\n [\n \"path\",\n {\n d: \"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\",\n key: \"1gvzjb\"\n }\n ],\n [\"path\", { d: \"M9 18h6\", key: \"x1upvd\" }],\n [\"path\", { d: \"M10 22h4\", key: \"ceow96\" }]\n]);\n\nexport { Lightbulb as default };\n//# sourceMappingURL=lightbulb.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Users = createLucideIcon(\"Users\", [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"path\", { d: \"M16 3.13a4 4 0 0 1 0 7.75\", key: \"1da9ce\" }]\n]);\n\nexport { Users as default };\n//# sourceMappingURL=users.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Mail = createLucideIcon(\"Mail\", [\n [\"rect\", { width: \"20\", height: \"16\", x: \"2\", y: \"4\", rx: \"2\", key: \"18n3k1\" }],\n [\"path\", { d: \"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\", key: \"1ocrg3\" }]\n]);\n\nexport { Mail as default };\n//# sourceMappingURL=mail.js.map\n","// Default prompt for Guide AI\nexport const DEFAULT_PROMPT = `you are Guide AI.\n Your role is to answer any question directly and succinctly that a user has. NEVER DIRECTLY MENTION THE SCREENSHOT, but use its information as much as possible to target your responses.\n If nothing is asked, then your goal is to generally assist them.\n IMPORTANT: NEVER answer in more than 10 words. Always be concise and limit answers to 1 sentence maximum. Be simple and as short as possible.\n Your job is to help them get it done through asking more and more targeted specific questions.`;\n\n// API endpoints - Environment-based\nexport const GUIDE_AI_API_BASE_PROD = 'https://app.getguide.ai/api';\nexport const GUIDE_AI_API_BASE_DEV = 'https://dev.getguide.ai/api';\nexport const GUIDE_AI_API_BASE_LOCAL = 'http://localhost:3000/api';\n// Helper to get API base URL based on environment\nexport const getApiBaseUrl = (environment?: 'development' | 'production' | 'local'): string => {\n\tswitch (environment) {\n\t\tcase 'development':\n\t\t\treturn GUIDE_AI_API_BASE_DEV;\n\t\tcase 'local':\n\t\t\treturn GUIDE_AI_API_BASE_LOCAL;\n\t\tdefault:\n\t\t\treturn GUIDE_AI_API_BASE_PROD;\n\t}\n};\n// Legacy export for backwards compatibility (defaults to production)\nexport const GUIDE_AI_API_BASE = GUIDE_AI_API_BASE_PROD;\nexport const OPENAI_REALTIME_BASE = 'https://api.openai.com/v1/realtime/calls';\n\n/** Must match guideaisite `WIDGET_EXTENSION_HEADER` — server bypasses session hostname allowlist for extension builds. */\nexport const WIDGET_EXTENSION_HEADER = 'x-guideai-extension';\n\n// UI layout constants - single source of truth for positioning\nexport const UI_LAYOUT = {\n\t/** Mic/icon wrapper size - matches .guideai-icon-wrapper */\n\tmicButtonSize: 50,\n\t/** Space between mic top and lowest toggle bottom */\n\ttoggleAboveMicGap: 12,\n\t/** Gap between stacked buttons (e.g. transcript above settings) */\n\tstackedButtonGap: 8,\n\t/** Horizontal offset from edge when using right/left positioning */\n\thorizontalEdgeOffset: 6,\n\t/** Default bottom when micPosition is not provided */\n\tdefaultBottom: 20,\n\t/** Default horizontal offset when position is not provided */\n\tdefaultHorizontalOffset: 40,\n\t/**\n\t * Floating transcript card (`guideai-transcript-box`) inset from the viewport right and bottom.\n\t * Kept separate from mic `position` so the card can sit closer to the corner (e.g. 20px vs 40px).\n\t */\n\ttranscriptFloatEdgeInset: 20,\n} as const;\n","import {\n\tparseArgs,\n\trunQueuedInteractionBoolean,\n\tToolInput,\n\twaitForElement,\n\tscrollToElement,\n} from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Scroll_Tool = {\n\ttype: 'function',\n\tname: 'scroll',\n\tdescription:\n\t\t'Scroll the page so the target element is visible. Uses the same selector rules as highlight, click, and hover.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t\"CSS/XPath or text-based selector ('text:cssSelector:textContent') for the element to scroll into view.\",\n\t\t\t},\n\t\t\tbehavior: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['auto', 'instant', 'smooth'],\n\t\t\t\tdescription: 'Default smooth.',\n\t\t\t},\n\t\t\tblock: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['start', 'center', 'end', 'nearest'],\n\t\t\t\tdescription: 'Default center.',\n\t\t\t},\n\t\t\tinline: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['start', 'center', 'end', 'nearest'],\n\t\t\t\tdescription: 'Default nearest.',\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\nfunction asScrollBehavior(v: unknown): ScrollBehavior {\n\tif (v === 'auto' || v === 'instant' || v === 'smooth') return v;\n\treturn 'smooth';\n}\n\nfunction asScrollLogical(v: unknown, fallback: ScrollLogicalPosition): ScrollLogicalPosition {\n\tif (v === 'start' || v === 'center' || v === 'end' || v === 'nearest') return v;\n\treturn fallback;\n}\n\nexport const scroll = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments);\n\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for scroll');\n\t}\n\n\tconst selector: string = args.selector;\n\tconst behavior = asScrollBehavior(args.behavior);\n\tconst block = asScrollLogical(args.block, 'center');\n\tconst inline = asScrollLogical(args.inline, 'nearest');\n\n\treturn runQueuedInteractionBoolean(async () => {\n\t\tconst element = await waitForElement(selector);\n\t\tif (!element) {\n\t\t\tLogger.error('GuideAI', `Element not found for selector in scroll: ${selector}`);\n\t\t\treturn false;\n\t\t}\n\t\tscrollToElement(element, { behavior, block, inline });\n\t\treturn true;\n\t});\n};\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport { pickSingleFileWithPrompt } from './docUploadPrompt';\nimport Logger from '../logger';\nimport { getApiBaseUrl } from '../constants';\nimport { getApiHeaders } from '../api';\nimport { getWidgetBearerToken, getWidgetEnvironment } from '../widgetAuthStore';\n\nexport const Doc_To_Form_Tool = {\n\ttype: 'function',\n\tname: 'docToForm',\n\tdescription:\n\t\t'Prompts the user to upload a document (PDF, image, text file, etc.) via an in-page upload card; after they choose a file, extracts all readable text and data using AI and returns it for filling form fields on the page.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tprompt: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Optional extra instructions for what to extract from the file.',\n\t\t\t},\n\t\t\tacceptedTypes: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t'Optional file input accept list (extensions/MIME). Uses a broad default if omitted.',\n\t\t\t},\n\t\t},\n\t\trequired: [],\n\t},\n};\n\nexport type DocToFormArgs = {\n\tprompt?: string;\n\tacceptedTypes?: string;\n};\n\nconst DEFAULT_ACCEPT =\n\t'.txt,.md,.csv,.json,.xml,.html,.pdf,.doc,.docx,.rtf,.png,.jpg,.jpeg,.gif,.webp,.bmp,.svg,.tif,.tiff,.heic,.heif,.avif,text/*,image/*,application/pdf,application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n/** Stay under guideaisite /api/gemini inline limit (15MB). */\nconst MAX_INLINE_UPLOAD_BYTES = 12 * 1024 * 1024;\n/** Keep function_call_output Reasonable for Realtime/WebRTC. */\nconst TOOL_OUTPUT_TEXT_MAX = 80_000;\n\n/** Gemini 3.1 Flash family (preview); matches `/api/gemini` default unless server overrides. */\nexport const DOC_TO_FORM_GEMINI_MODEL = 'gemini-3.1-flash-lite-preview';\n\n/** Shown to the realtime model in the tool output JSON so it acts on the extraction immediately. */\nexport const DOC_TO_FORM_ASSISTANT_INSTRUCTION =\n\t'Here are the extracted details. Call fillForm once with a `fields` array to fill every applicable form field. Do not wait for confirmation.';\n\nconst GEMINI_EXTRACT_PROMPT = `Extract ALL readable text and data from this file for a browser form-filling assistant.\nFor images or scans, read every visible string (including on screenshots or photos of forms and UI).\nInclude every label, field name, placeholder hint, table cell, section header, and filled or empty value you can see.\nUse plain text. Preserve approximate layout with newlines where it helps. If there are tables, represent rows clearly.\nDo not summarize away details the user might need to map to form fields. If there is no extractable text, say so briefly.`;\n\nfunction mimeFromFileName(fileName: string): string {\n\tconst ext = fileName.split('.').pop()?.toLowerCase() ?? '';\n\tconst map: Record<string, string> = {\n\t\tpdf: 'application/pdf',\n\t\tpng: 'image/png',\n\t\tjpg: 'image/jpeg',\n\t\tjpeg: 'image/jpeg',\n\t\tgif: 'image/gif',\n\t\twebp: 'image/webp',\n\t\tbmp: 'image/bmp',\n\t\tsvg: 'image/svg+xml',\n\t\ttif: 'image/tiff',\n\t\ttiff: 'image/tiff',\n\t\theic: 'image/heic',\n\t\theif: 'image/heif',\n\t\tavif: 'image/avif',\n\t\tico: 'image/x-icon',\n\t\ttxt: 'text/plain',\n\t\tmd: 'text/markdown',\n\t\tcsv: 'text/csv',\n\t\tjson: 'application/json',\n\t\thtml: 'text/html',\n\t\txml: 'application/xml',\n\t\tdoc: 'application/msword',\n\t\tdocx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n\t};\n\treturn map[ext] ?? 'application/octet-stream';\n}\n\nfunction arrayBufferToBase64(buffer: ArrayBuffer): string {\n\tconst bytes = new Uint8Array(buffer);\n\tlet binary = '';\n\tfor (let i = 0; i < bytes.byteLength; i++) {\n\t\tbinary += String.fromCharCode(bytes[i]);\n\t}\n\treturn btoa(binary);\n}\n\nasync function extractDocumentWithGeminiApi(\n\tfile: File,\n\textraInstructions?: string\n): Promise<string> {\n\tif (file.size > MAX_INLINE_UPLOAD_BYTES) {\n\t\tthrow new Error(`File exceeds maximum size (${MAX_INLINE_UPLOAD_BYTES} bytes)`);\n\t}\n\tconst apiBase = getApiBaseUrl(getWidgetEnvironment()).replace(/\\/$/, '');\n\n\tconst buf = await file.arrayBuffer();\n\tconst data = arrayBufferToBase64(buf);\n\tconst mimeType = file.type?.trim() || mimeFromFileName(file.name);\n\tlet prompt = GEMINI_EXTRACT_PROMPT;\n\tif (extraInstructions?.trim()) {\n\t\tprompt += `\\n\\nAdditional instructions from the assistant: ${extraInstructions.trim()}`;\n\t}\n\n\tconst payload: Record<string, unknown> = {\n\t\tprompt,\n\t\tmodel: DOC_TO_FORM_GEMINI_MODEL,\n\t\tinlineFiles: [{ mimeType, data }],\n\t};\n\n\tconst res = await fetch(`${apiBase}/gemini`, {\n\t\tmethod: 'POST',\n\t\theaders: getApiHeaders({\n\t\t\tauthorizationBearer: getWidgetBearerToken() || undefined,\n\t\t}),\n\t\tbody: JSON.stringify(payload),\n\t});\n\tconst json = (await res.json().catch(() => ({}))) as { response?: string; error?: string };\n\tif (!res.ok) {\n\t\tthrow new Error(typeof json.error === 'string' ? json.error : `Gemini API error ${res.status}`);\n\t}\n\tif (typeof json.response !== 'string' || !json.response.trim()) {\n\t\tthrow new Error('Gemini returned no text');\n\t}\n\treturn json.response.trim();\n}\n\nexport type DocToFormSuccess = {\n\tsuccess: true;\n\tinstructionForAssistant: string;\n\tfileName: string;\n\textractedText: string;\n\ttruncated: boolean;\n};\n\nexport type DocExtractionProgressListener = {\n\tonStart: () => void;\n\t/** `succeeded` = true if extraction produced text; UI can show form-filling until the assistant turn ends. */\n\tonEnd: (succeeded: boolean) => void;\n};\n\nlet docExtractionProgressListener: DocExtractionProgressListener | null = null;\n\n/** GuideAI registers this so the transcript can show a loading state while Gemini extracts text. */\nexport function setDocExtractionProgressListener(\n\tlistener: DocExtractionProgressListener | null\n): void {\n\tdocExtractionProgressListener = listener;\n}\n\n/** True while a docToForm Gemini extraction is in progress (single-flight). */\nlet docExtractionInFlight = false;\n\nexport function isDocExtractionInProgress(): boolean {\n\treturn docExtractionInFlight;\n}\n\nexport type DocToFormRunResult = DocToFormSuccess | false | 'busy';\n\n/**\n * Runs Gemini extraction on an already-selected file (no file picker).\n * Used by the docToForm tool and transcript drag-and-drop.\n * Only one extraction runs at a time; concurrent calls resolve to `'busy'`.\n */\nexport async function runDocToFormWithFile(\n\tfile: File,\n\targs: DocToFormArgs = {}\n): Promise<DocToFormRunResult> {\n\tif (docExtractionInFlight) {\n\t\tLogger.warn('ToolCall', 'docToForm: skipped — extraction already in progress');\n\t\treturn 'busy';\n\t}\n\tdocExtractionInFlight = true;\n\ttry {\n\t\tdocExtractionProgressListener?.onStart();\n\t} catch {\n\t\t/* ignore host errors */\n\t}\n\tlet extractionSucceeded = false;\n\ttry {\n\t\tconst extracted = await extractDocumentWithGeminiApi(file, args.prompt);\n\n\t\tlet extractedText = extracted;\n\t\tlet truncated = false;\n\t\tif (extractedText.length > TOOL_OUTPUT_TEXT_MAX) {\n\t\t\textractedText =\n\t\t\t\textractedText.slice(0, TOOL_OUTPUT_TEXT_MAX) +\n\t\t\t\t`\\n\\n[Truncated from ${extracted.length} characters.]`;\n\t\t\ttruncated = true;\n\t\t}\n\n\t\tLogger.info('ToolCall', 'docToForm: extraction complete', {\n\t\t\tfileName: file.name,\n\t\t\tlength: extractedText.length,\n\t\t\ttruncated,\n\t\t});\n\n\t\textractionSucceeded = true;\n\t\treturn {\n\t\t\tsuccess: true,\n\t\t\tinstructionForAssistant: DOC_TO_FORM_ASSISTANT_INSTRUCTION,\n\t\t\tfileName: file.name,\n\t\t\textractedText,\n\t\t\ttruncated,\n\t\t};\n\t} catch (err) {\n\t\tLogger.error('ToolCall', 'docToForm failed', err);\n\t\treturn false;\n\t} finally {\n\t\tdocExtractionInFlight = false;\n\t\ttry {\n\t\t\tdocExtractionProgressListener?.onEnd(extractionSucceeded);\n\t\t} catch {\n\t\t\t/* ignore host errors */\n\t\t}\n\t}\n}\n\n/**\n * Prompts for a file, POSTs it to guideaisite /api/gemini, returns extracted text as function_call_output.\n */\nexport const docToForm = async (out: ToolInput): Promise<boolean | DocToFormSuccess> => {\n\tconst args = ((await parseArgs(out.arguments ?? '{}')) || {}) as DocToFormArgs;\n\tconst acceptedTypes = args.acceptedTypes || DEFAULT_ACCEPT;\n\n\treturn new Promise((resolve) => {\n\t\tenqueueInteractionJob(async () => {\n\t\t\ttry {\n\t\t\t\tconst file = await pickSingleFileWithPrompt(acceptedTypes);\n\t\t\t\tif (!file) {\n\t\t\t\t\tLogger.warn('ToolCall', 'docToForm: no file selected');\n\t\t\t\t\tresolve(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst result = await runDocToFormWithFile(file, args);\n\t\t\t\tresolve(result === 'busy' ? false : result);\n\t\t\t} catch (err) {\n\t\t\t\tLogger.error('ToolCall', 'docToForm failed', err);\n\t\t\t\tresolve(false);\n\t\t\t}\n\t\t});\n\t});\n};\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}\nfunction N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g;function Q(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(\"\"+a.key):b.toString(36)}\nfunction R(a,b,e,d,c){var k=typeof a;if(\"undefined\"===k||\"boolean\"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case \"string\":case \"number\":h=!0;break;case \"object\":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=\"\"===d?\".\"+Q(h,0):d,I(c)?(e=\"\",null!=a&&(e=a.replace(P,\"$&/\")+\"/\"),R(c,b,e,\"\",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?\"\":(\"\"+c.key).replace(P,\"$&/\")+\"/\")+a)),b.push(c)),1;h=0;d=\"\"===d?\".\":d+\":\";if(I(a))for(var g=0;g<a.length;g++){k=\na[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),\"function\"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if(\"object\"===k)throw b=String(a),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===b?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":b)+\"). If you meant to render a collection of children, use an array instead.\");return h}\nfunction S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,\"\",\"\",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}\nvar U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};function X(){throw Error(\"act(...) is not supported in production builds of React.\");}\nexports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error(\"React.Children.only expected to receive a single React element child.\");return a}};exports.Component=E;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;exports.act=X;\nexports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+a+\".\");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=\"\"+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);\nfor(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};\nexports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=X;exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};\nexports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};\nexports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};exports.useTransition=function(){return U.current.useTransition()};exports.version=\"18.3.1\";\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Navigate_To_Tool = {\n\ttype: 'function',\n\tname: 'navigateTo',\n\tdescription:\n\t\t'Navigate the current window to a specific URL. Use for page-level navigation such as going to a different route or external site.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\turl: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'The absolute or relative URL to navigate the current window to.',\n\t\t\t},\n\t\t\tdelay: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription:\n\t\t\t\t\t'Delay in milliseconds before navigating to the URL. Default is 500ms. Maximum is 10000ms.',\n\t\t\t\tminimum: 0,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['url'],\n\t},\n};\n\nexport const navigateTo = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments);\n\n\tif (!args || !args.url) {\n\t\tthrow new Error('No url provided for navigateTo');\n\t}\n\n\tconst url: string = args.url;\n\tconst delay: number = args.delay ?? 500;\n\n\tenqueueInteractionJob(async () => {\n\t\tif (delay > 0) {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, delay));\n\t\t}\n\n\t\t// Mark the time of navigation so subsequent tools know the DOM may still be loading.\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.sessionStorage) {\n\t\t\t\twindow.sessionStorage.setItem('guideai:lastNavigateTs', Date.now().toString());\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLogger.warn('ToolCall', 'error while setting lastNavigateTs in sessionStorage:', err);\n\t\t}\n\n\t\t// Prefer client-side navigation via links when possible (keeps JS context and queue alive),\n\t\t// but fall back to full-page navigation if no matching link exists.\n\t\tconst link =\n\t\t\ttypeof document !== 'undefined'\n\t\t\t\t? (document.querySelector(`a[href=\"${url}\"]`) as HTMLAnchorElement | null)\n\t\t\t\t: null;\n\n\t\tif (link) {\n\t\t\tlink.click();\n\t\t} else {\n\t\t\twindow.location.href = url;\n\t\t}\n\t});\n\n\treturn true;\n};\n","import Logger from '../logger';\n\ntype Pending = {\n\tresolve: (file: File | null) => void;\n\tinput: HTMLInputElement;\n\troot: HTMLElement;\n};\n\nlet pending: Pending | null = null;\n\n/**\n * Tear down the upload prompt and resolve the in-flight pick with `null`.\n * Idempotent: safe to call when no prompt is active.\n */\nexport function dismissPendingDocUploadPrompt(): void {\n\tconst p = pending;\n\tif (!p) return;\n\tpending = null;\n\tp.input.remove();\n\tp.root.remove();\n\tp.resolve(null);\n}\n\n/**\n * Shows an in-widget card; opens the native file picker only after the user clicks\n * \"Choose file…\". Resolves with the selected file or `null` if dismissed.\n * If another prompt is already active, it is dismissed first.\n */\nexport function pickSingleFileWithPrompt(accept: string): Promise<File | null> {\n\tdismissPendingDocUploadPrompt();\n\n\treturn new Promise((resolve) => {\n\t\tconst root = document.createElement('div');\n\t\troot.className = 'guideai-doc-upload-prompt';\n\t\troot.setAttribute('role', 'dialog');\n\t\troot.setAttribute('aria-label', 'Document upload');\n\t\troot.innerHTML = `\n\t\t\t<div class=\"guideai-doc-upload-prompt__title\">Upload a document</div>\n\t\t\t<div class=\"guideai-doc-upload-prompt__subtitle\">The assistant needs a file to read. Choose one, or continue the conversation to dismiss.</div>\n\t\t\t<div class=\"guideai-doc-upload-prompt__actions\">\n\t\t\t\t<button type=\"button\" class=\"guideai-doc-upload-prompt__btn guideai-doc-upload-prompt__btn--primary\" data-guideai-upload-choose>Choose file…</button>\n\t\t\t\t<button type=\"button\" class=\"guideai-doc-upload-prompt__btn guideai-doc-upload-prompt__btn--secondary\" data-guideai-upload-cancel>Not now</button>\n\t\t\t</div>\n\t\t`;\n\n\t\tconst input = document.createElement('input');\n\t\tinput.type = 'file';\n\t\tinput.accept = accept;\n\t\tinput.style.cssText = 'position:absolute;width:0;height:0;opacity:0;pointer-events:none';\n\n\t\tconst state: Pending = { resolve, input, root };\n\t\tpending = state;\n\n\t\tconst finish = (file: File | null) => {\n\t\t\tif (pending !== state) return;\n\t\t\tpending = null;\n\t\t\tinput.remove();\n\t\t\troot.remove();\n\t\t\tresolve(file);\n\t\t};\n\n\t\tinput.addEventListener('change', () => finish(input.files?.[0] ?? null), { once: true });\n\t\troot.querySelector('[data-guideai-upload-choose]')?.addEventListener('click', () => {\n\t\t\ttry {\n\t\t\t\tdocument.body.appendChild(input);\n\t\t\t\tinput.click();\n\t\t\t} catch (e) {\n\t\t\t\tLogger.error('ToolCall', 'docToForm: could not open file picker', e);\n\t\t\t\tfinish(null);\n\t\t\t}\n\t\t});\n\t\troot\n\t\t\t.querySelector('[data-guideai-upload-cancel]')\n\t\t\t?.addEventListener('click', () => finish(null));\n\n\t\tconst mount =\n\t\t\t(document.querySelector('[data-guideai-root]') as HTMLElement | null) ?? document.body;\n\t\tmount.appendChild(root);\n\t});\n}\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst House = createLucideIcon(\"House\", [\n [\"path\", { d: \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\", key: \"5wwlr5\" }],\n [\n \"path\",\n {\n d: \"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\",\n key: \"1d0kgt\"\n }\n ]\n]);\n\nexport { House as default };\n//# sourceMappingURL=house.js.map\n","/**\n * Standardized logging utility for GuideAI package\n * Provides consistent formatting and development gating across all components\n */\nimport { getLoggerEnabled, setLoggerEnabled } from './localStorageHelper';\n\nconst LOG_LEVEL: LogLevel = 'log';\n\nconst LEVELS = ['log', 'info', 'warn', 'error'];\ntype LogLevel = (typeof LEVELS)[number];\n\nfunction shouldLog(requestedLevel: LogLevel) {\n\tconst currentIndex = LEVELS.indexOf(LOG_LEVEL);\n\tconst requestedIndex = LEVELS.indexOf(requestedLevel);\n\treturn requestedIndex >= currentIndex;\n}\n\n/** Ordered list for debug UI and default flag initialization. */\nexport const LOGGER_UI_COMPONENTS = [\n\t'GuideAI',\n\t'API',\n\t'TranscriptBox',\n\t'Onboarding',\n\t'VisualContext',\n\t'StaticContext',\n\t'MessageStorage',\n\t'DataChannel',\n\t'ConversationManager',\n\t'LocalStorageHelper',\n\t'WebRTCConnection',\n\t'ToolCall',\n] as const;\n\nexport type LoggerComponentKey = (typeof LOGGER_UI_COMPONENTS)[number];\n\nconst ON_BY_DEFAULT: Partial<Record<LoggerComponentKey, true>> = {\n\tDataChannel: true,\n\tLocalStorageHelper: true,\n\tWebRTCConnection: true,\n};\n\nconst logging_enabled = Object.fromEntries(\n\tLOGGER_UI_COMPONENTS.map((k) => [k, Boolean(ON_BY_DEFAULT[k])])\n) as Record<LoggerComponentKey, boolean>;\n\n// Manual override flag for console-based logging control\nlet manualLoggingEnabled: boolean = false;\n\nclass Logger {\n\tprivate static formatMessage(component: LoggerComponentKey, action: string): string {\n\t\treturn `[GuideAI:${component}] ${action}`;\n\t}\n\n\tprivate static checkLoggingEnabled(\n\t\tcomponent: LoggerComponentKey,\n\t\trequestedLevel: LogLevel\n\t): boolean {\n\t\t// Check manual override first, then fall back to development mode check\n\t\tconst isManuallyEnabled =\n\t\t\tmanualLoggingEnabled && logging_enabled[component] && shouldLog(requestedLevel);\n\t\tconst isDevModeEnabled =\n\t\t\tprocess.env.NODE_ENV === 'development' &&\n\t\t\tlogging_enabled[component] &&\n\t\t\tshouldLog(requestedLevel);\n\t\treturn isManuallyEnabled || isDevModeEnabled;\n\t}\n\n\t/**\n\t * Initialize logger and attach to window for console access\n\t * Call Logger.init() from browser console to enable logging.\n\t * Restores persisted enabled state from localStorage if previously enabled.\n\t */\n\tstatic init(): void {\n\t\tif (typeof window !== 'undefined') {\n\t\t\tconst win = window as Window & { GuideAI?: { logger?: typeof Logger } };\n\t\t\tif (!win.GuideAI) win.GuideAI = {};\n\t\t\twin.GuideAI.logger = Logger;\n\t\t\tif (getLoggerEnabled()) {\n\t\t\t\tmanualLoggingEnabled = true;\n\t\t\t\tconsole.log(\n\t\t\t\t\t'[GuideAI Logger] Initialized with logging enabled (restored from previous session).'\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tconsole.log(\n\t\t\t\t\t'[GuideAI Logger] Initialized. Use GuideAI.logger.enable() to start logging, or the Debug ⋯ → Logger submenu after GuideAI.debug.showMoreMenu().'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Enable logging from console, or for a specific component.\n\t * Usage: GuideAI.logger.enable() or GuideAI.logger.enable('API')\n\t */\n\tstatic enable(component?: LoggerComponentKey): void {\n\t\tif (component !== undefined) {\n\t\t\tmanualLoggingEnabled = true;\n\t\t\tlogging_enabled[component] = true;\n\t\t\tconsole.log(`[GuideAI Logger] ${component} logging enabled`);\n\t\t} else {\n\t\t\tmanualLoggingEnabled = true;\n\t\t\tsetLoggerEnabled(true);\n\t\t\tconsole.log('[GuideAI Logger] Logging enabled');\n\t\t}\n\t}\n\n\t/**\n\t * Disable logging from console, or for a specific component.\n\t * Usage: GuideAI.logger.disable() or GuideAI.logger.disable('API')\n\t */\n\tstatic disable(component?: LoggerComponentKey): void {\n\t\tif (component !== undefined) {\n\t\t\tlogging_enabled[component] = false;\n\t\t\tconsole.log(`[GuideAI Logger] ${component} logging disabled`);\n\t\t} else {\n\t\t\tmanualLoggingEnabled = false;\n\t\t\tsetLoggerEnabled(false);\n\t\t\tconsole.log('[GuideAI Logger] Logging disabled');\n\t\t}\n\t}\n\n\t/**\n\t * Enable or disable logging for a specific component\n\t * Usage: GuideAI.logger.setComponentEnabled('API', true)\n\t */\n\tstatic setComponentEnabled(component: LoggerComponentKey, enabled: boolean): void {\n\t\tlogging_enabled[component] = enabled;\n\t\tconsole.log(`[GuideAI Logger] ${component} logging ${enabled ? 'enabled' : 'disabled'}`);\n\t}\n\n\t/**\n\t * Get current logging status\n\t * Usage: GuideAI.logger.getStatus()\n\t */\n\tstatic getStatus(): { manualEnabled: boolean; components: Record<LoggerComponentKey, boolean> } {\n\t\treturn {\n\t\t\tmanualEnabled: manualLoggingEnabled,\n\t\t\tcomponents: { ...logging_enabled },\n\t\t};\n\t}\n\n\t/**\n\t * Disable logging for all components\n\t * Usage: GuideAI.logger.disableAllComponents()\n\t */\n\tstatic disableAllComponents(): void {\n\t\tLOGGER_UI_COMPONENTS.forEach((component) => {\n\t\t\tlogging_enabled[component] = false;\n\t\t});\n\t\tconsole.log('[GuideAI Logger] All components disabled');\n\t}\n\n\t/**\n\t * Enable logging for all components\n\t * Usage: GuideAI.logger.enableAllComponents()\n\t */\n\tstatic enableAllComponents(): void {\n\t\tLOGGER_UI_COMPONENTS.forEach((component) => {\n\t\t\tlogging_enabled[component] = true;\n\t\t});\n\t\tconsole.log('[GuideAI Logger] All components enabled');\n\t}\n\n\t/**\n\t * Standard info logging - only in development\n\t */\n\tstatic info(component: LoggerComponentKey, action: string, data?: any): void {\n\t\tif (this.checkLoggingEnabled(component, 'info')) {\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.info(this.formatMessage(component, action), data);\n\t\t\t} else {\n\t\t\t\tconsole.info(this.formatMessage(component, action));\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t * Standard info logging - only in development\n\t */\n\tstatic log(component: LoggerComponentKey, action: string, data?: any): void {\n\t\tif (this.checkLoggingEnabled(component, 'log')) {\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.log(this.formatMessage(component, action), data);\n\t\t\t} else {\n\t\t\t\tconsole.log(this.formatMessage(component, action));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Warning logging - always shown\n\t */\n\tstatic warn(component: LoggerComponentKey, action: string, data?: any): void {\n\t\tif (this.checkLoggingEnabled(component, 'warn')) {\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.warn(this.formatMessage(component, action), data);\n\t\t\t} else {\n\t\t\t\tconsole.warn(this.formatMessage(component, action));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Error logging - always shown\n\t */\n\tstatic error(component: LoggerComponentKey, action: string, error?: any): void {\n\t\tif (this.checkLoggingEnabled(component, 'error')) {\n\t\t\tif (error !== undefined) {\n\t\t\t\tconsole.error(this.formatMessage(component, action), error);\n\t\t\t} else {\n\t\t\t\tconsole.error(this.formatMessage(component, action));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * API call logging with method and endpoint\n\t */\n\tstatic apiCall(method: string, endpoint: string, data?: any): void {\n\t\tif (this.checkLoggingEnabled('API', 'log')) {\n\t\t\tconst action = `${method} ${endpoint}`;\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.log(this.formatMessage('API', action), data);\n\t\t\t} else {\n\t\t\t\tconsole.log(this.formatMessage('API', action));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * API response logging\n\t */\n\tstatic apiResponse(method: string, endpoint: string, success: boolean, data?: any): void {\n\t\tif (this.checkLoggingEnabled('API', 'log')) {\n\t\t\tconst status = success ? '✅ SUCCESS' : '❌ FAILED';\n\t\t\tconst action = `${method} ${endpoint} ${status}`;\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.log(this.formatMessage('API', action), data);\n\t\t\t} else {\n\t\t\t\tconsole.log(this.formatMessage('API', action));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Conversation flow tracking\n\t */\n\tstatic conversation(action: string, data?: any): void {\n\t\tif (this.checkLoggingEnabled('GuideAI', 'log')) {\n\t\t\tif (data !== undefined) {\n\t\t\t\tconsole.log(this.formatMessage('GuideAI', action), data);\n\t\t\t} else {\n\t\t\t\tconsole.log(this.formatMessage('GuideAI', action));\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport default Logger;\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Play = createLucideIcon(\"Play\", [\n [\"polygon\", { points: \"6 3 20 12 6 21 6 3\", key: \"1oa8hb\" }]\n]);\n\nexport { Play as default };\n//# sourceMappingURL=play.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Trophy = createLucideIcon(\"Trophy\", [\n [\"path\", { d: \"M6 9H4.5a2.5 2.5 0 0 1 0-5H6\", key: \"17hqa7\" }],\n [\"path\", { d: \"M18 9h1.5a2.5 2.5 0 0 0 0-5H18\", key: \"lmptdp\" }],\n [\"path\", { d: \"M4 22h16\", key: \"57wxv0\" }],\n [\"path\", { d: \"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22\", key: \"1nw9bq\" }],\n [\"path\", { d: \"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22\", key: \"1np0yb\" }],\n [\"path\", { d: \"M18 2H6v7a6 6 0 0 0 12 0V2Z\", key: \"u46fv3\" }]\n]);\n\nexport { Trophy as default };\n//# sourceMappingURL=trophy.js.map\n","import {\n\tparseArgs,\n\tcreateHoverEffect,\n\trunQueuedInteractionBoolean,\n\tToolInput,\n\twaitForElement,\n\tscrollToElement,\n} from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Highlight_Tool = {\n\ttype: 'function',\n\tname: 'highlight',\n\tdescription:\n\t\t\"Highlight specific elements on the page to guide the user's attention. Supports CSS selectors, XPath, and custom text-based selectors.\",\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Selector for the element to highlight. Supports CSS selectors, XPath, and custom text-based selectors in format 'text:cssSelector:textContent' for precise targeting.\",\n\t\t\t},\n\t\t\tinteractionTime: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'How long (ms) to keep the highlight on the element. Default is 1500ms.',\n\t\t\t\tminimum: 500,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\n// Highlight a single element with a visible box (no cursor movement, no click).\nexport const highlight = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments);\n\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for highlight');\n\t}\n\n\tconst selector: string = args.selector;\n\tconst interactionTime: number = args.interactionTime ?? 1500;\n\n\treturn runQueuedInteractionBoolean(async () => {\n\t\tconst element = await waitForElement(selector);\n\t\tif (!element) {\n\t\t\tLogger.error('GuideAI', `Element not found for selector in highlight: ${selector}`);\n\t\t\treturn false;\n\t\t}\n\n\t\tscrollToElement(element);\n\t\tconst rect = element.getBoundingClientRect();\n\t\t// Use the hover-style box (no cursor movement, no label).\n\t\tawait createHoverEffect(element, rect, null, interactionTime);\n\t\treturn true;\n\t});\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Map = createLucideIcon(\"Map\", [\n [\n \"path\",\n {\n d: \"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z\",\n key: \"169xi5\"\n }\n ],\n [\"path\", { d: \"M15 5.764v15\", key: \"1pn4in\" }],\n [\"path\", { d: \"M9 3.236v15\", key: \"1uimfh\" }]\n]);\n\nexport { Map as default };\n//# sourceMappingURL=map.js.map\n","import {\n\tparseArgs,\n\tfindElementBySelector,\n\tmoveCursorToElement,\n\tcreateHoverEffect,\n\tenqueueInteractionJob,\n\tHOVER_EFFECT_KEEP_ALIVE_TIME,\n\tToolInput,\n} from './elementInteractions';\nimport { performClick } from './clickElement';\nimport Logger from '../logger';\n\nexport const Hover_Then_Click_Tool = {\n\ttype: 'function',\n\tname: 'hoverThenClick',\n\tdescription:\n\t\t'Hover over each element with the hover effect, then click the last element (no click effect). Accepts one selector or an array of selectors.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tselector: {\n\t\t\t\toneOf: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Single selector (CSS, XPath, or text-based 'text:cssSelector:textContent').\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\titems: { type: 'string' },\n\t\t\t\t\t\tdescription: 'List of selectors to hover in sequence; the last is clicked.',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdescription:\n\t\t\t\t\t'Selector or array of selectors for the element(s) to hover then click the last.',\n\t\t\t},\n\t\t\thoverTime: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription:\n\t\t\t\t\t'Time in ms to keep the hover effect on each element before moving on. Default 1500.',\n\t\t\t\tminimum: 500,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: ['selector'],\n\t},\n};\n\nconst DELAY_BETWEEN_ELEMENTS_MS = 1000;\n\n/**\n * Hover over each element (with hover effect), then click the last element. Supports single selector or array.\n * Same behavior as legacy: cursor moves to each, hover effect runs, then last element is clicked (no click effect).\n */\nexport const hoverThenClick = async (out: ToolInput): Promise<boolean> => {\n\tconst args = await parseArgs(out.arguments ?? '{}');\n\tif (!args || !args.selector) {\n\t\tthrow new Error('No selector provided for hoverThenClick');\n\t}\n\n\tconst selector: string | string[] = args.selector;\n\tconst hoverTime: number | undefined = args.hoverTime ?? HOVER_EFFECT_KEEP_ALIVE_TIME;\n\tconst selectorArray = Array.isArray(selector) ? selector : [selector];\n\tif (selectorArray.length === 0) {\n\t\tthrow new Error('Selector array is empty');\n\t}\n\n\tLogger.info('GuideAI', 'Executing hoverThenClick with args:', args);\n\n\tenqueueInteractionJob(async () => {\n\t\tlet cursor: HTMLElement | null = null;\n\t\tlet lastElement: Element | null = null;\n\n\t\tfor (let i = 0; i < selectorArray.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tawait new Promise((r) => setTimeout(r, DELAY_BETWEEN_ELEMENTS_MS));\n\t\t\t}\n\n\t\t\tconst sel = selectorArray[i];\n\t\t\tconst element = findElementBySelector(sel);\n\t\t\tif (!element) {\n\t\t\t\tLogger.warn('GuideAI', `Element not found for selector: ${sel}. Skipping.`);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlastElement = element;\n\t\t\tcursor = await moveCursorToElement(element, cursor);\n\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\tawait createHoverEffect(element, rect, cursor, hoverTime);\n\t\t}\n\n\t\tif (lastElement) {\n\t\t\tconst clickDelay = hoverTime ?? HOVER_EFFECT_KEEP_ALIVE_TIME;\n\t\t\tawait new Promise((r) => setTimeout(r, clickDelay));\n\t\t\tconst finalRect = lastElement.getBoundingClientRect();\n\t\t\tif (cursor) {\n\t\t\t\tcursor.style.left = `${finalRect.left + finalRect.width / 2}px`;\n\t\t\t\tcursor.style.top = `${finalRect.top + finalRect.height / 2 - 10}px`;\n\t\t\t}\n\t\t\tawait performClick(lastElement, finalRect, false, cursor, 0);\n\t\t}\n\t});\n\n\treturn true;\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst LayoutGrid = createLucideIcon(\"LayoutGrid\", [\n [\"rect\", { width: \"7\", height: \"7\", x: \"3\", y: \"3\", rx: \"1\", key: \"1g98yp\" }],\n [\"rect\", { width: \"7\", height: \"7\", x: \"14\", y: \"3\", rx: \"1\", key: \"6d4xhi\" }],\n [\"rect\", { width: \"7\", height: \"7\", x: \"14\", y: \"14\", rx: \"1\", key: \"nxv5o0\" }],\n [\"rect\", { width: \"7\", height: \"7\", x: \"3\", y: \"14\", rx: \"1\", key: \"1bb6yr\" }]\n]);\n\nexport { LayoutGrid as default };\n//# sourceMappingURL=layout-grid.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Sparkles = createLucideIcon(\"Sparkles\", [\n [\n \"path\",\n {\n d: \"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z\",\n key: \"4pj2yx\"\n }\n ],\n [\"path\", { d: \"M20 3v4\", key: \"1olli1\" }],\n [\"path\", { d: \"M22 5h-4\", key: \"1gvqau\" }],\n [\"path\", { d: \"M4 17v2\", key: \"vumght\" }],\n [\"path\", { d: \"M5 18H3\", key: \"zchphs\" }]\n]);\n\nexport { Sparkles as default };\n//# sourceMappingURL=sparkles.js.map\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * Bridge from Realtime tool execution (no React) to the widget workflow UI.\n * GuideAI installs a stable delegate; TranscriptBox registers `runMarkWorkflowComplete` on a parent ref.\n */\n\nexport type MarkWorkflowCompleteResult = {\n\tsuccess: boolean;\n\tmessage?: string;\n\tcompletedWorkflowId?: string;\n\tnextWorkflowId?: string | null;\n};\n\nexport type MarkWorkflowCompleteFn = (workflowId?: string) => Promise<MarkWorkflowCompleteResult>;\n\nexport const WORKFLOW_UI_UNAVAILABLE_MESSAGE =\n\t'Workflow UI is not available (embed transcript not active).';\n\nexport const markWorkflowCompleteBridge: { current: MarkWorkflowCompleteFn | null } = {\n\tcurrent: null,\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Wrench = createLucideIcon(\"Wrench\", [\n [\n \"path\",\n {\n d: \"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z\",\n key: \"cbrjhi\"\n }\n ]\n]);\n\nexport { Wrench as default };\n//# sourceMappingURL=wrench.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Zap = createLucideIcon(\"Zap\", [\n [\n \"path\",\n {\n d: \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\",\n key: \"1xq2db\"\n }\n ]\n]);\n\nexport { Zap as default };\n//# sourceMappingURL=zap.js.map\n","/**\n * Workspace embed icon ids — keep in sync with guideaisite `src/lib/workspaceConfigIcons.tsx`.\n * Import icons individually so the bundle does not include all of lucide-react.\n */\nimport type { LucideIcon } from 'lucide-react';\nimport React from 'react';\nimport Sparkles from 'lucide-react/dist/esm/icons/sparkles.js';\nimport BookOpen from 'lucide-react/dist/esm/icons/book-open.js';\nimport Play from 'lucide-react/dist/esm/icons/play.js';\nimport Star from 'lucide-react/dist/esm/icons/star.js';\nimport Zap from 'lucide-react/dist/esm/icons/zap.js';\nimport Target from 'lucide-react/dist/esm/icons/target.js';\nimport Flag from 'lucide-react/dist/esm/icons/flag.js';\nimport Rocket from 'lucide-react/dist/esm/icons/rocket.js';\nimport Lightbulb from 'lucide-react/dist/esm/icons/lightbulb.js';\nimport Compass from 'lucide-react/dist/esm/icons/compass.js';\nimport Map from 'lucide-react/dist/esm/icons/map.js';\nimport Users from 'lucide-react/dist/esm/icons/users.js';\nimport Briefcase from 'lucide-react/dist/esm/icons/briefcase.js';\nimport Shield from 'lucide-react/dist/esm/icons/shield.js';\nimport Gift from 'lucide-react/dist/esm/icons/gift.js';\nimport Music from 'lucide-react/dist/esm/icons/music.js';\nimport Camera from 'lucide-react/dist/esm/icons/camera.js';\nimport Code from 'lucide-react/dist/esm/icons/code.js';\nimport Wrench from 'lucide-react/dist/esm/icons/wrench.js';\nimport Globe from 'lucide-react/dist/esm/icons/globe.js';\nimport Leaf from 'lucide-react/dist/esm/icons/leaf.js';\nimport Home from 'lucide-react/dist/esm/icons/home.js';\nimport Heart from 'lucide-react/dist/esm/icons/heart.js';\nimport Bell from 'lucide-react/dist/esm/icons/bell.js';\nimport Mail from 'lucide-react/dist/esm/icons/mail.js';\nimport Phone from 'lucide-react/dist/esm/icons/phone.js';\nimport Calendar from 'lucide-react/dist/esm/icons/calendar.js';\nimport Clock from 'lucide-react/dist/esm/icons/clock.js';\nimport Cloud from 'lucide-react/dist/esm/icons/cloud.js';\nimport Cpu from 'lucide-react/dist/esm/icons/cpu.js';\nimport Database from 'lucide-react/dist/esm/icons/database.js';\nimport FileText from 'lucide-react/dist/esm/icons/file-text.js';\nimport FolderOpen from 'lucide-react/dist/esm/icons/folder-open.js';\nimport Image from 'lucide-react/dist/esm/icons/image.js';\nimport Layers from 'lucide-react/dist/esm/icons/layers.js';\nimport LayoutGrid from 'lucide-react/dist/esm/icons/layout-grid.js';\nimport Lock from 'lucide-react/dist/esm/icons/lock.js';\nimport Search from 'lucide-react/dist/esm/icons/search.js';\nimport Trophy from 'lucide-react/dist/esm/icons/trophy.js';\nimport Video from 'lucide-react/dist/esm/icons/video.js';\n\nconst ICON_MAP = {\n\tspark: Sparkles,\n\tbook: BookOpen,\n\tplay: Play,\n\tstar: Star,\n\tzap: Zap,\n\ttarget: Target,\n\tflag: Flag,\n\trocket: Rocket,\n\tbulb: Lightbulb,\n\tcompass: Compass,\n\tmap: Map,\n\tusers: Users,\n\tbriefcase: Briefcase,\n\tshield: Shield,\n\tgift: Gift,\n\tmusic: Music,\n\tcamera: Camera,\n\tcode: Code,\n\twrench: Wrench,\n\tglobe: Globe,\n\tleaf: Leaf,\n\thome: Home,\n\theart: Heart,\n\tbell: Bell,\n\tmail: Mail,\n\tphone: Phone,\n\tcalendar: Calendar,\n\tclock: Clock,\n\tcloud: Cloud,\n\tcpu: Cpu,\n\tdatabase: Database,\n\tfile: FileText,\n\tfolder: FolderOpen,\n\timage: Image,\n\tlayers: Layers,\n\t'layout-grid': LayoutGrid,\n\tlock: Lock,\n\tsearch: Search,\n\ttrophy: Trophy,\n\tvideo: Video,\n} as const satisfies Record<string, LucideIcon>;\n\nexport type WorkspaceEmbedIconId = keyof typeof ICON_MAP;\n\nexport const WORKSPACE_EMBED_ICON_IDS = Object.keys(ICON_MAP) as WorkspaceEmbedIconId[];\n\nconst ICON_ID_SET = new Set<string>(WORKSPACE_EMBED_ICON_IDS);\n\nexport function isWorkspaceEmbedIconId(id: string): id is WorkspaceEmbedIconId {\n\treturn ICON_ID_SET.has(id);\n}\n\nexport const DEFAULT_WORKSPACE_EMBED_ICON: WorkspaceEmbedIconId = 'spark';\n\nexport function WorkspaceEmbedIcon({ iconId, className }: { iconId: string; className?: string }) {\n\tconst key = isWorkspaceEmbedIconId(iconId) ? iconId : DEFAULT_WORKSPACE_EMBED_ICON;\n\tconst Icon = ICON_MAP[key];\n\treturn <Icon className={className} size={24} strokeWidth={2} aria-hidden focusable=\"false\" />;\n}\n","/**\n * Tool execution registry.\n * Maps function names to handlers for built-in types and api_call.\n * No eval - only registered handlers or HTTP fetch for api_call.\n */\n\nimport Logger from '../logger';\nimport { highlight, Highlight_Tool } from './highlight';\nimport { hover, Hover_Tool } from './hover';\nimport { clickElement, Click_Tool } from './clickElement';\nimport { highlightThenClick, Highlight_Then_Click_Tool } from './highlightThenClick';\nimport { hoverThenClick, Hover_Then_Click_Tool } from './hoverThenClick';\nimport { navigateTo, Navigate_To_Tool } from './navigateTo';\nimport { back, Back_Tool } from './back';\nimport { refresh, Refresh_Tool } from './refresh';\nimport { fillField, Fill_Field_Tool } from './fillField';\nimport { fillForm, Fill_Form_Tool } from './fillForm';\nimport { goToAElmLink, Go_To_A_Elm_Link_Tool } from './goToAElmLink';\nimport { scroll, Scroll_Tool } from './scroll';\nimport { markWorkflowComplete, MarkWorkflowComplete_Tool } from './markWorkflowComplete';\nimport { docToForm, Doc_To_Form_Tool } from './docToForm';\n\nconst BUILT_IN_TOOLS = [\n\tHighlight_Tool,\n\tClick_Tool,\n\tHover_Tool,\n\tHighlight_Then_Click_Tool,\n\tHover_Then_Click_Tool,\n\tNavigate_To_Tool,\n\tScroll_Tool,\n\tBack_Tool,\n\tRefresh_Tool,\n\tGo_To_A_Elm_Link_Tool,\n\tFill_Field_Tool,\n\tFill_Form_Tool,\n\tMarkWorkflowComplete_Tool,\n\tDoc_To_Form_Tool,\n] as const;\n\n/** Ordered names of built-in tools; used by admin tool diagnostics when no tool config is available. */\nexport const BUILT_IN_TOOL_NAME_LIST: readonly string[] = BUILT_IN_TOOLS.map(\n\t(t) => (t as { name: string }).name\n).filter((n): n is string => typeof n === 'string' && n.length > 0);\n\nexport interface ToolWithConfig {\n\ttoolConfig: { type: string; name: string; description?: string; parameters?: object };\n\tfunctionConfig: { handlerType: string; url?: string };\n}\n\ninterface ToolDef {\n\tname: string;\n\tdescription: string;\n\tparameters: object;\n}\n\nfunction getBuiltInDefs(excludeNames?: Set<string>): ToolDef[] {\n\treturn BUILT_IN_TOOLS.map((t) => t as { name: string; description?: string; parameters?: object })\n\t\t.filter((t) => t.name && (!excludeNames || !excludeNames.has(t.name)))\n\t\t.map((t) => ({\n\t\t\tname: t.name,\n\t\t\tdescription: t.description || '',\n\t\t\tparameters: t.parameters || {},\n\t\t}));\n}\n\n/**\n * Tools for the data channel after initialize: server-enabled tools plus prop tools not returned by the server.\n * If `toolsFromResponse` is undefined (legacy API), same as `buildLocalToolsWithConfig` (all built-ins + props).\n */\nexport function buildDataChannelToolsFromInitialize(\n\ttoolsFromResponse: Array<{ toolConfig: object; functionConfig: object }> | undefined,\n\tpropTools?: ToolDef[]\n): ToolWithConfig[] {\n\tif (toolsFromResponse === undefined) {\n\t\treturn buildLocalToolsWithConfig(propTools);\n\t}\n\n\tconst serverTools: ToolWithConfig[] = toolsFromResponse.map((entry) => ({\n\t\ttoolConfig: entry.toolConfig as ToolWithConfig['toolConfig'],\n\t\tfunctionConfig: entry.functionConfig as ToolWithConfig['functionConfig'],\n\t}));\n\n\tconst serverNames = new Set(\n\t\tserverTools\n\t\t\t.map((t) => (t.toolConfig as { name?: string }).name)\n\t\t\t.filter((n): n is string => typeof n === 'string' && n.length > 0)\n\t);\n\n\tconst props = (propTools ?? []).filter((pt) => pt?.name);\n\tconst propOnly: ToolWithConfig[] = props\n\t\t.filter((p) => !serverNames.has(p.name))\n\t\t.map((t) => ({\n\t\t\ttoolConfig: { type: 'function' as const, ...t },\n\t\t\tfunctionConfig: { handlerType: t.name },\n\t\t}));\n\n\treturn [...serverTools, ...propOnly];\n}\n\n/**\n * Payload for session.update tools. Legacy (no `tools` in initialize): raw built-in definitions.\n * Otherwise: exactly `toolsConfig` as provided (full catalog from `buildLocalToolsWithConfig`, or server allowlist + props).\n */\nexport function resolveSessionTools(\n\tserverToolsReceived: boolean,\n\ttoolsConfig: ToolWithConfig[]\n): object[] {\n\tif (!serverToolsReceived) {\n\t\treturn [...BUILT_IN_TOOLS];\n\t}\n\tif (toolsConfig.length === 0) {\n\t\treturn [];\n\t}\n\treturn toolsConfig.map((t) => t.toolConfig);\n}\n\n/**\n * Combine prop tools with built-in tools as ToolWithConfig[] for DataChannelManager.\n * Built-in tools whose names collide with prop tools are excluded.\n */\nexport function buildLocalToolsWithConfig(propTools?: ToolDef[]): ToolWithConfig[] {\n\tconst props = (propTools || []).filter((pt) => pt?.name);\n\tconst allDefs = [...props, ...getBuiltInDefs(new Set(props.map((t) => t.name)))];\n\treturn allDefs.map((t) => ({\n\t\ttoolConfig: { type: 'function', ...t },\n\t\tfunctionConfig: { handlerType: t.name },\n\t}));\n}\n\n/**\n * Prop tools declared by the host that are not yet on the server (for POST /tool/register).\n * Built-in tools are not auto-registered; they must exist and be published via admin.\n */\nexport function getMissingToolsForRegistration(\n\tpropTools: ToolDef[] | undefined,\n\tserverToolNames: Set<string>\n): { missingPropTools: ToolDef[] } {\n\tconst props = (propTools || []).filter((pt) => pt?.name);\n\treturn {\n\t\tmissingPropTools: props.filter((t) => !serverToolNames.has(t.name)),\n\t};\n}\n\n/**\n * Execute a tool by name using server-provided tools config and callbacks.\n * Returns the result for function_call_output.\n */\nexport async function executeTool(\n\tname: string,\n\targs: string,\n\ttoolsConfig: ToolWithConfig[],\n\tpropHandlers?: Record<string, (args: Record<string, unknown>) => Promise<unknown>>\n): Promise<unknown> {\n\tlet parsedArgs: Record<string, unknown>;\n\ttry {\n\t\tparsedArgs = args ? JSON.parse(args) : {};\n\t} catch {\n\t\tparsedArgs = { linkText: String(args) };\n\t}\n\n\t// Prop handlers take precedence (custom handler, execute only receives args)\n\tif (propHandlers && typeof propHandlers[name] === 'function') {\n\t\ttry {\n\t\t\treturn await propHandlers[name](parsedArgs);\n\t\t} catch (err) {\n\t\t\tLogger.error('ToolCall', `Prop tool \"${name}\" failed`, err);\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t// Find tool config by name\n\tconst toolDef = toolsConfig.find((t) => (t.toolConfig as { name?: string }).name === name);\n\tconst handlerType = toolDef?.functionConfig?.handlerType;\n\tconst url = toolDef?.functionConfig?.url;\n\n\tif (handlerType === 'api_call' && url) {\n\t\ttry {\n\t\t\tconst res = await fetch(url, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\tbody: JSON.stringify(parsedArgs),\n\t\t\t});\n\t\t\tif (!res.ok) {\n\t\t\t\tLogger.error('ToolCall', `api_call failed: ${res.status}`, await res.text());\n\t\t\t\tthrow new Error(`api_call failed: ${res.status}`);\n\t\t\t}\n\t\t\treturn res.json().catch(() => ({}));\n\t\t} catch (err) {\n\t\t\tLogger.error('ToolCall', 'api_call request failed', err);\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t// Built-in handlers - wrap in try-catch so errors propagate to dataChannel\n\ttry {\n\t\tswitch (name) {\n\t\t\tcase 'highlight':\n\t\t\t\treturn await highlight({ name, arguments: args });\n\t\t\tcase 'hover':\n\t\t\t\treturn await hover({ name, arguments: args });\n\t\t\tcase 'click':\n\t\t\t\treturn await clickElement({ name, arguments: args });\n\t\t\tcase 'highlightThenClick':\n\t\t\t\treturn await highlightThenClick({ name, arguments: args });\n\t\t\tcase 'hoverThenClick':\n\t\t\t\treturn await hoverThenClick({ name, arguments: args });\n\t\t\tcase 'navigateTo': {\n\t\t\t\treturn await navigateTo({ name, arguments: args });\n\t\t\t}\n\t\t\tcase 'scroll':\n\t\t\t\treturn await scroll({ name, arguments: args });\n\t\t\tcase 'back':\n\t\t\t\treturn await back({ name, arguments: args });\n\t\t\tcase 'refresh':\n\t\t\t\treturn await refresh({ name, arguments: args });\n\t\t\tcase 'goToAElmLink':\n\t\t\t\treturn await goToAElmLink({ name, arguments: args });\n\t\t\tcase 'fillField': {\n\t\t\t\treturn await fillField({ name, arguments: args });\n\t\t\t}\n\t\t\tcase 'fillForm': {\n\t\t\t\treturn await fillForm({ name, arguments: args });\n\t\t\t}\n\t\t\tcase 'markWorkflowComplete':\n\t\t\t\treturn await markWorkflowComplete({ name, arguments: args });\n\t\t\tcase 'docToForm':\n\t\t\t\treturn await docToForm({ name, arguments: args });\n\t\t\tdefault:\n\t\t\t\tLogger.warn('ToolCall', 'Unknown tool, skipping', name);\n\t\t\t\treturn true;\n\t\t}\n\t} catch (err) {\n\t\tLogger.error('ToolCall', `Tool \"${name}\" failed`, err);\n\t\tthrow err;\n\t}\n}\n","/**\n * In-memory store for widget-level state that tools and utility modules need\n * without being threaded through component props / WebRTC callbacks.\n */\n\nimport type { GuideAIEnvironment } from '../types/GuideAI.types';\n\nlet activeToken: string | null = null;\nlet activeEnvironment: GuideAIEnvironment = 'production';\n\nexport function setWidgetBearerToken(token: string | null): void {\n\tactiveToken = token?.trim() || null;\n}\n\nexport function getWidgetBearerToken(): string | null {\n\treturn activeToken;\n}\n\nexport function setWidgetEnvironment(env: GuideAIEnvironment): void {\n\tactiveEnvironment = env;\n}\n\nexport function getWidgetEnvironment(): GuideAIEnvironment {\n\treturn activeEnvironment;\n}\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Lock = createLucideIcon(\"Lock\", [\n [\"rect\", { width: \"18\", height: \"11\", x: \"3\", y: \"11\", rx: \"2\", ry: \"2\", key: \"1w4ew1\" }],\n [\"path\", { d: \"M7 11V7a5 5 0 0 1 10 0v4\", key: \"fwvmzm\" }]\n]);\n\nexport { Lock as default };\n//# sourceMappingURL=lock.js.map\n","import type { ToolInput } from './elementInteractions';\nimport Logger from '../logger';\nimport {\n\tmarkWorkflowCompleteBridge,\n\tWORKFLOW_UI_UNAVAILABLE_MESSAGE,\n\ttype MarkWorkflowCompleteResult,\n} from './workflowToolBridge';\n\nexport const MarkWorkflowComplete_Tool = {\n\ttype: 'function',\n\tname: 'markWorkflowComplete',\n\tdescription:\n\t\t'Call when the user has finished the current workflow step. Marks that workflow complete in the checklist (when enabled) and moves focus to the next workflow in the workspace list so you can continue with the next segment.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tworkflowId: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription:\n\t\t\t\t\t'Published workflow id from the linked workspace list (same ids as in session instructions). Omit to use the workflow currently in focus in the transcript UI.',\n\t\t\t},\n\t\t},\n\t\trequired: [],\n\t},\n};\n\nexport async function markWorkflowComplete(out: ToolInput): Promise<MarkWorkflowCompleteResult> {\n\tlet workflowId: string | undefined;\n\ttry {\n\t\tconst raw = out.arguments?.trim() ? JSON.parse(out.arguments) : {};\n\t\tif (raw && typeof raw.workflowId === 'string' && raw.workflowId.trim()) {\n\t\t\tworkflowId = raw.workflowId.trim();\n\t\t}\n\t} catch {\n\t\tLogger.warn('ToolCall', 'markWorkflowComplete: invalid JSON arguments', out.arguments);\n\t}\n\n\tconst fn = markWorkflowCompleteBridge.current;\n\tif (!fn) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\tmessage: WORKFLOW_UI_UNAVAILABLE_MESSAGE,\n\t\t};\n\t}\n\n\treturn fn(workflowId);\n}\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Clock = createLucideIcon(\"Clock\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"polyline\", { points: \"12 6 12 12 16 14\", key: \"68esgv\" }]\n]);\n\nexport { Clock as default };\n//# sourceMappingURL=clock.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Camera = createLucideIcon(\"Camera\", [\n [\n \"path\",\n {\n d: \"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z\",\n key: \"1tc9qg\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"13\", r: \"3\", key: \"1vg3eu\" }]\n]);\n\nexport { Camera as default };\n//# sourceMappingURL=camera.js.map\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport { fillFieldInDom } from './fillField';\nimport Logger from '../logger';\n\nexport const Fill_Form_Tool = {\n\ttype: 'function',\n\tname: 'fillForm',\n\tdescription:\n\t\t'Fill many form fields in one call. Each entry behaves like fillField (fieldName and/or selector, value). Continues after per-field failures; returns { success, filledCount, errors }.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfields: {\n\t\t\t\ttype: 'array',\n\t\t\t\tdescription: 'Ordered list of fields to fill.',\n\t\t\t\tminItems: 1,\n\t\t\t\tmaxItems: 200,\n\t\t\t\titems: {\n\t\t\t\t\ttype: 'object',\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tfieldName: { type: 'string' },\n\t\t\t\t\t\tselector: { type: 'string' },\n\t\t\t\t\t\tvalue: { type: 'string' },\n\t\t\t\t\t\tdelay: { type: 'integer', minimum: 0, maximum: 10000 },\n\t\t\t\t\t},\n\t\t\t\t\trequired: ['value'],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trequired: ['fields'],\n\t},\n};\n\nexport type FillFormResult = {\n\tsuccess: boolean;\n\tfilledCount: number;\n\terrors: { index: number; fieldName?: string; selector?: string; error: string }[];\n};\n\nexport const fillForm = async (out: ToolInput): Promise<FillFormResult> => {\n\tconst args = await parseArgs(out.arguments);\n\tconst fields: Array<{\n\t\tfieldName?: string;\n\t\tselector?: string;\n\t\tvalue?: unknown;\n\t\tdelay?: number;\n\t}> = Array.isArray(args?.fields) ? args.fields : [];\n\n\tif (fields.length === 0) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\tfilledCount: 0,\n\t\t\terrors: [{ index: -1, error: '`fields` must be a non-empty array' }],\n\t\t};\n\t}\n\n\treturn new Promise<FillFormResult>((resolve) => {\n\t\tenqueueInteractionJob(async () => {\n\t\t\tconst errors: FillFormResult['errors'] = [];\n\t\t\tlet filledCount = 0;\n\n\t\t\tfor (let i = 0; i < fields.length; i++) {\n\t\t\t\tconst { fieldName, selector, value, delay = 0 } = fields[i] ?? {};\n\t\t\t\tif (value == null) {\n\t\t\t\t\terrors.push({ index: i, fieldName, selector, error: 'value is required' });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst r = await fillFieldInDom(fieldName, selector, String(value), delay);\n\t\t\t\tif (r.success) filledCount++;\n\t\t\t\telse errors.push({ index: i, fieldName, selector, error: r.error });\n\t\t\t}\n\n\t\t\tconst result = { success: errors.length === 0, filledCount, errors };\n\t\t\tLogger.info('ToolCall', 'fillForm complete', result);\n\t\t\tresolve(result);\n\t\t});\n\t});\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Target = createLucideIcon(\"Target\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"6\", key: \"1vlfrh\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"2\", key: \"1c9p78\" }]\n]);\n\nexport { Target as default };\n//# sourceMappingURL=target.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Compass = createLucideIcon(\"Compass\", [\n [\n \"path\",\n {\n d: \"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z\",\n key: \"9ktpf1\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]\n]);\n\nexport { Compass as default };\n//# sourceMappingURL=compass.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Cloud = createLucideIcon(\"Cloud\", [\n [\"path\", { d: \"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z\", key: \"p7xjir\" }]\n]);\n\nexport { Cloud as default };\n//# sourceMappingURL=cloud.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Search = createLucideIcon(\"Search\", [\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n [\"path\", { d: \"m21 21-4.3-4.3\", key: \"1qie3q\" }]\n]);\n\nexport { Search as default };\n//# sourceMappingURL=search.js.map\n","import { enqueueInteractionJob, parseArgs, ToolInput } from './elementInteractions';\nimport Logger from '../logger';\n\nexport const Back_Tool = {\n\ttype: 'function',\n\tname: 'back',\n\tdescription:\n\t\t'Go back one step in the browser history (same as the user clicking the browser back button). Use to return to the previous page.',\n\tparameters: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tdelay: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'Delay in milliseconds before going back. Default is 0ms. Maximum is 10000ms.',\n\t\t\t\tminimum: 0,\n\t\t\t\tmaximum: 10000,\n\t\t\t},\n\t\t},\n\t\trequired: [],\n\t},\n};\n\nexport const back = async (out: ToolInput): Promise<boolean> => {\n\tconst trimmed = (out.arguments ?? '').trim();\n\tconst args = trimmed ? await parseArgs(out.arguments!) : {};\n\tconst delay: number = (args.delay as number) ?? 0;\n\n\tenqueueInteractionJob(async () => {\n\t\tif (delay > 0) {\n\t\t\tawait new Promise((resolve) => setTimeout(resolve, delay));\n\t\t}\n\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.sessionStorage) {\n\t\t\t\twindow.sessionStorage.setItem('guideai:lastNavigateTs', Date.now().toString());\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tLogger.warn('ToolCall', 'error while setting lastNavigateTs in sessionStorage:', err);\n\t\t}\n\n\t\twindow.history.back();\n\t});\n\n\treturn true;\n};\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Flag = createLucideIcon(\"Flag\", [\n [\"path\", { d: \"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z\", key: \"i9b6wo\" }],\n [\"line\", { x1: \"4\", x2: \"4\", y1: \"22\", y2: \"15\", key: \"1cm3nv\" }]\n]);\n\nexport { Flag as default };\n//# sourceMappingURL=flag.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses, toKebabCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => {\n return createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props\n })\n );\n Component.displayName = `${iconName}`;\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Bell = createLucideIcon(\"Bell\", [\n [\"path\", { d: \"M10.268 21a2 2 0 0 0 3.464 0\", key: \"vwvbt9\" }],\n [\n \"path\",\n {\n d: \"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\",\n key: \"11g9vi\"\n }\n ]\n]);\n\nexport { Bell as default };\n//# sourceMappingURL=bell.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Image = createLucideIcon(\"Image\", [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", ry: \"2\", key: \"1m3agn\" }],\n [\"circle\", { cx: \"9\", cy: \"9\", r: \"2\", key: \"af1f0g\" }],\n [\"path\", { d: \"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\", key: \"1xmnt7\" }]\n]);\n\nexport { Image as default };\n//# sourceMappingURL=image.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Rocket = createLucideIcon(\"Rocket\", [\n [\n \"path\",\n {\n d: \"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n key: \"m3kijz\"\n }\n ],\n [\n \"path\",\n {\n d: \"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\",\n key: \"1fmvmk\"\n }\n ],\n [\"path\", { d: \"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\", key: \"1f8sc4\" }],\n [\"path\", { d: \"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\", key: \"qeys4\" }]\n]);\n\nexport { Rocket as default };\n//# sourceMappingURL=rocket.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Phone = createLucideIcon(\"Phone\", [\n [\n \"path\",\n {\n d: \"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\",\n key: \"foiqr5\"\n }\n ]\n]);\n\nexport { Phone as default };\n//# sourceMappingURL=phone.js.map\n","/**\n * @license lucide-react v0.469.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst Cpu = createLucideIcon(\"Cpu\", [\n [\"rect\", { width: \"16\", height: \"16\", x: \"4\", y: \"4\", rx: \"2\", key: \"14l7u7\" }],\n [\"rect\", { width: \"6\", height: \"6\", x: \"9\", y: \"9\", rx: \"1\", key: \"5aljv4\" }],\n [\"path\", { d: \"M15 2v2\", key: \"13l42r\" }],\n [\"path\", { d: \"M15 20v2\", key: \"15mkzm\" }],\n [\"path\", { d: \"M2 15h2\", key: \"1gxd5l\" }],\n [\"path\", { d: \"M2 9h2\", key: \"1bbxkp\" }],\n [\"path\", { d: \"M20 15h2\", key: \"19e6y8\" }],\n [\"path\", { d: \"M20 9h2\", key: \"19tzq7\" }],\n [\"path\", { d: \"M9 2v2\", key: \"165o2o\" }],\n [\"path\", { d: \"M9 20v2\", key: \"i2bqo8\" }]\n]);\n\nexport { Cpu as default };\n//# sourceMappingURL=cpu.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["toolsConfig","Layers","d","key","work","Promise","resolve","settled","finish","value","enqueueInteractionJob","error","isElementVisible","element","isConnected","el","HTMLElement","hidden","inert","getAttribute","style","window","getComputedStyle","display","visibility","contentVisibility","opacity","parseFloat","Number","isFinite","parentElement","rect","getBoundingClientRect","width","height","getClientRects","length","getEffectiveZIndex","zIndex","isPositioned","position","isFlexItem","includes","parseInt","scrollToElement","options","scrollIntoView","behavior","block","inline","HOVER_EFFECT_KEEP_ALIVE_TIME","getLastNavigateTimestamp","sessionStorage","raw","getItem","parsed","isNaN","waitForElement","selector","timeout","interval","findElementBySelector","lastNavigate","now","Date","deadline","setTimeout","createHoverEffect","initialRect","cursorElement","duration","cursorZIndex","currentRect","hoverEffectContainer","document","createElement","cssText","left","top","setAttribute","body","appendChild","mouseEnterEvent","MouseEvent","view","bubbles","cancelable","mouseOverEvent","dispatchEvent","trackingInterval","originalBoxShadow","boxShadow","originalTransition","transition","originalBackground","background","setInterval","newRect","Math","abs","clearInterval","remove","parseCustomSelector","startsWith","parts","split","type","cssSelector","textContent","slice","join","originalSelector","findElementBySelectorStrict","elements","querySelectorAll","targetText","trim","i","closest","result","evaluate","XPathResult","ORDERED_NODE_SNAPSHOT_TYPE","snapshotLength","node","snapshotItem","Element","matches","match","elementTypes","elementType","newSelector","replace","newElement","textSuffix","moveCursorToElement","id","innerHTML","viewportWidth","innerWidth","viewportHeight","innerHeight","offsetHeight","animation","interactionQueue","isProcessingQueue","pendingCursorRemovalId","clearScheduledCursorRemoval","clearTimeout","job","push","shift","getElementById","parseArgs","argsToUse","JSON","parse","err","Fill_Field_Tool","name","description","parameters","properties","fieldName","delay","minimum","maximum","required","FILLABLE_TAGS","normalize","text","toLowerCase","dispatchEvents","Event","setNativeValue","prop","tag","tagName","proto","HTMLSelectElement","prototype","HTMLTextAreaElement","HTMLInputElement","descriptor","Object","getOwnPropertyDescriptor","set","call","isTextLike","isContentEditable","isCheckboxOrRadio","findFieldByNameInner","textLikeOnly","target","allFields","Array","from","labels","isValid","exact","s","partial","label","forAttr","nested","querySelector","row","candidates","after","find","c","Boolean","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","field","allowIdPartial","td","prevTd","previousElementSibling","sibling","childNodes","filter","n","nodeType","TEXT_NODE","map","findFieldByName","fillElement","focus","select","option","o","input","shouldCheck","normalized","truthy","Set","falsy","elValue","has","checked","click","warn","fillFieldInDom","r","success","fillField","out","arguments","args","runQueuedInteractionBoolean","String","STORAGE_KEYS","USER_UUID","SESSION_ID","CONVERSATION","HAS_INTERACTED","IS_MUTED","ASSISTANT_PLAYBACK_MUTED","LOGGER_ENABLED","AUDIO_CONFIG","MIC_PRESET","DEBUG_MORE_MENU","PLAYBACK_LOCK_DEBUG_OVERLAY","WORKSPACE_DATA_SOURCE","emitStorageWrite","CustomEvent","detail","safeReadLocal","localStorage","safeWriteLocal","setItem","safeRemoveLocal","removeItem","writeMirroredLocal","emitOnClear","isLocalStorageAvailable","testKey","_e","getUserUUID","existing","uuid","random","toString","getSessionId","setSessionId","sessionId","getHasInteracted","setHasInteracted","getIsMuted","setIsMuted","getAssistantPlaybackMuted","setAssistantPlaybackMuted","getLoggerEnabled","setLoggerEnabled","getAudioConfig","setAudioConfig","stringify","getMicPreset","setMicPreset","preset","getDebugMoreMenuEnabled","setDebugMoreMenuEnabled","enabled","getPlaybackLockDebugOverlayVisible","setPlaybackLockDebugOverlayVisible","visible","getWorkspaceDataSource","setWorkspaceDataSource","source","TRANSCRIPT_DRAWER_WIDTH_PX","TRANSCRIPT_DRAWER_WIDTH_MIN_PX","TRANSCRIPT_DRAWER_WIDTH_MAX_PX","transcriptDrawerPrefStorageKey","widgetKey","transcriptDrawerWidthStorageKey","clampDrawerWidthPx","round","min","max","getTranscriptDrawerWidthPref","setTranscriptDrawerWidthPref","widthPx","getTranscriptPanelDockedPref","setTranscriptPanelDockedPref","docked","lastWorkspaceSlugStorageKey","getLastWorkspaceSlugPref","trimmed","setLastWorkspaceSlugPref","slug","BookOpen","Globe","cx","cy","Video","x","y","rx","FileText","Highlight_Then_Click_Tool","oneOf","items","highlightThenClick","Error","selectorArray","isArray","info","cursor","sel","performClick","Database","ry","Leaf","Star","params","apiBase","workspacesFilter","authorizationBearer","extensionContext","base","url","undefined","workspaces","fetch","method","headers","getApiHeaders","res","ok","json","status","w","mapWidgetWorkspaceRow","PACKAGE_VERSION","version","message","Authorization","WIDGET_EXTENSION_HEADER","desc","iconRaw","icon","isWorkspaceEmbedIconId","DEFAULT_WORKSPACE_EMBED_ICON","wfRaw","workflows","wr","wid","wl","rollupWorkflows","workflowChecklistEnabled","workflowConfettiEnabled","InitializeUnauthorizedError","initializeWebRTC","endpoint","payload","requestBody","sdp","user","conversationId","workspace","sw","sessionWorkflowId","response","catch","errorText","data","answerSdp","tools","contextKey","greeting","transcriptionModel","registerTools","propTools","logMessage","messageData","_conversationKey","environment","requestData","content","sender","session","logdata","apiCall","getApiBaseUrl","getWidgetBearerToken","apiResponse","statusText","contentLength","Hover_Tool","interactionTime","hover","Gift","Refresh_Tool","refresh","location","reload","Briefcase","Music","Calendar","Shield","Click_Tool","withEffect","Z_INDEX_DETECTION_OFFSET","Z_INDEX_DETECTTION_DELAY","elementIsVisible","checkVisibility","bottom","documentElement","clientHeight","right","clientWidth","clickableElements","clickableElement","clickX","clickY","clickEffectContainer","j","clickRipple","clickDot","clickEvent","elementsFromPoint","highestZ","reduce","updateCursorZIndex","e","clickElement","goToAElmLinkImpl","linkText","targetSpan","allSpans","span","linkElement","relativeUrl","fullUrl","href","Go_To_A_Elm_Link_Tool","goToAElmLink","Code","points","FolderOpen","Heart","Lightbulb","Users","Mail","DEFAULT_PROMPT","GUIDE_AI_API_BASE_PROD","GUIDE_AI_API_BASE_DEV","GUIDE_AI_API_BASE_LOCAL","GUIDE_AI_API_BASE","OPENAI_REALTIME_BASE","UI_LAYOUT","micButtonSize","toggleAboveMicGap","stackedButtonGap","horizontalEdgeOffset","defaultBottom","defaultHorizontalOffset","transcriptFloatEdgeInset","asScrollLogical","v","fallback","Scroll_Tool","enum","scroll","listener","docExtractionProgressListener","docExtractionInFlight","Doc_To_Form_Tool","prompt","acceptedTypes","MAX_INLINE_UPLOAD_BYTES","TOOL_OUTPUT_TEXT_MAX","DOC_TO_FORM_GEMINI_MODEL","DOC_TO_FORM_ASSISTANT_INSTRUCTION","GEMINI_EXTRACT_PROMPT","extractDocumentWithGeminiApi","file","extraInstructions","size","getWidgetEnvironment","arrayBuffer","buf","buffer","bytes","Uint8Array","binary","byteLength","fromCharCode","btoa","arrayBufferToBase64","mimeType","fileName","pdf","png","jpg","jpeg","gif","webp","bmp","svg","tif","tiff","heic","heif","avif","ico","txt","md","csv","html","xml","doc","docx","pop","mimeFromFileName","model","inlineFiles","runDocToFormWithFile","onStart","extractionSucceeded","extracted","truncated","extractedText","instructionForAssistant","onEnd","docToForm","pickSingleFileWithPrompt","l","Symbol","for","p","q","t","u","z","iterator","B","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","C","assign","D","E","a","b","this","props","context","refs","updater","F","G","isReactComponent","setState","forceUpdate","H","constructor","isPureReactComponent","I","J","hasOwnProperty","K","current","L","ref","__self","__source","M","k","h","g","children","f","m","defaultProps","$$typeof","_owner","O","P","Q","escape","R","N","A","next","done","keys","S","T","_status","_result","then","default","U","V","W","ReactCurrentDispatcher","ReactCurrentBatchConfig","ReactCurrentOwner","X","exports","Children","forEach","apply","count","toArray","only","Component","Fragment","Profiler","PureComponent","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","act","cloneElement","createContext","_currentValue","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","_context","createFactory","bind","createRef","forwardRef","render","isValidElement","lazy","_payload","_init","memo","compare","startTransition","unstable_act","useCallback","useContext","useDebugValue","useDeferredValue","useEffect","useId","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useSyncExternalStore","useTransition","Navigate_To_Tool","navigateTo","link","accept","dismissPendingDocUploadPrompt","root","className","state","pending","addEventListener","files","once","House","LEVELS","LOGGER_UI_COMPONENTS","ON_BY_DEFAULT","DataChannel","LocalStorageHelper","WebRTCConnection","logging_enabled","fromEntries","manualLoggingEnabled","formatMessage","component","action","checkLoggingEnabled","requestedLevel","isManuallyEnabled","currentIndex","indexOf","shouldLog","init","win","GuideAI","logger","Logger","console","log","enable","disable","setComponentEnabled","getStatus","manualEnabled","components","disableAllComponents","enableAllComponents","conversation","Play","Trophy","Highlight_Tool","highlight","Map","Hover_Then_Click_Tool","hoverTime","hoverThenClick","lastElement","finalRect","LayoutGrid","Sparkles","module","WORKFLOW_UI_UNAVAILABLE_MESSAGE","markWorkflowCompleteBridge","Wrench","Zap","iconId","Icon","ICON_MAP","strokeWidth","focusable","spark","book","play","star","zap","flag","rocket","bulb","compass","users","briefcase","shield","gift","music","camera","code","wrench","globe","leaf","home","heart","bell","mail","phone","calendar","clock","cloud","cpu","database","folder","image","layers","lock","search","trophy","video","WORKSPACE_EMBED_ICON_IDS","ICON_ID_SET","toolsFromResponse","buildLocalToolsWithConfig","serverTools","entry","toolConfig","functionConfig","serverNames","propOnly","pt","handlerType","serverToolsReceived","BUILT_IN_TOOLS","serverToolNames","missingPropTools","propHandlers","parsedArgs","toolDef","back","fillForm","markWorkflowComplete","Back_Tool","Fill_Form_Tool","MarkWorkflowComplete_Tool","excludeNames","BUILT_IN_TOOL_NAME_LIST","token","activeToken","env","activeEnvironment","Lock","workflowId","fn","Clock","Camera","fields","minItems","maxItems","filledCount","errors","index","Target","Compass","Cloud","Search","history","Flag","x1","x2","y1","y2","mergeClasses","classes","array","defaultAttributes","xmlns","viewBox","fill","stroke","strokeLinecap","strokeLinejoin","color","absoluteStrokeWidth","iconNode","rest","attrs","createLucideIcon","iconName","string","displayName","Bell","Image","Rocket","Phone","Cpu","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","defineProperty","enumerable","get","obj","toStringTag","__GUIDEAI_PLAYWRIGHT__","executeTool"],"ignoreList":[],"sourceRoot":""}