@burdenoff/website-sdk 2026.922.2 → 2026.922.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { createContext, useMemo, useContext, useState, useCallback, useLayoutEffect, useRef, useEffect, useId, version } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import { Instagram, Youtube, Facebook, Github, Linkedin, Twitter, Mail, Phone, MapPin, Clock, Send, CheckCircle, Upload, Globe, ChevronDown, Search, Rocket, ArrowRight, Download, ImageIcon, ChevronRight, Maximize2, Check, ArrowLeft, Sparkles, RotateCcw, Link2, History, Trash2, Paperclip, X, Mic, Square, ArrowUp, Info, ChevronLeft, BookOpenText, Layers, TriangleAlert, FileText, ExternalLink } from 'lucide-react';
4
+ import { Instagram, Youtube, Facebook, Github, Linkedin, Twitter, Mail, Phone, MapPin, Clock, Send, CheckCircle, Upload, Globe, ChevronDown, Search, Rocket, ArrowRight, Download, ImageIcon, ChevronRight, Maximize2, Check, ArrowLeft, Sparkles, RotateCcw, Link2, History, Trash2, Paperclip, X, Mic, Square, ArrowUp, Info, ChevronLeft, BookOpenText, Layers, TriangleAlert, FileText, ExternalLink, ThumbsUp, ThumbsDown } from 'lucide-react';
5
5
  import ReCAPTCHA4 from 'react-google-recaptcha';
6
6
  import { toast } from 'sonner';
7
7
  import { Helmet } from 'react-helmet-async';
