@acorex/components 21.0.3-next.39 → 21.0.3-next.40

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.
Files changed (129) hide show
  1. package/{conversation2 → conversation}/README.md +23 -23
  2. package/fesm2022/acorex-components-button.mjs +4 -4
  3. package/fesm2022/acorex-components-button.mjs.map +1 -1
  4. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs +13711 -0
  5. package/fesm2022/acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs.map +1 -0
  6. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs +119 -0
  7. package/fesm2022/acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs.map +1 -0
  8. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs +59 -0
  9. package/fesm2022/acorex-components-conversation-audio-composer.payload-BHQJNyXz.mjs.map +1 -0
  10. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs +432 -0
  11. package/fesm2022/acorex-components-conversation-audio-picker.component-BD_fN2Ip.mjs.map +1 -0
  12. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs +177 -0
  13. package/fesm2022/acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map +1 -0
  14. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs +54 -0
  15. package/fesm2022/acorex-components-conversation-audio.payload-Bag4aTut.mjs.map +1 -0
  16. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs +101 -0
  17. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map +1 -0
  18. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs +100 -0
  19. package/fesm2022/acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map +1 -0
  20. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs +121 -0
  21. package/fesm2022/acorex-components-conversation-conversation-file.file-type-DB-2xhaC.mjs.map +1 -0
  22. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs +84 -0
  23. package/fesm2022/acorex-components-conversation-conversation-image.file-type-C02OzZZB.mjs.map +1 -0
  24. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs +238 -0
  25. package/fesm2022/acorex-components-conversation-conversation-info-media-view.component-Mhk7JE6K.mjs.map +1 -0
  26. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs +1080 -0
  27. package/fesm2022/acorex-components-conversation-conversation-info-panel.component-CNaM5ajR.mjs.map +1 -0
  28. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs +102 -0
  29. package/fesm2022/acorex-components-conversation-conversation-video.file-type-Pescv4Vu.mjs.map +1 -0
  30. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs +90 -0
  31. package/fesm2022/acorex-components-conversation-conversation-voice.file-type-DDd47o4r.mjs.map +1 -0
  32. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs +1840 -0
  33. package/fesm2022/acorex-components-conversation-emoji-categories-C7Gm95V0.mjs.map +1 -0
  34. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs +44 -0
  35. package/fesm2022/acorex-components-conversation-fallback-renderer.component-CYh_6O6j.mjs.map +1 -0
  36. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs +64 -0
  37. package/fesm2022/acorex-components-conversation-file-composer.payload-Dy7aG-EH.mjs.map +1 -0
  38. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs +468 -0
  39. package/fesm2022/acorex-components-conversation-file-picker.component-DCVgl33l.mjs.map +1 -0
  40. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs +125 -0
  41. package/fesm2022/acorex-components-conversation-file-renderer.component-DgCi06Mg.mjs.map +1 -0
  42. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs +50 -0
  43. package/fesm2022/acorex-components-conversation-file.payload-DyFxTQYn.mjs.map +1 -0
  44. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs +21 -0
  45. package/fesm2022/acorex-components-conversation-format-media-DUD4vA6F.mjs.map +1 -0
  46. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs +77 -0
  47. package/fesm2022/acorex-components-conversation-image-attachment.component-CLMGxXPl.mjs.map +1 -0
  48. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs +407 -0
  49. package/fesm2022/acorex-components-conversation-image-picker.component-CS343UDa.mjs.map +1 -0
  50. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs +83 -0
  51. package/fesm2022/acorex-components-conversation-image-renderer.component-Cy0TA6cL.mjs.map +1 -0
  52. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs +184 -0
  53. package/fesm2022/acorex-components-conversation-index-3V2b14I0.mjs.map +1 -0
  54. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs +266 -0
  55. package/fesm2022/acorex-components-conversation-index-MCvfr9Zd.mjs.map +1 -0
  56. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs +149 -0
  57. package/fesm2022/acorex-components-conversation-location-picker.component-DcNQzuoU.mjs.map +1 -0
  58. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs +118 -0
  59. package/fesm2022/acorex-components-conversation-location-renderer.component-Cw2PB0LM.mjs.map +1 -0
  60. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs +17 -0
  61. package/fesm2022/acorex-components-conversation-media-formatters-DV3wEEno.mjs.map +1 -0
  62. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs +140 -0
  63. package/fesm2022/acorex-components-conversation-media-playback-info-bar-banner.component-DbWUl6M2.mjs.map +1 -0
  64. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs +33 -0
  65. package/fesm2022/acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs.map +1 -0
  66. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs +172 -0
  67. package/fesm2022/acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs.map +1 -0
  68. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs +224 -0
  69. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Du8Lj9Sp.mjs.map +1 -0
  70. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs +81 -0
  71. package/fesm2022/acorex-components-conversation-pagination-demo-data-oIT_YJmN.mjs.map +1 -0
  72. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs +91 -0
  73. package/fesm2022/acorex-components-conversation-picker-header.component-BneIFjXq.mjs.map +1 -0
  74. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs +537 -0
  75. package/fesm2022/acorex-components-conversation-picker-toolbar.component-BthRvEeE.mjs.map +1 -0
  76. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs +163 -0
  77. package/fesm2022/acorex-components-conversation-picker-upload-C-PlKPaU.mjs.map +1 -0
  78. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs +68 -0
  79. package/fesm2022/acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs.map +1 -0
  80. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs +95 -0
  81. package/fesm2022/acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs.map +1 -0
  82. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs +187 -0
  83. package/fesm2022/acorex-components-conversation-search.component-B-nc6xiA.mjs.map +1 -0
  84. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs +170 -0
  85. package/fesm2022/acorex-components-conversation-send-message-media-BRklgfV7.mjs.map +1 -0
  86. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs +750 -0
  87. package/fesm2022/acorex-components-conversation-shared-storage.seed-J9PA4l3c.mjs.map +1 -0
  88. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs +103 -0
  89. package/fesm2022/acorex-components-conversation-sticker-renderer.component-BmBwy7Ig.mjs.map +1 -0
  90. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs +55 -0
  91. package/fesm2022/acorex-components-conversation-system-renderer.component-uie3tm5N.mjs.map +1 -0
  92. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs +109 -0
  93. package/fesm2022/acorex-components-conversation-text-renderer.component-DNAquHYK.mjs.map +1 -0
  94. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs +105 -0
  95. package/fesm2022/acorex-components-conversation-video-attachment.component-CGaUhnSb.mjs.map +1 -0
  96. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs +62 -0
  97. package/fesm2022/acorex-components-conversation-video-composer.payload-DMqRkafr.mjs.map +1 -0
  98. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs +446 -0
  99. package/fesm2022/acorex-components-conversation-video-picker.component-DPwSBnoH.mjs.map +1 -0
  100. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs +181 -0
  101. package/fesm2022/acorex-components-conversation-video-renderer.component-DKa9mUe2.mjs.map +1 -0
  102. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs +54 -0
  103. package/fesm2022/acorex-components-conversation-video.payload-C8QaqxuX.mjs.map +1 -0
  104. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs +17 -0
  105. package/fesm2022/acorex-components-conversation-voice-composer.payload-DLVow7ex.mjs.map +1 -0
  106. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs +344 -0
  107. package/fesm2022/acorex-components-conversation-voice-recorder.component-D_rdANZN.mjs.map +1 -0
  108. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs +270 -0
  109. package/fesm2022/acorex-components-conversation-voice-renderer.component-BY5FJcT8.mjs.map +1 -0
  110. package/fesm2022/acorex-components-conversation.mjs +2 -0
  111. package/fesm2022/acorex-components-conversation.mjs.map +1 -0
  112. package/fesm2022/acorex-components-kbd.mjs +2 -2
  113. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  114. package/fesm2022/acorex-components-scheduler-picker.mjs +22 -14
  115. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  116. package/fesm2022/acorex-components-side-menu.mjs +4 -13
  117. package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
  118. package/fesm2022/acorex-components-tree-view.mjs +2 -2
  119. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  120. package/package.json +6 -10
  121. package/types/{acorex-components-conversation2.d.ts → acorex-components-conversation.d.ts} +1127 -1928
  122. package/types/acorex-components-scheduler-picker.d.ts +2 -0
  123. package/types/acorex-components-side-menu.d.ts +1 -3
  124. package/fesm2022/acorex-components-conversation2.mjs +0 -22347
  125. package/fesm2022/acorex-components-conversation2.mjs.map +0 -1
  126. package/fesm2022/acorex-components-sidebar.mjs +0 -275
  127. package/fesm2022/acorex-components-sidebar.mjs.map +0 -1
  128. package/sidebar/README.md +0 -5
  129. package/types/acorex-components-sidebar.d.ts +0 -132
