@vinaverse/tokens 0.1.0-alpha.2 → 0.1.0-alpha.21

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.
@@ -1,7 +1,8 @@
1
1
  declare const en: {
2
- readonly disclosureFallback: "You're chatting with an AI agent. Powered by Vinaverse.";
2
+ readonly disclosureFallback: "{agent} is an AI agent and can make mistakes. Powered by Vinaverse.";
3
3
  readonly agentLabel: "AI agent";
4
4
  readonly agentFallbackName: "the agent";
5
+ readonly askingAbout: "Asking about";
5
6
  readonly you: "You";
6
7
  readonly staffLabel: "{by} · person";
7
8
  readonly staffFallbackRole: "the team";
@@ -17,9 +18,11 @@ declare const en: {
17
18
  readonly bannerUnavailable: "Couldn't connect.";
18
19
  readonly continueHere: "Continue here";
19
20
  readonly tryAgain: "Try again";
21
+ readonly talkToPerson: "Talk to a person";
20
22
  readonly messageSending: "Sending";
21
23
  readonly messageHeld: "Sends when you continue";
22
- readonly messageNotSent: "Not sent";
24
+ readonly messageNotSent: "Didn't send.";
25
+ readonly messageWaiting: "Waiting to send";
23
26
  readonly messageDelivered: "Delivered";
24
27
  readonly messageCutOff: "This reply was cut off.";
25
28
  readonly takeoverStarted: "A person from {by} is replying now.";
@@ -30,6 +33,21 @@ declare const en: {
30
33
  readonly flowNotSent: "Your answers couldn't be sent yet.";
31
34
  readonly turnFailed: "Something went wrong.";
32
35
  readonly working: "{agent} is working on it…";
36
+ /** The working line: what the agent is doing, at a glance, and when a step is slow, failed or stopped. */
37
+ readonly workingGlance: "Working on it…";
38
+ /** The header: what the conversation is about, the switcher, New. */
39
+ readonly headerHome: "Home";
40
+ readonly headerAbout: "About {title}";
41
+ readonly conversations: "Conversations";
42
+ readonly newConversation: "Start a new conversation";
43
+ readonly newShort: "New";
44
+ readonly back: "Back";
45
+ readonly stepStill: "Still {step}";
46
+ readonly stepSlow: "This is taking longer than usual.";
47
+ readonly stepFailed: "Couldn't finish: {step}";
48
+ readonly turnStopped: "Stopped. Ask again or try something else.";
49
+ readonly steps: "{count} steps";
50
+ readonly stepsOne: "{count} step";
33
51
  readonly proposalConfirm: "Confirm";
34
52
  readonly proposalDecline: "Decline";
35
53
  readonly proposalChange: "Change";
@@ -47,8 +65,56 @@ declare const en: {
47
65
  readonly questionStep: "Question {step} of {total}";
48
66
  readonly questionAddPhoto: "Add a photo";
49
67
  readonly questionCharactersLeft: "{count} characters left";
68
+ readonly questionCharactersLeftOne: "{count} character left";
50
69
  readonly priceFrom: "From {price}";
70
+ /** A listing with no rating yet; empty draws nothing, a tenant's word ("New") draws in the rating's place. */
71
+ readonly ratingNone: "";
72
+ readonly nextAvailable: "Next: {time}";
73
+ /** A time today and tomorrow, as `nextAvailable` says it (`{time}`: "10:00 AM"). */
74
+ readonly today: "today, {time}";
75
+ /** A day separator's words for today and yesterday (other days are the locale's weekday or date). */
76
+ readonly dayToday: "Today";
77
+ readonly dayYesterday: "Yesterday";
78
+ readonly tomorrow: "tomorrow, {time}";
79
+ readonly agentEnded: "This conversation ended";
80
+ readonly agentEndedBody: "Start a new one whenever you like.";
81
+ readonly agentStartOver: "Start a new conversation";
82
+ readonly agentUnreachable: "Couldn't reach {agent}";
83
+ readonly agentUnreachableBody: "Check your connection and try again.";
84
+ readonly agentOff: "{agent} isn't available right now";
85
+ readonly agentOffBody: "Please try again later.";
86
+ readonly helpful: "Was this helpful?";
87
+ readonly helpfulYes: "Yes";
88
+ readonly helpfulNo: "No";
89
+ readonly helpfulThanks: "Thanks for telling us.";
90
+ readonly launcherOpen: "Open {agent}";
91
+ readonly launcherGreeting: "Hi, I'm {agent}. Ask me what you need.";
92
+ readonly close: "Close";
93
+ readonly welcomeFallback: "Hi, I'm {agent}. How can I help?";
94
+ readonly privacy: "Privacy";
95
+ readonly cardsInRow: "{count} results, swipe for more";
96
+ readonly cardsInRowOne: "{count} result";
51
97
  readonly open: "Open";
98
+ /** History: the person's past conversations, and reading one back. */
99
+ readonly historyEmpty: "No conversations yet";
100
+ readonly historyEmptyBody: "Your conversations with {agent} will show here.";
101
+ readonly historyFailed: "Couldn't load your conversations.";
102
+ readonly historyOff: "History is not available.";
103
+ readonly historyMessages: "{count} messages";
104
+ readonly historyMessagesOne: "{count} message";
105
+ readonly historyEnded: "Ended";
106
+ readonly historyContinue: "Continue";
107
+ readonly historyDelete: "Delete";
108
+ readonly historyDeleteTitle: "Delete this conversation?";
109
+ readonly historyDeleteBody: "It's removed from your history everywhere.";
110
+ readonly historyDeleteFailed: "Couldn't delete this conversation.";
111
+ readonly cancel: "Cancel";
112
+ readonly transcriptFailed: "Couldn't load this conversation.";
113
+ readonly transcriptGone: "This conversation is no longer available.";
114
+ readonly transcriptEarlier: "Earlier messages";
115
+ /** Under the person's message a guardrail refused. */
116
+ readonly messageRefused: "Not answered";
117
+ readonly loading: "Loading…";
52
118
  };
53
119
  type CopyKey = keyof typeof en;
54
120
  type Copy = Readonly<Record<CopyKey, string>>;
@@ -63,6 +129,11 @@ declare const COPY: Readonly<Record<'en' | 'es' | 'pt-BR', Copy>>;
63
129
  * (uk), and the words for it in Arabic, Hebrew, Hindi, Chinese, Japanese and Korean.
64
130
  */
65
131
  declare const AI_MARK: RegExp;
132
+ /**
133
+ * Whether a text is a disclosure a kit may draw: it says AI (`AI_MARK`, in the person's language) and names Vinaverse,
134
+ * the rule a tenant's `disclosureFallback` passes. Words an app holds from before are drawn only when it holds.
135
+ */
136
+ declare function isDisclosure(text: string): boolean;
66
137
  type Translate = (key: CopyKey, vars?: Readonly<Record<string, string | number>>) => string;
67
138
  /** The built-in copy for a locale, English when the language has none. */
68
139
  declare function builtInCopy(locale: string | undefined): Copy;
@@ -82,7 +153,18 @@ declare function textDirection(locale: string | undefined): 'ltr' | 'rtl';
82
153
  declare function formatMoney(amountMinor: number, currency: string, locale?: string): string;
83
154
  /** A start and an end: "Wed, Oct 14, 10:00 – 11:30 AM" in the locale and time zone. */
84
155
  declare function formatTimeRange(start: string, end: string | undefined, locale?: string, timeZone?: string): string;
156
+ /**
157
+ * A moment as a person says it: "today, 10:00 AM" and "tomorrow, 10:00 AM" (`today` and `tomorrow` are the copy's
158
+ * words, with `{time}`), else the date and time ("Fri, Oct 17, 10:00 AM"), in the locale and time zone. `now` is the
159
+ * clock it is judged by.
160
+ */
161
+ declare function formatDayTime(start: string, words: {
162
+ readonly today: string;
163
+ readonly tomorrow: string;
164
+ }, locale?: string, timeZone?: string, now?: number): string;
85
165
  /** A calendar date (`YYYY-MM-DD`) in the locale: "October 14, 2026". */
86
166
  declare function formatDate(date: string, locale?: string): string;
167
+ /** A moment with its date and time in the locale and zone: "Oct 15, 2026, 9:30 AM"; the text as given when it is not one. */
168
+ declare function formatDateTime(at: string, locale?: string, timeZone?: string): string;
87
169
 
88
- export { AI_MARK, BANNED_WORDS, COPY, type Copy, type CopyKey, type CopyOverrides, type Translate, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatMoney, formatTimeRange, textDirection };
170
+ export { AI_MARK, BANNED_WORDS, COPY, type Copy, type CopyKey, type CopyOverrides, type Translate, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatDateTime, formatDayTime, formatMoney, formatTimeRange, isDisclosure, textDirection };
@@ -1,7 +1,8 @@
1
1
  declare const en: {
2
- readonly disclosureFallback: "You're chatting with an AI agent. Powered by Vinaverse.";
2
+ readonly disclosureFallback: "{agent} is an AI agent and can make mistakes. Powered by Vinaverse.";
3
3
  readonly agentLabel: "AI agent";
4
4
  readonly agentFallbackName: "the agent";
5
+ readonly askingAbout: "Asking about";
5
6
  readonly you: "You";
6
7
  readonly staffLabel: "{by} · person";
7
8
  readonly staffFallbackRole: "the team";
@@ -17,9 +18,11 @@ declare const en: {
17
18
  readonly bannerUnavailable: "Couldn't connect.";
18
19
  readonly continueHere: "Continue here";
19
20
  readonly tryAgain: "Try again";
21
+ readonly talkToPerson: "Talk to a person";
20
22
  readonly messageSending: "Sending";
21
23
  readonly messageHeld: "Sends when you continue";
22
- readonly messageNotSent: "Not sent";
24
+ readonly messageNotSent: "Didn't send.";
25
+ readonly messageWaiting: "Waiting to send";
23
26
  readonly messageDelivered: "Delivered";
24
27
  readonly messageCutOff: "This reply was cut off.";
25
28
  readonly takeoverStarted: "A person from {by} is replying now.";
@@ -30,6 +33,21 @@ declare const en: {
30
33
  readonly flowNotSent: "Your answers couldn't be sent yet.";
31
34
  readonly turnFailed: "Something went wrong.";
32
35
  readonly working: "{agent} is working on it…";
36
+ /** The working line: what the agent is doing, at a glance, and when a step is slow, failed or stopped. */
37
+ readonly workingGlance: "Working on it…";
38
+ /** The header: what the conversation is about, the switcher, New. */
39
+ readonly headerHome: "Home";
40
+ readonly headerAbout: "About {title}";
41
+ readonly conversations: "Conversations";
42
+ readonly newConversation: "Start a new conversation";
43
+ readonly newShort: "New";
44
+ readonly back: "Back";
45
+ readonly stepStill: "Still {step}";
46
+ readonly stepSlow: "This is taking longer than usual.";
47
+ readonly stepFailed: "Couldn't finish: {step}";
48
+ readonly turnStopped: "Stopped. Ask again or try something else.";
49
+ readonly steps: "{count} steps";
50
+ readonly stepsOne: "{count} step";
33
51
  readonly proposalConfirm: "Confirm";
34
52
  readonly proposalDecline: "Decline";
35
53
  readonly proposalChange: "Change";
@@ -47,8 +65,56 @@ declare const en: {
47
65
  readonly questionStep: "Question {step} of {total}";
48
66
  readonly questionAddPhoto: "Add a photo";
49
67
  readonly questionCharactersLeft: "{count} characters left";
68
+ readonly questionCharactersLeftOne: "{count} character left";
50
69
  readonly priceFrom: "From {price}";
70
+ /** A listing with no rating yet; empty draws nothing, a tenant's word ("New") draws in the rating's place. */
71
+ readonly ratingNone: "";
72
+ readonly nextAvailable: "Next: {time}";
73
+ /** A time today and tomorrow, as `nextAvailable` says it (`{time}`: "10:00 AM"). */
74
+ readonly today: "today, {time}";
75
+ /** A day separator's words for today and yesterday (other days are the locale's weekday or date). */
76
+ readonly dayToday: "Today";
77
+ readonly dayYesterday: "Yesterday";
78
+ readonly tomorrow: "tomorrow, {time}";
79
+ readonly agentEnded: "This conversation ended";
80
+ readonly agentEndedBody: "Start a new one whenever you like.";
81
+ readonly agentStartOver: "Start a new conversation";
82
+ readonly agentUnreachable: "Couldn't reach {agent}";
83
+ readonly agentUnreachableBody: "Check your connection and try again.";
84
+ readonly agentOff: "{agent} isn't available right now";
85
+ readonly agentOffBody: "Please try again later.";
86
+ readonly helpful: "Was this helpful?";
87
+ readonly helpfulYes: "Yes";
88
+ readonly helpfulNo: "No";
89
+ readonly helpfulThanks: "Thanks for telling us.";
90
+ readonly launcherOpen: "Open {agent}";
91
+ readonly launcherGreeting: "Hi, I'm {agent}. Ask me what you need.";
92
+ readonly close: "Close";
93
+ readonly welcomeFallback: "Hi, I'm {agent}. How can I help?";
94
+ readonly privacy: "Privacy";
95
+ readonly cardsInRow: "{count} results, swipe for more";
96
+ readonly cardsInRowOne: "{count} result";
51
97
  readonly open: "Open";
98
+ /** History: the person's past conversations, and reading one back. */
99
+ readonly historyEmpty: "No conversations yet";
100
+ readonly historyEmptyBody: "Your conversations with {agent} will show here.";
101
+ readonly historyFailed: "Couldn't load your conversations.";
102
+ readonly historyOff: "History is not available.";
103
+ readonly historyMessages: "{count} messages";
104
+ readonly historyMessagesOne: "{count} message";
105
+ readonly historyEnded: "Ended";
106
+ readonly historyContinue: "Continue";
107
+ readonly historyDelete: "Delete";
108
+ readonly historyDeleteTitle: "Delete this conversation?";
109
+ readonly historyDeleteBody: "It's removed from your history everywhere.";
110
+ readonly historyDeleteFailed: "Couldn't delete this conversation.";
111
+ readonly cancel: "Cancel";
112
+ readonly transcriptFailed: "Couldn't load this conversation.";
113
+ readonly transcriptGone: "This conversation is no longer available.";
114
+ readonly transcriptEarlier: "Earlier messages";
115
+ /** Under the person's message a guardrail refused. */
116
+ readonly messageRefused: "Not answered";
117
+ readonly loading: "Loading…";
52
118
  };
53
119
  type CopyKey = keyof typeof en;
54
120
  type Copy = Readonly<Record<CopyKey, string>>;
@@ -63,6 +129,11 @@ declare const COPY: Readonly<Record<'en' | 'es' | 'pt-BR', Copy>>;
63
129
  * (uk), and the words for it in Arabic, Hebrew, Hindi, Chinese, Japanese and Korean.
64
130
  */
65
131
  declare const AI_MARK: RegExp;
132
+ /**
133
+ * Whether a text is a disclosure a kit may draw: it says AI (`AI_MARK`, in the person's language) and names Vinaverse,
134
+ * the rule a tenant's `disclosureFallback` passes. Words an app holds from before are drawn only when it holds.
135
+ */
136
+ declare function isDisclosure(text: string): boolean;
66
137
  type Translate = (key: CopyKey, vars?: Readonly<Record<string, string | number>>) => string;
67
138
  /** The built-in copy for a locale, English when the language has none. */
68
139
  declare function builtInCopy(locale: string | undefined): Copy;
@@ -82,7 +153,18 @@ declare function textDirection(locale: string | undefined): 'ltr' | 'rtl';
82
153
  declare function formatMoney(amountMinor: number, currency: string, locale?: string): string;
83
154
  /** A start and an end: "Wed, Oct 14, 10:00 – 11:30 AM" in the locale and time zone. */
84
155
  declare function formatTimeRange(start: string, end: string | undefined, locale?: string, timeZone?: string): string;
156
+ /**
157
+ * A moment as a person says it: "today, 10:00 AM" and "tomorrow, 10:00 AM" (`today` and `tomorrow` are the copy's
158
+ * words, with `{time}`), else the date and time ("Fri, Oct 17, 10:00 AM"), in the locale and time zone. `now` is the
159
+ * clock it is judged by.
160
+ */
161
+ declare function formatDayTime(start: string, words: {
162
+ readonly today: string;
163
+ readonly tomorrow: string;
164
+ }, locale?: string, timeZone?: string, now?: number): string;
85
165
  /** A calendar date (`YYYY-MM-DD`) in the locale: "October 14, 2026". */
86
166
  declare function formatDate(date: string, locale?: string): string;
167
+ /** A moment with its date and time in the locale and zone: "Oct 15, 2026, 9:30 AM"; the text as given when it is not one. */
168
+ declare function formatDateTime(at: string, locale?: string, timeZone?: string): string;
87
169
 
88
- export { AI_MARK, BANNED_WORDS, COPY, type Copy, type CopyKey, type CopyOverrides, type Translate, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatMoney, formatTimeRange, textDirection };
170
+ export { AI_MARK, BANNED_WORDS, COPY, type Copy, type CopyKey, type CopyOverrides, type Translate, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatDateTime, formatDayTime, formatMoney, formatTimeRange, isDisclosure, textDirection };
@@ -1,8 +1,9 @@
1
1
  // src/copy/copy.ts
2
2
  var en = {
3
- disclosureFallback: "You're chatting with an AI agent. Powered by Vinaverse.",
3
+ disclosureFallback: "{agent} is an AI agent and can make mistakes. Powered by Vinaverse.",
4
4
  agentLabel: "AI agent",
5
5
  agentFallbackName: "the agent",
6
+ askingAbout: "Asking about",
6
7
  you: "You",
7
8
  staffLabel: "{by} \xB7 person",
8
9
  staffFallbackRole: "the team",
@@ -18,9 +19,11 @@ var en = {
18
19
  bannerUnavailable: "Couldn't connect.",
19
20
  continueHere: "Continue here",
20
21
  tryAgain: "Try again",
22
+ talkToPerson: "Talk to a person",
21
23
  messageSending: "Sending",
22
24
  messageHeld: "Sends when you continue",
23
- messageNotSent: "Not sent",
25
+ messageNotSent: "Didn't send.",
26
+ messageWaiting: "Waiting to send",
24
27
  messageDelivered: "Delivered",
25
28
  messageCutOff: "This reply was cut off.",
26
29
  takeoverStarted: "A person from {by} is replying now.",
@@ -31,6 +34,21 @@ var en = {
31
34
  flowNotSent: "Your answers couldn't be sent yet.",
32
35
  turnFailed: "Something went wrong.",
33
36
  working: "{agent} is working on it\u2026",
37
+ /** The working line: what the agent is doing, at a glance, and when a step is slow, failed or stopped. */
38
+ workingGlance: "Working on it\u2026",
39
+ /** The header: what the conversation is about, the switcher, New. */
40
+ headerHome: "Home",
41
+ headerAbout: "About {title}",
42
+ conversations: "Conversations",
43
+ newConversation: "Start a new conversation",
44
+ newShort: "New",
45
+ back: "Back",
46
+ stepStill: "Still {step}",
47
+ stepSlow: "This is taking longer than usual.",
48
+ stepFailed: "Couldn't finish: {step}",
49
+ turnStopped: "Stopped. Ask again or try something else.",
50
+ steps: "{count} steps",
51
+ stepsOne: "{count} step",
34
52
  proposalConfirm: "Confirm",
35
53
  proposalDecline: "Decline",
36
54
  proposalChange: "Change",
@@ -48,13 +66,62 @@ var en = {
48
66
  questionStep: "Question {step} of {total}",
49
67
  questionAddPhoto: "Add a photo",
50
68
  questionCharactersLeft: "{count} characters left",
69
+ questionCharactersLeftOne: "{count} character left",
51
70
  priceFrom: "From {price}",
52
- open: "Open"
71
+ /** A listing with no rating yet; empty draws nothing, a tenant's word ("New") draws in the rating's place. */
72
+ ratingNone: "",
73
+ nextAvailable: "Next: {time}",
74
+ /** A time today and tomorrow, as `nextAvailable` says it (`{time}`: "10:00 AM"). */
75
+ today: "today, {time}",
76
+ /** A day separator's words for today and yesterday (other days are the locale's weekday or date). */
77
+ dayToday: "Today",
78
+ dayYesterday: "Yesterday",
79
+ tomorrow: "tomorrow, {time}",
80
+ agentEnded: "This conversation ended",
81
+ agentEndedBody: "Start a new one whenever you like.",
82
+ agentStartOver: "Start a new conversation",
83
+ agentUnreachable: "Couldn't reach {agent}",
84
+ agentUnreachableBody: "Check your connection and try again.",
85
+ agentOff: "{agent} isn't available right now",
86
+ agentOffBody: "Please try again later.",
87
+ helpful: "Was this helpful?",
88
+ helpfulYes: "Yes",
89
+ helpfulNo: "No",
90
+ helpfulThanks: "Thanks for telling us.",
91
+ launcherOpen: "Open {agent}",
92
+ launcherGreeting: "Hi, I'm {agent}. Ask me what you need.",
93
+ close: "Close",
94
+ welcomeFallback: "Hi, I'm {agent}. How can I help?",
95
+ privacy: "Privacy",
96
+ cardsInRow: "{count} results, swipe for more",
97
+ cardsInRowOne: "{count} result",
98
+ open: "Open",
99
+ /** History: the person's past conversations, and reading one back. */
100
+ historyEmpty: "No conversations yet",
101
+ historyEmptyBody: "Your conversations with {agent} will show here.",
102
+ historyFailed: "Couldn't load your conversations.",
103
+ historyOff: "History is not available.",
104
+ historyMessages: "{count} messages",
105
+ historyMessagesOne: "{count} message",
106
+ historyEnded: "Ended",
107
+ historyContinue: "Continue",
108
+ historyDelete: "Delete",
109
+ historyDeleteTitle: "Delete this conversation?",
110
+ historyDeleteBody: "It's removed from your history everywhere.",
111
+ historyDeleteFailed: "Couldn't delete this conversation.",
112
+ cancel: "Cancel",
113
+ transcriptFailed: "Couldn't load this conversation.",
114
+ transcriptGone: "This conversation is no longer available.",
115
+ transcriptEarlier: "Earlier messages",
116
+ /** Under the person's message a guardrail refused. */
117
+ messageRefused: "Not answered",
118
+ loading: "Loading\u2026"
53
119
  };
54
120
  var es = {
55
- disclosureFallback: "Est\xE1s hablando con un agente de IA. Con la tecnolog\xEDa de Vinaverse.",
121
+ disclosureFallback: "{agent} es un agente de IA y puede equivocarse. Con la tecnolog\xEDa de Vinaverse.",
56
122
  agentLabel: "Agente de IA",
57
123
  agentFallbackName: "el agente",
124
+ askingAbout: "Preguntas sobre",
58
125
  you: "T\xFA",
59
126
  staffLabel: "{by} \xB7 persona",
60
127
  staffFallbackRole: "el equipo",
@@ -70,9 +137,11 @@ var es = {
70
137
  bannerUnavailable: "No se pudo conectar.",
71
138
  continueHere: "Continuar aqu\xED",
72
139
  tryAgain: "Intentar de nuevo",
140
+ talkToPerson: "Hablar con una persona",
73
141
  messageSending: "Enviando",
74
142
  messageHeld: "Se env\xEDa cuando contin\xFAes",
75
- messageNotSent: "No enviado",
143
+ messageNotSent: "No se envi\xF3.",
144
+ messageWaiting: "Esperando para enviar",
76
145
  messageDelivered: "Entregado",
77
146
  messageCutOff: "Esta respuesta qued\xF3 incompleta.",
78
147
  takeoverStarted: "Una persona de {by} est\xE1 respondiendo.",
@@ -83,6 +152,19 @@ var es = {
83
152
  flowNotSent: "Tus respuestas a\xFAn no se pudieron enviar.",
84
153
  turnFailed: "Algo sali\xF3 mal.",
85
154
  working: "{agent} est\xE1 en ello\u2026",
155
+ workingGlance: "En ello\u2026",
156
+ headerHome: "Inicio",
157
+ headerAbout: "Sobre {title}",
158
+ conversations: "Conversaciones",
159
+ newConversation: "Empezar una conversaci\xF3n nueva",
160
+ newShort: "Nueva",
161
+ back: "Atr\xE1s",
162
+ stepStill: "Todav\xEDa {step}",
163
+ stepSlow: "Esto est\xE1 tardando m\xE1s de lo normal.",
164
+ stepFailed: "No se pudo terminar: {step}",
165
+ turnStopped: "Detenido. Pregunta de nuevo o prueba otra cosa.",
166
+ steps: "{count} pasos",
167
+ stepsOne: "{count} paso",
86
168
  proposalConfirm: "Confirmar",
87
169
  proposalDecline: "Rechazar",
88
170
  proposalChange: "Cambiar",
@@ -100,13 +182,57 @@ var es = {
100
182
  questionStep: "Pregunta {step} de {total}",
101
183
  questionAddPhoto: "Agregar una foto",
102
184
  questionCharactersLeft: "Quedan {count} caracteres",
185
+ questionCharactersLeftOne: "Queda {count} car\xE1cter",
103
186
  priceFrom: "Desde {price}",
104
- open: "Abrir"
187
+ ratingNone: "",
188
+ nextAvailable: "Pr\xF3ximo: {time}",
189
+ today: "hoy, {time}",
190
+ dayToday: "Hoy",
191
+ dayYesterday: "Ayer",
192
+ tomorrow: "ma\xF1ana, {time}",
193
+ agentEnded: "Esta conversaci\xF3n termin\xF3",
194
+ agentEndedBody: "Empieza una nueva cuando quieras.",
195
+ agentStartOver: "Empezar una conversaci\xF3n nueva",
196
+ agentUnreachable: "No se pudo contactar a {agent}",
197
+ agentUnreachableBody: "Revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",
198
+ agentOff: "{agent} no est\xE1 disponible ahora",
199
+ agentOffBody: "Int\xE9ntalo de nuevo m\xE1s tarde.",
200
+ helpful: "\xBFTe sirvi\xF3?",
201
+ helpfulYes: "S\xED",
202
+ helpfulNo: "No",
203
+ helpfulThanks: "Gracias por contarnos.",
204
+ launcherOpen: "Abrir {agent}",
205
+ launcherGreeting: "Hola, soy {agent}. Preg\xFAntame lo que necesites.",
206
+ close: "Cerrar",
207
+ welcomeFallback: "Hola, soy {agent}. \xBFEn qu\xE9 te ayudo?",
208
+ privacy: "Privacidad",
209
+ cardsInRow: "{count} resultados, desliza para ver m\xE1s",
210
+ cardsInRowOne: "{count} resultado",
211
+ open: "Abrir",
212
+ historyEmpty: "A\xFAn no hay conversaciones",
213
+ historyEmptyBody: "Tus conversaciones con {agent} aparecer\xE1n aqu\xED.",
214
+ historyFailed: "No se pudieron cargar tus conversaciones.",
215
+ historyOff: "El historial no est\xE1 disponible.",
216
+ historyMessages: "{count} mensajes",
217
+ historyMessagesOne: "{count} mensaje",
218
+ historyEnded: "Terminada",
219
+ historyContinue: "Continuar",
220
+ historyDelete: "Eliminar",
221
+ historyDeleteTitle: "\xBFEliminar esta conversaci\xF3n?",
222
+ historyDeleteBody: "Se elimina de tu historial en todas partes.",
223
+ historyDeleteFailed: "No se pudo eliminar esta conversaci\xF3n.",
224
+ cancel: "Cancelar",
225
+ transcriptFailed: "No se pudo cargar esta conversaci\xF3n.",
226
+ transcriptGone: "Esta conversaci\xF3n ya no est\xE1 disponible.",
227
+ transcriptEarlier: "Mensajes anteriores",
228
+ messageRefused: "Sin respuesta",
229
+ loading: "Cargando\u2026"
105
230
  };
106
231
  var ptBR = {
107
- disclosureFallback: "Voc\xEA est\xE1 conversando com um agente de IA. Com tecnologia Vinaverse.",
232
+ disclosureFallback: "{agent} \xE9 um agente de IA e pode errar. Com tecnologia Vinaverse.",
108
233
  agentLabel: "Agente de IA",
109
234
  agentFallbackName: "o agente",
235
+ askingAbout: "Perguntando sobre",
110
236
  you: "Voc\xEA",
111
237
  staffLabel: "{by} \xB7 pessoa",
112
238
  staffFallbackRole: "a equipe",
@@ -122,9 +248,11 @@ var ptBR = {
122
248
  bannerUnavailable: "N\xE3o foi poss\xEDvel conectar.",
123
249
  continueHere: "Continuar aqui",
124
250
  tryAgain: "Tentar de novo",
251
+ talkToPerson: "Falar com uma pessoa",
125
252
  messageSending: "Enviando",
126
253
  messageHeld: "Ser\xE1 enviada quando voc\xEA continuar",
127
- messageNotSent: "N\xE3o enviada",
254
+ messageNotSent: "N\xE3o foi enviada.",
255
+ messageWaiting: "Aguardando para enviar",
128
256
  messageDelivered: "Entregue",
129
257
  messageCutOff: "Esta resposta foi interrompida.",
130
258
  takeoverStarted: "Uma pessoa de {by} est\xE1 respondendo agora.",
@@ -135,6 +263,19 @@ var ptBR = {
135
263
  flowNotSent: "Ainda n\xE3o foi poss\xEDvel enviar suas respostas.",
136
264
  turnFailed: "Algo deu errado.",
137
265
  working: "{agent} est\xE1 cuidando disso\u2026",
266
+ workingGlance: "Cuidando disso\u2026",
267
+ headerHome: "In\xEDcio",
268
+ headerAbout: "Sobre {title}",
269
+ conversations: "Conversas",
270
+ newConversation: "Come\xE7ar uma nova conversa",
271
+ newShort: "Nova",
272
+ back: "Voltar",
273
+ stepStill: "Ainda {step}",
274
+ stepSlow: "Isso est\xE1 demorando mais que o normal.",
275
+ stepFailed: "N\xE3o deu para terminar: {step}",
276
+ turnStopped: "Parado. Pergunte de novo ou tente outra coisa.",
277
+ steps: "{count} etapas",
278
+ stepsOne: "{count} etapa",
138
279
  proposalConfirm: "Confirmar",
139
280
  proposalDecline: "Recusar",
140
281
  proposalChange: "Alterar",
@@ -152,8 +293,51 @@ var ptBR = {
152
293
  questionStep: "Pergunta {step} de {total}",
153
294
  questionAddPhoto: "Adicionar uma foto",
154
295
  questionCharactersLeft: "Restam {count} caracteres",
296
+ questionCharactersLeftOne: "Resta {count} caractere",
155
297
  priceFrom: "A partir de {price}",
156
- open: "Abrir"
298
+ ratingNone: "",
299
+ nextAvailable: "Pr\xF3ximo hor\xE1rio: {time}",
300
+ today: "hoje, {time}",
301
+ dayToday: "Hoje",
302
+ dayYesterday: "Ontem",
303
+ tomorrow: "amanh\xE3, {time}",
304
+ agentEnded: "Esta conversa terminou",
305
+ agentEndedBody: "Comece uma nova quando quiser.",
306
+ agentStartOver: "Come\xE7ar uma conversa nova",
307
+ agentUnreachable: "N\xE3o foi poss\xEDvel falar com {agent}",
308
+ agentUnreachableBody: "Verifique sua conex\xE3o e tente de novo.",
309
+ agentOff: "{agent} n\xE3o est\xE1 dispon\xEDvel agora",
310
+ agentOffBody: "Tente de novo mais tarde.",
311
+ helpful: "Isso ajudou?",
312
+ helpfulYes: "Sim",
313
+ helpfulNo: "N\xE3o",
314
+ helpfulThanks: "Obrigado por avisar.",
315
+ launcherOpen: "Abrir {agent}",
316
+ launcherGreeting: "Oi, sou {agent}. Pergunte o que precisar.",
317
+ close: "Fechar",
318
+ welcomeFallback: "Oi, sou {agent}. Como posso ajudar?",
319
+ privacy: "Privacidade",
320
+ cardsInRow: "{count} resultados, deslize para ver mais",
321
+ cardsInRowOne: "{count} resultado",
322
+ open: "Abrir",
323
+ historyEmpty: "Nenhuma conversa ainda",
324
+ historyEmptyBody: "Suas conversas com {agent} v\xE3o aparecer aqui.",
325
+ historyFailed: "N\xE3o foi poss\xEDvel carregar suas conversas.",
326
+ historyOff: "O hist\xF3rico n\xE3o est\xE1 dispon\xEDvel.",
327
+ historyMessages: "{count} mensagens",
328
+ historyMessagesOne: "{count} mensagem",
329
+ historyEnded: "Encerrada",
330
+ historyContinue: "Continuar",
331
+ historyDelete: "Excluir",
332
+ historyDeleteTitle: "Excluir esta conversa?",
333
+ historyDeleteBody: "Ela \xE9 removida do seu hist\xF3rico em todos os lugares.",
334
+ historyDeleteFailed: "N\xE3o foi poss\xEDvel excluir esta conversa.",
335
+ cancel: "Cancelar",
336
+ transcriptFailed: "N\xE3o foi poss\xEDvel carregar esta conversa.",
337
+ transcriptGone: "Esta conversa n\xE3o est\xE1 mais dispon\xEDvel.",
338
+ transcriptEarlier: "Mensagens anteriores",
339
+ messageRefused: "Sem resposta",
340
+ loading: "Carregando\u2026"
157
341
  };
158
342
  var COPY = {
159
343
  en,
@@ -169,6 +353,9 @@ function discloses(key, value) {
169
353
  if (!AI_MARK.test(value)) return false;
170
354
  return key !== "disclosureFallback" || value.includes("Vinaverse");
171
355
  }
356
+ function isDisclosure(text) {
357
+ return discloses("disclosureFallback", text);
358
+ }
172
359
  function builtIn(locale) {
173
360
  const language = (locale ?? "en").split(/[-_]/)[0]?.toLowerCase();
174
361
  if (language === "en") return COPY.en;
@@ -187,8 +374,9 @@ function createTranslate(locale, overrides = {}) {
187
374
  if (FIXED.has(key) && !(own === null && discloses(key, value)))
188
375
  continue;
189
376
  merged[key] = value;
377
+ if (!(`${key}One` in overrides)) delete merged[`${key}One`];
190
378
  }
191
- return (key, vars) => (merged[key] ?? en[key]).replace(
379
+ return (key, vars) => ((vars?.count === 1 ? merged[`${key}One`] : void 0) ?? merged[key] ?? en[key]).replace(
192
380
  /\{(\w+)\}/g,
193
381
  (all, name) => vars && name in vars ? String(vars[name]) : all
194
382
  );
@@ -265,6 +453,32 @@ function formatTimeRange(start, end, locale, timeZone) {
265
453
  return from.toISOString();
266
454
  }
267
455
  }
456
+ function dayOf(at, timeZone) {
457
+ const [y, m, d] = new Intl.DateTimeFormat("en-CA", {
458
+ year: "numeric",
459
+ month: "2-digit",
460
+ day: "2-digit",
461
+ ...timeZone ? { timeZone } : {}
462
+ }).format(at).split("-").map(Number);
463
+ return Date.UTC(y, m - 1, d) / 864e5;
464
+ }
465
+ function formatDayTime(start, words, locale, timeZone, now = Date.now()) {
466
+ const at = new Date(start);
467
+ if (Number.isNaN(at.getTime())) return start;
468
+ try {
469
+ const days = dayOf(at, timeZone) - dayOf(new Date(now), timeZone);
470
+ const word = days === 0 ? words.today : days === 1 ? words.tomorrow : "";
471
+ if (!word) return formatTimeRange(start, void 0, locale, timeZone);
472
+ const time = new Intl.DateTimeFormat(locale, {
473
+ hour: "numeric",
474
+ minute: "2-digit",
475
+ ...timeZone ? { timeZone } : {}
476
+ }).format(at);
477
+ return word.replace("{time}", time);
478
+ } catch {
479
+ return formatTimeRange(start, void 0, locale, timeZone);
480
+ }
481
+ }
268
482
  function formatDate(date, locale) {
269
483
  const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(date);
270
484
  if (!m) return date;
@@ -279,7 +493,20 @@ function formatDate(date, locale) {
279
493
  return date;
280
494
  }
281
495
  }
496
+ function formatDateTime(at, locale, timeZone) {
497
+ const date = new Date(at);
498
+ if (Number.isNaN(date.getTime())) return at;
499
+ try {
500
+ return new Intl.DateTimeFormat(locale, {
501
+ dateStyle: "medium",
502
+ timeStyle: "short",
503
+ ...timeZone ? { timeZone } : {}
504
+ }).format(date);
505
+ } catch {
506
+ return date.toISOString();
507
+ }
508
+ }
282
509
 
283
- export { AI_MARK, BANNED_WORDS, COPY, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatMoney, formatTimeRange, textDirection };
510
+ export { AI_MARK, BANNED_WORDS, COPY, bannedWordsIn, builtInCopy, createTranslate, formatDate, formatDateTime, formatDayTime, formatMoney, formatTimeRange, isDisclosure, textDirection };
284
511
  //# sourceMappingURL=index.js.map
285
512
  //# sourceMappingURL=index.js.map