@@ -5953,10 +5953,30 @@ var EN = {
5953
5953
  noAnswer: "I couldn't find this in our documentation, so the answer below is not grounded in a source. Try rephrasing, or",
5954
5954
  answerDidNotArrive: "That answer didn't come through. Try asking again.",
5955
5955
  askHuman: "ask a human",
5956
+ // An offer, not a demand: this row sits under every answer on 38 marketing sites, so the
5957
+ // wording has to be shruggable. "Was this helpful?" invites; "Please rate this answer"
5958
+ // conscripts.
5959
+ feedbackPrompt: "Was this helpful?",
5960
+ feedbackHelpful: "Helpful",
5961
+ feedbackNotHelpful: "Not helpful",
5962
+ feedbackReasonTitle: "What was off?",
5963
+ feedbackReasonInaccurate: "Inaccurate",
5964
+ feedbackReasonIncomplete: "Incomplete",
5965
+ feedbackReasonOffTopic: "Off topic",
5966
+ feedbackReasonHardToFollow: "Hard to follow",
5967
+ feedbackReasonOther: "Something else",
5968
+ feedbackCommentPlaceholder: "Add a detail (optional)",
5969
+ feedbackSend: "Send",
5970
+ feedbackDismiss: "Dismiss",
5971
+ feedbackThanks: "Thanks \u2014 that helps.",
5972
+ feedbackNotSent: "That didn't send.",
5956
5973
  prevSuggestion: "Previous suggestion",
5957
5974
  nextSuggestion: "Next suggestion",
5958
5975
  conceptIllustration: "Concept illustration",
5959
5976
  opensInNewTab: "opens in a new tab",
5977
+ seoTitle: "Describe a problem, get an answer",
5978
+ seoDescription: "Describe the problem you're facing in your own words and get an answer drawn from our product documentation, with links to the exact pages it came from.",
5979
+ seoDescriptionProduct: "Describe the problem you're facing in your own words and get an answer drawn from {product}'s documentation \u2014 and every other product we build \u2014 with links to the exact pages it came from.",
5960
5980
  capabilities: [
5961
5981
  "Grounded in our own docs",
5962
5982
  "Compare across the ecosystem",
@@ -6004,10 +6024,27 @@ var ZH = {
6004
6024
  noAnswer: "\u6211\u5728\u6587\u6863\u4E2D\u6CA1\u6709\u627E\u5230\u76F8\u5173\u5185\u5BB9\uFF0C\u4E0B\u9762\u7684\u56DE\u7B54\u6CA1\u6709\u6765\u6E90\u652F\u6301\u3002\u8BF7\u6362\u4E2A\u8BF4\u6CD5\uFF0C\u6216",
6005
6025
  answerDidNotArrive: "\u8FD9\u6761\u56DE\u7B54\u6CA1\u6709\u8FD4\u56DE\u3002\u8BF7\u518D\u95EE\u4E00\u6B21\u3002",
6006
6026
  askHuman: "\u8054\u7CFB\u6211\u4EEC",
6027
+ feedbackPrompt: "\u8FD9\u4E2A\u56DE\u7B54\u6709\u5E2E\u52A9\u5417\uFF1F",
6028
+ feedbackHelpful: "\u6709\u5E2E\u52A9",
6029
+ feedbackNotHelpful: "\u6CA1\u6709\u5E2E\u52A9",
6030
+ feedbackReasonTitle: "\u54EA\u91CC\u4E0D\u5BF9\uFF1F",
6031
+ feedbackReasonInaccurate: "\u4E0D\u51C6\u786E",
6032
+ feedbackReasonIncomplete: "\u4E0D\u5B8C\u6574",
6033
+ feedbackReasonOffTopic: "\u7B54\u975E\u6240\u95EE",
6034
+ feedbackReasonHardToFollow: "\u770B\u4E0D\u592A\u61C2",
6035
+ feedbackReasonOther: "\u5176\u4ED6\u539F\u56E0",
6036
+ feedbackCommentPlaceholder: "\u8865\u5145\u8BF4\u660E\uFF08\u53EF\u9009\uFF09",
6037
+ feedbackSend: "\u63D0\u4EA4",
6038
+ feedbackDismiss: "\u5173\u95ED",
6039
+ feedbackThanks: "\u8C22\u8C22\uFF0C\u8FD9\u5BF9\u6211\u4EEC\u5F88\u6709\u5E2E\u52A9\u3002",
6040
+ feedbackNotSent: "\u6CA1\u6709\u63D0\u4EA4\u6210\u529F\u3002",
6007
6041
  prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
6008
6042
  nextSuggestion: "\u4E0B\u4E00\u4E2A\u5EFA\u8BAE",
6009
6043
  conceptIllustration: "\u6982\u5FF5\u793A\u610F\u56FE",
6010
6044
  opensInNewTab: "\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00",
6045
+ seoTitle: "\u63CF\u8FF0\u95EE\u9898\uFF0C\u83B7\u5F97\u7B54\u6848",
6046
+ seoDescription: "\u7528\u4F60\u81EA\u5DF1\u7684\u8BDD\u63CF\u8FF0\u9047\u5230\u7684\u95EE\u9898\uFF0C\u5373\u53EF\u83B7\u5F97\u6765\u81EA\u6211\u4EEC\u4EA7\u54C1\u6587\u6863\u7684\u56DE\u7B54\uFF0C\u5E76\u9644\u4E0A\u7B54\u6848\u51FA\u5904\u7684\u9875\u9762\u94FE\u63A5\u3002",
6047
+ seoDescriptionProduct: "\u7528\u4F60\u81EA\u5DF1\u7684\u8BDD\u63CF\u8FF0\u9047\u5230\u7684\u95EE\u9898\uFF0C\u5373\u53EF\u83B7\u5F97\u6765\u81EA {product} \u53CA\u6211\u4EEC\u5176\u4ED6\u4EA7\u54C1\u6587\u6863\u7684\u56DE\u7B54\uFF0C\u5E76\u9644\u4E0A\u7B54\u6848\u51FA\u5904\u7684\u9875\u9762\u94FE\u63A5\u3002",
6011
6048
  capabilities: ["\u57FA\u4E8E\u6211\u4EEC\u81EA\u5DF1\u7684\u6587\u6863", "\u8DE8\u4EA7\u54C1\u5BF9\u6BD4", "\u76F4\u8FBE\u6B63\u786E\u7684\u9875\u9762"],
6012
6049
  prompts: [
6013
6050
  "\u6BCF\u95E8\u8BFE\u7A0B\u90FD\u8BB0\u5728\u4E0D\u540C\u7684\u8868\u683C\u91CC\u3002",
@@ -6051,10 +6088,27 @@ var HI = {
6051
6088
  noAnswer: "\u092F\u0939 \u092E\u0941\u091D\u0947 \u0939\u092E\u093E\u0930\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092E\u0947\u0902 \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E, \u0907\u0938\u0932\u093F\u090F \u0928\u0940\u091A\u0947 \u0926\u093F\u092F\u093E \u0909\u0924\u094D\u0924\u0930 \u0915\u093F\u0938\u0940 \u0938\u094D\u0930\u094B\u0924 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0926\u0942\u0938\u0930\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092A\u0942\u091B\u0947\u0902, \u092F\u093E",
6052
6089
  answerDidNotArrive: "\u0935\u0939 \u0909\u0924\u094D\u0924\u0930 \u0928\u0939\u0940\u0902 \u0906 \u0938\u0915\u093E\u0964 \u0915\u0943\u092A\u092F\u093E \u0926\u094B\u092C\u093E\u0930\u093E \u092A\u0942\u091B\u0947\u0902\u0964",
6053
6090
  askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
6091
+ feedbackPrompt: "\u0915\u094D\u092F\u093E \u092F\u0939 \u0909\u0924\u094D\u0924\u0930 \u092E\u0926\u0926\u0917\u093E\u0930 \u0925\u093E?",
6092
+ feedbackHelpful: "\u092E\u0926\u0926\u0917\u093E\u0930",
6093
+ feedbackNotHelpful: "\u092E\u0926\u0926\u0917\u093E\u0930 \u0928\u0939\u0940\u0902",
6094
+ feedbackReasonTitle: "\u0915\u094D\u092F\u093E \u0920\u0940\u0915 \u0928\u0939\u0940\u0902 \u0925\u093E?",
6095
+ feedbackReasonInaccurate: "\u0917\u093C\u0932\u0924 \u091C\u093E\u0928\u0915\u093E\u0930\u0940",
6096
+ feedbackReasonIncomplete: "\u0905\u0927\u0942\u0930\u093E",
6097
+ feedbackReasonOffTopic: "\u0935\u093F\u0937\u092F \u0938\u0947 \u0939\u091F\u0915\u0930",
6098
+ feedbackReasonHardToFollow: "\u0938\u092E\u091D\u0928\u0947 \u092E\u0947\u0902 \u092E\u0941\u0936\u094D\u0915\u093F\u0932",
6099
+ feedbackReasonOther: "\u0915\u0941\u091B \u0914\u0930",
6100
+ feedbackCommentPlaceholder: "\u0915\u0941\u091B \u0914\u0930 \u092C\u0924\u093E\u090F\u0902 (\u0935\u0948\u0915\u0932\u094D\u092A\u093F\u0915)",
6101
+ feedbackSend: "\u092D\u0947\u091C\u0947\u0902",
6102
+ feedbackDismiss: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902",
6103
+ feedbackThanks: "\u0927\u0928\u094D\u092F\u0935\u093E\u0926, \u0907\u0938\u0938\u0947 \u092E\u0926\u0926 \u092E\u093F\u0932\u0924\u0940 \u0939\u0948\u0964",
6104
+ feedbackNotSent: "\u092F\u0939 \u092D\u0947\u091C\u093E \u0928\u0939\u0940\u0902 \u091C\u093E \u0938\u0915\u093E\u0964",
6054
6105
  prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
6055
6106
  nextSuggestion: "\u0905\u0917\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
6056
6107
  conceptIllustration: "\u0905\u0935\u0927\u093E\u0930\u0923\u093E \u091A\u093F\u0924\u094D\u0930\u0923",
6057
6108
  opensInNewTab: "\u0928\u090F \u091F\u0948\u092C \u092E\u0947\u0902 \u0916\u0941\u0932\u0924\u093E \u0939\u0948",
6109
+ seoTitle: "\u0938\u092E\u0938\u094D\u092F\u093E \u092C\u0924\u093E\u090F\u0902, \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902",
6110
+ seoDescription: "\u0905\u092A\u0928\u0940 \u0938\u092E\u0938\u094D\u092F\u093E \u0905\u092A\u0928\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092C\u0924\u093E\u090F\u0902 \u0914\u0930 \u0939\u092E\u093E\u0930\u0947 \u0909\u0924\u094D\u092A\u093E\u0926 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u0938\u0947 \u0932\u093F\u092F\u093E \u0917\u092F\u093E \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902, \u0938\u093E\u0925 \u092E\u0947\u0902 \u0909\u0928\u094D\u0939\u0940\u0902 \u092A\u0928\u094D\u0928\u094B\u0902 \u0915\u0947 \u0932\u093F\u0902\u0915 \u091C\u0939\u093E\u0901 \u0938\u0947 \u0935\u0939 \u0906\u092F\u093E \u0939\u0948\u0964",
6111
+ seoDescriptionProduct: "\u0905\u092A\u0928\u0940 \u0938\u092E\u0938\u094D\u092F\u093E \u0905\u092A\u0928\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092C\u0924\u093E\u090F\u0902 \u0914\u0930 {product} \u0924\u0925\u093E \u0939\u092E\u093E\u0930\u0947 \u092C\u093E\u0915\u0940 \u0909\u0924\u094D\u092A\u093E\u0926\u094B\u0902 \u0915\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u0938\u0947 \u0932\u093F\u092F\u093E \u0917\u092F\u093E \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902, \u0938\u093E\u0925 \u092E\u0947\u0902 \u0909\u0928\u094D\u0939\u0940\u0902 \u092A\u0928\u094D\u0928\u094B\u0902 \u0915\u0947 \u0932\u093F\u0902\u0915 \u091C\u0939\u093E\u0901 \u0938\u0947 \u0935\u0939 \u0906\u092F\u093E \u0939\u0948\u0964",
6058
6112
  capabilities: [
6059
6113
  "\u0939\u092E\u093E\u0930\u0947 \u0905\u092A\u0928\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924",
6060
6114
  "\u0938\u092D\u0940 \u0909\u0924\u094D\u092A\u093E\u0926\u094B\u0902 \u0915\u0940 \u0924\u0941\u0932\u0928\u093E \u0915\u0930\u0947\u0902",
@@ -6102,10 +6156,27 @@ var ES = {
6102
6156
  noAnswer: "No he encontrado esto en nuestra documentaci\xF3n, as\xED que la respuesta de abajo no se apoya en ninguna fuente. Prueba a reformularla, o",
6103
6157
  answerDidNotArrive: "Esa respuesta no lleg\xF3. Int\xE9ntalo de nuevo.",
6104
6158
  askHuman: "habla con una persona",
6159
+ feedbackPrompt: "\xBFTe ha servido?",
6160
+ feedbackHelpful: "Me sirve",
6161
+ feedbackNotHelpful: "No me sirve",
6162
+ feedbackReasonTitle: "\xBFQu\xE9 ha fallado?",
6163
+ feedbackReasonInaccurate: "Es inexacta",
6164
+ feedbackReasonIncomplete: "Est\xE1 incompleta",
6165
+ feedbackReasonOffTopic: "No viene al caso",
6166
+ feedbackReasonHardToFollow: "Cuesta seguirla",
6167
+ feedbackReasonOther: "Otra cosa",
6168
+ feedbackCommentPlaceholder: "A\xF1ade un detalle (opcional)",
6169
+ feedbackSend: "Enviar",
6170
+ feedbackDismiss: "Cerrar",
6171
+ feedbackThanks: "Gracias, nos sirve.",
6172
+ feedbackNotSent: "No se ha podido enviar.",
6105
6173
  prevSuggestion: "Sugerencia anterior",
6106
6174
  nextSuggestion: "Sugerencia siguiente",
6107
6175
  conceptIllustration: "Ilustraci\xF3n del concepto",
6108
6176
  opensInNewTab: "se abre en una pesta\xF1a nueva",
6177
+ seoTitle: "Describe un problema y obt\xE9n una respuesta",
6178
+ seoDescription: "Describe con tus palabras el problema que tienes y recibe una respuesta extra\xEDda de la documentaci\xF3n de nuestros productos, con enlaces a las p\xE1ginas exactas de las que procede.",
6179
+ seoDescriptionProduct: "Describe con tus palabras el problema que tienes y recibe una respuesta extra\xEDda de la documentaci\xF3n de {product} y del resto de nuestros productos, con enlaces a las p\xE1ginas exactas de las que procede.",
6109
6180
  capabilities: [
6110
6181
  "Basado en nuestra documentaci\xF3n",
6111
6182
  "Compara todo el ecosistema",
@@ -6153,10 +6224,27 @@ var AR = {
6153
6224
  noAnswer: "\u0644\u0645 \u0623\u062C\u062F \u0647\u0630\u0627 \u0641\u064A \u0648\u062B\u0627\u0626\u0642\u0646\u0627\u060C \u0644\u0630\u0627 \u0641\u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0623\u062F\u0646\u0627\u0647 \u063A\u064A\u0631 \u0645\u0633\u062A\u0646\u062F\u0629 \u0625\u0644\u0649 \u0645\u0635\u062F\u0631. \u062D\u0627\u0648\u0644 \u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0635\u064A\u0627\u063A\u0629\u060C \u0623\u0648",
6154
6225
  answerDidNotArrive: "\u0644\u0645 \u062A\u0635\u0644 \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
6155
6226
  askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
6227
+ feedbackPrompt: "\u0647\u0644 \u0643\u0627\u0646\u062A \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0645\u0641\u064A\u062F\u0629\u061F",
6228
+ feedbackHelpful: "\u0645\u0641\u064A\u062F\u0629",
6229
+ feedbackNotHelpful: "\u063A\u064A\u0631 \u0645\u0641\u064A\u062F\u0629",
6230
+ feedbackReasonTitle: "\u0645\u0627 \u0627\u0644\u062E\u0637\u0623 \u0641\u064A\u0647\u0627\u061F",
6231
+ feedbackReasonInaccurate: "\u063A\u064A\u0631 \u062F\u0642\u064A\u0642\u0629",
6232
+ feedbackReasonIncomplete: "\u0646\u0627\u0642\u0635\u0629",
6233
+ feedbackReasonOffTopic: "\u062E\u0627\u0631\u062C \u0627\u0644\u0645\u0648\u0636\u0648\u0639",
6234
+ feedbackReasonHardToFollow: "\u0635\u0639\u0628\u0629 \u0627\u0644\u0641\u0647\u0645",
6235
+ feedbackReasonOther: "\u0634\u064A\u0621 \u0622\u062E\u0631",
6236
+ feedbackCommentPlaceholder: "\u0623\u0636\u0641 \u062A\u0641\u0635\u064A\u0644\u0627\u064B (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
6237
+ feedbackSend: "\u0625\u0631\u0633\u0627\u0644",
6238
+ feedbackDismiss: "\u0625\u063A\u0644\u0627\u0642",
6239
+ feedbackThanks: "\u0634\u0643\u0631\u064B\u0627\u060C \u0647\u0630\u0627 \u064A\u0633\u0627\u0639\u062F\u0646\u0627.",
6240
+ feedbackNotSent: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644.",
6156
6241
  prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
6157
6242
  nextSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0627\u0644\u064A",
6158
6243
  conceptIllustration: "\u0631\u0633\u0645 \u062A\u0648\u0636\u064A\u062D\u064A \u0644\u0644\u0645\u0641\u0647\u0648\u0645",
6159
6244
  opensInNewTab: "\u064A\u064F\u0641\u062A\u062D \u0641\u064A \u0639\u0644\u0627\u0645\u0629 \u062A\u0628\u0648\u064A\u0628 \u062C\u062F\u064A\u062F\u0629",
6245
+ seoTitle: "\u0635\u0641 \u0645\u0634\u0643\u0644\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629",
6246
+ seoDescription: "\u0635\u0641 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0627\u0644\u062A\u064A \u062A\u0648\u0627\u062C\u0647\u0647\u0627 \u0628\u0643\u0644\u0645\u0627\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629 \u0645\u0633\u062A\u0645\u062F\u0629 \u0645\u0646 \u0648\u062B\u0627\u0626\u0642 \u0645\u0646\u062A\u062C\u0627\u062A\u0646\u0627\u060C \u0645\u0639 \u0631\u0648\u0627\u0628\u0637 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0627\u062A \u0627\u0644\u062A\u064A \u062C\u0627\u0621\u062A \u0645\u0646\u0647\u0627.",
6247
+ seoDescriptionProduct: "\u0635\u0641 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0627\u0644\u062A\u064A \u062A\u0648\u0627\u062C\u0647\u0647\u0627 \u0628\u0643\u0644\u0645\u0627\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629 \u0645\u0633\u062A\u0645\u062F\u0629 \u0645\u0646 \u0648\u062B\u0627\u0626\u0642 {product} \u0648\u0628\u0642\u064A\u0629 \u0645\u0646\u062A\u062C\u0627\u062A\u0646\u0627\u060C \u0645\u0639 \u0631\u0648\u0627\u0628\u0637 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0627\u062A \u0627\u0644\u062A\u064A \u062C\u0627\u0621\u062A \u0645\u0646\u0647\u0627.",
6160
6248
  capabilities: [
6161
6249
  "\u0645\u0628\u0646\u064A \u0639\u0644\u0649 \u0648\u062B\u0627\u0626\u0642\u0646\u0627",
6162
6250
  "\u0642\u0627\u0631\u0646 \u0639\u0628\u0631 \u0627\u0644\u0645\u0646\u0638\u0648\u0645\u0629",
@@ -6204,10 +6292,27 @@ var TA = {
6204
6292
  noAnswer: "\u0B87\u0BA4\u0BC1 \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8, \u0B8E\u0BA9\u0BB5\u0BC7 \u0B95\u0BC0\u0BB4\u0BC7 \u0B89\u0BB3\u0BCD\u0BB3 \u0BAA\u0BA4\u0BBF\u0BB2\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0BAE\u0BC2\u0BB2\u0BAE\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8. \u0BB5\u0BC7\u0BB1\u0BC1 \u0BB5\u0B95\u0BC8\u0BAF\u0BBF\u0BB2\u0BCD \u0B95\u0BC7\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD, \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1",
6205
6293
  answerDidNotArrive: "\u0B85\u0BA8\u0BCD\u0BA4\u0BAA\u0BCD \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BB5\u0BB0\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8. \u0BAE\u0BC0\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD \u0B95\u0BC7\u0B9F\u0BCD\u0B9F\u0BC1\u0BAA\u0BCD \u0BAA\u0BBE\u0BB0\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD.",
6206
6294
  askHuman: "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BC8\u0BA4\u0BCD \u0BA4\u0BCA\u0B9F\u0BB0\u0BCD\u0BAA\u0BC1 \u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
6295
+ feedbackPrompt: "\u0B87\u0BA8\u0BCD\u0BA4\u0BAA\u0BCD \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BAF\u0BA9\u0BC1\u0BB3\u0BCD\u0BB3\u0BA4\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BA4\u0BBE?",
6296
+ feedbackHelpful: "\u0BAA\u0BAF\u0BA9\u0BC1\u0BB3\u0BCD\u0BB3\u0BA4\u0BC1",
6297
+ feedbackNotHelpful: "\u0BAA\u0BAF\u0BA9\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8",
6298
+ feedbackReasonTitle: "\u0B8E\u0BA9\u0BCD\u0BA9 \u0B9A\u0BB0\u0BBF\u0BAF\u0BBE\u0B95 \u0B87\u0BB2\u0BCD\u0BB2\u0BC8?",
6299
+ feedbackReasonInaccurate: "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BA4\u0B95\u0BB5\u0BB2\u0BCD",
6300
+ feedbackReasonIncomplete: "\u0BAE\u0BC1\u0BB4\u0BC1\u0BAE\u0BC8\u0BAF\u0BB1\u0BCD\u0BB1\u0BA4\u0BC1",
6301
+ feedbackReasonOffTopic: "\u0BA4\u0BB2\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0B85\u0BAA\u0BCD\u0BAA\u0BBE\u0BB1\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1",
6302
+ feedbackReasonHardToFollow: "\u0BAA\u0BC1\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0B95\u0BCA\u0BB3\u0BCD\u0BB3 \u0B95\u0B9F\u0BBF\u0BA9\u0BAE\u0BCD",
6303
+ feedbackReasonOther: "\u0BB5\u0BC7\u0BB1\u0BC1 \u0B8F\u0BA4\u0BCB",
6304
+ feedbackCommentPlaceholder: "\u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BAE\u0BCD (\u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD)",
6305
+ feedbackSend: "\u0B85\u0BA9\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1",
6306
+ feedbackDismiss: "\u0BAE\u0BC2\u0B9F\u0BC1",
6307
+ feedbackThanks: "\u0BA8\u0BA9\u0BCD\u0BB1\u0BBF, \u0B87\u0BA4\u0BC1 \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0B89\u0BA4\u0BB5\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1.",
6308
+ feedbackNotSent: "\u0B85\u0BA9\u0BC1\u0BAA\u0BCD\u0BAA \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8.",
6207
6309
  prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
6208
6310
  nextSuggestion: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
6209
6311
  conceptIllustration: "\u0B95\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1 \u0BB5\u0BBF\u0BB3\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BAE\u0BCD",
6210
6312
  opensInNewTab: "\u0BAA\u0BC1\u0BA4\u0BBF\u0BAF \u0BA4\u0BBE\u0BB5\u0BB2\u0BBF\u0BB2\u0BCD \u0BA4\u0BBF\u0BB1\u0B95\u0BCD\u0B95\u0BC1\u0BAE\u0BCD",
6313
+ seoTitle: "\u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD, \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BC6\u0BB1\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
6314
+ seoDescription: "\u0BA8\u0BC0\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0BAE\u0BCD \u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD; \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BBF\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1 \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BC1\u0BAE\u0BCD, \u0B85\u0BA4\u0BC1 \u0BB5\u0BA8\u0BCD\u0BA4 \u0BAA\u0B95\u0BCD\u0B95\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BBE\u0BA9 \u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B9F\u0BA9\u0BCD.",
6315
+ seoDescriptionProduct: "{product} \u0BAE\u0BB1\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BAA\u0BBF\u0BB1 \u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BBF\u0BA9\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BBF\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1 \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BC6\u0BB1, \u0BA8\u0BC0\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0BAE\u0BCD \u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u2014 \u0B85\u0BA4\u0BC1 \u0BB5\u0BA8\u0BCD\u0BA4 \u0BAA\u0B95\u0BCD\u0B95\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BBE\u0BA9 \u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B9F\u0BA9\u0BCD.",
6211
6316
  capabilities: [
6212
6317
  "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BA9\u0BCD \u0B85\u0B9F\u0BBF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC8\u0BAF\u0BBF\u0BB2\u0BCD",
6213
6318
  "\u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0B92\u0BAA\u0BCD\u0BAA\u0BBF\u0B9F\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
@@ -6248,6 +6353,171 @@ function exploreStrings(locale) {
6248
6353
  function fill(template, values) {
6249
6354
  return template.replace(/\{(\w+)\}/g, (match, key) => values[key] ?? match);
6250
6355
  }
6356
+
6357
+ // src/components/explore-types.ts
6358
+ var EXPLORE_FEEDBACK_REASONS = [
6359
+ "INACCURATE",
6360
+ "INCOMPLETE",
6361
+ "OFF_TOPIC",
6362
+ "HARD_TO_FOLLOW",
6363
+ "OTHER"
6364
+ ];
6365
+ var EXPLORE_MESSAGE_FIELDS = (
6366
+ /* GraphQL */
6367
+ `
6368
+ id
6369
+ conversationId
6370
+ role
6371
+ status
6372
+ content
6373
+ partialContent
6374
+ activity
6375
+ references {
6376
+ url
6377
+ title
6378
+ description
6379
+ product
6380
+ imageUrl
6381
+ index
6382
+ }
6383
+ ctas {
6384
+ kind
6385
+ label
6386
+ url
6387
+ product
6388
+ }
6389
+ followUps
6390
+ answered
6391
+ attachments {
6392
+ name
6393
+ mimeType
6394
+ size
6395
+ textExtracted
6396
+ }
6397
+ errorCode
6398
+ createdAt
6399
+ completedAt
6400
+ `
6401
+ );
6402
+ var EXPLORE_OWN_MESSAGE_FIELDS = (
6403
+ /* GraphQL */
6404
+ `
6405
+ ${EXPLORE_MESSAGE_FIELDS}
6406
+ feedback {
6407
+ rating
6408
+ reason
6409
+ comment
6410
+ createdAt
6411
+ }
6412
+ `
6413
+ );
6414
+ var EXPLORE_CATALOG_QUERY = (
6415
+ /* GraphQL */
6416
+ `
6417
+ query ExploreCatalog($productSlug: String) {
6418
+ exploreCatalog(productSlug: $productSlug) {
6419
+ enabled
6420
+ products {
6421
+ slug
6422
+ name
6423
+ tagline
6424
+ website
6425
+ }
6426
+ examplePrompts
6427
+ welcomeTitle
6428
+ welcomeBody
6429
+ limits {
6430
+ maxMessageLength
6431
+ maxTurnsPerConversation
6432
+ messagesPerDay
6433
+ historyTurns
6434
+ }
6435
+ captchaRequired
6436
+ recaptchaSiteKey
6437
+ }
6438
+ }
6439
+ `
6440
+ );
6441
+ var EXPLORE_MESSAGE_QUERY = (
6442
+ /* GraphQL */
6443
+ `
6444
+ query ExploreMessage($conversationToken: String!, $id: ID!) {
6445
+ exploreMessage(conversationToken: $conversationToken, id: $id) {
6446
+ ${EXPLORE_OWN_MESSAGE_FIELDS}
6447
+ }
6448
+ }
6449
+ `
6450
+ );
6451
+ var SEND_EXPLORE_MESSAGE_MUTATION = (
6452
+ /* GraphQL */
6453
+ `
6454
+ mutation SendExploreMessage($input: SendExploreMessageInput!) {
6455
+ sendExploreMessage(input: $input) {
6456
+ conversation {
6457
+ id
6458
+ token
6459
+ productSlug
6460
+ turnCount
6461
+ createdAt
6462
+ }
6463
+ userMessage {
6464
+ ${EXPLORE_OWN_MESSAGE_FIELDS}
6465
+ }
6466
+ assistantMessage {
6467
+ ${EXPLORE_OWN_MESSAGE_FIELDS}
6468
+ }
6469
+ remainingToday
6470
+ }
6471
+ }
6472
+ `
6473
+ );
6474
+ var RECORD_EXPLORE_CLICK_MUTATION = (
6475
+ /* GraphQL */
6476
+ `
6477
+ mutation RecordExploreClick($input: RecordExploreClickInput!) {
6478
+ recordExploreClick(input: $input) {
6479
+ recorded
6480
+ }
6481
+ }
6482
+ `
6483
+ );
6484
+ var SUBMIT_EXPLORE_FEEDBACK_MUTATION = (
6485
+ /* GraphQL */
6486
+ `
6487
+ mutation SubmitExploreFeedback($input: SubmitExploreFeedbackInput!) {
6488
+ submitExploreFeedback(input: $input) {
6489
+ recorded
6490
+ feedback {
6491
+ rating
6492
+ reason
6493
+ comment
6494
+ createdAt
6495
+ }
6496
+ }
6497
+ }
6498
+ `
6499
+ );
6500
+ var EXPLORE_FEEDBACK_COMMENT_SOFT_MAX = 500;
6501
+ var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
6502
+ /* GraphQL */
6503
+ `
6504
+ mutation CreateExploreShareLink($conversationToken: String!) {
6505
+ createExploreShareLink(conversationToken: $conversationToken) {
6506
+ shareToken
6507
+ }
6508
+ }
6509
+ `
6510
+ );
6511
+ var EXPLORE_SHARED_CONVERSATION_QUERY = (
6512
+ /* GraphQL */
6513
+ `
6514
+ query ExploreSharedConversation($shareToken: String!) {
6515
+ exploreSharedConversation(shareToken: $shareToken) {
6516
+ ${EXPLORE_MESSAGE_FIELDS}
6517
+ }
6518
+ }
6519
+ `
6520
+ );
6251
6521
  var PROSE_CSS = `
6252
6522
  .boff-prose {
6253
6523
  max-width: none;
@@ -6425,135 +6695,6 @@ function ProseStyles() {
6425
6695
  return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: PROSE_CSS } });
6426
6696
  }
6427
6697
 
6428
- // src/components/explore-types.ts
6429
- var EXPLORE_MESSAGE_FIELDS = (
6430
- /* GraphQL */
6431
- `
6432
- id
6433
- conversationId
6434
- role
6435
- status
6436
- content
6437
- partialContent
6438
- activity
6439
- references {
6440
- url
6441
- title
6442
- description
6443
- product
6444
- imageUrl
6445
- index
6446
- }
6447
- ctas {
6448
- kind
6449
- label
6450
- url
6451
- product
6452
- }
6453
- followUps
6454
- answered
6455
- attachments {
6456
- name
6457
- mimeType
6458
- size
6459
- textExtracted
6460
- }
6461
- errorCode
6462
- createdAt
6463
- completedAt
6464
- `
6465
- );
6466
- var EXPLORE_CATALOG_QUERY = (
6467
- /* GraphQL */
6468
- `
6469
- query ExploreCatalog($productSlug: String) {
6470
- exploreCatalog(productSlug: $productSlug) {
6471
- enabled
6472
- products {
6473
- slug
6474
- name
6475
- tagline
6476
- website
6477
- }
6478
- examplePrompts
6479
- welcomeTitle
6480
- welcomeBody
6481
- limits {
6482
- maxMessageLength
6483
- maxTurnsPerConversation
6484
- messagesPerDay
6485
- historyTurns
6486
- }
6487
- captchaRequired
6488
- recaptchaSiteKey
6489
- }
6490
- }
6491
- `
6492
- );
6493
- var EXPLORE_MESSAGE_QUERY = (
6494
- /* GraphQL */
6495
- `
6496
- query ExploreMessage($conversationToken: String!, $id: ID!) {
6497
- exploreMessage(conversationToken: $conversationToken, id: $id) {
6498
- ${EXPLORE_MESSAGE_FIELDS}
6499
- }
6500
- }
6501
- `
6502
- );
6503
- var SEND_EXPLORE_MESSAGE_MUTATION = (
6504
- /* GraphQL */
6505
- `
6506
- mutation SendExploreMessage($input: SendExploreMessageInput!) {
6507
- sendExploreMessage(input: $input) {
6508
- conversation {
6509
- id
6510
- token
6511
- productSlug
6512
- turnCount
6513
- createdAt
6514
- }
6515
- userMessage {
6516
- ${EXPLORE_MESSAGE_FIELDS}
6517
- }
6518
- assistantMessage {
6519
- ${EXPLORE_MESSAGE_FIELDS}
6520
- }
6521
- remainingToday
6522
- }
6523
- }
6524
- `
6525
- );
6526
- var RECORD_EXPLORE_CLICK_MUTATION = (
6527
- /* GraphQL */
6528
- `
6529
- mutation RecordExploreClick($input: RecordExploreClickInput!) {
6530
- recordExploreClick(input: $input) {
6531
- recorded
6532
- }
6533
- }
6534
- `
6535
- );
6536
- var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
6537
- /* GraphQL */
6538
- `
6539
- mutation CreateExploreShareLink($conversationToken: String!) {
6540
- createExploreShareLink(conversationToken: $conversationToken) {
6541
- shareToken
6542
- }
6543
- }
6544
- `
6545
- );
6546
- var EXPLORE_SHARED_CONVERSATION_QUERY = (
6547
- /* GraphQL */
6548
- `
6549
- query ExploreSharedConversation($shareToken: String!) {
6550
- exploreSharedConversation(shareToken: $shareToken) {
6551
- ${EXPLORE_MESSAGE_FIELDS}
6552
- }
6553
- }
6554
- `
6555
- );
6556
-
6557
6698
  // src/data/products.ts
6558
6699
  var ECOSYSTEM_PRODUCTS = [
6559
6700
  {
@@ -7581,6 +7722,42 @@ function useExploreChat(options = {}) {
7581
7722
  },
7582
7723
  [client]
7583
7724
  );
7725
+ const submitFeedback = useCallback(
7726
+ async (messageId, rating, detail) => {
7727
+ const token = conversationTokenRef.current;
7728
+ if (!token) return false;
7729
+ const comment = detail?.comment?.trim();
7730
+ const input = {
7731
+ conversationToken: token,
7732
+ messageId,
7733
+ rating,
7734
+ // Only meaningful with NOT_HELPFUL. The server stores null for HELPFUL either
7735
+ // way; sending it would just be noise the backend has to defend against.
7736
+ reason: rating === "NOT_HELPFUL" ? detail?.reason ?? null : null,
7737
+ comment: comment ? comment : null
7738
+ };
7739
+ try {
7740
+ const res = await client.mutate(
7741
+ SUBMIT_EXPLORE_FEEDBACK_MUTATION,
7742
+ { input }
7743
+ );
7744
+ const result = res?.data?.submitExploreFeedback;
7745
+ if (!result?.recorded) return false;
7746
+ const recorded = result.feedback;
7747
+ if (recorded && mountedRef.current) {
7748
+ setMessages(
7749
+ (current) => current.map(
7750
+ (message) => message.id === messageId ? { ...message, feedback: recorded } : message
7751
+ )
7752
+ );
7753
+ }
7754
+ return true;
7755
+ } catch {
7756
+ return false;
7757
+ }
7758
+ },
7759
+ [client]
7760
+ );
7584
7761
  return {
7585
7762
  phase,
7586
7763
  catalog,
@@ -7600,6 +7777,7 @@ function useExploreChat(options = {}) {
7600
7777
  deleteConversation,
7601
7778
  clearHistory,
7602
7779
  recordClick,
7780
+ submitFeedback,
7603
7781
  createShareLink,
7604
7782
  isSharedView
7605
7783
  };
@@ -8527,6 +8705,206 @@ function ThinkingIndicator({ activity }) {
8527
8705
  }
8528
8706
  );
8529
8707
  }
8708
+ function AnswerFeedback({
8709
+ strings: T,
8710
+ messageId,
8711
+ feedback,
8712
+ onSubmit
8713
+ }) {
8714
+ const [local, setLocal] = useState(null);
8715
+ const [failed, setFailed] = useState(false);
8716
+ const [sending, setSending] = useState(false);
8717
+ const [chooserOpen, setChooserOpen] = useState(false);
8718
+ const [reason, setReason] = useState(null);
8719
+ const [comment, setComment] = useState("");
8720
+ const downRef = useRef(null);
8721
+ const firstReasonRef = useRef(null);
8722
+ const inFlightRef = useRef(false);
8723
+ const panelId = `boff-explore-feedback-${messageId}`;
8724
+ const rating = local ?? feedback?.rating ?? null;
8725
+ const rated = rating !== null;
8726
+ const reasonLabels = {
8727
+ INACCURATE: T.feedbackReasonInaccurate,
8728
+ INCOMPLETE: T.feedbackReasonIncomplete,
8729
+ OFF_TOPIC: T.feedbackReasonOffTopic,
8730
+ HARD_TO_FOLLOW: T.feedbackReasonHardToFollow,
8731
+ OTHER: T.feedbackReasonOther
8732
+ };
8733
+ const closeChooser = useCallback(() => {
8734
+ setChooserOpen(false);
8735
+ downRef.current?.focus();
8736
+ }, []);
8737
+ const submit = useCallback(
8738
+ async (next, detail) => {
8739
+ if (inFlightRef.current) return;
8740
+ inFlightRef.current = true;
8741
+ setSending(true);
8742
+ setFailed(false);
8743
+ setLocal(next);
8744
+ const recorded = await onSubmit(next, detail);
8745
+ inFlightRef.current = false;
8746
+ setSending(false);
8747
+ if (recorded) return;
8748
+ setLocal(null);
8749
+ setFailed(true);
8750
+ },
8751
+ [onSubmit]
8752
+ );
8753
+ const onThumbUp = useCallback(() => {
8754
+ setChooserOpen(false);
8755
+ void submit("HELPFUL");
8756
+ }, [submit]);
8757
+ const onThumbDown = useCallback(() => {
8758
+ setChooserOpen((open) => !open);
8759
+ }, []);
8760
+ const onSendReason = useCallback(() => {
8761
+ setChooserOpen(false);
8762
+ void submit("NOT_HELPFUL", { reason, comment });
8763
+ }, [comment, reason, submit]);
8764
+ useEffect(() => {
8765
+ if (!chooserOpen) return;
8766
+ firstReasonRef.current?.focus();
8767
+ }, [chooserOpen]);
8768
+ const thumbClass = (active) => cn(
8769
+ "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border transition-colors",
8770
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
8771
+ "disabled:pointer-events-none disabled:opacity-50",
8772
+ active ? "border-primary/40 bg-accent text-primary" : "border-border bg-card text-muted-foreground hover:border-primary/40 hover:bg-accent hover:text-foreground"
8773
+ );
8774
+ return /* @__PURE__ */ jsxs(
8775
+ "div",
8776
+ {
8777
+ "data-boff-explore": "feedback",
8778
+ "data-rating": rating ?? "none",
8779
+ className: "pt-0.5",
8780
+ children: [
8781
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
8782
+ /* @__PURE__ */ jsx(
8783
+ "p",
8784
+ {
8785
+ "data-boff-explore": "feedback-status",
8786
+ role: "status",
8787
+ className: "text-xs text-muted-foreground",
8788
+ children: failed ? T.feedbackNotSent : rated ? T.feedbackThanks : T.feedbackPrompt
8789
+ }
8790
+ ),
8791
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
8792
+ /* @__PURE__ */ jsx(
8793
+ "button",
8794
+ {
8795
+ "data-boff-explore": "feedback-up",
8796
+ type: "button",
8797
+ disabled: sending,
8798
+ "aria-label": T.feedbackHelpful,
8799
+ title: T.feedbackHelpful,
8800
+ "aria-pressed": rating === "HELPFUL",
8801
+ onClick: onThumbUp,
8802
+ className: thumbClass(rating === "HELPFUL"),
8803
+ children: /* @__PURE__ */ jsx(ThumbsUp, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
8804
+ }
8805
+ ),
8806
+ /* @__PURE__ */ jsx(
8807
+ "button",
8808
+ {
8809
+ ref: downRef,
8810
+ "data-boff-explore": "feedback-down",
8811
+ type: "button",
8812
+ disabled: sending,
8813
+ "aria-label": T.feedbackNotHelpful,
8814
+ title: T.feedbackNotHelpful,
8815
+ "aria-pressed": rating === "NOT_HELPFUL",
8816
+ "aria-expanded": chooserOpen,
8817
+ "aria-controls": chooserOpen ? panelId : void 0,
8818
+ onClick: onThumbDown,
8819
+ className: thumbClass(rating === "NOT_HELPFUL" || chooserOpen),
8820
+ children: /* @__PURE__ */ jsx(ThumbsDown, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
8821
+ }
8822
+ )
8823
+ ] })
8824
+ ] }),
8825
+ chooserOpen ? /* @__PURE__ */ jsxs(
8826
+ "div",
8827
+ {
8828
+ id: panelId,
8829
+ "data-boff-explore": "feedback-reasons",
8830
+ role: "group",
8831
+ "aria-label": T.feedbackReasonTitle,
8832
+ onKeyDown: (event) => {
8833
+ if (event.key !== "Escape") return;
8834
+ event.stopPropagation();
8835
+ closeChooser();
8836
+ },
8837
+ className: "boff-explore-fade mt-2 rounded-xl border border-border bg-card p-3",
8838
+ children: [
8839
+ /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-card-foreground", children: T.feedbackReasonTitle }),
8840
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EXPLORE_FEEDBACK_REASONS.map((code, index) => /* @__PURE__ */ jsx(
8841
+ "button",
8842
+ {
8843
+ ref: index === 0 ? firstReasonRef : void 0,
8844
+ "data-boff-explore": "feedback-reason",
8845
+ "data-reason": code,
8846
+ type: "button",
8847
+ "aria-pressed": reason === code,
8848
+ onClick: () => setReason((current) => current === code ? null : code),
8849
+ className: cn(
8850
+ "inline-flex max-w-full items-center rounded-full border px-3 py-1 text-xs transition-colors",
8851
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
8852
+ reason === code ? "border-primary/40 bg-accent text-primary" : "border-border bg-background text-muted-foreground hover:border-primary/40 hover:bg-accent hover:text-foreground"
8853
+ ),
8854
+ children: /* @__PURE__ */ jsx("span", { className: "truncate", children: reasonLabels[code] })
8855
+ },
8856
+ code
8857
+ )) }),
8858
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
8859
+ /* @__PURE__ */ jsx(
8860
+ "input",
8861
+ {
8862
+ "data-boff-explore": "feedback-comment",
8863
+ type: "text",
8864
+ value: comment,
8865
+ onChange: (event) => setComment(event.target.value),
8866
+ onKeyDown: (event) => {
8867
+ if (event.key !== "Enter") return;
8868
+ event.preventDefault();
8869
+ onSendReason();
8870
+ },
8871
+ "aria-label": T.feedbackCommentPlaceholder,
8872
+ placeholder: T.feedbackCommentPlaceholder,
8873
+ maxLength: EXPLORE_FEEDBACK_COMMENT_SOFT_MAX,
8874
+ className: "min-w-0 flex-1 rounded-md border border-border bg-background px-2 py-1 text-base text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring sm:text-sm"
8875
+ }
8876
+ ),
8877
+ /* @__PURE__ */ jsx(
8878
+ Button,
8879
+ {
8880
+ "data-boff-explore": "feedback-send",
8881
+ type: "button",
8882
+ size: "sm",
8883
+ disabled: sending,
8884
+ onClick: onSendReason,
8885
+ children: T.feedbackSend
8886
+ }
8887
+ ),
8888
+ /* @__PURE__ */ jsx(
8889
+ Button,
8890
+ {
8891
+ "data-boff-explore": "feedback-dismiss",
8892
+ type: "button",
8893
+ size: "sm",
8894
+ variant: "ghost",
8895
+ className: "text-muted-foreground",
8896
+ onClick: closeChooser,
8897
+ children: T.feedbackDismiss
8898
+ }
8899
+ )
8900
+ ] })
8901
+ ]
8902
+ }
8903
+ ) : null
8904
+ ]
8905
+ }
8906
+ );
8907
+ }
8530
8908
  function UserBubble({
8531
8909
  strings: T,
8532
8910
  message
@@ -8575,7 +8953,8 @@ function AssistantBubble({
8575
8953
  onNavigate,
8576
8954
  anchorRef,
8577
8955
  onFollow,
8578
- onFollowUp
8956
+ onFollowUp,
8957
+ onFeedback
8579
8958
  }) {
8580
8959
  const streaming = message.status === "PENDING" || message.status === "RUNNING";
8581
8960
  const body = message.content || message.partialContent || "";
@@ -8686,7 +9065,16 @@ function AssistantBubble({
8686
9065
  },
8687
9066
  question
8688
9067
  )) })
8689
- ] }) : null
9068
+ ] }) : null,
9069
+ completed && onFeedback ? /* @__PURE__ */ jsx(
9070
+ AnswerFeedback,
9071
+ {
9072
+ strings: T,
9073
+ messageId: message.id,
9074
+ feedback: message.feedback,
9075
+ onSubmit: onFeedback
9076
+ }
9077
+ ) : null
8690
9078
  ] })
8691
9079
  ]
8692
9080
  }
@@ -9090,6 +9478,7 @@ function ExplorePage({
9090
9478
  deleteConversation,
9091
9479
  clearHistory,
9092
9480
  recordClick,
9481
+ submitFeedback,
9093
9482
  createShareLink,
9094
9483
  isSharedView
9095
9484
  } = useExploreChat({
@@ -9146,6 +9535,10 @@ function ExplorePage({
9146
9535
  () => catalog.products.find((p) => p.slug === focusProduct)?.name ?? null,
9147
9536
  [catalog.products, focusProduct]
9148
9537
  );
9538
+ const headProductName = useMemo(
9539
+ () => productSlug ? catalog.products.find((p) => p.slug === productSlug)?.name ?? null : null,
9540
+ [catalog.products, productSlug]
9541
+ );
9149
9542
  const imageOrigins = useMemo(
9150
9543
  () => inlineImageOrigins(catalog.products),
9151
9544
  [catalog.products]
@@ -9510,16 +9903,17 @@ function ExplorePage({
9510
9903
  ),
9511
9904
  style: rootStyle,
9512
9905
  children: [
9513
- seo ? /* @__PURE__ */ jsx(
9906
+ /* @__PURE__ */ jsx(
9514
9907
  PageHead,
9515
9908
  {
9516
- title: seo.title ?? "Explore \u2014 ask anything about our products",
9517
- description: seo.description ?? "Ask questions in plain English and get answers drawn from our product documentation, with links to the exact pages they came from.",
9518
- keywords: seo.keywords,
9519
- image: seo.image,
9520
- url: seo.url
9909
+ title: seo?.title ?? T.seoTitle,
9910
+ description: seo?.description ?? (headProductName ? fill(T.seoDescriptionProduct, { product: headProductName }) : T.seoDescription),
9911
+ productName: seo?.title ? void 0 : headProductName ?? void 0,
9912
+ keywords: seo?.keywords,
9913
+ image: seo?.image,
9914
+ url: seo?.url
9521
9915
  }
9522
- ) : null,
9916
+ ),
9523
9917
  /* @__PURE__ */ jsx(ProseStyles, {}),
9524
9918
  /* @__PURE__ */ jsx(ExploreStyles, {}),
9525
9919
  !showWelcome ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-border px-4 py-2.5", children: [
@@ -9696,7 +10090,8 @@ function ExplorePage({
9696
10090
  onNavigate,
9697
10091
  anchorRef: message.id === latestAssistantId ? latestAssistantRef : void 0,
9698
10092
  onFollow: (kind, url) => recordClick(message.id, kind, url),
9699
- onFollowUp: sendPrompt
10093
+ onFollowUp: sendPrompt,
10094
+ onFeedback: isSharedView ? void 0 : (rating, detail) => submitFeedback(message.id, rating, detail)
9700
10095
  },
9701
10096
  message.id
9702
10097
  )