@posiwise/shared-components 0.0.203 → 0.0.205
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,16 +1,17 @@
|
|
|
1
1
|
import * as i8 from '@angular/common';
|
|
2
2
|
import { DOCUMENT, CommonModule, NgIf } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Injectable, HostListener, Directive, EventEmitter, Output, Input, ChangeDetectionStrategy, ViewChild, Pipe, Optional, ViewContainerRef, booleanAttribute,
|
|
4
|
+
import { Component, Injectable, InjectionToken, HostListener, Directive, EventEmitter, Output, Input, ChangeDetectionStrategy, ViewChild, Pipe, Optional, Inject, ViewContainerRef, booleanAttribute, isDevMode, HostBinding, ContentChild, Host, SkipSelf, DOCUMENT as DOCUMENT$1, NgModule } from '@angular/core';
|
|
5
5
|
import * as i2$2 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i2 from '@angular/router';
|
|
8
8
|
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
9
|
-
import * as i3$
|
|
9
|
+
import * as i3$3 from '@posiwise/app-loader';
|
|
10
10
|
import { AppLoaderModule } from '@posiwise/app-loader';
|
|
11
11
|
import { CoreTranslocoModule } from '@posiwise/core-transloco';
|
|
12
12
|
import * as i4 from '@posiwise/directives';
|
|
13
13
|
import { DirectivesModule } from '@posiwise/directives';
|
|
14
|
+
import * as i3$2 from '@posiwise/pipes';
|
|
14
15
|
import { PipesModule } from '@posiwise/pipes';
|
|
15
16
|
import * as i4$1 from '@posiwise/utils';
|
|
16
17
|
import { ValidateForm, ProfileImageCropperModule, ResourceHeaderModule, FieldErrorDisplayModule } from '@posiwise/utils';
|
|
@@ -39,8 +40,8 @@ import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
|
39
40
|
import * as i1 from '@posiwise/common-services';
|
|
40
41
|
import { PermissionService } from '@posiwise/common-services';
|
|
41
42
|
import * as i2$1 from '@posiwise/app-config-service';
|
|
42
|
-
import { Subject, BehaviorSubject, of } from 'rxjs';
|
|
43
|
-
import { take, takeUntil, map, filter, debounceTime, distinctUntilChanged, switchMap, catchError } from 'rxjs/operators';
|
|
43
|
+
import { takeUntil, Subject, BehaviorSubject, of } from 'rxjs';
|
|
44
|
+
import { take, takeUntil as takeUntil$1, map, filter, debounceTime, distinctUntilChanged, switchMap, catchError } from 'rxjs/operators';
|
|
44
45
|
import * as i3 from '@ngrx/store';
|
|
45
46
|
import { HelperService } from '@posiwise/helper-service';
|
|
46
47
|
import * as i5$1 from '@jsverse/transloco';
|
|
@@ -127,6 +128,490 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
127
128
|
args: [{ providedIn: 'root' }]
|
|
128
129
|
}] });
|
|
129
130
|
|
|
131
|
+
/**
|
|
132
|
+
* File-attachment rules for the chat composer. Split out of the component so
|
|
133
|
+
* the validation is unit-testable without a TestBed, matching the existing
|
|
134
|
+
* `pw-brain-chat-*.helpers.ts` convention.
|
|
135
|
+
*
|
|
136
|
+
* The limits come from the capability the owning tool advertises, which is a
|
|
137
|
+
* projection of that service's upload registry. Client-side checks are a
|
|
138
|
+
* courtesy so the user gets an instant answer — the server re-checks every one
|
|
139
|
+
* of them and remains the authority.
|
|
140
|
+
*/
|
|
141
|
+
function fileExtension(name) {
|
|
142
|
+
const dot = name.lastIndexOf('.');
|
|
143
|
+
return dot === -1 ? '' : name.slice(dot + 1).toLowerCase();
|
|
144
|
+
}
|
|
145
|
+
/** @returns a human-readable reason to reject, or null when the file is fine. */
|
|
146
|
+
function validateChatFile(file, capability) {
|
|
147
|
+
if (file.size === 0) {
|
|
148
|
+
return 'That file is empty.';
|
|
149
|
+
}
|
|
150
|
+
if (file.size > capability.max_bytes) {
|
|
151
|
+
return `That file is ${formatFileSize(file.size)} — the limit is ${formatFileSize(capability.max_bytes)}.`;
|
|
152
|
+
}
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
/** Every extension any available capability accepts, de-duplicated. */
|
|
156
|
+
function acceptedExtensions(capabilities) {
|
|
157
|
+
return [...new Set(capabilities.flatMap(c => c.allowed_extensions))];
|
|
158
|
+
}
|
|
159
|
+
function formatFileSize(bytes) {
|
|
160
|
+
if (bytes < 1024) {
|
|
161
|
+
return `${bytes} B`;
|
|
162
|
+
}
|
|
163
|
+
const kb = bytes / 1024;
|
|
164
|
+
if (kb < 1024) {
|
|
165
|
+
return `${Math.round(kb)} KB`;
|
|
166
|
+
}
|
|
167
|
+
const mb = kb / 1024;
|
|
168
|
+
// One decimal below 10 MB, whole numbers above — "1.4 MB" is useful,
|
|
169
|
+
// "23.7 MB" is noise at that scale.
|
|
170
|
+
return mb < 10 ? `${mb.toFixed(1)} MB` : `${Math.round(mb)} MB`;
|
|
171
|
+
}
|
|
172
|
+
/** Pulls the single file out of a drop, ignoring directories and extra files. */
|
|
173
|
+
function fileFromDrop(event) {
|
|
174
|
+
const items = event.dataTransfer?.files;
|
|
175
|
+
return items && items.length > 0 ? items[0] : null;
|
|
176
|
+
}
|
|
177
|
+
/** True when the drag carries files (not text, a link, or an in-page element). */
|
|
178
|
+
function dragCarriesFile(event) {
|
|
179
|
+
const types = event.dataTransfer?.types;
|
|
180
|
+
return !!types && Array.from(types).includes('Files');
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* What the attachment contributes to `workspace_context`.
|
|
184
|
+
*
|
|
185
|
+
* Only the KEY and the filename travel — never the bytes, and never anything
|
|
186
|
+
* read out of the file. The planner decides which tool to call from this plus
|
|
187
|
+
* the user's sentence; the server re-derives everything else from the key.
|
|
188
|
+
*
|
|
189
|
+
* The `note` mirrors the `active_page` convention in
|
|
190
|
+
* `pw-brain-chat-context.helpers.ts`: a short instruction telling the model
|
|
191
|
+
* what the context means and which tool consumes it.
|
|
192
|
+
*/
|
|
193
|
+
function attachmentContext(attachment) {
|
|
194
|
+
if (!attachment || attachment.status !== 'ready' || !attachment.key) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
attachment: {
|
|
199
|
+
filename: attachment.name,
|
|
200
|
+
staged_key: attachment.key,
|
|
201
|
+
size_bytes: attachment.size,
|
|
202
|
+
// Named so the planner doesn't have to infer which tool consumes
|
|
203
|
+
// the file — the capability already told us.
|
|
204
|
+
tool: attachment.tool,
|
|
205
|
+
note: 'The user attached this file to the chat. It is already uploaded. ' +
|
|
206
|
+
`To act on it, call ${attachment.tool} with this staged_key. Ask ` +
|
|
207
|
+
'the user for any details that tool needs and they have not said — ' +
|
|
208
|
+
'never invent them.'
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* How the attachment presents itself. Pure functions of (capabilities,
|
|
215
|
+
* attachment) so the copy is unit-testable without constructing a controller,
|
|
216
|
+
* and so the controller stays inside the 200-line cap.
|
|
217
|
+
*/
|
|
218
|
+
const IMAGE_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'];
|
|
219
|
+
const SHEET_EXTENSIONS = ['csv', 'xls', 'xlsx'];
|
|
220
|
+
/**
|
|
221
|
+
* Named after the KIND of file accepted, not the tool.
|
|
222
|
+
*
|
|
223
|
+
* A descriptor `title` is an action ("Set Your Profile Picture"), so framing
|
|
224
|
+
* it as "Drop your {title}" produces "Drop your set your profile picture".
|
|
225
|
+
* The extension set is the honest signal for what to call the thing, and it
|
|
226
|
+
* degrades to a generic label whenever the types are mixed.
|
|
227
|
+
*/
|
|
228
|
+
function dropzoneLabel(capabilities) {
|
|
229
|
+
const extensions = acceptedExtensions(capabilities);
|
|
230
|
+
if (extensions.length === 0) {
|
|
231
|
+
return 'Drop a file';
|
|
232
|
+
}
|
|
233
|
+
if (extensions.every(e => IMAGE_EXTENSIONS.includes(e))) {
|
|
234
|
+
return 'Drop an image';
|
|
235
|
+
}
|
|
236
|
+
if (extensions.every(e => SHEET_EXTENSIONS.includes(e))) {
|
|
237
|
+
return 'Drop a spreadsheet';
|
|
238
|
+
}
|
|
239
|
+
return 'Drop a file';
|
|
240
|
+
}
|
|
241
|
+
function dropzoneHint(capabilities) {
|
|
242
|
+
const exts = acceptedExtensions(capabilities)
|
|
243
|
+
.map(e => e.toUpperCase())
|
|
244
|
+
.join(', ');
|
|
245
|
+
const cap = Math.max(0, ...capabilities.map(c => c.max_bytes));
|
|
246
|
+
return `${exts} · up to ${formatFileSize(cap)}`;
|
|
247
|
+
}
|
|
248
|
+
function acceptAttribute(capabilities) {
|
|
249
|
+
return acceptedExtensions(capabilities)
|
|
250
|
+
.map(e => `.${e}`)
|
|
251
|
+
.join(',');
|
|
252
|
+
}
|
|
253
|
+
function attachmentMeta(attachment) {
|
|
254
|
+
if (!attachment) {
|
|
255
|
+
return '';
|
|
256
|
+
}
|
|
257
|
+
if (attachment.status === 'error') {
|
|
258
|
+
return attachment.error ?? 'Upload failed.';
|
|
259
|
+
}
|
|
260
|
+
const size = formatFileSize(attachment.size);
|
|
261
|
+
if (attachment.status === 'choosing') {
|
|
262
|
+
return `Not uploaded yet · ${size}`;
|
|
263
|
+
}
|
|
264
|
+
// Name the action the file is for, so a wrong pick is visible before sending.
|
|
265
|
+
const action = attachment.title ? ` · ${attachment.title}` : '';
|
|
266
|
+
return attachment.status === 'uploading'
|
|
267
|
+
? `Uploading… ${attachment.percent}%${action} · ${size}`
|
|
268
|
+
: `Ready${action} · ${size}`;
|
|
269
|
+
}
|
|
270
|
+
/** Fontawesome glyph matching the file type (AI62: FA only). */
|
|
271
|
+
function attachmentIcon(attachment) {
|
|
272
|
+
if (!attachment) {
|
|
273
|
+
return 'fa-file';
|
|
274
|
+
}
|
|
275
|
+
if (attachment.status === 'error') {
|
|
276
|
+
return 'fa-triangle-exclamation';
|
|
277
|
+
}
|
|
278
|
+
const ext = fileExtension(attachment.name);
|
|
279
|
+
if (ext === 'csv')
|
|
280
|
+
return 'fa-file-csv';
|
|
281
|
+
if (['xls', 'xlsx'].includes(ext))
|
|
282
|
+
return 'fa-file-excel';
|
|
283
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'].includes(ext))
|
|
284
|
+
return 'fa-file-image';
|
|
285
|
+
return 'fa-file';
|
|
286
|
+
}
|
|
287
|
+
/** Names what WAS dropped and what would be accepted, not just "invalid". */
|
|
288
|
+
function unsupportedFileMessage(file, capabilities) {
|
|
289
|
+
const ext = fileExtension(file.name);
|
|
290
|
+
const accepted = acceptedExtensions(capabilities).join(', ');
|
|
291
|
+
return ext
|
|
292
|
+
? `.${ext} files aren't accepted here — try ${accepted}.`
|
|
293
|
+
: `That file type isn't accepted here — try ${accepted}.`;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function routeUpload(file, capabilities) {
|
|
297
|
+
const ext = fileExtension(file.name);
|
|
298
|
+
const matching = capabilities.filter(c => c.allowed_extensions.includes(ext));
|
|
299
|
+
if (!matching.length) {
|
|
300
|
+
return { kind: 'rejected', message: unsupportedFileMessage(file, capabilities) };
|
|
301
|
+
}
|
|
302
|
+
// A tool whose size cap the file breaks is not a real option.
|
|
303
|
+
const fitting = matching.filter(c => !validateChatFile(file, c));
|
|
304
|
+
if (!fitting.length) {
|
|
305
|
+
return { kind: 'rejected', message: validateChatFile(file, matching[0]) };
|
|
306
|
+
}
|
|
307
|
+
return fitting.length === 1
|
|
308
|
+
? { kind: 'single', capability: fitting[0] }
|
|
309
|
+
: { kind: 'choose', options: fitting };
|
|
310
|
+
}
|
|
311
|
+
/** Button text: the tool's advertised title is an action ("Set Your Profile Picture"). */
|
|
312
|
+
function choiceLabel(capability) {
|
|
313
|
+
return capability.title?.trim() || capability.tool;
|
|
314
|
+
}
|
|
315
|
+
/** The file held back while the user picks, and what they may pick from. */
|
|
316
|
+
class BrainChatUploadChoice {
|
|
317
|
+
constructor() {
|
|
318
|
+
this.file = null;
|
|
319
|
+
this.options = [];
|
|
320
|
+
}
|
|
321
|
+
offer(file, options) {
|
|
322
|
+
this.file = file;
|
|
323
|
+
this.options = options;
|
|
324
|
+
}
|
|
325
|
+
/** The held file, if `capability` is one of the offered options. */
|
|
326
|
+
take(capability) {
|
|
327
|
+
const file = this.options.includes(capability) ? this.file : null;
|
|
328
|
+
if (file) {
|
|
329
|
+
this.clear();
|
|
330
|
+
}
|
|
331
|
+
return file;
|
|
332
|
+
}
|
|
333
|
+
clear() {
|
|
334
|
+
this.file = null;
|
|
335
|
+
this.options = [];
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Drag state for the panel-wide drop target.
|
|
341
|
+
*
|
|
342
|
+
* Separate from the attachment controller because it is purely about pointer
|
|
343
|
+
* events — no upload, no capabilities — and because keeping it here leaves the
|
|
344
|
+
* controller inside the 200-line cap.
|
|
345
|
+
*/
|
|
346
|
+
class BrainChatDragTracker {
|
|
347
|
+
constructor(enabled, onChange) {
|
|
348
|
+
this.enabled = enabled;
|
|
349
|
+
this.onChange = onChange;
|
|
350
|
+
this.active = false;
|
|
351
|
+
}
|
|
352
|
+
enter(event) {
|
|
353
|
+
if (!this.enabled() || !dragCarriesFile(event)) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
event.preventDefault();
|
|
357
|
+
this.active = true;
|
|
358
|
+
this.onChange();
|
|
359
|
+
}
|
|
360
|
+
/** Must preventDefault or the browser navigates away to the file. */
|
|
361
|
+
over(event) {
|
|
362
|
+
if (!this.enabled() || !dragCarriesFile(event)) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
event.preventDefault();
|
|
366
|
+
}
|
|
367
|
+
leave(event) {
|
|
368
|
+
// dragleave fires for every child crossed, so only the pointer
|
|
369
|
+
// genuinely exiting the panel should clear the overlay.
|
|
370
|
+
if (event.relatedTarget &&
|
|
371
|
+
event.currentTarget.contains(event.relatedTarget)) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
this.active = false;
|
|
375
|
+
this.onChange();
|
|
376
|
+
}
|
|
377
|
+
/** @returns the dropped file, or null when the drop carried none. */
|
|
378
|
+
drop(event) {
|
|
379
|
+
if (!this.enabled()) {
|
|
380
|
+
return null;
|
|
381
|
+
}
|
|
382
|
+
event.preventDefault();
|
|
383
|
+
this.active = false;
|
|
384
|
+
return fileFromDrop(event);
|
|
385
|
+
}
|
|
386
|
+
reset() {
|
|
387
|
+
this.active = false;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The two network concerns of an attachment — discovering what may be
|
|
393
|
+
* attached, and sending the bytes — kept out of the controller so it stays
|
|
394
|
+
* inside the 200-line cap and remains readable as pure state.
|
|
395
|
+
*/
|
|
396
|
+
/**
|
|
397
|
+
* Discovery is best-effort: a failure yields an EMPTY capability list, so the
|
|
398
|
+
* panel shows no upload affordance rather than a broken one, and the chat
|
|
399
|
+
* still works. Only capabilities whose service the host app can actually reach
|
|
400
|
+
* are kept — one we have no client for would advertise an upload with nowhere
|
|
401
|
+
* to go.
|
|
402
|
+
*/
|
|
403
|
+
function discoverCapabilities(opts) {
|
|
404
|
+
opts.source.pipe(takeUntil(opts.destroy$)).subscribe({
|
|
405
|
+
next: response => opts.onResolved((response.uploads ?? []).filter(c => !!opts.apis[c.service])),
|
|
406
|
+
error: () => opts.onResolved([])
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Sends the bytes straight to the owning service — never through brain-api,
|
|
411
|
+
* which advertises the capability but must not carry files. Size-routed by
|
|
412
|
+
* DirectUploadService: small files through the API, large ones direct to S3.
|
|
413
|
+
*/
|
|
414
|
+
function sendUpload(opts) {
|
|
415
|
+
opts.uploads
|
|
416
|
+
.uploadBySize(opts.api, {
|
|
417
|
+
purpose: opts.capability.purpose,
|
|
418
|
+
file: opts.file,
|
|
419
|
+
subscriptionId: opts.subscriptionId
|
|
420
|
+
})
|
|
421
|
+
.subscribe({
|
|
422
|
+
next: event => event.kind === 'progress'
|
|
423
|
+
? opts.onProgress(event.percent)
|
|
424
|
+
: opts.onStaged(event.key),
|
|
425
|
+
error: () => opts.onError()
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Upload ``file`` for ``capability`` and reflect progress on the attachment
|
|
430
|
+
* ``current()`` returns. Guarded on every callback: the chip may have been
|
|
431
|
+
* removed mid-flight.
|
|
432
|
+
*/
|
|
433
|
+
function stageInto(p) {
|
|
434
|
+
const update = (patch) => {
|
|
435
|
+
const attachment = p.current();
|
|
436
|
+
if (attachment) {
|
|
437
|
+
Object.assign(attachment, patch);
|
|
438
|
+
p.changed();
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
if (!p.uploads || !p.api || p.subscriptionId == null) {
|
|
442
|
+
update({
|
|
443
|
+
status: 'error',
|
|
444
|
+
error: 'We could not work out which subscription to upload this to.'
|
|
445
|
+
});
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
sendUpload({
|
|
449
|
+
uploads: p.uploads,
|
|
450
|
+
api: p.api,
|
|
451
|
+
capability: p.capability,
|
|
452
|
+
file: p.file,
|
|
453
|
+
subscriptionId: p.subscriptionId,
|
|
454
|
+
onProgress: percent => update({ percent }),
|
|
455
|
+
onStaged: key => update({ percent: 100, status: 'ready', key }),
|
|
456
|
+
onError: () => update({
|
|
457
|
+
status: 'error',
|
|
458
|
+
error: 'That upload did not complete. Try attaching it again.'
|
|
459
|
+
})
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Owns the composer's file attachment: drag state, the upload, and the single
|
|
465
|
+
* staged file. Split out of the component the same way BrainChatDictation and
|
|
466
|
+
* BrainChatVoiceChat are, so the panel stays composable and this is testable
|
|
467
|
+
* without a TestBed.
|
|
468
|
+
*
|
|
469
|
+
* What it may accept is DISCOVERED, not configured: brain-api reports the
|
|
470
|
+
* upload-capable tools this caller can reach, each carrying its own purpose,
|
|
471
|
+
* extensions and size cap. So a product gains a drop affordance by shipping a
|
|
472
|
+
* tool that advertises one — with no change here and none in the host app
|
|
473
|
+
* beyond naming its API.
|
|
474
|
+
*/
|
|
475
|
+
class BrainChatAttachment {
|
|
476
|
+
constructor(uploads, apis, subscriptionId, onChange) {
|
|
477
|
+
this.uploads = uploads;
|
|
478
|
+
this.apis = apis;
|
|
479
|
+
this.subscriptionId = subscriptionId;
|
|
480
|
+
this.onChange = onChange;
|
|
481
|
+
this.current = null;
|
|
482
|
+
this.drag = new BrainChatDragTracker(() => this.enabled, () => this.onChange());
|
|
483
|
+
this.capabilities = [];
|
|
484
|
+
this.choice = new BrainChatUploadChoice();
|
|
485
|
+
}
|
|
486
|
+
discover(source, destroy$) {
|
|
487
|
+
if (!this.uploads || !this.apis) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
discoverCapabilities({
|
|
491
|
+
source,
|
|
492
|
+
destroy$,
|
|
493
|
+
apis: this.apis,
|
|
494
|
+
onResolved: capabilities => {
|
|
495
|
+
this.capabilities = capabilities;
|
|
496
|
+
this.onChange();
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
get enabled() {
|
|
501
|
+
return this.capabilities.length > 0;
|
|
502
|
+
}
|
|
503
|
+
get busy() {
|
|
504
|
+
return this.current?.status === 'uploading';
|
|
505
|
+
}
|
|
506
|
+
/** Several tools accept the file; nothing is uploaded until one is picked. */
|
|
507
|
+
get choosing() {
|
|
508
|
+
return this.current?.status === 'choosing';
|
|
509
|
+
}
|
|
510
|
+
get choices() {
|
|
511
|
+
return this.choice.options;
|
|
512
|
+
}
|
|
513
|
+
choiceLabel(capability) {
|
|
514
|
+
return choiceLabel(capability);
|
|
515
|
+
}
|
|
516
|
+
get ready() {
|
|
517
|
+
return this.current?.status === 'ready';
|
|
518
|
+
}
|
|
519
|
+
get context() {
|
|
520
|
+
return attachmentContext(this.current);
|
|
521
|
+
}
|
|
522
|
+
get label() {
|
|
523
|
+
return dropzoneLabel(this.capabilities);
|
|
524
|
+
}
|
|
525
|
+
get hint() {
|
|
526
|
+
return dropzoneHint(this.capabilities);
|
|
527
|
+
}
|
|
528
|
+
get acceptAttr() {
|
|
529
|
+
return acceptAttribute(this.capabilities);
|
|
530
|
+
}
|
|
531
|
+
get dragActive() {
|
|
532
|
+
return this.drag.active;
|
|
533
|
+
}
|
|
534
|
+
dragEnter(event) {
|
|
535
|
+
this.drag.enter(event);
|
|
536
|
+
}
|
|
537
|
+
dragOver(event) {
|
|
538
|
+
this.drag.over(event);
|
|
539
|
+
}
|
|
540
|
+
dragLeave(event) {
|
|
541
|
+
this.drag.leave(event);
|
|
542
|
+
}
|
|
543
|
+
drop(event) {
|
|
544
|
+
const file = this.drag.drop(event);
|
|
545
|
+
if (file) {
|
|
546
|
+
this.accept(file);
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
this.onChange();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
/** Shared by the drop target and the paperclip file input. */
|
|
553
|
+
accept(file) {
|
|
554
|
+
const route = routeUpload(file, this.capabilities);
|
|
555
|
+
this.choice.clear();
|
|
556
|
+
this.current = { name: file.name, size: file.size, percent: 0, status: 'choosing' };
|
|
557
|
+
if (route.kind === 'rejected') {
|
|
558
|
+
Object.assign(this.current, { status: 'error', error: route.message });
|
|
559
|
+
}
|
|
560
|
+
else if (route.kind === 'choose') {
|
|
561
|
+
this.choice.offer(file, route.options);
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
this.upload(file, route.capability);
|
|
565
|
+
}
|
|
566
|
+
this.onChange();
|
|
567
|
+
}
|
|
568
|
+
/** The user picked which tool this file is for — only now is it uploaded. */
|
|
569
|
+
choose(capability) {
|
|
570
|
+
const file = this.choice.take(capability);
|
|
571
|
+
if (file) {
|
|
572
|
+
this.upload(file, capability);
|
|
573
|
+
this.onChange();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
remove() {
|
|
577
|
+
this.choice.clear();
|
|
578
|
+
this.current = null;
|
|
579
|
+
this.drag.reset();
|
|
580
|
+
this.onChange();
|
|
581
|
+
}
|
|
582
|
+
/** Cleared once a planned call used `sent`; a reply asking for details keeps it. */
|
|
583
|
+
clearIfConsumed(sent) {
|
|
584
|
+
if (sent?.status === 'ready' && this.current === sent) {
|
|
585
|
+
this.current = null;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
meta() {
|
|
589
|
+
return attachmentMeta(this.current);
|
|
590
|
+
}
|
|
591
|
+
icon() {
|
|
592
|
+
return attachmentIcon(this.current);
|
|
593
|
+
}
|
|
594
|
+
upload(file, capability) {
|
|
595
|
+
if (this.current) {
|
|
596
|
+
const chosen = {
|
|
597
|
+
status: 'uploading',
|
|
598
|
+
tool: capability.tool,
|
|
599
|
+
title: choiceLabel(capability)
|
|
600
|
+
};
|
|
601
|
+
Object.assign(this.current, chosen);
|
|
602
|
+
}
|
|
603
|
+
stageInto({
|
|
604
|
+
uploads: this.uploads,
|
|
605
|
+
api: this.apis?.[capability.service],
|
|
606
|
+
subscriptionId: this.subscriptionId(),
|
|
607
|
+
capability,
|
|
608
|
+
file,
|
|
609
|
+
current: () => this.current,
|
|
610
|
+
changed: () => this.onChange()
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
130
615
|
/**
|
|
131
616
|
* Builds the assistant bubble that carries a pending-confirmation card
|
|
132
617
|
* from a `needs_confirmation` orchestrator envelope. Extracted from
|
|
@@ -601,6 +1086,23 @@ function stickThreadToBottom(getEl, force) {
|
|
|
601
1086
|
}, 0);
|
|
602
1087
|
}
|
|
603
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* Which product API to POST bytes to, keyed by the service name the tool
|
|
1091
|
+
* catalog reports (e.g. `'cloudolive-api'`, `'main-api'`).
|
|
1092
|
+
*
|
|
1093
|
+
* This is the ONE thing discovery cannot supply. Everything else about an
|
|
1094
|
+
* upload — the purpose, the accepted extensions, the size cap, which tool
|
|
1095
|
+
* consumes it — is advertised by the tool itself via `posiwise.upload` and
|
|
1096
|
+
* fetched from brain-api, so no frontend restates limits the owning service
|
|
1097
|
+
* already enforces. But the file goes STRAIGHT to the owning service rather
|
|
1098
|
+
* than through brain-api (bytes must never transit the chat pipeline), and
|
|
1099
|
+
* only the host app knows how to reach its own APIs.
|
|
1100
|
+
*
|
|
1101
|
+
* A service the map doesn't cover is simply not offered: the affordance is
|
|
1102
|
+
* hidden rather than advertised-then-broken.
|
|
1103
|
+
*/
|
|
1104
|
+
const BRAIN_CHAT_UPLOAD_APIS = new InjectionToken('BRAIN_CHAT_UPLOAD_APIS');
|
|
1105
|
+
|
|
604
1106
|
// Voice Chat state vocabulary + status copy + visual mapping — extracted from
|
|
605
1107
|
// the BrainChatVoiceChat controller so it stays under the C1 line cap. The
|
|
606
1108
|
// controller re-exports the types, so external import sites are unchanged.
|
|
@@ -1746,7 +2248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
1746
2248
|
// Brain chat panel — posts to brain-api's MCP orchestrator; thread +
|
|
1747
2249
|
// conversation_id persist per-user in localStorage (#4167).
|
|
1748
2250
|
class PwBrainChatComponent {
|
|
1749
|
-
constructor(orchestrator, localStorage, router, cdr, store, dynamicPageCtx, appConfigService, brainSocket, brainVoice, voiceChatService) {
|
|
2251
|
+
constructor(orchestrator, localStorage, router, cdr, store, dynamicPageCtx, appConfigService, brainSocket, brainVoice, voiceChatService, directUpload, uploadApis) {
|
|
1750
2252
|
this.orchestrator = orchestrator;
|
|
1751
2253
|
this.localStorage = localStorage;
|
|
1752
2254
|
this.router = router;
|
|
@@ -1757,6 +2259,8 @@ class PwBrainChatComponent {
|
|
|
1757
2259
|
this.brainSocket = brainSocket;
|
|
1758
2260
|
this.brainVoice = brainVoice;
|
|
1759
2261
|
this.voiceChatService = voiceChatService;
|
|
2262
|
+
this.directUpload = directUpload;
|
|
2263
|
+
this.uploadApis = uploadApis;
|
|
1760
2264
|
this.messages = [];
|
|
1761
2265
|
this.draft = '';
|
|
1762
2266
|
this.loading = false;
|
|
@@ -1770,18 +2274,24 @@ class PwBrainChatComponent {
|
|
|
1770
2274
|
this.storage = null;
|
|
1771
2275
|
this.destroy$ = new Subject();
|
|
1772
2276
|
this.diffRows = diffRowsFrom;
|
|
2277
|
+
this.sentAttachment = null; // file on the in-flight send
|
|
1773
2278
|
this.dictation = new BrainChatDictation(this.brainVoice, () => this.draft, text => {
|
|
1774
2279
|
this.draft = text;
|
|
1775
2280
|
}, () => this.cdr.markForCheck());
|
|
1776
2281
|
this.voiceChat = new BrainChatVoiceChat(this.voiceChatService, () => this.cdr.markForCheck(), (userText, replyText) => this.recordVoiceTurn(userText, replyText));
|
|
2282
|
+
this.attachment = new BrainChatAttachment(this.directUpload ?? null, this.uploadApis ?? null, () => PermissionService.selectedSubscription?.id ?? null, () => this.cdr.markForCheck());
|
|
1777
2283
|
}
|
|
1778
2284
|
ngOnInit() {
|
|
2285
|
+
// What may be attached is discovered from the federated tool catalog,
|
|
2286
|
+
// not configured here — see BRAIN_CHAT_UPLOAD_APIS. Best-effort: a
|
|
2287
|
+
// failure simply leaves the panel with no upload affordance.
|
|
2288
|
+
this.attachment.discover(this.orchestrator.capabilities(), this.destroy$);
|
|
1779
2289
|
// Personalise the welcome greeting with the signed-in user's first name
|
|
1780
2290
|
// (AuthService persists it to native localStorage 'name' at login);
|
|
1781
2291
|
// absent/blank → the greeting stays the plain "Hi, I'm your … Brain".
|
|
1782
2292
|
this.userFirstName = localStorage.getItem('name')?.trim() || undefined;
|
|
1783
2293
|
// White-label brand for placeholder + error text (domain company.name).
|
|
1784
|
-
this.appConfigService?.appConfig$.pipe(take(1), takeUntil(this.destroy$)).subscribe(c => {
|
|
2294
|
+
this.appConfigService?.appConfig$.pipe(take(1), takeUntil$1(this.destroy$)).subscribe(c => {
|
|
1785
2295
|
this.brandName = resolveBrandName(c);
|
|
1786
2296
|
this.cdr.markForCheck();
|
|
1787
2297
|
});
|
|
@@ -1791,7 +2301,7 @@ class PwBrainChatComponent {
|
|
|
1791
2301
|
// Wait for the authenticated user before hydrating — a bare take(1)
|
|
1792
2302
|
// races currentUser=null and orphans the thread (#4167).
|
|
1793
2303
|
this.store
|
|
1794
|
-
.pipe(map(app => app?.user?.currentUser ?? null), filter((user) => !!user && user.id != null), take(1), takeUntil(this.destroy$))
|
|
2304
|
+
.pipe(map(app => app?.user?.currentUser ?? null), filter((user) => !!user && user.id != null), take(1), takeUntil$1(this.destroy$))
|
|
1795
2305
|
.subscribe(user => {
|
|
1796
2306
|
this.storage = new BrainChatPersistence(this.localStorage, String(user.id));
|
|
1797
2307
|
const hydrated = this.storage.readMessages();
|
|
@@ -1816,7 +2326,7 @@ class PwBrainChatComponent {
|
|
|
1816
2326
|
subscribeToServerPush() {
|
|
1817
2327
|
this.brainSocket
|
|
1818
2328
|
?.messages$()
|
|
1819
|
-
.pipe(takeUntil(this.destroy$))
|
|
2329
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
1820
2330
|
.subscribe(message => {
|
|
1821
2331
|
this.pushAssistant(message.text, true);
|
|
1822
2332
|
this.cdr.markForCheck();
|
|
@@ -1828,25 +2338,52 @@ class PwBrainChatComponent {
|
|
|
1828
2338
|
this.destroy$.next();
|
|
1829
2339
|
this.destroy$.complete();
|
|
1830
2340
|
}
|
|
2341
|
+
/**
|
|
2342
|
+
* Paperclip path. The input is reset after every pick so choosing the same
|
|
2343
|
+
* file twice in a row still fires `change` (the browser suppresses it
|
|
2344
|
+
* otherwise, and "nothing happened" is a maddening bug to hit).
|
|
2345
|
+
*/
|
|
2346
|
+
pickFile(input) {
|
|
2347
|
+
const file = input.files?.[0];
|
|
2348
|
+
input.value = '';
|
|
2349
|
+
if (file) {
|
|
2350
|
+
this.attachment.accept(file);
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
1831
2353
|
send() {
|
|
1832
|
-
|
|
1833
|
-
|
|
2354
|
+
// A dropped file is a message on its own — the user should not have to
|
|
2355
|
+
// type something to send it. An upload still in flight blocks the send
|
|
2356
|
+
// rather than racing it, so the staged key is always present. A file
|
|
2357
|
+
// still waiting for "which tool?" blocks it too — sending would drop it.
|
|
2358
|
+
const typed = this.draft.trim();
|
|
2359
|
+
const staged = this.attachment.current;
|
|
2360
|
+
const held = this.attachment.busy || this.attachment.choosing;
|
|
2361
|
+
if ((!typed && !this.attachment.ready) || this.loading || held) {
|
|
1834
2362
|
return;
|
|
1835
2363
|
}
|
|
2364
|
+
const text = typed || `${staged?.title ?? 'Use this file'}: ${staged?.name ?? ''}`;
|
|
1836
2365
|
this.draft = '';
|
|
1837
2366
|
this.messages.push({ role: 'user', text, at: Date.now() });
|
|
1838
2367
|
this.storage?.persistMessages(this.messages);
|
|
1839
2368
|
this.loading = true;
|
|
1840
2369
|
this.cdr.markForCheck();
|
|
1841
2370
|
this.stick(true);
|
|
1842
|
-
const workspace_context =
|
|
2371
|
+
const workspace_context = {
|
|
2372
|
+
...buildWorkspaceContext(this.router, this.dynamicPageCtx.current, PermissionService.selectedSubscription?.id ?? null),
|
|
2373
|
+
// Only the staging key and filename — never the bytes, and nothing
|
|
2374
|
+
// read out of the file. Null when nothing is attached.
|
|
2375
|
+
...(this.attachment.context ?? {})
|
|
2376
|
+
};
|
|
2377
|
+
// The file stays attached until a planned call uses it, so a reply that
|
|
2378
|
+
// asks for missing details (vendor, due date…) still carries it.
|
|
2379
|
+
this.sentAttachment = staged;
|
|
1843
2380
|
this.streamSub = this.orchestrator
|
|
1844
2381
|
.executeStream({
|
|
1845
2382
|
message: text,
|
|
1846
2383
|
workspace_context,
|
|
1847
2384
|
conversation_id: this.conversationId ?? undefined
|
|
1848
2385
|
})
|
|
1849
|
-
.pipe(takeUntil(this.destroy$))
|
|
2386
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
1850
2387
|
.subscribe({
|
|
1851
2388
|
next: (event) => {
|
|
1852
2389
|
if (event.type === 'stage') {
|
|
@@ -1891,7 +2428,7 @@ class PwBrainChatComponent {
|
|
|
1891
2428
|
confirmation_token: token,
|
|
1892
2429
|
conversation_id: this.conversationId ?? undefined
|
|
1893
2430
|
})
|
|
1894
|
-
.pipe(takeUntil(this.destroy$))
|
|
2431
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
1895
2432
|
.subscribe({
|
|
1896
2433
|
next: response => this.handleExecuteResponse(response),
|
|
1897
2434
|
error: err => this.handleError(err)
|
|
@@ -1943,6 +2480,9 @@ class PwBrainChatComponent {
|
|
|
1943
2480
|
this.streamingStage = null;
|
|
1944
2481
|
this.streamingProse = null;
|
|
1945
2482
|
this.persistConversationId(response.conversation_id);
|
|
2483
|
+
if (response.needs_confirmation || response.result_status === 'success') {
|
|
2484
|
+
this.attachment.clearIfConsumed(this.sentAttachment);
|
|
2485
|
+
}
|
|
1946
2486
|
if (response.needs_confirmation && response.confirmation_token) {
|
|
1947
2487
|
this.messages.push(buildConfirmationMessage(response, response.confirmation_token));
|
|
1948
2488
|
this.stick(false);
|
|
@@ -2014,12 +2554,12 @@ class PwBrainChatComponent {
|
|
|
2014
2554
|
stick(force) {
|
|
2015
2555
|
stickThreadToBottom(() => this.threadRef?.nativeElement, force);
|
|
2016
2556
|
}
|
|
2017
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: PwBrainChatComponent, deps: [{ token: i1.MCPOrchestratorService }, { token: i1.LocalStorage }, { token: i2.Router }, { token: i0.ChangeDetectorRef }, { token: i3.Store }, { token: DynamicPageContextService }, { token: i2$1.AppConfigService, optional: true }, { token: i1.BrainSocketService, optional: true }, { token: i1.BrainVoiceService, optional: true }, { token: i1.VoiceChatService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2018
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: PwBrainChatComponent, isStandalone: false, selector: "pw-brain-chat", viewQueries: [{ propertyName: "threadRef", first: true, predicate: ["thread"], descendants: true }], ngImport: i0, template: "<div class=\"pw-brain-chat\">\n <!-- The sidebar host header owns title + close + live status + New chat\n (SidebarContent.status / headerActions) \u2014 so the panel body starts at\n the thread, no duplicate status strip. newChat() is invoked from the\n host header action. -->\n <div #thread pwBrainChatThread class=\"pw-brain-chat__thread\" role=\"log\" aria-live=\"polite\">\n @if (messages.length <= 1 && !loading && !streamingProse) {\n <pw-brain-chat-welcome\n [userFirstName]=\"userFirstName\"\n [prompts]=\"suggestedPrompts\"\n (pick)=\"usePrompt($event)\"\n ></pw-brain-chat-welcome>\n } @else {\n @for (m of messages; track trackByIndex($index, m)) {\n @if (m.role === 'user') {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--user\">\n <div class=\"pw-brain-chat__user-bubble\"><pre class=\"pw-brain-chat__user-text\">{{ m.text }}</pre></div>\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">{{ m.at | date: 'shortTime' }}</span>\n }\n </div>\n } @else {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">\n {{ brandName }} Brain\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">\u00B7 {{ m.at | date: 'shortTime' }}</span>\n }\n </span>\n <div class=\"pw-brain-chat__bubble\">\n @if (m.markdownEnabled) {\n <div class=\"pw-brain-chat__text\" [innerHTML]=\"m.text | safeMarkdown\"></div>\n } @else {\n <pre class=\"pw-brain-chat__text\">{{ m.text }}</pre>\n }\n </div>\n @if (m.sourcePage) {\n <div class=\"pw-brain-chat__source\" role=\"note\">\n <i class=\"fas fa-file-lines pw-brain-chat__source-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__source-text\">Documented on: {{ m.sourcePage }}</span>\n </div>\n }\n @if (m.pending) {\n <pw-brain-chat-confirm\n [pending]=\"m.pending\"\n [loading]=\"loading\"\n (approveEvent)=\"approve(m)\"\n (cancelEvent)=\"cancel(m)\"\n ></pw-brain-chat-confirm>\n }\n </div>\n </div>\n }\n }\n }\n\n @if (loading && streamingProse) {\n <!-- prose streams token-by-token into a partial bot turn; caret = writing (#51) -->\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">{{ brandName }} Brain</span>\n <div class=\"pw-brain-chat__bubble\">\n <pre class=\"pw-brain-chat__text\"\n >{{ streamingProse }}<span class=\"pw-brain-chat__caret\" aria-hidden=\"true\"></span></pre>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (loading && !streamingProse) {\n <div class=\"pw-brain-chat__loading\">\n <i class=\"fas fa-circle-notch fa-spin pw-brain-chat__loading-spinner\" aria-hidden=\"true\"></i>\n <span aria-live=\"polite\">{{ streamingStage || 'Working\u2026' }}</span>\n <button type=\"button\" class=\"pw-brain-chat__iconbtn pw-brain-chat__stop\" (click)=\"cancelRequest()\"\n [ngbTooltip]=\"'Stop request'\" container=\"body\" aria-label=\"Stop request\">\n <i class=\"fas fa-stop\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- Voice session / dictation \u2192 animated Sonar overlay (#51) -->\n @if (voiceChat.isActive || voiceChat.error || dictation.phase === 'listening' || dictation.phase === 'processing' || dictation.error) {\n <pw-brain-chat-voice-overlay\n [voice]=\"voiceChat\"\n [dictation]=\"dictation\"\n (end)=\"voiceChat.isActive || voiceChat.error ? voiceChat.stop() : dictation.dismiss()\"\n ></pw-brain-chat-voice-overlay>\n }\n\n <div class=\"pw-brain-chat__compose\">\n @if (messages.length > 1) {\n <div class=\"pw-brain-chat__quick\">\n @for (q of quickActions; track q.text) {\n <button type=\"button\" class=\"pw-brain-chat__chip\" (click)=\"usePrompt(q.text)\">\n <i class=\"fas\" [ngClass]=\"q.icon\" aria-hidden=\"true\"></i>{{ q.label }}\n </button>\n }\n </div>\n }\n <label class=\"visually-hidden\" for=\"pw-brain-chat-input\">Message {{ brandName }} Brain</label>\n <div class=\"pw-brain-chat__field\">\n <textarea\n id=\"pw-brain-chat-input\"\n class=\"pw-brain-chat__input\"\n rows=\"1\"\n [(ngModel)]=\"draft\"\n placeholder=\"Ask a question or tell me what to do\u2026\"\n (keydown.enter)=\"$event.preventDefault(); send()\"\n\n aria-label=\"Ask a question or tell me what to do\u2026\" ></textarea>\n <div class=\"pw-brain-chat__tools\">\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn pw-brain-chat__mic\"\n [class.pw-brain-chat__mic--recording]=\"dictation.isRecording\"\n [disabled]=\"loading || dictation.phase === 'processing'\"\n (click)=\"dictation.toggle(loading)\"\n [ngbTooltip]=\"dictation.phase === 'listening' ? 'Stop dictation' : (dictation.phase === 'processing' ? 'Processing\u2026' : 'Dictate')\"\n container=\"body\"\n [attr.aria-label]=\"dictation.phase === 'listening' ? 'Stop dictation' : 'Dictate with your voice'\"\n [attr.aria-pressed]=\"dictation.isRecording\"\n ><i class=\"fas fa-microphone\" aria-hidden=\"true\"></i></button>\n @if (voiceChat.available) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || dictation.isRecording\"\n (click)=\"voiceChat.toggle(loading)\"\n [ngbTooltip]=\"voiceChat.isActive ? 'End voice chat' : 'Voice chat'\"\n container=\"body\"\n [attr.aria-label]=\"voiceChat.isActive ? 'End voice chat' : 'Start voice chat'\"\n [attr.aria-pressed]=\"voiceChat.isActive\"\n >\n @switch (voiceChat.visual) {\n @case ('loader') { <i class=\"fas fa-circle-notch fa-spin\" aria-hidden=\"true\"></i> }\n @case ('wave') { <i class=\"fas fa-volume-high\" aria-hidden=\"true\"></i> }\n <!-- fa-waveform-lines (FA Pro, shipped in assets/fontawesome) \u2014 the\n canonical \"voice mode\" glyph; fa-comment-dots read as a second\n text-chat button. -->\n @default { <i class=\"fas fa-waveform-lines\" aria-hidden=\"true\"></i> }\n }\n </button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__send\"\n [class.pw-brain-chat__send--stop]=\"loading\"\n [disabled]=\"!loading && !draft.trim()\"\n (click)=\"loading ? cancelRequest() : send()\"\n [ngbTooltip]=\"loading ? 'Stop request' : 'Send message'\"\n container=\"body\"\n [attr.aria-label]=\"loading ? 'Stop request' : 'Send message'\"\n >\n <i class=\"fas\" [ngClass]=\"loading ? 'fa-stop' : 'fa-paper-plane'\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"pw-brain-chat__disclaimer\" role=\"note\">\n <i class=\"fas fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n AI may be inaccurate \u2014 verify before acting.\n </div>\n </div>\n</div>\n", styles: [".pw-brain-chat{--bc-panel: var(--dashboard_bg, #fff);--bc-shade: #20385e;--bc-surface: color-mix(in srgb, var(--bc-panel) 96.6%, var(--bc-shade));--bc-surface-2: color-mix(in srgb, var(--bc-panel) 92.3%, var(--bc-shade));--bc-line: color-mix(in srgb, var(--bc-panel) 86.8%, var(--bc-shade));--bc-line-strong: color-mix(in srgb, var(--bc-panel) 78.3%, var(--bc-shade));--bc-bubble: color-mix(in srgb, var(--bc-panel) 94.1%, var(--bc-shade));--bc-ink: var(--text, #1a1d21);--bc-title: var(--titles, var(--text, #1a1d21));--bc-ink-2: color-mix(in srgb, var(--bc-ink) 72%, var(--bc-panel));--bc-ink-3: color-mix(in srgb, var(--bc-ink) 55%, var(--bc-panel));--bc-accent: var(--first, #1769e1);--bc-accent-wash: color-mix(in srgb, var(--first, #1769e1) 10%, transparent);--bc-accent-line: color-mix(in srgb, var(--first, #1769e1) 32%, var(--bc-line));--bc-success: #1f9d57;--bc-warning: #b7791f;--bc-error: #c0392b;--bc-r-sm: 4px;--bc-r-md: 8px;--bc-r-lg: 12px;--bc-ease: cubic-bezier(.2, .6, .25, 1);display:flex;flex-direction:column;height:100%;min-height:0;font-size:15px;color:var(--bc-ink);position:relative}:host-context([data-theme=dark]) .pw-brain-chat{--bc-panel: #15181d;--bc-surface: #1c2026;--bc-surface-2: #21262e;--bc-line: #2a2f38;--bc-line-strong: #384150;--bc-bubble: #1c2026;--bc-ink: #edeff2;--bc-title: #edeff2;--bc-ink-2: #aab3c0;--bc-ink-3: #7c8696}.pw-brain-chat__thread{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 2px 8px;display:flex;flex-direction:column;gap:18px}.pw-brain-chat__thread>:first-child{margin-top:auto}.pw-brain-chat__turn--bot{display:grid;grid-template-columns:26px 1fr;column-gap:10px}.pw-brain-chat__spine{display:flex;flex-direction:column;align-items:center}.pw-brain-chat__node{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__node i{font-size:12px}.pw-brain-chat__line{flex:1 1 auto;width:2px;margin-top:6px;background:var(--bc-line);border-radius:9999px}.pw-brain-chat__artifacts{min-width:0;display:flex;flex-direction:column;gap:9px;padding-top:1px}.pw-brain-chat__who{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600}.pw-brain-chat__bubble{background:var(--bc-bubble);border:1px solid var(--bc-line);border-radius:var(--bc-r-md);padding:10px 13px}.pw-brain-chat__source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;padding:3px 9px;border:1px solid var(--bc-line);border-radius:var(--bc-r-sm);color:var(--bc-ink-3);font-size:11px;line-height:1.4}.pw-brain-chat__source-icon{flex-shrink:0;font-size:11px}.pw-brain-chat__source-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__turn--user{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.pw-brain-chat__time{font-size:10.5px;font-weight:400;letter-spacing:.02em;color:var(--bc-ink-3);white-space:nowrap}.pw-brain-chat__user-bubble{max-width:82%;background:var(--bc-accent);color:#fff;border-radius:var(--bc-r-md);border-top-right-radius:var(--bc-r-sm);padding:10px 13px;font-size:15px;line-height:1.5}\n", ".pw-brain-chat__welcome{flex:1 1 auto;overflow-y:auto;padding:22px 0 10px;display:flex;flex-direction:column;gap:16px}.pw-brain-chat__hero{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:22px;color:#fff;background:var(--bc-accent);box-shadow:inset 0 1px #ffffff40}.pw-brain-chat__greet-h{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:12px 0 4px;color:var(--bc-title)}.pw-brain-chat__greet-sub{font-size:14px;color:var(--bc-ink-2);margin:0}.pw-brain-chat__suggest-lab{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600;margin:6px 0 -4px 2px}.pw-brain-chat__prompts{display:flex;flex-direction:column;gap:9px}.pw-brain-chat__prompt{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px;border-radius:var(--bc-r-md);cursor:pointer;background:var(--bc-panel);border:1px solid var(--bc-line);color:var(--bc-ink);font:inherit;font-size:14px;font-weight:500;transition:border-color .15s var(--bc-ease),background .15s var(--bc-ease)}.pw-brain-chat__prompt:hover{border-color:var(--bc-line-strong);background:var(--bc-surface)}.pw-brain-chat__prompt:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__pic{width:28px;height:28px;border-radius:7px;flex:none;display:grid;place-items:center;background:var(--bc-surface-2);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__pic i{font-size:14px}.pw-brain-chat__prompt-text{flex:1;min-width:0}.pw-brain-chat__arw{margin-left:auto;color:var(--bc-ink-3);font-size:13px}.pw-brain-chat__prompt:hover .pw-brain-chat__arw{color:var(--bc-accent)}.pw-brain-chat__quick{display:flex;gap:7px;margin-bottom:9px;overflow-x:auto;scrollbar-width:none}.pw-brain-chat__quick::-webkit-scrollbar{display:none}.pw-brain-chat__chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:6px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2);transition:border-color .15s var(--bc-ease),color .15s var(--bc-ease)}.pw-brain-chat__chip:hover{color:var(--bc-ink);border-color:var(--bc-line-strong)}.pw-brain-chat__chip:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__chip i{font-size:11px;color:var(--bc-ink-3)}.pw-brain-chat__memory{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);font-size:12px;color:var(--bc-ink-2)}.pw-brain-chat__memory i{color:var(--bc-success);font-size:12px}.pw-brain-chat__memory .lbl{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:600;color:var(--bc-ink-3)}\n", ".pw-brain-chat__text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.55;color:var(--bc-ink)}.pw-brain-chat__text p{margin:0}.pw-brain-chat__text p+p,.pw-brain-chat__text ul,.pw-brain-chat__text ol{margin-top:7px}.pw-brain-chat__text ul,.pw-brain-chat__text ol{padding-left:18px}.pw-brain-chat__text a{color:var(--bc-ink);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--bc-line-strong)}.pw-brain-chat__text a:hover,.pw-brain-chat__text a:focus-visible{color:var(--bc-accent);text-decoration-color:var(--bc-accent)}.pw-brain-chat__text table{width:100%;margin-top:8px;border-collapse:collapse;font-size:13px;border:1px solid var(--bc-line);border-radius:var(--bc-r-md);overflow:hidden}.pw-brain-chat__text th,.pw-brain-chat__text td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--bc-line)}.pw-brain-chat__text th{background:var(--bc-surface);font-weight:600;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--bc-ink-2)}.pw-brain-chat__text tr:last-child td{border-bottom:0}.pw-brain-chat__user-text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.5}.pw-brain-chat__caret{display:inline-block;width:2px;height:1.05em;vertical-align:-2px;margin-left:2px;background:var(--bc-accent);border-radius:1px;animation:pw-brain-chat-caret 1s steps(2,start) infinite}@keyframes pw-brain-chat-caret{50%{opacity:0}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__caret{animation:none}}\n", ".pw-brain-chat__loading{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:4px 2px 0;font-size:12px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__loading-spinner{color:var(--bc-accent, #1769e1)}.pw-brain-chat__iconbtn{width:32px;height:32px;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:var(--bc-r-md, 8px);background:transparent;color:var(--bc-ink-3, #7c8696);cursor:pointer;transition:background .15s ease,color .15s ease}.pw-brain-chat__iconbtn:hover:not(:disabled){background:var(--bc-surface, #f7f8fa);color:var(--bc-ink, #1a1d21)}.pw-brain-chat__iconbtn:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__iconbtn:disabled{opacity:.5;cursor:default}.pw-brain-chat__mic--recording{color:var(--bc-error, #c0392b)}.pw-brain-chat__stop:hover:not(:disabled){color:var(--bc-error, #c0392b)}.pw-brain-chat__compose{flex-shrink:0;border-top:1px solid var(--bc-line, #e2e5ea);padding:10px 2px 4px}.pw-brain-chat__field{display:flex;align-items:flex-end;gap:8px;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-panel, #fff);padding:6px 6px 6px 12px;transition:border-color .15s ease,box-shadow .15s ease}.pw-brain-chat__field:focus-within{border-color:var(--bc-accent, #1769e1);box-shadow:0 0 0 3px var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__input{flex:1;border:0;resize:none;background:transparent;font-family:inherit;font-size:14px;line-height:1.5;color:var(--bc-ink, #1a1d21);padding:6px 0;max-height:96px}.pw-brain-chat__input:focus{outline:none;box-shadow:none}.pw-brain-chat__input::placeholder{color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__tools{display:flex;align-items:center;gap:2px;flex:none}.pw-brain-chat__send{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--bc-r-md, 8px);background:var(--bc-accent, #1769e1);color:#fff;cursor:pointer;transition:filter .15s ease}.pw-brain-chat__send:hover:not(:disabled){filter:brightness(1.07)}.pw-brain-chat__send:disabled{background:var(--bc-line-strong, #cfd4dc);cursor:default}.pw-brain-chat__send:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__send--stop{background:var(--bc-error, #c0392b)!important}.pw-brain-chat__disclaimer{display:flex;align-items:center;gap:6px;margin:8px 2px 2px;font-size:11px;color:var(--bc-ink-3, #7c8696)}\n", ".pw-brain-chat__mic{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bs-border-color, #ced4da);background:transparent;color:var(--bs-secondary-color, #6c757d);transition:color .15s ease,border-color .15s ease}.pw-brain-chat__mic:hover:not(:disabled){color:var(--first, #0d6efd);border-color:var(--first, #0d6efd)}.pw-brain-chat__mic--recording{color:#dc3545;border-color:#dc3545;animation:pw-brain-chat-mic-pulse 1.2s ease-in-out infinite}@keyframes pw-brain-chat-mic-pulse{0%,to{opacity:1}50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__mic--recording{animation:none}}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: PwBrainChatThreadDirective, selector: "[pwBrainChatThread]" }, { kind: "component", type: PwBrainChatConfirmComponent, selector: "pw-brain-chat-confirm", inputs: ["pending", "loading"], outputs: ["approveEvent", "cancelEvent"] }, { kind: "component", type: PwBrainChatWelcomeComponent, selector: "pw-brain-chat-welcome", inputs: ["userFirstName", "prompts"], outputs: ["pick"] }, { kind: "component", type: PwBrainChatVoiceOverlayComponent, selector: "pw-brain-chat-voice-overlay", inputs: ["voice", "dictation"], outputs: ["end"] }, { kind: "pipe", type: i8.DatePipe, name: "date" }, { kind: "pipe", type: SafeMarkdownPipe, name: "safeMarkdown" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2557
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: PwBrainChatComponent, deps: [{ token: i1.MCPOrchestratorService }, { token: i1.LocalStorage }, { token: i2.Router }, { token: i0.ChangeDetectorRef }, { token: i3.Store }, { token: DynamicPageContextService }, { token: i2$1.AppConfigService, optional: true }, { token: i1.BrainSocketService, optional: true }, { token: i1.BrainVoiceService, optional: true }, { token: i1.VoiceChatService, optional: true }, { token: i1.DirectUploadService, optional: true }, { token: BRAIN_CHAT_UPLOAD_APIS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2558
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: PwBrainChatComponent, isStandalone: false, selector: "pw-brain-chat", viewQueries: [{ propertyName: "threadRef", first: true, predicate: ["thread"], descendants: true }], ngImport: i0, template: "<div\n class=\"pw-brain-chat\"\n (dragenter)=\"attachment.dragEnter($event)\"\n (dragover)=\"attachment.dragOver($event)\"\n (dragleave)=\"attachment.dragLeave($event)\"\n (drop)=\"attachment.drop($event)\"\n>\n @if (attachment.dragActive) {\n <div class=\"pw-brain-chat__dropzone\" aria-hidden=\"true\">\n <div class=\"pw-brain-chat__dropzone-frame\">\n <i class=\"fas fa-file-arrow-up pw-brain-chat__dropzone-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__dropzone-title\">{{ attachment.label }}</span>\n <span class=\"pw-brain-chat__dropzone-hint\">{{ attachment.hint }}</span>\n </div>\n </div>\n }\n <!-- The sidebar host header owns title + close + live status + New chat\n (SidebarContent.status / headerActions) \u2014 so the panel body starts at\n the thread, no duplicate status strip. newChat() is invoked from the\n host header action. -->\n <div #thread pwBrainChatThread class=\"pw-brain-chat__thread\" role=\"log\" aria-live=\"polite\">\n @if (messages.length <= 1 && !loading && !streamingProse) {\n <pw-brain-chat-welcome\n [userFirstName]=\"userFirstName\"\n [prompts]=\"suggestedPrompts\"\n (pick)=\"usePrompt($event)\"\n ></pw-brain-chat-welcome>\n } @else {\n @for (m of messages; track trackByIndex($index, m)) {\n @if (m.role === 'user') {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--user\">\n <div class=\"pw-brain-chat__user-bubble\"><pre class=\"pw-brain-chat__user-text\">{{ m.text }}</pre></div>\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">{{ m.at | date: 'shortTime' }}</span>\n }\n </div>\n } @else {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">\n {{ brandName }} Brain\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">\u00B7 {{ m.at | date: 'shortTime' }}</span>\n }\n </span>\n <div class=\"pw-brain-chat__bubble\">\n @if (m.markdownEnabled) {\n <div class=\"pw-brain-chat__text\" [innerHTML]=\"m.text | safeMarkdown\"></div>\n } @else {\n <pre class=\"pw-brain-chat__text\">{{ m.text }}</pre>\n }\n </div>\n @if (m.sourcePage) {\n <div class=\"pw-brain-chat__source\" role=\"note\">\n <i class=\"fas fa-file-lines pw-brain-chat__source-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__source-text\">Documented on: {{ m.sourcePage }}</span>\n </div>\n }\n @if (m.pending) {\n <pw-brain-chat-confirm\n [pending]=\"m.pending\"\n [loading]=\"loading\"\n (approveEvent)=\"approve(m)\"\n (cancelEvent)=\"cancel(m)\"\n ></pw-brain-chat-confirm>\n }\n </div>\n </div>\n }\n }\n }\n\n @if (loading && streamingProse) {\n <!-- prose streams token-by-token into a partial bot turn; caret = writing (#51) -->\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">{{ brandName }} Brain</span>\n <div class=\"pw-brain-chat__bubble\">\n <pre class=\"pw-brain-chat__text\"\n >{{ streamingProse }}<span class=\"pw-brain-chat__caret\" aria-hidden=\"true\"></span></pre>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (loading && !streamingProse) {\n <div class=\"pw-brain-chat__loading\">\n <i class=\"fas fa-circle-notch fa-spin pw-brain-chat__loading-spinner\" aria-hidden=\"true\"></i>\n <span aria-live=\"polite\">{{ streamingStage || 'Working\u2026' }}</span>\n <button type=\"button\" class=\"pw-brain-chat__iconbtn pw-brain-chat__stop\" (click)=\"cancelRequest()\"\n [ngbTooltip]=\"'Stop request'\" container=\"body\" aria-label=\"Stop request\">\n <i class=\"fas fa-stop\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- Voice session / dictation \u2192 animated Sonar overlay (#51) -->\n @if (voiceChat.isActive || voiceChat.error || dictation.phase === 'listening' || dictation.phase === 'processing' || dictation.error) {\n <pw-brain-chat-voice-overlay\n [voice]=\"voiceChat\"\n [dictation]=\"dictation\"\n (end)=\"voiceChat.isActive || voiceChat.error ? voiceChat.stop() : dictation.dismiss()\"\n ></pw-brain-chat-voice-overlay>\n }\n\n <div class=\"pw-brain-chat__compose\">\n @if (messages.length > 1) {\n <div class=\"pw-brain-chat__quick\">\n @for (q of quickActions; track q.text) {\n <button type=\"button\" class=\"pw-brain-chat__chip\" (click)=\"usePrompt(q.text)\">\n <i class=\"fas\" [ngClass]=\"q.icon\" aria-hidden=\"true\"></i>{{ q.label }}\n </button>\n }\n </div>\n }\n @if (attachment.current; as file) {\n <div\n class=\"pw-brain-chat__attachment\"\n [class.pw-brain-chat__attachment--error]=\"file.status === 'error'\"\n [style.--pw-upload-progress]=\"file.percent + '%'\"\n >\n <span class=\"pw-brain-chat__attachment-icon\">\n <i class=\"fas\" [ngClass]=\"attachment.icon()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"pw-brain-chat__attachment-body\">\n <span class=\"pw-brain-chat__attachment-name\" [title]=\"file.name\">{{ file.name }}</span>\n <span class=\"pw-brain-chat__attachment-meta\" role=\"status\" aria-live=\"polite\">{{ attachment.meta() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n (click)=\"attachment.remove()\"\n ngbTooltip=\"Remove file\"\n container=\"body\"\n aria-label=\"Remove attached file\"\n ><i class=\"fas fa-xmark\" aria-hidden=\"true\"></i></button>\n @if (file.status === 'uploading') {\n <span class=\"pw-brain-chat__attachment-progress\"></span>\n }\n </div>\n @if (attachment.choosing) {\n <div class=\"pw-brain-chat__choice\" role=\"group\" aria-label=\"What should I do with this file?\">\n <span class=\"pw-brain-chat__choice-prompt\">What should I do with this file?</span>\n <div class=\"pw-brain-chat__choice-options\">\n @for (option of attachment.choices; track option.tool) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__chip\"\n (click)=\"attachment.choose(option)\"\n >{{ attachment.choiceLabel(option) }}</button>\n }\n </div>\n </div>\n }\n }\n <label class=\"visually-hidden\" for=\"pw-brain-chat-input\">Message {{ brandName }} Brain</label>\n <div class=\"pw-brain-chat__field\">\n <textarea\n id=\"pw-brain-chat-input\"\n class=\"pw-brain-chat__input\"\n rows=\"1\"\n [(ngModel)]=\"draft\"\n placeholder=\"Ask a question or tell me what to do\u2026\"\n (keydown.enter)=\"$event.preventDefault(); send()\"\n\n aria-label=\"Ask a question or tell me what to do\u2026\" ></textarea>\n <div class=\"pw-brain-chat__tools\">\n @if (attachment.enabled) {\n <input\n #fileInput\n type=\"file\"\n class=\"visually-hidden\"\n [accept]=\"attachment.acceptAttr\"\n (change)=\"pickFile(fileInput)\"\n />\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || attachment.busy\"\n (click)=\"fileInput.click()\"\n ngbTooltip=\"Attach a file\"\n container=\"body\"\n aria-label=\"Attach a file\"\n ><i class=\"fas fa-paperclip\" aria-hidden=\"true\"></i></button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn pw-brain-chat__mic\"\n [class.pw-brain-chat__mic--recording]=\"dictation.isRecording\"\n [disabled]=\"loading || dictation.phase === 'processing'\"\n (click)=\"dictation.toggle(loading)\"\n [ngbTooltip]=\"dictation.phase === 'listening' ? 'Stop dictation' : (dictation.phase === 'processing' ? 'Processing\u2026' : 'Dictate')\"\n container=\"body\"\n [attr.aria-label]=\"dictation.phase === 'listening' ? 'Stop dictation' : 'Dictate with your voice'\"\n [attr.aria-pressed]=\"dictation.isRecording\"\n ><i class=\"fas fa-microphone\" aria-hidden=\"true\"></i></button>\n @if (voiceChat.available) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || dictation.isRecording\"\n (click)=\"voiceChat.toggle(loading)\"\n [ngbTooltip]=\"voiceChat.isActive ? 'End voice chat' : 'Voice chat'\"\n container=\"body\"\n [attr.aria-label]=\"voiceChat.isActive ? 'End voice chat' : 'Start voice chat'\"\n [attr.aria-pressed]=\"voiceChat.isActive\"\n >\n @switch (voiceChat.visual) {\n @case ('loader') { <i class=\"fas fa-circle-notch fa-spin\" aria-hidden=\"true\"></i> }\n @case ('wave') { <i class=\"fas fa-volume-high\" aria-hidden=\"true\"></i> }\n <!-- fa-waveform-lines (FA Pro, shipped in assets/fontawesome) \u2014 the\n canonical \"voice mode\" glyph; fa-comment-dots read as a second\n text-chat button. -->\n @default { <i class=\"fas fa-waveform-lines\" aria-hidden=\"true\"></i> }\n }\n </button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__send\"\n [class.pw-brain-chat__send--stop]=\"loading\"\n [disabled]=\"!loading && ((!draft.trim() && !attachment.ready) || attachment.busy || attachment.choosing)\"\n (click)=\"loading ? cancelRequest() : send()\"\n [ngbTooltip]=\"loading ? 'Stop request' : 'Send message'\"\n container=\"body\"\n [attr.aria-label]=\"loading ? 'Stop request' : 'Send message'\"\n >\n <i class=\"fas\" [ngClass]=\"loading ? 'fa-stop' : 'fa-paper-plane'\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"pw-brain-chat__disclaimer\" role=\"note\">\n <i class=\"fas fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n AI may be inaccurate \u2014 verify before acting.\n </div>\n </div>\n</div>\n", styles: [".pw-brain-chat{--bc-panel: var(--dashboard_bg, #fff);--bc-shade: #20385e;--bc-surface: color-mix(in srgb, var(--bc-panel) 96.6%, var(--bc-shade));--bc-surface-2: color-mix(in srgb, var(--bc-panel) 92.3%, var(--bc-shade));--bc-line: color-mix(in srgb, var(--bc-panel) 86.8%, var(--bc-shade));--bc-line-strong: color-mix(in srgb, var(--bc-panel) 78.3%, var(--bc-shade));--bc-bubble: color-mix(in srgb, var(--bc-panel) 94.1%, var(--bc-shade));--bc-ink: var(--text, #1a1d21);--bc-title: var(--titles, var(--text, #1a1d21));--bc-ink-2: color-mix(in srgb, var(--bc-ink) 72%, var(--bc-panel));--bc-ink-3: color-mix(in srgb, var(--bc-ink) 55%, var(--bc-panel));--bc-accent: var(--first, #1769e1);--bc-accent-wash: color-mix(in srgb, var(--first, #1769e1) 10%, transparent);--bc-accent-line: color-mix(in srgb, var(--first, #1769e1) 32%, var(--bc-line));--bc-success: #1f9d57;--bc-warning: #b7791f;--bc-error: #c0392b;--bc-r-sm: 4px;--bc-r-md: 8px;--bc-r-lg: 12px;--bc-ease: cubic-bezier(.2, .6, .25, 1);display:flex;flex-direction:column;height:100%;min-height:0;font-size:15px;color:var(--bc-ink);position:relative}:host-context([data-theme=dark]) .pw-brain-chat{--bc-panel: #15181d;--bc-surface: #1c2026;--bc-surface-2: #21262e;--bc-line: #2a2f38;--bc-line-strong: #384150;--bc-bubble: #1c2026;--bc-ink: #edeff2;--bc-title: #edeff2;--bc-ink-2: #aab3c0;--bc-ink-3: #7c8696}.pw-brain-chat__thread{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 2px 8px;display:flex;flex-direction:column;gap:18px}.pw-brain-chat__thread>:first-child{margin-top:auto}.pw-brain-chat__turn--bot{display:grid;grid-template-columns:26px 1fr;column-gap:10px}.pw-brain-chat__spine{display:flex;flex-direction:column;align-items:center}.pw-brain-chat__node{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__node i{font-size:12px}.pw-brain-chat__line{flex:1 1 auto;width:2px;margin-top:6px;background:var(--bc-line);border-radius:9999px}.pw-brain-chat__artifacts{min-width:0;display:flex;flex-direction:column;gap:9px;padding-top:1px}.pw-brain-chat__who{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600}.pw-brain-chat__bubble{background:var(--bc-bubble);border:1px solid var(--bc-line);border-radius:var(--bc-r-md);padding:10px 13px}.pw-brain-chat__source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;padding:3px 9px;border:1px solid var(--bc-line);border-radius:var(--bc-r-sm);color:var(--bc-ink-3);font-size:11px;line-height:1.4}.pw-brain-chat__source-icon{flex-shrink:0;font-size:11px}.pw-brain-chat__source-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__turn--user{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.pw-brain-chat__time{font-size:10.5px;font-weight:400;letter-spacing:.02em;color:var(--bc-ink-3);white-space:nowrap}.pw-brain-chat__user-bubble{max-width:82%;background:var(--bc-accent);color:#fff;border-radius:var(--bc-r-md);border-top-right-radius:var(--bc-r-sm);padding:10px 13px;font-size:15px;line-height:1.5}\n", ".pw-brain-chat__welcome{flex:1 1 auto;overflow-y:auto;padding:22px 0 10px;display:flex;flex-direction:column;gap:16px}.pw-brain-chat__hero{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:22px;color:#fff;background:var(--bc-accent);box-shadow:inset 0 1px #ffffff40}.pw-brain-chat__greet-h{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:12px 0 4px;color:var(--bc-title)}.pw-brain-chat__greet-sub{font-size:14px;color:var(--bc-ink-2);margin:0}.pw-brain-chat__suggest-lab{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600;margin:6px 0 -4px 2px}.pw-brain-chat__prompts{display:flex;flex-direction:column;gap:9px}.pw-brain-chat__prompt{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px;border-radius:var(--bc-r-md);cursor:pointer;background:var(--bc-panel);border:1px solid var(--bc-line);color:var(--bc-ink);font:inherit;font-size:14px;font-weight:500;transition:border-color .15s var(--bc-ease),background .15s var(--bc-ease)}.pw-brain-chat__prompt:hover{border-color:var(--bc-line-strong);background:var(--bc-surface)}.pw-brain-chat__prompt:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__pic{width:28px;height:28px;border-radius:7px;flex:none;display:grid;place-items:center;background:var(--bc-surface-2);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__pic i{font-size:14px}.pw-brain-chat__prompt-text{flex:1;min-width:0}.pw-brain-chat__arw{margin-left:auto;color:var(--bc-ink-3);font-size:13px}.pw-brain-chat__prompt:hover .pw-brain-chat__arw{color:var(--bc-accent)}.pw-brain-chat__quick{display:flex;gap:7px;margin-bottom:9px;overflow-x:auto;scrollbar-width:none}.pw-brain-chat__quick::-webkit-scrollbar{display:none}.pw-brain-chat__chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:6px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2);transition:border-color .15s var(--bc-ease),color .15s var(--bc-ease)}.pw-brain-chat__chip:hover{color:var(--bc-ink);border-color:var(--bc-line-strong)}.pw-brain-chat__chip:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__chip i{font-size:11px;color:var(--bc-ink-3)}.pw-brain-chat__memory{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);font-size:12px;color:var(--bc-ink-2)}.pw-brain-chat__memory i{color:var(--bc-success);font-size:12px}.pw-brain-chat__memory .lbl{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:600;color:var(--bc-ink-3)}\n", ".pw-brain-chat__text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.55;color:var(--bc-ink)}.pw-brain-chat__text p{margin:0}.pw-brain-chat__text p+p,.pw-brain-chat__text ul,.pw-brain-chat__text ol{margin-top:7px}.pw-brain-chat__text ul,.pw-brain-chat__text ol{padding-left:18px}.pw-brain-chat__text a{color:var(--bc-ink);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--bc-line-strong)}.pw-brain-chat__text a:hover,.pw-brain-chat__text a:focus-visible{color:var(--bc-accent);text-decoration-color:var(--bc-accent)}.pw-brain-chat__text table{width:100%;margin-top:8px;border-collapse:collapse;font-size:13px;border:1px solid var(--bc-line);border-radius:var(--bc-r-md);overflow:hidden}.pw-brain-chat__text th,.pw-brain-chat__text td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--bc-line)}.pw-brain-chat__text th{background:var(--bc-surface);font-weight:600;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--bc-ink-2)}.pw-brain-chat__text tr:last-child td{border-bottom:0}.pw-brain-chat__user-text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.5}.pw-brain-chat__caret{display:inline-block;width:2px;height:1.05em;vertical-align:-2px;margin-left:2px;background:var(--bc-accent);border-radius:1px;animation:pw-brain-chat-caret 1s steps(2,start) infinite}@keyframes pw-brain-chat-caret{50%{opacity:0}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__caret{animation:none}}\n", ".pw-brain-chat__loading{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:4px 2px 0;font-size:12px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__loading-spinner{color:var(--bc-accent, #1769e1)}.pw-brain-chat__iconbtn{width:32px;height:32px;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:var(--bc-r-md, 8px);background:transparent;color:var(--bc-ink-3, #7c8696);cursor:pointer;transition:background .15s ease,color .15s ease}.pw-brain-chat__iconbtn:hover:not(:disabled){background:var(--bc-surface, #f7f8fa);color:var(--bc-ink, #1a1d21)}.pw-brain-chat__iconbtn:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__iconbtn:disabled{opacity:.5;cursor:default}.pw-brain-chat__mic--recording{color:var(--bc-error, #c0392b)}.pw-brain-chat__stop:hover:not(:disabled){color:var(--bc-error, #c0392b)}.pw-brain-chat__compose{flex-shrink:0;border-top:1px solid var(--bc-line, #e2e5ea);padding:10px 2px 4px}.pw-brain-chat__field{display:flex;align-items:flex-end;gap:8px;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-panel, #fff);padding:6px 6px 6px 12px;transition:border-color .15s ease,box-shadow .15s ease}.pw-brain-chat__field:focus-within{border-color:var(--bc-accent, #1769e1);box-shadow:0 0 0 3px var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__input{flex:1;border:0;resize:none;background:transparent;font-family:inherit;font-size:14px;line-height:1.5;color:var(--bc-ink, #1a1d21);padding:6px 0;max-height:96px}.pw-brain-chat__input:focus{outline:none;box-shadow:none}.pw-brain-chat__input::placeholder{color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__tools{display:flex;align-items:center;gap:2px;flex:none}.pw-brain-chat__send{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--bc-r-md, 8px);background:var(--bc-accent, #1769e1);color:#fff;cursor:pointer;transition:filter .15s ease}.pw-brain-chat__send:hover:not(:disabled){filter:brightness(1.07)}.pw-brain-chat__send:disabled{background:var(--bc-line-strong, #cfd4dc);cursor:default}.pw-brain-chat__send:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__send--stop{background:var(--bc-error, #c0392b)!important}.pw-brain-chat__disclaimer{display:flex;align-items:center;gap:6px;margin:8px 2px 2px;font-size:11px;color:var(--bc-ink-3, #7c8696)}\n", ".pw-brain-chat__dropzone{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:16px;background:color-mix(in srgb,var(--bc-panel, #fff) 82%,transparent);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:pw-brain-chat-dropzone-in .16s ease-out}.pw-brain-chat__dropzone-frame{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:100%;padding:24px 16px;text-align:center;border:2px dashed var(--bc-accent, #1769e1);border-radius:var(--bc-r-lg, 12px);background:var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__dropzone-icon{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:2px;font-size:19px;line-height:1;border-radius:50%;color:var(--bc-accent, #1769e1);background:var(--bc-panel, #fff);border:1px solid color-mix(in srgb,var(--bc-accent, #1769e1) 28%,transparent);box-shadow:0 1px 3px #0000000f}.pw-brain-chat__dropzone-title{font-size:15px;font-weight:600;letter-spacing:-.1px;color:var(--bc-ink, #1a1d21)}.pw-brain-chat__dropzone-hint{font-size:12px;color:var(--bc-ink-3, #7c8696)}@keyframes pw-brain-chat-dropzone-in{0%{opacity:0;transform:scale(.99)}to{opacity:1;transform:none}}.pw-brain-chat__attachment{position:relative;display:flex;align-items:center;gap:10px;margin:0 2px 8px;padding:8px 10px;overflow:hidden;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-surface, #f7f8fa)}.pw-brain-chat__attachment--error{border-color:var(--bc-error, #c0392b);background:color-mix(in srgb,var(--bc-error, #c0392b) 6%,transparent)}.pw-brain-chat__attachment-icon{width:28px;height:28px;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:13px;border-radius:var(--bc-r-sm, 6px);background:var(--bc-panel, #fff);border:1px solid var(--bc-line, #e2e5ea);color:var(--bc-accent, #1769e1)}.pw-brain-chat__attachment--error .pw-brain-chat__attachment-icon{color:var(--bc-error, #c0392b)}.pw-brain-chat__attachment-body{flex:1;min-width:0}.pw-brain-chat__attachment-name{display:block;font-size:13px;font-weight:600;color:var(--bc-ink, #1a1d21);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__attachment-meta{display:block;margin-top:1px;font-size:11px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__attachment--error .pw-brain-chat__attachment-meta{color:var(--bc-error, #c0392b)}.pw-brain-chat__attachment-progress{position:absolute;left:0;bottom:0;height:2px;width:var(--pw-upload-progress, 0%);background:var(--bc-accent, #1769e1);transition:width .18s ease-out}@media(prefers-reduced-motion:reduce){.pw-brain-chat__dropzone{animation:none}.pw-brain-chat__attachment-progress{transition:none}}.pw-brain-chat__choice{display:flex;flex-direction:column;gap:6px;margin:-2px 2px 9px}.pw-brain-chat__choice-prompt{font-size:12px;color:var(--bc-ink-2, #5b6472)}.pw-brain-chat__choice-options{display:flex;flex-wrap:wrap;gap:7px}\n", ".pw-brain-chat__mic{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bs-border-color, #ced4da);background:transparent;color:var(--bs-secondary-color, #6c757d);transition:color .15s ease,border-color .15s ease}.pw-brain-chat__mic:hover:not(:disabled){color:var(--first, #0d6efd);border-color:var(--first, #0d6efd)}.pw-brain-chat__mic--recording{color:#dc3545;border-color:#dc3545;animation:pw-brain-chat-mic-pulse 1.2s ease-in-out infinite}@keyframes pw-brain-chat-mic-pulse{0%,to{opacity:1}50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__mic--recording{animation:none}}\n"], dependencies: [{ kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: PwBrainChatThreadDirective, selector: "[pwBrainChatThread]" }, { kind: "component", type: PwBrainChatConfirmComponent, selector: "pw-brain-chat-confirm", inputs: ["pending", "loading"], outputs: ["approveEvent", "cancelEvent"] }, { kind: "component", type: PwBrainChatWelcomeComponent, selector: "pw-brain-chat-welcome", inputs: ["userFirstName", "prompts"], outputs: ["pick"] }, { kind: "component", type: PwBrainChatVoiceOverlayComponent, selector: "pw-brain-chat-voice-overlay", inputs: ["voice", "dictation"], outputs: ["end"] }, { kind: "pipe", type: i8.DatePipe, name: "date" }, { kind: "pipe", type: SafeMarkdownPipe, name: "safeMarkdown" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2019
2559
|
}
|
|
2020
2560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: PwBrainChatComponent, decorators: [{
|
|
2021
2561
|
type: Component,
|
|
2022
|
-
args: [{ selector: 'pw-brain-chat', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"pw-brain-chat\">\n <!-- The sidebar host header owns title + close + live status + New chat\n (SidebarContent.status / headerActions) \u2014 so the panel body starts at\n the thread, no duplicate status strip. newChat() is invoked from the\n host header action. -->\n <div #thread pwBrainChatThread class=\"pw-brain-chat__thread\" role=\"log\" aria-live=\"polite\">\n @if (messages.length <= 1 && !loading && !streamingProse) {\n <pw-brain-chat-welcome\n [userFirstName]=\"userFirstName\"\n [prompts]=\"suggestedPrompts\"\n (pick)=\"usePrompt($event)\"\n ></pw-brain-chat-welcome>\n } @else {\n @for (m of messages; track trackByIndex($index, m)) {\n @if (m.role === 'user') {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--user\">\n <div class=\"pw-brain-chat__user-bubble\"><pre class=\"pw-brain-chat__user-text\">{{ m.text }}</pre></div>\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">{{ m.at | date: 'shortTime' }}</span>\n }\n </div>\n } @else {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">\n {{ brandName }} Brain\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">\u00B7 {{ m.at | date: 'shortTime' }}</span>\n }\n </span>\n <div class=\"pw-brain-chat__bubble\">\n @if (m.markdownEnabled) {\n <div class=\"pw-brain-chat__text\" [innerHTML]=\"m.text | safeMarkdown\"></div>\n } @else {\n <pre class=\"pw-brain-chat__text\">{{ m.text }}</pre>\n }\n </div>\n @if (m.sourcePage) {\n <div class=\"pw-brain-chat__source\" role=\"note\">\n <i class=\"fas fa-file-lines pw-brain-chat__source-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__source-text\">Documented on: {{ m.sourcePage }}</span>\n </div>\n }\n @if (m.pending) {\n <pw-brain-chat-confirm\n [pending]=\"m.pending\"\n [loading]=\"loading\"\n (approveEvent)=\"approve(m)\"\n (cancelEvent)=\"cancel(m)\"\n ></pw-brain-chat-confirm>\n }\n </div>\n </div>\n }\n }\n }\n\n @if (loading && streamingProse) {\n <!-- prose streams token-by-token into a partial bot turn; caret = writing (#51) -->\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">{{ brandName }} Brain</span>\n <div class=\"pw-brain-chat__bubble\">\n <pre class=\"pw-brain-chat__text\"\n >{{ streamingProse }}<span class=\"pw-brain-chat__caret\" aria-hidden=\"true\"></span></pre>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (loading && !streamingProse) {\n <div class=\"pw-brain-chat__loading\">\n <i class=\"fas fa-circle-notch fa-spin pw-brain-chat__loading-spinner\" aria-hidden=\"true\"></i>\n <span aria-live=\"polite\">{{ streamingStage || 'Working\u2026' }}</span>\n <button type=\"button\" class=\"pw-brain-chat__iconbtn pw-brain-chat__stop\" (click)=\"cancelRequest()\"\n [ngbTooltip]=\"'Stop request'\" container=\"body\" aria-label=\"Stop request\">\n <i class=\"fas fa-stop\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- Voice session / dictation \u2192 animated Sonar overlay (#51) -->\n @if (voiceChat.isActive || voiceChat.error || dictation.phase === 'listening' || dictation.phase === 'processing' || dictation.error) {\n <pw-brain-chat-voice-overlay\n [voice]=\"voiceChat\"\n [dictation]=\"dictation\"\n (end)=\"voiceChat.isActive || voiceChat.error ? voiceChat.stop() : dictation.dismiss()\"\n ></pw-brain-chat-voice-overlay>\n }\n\n <div class=\"pw-brain-chat__compose\">\n @if (messages.length > 1) {\n <div class=\"pw-brain-chat__quick\">\n @for (q of quickActions; track q.text) {\n <button type=\"button\" class=\"pw-brain-chat__chip\" (click)=\"usePrompt(q.text)\">\n <i class=\"fas\" [ngClass]=\"q.icon\" aria-hidden=\"true\"></i>{{ q.label }}\n </button>\n }\n </div>\n }\n <label class=\"visually-hidden\" for=\"pw-brain-chat-input\">Message {{ brandName }} Brain</label>\n <div class=\"pw-brain-chat__field\">\n <textarea\n id=\"pw-brain-chat-input\"\n class=\"pw-brain-chat__input\"\n rows=\"1\"\n [(ngModel)]=\"draft\"\n placeholder=\"Ask a question or tell me what to do\u2026\"\n (keydown.enter)=\"$event.preventDefault(); send()\"\n\n aria-label=\"Ask a question or tell me what to do\u2026\" ></textarea>\n <div class=\"pw-brain-chat__tools\">\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn pw-brain-chat__mic\"\n [class.pw-brain-chat__mic--recording]=\"dictation.isRecording\"\n [disabled]=\"loading || dictation.phase === 'processing'\"\n (click)=\"dictation.toggle(loading)\"\n [ngbTooltip]=\"dictation.phase === 'listening' ? 'Stop dictation' : (dictation.phase === 'processing' ? 'Processing\u2026' : 'Dictate')\"\n container=\"body\"\n [attr.aria-label]=\"dictation.phase === 'listening' ? 'Stop dictation' : 'Dictate with your voice'\"\n [attr.aria-pressed]=\"dictation.isRecording\"\n ><i class=\"fas fa-microphone\" aria-hidden=\"true\"></i></button>\n @if (voiceChat.available) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || dictation.isRecording\"\n (click)=\"voiceChat.toggle(loading)\"\n [ngbTooltip]=\"voiceChat.isActive ? 'End voice chat' : 'Voice chat'\"\n container=\"body\"\n [attr.aria-label]=\"voiceChat.isActive ? 'End voice chat' : 'Start voice chat'\"\n [attr.aria-pressed]=\"voiceChat.isActive\"\n >\n @switch (voiceChat.visual) {\n @case ('loader') { <i class=\"fas fa-circle-notch fa-spin\" aria-hidden=\"true\"></i> }\n @case ('wave') { <i class=\"fas fa-volume-high\" aria-hidden=\"true\"></i> }\n <!-- fa-waveform-lines (FA Pro, shipped in assets/fontawesome) \u2014 the\n canonical \"voice mode\" glyph; fa-comment-dots read as a second\n text-chat button. -->\n @default { <i class=\"fas fa-waveform-lines\" aria-hidden=\"true\"></i> }\n }\n </button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__send\"\n [class.pw-brain-chat__send--stop]=\"loading\"\n [disabled]=\"!loading && !draft.trim()\"\n (click)=\"loading ? cancelRequest() : send()\"\n [ngbTooltip]=\"loading ? 'Stop request' : 'Send message'\"\n container=\"body\"\n [attr.aria-label]=\"loading ? 'Stop request' : 'Send message'\"\n >\n <i class=\"fas\" [ngClass]=\"loading ? 'fa-stop' : 'fa-paper-plane'\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"pw-brain-chat__disclaimer\" role=\"note\">\n <i class=\"fas fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n AI may be inaccurate \u2014 verify before acting.\n </div>\n </div>\n</div>\n", styles: [".pw-brain-chat{--bc-panel: var(--dashboard_bg, #fff);--bc-shade: #20385e;--bc-surface: color-mix(in srgb, var(--bc-panel) 96.6%, var(--bc-shade));--bc-surface-2: color-mix(in srgb, var(--bc-panel) 92.3%, var(--bc-shade));--bc-line: color-mix(in srgb, var(--bc-panel) 86.8%, var(--bc-shade));--bc-line-strong: color-mix(in srgb, var(--bc-panel) 78.3%, var(--bc-shade));--bc-bubble: color-mix(in srgb, var(--bc-panel) 94.1%, var(--bc-shade));--bc-ink: var(--text, #1a1d21);--bc-title: var(--titles, var(--text, #1a1d21));--bc-ink-2: color-mix(in srgb, var(--bc-ink) 72%, var(--bc-panel));--bc-ink-3: color-mix(in srgb, var(--bc-ink) 55%, var(--bc-panel));--bc-accent: var(--first, #1769e1);--bc-accent-wash: color-mix(in srgb, var(--first, #1769e1) 10%, transparent);--bc-accent-line: color-mix(in srgb, var(--first, #1769e1) 32%, var(--bc-line));--bc-success: #1f9d57;--bc-warning: #b7791f;--bc-error: #c0392b;--bc-r-sm: 4px;--bc-r-md: 8px;--bc-r-lg: 12px;--bc-ease: cubic-bezier(.2, .6, .25, 1);display:flex;flex-direction:column;height:100%;min-height:0;font-size:15px;color:var(--bc-ink);position:relative}:host-context([data-theme=dark]) .pw-brain-chat{--bc-panel: #15181d;--bc-surface: #1c2026;--bc-surface-2: #21262e;--bc-line: #2a2f38;--bc-line-strong: #384150;--bc-bubble: #1c2026;--bc-ink: #edeff2;--bc-title: #edeff2;--bc-ink-2: #aab3c0;--bc-ink-3: #7c8696}.pw-brain-chat__thread{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 2px 8px;display:flex;flex-direction:column;gap:18px}.pw-brain-chat__thread>:first-child{margin-top:auto}.pw-brain-chat__turn--bot{display:grid;grid-template-columns:26px 1fr;column-gap:10px}.pw-brain-chat__spine{display:flex;flex-direction:column;align-items:center}.pw-brain-chat__node{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__node i{font-size:12px}.pw-brain-chat__line{flex:1 1 auto;width:2px;margin-top:6px;background:var(--bc-line);border-radius:9999px}.pw-brain-chat__artifacts{min-width:0;display:flex;flex-direction:column;gap:9px;padding-top:1px}.pw-brain-chat__who{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600}.pw-brain-chat__bubble{background:var(--bc-bubble);border:1px solid var(--bc-line);border-radius:var(--bc-r-md);padding:10px 13px}.pw-brain-chat__source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;padding:3px 9px;border:1px solid var(--bc-line);border-radius:var(--bc-r-sm);color:var(--bc-ink-3);font-size:11px;line-height:1.4}.pw-brain-chat__source-icon{flex-shrink:0;font-size:11px}.pw-brain-chat__source-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__turn--user{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.pw-brain-chat__time{font-size:10.5px;font-weight:400;letter-spacing:.02em;color:var(--bc-ink-3);white-space:nowrap}.pw-brain-chat__user-bubble{max-width:82%;background:var(--bc-accent);color:#fff;border-radius:var(--bc-r-md);border-top-right-radius:var(--bc-r-sm);padding:10px 13px;font-size:15px;line-height:1.5}\n", ".pw-brain-chat__welcome{flex:1 1 auto;overflow-y:auto;padding:22px 0 10px;display:flex;flex-direction:column;gap:16px}.pw-brain-chat__hero{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:22px;color:#fff;background:var(--bc-accent);box-shadow:inset 0 1px #ffffff40}.pw-brain-chat__greet-h{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:12px 0 4px;color:var(--bc-title)}.pw-brain-chat__greet-sub{font-size:14px;color:var(--bc-ink-2);margin:0}.pw-brain-chat__suggest-lab{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600;margin:6px 0 -4px 2px}.pw-brain-chat__prompts{display:flex;flex-direction:column;gap:9px}.pw-brain-chat__prompt{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px;border-radius:var(--bc-r-md);cursor:pointer;background:var(--bc-panel);border:1px solid var(--bc-line);color:var(--bc-ink);font:inherit;font-size:14px;font-weight:500;transition:border-color .15s var(--bc-ease),background .15s var(--bc-ease)}.pw-brain-chat__prompt:hover{border-color:var(--bc-line-strong);background:var(--bc-surface)}.pw-brain-chat__prompt:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__pic{width:28px;height:28px;border-radius:7px;flex:none;display:grid;place-items:center;background:var(--bc-surface-2);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__pic i{font-size:14px}.pw-brain-chat__prompt-text{flex:1;min-width:0}.pw-brain-chat__arw{margin-left:auto;color:var(--bc-ink-3);font-size:13px}.pw-brain-chat__prompt:hover .pw-brain-chat__arw{color:var(--bc-accent)}.pw-brain-chat__quick{display:flex;gap:7px;margin-bottom:9px;overflow-x:auto;scrollbar-width:none}.pw-brain-chat__quick::-webkit-scrollbar{display:none}.pw-brain-chat__chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:6px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2);transition:border-color .15s var(--bc-ease),color .15s var(--bc-ease)}.pw-brain-chat__chip:hover{color:var(--bc-ink);border-color:var(--bc-line-strong)}.pw-brain-chat__chip:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__chip i{font-size:11px;color:var(--bc-ink-3)}.pw-brain-chat__memory{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);font-size:12px;color:var(--bc-ink-2)}.pw-brain-chat__memory i{color:var(--bc-success);font-size:12px}.pw-brain-chat__memory .lbl{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:600;color:var(--bc-ink-3)}\n", ".pw-brain-chat__text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.55;color:var(--bc-ink)}.pw-brain-chat__text p{margin:0}.pw-brain-chat__text p+p,.pw-brain-chat__text ul,.pw-brain-chat__text ol{margin-top:7px}.pw-brain-chat__text ul,.pw-brain-chat__text ol{padding-left:18px}.pw-brain-chat__text a{color:var(--bc-ink);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--bc-line-strong)}.pw-brain-chat__text a:hover,.pw-brain-chat__text a:focus-visible{color:var(--bc-accent);text-decoration-color:var(--bc-accent)}.pw-brain-chat__text table{width:100%;margin-top:8px;border-collapse:collapse;font-size:13px;border:1px solid var(--bc-line);border-radius:var(--bc-r-md);overflow:hidden}.pw-brain-chat__text th,.pw-brain-chat__text td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--bc-line)}.pw-brain-chat__text th{background:var(--bc-surface);font-weight:600;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--bc-ink-2)}.pw-brain-chat__text tr:last-child td{border-bottom:0}.pw-brain-chat__user-text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.5}.pw-brain-chat__caret{display:inline-block;width:2px;height:1.05em;vertical-align:-2px;margin-left:2px;background:var(--bc-accent);border-radius:1px;animation:pw-brain-chat-caret 1s steps(2,start) infinite}@keyframes pw-brain-chat-caret{50%{opacity:0}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__caret{animation:none}}\n", ".pw-brain-chat__loading{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:4px 2px 0;font-size:12px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__loading-spinner{color:var(--bc-accent, #1769e1)}.pw-brain-chat__iconbtn{width:32px;height:32px;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:var(--bc-r-md, 8px);background:transparent;color:var(--bc-ink-3, #7c8696);cursor:pointer;transition:background .15s ease,color .15s ease}.pw-brain-chat__iconbtn:hover:not(:disabled){background:var(--bc-surface, #f7f8fa);color:var(--bc-ink, #1a1d21)}.pw-brain-chat__iconbtn:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__iconbtn:disabled{opacity:.5;cursor:default}.pw-brain-chat__mic--recording{color:var(--bc-error, #c0392b)}.pw-brain-chat__stop:hover:not(:disabled){color:var(--bc-error, #c0392b)}.pw-brain-chat__compose{flex-shrink:0;border-top:1px solid var(--bc-line, #e2e5ea);padding:10px 2px 4px}.pw-brain-chat__field{display:flex;align-items:flex-end;gap:8px;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-panel, #fff);padding:6px 6px 6px 12px;transition:border-color .15s ease,box-shadow .15s ease}.pw-brain-chat__field:focus-within{border-color:var(--bc-accent, #1769e1);box-shadow:0 0 0 3px var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__input{flex:1;border:0;resize:none;background:transparent;font-family:inherit;font-size:14px;line-height:1.5;color:var(--bc-ink, #1a1d21);padding:6px 0;max-height:96px}.pw-brain-chat__input:focus{outline:none;box-shadow:none}.pw-brain-chat__input::placeholder{color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__tools{display:flex;align-items:center;gap:2px;flex:none}.pw-brain-chat__send{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--bc-r-md, 8px);background:var(--bc-accent, #1769e1);color:#fff;cursor:pointer;transition:filter .15s ease}.pw-brain-chat__send:hover:not(:disabled){filter:brightness(1.07)}.pw-brain-chat__send:disabled{background:var(--bc-line-strong, #cfd4dc);cursor:default}.pw-brain-chat__send:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__send--stop{background:var(--bc-error, #c0392b)!important}.pw-brain-chat__disclaimer{display:flex;align-items:center;gap:6px;margin:8px 2px 2px;font-size:11px;color:var(--bc-ink-3, #7c8696)}\n", ".pw-brain-chat__mic{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bs-border-color, #ced4da);background:transparent;color:var(--bs-secondary-color, #6c757d);transition:color .15s ease,border-color .15s ease}.pw-brain-chat__mic:hover:not(:disabled){color:var(--first, #0d6efd);border-color:var(--first, #0d6efd)}.pw-brain-chat__mic--recording{color:#dc3545;border-color:#dc3545;animation:pw-brain-chat-mic-pulse 1.2s ease-in-out infinite}@keyframes pw-brain-chat-mic-pulse{0%,to{opacity:1}50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__mic--recording{animation:none}}\n"] }]
|
|
2562
|
+
args: [{ selector: 'pw-brain-chat', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"pw-brain-chat\"\n (dragenter)=\"attachment.dragEnter($event)\"\n (dragover)=\"attachment.dragOver($event)\"\n (dragleave)=\"attachment.dragLeave($event)\"\n (drop)=\"attachment.drop($event)\"\n>\n @if (attachment.dragActive) {\n <div class=\"pw-brain-chat__dropzone\" aria-hidden=\"true\">\n <div class=\"pw-brain-chat__dropzone-frame\">\n <i class=\"fas fa-file-arrow-up pw-brain-chat__dropzone-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__dropzone-title\">{{ attachment.label }}</span>\n <span class=\"pw-brain-chat__dropzone-hint\">{{ attachment.hint }}</span>\n </div>\n </div>\n }\n <!-- The sidebar host header owns title + close + live status + New chat\n (SidebarContent.status / headerActions) \u2014 so the panel body starts at\n the thread, no duplicate status strip. newChat() is invoked from the\n host header action. -->\n <div #thread pwBrainChatThread class=\"pw-brain-chat__thread\" role=\"log\" aria-live=\"polite\">\n @if (messages.length <= 1 && !loading && !streamingProse) {\n <pw-brain-chat-welcome\n [userFirstName]=\"userFirstName\"\n [prompts]=\"suggestedPrompts\"\n (pick)=\"usePrompt($event)\"\n ></pw-brain-chat-welcome>\n } @else {\n @for (m of messages; track trackByIndex($index, m)) {\n @if (m.role === 'user') {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--user\">\n <div class=\"pw-brain-chat__user-bubble\"><pre class=\"pw-brain-chat__user-text\">{{ m.text }}</pre></div>\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">{{ m.at | date: 'shortTime' }}</span>\n }\n </div>\n } @else {\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">\n {{ brandName }} Brain\n @if (m.at) {\n <span class=\"pw-brain-chat__time\">\u00B7 {{ m.at | date: 'shortTime' }}</span>\n }\n </span>\n <div class=\"pw-brain-chat__bubble\">\n @if (m.markdownEnabled) {\n <div class=\"pw-brain-chat__text\" [innerHTML]=\"m.text | safeMarkdown\"></div>\n } @else {\n <pre class=\"pw-brain-chat__text\">{{ m.text }}</pre>\n }\n </div>\n @if (m.sourcePage) {\n <div class=\"pw-brain-chat__source\" role=\"note\">\n <i class=\"fas fa-file-lines pw-brain-chat__source-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-brain-chat__source-text\">Documented on: {{ m.sourcePage }}</span>\n </div>\n }\n @if (m.pending) {\n <pw-brain-chat-confirm\n [pending]=\"m.pending\"\n [loading]=\"loading\"\n (approveEvent)=\"approve(m)\"\n (cancelEvent)=\"cancel(m)\"\n ></pw-brain-chat-confirm>\n }\n </div>\n </div>\n }\n }\n }\n\n @if (loading && streamingProse) {\n <!-- prose streams token-by-token into a partial bot turn; caret = writing (#51) -->\n <div class=\"pw-brain-chat__turn pw-brain-chat__turn--bot\">\n <div class=\"pw-brain-chat__spine\" aria-hidden=\"true\">\n <span class=\"pw-brain-chat__node\"><i class=\"fas fa-brain\"></i></span>\n <span class=\"pw-brain-chat__line\"></span>\n </div>\n <div class=\"pw-brain-chat__artifacts\">\n <span class=\"pw-brain-chat__who\">{{ brandName }} Brain</span>\n <div class=\"pw-brain-chat__bubble\">\n <pre class=\"pw-brain-chat__text\"\n >{{ streamingProse }}<span class=\"pw-brain-chat__caret\" aria-hidden=\"true\"></span></pre>\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (loading && !streamingProse) {\n <div class=\"pw-brain-chat__loading\">\n <i class=\"fas fa-circle-notch fa-spin pw-brain-chat__loading-spinner\" aria-hidden=\"true\"></i>\n <span aria-live=\"polite\">{{ streamingStage || 'Working\u2026' }}</span>\n <button type=\"button\" class=\"pw-brain-chat__iconbtn pw-brain-chat__stop\" (click)=\"cancelRequest()\"\n [ngbTooltip]=\"'Stop request'\" container=\"body\" aria-label=\"Stop request\">\n <i class=\"fas fa-stop\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n\n <!-- Voice session / dictation \u2192 animated Sonar overlay (#51) -->\n @if (voiceChat.isActive || voiceChat.error || dictation.phase === 'listening' || dictation.phase === 'processing' || dictation.error) {\n <pw-brain-chat-voice-overlay\n [voice]=\"voiceChat\"\n [dictation]=\"dictation\"\n (end)=\"voiceChat.isActive || voiceChat.error ? voiceChat.stop() : dictation.dismiss()\"\n ></pw-brain-chat-voice-overlay>\n }\n\n <div class=\"pw-brain-chat__compose\">\n @if (messages.length > 1) {\n <div class=\"pw-brain-chat__quick\">\n @for (q of quickActions; track q.text) {\n <button type=\"button\" class=\"pw-brain-chat__chip\" (click)=\"usePrompt(q.text)\">\n <i class=\"fas\" [ngClass]=\"q.icon\" aria-hidden=\"true\"></i>{{ q.label }}\n </button>\n }\n </div>\n }\n @if (attachment.current; as file) {\n <div\n class=\"pw-brain-chat__attachment\"\n [class.pw-brain-chat__attachment--error]=\"file.status === 'error'\"\n [style.--pw-upload-progress]=\"file.percent + '%'\"\n >\n <span class=\"pw-brain-chat__attachment-icon\">\n <i class=\"fas\" [ngClass]=\"attachment.icon()\" aria-hidden=\"true\"></i>\n </span>\n <span class=\"pw-brain-chat__attachment-body\">\n <span class=\"pw-brain-chat__attachment-name\" [title]=\"file.name\">{{ file.name }}</span>\n <span class=\"pw-brain-chat__attachment-meta\" role=\"status\" aria-live=\"polite\">{{ attachment.meta() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n (click)=\"attachment.remove()\"\n ngbTooltip=\"Remove file\"\n container=\"body\"\n aria-label=\"Remove attached file\"\n ><i class=\"fas fa-xmark\" aria-hidden=\"true\"></i></button>\n @if (file.status === 'uploading') {\n <span class=\"pw-brain-chat__attachment-progress\"></span>\n }\n </div>\n @if (attachment.choosing) {\n <div class=\"pw-brain-chat__choice\" role=\"group\" aria-label=\"What should I do with this file?\">\n <span class=\"pw-brain-chat__choice-prompt\">What should I do with this file?</span>\n <div class=\"pw-brain-chat__choice-options\">\n @for (option of attachment.choices; track option.tool) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__chip\"\n (click)=\"attachment.choose(option)\"\n >{{ attachment.choiceLabel(option) }}</button>\n }\n </div>\n </div>\n }\n }\n <label class=\"visually-hidden\" for=\"pw-brain-chat-input\">Message {{ brandName }} Brain</label>\n <div class=\"pw-brain-chat__field\">\n <textarea\n id=\"pw-brain-chat-input\"\n class=\"pw-brain-chat__input\"\n rows=\"1\"\n [(ngModel)]=\"draft\"\n placeholder=\"Ask a question or tell me what to do\u2026\"\n (keydown.enter)=\"$event.preventDefault(); send()\"\n\n aria-label=\"Ask a question or tell me what to do\u2026\" ></textarea>\n <div class=\"pw-brain-chat__tools\">\n @if (attachment.enabled) {\n <input\n #fileInput\n type=\"file\"\n class=\"visually-hidden\"\n [accept]=\"attachment.acceptAttr\"\n (change)=\"pickFile(fileInput)\"\n />\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || attachment.busy\"\n (click)=\"fileInput.click()\"\n ngbTooltip=\"Attach a file\"\n container=\"body\"\n aria-label=\"Attach a file\"\n ><i class=\"fas fa-paperclip\" aria-hidden=\"true\"></i></button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn pw-brain-chat__mic\"\n [class.pw-brain-chat__mic--recording]=\"dictation.isRecording\"\n [disabled]=\"loading || dictation.phase === 'processing'\"\n (click)=\"dictation.toggle(loading)\"\n [ngbTooltip]=\"dictation.phase === 'listening' ? 'Stop dictation' : (dictation.phase === 'processing' ? 'Processing\u2026' : 'Dictate')\"\n container=\"body\"\n [attr.aria-label]=\"dictation.phase === 'listening' ? 'Stop dictation' : 'Dictate with your voice'\"\n [attr.aria-pressed]=\"dictation.isRecording\"\n ><i class=\"fas fa-microphone\" aria-hidden=\"true\"></i></button>\n @if (voiceChat.available) {\n <button\n type=\"button\"\n class=\"pw-brain-chat__iconbtn\"\n [disabled]=\"loading || dictation.isRecording\"\n (click)=\"voiceChat.toggle(loading)\"\n [ngbTooltip]=\"voiceChat.isActive ? 'End voice chat' : 'Voice chat'\"\n container=\"body\"\n [attr.aria-label]=\"voiceChat.isActive ? 'End voice chat' : 'Start voice chat'\"\n [attr.aria-pressed]=\"voiceChat.isActive\"\n >\n @switch (voiceChat.visual) {\n @case ('loader') { <i class=\"fas fa-circle-notch fa-spin\" aria-hidden=\"true\"></i> }\n @case ('wave') { <i class=\"fas fa-volume-high\" aria-hidden=\"true\"></i> }\n <!-- fa-waveform-lines (FA Pro, shipped in assets/fontawesome) \u2014 the\n canonical \"voice mode\" glyph; fa-comment-dots read as a second\n text-chat button. -->\n @default { <i class=\"fas fa-waveform-lines\" aria-hidden=\"true\"></i> }\n }\n </button>\n }\n <button\n type=\"button\"\n class=\"pw-brain-chat__send\"\n [class.pw-brain-chat__send--stop]=\"loading\"\n [disabled]=\"!loading && ((!draft.trim() && !attachment.ready) || attachment.busy || attachment.choosing)\"\n (click)=\"loading ? cancelRequest() : send()\"\n [ngbTooltip]=\"loading ? 'Stop request' : 'Send message'\"\n container=\"body\"\n [attr.aria-label]=\"loading ? 'Stop request' : 'Send message'\"\n >\n <i class=\"fas\" [ngClass]=\"loading ? 'fa-stop' : 'fa-paper-plane'\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"pw-brain-chat__disclaimer\" role=\"note\">\n <i class=\"fas fa-triangle-exclamation\" aria-hidden=\"true\"></i>\n AI may be inaccurate \u2014 verify before acting.\n </div>\n </div>\n</div>\n", styles: [".pw-brain-chat{--bc-panel: var(--dashboard_bg, #fff);--bc-shade: #20385e;--bc-surface: color-mix(in srgb, var(--bc-panel) 96.6%, var(--bc-shade));--bc-surface-2: color-mix(in srgb, var(--bc-panel) 92.3%, var(--bc-shade));--bc-line: color-mix(in srgb, var(--bc-panel) 86.8%, var(--bc-shade));--bc-line-strong: color-mix(in srgb, var(--bc-panel) 78.3%, var(--bc-shade));--bc-bubble: color-mix(in srgb, var(--bc-panel) 94.1%, var(--bc-shade));--bc-ink: var(--text, #1a1d21);--bc-title: var(--titles, var(--text, #1a1d21));--bc-ink-2: color-mix(in srgb, var(--bc-ink) 72%, var(--bc-panel));--bc-ink-3: color-mix(in srgb, var(--bc-ink) 55%, var(--bc-panel));--bc-accent: var(--first, #1769e1);--bc-accent-wash: color-mix(in srgb, var(--first, #1769e1) 10%, transparent);--bc-accent-line: color-mix(in srgb, var(--first, #1769e1) 32%, var(--bc-line));--bc-success: #1f9d57;--bc-warning: #b7791f;--bc-error: #c0392b;--bc-r-sm: 4px;--bc-r-md: 8px;--bc-r-lg: 12px;--bc-ease: cubic-bezier(.2, .6, .25, 1);display:flex;flex-direction:column;height:100%;min-height:0;font-size:15px;color:var(--bc-ink);position:relative}:host-context([data-theme=dark]) .pw-brain-chat{--bc-panel: #15181d;--bc-surface: #1c2026;--bc-surface-2: #21262e;--bc-line: #2a2f38;--bc-line-strong: #384150;--bc-bubble: #1c2026;--bc-ink: #edeff2;--bc-title: #edeff2;--bc-ink-2: #aab3c0;--bc-ink-3: #7c8696}.pw-brain-chat__thread{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px 2px 8px;display:flex;flex-direction:column;gap:18px}.pw-brain-chat__thread>:first-child{margin-top:auto}.pw-brain-chat__turn--bot{display:grid;grid-template-columns:26px 1fr;column-gap:10px}.pw-brain-chat__spine{display:flex;flex-direction:column;align-items:center}.pw-brain-chat__node{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__node i{font-size:12px}.pw-brain-chat__line{flex:1 1 auto;width:2px;margin-top:6px;background:var(--bc-line);border-radius:9999px}.pw-brain-chat__artifacts{min-width:0;display:flex;flex-direction:column;gap:9px;padding-top:1px}.pw-brain-chat__who{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600}.pw-brain-chat__bubble{background:var(--bc-bubble);border:1px solid var(--bc-line);border-radius:var(--bc-r-md);padding:10px 13px}.pw-brain-chat__source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;padding:3px 9px;border:1px solid var(--bc-line);border-radius:var(--bc-r-sm);color:var(--bc-ink-3);font-size:11px;line-height:1.4}.pw-brain-chat__source-icon{flex-shrink:0;font-size:11px}.pw-brain-chat__source-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__turn--user{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.pw-brain-chat__time{font-size:10.5px;font-weight:400;letter-spacing:.02em;color:var(--bc-ink-3);white-space:nowrap}.pw-brain-chat__user-bubble{max-width:82%;background:var(--bc-accent);color:#fff;border-radius:var(--bc-r-md);border-top-right-radius:var(--bc-r-sm);padding:10px 13px;font-size:15px;line-height:1.5}\n", ".pw-brain-chat__welcome{flex:1 1 auto;overflow-y:auto;padding:22px 0 10px;display:flex;flex-direction:column;gap:16px}.pw-brain-chat__hero{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:22px;color:#fff;background:var(--bc-accent);box-shadow:inset 0 1px #ffffff40}.pw-brain-chat__greet-h{font-size:20px;font-weight:600;letter-spacing:-.02em;margin:12px 0 4px;color:var(--bc-title)}.pw-brain-chat__greet-sub{font-size:14px;color:var(--bc-ink-2);margin:0}.pw-brain-chat__suggest-lab{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--bc-ink-3);font-weight:600;margin:6px 0 -4px 2px}.pw-brain-chat__prompts{display:flex;flex-direction:column;gap:9px}.pw-brain-chat__prompt{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:12px;border-radius:var(--bc-r-md);cursor:pointer;background:var(--bc-panel);border:1px solid var(--bc-line);color:var(--bc-ink);font:inherit;font-size:14px;font-weight:500;transition:border-color .15s var(--bc-ease),background .15s var(--bc-ease)}.pw-brain-chat__prompt:hover{border-color:var(--bc-line-strong);background:var(--bc-surface)}.pw-brain-chat__prompt:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__pic{width:28px;height:28px;border-radius:7px;flex:none;display:grid;place-items:center;background:var(--bc-surface-2);border:1px solid var(--bc-line);color:var(--bc-ink-2)}.pw-brain-chat__pic i{font-size:14px}.pw-brain-chat__prompt-text{flex:1;min-width:0}.pw-brain-chat__arw{margin-left:auto;color:var(--bc-ink-3);font-size:13px}.pw-brain-chat__prompt:hover .pw-brain-chat__arw{color:var(--bc-accent)}.pw-brain-chat__quick{display:flex;gap:7px;margin-bottom:9px;overflow-x:auto;scrollbar-width:none}.pw-brain-chat__quick::-webkit-scrollbar{display:none}.pw-brain-chat__chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;font:inherit;font-size:12px;font-weight:500;cursor:pointer;padding:6px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);color:var(--bc-ink-2);transition:border-color .15s var(--bc-ease),color .15s var(--bc-ease)}.pw-brain-chat__chip:hover{color:var(--bc-ink);border-color:var(--bc-line-strong)}.pw-brain-chat__chip:focus-visible{outline:2px solid var(--bc-accent);outline-offset:2px}.pw-brain-chat__chip i{font-size:11px;color:var(--bc-ink-3)}.pw-brain-chat__memory{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;padding:7px 11px;border-radius:9999px;background:var(--bc-surface);border:1px solid var(--bc-line);font-size:12px;color:var(--bc-ink-2)}.pw-brain-chat__memory i{color:var(--bc-success);font-size:12px}.pw-brain-chat__memory .lbl{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:600;color:var(--bc-ink-3)}\n", ".pw-brain-chat__text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.55;color:var(--bc-ink)}.pw-brain-chat__text p{margin:0}.pw-brain-chat__text p+p,.pw-brain-chat__text ul,.pw-brain-chat__text ol{margin-top:7px}.pw-brain-chat__text ul,.pw-brain-chat__text ol{padding-left:18px}.pw-brain-chat__text a{color:var(--bc-ink);text-decoration:underline;text-underline-offset:2px;text-decoration-color:var(--bc-line-strong)}.pw-brain-chat__text a:hover,.pw-brain-chat__text a:focus-visible{color:var(--bc-accent);text-decoration-color:var(--bc-accent)}.pw-brain-chat__text table{width:100%;margin-top:8px;border-collapse:collapse;font-size:13px;border:1px solid var(--bc-line);border-radius:var(--bc-r-md);overflow:hidden}.pw-brain-chat__text th,.pw-brain-chat__text td{text-align:left;padding:8px 12px;border-bottom:1px solid var(--bc-line)}.pw-brain-chat__text th{background:var(--bc-surface);font-weight:600;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--bc-ink-2)}.pw-brain-chat__text tr:last-child td{border-bottom:0}.pw-brain-chat__user-text{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:inherit;font-size:15px;line-height:1.5}.pw-brain-chat__caret{display:inline-block;width:2px;height:1.05em;vertical-align:-2px;margin-left:2px;background:var(--bc-accent);border-radius:1px;animation:pw-brain-chat-caret 1s steps(2,start) infinite}@keyframes pw-brain-chat-caret{50%{opacity:0}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__caret{animation:none}}\n", ".pw-brain-chat__loading{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:4px 2px 0;font-size:12px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__loading-spinner{color:var(--bc-accent, #1769e1)}.pw-brain-chat__iconbtn{width:32px;height:32px;flex:none;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid transparent;border-radius:var(--bc-r-md, 8px);background:transparent;color:var(--bc-ink-3, #7c8696);cursor:pointer;transition:background .15s ease,color .15s ease}.pw-brain-chat__iconbtn:hover:not(:disabled){background:var(--bc-surface, #f7f8fa);color:var(--bc-ink, #1a1d21)}.pw-brain-chat__iconbtn:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__iconbtn:disabled{opacity:.5;cursor:default}.pw-brain-chat__mic--recording{color:var(--bc-error, #c0392b)}.pw-brain-chat__stop:hover:not(:disabled){color:var(--bc-error, #c0392b)}.pw-brain-chat__compose{flex-shrink:0;border-top:1px solid var(--bc-line, #e2e5ea);padding:10px 2px 4px}.pw-brain-chat__field{display:flex;align-items:flex-end;gap:8px;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-panel, #fff);padding:6px 6px 6px 12px;transition:border-color .15s ease,box-shadow .15s ease}.pw-brain-chat__field:focus-within{border-color:var(--bc-accent, #1769e1);box-shadow:0 0 0 3px var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__input{flex:1;border:0;resize:none;background:transparent;font-family:inherit;font-size:14px;line-height:1.5;color:var(--bc-ink, #1a1d21);padding:6px 0;max-height:96px}.pw-brain-chat__input:focus{outline:none;box-shadow:none}.pw-brain-chat__input::placeholder{color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__tools{display:flex;align-items:center;gap:2px;flex:none}.pw-brain-chat__send{width:34px;height:34px;flex:none;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:var(--bc-r-md, 8px);background:var(--bc-accent, #1769e1);color:#fff;cursor:pointer;transition:filter .15s ease}.pw-brain-chat__send:hover:not(:disabled){filter:brightness(1.07)}.pw-brain-chat__send:disabled{background:var(--bc-line-strong, #cfd4dc);cursor:default}.pw-brain-chat__send:focus-visible{outline:2px solid var(--bc-accent, #1769e1);outline-offset:2px}.pw-brain-chat__send--stop{background:var(--bc-error, #c0392b)!important}.pw-brain-chat__disclaimer{display:flex;align-items:center;gap:6px;margin:8px 2px 2px;font-size:11px;color:var(--bc-ink-3, #7c8696)}\n", ".pw-brain-chat__dropzone{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:16px;background:color-mix(in srgb,var(--bc-panel, #fff) 82%,transparent);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:pw-brain-chat-dropzone-in .16s ease-out}.pw-brain-chat__dropzone-frame{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;height:100%;padding:24px 16px;text-align:center;border:2px dashed var(--bc-accent, #1769e1);border-radius:var(--bc-r-lg, 12px);background:var(--bc-accent-wash, rgba(23, 105, 225, .1))}.pw-brain-chat__dropzone-icon{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:2px;font-size:19px;line-height:1;border-radius:50%;color:var(--bc-accent, #1769e1);background:var(--bc-panel, #fff);border:1px solid color-mix(in srgb,var(--bc-accent, #1769e1) 28%,transparent);box-shadow:0 1px 3px #0000000f}.pw-brain-chat__dropzone-title{font-size:15px;font-weight:600;letter-spacing:-.1px;color:var(--bc-ink, #1a1d21)}.pw-brain-chat__dropzone-hint{font-size:12px;color:var(--bc-ink-3, #7c8696)}@keyframes pw-brain-chat-dropzone-in{0%{opacity:0;transform:scale(.99)}to{opacity:1;transform:none}}.pw-brain-chat__attachment{position:relative;display:flex;align-items:center;gap:10px;margin:0 2px 8px;padding:8px 10px;overflow:hidden;border:1px solid var(--bc-line, #e2e5ea);border-radius:var(--bc-r-md, 8px);background:var(--bc-surface, #f7f8fa)}.pw-brain-chat__attachment--error{border-color:var(--bc-error, #c0392b);background:color-mix(in srgb,var(--bc-error, #c0392b) 6%,transparent)}.pw-brain-chat__attachment-icon{width:28px;height:28px;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:13px;border-radius:var(--bc-r-sm, 6px);background:var(--bc-panel, #fff);border:1px solid var(--bc-line, #e2e5ea);color:var(--bc-accent, #1769e1)}.pw-brain-chat__attachment--error .pw-brain-chat__attachment-icon{color:var(--bc-error, #c0392b)}.pw-brain-chat__attachment-body{flex:1;min-width:0}.pw-brain-chat__attachment-name{display:block;font-size:13px;font-weight:600;color:var(--bc-ink, #1a1d21);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-brain-chat__attachment-meta{display:block;margin-top:1px;font-size:11px;color:var(--bc-ink-3, #7c8696)}.pw-brain-chat__attachment--error .pw-brain-chat__attachment-meta{color:var(--bc-error, #c0392b)}.pw-brain-chat__attachment-progress{position:absolute;left:0;bottom:0;height:2px;width:var(--pw-upload-progress, 0%);background:var(--bc-accent, #1769e1);transition:width .18s ease-out}@media(prefers-reduced-motion:reduce){.pw-brain-chat__dropzone{animation:none}.pw-brain-chat__attachment-progress{transition:none}}.pw-brain-chat__choice{display:flex;flex-direction:column;gap:6px;margin:-2px 2px 9px}.pw-brain-chat__choice-prompt{font-size:12px;color:var(--bc-ink-2, #5b6472)}.pw-brain-chat__choice-options{display:flex;flex-wrap:wrap;gap:7px}\n", ".pw-brain-chat__mic{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bs-border-color, #ced4da);background:transparent;color:var(--bs-secondary-color, #6c757d);transition:color .15s ease,border-color .15s ease}.pw-brain-chat__mic:hover:not(:disabled){color:var(--first, #0d6efd);border-color:var(--first, #0d6efd)}.pw-brain-chat__mic--recording{color:#dc3545;border-color:#dc3545;animation:pw-brain-chat-mic-pulse 1.2s ease-in-out infinite}@keyframes pw-brain-chat-mic-pulse{0%,to{opacity:1}50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.pw-brain-chat__mic--recording{animation:none}}\n"] }]
|
|
2023
2563
|
}], ctorParameters: () => [{ type: i1.MCPOrchestratorService }, { type: i1.LocalStorage }, { type: i2.Router }, { type: i0.ChangeDetectorRef }, { type: i3.Store }, { type: DynamicPageContextService }, { type: i2$1.AppConfigService, decorators: [{
|
|
2024
2564
|
type: Optional
|
|
2025
2565
|
}] }, { type: i1.BrainSocketService, decorators: [{
|
|
@@ -2028,6 +2568,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
2028
2568
|
type: Optional
|
|
2029
2569
|
}] }, { type: i1.VoiceChatService, decorators: [{
|
|
2030
2570
|
type: Optional
|
|
2571
|
+
}] }, { type: i1.DirectUploadService, decorators: [{
|
|
2572
|
+
type: Optional
|
|
2573
|
+
}] }, { type: undefined, decorators: [{
|
|
2574
|
+
type: Optional
|
|
2575
|
+
}, {
|
|
2576
|
+
type: Inject,
|
|
2577
|
+
args: [BRAIN_CHAT_UPLOAD_APIS]
|
|
2031
2578
|
}] }], propDecorators: { threadRef: [{
|
|
2032
2579
|
type: ViewChild,
|
|
2033
2580
|
args: ['thread']
|
|
@@ -2396,7 +2943,7 @@ class CollapsibleSidebarComponent {
|
|
|
2396
2943
|
.subscribe(config => this.registerBrainPanel(resolveBrandName(config)));
|
|
2397
2944
|
// Subscribe to expanded state
|
|
2398
2945
|
this.sidebarService.sidebarExpanded$
|
|
2399
|
-
.pipe(takeUntil(this.destroy$))
|
|
2946
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
2400
2947
|
.subscribe(isExpanded => {
|
|
2401
2948
|
this.isExpanded = isExpanded;
|
|
2402
2949
|
this.cdr.markForCheck();
|
|
@@ -2409,7 +2956,7 @@ class CollapsibleSidebarComponent {
|
|
|
2409
2956
|
// container not found". #4167 (open-on-navigate-back) keeps the slot
|
|
2410
2957
|
// populated, so subscribe AFTER the view init so the first emission lands
|
|
2411
2958
|
// with `contentContainer` wired up.
|
|
2412
|
-
this.sidebarService.sidebarContent$.pipe(takeUntil(this.destroy$)).subscribe(content => {
|
|
2959
|
+
this.sidebarService.sidebarContent$.pipe(takeUntil$1(this.destroy$)).subscribe(content => {
|
|
2413
2960
|
this.currentContent = content;
|
|
2414
2961
|
if (content) {
|
|
2415
2962
|
this.loadComponent(content);
|
|
@@ -3143,12 +3690,12 @@ class CommandPaletteComponent {
|
|
|
3143
3690
|
}
|
|
3144
3691
|
ngOnInit() {
|
|
3145
3692
|
brandName$(this.appConfigService)
|
|
3146
|
-
.pipe(takeUntil(this.destroy$))
|
|
3693
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
3147
3694
|
.subscribe(name => {
|
|
3148
3695
|
this.brandName = name;
|
|
3149
3696
|
this.cdr.markForCheck();
|
|
3150
3697
|
});
|
|
3151
|
-
this.palette.isOpen$.pipe(takeUntil(this.destroy$)).subscribe(isOpen => {
|
|
3698
|
+
this.palette.isOpen$.pipe(takeUntil$1(this.destroy$)).subscribe(isOpen => {
|
|
3152
3699
|
this.isOpen = isOpen;
|
|
3153
3700
|
if (isOpen) {
|
|
3154
3701
|
this.reset();
|
|
@@ -3157,7 +3704,7 @@ class CommandPaletteComponent {
|
|
|
3157
3704
|
syncPaletteDialog(this.paletteDialog?.nativeElement, isOpen);
|
|
3158
3705
|
});
|
|
3159
3706
|
peopleSearch(this.queryChanges, this.dashboard)
|
|
3160
|
-
.pipe(takeUntil(this.destroy$))
|
|
3707
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
3161
3708
|
.subscribe(people => {
|
|
3162
3709
|
this.people = people;
|
|
3163
3710
|
this.rebuild();
|
|
@@ -5074,6 +5621,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
5074
5621
|
type: Output
|
|
5075
5622
|
}] } });
|
|
5076
5623
|
|
|
5624
|
+
/**
|
|
5625
|
+
* Green presence indicator shown beside a member's name.
|
|
5626
|
+
*
|
|
5627
|
+
* Feed it `current_sign_in_at` and nothing else. Do NOT pass `last_sign_in_at`, nor the
|
|
5628
|
+
* `current_sign_in_at || last_sign_in_at` fallback the surrounding cells use for the date:
|
|
5629
|
+
* an explicit logout nulls `current_sign_in_at` and rolls its value into `last_sign_in_at`,
|
|
5630
|
+
* so the fallback would light the dot for someone who has just signed out.
|
|
5631
|
+
*
|
|
5632
|
+
* The online window itself lives in the `isOnline` pipe, which is paired with main-api's
|
|
5633
|
+
* activity-refresh interval -- see ONLINE_THRESHOLD_MINUTES.
|
|
5634
|
+
*/
|
|
5635
|
+
class OnlineIndicatorComponent {
|
|
5636
|
+
constructor() {
|
|
5637
|
+
/** The member's `current_sign_in_at` stamp. Never `last_sign_in_at`. */
|
|
5638
|
+
this.lastSeen = null;
|
|
5639
|
+
}
|
|
5640
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: OnlineIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5641
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: OnlineIndicatorComponent, isStandalone: false, selector: "pw-online-indicator", inputs: { lastSeen: "lastSeen" }, ngImport: i0, template: "@if (lastSeen | isOnline) {\n <span\n class=\"online-indicator\"\n [pTooltip]=\"'Label.OnlineNow' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n >{{ 'Label.Now' | transloco\n }}<span class=\"online-indicator__beacon text-success-muted\" aria-hidden=\"true\"></span\n ></span>\n}\n", styles: [".online-indicator{display:inline-flex;align-items:center;line-height:1;white-space:nowrap}.online-indicator__beacon{position:relative;display:inline-block;margin-left:.4rem;width:7px;height:7px;border-radius:50%;background-color:currentColor}.online-indicator__beacon:after{content:\"\";position:absolute;inset:0;border-radius:50%;background-color:currentColor;animation:pw-online-ping 2.2s ease-in-out infinite}@keyframes pw-online-ping{0%,to{transform:scale(1.45);opacity:.5}50%{transform:scale(2.4);opacity:.14}}@media(prefers-reduced-motion:reduce){.online-indicator__beacon:after{animation:none;transform:scale(1.45);opacity:.5}}\n"], dependencies: [{ kind: "directive", type: i3$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "pipe", type: i5$1.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i3$2.IsOnlinePipe, name: "isOnline" }] }); }
|
|
5642
|
+
}
|
|
5643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: OnlineIndicatorComponent, decorators: [{
|
|
5644
|
+
type: Component,
|
|
5645
|
+
args: [{ selector: 'pw-online-indicator', standalone: false, template: "@if (lastSeen | isOnline) {\n <span\n class=\"online-indicator\"\n [pTooltip]=\"'Label.OnlineNow' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n >{{ 'Label.Now' | transloco\n }}<span class=\"online-indicator__beacon text-success-muted\" aria-hidden=\"true\"></span\n ></span>\n}\n", styles: [".online-indicator{display:inline-flex;align-items:center;line-height:1;white-space:nowrap}.online-indicator__beacon{position:relative;display:inline-block;margin-left:.4rem;width:7px;height:7px;border-radius:50%;background-color:currentColor}.online-indicator__beacon:after{content:\"\";position:absolute;inset:0;border-radius:50%;background-color:currentColor;animation:pw-online-ping 2.2s ease-in-out infinite}@keyframes pw-online-ping{0%,to{transform:scale(1.45);opacity:.5}50%{transform:scale(2.4);opacity:.14}}@media(prefers-reduced-motion:reduce){.online-indicator__beacon:after{animation:none;transform:scale(1.45);opacity:.5}}\n"] }]
|
|
5646
|
+
}], propDecorators: { lastSeen: [{
|
|
5647
|
+
type: Input
|
|
5648
|
+
}] } });
|
|
5649
|
+
|
|
5077
5650
|
class PasswordValidationComponent extends AppBaseComponent {
|
|
5078
5651
|
constructor(injector, modal, cdr) {
|
|
5079
5652
|
super(injector);
|
|
@@ -5378,7 +5951,7 @@ class PrivacyAndTosComponent extends AppBaseComponent {
|
|
|
5378
5951
|
});
|
|
5379
5952
|
}
|
|
5380
5953
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: PrivacyAndTosComponent, deps: [{ token: i1$1.AdminService }, { token: i0.Injector }, { token: DOCUMENT$1 }, { token: i2$3.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5381
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: PrivacyAndTosComponent, isStandalone: false, selector: "pw-privacy-and-tos", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "@if (isPublic) {\n <pw-header [landing]=\"false\"></pw-header>\n}\n\n<div class=\"legal-page\" [class.legal-page--public]=\"isPublic\">\n\n <section class=\"legal-hero\">\n <div class=\"legal-hero__container\">\n @if (!isPublic) {\n <a class=\"legal-hero__back\" (click)=\"back()\" (keydown.enter)=\"back()\" role=\"button\" tabindex=\"0\" aria-label=\"Back\">\n <i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i>\n <span>Back</span>\n </a>\n }\n <span class=\"legal-hero__eyebrow\">Legal</span>\n <h1 class=\"legal-hero__title\">Privacy & terms</h1>\n <p class=\"legal-hero__subtitle\">\n @if (companyName) {\n Read how {{ companyName }} handles your data and what governs your use of the product.\n } @else {\n Read how we handle your data and what governs your use of the product.\n }\n </p>\n <div class=\"legal-hero__meta\">\n @if (data?.tos_updated_at) {\n <span class=\"legal-hero__pill\">\n <i class=\"fa fa-clock\" aria-hidden=\"true\"></i>\n Last updated {{ data.tos_updated_at | date: 'MMM d, y' }}\n </span>\n }\n @if (!isPublic && canEditPolicy) {\n <a class=\"legal-hero__edit\"\n [routerLink]=\"[routers.tosAndPrivacyDetails + privacyServiceId]\"\n [attr.aria-label]=\"'Button.Edit' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n <span>{{ 'Button.Edit' | transloco }}</span>\n </a>\n }\n </div>\n </div>\n </section>\n\n <div class=\"legal-tabs-band\">\n <div class=\"legal-tabs-band__container\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabId\" class=\"legal-tabs\">\n <li [ngbNavItem]=\"'privacy-policy'\" class=\"legal-tabs__item\">\n <a ngbNavLink class=\"legal-tabs__link\">Privacy policy</a>\n <ng-template ngbNavContent>\n <article class=\"legal-page__card\">\n @if (data?.privacy) {\n <div class=\"ql-container ql-snow legal-page__body\">\n <div class=\"ql-editor\" [innerHTML]=\"data?.privacy\"></div>\n </div>\n } @else {\n <div class=\"legal-page__empty\">\n <i class=\"fa fa-file-lines\" aria-hidden=\"true\"></i>\n <h2>Privacy policy isn't published yet</h2>\n <p>The policy for this product hasn't been written. Check back later.</p>\n </div>\n }\n </article>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'terms-of-service'\" class=\"legal-tabs__item\">\n <a ngbNavLink class=\"legal-tabs__link\">Terms of service</a>\n <ng-template ngbNavContent>\n <article class=\"legal-page__card\">\n @if (data?.tos) {\n <div class=\"ql-container ql-snow legal-page__body\">\n <div class=\"ql-editor\" [innerHTML]=\"data?.tos\"></div>\n </div>\n } @else {\n <div class=\"legal-page__empty\">\n <i class=\"fa fa-file-lines\" aria-hidden=\"true\"></i>\n <h2>Terms of service aren't published yet</h2>\n <p>The terms for this product haven't been written. Check back later.</p>\n </div>\n }\n </article>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"legal-body\" [class.legal-body--no-toc]=\"\n (tabId === 'privacy-policy' && !tocPrivacy.length) ||\n (tabId === 'terms-of-service' && !tocTos.length)\n \">\n <div class=\"legal-body__container\">\n\n @if ((tabId === 'privacy-policy' && tocPrivacy.length) || (tabId === 'terms-of-service' && tocTos.length)) {\n <aside class=\"legal-sidebar\" aria-label=\"On this page\">\n <p class=\"legal-sidebar__label\">On this page</p>\n <nav class=\"legal-sidebar__nav\">\n @if (tabId === 'privacy-policy') {\n @for (item of tocPrivacy; track item.id) {\n <a class=\"legal-sidebar__link\" [href]=\"'#' + item.id\">{{ item.text }}</a>\n }\n } @else {\n @for (item of tocTos; track item.id) {\n <a class=\"legal-sidebar__link\" [href]=\"'#' + item.id\">{{ item.text }}</a>\n }\n }\n </nav>\n </aside>\n }\n\n <main class=\"legal-main\">\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n @if (isLoaded) {\n <div [ngbNavOutlet]=\"nav\"></div>\n }\n\n @if (isLoaded && companyEmail) {\n <section class=\"legal-contact\">\n <span class=\"legal-contact__label\">Questions?</span>\n <h2 class=\"legal-contact__title\">Talk to us about your data.</h2>\n <p class=\"legal-contact__body\">\n If anything here is unclear, or you want to exercise a right under these\n policies, reach out and we'll get back to you.\n </p>\n <a class=\"legal-contact__cta\" [href]=\"'mailto:' + companyEmail\">\n <i class=\"fa fa-envelope\" aria-hidden=\"true\"></i>\n <span>{{ companyEmail }}</span>\n </a>\n </section>\n }\n </main>\n\n </div>\n </div>\n\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.legal-page{background:#f7f8fa;min-height:100vh}.legal-page--public{padding-top:64px}.legal-hero{padding:56px 0 32px}.legal-hero__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px)}.legal-hero__back{display:inline-flex;align-items:center;gap:8px;margin:0 0 24px;padding:6px 14px 6px 10px;font:600 13px/1 Roboto,sans-serif;color:#5a6473;text-decoration:none;cursor:pointer;border:1px solid #e2e5ea;border-radius:9999px;background:#fff;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-hero__back:hover{color:#1a1d21;border-color:#cfd4dc}.legal-hero__back .fa{font-size:11px;color:#7c8696}.legal-hero__eyebrow{display:inline-block;font:600 12px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:var(--first);margin-bottom:16px}h1.legal-hero__title{font:700 clamp(36px,4.4vw,52px)/1.1 \"Roboto\",sans-serif;color:#1a1d21!important;margin:0 0 16px;letter-spacing:-.02em}.legal-hero__subtitle{font:400 clamp(16px,1.4vw,19px)/1.5 \"Roboto\",sans-serif;color:#5a6473;margin:0;text-wrap:pretty}.legal-hero__meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:24px}.legal-hero__pill{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;background:#fff;border:1px solid #e2e5ea;border-radius:9999px;font:500 12px/1 Roboto,sans-serif;color:#5a6473}.legal-hero__pill .fa{font-size:11px;color:#7c8696}.legal-hero__edit{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;font:600 12px/1 Roboto,sans-serif;color:var(--first);text-decoration:none;border:1px solid #cfd4dc;border-radius:9999px;background:#fff;transition:border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-hero__edit:hover{border-color:var(--first)}.legal-tabs-band{border-bottom:1px solid #e2e5ea;background:#f7f8fa}.legal-tabs-band__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px)}.legal-tabs{display:inline-flex;gap:0;padding:0;margin:0;list-style:none;border-bottom:0}.legal-tabs__item{margin:0;padding:0}.legal-tabs__link{display:inline-flex;align-items:center;padding:14px 4px;margin-right:28px;font:600 14px/1 Roboto,sans-serif;color:#5a6473;text-decoration:none;cursor:pointer;border-bottom:2px solid transparent;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-tabs__link:hover{color:#1a1d21}.legal-tabs__link.active,.legal-tabs__item.active .legal-tabs__link{color:#1a1d21;border-bottom-color:var(--first)}.legal-body{padding:48px 0 96px}.legal-body__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px);display:grid;grid-template-columns:240px minmax(0,1fr);gap:64px;align-items:start}.legal-body--no-toc .legal-body__container{grid-template-columns:minmax(0,1fr)}.legal-sidebar{position:sticky;top:88px}.legal-sidebar__label{font:600 11px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:#7c8696;margin:0 0 14px}.legal-sidebar__nav{display:flex;flex-direction:column;border-left:1px solid #e2e5ea}.legal-sidebar__link{display:block;padding:7px 14px;margin-left:-1px;border-left:2px solid transparent;font:500 13px/1.45 Roboto,sans-serif;color:#5a6473;text-decoration:none;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-sidebar__link:hover{color:#1a1d21}.legal-sidebar__link:target,.legal-sidebar__link.is-active{color:var(--first);border-left-color:var(--first)}.legal-main{min-width:0}.legal-page__card{display:block;background:#fff;border:1px solid #e2e5ea;border-radius:14px;padding:48px;box-shadow:0 1px 2px #0f172a08}.legal-page__body{max-width:70ch}.legal-page__empty{text-align:center;padding:56px 16px;color:#5a6473}.legal-page__empty .fa{font-size:40px;color:#cfd4dc;margin-bottom:20px}.legal-page__empty h2{font:600 20px/1.3 Roboto,sans-serif;color:#1a1d21!important;margin:0 0 8px}.legal-page__empty p{font:400 15px/1.6 Roboto,sans-serif;color:#5a6473;margin:0}.legal-contact{margin-top:32px;padding:36px;background:#fff;border:1px solid #e2e5ea;border-radius:14px;box-shadow:0 1px 2px #0f172a08}.legal-contact__label{display:inline-block;font:600 11px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:#7c8696;margin-bottom:10px}h2.legal-contact__title{font:600 22px/1.3 Roboto,sans-serif;color:#1a1d21!important;margin:0 0 10px;letter-spacing:-.005em}.legal-contact__body{font:400 15px/1.65 Roboto,sans-serif;color:#5a6473;margin:0 0 20px;max-width:56ch;text-wrap:pretty}.legal-contact__cta{display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 22px;font:600 14px/1 Roboto,sans-serif;color:#fff!important;text-decoration:none;background:var(--first);border:1px solid var(--first);border-radius:10px;transition:background-color .15s cubic-bezier(.2,.7,.2,1),transform .15s cubic-bezier(.2,.7,.2,1),box-shadow .15s cubic-bezier(.2,.7,.2,1)}.legal-contact__cta:hover{background:color-mix(in srgb,var(--first) 88%,#000 12%);transform:translateY(-1px);box-shadow:0 10px 24px -12px var(--first)}::ng-deep .legal-page__body.ql-container,::ng-deep .legal-page__body .ql-container{max-width:none!important;margin:0;border:0!important;font-family:Roboto,sans-serif;resize:none!important}::ng-deep .legal-page__body .ql-editor{padding:0;max-width:70ch;font:400 16px/1.75 Roboto,sans-serif;color:#5a6473}::ng-deep .legal-page__body .ql-editor h1{font:700 28px/1.25 Roboto,sans-serif;color:#1a1d21;margin:0 0 16px;letter-spacing:-.01em}::ng-deep .legal-page__body .ql-editor h2{font:600 24px/1.3 Roboto,sans-serif;color:#1a1d21;margin:40px 0 12px;letter-spacing:-.005em;scroll-margin-top:88px}::ng-deep .legal-page__body .ql-editor h3{font:600 18px/1.4 Roboto,sans-serif;color:#1a1d21;margin:28px 0 8px}::ng-deep .legal-page__body .ql-editor h4,::ng-deep .legal-page__body .ql-editor h5,::ng-deep .legal-page__body .ql-editor h6{font:600 16px/1.4 Roboto,sans-serif;color:#1a1d21;margin:24px 0 6px}::ng-deep .legal-page__body .ql-editor p{font:400 16px/1.75 Roboto,sans-serif;color:#5a6473;margin:0 0 14px;text-wrap:pretty}::ng-deep .legal-page__body .ql-editor p strong,::ng-deep .legal-page__body .ql-editor strong{font-weight:600;color:#1a1d21}::ng-deep .legal-page__body .ql-editor a{color:var(--first);text-decoration:none;font-weight:500}::ng-deep .legal-page__body .ql-editor a:hover{text-decoration:underline}::ng-deep .legal-page__body .ql-editor ol,::ng-deep .legal-page__body .ql-editor ul{padding-left:24px;margin:8px 0 16px}::ng-deep .legal-page__body .ql-editor ol li,::ng-deep .legal-page__body .ql-editor ul li{font:400 16px/1.75 Roboto,sans-serif;color:#5a6473;margin:6px 0;padding:0}::ng-deep .legal-page__body .ql-editor ol li::marker,::ng-deep .legal-page__body .ql-editor ul li::marker{color:#7c8696;font-weight:500}::ng-deep .legal-page__body .ql-editor blockquote{border-left:3px solid #e2e5ea;padding:4px 0 4px 18px;margin:20px 0;color:#5a6473;font-style:italic}::ng-deep .legal-page__body .ql-editor hr{border:0;border-top:1px solid #e2e5ea;margin:40px 0}@media(max-width:991px){.legal-hero{padding:40px 0 24px}.legal-body{padding:32px 0 64px}.legal-body__container{grid-template-columns:1fr;gap:32px}.legal-sidebar{position:static}.legal-sidebar__nav{display:none}.legal-page__card{padding:32px}.legal-contact{padding:28px}}@media(max-width:575px){.legal-hero{padding:32px 0 20px}h1.legal-hero__title{font-size:30px}.legal-page__card,.legal-contact{padding:22px;border-radius:12px}.legal-contact__title{font-size:19px}.legal-tabs__link{padding:12px 4px;margin-right:20px;font-size:13px}}@media print{.legal-page{background:#fff}.legal-sidebar,.legal-tabs-band,.legal-hero__back,.legal-hero__edit,.legal-contact__cta{display:none!important}.legal-page__card{border:0;padding:0;box-shadow:none}.legal-body__container{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "component", type: i3$2.AppLoaderComponent, selector: "pw-loader", inputs: ["isVisible", "closeOnOutsideClick", "autoCloseTimeOut"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i5.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i5.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i5.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i5.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i5.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i5.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: HeaderComponent, selector: "pw-header", inputs: ["landing"] }, { kind: "pipe", type: i5$1.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i8.DatePipe, name: "date" }] }); }
|
|
5954
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: PrivacyAndTosComponent, isStandalone: false, selector: "pw-privacy-and-tos", inputs: { productId: "productId" }, usesInheritance: true, ngImport: i0, template: "@if (isPublic) {\n <pw-header [landing]=\"false\"></pw-header>\n}\n\n<div class=\"legal-page\" [class.legal-page--public]=\"isPublic\">\n\n <section class=\"legal-hero\">\n <div class=\"legal-hero__container\">\n @if (!isPublic) {\n <a class=\"legal-hero__back\" (click)=\"back()\" (keydown.enter)=\"back()\" role=\"button\" tabindex=\"0\" aria-label=\"Back\">\n <i class=\"fa fa-chevron-left\" aria-hidden=\"true\"></i>\n <span>Back</span>\n </a>\n }\n <span class=\"legal-hero__eyebrow\">Legal</span>\n <h1 class=\"legal-hero__title\">Privacy & terms</h1>\n <p class=\"legal-hero__subtitle\">\n @if (companyName) {\n Read how {{ companyName }} handles your data and what governs your use of the product.\n } @else {\n Read how we handle your data and what governs your use of the product.\n }\n </p>\n <div class=\"legal-hero__meta\">\n @if (data?.tos_updated_at) {\n <span class=\"legal-hero__pill\">\n <i class=\"fa fa-clock\" aria-hidden=\"true\"></i>\n Last updated {{ data.tos_updated_at | date: 'MMM d, y' }}\n </span>\n }\n @if (!isPublic && canEditPolicy) {\n <a class=\"legal-hero__edit\"\n [routerLink]=\"[routers.tosAndPrivacyDetails + privacyServiceId]\"\n [attr.aria-label]=\"'Button.Edit' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n <span>{{ 'Button.Edit' | transloco }}</span>\n </a>\n }\n </div>\n </div>\n </section>\n\n <div class=\"legal-tabs-band\">\n <div class=\"legal-tabs-band__container\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabId\" class=\"legal-tabs\">\n <li [ngbNavItem]=\"'privacy-policy'\" class=\"legal-tabs__item\">\n <a ngbNavLink class=\"legal-tabs__link\">Privacy policy</a>\n <ng-template ngbNavContent>\n <article class=\"legal-page__card\">\n @if (data?.privacy) {\n <div class=\"ql-container ql-snow legal-page__body\">\n <div class=\"ql-editor\" [innerHTML]=\"data?.privacy\"></div>\n </div>\n } @else {\n <div class=\"legal-page__empty\">\n <i class=\"fa fa-file-lines\" aria-hidden=\"true\"></i>\n <h2>Privacy policy isn't published yet</h2>\n <p>The policy for this product hasn't been written. Check back later.</p>\n </div>\n }\n </article>\n </ng-template>\n </li>\n <li [ngbNavItem]=\"'terms-of-service'\" class=\"legal-tabs__item\">\n <a ngbNavLink class=\"legal-tabs__link\">Terms of service</a>\n <ng-template ngbNavContent>\n <article class=\"legal-page__card\">\n @if (data?.tos) {\n <div class=\"ql-container ql-snow legal-page__body\">\n <div class=\"ql-editor\" [innerHTML]=\"data?.tos\"></div>\n </div>\n } @else {\n <div class=\"legal-page__empty\">\n <i class=\"fa fa-file-lines\" aria-hidden=\"true\"></i>\n <h2>Terms of service aren't published yet</h2>\n <p>The terms for this product haven't been written. Check back later.</p>\n </div>\n }\n </article>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"legal-body\" [class.legal-body--no-toc]=\"\n (tabId === 'privacy-policy' && !tocPrivacy.length) ||\n (tabId === 'terms-of-service' && !tocTos.length)\n \">\n <div class=\"legal-body__container\">\n\n @if ((tabId === 'privacy-policy' && tocPrivacy.length) || (tabId === 'terms-of-service' && tocTos.length)) {\n <aside class=\"legal-sidebar\" aria-label=\"On this page\">\n <p class=\"legal-sidebar__label\">On this page</p>\n <nav class=\"legal-sidebar__nav\">\n @if (tabId === 'privacy-policy') {\n @for (item of tocPrivacy; track item.id) {\n <a class=\"legal-sidebar__link\" [href]=\"'#' + item.id\">{{ item.text }}</a>\n }\n } @else {\n @for (item of tocTos; track item.id) {\n <a class=\"legal-sidebar__link\" [href]=\"'#' + item.id\">{{ item.text }}</a>\n }\n }\n </nav>\n </aside>\n }\n\n <main class=\"legal-main\">\n <pw-loader [isVisible]=\"!isLoaded\"></pw-loader>\n @if (isLoaded) {\n <div [ngbNavOutlet]=\"nav\"></div>\n }\n\n @if (isLoaded && companyEmail) {\n <section class=\"legal-contact\">\n <span class=\"legal-contact__label\">Questions?</span>\n <h2 class=\"legal-contact__title\">Talk to us about your data.</h2>\n <p class=\"legal-contact__body\">\n If anything here is unclear, or you want to exercise a right under these\n policies, reach out and we'll get back to you.\n </p>\n <a class=\"legal-contact__cta\" [href]=\"'mailto:' + companyEmail\">\n <i class=\"fa fa-envelope\" aria-hidden=\"true\"></i>\n <span>{{ companyEmail }}</span>\n </a>\n </section>\n }\n </main>\n\n </div>\n </div>\n\n</div>\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.legal-page{background:#f7f8fa;min-height:100vh}.legal-page--public{padding-top:64px}.legal-hero{padding:56px 0 32px}.legal-hero__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px)}.legal-hero__back{display:inline-flex;align-items:center;gap:8px;margin:0 0 24px;padding:6px 14px 6px 10px;font:600 13px/1 Roboto,sans-serif;color:#5a6473;text-decoration:none;cursor:pointer;border:1px solid #e2e5ea;border-radius:9999px;background:#fff;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-hero__back:hover{color:#1a1d21;border-color:#cfd4dc}.legal-hero__back .fa{font-size:11px;color:#7c8696}.legal-hero__eyebrow{display:inline-block;font:600 12px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:var(--first);margin-bottom:16px}h1.legal-hero__title{font:700 clamp(36px,4.4vw,52px)/1.1 \"Roboto\",sans-serif;color:#1a1d21!important;margin:0 0 16px;letter-spacing:-.02em}.legal-hero__subtitle{font:400 clamp(16px,1.4vw,19px)/1.5 \"Roboto\",sans-serif;color:#5a6473;margin:0;text-wrap:pretty}.legal-hero__meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:24px}.legal-hero__pill{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;background:#fff;border:1px solid #e2e5ea;border-radius:9999px;font:500 12px/1 Roboto,sans-serif;color:#5a6473}.legal-hero__pill .fa{font-size:11px;color:#7c8696}.legal-hero__edit{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;font:600 12px/1 Roboto,sans-serif;color:var(--first);text-decoration:none;border:1px solid #cfd4dc;border-radius:9999px;background:#fff;transition:border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-hero__edit:hover{border-color:var(--first)}.legal-tabs-band{border-bottom:1px solid #e2e5ea;background:#f7f8fa}.legal-tabs-band__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px)}.legal-tabs{display:inline-flex;gap:0;padding:0;margin:0;list-style:none;border-bottom:0}.legal-tabs__item{margin:0;padding:0}.legal-tabs__link{display:inline-flex;align-items:center;padding:14px 4px;margin-right:28px;font:600 14px/1 Roboto,sans-serif;color:#5a6473;text-decoration:none;cursor:pointer;border-bottom:2px solid transparent;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-tabs__link:hover{color:#1a1d21}.legal-tabs__link.active,.legal-tabs__item.active .legal-tabs__link{color:#1a1d21;border-bottom-color:var(--first)}.legal-body{padding:48px 0 96px}.legal-body__container{max-width:1200px;margin:0 auto;padding:0 clamp(20px,4vw,48px);display:grid;grid-template-columns:240px minmax(0,1fr);gap:64px;align-items:start}.legal-body--no-toc .legal-body__container{grid-template-columns:minmax(0,1fr)}.legal-sidebar{position:sticky;top:88px}.legal-sidebar__label{font:600 11px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:#7c8696;margin:0 0 14px}.legal-sidebar__nav{display:flex;flex-direction:column;border-left:1px solid #e2e5ea}.legal-sidebar__link{display:block;padding:7px 14px;margin-left:-1px;border-left:2px solid transparent;font:500 13px/1.45 Roboto,sans-serif;color:#5a6473;text-decoration:none;transition:color .15s cubic-bezier(.2,.7,.2,1),border-color .15s cubic-bezier(.2,.7,.2,1)}.legal-sidebar__link:hover{color:#1a1d21}.legal-sidebar__link:target,.legal-sidebar__link.is-active{color:var(--first);border-left-color:var(--first)}.legal-main{min-width:0}.legal-page__card{display:block;background:#fff;border:1px solid #e2e5ea;border-radius:14px;padding:48px;box-shadow:0 1px 2px #0f172a08}.legal-page__body{max-width:70ch}.legal-page__empty{text-align:center;padding:56px 16px;color:#5a6473}.legal-page__empty .fa{font-size:40px;color:#cfd4dc;margin-bottom:20px}.legal-page__empty h2{font:600 20px/1.3 Roboto,sans-serif;color:#1a1d21!important;margin:0 0 8px}.legal-page__empty p{font:400 15px/1.6 Roboto,sans-serif;color:#5a6473;margin:0}.legal-contact{margin-top:32px;padding:36px;background:#fff;border:1px solid #e2e5ea;border-radius:14px;box-shadow:0 1px 2px #0f172a08}.legal-contact__label{display:inline-block;font:600 11px/1 Roboto,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:#7c8696;margin-bottom:10px}h2.legal-contact__title{font:600 22px/1.3 Roboto,sans-serif;color:#1a1d21!important;margin:0 0 10px;letter-spacing:-.005em}.legal-contact__body{font:400 15px/1.65 Roboto,sans-serif;color:#5a6473;margin:0 0 20px;max-width:56ch;text-wrap:pretty}.legal-contact__cta{display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 22px;font:600 14px/1 Roboto,sans-serif;color:#fff!important;text-decoration:none;background:var(--first);border:1px solid var(--first);border-radius:10px;transition:background-color .15s cubic-bezier(.2,.7,.2,1),transform .15s cubic-bezier(.2,.7,.2,1),box-shadow .15s cubic-bezier(.2,.7,.2,1)}.legal-contact__cta:hover{background:color-mix(in srgb,var(--first) 88%,#000 12%);transform:translateY(-1px);box-shadow:0 10px 24px -12px var(--first)}::ng-deep .legal-page__body.ql-container,::ng-deep .legal-page__body .ql-container{max-width:none!important;margin:0;border:0!important;font-family:Roboto,sans-serif;resize:none!important}::ng-deep .legal-page__body .ql-editor{padding:0;max-width:70ch;font:400 16px/1.75 Roboto,sans-serif;color:#5a6473}::ng-deep .legal-page__body .ql-editor h1{font:700 28px/1.25 Roboto,sans-serif;color:#1a1d21;margin:0 0 16px;letter-spacing:-.01em}::ng-deep .legal-page__body .ql-editor h2{font:600 24px/1.3 Roboto,sans-serif;color:#1a1d21;margin:40px 0 12px;letter-spacing:-.005em;scroll-margin-top:88px}::ng-deep .legal-page__body .ql-editor h3{font:600 18px/1.4 Roboto,sans-serif;color:#1a1d21;margin:28px 0 8px}::ng-deep .legal-page__body .ql-editor h4,::ng-deep .legal-page__body .ql-editor h5,::ng-deep .legal-page__body .ql-editor h6{font:600 16px/1.4 Roboto,sans-serif;color:#1a1d21;margin:24px 0 6px}::ng-deep .legal-page__body .ql-editor p{font:400 16px/1.75 Roboto,sans-serif;color:#5a6473;margin:0 0 14px;text-wrap:pretty}::ng-deep .legal-page__body .ql-editor p strong,::ng-deep .legal-page__body .ql-editor strong{font-weight:600;color:#1a1d21}::ng-deep .legal-page__body .ql-editor a{color:var(--first);text-decoration:none;font-weight:500}::ng-deep .legal-page__body .ql-editor a:hover{text-decoration:underline}::ng-deep .legal-page__body .ql-editor ol,::ng-deep .legal-page__body .ql-editor ul{padding-left:24px;margin:8px 0 16px}::ng-deep .legal-page__body .ql-editor ol li,::ng-deep .legal-page__body .ql-editor ul li{font:400 16px/1.75 Roboto,sans-serif;color:#5a6473;margin:6px 0;padding:0}::ng-deep .legal-page__body .ql-editor ol li::marker,::ng-deep .legal-page__body .ql-editor ul li::marker{color:#7c8696;font-weight:500}::ng-deep .legal-page__body .ql-editor blockquote{border-left:3px solid #e2e5ea;padding:4px 0 4px 18px;margin:20px 0;color:#5a6473;font-style:italic}::ng-deep .legal-page__body .ql-editor hr{border:0;border-top:1px solid #e2e5ea;margin:40px 0}@media(max-width:991px){.legal-hero{padding:40px 0 24px}.legal-body{padding:32px 0 64px}.legal-body__container{grid-template-columns:1fr;gap:32px}.legal-sidebar{position:static}.legal-sidebar__nav{display:none}.legal-page__card{padding:32px}.legal-contact{padding:28px}}@media(max-width:575px){.legal-hero{padding:32px 0 20px}h1.legal-hero__title{font-size:30px}.legal-page__card,.legal-contact{padding:22px;border-radius:12px}.legal-contact__title{font-size:19px}.legal-tabs__link{padding:12px 4px;margin-right:20px;font-size:13px}}@media print{.legal-page{background:#fff}.legal-sidebar,.legal-tabs-band,.legal-hero__back,.legal-hero__edit,.legal-contact__cta{display:none!important}.legal-page__card{border:0;padding:0;box-shadow:none}.legal-body__container{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "component", type: i3$3.AppLoaderComponent, selector: "pw-loader", inputs: ["isVisible", "closeOnOutsideClick", "autoCloseTimeOut"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i5.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i5.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i5.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i5.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i5.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i5.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: HeaderComponent, selector: "pw-header", inputs: ["landing"] }, { kind: "pipe", type: i5$1.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i8.DatePipe, name: "date" }] }); }
|
|
5382
5955
|
}
|
|
5383
5956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: PrivacyAndTosComponent, decorators: [{
|
|
5384
5957
|
type: Component,
|
|
@@ -5803,7 +6376,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
5803
6376
|
|
|
5804
6377
|
class SplashComponent {
|
|
5805
6378
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SplashComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5806
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: SplashComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<pw-loader [isVisible]=\"true\"></pw-loader>\n", dependencies: [{ kind: "component", type: i3$
|
|
6379
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.19", type: SplashComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<pw-loader [isVisible]=\"true\"></pw-loader>\n", dependencies: [{ kind: "component", type: i3$3.AppLoaderComponent, selector: "pw-loader", inputs: ["isVisible", "closeOnOutsideClick", "autoCloseTimeOut"] }] }); }
|
|
5807
6380
|
}
|
|
5808
6381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SplashComponent, decorators: [{
|
|
5809
6382
|
type: Component,
|
|
@@ -5878,6 +6451,7 @@ class SharedComponentsModule {
|
|
|
5878
6451
|
GroupsComponent,
|
|
5879
6452
|
GroupDefinitionComponent,
|
|
5880
6453
|
NumberPickerComponent,
|
|
6454
|
+
OnlineIndicatorComponent,
|
|
5881
6455
|
HeaderComponent,
|
|
5882
6456
|
LandingPageFooterBComponent,
|
|
5883
6457
|
PwDynamicPageComponent,
|
|
@@ -5942,6 +6516,7 @@ class SharedComponentsModule {
|
|
|
5942
6516
|
GroupsComponent,
|
|
5943
6517
|
GroupDefinitionComponent,
|
|
5944
6518
|
NumberPickerComponent,
|
|
6519
|
+
OnlineIndicatorComponent,
|
|
5945
6520
|
HeaderComponent,
|
|
5946
6521
|
LandingPageFooterBComponent,
|
|
5947
6522
|
PwDynamicPageComponent,
|
|
@@ -5999,6 +6574,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
5999
6574
|
GroupsComponent,
|
|
6000
6575
|
GroupDefinitionComponent,
|
|
6001
6576
|
NumberPickerComponent,
|
|
6577
|
+
OnlineIndicatorComponent,
|
|
6002
6578
|
HeaderComponent,
|
|
6003
6579
|
LandingPageFooterBComponent,
|
|
6004
6580
|
PwDynamicPageComponent,
|
|
@@ -6049,6 +6625,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
6049
6625
|
GroupsComponent,
|
|
6050
6626
|
GroupDefinitionComponent,
|
|
6051
6627
|
NumberPickerComponent,
|
|
6628
|
+
OnlineIndicatorComponent,
|
|
6052
6629
|
HeaderComponent,
|
|
6053
6630
|
LandingPageFooterBComponent,
|
|
6054
6631
|
PwDynamicPageComponent,
|
|
@@ -6135,5 +6712,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
|
|
|
6135
6712
|
* Generated bundle index. Do not edit.
|
|
6136
6713
|
*/
|
|
6137
6714
|
|
|
6138
|
-
export { AuthenticatorComponent, COMPONENT_REGISTRY, ClearBitIconComponent, CollapsibleSidebarComponent, CollapsibleSidebarKeyboardShortcutDirective, CollapsibleSidebarService, CollapsibleSidebarSuperAdminGuard, CollapsibleSidebarTriggerDirective, ComingSoonComponent, CommandPaletteComponent, CommandPaletteService, CompletionBarComponent, ConfirmDialogComponent, ConfirmDialogService, DateRangePickerComponent, DynamicPageContextService, EntityGroupComponent, GroupDefinitionComponent, GroupsComponent, HeaderComponent, InputContainerComponent, LandingPageFooterBComponent, NoDataComponent, NumberPickerComponent, PasswordValidationComponent, PermissionTreeComponent, PrivacyAndTosComponent, PrivacyPolicyComponent, PwBrainChatComponent, PwCookieBannerComponent, PwDynamicPageComponent, PwTabsComponent, RecordsSummaryComponent, ResourceSharedComponentsModule, SharedComponentsModule, SplashComponent, TermsConditionsComponent, UI_BUILDER_FLAG, UiLayoutService, registeredType, registeredTypeNames };
|
|
6715
|
+
export { AuthenticatorComponent, BRAIN_CHAT_UPLOAD_APIS, COMPONENT_REGISTRY, ClearBitIconComponent, CollapsibleSidebarComponent, CollapsibleSidebarKeyboardShortcutDirective, CollapsibleSidebarService, CollapsibleSidebarSuperAdminGuard, CollapsibleSidebarTriggerDirective, ComingSoonComponent, CommandPaletteComponent, CommandPaletteService, CompletionBarComponent, ConfirmDialogComponent, ConfirmDialogService, DateRangePickerComponent, DynamicPageContextService, EntityGroupComponent, GroupDefinitionComponent, GroupsComponent, HeaderComponent, InputContainerComponent, LandingPageFooterBComponent, NoDataComponent, NumberPickerComponent, OnlineIndicatorComponent, PasswordValidationComponent, PermissionTreeComponent, PrivacyAndTosComponent, PrivacyPolicyComponent, PwBrainChatComponent, PwCookieBannerComponent, PwDynamicPageComponent, PwTabsComponent, RecordsSummaryComponent, ResourceSharedComponentsModule, SharedComponentsModule, SplashComponent, TermsConditionsComponent, UI_BUILDER_FLAG, UiLayoutService, registeredType, registeredTypeNames };
|
|
6139
6716
|
//# sourceMappingURL=posiwise-shared-components.mjs.map
|