import { p as promiseResolve, B as BUILD, c as consoleDevInfo, H, w as win, N as NAMESPACE, g as globalScripts, b as bootstrapLazy } from './index-BNpVu1WU.js';
export { s as setNonce } from './index-BNpVu1WU.js';

/*
 Stencil Client Patch Browser v4.41.1 | MIT Licensed | https://stenciljs.com
 */

var patchBrowser = () => {
  if (BUILD.isDev && !BUILD.isTesting) {
    consoleDevInfo("Running in development mode.");
  }
  if (BUILD.cloneNodeFix) {
    patchCloneNodeFix(H.prototype);
  }
  const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find(
    (s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
  ) : null;
  const importMeta = import.meta.url;
  const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
  if (importMeta !== "") {
    opts.resourcesUrl = new URL(".", importMeta).href;
  }
  return promiseResolve(opts);
};
var patchCloneNodeFix = (HTMLElementPrototype) => {
  const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
  HTMLElementPrototype.cloneNode = function(deep) {
    if (this.nodeName === "TEMPLATE") {
      return nativeCloneNodeFn.call(this, deep);
    }
    const clonedNode = nativeCloneNodeFn.call(this, false);
    const srcChildNodes = this.childNodes;
    if (deep) {
      for (let i = 0; i < srcChildNodes.length; i++) {
        if (srcChildNodes[i].nodeType !== 2) {
          clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
        }
      }
    }
    return clonedNode;
  };
};

patchBrowser().then(async (options) => {
  await globalScripts();
  return bootstrapLazy(JSON.parse("[[\"ai12z-knowledge-box\",[[257,\"ai12z-knowledge-box\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[1537,\"config-id\"],\"question\":[1537],\"socket\":[1032],\"isLoading\":[1028,\"is-loading\"],\"questionId\":[32],\"isInitialized\":[32],\"kbSettings\":[32],\"searchResults\":[32],\"items\":[32],\"error\":[32],\"domId\":[32],\"surveyDomId\":[32],\"buttons\":[32],\"currentStreamingText\":[32],\"isStreaming\":[32],\"finalResponse\":[32],\"scriptArray\":[32],\"showButton\":[32],\"welcomeReady\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},null,{\"question\":[{\"watchPropHandler\":0}],\"domId\":[{\"watchStateHandler\":0}]}]]],[\"dynamic-form\",[[0,\"dynamic-form\",{\"form\":[8],\"formSettings\":[1032,\"form-settings\"],\"formsettings\":[8],\"theme\":[8]}]]],[\"ai12z-spinner\",[[2,\"ai12z-spinner\",{\"class\":[1]}]]],[\"item-list\",[[0,\"item-list\",{\"inputType\":[1,\"input-type\"],\"carouselType\":[1,\"carousel-type\"],\"customTemplate\":[16],\"customSource\":[8,\"custom-source\"],\"llm\":[16],\"customStyles\":[1,\"custom-styles\"],\"customScripts\":[1,\"custom-scripts\"],\"isExpanded\":[4,\"is-expanded\"],\"currentPage\":[32],\"htmlTemplate\":[32],\"currentIndex\":[32],\"formSettings\":[32],\"itemsPerPage\":[32],\"emptyMessage\":[32],\"buttonText\":[32],\"panelTemplate\":[32],\"panelIndex\":[32],\"panelName\":[32],\"items\":[32],\"theme\":[32],\"selectByIndex\":[64],\"selectByName\":[64]}]]],[\"ai12z-container\",[[1,\"ai12z-container\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"instanceId\":[513,\"instance-id\"],\"parameters\":[513],\"renderType\":[1537,\"render-type\"],\"contentTemplate\":[513,\"content-template\"],\"isLoading\":[32],\"error\":[32],\"contentText\":[32],\"htmlWidgetMarkup\":[32],\"domId\":[32]},null,{\"parameters\":[{\"onParametersChanged\":0}],\"contentTemplate\":[{\"onContentTemplateChanged\":0}]}]]],[\"ai12z-form\",[[1,\"ai12z-form\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"keyName\":[513,\"key-name\"],\"isLoading\":[32],\"error\":[32],\"isReady\":[32],\"honeypotValue\":[32],\"loadDynamicForm\":[64]},null,{\"keyName\":[{\"watchLoadProps\":0}]}]]],[\"ai12z-chat-message\",[[1,\"ai12z-chat-message\",{\"text\":[1],\"streaming\":[4],\"kbSettings\":[8,\"kb-settings\"],\"showButton\":[4,\"show-button\"],\"isExpanded\":[32],\"isCollapsing\":[32],\"canExpand\":[32]},[[4,\"initializeScripts\",\"handleInitializeScripts\"]],{\"text\":[{\"onTextChange\":0}]}]]],[\"ai12z-category_2\",[[0,\"ai12z-category\",{\"categoryList\":[520,\"category-list\"],\"linkTarget\":[513,\"link-target\"]},[[4,\"clearResults\",\"clearResultsHandler\"]]],[0,\"audio-recorder\",{\"componentType\":[1,\"component-type\"],\"dataKey\":[32],\"dataMode\":[32],\"isRecording\":[32],\"isProcessing\":[32],\"time\":[32],\"transcript\":[32],\"fullTranscript\":[32],\"isSpeechRecognitionSupported\":[32],\"userCountry\":[32]}]]],[\"ai12z-chat_2\",[[0,\"ai12z-input-form\",{\"isChat\":[4,\"is-chat\"],\"placeholder\":[1],\"buttonText\":[1,\"button-text\"],\"followUpLabel\":[1,\"follow-up-label\"],\"iconSrc\":[1,\"icon-src\"],\"isImageUpload\":[4,\"is-image-upload\"],\"isEnableMic\":[4,\"is-enable-mic\"],\"componentType\":[1,\"component-type\"],\"chatLength\":[2,\"chat-length\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"imagesBase64List\":[32],\"showShortcutsDialog\":[32],\"shortcuts\":[32],\"searchInput\":[32],\"submitted\":[32],\"showErrorMessage\":[32],\"hideAllButtons\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32]},[[4,\"stateChanged\",\"stateChangedHandler\"],[4,\"clearInput\",\"clearInputHandler\"]]],[1,\"ai12z-chat\",{\"chatId\":[1,\"chat-id\"],\"chats\":[1032],\"query\":[1025],\"apiKey\":[1,\"api-key\"],\"aiMessageId\":[1025,\"ai-message-id\"],\"imgFiles\":[1032,\"img-files\"],\"env\":[1025],\"conversationId\":[1025,\"conversation-id\"],\"dataAttributes\":[8,\"data-attributes\"],\"chatExcludeTags\":[16],\"chatIncludeTags\":[16],\"target\":[1],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"componentType\":[1,\"component-type\"],\"chatPosition\":[1,\"chat-position\"],\"socketIn\":[16],\"customstyle\":[1],\"customJS\":[1,\"custom-j-s\"],\"avatarUrl\":[1,\"avatar-url\"],\"settings\":[8],\"scrollBottom\":[32],\"copied\":[32],\"isPlayed\":[32],\"buttons\":[32],\"itemList\":[32],\"currentChatData\":[32],\"currentTemplate\":[32],\"currentPage\":[32],\"currentResponse\":[32],\"currentSlide\":[32],\"scriptArray\":[32],\"isProse\":[32],\"isProcessingEndResponse\":[32],\"surveyDomId\":[32],\"focusedIndex\":[32],\"hydrateMessagesFromState\":[64]},[[8,\"streamResponse\",\"streamResponseHandler\"],[8,\"endResponse\",\"endResponseHandler\"],[0,\"buttonClick\",\"buttonClickHandler\"],[4,\"stopStream\",\"stopStreamInputHandler\"],[4,\"startStream\",\"startStreamInputHandler\"]],{\"chats\":[{\"watchHandler\":0}]}]]],[\"ai12z-inline-search\",[[1,\"ai12z-inline-search\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"resultPosition\":[1,\"result-position\"],\"autoSearch\":[4,\"auto-search\"],\"categorize\":[4],\"settings\":[16],\"formData\":[32],\"conversationHistory\":[32],\"searchResults\":[32],\"isOpen\":[32]},[[4,\"survey\",\"surveyHandler\"]]]]],[\"search-results-page\",[[1,\"search-results-page\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"dataAttributes\":[1,\"data-attributes\"],\"configId\":[1,\"config-id\"],\"query\":[32],\"searchResultSettings\":[32],\"searchResults\":[32],\"hideAllButtons\":[32],\"isChat\":[32],\"chatHistory\":[32],\"aiMessageId\":[32],\"socketService\":[32],\"thumbsId\":[32],\"isOpen\":[32],\"capturedFile\":[32],\"imgFiles\":[32],\"displayText\":[32],\"showWelcomeTemplate\":[32],\"timer\":[32],\"questionCounter\":[32],\"emptyMessageError\":[32],\"announceMessage\":[32],\"isRendered\":[32],\"sendMessage\":[64],\"sendJSON\":[64]},[[4,\"messageReceived\",\"messageReceivedHandler\"],[4,\"survey\",\"surveyHandler\"]]]]],[\"chatbot-history_2\",[[1,\"chatbot-history\",{\"chatList\":[16],\"botName\":[1,\"bot-name\"],\"chatlogo\":[1],\"heading\":[1],\"styles\":[1],\"scripts\":[1],\"showDeleteModal\":[32],\"chatToDelete\":[32],\"activeId\":[32],\"focusedIndex\":[32]}],[1,\"delete-confirmation-modal\",{\"show\":[4],\"dialogTitle\":[1,\"dialog-title\"],\"message\":[1],\"confirmButtonText\":[1,\"confirm-button-text\"],\"cancelButtonText\":[1,\"cancel-button-text\"]}]]],[\"ai12z-cta\",[[257,\"ai12z-cta\",{\"isCta\":[1028,\"is-cta\"],\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[513,\"data-attributes\"],\"options\":[16],\"excludeTags\":[16],\"includeTags\":[16],\"socketService\":[32],\"ctaSettings\":[32],\"showModal\":[32],\"timer\":[32],\"questionCounter\":[32],\"formData\":[32],\"searchResults\":[32],\"error\":[32],\"conversationId\":[32],\"canRender\":[32],\"chatHistory\":[32],\"isChat\":[32],\"aiMessageId\":[32],\"thumbsId\":[32],\"imgFiles\":[32],\"announceMessage\":[32],\"showHistory\":[32],\"conversationHistory\":[32],\"isRendered\":[32],\"openModal\":[64],\"sendMessage\":[64],\"sendJSON\":[64],\"closeModal\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"survey\",\"surveyHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]],[\"ai12z-search-panel\",[[1,\"ai12z-search-panel\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"categorize\":[4],\"placeholder\":[1],\"redirectUrl\":[1,\"redirect-url\"],\"query\":[32],\"searchResults\":[32],\"hideAllButtons\":[32]}]]],[\"chat-avatar_6\",[[0,\"interaction-buttons\",{\"message\":[8],\"chatArray\":[16],\"currentIndex\":[2,\"current-index\"],\"dataKey\":[1,\"data-key\"],\"dataMode\":[1,\"data-mode\"],\"voiceType\":[1,\"voice-type\"],\"voice\":[1],\"source\":[1],\"conversationId\":[1,\"conversation-id\"],\"projectId\":[1,\"project-id\"],\"isPlayed\":[32],\"audioElement\":[32],\"copied\":[32]}],[1,\"privacy-modal\",{\"message\":[1],\"show\":[4]}],[0,\"chat-avatar\",{\"senderType\":[1,\"sender-type\"],\"avatarUrl\":[1,\"avatar-url\"]}],[0,\"hamburger-menu\",{\"isToggled\":[1540,\"is-toggled\"],\"messages\":[16],\"botSettings\":[8,\"bot-settings\"],\"isLiveAgentEnabled\":[4,\"is-live-agent-enabled\"],\"liveAgentButtonText\":[1,\"live-agent-button-text\"],\"hasCheckedLiveAgent\":[32]},null,{\"isToggled\":[{\"watchToggled\":0}],\"messages\":[{\"watchMessages\":0}],\"liveAgentButtonText\":[{\"watchLiveAgentButtonText\":0}]}],[257,\"live-agent-chat\",{\"config\":[8],\"isApiReady\":[32],\"startChat\":[64]}],[1,\"typing-indicator\",{\"size\":[2],\"color\":[1],\"spacing\":[2]}]]],[\"image-uploader_2\",[[0,\"image-uploader\",{\"maxImages\":[2,\"max-images\"],\"disabled\":[4],\"images\":[16],\"targetElement\":[16],\"removeImageAtIndex\":[64]},[[4,\"isElementAvailable\",\"handleIsOpened\"],[4,\"capturedImgUpload\",\"handleCapturedImage\"]]],[1,\"keyboard-shortcuts-dialog\",{\"show\":[4],\"shortcuts\":[16],\"groupedShortcuts\":[32]},null,{\"show\":[{\"handleShowChange\":0}],\"shortcuts\":[{\"handleShortcutsChange\":0}]}]]],[\"ai12z-bot\",[[257,\"ai12z-bot\",{\"dataKey\":[513,\"data-key\"],\"dataMode\":[513,\"data-mode\"],\"configId\":[513,\"config-id\"],\"dataAttributes\":[520,\"data-attributes\"],\"excludeTags\":[16],\"includeTags\":[16],\"liveAgentButtonText\":[32],\"isLiveAgentEnabled\":[32],\"isTypingIndicatorVisible\":[32],\"botSettings\":[32],\"canRender\":[32],\"voiceType\":[32],\"voice\":[32],\"showSubmit\":[32],\"hideAllButtons\":[32],\"showMenu\":[32],\"isProse\":[32],\"isLiveAgent\":[32],\"isConnectingLiveAgent\":[32],\"showWelcomeScreen\":[32],\"showHistory\":[32],\"conversationId\":[32],\"surveyDomId\":[32],\"searchResults\":[32],\"buttons\":[32],\"currentDomId\":[32],\"messages\":[32],\"questionCounter\":[32],\"visitorID\":[32],\"timestamp\":[32],\"rowCount\":[32],\"isBot\":[32],\"conversationHistory\":[32],\"query\":[32],\"scriptArray\":[32],\"imagesBase64List\":[32],\"focusedIndex\":[32],\"isAnimated\":[32],\"isMinimized\":[32],\"isStreaming\":[32],\"showErrorMessage\":[32],\"errorMessage\":[32],\"emptyMessageError\":[32],\"isOpened\":[32],\"isContent\":[32],\"isExpanded\":[32],\"isToggled\":[32],\"showPrivacy\":[32],\"isRendered\":[32],\"showShortcutsDialog\":[32],\"showLiveAgentEndDialog\":[32],\"liveAgentSessionId\":[32],\"liveAgentConversationId\":[32],\"liveAgentProviderName\":[32],\"liveAgentListenersRegistered\":[32],\"shortcuts\":[32],\"announceMessage\":[32],\"liveAgentDirective\":[32],\"sendMessage\":[64],\"sendQuery\":[64],\"sendJSON\":[64],\"openBot\":[64],\"action\":[64],\"setProcessDataOverride\":[64],\"configureSettings\":[64]},[[0,\"keydown\",\"handleKeyDown\"],[0,\"buttonClick\",\"buttonClickHandler\"],[0,\"sendQueryToBot\",\"sendQueryToBotHandler\"],[0,\"deleteChatHistory\",\"deleteChatHistoryHandler\"],[0,\"chatClick\",\"chatClickHandler\"],[0,\"openChat\",\"openChatHandler\"],[0,\"formComplete\",\"formSubmittedHandler\"]],{\"dataKey\":[{\"onDataKeyChange\":0}],\"dataMode\":[{\"onDataModeChange\":0}]}]]]]"), options);
});