@@ -0,0 +1,177 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, DestroyRef, viewChildren, signal, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { l as copyWithFileTypeFallback, m as AXConversationInfoBarService } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
5
+ import { AXFileTypeRegistryService } from '@acorex/core/file';
6
+ import { AXTranslationService } from '@acorex/core/translation';
7
+ import { A as AXConversationMessageRendererCopyHostComponent, m as mediaCopyText } from './acorex-components-conversation-message-renderer-copy-host.component-oXTr_Lfq.mjs';
8
+ import { normalizeAudioPayload } from './acorex-components-conversation-audio.payload-Bag4aTut.mjs';
9
+ import { A as AXConversationAudioAttachmentComponent } from './acorex-components-conversation-audio-attachment.component-CLvS3W8F.mjs';
10
+ import { A as AXConversationMessageRendererStateComponent } from './acorex-components-conversation-message-renderer-state.component-Dp-JdHWr.mjs';
11
+ import { b as bindMediaRendererContentState, r as reportMediaLoadError, s as syncPlaybackInfoBarBanner } from './acorex-components-conversation-playback-banner-sync-D8FFKde6.mjs';
12
+ import './acorex-components-conversation-renderer-shared.styles-Digah3Zn.mjs';
13
+
14
+ class AXConversationAudioRendererComponent extends AXConversationMessageRendererCopyHostComponent {
15
+ copy() {
16
+ return copyWithFileTypeFallback(this.message(), this.fileTypes, () => {
17
+ const p = this.payload();
18
+ return mediaCopyText(p.caption, 'Audio', 'audio files', p.audios.length, p.audios.map((item) => item.title?.trim() || item.url?.trim()));
19
+ });
20
+ }
21
+ constructor() {
22
+ super();
23
+ this.fileTypes = inject(AXFileTypeRegistryService);
24
+ this.translation = inject(AXTranslationService);
25
+ this.destroyRef = inject(DestroyRef);
26
+ this.infoBarService = inject(AXConversationInfoBarService, { optional: true });
27
+ this.attachments = viewChildren(AXConversationAudioAttachmentComponent, ...(ngDevMode ? [{ debugName: "attachments" }] : /* istanbul ignore next */ []));
28
+ this._contentState = signal('ready', ...(ngDevMode ? [{ debugName: "_contentState" }] : /* istanbul ignore next */ []));
29
+ this.activeTrackIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeTrackIndex" }] : /* istanbul ignore next */ []));
30
+ this.isPlaying = signal(false, ...(ngDevMode ? [{ debugName: "isPlaying" }] : /* istanbul ignore next */ []));
31
+ this.currentTime = signal(0, ...(ngDevMode ? [{ debugName: "currentTime" }] : /* istanbul ignore next */ []));
32
+ this.duration = signal(0, ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
33
+ this.message = input.required(...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
34
+ this.rendererState = computed(() => ({
35
+ deliveryStatus: this.message().status,
36
+ contentState: this._contentState(),
37
+ }), ...(ngDevMode ? [{ debugName: "rendererState" }] : /* istanbul ignore next */ []));
38
+ this.payload = computed(() => normalizeAudioPayload(this.message().payload), ...(ngDevMode ? [{ debugName: "payload" }] : /* istanbul ignore next */ []));
39
+ this.audios = computed(() => this.payload().audios, ...(ngDevMode ? [{ debugName: "audios" }] : /* istanbul ignore next */ []));
40
+ this.caption = computed(() => this.payload().caption?.trim() || '', ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
41
+ this.audioLoadErrorLabel = computed(() => this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-audio'), ...(ngDevMode ? [{ debugName: "audioLoadErrorLabel" }] : /* istanbul ignore next */ []));
42
+ bindMediaRendererContentState(this.message, this._contentState, () => this.audios());
43
+ this.destroyRef.onDestroy(() => {
44
+ const messageId = this.message()?.id;
45
+ if (messageId && this.infoBarService) {
46
+ this.infoBarService.hideMessageBanner(messageId);
47
+ }
48
+ });
49
+ }
50
+ onPlayingChange(index, playing) {
51
+ if (playing) {
52
+ this.activeTrackIndex.set(index);
53
+ this.pauseOtherTracks(index);
54
+ this.isPlaying.set(true);
55
+ this.syncInfoBarBanner(true);
56
+ return;
57
+ }
58
+ if (this.activeTrackIndex() === index) {
59
+ this.isPlaying.set(false);
60
+ this.syncInfoBarBanner();
61
+ }
62
+ }
63
+ onTimeUpdate(index, time) {
64
+ if (this.activeTrackIndex() !== index) {
65
+ return;
66
+ }
67
+ this.currentTime.set(time);
68
+ this.syncInfoBarBanner();
69
+ }
70
+ onDurationChange(index, duration) {
71
+ if (this.activeTrackIndex() !== index) {
72
+ return;
73
+ }
74
+ this.duration.set(duration);
75
+ this.syncInfoBarBanner();
76
+ }
77
+ onPlaybackEnded(index) {
78
+ if (this.activeTrackIndex() !== index) {
79
+ return;
80
+ }
81
+ this.isPlaying.set(false);
82
+ this.currentTime.set(0);
83
+ this.syncInfoBarBanner();
84
+ }
85
+ onPlaybackError() {
86
+ if (!reportMediaLoadError(this.message(), this._contentState)) {
87
+ return;
88
+ }
89
+ this.isPlaying.set(false);
90
+ this.infoBarService?.hideMessageBanner(this.message().id);
91
+ }
92
+ togglePlay() {
93
+ this.attachments()[this.activeTrackIndex()]?.togglePlay();
94
+ }
95
+ pauseOtherTracks(activeIndex) {
96
+ this.attachments().forEach((attachment, index) => {
97
+ if (index !== activeIndex) {
98
+ attachment.pause();
99
+ }
100
+ });
101
+ }
102
+ pausePlayback() {
103
+ this.attachments()[this.activeTrackIndex()]?.pause();
104
+ this.isPlaying.set(false);
105
+ }
106
+ syncInfoBarBanner(forceOpen = false) {
107
+ if (!this.infoBarService) {
108
+ return;
109
+ }
110
+ const message = this.message();
111
+ const track = this.audios()[this.activeTrackIndex()];
112
+ const title = this.payload().caption?.trim() || track?.title?.trim() || 'Audio';
113
+ syncPlaybackInfoBarBanner(this.infoBarService, message, {
114
+ title,
115
+ currentTime: this.currentTime(),
116
+ duration: this.duration() || track?.duration || 0,
117
+ isPlaying: this.isPlaying(),
118
+ onTogglePlay: () => this.togglePlay(),
119
+ onClose: () => this.pausePlayback(),
120
+ }, { forceOpen });
121
+ }
122
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationAudioRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
123
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationAudioRendererComponent, isStandalone: true, selector: "ax-conversation-audio-renderer", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "attachments", predicate: AXConversationAudioAttachmentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
124
+ <div class="ax-conversation-msg ax-conversation-msg--wide">
125
+ <ax-conversation-message-renderer-state
126
+ [rendererState]="rendererState()"
127
+ [message]="message()"
128
+ [contentErrorLabel]="audioLoadErrorLabel()"
129
+ />
130
+ <div class="ax-conversation-msg__stack">
131
+ @for (audio of audios(); track audio.mediaId ?? audio.url; let i = $index) {
132
+ <ax-conversation-audio-attachment
133
+ [item]="audio"
134
+ (playingChange)="onPlayingChange(i, $event)"
135
+ (timeUpdate)="onTimeUpdate(i, $event)"
136
+ (durationChange)="onDurationChange(i, $event)"
137
+ (playbackEnded)="onPlaybackEnded(i)"
138
+ (playbackError)="onPlaybackError()"
139
+ />
140
+ }
141
+ </div>
142
+ @if (caption()) {
143
+ <p class="ax-conversation-msg__caption">{{ caption() }}</p>
144
+ }
145
+ </div>
146
+ `, isInline: true, styles: [":host{display:block;max-width:100%}.ax-conversation-msg,.ax-conversation-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-conversation-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-conversation-msg__grid--single{grid-template-columns:1fr}.ax-conversation-msg__grid--single ::ng-deep .ax-conversation-image-attachment{max-height:min(50dvh,20rem)}.ax-conversation-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-conversation-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@container (max-width: 380px){.ax-conversation-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-conversation-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-conversation-msg--flush{width:100%;max-width:100%;gap:0}.ax-conversation-msg--flush .ax-conversation-msg__caption{padding:.375rem .625rem 0}.ax-conversation-msg--flush .ax-conversation-msg__grid{border-radius:0;background:transparent}.ax-conversation-msg--flush .ax-conversation-msg__stack{gap:2px}.ax-conversation-msg--flush ::ng-deep .ax-conversation-video{border-radius:0}.ax-conversation-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXConversationAudioAttachmentComponent, selector: "ax-conversation-audio-attachment", inputs: ["item"], outputs: ["playingChange", "timeUpdate", "durationChange", "playbackEnded", "playbackError"] }, { kind: "component", type: AXConversationMessageRendererStateComponent, selector: "ax-conversation-message-renderer-state", inputs: ["rendererState", "message", "contentErrorLabel", "deliveryFailedLabel", "showContentErrorChrome", "contentErrorStyle", "contentErrorIconClass", "placement", "contentRetryEnabled"], outputs: ["contentRetry"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
147
+ }
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationAudioRendererComponent, decorators: [{
149
+ type: Component,
150
+ args: [{ selector: 'ax-conversation-audio-renderer', imports: [CommonModule, AXConversationAudioAttachmentComponent, AXConversationMessageRendererStateComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
151
+ <div class="ax-conversation-msg ax-conversation-msg--wide">
152
+ <ax-conversation-message-renderer-state
153
+ [rendererState]="rendererState()"
154
+ [message]="message()"
155
+ [contentErrorLabel]="audioLoadErrorLabel()"
156
+ />
157
+ <div class="ax-conversation-msg__stack">
158
+ @for (audio of audios(); track audio.mediaId ?? audio.url; let i = $index) {
159
+ <ax-conversation-audio-attachment
160
+ [item]="audio"
161
+ (playingChange)="onPlayingChange(i, $event)"
162
+ (timeUpdate)="onTimeUpdate(i, $event)"
163
+ (durationChange)="onDurationChange(i, $event)"
164
+ (playbackEnded)="onPlaybackEnded(i)"
165
+ (playbackError)="onPlaybackError()"
166
+ />
167
+ }
168
+ </div>
169
+ @if (caption()) {
170
+ <p class="ax-conversation-msg__caption">{{ caption() }}</p>
171
+ }
172
+ </div>
173
+ `, styles: [":host{display:block;max-width:100%}.ax-conversation-msg,.ax-conversation-msg__stack{display:flex;flex-direction:column;gap:.375rem}.ax-conversation-msg__grid{display:grid;gap:2px;width:100%;border-radius:var(--ax-sys-border-radius, .5rem);overflow:hidden;background:rgb(var(--ax-sys-color-border-light-surface))}.ax-conversation-msg__grid--single{grid-template-columns:1fr}.ax-conversation-msg__grid--single ::ng-deep .ax-conversation-image-attachment{max-height:min(50dvh,20rem)}.ax-conversation-msg__grid--dual{grid-template-columns:repeat(2,1fr)}.ax-conversation-msg__grid--multi{grid-template-columns:repeat(3,1fr);grid-auto-rows:10rem}@container (max-width: 380px){.ax-conversation-msg__grid--multi{grid-template-columns:repeat(2,1fr);grid-auto-rows:10rem}}.ax-conversation-msg__caption{margin:0;padding:0 .125rem;font-size:.8125rem;line-height:1.4;word-break:break-word;opacity:.88}.ax-conversation-msg--flush{width:100%;max-width:100%;gap:0}.ax-conversation-msg--flush .ax-conversation-msg__caption{padding:.375rem .625rem 0}.ax-conversation-msg--flush .ax-conversation-msg__grid{border-radius:0;background:transparent}.ax-conversation-msg--flush .ax-conversation-msg__stack{gap:2px}.ax-conversation-msg--flush ::ng-deep .ax-conversation-video{border-radius:0}.ax-conversation-msg__card{border-radius:var(--ax-sys-border-radius, .5rem);border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-surface));overflow:hidden}\n"] }]
174
+ }], ctorParameters: () => [], propDecorators: { attachments: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => AXConversationAudioAttachmentComponent), { isSignal: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }] } });
175
+
176
+ export { AXConversationAudioRendererComponent };
177
+ //# sourceMappingURL=acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-audio-renderer.component-CcxVVprx.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/audio-renderer/audio-renderer.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n computed,\n inject,\n input,\n signal,\n viewChildren,\n} from '@angular/core';\nimport { AXConversationInfoBarService } from '../../../../components';\nimport type { AXConversationAudioPayload, AXConversationMessage } from '../../../../models';\nimport type { AXConversationMessageRendererContentState } from '../../../../registries/message-renderer.registry';\nimport { AXFileTypeRegistryService } from '@acorex/core/file';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXConversationMessageRendererCopyHostComponent,\n mediaCopyText,\n} from '../shared/message-renderer-copy-host.component';\nimport { copyWithFileTypeFallback } from '../../../../utils/file-type-message.resolve';\nimport { normalizeAudioPayload } from './audio.payload';\nimport { AXConversationAudioAttachmentComponent } from '../shared/audio-attachment.component';\nimport { AXConversationMessageRendererStateComponent } from '../shared/message-renderer-state.component';\nimport { bindMediaRendererContentState, reportMediaLoadError } from '../shared/media-renderer-content-state';\nimport { syncPlaybackInfoBarBanner } from '../shared/playback-banner-sync';\nimport { AX_CONVERSATION_RENDERER_SHARED_STYLES } from '../shared/renderer-shared.styles';\n\n@Component({\n selector: 'ax-conversation-audio-renderer',\n imports: [CommonModule, AXConversationAudioAttachmentComponent, AXConversationMessageRendererStateComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"ax-conversation-msg ax-conversation-msg--wide\">\n <ax-conversation-message-renderer-state\n [rendererState]=\"rendererState()\"\n [message]=\"message()\"\n [contentErrorLabel]=\"audioLoadErrorLabel()\"\n />\n <div class=\"ax-conversation-msg__stack\">\n @for (audio of audios(); track audio.mediaId ?? audio.url; let i = $index) {\n <ax-conversation-audio-attachment\n [item]=\"audio\"\n (playingChange)=\"onPlayingChange(i, $event)\"\n (timeUpdate)=\"onTimeUpdate(i, $event)\"\n (durationChange)=\"onDurationChange(i, $event)\"\n (playbackEnded)=\"onPlaybackEnded(i)\"\n (playbackError)=\"onPlaybackError()\"\n />\n }\n </div>\n @if (caption()) {\n <p class=\"ax-conversation-msg__caption\">{{ caption() }}</p>\n }\n </div>\n `,\n styles: [AX_CONVERSATION_RENDERER_SHARED_STYLES],\n})\nexport class AXConversationAudioRendererComponent extends AXConversationMessageRendererCopyHostComponent {\n private readonly fileTypes = inject(AXFileTypeRegistryService);\n private readonly translation = inject(AXTranslationService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly infoBarService = inject(AXConversationInfoBarService, { optional: true });\n private readonly attachments = viewChildren(AXConversationAudioAttachmentComponent);\n\n private readonly _contentState = signal<AXConversationMessageRendererContentState>('ready');\n private readonly activeTrackIndex = signal(0);\n private readonly isPlaying = signal(false);\n private readonly currentTime = signal(0);\n private readonly duration = signal(0);\n\n readonly message = input.required<AXConversationMessage>();\n readonly rendererState = computed(() => ({\n deliveryStatus: this.message().status,\n contentState: this._contentState(),\n }));\n\n readonly payload = computed(() => normalizeAudioPayload(this.message().payload as AXConversationAudioPayload));\n readonly audios = computed(() => this.payload().audios);\n readonly caption = computed(() => this.payload().caption?.trim() || '');\n\n readonly audioLoadErrorLabel = computed(() =>\n this.translation.translateSync('@acorex:chat.renderer-state.could-not-load-audio'),\n );\n\n copy(): Promise<string> {\n return copyWithFileTypeFallback(this.message(), this.fileTypes, () => {\n const p = this.payload();\n return mediaCopyText(\n p.caption,\n 'Audio',\n 'audio files',\n p.audios.length,\n p.audios.map((item) => item.title?.trim() || item.url?.trim()),\n );\n });\n }\n\n constructor() {\n super();\n bindMediaRendererContentState(this.message, this._contentState, () => this.audios());\n\n this.destroyRef.onDestroy(() => {\n const messageId = this.message()?.id;\n if (messageId && this.infoBarService) {\n this.infoBarService.hideMessageBanner(messageId);\n }\n });\n }\n\n onPlayingChange(index: number, playing: boolean): void {\n if (playing) {\n this.activeTrackIndex.set(index);\n this.pauseOtherTracks(index);\n this.isPlaying.set(true);\n this.syncInfoBarBanner(true);\n return;\n }\n\n if (this.activeTrackIndex() === index) {\n this.isPlaying.set(false);\n this.syncInfoBarBanner();\n }\n }\n\n onTimeUpdate(index: number, time: number): void {\n if (this.activeTrackIndex() !== index) {\n return;\n }\n this.currentTime.set(time);\n this.syncInfoBarBanner();\n }\n\n onDurationChange(index: number, duration: number): void {\n if (this.activeTrackIndex() !== index) {\n return;\n }\n this.duration.set(duration);\n this.syncInfoBarBanner();\n }\n\n onPlaybackEnded(index: number): void {\n if (this.activeTrackIndex() !== index) {\n return;\n }\n this.isPlaying.set(false);\n this.currentTime.set(0);\n this.syncInfoBarBanner();\n }\n\n onPlaybackError(): void {\n if (!reportMediaLoadError(this.message(), this._contentState)) {\n return;\n }\n this.isPlaying.set(false);\n this.infoBarService?.hideMessageBanner(this.message().id);\n }\n\n togglePlay(): void {\n this.attachments()[this.activeTrackIndex()]?.togglePlay();\n }\n\n private pauseOtherTracks(activeIndex: number): void {\n this.attachments().forEach((attachment, index) => {\n if (index !== activeIndex) {\n attachment.pause();\n }\n });\n }\n\n private pausePlayback(): void {\n this.attachments()[this.activeTrackIndex()]?.pause();\n this.isPlaying.set(false);\n }\n\n private syncInfoBarBanner(forceOpen = false): void {\n if (!this.infoBarService) {\n return;\n }\n const message = this.message();\n const track = this.audios()[this.activeTrackIndex()];\n const title = this.payload().caption?.trim() || track?.title?.trim() || 'Audio';\n\n syncPlaybackInfoBarBanner(\n this.infoBarService,\n message,\n {\n title,\n currentTime: this.currentTime(),\n duration: this.duration() || track?.duration || 0,\n isPlaying: this.isPlaying(),\n onTogglePlay: () => this.togglePlay(),\n onClose: () => this.pausePlayback(),\n },\n { forceOpen },\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AA0DM,MAAO,oCAAqC,SAAQ,8CAA8C,CAAA;IA2BtG,IAAI,GAAA;AACF,QAAA,OAAO,wBAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,MAAK;AACnE,YAAA,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE;AACxB,Y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AAoC,EAAA,UAAA,EAAA,CAAA;kBA9BhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,EAAA,OAAA,EACjC,CAAC,YAAY,EAAE,sCAAsC,EAAE,2CAA2C,CAAC,EAAA,eAAA,EAC3F,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;AAuBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,87CAAA,CAAA,EAAA;0HAQ2C,sCAAsC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -0,0 +1,54 @@
1
+ import { s as resolvePersistableMediaUrl } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
2
+
3
+ function loose(payload) {
4
+ return payload;
5
+ }
6
+ function str(value) {
7
+ return typeof value === 'string' && value.length > 0 ? value : undefined;
8
+ }
9
+ function num(value, fallback = 0) {
10
+ return typeof value === 'number' && Number.isFinite(value) ? value : fallback;
11
+ }
12
+ function sanitizeAudioItem(item) {
13
+ const url = resolvePersistableMediaUrl(item.url);
14
+ if (url === item.url) {
15
+ return item;
16
+ }
17
+ return { ...item, url };
18
+ }
19
+ function normalizeAudioPayload(payload) {
20
+ const raw = loose(payload);
21
+ const existing = raw['audios'];
22
+ if (Array.isArray(existing) && existing.length > 0) {
23
+ return {
24
+ type: 'audio',
25
+ audios: existing.map(sanitizeAudioItem),
26
+ caption: payload.caption,
27
+ };
28
+ }
29
+ const url = resolvePersistableMediaUrl(str(raw['url']));
30
+ const mediaId = str(raw['mediaId']);
31
+ if (url || mediaId) {
32
+ return {
33
+ type: 'audio',
34
+ caption: payload.caption,
35
+ audios: [
36
+ {
37
+ ...(url ? { url } : {}),
38
+ title: str(raw['title']),
39
+ duration: num(raw['duration']),
40
+ mimeType: str(raw['mimeType']),
41
+ size: typeof raw['size'] === 'number' ? raw['size'] : undefined,
42
+ mediaId,
43
+ artist: str(raw['artist']),
44
+ coverUrl: str(raw['coverUrl']),
45
+ waveform: Array.isArray(raw['waveform']) ? raw['waveform'] : undefined,
46
+ },
47
+ ],
48
+ };
49
+ }
50
+ return { type: 'audio', audios: [], caption: payload.caption };
51
+ }
52
+
53
+ export { normalizeAudioPayload };
54
+ //# sourceMappingURL=acorex-components-conversation-audio.payload-Bag4aTut.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-audio.payload-Bag4aTut.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/message-list/components/audio-renderer/audio.payload.ts"],"sourcesContent":["import type { AXConversationAudioMediaItem, AXConversationAudioPayload } from '../../../../models';\nimport { resolvePersistableMediaUrl } from '../../../composer/components/shared/persisted-media-url';\n\ntype AXConversationLooseRecord = Record<string, unknown>;\n\nfunction loose(payload: AXConversationAudioPayload): AXConversationLooseRecord {\n return payload as unknown as AXConversationLooseRecord;\n}\n\nfunction str(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction num(value: unknown, fallback = 0): number {\n return typeof value === 'number' && Number.isFinite(value) ? value : fallback;\n}\n\nfunction sanitizeAudioItem(item: AXConversationAudioMediaItem): AXConversationAudioMediaItem {\n const url = resolvePersistableMediaUrl(item.url);\n if (url === item.url) {\n return item;\n }\n return { ...item, url };\n}\n\nexport function normalizeAudioPayload(payload: AXConversationAudioPayload): AXConversationAudioPayload {\n const raw = loose(payload);\n const existing = raw['audios'];\n if (Array.isArray(existing) && existing.length > 0) {\n return {\n type: 'audio',\n audios: (existing as AXConversationAudioMediaItem[]).map(sanitizeAudioItem),\n caption: payload.caption,\n };\n }\n\n const url = resolvePersistableMediaUrl(str(raw['url']));\n const mediaId = str(raw['mediaId']);\n if (url || mediaId) {\n return {\n type: 'audio',\n caption: payload.caption,\n audios: [\n {\n ...(url ? { url } : {}),\n title: str(raw['title']),\n duration: num(raw['duration']),\n mimeType: str(raw['mimeType']),\n size: typeof raw['size'] === 'number' ? raw['size'] : undefined,\n mediaId,\n artist: str(raw['artist']),\n coverUrl: str(raw['coverUrl']),\n waveform: Array.isArray(raw['waveform']) ? (raw['waveform'] as number[]) : undefined,\n },\n ],\n };\n }\n\n return { type: 'audio', audios: [], caption: payload.caption };\n}\n"],"names":[],"mappings":";;AAKA,SAAS,KAAK,CAAC,OAAmC,EAAA;AAChD,IAAA,OAAO,OAA+C;AACxD;AAEA,SAAS,GAAG,CAAC,KAAc,EAAA;AACzB,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,GAAG,SAAS;AAC1E;AAEA,SAAS,GAAG,CAAC,KAAc,EAAE,QAAQ,GAAG,CAAC,EAAA;AACvC,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,QAAQ;AAC/E;AAEA,SAAS,iBAAiB,CAAC,IAAkC,EAAA;IAC3D,MAAM,GAAG,GAAG,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC;AAChD,IAAA,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,EAAE;AACpB,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;AACzB;AAEM,SAAU,qBAAqB,CAAC,OAAmC,EAAA;AACvE,IAAA,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC;AAC1B,IAAA,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IA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O,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;AAChE;;;;"}
@@ -0,0 +1,101 @@
1
+ import { AXComponentCloseEvent, AXClosableComponent } from '@acorex/cdk/common';
2
+ import { AXTranslationService } from '@acorex/core/translation';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, input, computed, EventEmitter, ChangeDetectionStrategy, Component } from '@angular/core';
5
+
6
+ class AXConversationComposerActionChoiceDialogComponent {
7
+ constructor() {
8
+ this.translation = inject(AXTranslationService);
9
+ this.actions = input.required(...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
10
+ this.fileCount = input(1, ...(ngDevMode ? [{ debugName: "fileCount" }] : /* istanbul ignore next */ []));
11
+ this.composerActionRegistry = input.required(...(ngDevMode ? [{ debugName: "composerActionRegistry" }] : /* istanbul ignore next */ []));
12
+ this.__popup__ = input(...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
13
+ this.hintText = computed(() => {
14
+ const count = this.fileCount();
15
+ if (count === 1) {
16
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');
17
+ }
18
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {
19
+ params: { count },
20
+ });
21
+ }, ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
22
+ this.onClosed = new EventEmitter();
23
+ }
24
+ getActionLabel(action) {
25
+ return this.composerActionRegistry().getActionLabel(action);
26
+ }
27
+ getActionTooltip(action) {
28
+ return this.composerActionRegistry().getActionTooltip(action);
29
+ }
30
+ choose(action) {
31
+ const event = new AXComponentCloseEvent();
32
+ event.component = this;
33
+ event.data = action;
34
+ this.onClosed.emit(event);
35
+ }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
37
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXConversationComposerActionChoiceDialogComponent, isStandalone: true, selector: "ax-conversation-composer-action-choice-dialog", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, fileCount: { classPropertyName: "fileCount", publicName: "fileCount", isSignal: true, isRequired: false, transformFunction: null }, composerActionRegistry: { classPropertyName: "composerActionRegistry", publicName: "composerActionRegistry", isSignal: true, isRequired: true, transformFunction: null }, __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], ngImport: i0, template: `
38
+ <div class="composer-action-choice" role="dialog" aria-modal="true">
39
+ <p class="composer-action-choice__hint">{{ hintText() }}</p>
40
+ <ul class="composer-action-choice__list" role="listbox">
41
+ @for (action of actions(); track action.id) {
42
+ <li role="presentation">
43
+ <button
44
+ type="button"
45
+ class="composer-action-choice__option"
46
+ role="option"
47
+ (click)="choose(action)"
48
+ [attr.aria-label]="getActionLabel(action)"
49
+ >
50
+ <span class="composer-action-choice__icon" aria-hidden="true">
51
+ <i [class]="action.icon"></i>
52
+ </span>
53
+ <span class="composer-action-choice__text">
54
+ <span class="composer-action-choice__title">{{ getActionLabel(action) }}</span>
55
+ @if (getActionTooltip(action); as tip) {
56
+ <span class="composer-action-choice__subtitle">{{ tip }}</span>
57
+ }
58
+ </span>
59
+ <i class="fa-light fa-chevron-right composer-action-choice__chevron" aria-hidden="true"></i>
60
+ </button>
61
+ </li>
62
+ }
63
+ </ul>
64
+ </div>
65
+ `, isInline: true, styles: [":host{display:block}.composer-action-choice{display:flex;flex-direction:column;gap:.75rem;padding:.5rem;min-width:16rem}.composer-action-choice__hint{margin:0;font-size:.8125rem;line-height:1.45;color:rgba(var(--ax-sys-color-on-surface),.7)}.composer-action-choice__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.composer-action-choice__option{display:flex;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .5rem);background:rgb(var(--ax-sys-color-surface));cursor:pointer;text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.composer-action-choice__option:hover,.composer-action-choice__option:focus-visible{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06);outline:none;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}.composer-action-choice__icon{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-600));font-size:1.125rem}.composer-action-choice__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.composer-action-choice__title{font-size:.875rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.composer-action-choice__subtitle{font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-action-choice__chevron{flex-shrink:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.45)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
66
+ }
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, decorators: [{
68
+ type: Component,
69
+ args: [{ selector: 'ax-conversation-composer-action-choice-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: `
70
+ <div class="composer-action-choice" role="dialog" aria-modal="true">
71
+ <p class="composer-action-choice__hint">{{ hintText() }}</p>
72
+ <ul class="composer-action-choice__list" role="listbox">
73
+ @for (action of actions(); track action.id) {
74
+ <li role="presentation">
75
+ <button
76
+ type="button"
77
+ class="composer-action-choice__option"
78
+ role="option"
79
+ (click)="choose(action)"
80
+ [attr.aria-label]="getActionLabel(action)"
81
+ >
82
+ <span class="composer-action-choice__icon" aria-hidden="true">
83
+ <i [class]="action.icon"></i>
84
+ </span>
85
+ <span class="composer-action-choice__text">
86
+ <span class="composer-action-choice__title">{{ getActionLabel(action) }}</span>
87
+ @if (getActionTooltip(action); as tip) {
88
+ <span class="composer-action-choice__subtitle">{{ tip }}</span>
89
+ }
90
+ </span>
91
+ <i class="fa-light fa-chevron-right composer-action-choice__chevron" aria-hidden="true"></i>
92
+ </button>
93
+ </li>
94
+ }
95
+ </ul>
96
+ </div>
97
+ `, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], styles: [":host{display:block}.composer-action-choice{display:flex;flex-direction:column;gap:.75rem;padding:.5rem;min-width:16rem}.composer-action-choice__hint{margin:0;font-size:.8125rem;line-height:1.45;color:rgba(var(--ax-sys-color-on-surface),.7)}.composer-action-choice__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.composer-action-choice__option{display:flex;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .5rem);background:rgb(var(--ax-sys-color-surface));cursor:pointer;text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.composer-action-choice__option:hover,.composer-action-choice__option:focus-visible{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06);outline:none;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}.composer-action-choice__icon{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-600));font-size:1.125rem}.composer-action-choice__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.composer-action-choice__title{font-size:.875rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.composer-action-choice__subtitle{font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-action-choice__chevron{flex-shrink:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.45)}\n"] }]
98
+ }], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: true }] }], fileCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileCount", required: false }] }], composerActionRegistry: [{ type: i0.Input, args: [{ isSignal: true, alias: "composerActionRegistry", required: true }] }], __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
99
+
100
+ export { AXConversationComposerActionChoiceDialogComponent };
101
+ //# sourceMappingURL=acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-composer-action-choice-dialog.component-C28hl7iD.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.ts"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { ChangeDetectionStrategy, Component, EventEmitter, computed, inject, input } from '@angular/core';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\n\n@Component({\n selector: 'ax-conversation-composer-action-choice-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n (click)=\"choose(action)\"\n [attr.aria-label]=\"getActionLabel(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n </div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .composer-action-choice {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: 0.5rem;\n min-width: 16rem;\n }\n\n .composer-action-choice__hint {\n margin: 0;\n font-size: 0.8125rem;\n line-height: 1.45;\n color: rgba(var(--ax-sys-color-on-surface), 0.7);\n }\n\n .composer-action-choice__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .composer-action-choice__option {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n width: 100%;\n padding: 0.625rem 0.75rem;\n border: 1px solid rgb(var(--ax-sys-color-border-light-surface));\n border-radius: var(--ax-sys-border-radius, 0.5rem);\n background: rgb(var(--ax-sys-color-surface));\n cursor: pointer;\n text-align: start;\n transition:\n border-color 0.15s ease,\n background-color 0.15s ease,\n box-shadow 0.15s ease;\n }\n\n .composer-action-choice__option:hover,\n .composer-action-choice__option:focus-visible {\n border-color: rgb(var(--ax-sys-color-primary-500));\n background: rgba(var(--ax-sys-color-primary-500), 0.06);\n outline: none;\n box-shadow: 0 0 0 1px rgba(var(--ax-sys-color-primary-500), 0.25);\n }\n\n .composer-action-choice__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.5rem;\n height: 2.5rem;\n flex-shrink: 0;\n border-radius: var(--ax-sys-border-radius, 0.375rem);\n background: rgba(var(--ax-sys-color-primary-500), 0.1);\n color: rgb(var(--ax-sys-color-primary-600));\n font-size: 1.125rem;\n }\n\n .composer-action-choice__text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n }\n\n .composer-action-choice__title {\n font-size: 0.875rem;\n font-weight: 600;\n color: rgb(var(--ax-sys-color-on-surface));\n }\n\n .composer-action-choice__subtitle {\n font-size: 0.75rem;\n color: rgba(var(--ax-sys-color-on-surface), 0.6);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .composer-action-choice__chevron {\n flex-shrink: 0;\n font-size: 0.75rem;\n color: rgba(var(--ax-sys-color-on-surface), 0.45);\n }\n `,\n ],\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }],\n})\nexport class AXConversationComposerActionChoiceDialogComponent {\n private readonly translation = inject(AXTranslationService);\n\n readonly actions = input.required<AXConversationComposerAction[]>();\n readonly fileCount = input(1);\n readonly composerActionRegistry = input.required<AXConversationComposerActionRegistry>();\n readonly __popup__ = input<AXPopupRef | undefined>();\n\n readonly hintText = computed(() => {\n const count = this.fileCount();\n if (count === 1) {\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');\n }\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {\n params: { count },\n });\n });\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n\n getActionLabel(action: AXConversationComposerAction): string {\n return this.composerActionRegistry().getActionLabel(action);\n }\n\n getActionTooltip(action: AXConversationComposerAction): string | undefined {\n return this.composerActionRegistry().getActionTooltip(action);\n }\n\n choose(action: AXConversationComposerAction): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = action;\n this.onClosed.emit(event);\n }\n}\n"],"names":[],"mappings":";;;;;MAyIa,iDAAiD,CAAA;AAnI9D,IAAA,WAAA,GAAA;AAoImB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAElD,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAkC;AAC1D,QAAA,IAAA,CAAA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AAA,EAAA,CAAA,EAAA,QAAA,EAAA,+CAA+C,EAAA,eAAA,EACxC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT,EAAA,SAAA,EAkGU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,iDAAmD,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,6tDAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,100 @@
1
+ import { createFileTypeMetadata, AXFileTypeInfoProvider } from '@acorex/core/file';
2
+ import { isPlatformBrowser } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable } from '@angular/core';
5
+ import { p as AX_CONVERSATION_AUDIO_CATALOG } from './acorex-components-conversation-acorex-components-conversation-YhVa42TC.mjs';
6
+ import { normalizeAudioPayload } from './acorex-components-conversation-audio.payload-Bag4aTut.mjs';
7
+ import { f as formatDuration, a as formatFileSize } from './acorex-components-conversation-media-formatters-DV3wEEno.mjs';
8
+
9
+ const MB = 1024 * 1024;
10
+ const AX_CONVERSATION_AUDIO_PRESENTATION = {
11
+ icon: 'fa-light fa-music text-amber-500',
12
+ title: 'Audio',
13
+ };
14
+ const AX_CONVERSATION_AUDIO_UTILITY = {
15
+ preview: 'preview',
16
+ duration: 'duration',
17
+ formatSize: 'formatSize',
18
+ formatDuration: 'formatDuration',
19
+ createLocalPreviewUrl: 'createLocalPreviewUrl',
20
+ };
21
+ function blobUrl(ctx, blob) {
22
+ if (!isPlatformBrowser(ctx.platformId)) {
23
+ return '';
24
+ }
25
+ return URL.createObjectURL(blob);
26
+ }
27
+ function mediaDuration(ctx, file) {
28
+ if (!isPlatformBrowser(ctx.platformId)) {
29
+ return Promise.resolve(0);
30
+ }
31
+ return new Promise((resolve, reject) => {
32
+ const el = document.createElement('audio');
33
+ el.preload = 'metadata';
34
+ el.onloadedmetadata = () => {
35
+ URL.revokeObjectURL(el.src);
36
+ resolve(el.duration);
37
+ };
38
+ el.onerror = () => {
39
+ URL.revokeObjectURL(el.src);
40
+ reject(new Error('Failed to load audio metadata'));
41
+ };
42
+ el.src = URL.createObjectURL(file);
43
+ });
44
+ }
45
+ function conversationAudioUtilities() {
46
+ return {
47
+ [AX_CONVERSATION_AUDIO_UTILITY.preview]: (ctx, file) => ctx.readAsDataUrl(file),
48
+ [AX_CONVERSATION_AUDIO_UTILITY.duration]: (ctx, file) => mediaDuration(ctx, file),
49
+ [AX_CONVERSATION_AUDIO_UTILITY.formatSize]: (_ctx, bytes) => formatFileSize(bytes),
50
+ [AX_CONVERSATION_AUDIO_UTILITY.formatDuration]: (_ctx, seconds) => formatDuration(seconds),
51
+ [AX_CONVERSATION_AUDIO_UTILITY.createLocalPreviewUrl]: (ctx, source) => blobUrl(ctx, source),
52
+ };
53
+ }
54
+ function createConversationAudioFileType() {
55
+ const presentation = AX_CONVERSATION_AUDIO_PRESENTATION;
56
+ return {
57
+ name: AX_CONVERSATION_AUDIO_CATALOG,
58
+ metadata: createFileTypeMetadata('conversation'),
59
+ title: presentation.title,
60
+ icon: presentation.icon,
61
+ validations: {
62
+ mimeTypes: ['audio/*'],
63
+ minSize: 1,
64
+ maxSize: 50 * MB,
65
+ },
66
+ extensions: [
67
+ { name: 'mp3', title: 'MP3' },
68
+ { name: 'wav', title: 'WAV', validations: { maxSize: 30 * MB } },
69
+ { name: 'ogg', title: 'OGG' },
70
+ { name: 'm4a', title: 'M4A' },
71
+ ],
72
+ utilities: conversationAudioUtilities(),
73
+ copy: (payload) => {
74
+ const audio = normalizeAudioPayload(payload);
75
+ const caption = audio.caption?.trim();
76
+ const items = audio.audios.map((item) => ({
77
+ url: item.url?.trim(),
78
+ title: item.title?.trim(),
79
+ }));
80
+ return {
81
+ text: caption ?? '',
82
+ meta: { kind: 'audio', caption, items, count: audio.audios.length },
83
+ };
84
+ },
85
+ };
86
+ }
87
+ class AXConversationAudioFileTypeProvider extends AXFileTypeInfoProvider {
88
+ items() {
89
+ return Promise.resolve([createConversationAudioFileType()]);
90
+ }
91
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationAudioFileTypeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
92
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationAudioFileTypeProvider, providedIn: 'root' }); }
93
+ }
94
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConversationAudioFileTypeProvider, decorators: [{
95
+ type: Injectable,
96
+ args: [{ providedIn: 'root' }]
97
+ }] });
98
+
99
+ export { AXConversationAudioFileTypeProvider, AX_CONVERSATION_AUDIO_CATALOG, AX_CONVERSATION_AUDIO_PRESENTATION, conversationAudioUtilities, createConversationAudioFileType };
100
+ //# sourceMappingURL=acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-conversation-audio.file-type-CfGSVnMA.mjs","sources":["../../../../packages/components/conversation/src/lib/plugins/composer/components/audio-picker/conversation-audio.file-type.ts"],"sourcesContent":["import type { AXFileCopyData, AXFileType } from '@acorex/core/file';\nimport { AXFileTypeInfoProvider, createFileTypeMetadata } from '@acorex/core/file';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport type { AXConversationAudioPayload } from '../../../../models';\nimport { AX_CONVERSATION_AUDIO_CATALOG } from '../../../../models/message-file-type-catalog';\nimport { normalizeAudioPayload } from '../../../message-list/components/audio-renderer/audio.payload';\nimport { formatDuration, formatFileSize } from '../shared/media-formatters';\n\nexport { AX_CONVERSATION_AUDIO_CATALOG };\n\nconst MB = 1024 * 1024;\n\nexport const AX_CONVERSATION_AUDIO_PRESENTATION = {\n icon: 'fa-light fa-music text-amber-500',\n title: 'Audio',\n} as const;\n\ntype AXConversationFileTypeUtilityContext = {\n readAsDataUrl: (file: File | Blob) => Promise<string>;\n platformId: object;\n};\n\nconst AX_CONVERSATION_AUDIO_UTILITY = {\n preview: 'preview',\n duration: 'duration',\n formatSize: 'formatSize',\n formatDuration: 'formatDuration',\n createLocalPreviewUrl: 'createLocalPreviewUrl',\n} as const;\n\nfunction blobUrl(ctx: AXConversationFileTypeUtilityContext, blob: Blob): string {\n if (!isPlatformBrowser(ctx.platformId)) {\n return '';\n }\n return URL.createObjectURL(blob);\n}\n\nfunction mediaDuration(ctx: AXConversationFileTypeUtilityContext, file: File | Blob): Promise<number> {\n if (!isPlatformBrowser(ctx.platformId)) {\n return Promise.resolve(0);\n }\n return new Promise((resolve, reject) => {\n const el = document.createElement('audio');\n el.preload = 'metadata';\n el.onloadedmetadata = () => {\n URL.revokeObjectURL(el.src);\n resolve(el.duration);\n };\n el.onerror = () => {\n URL.revokeObjectURL(el.src);\n reject(new Error('Failed to load audio metadata'));\n };\n el.src = URL.createObjectURL(file);\n });\n}\n\nexport function conversationAudioUtilities(): NonNullable<AXFileType['utilities']> {\n return {\n [AX_CONVERSATION_AUDIO_UTILITY.preview]: (ctx, file) =>\n (ctx as AXConversationFileTypeUtilityContext).readAsDataUrl(file as File),\n [AX_CONVERSATION_AUDIO_UTILITY.duration]: (ctx, file) =>\n mediaDuration(ctx as AXConversationFileTypeUtilityContext, file as File | Blob),\n [AX_CONVERSATION_AUDIO_UTILITY.formatSize]: (_ctx, bytes) => formatFileSize(bytes as number),\n [AX_CONVERSATION_AUDIO_UTILITY.formatDuration]: (_ctx, seconds) => formatDuration(seconds as number),\n [AX_CONVERSATION_AUDIO_UTILITY.createLocalPreviewUrl]: (ctx, source) =>\n blobUrl(ctx as AXConversationFileTypeUtilityContext, source as Blob),\n };\n}\n\nexport function createConversationAudioFileType(): AXFileType {\n const presentation = AX_CONVERSATION_AUDIO_PRESENTATION;\n return {\n name: AX_CONVERSATION_AUDIO_CATALOG,\n metadata: createFileTypeMetadata('conversation'),\n title: presentation.title,\n icon: presentation.icon,\n validations: {\n mimeTypes: ['audio/*'],\n minSize: 1,\n maxSize: 50 * MB,\n },\n extensions: [\n { name: 'mp3', title: 'MP3' },\n { name: 'wav', title: 'WAV', validations: { maxSize: 30 * MB } },\n { name: 'ogg', title: 'OGG' },\n { name: 'm4a', title: 'M4A' },\n ],\n utilities: conversationAudioUtilities(),\n copy: (payload): AXFileCopyData => {\n const audio = normalizeAudioPayload(payload as AXConversationAudioPayload);\n const caption = audio.caption?.trim();\n const items = audio.audios.map((item) => ({\n url: item.url?.trim(),\n title: item.title?.trim(),\n }));\n return {\n text: caption ?? '',\n meta: { kind: 'audio', caption, items, count: audio.audios.length },\n };\n },\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXConversationAudioFileTypeProvider extends AXFileTypeInfoProvider {\n items() {\n return Promise.resolve([createConversationAudioFileType()]);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAWA,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI;AAEf,MAAM,kCAAkC,GAAG;AAChD,IAAA,IAAI,EAAE,kCAAkC;AACxC,IAAA,KAAK,EAAE,OAAO;;AAQhB,MAAM,6BAA6B,GAAG;AACpC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,qBAAqB,EAAE,uBAAuB;CACtC;AAEV,SAAS,OAAO,CAAC,GAAyC,EAAE,IAAU,EAAA;IACpE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AACtC,QAAA,OAAO,EAAE;IACX;AACA,IAAA,OAAO,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;AAClC;AAEA,SAAS,aAAa,CAAC,GAAyC,EAAE,IAAiB,EAAA;IACjF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AACtC,QAAA,OAAO,OAAO,CAAC,OAA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