(window["webpackJsonpreact-web-app"]=window["webpackJsonpreact-web-app"]||[]).push([[9],[,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(2);const o=(e,t,n,o)=>{const s=((e,t,n)=>{const{GET:o}=a.I.METHOD_TYPE,s={method:e,headers:n||{"Content-Type":"application/json"}};return e!==o&&(s.body=JSON.stringify(t)),s})(e,n,o);return fetch(t,s).then((function(e){return e.text().then(t=>{const n=t&&JSON.parse(t);if(!n.success){const t=404===n.responseCode?n:n&&n.message||e.statusText;return Promise.reject(t)}return n})})).catch((function(e){return e}))}},function(e,t,n){"use strict";n.d(t,"I",(function(){return a})),n.d(t,"P",(function(){return o})),n.d(t,"yb",(function(){return s})),n.d(t,"r",(function(){return i})),n.d(t,"db",(function(){return r})),n.d(t,"V",(function(){return c})),n.d(t,"X",(function(){return l})),n.d(t,"U",(function(){return u})),n.d(t,"Y",(function(){return d})),n.d(t,"W",(function(){return h})),n.d(t,"B",(function(){return p})),n.d(t,"wb",(function(){return m})),n.d(t,"d",(function(){return g})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return T})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return v})),n.d(t,"zb",(function(){return y})),n.d(t,"j",(function(){return b})),n.d(t,"N",(function(){return I})),n.d(t,"Cb",(function(){return S})),n.d(t,"qb",(function(){return P})),n.d(t,"M",(function(){return w})),n.d(t,"K",(function(){return A})),n.d(t,"Ab",(function(){return O})),n.d(t,"ib",(function(){return D})),n.d(t,"R",(function(){return R})),n.d(t,"T",(function(){return _})),n.d(t,"v",(function(){return C})),n.d(t,"kb",(function(){return N})),n.d(t,"nb",(function(){return U})),n.d(t,"bb",(function(){return L})),n.d(t,"Eb",(function(){return x})),n.d(t,"z",(function(){return k})),n.d(t,"ob",(function(){return M})),n.d(t,"G",(function(){return F})),n.d(t,"Db",(function(){return B})),n.d(t,"jb",(function(){return G})),n.d(t,"rb",(function(){return j})),n.d(t,"xb",(function(){return H})),n.d(t,"cb",(function(){return z})),n.d(t,"H",(function(){return W})),n.d(t,"Z",(function(){return Y})),n.d(t,"gb",(function(){return K})),n.d(t,"lb",(function(){return V})),n.d(t,"Bb",(function(){return q})),n.d(t,"ab",(function(){return Q})),n.d(t,"i",(function(){return Z})),n.d(t,"t",(function(){return J})),n.d(t,"O",(function(){return X})),n.d(t,"ub",(function(){return $})),n.d(t,"p",(function(){return ee})),n.d(t,"m",(function(){return te})),n.d(t,"S",(function(){return ne})),n.d(t,"y",(function(){return ae})),n.d(t,"hb",(function(){return oe})),n.d(t,"e",(function(){return se})),n.d(t,"n",(function(){return ie})),n.d(t,"eb",(function(){return re})),n.d(t,"pb",(function(){return ce})),n.d(t,"E",(function(){return le})),n.d(t,"J",(function(){return ue})),n.d(t,"sb",(function(){return de})),n.d(t,"A",(function(){return he})),n.d(t,"x",(function(){return pe})),n.d(t,"Q",(function(){return me})),n.d(t,"s",(function(){return ge})),n.d(t,"w",(function(){return Ee})),n.d(t,"l",(function(){return Te})),n.d(t,"q",(function(){return fe})),n.d(t,"k",(function(){return ve})),n.d(t,"a",(function(){return ye})),n.d(t,"h",(function(){return be})),n.d(t,"L",(function(){return Ie})),n.d(t,"F",(function(){return Se})),n.d(t,"fb",(function(){return Pe})),n.d(t,"o",(function(){return we})),n.d(t,"mb",(function(){return Ae})),n.d(t,"tb",(function(){return Oe})),n.d(t,"Fb",(function(){return De})),n.d(t,"D",(function(){return Re})),n.d(t,"vb",(function(){return _e})),n.d(t,"C",(function(){return Ce})),n.d(t,"u",(function(){return Ne}));const a={METHOD_TYPE:{POST:"POST",PUT:"PUT",GET:"GET",DELETE:"DELETE",PATCH:"PATCH"},CONTENT_TYPE:{APPLICATION_JSON:"application/json",MULTIPART_FORM_DATA:"multipart/form-data",APPLICATION_FORM_URLENCODED:"application/x-www-form-urlencoded",IMAGE_PNG:"image/png"},DEVICE_TYPE:{WEB:"web"},API_END_POINT:{SIGN_IN:"/sign-in",SIGN_UP:"/sign-up",MANAGE_APPS:"/manage-app",GET_KNOWLEDGE_BASES:"/knowledge-bases",GET_KNOWLEDGE_BASE_BY_ID:"/knowledge-base",KNOWLEDGE_BASE_IMPORT_FILE:"/knowledge-base-import",IMPORT_KNOWLEDGE_BASE_IMPORT_FILE:"/v2/import",IMPORT_ESIMATE:"/v2/import-estimate",IMPORT_INIT:"/v2/import-init",KNOWLEDGE_BASE:"/knowledge-base",KNOWLEDGE_BASE_IMPORT:"/knowledge-base-import",LOGIN_WITH_GOOGLE:"/user",SAVE_USER:"/save-user",APPS:"/apps",QUERY:"/query",CHATBOT:"/chatbot",QUERY_HISTORY:"/query-history",DELETE_APP:"/delete-app",CONVERSATIONS:"/conversations",CLEAR_CONVERSATIONS:"/clear-conversations",USER_CHAT:"/user-chat",DELETE_CONVERSATION:"/delete-conversation",VERIFY_INVITE:"/verify-invite",SEND_INVITATION:"/invite",GET_TENANT_MEMBERS:"/tenant-members",SIGN_UP_USER:"/sign-up-user",SIGN_IN_USER:"/sign-in-user",REMOVE_CHATBOT_ACCESS:"/remove-chatbot-access",IMPORT_KNOWLEDGE_BASE:"/import-knowledge-base",BOT_ICON:"/bot-icon",BOT_LOGO:"/bot-logo",GET_API_KEY:"/get-api-key",GET_PLANS:"/plans",GET_SUBSCRIPTION:"/subscription",CANCEL_SUBSCRITPION:"/cancel-subscription",UPGRADE_DEGRADE:"/upgrade-degrade-plan",CREDIT_USAGE:"/credit-usage",GET_AUTHORIZATION_URL:"/authorization-url",GET_TENANT:"/tenant",WAIT_LIST_USER:"/waitlist-user",UPDATE_TENANT:"/update-tenant",VALIDATE_INVITE:"/validate-invite",VALIDATE_PLATFORM_INVITE:"/admin/validate-invite",APP_ACCESS:"/app-access",SUGGESTIONS:"/suggestions",SAVE_SUGGESTIONS:"/save-suggestions",LIKE_DISLIKE_QUERY:"/like-dislike-query",EMAIL_VERIFICATION:"/email-verification",VIEW_EXTRACTED_DATA:"/view-extracted-data",SUMMARISED_IMPORT:"/summarised-import",CHANGE_PASSWORD:"/change-password",CHANGE_USER_PASSWORD:"/change-user-password",AUTH_PROFILE_BY_EMAIL:"/auth-profile-by-email",QUERY_FLOW:"/query-flow",FLOW:"/flow",FLOWS:"/flows",CHAT_USER:"/chat-user",INVOICE:"/invoice",QUERY_SESSION:"/query-session",INVITE_TENANT:"/invite-tenant",GET_INVITE_DETAILS:"/get-invite-details",GET_INVITED_USERS:"/get-invited-users",CHECK_CSV_EXIST:"/check-csv-exist",GET_SCHEMA_DETAILS:"/knowledge-base-schema-details",REMOVE_USER_ACCESS:"/remove-tenant-access",GET_TENANT_DETAILS:"/get-tenant",BOT_PERFORMANCE:"/bot-performance",REMOVE_SCHEMA:"/schema",GET_QUERY_HISTORY:"/tenant-query-history",RUN_PERFORMANCE_TEST:"/run-performance-test",REVERT_APP_SETTINGS:"/revert-app-settings",GET_PERFORMANCE_TEST:"/tenant-bot-performance",GET_GOLDEN_QUESTION:"/golden-question-apps",ACCOUNT_COMPLETION:"/account-completion",REGENERATE_API_KEY:"/api/regenerate-api-key",CHANGE_USER_STATUS:"/change-user-access-status",ACTION_STEPS:"/upload-file",GOOGLE_SEARCH:"/google-search",SEARCH_LLM:"/search-by-llm",GET_QUERY_INFO:"/query-info",AGENT:"/agent",AGENTS:"/agents",WORKFLOW:"/workflow",WORKFLOWS:"/workflows",SUMMARIZE_DOC:"/summarize-doc",SUMMARIZE_DOC_AND_SAVE:"/summarize-doc-and-save-to-db",SUMMARIZE_MODEL:"/models",GET_MODELS:"/models",MODEL:"/model",SAVE_MODEL:"/save-model",UPDATE_MODEL:"/model",UPDATE_CONTENT:"/edit-import-content",REVERT_VERSION:"/revert-import-version",CREATE_PIPEDRIVE_TENANT:"/create-pipedrive-tenant-details",UPDATE_PIPEDRIVE:"/pipedrive-tenant-details",HUBSPOT_TENANT:"/hubspot/tenant",PAYMENT_LINK:"/payment-link",ADDONS:"/addons",RETRIEVAL_TESTING:"/v2/retrieval-testing",RETRIEVAL_HISTORY:"/v2/retrieval-history",REVIEW_DATA_IN_CHUNKS:"/v2/review-data",CREATE_UPDATE_CHUNK:"/v2/knowledge-base-import/chunk",UPDATE_META_DATA:"/v2/knowledge-base-import",ANALYTICS:"/v2/app-analytics",QUERYDETAIL:"/v2/query-details",ORCHESTRATOR_FLOWS:"/api/v1/internal/flows",CONNECTIONS_LIST:"/api/v1/app-connections",REPORTS:"/app-reports",REPORTS_FILTER:"/app-reports/filter",DELETE_CHUNK:"/v2/knowledge-base-import/chunk",FEEDBACK_DATA:"/query-feedback-status",CONNECTIONS:"/v2/connections",CONNECTION:"/v2/connection",SEND_ADMIN_INVITE:"/admin/invite-user",AGENT_EXECUTE:"/api/agent/execute",CONNECTIONS_REQUIRED_CONFIGURATIONS:"/v2/connections-required-configurations",AUTH_TOKEN:"/api/v1/authentication/token",APP_CONNECTIONS:"/api/v1/app-connections",WORKER_TEMPLETES:"/worker-templates",WORKER_TEMPLETE:"/worker-template",WORKER_RECORDS:"/worker-records",WORKERS:"/workers",TRIGGER_WORKER:"/worker-trigger",WORKERS_UPLOAD:"/workers/upload",WORKER_REPORTS:"/worker-reports",WORKER_RECORDS_LOGS:"/worker-record-logs",RETRY_FAILED_ACTIVITY:"/worker-trigger/retry",WORKER_TEMPLATE_CATEGORIES:"/worker-template-categories",KNOWLEDGE_BASE_IMPORT_BY_API:"/knowledge-base-import-by-api",V2:{INFO_SCHEMAS:"/v2/information-schemas",INFO_SCHEMA:"/v2/information-schema",INFO_SCHEMA_RUN:"/v2/information-schema/run",INFO_SCHEMA_COLUMN:"/v2/information-schema/column"}},API_END_POINT_V2:{IMPORT:"/v2/import",AGENTS:"/v2/agents",AGENT:"/v2/agent",TOOLS:"/v2/tools",TOOL:"/v2/tool",LOGS:"/v2/agent-logs"}},o={USER:"user",ACCESS_TOKEN:"ACCESS_TOKEN",AUTH0_ID_TOKEN:"AUTH0_ID_TOKEN",APP_USER_AUTH0_ID_TOKEN:"APP_USER_AUTH0_ID_TOKEN",INVITED_USER:"invited_user",INVITATION_DATA:"invitation-data",USER_PARAMS:"user_params",APP_ID:"APP_ID",REFERRED:"REFERRED",KNOWLEDGE_BASE_DETAILS:"KNOWLEDGE_BASE_DETAILS",KNOWLEDGE_BASE_ID:"KNOWLEDGE_BASE_ID",SHEETS_ID:"SHEETS_ID",CREDENTIALS_ID:"CREDENTIALS_ID",DOCS_ID:"DOCS_ID",IMPORT_TYPE:"IMPORT_TYPE",GMAIL_QUERY:"GMAIL_QUERY",GMAIL_MAX_RESULTS:"GMAIL_MAX_RESULTS",NUMBEROFRESULTS:"NUMBEROFRESULTS",STARTDATE:"STARTDATE",CURRENTPAGE:"CURRENTPAGE",PLANTYPE:"PLANTYPE",CHATUSERINFOPUBLIC:"CHATUSERINFOPUBLIC",CHATUSERINFOPRIVATE:"CHATUSERINFOPRIVATE",CHATWIDGETUSERINFO:"CHATWIDGETUSERINFO",INVITE_TOKEN:"INVITE_TOKEN",APP_STATE:"APP_STATE",AGENT_STATE:"AGENT_STATE",WORKER_STATE:"WORKER_STATE",UPDATE_USER_PROGRESS:"UPDATE_USER_PROGRESS",AUTO_CONFIGURE_RETRIEVER:"/auto-configure-retriever",ACTION_STEPS:"/upload-file",QUERY_HISTORY_SORTING_ORDER:"QUERY_HISTORY_SORTING_ORDER",CHANGE_USER_STATUS:"CHANGE_USER_STATUS",CRM_CODE:"CRM_CODE",INVITED_USER:"INVITED_USER",INVITE_TOKEN_ID:"INVITE_TOKEN_ID",FLOW_TOKEN:"FLOW_TOKEN"},s={ZBRAIN_DEMO_ACCOUNT_TENANTID:"6447a3f49922a96b9a3a49e8"},i=[{image:"/images/public-app.svg",imageActive:"/images/public-app-active.svg",title:"Public App",type:"PUBLIC",description:"App link will be public and anyone with the link can use the application."},{image:"/images/private-app.svg",imageActive:"/images/private-app-active.svg",title:"Private App",type:"PRIVATE",description:"App link will be private and only person with the link can use the application."}],r=[{image:"/images/KB-Default.svg",imageActive:"/images/KB-Selected.svg",title:"Knowledge Base",type:"BASIC",description:"Basic",mode:"BASIC"},{image:"/images/flow-inactive.svg",imageActive:"/images/flow-active.svg",title:"Flow",type:"ADVANCE",description:"Advanced",mode:"ADVANCE"},{image:"/images/agent-header.svg",imageActive:"/images/agent-active.svg",title:"Agent",type:"AGENT",description:"Advanced",mode:"ADVANCE"}],c={ACTION_TYPES:{UDPATE_STATE:"UDPATE_STATE",UDPATE_APP:"UDPATE_APP"}},l={ACTION_TYPES:{UDPATE_STATE:"UDPATE_STATE",UPDATE_STATE:"UPDATE_STATE",UDPATE_WORKERS:"UDPATE_WORKERS"}},u={ACTION_TYPES:{UDPATE_STATE:"UDPATE_STATE",UDPATE_AGENT:"UDPATE_AGENT"}},d={ACTION_TYPES:{UDPATE_STATE:"UDPATE_STATE",UDPATE_WORKFLOW:"UDPATE_WORKFLOW"}},h={ACTION_TYPES:{UDPATE_STATE:"UDPATE_STATE",UDPATE_MODELS:"UDPATE_MODELS"}},p={NAME_REQUIRED:"Username is required.",PASSWORD_REQUIRED:"Password is required.",PHONE_NUMBER_REQUIRED:"Phone Number is required.",PASSWORD_MUST_8_CHARACTERS:"Password must be at least 8 characters.",PASSWORD_ALPHA_NUMBER_ERROR:"Password must include letters, numbers and special characters.",INVALID_EMAIL:"Please enter a valid email.",INVALID_PASSWORD:"Invalid password.",NAME_IS_REQUIRED:"Please enter your name.",EMAIL_REQUIRED:"Please enter your email.",FEEDBACK_REQUIRED:"Please enter your feedback.",USERID_REQUIRED:"User ID is required.",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required.",PASSWORD_MUST_SAME:"New password and Confirm password must be same.",ERROR_OCCURED_RAZORPAY:"An error occurred while setting up razorpay, Please try again.",LIMIT_EXCEEDED:"You have exceeded your daily limit for stories. please consider upgrading your plan",LOW_CREDIT_BALANCE:"Your credit balance is too low. Please upgrade your account to proceed.",PLAN_EXPIRED:"Plan expired, Please upgrade the plan.",TENANT_INVITATION_ACCEPTED:"You have already given access to this account.",ADD_TEST_QUESTIONS:"Please add test questions.",PLATFORM_INVITE:"Please contact ZBrain support to access the platform. Reach us at hello@zbrain.com.",GENERIC_ERROR:"Something went wrong. Please try again."},m={USER_INVITED:"User invited successfully.",USER_UPDATED:"User updated successfully.",COMPANY_SWITCHED:"Account switched successfully.",SETTINGS_UPDATED:"Settings updated successfully.",VERSION_DELETED:"Version deleted successfully."},g=9,E=3,T=1,f=3,v=3,y=[{title:"End User Terms of Use",content:"These End User Terms of Use govern the access and use of the services\n      provided by ZBrain Inc. by the individual registering for an account.\n      By registering an account or accessing and using the services, you\n      agree to be bound by these End User Terms, including ZBrain's Privacy\n      Policy and Acceptable Use Policy, as well as all applicable laws and\n      regulations, and you are responsible for complying with any applicable\n      local laws."},{title:"User's Account",content:"If you sign up for an account, you agree to use the Services in\n      compliance with these End User Terms, ZBrain's terms and policies, and\n      any applicable laws and regulations. When you submit digital files,\n      data, or machine learning models to the ZBrain API, or otherwise\n      provide User Materials to ZBrain to facilitate ZBrain's provision of\n      the Services, you acknowledge and agree that the User Materials are\n      owned by you. Any and all references to \"your account\" are references\n      to your ZBrain account."},{title:"Relationship between ZBrain and User",content:"As between ZBrain and User, you agree that it is solely your\n      responsibility to (a) obtain any rights, permissions, or consents that\n      are necessary for the lawful use of User Materials and the operation\n      of the Services, and (b) respond to and resolve any dispute with any\n      third party relating to the Services, User Materials, or your failure\n      to fulfill these obligations."},{title:"User Account and Registration",content:"To access most features of the Services, you must register for an account. When you register for an account, you may be required to provide us with some personal information (as described in our Privacy Policy, such as your name, email address, or other contact information), and you agree that the information you provide to us is accurate, and that you will keep it accurate and up-to-date at all times. When you register, you will be asked to provide a password, and you are solely responsible for maintaining the confidentiality of your account and password. You agree and acknowledge that you are solely responsible and liable for all activities that occur under your account. If you believe that your account is no longer secure, then you must immediately notify us at "},{title:"Use of the Services ",content:"Subject to your complete and ongoing compliance with these End User Terms, ZBrain agrees you may use the Services during the Term, solely with supported browsers through the Internet for purposes authorized by ZBrain. Nothing in these End User Terms will be construed to grant you any right to transfer or assign rights to use the Services."},{title:"Reservation of Rights",content:"All rights not expressly granted to you are reserved by ZBrain and its licensors. You further acknowledge and agree that, as between you and ZBrain, ZBrain owns all right, title, and interest in and to the ZBrain Technology, including all Intellectual Property Rights therein. The visual interfaces, graphics, design, compilation, information, data, computer code (including source code or object code), products, software, services, and all other elements of the ZBrain Technology are protected by intellectual property and other laws."},{title:"Restrictions",content:"You may not permit the Services to be used by or for the benefit of unauthorized third parties, or for any purpose other than the purpose authorized by ZBrain. You may not (i) modify or make derivative works based upon the Services; (ii) reverse engineer the Services, or (iii) access or use the Services in order to (a) build a competitive product or service, or (b) build a product using similar features, functions, or graphics of"},{title:"Termination",content:"You have the right to terminate your account at any time by following the instructions in your account settings or by contacting us at support@zbrain.ai. However, we reserve the right to terminate or suspend your access to the Services or your account with or without notice, for any reason or no reason, including if we believe that you have violated or acted inconsistently with these End User Terms or any applicable law or regulation. Upon termination, you must stop using the Services and delete any copies of the Services or related documentation in your possession."},{title:"Disclaimer of Warranties",content:'The Services are provided on an "as is" basis, and ZBrain disclaims all warranties, express or implied, including without limitation any implied warranties of merchantability, fitness for a particular purpose, title, and non-infringement. ZBrain does not guarantee that the Services will be uninterrupted, error-free, or completely secure. ZBrain will not be liable for any loss, damage, or injury arising out of or in connection with your use of the Services.'},{title:"Limitation of Liability",content:" In no event will ZBrain be liable for any indirect, incidental, consequential, special, or punitive damages arising out of or in connection with these End User Terms or the use of the Services, whether based on contract, tort, strict liability, or otherwise, even if ZBrain has been advised of the possibility of such damages. In no event will ZBrain\u2019s total liability to you for all claims arising out of or in connection with these End User Terms or the use of the Services exceed the amounts paid by you to ZBrain for the Services during the six (6) months preceding the claim."},{title:"Indemnification",content:"You agree to indemnify, defend, and hold harmless ZBrain and its officers, directors, employees, and agents from and against any and all claims, liabilities, damages, losses, costs, expenses, or fees (including reasonable attorneys\u2019 fees) arising out of or in connection with your use of the Services or your violation of these End User Terms."},{title:"General    ",content:"These End User Terms, along with any applicable MSA or other agreement entered into by the Customer with ZBrain, constitute the entire agreement between you and ZBrain with respect to the Services and supersede all prior or contemporaneous communications and proposals (whether oral, written, or electronic) between you and ZBrain. If any provision of these End User Terms is found to be unenforceable or invalid, the remaining provisions will remain in full force and effect. ZBrain\u2019s failure to enforce any right or provision of these End User Terms will not be deemed a waiver of such right or provision."}],b=[{title:"Your Choices",content:"You may opt out of receiving marketing and promotional materials from us by following the instructions in the email or by contacting us at support@zbrain.ai. Please note that even if you opt out, we may still send you non-promotional messages, such as those related to your account or our ongoing business relationship."},{title:"Security    ",content:"We take reasonable measures to protect your information from unauthorized access, use, or disclosure. However, no method of transmission over the internet or method of electronic storage is 100% secure, and we cannot guarantee absolute security."},{title:"Updates to this Policy",content:"We may update this Privacy Policy from time to time by posting a new version on our website. We encourage you to review this Privacy Policy periodically for any changes."},{title:"Contact Us",content:"If you have any questions or concerns about this Privacy Policy, please contact us at "}],I=["Personal Information: We may collect personal information that can be used to identify you, such as your name, email address, phone number, and payment information.","Usage Information: We may collect information about how you use the Services, such as your IP address, browser type, and pages you view.","Device Information: We may collect information about the device you use to access the Services, such as your device type, operating system, and mobile network information.","Location Information: We may collect information about your location if you enable location services on your device."],S=["Providing and improving the Services.","Responding to your requests and inquiries.","Communicating with you about the Services.","Sending you marketing and promotional materials.","Protecting our rights and property.","Complying with applicable laws and regulations."],P=["Service Providers: We may share your information with third-party service providers that perform services on our behalf, such as payment processing, data analysis, and marketing.."," Business Transfers: We may share your information in connection with a merger, acquisition, or sale of all or a portion of our assets..","Legal Requirements: We may disclose your information if required to doso by law or in the good faith belief that such action is necessary to comply with applicable laws or regulations, or to protect and defend  our rights or property."],w={FILE:"FILE",MANUAL:"MANUAL",API:"API",WEBSITE:"WEBSITE",JIRA:"JIRA",SHEETS:"SHEETS",GMAIL:"GMAIL",DOCS:"DOCS",CALENDAR:"CALENDAR",NOTION:"NOTION",SLACK:"SLACK",SLIDE:"SLIDE",ELASTICSEARCH:"ELASTICSEARCH",WEBHOOK:"WEBHOOK",SERVICENOW:"SERVICENOW",POSTGRESQL:"POSTGRESQL",MONGODB:"MONGODB",CONFLUENCE:"CONFLUENCE",REDSHIFT:"REDSHIFT",SHAREPOINT:"SHAREPOINT",TEAMS:"TEAMS",ONEDRIVE:"ONEDRIVE",GOOGLEDRIVE:"GOOGLEDRIVE"},A=[{logo:"/images/web-url-icon.svg",name:"Web URL",type:w.WEBSITE,upcoming:!1},{logo:"/images/api-logo-knowledgeBase.svg",name:"Webhook",type:w.WEBHOOK,upcoming:!1},{logo:"/images/google-sheets-logo.jpg",name:"Google Sheets",type:w.SHEETS,upcoming:!1},{logo:"/images/google-slides-logo.png",name:"Google Slides",type:w.SLIDE,upcoming:!1},{logo:"/images/google-docs-logo.png",name:"Google Docs",type:w.DOCS,upcoming:!1},{logo:"/images/elastic-search-logo.svg",name:"ElasticSearch",type:w.ELASTICSEARCH,upcoming:!1},{logo:"/images/notion-logo.png",name:"Notion",type:w.NOTION,upcoming:!1},{logo:"/images/mongo-logo.png",name:"MongoDB",type:w.MONGODB,upcoming:!1},{logo:"/images/servicenow-logo.png",name:"ServiceNow",type:w.SERVICENOW,upcoming:!1},{logo:"/images/confluence.png",name:"Confluence",type:w.CONFLUENCE,upcoming:!1},{logo:"/images/jira-logo.svg",name:"JIRA",type:w.JIRA,upcoming:!1},{logo:"/images/postgresql-logo.png",name:"PostgreSQL",type:w.POSTGRESQL,upcoming:!1},{logo:"/images/aws-redShift.png",name:"AWS RedShift",type:w.REDSHIFT,upcoming:!1},{logo:"/images/sharePoint.png",name:"SharePoint",type:w.SHAREPOINT,upcoming:!1},{logo:"/images/teams.webp",name:"Microsoft Teams",type:w.TEAMS,upcoming:!1},{logo:"/images/oneDrive.svg",name:"One Drive",type:w.ONEDRIVE,upcoming:!1},{logo:"/images/google-drive-logo.svg",name:"Google Drive",type:w.GOOGLEDRIVE,upcoming:!1},{logo:"/images/gmail-logo.svg",name:"Gmail",type:w.GMAIL,upcoming:!0},{logo:"/images/google-calendar-logo.png",name:"Google Calendar",type:w.CALENDAR,upcoming:!0},{logo:"/images/slack-logo.png",name:"Slack",type:w.SLACK,upcoming:!0},{logo:"/images/aws-s3-logo.png",name:"AWS S3",upcoming:!0},{logo:"/images/ms-excel-logo.svg",name:"Excel",upcoming:!0},{logo:"/images/github-logo.png",name:"Github",upcoming:!0},{logo:"/images/database-logo.jpg",name:"Database",upcoming:!0},{logo:"/images/reddit-logo.png",name:"Reddit",upcoming:!0},{logo:"/images/zendesk-logo.png",name:"Zendesk",upcoming:!0},{logo:"/images/youtube-logo.png",name:"Youtube",upcoming:!0}],O=[{theme:"/images/lightmode1.svg",name:"Light mode 1",styles:{sideBarColor:"#202020",sideBarText:"#FFFFFF",backGroundColor:"#FFFFFF",textColor:"#454545",sampleQueryColor:"#454545",botReplyBg:"#F7F7F8"}},{theme:"/images/lightmode2.svg",name:"Light mode 2",styles:{sideBarColor:"#FFFFFF",sideBarText:"#474747",backGroundColor:"#F7F7F7",textColor:"#474747",sampleQueryColor:"#F1F1F1",botReplyBg:"#FFFFFF"}},{theme:"/images/darkmode.svg",name:"Dark mode",styles:{sideBarColor:"#393939",sideBarText:"#FFFFFF",backGroundColor:"#2C2B2B",textColor:"#FFFFFF",sampleQueryColor:"#474747",botReplyBg:"#343434"}},{theme:"/images/bluetheme.svg",name:"Blue",styles:{sideBarColor:"#2684FF",sideBarText:"#FFFFFF",backGroundColor:"#FFFFFF",textColor:"#131426",sampleQueryColor:"#59A1FF",botReplyBg:"#F7F7F8"}},{theme:"/images/greentheme.svg",name:"Green",styles:{sideBarColor:"#5DC5AC",sideBarText:"#FFFFFF",backGroundColor:"#FFFFFF",textColor:"#131426",sampleQueryColor:"#7EDFC8",botReplyBg:"#F7F7F8"}},{theme:"/images/purpletheme.svg",name:"Purple",styles:{sideBarColor:"#310197",sideBarText:"#FFFFFF",backGroundColor:"#FFFFFF",textColor:"#131426",sampleQueryColor:"#591DDA",botReplyBg:"#F7F7F8"}},{theme:"/images/purpletheme.svg",name:"Dark Blue",styles:{sideBarColor:"#001E34",sideBarText:"#FFFFFF",backGroundColor:"#FFFFFF",textColor:"#131426",sampleQueryColor:"#021726",botReplyBg:"#f6f6f6"}}],D=[{name:"ChatGPT for BMW X4 Spec",url:"https://app.zbrain.ai/chat/647598723c69420024fcf688?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for Arthritis",url:"https://app.zbrain.ai/chat/6475a308289e280025094cf5?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for McDonald\u2019s Handbook",url:"https://app.zbrain.ai/chat/6475eff2289e2800250955b2?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for Marriot Quarterly Report",url:"https://app.zbrain.ai/chat/6475f198289e2800250955eb?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for GE Annual Report",url:"https://app.zbrain.ai/chat/6475f2d0289e28002509561c?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for Stanford Facts",url:"https://app.zbrain.ai/chat/6475f3b1289e280025095653?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for Apple Annual Report",url:"https://app.zbrain.ai/chat/6475f4cb289e280025095698?tenantId=6447a3f49922a96b9a3a49e8"},{name:"ChatGPT for Citi Group Investors",url:"https://app.zbrain.ai/chat/6475f5ec289e2800250956c9?tenantId=6447a3f49922a96b9a3a49e8"}],R={OPEN:"Open",REQUIRE_ATTENTION:"Require Attention",CLOSED:"Closed"},_={status:"SUCCESS",elapsedTime:"3.215s",totalTokens:1001,input:{"Sys-Query":"Can You Explain Twinpower Turbo Engine","Sys-Files":"01","Sys-Conversation_id":"fcf38f00-dcda-4bfe-872b-0d1101852bd8","Sys-User_id":"01840507-3544-4a88-9ea5-7ce8364c1758"},output:{"Sys-Query":"Greetings! The TwinPower Turbo Engine Is","Sys-Files":"01","Sys-Conversation_id":"fcf38f00-dcda-4bfe-872b-0d1101852bd8","Sys-User_id":"01840507-3544-4a88-9ea5-7ce8364c1758"},metadata:{instructions:"You are a friendly, polite customer service agent for ZBrain. You need to answer Question in the same language.",model:"GPT 3.5/4",temp:.7,inputToken:4096}},C=[{id:"001",matchingScore:98,title:"BMW 3 SERIES",description:"Near-perfect weight balance. Smooth engines. Refined road manners. For over 40 years, the BMW 3 Series has shown everyone what a true...",source:"BMW 3 Series 2024"},{id:"001",matchingScore:98,title:"BMW 3 SERIES",description:"Near-perfect weight balance. Smooth engines. Refined road manners. For over 40 years, the BMW 3 Series has shown everyone what a true...",source:"BMW 3 Series 2024"},{id:"001",matchingScore:98,title:"BMW 3 SERIES",description:"Near-perfect weight balance. Smooth engines. Refined road manners. For over 40 years, the BMW 3 Series has shown everyone what a true...",source:"BMW 3 Series 2024"}],N=[{value:"GET",label:"GET"},{value:"POST",label:"POST"},{value:"PUT",label:"PUT"},{value:"PATCH",label:"PATCH"}],U=[{value:"Yes",label:"Yes"},{value:"No",label:"No"}],L=[{title:"Integration Token:-",points:[{text:"To initiate the process, start by accessing the Settings & members option in your left sidebar and then proceed to the My Connections tab.",highlighted:["Settings & members","My Connections"]},{text:"Please note that only Workspace owners will be able to access the Integrations tab and create integrations. If you are not an admin, kindly get in touch with your Workspace admin or consider utilizing a different Workspace.",highlighted:["Integrations"]},{text:"Click on the Develop or manage integrations link at the bottom.",highlighted:["Develop or manage integrations"]},{text:"Upon clicking, your default browser will open, displaying the interface for your integration. Now, select the + New integration button to initiate the integration creation process.",highlighted:["+ New integration"]},{text:"Provide a suitable Name for your integration. Optionally, you can also upload an image that will serve as the integration's Logo.",highlighted:["Name","Logo"]},{text:"Within the dropdown menu, specify the relevant Associated workspace for which you intend to use this integration.",highlighted:["Associated workspace"]},{text:'After completing these steps, click the "Submit" button. This action will confirm the successful addition of your internal integration.'},{text:"Finally, make use of the generated token as your integration token in ZBrain."}]},{title:"Page Ids:-",points:[{text:"Locate and click on the \u2022\u2022\u2022 icon positioned at the upper-right corner of your page. This will provide access to the necessary settings for connecting to your internal integration token."},{text:'Next, navigate to the "Connections" section to connect the recently created integration token with the page.'},{text:'With this connection established, you can now utilize the obtained "pageId" within ZBrain for seamless integration. The following is the "pageId" for your reference: For example, in a URL like https://www.notion.so/test-12345678902wqdd, the segment 12345678902wqdd is the pageId.',link:["https://www.notion.so/test-12345678902wqdd"]}]}],x=[{points:[{title:"URL -",text:"To retrieve data from the API, it is essential to provide the Base URL with the API endpoint. For example, https://www.example.com/test.",link:["https://www.example.com/test"]},{title:["Request Type Selection -"],text:"Choose the appropriate request type for your API from the dropdown menu. Options include GET, POST, PUT, and PATCH."},{title:"Request Body -",text:"If body parameters are required in the API request, you can send the data as a JSON object. Alternatively, in cases where body parameters are not required, you can simply leave it as empty."},{title:"Query String Params -",text:"If query parameters are required in the API request, you have the option to send key-value pairs; else, if query parameters are unnecessary, leaving them empty is a valid choice."},{title:"Send As JSON -",text:'From the dropdown menu, you can select yes or no on the basis of your API response type. If the response type of API is JSON, select \u201cYes,\u201d and if the API response type is text, then select \u201cNo.\u201d Note that the default selection is "Yes."'},{title:"Basic Auth -",text:"If the API requires a basic type of authentication, you need to provide the username and password combination separated by a pipe (|) symbol. For example - username|password. However, if basic authentication is not required in the API request, you can leave this field empty."},{title:"Headers -",text:"If you want to add header parameters in the API request, you have the option to send key-value pairs. Alternatively, if header parameters are unnecessary, you can leave this section empty."},{title:"JQ Schema -",text:"In case the response type is JSON and you want to create knowledge base imports by selecting specific keys from the API response, you can supply a JQ schema. This ensures that only the keys mentioned in the JQ schema are utilized for creating the knowledge base. If your objective is to generate knowledge base imports encompassing all API response keys, you can leave this field empty."}]}],k=[{title:"Elastic Search URL:",points:[{text:"Access Elastic Search by logging in and then navigating to the Integrations section in the side menu bar."},{text:"Locate 'API' within the integration options list, and click on it."},{text:"Next, you'll be asked to create an Elastic Search index. Proceed by naming the index and leaving the Language Analyzer as default."},{text:"Once created, open the index and retrieve the base URL from the provided curl command used to add data via API."}]},{title:"Elastic Search Index Name:",points:[{text:"In the index name field, you can enter the name of an existing index from which you intend to extract the data."}]},{title:"Elastic Search Query:",points:[{text:"You can input a JSON query to retrieve filtered data from the ElasticSearch query. Alternatively, if you wish to extract all data without filters, you can leave the field as empty curly braces - {}."}]},{title:"Common Key:",points:[{text:"Within the index, it's essential for all objects to share at least one common key name, which needs to be specified in this field."}]},{title:"Elastic Search API Key:",points:[{text:"On the page where the Elastic Search URL was obtained, you'll find a button to manage API Keys. Utilize this button to generate an API Key, which is a mandatory requirement."}]}],M=[{title:"Table Name:",points:[{text:" In ServiceNow, tables are used to store data in a structured manner. Each table represents a specific type of record or data entity. "}]},{title:"Instance Name:",points:[{text:" An instance name refers to the unique identifier for a specific instance of the ServiceNow platform. Each ServiceNow instance has a distinct instance name. The format of the URL to access a ServiceNow instance typically looks like this: https://{instance-name}.service-now.com",link:["https://{instance-name}.service-now.com"]}]},{title:"Username:",points:[{text:" A username typically refers to the user's login name or user ID, which is used to access the ServiceNow platform."}]},{title:"Password:",points:[{text:" Password are used as a security measure to authenticate and grant access to the platform. Users are required to provide valid password to log in to the ServiceNow instance."}]},{title:"Skip:",points:[{text:" Skip method is used to skip a specified number of result set  in a table and retrieve the  result set that come after the skipped ones.        "}]},{title:"Limit:",points:[{text:" Limit method is used to specify the maximum number of entries that should be returned in the result. It allows you to control the size of the result set, which can be especially useful when dealing with large table.        "}]},{title:"Filter:",points:[{text:"Applying a filter implies a change in the display of the contents. Consequently, it will expect to see a change or expect to view only the information and elements that interest        "}]}],F=[{points:[{text:"To establish a knowledge base using these connectors, providing their public URLs is essential."},{text:'To get the public URL, click on the share button and in the "general access" dropdown, opt for "Anyone with the link." Afterward, copy the generated Public URL.'}]}],B=[{points:[{title:"Website URL -",text:"In this field, input any desired website URL from which data extraction is required."},{title:"Number of pages to index -",text:"Specify the crawling limit in this field to crawl additional website pages for data extraction. The maximum limit for crawling is 50 pages."}]}],G=[{title:"Host:",points:[{text:"The hostname of the Amazon Redshift cluster."},{text:"Example: 'example-cluster-name.region.redshift.amazonaws.com'"}]},{title:"DB Name:",points:[{text:"The name of the database you want to connect to."},{text:"Example: 'dev'"}]},{title:"Port:",points:[{text:"The port number used by the Amazon Redshift cluster for connections. The default port for Amazon Redshift is 5439."},{text:"Example: '5439'"}]},{title:"Username:",points:[{text:"The username used to authenticate and connect to the specified database."}]},{title:"Password:",points:[{text:"The password associated with the provided username for authentication."}]},{title:"Queries:",points:[{text:"An list of SQL queries that you want to execute after establishing the connection. These queries can be used for tasks like data retrieval."},{text:"Example:"},{text:"SET search_path to tickit', 'SELECT * FROM listing LIMIT 50;"}]}],j=[{title:"Directory (tenant) ID, Application (client) ID and Secret Value (Client Credentials):",points:[{text:"Navigate to Azure Portal."},{text:"Click on Azure Active Directory -> App registrations -> New registration."},{text:"Enter a name for the app and select the supported account types."},{text:"Click on Register. Note down the Application (client) ID and the Directory (tenant) ID values provided on the application overview page."},{text:"In the application's overview page, go to Certificates & secrets."},{text:"Click on New client secret."},{text:"Enter a description and an expiration date for the secret."},{text:"Click Add and note down the value of the Client Secret immediately."},{text:"In the application's overview page, navigate to API permissions -> Add a permission -> Microsoft APIs -> Choose Microsoft Graph -> Select Application permissions -> Add Files.Read.All and Sites.Read.All permissions."},{text:"In the API permissions tab, click on Grant admin consent for [Your Directory]. Confirm the action to grant the necessary permissions. Admin consent is required to use application permissions without user consent."}]},{title:"Important Note:",points:[{text:"An administrator of the Azure AD tenant must grant consent for these permissions. Until consent is granted, these permissions won't be effective. Make sure to coordinate with the Azure AD administrator to ensure that the necessary permissions are granted."}]},{title:"SharePoint URL:",points:[{text:"Navigate to the documents folder in your SharePoint site and copy the url, and then paste it."}]},{title:"Hostname, Site Name and Folder Path:",points:[{text:"Extract the hostname, site name and folder path from the SharePoint URL. For example, if the URL is:"},{text:"https://example.sharepoint.com/sites/Marketing/demo/docs/Forms/AllItems.aspx?e=2%GMd&at=9",link:["https://example.sharepoint.com/sites/Marketing/demo/docs/Forms/AllItems.aspx?e=2%GMd&at=9"]},{text:"The part of the URL before the first /sites/. In example URL, the hostname is [example.sharepoint.com]."},{text:"The part of the URL after the first /sites/ and before the next /. In example URL, the site name is Marketing."},{text:"The part of the URL after the site name and before the query parameters (? or #). Ignore unnecessary path components (Forms/AllItems.aspx). In example URL, the folder path is /demo/docs."},{text:"Note: Sometimes, the folder path might be present in the query parameters. Extract the folder path from the `id` value inside the query parameters after '/sites/<site name>'. Ignore unnecessary path components like '/Shared%20Documents' and 'Forms/AllItems.aspx'"}]},{title:"File Types:",points:[{text:"Provide a list of file extensions that need to be read, for example: pdf, csv, docx, etc."}]},{title:"Number of Files:",points:[{text:"Specify the maximum number of files that need to be read."}]},{title:"Date Range:",points:[{text:"The system will only pick the files that fall within the specified date range."}]}],H=[{title:"Directory (tenant) ID, Application (client) ID and Secret Value (Client Credentials):",points:[{text:"Navigate to Azure Portal."},{text:"Click on Azure Active Directory -> App registrations -> New registration."},{text:"Enter a name for the app and select the supported account types."},{text:"Click on Register. Note down the Application (client) ID and the Directory (tenant) ID values provided on the application overview page."},{text:"In the application's overview page, go to Certificates & secrets."},{text:"Click on New client secret."},{text:"Enter a description and an expiration date for the secret."},{text:"Click Add and note down the value of the Client Secret immediately."},{text:"In the application's overview page, navigate to API permissions -> Add a permission -> Microsoft APIs -> Choose Microsoft Graph -> Select Application permissions -> Add Files.Read.All and Sites.Read.All permissions."},{text:"In the API permissions tab, click on Grant admin consent for [Your Directory]. Confirm the action to grant the necessary permissions. Admin consent is required to use application permissions without user consent."}]},{title:"Important Note:",points:[{text:"An administrator of the Azure AD tenant must grant consent for these permissions. Until consent is granted, these permissions won't be effective. Make sure to coordinate with the Azure AD administrator to ensure that the necessary permissions are granted."}]},{title:"Team URL:",points:[{text:"In Microsoft Teams, Select the specific team for which you want to get the link, click on the three-dot menu icon, select 'Get link to team' and note down the team link displayed"}]},{title:"Team ID:",points:[{text:"Extract the Team ID from the team URL. For example, if the URL is:"},{anchor:["https://teams.microsoft.com/l/team/19:y_lncpknnm_5luofvbupb7g6eunkw5hbq3whexdts21v@thread.tacv2/conversations?groupId=8bfe0672-633b-11ee-8c99-0242ac120002&tenantId=7c58f2b8-633b-11ee-8c99-0242ac120002"]},{text:"Find the section after the question mark (?) in the URL, which contains query parameters."},{text:"Look for the parameter named 'groupId' within the query parameters. In the provided URL, the parameter 'groupId' is followed by an equals sign (=)."},{text:'Retrieve the characters after the equals sign (=) following "groupId". In the example URL (groupId=8bfe0672-633b-11ee-8c99-0242ac120002), the Group ID is 8bfe0672-633b-11ee-8c99-0242ac120002. Note down the group ID'}]},{title:"Query:",points:[{text:"Query to retrieve filtered messages from the team. You can use the $top "},{anchor:"https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#top-parameter"},{text:"query parameter to control the number of items. Additionally, $filter "},{anchor:"https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#filter-parameter"},{text:"is supported with dateTime range query on lastModifiedDateTime."},{text:"Example: {}"}]}],z=[{title:"Directory (tenant) ID, Application (client) ID and Secret Value (Client Credentials):",points:[{text:"Navigate to Azure Portal."},{anchor:["https://portal.azure.com/"]},{text:"Click on Azure Active Directory -> App registrations -> New registration."},{text:"Enter a name for the app and select the supported account types."},{text:"Click on Register. Note down the Application (client) ID and the Directory (tenant) ID values provided on the application overview page."},{text:"In the application's overview page, go to Certificates & secrets."},{text:"Click on New client secret."},{text:"Enter a description and an expiration date for the secret."},{text:"Click Add and note down the value of the Client Secret immediately."},{text:"In the application's overview page, navigate to API permissions -> Add a permission -> Microsoft APIs -> Choose Microsoft Graph -> Select Application permissions -> Add Files.Read.All and Sites.Read.All permissions."},{text:"In the API permissions tab, click on Grant admin consent for [Your Directory]. Confirm the action to grant the necessary permissions. Admin consent is required to use application permissions without user consent."}]},{title:"Important Note:",points:[{text:"An administrator of the Azure AD tenant must grant consent for these permissions. Until consent is granted, these permissions won't be effective. Make sure to coordinate with the Azure AD administrator to ensure that the necessary permissions are granted."}]},{title:"OneDrive URL (Recommended):",points:[{text:"Navigate to the documents folder in your OneDrive site and copy the url, and then paste it."}]},{title:"Hostname, Site Name and Folder Path:",points:[{text:"Extract the hostname, site name and folder path from the OneDrive URL. For example, if the URL is:"},{anchor:["https://example-my.sharepoint.com/personal/name_example_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%name%example%5Fcom%2FDocuments%2FDocs&view=0"]},{text:"The part of the URL before the first /personal/. In example URL, the hostname is [example-my.sharepoint.com]."},{text:"The part of the URL after the first /personal/ and before the next /. In example URL, the site name is name_example_com."},{text:"The part of the URL in the query parameters in `id` value after the /personal/<site name>. Ignore unnecessary path components (Documents). In example URL, the folder path is Docs."}]},{title:"File Types:",points:[{text:"Provide a list of file extensions that need to be read, for example: pdf, csv, docx, etc."}]},{title:"Number of Files:",points:[{text:"Specify the maximum number of files that need to be read."}]}],W=[{title:"GoogleDrive URL (Recommended):",points:[{text:"Navigate to the documents folder in your GoogleDrive site and copy the url, and then paste it."}]},{title:"File Types:",points:[{text:"Provide a list of file extensions that need to be read, for example: pdf, csv, docx, etc."}]},{title:"Limit:",points:[{text:"Limit method is used to specify the maximum number of documents that should be returned in the result set of a query. It allows you to control the size of the result set, which can be especially useful when dealing with large collections or when you only need a subset of documents from a query."}]},{title:"Skip:",points:[{text:"Skip method is used to skip a specified number of documents in a collection and retrieve the documents that come after the skipped ones. It is often used in combination with the find method to implement pagination or to skip a certain number of documents that do not need to be included in the result set."}]}],Y=[{value:"text-davinci-003",label:"text-davinci-003"},{value:"gpt-3.5-turbo",label:"gpt-3.5-turbo"},{value:"gpt-3.5-turbo-16k",label:"gpt-3.5-turbo-16k"},{value:"gpt-3.5-turbo-16k-0613",label:"gpt-3.5-turbo-16k-0613"},{value:"vicuna",label:"vicuna"}],K=[{value:"text-davinci-003",label:"text-davinci-003"},{value:"gpt-3.5-turbo",label:"gpt-3.5-turbo"},{value:"gpt-3.5-turbo-16k",label:"gpt-3.5-turbo-16k"},{value:"gpt-3.5-turbo-16k-0613",label:"gpt-3.5-turbo-16k-0613"},{value:"gpt-4",label:"gpt-4"},{value:"gpt-4-0613",label:"gpt-4-0613"},{value:"gpt-4-1106-preview",label:"gpt-4-1106-preview"},{value:"gpt-4-0125-preview",label:"gpt-4-0125-preview"},{value:"gpt-4-turbo-preview",label:"gpt-4-turbo-preview"},{value:"gpt-4-turbo-preview",label:"gpt-4-turbo-preview"},{value:"vicuna",label:"vicuna"}],V=[{value:"zbrain.cosine",label:"Zbrain Cosine"},{value:"langchain.hypothetical.multivector",label:"Langchain Hypthetical Multivector"},{value:"langchain.summary.multivector",label:"Langchain Summary Multivector"},{value:"langchain.smaller.multivector",label:"Langchain Smaller Multivector"},{value:"langchain.marginal.vectorbacked",label:"Langchain Marginal Vector Backed"},{value:"langchain.score.vectorbacked",label:"Langchain Score Vector Backed"},{value:"langchain.topk.vectorbacked",label:"Langchain TopK Vector Backed"},{value:"langchain.llmchainextractor.contextualcompression",label:"Langchain Extractor Contextual Retriever"},{value:"langchain.llmchainfilter.contextualcompression",label:"Langchain Filter Contextual Retriever"},{value:"langchain.embeddingsfilter.contextualcompression",label:"Langchain Embedding Filter Contextual Retriever"},{value:"langchain.stringingcompressor_with_documenttransformers.contextualcompression",label:"Langchain  Compressor Contextual Retriever"}],q={SUCCESS:"success",ERROR:"error"},Q=[{title:"MongoDB Connection String:",points:[{text:"To connect to your MongoDB database, please provide the MongoDB connection string. The connection string contains all the necessary information to establish a connection to your MongoDB server."},{text:"Example Connection String Format:"},{text:"mongodb+srv://username:password@cluster.mongodb.net/database?retryWrites=true&w=majority"}]},{title:"Collection Name:",points:[{text:"MongoDB Collection Name"}]},{title:"Query:",points:[{text:"To retrieve specific data from the MongoDB database, you can enter queries in a structured format. MongoDB queries consist of JSON-like documents that specify the conditions for data retrieval."},{text:"Example:"},{text:'{"field_name": "desired_value"}'}]},{title:"Limit:",points:[{text:"Limit method is used to specify the maximum number of documents that should be returned in the result set of a query. It allows you to control the size of the result set, which can be especially useful when dealing with large collections or when you only need a subset of documents from a query."}]},{title:"Skip:",points:[{text:"Skip method is used to skip a specified number of documents in a collection and retrieve the documents that come after the skipped ones. It is often used in combination with the find method to implement pagination or to skip a certain number of documents that do not need to be included in the result set."}]}],Z=[{title:"DB Name:",points:[{text:"Data Base name for Postgres"}]},{title:"Port:",points:[{text:"When you connect to a Postgres database from a client application, you typically specify the host and port as part of the connection string. If you don't explicitly specify a port number, most PostgreSQL client libraries and tools will assume the default port number 5432."}]},{title:"Username:",points:[{text:"Username is used to define user accounts that can access and interact with the database server. Each user has their own set of privileges and permissions within the database system, a default superuser named `postgres` is typically created. "}]},{title:"Password:",points:[{text:"Password to access and interact with database server."}]},{title:"Host:",points:[{text:"Host for a Postgres database connection refers to the location or address of the PostgreSQL server where your database is hosted. The host can be specified in different ways, depending on your setup and where the PostgreSQL server is located."}]},{title:"Query:",points:[{text:"To run queries in Postgres, you typically use SQL. Here are some common type of SQL queries you can run in PostgreSQL:"},{text:"Example:"},{text:"SELECT column1, column2 FROM table_name WHERE condition;"}]}],J=[{title:"Email:",points:[{text:"User email addresss"}]},{title:"Server URL:",points:[{text:"The server URL is the URL that you or your organization is using."},{text:"Example:- example.atlassian.net"}]},{title:"Space key:",points:[{text:"It is unique identifier assigned to each space within the confluence. A space is a container for pages, like a project or a department"},{text:"To find the space key in Confluence from the URLs:"},{text:"Example:- https://your-confluence-instance/wiki/spaces/{SPACEKEY}/pages/{PAGEID}/Page-Title"}]},{title:"Page Id:",points:[{text:"In Confluence, each page is assigned a unique Page ID. This Page ID is a numerical identifier that allows Confluence to distinguish one page from another, even if they have the same or similar names."},{text:"Example: https://example.atlassian.net/wiki/spaces/pages/{pageId}"}]},{title:"API Token:",points:[{text:"API tokens are used in place of traditional passwords to provide secure access to Confluence. Here's how you can generate and use an API token in Confluence:"},{text:"Here's how you can generate and use an API token in Confluence:"}]},{title:"Generating an API Token:",points:[{text:"Log in to Confluence: Log in to your Confluence account using your regular username and password."},{text:"Click on your profile picture or username in the top right corner."},{text:"Navigate to Your Profile Settings:"},{text:"Select Profile."},{text:"Click on Manage Your Account."},{text:"Then click on Security in header."},{text:"Then Create and Manage API Tokens or similar button."},{text:"Generate Token."},{text:"Once generated, copy the API token to a secure location. This token will not be shown again, so make sure to keep it safe."}]}],X=[{title:"Email:",points:[{text:"User email addresss"}]},{title:"Server URL:",points:[{text:"The server URL is the URL that you or your organization is using."},{text:"Example:- example.atlassian.net"}]},{title:"Project Query:",points:[{text:"To run queries in Jira, Query is written to filter out the data according to our requirements"},{text:"Example:- projectId ORDER BY created DESC"}]},{title:"API Token:",points:[{text:"API tokens are used in place of traditional passwords to provide secure access to Jira. Here's how you can generate and use an API token in Jira:"},{text:"Here's how you can generate and use an API token in Jira:"}]},{title:"Generating an API Token:",points:[{text:"Log in to Jira: Log in to your Jira account using your regular username and password."},{text:"Click on your profile picture or username in the top right corner."},{text:"Navigate to Your Profile Settings:"},{text:"Select Profile."},{text:"Click on Manage Your Account."},{text:"Then click on Security in header."},{text:"Then Create and Manage API Tokens or similar button."},{text:"Generate Token."},{text:"Once generated, copy the API token to a secure location. This token will not be shown again, so make sure to keep it safe."}]},{title:"Issue Limit:",points:[{text:"Limit method is used to specify the maximum number of documents that should be returned in the result set of a query. It allows you to control the size of the result set, which can be especially useful when dealing with large collections or when you only need a subset of documents from a query."}]},{title:"Start at:",points:[{text:"Skip method is used to skip a specified number of documents in a collection and retrieve the documents that come after the skipped ones. It is often used in combination with the find method to implement pagination or to skip a certain number of documents that do not need to be included in the result set."}]}],$=[{value:-1,label:"Newest first"},{value:1,label:"Oldest first"}],ee={PROCESSING:"PROCESSING",READY:"READY"},te=[{value:"VIEWER",label:"Viewer"},{value:"EDITOR",label:"Editor"}],ne="Please enter a value greater than 0",ae={ltr:"ltr",rtl:"rtl",placeholder:"editor-placeholder",paragraph:"editor-paragraph",list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listitem"}},oe=[{name:"Jira",logo:"/images/jira-plugin.svg"},{name:"Google Calendar",logo:"/images/google-calendar-plugin.svg"},{name:"Microsoft Calendar",logo:"/images/microsoft-calendar-plugin.svg"},{name:"Rest API Call",logo:"/images/rest-api-plugin.svg"}],se=150,ie=[{name:"Custom",label:"CUSTOM",inputs:[{name:"API Key",label:"apiKey",type:"password"},{name:"Base URL",label:"baseURL",type:"text"}]},{name:"OpenAI",label:"OPENAI",inputs:[{name:"API Key",label:"apiKey",type:"password"},{name:"Base URL",label:"baseURL",type:"text"}]},{name:"Azure OpenAI",label:"Azure",inputs:[{name:"API Key",label:"apiKey",type:"password"},{name:"Base URL",label:"baseURL",type:"text"}]},{name:"Google",label:"Google",inputs:[{name:"API Key",label:"apiKey",type:"password"},{name:"Base URL",label:"baseURL",type:"text"}]},{name:"Groq",label:"GROQ",inputs:[{name:"API Key",label:"apiKey",type:"password"},{name:"Base URL",label:"baseURL",type:"text"}]},{name:"Bedrock Claude",label:"CLAUDE",inputs:[{name:"Access Key",label:"awsAccessKey",type:"text"},{name:"Secret Key",label:"awsSecretKey",type:"password"},{name:"Region",label:"awsRegion",type:"text"}]}],re={SUBSCRIPTION:"SUBSCRIPTION",ADDON:"ADDON"},ce={ZBRAIN:"ZBRAIN",PIPEDRIVE:"PIPEDRIVE",HUBSPOT:"HUBSPOT"},le=[{icon:"/images/file-store-icon.svg",heading:"ZBrain S3 Storage",description:"Utilize ZBrain S3 Storage for enhanced data management and precise results without additional token costs.",value:"ZBRAIN",upcoming:!1}],ue=[{icon:"/images/ocr.svg",heading:"OCR",description:"This involves recognizing and extracting text content from images or documents to make it accessible for further processing or analysis.",value:"OCR"},{icon:"/images/analysis-image.svg",heading:"Analyis each page as an image using an LLM",description:"This treats each document page as an image, converts it to digital format, extracts text via OCR, and analyzes it with an LLM for insights or summaries.",value:"PAGE"},{icon:"/images/image-search.svg",heading:"Extract images from the document and then evaluate them using a LLM ",description:"This involves extracting images from a document and using an LLM to analyze their content, identifying objects, scenes, or patterns.",value:"IMAGES"}],de=[{icon:"/images/only-me-icon.svg",heading:"Only me",value:"ONLY_ME"},{icon:"/images/custom-icon.svg",heading:"Everyone",value:"ALL"}],he=[{value:"text-embedding-ada-002",label:"text-embedding-ada-002"},{value:"text-embedding-3-small",label:"text-embedding-3-small"},{value:"text-embedding-3-large",label:"text-embedding-3-large"},{value:"amazon.titan-embed-text-v1",label:"Amazon Titan Embeddings G1 - Text "},{value:"amazon.titan-embed-text-v2",label:"Amazon Titan Embeddings G1 - Text v2 "},{value:"voyage-law-2",label:"Voyage Law - 2"},{value:"voyage-code-2",label:"Voyage Code - 2"},{value:"voyage-3",label:"Voyage - 3"}],pe=[{value:"book",label:"Book"},{value:"businessDocument",label:"Business Document"},{value:"paper",label:"Paper"},{value:"personalDocument",label:"Personal Document"},{value:"socialMediaPost",label:"Social Media Post"},{value:"webPage",label:"Web Page"}],me=[{value:"english",label:"English"}],ge=[{value:"technology",label:"Technology"},{value:"education",label:"Education"}],Ee={automatic:"Set chunk and preprocessing rules automatically.\n  Users unfamiliar with the process are recommended to\n  select this option.",custom:"Customize chunks rules, chunks length, and\n  preprocessing rules, etc.",pinecone:"Leverage the scalability of Pinecone directly within\n  ZBrain for improved vector indexing and retrieval.",economical:"Use ZBrain's cost-effective vector store with\n  built-in vector engines and keyword indexes for\n  efficient data handling.",zbrainStorage:"Utilize ZBrain S3 Storage for enhanced data\n  management and precise results without additional\n  token costs.",vectorSearch:"Inverted Index is a structure used for efficient\n  retrieval. Organized by terms, each term points to\n  documents or web pages containing it.",fullTextSearch:"Index all terms in the document for users to search\n  and retrieve relevant text chunks.",hybridSearch:"Perform full-text and vector searches\n  simultaneously, then prioritize the best match for\n  the user's query through re-ranking. Configure the\n  Rerank model API accordingly.",newConnection:"Use your own vector store by providing the API key and credentials."},Te={success:"Document status updated successfully",error:"Failed to update the document status"},fe=[{name:"Overview",path:"/pricing/overview"},{name:"Billing history",path:"/pricing/history"},{name:"Credit Usage",path:"/pricing/credit-usage"},{name:"Usage Limit",path:"/pricing/usage-limit"}],ve={topK:"Set this value to specify the number of most similar results you want to see for a query.",scoreThreshold:"Adjust this value to filter search results based on relevance."},ye=[{value:"Chatbot",label:"Chatbot"}],be={flow:"ADVANCE",knowledgeBase:"BASIC",agents:"AGENT",app:"APP"},Ie={PENDING:"PENDING",IN_PROGRESS:"IN-PROGRESS",STAGED:"STAGED",CREATED:"CREATED",ERRORED:"ERRORED"},Se=[{name:"Processing",key:"IN-QUEUE"},{name:"Completed",key:"COMPLETED"},{name:"Failed",key:"ERRORED"}],Pe=[{value:"gpt-4o",label:"gpt-4o"},{value:"gpt-4-vision-preview",label:"gpt-4-vision-preview"},{value:"gpt-4-turbo",label:"gpt-4-turbo"},{value:"gpt-4-1106-vision-preview",label:"gpt-4-1106-vision-preview"}],we='You are a friendly and polite customer service agent for ZBrain. Your primary responsibility is to assist users by answering their questions accurately and courteously. Always respond in the same language the question is asked, regardless of the language of the text in the context.\n\nBehavior Guidelines:\n\nGreetings:\n\nRespond to greetings with appropriate and matching greetings.\nExample: If a user says "Hello," respond with "Hello! How can I assist you today?"\nHuman-like Interaction:\n\nRespond in a natural, conversational manner.\nAvoid robotic or overly formal language.\nShow empathy and support in your responses.\nAcknowledge user concerns and assure them that you are there to help.\nContextual Relevance:\n\nTailor your responses to the context provided.\nEnsure each response is relevant to the specific question and scenario.\nHandling Uncertainty:\n\nIf you cannot deduce the answer from the context, say:\n"I couldn\'t find a specific answer to your question. To assist you better, please provide additional details or rephrase your question. The more specific information you provide, the more accurate and helpful my response can be."\nAttention Required Responses:\n\nIf any previous conversation contains the line "This answer requires attention," and the same question is asked again, provide a proper answer ensuring it\'s not identical to the previous one.\nVisual Elements:\n\nDo not generate or display visual elements in your responses.',Ae={PENDING:"PENDING",RUNNING:"RUNNING",COMPLETED:"COMPLETED",ERRORED:"ERRORED"},Oe=[{image:"/images/efficient-data.svg",heading:"Efficient Data Processing and Retrieval",description:"ZBrain ingests data from multiple sources and performs chunk-level optimization for efficient processing. It automatically discovers optimal retrieval strategies to enhance data access and retrieval."},{image:"/images/build-workflows.svg",heading:"Effortless Creation of Business Logic Workflows",description:"Enables users to create complex business logic workflows for apps through its low-code interface, Flow. Users can integrate real-time data from various sources and use pre-built components for accelerated development."},{image:"/images/refine-ai.svg",heading:"Refine AI with Human Feedback",description:"Collects feedback on AI outputs, enabling operators to correct and guide the AI for improved performance. Refines AI application outputs and optimizes retrieval strategies based on human feedback."},{image:"/images/flexibility.svg",heading:"Flexibility with Any Model",description:"Seamlessly integrates proprietary models like GPT-4, Claude, and Gemini, as well as open-source models like Llama and Gemma, with the option for switching based on the user's needs."}],De={OVERVIEW:"OVERVIEW",TEST_WORKER:"TEST_WORKER"},Re={TEXT:"TEXT",SHORT_TEXT:"SHORT_TEXT",LONG_TEXT:"LONG_TEXT",SECRET_TEXT:"SECRET_TEXT",NUMBER:"NUMBER",DATE:"DATE",DROPDOWN:"DROPDOWN",STATIC_DROPDOWN:"STATIC_DROPDOWN",CHECKBOX:"CHECKBOX",DYNAMIC:"DYNAMIC",CUSTOM_AUTH:"CUSTOM_AUTH",DATE_TIME:"DATE_TIME",FILE:"FILE",OAUTH2:"OAUTH2",SECRET_TEXT:"SECRET_TEXT",ARRAY:"ARRAY",OBJECT:"OBJECT",BASIC_AUTH:"BASIC_AUTH",JSON:"JSON",MULTI_SELECT_DROPDOWN:"MULTI_SELECT_DROPDOWN",STATIC_MULTI_SELECT_DROPDOWN:"STATIC_MULTI_SELECT_DROPDOWN",TRIGGER:"TRIGGER",KNOWLEDGE_BASE:"KNOWLEDGE_BASE",CO_WORKER:"CO_WORKER",VARIABLES:"VARIABLES",SUB_AGENT:"SUB_AGENT",APP:"APP"},_e={COMPLETED:"Completed","IN-QUEUE":"Processing","IN-PROGRESS":"Processing",ERRORED:"Errored"},Ce=["Don't like the style","Not factually correct","Response not updated","Not following company's guidelines","Others"],Ne=[{name:"openai",icon:"/images/openai.svg"},{name:"dropbox",icon:"/images/dropbox.svg"},{name:"sheets",icon:"/images/google-sheets-logo.jpg"},{name:"drive",icon:"/images/google-drive-logo.svg"},{name:"docs",icon:"/images/google-docs-logo.png"}]},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(48),o=n(11);const s=new a.a,i={setDataInCookies:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;const a=o.a.addDays(new Date,n);s.set(t,JSON.stringify(e),{path:"/",expires:a})},getDataFromCookies:function(e){return s.get(e)},removeDataFromCookies:function(e){s.remove(e,{path:"/"})},setCookieWithExpire:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60;const a=new Date((new Date).getTime()+60*n*1e3);s.set(e,t,{expires:a})},removeAllCookies:function(){const e=s.getAll();Object.keys(e).forEach(e=>{s.remove(e,{path:"/"})})}}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(6);const o=Object(a.createBrowserHistory)()},,,function(e,t,n){"use strict";var a=n(8),o=n(30),s=n.n(o),i=n(25),r=n(2);const c=n(49),l={getHeader:function(){},apiFailureToast:function(e){Object(i.a)({message:e||"apiConstant.API_FAILURE",type:r.Bb.ERROR})},apiSuccessToast:function(e){Object(i.a)({message:e||"apiConstant.API_SUCCESS",type:r.Bb.SUCCESS})},generateGUID:function(){const e=window.navigator,t=window.screen;let n=String(e.mimeTypes.length);return n+="".concat(e.userAgent.replace(/\D+/g,"")),n+="".concat(e.plugins.length),n+="".concat(t.height||""),n+="".concat(t.width||""),n+="".concat(t.pixelDepth||""),n},basicAlert:u,validationAlert:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";s()({title:e,icon:t})},isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},emailShortner:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:18,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3;return h(e,t,n,a)},navigateToPath:function(e){a.a.push(e)},toggleDropDown:function(e){},validateName:function(e){return/[A-Z][a-zA-Z]*/.test(e)},validateEmail:function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},isEmpty:function(e){return!e||0===e.trim().length},isMenuActive:function(e){return window.location.pathname.includes(e)},isPasswordValid:function(e){return/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/.test(e)},showUnderDevelopment:function(){u("Under Development")},epochToDate:d,dateCompare:function(e,t){return(1e3*e-t)/864e5},tokenShorten:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3;return h(e,t,n,a)},getTimeFromNow:function(e){return c(e,"YYYYMMDD").fromNow()},epocToPrettyTime:function(e){e=Math.floor(e);const t=(new Date).getTime(),n=Math.floor(t/1e3),a=new Date(e),o=Math.floor(a.getTime()/1e3),s=n-o,i=new Date;i.setHours(0,0,0,0);const r=Math.floor(i.getTime()/1e3);if(s<60)return"Just now";const l=Math.floor(s/60);if(l<60)return 1===l?"1 min ago":l+" min ago";if(Math.floor(s/3600)<24&&o>=r)return"Today "+c(a).format("hh:mm A");return c(a).format("DD MMM YY, h:mm A")},getTimeDifference:function(e){let t="",n=d(e,"hh"),a=d(e,"mm"),o=d(e,"DD MMM YYYY"),s=new Date(e).getHours(),i=(new Date).getTime()-e;t=i<864e5?i<3e5?"Just Now":s<12?"Today at "+n+":"+a+" AM":"Today at "+n+":"+a+" PM":s<12?o+", "+n+":"+a+" AM":o+", "+n+":"+a+" PM";return t},parseResponse:function(e){return e.then(e=>[null,e]).catch(e=>[e])},storeToLocalStorage:function(e,t){localStorage.setItem(e,JSON.stringify(t))},getDataFromLocalStorage:function(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},generateScript:function(e){return'<script>\n  document.addEventListener("DOMContentLoaded", function () {\n    var image = document.createElement("img");\n    var chatIcon =\n      "https://d3tfuasmf2hsy5.cloudfront.net/assets/chatwidget.png";\n    var closeIcon =\n      "https://d3tfuasmf2hsy5.cloudfront.net/assets/closewidgget.png";\n    image.src = chatIcon;\n    image.style.width = "80px";\n    image.style.cursor = "pointer";\n    image.style.borderRadius = "100%";\n    image.style.position = "fixed";\n    image.style.bottom = "20px";\n    image.style.right = "20px";\n    image.style.zIndex = "1000";\n\n    var iframe = document.createElement("iframe");\n    iframe.src =\n      "'.concat(e,'"\n    iframe.style.width = "100%";\n    iframe.style.height = "100%";\n    iframe.style.border = "1px solid #DEDEDE";\n    iframe.style.borderRadius = "16px";\n    iframe.style.display = "none";\n    iframe.style.zIndex = "1000";\n\n    function toggleIframe() {\n      if (iframe.style.display === "none") {\n        iframe.style.display = "block";\n        image.src = closeIcon;\n      } else {\n        iframe.style.display = "none";\n        image.src = chatIcon;\n      }\n    }\n\n    image.addEventListener("click", toggleIframe);\n\n    var container = document.createElement("div");\n    var viewportWidth = window.innerWidth || document.documentElement.clientWidth;\n\n    container.style.position = "fixed";\n    container.style.height = "600px";\n    container.style.bottom = "100px";\n    container.style.zIndex = "1000";\n\n    if (viewportWidth < 450) {\n      container.style.width = "100%";\n      container.style.paddingRight = "10px";\n      container.style.paddingLeft = "10px";\n    } else {\n      container.style.right = "20px";\n      container.style.width = "450px";\n    }\n\n    container.appendChild(image);\n    container.appendChild(iframe);\n\n    document.body.appendChild(container);\n  });\n<\/script>')},capitalizeFirstLetter:function(e){if(!e)return;return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},formatDate:function(e){const t=new Date(1e3*e),n=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),o=t.getFullYear(),s=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");return"".concat(n,"/").concat(a,"/").concat(o,", ").concat(s,":").concat(i)},formatSessionTime:function(e){const t=new Date(e),n=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getFullYear()).slice(-2),s="".concat(n,"/").concat(a,"/").concat(o),i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return"".concat(s," ").concat(i)},shorten:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4;return h(e,t,n,a)},objectsAreEqual:function(e,t){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(let o of n)if(e[o]!==t[o])return!1;return!0},emailShorten:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:11,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3;return h(e,t,n,a)},formatDateTime:function(e){const t=new Date(e),n=t.getDate(),a=t.toLocaleString("default",{month:"short"}),o=t.getFullYear(),s=t.getHours(),i=t.getMinutes(),r=s>=12?"PM":"AM",c=s%12===0?12:s%12;return"".concat(n," ").concat(a," ").concat(o,", ").concat(c,":").concat(i.toString().padStart(2,"0")," ").concat(r)},convertDecimal:function(e){return e%1===0?e:parseFloat(e.toFixed(2))},createWidgetScript:function(e){const t=window.location.host,n=new URL("https://app.zbrain.ai:3000").host,a=(o="".concat(t,"&&").concat(n),btoa(o));var o;return'<script type="text/javascript">\n  window.ZBRAIN_APP = "'.concat(a,'";\n  window.ZBRAIN_TENANT_ID = "').concat(e.tenantId,'";\n  window.ZBRAIN_WIDGET_ID = "').concat(e.appId,'";\n  window.QUERY_STRING_PARAMETERS = "";\n  (function () {\n    d = document;\n    s = d.createElement("script");\n    s.src = "').concat(window.location.origin,'/script.js";\n    s.async = 1;\n    d.getElementsByTagName("head")[0].appendChild(s);\n  })();\n<\/script>')},companyNameShortner:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:12,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return h(e,t,n,a)},epocToPrettyDateTime:function(e){const t=new Date(e);return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric",hour12:!0,day:"numeric",month:"short",year:"numeric"}).format(t)},formatCreditsDecimal:function(e){return Math.abs(e-Math.round(e))>5e-6?e.toFixed(5).replace(/\.?0+$/,""):e},numberWithCommas:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},isUnlimited:function(e){return"string"===typeof e&&"unlimited"===e.toLowerCase()},convertEpochToDateTime:function(e){var t=new Date(parseInt(e)),n=t.getHours(),a=t.getMinutes(),o=t.toLocaleString("en-us",{month:"long"}),s=t.getDate(),i=t.getFullYear(),r=n>=12?"PM":"AM";n>12&&(n-=12);return n+":"+(a=(a<10?"0":"")+a)+" "+r+", "+s+" "+o+" "+i},formatDateWithAmPm:function(e){const t=new Date(e),n=t.getHours(),a=t.getMinutes(),o=n>=12?"PM":"AM",s=n%12===0?12:n%12,i=a<10?"0"+a:a,r=String(t.getDate()).padStart(2,"0"),c=String(t.getMonth()+1).padStart(2,"0"),l=t.getFullYear();return"".concat(s,":").concat(i).concat(o," ").concat(r,"-").concat(c,"-").concat(l)},convertSecondsToReadableTime:function(e){const t=Math.floor(e/60),n=Math.floor(e%60);return t>0?"".concat(t,"m ").concat(n,"s"):"".concat(n,"s")},formatDateHoursMinutes:function(e){return new Date(e).toLocaleString("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"})},capitalizeWords:function(e){return e?e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""},truncateText:function(e,t){return e.length>t?e.substring(0,t)+"...":e},epocToPrettyTimeV2:function(e){e=Math.floor(e);const t=(new Date).getTime(),n=Math.floor(t/1e3),a=new Date(e),o=Math.floor(a.getTime()/1e3),s=n-o,i=new Date;i.setHours(0,0,0,0);const r=Math.floor(i.getTime()/1e3);if(s<60)return"Just now";const l=Math.floor(s/60);if(l<60)return 1===l?"1 minute ago":l+" minutes ago";if(Math.floor(s/3600)<24&&o>=r)return"Today "+c(a).format("hh:mm A");return c(a).format("DD/MM/YY")},getStatusAttributes:function(e){return{COMPLETED:{color:"bg-green-11953E",tooltip:"Completed"},"IN-QUEUE":{color:"bg-orange-10",tooltip:"Processing"},"IN-PROGRESS":{color:"bg-orange-10",tooltip:"Processing"},ERRORED:{color:"bg-red-FF2116",tooltip:"Failed"}}[e]||{color:"bg-gray-10",tooltip:"Unknown Status"}},formatNumber:function(e){if(e>=1e3)return(e/1e3).toFixed(1).replace(/\.0$/,"")+"k";return e},getFileNameWithoutExtension:function(e){if(!e)return"";const t=e.lastIndexOf(".");return-1===t?e:e.substring(0,t)},convertToMarkup:function(e){e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^# (.+)$/gm,'<h1 style="font-size: 32px; font-weight: semibold; font-style: Poppins;">$1</h1>')).replace(/^## (.+)$/gm,'<h2 style="font-size: 32px; font-weight: semibold;">$1</h2>')).replace(/^### (.+)$/gm,'<h3 style="font-size: 32px; font-weight: semibold;">$1</h3>')).replace(/^#### (.+)$/gm,'<h4 style="font-size: 30px; font-weight: semibold;">$1</h4>')).replace(/\*(.*?)\*/g,'<strong style="font-weight: bold;">$1</strong>')).replace(/_(.*?)_/g,"<em>$1</em>")).replace(/^(?!<h[1-4]|\*|_|<hr>|\s*---)(.+)$/gm,'<p style="font-size: 17px;">$1</p>')).replace(/^---$/gm,"<hr>")).replace(/\s*<p>\s*<\/p>\s*/g,"")).replace(/\s*(<p>.*?<\/p>)\s*/g,"$1");return"<style>p { margin-bottom: 1.5em; }</style>"+e},getConnectionIcons:function(e){const t=r.u.find(t=>e.toLowerCase().includes(t.name.toLowerCase()));return t?t.icon:"/images/zbrain-icon.svg"},formatDuration:function(e){const t=e/1e3,n=Math.floor(t/3600),a=Math.floor(t%3600/60),o=t%60;let s="";n>0&&(s+="".concat(n,"h "));a>0&&(s+="".concat(a,"m "));0===n&&0===a?s+=e<1e3?"".concat(Math.floor(e),"ms"):"".concat(o.toFixed(2),"s"):o>0&&(s+="".concat(o.toFixed(0),"s"));return s.trim()}};t.a=l;function u(e){s()({title:e,icon:"/images/alert-icon.png"})}function d(e,t){e=Math.floor(e);let n=new Date(e);return c(n).format(t)}function h(e,t,n,a){return"string"===typeof e&&e.length>t+n?function(e,t,n,a){return"".concat(e.slice(0,t)).concat(".".repeat(a)).concat(e.slice(-n))}(e,t,n,a):e}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return ye})),n.d(t,"a",(function(){return Ie}));var a=n(1),o=n(2),s=n(3);const{METHOD_TYPE:{POST:i,GET:r,PUT:c,DELETE:l,PATCH:u},API_END_POINT:{GET_KNOWLEDGE_BASES:d,GET_KNOWLEDGE_BASE_BY_ID:h,KNOWLEDGE_BASE_IMPORT_FILE:p,IMPORT_KNOWLEDGE_BASE_IMPORT_FILE:m,IMPORT_ESIMATE:g,IMPORT_INIT:E,QUERY:T,CHATBOT:f,APPS:v,MANAGE_APPS:y,QUERY_HISTORY:b,DELETE_APP:I,IMPORT_KNOWLEDGE_BASE:S,BOT_ICON:P,GET_API_KEY:w,BOT_LOGO:A,SUGGESTIONS:O,SAVE_SUGGESTIONS:D,LIKE_DISLIKE_QUERY:R,VIEW_EXTRACTED_DATA:_,CHAT_USER:C,QUERY_SESSION:N,CHECK_CSV_EXIST:U,GET_SCHEMA_DETAILS:L,REGENERATE_API_KEY:x,BOT_PERFORMANCE:k,REMOVE_SCHEMA:M,RUN_PERFORMANCE_TEST:F,REVERT_APP_SETTINGS:B,ACCOUNT_COMPLETION:G,ACTION_STEPS:j,GOOGLE_SEARCH:H,SEARCH_LLM:z,GET_QUERY_INFO:W,SUMMARIZE_DOC:Y,SUMMARIZE_DOC_AND_SAVE:K,SUMMARIZE_MODEL:V,CONNECTIONS_LIST:q,SUMMARISED_IMPORT:Q,MODEL:Z,SAVE_MODEL:J,UPDATE_MODEL:X,UPDATE_CONTENT:$,REVERT_VERSION:ee,UPDATE_PIPEDRIVE:te,RETRIEVAL_HISTORY:ne,ORCHESTRATOR_FLOWS:ae,FEEDBACK_DATA:oe,V2:se,DELETE_CHUNK:ie,CONNECTIONS:re,CONNECTION:ce,CONNECTIONS_REQUIRED_CONFIGURATIONS:le,AUTH_TOKEN:ue,APP_CONNECTIONS:de,KNOWLEDGE_BASE_IMPORT_BY_API:he},API_END_POINT_V2:{AGENTS:pe,AGENT:me,TOOLS:ge,TOOL:Ee,LOGS:Te}}=o.I,{AUTH0_ID_TOKEN:fe}=o.P;function ve(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.a.getDataFromCookies(fe))}}function ye(){return{Authorization:"Bearer ".concat(s.a.getDataFromCookies(fe))}}const be=async function(e,t,n,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"https://app.zbrain.ai:3000";const s=new URLSearchParams(t).toString();return new Promise((t,i)=>{fetch(o+"".concat(e,"?").concat(s),{method:a,headers:ye(),body:n}).then(async e=>{try{const n=await e.json();if(!n.success){if(401===Number(n.responseCode))return i();const t=500===n.responseCode?n:(null===n||void 0===n?void 0:n.message)||e.statusText;return i(t)}return t(n.responseData)}catch(n){i(n)}}).catch(i)})};class Ie{constructor(){var e=this;this.baseUrl="https://app.zbrain.ai:3000",this.importServiceBaseUrl="https://app.zbrain.ai:3003",this.toolBaseUrl="https://app.zbrain.ai:8080",this.queryEngineBaseUrl="https://app.zbrain.ai:3002",this.localUrl="http://localhost:3010",this.getApps=async e=>{const t=e?"".concat(v,"?").concat(new URLSearchParams(e).toString()):v;return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+t,{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.knowledgeBaseImportFile=async(e,t)=>be(m,e,t,i,this.importServiceBaseUrl),this.updateBotIcon=async(e,t)=>be(P,e,t,c),this.updateBotLogo=async(e,t)=>be(A,e,t,c),this.getQueryHistory=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(b,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.setQueryFeedback=async e=>new Promise((t,n)=>{Object(a.a)(c,this.baseUrl+"".concat(oe),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.deleteApp=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(l,this.baseUrl+"".concat(I,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.updateApp=async e=>(e&&""===e.themeName&&delete e.themeName,new Promise((t,n)=>{Object(a.a)(c,this.baseUrl+"/".concat("manage-app"),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})),this.getKnowledgeBases=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(d,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getOrchestratorFlows=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.toolBaseUrl+"".concat(ae,"?").concat(t),{}).then(t=>t.success?e(t):n(t)).catch(n)})},this.getKnowledgeBaseById=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(r,this.baseUrl+"".concat(h,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.getTextRefinementData=async(e,t)=>new Promise((n,o)=>{Object(a.a)(r,this.importServiceBaseUrl+"".concat(m,"?kbImportIds=").concat(t,"&tenantId=").concat(e),{},ve()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)}),this.postTextRefinementData=async e=>new Promise((t,n)=>{Object(a.a)(i,this.importServiceBaseUrl+g,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.importInit=async e=>new Promise((t,n)=>{Object(a.a)(i,this.importServiceBaseUrl+E,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.knowledgeBaseImportDoc=async(e,t)=>{const n=new URLSearchParams(e).toString();return new Promise((e,o)=>{Object(a.a)(i,this.importServiceBaseUrl+"".concat(p,"?").concat(n),t,ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):o(t)).catch(o)})},this.deleteAppById=async e=>{let t=this.baseUrl+o.I.API_END_POINT.MANAGE_APPS;return new Promise((n,s)=>{Object(a.a)(o.I.METHOD_TYPE.DELETE,t,e,ve()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):s(e)).catch(s)})},this.queryChatbot=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+T,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.querySuggestions=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(O,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.updateSuggestions=async e=>new Promise((t,n)=>{Object(a.a)(c,this.baseUrl+"".concat(D),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getApp=async(e,t)=>{const n="".concat(f,"/").concat(e,"?").concat(new URLSearchParams(t).toString());return new Promise((e,t)=>{Object(a.a)(r,this.baseUrl+n,{},ve()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.saveKnowledgeBaseByReferId=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+S,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getTenentQueryHistory=async e=>{const t="?tenantId=".concat(e),n=await Object(a.a)(o.I.METHOD_TYPE.GET,this.baseUrl+o.I.API_END_POINT.GET_QUERY_HISTORY+t,null,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getTenetBotPerformance=async e=>{const t="?tenantId=".concat(e),n=await Object(a.a)(o.I.METHOD_TYPE.GET,this.baseUrl+o.I.API_END_POINT.GET_PERFORMANCE_TEST+t,null,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getTenetGoldenQuestion=async e=>{const t="?tenantId=".concat(e),n=await Object(a.a)(o.I.METHOD_TYPE.GET,this.baseUrl+o.I.API_END_POINT.GET_GOLDEN_QUESTION+t,null,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getApiKey=async(e,t)=>new Promise((n,o)=>{Object(a.a)(r,this.baseUrl+w+"?tenantId=".concat(e,"&userId=").concat(t),{},ve()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)}),this.getSchemaList=async e=>{let{tenantId:t,knowledgeBaseId:n,schemaId:o}=e;return new Promise((e,s)=>{Object(a.a)(r,this.baseUrl+L+"?knowledgeBaseId=".concat(n,"&tenantId=").concat(t,"&schemaId=").concat(o),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):s(t)).catch(s)})},this.removeSchema=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+M,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.updateLikeDislike=async e=>new Promise((t,n)=>{fetch(this.baseUrl+R,{method:c,body:JSON.stringify(e),headers:ve()}).then(async e=>{try{const a=await e.json();if(!a.success){if(401===Number(a.responseCode))return n();const t=500===a.responseCode?a:(null===a||void 0===a?void 0:a.message)||e.statusText;return n(t)}return t(a.responseData)}catch(a){console.log("err",a),n(a)}}).catch(n)}),this.getSummarisedImport=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(Q,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.viewExtractedData=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+_,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.regenerateApiKey=async e=>{let t={"Content-Type":"application/json",Authorization:"Bearer ".concat(e.ApiKey)};return new Promise((n,o)=>{Object(a.a)(i,this.baseUrl+x,e,t).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.queryFlow=async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new AbortController;const a="?".concat(new URLSearchParams(t).toString()),s=await fetch(e.queryEngineBaseUrl+o.I.API_END_POINT.QUERY_FLOW+a,{method:r,headers:ve(),signal:n.signal}).then(e=>e.json());if(!s.success||200!==s.responseCode)throw s;return null===s||void 0===s?void 0:s.responseData},this.chatUserInfo=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+C,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getQuerySession=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(N,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.checkIsCSVExist=async e=>{const t=await Object(a.a)(r,"".concat(this.baseUrl).concat(U,"?").concat(e),null,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.getBotPerformance=async function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new URLSearchParams(t).toString(),s=await Object(a.a)(r,"".concat(e.baseUrl).concat(k,"?").concat(o),{},ve());if(!s.success||200!==s.responseCode)throw s;return n?s:null===s||void 0===s?void 0:s.responseData},this.getToolsQuery=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(H,"?").concat(t),{},ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getToolsPrompt=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(z,"?").concat(t),{},ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.runPerformanceTest=async e=>{const t=await Object(a.a)(i,"".concat(this.baseUrl).concat(F),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.revertAppSettings=async e=>{const t=await Object(a.a)(c,"".concat(this.baseUrl).concat(B),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.deleteVersion=async(e,t)=>{const n=await Object(a.a)(l,"".concat(this.baseUrl).concat(k,"/").concat(e),t,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.updateAccuracy=async(e,t)=>{const n=await Object(a.a)(u,"".concat(this.baseUrl).concat(k,"/").concat(e),t,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.actionStepsConfigure=async e=>new Promise((t,n)=>{fetch(this.baseUrl+j,{method:o.I.METHOD_TYPE.POST,headers:ye(),body:e}).then(async e=>{try{const a=await e.json();if(!a.success){if(401===Number(a.responseCode))return n();const t=500===a.responseCode?a:(null===a||void 0===a?void 0:a.message)||e.statusText;return n(t)}return t(a.responseData)}catch(a){n(a)}}).catch(n)}),this.getAccountCompletion=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(G,"?").concat(t),null,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.summarizeDoc=async e=>{const t=await Object(a.a)(i,"".concat(this.baseUrl).concat(Y),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.summarizeDocandSave=async e=>{const t=await Object(a.a)(i,"".concat(this.importServiceBaseUrl).concat(K),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.getSummarizeModel=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(V,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.updateContent=async e=>new Promise((t,n)=>{Object(a.a)(i,this.importServiceBaseUrl+$,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.deleteChunk=async e=>new Promise((t,n)=>{Object(a.a)(l,this.importServiceBaseUrl+ie,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.revertImportVersion=async e=>{const t=await Object(a.a)(c,"".concat(this.baseUrl).concat(ee),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.createModel=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+J,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.updateModel=async(e,t)=>new Promise((n,o)=>{Object(a.a)(c,this.baseUrl+X+"/".concat(e),t,ve()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)}),this.deleteModel=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(l,this.baseUrl+"".concat(Z,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.getPipeDriveDetail=async(e,t,n)=>{const o="?tenantId=".concat(e,"&companyId=").concat(t,"&userId=").concat(n);return new Promise((e,t)=>{Object(a.a)(r,this.baseUrl+te+o,{},ve()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.getRetrivalHistory=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(ne,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getReviewDataInChunk=async(e,t)=>{const n="/".concat(t,"?tenantId=").concat(e),s=await Object(a.a)(o.I.METHOD_TYPE.GET,this.importServiceBaseUrl+o.I.API_END_POINT.REVIEW_DATA_IN_CHUNKS+n,null,ve());if(!s.success||200!==s.responseCode)throw s;return null===s||void 0===s?void 0:s.responseData},this.createNewChunkInImport=async e=>new Promise((t,n)=>{Object(a.a)(i,this.importServiceBaseUrl+o.I.API_END_POINT.CREATE_UPDATE_CHUNK,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.updateMetaDataImport=async e=>new Promise((t,n)=>{Object(a.a)(u,"".concat(this.importServiceBaseUrl).concat(o.I.API_END_POINT.UPDATE_META_DATA),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getAnalytics=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(o.I.API_END_POINT.ANALYTICS,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getQueryDataById=async e=>{let{tenantId:t,appId:n,queryId:s}=e;const i=new URLSearchParams({tenantId:t,appId:n}).toString(),c=await Object(a.a)(r,"".concat(this.baseUrl).concat(o.I.API_END_POINT.QUERYDETAIL,"/").concat(s,"?").concat(i),null,ve());if(!c.success||200!==c.responseCode)throw c;return null===c||void 0===c?void 0:c.responseData},this.getInfomationSchema=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(o.I.API_END_POINT.INFORMATION_SCHEMA,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.updateChunkInImport=async e=>new Promise((t,n)=>{Object(a.a)(u,"".concat(this.importServiceBaseUrl).concat(o.I.API_END_POINT.CREATE_UPDATE_CHUNK),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getReports=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(o.I.API_END_POINT.REPORTS,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getReportByFilters=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(o.I.API_END_POINT.REPORTS_FILTER,"?").concat(t),e,ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getInformationSchemas=async e=>{const t=new URLSearchParams(e).toString(),n=await Object(a.a)(r,"".concat(this.baseUrl).concat(se.INFO_SCHEMAS,"?").concat(t),{},ve());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.getInformationSchema=async e=>{const t=e.schemaId;delete e.schemaId;const n=new URLSearchParams(e).toString(),o=await Object(a.a)(r,"".concat(this.baseUrl).concat(se.INFO_SCHEMA,"/").concat(t,"?").concat(n),{},ve());if(!o.success||200!==o.responseCode)throw o;return null===o||void 0===o?void 0:o.responseData},this.createInformationSchema=async e=>{const t=await Object(a.a)(i,"".concat(this.baseUrl).concat(se.INFO_SCHEMA),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.deleteInformationSchema=async e=>{const t=await Object(a.a)(l,"".concat(this.baseUrl).concat(se.INFO_SCHEMA,"/").concat(e.schemaId),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.runInformationSchema=async e=>{const t=await Object(a.a)(i,"".concat(this.baseUrl).concat(se.INFO_SCHEMA_RUN),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.addColumn=async e=>{const t=await Object(a.a)(i,"".concat(this.baseUrl).concat(se.INFO_SCHEMA_COLUMN),e,ve());if(!t.success||200!==t.responseCode)throw t;return null===t||void 0===t?void 0:t.responseData},this.getConnections=async e=>new Promise((t,n)=>{Object(a.a)(r,this.baseUrl+re+"?tenantId=".concat(e),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getRequiredConfigurations=async e=>new Promise((t,n)=>{Object(a.a)(r,this.baseUrl+le+'?findObj={"service": "VECTOR_STORE"}&tenantId='.concat(e),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.addConnection=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+ce,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getAgents=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(pe,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getAgentById=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(r,this.baseUrl+"".concat(me,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.deleteAgent=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(l,this.baseUrl+"".concat(me,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})},this.updateAgentStatus=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+"".concat(me),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.saveAgentDetails=async e=>new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+"".concat(me),e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getTools=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(ge,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getTool=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(Ee,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.authToken=async e=>{try{const t=await fetch(this.toolBaseUrl+"".concat(ue),{method:"POST",headers:ve(),body:JSON.stringify(e)});if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return await t.json()}catch(t){throw console.error("Error fetching authToken:",t),t}},this.getToolConnections=async e=>{const t=new URLSearchParams(e).toString(),n=JSON.parse(sessionStorage.getItem("authTokenData")),a=n?n.token:"";try{const e=await fetch("".concat(this.toolBaseUrl).concat(de,"?").concat(t),{method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)}});return await e.json()}catch(o){throw console.error("Error fetching tool connections:",o),o}},this.addNewConnection=async e=>{const t=JSON.parse(sessionStorage.getItem("authTokenData")),n=t?t.token:"";try{const t=await fetch(this.toolBaseUrl+"".concat(de),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify(e)});if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return await t.json()}catch(a){throw console.error("Error fetching authToken:",a),a}},this.getLogs=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(r,this.baseUrl+"".concat(Te,"?").concat(t),{},ve()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.deleteConnection=async(e,t)=>{new URLSearchParams(t).toString();const n=JSON.parse(sessionStorage.getItem("authTokenData")),a=n?n.token:"";try{const t=await fetch(this.toolBaseUrl+"".concat(de,"/").concat(e),{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(a)}});if(!t.ok)throw new Error("HTTP error! Status: ".concat(t.status));return await t.json()}catch(o){throw console.error("Error fetching authToken:",o),o}}}manageCreateApps(e){return new Promise((t,n)=>{Object(a.a)(i,this.baseUrl+y,e,ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})}getAppsById(e,t){const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(r,"".concat(this.baseUrl).concat(y,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})}getQueryById(e,t){const n=new URLSearchParams(t).toString();return new Promise((t,o)=>{Object(a.a)(r,"".concat(this.baseUrl).concat(W,"/").concat(e,"?").concat(n),{},ve()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})}}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var a=n(1),o=n(2),s=n(3),i=n(20);const{AUTH0_ID_TOKEN:r,APP_USER_AUTH0_ID_TOKEN:c}=o.P,{METHOD_TYPE:{POST:l,GET:u,PUT:d,PATCH:h},API_END_POINT:{LOGIN_WITH_GOOGLE:p,SEND_INVITATION:m,GET_TENANT_MEMBERS:g,REMOVE_CHATBOT_ACCESS:E,GET_TENANT:T,WAIT_LIST_USER:f,UPDATE_TENANT:v,EDIT_USER:y,VALIDATE_INVITE:b,APP_ACCESS:I,SAVE_USER:S,EMAIL_VERIFICATION:P,CHANGE_PASSWORD:w,CHANGE_USER_PASSWORD:A,INVITE_TENANT:O,GET_INVITE_DETAILS:D,GET_INVITED_USERS:R,REMOVE_USER_ACCESS:_,GET_TENANT_DETAILS:C,CHANGE_USER_STATUS:N,VALIDATE_PLATFORM_INVITE:U,SEND_ADMIN_INVITE:L}}=o.I;function x(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.a.getDataFromCookies(r))}}class k{constructor(){this.baseUrl="https://app.zbrain.ai:3001",this.localUrl="http://localhost:3002",this.saveUser=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+p,e).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.saveGoogleUser=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+S,e).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.sendInvite=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+m,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.sendInviteUser=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+f,e).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.editUserDetails=async e=>new Promise((t,n)=>{fetch("https://app.zbrain.ai:3001"+"".concat(y),{method:l,headers:Object(i.b)(),body:e}).then(async e=>{try{const a=await e.json();if(!a.success){if(401===Number(a.responseCode))return n();const t=500===a.responseCode?a:(null===a||void 0===a?void 0:a.message)||e.statusText;return n(t)}return t(a.responseData)}catch(a){n(a)}}).catch(n)}),this.getTenantMembers=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(u,this.baseUrl+"".concat(g,"?").concat(t),{},x()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.removeChatbotAccess=async e=>new Promise((t,n)=>{Object(a.a)(d,this.baseUrl+E,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.checkTenantExistence=async e=>{let{email:t}=e;return new Promise((e,n)=>{Object(a.a)(u,this.baseUrl+"".concat(T,"?email=").concat(t),{},x()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.updateTenantDetails=async(e,t)=>new Promise((n,a)=>{fetch("https://app.zbrain.ai:3001"+"".concat(v,"?tenantId=").concat(t),{method:l,body:e,headers:Object(i.b)()}).then(async e=>{try{const t=await e.json();if(!t.success){if(401===Number(t.responseCode))return a();const n=500===t.responseCode?t:(null===t||void 0===t?void 0:t.message)||e.statusText;return a(n)}return n(t.responseData)}catch(t){a(t)}}).catch(a)}),this.validateInvite=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+b,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.verifyAppAccess=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+I,e,{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.a.getDataFromCookies(c))}).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.sendVerifyEmail=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+P,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.inviteTenant=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+O,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.editInvitedUser=async e=>new Promise((t,n)=>{Object(a.a)(h,"".concat(this.baseUrl,"/user/").concat(e.id),e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getInviteDetails=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(u,this.baseUrl+D+"?"+t,{},x()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getInvitedUsers=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(u,this.baseUrl+R+"?"+t,{},x()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.removeTenantAccess=async(e,t)=>new Promise((n,o)=>{Object(a.a)(d,this.baseUrl+_+"?tenantId=".concat(t),e,x()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)}),this.changeUserStatus=async e=>new Promise((t,n)=>{Object(a.a)(d,this.baseUrl+N,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.getTenantDetails=async e=>new Promise((t,n)=>{Object(a.a)(u,this.baseUrl+C+"/"+e,{},x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.validatePlatformInvite=async e=>new Promise((t,n)=>{Object(a.a)(l,this.baseUrl+U,e,x()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.sendAdminInvite=async()=>new Promise((e,t)=>{Object(a.a)(l,this.baseUrl+L,x()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})}changePassword(e,t){return new Promise((n,o)=>{const s=x();t&&(s.Authorization="Bearer ".concat(t)),Object(a.a)(d,this.baseUrl+w,e,s).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})}changeUserPassword(e,t){return new Promise((n,o)=>{const s=x();t&&(s.Authorization="Bearer ".concat(t)),Object(a.a)(d,this.baseUrl+A,e,s).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):o(e)).catch(o)})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(1),o=n(2),s=n(3);const{AUTH0_ID_TOKEN:i,APP_USER_AUTH0_ID_TOKEN:r}=o.P;function c(){return{"Content-Type":o.I.CONTENT_TYPE.APPLICATION_JSON,skip:!0,Authorization:"Bearer ".concat(s.a.getDataFromCookies(i))}}function l(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.a.getDataFromCookies(r))}}class u{constructor(){this.baseUrl="https://app.zbrain.ai:3000",this.tenantBaseUrl="https://app.zbrain.ai:3001",this.getAppDetailsById=async e=>{let{appId:t,tenantId:n}=e,s="https://app.zbrain.ai:3000"+o.I.API_END_POINT.MANAGE_APPS+"/"+t+"?tenantId=".concat(n);return new Promise((e,t)=>{Object(a.a)(o.I.METHOD_TYPE.GET,s,{},l()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.getConversationListById=async e=>{const t=new URLSearchParams(e).toString();let n="https://app.zbrain.ai:3000"+o.I.API_END_POINT.CONVERSATIONS+"?"+t;return new Promise((e,t)=>{Object(a.a)(o.I.METHOD_TYPE.GET,n,{},c()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.conversationChatbot=async e=>{const t="".concat("https://app.zbrain.ai:3000").concat(o.I.API_END_POINT.QUERY," ");return new Promise((n,s)=>{Object(a.a)(o.I.METHOD_TYPE.POST,t,e,c()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):s(e)).catch(s)})},this.clearAllConversation=async e=>{const t=new URLSearchParams(e).toString();let n="https://app.zbrain.ai:3000"+o.I.API_END_POINT.CLEAR_CONVERSATIONS+"?"+t;return new Promise((e,t)=>{Object(a.a)(o.I.METHOD_TYPE.PUT,n,{},c()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.getConversationById=async(e,t)=>{const n=new URLSearchParams(t).toString();let s="https://app.zbrain.ai:3000"+o.I.API_END_POINT.USER_CHAT+"/"+e+"?"+n;return new Promise((e,t)=>{Object(a.a)(o.I.METHOD_TYPE.GET,s,{},c()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.deleteConversationById=async(e,t)=>{const n=new URLSearchParams(t).toString();let s="https://app.zbrain.ai:3000"+o.I.API_END_POINT.DELETE_CONVERSATION+"/"+e+"?"+n;return new Promise((e,t)=>{Object(a.a)(o.I.METHOD_TYPE.PUT,s,{},c()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})},this.invitationToChat=async e=>{const t="".concat("https://app.zbrain.ai:3001").concat(o.I.API_END_POINT.VERIFY_INVITE," ");return new Promise((n,s)=>{Object(a.a)(o.I.METHOD_TYPE.POST,t,e,l()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):s(e)).catch(s)})},this.signUp=async e=>{let t="https://app.zbrain.ai:3001"+o.I.API_END_POINT.SIGN_UP_USER;return new Promise((n,s)=>{Object(a.a)(o.I.METHOD_TYPE.POST,t,e,c()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):s(e)).catch(s)})},this.signIn=async e=>{let t="https://app.zbrain.ai:3001"+o.I.API_END_POINT.SIGN_IN_USER;return new Promise((n,s)=>{Object(a.a)(o.I.METHOD_TYPE.POST,t,e,c()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):s(e)).catch(s)})},this.getUserProfile=async(e,t,n)=>{let s="?email=".concat(e,"&tenantId=").concat(n);t.startsWith("google-oauth2")&&(s+="&connection=google-oauth2");const i=await Object(a.a)(o.I.METHOD_TYPE.GET,this.tenantBaseUrl+o.I.API_END_POINT.AUTH_PROFILE_BY_EMAIL+s,null,c());if(!i.success||200!==i.responseCode)throw i;return null===i||void 0===i?void 0:i.responseData}}}},function(e,t,n){"use strict";var a,o=n(0),s=n.n(o),i=n(12);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}const c=e=>{let{svgRef:t,title:n,...o}=e;return s.a.createElement("svg",r({width:16,height:16,viewBox:"0 0 16 16",fill:"none",ref:t},o),n?s.a.createElement("title",null,n):null,a||(a=s.a.createElement("g",{id:"Group"},s.a.createElement("path",{id:"Vector",fillRule:"evenodd",clipRule:"evenodd",d:"M8.02524 0C12.4164 0 16 3.5836 16 8.02524C16 12.4164 12.4164 16 8.02524 16C3.5836 16 0 12.4164 0 8.02524C0 3.5836 3.5836 0 8.02524 0ZM3.83596 7.92429C3.12934 7.21767 2.01893 8.32808 2.72555 9.0347C3.68454 9.99369 4.54259 10.9527 5.50158 11.8612C5.90536 12.2145 6.25868 12.265 6.61199 11.8612L13.2744 5.19874C13.9811 4.49211 12.9211 3.3817 12.164 4.08833L6.10726 10.1956L3.83596 7.92429Z",fill:"#5E66D6"}))))},l=s.a.forwardRef((e,t)=>s.a.createElement(c,r({svgRef:t},e)));var u,d;n.p;function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}const p=e=>{let{svgRef:t,title:n,...a}=e;return s.a.createElement("svg",h({width:18,height:18,viewBox:"0 0 18 18",fill:"none",ref:t},a),n?s.a.createElement("title",null,n):null,u||(u=s.a.createElement("g",{clipPath:"url(#clip0_25190_662)"},s.a.createElement("path",{d:"M9 18C13.9703 18 18 13.9703 18 9C18 4.02975 13.9703 0 9 0C4.02975 0 0 4.02975 0 9C0 13.9703 4.02975 18 9 18ZM10.125 10.125C10.125 10.4234 10.0065 10.7095 9.7955 10.9205C9.58452 11.1315 9.29837 11.25 9 11.25C8.70163 11.25 8.41548 11.1315 8.2045 10.9205C7.99353 10.7095 7.875 10.4234 7.875 10.125V4.5C7.875 4.20163 7.99353 3.91548 8.2045 3.7045C8.41548 3.49353 8.70163 3.375 9 3.375C9.29837 3.375 9.58452 3.49353 9.7955 3.7045C10.0065 3.91548 10.125 4.20163 10.125 4.5V10.125ZM9 12.357C9.14777 12.357 9.29409 12.3862 9.4306 12.4428C9.56712 12.4993 9.69115 12.5823 9.79561 12.6868C9.90008 12.7913 9.98293 12.9154 10.0395 13.0519C10.096 13.1885 10.125 13.3348 10.125 13.4826C10.125 13.6303 10.0958 13.7767 10.0392 13.9132C9.98265 14.0497 9.89973 14.1737 9.79521 14.2782C9.6907 14.3826 9.56663 14.4655 9.43009 14.522C9.29355 14.5785 9.14721 14.6076 8.99944 14.6076C8.70099 14.6075 8.4148 14.4889 8.20383 14.2778C7.99285 14.0667 7.87436 13.7804 7.87444 13.482C7.87451 13.1836 7.99314 12.8974 8.20422 12.6864C8.41531 12.4754 8.70156 12.3569 9 12.357Z",fill:"#5E66D6"}))),d||(d=s.a.createElement("defs",null,s.a.createElement("clipPath",{id:"clip0_25190_662"},s.a.createElement("rect",{width:18,height:18,fill:"white"})))))},m=s.a.forwardRef((e,t)=>s.a.createElement(p,h({svgRef:t},e)));n.p;t.a=e=>{let{message:t,type:n,duration:a="",isWarning:o=!1}=e;const r={success:{borderRadius:"10px",border:"1px solid #5E66D6",background:"#F2F3FF",color:"#131426",fontFamily:"Poppins",fontSize:"15px",fontStyle:"normal",fontWeight:"400",lineHeight:"normal",letterSpacing:"-0.3px"},error:{borderRadius:"10px",border:"1px solid #CC0000",background:"#FFD2D2",color:"#CC0000",fontFamily:"Poppins",fontSize:"15px",fontStyle:"normal",fontWeight:"400",lineHeight:"normal",letterSpacing:"-0.3px"}}[n]||{};return"success"===n?(i.toast.dismiss(void 0),i.toast.success(t,{style:{...r},icon:o?s.a.createElement(m,{width:"30px"}):s.a.createElement(l,{width:"30px"})})):"error"===n&&(i.toast.dismiss(void 0),i.toast.error(t,{style:{...r},duration:a})),null}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));const a=e=>({type:"SET_REMAINING_CREDITS",payload:e}),o={remainingCredits:0};t.a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_REMAINING_CREDITS":return{...e,remainingCredits:t.payload};default:return e}}},,,,,function(e,t,n){"use strict";var a=n(45),o=n(1),s=n(2),i=n(3);const{setDataInCookies:r}=i.a,{AUTH0_ID_TOKEN:c,APP_USER_AUTH0_ID_TOKEN:l}=s.P,{METHOD_TYPE:{POST:u},API_END_POINT:{SIGN_IN:d,SIGN_UP:h}}=s.I,p={"Content-Type":"application/json"};class m{constructor(){this.baseUrl="https://app.zbrain.ai:3001",this.signIn=async e=>new Promise((t,n)=>{Object(o.a)(u,this.baseUrl+d,e,p).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.signUp=async e=>new Promise((t,n)=>{Object(o.a)(u,this.baseUrl+h,e,p).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.forgotPassword=e=>{let{email:t,isPrivate:n=!1}=e;return new Promise((e,a)=>{this.auth0.changePassword({connection:n?"Zbrain-Tenant-Users":"Username-Password-Authentication",email:t},(t,n)=>{if(t)return a(t);e(n)})})},this.auth0=new a.a.WebAuth({domain:"dev-lq7iioq11qkau675.us.auth0.com",clientID:"Jebw3UIy39pz5T2rfHCbOv5MqLBaMIKE",redirectUri:window.location.origin,scope:"openid profile email",responseType:"code token id_token",grantType:"password",audience:"https://dev-lq7iioq11qkau675.us.auth0.com/api/v2/"})}oAuthSignIn(){this.auth0.authorize({connection:"google-oauth2",redirect_uri:window.location.origin,audience:"https://dev-lq7iioq11qkau675.us.auth0.com/api/v2/",scope:"openid profile email"})}userInfo(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((t,n)=>{this.auth0.parseHash((a,o)=>{if(a)return n(a);this.auth0.client.userInfo(o.accessToken,(a,s)=>{if(a)return n(a);r(o.idToken,e?l:c,1),t(s)})})})}oAuthSignInPrivate(){this.auth0.authorize({connection:"google-oauth2",redirect_uri:"".concat(window.location.origin,"/user/sign-up"),audience:"https://dev-lq7iioq11qkau675.us.auth0.com/api/v2/",scope:"openid profile email"})}}var g=n(20),E=n(23);const{AUTH0_ID_TOKEN:T}=s.P;function f(){return{"Content-Type":s.I.CONTENT_TYPE.APPLICATION_JSON,skip:!0,Authorization:"Bearer ".concat(i.a.getDataFromCookies(T))}}class v{constructor(){this.baseUrl="https://app.zbrain.ai:3000",this.localUrl="http://localhost:3010",this.deleteKnowledgeBaseById=async e=>{let t="https://app.zbrain.ai:3000"+s.I.API_END_POINT.KNOWLEDGE_BASE+"/"+e;return new Promise((e,n)=>{Object(o.a)(s.I.METHOD_TYPE.DELETE,t,{},f()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.deleteKnowledgeBaseImportById=async e=>{let t="https://app.zbrain.ai:3000"+s.I.API_END_POINT.KNOWLEDGE_BASE_IMPORT;return new Promise((n,a)=>{Object(o.a)(s.I.METHOD_TYPE.DELETE,t,e,f()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.createknowledgeBase=async e=>new Promise((t,n)=>{Object(o.a)(s.I.METHOD_TYPE.POST,this.baseUrl+"/knowledge-base",e,f()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.createSchema=async e=>new Promise((t,n)=>{Object(o.a)(s.I.METHOD_TYPE.POST,this.baseUrl+"/knowledge-base-data-structure",e,f()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.deleteknowledgeBase=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(s.I.METHOD_TYPE.DELETE,this.baseUrl+"/knowledge-base/"+e+"?"+n,{},f()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.updateknowledgeBase=async e=>new Promise((t,n)=>{Object(o.a)(s.I.METHOD_TYPE.PUT,this.baseUrl+"/knowledge-base",e,f()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})}}var y=n(24);const{METHOD_TYPE:{POST:b},API_END_POINT:{GET_AUTHORIZATION_URL:I}}=s.I,S={"Content-Type":"application/json"};class P{constructor(){this.baseUrl="https://dev.zbrain.ai:8000",this.localUrl="http://localhost:8000",this.getAuthorizedUrl=async e=>new Promise((t,n)=>{Object(o.a)(b,this.baseUrl+I,e,S).then(e=>200!==e.status?n(e):t(null===e||void 0===e?void 0:e.responseData)).catch(n)})}}var w=n(42);const{METHOD_TYPE:{POST:A,GET:O,DELETE:D},API_END_POINT:{AGENT:R,AGENTS:_,WORKFLOW:C,WORKFLOWS:N}}=s.I,{AUTH0_ID_TOKEN:U}=s.P;function L(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(U))}}class x{constructor(){this.baseUrl="https://app.zbrain.ai:8001",this.getAgents=async e=>{const t=e?"".concat(_,"?").concat(new URLSearchParams(e).toString()):_;return new Promise((e,n)=>{Object(o.a)(O,this.baseUrl+t,{},L()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.deleteAgent=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(D,this.baseUrl+"".concat(R,"/").concat(e,"?").concat(n),{},L()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.getWorkflow=async e=>{const t=e?"".concat(N,"?").concat(new URLSearchParams(e).toString()):_;return new Promise((e,n)=>{Object(o.a)(O,this.baseUrl+t,{},L()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})}}createAgents(e){return new Promise((t,n)=>{Object(o.a)(A,this.baseUrl+R,e,L()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})}createWorkflow(e){return new Promise((t,n)=>{Object(o.a)(A,this.baseUrl+C,e,L()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})}}const{METHOD_TYPE:{POST:k},API_END_POINT:{AGENT_EXECUTE:M}}=s.I,{AUTH0_ID_TOKEN:F}=s.P;var B=n(8);const{AUTH0_ID_TOKEN:G,CRM_CODE:j}=s.P,{METHOD_TYPE:{POST:H,PATCH:z},API_END_POINT:{CREATE_PIPEDRIVE_TENANT:W,UPDATE_PIPEDRIVE:Y}}=s.I;class K{constructor(){this.baseUrl="https://app.zbrain.ai:3000",this.createTenant=async e=>new Promise((t,n)=>{Object(o.a)(H,"".concat(this.baseUrl).concat(W),e).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.updateConfig=async e=>{const t="".concat(this.baseUrl).concat(Y),n=await Object(o.a)(z,t,e,this._getHeaders());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.pipedriveTenant=async(e,t)=>{try{const n=await this.createTenant({code:e,tenantId:t});return localStorage.setItem("PIPEDRIVE_USER",JSON.stringify(n.pipedriveDetails)),(null===n||void 0===n?void 0:n.isSubscribed)?B.a.push("/sales-enablement-tool"):B.a.push("/pipedrive/pricing"),!0}catch(n){console.log(n)}finally{i.a.removeDataFromCookies(j)}return!1}}_getHeaders(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(G))}}}const{AUTH0_ID_TOKEN:V,CRM_CODE:q}=s.P,{METHOD_TYPE:{GET:Q,POST:Z,PATCH:J},API_END_POINT:{HUBSPOT_TENANT:X}}=s.I;function $(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(V))}}class ee{constructor(){this.baseUrl="https://app.zbrain.ai:3000",this.createTenant=async e=>new Promise((t,n)=>{Object(o.a)(Z,"".concat(this.baseUrl).concat(X),e).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.updateConfig=async e=>{const t="".concat(this.baseUrl).concat(X),n=await Object(o.a)(J,t,e,$());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData},this.hubspotTenant=async(e,t)=>{try{var n;const a=await this.createTenant({code:e,tenantId:t});return localStorage.setItem("HUBSPOT_USER",JSON.stringify(null===a||void 0===a||null===(n=a.data)||void 0===n?void 0:n.hubId)),(null===a||void 0===a?void 0:a.isSubscribed)?B.a.push("/hubspot/sales-enablement-tool"):B.a.push("/hubspot/pricing"),!0}catch(a){console.log(a)}finally{i.a.removeDataFromCookies(q)}return!1},this.getHubspotDetail=async e=>{const t=JSON.parse(localStorage.getItem("HUBSPOT_USER")),n="?tenantId=".concat(e,"&hubId=").concat(t);return new Promise((e,t)=>{Object(o.a)(Q,this.baseUrl+X+n,{},$()).then(n=>n.success&&200===n.responseCode?e(null===n||void 0===n?void 0:n.responseData):t(n)).catch(t)})}}}const{AUTH0_ID_TOKEN:te,CRM_CODE:ne}=s.P,{METHOD_TYPE:{GET:ae,POST:oe,PATCH:se},API_END_POINT:{RETRIEVAL_TESTING:ie}}=s.I;class re{constructor(){this.baseUrl="https://app.zbrain.ai:3002",this.retrievalTesting=async e=>new Promise((t,n)=>{Object(o.a)(oe,"".concat(this.baseUrl).concat(ie),e,{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(te))}).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)})}}const{METHOD_TYPE:{POST:ce},API_END_POINT_V2:{IMPORT:le},API_END_POINT:{KNOWLEDGE_BASE_IMPORT_BY_API:ue}}=s.I,{AUTH0_ID_TOKEN:de}=s.P;function he(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(de))}}class pe{constructor(){this.baseUrl="https://app.zbrain.ai:3003",this.localUrl="http://localhost:3010",this.createImport=async(e,t)=>{const n=new URLSearchParams(e).toString(),a=await Object(o.a)(ce,"".concat(this.baseUrl).concat(le,"?").concat(n),t,he());if(!a.success||200!==a.responseCode)throw a;return null===a||void 0===a?void 0:a.responseData},this.kbImportByAPI=async(e,t)=>{const n=new URLSearchParams(e).toString(),a=await Object(o.a)(ce,"".concat(this.baseUrl).concat(ue,"?").concat(n),t,he());if(!a.success||200!==a.responseCode)throw a;return null===a||void 0===a?void 0:a.responseData}}}const{AUTH0_ID_TOKEN:me}=s.P,{METHOD_TYPE:{GET:ge,POST:Ee,DELETE:Te,PUT:fe},API_END_POINT:{WORKERS:ve,WORKER_TEMPLETE:ye,WORKER_RECORDS:be,WORKER_TEMPLETES:Ie,TRIGGER_WORKER:Se,WORKERS_UPLOAD:Pe,WORKER_REPORTS:we,WORKER_TEMPLATE_CATEGORIES:Ae,WORKER_RECORDS_LOGS:Oe,RETRY_FAILED_ACTIVITY:De}}=s.I;function Re(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.a.getDataFromCookies(me))}}class _e{constructor(){this.baseUrl="https://app.zbrain.ai:3012",this.localUrl="http://localhost:3012",this.getWorkersTemplates=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(o.a)(ge,"".concat(this.baseUrl).concat(Ie,"?").concat(t),{},Re()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getWorkers=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(o.a)(ge,this.baseUrl+"".concat(ve,"?").concat(t),{},Re()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.deleteWorker=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(Te,this.baseUrl+"".concat(ve,"/").concat(e,"?").concat(n),{},Re()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.getWorkerRecords=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(ge,this.baseUrl+"".concat(ve,"/").concat(e,"?").concat(n),{},Re()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.deployWorker=async e=>{const t=await Object(o.a)(Ee,"".concat(this.baseUrl).concat(ve),e,Re());if(!t.success||200!==t.responseCode)throw t;return t.responseData},this.triggerWorker=async e=>{const t=await Object(o.a)(Ee,"".concat(this.baseUrl).concat(Se),e,Re());if(!t.success||200!==t.responseCode)throw t;return t.responseData},this.uploadFile=async(e,t)=>{const n=new URLSearchParams(t).toString(),a=await fetch("".concat(this.baseUrl).concat(Pe,"?").concat(n),{method:Ee,headers:{Authorization:"Bearer ".concat(i.a.getDataFromCookies(me))},body:e}).then(e=>e.json());if(!a.success||200!==a.responseCode)throw a;return a.responseData},this.getReports=async(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(ge,this.baseUrl+"".concat(we,"/").concat(e,"?").concat(n),{},Re()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.getworkerTemplateCategories=e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(o.a)(ge,this.baseUrl+"".concat(Ae,"?").concat(t),{},Re()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.getworkerTemplateDetails=e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(o.a)(ge,this.baseUrl+"".concat(ye,"?").concat(t),{},Re()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.updateWorkerStatus=async(e,t)=>new Promise((n,a)=>{Object(o.a)(fe,"".concat(this.baseUrl).concat(ve,"/").concat(e),t,Re()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)}),this.getRecordDetails=(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(ge,this.baseUrl+"".concat(be,"/").concat(e,"?").concat(n),{},Re()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.updateWorker=async(e,t)=>new Promise((n,a)=>{Object(o.a)(fe,"".concat(this.baseUrl).concat(ve,"/").concat(e),t,Re()).then(e=>e.success&&200===e.responseCode?n(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)}),this.getWorkerRecordLogs=(e,t)=>{const n=new URLSearchParams(t).toString();return new Promise((t,a)=>{Object(o.a)(ge,this.baseUrl+"".concat(Oe,"/").concat(e,"?").concat(n),{},Re()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):a(e)).catch(a)})},this.retryFailedActivity=async e=>{const t=await Object(o.a)(Ee,"".concat(this.baseUrl).concat(De),e,Re());if(!t.success||200!==t.responseCode)throw t;return t.responseData}}}var Ce=n(11);const{FLOW_TOKEN:Ne,AUTH0_ID_TOKEN:Ue}=s.P,{METHOD_TYPE:{POST:Le},API_END_POINT:{AUTH_TOKEN:xe,APP_CONNECTIONS:ke}}=s.I;class Me{constructor(){this.baseUrl="https://app.zbrain.ai:8080",this.getToken=async e=>{try{const t=i.a.getDataFromCookies(Ne);if(t)return t;const n=i.a.getDataFromCookies(Ue),a=await fetch(this.baseUrl+"".concat(xe),{method:Le,headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify({...e,token:n})});if(!a.ok)throw new Error("HTTP error! Status: ".concat(a.status));const o=await a.json();return i.a.setDataInCookies(o,Ne,30),o}catch(t){throw console.error("Error fetching authToken:",t),t}},this.getConnections=async e=>{const t=new URLSearchParams(e).toString(),n=await this.getHeaders();try{const e=await fetch("".concat(this.baseUrl).concat(ke,"?").concat(t),{method:"GET",headers:n});return await e.json()}catch(a){throw console.error("Error fetching tool connections:",a),a}},this.deleteConnection=async e=>{const t=await this.getHeaders();try{const n=await fetch(this.baseUrl+"".concat(ke,"/").concat(e),{method:"DELETE",headers:t});return await n.json()}catch(n){throw console.error("Error fetching tool connections:",n),n}},this.addConnection=async e=>{const t=await this.getHeaders();try{const n=await fetch("".concat(this.baseUrl).concat(ke),{method:"POST",headers:t,body:JSON.stringify(e)});if(!n.ok)throw new Error("HTTP error! Status: ".concat(n.status));return await n.json()}catch(n){throw console.error("Error adding connection:",n),n}}}async getHeaders(){const e=Ce.a.getDataFromLocalStorage("user");if(!e)throw new Error("ZbrainFlowService: Tenant not found");const t=await this.getToken({tenantId:e.tenantId});return{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.token)}}}n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g.a})),n.d(t,"l",(function(){return E.a})),n.d(t,"h",(function(){return v})),n.d(t,"j",(function(){return y.a})),n.d(t,"d",(function(){return P})),n.d(t,"e",(function(){return w.a})),n.d(t,"a",(function(){return x})),n.d(t,"i",(function(){return K})),n.d(t,"f",(function(){return ee})),n.d(t,"k",(function(){return re})),n.d(t,"g",(function(){return pe})),n.d(t,"m",(function(){return _e})),n.d(t,"n",(function(){return Me}))},,function(e,t,n){"use strict";var a=n(0),o=n.n(a);t.a=function(e){let{height:t="min-h-screen"}=e;return o.a.createElement("div",{className:"grid place-content-center w-full bg-transparent "+t},o.a.createElement("div",{className:"loader-5 center"},o.a.createElement("span",null)))}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));let a={isSideBarOpen:!1};const o=e=>({type:"sidebar",payload:e});function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"sidebar":return{...e,isSideBarOpen:t.payload};case"anotherAction":case"yetAnotherAction":default:return e}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return i}));let a={isVerified:!0,isPlanUpgraded:!0};const o=e=>({type:"verified",payload:e}),s=e=>({type:"upgradePlan",payload:e});function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"verified":return{...e,isVerified:t.payload};case"upgradePlan":return{...e,isPlanUpgraded:t.payload};case"yetAnotherAction":default:return e}}},,,,function(e,t,n){"use strict";var a=n(0),o=n.n(a),s=n(8);t.a=e=>{let{margin:t}=e;const[n,i]=Object(a.useState)(window.innerHeight),r=(new Date).getFullYear(),c=()=>{i(window.innerHeight)};return Object(a.useEffect)(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}),[]),o.a.createElement("div",{style:{height:n},className:"bg-white flex  flex-col justify-between items-center p-15"},o.a.createElement("div",{onClick:()=>s.a.push("/")},o.a.createElement("img",{src:"/images/zbrain-logo.svg",alt:""})),o.a.createElement("div",{className:"h-233px lg:w-415px text-center border border-grey-DDDFDE ".concat(t,"  rounded-xl flex items-center  flex-col p-5")},o.a.createElement("img",{src:"/images/alert.svg",alt:"",className:"w-7.75 h-7 mt-5"}),o.a.createElement("h1",{className:"mt-4 font-PoppinsMedium text-black-0 md:text-ft30 text-ft7"},"App Not Available"),o.a.createElement("span",{className:"mt-3.5 font-PoppinsRegular md:text-ft4 text-ft3 text-black-10"},"The link to this app appears to be deleted or deactivated. Please contact your ZBrain Admin.")),o.a.createElement("div",{className:"mt-auto"},o.a.createElement("span",{className:"font-PoppinsRegular text-ft2 text-grey-B4B4B4"},"\xa9 ",r," ZBrain.ai | All Rights Reserved.")))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(1),o=n(2),s=n(3);const{METHOD_TYPE:{GET:i,DELETE:r},API_END_POINT:{FLOW:c,FLOWS:l,QUERY_FLOW:u}}=o.I,{AUTH0_ID_TOKEN:d}=o.P;function h(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(s.a.getDataFromCookies(d))}}class p{constructor(){this.baseUrl="https://app.zbrain.ai:3000",this.getFlows=async e=>{const t=new URLSearchParams(e).toString();return new Promise((e,n)=>{Object(a.a)(i,this.baseUrl+l+"?"+t,{},h()).then(t=>t.success&&200===t.responseCode?e(null===t||void 0===t?void 0:t.responseData):n(t)).catch(n)})},this.deleteFlow=async e=>new Promise((t,n)=>{Object(a.a)(r,this.baseUrl+c,e,h()).then(e=>e.success&&200===e.responseCode?t(null===e||void 0===e?void 0:e.responseData):n(e)).catch(n)}),this.queryFlow=async e=>{const t="?".concat(new URLSearchParams(e).toString()),n=await Object(a.a)(i,this.baseUrl+u+t,null,h());if(!n.success||200!==n.responseCode)throw n;return null===n||void 0===n?void 0:n.responseData}}}},,,,,,,,function(e,t,n){e.exports=n(67)},,,,,,,,,,,,,,,,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a),s=n(22),i=n.n(s),r=n(5),c=n(16),l=n(12);var u=function(e){return new Promise((t,n)=>{const a=JSON.parse(window.sessionStorage.getItem("retry-lazy-refreshed")||"false");e().then(e=>{window.sessionStorage.setItem("retry-lazy-refreshed","false"),t(e)}).catch(e=>{if(!a)return window.sessionStorage.setItem("retry-lazy-refreshed","true"),window.location.reload();n(e)})})},d=n(8),h=n(34),p=n(23),m=n(24),g=n(41),E=n(32),T=n(3),f=n(2);const v=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(37)]).then(n.bind(null,905)))),y=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(25),n.e(34)]).then(n.bind(null,906)))),b=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(49)]).then(n.bind(null,907)))),I=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(31)]).then(n.bind(null,908)))),S=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(11)]).then(n.bind(null,886)))),P=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(12)]).then(n.bind(null,888)))),w=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(13)]).then(n.bind(null,889)))),A=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(14)]).then(n.bind(null,890)))),O=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(18)]).then(n.bind(null,891)))),D=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(32)]).then(n.bind(null,900)))),R=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(16)]).then(n.bind(null,896)))),_=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(5),n.e(22)]).then(n.bind(null,875)))),C=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(5),n.e(38)]).then(n.bind(null,876)))),N=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(41)]).then(n.bind(null,909)))),U=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(42)]).then(n.bind(null,877)))),L=Object(a.lazy)(()=>u(()=>Promise.all([n.e(1),n.e(43)]).then(n.bind(null,878)))),x=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(5),n.e(21)]).then(n.bind(null,897)))),k=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(20)]).then(n.bind(null,901)))),M=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(19)]).then(n.bind(null,902)))),F=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(23)]).then(n.bind(null,910)))),B=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(17)]).then(n.bind(null,894)))),G=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(27)]).then(n.bind(null,911)))),j=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(4),n.e(39)]).then(n.bind(null,912)))),H=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(6)]).then(n.bind(null,892)))),z=(Object(a.lazy)(()=>u(()=>n.e(48).then(n.bind(null,913)))),Object(a.lazy)(()=>u(()=>n.e(47).then(n.bind(null,914)))),Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(26)]).then(n.bind(null,915))))),W=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(30)]).then(n.bind(null,879)))),Y=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(29)]).then(n.bind(null,903)))),K=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(40)]).then(n.bind(null,880)))),V=Object(a.lazy)(()=>u(()=>n.e(44).then(n.bind(null,916)))),q=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(6)]).then(n.bind(null,892)))),Q=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(15)]).then(n.bind(null,898)))),Z=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(33)]).then(n.bind(null,881)))),J=(Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(28)]).then(n.bind(null,893)))),Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(7),n.e(46)]).then(n.bind(null,882))))),X=Object(a.lazy)(()=>u(()=>Promise.all([n.e(0),n.e(7),n.e(45)]).then(n.bind(null,883)))),$=Object(a.lazy)(()=>u(()=>Promise.all([n.e(1),n.e(8),n.e(36)]).then(n.bind(null,884)))),ee=Object(a.lazy)(()=>u(()=>Promise.all([n.e(1),n.e(8),n.e(35)]).then(n.bind(null,885)))),te=e=>{let{component:t,user:n,allowZbrain:a=!1,...s}=e;return o.a.createElement(r.Route,Object.assign({},s,{render:e=>{var s,i;return(null===(s=n.email)||void 0===s?void 0:s.endsWith("@leewayhertz.com"))||a&&(null===(i=n.email)||void 0===i?void 0:i.endsWith("@zbrain.ai"))?o.a.createElement(t,e):o.a.createElement(r.Redirect,{to:"/"})}}))};var ne=Object(c.b)(e=>({user:e.user}))(e=>{let{user:t={}}=e;const n=Object(c.c)();Object(a.useLayoutEffect)(()=>{const e=new URLSearchParams(window.location.search);if(t.isLoggedIn&&e.get("token")&&n({type:"LOGOUT_ON_INVITE_LOGIN"}),e.get("code")&&e.get("platform")){const t={code:e.get("code"),platform:e.get("platform")};T.a.setCookieWithExpire(f.P.CRM_CODE,t,3)}},[]),Object(a.useEffect)(()=>{(async()=>{const{adminTenantId:e="",tenantId:a="",email:o="",userId:s=""}=t;if(e)try{const t=new p.a,i=await t.getTenantDetails(e),r=new m.a,c=await r.getUserProfile(o,s,a),l={invitedBy:i.invitedBy,email_verified:null===c||void 0===c?void 0:c.email_verified};if(e!==a){const e=i.invitedBy.find(e=>e.tenantId===a);e&&(l.role=e.role)}n({type:"UPDATE_USER",payload:l})}catch(i){console.error("Error fetching data:",i)}})()},[]);const s=Object(a.useRef)(null),i=e=>Object.keys(e).every(t=>"app"===t||e[t]),u=async e=>{try{return await(new E.c).getAccountCompletion({tenantId:e})}catch(t){console.log(t)}};return Object(a.useEffect)(()=>((async()=>{const e=new URLSearchParams(window.location.search);if(!t.isLoggedIn||e.get("token"))return;n({type:"UPDATE_ACC_COMPLETION",payload:{isLoading:!0}});const a=await u(null===t||void 0===t?void 0:t.tenantId);n({type:"UPDATE_ACC_COMPLETION",payload:{...a,isLoading:!1}}),i(a)||(s.current=setInterval(async()=>{var e,a;if(null===(e=window)||void 0===e||null===(a=e.state)||void 0===a?void 0:a.stopAccCompletionUpdate)return null;const o=await u(null===t||void 0===t?void 0:t.tenantId);n({type:"UPDATE_ACC_COMPLETION",payload:{...o,isLoading:!1}}),i(o)&&clearInterval(s.current)},1e4))})(),()=>{s.current&&clearInterval(s.current)}),[t.isLoggedIn]),o.a.createElement(r.Router,{history:d.a},o.a.createElement(a.Suspense,{fallback:o.a.createElement(h.a,null)},o.a.createElement(r.Switch,null,o.a.createElement(r.Route,{exact:!0,path:"/",component:v}),o.a.createElement(r.Route,{exact:!0,path:"/6918a9182798b11j-all-apps",component:V}),o.a.createElement(r.Route,{path:"/apps",component:P}),o.a.createElement(te,{path:"/admin",component:D,user:t,allowZbrain:!0}),o.a.createElement(r.Route,{path:"/agent",component:A}),o.a.createElement(r.Route,{path:"/agents",component:w,user:t}),o.a.createElement(r.Route,{path:"/workflow",component:O}),o.a.createElement(r.Route,{path:"/models",component:R}),o.a.createElement(r.Route,{path:"/flows",component:Z}),o.a.createElement(r.Route,{path:"/knowledge-base",component:S}),o.a.createElement(r.Route,{exact:!0,path:"/signup",component:y}),o.a.createElement(r.Route,{exact:!0,path:"/signup-waitlist",component:b}),o.a.createElement(r.Route,{exact:!0,path:"/forgot",component:j}),o.a.createElement(r.Route,{exact:!0,path:"/guide",component:I}),o.a.createElement(r.Route,{path:"/flow",component:Y}),o.a.createElement(r.Route,{path:"/chat/:appId",component:_}),o.a.createElement(r.Route,{path:"/widget/:appId",component:C}),o.a.createElement(r.Route,{exact:!0,path:"/user/sign-up",component:N}),o.a.createElement(r.Route,{exact:!0,path:"/user/sign-in",component:U}),o.a.createElement(r.Route,{exact:!0,path:"/user/verify",component:L}),o.a.createElement(r.Route,{exact:!0,path:"/manage-user",component:q}),o.a.createElement(r.Route,{exact:!0,path:"/connections",component:Q}),o.a.createElement(r.Route,{exact:!0,path:"/user/forgot-password",component:K}),o.a.createElement(r.Route,{exact:!0,path:"/terms",render:()=>(window.location.href="https://zbrain.ai/terms-of-use/",null)}),o.a.createElement(r.Route,{exact:!0,path:"/privacy",render:()=>(window.location.href="https://zbrain.ai/privacy-policy/",null)}),o.a.createElement(r.Route,{exact:!0,path:"/app-not-found",render:()=>o.a.createElement(g.a,{margin:"mt-40"})}),o.a.createElement(r.Route,{exact:!0,path:"/pricing/overview",component:k}),o.a.createElement(r.Route,{exact:!0,path:"/pricing/overview/plan",component:M}),o.a.createElement(r.Route,{exact:!0,path:"/pricing/history",component:F}),o.a.createElement(r.Route,{exact:!0,path:"/pricing/credit-usage",component:B}),o.a.createElement(r.Route,{exact:!0,path:"/pricing/usage-limit",component:G}),o.a.createElement(r.Route,{exact:!0,path:"/users",component:H}),o.a.createElement(r.Route,{exact:!0,path:"/chatbot",component:W}),o.a.createElement(r.Route,{path:"/user",component:x}),o.a.createElement(r.Route,{path:"/settings/profile",component:z}),o.a.createElement(r.Route,{exact:!0,path:"/sales-enablement-tool",component:J}),o.a.createElement(r.Route,{exact:!0,path:"/hubspot/sales-enablement-tool",component:X}),o.a.createElement(r.Route,{exact:!0,path:"/pipedrive/pricing",component:$}),o.a.createElement(r.Route,{exact:!0,path:"/hubspot/pricing",component:ee}),o.a.createElement(r.Redirect,{exact:!0,from:"*",to:"/"}))),o.a.createElement(l.Toaster,{toastOptions:{className:"alert-toast font-PoppinsMedium",style:{borderRadius:"16px"}}}))}),ae=n(21),oe=n(47),se=n(46),ie=n(11);const{USER:re,AUTH0_ID_TOKEN:ce,PLANTYPE:le,INVITE_TOKEN:ue}=f.P,de=e=>{e.accountCompletion&&delete e.accountCompletion,ie.a.storeToLocalStorage(re,e)},he=()=>{localStorage.clear(),T.a.removeDataFromCookies(ce,le),T.a.removeDataFromCookies(ue)},pe=()=>{localStorage.clear(),T.a.removeDataFromCookies(ce,le)},me=T.a.getDataFromCookies(ce)?ie.a.getDataFromLocalStorage(re):(localStorage.clear(),null),ge=me||{},Ee={isLoggedIn:!!(null===ge||void 0===ge?void 0:ge.userId),userId:(null===ge||void 0===ge?void 0:ge.userId)||"",name:(null===ge||void 0===ge?void 0:ge.name)||"",firstName:(null===ge||void 0===ge?void 0:ge.firstName)||"",lastName:(null===ge||void 0===ge?void 0:ge.lastName)||"",companyName:(null===ge||void 0===ge?void 0:ge.companyName)||"",email:(null===ge||void 0===ge?void 0:ge.email)||"",profilePicture:(null===ge||void 0===ge?void 0:ge.profilePicture)||"",accessToken:(null===ge||void 0===ge?void 0:ge.accessToken)||"",tenantId:(null===ge||void 0===ge?void 0:ge.tenantId)||"",privacyPolicy:(null===ge||void 0===ge?void 0:ge.privacyPolicy)||"",termsAndConditions:(null===ge||void 0===ge?void 0:ge.termsAndConditions)||"",email_verified:null===ge||void 0===ge?void 0:ge.email_verified,accountCompletion:{isLoading:!0},adminTenantId:(null===ge||void 0===ge?void 0:ge.adminTenantId)||"",invitedBy:(null===ge||void 0===ge?void 0:ge.invitedBy)||[],role:(null===ge||void 0===ge?void 0:ge.role)||"",userSubscriptionData:(null===ge||void 0===ge?void 0:ge.userSubscriptionData)||[],selectedUser:(null===ge||void 0===ge?void 0:ge.selectedUser)||{}};const{INVITED_USER:Te,AUTH0_ID_TOKEN:fe,INVITATION_DATA:ve}=f.P,ye=e=>{ie.a.storeToLocalStorage(Te,e)},be=()=>{localStorage.removeItem(Te),localStorage.removeItem(ve)},Ie=T.a.getDataFromCookies(fe)?ie.a.getDataFromLocalStorage(Te):(localStorage.clear(),null),Se=Ie||{},Pe={isLoggedIn:!!(null===Se||void 0===Se?void 0:Se.userId),userId:(null===Se||void 0===Se?void 0:Se.userId)||"",name:(null===Se||void 0===Se?void 0:Se.name)||"",firstName:(null===Se||void 0===Se?void 0:Se.firstName)||"",lastName:(null===Se||void 0===Se?void 0:Se.lastName)||"",email:(null===Se||void 0===Se?void 0:Se.email)||"",profilePicture:(null===Se||void 0===Se?void 0:Se.profilePicture)||"",tenantId:(null===Se||void 0===Se?void 0:Se.tenantId)||"",invitationTokenId:(null===Se||void 0===Se?void 0:Se.invitationTokenId)||"",appId:(null===Se||void 0===Se?void 0:Se.appId)||""};var we=n(36),Ae=n(37);let Oe={ids:[]};let De={botInstructions:f.o,defaultSetting:{model:"gpt-4o",temp:"0.7",scoreThreshold:"",contextLength:"",contextMaxToken:"6000",responseMaxToken:"1500",isChangeInAgent:!1,followupConversation:!1,chunkingStrategy:{previousSession:{enabled:!1,tokens:""},staticText:{enabled:!1,text:""}},isFollowUpEnabled:!1,isSummarizeAgentEnabled:!1,isCSVAgentEnabled:!1,isSourceEnabled:!1}};var Re=n(27),_e=Object(ae.b)({user:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ee,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_USER":const{isLoggedIn:n,id_token:a,...o}={...e,...t.payload};return de(o),{...e,...t.payload,isLoggedIn:!0};case"UPDATE_ACC_COMPLETION":return{...e,accountCompletion:{...e.accountCompletion,...t.payload}};case"REMOVE_USER":return he(),{isLoggedIn:!1,userId:"",name:"",firstName:"",companyName:"",lastName:"",email:"",profilePicture:"",accessToken:"",idToken:"",userSubscriptionData:[],accountCompletion:{isLoading:!0},invitedBy:[]};case"LOGOUT_ON_INVITE_LOGIN":return pe(),{isLoggedIn:!1,userId:"",name:"",firstName:"",companyName:"",lastName:"",email:"",profilePicture:"",accessToken:"",idToken:"",userSubscriptionData:[],accountCompletion:{isLoading:!0},invitedBy:[]};default:return e}},invitedUser:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_INVITED_USER":const{isLoggedIn:n,id_token:a,...o}={...e,...t.payload};return ye(o),{...e,...t.payload,isLoggedIn:!0};case"REMOVE_INVITED_USER":return be(),{isLoggedIn:!1,userId:"",name:"",firstName:"",lastName:"",email:"",profilePicture:"",tenantId:"",invitationTokenId:"",appId:""};default:return e}},sidebar:we.b,verified:Ae.a,kbImports:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_FILE_UPLOAD_RESULTS":return{...e,ids:t.payload};default:return e}},configureBot:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:De,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_BOT_INSTRUCTIONS":return{...e,botInstructions:t.payload};case"SET_DEFAULT_SETTING":return{...e,defaultSetting:{...e.defaultSetting,...t.payload}};default:return e}},credits:Re.a});Object(se.createLogger)();const Ce=[oe.a];var Ne=Object(ae.c)(_e,Object(ae.a)(...Ce)),Ue=n(26);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));n(66);var Le=n(35);function xe(){return o.a.createElement(Ue.a,null,o.a.createElement(c.a,{store:Ne},o.a.createElement(ne,{component:ne})))}n.n(Le).a.init("63b213cd014c0bcf90c8066bbe55571a"),i.a.render(o.a.createElement(xe,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(e=>{e.unregister()})}],[[50,10,24]]]);
//# sourceMappingURL=main.b6c3fbf9.chunk.js.map